@isardsat/editorial-admin 6.0.3 → 6.0.4
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-8tTu7uK2.js +6 -0
- 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-fM4SW8Or.js +66 -0
- package/build/client/assets/dashboard.files-ieQA7EmW.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-oYP3wzz9.js +36 -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-9974ee04.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/chevron-down-BMtosYlL.js +0 -6
- 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,36 @@
|
|
|
1
|
+
import{w as en}from"./react-redux-kbMjYGuQ.js";import{a as ie,n as h,q as nn}from"./chunk-KNED5TY2-DAA_sFzt.js";import{B as tn}from"./button-Da66T3Bb.js";import{g as Q,s as q,a as rn,u as on,F as sn,b as G,c as X,d as fe,e as Y,I as me,f as H,C as cn}from"./input-BmmdOdbj.js";import{c as un}from"./utils-DslUJpbf.js";import{c as Te}from"./createLucideIcon-R2-3a7hN.js";import{u as an,d as ee,l as ln}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 dn=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pn=Te("loader-circle",dn);/**
|
|
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 hn=[["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"}]],fn=Te("loader",hn),Re=ie.forwardRef(({className:e,...n},t)=>h.jsx(pn,{ref:t,className:un(e,"animate-spin"),...n}));Re.displayName=fn.displayName;const _e=(e,n,t)=>{if(e&&"reportValidity"in e){const r=Q(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ce=(e,n)=>{for(const t in n.fields){const r=n.fields[t];r&&r.ref&&"reportValidity"in r.ref?_e(r.ref,t,e):r.refs&&r.refs.forEach(o=>_e(o,t,e))}},mn=(e,n)=>{n.shouldUseNativeValidation&&Ce(e,n);const t={};for(const r in e){const o=Q(n.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(_n(n.names||Object.keys(e),r)){const s=Object.assign({},Q(t,r));q(s,"root",i),q(t,r,s)}else q(t,r,i)}return t},_n=(e,n)=>e.some(t=>t.startsWith(n+"."));var gn=function(e,n){for(var t={};e.length;){var r=e[0],o=r.code,i=r.message,s=r.path.join(".");if(!t[s])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];t[s]={message:u.message,type:u.code}}else t[s]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(w){return w.errors.forEach(function(p){return e.push(p)})}),n){var a=t[s].types,d=a&&a[r.code];t[s]=rn(s,n,t,o,d?[].concat(d,r.message):r.message)}e.shift()}return t},vn=function(e,n,t){return t===void 0&&(t={}),function(r,o,i){try{return Promise.resolve(function(s,u){try{var a=Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](r,n)).then(function(d){return i.shouldUseNativeValidation&&Ce({},i),{errors:{},values:t.raw?r:d}})}catch(d){return u(d)}return a&&a.then?a.then(void 0,u):a}(0,function(s){if(function(u){return Array.isArray(u==null?void 0:u.errors)}(s))return{values:{},errors:mn(gn(s.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};function c(e,n,t){function r(u,a){var d;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(d=u._zod).traits??(d.traits=new Set),u._zod.traits.add(e),n(u,a);for(const w in s.prototype)w in u||Object.defineProperty(u,w,{value:s.prototype[w].bind(u)});u._zod.constr=s,u._zod.def=a}const o=(t==null?void 0:t.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var a;const d=t!=null&&t.Parent?new i:this;r(d,u),(a=d._zod).deferred??(a.deferred=[]);for(const w of d._zod.deferred)w();return d}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>{var a,d;return t!=null&&t.Parent&&u instanceof t.Parent?!0:(d=(a=u==null?void 0:u._zod)==null?void 0:a.traits)==null?void 0:d.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class T extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const De={};function E(e){return De}function zn(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function wn(e,n){return typeof n=="bigint"?n.toString():n}function Ue(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function se(e){return e==null}function ce(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}function _(e,n,t){Object.defineProperty(e,n,{get(){{const r=t();return e[n]=r,r}},set(r){Object.defineProperty(e,n,{value:r})},configurable:!0})}function ue(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function S(e){return JSON.stringify(e)}const Ne=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zn=Ue(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function te(e){if(ne(e)===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(ne(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}const $n=new Set(["string","number","symbol"]);function W(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function I(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t!=null&&t.parent)&&(r._zod.parent=e),r}function l(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function kn(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}function bn(e,n){const t={},r=e._zod.def;for(const o in n){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(t[o]=r.shape[o])}return I(e,{...e._zod.def,shape:t,checks:[]})}function yn(e,n){const t={...e._zod.def.shape},r=e._zod.def;for(const o in n){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);n[o]&&delete t[o]}return I(e,{...e._zod.def,shape:t,checks:[]})}function jn(e,n){if(!te(n))throw new Error("Invalid input to extend: expected a plain object");const t={...e._zod.def,get shape(){const r={...e._zod.def.shape,...n};return ue(this,"shape",r),r},checks:[]};return I(e,t)}function xn(e,n){return I(e,{...e._zod.def,get shape(){const t={...e._zod.def.shape,...n._zod.def.shape};return ue(this,"shape",t),t},catchall:n._zod.def.catchall,checks:[]})}function En(e,n,t){const r=n._zod.def.shape,o={...r};if(t)for(const i in t){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)o[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return I(n,{...n._zod.def,shape:o,checks:[]})}function Pn(e,n,t){const r=n._zod.def.shape,o={...r};if(t)for(const i in t){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)o[i]=new e({type:"nonoptional",innerType:r[i]});return I(n,{...n._zod.def,shape:o,checks:[]})}function A(e,n=0){var t;for(let r=n;r<e.issues.length;r++)if(((t=e.issues[r])==null?void 0:t.continue)!==!0)return!0;return!1}function ae(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function N(e){return typeof e=="string"?e:e==null?void 0:e.message}function P(e,n,t){var o,i,s,u,a,d;const r={...e,path:e.path??[]};if(!e.message){const w=N((s=(i=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,e))??N((u=n==null?void 0:n.error)==null?void 0:u.call(n,e))??N((a=t.customError)==null?void 0:a.call(t,e))??N((d=t.localeError)==null?void 0:d.call(t,e))??"Invalid input";r.message=w}return delete r.inst,delete r.continue,n!=null&&n.reportInput||delete r.input,r}function le(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function R(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}const Le=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(n,wn,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fe=c("$ZodError",Le),Ve=c("$ZodError",Le,{Parent:Error});function In(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(n(o))):r.push(n(o));return{formErrors:r,fieldErrors:t}}function On(e,n){const t=n||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>o({issues:u}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let u=r,a=0;for(;a<s.path.length;){const d=s.path[a];a===s.path.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],a++}}};return o(e),r}const Sn=e=>(n,t,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise)throw new T;if(s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(a=>P(a,i,E())));throw Ne(u,o==null?void 0:o.callee),u}return s.value},An=e=>async(n,t,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(a=>P(a,i,E())));throw Ne(u,o==null?void 0:o.callee),u}return s.value},Me=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},i=n._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new T;return i.issues.length?{success:!1,error:new(e??Fe)(i.issues.map(s=>P(s,o,E())))}:{success:!0,data:i.value}},Tn=Me(Ve),We=e=>async(n,t,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=n._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>P(s,o,E())))}:{success:!0,data:i.value}},Rn=We(Ve),Cn=/^[cC][^\s-]{8,}$/,Dn=/^[0-9a-z]+$/,Un=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Nn=/^[0-9a-vA-V]{20}$/,Ln=/^[A-Za-z0-9]{27}$/,Fn=/^[a-zA-Z0-9_-]{21}$/,Vn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ge=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Wn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Bn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Kn(){return new RegExp(Bn,"u")}const Jn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Gn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Xn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Be=/^[A-Za-z0-9_-]*$/,Hn=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Qn=/^\+(?:[0-9]){6,14}[0-9]$/,Ke="(?:(?:\\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])))",et=new RegExp(`^${Ke}$`);function Je(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nt(e){return new RegExp(`^${Je(e)}$`)}function tt(e){const n=Je({precision:e.precision}),t=["Z"];e.local&&t.push(""),e.offset&&t.push("([+-]\\d{2}:\\d{2})");const r=`${n}(?:${t.join("|")})`;return new RegExp(`^${Ke}T(?:${r})$`)}const rt=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},ot=/true|false/i,it=/^[^A-Z]*$/,st=/^[^a-z]*$/,j=c("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),ct=c("$ZodCheckMaxLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=n.maximum)return;const s=le(o);r.issues.push({origin:s,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),ut=c("$ZodCheckMinLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=n.minimum)return;const s=le(o);r.issues.push({origin:s,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),at=c("$ZodCheckLengthEquals",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===n.length)return;const s=le(o),u=i>n.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),B=c("$ZodCheckStringFormat",(e,n)=>{var t,r;j.init(e,n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),lt=c("$ZodCheckRegex",(e,n)=>{B.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),dt=c("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=it),B.init(e,n)}),pt=c("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=st),B.init(e,n)}),ht=c("$ZodCheckIncludes",(e,n)=>{j.init(e,n);const t=W(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${t}`:t);n.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),ft=c("$ZodCheckStartsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`^${W(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),mt=c("$ZodCheckEndsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`.*${W(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),_t=c("$ZodCheckOverwrite",(e,n)=>{j.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class gt{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
|
|
12
|
+
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const n=Function,t=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new n(...t,o.join(`
|
|
13
|
+
`))}}const vt={major:4,minor:0,patch:2},Z=c("$ZodType",(e,n)=>{var o;var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=vt;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const s of i._zod.onattach)s(e);if(r.length===0)(t=e._zod).deferred??(t.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,u,a)=>{let d=A(s),w;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(d)continue;const f=s.issues.length,m=p._zod.check(s);if(m instanceof Promise&&(a==null?void 0:a.async)===!1)throw new T;if(w||m instanceof Promise)w=(w??Promise.resolve()).then(async()=>{await m,s.issues.length!==f&&(d||(d=A(s,f)))});else{if(s.issues.length===f)continue;d||(d=A(s,f))}}return w?w.then(()=>s):s};e._zod.run=(s,u)=>{const a=e._zod.parse(s,u);if(a instanceof Promise){if(u.async===!1)throw new T;return a.then(d=>i(d,r,u))}return i(a,r,u)}}e["~standard"]={validate:i=>{var s;try{const u=Tn(e,i);return u.success?{value:u.data}:{issues:(s=u.error)==null?void 0:s.issues}}catch{return Rn(e,i).then(a=>{var d;return a.success?{value:a.data}:{issues:(d=a.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}}),de=c("$ZodString",(e,n)=>{var t;Z.init(e,n),e._zod.pattern=[...((t=e==null?void 0:e._zod.bag)==null?void 0:t.patterns)??[]].pop()??rt(e._zod.bag),e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),g=c("$ZodStringFormat",(e,n)=>{B.init(e,n),de.init(e,n)}),zt=c("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Mn),g.init(e,n)}),wt=c("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=ge(r))}else n.pattern??(n.pattern=ge());g.init(e,n)}),Zt=c("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=Wn),g.init(e,n)}),$t=c("$ZodURL",(e,n)=>{g.init(e,n),e._zod.check=t=>{try{const r=t.value,o=new URL(r),i=o.href;n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Hn.source,input:t.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:t.value,inst:e,continue:!n.abort})),!r.endsWith("/")&&i.endsWith("/")?t.value=i.slice(0,-1):t.value=i;return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),kt=c("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=Kn()),g.init(e,n)}),bt=c("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=Fn),g.init(e,n)}),yt=c("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=Cn),g.init(e,n)}),jt=c("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Dn),g.init(e,n)}),xt=c("$ZodULID",(e,n)=>{n.pattern??(n.pattern=Un),g.init(e,n)}),Et=c("$ZodXID",(e,n)=>{n.pattern??(n.pattern=Nn),g.init(e,n)}),Pt=c("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Ln),g.init(e,n)}),It=c("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=tt(n)),g.init(e,n)}),Ot=c("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=et),g.init(e,n)}),St=c("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=nt(n)),g.init(e,n)}),At=c("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=Vn),g.init(e,n)}),Tt=c("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=Jn),g.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv4"})}),Rt=c("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=qn),g.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv6"}),e._zod.check=t=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}}),Ct=c("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Gn),g.init(e,n)}),Dt=c("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Xn),g.init(e,n),e._zod.check=t=>{const[r,o]=t.value.split("/");try{if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}}});function qe(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ut=c("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=Yn),g.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64"}),e._zod.check=t=>{qe(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}});function Nt(e){if(!Be.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return qe(t)}const Lt=c("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Be),g.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64url"}),e._zod.check=t=>{Nt(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),Ft=c("$ZodE164",(e,n)=>{n.pattern??(n.pattern=Qn),g.init(e,n)});function Vt(e,n=null){try{const t=e.split(".");if(t.length!==3)return!1;const[r]=t;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const Mt=c("$ZodJWT",(e,n)=>{g.init(e,n),e._zod.check=t=>{Vt(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),Wt=c("$ZodBoolean",(e,n)=>{Z.init(e,n),e._zod.pattern=ot,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=!!t.value}catch{}const o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),t}}),Bt=c("$ZodUnknown",(e,n)=>{Z.init(e,n),e._zod.parse=t=>t}),Kt=c("$ZodNever",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function ve(e,n,t){e.issues.length&&n.issues.push(...ae(t,e.issues)),n.value[t]=e.value}const Jt=c("$ZodArray",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=t.value;if(!Array.isArray(o))return t.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),t;t.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const u=o[s],a=n.element._zod.run({value:u,issues:[]},r);a instanceof Promise?i.push(a.then(d=>ve(d,t,s))):ve(a,t,s)}return i.length?Promise.all(i).then(()=>t):t}});function L(e,n,t){e.issues.length&&n.issues.push(...ae(t,e.issues)),n.value[t]=e.value}function ze(e,n,t,r){e.issues.length?r[t]===void 0?t in r?n.value[t]=void 0:n.value[t]=e.value:n.issues.push(...ae(t,e.issues)):e.value===void 0?t in r&&(n.value[t]=void 0):n.value[t]=e.value}const qt=c("$ZodObject",(e,n)=>{Z.init(e,n);const t=Ue(()=>{const p=Object.keys(n.shape);for(const m of p)if(!(n.shape[m]instanceof Z))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);const f=kn(n.shape);return{shape:n.shape,keys:p,keySet:new Set(p),numKeys:p.length,optionalKeys:new Set(f)}});_(e._zod,"propValues",()=>{const p=n.shape,f={};for(const m in p){const y=p[m]._zod;if(y.values){f[m]??(f[m]=new Set);for(const x of y.values)f[m].add(x)}}return f});const r=p=>{const f=new gt(["shape","payload","ctx"]),m=t.value,y=b=>{const v=S(b);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};f.write("const input = payload.value;");const x=Object.create(null);let J=0;for(const b of m.keys)x[b]=`key_${J++}`;f.write("const newResult = {}");for(const b of m.keys)if(m.optionalKeys.has(b)){const v=x[b];f.write(`const ${v} = ${y(b)};`);const $=S(b);f.write(`
|
|
14
|
+
if (${v}.issues.length) {
|
|
15
|
+
if (input[${$}] === undefined) {
|
|
16
|
+
if (${$} in input) {
|
|
17
|
+
newResult[${$}] = undefined;
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
payload.issues = payload.issues.concat(
|
|
21
|
+
${v}.issues.map((iss) => ({
|
|
22
|
+
...iss,
|
|
23
|
+
path: iss.path ? [${$}, ...iss.path] : [${$}],
|
|
24
|
+
}))
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
} else if (${v}.value === undefined) {
|
|
28
|
+
if (${$} in input) newResult[${$}] = undefined;
|
|
29
|
+
} else {
|
|
30
|
+
newResult[${$}] = ${v}.value;
|
|
31
|
+
}
|
|
32
|
+
`)}else{const v=x[b];f.write(`const ${v} = ${y(b)};`),f.write(`
|
|
33
|
+
if (${v}.issues.length) payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
|
|
34
|
+
...iss,
|
|
35
|
+
path: iss.path ? [${S(b)}, ...iss.path] : [${S(b)}]
|
|
36
|
+
})));`),f.write(`newResult[${S(b)}] = ${v}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");const D=f.compile();return(b,v)=>D(p,b,v)};let o;const i=ne,s=!De.jitless,a=s&&Zn.value,d=n.catchall;let w;e._zod.parse=(p,f)=>{w??(w=t.value);const m=p.value;if(!i(m))return p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p;const y=[];if(s&&a&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)o||(o=r(n.shape)),p=o(p,f);else{p.value={};const v=w.shape;for(const $ of w.keys){const O=v[$],U=O._zod.run({value:m[$],issues:[]},f),pe=O._zod.optin==="optional"&&O._zod.optout==="optional";U instanceof Promise?y.push(U.then(he=>pe?ze(he,p,$,m):L(he,p,$))):pe?ze(U,p,$,m):L(U,p,$)}}if(!d)return y.length?Promise.all(y).then(()=>p):p;const x=[],J=w.keySet,D=d._zod,b=D.def.type;for(const v of Object.keys(m)){if(J.has(v))continue;if(b==="never"){x.push(v);continue}const $=D.run({value:m[v],issues:[]},f);$ instanceof Promise?y.push($.then(O=>L(O,p,v))):L($,p,v)}return x.length&&p.issues.push({code:"unrecognized_keys",keys:x,input:m,inst:e}),y.length?Promise.all(y).then(()=>p):p}});function we(e,n,t,r){for(const o of e)if(o.issues.length===0)return n.value=o.value,n;return n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(o=>o.issues.map(i=>P(i,r,E())))}),n}const Gt=c("$ZodUnion",(e,n)=>{Z.init(e,n),_(e._zod,"optin",()=>n.options.some(t=>t._zod.optin==="optional")?"optional":void 0),_(e._zod,"optout",()=>n.options.some(t=>t._zod.optout==="optional")?"optional":void 0),_(e._zod,"values",()=>{if(n.options.every(t=>t._zod.values))return new Set(n.options.flatMap(t=>Array.from(t._zod.values)))}),_(e._zod,"pattern",()=>{if(n.options.every(t=>t._zod.pattern)){const t=n.options.map(r=>r._zod.pattern);return new RegExp(`^(${t.map(r=>ce(r.source)).join("|")})$`)}}),e._zod.parse=(t,r)=>{let o=!1;const i=[];for(const s of n.options){const u=s._zod.run({value:t.value,issues:[]},r);if(u instanceof Promise)i.push(u),o=!0;else{if(u.issues.length===0)return u;i.push(u)}}return o?Promise.all(i).then(s=>we(s,t,e,r)):we(i,t,e,r)}}),Xt=c("$ZodIntersection",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,i=n.left._zod.run({value:o,issues:[]},r),s=n.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([a,d])=>Ze(t,a,d)):Ze(t,i,s)}});function re(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(te(e)&&te(n)){const t=Object.keys(n),r=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...n};for(const i of r){const s=re(e[i],n[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],i=n[r],s=re(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};t.push(s.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Ze(e,n,t){if(n.issues.length&&e.issues.push(...n.issues),t.issues.length&&e.issues.push(...t.issues),A(e))return e;const r=re(n.value,t.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const Yt=c("$ZodEnum",(e,n)=>{Z.init(e,n);const t=zn(n.entries);e._zod.values=new Set(t),e._zod.pattern=new RegExp(`^(${t.filter(r=>$n.has(typeof r)).map(r=>typeof r=="string"?W(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return e._zod.values.has(i)||r.issues.push({code:"invalid_value",values:t,input:i,inst:e}),r}}),Ht=c("$ZodTransform",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=n.transform(t.value,t);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(t.value=s,t));if(o instanceof Promise)throw new T;return t.value=o,t}}),Qt=c("$ZodOptional",(e,n)=>{Z.init(e,n),e._zod.optin="optional",e._zod.optout="optional",_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ce(t.source)})?$`):void 0}),e._zod.parse=(t,r)=>n.innerType._zod.optin==="optional"?n.innerType._zod.run(t,r):t.value===void 0?t:n.innerType._zod.run(t,r)}),er=c("$ZodNullable",(e,n)=>{Z.init(e,n),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ce(t.source)}|null)$`):void 0}),_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),nr=c("$ZodDefault",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>$e(i,n)):$e(o,n)}});function $e(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const tr=c("$ZodPrefault",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>(t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),rr=c("$ZodNonOptional",(e,n)=>{Z.init(e,n),_(e._zod,"values",()=>{const t=n.innerType._zod.values;return t?new Set([...t].filter(r=>r!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>ke(i,e)):ke(o,e)}});function ke(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const or=c("$ZodCatch",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=n.catchValue({...t,error:{issues:i.issues.map(s=>P(s,r,E()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=n.catchValue({...t,error:{issues:o.issues.map(i=>P(i,r,E()))},input:t.value}),t.issues=[]),t)}}),ir=c("$ZodPipe",(e,n)=>{Z.init(e,n),_(e._zod,"values",()=>n.in._zod.values),_(e._zod,"optin",()=>n.in._zod.optin),_(e._zod,"optout",()=>n.out._zod.optout),e._zod.parse=(t,r)=>{const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(i=>be(i,n,r)):be(o,n,r)}});function be(e,n,t){return A(e)?e:n.out._zod.run({value:e.value,issues:e.issues},t)}const sr=c("$ZodReadonly",(e,n)=>{Z.init(e,n),_(e._zod,"propValues",()=>n.innerType._zod.propValues),_(e._zod,"values",()=>n.innerType._zod.values),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(ye):ye(o)}});function ye(e){return e.value=Object.freeze(e.value),e}const cr=c("$ZodCustom",(e,n)=>{j.init(e,n),Z.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(i=>je(i,t,r,e));je(o,t,r,e)}});function je(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(R(o))}}class ur{constructor(){this._map=new Map,this._idmap=new Map}add(n,...t){const r=t[0];if(this._map.set(n,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};return delete r.id,{...r,...this._map.get(n)}}return this._map.get(n)}has(n){return this._map.has(n)}}function ar(){return new ur}const F=ar();function lr(e,n){return new e({type:"string",...l(n)})}function dr(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...l(n)})}function xe(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...l(n)})}function pr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...l(n)})}function hr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...l(n)})}function fr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...l(n)})}function mr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...l(n)})}function _r(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...l(n)})}function gr(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...l(n)})}function vr(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...l(n)})}function zr(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...l(n)})}function wr(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...l(n)})}function Zr(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...l(n)})}function $r(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...l(n)})}function kr(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...l(n)})}function br(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...l(n)})}function yr(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...l(n)})}function jr(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...l(n)})}function xr(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...l(n)})}function Er(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...l(n)})}function Pr(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...l(n)})}function Ir(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...l(n)})}function Or(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...l(n)})}function Sr(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...l(n)})}function Ar(e,n){return new e({type:"string",format:"date",check:"string_format",...l(n)})}function Tr(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...l(n)})}function Rr(e,n){return new e({type:"string",format:"duration",check:"string_format",...l(n)})}function Cr(e,n){return new e({type:"boolean",...l(n)})}function Dr(e){return new e({type:"unknown"})}function Ur(e,n){return new e({type:"never",...l(n)})}function Ge(e,n){return new ct({check:"max_length",...l(n),maximum:e})}function M(e,n){return new ut({check:"min_length",...l(n),minimum:e})}function Xe(e,n){return new at({check:"length_equals",...l(n),length:e})}function Nr(e,n){return new lt({check:"string_format",format:"regex",...l(n),pattern:e})}function Lr(e){return new dt({check:"string_format",format:"lowercase",...l(e)})}function Fr(e){return new pt({check:"string_format",format:"uppercase",...l(e)})}function Vr(e,n){return new ht({check:"string_format",format:"includes",...l(n),includes:e})}function Mr(e,n){return new ft({check:"string_format",format:"starts_with",...l(n),prefix:e})}function Wr(e,n){return new mt({check:"string_format",format:"ends_with",...l(n),suffix:e})}function C(e){return new _t({check:"overwrite",tx:e})}function Br(e){return C(n=>n.normalize(e))}function Kr(){return C(e=>e.trim())}function Jr(){return C(e=>e.toLowerCase())}function qr(){return C(e=>e.toUpperCase())}function Gr(e,n,t){return new e({type:"array",element:n,...l(t)})}function Xr(e,n,t){return new e({type:"custom",check:"custom",fn:n,...l(t)})}const Yr=c("ZodISODateTime",(e,n)=>{It.init(e,n),z.init(e,n)});function Hr(e){return Sr(Yr,e)}const Qr=c("ZodISODate",(e,n)=>{Ot.init(e,n),z.init(e,n)});function eo(e){return Ar(Qr,e)}const no=c("ZodISOTime",(e,n)=>{St.init(e,n),z.init(e,n)});function to(e){return Tr(no,e)}const ro=c("ZodISODuration",(e,n)=>{At.init(e,n),z.init(e,n)});function oo(e){return Rr(ro,e)}const io=(e,n)=>{Fe.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>On(e,t)},flatten:{value:t=>In(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},K=c("ZodError",io,{Parent:Error}),so=Sn(K),co=An(K),uo=Me(K),ao=We(K),k=c("ZodType",(e,n)=>(Z.init(e,n),e.def=n,Object.defineProperty(e,"_def",{value:n}),e.check=(...t)=>e.clone({...n,checks:[...n.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(t,r)=>I(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e),e.parse=(t,r)=>so(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>uo(e,t,r),e.parseAsync=async(t,r)=>co(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>ao(e,t,r),e.spa=e.safeParseAsync,e.refine=(t,r)=>e.check(oi(t,r)),e.superRefine=t=>e.check(ii(t)),e.overwrite=t=>e.check(C(t)),e.optional=()=>Oe(e),e.nullable=()=>Se(e),e.nullish=()=>Oe(Se(e)),e.nonoptional=t=>Xo(e,t),e.array=()=>Ro(e),e.or=t=>No([e,t]),e.and=t=>Fo(e,t),e.transform=t=>Ae(e,Wo(t)),e.default=t=>Jo(e,t),e.prefault=t=>Go(e,t),e.catch=t=>Ho(e,t),e.pipe=t=>Ae(e,t),e.readonly=()=>ni(e),e.describe=t=>{const r=e.clone();return F.add(r,{description:t}),r},Object.defineProperty(e,"description",{get(){var t;return(t=F.get(e))==null?void 0:t.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return F.get(e);const r=e.clone();return F.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ye=c("_ZodString",(e,n)=>{de.init(e,n),k.init(e,n);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...r)=>e.check(Nr(...r)),e.includes=(...r)=>e.check(Vr(...r)),e.startsWith=(...r)=>e.check(Mr(...r)),e.endsWith=(...r)=>e.check(Wr(...r)),e.min=(...r)=>e.check(M(...r)),e.max=(...r)=>e.check(Ge(...r)),e.length=(...r)=>e.check(Xe(...r)),e.nonempty=(...r)=>e.check(M(1,...r)),e.lowercase=r=>e.check(Lr(r)),e.uppercase=r=>e.check(Fr(r)),e.trim=()=>e.check(Kr()),e.normalize=(...r)=>e.check(Br(...r)),e.toLowerCase=()=>e.check(Jr()),e.toUpperCase=()=>e.check(qr())}),lo=c("ZodString",(e,n)=>{de.init(e,n),Ye.init(e,n),e.email=t=>e.check(dr(po,t)),e.url=t=>e.check(_r(ho,t)),e.jwt=t=>e.check(Or(Eo,t)),e.emoji=t=>e.check(gr(fo,t)),e.guid=t=>e.check(xe(Pe,t)),e.uuid=t=>e.check(pr(V,t)),e.uuidv4=t=>e.check(hr(V,t)),e.uuidv6=t=>e.check(fr(V,t)),e.uuidv7=t=>e.check(mr(V,t)),e.nanoid=t=>e.check(vr(mo,t)),e.guid=t=>e.check(xe(Pe,t)),e.cuid=t=>e.check(zr(_o,t)),e.cuid2=t=>e.check(wr(go,t)),e.ulid=t=>e.check(Zr(vo,t)),e.base64=t=>e.check(Er(yo,t)),e.base64url=t=>e.check(Pr(jo,t)),e.xid=t=>e.check($r(zo,t)),e.ksuid=t=>e.check(kr(wo,t)),e.ipv4=t=>e.check(br(Zo,t)),e.ipv6=t=>e.check(yr($o,t)),e.cidrv4=t=>e.check(jr(ko,t)),e.cidrv6=t=>e.check(xr(bo,t)),e.e164=t=>e.check(Ir(xo,t)),e.datetime=t=>e.check(Hr(t)),e.date=t=>e.check(eo(t)),e.time=t=>e.check(to(t)),e.duration=t=>e.check(oo(t))});function Ee(e){return lr(lo,e)}const z=c("ZodStringFormat",(e,n)=>{g.init(e,n),Ye.init(e,n)}),po=c("ZodEmail",(e,n)=>{Zt.init(e,n),z.init(e,n)}),Pe=c("ZodGUID",(e,n)=>{zt.init(e,n),z.init(e,n)}),V=c("ZodUUID",(e,n)=>{wt.init(e,n),z.init(e,n)}),ho=c("ZodURL",(e,n)=>{$t.init(e,n),z.init(e,n)}),fo=c("ZodEmoji",(e,n)=>{kt.init(e,n),z.init(e,n)}),mo=c("ZodNanoID",(e,n)=>{bt.init(e,n),z.init(e,n)}),_o=c("ZodCUID",(e,n)=>{yt.init(e,n),z.init(e,n)}),go=c("ZodCUID2",(e,n)=>{jt.init(e,n),z.init(e,n)}),vo=c("ZodULID",(e,n)=>{xt.init(e,n),z.init(e,n)}),zo=c("ZodXID",(e,n)=>{Et.init(e,n),z.init(e,n)}),wo=c("ZodKSUID",(e,n)=>{Pt.init(e,n),z.init(e,n)}),Zo=c("ZodIPv4",(e,n)=>{Tt.init(e,n),z.init(e,n)}),$o=c("ZodIPv6",(e,n)=>{Rt.init(e,n),z.init(e,n)}),ko=c("ZodCIDRv4",(e,n)=>{Ct.init(e,n),z.init(e,n)}),bo=c("ZodCIDRv6",(e,n)=>{Dt.init(e,n),z.init(e,n)}),yo=c("ZodBase64",(e,n)=>{Ut.init(e,n),z.init(e,n)}),jo=c("ZodBase64URL",(e,n)=>{Lt.init(e,n),z.init(e,n)}),xo=c("ZodE164",(e,n)=>{Ft.init(e,n),z.init(e,n)}),Eo=c("ZodJWT",(e,n)=>{Mt.init(e,n),z.init(e,n)}),Po=c("ZodBoolean",(e,n)=>{Wt.init(e,n),k.init(e,n)});function Io(e){return Cr(Po,e)}const Oo=c("ZodUnknown",(e,n)=>{Bt.init(e,n),k.init(e,n)});function Ie(){return Dr(Oo)}const So=c("ZodNever",(e,n)=>{Kt.init(e,n),k.init(e,n)});function Ao(e){return Ur(So,e)}const To=c("ZodArray",(e,n)=>{Jt.init(e,n),k.init(e,n),e.element=n.element,e.min=(t,r)=>e.check(M(t,r)),e.nonempty=t=>e.check(M(1,t)),e.max=(t,r)=>e.check(Ge(t,r)),e.length=(t,r)=>e.check(Xe(t,r)),e.unwrap=()=>e.element});function Ro(e,n){return Gr(To,e,n)}const Co=c("ZodObject",(e,n)=>{qt.init(e,n),k.init(e,n),_(e,"shape",()=>n.shape),e.keyof=()=>Vo(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ie()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ie()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ao()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>jn(e,t),e.merge=t=>xn(e,t),e.pick=t=>bn(e,t),e.omit=t=>yn(e,t),e.partial=(...t)=>En(He,e,t[0]),e.required=(...t)=>Pn(Qe,e,t[0])});function Do(e,n){const t={type:"object",get shape(){return ue(this,"shape",{...e}),this.shape},...l(n)};return new Co(t)}const Uo=c("ZodUnion",(e,n)=>{Gt.init(e,n),k.init(e,n),e.options=n.options});function No(e,n){return new Uo({type:"union",options:e,...l(n)})}const Lo=c("ZodIntersection",(e,n)=>{Xt.init(e,n),k.init(e,n)});function Fo(e,n){return new Lo({type:"intersection",left:e,right:n})}const oe=c("ZodEnum",(e,n)=>{Yt.init(e,n),k.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(t.has(s))i[s]=n.entries[s];else throw new Error(`Key ${s} not found in enum`);return new oe({...n,checks:[],...l(o),entries:i})},e.exclude=(r,o)=>{const i={...n.entries};for(const s of r)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new oe({...n,checks:[],...l(o),entries:i})}});function Vo(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new oe({type:"enum",entries:t,...l(n)})}const Mo=c("ZodTransform",(e,n)=>{Ht.init(e,n),k.init(e,n),e._zod.parse=(t,r)=>{t.addIssue=i=>{if(typeof i=="string")t.issues.push(R(i,t.value,n));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=t.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),t.issues.push(R(s))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function Wo(e){return new Mo({type:"transform",transform:e})}const He=c("ZodOptional",(e,n)=>{Qt.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new He({type:"optional",innerType:e})}const Bo=c("ZodNullable",(e,n)=>{er.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Se(e){return new Bo({type:"nullable",innerType:e})}const Ko=c("ZodDefault",(e,n)=>{nr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jo(e,n){return new Ko({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():n}})}const qo=c("ZodPrefault",(e,n)=>{tr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Go(e,n){return new qo({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():n}})}const Qe=c("ZodNonOptional",(e,n)=>{rr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Xo(e,n){return new Qe({type:"nonoptional",innerType:e,...l(n)})}const Yo=c("ZodCatch",(e,n)=>{or.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ho(e,n){return new Yo({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Qo=c("ZodPipe",(e,n)=>{ir.init(e,n),k.init(e,n),e.in=n.in,e.out=n.out});function Ae(e,n){return new Qo({type:"pipe",in:e,out:n})}const ei=c("ZodReadonly",(e,n)=>{sr.init(e,n),k.init(e,n)});function ni(e){return new ei({type:"readonly",innerType:e})}const ti=c("ZodCustom",(e,n)=>{cr.init(e,n),k.init(e,n)});function ri(e){const n=new j({check:"custom"});return n._zod.check=e,n}function oi(e,n={}){return Xr(ti,e,n)}function ii(e){const n=ri(t=>(t.addIssue=r=>{if(typeof r=="string")t.issues.push(R(r,t.value,n._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),t.issues.push(R(o))}},e(t.value,t)));return n}const si=Do({email:Ee().nonempty("Please enter your email").email(),password:Ee().nonempty("Please enter your password"),remember:Io()});function ci(){"use no memo";const e=an(),n=ee(o=>o.auth.isLoading),t=on({resolver:vn(si),defaultValues:{email:"",password:"",remember:!1}}),r=ie.useCallback(({email:o,password:i,remember:s})=>{e(ln({email:o,password:i,remember:s}))},[e]);return h.jsx("div",{className:"flex flex-col",children:h.jsx(sn,{...t,children:h.jsxs("form",{onSubmit:t.handleSubmit(r),className:"space-y-4",children:[h.jsx(G,{control:t.control,name:"email",rules:{required:!0},render:({field:o})=>h.jsxs(X,{children:[h.jsx(fe,{className:"flex gap-1 items-baseline",children:"Email"}),h.jsx(Y,{children:h.jsx(me,{placeholder:"callasmaria@example.com",...o})}),h.jsx(H,{})]})}),h.jsx(G,{name:"password",control:t.control,rules:{required:!0},render:({field:o})=>h.jsxs(X,{children:[h.jsx(fe,{className:"flex gap-1 items-baseline",children:"Password"}),h.jsx(Y,{children:h.jsx(me,{type:"password",...o})}),h.jsx(H,{})]})}),h.jsx(G,{name:"remember",control:t.control,render:({field:o})=>h.jsxs(X,{children:[h.jsx(Y,{children:h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(cn,{id:"remember",checked:o.value,onCheckedChange:o.onChange}),h.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),h.jsx(H,{})]})}),h.jsx(tn,{type:"submit",disabled:!t.formState.isValid||n,className:"w-full",children:n?h.jsx(Re,{className:"absolute"}):"Login"})]})})})}const vi=en(function(){const n=nn(),t=ee(o=>o.auth.user),r=ee(o=>o.auth.isLoading);return ie.useEffect(()=>{t&&n("/admin/dashboard")},[n,t]),r||t?null:h.jsx("div",{className:"flex w-full h-full",children:h.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[h.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[h.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),h.jsx(ci,{})]})})});export{vi 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};
|