componentes-exagono 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -16398,7 +16398,7 @@ const mf = /^([01][0-9]|2[0-3]):[0-5][0-9]$/, gf = (e, r) => {
16398
16398
  }, [l, v]), mr(() => {
16399
16399
  if (a) {
16400
16400
  const L = Ke(a.fechaInicio, "yyyy-MM-dd") === Ke(a.fechaFin, "yyyy-MM-dd");
16401
- u(!L), v("titulo", a?.titulo), v("fechaInicio", Ke(a.fechaInicio, "yyyy-MM-dd")), v("fechaFin", Ke(a.fechaFin, "yyyy-MM-dd")), v("horaInicio", Ke(a.fechaInicio, "HH:mm")), v("horaFin", Ke(a.fechaFin, "HH:mm")), v("horaInicio2", Ke(a.fechaFin, "HH:mm")), v("descripcion", a.descripcion), v("link", a.link), v("repetir", a.repetir), v("color", a.color), v("todoElDia", a.todoElDia), v("solID", a.solID), v("client", a.client), a.solID ? f(!0) : f(!1);
16401
+ u(!L), v("titulo", a?.titulo), v("fechaInicio", Ke(a.fechaInicio, "yyyy-MM-dd")), v("fechaFin", Ke(a.fechaFin, "yyyy-MM-dd")), v("horaInicio", Ke(a.fechaInicio, "HH:mm")), v("horaFin", Ke(a.fechaFin, "HH:mm")), v("horaInicio2", Ke(a.fechaFin, "HH:mm")), v("descripcion", a.descripcion), v("link", a.link), v("repetir", "false"), v("color", a.color), v("todoElDia", a.todoElDia), v("solID", a.solID), v("client", a.client), a.solID ? f(!0) : f(!1);
16402
16402
  } else {
16403
16403
  const L = o || /* @__PURE__ */ new Date(), q = /* @__PURE__ */ new Date(), $ = new Date(L.getFullYear(), L.getMonth(), L.getDate(), q.getHours(), q.getMinutes()), V = Zs($, 1);
16404
16404
  H({
@@ -16456,6 +16456,11 @@ const mf = /^([01][0-9]|2[0-3]):[0-5][0-9]$/, gf = (e, r) => {
16456
16456
  size: "small",
16457
16457
  error: !!N.titulo,
16458
16458
  helperText: N.titulo?.message,
16459
+ FormHelperTextProps: {
16460
+ sx: { fontSize: "0.6rem" }
16461
+ // O el tamaño que desees, por ejemplo, '0.8rem'
16462
+ // Alternativamente, si quieres una clase: className: 'my-custom-helper-text'
16463
+ },
16459
16464
  inputProps: {
16460
16465
  maxLength: 100
16461
16466
  // Limita la entrada a 100 caracteres
@@ -16482,7 +16487,11 @@ const mf = /^([01][0-9]|2[0-3]):[0-5][0-9]$/, gf = (e, r) => {
16482
16487
  {
16483
16488
  name: "fechaInicio",
16484
16489
  control: A,
16485
- render: ({ field: L }) => /* @__PURE__ */ h.jsx(Pr, { fullWidth: !0, ...L, type: "date", placeholder: "Fecha de inicio", size: "small", InputLabelProps: { shrink: !0 }, error: !!N.fechaInicio, helperText: N.fechaInicio?.message })
16490
+ render: ({ field: L }) => /* @__PURE__ */ h.jsx(Pr, { fullWidth: !0, ...L, type: "date", placeholder: "Fecha de inicio", size: "small", InputLabelProps: { shrink: !0 }, error: !!N.fechaInicio, helperText: N.fechaInicio?.message, FormHelperTextProps: {
16491
+ sx: { fontSize: "0.60rem" }
16492
+ // O el tamaño que desees, por ejemplo, '0.8rem'
16493
+ // Alternativamente, si quieres una clase: className: 'my-custom-helper-text'
16494
+ } })
16486
16495
  }
16487
16496
  ) }),
16488
16497
  l ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
@@ -16581,6 +16590,11 @@ const mf = /^([01][0-9]|2[0-3]):[0-5][0-9]$/, gf = (e, r) => {
16581
16590
  size: "small",
16582
16591
  error: !!N.horaFin,
16583
16592
  helperText: N.horaFin?.message,
16593
+ FormHelperTextProps: {
16594
+ sx: { fontSize: "0.60rem" }
16595
+ // O el tamaño que desees, por ejemplo, '0.8rem'
16596
+ // Alternativamente, si quieres una clase: className: 'my-custom-helper-text'
16597
+ },
16584
16598
  InputProps: {
16585
16599
  ...V.InputProps,
16586
16600
  endAdornment: /* @__PURE__ */ h.jsx(
package/dist/index.umd.js CHANGED
@@ -185,7 +185,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
185
185
  } else {
186
186
  newResult[${_}] = ${E}.value;
187
187
  }
188
- `)}m.write("payload.value = newResult;"),m.write("return payload;");const C=m.compile();return(k,E)=>C(f,k,E)};let i;const a=Qi,s=!Of.jitless,l=s&&V2.value,u=r.catchall;let d;e._zod.parse=(f,m)=>{d??(d=n.value);const g=f.value;return a(g)?s&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=o(r.shape)),f=i(f,m),u?Zf([],g,f,m,d,e):f):t(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function qf(e,r,t,n){for(const i of e)if(i.issues.length===0)return r.value=i.value,r;const o=e.filter(i=>!An(i));return o.length===1?(r.value=o[0].value,o[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:t,errors:e.map(i=>i.issues.map(a=>tn(a,n,en())))}),r)}const P_=Y("$ZodUnion",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ye(e._zod,"optout",()=>r.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ye(e._zod,"values",()=>{if(r.options.every(o=>o._zod.values))return new Set(r.options.flatMap(o=>Array.from(o._zod.values)))}),Ye(e._zod,"pattern",()=>{if(r.options.every(o=>o._zod.pattern)){const o=r.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Ws(i.source)).join("|")})$`)}});const t=r.options.length===1,n=r.options[0]._zod.run;e._zod.parse=(o,i)=>{if(t)return n(o,i);let a=!1;const s=[];for(const c of r.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>qf(c,o,e,i)):qf(s,o,e,i)}}),A_=Y("$ZodIntersection",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{const o=t.value,i=r.left._zod.run({value:o,issues:[]},n),a=r.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>Kf(t,c,l)):Kf(t,i,a)}});function Gs(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(xo(e)&&xo(r)){const t=Object.keys(r),n=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...r};for(const i of n){const a=Gs(e[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let n=0;n<e.length;n++){const o=e[n],i=r[n],a=Gs(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};t.push(a.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Kf(e,r,t){if(r.issues.length&&e.issues.push(...r.issues),t.issues.length&&e.issues.push(...t.issues),An(e))return e;const n=Gs(r.value,t.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const I_=Y("$ZodEnum",(e,r)=>{et.init(e,r);const t=L2(r.entries),n=new Set(t);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.filter(o=>F2.has(typeof o)).map(o=>typeof o=="string"?Pn(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:t,input:a,inst:e}),o}}),R_=Y("$ZodLiteral",(e,r)=>{if(et.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(t=>typeof t=="string"?Pn(t):t?Pn(t.toString()):String(t)).join("|")})$`),e._zod.parse=(t,n)=>{const o=t.value;return e._zod.values.has(o)||t.issues.push({code:"invalid_value",values:r.values,input:o,inst:e}),t}}),N_=Y("$ZodTransform",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Tf(e.constructor.name);const o=r.transform(t.value,t);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(t.value=a,t));if(o instanceof Promise)throw new On;return t.value=o,t}});function Gf(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const $_=Y("$ZodOptional",(e,r)=>{et.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${Ws(t.source)})?$`):void 0}),e._zod.parse=(t,n)=>{if(r.innerType._zod.optin==="optional"){const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Gf(i,t.value)):Gf(o,t.value)}return t.value===void 0?t:r.innerType._zod.run(t,n)}}),j_=Y("$ZodNullable",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${Ws(t.source)}|null)$`):void 0}),Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(t,n)=>t.value===null?t:r.innerType._zod.run(t,n)}),L_=Y("$ZodDefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);if(t.value===void 0)return t.value=r.defaultValue,t;const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Qf(i,r)):Qf(o,r)}});function Qf(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const z_=Y("$ZodPrefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=r.defaultValue),r.innerType._zod.run(t,n))}),B_=Y("$ZodNonOptional",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>{const t=r.innerType._zod.values;return t?new Set([...t].filter(n=>n!==void 0)):void 0}),e._zod.parse=(t,n)=>{const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Xf(i,e)):Xf(o,e)}});function Xf(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const V_=Y("$ZodCatch",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=r.catchValue({...t,error:{issues:i.issues.map(a=>tn(a,n,en()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=r.catchValue({...t,error:{issues:o.issues.map(i=>tn(i,n,en()))},input:t.value}),t.issues=[]),t)}}),F_=Y("$ZodPipe",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>r.in._zod.values),Ye(e._zod,"optin",()=>r.in._zod.optin),Ye(e._zod,"optout",()=>r.out._zod.optout),Ye(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(t,n)=>{if(n.direction==="backward"){const i=r.out._zod.run(t,n);return i instanceof Promise?i.then(a=>aa(a,r.in,n)):aa(i,r.in,n)}const o=r.in._zod.run(t,n);return o instanceof Promise?o.then(i=>aa(i,r.out,n)):aa(o,r.out,n)}});function aa(e,r,t){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},t)}const Y_=Y("$ZodReadonly",(e,r)=>{et.init(e,r),Ye(e._zod,"propValues",()=>r.innerType._zod.propValues),Ye(e._zod,"values",()=>r.innerType._zod.values),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(Jf):Jf(o)}});function Jf(e){return e.value=Object.freeze(e.value),e}const U_=Y("$ZodCustom",(e,r)=>{Ot.init(e,r),et.init(e,r),e._zod.parse=(t,n)=>t,e._zod.check=t=>{const n=t.value,o=r.fn(n);if(o instanceof Promise)return o.then(i=>ep(i,t,n,e));ep(o,t,n,e)}});function ep(e,r,t,n){if(!e){const o={code:"custom",input:t,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),r.issues.push(So(o))}}class H_{constructor(){this._map=new Map,this._idmap=new Map}add(r,...t){const n=t[0];if(this._map.set(r,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,r)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(r){const t=this._map.get(r);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(r),this}get(r){const t=r._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(r)};return Object.keys(o).length?o:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function W_(){return new H_}const sa=W_();function Z_(e,r){return new e({type:"string",...pe(r)})}function q_(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...pe(r)})}function tp(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...pe(r)})}function K_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...pe(r)})}function G_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...pe(r)})}function Q_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...pe(r)})}function X_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...pe(r)})}function J_(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...pe(r)})}function ex(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...pe(r)})}function tx(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...pe(r)})}function rx(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...pe(r)})}function nx(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...pe(r)})}function ox(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...pe(r)})}function ix(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...pe(r)})}function ax(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...pe(r)})}function sx(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...pe(r)})}function cx(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...pe(r)})}function lx(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...pe(r)})}function ux(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...pe(r)})}function dx(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...pe(r)})}function fx(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...pe(r)})}function px(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...pe(r)})}function hx(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...pe(r)})}function mx(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...pe(r)})}function gx(e,r){return new e({type:"string",format:"date",check:"string_format",...pe(r)})}function vx(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...pe(r)})}function yx(e,r){return new e({type:"string",format:"duration",check:"string_format",...pe(r)})}function bx(e,r){return new e({type:"number",checks:[],...pe(r)})}function wx(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...pe(r)})}function _x(e,r){return new e({type:"boolean",...pe(r)})}function xx(e){return new e({type:"unknown"})}function Sx(e,r){return new e({type:"never",...pe(r)})}function rp(e,r){return new Vf({check:"less_than",...pe(r),value:e,inclusive:!1})}function Qs(e,r){return new Vf({check:"less_than",...pe(r),value:e,inclusive:!0})}function np(e,r){return new Ff({check:"greater_than",...pe(r),value:e,inclusive:!1})}function Xs(e,r){return new Ff({check:"greater_than",...pe(r),value:e,inclusive:!0})}function op(e,r){return new zw({check:"multiple_of",...pe(r),value:e})}function ip(e,r){return new Vw({check:"max_length",...pe(r),maximum:e})}function ca(e,r){return new Fw({check:"min_length",...pe(r),minimum:e})}function ap(e,r){return new Yw({check:"length_equals",...pe(r),length:e})}function Cx(e,r){return new Uw({check:"string_format",format:"regex",...pe(r),pattern:e})}function Ex(e){return new Hw({check:"string_format",format:"lowercase",...pe(e)})}function kx(e){return new Ww({check:"string_format",format:"uppercase",...pe(e)})}function Dx(e,r){return new Zw({check:"string_format",format:"includes",...pe(r),includes:e})}function Tx(e,r){return new qw({check:"string_format",format:"starts_with",...pe(r),prefix:e})}function Ox(e,r){return new Kw({check:"string_format",format:"ends_with",...pe(r),suffix:e})}function Co(e){return new Gw({check:"overwrite",tx:e})}function Mx(e){return Co(r=>r.normalize(e))}function Px(){return Co(e=>e.trim())}function Ax(){return Co(e=>e.toLowerCase())}function Ix(){return Co(e=>e.toUpperCase())}function Rx(e,r,t){return new e({type:"array",element:r,...pe(t)})}function Nx(e,r,t){return new e({type:"custom",check:"custom",fn:r,...pe(t)})}function $x(e){const r=jx(t=>(t.addIssue=n=>{if(typeof n=="string")t.issues.push(So(n,t.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),t.issues.push(So(o))}},e(t.value,t)));return r}function jx(e,r){const t=new Ot({check:"custom",...pe(r)});return t._zod.check=e,t}function sp(e,r){try{var t=e()}catch(n){return r(n)}return t&&t.then?t.then(void 0,r):t}function Lx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Ls(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function zx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if(n.code==="invalid_union"&&n.errors.length>0){var s=n.errors[0][0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Ls(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function Bx(e,r,t){if(t===void 0&&(t={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,i){try{return Promise.resolve(sp(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](n,r)).then(function(a){return i.shouldUseNativeValidation&&Fs({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return Array.isArray(s?.issues)})(a))return{values:{},errors:kf(Lx(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,i){try{return Promise.resolve(sp(function(){return Promise.resolve((t.mode==="sync"?ew:tw)(e,n,r)).then(function(a){return i.shouldUseNativeValidation&&Fs({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return s instanceof qs})(a))return{values:{},errors:kf(zx(a.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const Vx=Y("ZodISODateTime",(e,r)=>{u_.init(e,r),Ge.init(e,r)});function Fx(e){return mx(Vx,e)}const Yx=Y("ZodISODate",(e,r)=>{d_.init(e,r),Ge.init(e,r)});function Ux(e){return gx(Yx,e)}const Hx=Y("ZodISOTime",(e,r)=>{f_.init(e,r),Ge.init(e,r)});function Wx(e){return vx(Hx,e)}const Zx=Y("ZodISODuration",(e,r)=>{p_.init(e,r),Ge.init(e,r)});function qx(e){return yx(Zx,e)}const Ut=Y("ZodError",(e,r)=>{qs.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>J2(e,t)},flatten:{value:t=>X2(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ys,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ys,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Kx=ea(Ut),Gx=ta(Ut),Qx=ra(Ut),Xx=na(Ut),Jx=ow(Ut),eS=iw(Ut),tS=aw(Ut),rS=sw(Ut),nS=cw(Ut),oS=lw(Ut),iS=uw(Ut),aS=dw(Ut),it=Y("ZodType",(e,r)=>(et.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...t)=>e.clone({...r,checks:[...r.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(t,n)=>jr(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Kx(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Qx(e,t,n),e.parseAsync=async(t,n)=>Gx(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Xx(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Jx(e,t,n),e.decode=(t,n)=>eS(e,t,n),e.encodeAsync=async(t,n)=>tS(e,t,n),e.decodeAsync=async(t,n)=>rS(e,t,n),e.safeEncode=(t,n)=>nS(e,t,n),e.safeDecode=(t,n)=>oS(e,t,n),e.safeEncodeAsync=async(t,n)=>iS(e,t,n),e.safeDecodeAsync=async(t,n)=>aS(e,t,n),e.refine=(t,n)=>e.check(tC(t,n)),e.superRefine=t=>e.check(rC(t)),e.overwrite=t=>e.check(Co(t)),e.optional=()=>mp(e),e.nullable=()=>gp(e),e.nullish=()=>mp(gp(e)),e.nonoptional=t=>qS(e,t),e.array=()=>PS(e),e.or=t=>NS([e,t]),e.and=t=>jS(e,t),e.transform=t=>yp(e,FS(t)),e.default=t=>HS(e,t),e.prefault=t=>ZS(e,t),e.catch=t=>GS(e,t),e.pipe=t=>yp(e,t),e.readonly=()=>JS(e),e.describe=t=>{const n=e.clone();return sa.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return sa.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return sa.get(e);const n=e.clone();return sa.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),cp=Y("_ZodString",(e,r)=>{Ks.init(e,r),it.init(e,r);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...n)=>e.check(Cx(...n)),e.includes=(...n)=>e.check(Dx(...n)),e.startsWith=(...n)=>e.check(Tx(...n)),e.endsWith=(...n)=>e.check(Ox(...n)),e.min=(...n)=>e.check(ca(...n)),e.max=(...n)=>e.check(ip(...n)),e.length=(...n)=>e.check(ap(...n)),e.nonempty=(...n)=>e.check(ca(1,...n)),e.lowercase=n=>e.check(Ex(n)),e.uppercase=n=>e.check(kx(n)),e.trim=()=>e.check(Px()),e.normalize=(...n)=>e.check(Mx(...n)),e.toLowerCase=()=>e.check(Ax()),e.toUpperCase=()=>e.check(Ix())}),sS=Y("ZodString",(e,r)=>{Ks.init(e,r),cp.init(e,r),e.email=t=>e.check(q_(cS,t)),e.url=t=>e.check(J_(lS,t)),e.jwt=t=>e.check(hx(CS,t)),e.emoji=t=>e.check(ex(uS,t)),e.guid=t=>e.check(tp(lp,t)),e.uuid=t=>e.check(K_(la,t)),e.uuidv4=t=>e.check(G_(la,t)),e.uuidv6=t=>e.check(Q_(la,t)),e.uuidv7=t=>e.check(X_(la,t)),e.nanoid=t=>e.check(tx(dS,t)),e.guid=t=>e.check(tp(lp,t)),e.cuid=t=>e.check(rx(fS,t)),e.cuid2=t=>e.check(nx(pS,t)),e.ulid=t=>e.check(ox(hS,t)),e.base64=t=>e.check(dx(_S,t)),e.base64url=t=>e.check(fx(xS,t)),e.xid=t=>e.check(ix(mS,t)),e.ksuid=t=>e.check(ax(gS,t)),e.ipv4=t=>e.check(sx(vS,t)),e.ipv6=t=>e.check(cx(yS,t)),e.cidrv4=t=>e.check(lx(bS,t)),e.cidrv6=t=>e.check(ux(wS,t)),e.e164=t=>e.check(px(SS,t)),e.datetime=t=>e.check(Fx(t)),e.date=t=>e.check(Ux(t)),e.time=t=>e.check(Wx(t)),e.duration=t=>e.check(qx(t))});function rr(e){return Z_(sS,e)}const Ge=Y("ZodStringFormat",(e,r)=>{Ze.init(e,r),cp.init(e,r)}),cS=Y("ZodEmail",(e,r)=>{t_.init(e,r),Ge.init(e,r)}),lp=Y("ZodGUID",(e,r)=>{Jw.init(e,r),Ge.init(e,r)}),la=Y("ZodUUID",(e,r)=>{e_.init(e,r),Ge.init(e,r)}),lS=Y("ZodURL",(e,r)=>{r_.init(e,r),Ge.init(e,r)}),uS=Y("ZodEmoji",(e,r)=>{n_.init(e,r),Ge.init(e,r)}),dS=Y("ZodNanoID",(e,r)=>{o_.init(e,r),Ge.init(e,r)}),fS=Y("ZodCUID",(e,r)=>{i_.init(e,r),Ge.init(e,r)}),pS=Y("ZodCUID2",(e,r)=>{a_.init(e,r),Ge.init(e,r)}),hS=Y("ZodULID",(e,r)=>{s_.init(e,r),Ge.init(e,r)}),mS=Y("ZodXID",(e,r)=>{c_.init(e,r),Ge.init(e,r)}),gS=Y("ZodKSUID",(e,r)=>{l_.init(e,r),Ge.init(e,r)}),vS=Y("ZodIPv4",(e,r)=>{h_.init(e,r),Ge.init(e,r)}),yS=Y("ZodIPv6",(e,r)=>{m_.init(e,r),Ge.init(e,r)}),bS=Y("ZodCIDRv4",(e,r)=>{g_.init(e,r),Ge.init(e,r)}),wS=Y("ZodCIDRv6",(e,r)=>{v_.init(e,r),Ge.init(e,r)}),_S=Y("ZodBase64",(e,r)=>{y_.init(e,r),Ge.init(e,r)}),xS=Y("ZodBase64URL",(e,r)=>{w_.init(e,r),Ge.init(e,r)}),SS=Y("ZodE164",(e,r)=>{__.init(e,r),Ge.init(e,r)}),CS=Y("ZodJWT",(e,r)=>{S_.init(e,r),Ge.init(e,r)}),up=Y("ZodNumber",(e,r)=>{Uf.init(e,r),it.init(e,r),e.gt=(n,o)=>e.check(np(n,o)),e.gte=(n,o)=>e.check(Xs(n,o)),e.min=(n,o)=>e.check(Xs(n,o)),e.lt=(n,o)=>e.check(rp(n,o)),e.lte=(n,o)=>e.check(Qs(n,o)),e.max=(n,o)=>e.check(Qs(n,o)),e.int=n=>e.check(fp(n)),e.safe=n=>e.check(fp(n)),e.positive=n=>e.check(np(0,n)),e.nonnegative=n=>e.check(Xs(0,n)),e.negative=n=>e.check(rp(0,n)),e.nonpositive=n=>e.check(Qs(0,n)),e.multipleOf=(n,o)=>e.check(op(n,o)),e.step=(n,o)=>e.check(op(n,o)),e.finite=()=>e;const t=e._zod.bag;e.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),e.isFinite=!0,e.format=t.format??null});function dp(e){return bx(up,e)}const ES=Y("ZodNumberFormat",(e,r)=>{C_.init(e,r),up.init(e,r)});function fp(e){return wx(ES,e)}const kS=Y("ZodBoolean",(e,r)=>{E_.init(e,r),it.init(e,r)});function Js(e){return _x(kS,e)}const DS=Y("ZodUnknown",(e,r)=>{k_.init(e,r),it.init(e,r)});function pp(){return xx(DS)}const TS=Y("ZodNever",(e,r)=>{D_.init(e,r),it.init(e,r)});function OS(e){return Sx(TS,e)}const MS=Y("ZodArray",(e,r)=>{T_.init(e,r),it.init(e,r),e.element=r.element,e.min=(t,n)=>e.check(ca(t,n)),e.nonempty=t=>e.check(ca(1,t)),e.max=(t,n)=>e.check(ip(t,n)),e.length=(t,n)=>e.check(ap(t,n)),e.unwrap=()=>e.element});function PS(e,r){return Rx(MS,e,r)}const AS=Y("ZodObject",(e,r)=>{M_.init(e,r),it.init(e,r),Ye(e,"shape",()=>r.shape),e.keyof=()=>LS(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pp()}),e.loose=()=>e.clone({...e._zod.def,catchall:pp()}),e.strict=()=>e.clone({...e._zod.def,catchall:OS()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Z2(e,t),e.safeExtend=t=>q2(e,t),e.merge=t=>K2(e,t),e.pick=t=>H2(e,t),e.omit=t=>W2(e,t),e.partial=(...t)=>G2(hp,e,t[0]),e.required=(...t)=>Q2(vp,e,t[0])});function IS(e,r){const t={type:"object",get shape(){return $r(this,"shape",e?B2(e):{}),this.shape},...pe(r)};return new AS(t)}const RS=Y("ZodUnion",(e,r)=>{P_.init(e,r),it.init(e,r),e.options=r.options});function NS(e,r){return new RS({type:"union",options:e,...pe(r)})}const $S=Y("ZodIntersection",(e,r)=>{A_.init(e,r),it.init(e,r)});function jS(e,r){return new $S({type:"intersection",left:e,right:r})}const ec=Y("ZodEnum",(e,r)=>{I_.init(e,r),it.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);const t=new Set(Object.keys(r.entries));e.extract=(n,o)=>{const i={};for(const a of n)if(t.has(a))i[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ec({...r,checks:[],...pe(o),entries:i})},e.exclude=(n,o)=>{const i={...r.entries};for(const a of n)if(t.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ec({...r,checks:[],...pe(o),entries:i})}});function LS(e,r){const t=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ec({type:"enum",entries:t,...pe(r)})}const zS=Y("ZodLiteral",(e,r)=>{R_.init(e,r),it.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function BS(e,r){return new zS({type:"literal",values:Array.isArray(e)?e:[e],...pe(r)})}const VS=Y("ZodTransform",(e,r)=>{N_.init(e,r),it.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Tf(e.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(So(i,t.value,r));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=t.value),a.inst??(a.inst=e),t.issues.push(So(a))}};const o=r.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function FS(e){return new VS({type:"transform",transform:e})}const hp=Y("ZodOptional",(e,r)=>{$_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function mp(e){return new hp({type:"optional",innerType:e})}const YS=Y("ZodNullable",(e,r)=>{j_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function gp(e){return new YS({type:"nullable",innerType:e})}const US=Y("ZodDefault",(e,r)=>{L_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function HS(e,r){return new US({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():If(r)}})}const WS=Y("ZodPrefault",(e,r)=>{z_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function ZS(e,r){return new WS({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():If(r)}})}const vp=Y("ZodNonOptional",(e,r)=>{B_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function qS(e,r){return new vp({type:"nonoptional",innerType:e,...pe(r)})}const KS=Y("ZodCatch",(e,r)=>{V_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function GS(e,r){return new KS({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const QS=Y("ZodPipe",(e,r)=>{F_.init(e,r),it.init(e,r),e.in=r.in,e.out=r.out});function yp(e,r){return new QS({type:"pipe",in:e,out:r})}const XS=Y("ZodReadonly",(e,r)=>{Y_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function JS(e){return new XS({type:"readonly",innerType:e})}const eC=Y("ZodCustom",(e,r)=>{U_.init(e,r),it.init(e,r)});function tC(e,r={}){return Nx(eC,e,r)}function rC(e){return $x(e)}const bp=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,wp=(e,r)=>{if(!e||!r)return null;const t=e.split("-");if(t.length!==3)return null;const n=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=r.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(n,o,i,s,c);return isNaN(l.getTime())||!w.isValid(l)?null:l},nC=IS({titulo:rr().min(1,"El campo Título es requerido."),fechaInicio:rr().min(1,"El campo fecha inicio es requerido."),horaInicio:rr().min(1,"La hora de inicio es requerida.").regex(bp,{message:"Formato inválido"}),horaFin:rr().min(1,"La hora fin es requerida.").regex(bp,{message:"Formato inválido"}),todoElDia:Js(),fechaFin:rr().optional(),showEndDate:Js().optional(),horaInicio2:rr().optional(),TodoElDia2:Js().optional(),client:rr().optional().nullable(),repetir:rr().optional(),link:rr().url("Debe ser una URL válida ejemplo https://www.google.com.").or(BS("")).optional(),descripcion:rr().optional(),color:rr().optional(),solID:dp().optional().nullable(),disID:dp().optional().nullable()}).refine(e=>e.showEndDate?e.fechaFin&&e.fechaFin.length>0:!0,{message:"La fecha de fin es requerida.",path:["fechaFin"]}).refine(e=>e.fechaFin!==void 0?!!e.fechaFin&&!!e.horaInicio2:!0,{message:"La hora de fin son requeridas.",path:["horaInicio2"]}).refine(e=>{if(e.todoElDia||!e.fechaInicio||!e.horaInicio||!e.fechaFin||!e.horaInicio2)return!0;const r=wp(e.fechaInicio,e.horaInicio),t=wp(e.fechaFin,e.horaFin);return!r||!t||!w.isValid(r)||!w.isValid(t)?!0:!(w.isBefore(t,r)&&!w.isSameDay(t,r)||w.isSameDay(r,t)&&w.isBefore(t,r))},{message:"La hora de fin deben ser posterior a la de inicio.",path:["horaFin"]}),_p=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),$.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),oC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M7.288%2022.986h-.147a6.2%206.2%200%200%201-4.28-1.85c-2.404-2.404-2.478-6.24-.16-8.557L4.28%2011a1.228%201.228%200%201%201%201.739%201.739L4.44%2014.317c-1.356%201.357-1.282%203.626.16%205.068a3.82%203.82%200%200%200%202.602%201.135c.95%200%201.825-.32%202.479-.974l1.578-1.579a1.23%201.23%200%200%201%201.739%200c.48.481.48%201.258%200%201.739l-1.579%201.578c-1.097%201.098-2.552%201.69-4.13%201.69zM17.98%2012.998a1.23%201.23%200%200%201%200-1.739l1.578-1.578c.654-.654.986-1.53.974-2.466a3.78%203.78%200%200%200-1.134-2.602c-1.443-1.443-3.712-1.517-5.068-.16L12.75%206.03c-.48.48-1.258.48-1.739%200a1.23%201.23%200%200%201%200-1.739l1.579-1.578c2.318-2.319%206.153-2.245%208.558.16a6.23%206.23%200%200%201%201.85%204.279%205.84%205.84%200%200%201-1.69%204.279l-1.578%201.578c-.481.481-1.258.481-1.74%200z'/%3e%3cpath%20d='M14.172%208.11%208.07%2014.214a1.233%201.233%200%200%200%201.743%201.744l6.104-6.104a1.233%201.233%200%201%200-1.744-1.744'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",iC=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("g",{clipPath:"url(#a)"},$.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),$.createElement("defs",null,$.createElement("clipPath",{id:"a"},$.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),aC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M13.17%2013.68c2.06%200%204%20.8%205.46%202.27a7.7%207.7%200%200%201%202.26%205.47c0%20.79-.64%201.43-1.43%201.43l.01-.01H4.53c-.79%200-1.43-.64-1.43-1.43%200-4.27%203.46-7.73%207.72-7.73zM12%201.9c2.82%200%205.11%202.29%205.11%205.11s-2.29%205.11-5.11%205.11v-.01c-2.82%200-5.11-2.29-5.11-5.11S9.18%201.9%2012%201.9'/%3e%3c/svg%3e",sC=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},$.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),$.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),$.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),$.createElement("defs",null,$.createElement("clipPath",{id:"a"},$.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),cC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.789%2017H3.21C2.542%2017%202%2017.56%202%2018.25s.542%201.25%201.211%201.25H13.79c.669%200%201.211-.56%201.211-1.25S14.458%2017%2013.789%2017M20.718%204H3.282C2.574%204%202%204.56%202%205.25S2.574%206.5%203.282%206.5h17.436C21.426%206.5%2022%205.94%2022%205.25S21.426%204%2020.718%204M20.718%2010.5H3.282C2.574%2010.5%202%2011.06%202%2011.75S2.574%2013%203.282%2013h17.436c.708%200%201.282-.56%201.282-1.25s-.574-1.25-1.282-1.25'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",lC=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),$.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"})),xp=qt(h.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),tc=qt(h.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),uC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"90%",sm:450,md:500},bgcolor:"background.paper",boxShadow:24,p:{xs:2,sm:3},borderRadius:2,maxHeight:"90vh",overflowY:"auto"},rc=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],Sp=(()=>{const e=[];for(let r=0;r<24;r++)for(let t=0;t<60;t+=15){const n=r.toString().padStart(2,"0"),o=t.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e})(),dC=({isVisible:e,onClose:r,onSave:t,onDelete:n,selectedDate:o,initialEvent:i,userId:a,masNombreBD:s,disId:c})=>{const[l,u]=x.useState(!1),[d,f]=x.useState(!1),m=w.format(new Date,"yyyy-MM-dd"),[g,p]=x.useState(""),[y,S]=x.useState([]),[C,k]=x.useState(!1),E=Ps(),[_,O]=x.useState([]),{control:R,handleSubmit:q,reset:Z,formState:{errors:j},watch:K,setValue:v}=$2({resolver:Bx(nC),defaultValues:{titulo:"",fechaInicio:w.format(new Date,"yyyy-MM-dd"),horaInicio:w.format(new Date,"HH:mm"),horaFin:w.format(w.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:rc[5],solID:null}}),A=K("fechaInicio"),P=K("fechaFin"),H=K("todoElDia");x.useEffect(()=>{if(g.trim()===""||!a||!c||!s){S([]);return}k(!0);const V=setTimeout(()=>{E.getClients(g,c,s,a).then(Q=>{k(!1);const L=Array.from(new Map(Q.map(U=>[U.nombreCliente,U])).values());if(L)S(L);else if(i?.client&&i.solID!==null){const U=[{solID:i.solID,nombreCliente:i.client}];S(U)}else S([])}).catch(Q=>{console.error("Error al buscar clientes:",Q),k(!1)})},500);return()=>clearTimeout(V)},[g,a,c,s]),x.useEffect(()=>{if(A&&P){const V=new Date(A),Q=new Date(P);(V===Q||V>Q)&&v("fechaFin",A)}},[A,P,v]),x.useEffect(()=>{A&&v("fechaFin",A)},[A]),x.useEffect(()=>{v("showEndDate",l)},[l,v]),x.useEffect(()=>{if(i){const V=w.format(i.fechaInicio,"yyyy-MM-dd")===w.format(i.fechaFin,"yyyy-MM-dd");u(!V),v("titulo",i?.titulo),v("fechaInicio",w.format(i.fechaInicio,"yyyy-MM-dd")),v("fechaFin",w.format(i.fechaFin,"yyyy-MM-dd")),v("horaInicio",w.format(i.fechaInicio,"HH:mm")),v("horaFin",w.format(i.fechaFin,"HH:mm")),v("horaInicio2",w.format(i.fechaFin,"HH:mm")),v("descripcion",i.descripcion),v("link",i.link),v("repetir",i.repetir),v("color",i.color),v("todoElDia",i.todoElDia),v("solID",i.solID),v("client",i.client),i.solID?f(!0):f(!1)}else{const V=o||new Date,Q=new Date,L=new Date(V.getFullYear(),V.getMonth(),V.getDate(),Q.getHours(),Q.getMinutes()),U=w.addHours(L,1);Z({titulo:"",fechaInicio:w.format(L,"yyyy-MM-dd"),horaInicio:w.format(L,"HH:mm"),fechaFin:w.format(U,"yyyy-MM-dd"),horaFin:w.format(U,"HH:mm"),horaInicio2:w.format(U,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:rc[5],solID:null}),u(!1),f(!1)}},[i,e,o]);const W=q(V=>{t(V,i?.eventoID),r(),Z(),u(!1)},V=>{console.log("Errores de validación:",V)});x.useEffect(()=>{H&&(v("horaInicio","00:00"),v("horaFin","23:59"))},[H,v,K]);const J=()=>{const V=K("fechaInicio");if(V){const Q=new Date(`${V}T00:00:00`),L=w.addDays(Q,1);v("fechaFin",w.format(L,"yyyy-MM-dd"))}u(!0)};return h.jsx(N.Modal,{open:e,onClose:r,children:h.jsxs(N.Box,{sx:uC,children:[h.jsx(N.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:12},children:h.jsx(tc,{})}),h.jsx(N.Typography,{variant:"h6",mb:2,children:i?"Editar evento":"Agregar evento"}),h.jsxs(N.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"titulo",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!j.titulo,helperText:j.titulo?.message,inputProps:{maxLength:100},sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"},"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(N.Divider,{})}),h.jsx(N.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"fechaInicio",control:R,render:({field:V})=>h.jsx(N.TextField,{fullWidth:!0,...V,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!j.fechaInicio,helperText:j.fechaInicio?.message})})}),l?h.jsxs(h.Fragment,{children:[h.jsx(N.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),h.jsx(N.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"fechaFin",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:A||m},error:!!j.fechaFin,helperText:j.fechaFin?.message})})}),!i&&h.jsx(N.Grid,{size:{xs:1,md:1},children:h.jsx(N.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:h.jsx(_p,{})})})]}):h.jsx(N.Grid,{size:{xs:12,md:7}})]}),l&&h.jsx(h.Fragment,{children:h.jsxs(N.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[h.jsx(N.Grid,{size:{xs:6,md:5}}),h.jsx(N.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:h.jsx(xp,{sx:{color:"#757575",margin:0,padding:0}})})]})}),h.jsxs(N.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[h.jsx(N.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaInicio",control:R,render:({field:{onChange:V,value:Q,...L}})=>h.jsx(N.Autocomplete,{freeSolo:!0,options:Sp,value:Q||"",onChange:(U,ce)=>V(ce||""),onInputChange:(U,ce)=>V(ce),renderInput:U=>h.jsx(N.TextField,{...U,...L,size:"small",error:!!j.horaInicio,helperText:j.horaInicio?.message,InputProps:{...U.InputProps,endAdornment:h.jsx(N.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(ef,{})})}}),disabled:K("todoElDia")})})}),h.jsx(N.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:j.horaInicio?"start":"center",marginTop:j.horaInicio?"5px":"0px"},children:!l&&h.jsx(xp,{sx:{color:"#757575"}})}),l&&h.jsx(N.Grid,{size:{xs:2,md:2}}),h.jsx(N.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaFin",control:R,render:({field:{onChange:V,value:Q,...L}})=>h.jsx(N.Autocomplete,{freeSolo:!0,options:Sp,value:Q||"",onChange:(U,ce)=>V(ce||""),onInputChange:(U,ce)=>V(ce),renderInput:U=>h.jsx(N.TextField,{...U,...L,size:"small",error:!!j.horaFin,helperText:j.horaFin?.message,InputProps:{...U.InputProps,endAdornment:h.jsx(N.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(ef,{})})}}),disabled:K("todoElDia")})})}),h.jsx(N.Grid,{size:{xs:12,md:3},hidden:l,children:h.jsx(er,{name:"todoElDia",control:R,render:({field:V})=>h.jsx(N.FormControlLabel,{control:h.jsx(N.Checkbox,{checked:V.value,onChange:Q=>V.onChange(Q.target.checked)}),label:h.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:!l&&h.jsx(h.Fragment,{children:h.jsxs(N.Button,{onClick:J,size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(sC,{}),"  Agregar fecha final"]})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(N.Divider,{})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:!d&&h.jsxs(N.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(lC,{}),"  Vincular cliente"]})}),d&&h.jsxs(h.Fragment,{children:[h.jsx(N.Grid,{size:{xs:12,md:7},children:h.jsx(er,{name:"client",control:R,render:({field:V})=>h.jsx(N.Autocomplete,{options:y,loading:C,getOptionLabel:Q=>Q.nombreCliente?.trim()||"",value:y.find(Q=>Q.nombreCliente===V.value)||(V.value&&typeof V.value=="string"?{solID:-1,nombreCliente:V.value}:null),noOptionsText:"",onInputChange:(Q,L)=>{p(L)},onChange:(Q,L)=>{if(V.onChange(L?L.nombreCliente:""),v("solID",L?L.solID:null),L&&L.nombreCliente){const U=y.filter(ce=>ce.nombreCliente===L.nombreCliente&&ce.solID).map(ce=>ce.solID);O([...new Set(U)])}else O([])},renderInput:Q=>h.jsx(N.TextField,{...Q,placeholder:"Buscar cliente...",size:"small",InputProps:{...Q.InputProps,startAdornment:h.jsx("img",{src:aC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:h.jsxs(h.Fragment,{children:[C?h.jsx(N.CircularProgress,{color:"inherit",size:20}):null,Q.InputProps.endAdornment]})}})})})}),h.jsx(N.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"solID",control:R,render:({field:V})=>h.jsx(N.Autocomplete,{options:_,getOptionLabel:Q=>Q.toString(),value:V.value??null,onChange:(Q,L)=>V.onChange(L),renderInput:Q=>h.jsx(N.TextField,{...Q,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!y})})}),h.jsx(N.Grid,{size:{xs:1,md:1},children:h.jsx(N.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:h.jsx(_p,{})})})]}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(N.Divider,{})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"link",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!j.link,helperText:j.link?.message,InputProps:{startAdornment:h.jsx("img",{src:oC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"descripcion",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:h.jsx("img",{src:cC,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsxs(N.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[h.jsx(iC,{}),rc.map(V=>h.jsx(er,{name:"color",control:R,render:({field:Q})=>h.jsx(N.IconButton,{onClick:()=>Q.onChange(V),sx:{width:24,height:24,borderRadius:"50%",bgcolor:V,border:Q.value===V?"2px solid":"none",borderColor:Q.value===V?"primary.main":"transparent"}})},V))]})})]}),h.jsxs(N.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[i&&h.jsx(N.Button,{onClick:n,variant:"outlined",color:"error",children:"Eliminar"}),h.jsx(N.Button,{onClick:r,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),h.jsx(N.Button,{onClick:W,variant:"contained",sx:{textTransform:"none"},children:"Guardar"})]})]})})},fC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='49'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M34.559%2048.077c-7.413%200-13.44-6.039-13.44-13.44s6.027-13.44%2013.44-13.44%2013.44%206.027%2013.44%2013.44c0%207.414-6.027%2013.44-13.44%2013.44'/%3e%3cpath%20fill='%23fff'%20d='M39.827%2029.346c.583.583.605%201.505.05%202.06l-3.218%203.219%203.219%203.218c.555.556.532%201.48-.051%202.062-.584.583-1.506.605-2.062.05l-3.218-3.218-3.218%203.218c-.556.555-1.478.533-2.061-.05s-.606-1.506-.05-2.062l3.217-3.218-3.218-3.218c-.555-.555-.533-1.478.05-2.061.583-.584%201.507-.606%202.063-.05l3.217%203.217%203.218-3.218c.556-.555%201.478-.533%202.062.05'/%3e%3cpath%20fill='%23404756'%20d='M30.367.078c1.112%200%202.001.868%202.001%201.954v1.195h.979c4.913%200%208.892%203.887%208.892%208.686v9.237a15.4%2015.4%200%200%200-4.424-1.691v-1.312H4.468V33.63c0%202.389%202%204.343%204.446%204.343H19.4a15.4%2015.4%200%200%200%201.676%204.343H8.892C3.979%2042.317%200%2038.43%200%2033.631V11.913c0-4.8%203.979-8.686%208.892-8.686h1V2.032c0-1.086.89-1.954%202.002-1.954s2%20.868%202%201.954v1.195h14.473V2.032c0-1.085.889-1.954%202-1.954'/%3e%3c/svg%3e",pC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},hC=({isOpen:e,onClose:r,onConfirm:t,title:n,message:o})=>h.jsx(N.Modal,{open:e,onClose:r,children:h.jsxs(N.Box,{sx:pC,children:[h.jsx("img",{src:fC}),h.jsx(N.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:n}),h.jsx(N.Typography,{sx:{mt:2},children:o}),h.jsxs(N.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[h.jsx(N.Button,{variant:"outlined",onClick:r,sx:{textTransform:"none"},children:"Regresar"}),h.jsxs(N.Button,{variant:"contained",color:"error",onClick:t,sx:{textTransform:"none"},children:[h.jsx("span",{className:"icon-eliminar",children:"  "})," Eliminar"]})]})]})}),mC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},gC=({isOpen:e,onClose:r,events:t,date:n,onEventClick:o})=>{if(!n)return null;const i=a=>{o(a),r()};return h.jsx(N.Modal,{open:e,onClose:r,children:h.jsxs(N.Box,{sx:mC,children:[h.jsxs(N.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[h.jsxs(N.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),h.jsx(N.IconButton,{onClick:r,children:h.jsx(tc,{})})]}),h.jsx(N.Divider,{}),h.jsx(N.List,{children:t.map(a=>h.jsx(N.ListItem,{disablePadding:!0,children:h.jsxs(N.ListItemButton,{onClick:()=>i(a),sx:{py:.5},children:[h.jsx(N.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:a.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),h.jsx(N.ListItemText,{primary:a.titulo,secondary:`${w.format(a.fechaInicio,"HH:mm")} - ${w.format(a.fechaFin,"HH:mm")}`,sx:{my:0,"& .MuiListItemText-primary":{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},"& .MuiListItemText-secondary":{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"}}})]})},a.eventoID))})]})})},vC=qt(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),yC=qt(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),bC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M20.36%204.14H16c0-1.65-1.35-3-3-3h-2c-1.65%200-3%201.35-3%203H3.64c-.55%200-1%20.45-1%201s.45%201%201%201h1.04l.84%2013.91a3%203%200%200%200%202.99%202.82h6.98c1.58%200%202.9-1.24%203-2.82l.84-13.91h1.04c.55%200%201-.45%201-1s-.45-1-1-1zm-9.36-1h2c.55%200%201%20.45%201%201h-4c0-.55.45-1%201-1m-.39%2014.9c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201zm4.78%200c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201z'/%3e%3c/svg%3e",wC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M19.378%204.405a1.813%201.813%200%201%201%202.565%202.565L9.571%2019.342a1.813%201.813%200%200%201-2.565%200l-4.949-4.949a1.814%201.814%200%200%201%202.428-2.69l.137.126%203.666%203.666z'/%3e%3c/svg%3e",Cp=x.forwardRef(({id:e,message:r,variant:t},n)=>{const{closeSnackbar:o}=ga.useSnackbar(),i={success:{color:"#fff",icon:h.jsx("img",{width:25,src:wC,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:h.jsx(vC,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:h.jsx(yC,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:h.jsx("img",{src:bC,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},a=i[t]||i.info;return h.jsx(ga.SnackbarContent,{ref:n,children:h.jsxs(N.Box,{sx:{backgroundColor:"white",color:"#333",padding:"8px 16px",borderRadius:"8px",boxShadow:"0 3px 10px rgba(0,0,0,0.2)",display:"flex",alignItems:"center",width:{xs:"90%",sm:"auto"},minWidth:"300px",borderLeft:`5px solid ${a.color}`},children:[h.jsx(N.Box,{sx:{mr:1.5},children:a.icon}),h.jsx(N.Typography,{variant:"body2",sx:{flexGrow:1},children:r}),h.jsx(N.IconButton,{size:"small",onClick:()=>o(e),children:h.jsx(tc,{fontSize:"small"})})]})})}),_C=({userId:e,leads30Days:r,leads90Days:t,disId:n,masNombreBD:o})=>{const[i,a]=x.useState(new Date),[s,c]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(null),[m,g]=x.useState(!1),[p,y]=x.useState(null),[S,C]=x.useState([]),{enqueueSnackbar:k}=ga.useSnackbar(),E=Ps(),[_,O]=x.useState(!1),[R,q]=x.useState([]),[Z,j]=x.useState(null),K=(ee,G)=>{q(ee),j(G),O(!0)},v=x.useRef(null);x.useEffect(()=>{const ee=async()=>{try{if(e){const G=await E.getEventsByUser(e);c(G)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}finally{console.log("Eventos han sido cargados")}};return ee(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{console.log("Iniciando recarga programada de eventos (2 segundos después del inicio)..."),ee()},4e3),()=>{v.current&&clearTimeout(v.current)}},[i,e]),x.useEffect(()=>{const ee=new Date,G=w.startOfDay(ee),se=w.endOfDay(w.addDays(G,6)),le={start:G,end:se},me=s.filter(ue=>{const Te={start:ue.fechaInicio,end:ue.fechaFin};return nd(Te,le)}).sort((ue,Te)=>ue.fechaInicio.getTime()-Te.fechaInicio.getTime());C(me)},[s]);const A=async ee=>{try{const G=await E.getEventById(ee.eventoID);f(G),u(!0)}catch(G){console.error(G)}},P=()=>{u(!1),f(null)},H=async(ee,G)=>{let se,le;ee.todoElDia?(se=new Date(`${ee.fechaInicio}T${ee.horaInicio}`),le=new Date(`${ee.fechaInicio}T${ee.horaFin}`)):(se=new Date(`${ee.fechaInicio}T${ee.horaInicio}`),le=ee.fechaFin&&ee.horaInicio2?new Date(`${ee.fechaFin}T${ee.horaInicio2}`):new Date(`${ee.fechaInicio}T${ee.horaInicio2}`));const me=w.format(se,"yyyy-MM-dd HH:mm:ss.SSS"),ue=w.format(le,"yyyy-MM-dd HH:mm:ss.SSS");if(G){const B={...ee,eventoID:G,fechaInicio:me,fechaFin:ue,solID:ee.solID??null,disID:n??null,client:ee.client};try{const Ve=await E.updateEvent(B);var Te=s.map(Qe=>Qe.eventoID===Ve.eventoID?Ve:Qe);c(Te),k("El evento se ha actualizado correctamente.",{variant:"success"}),P()}catch{k("Error al eliactualizar Evento",{variant:"error"})}}else{const B={...ee,fechaInicio:me,fechaFin:ue,todoElDia:ee.todoElDia,solID:ee.solID??null,disID:n??null,client:ee.client};try{const Ve=await E.createEvent(B,e);c(Qe=>[...Qe,Ve]),k("El evento se ha creado con éxito",{variant:"success"}),P()}catch{k("Error al guardar Evento",{variant:"error"})}}if(e){const B=await E.getEventsByUser(e);c(B)}},W=()=>{a(ee=>new Date(ee.getFullYear(),ee.getMonth()-1,1))},J=()=>{a(ee=>new Date(ee.getFullYear(),ee.getMonth()+1,1))},V=()=>{g(!0)},Q=()=>{y(new Date),u(!0)},L=()=>alert("Sincronizar con Google Calendar"),U=()=>alert("Sincronizar con Outlook Calendar"),ce=ee=>{ee&&a(ee)},ge=ee=>{y(ee),u(!0),f(null)},he=async()=>{if(d)try{await E.deleteEvent(d.eventoID),c(s.filter(ee=>ee.eventoID!==d.eventoID)),k("El evento se ha eliminado de tu calendario",{content:(ee,G)=>h.jsx(Cp,{id:ee,message:String(G),variant:"delete"})})}catch{k("Error al eliminar Evento",{variant:"error"})}finally{P(),g(!1)}};return h.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[h.jsx(R0,{header:h.jsx(eb,{currentDate:i,onPrevMonth:W,onNextMonth:J,onAddEvent:Q,onDateChange:ce}),sidebar:h.jsx($b,{onEventClick:A,upcomingEvents:S,onSyncGoogle:L,onSyncOutlook:U,leads30Days:r,leads90Days:t}),mainContent:h.jsx(Hb,{onSeeMoreClick:K,currentDate:i,events:s,onDayClick:ge,onEventClick:A})}),h.jsx(dC,{isVisible:l,onClose:P,onSave:H,onDelete:V,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:n}),h.jsx(hC,{isOpen:m,onClose:()=>g(!1),onConfirm:he,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),h.jsx(gC,{isOpen:_,onClose:()=>O(!1),events:R,date:Z,onEventClick:A})]})},xC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20fill='%23070c10'%20d='M18.575%203.172A10.829%2010.829%200%200%200%201.564%2016.284l-.028-.051L0%2021.843l5.739-1.506a10.7%2010.7%200%200%200%205.173%201.318%2010.83%2010.83%200%200%200%207.663-18.483m-7.658%2016.655a8.94%208.94%200%200%201-4.62-1.277l.041.023-.329-.194-3.405.894.908-3.321-.214-.34a8.9%208.9%200%200%201-1.376-4.782%209%209%200%201%201%209%209Zm4.935-6.736c-.27-.135-1.6-.789-1.848-.88s-.429-.135-.61.136-.7.879-.856%201.06-.316.2-.586.068a7.5%207.5%200%200%201-2.183-1.349l.007.007a8.2%208.2%200%200%201-1.483-1.842l-.02-.038c-.157-.27-.017-.417.118-.551s.271-.316.406-.473a1.9%201.9%200%200%200%20.267-.44v-.012a.5.5%200%200%200%20.05-.216.5.5%200%200%200-.074-.26c-.068-.135-.609-1.467-.834-2.009s-.444-.455-.609-.464-.338-.009-.519-.009a.99.99%200%200%200-.72.337%203.03%203.03%200%200%200-.947%202.2v.058a5.27%205.27%200%200%200%201.114%202.815v-.011a12.16%2012.16%200%200%200%204.553%204.053l.068.031a14%2014%200%200%200%201.434.539l.109.03a3.6%203.6%200%200%200%201.077.161%203.7%203.7%200%200%200%20.648-.057h-.023a2.8%202.8%200%200%200%201.819-1.274l.007-.012a2.2%202.2%200%200%200%20.19-.9%202.3%202.3%200%200%200-.034-.395v.014c-.067-.113-.248-.18-.519-.316Z'/%3e%3c/svg%3e",SC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25.085'%20height='18.5'%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='none'%20d='M0%200h25.085v18.5H0z'%20data-name='Rectángulo%204598'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23a)'%20data-name='Grupo%207946'%3e%3cpath%20d='M23.12%205.809V3.226a3.2%203.2%200%200%200-.068-.656l-3.141%202.21a7.8%207.8%200%200%201%203.209%201.032'%20data-name='Trazado%2013329'/%3e%3cpath%20d='M11.847%209.791c-.1.009-.2.023-.308.023a3.78%203.78%200%200%201-2.18-.688L.067%202.58A3.2%203.2%200%200%200%200%203.227V13.98a3.23%203.23%200%200%200%203.226%203.226h9.611a7.86%207.86%200%200%201-.99-7.414'%20data-name='Trazado%2013330'/%3e%3cpath%20d='M12.478%207.369%2021.92.737A3.2%203.2%200%200%200%2019.894%200H3.226a3.2%203.2%200%200%200-2.031.74l9.4%206.628a1.64%201.64%200%200%200%201.881%200'%20data-name='Trazado%2013331'/%3e%3cpath%20d='M23.356%208.407a5.914%205.914%200%201%200%200%208.364%205.92%205.92%200%200%200%200-8.364m-1.833%204.842a.54.54%200%200%201-1.081%200v-1.164l-2.513%202.516a.54.54%200%200%201-.765-.763l2.515-2.515h-1.167a.54.54%200%201%201%200-1.081h2.471a.54.54%200%200%201%20.54.54Z'%20data-name='Trazado%2013332'/%3e%3c/g%3e%3c/svg%3e";function nc(e,r,t){return e.accessor?e.accessor(r,t):e.field?r?.[e.field]:r?.[e?.key||""]}function CC(e,r){const t=e??"",n=r??"";return t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:typeof t=="boolean"&&typeof n=="boolean"?Number(t)-Number(n):String(t).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function oc(e,r,t=!0){return typeof e=="function"?e(r):e??t}function EC(e){return e.replace(/[^\d]/g,"")}function kC(e,r){return r}const Ep=qt(h.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFileOutlined"),DC=qt(h.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),TC=qt(h.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),OC=Et("MuiBox",["root"]),MC=ru(),ic=xg({themeId:Ga,defaultTheme:MC,defaultClassName:OC.root,generateClassName:Pc.generate});process.env.NODE_ENV!=="production"&&(ic.propTypes={children:b.node,component:b.elementType,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});function kp(e,r){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function ac(e,r){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ac(e,r)}function Dp(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,ac(e,r)}const Tp={disabled:!1};var PC=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.shape({enter:b.number,exit:b.number,appear:b.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&b.oneOfType([b.string,b.shape({enter:b.string,exit:b.string,active:b.string}),b.shape({enter:b.string,enterDone:b.string,enterActive:b.string,exit:b.string,exitDone:b.string,exitActive:b.string})]);const ua=x.createContext(null);var AC=function(r){return r.scrollTop},Eo="unmounted",rn="exited",nn="entering",In="entered",sc="exiting",Cr=(function(e){Dp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,c;return i.appearStatus=null,n.in?s?(c=rn,i.appearStatus=nn):c=In:n.unmountOnExit||n.mountOnEnter?c=Eo:c=rn,i.state={status:c},i.nextCallback=null,i}r.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Eo?{status:rn}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==nn&&a!==In&&(i=nn):(a===nn||a===In)&&(i=sc)}this.updateStatus(!1,i)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},t.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===nn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this);a&&AC(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===rn&&this.setState({status:Eo})},t.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[ln.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||Tp.disabled){this.safeSetState({status:In},function(){i.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:nn},function(){i.props.onEntering(l,u),i.onTransitionEnd(f,function(){i.safeSetState({status:In},function(){i.props.onEntered(l,u)})})})},t.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ln.findDOMNode(this);if(!i||Tp.disabled){this.safeSetState({status:rn},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:sc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:rn},function(){o.props.onExited(s)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},t.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},t.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}o!=null&&setTimeout(this.nextCallback,o)},t.render=function(){var o=this.state.status;if(o===Eo)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=kp(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x.createElement(ua.Provider,{value:null},typeof a=="function"?a(o,s):x.cloneElement(x.Children.only(a),s))},r})(x.Component);Cr.contextType=ua,Cr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:b.shape({current:typeof Element>"u"?b.any:function(e,r,t,n,o,i){var a=e[r];return b.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,r,t,n,o,i)}}),children:b.oneOfType([b.func.isRequired,b.element.isRequired]).isRequired,in:b.bool,mountOnEnter:b.bool,unmountOnExit:b.bool,appear:b.bool,enter:b.bool,exit:b.bool,timeout:function(r){var t=PC;r.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.apply(void 0,[r].concat(o))},addEndListener:b.func,onEnter:b.func,onEntering:b.func,onEntered:b.func,onExit:b.func,onExiting:b.func,onExited:b.func}:{};function Rn(){}Cr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rn,onEntering:Rn,onEntered:Rn,onExit:Rn,onExiting:Rn,onExited:Rn},Cr.UNMOUNTED=Eo,Cr.EXITED=rn,Cr.ENTERING=nn,Cr.ENTERED=In,Cr.EXITING=sc;function IC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cc(e,r){var t=function(i){return r&&x.isValidElement(i)?r(i):i},n=Object.create(null);return e&&x.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=t(o)}),n}function RC(e,r){e=e||{},r=r||{};function t(u){return u in r?r[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in r?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var c in r){if(n[c])for(a=0;a<n[c].length;a++){var l=n[c][a];s[n[c][a]]=t(l)}s[c]=t(c)}for(a=0;a<o.length;a++)s[o[a]]=t(o[a]);return s}function on(e,r,t){return t[r]!=null?t[r]:e.props[r]}function NC(e,r){return cc(e.children,function(t){return x.cloneElement(t,{onExited:r.bind(null,t),in:!0,appear:on(t,"appear",e),enter:on(t,"enter",e),exit:on(t,"exit",e)})})}function $C(e,r,t){var n=cc(e.children),o=RC(r,n);return Object.keys(o).forEach(function(i){var a=o[i];if(x.isValidElement(a)){var s=i in r,c=i in n,l=r[i],u=x.isValidElement(l)&&!l.props.in;c&&(!s||u)?o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:!0,exit:on(a,"exit",e),enter:on(a,"enter",e)}):!c&&s&&!u?o[i]=x.cloneElement(a,{in:!1}):c&&s&&x.isValidElement(l)&&(o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:l.props.in,exit:on(a,"exit",e),enter:on(a,"enter",e)}))}}),o}var jC=Object.values||function(e){return Object.keys(e).map(function(r){return e[r]})},LC={component:"div",childFactory:function(r){return r}},lc=(function(e){Dp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(IC(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var t=r.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,c=i.firstRender;return{children:c?NC(o,s):$C(o,a,s),firstRender:!1}},t.handleExited=function(o,i){var a=cc(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var c=Uo({},s.children);return delete c[o.key],{children:c}}))},t.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=kp(o,["component","childFactory"]),c=this.state.contextValue,l=jC(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?x.createElement(ua.Provider,{value:c},l):x.createElement(ua.Provider,{value:c},x.createElement(i,s,l))},r})(x.Component);lc.propTypes=process.env.NODE_ENV!=="production"?{component:b.any,children:b.node,appear:b.bool,enter:b.bool,exit:b.bool,childFactory:b.func}:{},lc.defaultProps=LC;const Op={};function Mp(e,r){const t=$.useRef(Op);return t.current===Op&&(t.current=e(r)),t}const zC=[];function BC(e){$.useEffect(e,zC)}class uc{static create(){return new uc}currentId=null;start(r,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},r)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Pp(){const e=Mp(uc.create).current;return BC(e.disposeEffect),e}function da(e,r){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||r(...n)}}function VC(e){const{prototype:r={}}=e;return!!r.isReactComponent}function FC(e,r,t,n,o){const i=e[r],a=o||r;if(i==null||typeof window>"u")return null;let s;return typeof i=="function"&&!VC(i)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${n} \`${a}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ap=da(b.elementType,FC);function Ip(e,r){const{timeout:t,easing:n,style:o={}}=e;return{duration:o.transitionDuration??(typeof t=="number"?t:t[r.mode]||0),easing:o.transitionTimingFunction??(typeof n=="object"?n[r.mode]:n),delay:o.transitionDelay}}function YC(e){return Ct("MuiCollapse",e)}Et("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const UC=e=>{const{orientation:r,classes:t}=e,n={root:["root",`${r}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${r}`],wrapperInner:["wrapperInner",`${r}`]};return Lt(n,YC,t)},HC=ut("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[t.orientation],t.state==="entered"&&r.entered,t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&r.hidden]}})(cr(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:r})=>r.state==="exited"&&!r.in&&r.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),WC=ut("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),ZC=ut("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),fa=$.forwardRef(function(r,t){const n=Rt({props:r,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:c,easing:l,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:g,onExited:p,onExiting:y,orientation:S="vertical",style:C,timeout:k=Kl.standard,TransitionComponent:E=Cr,..._}=n,O={...n,orientation:S,collapsedSize:s},R=UC(O),q=ou(),Z=Pp(),j=$.useRef(null),K=$.useRef(),v=typeof s=="number"?`${s}px`:s,A=S==="horizontal",P=A?"width":"height",H=$.useRef(null),W=Qa(t,H),J=G=>se=>{if(G){const le=H.current;se===void 0?G(le):G(le,se)}},V=()=>j.current?j.current[A?"clientWidth":"clientHeight"]:0,Q=J((G,se)=>{j.current&&A&&(j.current.style.position="absolute"),G.style[P]=v,d&&d(G,se)}),L=J((G,se)=>{const le=V();j.current&&A&&(j.current.style.position="");const{duration:me,easing:ue}=Ip({style:C,timeout:k,easing:l},{mode:"enter"});if(k==="auto"){const Te=q.transitions.getAutoHeightDuration(le);G.style.transitionDuration=`${Te}ms`,K.current=Te}else G.style.transitionDuration=typeof me=="string"?me:`${me}ms`;G.style[P]=`${le}px`,G.style.transitionTimingFunction=ue,m&&m(G,se)}),U=J((G,se)=>{G.style[P]="auto",f&&f(G,se)}),ce=J(G=>{G.style[P]=`${V()}px`,g&&g(G)}),ge=J(p),he=J(G=>{const se=V(),{duration:le,easing:me}=Ip({style:C,timeout:k,easing:l},{mode:"exit"});if(k==="auto"){const ue=q.transitions.getAutoHeightDuration(se);G.style.transitionDuration=`${ue}ms`,K.current=ue}else G.style.transitionDuration=typeof le=="string"?le:`${le}ms`;G.style[P]=v,G.style.transitionTimingFunction=me,y&&y(G)}),ee=G=>{k==="auto"&&Z.start(K.current||0,G),o&&o(H.current,G)};return h.jsx(E,{in:u,onEnter:Q,onEntered:U,onEntering:L,onExit:ce,onExited:ge,onExiting:he,addEndListener:ee,nodeRef:H,timeout:k==="auto"?null:k,..._,children:(G,{ownerState:se,...le})=>h.jsx(HC,{as:c,className:be(R.root,a,{entered:R.entered,exited:!u&&v==="0px"&&R.hidden}[G]),style:{[A?"minWidth":"minHeight"]:v,...C},ref:W,ownerState:{...O,state:G},...le,children:h.jsx(WC,{ownerState:{...O,state:G},className:R.wrapper,ref:j,children:h.jsx(ZC,{ownerState:{...O,state:G},className:R.wrapperInner,children:i})})})})});process.env.NODE_ENV!=="production"&&(fa.propTypes={addEndListener:b.func,children:b.node,classes:b.object,className:b.string,collapsedSize:b.oneOfType([b.number,b.string]),component:Ap,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,orientation:b.oneOf(["horizontal","vertical"]),style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),timeout:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])}),fa&&(fa.muiSupportAuto=!0);function qC(e){return typeof e.main=="string"}function KC(e,r=[]){if(!qC(e))return!1;for(const t of r)if(!e.hasOwnProperty(t)||typeof e[t]!="string")return!1;return!0}function dc(e=[]){return([,r])=>r&&KC(r,e)}const GC=b.oneOfType([b.func,b.object]);function Rp(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
188
+ `)}m.write("payload.value = newResult;"),m.write("return payload;");const C=m.compile();return(k,E)=>C(f,k,E)};let i;const a=Qi,s=!Of.jitless,l=s&&V2.value,u=r.catchall;let d;e._zod.parse=(f,m)=>{d??(d=n.value);const g=f.value;return a(g)?s&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=o(r.shape)),f=i(f,m),u?Zf([],g,f,m,d,e):f):t(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function qf(e,r,t,n){for(const i of e)if(i.issues.length===0)return r.value=i.value,r;const o=e.filter(i=>!An(i));return o.length===1?(r.value=o[0].value,o[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:t,errors:e.map(i=>i.issues.map(a=>tn(a,n,en())))}),r)}const P_=Y("$ZodUnion",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ye(e._zod,"optout",()=>r.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ye(e._zod,"values",()=>{if(r.options.every(o=>o._zod.values))return new Set(r.options.flatMap(o=>Array.from(o._zod.values)))}),Ye(e._zod,"pattern",()=>{if(r.options.every(o=>o._zod.pattern)){const o=r.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Ws(i.source)).join("|")})$`)}});const t=r.options.length===1,n=r.options[0]._zod.run;e._zod.parse=(o,i)=>{if(t)return n(o,i);let a=!1;const s=[];for(const c of r.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>qf(c,o,e,i)):qf(s,o,e,i)}}),A_=Y("$ZodIntersection",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{const o=t.value,i=r.left._zod.run({value:o,issues:[]},n),a=r.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>Kf(t,c,l)):Kf(t,i,a)}});function Gs(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(xo(e)&&xo(r)){const t=Object.keys(r),n=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...r};for(const i of n){const a=Gs(e[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let n=0;n<e.length;n++){const o=e[n],i=r[n],a=Gs(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};t.push(a.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Kf(e,r,t){if(r.issues.length&&e.issues.push(...r.issues),t.issues.length&&e.issues.push(...t.issues),An(e))return e;const n=Gs(r.value,t.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const I_=Y("$ZodEnum",(e,r)=>{et.init(e,r);const t=L2(r.entries),n=new Set(t);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.filter(o=>F2.has(typeof o)).map(o=>typeof o=="string"?Pn(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:t,input:a,inst:e}),o}}),R_=Y("$ZodLiteral",(e,r)=>{if(et.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(t=>typeof t=="string"?Pn(t):t?Pn(t.toString()):String(t)).join("|")})$`),e._zod.parse=(t,n)=>{const o=t.value;return e._zod.values.has(o)||t.issues.push({code:"invalid_value",values:r.values,input:o,inst:e}),t}}),N_=Y("$ZodTransform",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Tf(e.constructor.name);const o=r.transform(t.value,t);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(t.value=a,t));if(o instanceof Promise)throw new On;return t.value=o,t}});function Gf(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const $_=Y("$ZodOptional",(e,r)=>{et.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${Ws(t.source)})?$`):void 0}),e._zod.parse=(t,n)=>{if(r.innerType._zod.optin==="optional"){const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Gf(i,t.value)):Gf(o,t.value)}return t.value===void 0?t:r.innerType._zod.run(t,n)}}),j_=Y("$ZodNullable",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${Ws(t.source)}|null)$`):void 0}),Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(t,n)=>t.value===null?t:r.innerType._zod.run(t,n)}),L_=Y("$ZodDefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);if(t.value===void 0)return t.value=r.defaultValue,t;const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Qf(i,r)):Qf(o,r)}});function Qf(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const z_=Y("$ZodPrefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=r.defaultValue),r.innerType._zod.run(t,n))}),B_=Y("$ZodNonOptional",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>{const t=r.innerType._zod.values;return t?new Set([...t].filter(n=>n!==void 0)):void 0}),e._zod.parse=(t,n)=>{const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Xf(i,e)):Xf(o,e)}});function Xf(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const V_=Y("$ZodCatch",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=r.catchValue({...t,error:{issues:i.issues.map(a=>tn(a,n,en()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=r.catchValue({...t,error:{issues:o.issues.map(i=>tn(i,n,en()))},input:t.value}),t.issues=[]),t)}}),F_=Y("$ZodPipe",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>r.in._zod.values),Ye(e._zod,"optin",()=>r.in._zod.optin),Ye(e._zod,"optout",()=>r.out._zod.optout),Ye(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(t,n)=>{if(n.direction==="backward"){const i=r.out._zod.run(t,n);return i instanceof Promise?i.then(a=>aa(a,r.in,n)):aa(i,r.in,n)}const o=r.in._zod.run(t,n);return o instanceof Promise?o.then(i=>aa(i,r.out,n)):aa(o,r.out,n)}});function aa(e,r,t){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},t)}const Y_=Y("$ZodReadonly",(e,r)=>{et.init(e,r),Ye(e._zod,"propValues",()=>r.innerType._zod.propValues),Ye(e._zod,"values",()=>r.innerType._zod.values),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(Jf):Jf(o)}});function Jf(e){return e.value=Object.freeze(e.value),e}const U_=Y("$ZodCustom",(e,r)=>{Ot.init(e,r),et.init(e,r),e._zod.parse=(t,n)=>t,e._zod.check=t=>{const n=t.value,o=r.fn(n);if(o instanceof Promise)return o.then(i=>ep(i,t,n,e));ep(o,t,n,e)}});function ep(e,r,t,n){if(!e){const o={code:"custom",input:t,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),r.issues.push(So(o))}}class H_{constructor(){this._map=new Map,this._idmap=new Map}add(r,...t){const n=t[0];if(this._map.set(r,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,r)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(r){const t=this._map.get(r);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(r),this}get(r){const t=r._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(r)};return Object.keys(o).length?o:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function W_(){return new H_}const sa=W_();function Z_(e,r){return new e({type:"string",...pe(r)})}function q_(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...pe(r)})}function tp(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...pe(r)})}function K_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...pe(r)})}function G_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...pe(r)})}function Q_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...pe(r)})}function X_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...pe(r)})}function J_(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...pe(r)})}function ex(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...pe(r)})}function tx(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...pe(r)})}function rx(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...pe(r)})}function nx(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...pe(r)})}function ox(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...pe(r)})}function ix(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...pe(r)})}function ax(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...pe(r)})}function sx(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...pe(r)})}function cx(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...pe(r)})}function lx(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...pe(r)})}function ux(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...pe(r)})}function dx(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...pe(r)})}function fx(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...pe(r)})}function px(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...pe(r)})}function hx(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...pe(r)})}function mx(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...pe(r)})}function gx(e,r){return new e({type:"string",format:"date",check:"string_format",...pe(r)})}function vx(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...pe(r)})}function yx(e,r){return new e({type:"string",format:"duration",check:"string_format",...pe(r)})}function bx(e,r){return new e({type:"number",checks:[],...pe(r)})}function wx(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...pe(r)})}function _x(e,r){return new e({type:"boolean",...pe(r)})}function xx(e){return new e({type:"unknown"})}function Sx(e,r){return new e({type:"never",...pe(r)})}function rp(e,r){return new Vf({check:"less_than",...pe(r),value:e,inclusive:!1})}function Qs(e,r){return new Vf({check:"less_than",...pe(r),value:e,inclusive:!0})}function np(e,r){return new Ff({check:"greater_than",...pe(r),value:e,inclusive:!1})}function Xs(e,r){return new Ff({check:"greater_than",...pe(r),value:e,inclusive:!0})}function op(e,r){return new zw({check:"multiple_of",...pe(r),value:e})}function ip(e,r){return new Vw({check:"max_length",...pe(r),maximum:e})}function ca(e,r){return new Fw({check:"min_length",...pe(r),minimum:e})}function ap(e,r){return new Yw({check:"length_equals",...pe(r),length:e})}function Cx(e,r){return new Uw({check:"string_format",format:"regex",...pe(r),pattern:e})}function Ex(e){return new Hw({check:"string_format",format:"lowercase",...pe(e)})}function kx(e){return new Ww({check:"string_format",format:"uppercase",...pe(e)})}function Dx(e,r){return new Zw({check:"string_format",format:"includes",...pe(r),includes:e})}function Tx(e,r){return new qw({check:"string_format",format:"starts_with",...pe(r),prefix:e})}function Ox(e,r){return new Kw({check:"string_format",format:"ends_with",...pe(r),suffix:e})}function Co(e){return new Gw({check:"overwrite",tx:e})}function Mx(e){return Co(r=>r.normalize(e))}function Px(){return Co(e=>e.trim())}function Ax(){return Co(e=>e.toLowerCase())}function Ix(){return Co(e=>e.toUpperCase())}function Rx(e,r,t){return new e({type:"array",element:r,...pe(t)})}function Nx(e,r,t){return new e({type:"custom",check:"custom",fn:r,...pe(t)})}function $x(e){const r=jx(t=>(t.addIssue=n=>{if(typeof n=="string")t.issues.push(So(n,t.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),t.issues.push(So(o))}},e(t.value,t)));return r}function jx(e,r){const t=new Ot({check:"custom",...pe(r)});return t._zod.check=e,t}function sp(e,r){try{var t=e()}catch(n){return r(n)}return t&&t.then?t.then(void 0,r):t}function Lx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Ls(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function zx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if(n.code==="invalid_union"&&n.errors.length>0){var s=n.errors[0][0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Ls(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function Bx(e,r,t){if(t===void 0&&(t={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,i){try{return Promise.resolve(sp(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](n,r)).then(function(a){return i.shouldUseNativeValidation&&Fs({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return Array.isArray(s?.issues)})(a))return{values:{},errors:kf(Lx(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,i){try{return Promise.resolve(sp(function(){return Promise.resolve((t.mode==="sync"?ew:tw)(e,n,r)).then(function(a){return i.shouldUseNativeValidation&&Fs({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return s instanceof qs})(a))return{values:{},errors:kf(zx(a.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const Vx=Y("ZodISODateTime",(e,r)=>{u_.init(e,r),Ge.init(e,r)});function Fx(e){return mx(Vx,e)}const Yx=Y("ZodISODate",(e,r)=>{d_.init(e,r),Ge.init(e,r)});function Ux(e){return gx(Yx,e)}const Hx=Y("ZodISOTime",(e,r)=>{f_.init(e,r),Ge.init(e,r)});function Wx(e){return vx(Hx,e)}const Zx=Y("ZodISODuration",(e,r)=>{p_.init(e,r),Ge.init(e,r)});function qx(e){return yx(Zx,e)}const Ut=Y("ZodError",(e,r)=>{qs.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>J2(e,t)},flatten:{value:t=>X2(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ys,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ys,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Kx=ea(Ut),Gx=ta(Ut),Qx=ra(Ut),Xx=na(Ut),Jx=ow(Ut),eS=iw(Ut),tS=aw(Ut),rS=sw(Ut),nS=cw(Ut),oS=lw(Ut),iS=uw(Ut),aS=dw(Ut),it=Y("ZodType",(e,r)=>(et.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...t)=>e.clone({...r,checks:[...r.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(t,n)=>jr(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Kx(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Qx(e,t,n),e.parseAsync=async(t,n)=>Gx(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Xx(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Jx(e,t,n),e.decode=(t,n)=>eS(e,t,n),e.encodeAsync=async(t,n)=>tS(e,t,n),e.decodeAsync=async(t,n)=>rS(e,t,n),e.safeEncode=(t,n)=>nS(e,t,n),e.safeDecode=(t,n)=>oS(e,t,n),e.safeEncodeAsync=async(t,n)=>iS(e,t,n),e.safeDecodeAsync=async(t,n)=>aS(e,t,n),e.refine=(t,n)=>e.check(tC(t,n)),e.superRefine=t=>e.check(rC(t)),e.overwrite=t=>e.check(Co(t)),e.optional=()=>mp(e),e.nullable=()=>gp(e),e.nullish=()=>mp(gp(e)),e.nonoptional=t=>qS(e,t),e.array=()=>PS(e),e.or=t=>NS([e,t]),e.and=t=>jS(e,t),e.transform=t=>yp(e,FS(t)),e.default=t=>HS(e,t),e.prefault=t=>ZS(e,t),e.catch=t=>GS(e,t),e.pipe=t=>yp(e,t),e.readonly=()=>JS(e),e.describe=t=>{const n=e.clone();return sa.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return sa.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return sa.get(e);const n=e.clone();return sa.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),cp=Y("_ZodString",(e,r)=>{Ks.init(e,r),it.init(e,r);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...n)=>e.check(Cx(...n)),e.includes=(...n)=>e.check(Dx(...n)),e.startsWith=(...n)=>e.check(Tx(...n)),e.endsWith=(...n)=>e.check(Ox(...n)),e.min=(...n)=>e.check(ca(...n)),e.max=(...n)=>e.check(ip(...n)),e.length=(...n)=>e.check(ap(...n)),e.nonempty=(...n)=>e.check(ca(1,...n)),e.lowercase=n=>e.check(Ex(n)),e.uppercase=n=>e.check(kx(n)),e.trim=()=>e.check(Px()),e.normalize=(...n)=>e.check(Mx(...n)),e.toLowerCase=()=>e.check(Ax()),e.toUpperCase=()=>e.check(Ix())}),sS=Y("ZodString",(e,r)=>{Ks.init(e,r),cp.init(e,r),e.email=t=>e.check(q_(cS,t)),e.url=t=>e.check(J_(lS,t)),e.jwt=t=>e.check(hx(CS,t)),e.emoji=t=>e.check(ex(uS,t)),e.guid=t=>e.check(tp(lp,t)),e.uuid=t=>e.check(K_(la,t)),e.uuidv4=t=>e.check(G_(la,t)),e.uuidv6=t=>e.check(Q_(la,t)),e.uuidv7=t=>e.check(X_(la,t)),e.nanoid=t=>e.check(tx(dS,t)),e.guid=t=>e.check(tp(lp,t)),e.cuid=t=>e.check(rx(fS,t)),e.cuid2=t=>e.check(nx(pS,t)),e.ulid=t=>e.check(ox(hS,t)),e.base64=t=>e.check(dx(_S,t)),e.base64url=t=>e.check(fx(xS,t)),e.xid=t=>e.check(ix(mS,t)),e.ksuid=t=>e.check(ax(gS,t)),e.ipv4=t=>e.check(sx(vS,t)),e.ipv6=t=>e.check(cx(yS,t)),e.cidrv4=t=>e.check(lx(bS,t)),e.cidrv6=t=>e.check(ux(wS,t)),e.e164=t=>e.check(px(SS,t)),e.datetime=t=>e.check(Fx(t)),e.date=t=>e.check(Ux(t)),e.time=t=>e.check(Wx(t)),e.duration=t=>e.check(qx(t))});function rr(e){return Z_(sS,e)}const Ge=Y("ZodStringFormat",(e,r)=>{Ze.init(e,r),cp.init(e,r)}),cS=Y("ZodEmail",(e,r)=>{t_.init(e,r),Ge.init(e,r)}),lp=Y("ZodGUID",(e,r)=>{Jw.init(e,r),Ge.init(e,r)}),la=Y("ZodUUID",(e,r)=>{e_.init(e,r),Ge.init(e,r)}),lS=Y("ZodURL",(e,r)=>{r_.init(e,r),Ge.init(e,r)}),uS=Y("ZodEmoji",(e,r)=>{n_.init(e,r),Ge.init(e,r)}),dS=Y("ZodNanoID",(e,r)=>{o_.init(e,r),Ge.init(e,r)}),fS=Y("ZodCUID",(e,r)=>{i_.init(e,r),Ge.init(e,r)}),pS=Y("ZodCUID2",(e,r)=>{a_.init(e,r),Ge.init(e,r)}),hS=Y("ZodULID",(e,r)=>{s_.init(e,r),Ge.init(e,r)}),mS=Y("ZodXID",(e,r)=>{c_.init(e,r),Ge.init(e,r)}),gS=Y("ZodKSUID",(e,r)=>{l_.init(e,r),Ge.init(e,r)}),vS=Y("ZodIPv4",(e,r)=>{h_.init(e,r),Ge.init(e,r)}),yS=Y("ZodIPv6",(e,r)=>{m_.init(e,r),Ge.init(e,r)}),bS=Y("ZodCIDRv4",(e,r)=>{g_.init(e,r),Ge.init(e,r)}),wS=Y("ZodCIDRv6",(e,r)=>{v_.init(e,r),Ge.init(e,r)}),_S=Y("ZodBase64",(e,r)=>{y_.init(e,r),Ge.init(e,r)}),xS=Y("ZodBase64URL",(e,r)=>{w_.init(e,r),Ge.init(e,r)}),SS=Y("ZodE164",(e,r)=>{__.init(e,r),Ge.init(e,r)}),CS=Y("ZodJWT",(e,r)=>{S_.init(e,r),Ge.init(e,r)}),up=Y("ZodNumber",(e,r)=>{Uf.init(e,r),it.init(e,r),e.gt=(n,o)=>e.check(np(n,o)),e.gte=(n,o)=>e.check(Xs(n,o)),e.min=(n,o)=>e.check(Xs(n,o)),e.lt=(n,o)=>e.check(rp(n,o)),e.lte=(n,o)=>e.check(Qs(n,o)),e.max=(n,o)=>e.check(Qs(n,o)),e.int=n=>e.check(fp(n)),e.safe=n=>e.check(fp(n)),e.positive=n=>e.check(np(0,n)),e.nonnegative=n=>e.check(Xs(0,n)),e.negative=n=>e.check(rp(0,n)),e.nonpositive=n=>e.check(Qs(0,n)),e.multipleOf=(n,o)=>e.check(op(n,o)),e.step=(n,o)=>e.check(op(n,o)),e.finite=()=>e;const t=e._zod.bag;e.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),e.isFinite=!0,e.format=t.format??null});function dp(e){return bx(up,e)}const ES=Y("ZodNumberFormat",(e,r)=>{C_.init(e,r),up.init(e,r)});function fp(e){return wx(ES,e)}const kS=Y("ZodBoolean",(e,r)=>{E_.init(e,r),it.init(e,r)});function Js(e){return _x(kS,e)}const DS=Y("ZodUnknown",(e,r)=>{k_.init(e,r),it.init(e,r)});function pp(){return xx(DS)}const TS=Y("ZodNever",(e,r)=>{D_.init(e,r),it.init(e,r)});function OS(e){return Sx(TS,e)}const MS=Y("ZodArray",(e,r)=>{T_.init(e,r),it.init(e,r),e.element=r.element,e.min=(t,n)=>e.check(ca(t,n)),e.nonempty=t=>e.check(ca(1,t)),e.max=(t,n)=>e.check(ip(t,n)),e.length=(t,n)=>e.check(ap(t,n)),e.unwrap=()=>e.element});function PS(e,r){return Rx(MS,e,r)}const AS=Y("ZodObject",(e,r)=>{M_.init(e,r),it.init(e,r),Ye(e,"shape",()=>r.shape),e.keyof=()=>LS(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pp()}),e.loose=()=>e.clone({...e._zod.def,catchall:pp()}),e.strict=()=>e.clone({...e._zod.def,catchall:OS()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Z2(e,t),e.safeExtend=t=>q2(e,t),e.merge=t=>K2(e,t),e.pick=t=>H2(e,t),e.omit=t=>W2(e,t),e.partial=(...t)=>G2(hp,e,t[0]),e.required=(...t)=>Q2(vp,e,t[0])});function IS(e,r){const t={type:"object",get shape(){return $r(this,"shape",e?B2(e):{}),this.shape},...pe(r)};return new AS(t)}const RS=Y("ZodUnion",(e,r)=>{P_.init(e,r),it.init(e,r),e.options=r.options});function NS(e,r){return new RS({type:"union",options:e,...pe(r)})}const $S=Y("ZodIntersection",(e,r)=>{A_.init(e,r),it.init(e,r)});function jS(e,r){return new $S({type:"intersection",left:e,right:r})}const ec=Y("ZodEnum",(e,r)=>{I_.init(e,r),it.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);const t=new Set(Object.keys(r.entries));e.extract=(n,o)=>{const i={};for(const a of n)if(t.has(a))i[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ec({...r,checks:[],...pe(o),entries:i})},e.exclude=(n,o)=>{const i={...r.entries};for(const a of n)if(t.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ec({...r,checks:[],...pe(o),entries:i})}});function LS(e,r){const t=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ec({type:"enum",entries:t,...pe(r)})}const zS=Y("ZodLiteral",(e,r)=>{R_.init(e,r),it.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function BS(e,r){return new zS({type:"literal",values:Array.isArray(e)?e:[e],...pe(r)})}const VS=Y("ZodTransform",(e,r)=>{N_.init(e,r),it.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Tf(e.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(So(i,t.value,r));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=t.value),a.inst??(a.inst=e),t.issues.push(So(a))}};const o=r.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function FS(e){return new VS({type:"transform",transform:e})}const hp=Y("ZodOptional",(e,r)=>{$_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function mp(e){return new hp({type:"optional",innerType:e})}const YS=Y("ZodNullable",(e,r)=>{j_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function gp(e){return new YS({type:"nullable",innerType:e})}const US=Y("ZodDefault",(e,r)=>{L_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function HS(e,r){return new US({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():If(r)}})}const WS=Y("ZodPrefault",(e,r)=>{z_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function ZS(e,r){return new WS({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():If(r)}})}const vp=Y("ZodNonOptional",(e,r)=>{B_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function qS(e,r){return new vp({type:"nonoptional",innerType:e,...pe(r)})}const KS=Y("ZodCatch",(e,r)=>{V_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function GS(e,r){return new KS({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const QS=Y("ZodPipe",(e,r)=>{F_.init(e,r),it.init(e,r),e.in=r.in,e.out=r.out});function yp(e,r){return new QS({type:"pipe",in:e,out:r})}const XS=Y("ZodReadonly",(e,r)=>{Y_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function JS(e){return new XS({type:"readonly",innerType:e})}const eC=Y("ZodCustom",(e,r)=>{U_.init(e,r),it.init(e,r)});function tC(e,r={}){return Nx(eC,e,r)}function rC(e){return $x(e)}const bp=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,wp=(e,r)=>{if(!e||!r)return null;const t=e.split("-");if(t.length!==3)return null;const n=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=r.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(n,o,i,s,c);return isNaN(l.getTime())||!w.isValid(l)?null:l},nC=IS({titulo:rr().min(1,"El campo Título es requerido."),fechaInicio:rr().min(1,"El campo fecha inicio es requerido."),horaInicio:rr().min(1,"La hora de inicio es requerida.").regex(bp,{message:"Formato inválido"}),horaFin:rr().min(1,"La hora fin es requerida.").regex(bp,{message:"Formato inválido"}),todoElDia:Js(),fechaFin:rr().optional(),showEndDate:Js().optional(),horaInicio2:rr().optional(),TodoElDia2:Js().optional(),client:rr().optional().nullable(),repetir:rr().optional(),link:rr().url("Debe ser una URL válida ejemplo https://www.google.com.").or(BS("")).optional(),descripcion:rr().optional(),color:rr().optional(),solID:dp().optional().nullable(),disID:dp().optional().nullable()}).refine(e=>e.showEndDate?e.fechaFin&&e.fechaFin.length>0:!0,{message:"La fecha de fin es requerida.",path:["fechaFin"]}).refine(e=>e.fechaFin!==void 0?!!e.fechaFin&&!!e.horaInicio2:!0,{message:"La hora de fin son requeridas.",path:["horaInicio2"]}).refine(e=>{if(e.todoElDia||!e.fechaInicio||!e.horaInicio||!e.fechaFin||!e.horaInicio2)return!0;const r=wp(e.fechaInicio,e.horaInicio),t=wp(e.fechaFin,e.horaFin);return!r||!t||!w.isValid(r)||!w.isValid(t)?!0:!(w.isBefore(t,r)&&!w.isSameDay(t,r)||w.isSameDay(r,t)&&w.isBefore(t,r))},{message:"La hora de fin deben ser posterior a la de inicio.",path:["horaFin"]}),_p=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),$.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),oC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M7.288%2022.986h-.147a6.2%206.2%200%200%201-4.28-1.85c-2.404-2.404-2.478-6.24-.16-8.557L4.28%2011a1.228%201.228%200%201%201%201.739%201.739L4.44%2014.317c-1.356%201.357-1.282%203.626.16%205.068a3.82%203.82%200%200%200%202.602%201.135c.95%200%201.825-.32%202.479-.974l1.578-1.579a1.23%201.23%200%200%201%201.739%200c.48.481.48%201.258%200%201.739l-1.579%201.578c-1.097%201.098-2.552%201.69-4.13%201.69zM17.98%2012.998a1.23%201.23%200%200%201%200-1.739l1.578-1.578c.654-.654.986-1.53.974-2.466a3.78%203.78%200%200%200-1.134-2.602c-1.443-1.443-3.712-1.517-5.068-.16L12.75%206.03c-.48.48-1.258.48-1.739%200a1.23%201.23%200%200%201%200-1.739l1.579-1.578c2.318-2.319%206.153-2.245%208.558.16a6.23%206.23%200%200%201%201.85%204.279%205.84%205.84%200%200%201-1.69%204.279l-1.578%201.578c-.481.481-1.258.481-1.74%200z'/%3e%3cpath%20d='M14.172%208.11%208.07%2014.214a1.233%201.233%200%200%200%201.743%201.744l6.104-6.104a1.233%201.233%200%201%200-1.744-1.744'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",iC=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("g",{clipPath:"url(#a)"},$.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),$.createElement("defs",null,$.createElement("clipPath",{id:"a"},$.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),aC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M13.17%2013.68c2.06%200%204%20.8%205.46%202.27a7.7%207.7%200%200%201%202.26%205.47c0%20.79-.64%201.43-1.43%201.43l.01-.01H4.53c-.79%200-1.43-.64-1.43-1.43%200-4.27%203.46-7.73%207.72-7.73zM12%201.9c2.82%200%205.11%202.29%205.11%205.11s-2.29%205.11-5.11%205.11v-.01c-2.82%200-5.11-2.29-5.11-5.11S9.18%201.9%2012%201.9'/%3e%3c/svg%3e",sC=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},$.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),$.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),$.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),$.createElement("defs",null,$.createElement("clipPath",{id:"a"},$.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),cC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.789%2017H3.21C2.542%2017%202%2017.56%202%2018.25s.542%201.25%201.211%201.25H13.79c.669%200%201.211-.56%201.211-1.25S14.458%2017%2013.789%2017M20.718%204H3.282C2.574%204%202%204.56%202%205.25S2.574%206.5%203.282%206.5h17.436C21.426%206.5%2022%205.94%2022%205.25S21.426%204%2020.718%204M20.718%2010.5H3.282C2.574%2010.5%202%2011.06%202%2011.75S2.574%2013%203.282%2013h17.436c.708%200%201.282-.56%201.282-1.25s-.574-1.25-1.282-1.25'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",lC=e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},$.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),$.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"})),xp=qt(h.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),tc=qt(h.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),uC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"90%",sm:450,md:500},bgcolor:"background.paper",boxShadow:24,p:{xs:2,sm:3},borderRadius:2,maxHeight:"90vh",overflowY:"auto"},rc=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],Sp=(()=>{const e=[];for(let r=0;r<24;r++)for(let t=0;t<60;t+=15){const n=r.toString().padStart(2,"0"),o=t.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e})(),dC=({isVisible:e,onClose:r,onSave:t,onDelete:n,selectedDate:o,initialEvent:i,userId:a,masNombreBD:s,disId:c})=>{const[l,u]=x.useState(!1),[d,f]=x.useState(!1),m=w.format(new Date,"yyyy-MM-dd"),[g,p]=x.useState(""),[y,S]=x.useState([]),[C,k]=x.useState(!1),E=Ps(),[_,O]=x.useState([]),{control:R,handleSubmit:q,reset:Z,formState:{errors:j},watch:K,setValue:v}=$2({resolver:Bx(nC),defaultValues:{titulo:"",fechaInicio:w.format(new Date,"yyyy-MM-dd"),horaInicio:w.format(new Date,"HH:mm"),horaFin:w.format(w.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:rc[5],solID:null}}),A=K("fechaInicio"),P=K("fechaFin"),H=K("todoElDia");x.useEffect(()=>{if(g.trim()===""||!a||!c||!s){S([]);return}k(!0);const V=setTimeout(()=>{E.getClients(g,c,s,a).then(Q=>{k(!1);const L=Array.from(new Map(Q.map(U=>[U.nombreCliente,U])).values());if(L)S(L);else if(i?.client&&i.solID!==null){const U=[{solID:i.solID,nombreCliente:i.client}];S(U)}else S([])}).catch(Q=>{console.error("Error al buscar clientes:",Q),k(!1)})},500);return()=>clearTimeout(V)},[g,a,c,s]),x.useEffect(()=>{if(A&&P){const V=new Date(A),Q=new Date(P);(V===Q||V>Q)&&v("fechaFin",A)}},[A,P,v]),x.useEffect(()=>{A&&v("fechaFin",A)},[A]),x.useEffect(()=>{v("showEndDate",l)},[l,v]),x.useEffect(()=>{if(i){const V=w.format(i.fechaInicio,"yyyy-MM-dd")===w.format(i.fechaFin,"yyyy-MM-dd");u(!V),v("titulo",i?.titulo),v("fechaInicio",w.format(i.fechaInicio,"yyyy-MM-dd")),v("fechaFin",w.format(i.fechaFin,"yyyy-MM-dd")),v("horaInicio",w.format(i.fechaInicio,"HH:mm")),v("horaFin",w.format(i.fechaFin,"HH:mm")),v("horaInicio2",w.format(i.fechaFin,"HH:mm")),v("descripcion",i.descripcion),v("link",i.link),v("repetir","false"),v("color",i.color),v("todoElDia",i.todoElDia),v("solID",i.solID),v("client",i.client),i.solID?f(!0):f(!1)}else{const V=o||new Date,Q=new Date,L=new Date(V.getFullYear(),V.getMonth(),V.getDate(),Q.getHours(),Q.getMinutes()),U=w.addHours(L,1);Z({titulo:"",fechaInicio:w.format(L,"yyyy-MM-dd"),horaInicio:w.format(L,"HH:mm"),fechaFin:w.format(U,"yyyy-MM-dd"),horaFin:w.format(U,"HH:mm"),horaInicio2:w.format(U,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:rc[5],solID:null}),u(!1),f(!1)}},[i,e,o]);const W=q(V=>{t(V,i?.eventoID),r(),Z(),u(!1)},V=>{console.log("Errores de validación:",V)});x.useEffect(()=>{H&&(v("horaInicio","00:00"),v("horaFin","23:59"))},[H,v,K]);const J=()=>{const V=K("fechaInicio");if(V){const Q=new Date(`${V}T00:00:00`),L=w.addDays(Q,1);v("fechaFin",w.format(L,"yyyy-MM-dd"))}u(!0)};return h.jsx(N.Modal,{open:e,onClose:r,children:h.jsxs(N.Box,{sx:uC,children:[h.jsx(N.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:12},children:h.jsx(tc,{})}),h.jsx(N.Typography,{variant:"h6",mb:2,children:i?"Editar evento":"Agregar evento"}),h.jsxs(N.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"titulo",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!j.titulo,helperText:j.titulo?.message,FormHelperTextProps:{sx:{fontSize:"0.6rem"}},inputProps:{maxLength:100},sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"},"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(N.Divider,{})}),h.jsx(N.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"fechaInicio",control:R,render:({field:V})=>h.jsx(N.TextField,{fullWidth:!0,...V,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!j.fechaInicio,helperText:j.fechaInicio?.message,FormHelperTextProps:{sx:{fontSize:"0.60rem"}}})})}),l?h.jsxs(h.Fragment,{children:[h.jsx(N.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),h.jsx(N.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"fechaFin",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:A||m},error:!!j.fechaFin,helperText:j.fechaFin?.message})})}),!i&&h.jsx(N.Grid,{size:{xs:1,md:1},children:h.jsx(N.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:h.jsx(_p,{})})})]}):h.jsx(N.Grid,{size:{xs:12,md:7}})]}),l&&h.jsx(h.Fragment,{children:h.jsxs(N.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[h.jsx(N.Grid,{size:{xs:6,md:5}}),h.jsx(N.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:h.jsx(xp,{sx:{color:"#757575",margin:0,padding:0}})})]})}),h.jsxs(N.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[h.jsx(N.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaInicio",control:R,render:({field:{onChange:V,value:Q,...L}})=>h.jsx(N.Autocomplete,{freeSolo:!0,options:Sp,value:Q||"",onChange:(U,ce)=>V(ce||""),onInputChange:(U,ce)=>V(ce),renderInput:U=>h.jsx(N.TextField,{...U,...L,size:"small",error:!!j.horaInicio,helperText:j.horaInicio?.message,InputProps:{...U.InputProps,endAdornment:h.jsx(N.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(ef,{})})}}),disabled:K("todoElDia")})})}),h.jsx(N.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:j.horaInicio?"start":"center",marginTop:j.horaInicio?"5px":"0px"},children:!l&&h.jsx(xp,{sx:{color:"#757575"}})}),l&&h.jsx(N.Grid,{size:{xs:2,md:2}}),h.jsx(N.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaFin",control:R,render:({field:{onChange:V,value:Q,...L}})=>h.jsx(N.Autocomplete,{freeSolo:!0,options:Sp,value:Q||"",onChange:(U,ce)=>V(ce||""),onInputChange:(U,ce)=>V(ce),renderInput:U=>h.jsx(N.TextField,{...U,...L,size:"small",error:!!j.horaFin,helperText:j.horaFin?.message,FormHelperTextProps:{sx:{fontSize:"0.60rem"}},InputProps:{...U.InputProps,endAdornment:h.jsx(N.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(ef,{})})}}),disabled:K("todoElDia")})})}),h.jsx(N.Grid,{size:{xs:12,md:3},hidden:l,children:h.jsx(er,{name:"todoElDia",control:R,render:({field:V})=>h.jsx(N.FormControlLabel,{control:h.jsx(N.Checkbox,{checked:V.value,onChange:Q=>V.onChange(Q.target.checked)}),label:h.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:!l&&h.jsx(h.Fragment,{children:h.jsxs(N.Button,{onClick:J,size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(sC,{}),"  Agregar fecha final"]})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(N.Divider,{})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:!d&&h.jsxs(N.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(lC,{}),"  Vincular cliente"]})}),d&&h.jsxs(h.Fragment,{children:[h.jsx(N.Grid,{size:{xs:12,md:7},children:h.jsx(er,{name:"client",control:R,render:({field:V})=>h.jsx(N.Autocomplete,{options:y,loading:C,getOptionLabel:Q=>Q.nombreCliente?.trim()||"",value:y.find(Q=>Q.nombreCliente===V.value)||(V.value&&typeof V.value=="string"?{solID:-1,nombreCliente:V.value}:null),noOptionsText:"",onInputChange:(Q,L)=>{p(L)},onChange:(Q,L)=>{if(V.onChange(L?L.nombreCliente:""),v("solID",L?L.solID:null),L&&L.nombreCliente){const U=y.filter(ce=>ce.nombreCliente===L.nombreCliente&&ce.solID).map(ce=>ce.solID);O([...new Set(U)])}else O([])},renderInput:Q=>h.jsx(N.TextField,{...Q,placeholder:"Buscar cliente...",size:"small",InputProps:{...Q.InputProps,startAdornment:h.jsx("img",{src:aC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:h.jsxs(h.Fragment,{children:[C?h.jsx(N.CircularProgress,{color:"inherit",size:20}):null,Q.InputProps.endAdornment]})}})})})}),h.jsx(N.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"solID",control:R,render:({field:V})=>h.jsx(N.Autocomplete,{options:_,getOptionLabel:Q=>Q.toString(),value:V.value??null,onChange:(Q,L)=>V.onChange(L),renderInput:Q=>h.jsx(N.TextField,{...Q,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!y})})}),h.jsx(N.Grid,{size:{xs:1,md:1},children:h.jsx(N.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:h.jsx(_p,{})})})]}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(N.Divider,{})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"link",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!j.link,helperText:j.link?.message,InputProps:{startAdornment:h.jsx("img",{src:oC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"descripcion",control:R,render:({field:V})=>h.jsx(N.TextField,{...V,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:h.jsx("img",{src:cC,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),h.jsx(N.Grid,{size:{xs:12,md:12},children:h.jsxs(N.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[h.jsx(iC,{}),rc.map(V=>h.jsx(er,{name:"color",control:R,render:({field:Q})=>h.jsx(N.IconButton,{onClick:()=>Q.onChange(V),sx:{width:24,height:24,borderRadius:"50%",bgcolor:V,border:Q.value===V?"2px solid":"none",borderColor:Q.value===V?"primary.main":"transparent"}})},V))]})})]}),h.jsxs(N.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[i&&h.jsx(N.Button,{onClick:n,variant:"outlined",color:"error",children:"Eliminar"}),h.jsx(N.Button,{onClick:r,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),h.jsx(N.Button,{onClick:W,variant:"contained",sx:{textTransform:"none"},children:"Guardar"})]})]})})},fC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='49'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M34.559%2048.077c-7.413%200-13.44-6.039-13.44-13.44s6.027-13.44%2013.44-13.44%2013.44%206.027%2013.44%2013.44c0%207.414-6.027%2013.44-13.44%2013.44'/%3e%3cpath%20fill='%23fff'%20d='M39.827%2029.346c.583.583.605%201.505.05%202.06l-3.218%203.219%203.219%203.218c.555.556.532%201.48-.051%202.062-.584.583-1.506.605-2.062.05l-3.218-3.218-3.218%203.218c-.556.555-1.478.533-2.061-.05s-.606-1.506-.05-2.062l3.217-3.218-3.218-3.218c-.555-.555-.533-1.478.05-2.061.583-.584%201.507-.606%202.063-.05l3.217%203.217%203.218-3.218c.556-.555%201.478-.533%202.062.05'/%3e%3cpath%20fill='%23404756'%20d='M30.367.078c1.112%200%202.001.868%202.001%201.954v1.195h.979c4.913%200%208.892%203.887%208.892%208.686v9.237a15.4%2015.4%200%200%200-4.424-1.691v-1.312H4.468V33.63c0%202.389%202%204.343%204.446%204.343H19.4a15.4%2015.4%200%200%200%201.676%204.343H8.892C3.979%2042.317%200%2038.43%200%2033.631V11.913c0-4.8%203.979-8.686%208.892-8.686h1V2.032c0-1.086.89-1.954%202.002-1.954s2%20.868%202%201.954v1.195h14.473V2.032c0-1.085.889-1.954%202-1.954'/%3e%3c/svg%3e",pC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},hC=({isOpen:e,onClose:r,onConfirm:t,title:n,message:o})=>h.jsx(N.Modal,{open:e,onClose:r,children:h.jsxs(N.Box,{sx:pC,children:[h.jsx("img",{src:fC}),h.jsx(N.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:n}),h.jsx(N.Typography,{sx:{mt:2},children:o}),h.jsxs(N.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[h.jsx(N.Button,{variant:"outlined",onClick:r,sx:{textTransform:"none"},children:"Regresar"}),h.jsxs(N.Button,{variant:"contained",color:"error",onClick:t,sx:{textTransform:"none"},children:[h.jsx("span",{className:"icon-eliminar",children:"  "})," Eliminar"]})]})]})}),mC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},gC=({isOpen:e,onClose:r,events:t,date:n,onEventClick:o})=>{if(!n)return null;const i=a=>{o(a),r()};return h.jsx(N.Modal,{open:e,onClose:r,children:h.jsxs(N.Box,{sx:mC,children:[h.jsxs(N.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[h.jsxs(N.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),h.jsx(N.IconButton,{onClick:r,children:h.jsx(tc,{})})]}),h.jsx(N.Divider,{}),h.jsx(N.List,{children:t.map(a=>h.jsx(N.ListItem,{disablePadding:!0,children:h.jsxs(N.ListItemButton,{onClick:()=>i(a),sx:{py:.5},children:[h.jsx(N.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:a.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),h.jsx(N.ListItemText,{primary:a.titulo,secondary:`${w.format(a.fechaInicio,"HH:mm")} - ${w.format(a.fechaFin,"HH:mm")}`,sx:{my:0,"& .MuiListItemText-primary":{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},"& .MuiListItemText-secondary":{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"}}})]})},a.eventoID))})]})})},vC=qt(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),yC=qt(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),bC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M20.36%204.14H16c0-1.65-1.35-3-3-3h-2c-1.65%200-3%201.35-3%203H3.64c-.55%200-1%20.45-1%201s.45%201%201%201h1.04l.84%2013.91a3%203%200%200%200%202.99%202.82h6.98c1.58%200%202.9-1.24%203-2.82l.84-13.91h1.04c.55%200%201-.45%201-1s-.45-1-1-1zm-9.36-1h2c.55%200%201%20.45%201%201h-4c0-.55.45-1%201-1m-.39%2014.9c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201zm4.78%200c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201z'/%3e%3c/svg%3e",wC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M19.378%204.405a1.813%201.813%200%201%201%202.565%202.565L9.571%2019.342a1.813%201.813%200%200%201-2.565%200l-4.949-4.949a1.814%201.814%200%200%201%202.428-2.69l.137.126%203.666%203.666z'/%3e%3c/svg%3e",Cp=x.forwardRef(({id:e,message:r,variant:t},n)=>{const{closeSnackbar:o}=ga.useSnackbar(),i={success:{color:"#fff",icon:h.jsx("img",{width:25,src:wC,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:h.jsx(vC,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:h.jsx(yC,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:h.jsx("img",{src:bC,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},a=i[t]||i.info;return h.jsx(ga.SnackbarContent,{ref:n,children:h.jsxs(N.Box,{sx:{backgroundColor:"white",color:"#333",padding:"8px 16px",borderRadius:"8px",boxShadow:"0 3px 10px rgba(0,0,0,0.2)",display:"flex",alignItems:"center",width:{xs:"90%",sm:"auto"},minWidth:"300px",borderLeft:`5px solid ${a.color}`},children:[h.jsx(N.Box,{sx:{mr:1.5},children:a.icon}),h.jsx(N.Typography,{variant:"body2",sx:{flexGrow:1},children:r}),h.jsx(N.IconButton,{size:"small",onClick:()=>o(e),children:h.jsx(tc,{fontSize:"small"})})]})})}),_C=({userId:e,leads30Days:r,leads90Days:t,disId:n,masNombreBD:o})=>{const[i,a]=x.useState(new Date),[s,c]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(null),[m,g]=x.useState(!1),[p,y]=x.useState(null),[S,C]=x.useState([]),{enqueueSnackbar:k}=ga.useSnackbar(),E=Ps(),[_,O]=x.useState(!1),[R,q]=x.useState([]),[Z,j]=x.useState(null),K=(ee,G)=>{q(ee),j(G),O(!0)},v=x.useRef(null);x.useEffect(()=>{const ee=async()=>{try{if(e){const G=await E.getEventsByUser(e);c(G)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}finally{console.log("Eventos han sido cargados")}};return ee(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{console.log("Iniciando recarga programada de eventos (2 segundos después del inicio)..."),ee()},4e3),()=>{v.current&&clearTimeout(v.current)}},[i,e]),x.useEffect(()=>{const ee=new Date,G=w.startOfDay(ee),se=w.endOfDay(w.addDays(G,6)),le={start:G,end:se},me=s.filter(ue=>{const Te={start:ue.fechaInicio,end:ue.fechaFin};return nd(Te,le)}).sort((ue,Te)=>ue.fechaInicio.getTime()-Te.fechaInicio.getTime());C(me)},[s]);const A=async ee=>{try{const G=await E.getEventById(ee.eventoID);f(G),u(!0)}catch(G){console.error(G)}},P=()=>{u(!1),f(null)},H=async(ee,G)=>{let se,le;ee.todoElDia?(se=new Date(`${ee.fechaInicio}T${ee.horaInicio}`),le=new Date(`${ee.fechaInicio}T${ee.horaFin}`)):(se=new Date(`${ee.fechaInicio}T${ee.horaInicio}`),le=ee.fechaFin&&ee.horaInicio2?new Date(`${ee.fechaFin}T${ee.horaInicio2}`):new Date(`${ee.fechaInicio}T${ee.horaInicio2}`));const me=w.format(se,"yyyy-MM-dd HH:mm:ss.SSS"),ue=w.format(le,"yyyy-MM-dd HH:mm:ss.SSS");if(G){const B={...ee,eventoID:G,fechaInicio:me,fechaFin:ue,solID:ee.solID??null,disID:n??null,client:ee.client};try{const Ve=await E.updateEvent(B);var Te=s.map(Qe=>Qe.eventoID===Ve.eventoID?Ve:Qe);c(Te),k("El evento se ha actualizado correctamente.",{variant:"success"}),P()}catch{k("Error al eliactualizar Evento",{variant:"error"})}}else{const B={...ee,fechaInicio:me,fechaFin:ue,todoElDia:ee.todoElDia,solID:ee.solID??null,disID:n??null,client:ee.client};try{const Ve=await E.createEvent(B,e);c(Qe=>[...Qe,Ve]),k("El evento se ha creado con éxito",{variant:"success"}),P()}catch{k("Error al guardar Evento",{variant:"error"})}}if(e){const B=await E.getEventsByUser(e);c(B)}},W=()=>{a(ee=>new Date(ee.getFullYear(),ee.getMonth()-1,1))},J=()=>{a(ee=>new Date(ee.getFullYear(),ee.getMonth()+1,1))},V=()=>{g(!0)},Q=()=>{y(new Date),u(!0)},L=()=>alert("Sincronizar con Google Calendar"),U=()=>alert("Sincronizar con Outlook Calendar"),ce=ee=>{ee&&a(ee)},ge=ee=>{y(ee),u(!0),f(null)},he=async()=>{if(d)try{await E.deleteEvent(d.eventoID),c(s.filter(ee=>ee.eventoID!==d.eventoID)),k("El evento se ha eliminado de tu calendario",{content:(ee,G)=>h.jsx(Cp,{id:ee,message:String(G),variant:"delete"})})}catch{k("Error al eliminar Evento",{variant:"error"})}finally{P(),g(!1)}};return h.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[h.jsx(R0,{header:h.jsx(eb,{currentDate:i,onPrevMonth:W,onNextMonth:J,onAddEvent:Q,onDateChange:ce}),sidebar:h.jsx($b,{onEventClick:A,upcomingEvents:S,onSyncGoogle:L,onSyncOutlook:U,leads30Days:r,leads90Days:t}),mainContent:h.jsx(Hb,{onSeeMoreClick:K,currentDate:i,events:s,onDayClick:ge,onEventClick:A})}),h.jsx(dC,{isVisible:l,onClose:P,onSave:H,onDelete:V,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:n}),h.jsx(hC,{isOpen:m,onClose:()=>g(!1),onConfirm:he,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),h.jsx(gC,{isOpen:_,onClose:()=>O(!1),events:R,date:Z,onEventClick:A})]})},xC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20fill='%23070c10'%20d='M18.575%203.172A10.829%2010.829%200%200%200%201.564%2016.284l-.028-.051L0%2021.843l5.739-1.506a10.7%2010.7%200%200%200%205.173%201.318%2010.83%2010.83%200%200%200%207.663-18.483m-7.658%2016.655a8.94%208.94%200%200%201-4.62-1.277l.041.023-.329-.194-3.405.894.908-3.321-.214-.34a8.9%208.9%200%200%201-1.376-4.782%209%209%200%201%201%209%209Zm4.935-6.736c-.27-.135-1.6-.789-1.848-.88s-.429-.135-.61.136-.7.879-.856%201.06-.316.2-.586.068a7.5%207.5%200%200%201-2.183-1.349l.007.007a8.2%208.2%200%200%201-1.483-1.842l-.02-.038c-.157-.27-.017-.417.118-.551s.271-.316.406-.473a1.9%201.9%200%200%200%20.267-.44v-.012a.5.5%200%200%200%20.05-.216.5.5%200%200%200-.074-.26c-.068-.135-.609-1.467-.834-2.009s-.444-.455-.609-.464-.338-.009-.519-.009a.99.99%200%200%200-.72.337%203.03%203.03%200%200%200-.947%202.2v.058a5.27%205.27%200%200%200%201.114%202.815v-.011a12.16%2012.16%200%200%200%204.553%204.053l.068.031a14%2014%200%200%200%201.434.539l.109.03a3.6%203.6%200%200%200%201.077.161%203.7%203.7%200%200%200%20.648-.057h-.023a2.8%202.8%200%200%200%201.819-1.274l.007-.012a2.2%202.2%200%200%200%20.19-.9%202.3%202.3%200%200%200-.034-.395v.014c-.067-.113-.248-.18-.519-.316Z'/%3e%3c/svg%3e",SC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25.085'%20height='18.5'%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='none'%20d='M0%200h25.085v18.5H0z'%20data-name='Rectángulo%204598'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23a)'%20data-name='Grupo%207946'%3e%3cpath%20d='M23.12%205.809V3.226a3.2%203.2%200%200%200-.068-.656l-3.141%202.21a7.8%207.8%200%200%201%203.209%201.032'%20data-name='Trazado%2013329'/%3e%3cpath%20d='M11.847%209.791c-.1.009-.2.023-.308.023a3.78%203.78%200%200%201-2.18-.688L.067%202.58A3.2%203.2%200%200%200%200%203.227V13.98a3.23%203.23%200%200%200%203.226%203.226h9.611a7.86%207.86%200%200%201-.99-7.414'%20data-name='Trazado%2013330'/%3e%3cpath%20d='M12.478%207.369%2021.92.737A3.2%203.2%200%200%200%2019.894%200H3.226a3.2%203.2%200%200%200-2.031.74l9.4%206.628a1.64%201.64%200%200%200%201.881%200'%20data-name='Trazado%2013331'/%3e%3cpath%20d='M23.356%208.407a5.914%205.914%200%201%200%200%208.364%205.92%205.92%200%200%200%200-8.364m-1.833%204.842a.54.54%200%200%201-1.081%200v-1.164l-2.513%202.516a.54.54%200%200%201-.765-.763l2.515-2.515h-1.167a.54.54%200%201%201%200-1.081h2.471a.54.54%200%200%201%20.54.54Z'%20data-name='Trazado%2013332'/%3e%3c/g%3e%3c/svg%3e";function nc(e,r,t){return e.accessor?e.accessor(r,t):e.field?r?.[e.field]:r?.[e?.key||""]}function CC(e,r){const t=e??"",n=r??"";return t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:typeof t=="boolean"&&typeof n=="boolean"?Number(t)-Number(n):String(t).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function oc(e,r,t=!0){return typeof e=="function"?e(r):e??t}function EC(e){return e.replace(/[^\d]/g,"")}function kC(e,r){return r}const Ep=qt(h.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFileOutlined"),DC=qt(h.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),TC=qt(h.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),OC=Et("MuiBox",["root"]),MC=ru(),ic=xg({themeId:Ga,defaultTheme:MC,defaultClassName:OC.root,generateClassName:Pc.generate});process.env.NODE_ENV!=="production"&&(ic.propTypes={children:b.node,component:b.elementType,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});function kp(e,r){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function ac(e,r){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ac(e,r)}function Dp(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,ac(e,r)}const Tp={disabled:!1};var PC=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.shape({enter:b.number,exit:b.number,appear:b.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&b.oneOfType([b.string,b.shape({enter:b.string,exit:b.string,active:b.string}),b.shape({enter:b.string,enterDone:b.string,enterActive:b.string,exit:b.string,exitDone:b.string,exitActive:b.string})]);const ua=x.createContext(null);var AC=function(r){return r.scrollTop},Eo="unmounted",rn="exited",nn="entering",In="entered",sc="exiting",Cr=(function(e){Dp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,c;return i.appearStatus=null,n.in?s?(c=rn,i.appearStatus=nn):c=In:n.unmountOnExit||n.mountOnEnter?c=Eo:c=rn,i.state={status:c},i.nextCallback=null,i}r.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Eo?{status:rn}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==nn&&a!==In&&(i=nn):(a===nn||a===In)&&(i=sc)}this.updateStatus(!1,i)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},t.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===nn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this);a&&AC(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===rn&&this.setState({status:Eo})},t.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[ln.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||Tp.disabled){this.safeSetState({status:In},function(){i.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:nn},function(){i.props.onEntering(l,u),i.onTransitionEnd(f,function(){i.safeSetState({status:In},function(){i.props.onEntered(l,u)})})})},t.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ln.findDOMNode(this);if(!i||Tp.disabled){this.safeSetState({status:rn},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:sc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:rn},function(){o.props.onExited(s)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},t.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},t.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}o!=null&&setTimeout(this.nextCallback,o)},t.render=function(){var o=this.state.status;if(o===Eo)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=kp(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x.createElement(ua.Provider,{value:null},typeof a=="function"?a(o,s):x.cloneElement(x.Children.only(a),s))},r})(x.Component);Cr.contextType=ua,Cr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:b.shape({current:typeof Element>"u"?b.any:function(e,r,t,n,o,i){var a=e[r];return b.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,r,t,n,o,i)}}),children:b.oneOfType([b.func.isRequired,b.element.isRequired]).isRequired,in:b.bool,mountOnEnter:b.bool,unmountOnExit:b.bool,appear:b.bool,enter:b.bool,exit:b.bool,timeout:function(r){var t=PC;r.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.apply(void 0,[r].concat(o))},addEndListener:b.func,onEnter:b.func,onEntering:b.func,onEntered:b.func,onExit:b.func,onExiting:b.func,onExited:b.func}:{};function Rn(){}Cr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rn,onEntering:Rn,onEntered:Rn,onExit:Rn,onExiting:Rn,onExited:Rn},Cr.UNMOUNTED=Eo,Cr.EXITED=rn,Cr.ENTERING=nn,Cr.ENTERED=In,Cr.EXITING=sc;function IC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cc(e,r){var t=function(i){return r&&x.isValidElement(i)?r(i):i},n=Object.create(null);return e&&x.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=t(o)}),n}function RC(e,r){e=e||{},r=r||{};function t(u){return u in r?r[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in r?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var c in r){if(n[c])for(a=0;a<n[c].length;a++){var l=n[c][a];s[n[c][a]]=t(l)}s[c]=t(c)}for(a=0;a<o.length;a++)s[o[a]]=t(o[a]);return s}function on(e,r,t){return t[r]!=null?t[r]:e.props[r]}function NC(e,r){return cc(e.children,function(t){return x.cloneElement(t,{onExited:r.bind(null,t),in:!0,appear:on(t,"appear",e),enter:on(t,"enter",e),exit:on(t,"exit",e)})})}function $C(e,r,t){var n=cc(e.children),o=RC(r,n);return Object.keys(o).forEach(function(i){var a=o[i];if(x.isValidElement(a)){var s=i in r,c=i in n,l=r[i],u=x.isValidElement(l)&&!l.props.in;c&&(!s||u)?o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:!0,exit:on(a,"exit",e),enter:on(a,"enter",e)}):!c&&s&&!u?o[i]=x.cloneElement(a,{in:!1}):c&&s&&x.isValidElement(l)&&(o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:l.props.in,exit:on(a,"exit",e),enter:on(a,"enter",e)}))}}),o}var jC=Object.values||function(e){return Object.keys(e).map(function(r){return e[r]})},LC={component:"div",childFactory:function(r){return r}},lc=(function(e){Dp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(IC(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var t=r.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,c=i.firstRender;return{children:c?NC(o,s):$C(o,a,s),firstRender:!1}},t.handleExited=function(o,i){var a=cc(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var c=Uo({},s.children);return delete c[o.key],{children:c}}))},t.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=kp(o,["component","childFactory"]),c=this.state.contextValue,l=jC(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?x.createElement(ua.Provider,{value:c},l):x.createElement(ua.Provider,{value:c},x.createElement(i,s,l))},r})(x.Component);lc.propTypes=process.env.NODE_ENV!=="production"?{component:b.any,children:b.node,appear:b.bool,enter:b.bool,exit:b.bool,childFactory:b.func}:{},lc.defaultProps=LC;const Op={};function Mp(e,r){const t=$.useRef(Op);return t.current===Op&&(t.current=e(r)),t}const zC=[];function BC(e){$.useEffect(e,zC)}class uc{static create(){return new uc}currentId=null;start(r,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},r)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Pp(){const e=Mp(uc.create).current;return BC(e.disposeEffect),e}function da(e,r){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||r(...n)}}function VC(e){const{prototype:r={}}=e;return!!r.isReactComponent}function FC(e,r,t,n,o){const i=e[r],a=o||r;if(i==null||typeof window>"u")return null;let s;return typeof i=="function"&&!VC(i)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${n} \`${a}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ap=da(b.elementType,FC);function Ip(e,r){const{timeout:t,easing:n,style:o={}}=e;return{duration:o.transitionDuration??(typeof t=="number"?t:t[r.mode]||0),easing:o.transitionTimingFunction??(typeof n=="object"?n[r.mode]:n),delay:o.transitionDelay}}function YC(e){return Ct("MuiCollapse",e)}Et("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const UC=e=>{const{orientation:r,classes:t}=e,n={root:["root",`${r}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${r}`],wrapperInner:["wrapperInner",`${r}`]};return Lt(n,YC,t)},HC=ut("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[t.orientation],t.state==="entered"&&r.entered,t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&r.hidden]}})(cr(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:r})=>r.state==="exited"&&!r.in&&r.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),WC=ut("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),ZC=ut("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),fa=$.forwardRef(function(r,t){const n=Rt({props:r,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:c,easing:l,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:g,onExited:p,onExiting:y,orientation:S="vertical",style:C,timeout:k=Kl.standard,TransitionComponent:E=Cr,..._}=n,O={...n,orientation:S,collapsedSize:s},R=UC(O),q=ou(),Z=Pp(),j=$.useRef(null),K=$.useRef(),v=typeof s=="number"?`${s}px`:s,A=S==="horizontal",P=A?"width":"height",H=$.useRef(null),W=Qa(t,H),J=G=>se=>{if(G){const le=H.current;se===void 0?G(le):G(le,se)}},V=()=>j.current?j.current[A?"clientWidth":"clientHeight"]:0,Q=J((G,se)=>{j.current&&A&&(j.current.style.position="absolute"),G.style[P]=v,d&&d(G,se)}),L=J((G,se)=>{const le=V();j.current&&A&&(j.current.style.position="");const{duration:me,easing:ue}=Ip({style:C,timeout:k,easing:l},{mode:"enter"});if(k==="auto"){const Te=q.transitions.getAutoHeightDuration(le);G.style.transitionDuration=`${Te}ms`,K.current=Te}else G.style.transitionDuration=typeof me=="string"?me:`${me}ms`;G.style[P]=`${le}px`,G.style.transitionTimingFunction=ue,m&&m(G,se)}),U=J((G,se)=>{G.style[P]="auto",f&&f(G,se)}),ce=J(G=>{G.style[P]=`${V()}px`,g&&g(G)}),ge=J(p),he=J(G=>{const se=V(),{duration:le,easing:me}=Ip({style:C,timeout:k,easing:l},{mode:"exit"});if(k==="auto"){const ue=q.transitions.getAutoHeightDuration(se);G.style.transitionDuration=`${ue}ms`,K.current=ue}else G.style.transitionDuration=typeof le=="string"?le:`${le}ms`;G.style[P]=v,G.style.transitionTimingFunction=me,y&&y(G)}),ee=G=>{k==="auto"&&Z.start(K.current||0,G),o&&o(H.current,G)};return h.jsx(E,{in:u,onEnter:Q,onEntered:U,onEntering:L,onExit:ce,onExited:ge,onExiting:he,addEndListener:ee,nodeRef:H,timeout:k==="auto"?null:k,..._,children:(G,{ownerState:se,...le})=>h.jsx(HC,{as:c,className:be(R.root,a,{entered:R.entered,exited:!u&&v==="0px"&&R.hidden}[G]),style:{[A?"minWidth":"minHeight"]:v,...C},ref:W,ownerState:{...O,state:G},...le,children:h.jsx(WC,{ownerState:{...O,state:G},className:R.wrapper,ref:j,children:h.jsx(ZC,{ownerState:{...O,state:G},className:R.wrapperInner,children:i})})})})});process.env.NODE_ENV!=="production"&&(fa.propTypes={addEndListener:b.func,children:b.node,classes:b.object,className:b.string,collapsedSize:b.oneOfType([b.number,b.string]),component:Ap,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,orientation:b.oneOf(["horizontal","vertical"]),style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),timeout:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])}),fa&&(fa.muiSupportAuto=!0);function qC(e){return typeof e.main=="string"}function KC(e,r=[]){if(!qC(e))return!1;for(const t of r)if(!e.hasOwnProperty(t)||typeof e[t]!="string")return!1;return!0}function dc(e=[]){return([,r])=>r&&KC(r,e)}const GC=b.oneOfType([b.func,b.object]);function Rp(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
189
189
  `))}return!1}class pa{static create(){return new pa}static use(){const r=Mp(pa.create).current,[t,n]=$.useState(!1);return r.shouldMount=t,r.setShouldMount=n,$.useEffect(r.mountEffect,[t]),r}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=XC(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...r){this.mount().then(()=>this.ref.current?.start(...r))}stop(...r){this.mount().then(()=>this.ref.current?.stop(...r))}pulsate(...r){this.mount().then(()=>this.ref.current?.pulsate(...r))}}function QC(){return pa.use()}function XC(){let e,r;const t=new Promise((n,o)=>{e=n,r=o});return t.resolve=e,t.reject=r,t}function Np(e){const{className:r,classes:t,pulsate:n=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:c,timeout:l}=e,[u,d]=$.useState(!1),f=be(r,t.ripple,t.rippleVisible,n&&t.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=be(t.child,u&&t.childLeaving,n&&t.childPulsate);return!s&&!u&&d(!0),$.useEffect(()=>{if(!s&&c!=null){const p=setTimeout(c,l);return()=>{clearTimeout(p)}}},[c,s,l]),h.jsx("span",{className:f,style:m,children:h.jsx("span",{className:g})})}process.env.NODE_ENV!=="production"&&(Np.propTypes={classes:b.object.isRequired,className:b.string,in:b.bool,onExited:b.func,pulsate:b.bool,rippleSize:b.number,rippleX:b.number,rippleY:b.number,timeout:b.number.isRequired});const Ht=Et("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fc=550,JC=80,eE=Kn`
190
190
  0% {
191
191
  transform: scale(0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "componentes-exagono",
3
3
  "private": false,
4
- "version": "0.1.32",
4
+ "version": "0.1.34",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.es.js",