componentes-exagono 0.1.15 → 0.1.16
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/componentes-exagono.css +1 -1
- package/dist/index.es.js +621 -616
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -149,7 +149,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${n}Chann
|
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const gv=jn("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),jl=Symbol.for("constructDateFrom");function Oi(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&jl in e?e[jl](n):e instanceof Date?new e.constructor(n):new Date(n)}function yr(e,n){return Oi(n||e,e)}function zl(e,n,r){const[t,o]=[+yr(e.start,r?.in),+yr(e.end,r?.in)].sort((s,c)=>s-c),[a,i]=[+yr(n.start,r?.in),+yr(n.end,r?.in)].sort((s,c)=>s-c);return t<i&&a<o}function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ta(e)}var vv=/^\s+/,yv=/\s+$/;function ae(e,n){if(e=e||"",n=n||{},e instanceof ae)return e;if(!(this instanceof ae))return new ae(e,n);var r=bv(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,t,o,a,i,s;return r=n.r/255,t=n.g/255,o=n.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*i+.0722*s},setAlpha:function(n){return this._a=Hl(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=Fl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=Fl(this._r,this._g,this._b),r=Math.round(n.h*360),t=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+t+"%, "+o+"%)":"hsva("+r+", "+t+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=Bl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=Bl(this._r,this._g,this._b),r=Math.round(n.h*360),t=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+t+"%, "+o+"%)":"hsla("+r+", "+t+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return Vl(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return xv(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Fe(this._r,255)*100)+"%",g:Math.round(Fe(this._g,255)*100)+"%",b:Math.round(Fe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Fe(this._r,255)*100)+"%, "+Math.round(Fe(this._g,255)*100)+"%, "+Math.round(Fe(this._b,255)*100)+"%)":"rgba("+Math.round(Fe(this._r,255)*100)+"%, "+Math.round(Fe(this._g,255)*100)+"%, "+Math.round(Fe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Nv[Vl(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+Yl(this._r,this._g,this._b,this._a),t=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=ae(n);t="#"+Yl(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+t+")"},toString:function(n){var r=!!n;n=n||this._format;var t=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(t=this.toRgbString()),n==="prgb"&&(t=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(t=this.toHexString()),n==="hex3"&&(t=this.toHexString(!0)),n==="hex4"&&(t=this.toHex8String(!0)),n==="hex8"&&(t=this.toHex8String()),n==="name"&&(t=this.toName()),n==="hsl"&&(t=this.toHslString()),n==="hsv"&&(t=this.toHsvString()),t||this.toHexString())},clone:function(){return ae(this.toString())},_applyModification:function(n,r){var t=n.apply(null,[this].concat([].slice.call(r)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(Ev,arguments)},brighten:function(){return this._applyModification(Tv,arguments)},darken:function(){return this._applyModification(Ov,arguments)},desaturate:function(){return this._applyModification(kv,arguments)},saturate:function(){return this._applyModification(Cv,arguments)},greyscale:function(){return this._applyModification(Dv,arguments)},spin:function(){return this._applyModification(Mv,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Iv,arguments)},complement:function(){return this._applyCombination(Av,arguments)},monochromatic:function(){return this._applyCombination(Rv,arguments)},splitcomplement:function(){return this._applyCombination(Pv,arguments)},triad:function(){return this._applyCombination(Ul,[3])},tetrad:function(){return this._applyCombination(Ul,[4])}},ae.fromRatio=function(e,n){if(ta(e)=="object"){var r={};for(var t in e)e.hasOwnProperty(t)&&(t==="a"?r[t]=e[t]:r[t]=zn(e[t]));e=r}return ae(e,n)};function bv(e){var n={r:0,g:0,b:0},r=1,t=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=zv(e)),ta(e)=="object"&&(cr(e.r)&&cr(e.g)&&cr(e.b)?(n=_v(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):cr(e.h)&&cr(e.s)&&cr(e.v)?(t=zn(e.s),o=zn(e.v),n=Sv(e.h,t,o),i=!0,s="hsv"):cr(e.h)&&cr(e.s)&&cr(e.l)&&(t=zn(e.s),a=zn(e.l),n=wv(e.h,t,a),i=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Hl(r),{ok:i,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function _v(e,n,r){return{r:Fe(e,255)*255,g:Fe(n,255)*255,b:Fe(r,255)*255}}function Bl(e,n,r){e=Fe(e,255),n=Fe(n,255),r=Fe(r,255);var t=Math.max(e,n,r),o=Math.min(e,n,r),a,i,s=(t+o)/2;if(t==o)a=i=0;else{var c=t-o;switch(i=s>.5?c/(2-t-o):c/(t+o),t){case e:a=(n-r)/c+(n<r?6:0);break;case n:a=(r-e)/c+2;break;case r:a=(e-n)/c+4;break}a/=6}return{h:a,s:i,l:s}}function wv(e,n,r){var t,o,a;e=Fe(e,360),n=Fe(n,100),r=Fe(r,100);function i(l,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(u-l)*6*d:d<1/2?u:d<2/3?l+(u-l)*(2/3-d)*6:l}if(n===0)t=o=a=r;else{var s=r<.5?r*(1+n):r+n-r*n,c=2*r-s;t=i(c,s,e+1/3),o=i(c,s,e),a=i(c,s,e-1/3)}return{r:t*255,g:o*255,b:a*255}}function Fl(e,n,r){e=Fe(e,255),n=Fe(n,255),r=Fe(r,255);var t=Math.max(e,n,r),o=Math.min(e,n,r),a,i,s=t,c=t-o;if(i=t===0?0:c/t,t==o)a=0;else{switch(t){case e:a=(n-r)/c+(n<r?6:0);break;case n:a=(r-e)/c+2;break;case r:a=(e-n)/c+4;break}a/=6}return{h:a,s:i,v:s}}function Sv(e,n,r){e=Fe(e,360)*6,n=Fe(n,100),r=Fe(r,100);var t=Math.floor(e),o=e-t,a=r*(1-n),i=r*(1-o*n),s=r*(1-(1-o)*n),c=t%6,l=[r,i,a,a,s,r][c],u=[s,r,r,i,a,a][c],d=[a,a,s,r,r,i][c];return{r:l*255,g:u*255,b:d*255}}function Vl(e,n,r,t){var o=[$t(Math.round(e).toString(16)),$t(Math.round(n).toString(16)),$t(Math.round(r).toString(16))];return t&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function xv(e,n,r,t,o){var a=[$t(Math.round(e).toString(16)),$t(Math.round(n).toString(16)),$t(Math.round(r).toString(16)),$t(Wl(t))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Yl(e,n,r,t){var o=[$t(Wl(t)),$t(Math.round(e).toString(16)),$t(Math.round(n).toString(16)),$t(Math.round(r).toString(16))];return o.join("")}ae.equals=function(e,n){return!e||!n?!1:ae(e).toRgbString()==ae(n).toRgbString()},ae.random=function(){return ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function kv(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s-=n/100,r.s=ra(r.s),ae(r)}function Cv(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s+=n/100,r.s=ra(r.s),ae(r)}function Dv(e){return ae(e).desaturate(100)}function Ev(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l+=n/100,r.l=ra(r.l),ae(r)}function Tv(e,n){n=n===0?0:n||10;var r=ae(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),ae(r)}function Ov(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l-=n/100,r.l=ra(r.l),ae(r)}function Mv(e,n){var r=ae(e).toHsl(),t=(r.h+n)%360;return r.h=t<0?360+t:t,ae(r)}function Av(e){var n=ae(e).toHsl();return n.h=(n.h+180)%360,ae(n)}function Ul(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ae(e).toHsl(),t=[ae(e)],o=360/n,a=1;a<n;a++)t.push(ae({h:(r.h+a*o)%360,s:r.s,l:r.l}));return t}function Pv(e){var n=ae(e).toHsl(),r=n.h;return[ae(e),ae({h:(r+72)%360,s:n.s,l:n.l}),ae({h:(r+216)%360,s:n.s,l:n.l})]}function Iv(e,n,r){n=n||6,r=r||30;var t=ae(e).toHsl(),o=360/r,a=[ae(e)];for(t.h=(t.h-(o*n>>1)+720)%360;--n;)t.h=(t.h+o)%360,a.push(ae(t));return a}function Rv(e,n){n=n||6;for(var r=ae(e).toHsv(),t=r.h,o=r.s,a=r.v,i=[],s=1/n;n--;)i.push(ae({h:t,s:o,v:a})),a=(a+s)%1;return i}ae.mix=function(e,n,r){r=r===0?0:r||50;var t=ae(e).toRgb(),o=ae(n).toRgb(),a=r/100,i={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b,a:(o.a-t.a)*a+t.a};return ae(i)},ae.readability=function(e,n){var r=ae(e),t=ae(n);return(Math.max(r.getLuminance(),t.getLuminance())+.05)/(Math.min(r.getLuminance(),t.getLuminance())+.05)},ae.isReadable=function(e,n,r){var t=ae.readability(e,n),o,a;switch(a=!1,o=Bv(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=t>=4.5;break;case"AAlarge":a=t>=3;break;case"AAAsmall":a=t>=7;break}return a},ae.mostReadable=function(e,n,r){var t=null,o=0,a,i,s,c;r=r||{},i=r.includeFallbackColors,s=r.level,c=r.size;for(var l=0;l<n.length;l++)a=ae.readability(e,n[l]),a>o&&(o=a,t=ae(n[l]));return ae.isReadable(e,t,{level:s,size:c})||!i?t:(r.includeFallbackColors=!1,ae.mostReadable(e,["#fff","#000"],r))};var Mi=ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Nv=ae.hexNames=$v(Mi);function $v(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function Hl(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fe(e,n){Lv(e)&&(e="100%");var r=jv(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function ra(e){return Math.min(1,Math.max(0,e))}function Dt(e){return parseInt(e,16)}function Lv(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function jv(e){return typeof e=="string"&&e.indexOf("%")!=-1}function $t(e){return e.length==1?"0"+e:""+e}function zn(e){return e<=1&&(e=e*100+"%"),e}function Wl(e){return Math.round(parseFloat(e)*255).toString(16)}function Zl(e){return Dt(e)/255}var Lt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",t="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function cr(e){return!!Lt.CSS_UNIT.exec(e)}function zv(e){e=e.replace(vv,"").replace(yv,"").toLowerCase();var n=!1;if(Mi[e])e=Mi[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Lt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Lt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Lt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Lt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Lt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Lt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Lt.hex8.exec(e))?{r:Dt(r[1]),g:Dt(r[2]),b:Dt(r[3]),a:Zl(r[4]),format:n?"name":"hex8"}:(r=Lt.hex6.exec(e))?{r:Dt(r[1]),g:Dt(r[2]),b:Dt(r[3]),format:n?"name":"hex"}:(r=Lt.hex4.exec(e))?{r:Dt(r[1]+""+r[1]),g:Dt(r[2]+""+r[2]),b:Dt(r[3]+""+r[3]),a:Zl(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=Lt.hex3.exec(e))?{r:Dt(r[1]+""+r[1]),g:Dt(r[2]+""+r[2]),b:Dt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Bv(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}const Kl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23C4D9F5'%20d='M36.667%2020c0%209.205-7.462%2016.667-16.667%2016.667S3.333%2029.205%203.333%2020%2010.795%203.333%2020%203.333%2036.667%2010.795%2036.667%2020'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M20%2012.083c.69%200%201.25.56%201.25%201.25v6.15l3.8%203.8a1.25%201.25%200%201%201-1.767%201.767l-4.167-4.166A1.25%201.25%200%200%201%2018.75%2020v-6.667c0-.69.56-1.25%201.25-1.25'%20clip-rule='evenodd'/%3e%3c/svg%3e",Fv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='23'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M17.614%202.64h-.5v-.622c0-.566-.443-1.018-.998-1.018s-.998.452-.998%201.018v.622H7.893v-.622C7.894%201.452%207.45%201%206.895%201s-.999.452-.999%201.018v.622h-.5C2.946%202.64.959%204.665.959%207.165v11.31c0%202.5%201.987%204.525%204.439%204.525h12.206c2.452%200%204.439-2.025%204.439-4.524V7.165c0-2.5-1.987-4.525-4.439-4.525zm0%2018.098H5.408c-1.22%200-2.22-1.018-2.22-2.262V10.41h16.646v8.065c0%201.244-1%202.262-2.22%202.262'/%3e%3c/svg%3e",Vv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M12.667%204.667a3%203%200%200%201%203%203v8.667a3%203%200%200%201-3%203H4a3%203%200%200%201-3-3V7.667a3%203%200%200%201%203-3zM21.36%206.237a1%201%200%200%201%201.64.77V17a1%201%200%200%201-1.64.768L17%2014.135V9.867z'/%3e%3c/svg%3e",Yv=({onEventClick:e,upcomingEvents:n,onSyncGoogle:r,onSyncOutlook:t,leads30Days:o,leads90Days:a})=>{const i=d=>{const f=new Date,h={start:v.startOfDay(f),end:v.endOfDay(f)},m={start:d.fechaInicio,end:d.fechaFin};return zl(h,m)?"Hoy":v.isTomorrow(d.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(d.fechaInicio)},s={};n.forEach(d=>{const f=i(d);s[f]||(s[f]=[]),s[f].push(d)});const[c,l]=b.useState(!1),u=()=>{l(!c)};return _.jsxs("div",{className:ye.sidebarContainer,children:[_.jsxs("div",{className:ye.leadsSection,children:[_.jsxs("div",{className:ye.leadCard,children:[_.jsx("div",{className:ye.leadIcon,children:_.jsx("img",{src:Kl})}),_.jsxs("div",{className:ye.leadText,children:[_.jsx("div",{className:ye.leadDays,children:"+30 días sin atender"}),_.jsxs("div",{className:ye.leadCount,children:[o," ",_.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),_.jsxs("div",{className:ye.leadCard,children:[_.jsx("div",{className:ye.leadIcon,children:_.jsx("img",{src:Kl})}),_.jsxs("div",{className:ye.leadText,children:[_.jsx("div",{className:ye.leadDays,children:"+90 días sin atender"}),_.jsxs("div",{className:ye.leadCount,children:[a," ",_.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),_.jsxs("div",{className:ye.eventsSection,children:[_.jsx("h3",{className:ye.sidebarTitle,children:"Próximos eventos"}),_.jsx("div",{className:ye.eventsContainer,children:Object.entries(s).map(([d,f])=>_.jsxs("div",{className:`${ye.eventGroup}`,children:[_.jsxs("div",{className:ye.eventGroupDate,children:[_.jsx("img",{src:Fv,width:15})," ",d]}),f.map(h=>{const m=ae(h.color||"#ffcc00"),p=m.toString(),y=m.clone().darken(15).toString();return _.jsxs("div",{className:ye.eventItem,style:{backgroundColor:p,borderLeftColor:y},onClick:()=>e(h),children:[_.jsxs("div",{className:ye.eventDetails,children:[_.jsx("div",{className:ye.eventTitle,children:h.titulo.length>32?`${h.titulo.substring(0,32)}...`:h.titulo}),_.jsx("div",{className:ye.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(h.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(h.fechaFin)}`})]}),h.link&&_.jsx("a",{onClick:k=>{k.stopPropagation()},href:h?.link,target:"_blank",style:{textDecoration:"none"},children:_.jsx("img",{src:Vv,width:15,style:{marginLeft:"3px"}})})]},h.eventoID)})]},d))})]}),_.jsxs("div",{className:ye.calendarsSection,hidden:!0,children:[_.jsxs("button",{onClick:u,className:ye.collapsibleHeader,children:[_.jsxs("div",{className:ye.headerTitle,children:[_.jsx("h3",{children:"Calendarios"}),_.jsx("span",{className:ye.calendarCount,children:"1"})]}),_.jsx(pv,{className:`${ye.chevronIcon} ${c?ye.collapsed:""}`})]}),_.jsxs("div",{className:`${ye.collapsibleContent} ${c?ye.hidden:""}`,children:[_.jsxs("div",{className:ye.calendarItem,children:[_.jsx("div",{className:ye.circularCheckbox,children:_.jsx(hv,{size:24,className:ye.checkedIcon})}),_.jsx(Ll,{size:24,className:ye.calendarIcon}),_.jsx("span",{children:"Mi calendario"})]}),_.jsxs("div",{className:ye.calendarItem,onClick:t,children:[_.jsx("div",{className:ye.circularCheckbox,children:_.jsx(mv,{size:24,className:ye.uncheckedIcon})}),_.jsx(gv,{size:24,className:ye.calendarIcon}),_.jsx("span",{children:"Outlook"})]}),_.jsxs("div",{className:ye.syncButton,onClick:r,children:[_.jsx(Ll,{size:24,className:ye.googleIcon}),_.jsx("span",{children:"Sincronizar Google Calendar"})]})]})]})]})},jt={dayCell:"_dayCell_1f859_1",dayCellContainer:"_dayCellContainer_1f859_25",dayNumber:"_dayNumber_1f859_59",dayNumberToday:"_dayNumberToday_1f859_73",notCurrentMonth:"_notCurrentMonth_1f859_95",CurrentDay:"_CurrentDay_1f859_133",eventsList:"_eventsList_1f859_141",eventItem:"_eventItem_1f859_159",eventTitle:"_eventTitle_1f859_191",eventTime:"_eventTime_1f859_221",seeMoreLink:"_seeMoreLink_1f859_249"},ql=20,Uv=20,Hv=({dayNumber:e,date:n,events:r,isToday:t,isCurrentMonth:o,onDayClick:a,onEventClick:i,onSeeMoreClick:s})=>{const c=[jt.dayCell,o?"":jt.notCurrentMonth,jt.CurrentDay].join(" ").trim(),l=b.useRef(null),[u,d]=b.useState(r.length),f=()=>{a?.(n)};b.useLayoutEffect(()=>{const p=()=>{if(l.current){const y=l.current.clientHeight;let k=Math.floor(y/ql);if(k<r.length){const x=Math.floor((y-Uv)/ql);k=Math.max(0,x)}d(k)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const h=r.slice(0,u==0?1:u),m=r.length-(u==0?1:u);return _.jsxs("div",{className:`${c} ${jt.dayCellContainer}`,onClick:f,children:[_.jsx("div",{className:t?jt.dayNumber:jt.dayNumberToday,children:e}),_.jsxs("div",{className:jt.eventsList,ref:l,children:[h.map(p=>_.jsxs("div",{className:jt.eventItem,style:{backgroundColor:p.color||"#007bff"},onClick:y=>{y.stopPropagation(),i?.(p)},children:[_.jsx("span",{className:jt.eventTitle,children:p.titulo}),_.jsx("span",{className:jt.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(p.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(p.fechaFin)}`})]},p.eventoID)),m>0&&_.jsxs("div",{className:jt.seeMoreLink,onClick:p=>{p.stopPropagation(),s(r,n)},children:[m," más..."]})]})]})},Gl={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},Wv=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return _.jsx("div",{className:Gl.weekDaysContainer,children:e.map(n=>_.jsx("div",{className:Gl.weekDay,children:n},n))})},na={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function Zv(e,...n){const r=Oi.bind(null,n.find(t=>typeof t=="object"));return n.map(r)}function Kv(e,n){const[r,t]=Zv(e,n.start,n.end);return{start:r,end:t}}function qv(e,n){const{start:r,end:t}=Kv(n?.in,e);let o=+r>+t;const a=o?+r:+t,i=o?t:r;i.setHours(0,0,0,0);let s=1;const c=[];for(;+i<=a;)c.push(Oi(r,i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return o?c.reverse():c}function Gv(e,n){const r=n?.weekStartsOn,t=yr(e,n?.in),o=t.getDay(),a=(o<r?-7:0)+6-(o-r);return t.setDate(t.getDate()+a),t.setHours(23,59,59,999),t}function Qv(e,n,r){const t=+yr(e,r?.in),[o,a]=[+yr(n.start,r?.in),+yr(n.end,r?.in)].sort((i,s)=>i-s);return t>=o&&t<=a}const Jv=({currentDate:e,events:n,onDayClick:r,onEventClick:t,onSeeMoreClick:o})=>{const a=v.startOfMonth(e),i=v.endOfMonth(e),s=v.startOfWeek(a,{weekStartsOn:1}),c=Gv(i,{weekStartsOn:1}),l=qv({start:s,end:c}),u={},d=l.length/7,f=`${na.daysContainer} ${d===5?na.rows5:na.rows6}`;return n.forEach(h=>{const m=v.format(h.fechaInicio,"yyyy-MM-dd");u[m]||(u[m]=[]),u[m].push(h)}),_.jsxs("div",{className:na.calendarGridContainer,children:[_.jsx(Wv,{}),_.jsx("div",{className:f,children:l.map(h=>{const m=n.filter(p=>Qv(h,{start:v.startOfDay(p.fechaInicio),end:v.endOfDay(p.fechaFin)}));return _.jsx(Hv,{dayNumber:h.getDate(),date:h,events:m,isToday:v.isToday(h),isCurrentMonth:v.isSameMonth(h,e),onDayClick:r,onEventClick:t,onSeeMoreClick:o},h.toISOString())})})]})};function Ql(e,n){return function(){return e.apply(n,arguments)}}const{toString:Xv}=Object.prototype,{getPrototypeOf:Ai}=Object,{iterator:oa,toStringTag:Jl}=Symbol,aa=(e=>n=>{const r=Xv.call(n);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),zt=e=>(e=e.toLowerCase(),n=>aa(n)===e),ia=e=>n=>typeof n===e,{isArray:an}=Array,Bn=ia("undefined");function Fn(e){return e!==null&&!Bn(e)&&e.constructor!==null&&!Bn(e.constructor)&&vt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xl=zt("ArrayBuffer");function ey(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Xl(e.buffer),n}const ty=ia("string"),vt=ia("function"),eu=ia("number"),Vn=e=>e!==null&&typeof e=="object",ry=e=>e===!0||e===!1,sa=e=>{if(aa(e)!=="object")return!1;const n=Ai(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Jl in e)&&!(oa in e)},ny=e=>{if(!Vn(e)||Fn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},oy=zt("Date"),ay=zt("File"),iy=zt("Blob"),sy=zt("FileList"),cy=e=>Vn(e)&&vt(e.pipe),ly=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||vt(e.append)&&((n=aa(e))==="formdata"||n==="object"&&vt(e.toString)&&e.toString()==="[object FormData]"))},uy=zt("URLSearchParams"),[dy,fy,py,hy]=["ReadableStream","Request","Response","Headers"].map(zt),my=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yn(e,n,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let t,o;if(typeof e!="object"&&(e=[e]),an(e))for(t=0,o=e.length;t<o;t++)n.call(null,e[t],t,e);else{if(Fn(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(t=0;t<i;t++)s=a[t],n.call(null,e[s],s,e)}}function tu(e,n){if(Fn(e))return null;n=n.toLowerCase();const r=Object.keys(e);let t=r.length,o;for(;t-- >0;)if(o=r[t],n===o.toLowerCase())return o;return null}const Ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ru=e=>!Bn(e)&&e!==Ar;function Pi(){const{caseless:e}=ru(this)&&this||{},n={},r=(t,o)=>{const a=e&&tu(n,o)||o;sa(n[a])&&sa(t)?n[a]=Pi(n[a],t):sa(t)?n[a]=Pi({},t):an(t)?n[a]=t.slice():n[a]=t};for(let t=0,o=arguments.length;t<o;t++)arguments[t]&&Yn(arguments[t],r);return n}const gy=(e,n,r,{allOwnKeys:t}={})=>(Yn(n,(o,a)=>{r&&vt(o)?e[a]=Ql(o,r):e[a]=o},{allOwnKeys:t}),e),vy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yy=(e,n,r,t)=>{e.prototype=Object.create(n.prototype,t),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),r&&Object.assign(e.prototype,r)},by=(e,n,r,t)=>{let o,a,i;const s={};if(n=n||{},e==null)return n;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!t||t(i,e,n))&&!s[i]&&(n[i]=e[i],s[i]=!0);e=r!==!1&&Ai(e)}while(e&&(!r||r(e,n))&&e!==Object.prototype);return n},_y=(e,n,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=n.length;const t=e.indexOf(n,r);return t!==-1&&t===r},wy=e=>{if(!e)return null;if(an(e))return e;let n=e.length;if(!eu(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=e[n];return r},Sy=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Ai(Uint8Array)),xy=(e,n)=>{const t=(e&&e[oa]).call(e);let o;for(;(o=t.next())&&!o.done;){const a=o.value;n.call(e,a[0],a[1])}},ky=(e,n)=>{let r;const t=[];for(;(r=e.exec(n))!==null;)t.push(r);return t},Cy=zt("HTMLFormElement"),Dy=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,t,o){return t.toUpperCase()+o}),nu=(({hasOwnProperty:e})=>(n,r)=>e.call(n,r))(Object.prototype),Ey=zt("RegExp"),ou=(e,n)=>{const r=Object.getOwnPropertyDescriptors(e),t={};Yn(r,(o,a)=>{let i;(i=n(o,a,e))!==!1&&(t[a]=i||o)}),Object.defineProperties(e,t)},Ty=e=>{ou(e,(n,r)=>{if(vt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const t=e[r];if(vt(t)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Oy=(e,n)=>{const r={},t=o=>{o.forEach(a=>{r[a]=!0})};return an(e)?t(e):t(String(e).split(n)),r},My=()=>{},Ay=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function Py(e){return!!(e&&vt(e.append)&&e[Jl]==="FormData"&&e[oa])}const Iy=e=>{const n=new Array(10),r=(t,o)=>{if(Vn(t)){if(n.indexOf(t)>=0)return;if(Fn(t))return t;if(!("toJSON"in t)){n[o]=t;const a=an(t)?[]:{};return Yn(t,(i,s)=>{const c=r(i,o+1);!Bn(c)&&(a[s]=c)}),n[o]=void 0,a}}return t};return r(e,0)},Ry=zt("AsyncFunction"),Ny=e=>e&&(Vn(e)||vt(e))&&vt(e.then)&&vt(e.catch),au=((e,n)=>e?setImmediate:n?((r,t)=>(Ar.addEventListener("message",({source:o,data:a})=>{o===Ar&&a===r&&t.length&&t.shift()()},!1),o=>{t.push(o),Ar.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",vt(Ar.postMessage)),$y=typeof queueMicrotask<"u"?queueMicrotask.bind(Ar):typeof process<"u"&&process.nextTick||au,M={isArray:an,isArrayBuffer:Xl,isBuffer:Fn,isFormData:ly,isArrayBufferView:ey,isString:ty,isNumber:eu,isBoolean:ry,isObject:Vn,isPlainObject:sa,isEmptyObject:ny,isReadableStream:dy,isRequest:fy,isResponse:py,isHeaders:hy,isUndefined:Bn,isDate:oy,isFile:ay,isBlob:iy,isRegExp:Ey,isFunction:vt,isStream:cy,isURLSearchParams:uy,isTypedArray:Sy,isFileList:sy,forEach:Yn,merge:Pi,extend:gy,trim:my,stripBOM:vy,inherits:yy,toFlatObject:by,kindOf:aa,kindOfTest:zt,endsWith:_y,toArray:wy,forEachEntry:xy,matchAll:ky,isHTMLForm:Cy,hasOwnProperty:nu,hasOwnProp:nu,reduceDescriptors:ou,freezeMethods:Ty,toObjectSet:Oy,toCamelCase:Dy,noop:My,toFiniteNumber:Ay,findKey:tu,global:Ar,isContextDefined:ru,isSpecCompliantForm:Py,toJSONObject:Iy,isAsyncFn:Ry,isThenable:Ny,setImmediate:au,asap:$y,isIterable:e=>e!=null&&vt(e[oa])};function ve(e,n,r,t,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),r&&(this.config=r),t&&(this.request=t),o&&(this.response=o,this.status=o.status?o.status:null)}M.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.status}}});const iu=ve.prototype,su={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{su[e]={value:e}}),Object.defineProperties(ve,su),Object.defineProperty(iu,"isAxiosError",{value:!0}),ve.from=(e,n,r,t,o,a)=>{const i=Object.create(iu);return M.toFlatObject(e,i,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ve.call(i,e.message,n,r,t,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Ly=null;function Ii(e){return M.isPlainObject(e)||M.isArray(e)}function cu(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function lu(e,n,r){return e?e.concat(n).map(function(o,a){return o=cu(o),!r&&a?"["+o+"]":o}).join(r?".":""):n}function jy(e){return M.isArray(e)&&!e.some(Ii)}const zy=M.toFlatObject(M,{},null,function(n){return/^is[A-Z]/.test(n)});function ca(e,n,r){if(!M.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,y){return!M.isUndefined(y[p])});const t=r.metaTokens,o=r.visitor||u,a=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(n);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(M.isDate(m))return m.toISOString();if(M.isBoolean(m))return m.toString();if(!c&&M.isBlob(m))throw new ve("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(m)||M.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,p,y){let k=m;if(m&&!y&&typeof m=="object"){if(M.endsWith(p,"{}"))p=t?p:p.slice(0,-2),m=JSON.stringify(m);else if(M.isArray(m)&&jy(m)||(M.isFileList(m)||M.endsWith(p,"[]"))&&(k=M.toArray(m)))return p=cu(p),k.forEach(function(E,D){!(M.isUndefined(E)||E===null)&&n.append(i===!0?lu([p],D,a):i===null?p:p+"[]",l(E))}),!1}return Ii(m)?!0:(n.append(lu(y,p,a),l(m)),!1)}const d=[],f=Object.assign(zy,{defaultVisitor:u,convertValue:l,isVisitable:Ii});function h(m,p){if(!M.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),M.forEach(m,function(k,x){(!(M.isUndefined(k)||k===null)&&o.call(n,k,M.isString(x)?x.trim():x,p,f))===!0&&h(k,p?p.concat(x):[x])}),d.pop()}}if(!M.isObject(e))throw new TypeError("data must be an object");return h(e),n}function uu(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(t){return n[t]})}function Ri(e,n){this._pairs=[],e&&ca(e,this,n)}const du=Ri.prototype;du.append=function(n,r){this._pairs.push([n,r])},du.toString=function(n){const r=n?function(t){return n.call(this,t,uu)}:uu;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function By(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fu(e,n,r){if(!n)return e;const t=r&&r.encode||By;M.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let a;if(o?a=o(n,r):a=M.isURLSearchParams(n)?n.toString():new Ri(n,r).toString(t),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class pu{constructor(){this.handlers=[]}use(n,r,t){return this.handlers.push({fulfilled:n,rejected:r,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){M.forEach(this.handlers,function(t){t!==null&&n(t)})}}const hu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fy={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ri,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ni=typeof window<"u"&&typeof document<"u",$i=typeof navigator=="object"&&navigator||void 0,Vy=Ni&&(!$i||["ReactNative","NativeScript","NS"].indexOf($i.product)<0),Yy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Uy=Ni&&window.location.href||"http://localhost",ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ni,hasStandardBrowserEnv:Vy,hasStandardBrowserWebWorkerEnv:Yy,navigator:$i,origin:Uy},Symbol.toStringTag,{value:"Module"})),...Fy};function Hy(e,n){return ca(e,new ut.classes.URLSearchParams,{visitor:function(r,t,o,a){return ut.isNode&&M.isBuffer(r)?(this.append(t,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...n})}function Wy(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Zy(e){const n={},r=Object.keys(e);let t;const o=r.length;let a;for(t=0;t<o;t++)a=r[t],n[a]=e[a];return n}function mu(e){function n(r,t,o,a){let i=r[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),c=a>=r.length;return i=!i&&M.isArray(o)?o.length:i,c?(M.hasOwnProp(o,i)?o[i]=[o[i],t]:o[i]=t,!s):((!o[i]||!M.isObject(o[i]))&&(o[i]=[]),n(r,t,o[i],a)&&M.isArray(o[i])&&(o[i]=Zy(o[i])),!s)}if(M.isFormData(e)&&M.isFunction(e.entries)){const r={};return M.forEachEntry(e,(t,o)=>{n(Wy(t),o,r,0)}),r}return null}function Ky(e,n,r){if(M.isString(e))try{return(n||JSON.parse)(e),M.trim(e)}catch(t){if(t.name!=="SyntaxError")throw t}return(r||JSON.stringify)(e)}const Un={transitional:hu,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const t=r.getContentType()||"",o=t.indexOf("application/json")>-1,a=M.isObject(n);if(a&&M.isHTMLForm(n)&&(n=new FormData(n)),M.isFormData(n))return o?JSON.stringify(mu(n)):n;if(M.isArrayBuffer(n)||M.isBuffer(n)||M.isStream(n)||M.isFile(n)||M.isBlob(n)||M.isReadableStream(n))return n;if(M.isArrayBufferView(n))return n.buffer;if(M.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(a){if(t.indexOf("application/x-www-form-urlencoded")>-1)return Hy(n,this.formSerializer).toString();if((s=M.isFileList(n))||t.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ca(s?{"files[]":n}:n,c&&new c,this.formSerializer)}}return a||o?(r.setContentType("application/json",!1),Ky(n)):n}],transformResponse:[function(n){const r=this.transitional||Un.transitional,t=r&&r.forcedJSONParsing,o=this.responseType==="json";if(M.isResponse(n)||M.isReadableStream(n))return n;if(n&&M.isString(n)&&(t&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(n)}catch(s){if(i)throw s.name==="SyntaxError"?ve.from(s,ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ut.classes.FormData,Blob:ut.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],e=>{Un.headers[e]={}});const qy=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gy=e=>{const n={};let r,t,o;return e&&e.split(`
|
|
152
|
+
*/const gv=jn("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),jl=Symbol.for("constructDateFrom");function Oi(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&jl in e?e[jl](n):e instanceof Date?new e.constructor(n):new Date(n)}function yr(e,n){return Oi(n||e,e)}function zl(e,n,r){const[t,o]=[+yr(e.start,r?.in),+yr(e.end,r?.in)].sort((s,c)=>s-c),[a,i]=[+yr(n.start,r?.in),+yr(n.end,r?.in)].sort((s,c)=>s-c);return t<i&&a<o}function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ta(e)}var vv=/^\s+/,yv=/\s+$/;function ae(e,n){if(e=e||"",n=n||{},e instanceof ae)return e;if(!(this instanceof ae))return new ae(e,n);var r=bv(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,t,o,a,i,s;return r=n.r/255,t=n.g/255,o=n.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*i+.0722*s},setAlpha:function(n){return this._a=Hl(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=Fl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=Fl(this._r,this._g,this._b),r=Math.round(n.h*360),t=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+t+"%, "+o+"%)":"hsva("+r+", "+t+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=Bl(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=Bl(this._r,this._g,this._b),r=Math.round(n.h*360),t=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+t+"%, "+o+"%)":"hsla("+r+", "+t+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return Vl(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return xv(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Fe(this._r,255)*100)+"%",g:Math.round(Fe(this._g,255)*100)+"%",b:Math.round(Fe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Fe(this._r,255)*100)+"%, "+Math.round(Fe(this._g,255)*100)+"%, "+Math.round(Fe(this._b,255)*100)+"%)":"rgba("+Math.round(Fe(this._r,255)*100)+"%, "+Math.round(Fe(this._g,255)*100)+"%, "+Math.round(Fe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Nv[Vl(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+Yl(this._r,this._g,this._b,this._a),t=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=ae(n);t="#"+Yl(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+t+")"},toString:function(n){var r=!!n;n=n||this._format;var t=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(t=this.toRgbString()),n==="prgb"&&(t=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(t=this.toHexString()),n==="hex3"&&(t=this.toHexString(!0)),n==="hex4"&&(t=this.toHex8String(!0)),n==="hex8"&&(t=this.toHex8String()),n==="name"&&(t=this.toName()),n==="hsl"&&(t=this.toHslString()),n==="hsv"&&(t=this.toHsvString()),t||this.toHexString())},clone:function(){return ae(this.toString())},_applyModification:function(n,r){var t=n.apply(null,[this].concat([].slice.call(r)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(Ev,arguments)},brighten:function(){return this._applyModification(Tv,arguments)},darken:function(){return this._applyModification(Ov,arguments)},desaturate:function(){return this._applyModification(kv,arguments)},saturate:function(){return this._applyModification(Cv,arguments)},greyscale:function(){return this._applyModification(Dv,arguments)},spin:function(){return this._applyModification(Mv,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Iv,arguments)},complement:function(){return this._applyCombination(Av,arguments)},monochromatic:function(){return this._applyCombination(Rv,arguments)},splitcomplement:function(){return this._applyCombination(Pv,arguments)},triad:function(){return this._applyCombination(Ul,[3])},tetrad:function(){return this._applyCombination(Ul,[4])}},ae.fromRatio=function(e,n){if(ta(e)=="object"){var r={};for(var t in e)e.hasOwnProperty(t)&&(t==="a"?r[t]=e[t]:r[t]=zn(e[t]));e=r}return ae(e,n)};function bv(e){var n={r:0,g:0,b:0},r=1,t=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=zv(e)),ta(e)=="object"&&(cr(e.r)&&cr(e.g)&&cr(e.b)?(n=_v(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):cr(e.h)&&cr(e.s)&&cr(e.v)?(t=zn(e.s),o=zn(e.v),n=Sv(e.h,t,o),i=!0,s="hsv"):cr(e.h)&&cr(e.s)&&cr(e.l)&&(t=zn(e.s),a=zn(e.l),n=wv(e.h,t,a),i=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Hl(r),{ok:i,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function _v(e,n,r){return{r:Fe(e,255)*255,g:Fe(n,255)*255,b:Fe(r,255)*255}}function Bl(e,n,r){e=Fe(e,255),n=Fe(n,255),r=Fe(r,255);var t=Math.max(e,n,r),o=Math.min(e,n,r),a,i,s=(t+o)/2;if(t==o)a=i=0;else{var c=t-o;switch(i=s>.5?c/(2-t-o):c/(t+o),t){case e:a=(n-r)/c+(n<r?6:0);break;case n:a=(r-e)/c+2;break;case r:a=(e-n)/c+4;break}a/=6}return{h:a,s:i,l:s}}function wv(e,n,r){var t,o,a;e=Fe(e,360),n=Fe(n,100),r=Fe(r,100);function i(l,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(u-l)*6*d:d<1/2?u:d<2/3?l+(u-l)*(2/3-d)*6:l}if(n===0)t=o=a=r;else{var s=r<.5?r*(1+n):r+n-r*n,c=2*r-s;t=i(c,s,e+1/3),o=i(c,s,e),a=i(c,s,e-1/3)}return{r:t*255,g:o*255,b:a*255}}function Fl(e,n,r){e=Fe(e,255),n=Fe(n,255),r=Fe(r,255);var t=Math.max(e,n,r),o=Math.min(e,n,r),a,i,s=t,c=t-o;if(i=t===0?0:c/t,t==o)a=0;else{switch(t){case e:a=(n-r)/c+(n<r?6:0);break;case n:a=(r-e)/c+2;break;case r:a=(e-n)/c+4;break}a/=6}return{h:a,s:i,v:s}}function Sv(e,n,r){e=Fe(e,360)*6,n=Fe(n,100),r=Fe(r,100);var t=Math.floor(e),o=e-t,a=r*(1-n),i=r*(1-o*n),s=r*(1-(1-o)*n),c=t%6,l=[r,i,a,a,s,r][c],u=[s,r,r,i,a,a][c],d=[a,a,s,r,r,i][c];return{r:l*255,g:u*255,b:d*255}}function Vl(e,n,r,t){var o=[$t(Math.round(e).toString(16)),$t(Math.round(n).toString(16)),$t(Math.round(r).toString(16))];return t&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function xv(e,n,r,t,o){var a=[$t(Math.round(e).toString(16)),$t(Math.round(n).toString(16)),$t(Math.round(r).toString(16)),$t(Wl(t))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Yl(e,n,r,t){var o=[$t(Wl(t)),$t(Math.round(e).toString(16)),$t(Math.round(n).toString(16)),$t(Math.round(r).toString(16))];return o.join("")}ae.equals=function(e,n){return!e||!n?!1:ae(e).toRgbString()==ae(n).toRgbString()},ae.random=function(){return ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function kv(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s-=n/100,r.s=ra(r.s),ae(r)}function Cv(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s+=n/100,r.s=ra(r.s),ae(r)}function Dv(e){return ae(e).desaturate(100)}function Ev(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l+=n/100,r.l=ra(r.l),ae(r)}function Tv(e,n){n=n===0?0:n||10;var r=ae(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),ae(r)}function Ov(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l-=n/100,r.l=ra(r.l),ae(r)}function Mv(e,n){var r=ae(e).toHsl(),t=(r.h+n)%360;return r.h=t<0?360+t:t,ae(r)}function Av(e){var n=ae(e).toHsl();return n.h=(n.h+180)%360,ae(n)}function Ul(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ae(e).toHsl(),t=[ae(e)],o=360/n,a=1;a<n;a++)t.push(ae({h:(r.h+a*o)%360,s:r.s,l:r.l}));return t}function Pv(e){var n=ae(e).toHsl(),r=n.h;return[ae(e),ae({h:(r+72)%360,s:n.s,l:n.l}),ae({h:(r+216)%360,s:n.s,l:n.l})]}function Iv(e,n,r){n=n||6,r=r||30;var t=ae(e).toHsl(),o=360/r,a=[ae(e)];for(t.h=(t.h-(o*n>>1)+720)%360;--n;)t.h=(t.h+o)%360,a.push(ae(t));return a}function Rv(e,n){n=n||6;for(var r=ae(e).toHsv(),t=r.h,o=r.s,a=r.v,i=[],s=1/n;n--;)i.push(ae({h:t,s:o,v:a})),a=(a+s)%1;return i}ae.mix=function(e,n,r){r=r===0?0:r||50;var t=ae(e).toRgb(),o=ae(n).toRgb(),a=r/100,i={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b,a:(o.a-t.a)*a+t.a};return ae(i)},ae.readability=function(e,n){var r=ae(e),t=ae(n);return(Math.max(r.getLuminance(),t.getLuminance())+.05)/(Math.min(r.getLuminance(),t.getLuminance())+.05)},ae.isReadable=function(e,n,r){var t=ae.readability(e,n),o,a;switch(a=!1,o=Bv(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=t>=4.5;break;case"AAlarge":a=t>=3;break;case"AAAsmall":a=t>=7;break}return a},ae.mostReadable=function(e,n,r){var t=null,o=0,a,i,s,c;r=r||{},i=r.includeFallbackColors,s=r.level,c=r.size;for(var l=0;l<n.length;l++)a=ae.readability(e,n[l]),a>o&&(o=a,t=ae(n[l]));return ae.isReadable(e,t,{level:s,size:c})||!i?t:(r.includeFallbackColors=!1,ae.mostReadable(e,["#fff","#000"],r))};var Mi=ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Nv=ae.hexNames=$v(Mi);function $v(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function Hl(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fe(e,n){Lv(e)&&(e="100%");var r=jv(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function ra(e){return Math.min(1,Math.max(0,e))}function Dt(e){return parseInt(e,16)}function Lv(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function jv(e){return typeof e=="string"&&e.indexOf("%")!=-1}function $t(e){return e.length==1?"0"+e:""+e}function zn(e){return e<=1&&(e=e*100+"%"),e}function Wl(e){return Math.round(parseFloat(e)*255).toString(16)}function Zl(e){return Dt(e)/255}var Lt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",t="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function cr(e){return!!Lt.CSS_UNIT.exec(e)}function zv(e){e=e.replace(vv,"").replace(yv,"").toLowerCase();var n=!1;if(Mi[e])e=Mi[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Lt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Lt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Lt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Lt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Lt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Lt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Lt.hex8.exec(e))?{r:Dt(r[1]),g:Dt(r[2]),b:Dt(r[3]),a:Zl(r[4]),format:n?"name":"hex8"}:(r=Lt.hex6.exec(e))?{r:Dt(r[1]),g:Dt(r[2]),b:Dt(r[3]),format:n?"name":"hex"}:(r=Lt.hex4.exec(e))?{r:Dt(r[1]+""+r[1]),g:Dt(r[2]+""+r[2]),b:Dt(r[3]+""+r[3]),a:Zl(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=Lt.hex3.exec(e))?{r:Dt(r[1]+""+r[1]),g:Dt(r[2]+""+r[2]),b:Dt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Bv(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}const Kl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23C4D9F5'%20d='M36.667%2020c0%209.205-7.462%2016.667-16.667%2016.667S3.333%2029.205%203.333%2020%2010.795%203.333%2020%203.333%2036.667%2010.795%2036.667%2020'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M20%2012.083c.69%200%201.25.56%201.25%201.25v6.15l3.8%203.8a1.25%201.25%200%201%201-1.767%201.767l-4.167-4.166A1.25%201.25%200%200%201%2018.75%2020v-6.667c0-.69.56-1.25%201.25-1.25'%20clip-rule='evenodd'/%3e%3c/svg%3e",Fv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='23'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M17.614%202.64h-.5v-.622c0-.566-.443-1.018-.998-1.018s-.998.452-.998%201.018v.622H7.893v-.622C7.894%201.452%207.45%201%206.895%201s-.999.452-.999%201.018v.622h-.5C2.946%202.64.959%204.665.959%207.165v11.31c0%202.5%201.987%204.525%204.439%204.525h12.206c2.452%200%204.439-2.025%204.439-4.524V7.165c0-2.5-1.987-4.525-4.439-4.525zm0%2018.098H5.408c-1.22%200-2.22-1.018-2.22-2.262V10.41h16.646v8.065c0%201.244-1%202.262-2.22%202.262'/%3e%3c/svg%3e",Vv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M12.667%204.667a3%203%200%200%201%203%203v8.667a3%203%200%200%201-3%203H4a3%203%200%200%201-3-3V7.667a3%203%200%200%201%203-3zM21.36%206.237a1%201%200%200%201%201.64.77V17a1%201%200%200%201-1.64.768L17%2014.135V9.867z'/%3e%3c/svg%3e",Yv=({onEventClick:e,upcomingEvents:n,onSyncGoogle:r,onSyncOutlook:t,leads30Days:o,leads90Days:a})=>{const i=d=>{const f=new Date,h={start:v.startOfDay(f),end:v.endOfDay(f)},m={start:d.fechaInicio,end:d.fechaFin};return zl(h,m)?"Hoy":v.isTomorrow(d.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(d.fechaInicio)},s={};n.forEach(d=>{const f=i(d);s[f]||(s[f]=[]),s[f].push(d)});const[c,l]=b.useState(!1),u=()=>{l(!c)};return _.jsxs("div",{className:ye.sidebarContainer,children:[_.jsxs("div",{className:ye.leadsSection,children:[_.jsxs("div",{className:ye.leadCard,children:[_.jsx("div",{className:ye.leadIcon,children:_.jsx("img",{src:Kl})}),_.jsxs("div",{className:ye.leadText,children:[_.jsx("div",{className:ye.leadDays,children:"+30 días sin atender"}),_.jsxs("div",{className:ye.leadCount,children:[o," ",_.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),_.jsxs("div",{className:ye.leadCard,children:[_.jsx("div",{className:ye.leadIcon,children:_.jsx("img",{src:Kl})}),_.jsxs("div",{className:ye.leadText,children:[_.jsx("div",{className:ye.leadDays,children:"+90 días sin atender"}),_.jsxs("div",{className:ye.leadCount,children:[a," ",_.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),_.jsxs("div",{className:ye.eventsSection,children:[_.jsx("h3",{className:ye.sidebarTitle,children:"Próximos eventos"}),_.jsx("div",{className:ye.eventsContainer,children:Object.entries(s).map(([d,f])=>_.jsxs("div",{className:`${ye.eventGroup}`,children:[_.jsxs("div",{className:ye.eventGroupDate,children:[_.jsx("img",{src:Fv,width:15})," ",d]}),f.map(h=>{const m=ae(h.color||"#ffcc00"),p=m.toString(),y=m.clone().darken(15).toString();return _.jsxs("div",{className:ye.eventItem,style:{backgroundColor:p,borderLeftColor:y},onClick:()=>e(h),children:[_.jsxs("div",{className:ye.eventDetails,children:[_.jsx("div",{className:ye.eventTitle,children:h.titulo.length>32?`${h.titulo.substring(0,32)}...`:h.titulo}),_.jsx("div",{className:ye.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(h.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(h.fechaFin)}`})]}),h.link&&_.jsx("a",{onClick:k=>{k.stopPropagation()},href:h?.link,target:"_blank",style:{textDecoration:"none"},children:_.jsx("img",{src:Vv,width:15,style:{marginLeft:"3px"}})})]},h.eventoID)})]},d))})]}),_.jsxs("div",{className:ye.calendarsSection,hidden:!0,children:[_.jsxs("button",{onClick:u,className:ye.collapsibleHeader,children:[_.jsxs("div",{className:ye.headerTitle,children:[_.jsx("h3",{children:"Calendarios"}),_.jsx("span",{className:ye.calendarCount,children:"1"})]}),_.jsx(pv,{className:`${ye.chevronIcon} ${c?ye.collapsed:""}`})]}),_.jsxs("div",{className:`${ye.collapsibleContent} ${c?ye.hidden:""}`,children:[_.jsxs("div",{className:ye.calendarItem,children:[_.jsx("div",{className:ye.circularCheckbox,children:_.jsx(hv,{size:24,className:ye.checkedIcon})}),_.jsx(Ll,{size:24,className:ye.calendarIcon}),_.jsx("span",{children:"Mi calendario"})]}),_.jsxs("div",{className:ye.calendarItem,onClick:t,children:[_.jsx("div",{className:ye.circularCheckbox,children:_.jsx(mv,{size:24,className:ye.uncheckedIcon})}),_.jsx(gv,{size:24,className:ye.calendarIcon}),_.jsx("span",{children:"Outlook"})]}),_.jsxs("div",{className:ye.syncButton,onClick:r,children:[_.jsx(Ll,{size:24,className:ye.googleIcon}),_.jsx("span",{children:"Sincronizar Google Calendar"})]})]})]})]})},jt={dayCell:"_dayCell_ph891_1",dayCellContainer:"_dayCellContainer_ph891_23",dayNumber:"_dayNumber_ph891_55",dayNumberToday:"_dayNumberToday_ph891_69",notCurrentMonth:"_notCurrentMonth_ph891_91",CurrentDay:"_CurrentDay_ph891_129",eventsList:"_eventsList_ph891_137",eventItem:"_eventItem_ph891_155",eventTitle:"_eventTitle_ph891_187",eventTime:"_eventTime_ph891_217",seeMoreLink:"_seeMoreLink_ph891_245"},ql=22,Uv=20,Hv=({dayNumber:e,date:n,events:r,isToday:t,isCurrentMonth:o,onDayClick:a,onEventClick:i,onSeeMoreClick:s})=>{const c=[jt.dayCell,o?"":jt.notCurrentMonth,jt.CurrentDay].join(" ").trim(),l=b.useRef(null),[u,d]=b.useState(r.length),f=()=>{a?.(n)};b.useLayoutEffect(()=>{const p=()=>{if(l.current){const y=l.current.clientHeight;let k=Math.floor(y/ql);if(k<r.length){const x=Math.floor((y-Uv)/ql);k=Math.max(0,x)}d(k)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const h=r.slice(0,u==0?1:u),m=r.length-(u==0?1:u);return _.jsxs("div",{className:`${c} ${jt.dayCellContainer}`,onClick:f,children:[_.jsx("div",{className:t?jt.dayNumber:jt.dayNumberToday,children:e}),_.jsxs("div",{className:jt.eventsList,ref:l,children:[h.map(p=>_.jsxs("div",{className:jt.eventItem,style:{backgroundColor:p.color||"#007bff"},onClick:y=>{y.stopPropagation(),i?.(p)},children:[_.jsx("span",{className:jt.eventTitle,children:p.titulo}),_.jsx("span",{className:jt.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(p.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"numeric"}).format(p.fechaFin)}`})]},p.eventoID)),m>0&&_.jsxs("div",{className:jt.seeMoreLink,onClick:p=>{p.stopPropagation(),s(r,n)},children:[m," más..."]})]})]})},Gl={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},Wv=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return _.jsx("div",{className:Gl.weekDaysContainer,children:e.map(n=>_.jsx("div",{className:Gl.weekDay,children:n},n))})},na={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function Zv(e,...n){const r=Oi.bind(null,n.find(t=>typeof t=="object"));return n.map(r)}function Kv(e,n){const[r,t]=Zv(e,n.start,n.end);return{start:r,end:t}}function qv(e,n){const{start:r,end:t}=Kv(n?.in,e);let o=+r>+t;const a=o?+r:+t,i=o?t:r;i.setHours(0,0,0,0);let s=1;const c=[];for(;+i<=a;)c.push(Oi(r,i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return o?c.reverse():c}function Gv(e,n){const r=n?.weekStartsOn,t=yr(e,n?.in),o=t.getDay(),a=(o<r?-7:0)+6-(o-r);return t.setDate(t.getDate()+a),t.setHours(23,59,59,999),t}function Qv(e,n,r){const t=+yr(e,r?.in),[o,a]=[+yr(n.start,r?.in),+yr(n.end,r?.in)].sort((i,s)=>i-s);return t>=o&&t<=a}const Jv=({currentDate:e,events:n,onDayClick:r,onEventClick:t,onSeeMoreClick:o})=>{const a=v.startOfMonth(e),i=v.endOfMonth(e),s=v.startOfWeek(a,{weekStartsOn:1}),c=Gv(i,{weekStartsOn:1}),l=qv({start:s,end:c}),u={},d=l.length/7,f=`${na.daysContainer} ${d===5?na.rows5:na.rows6}`;return n.forEach(h=>{const m=v.format(h.fechaInicio,"yyyy-MM-dd");u[m]||(u[m]=[]),u[m].push(h)}),_.jsxs("div",{className:na.calendarGridContainer,children:[_.jsx(Wv,{}),_.jsx("div",{className:f,children:l.map(h=>{const m=n.filter(p=>Qv(h,{start:v.startOfDay(p.fechaInicio),end:v.endOfDay(p.fechaFin)}));return _.jsx(Hv,{dayNumber:h.getDate(),date:h,events:m,isToday:v.isToday(h),isCurrentMonth:v.isSameMonth(h,e),onDayClick:r,onEventClick:t,onSeeMoreClick:o},h.toISOString())})})]})};function Ql(e,n){return function(){return e.apply(n,arguments)}}const{toString:Xv}=Object.prototype,{getPrototypeOf:Ai}=Object,{iterator:oa,toStringTag:Jl}=Symbol,aa=(e=>n=>{const r=Xv.call(n);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),zt=e=>(e=e.toLowerCase(),n=>aa(n)===e),ia=e=>n=>typeof n===e,{isArray:an}=Array,Bn=ia("undefined");function Fn(e){return e!==null&&!Bn(e)&&e.constructor!==null&&!Bn(e.constructor)&&vt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xl=zt("ArrayBuffer");function ey(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Xl(e.buffer),n}const ty=ia("string"),vt=ia("function"),eu=ia("number"),Vn=e=>e!==null&&typeof e=="object",ry=e=>e===!0||e===!1,sa=e=>{if(aa(e)!=="object")return!1;const n=Ai(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Jl in e)&&!(oa in e)},ny=e=>{if(!Vn(e)||Fn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},oy=zt("Date"),ay=zt("File"),iy=zt("Blob"),sy=zt("FileList"),cy=e=>Vn(e)&&vt(e.pipe),ly=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||vt(e.append)&&((n=aa(e))==="formdata"||n==="object"&&vt(e.toString)&&e.toString()==="[object FormData]"))},uy=zt("URLSearchParams"),[dy,fy,py,hy]=["ReadableStream","Request","Response","Headers"].map(zt),my=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yn(e,n,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let t,o;if(typeof e!="object"&&(e=[e]),an(e))for(t=0,o=e.length;t<o;t++)n.call(null,e[t],t,e);else{if(Fn(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(t=0;t<i;t++)s=a[t],n.call(null,e[s],s,e)}}function tu(e,n){if(Fn(e))return null;n=n.toLowerCase();const r=Object.keys(e);let t=r.length,o;for(;t-- >0;)if(o=r[t],n===o.toLowerCase())return o;return null}const Ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ru=e=>!Bn(e)&&e!==Ar;function Pi(){const{caseless:e}=ru(this)&&this||{},n={},r=(t,o)=>{const a=e&&tu(n,o)||o;sa(n[a])&&sa(t)?n[a]=Pi(n[a],t):sa(t)?n[a]=Pi({},t):an(t)?n[a]=t.slice():n[a]=t};for(let t=0,o=arguments.length;t<o;t++)arguments[t]&&Yn(arguments[t],r);return n}const gy=(e,n,r,{allOwnKeys:t}={})=>(Yn(n,(o,a)=>{r&&vt(o)?e[a]=Ql(o,r):e[a]=o},{allOwnKeys:t}),e),vy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yy=(e,n,r,t)=>{e.prototype=Object.create(n.prototype,t),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),r&&Object.assign(e.prototype,r)},by=(e,n,r,t)=>{let o,a,i;const s={};if(n=n||{},e==null)return n;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!t||t(i,e,n))&&!s[i]&&(n[i]=e[i],s[i]=!0);e=r!==!1&&Ai(e)}while(e&&(!r||r(e,n))&&e!==Object.prototype);return n},_y=(e,n,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=n.length;const t=e.indexOf(n,r);return t!==-1&&t===r},wy=e=>{if(!e)return null;if(an(e))return e;let n=e.length;if(!eu(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=e[n];return r},Sy=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Ai(Uint8Array)),xy=(e,n)=>{const t=(e&&e[oa]).call(e);let o;for(;(o=t.next())&&!o.done;){const a=o.value;n.call(e,a[0],a[1])}},ky=(e,n)=>{let r;const t=[];for(;(r=e.exec(n))!==null;)t.push(r);return t},Cy=zt("HTMLFormElement"),Dy=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,t,o){return t.toUpperCase()+o}),nu=(({hasOwnProperty:e})=>(n,r)=>e.call(n,r))(Object.prototype),Ey=zt("RegExp"),ou=(e,n)=>{const r=Object.getOwnPropertyDescriptors(e),t={};Yn(r,(o,a)=>{let i;(i=n(o,a,e))!==!1&&(t[a]=i||o)}),Object.defineProperties(e,t)},Ty=e=>{ou(e,(n,r)=>{if(vt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const t=e[r];if(vt(t)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Oy=(e,n)=>{const r={},t=o=>{o.forEach(a=>{r[a]=!0})};return an(e)?t(e):t(String(e).split(n)),r},My=()=>{},Ay=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function Py(e){return!!(e&&vt(e.append)&&e[Jl]==="FormData"&&e[oa])}const Iy=e=>{const n=new Array(10),r=(t,o)=>{if(Vn(t)){if(n.indexOf(t)>=0)return;if(Fn(t))return t;if(!("toJSON"in t)){n[o]=t;const a=an(t)?[]:{};return Yn(t,(i,s)=>{const c=r(i,o+1);!Bn(c)&&(a[s]=c)}),n[o]=void 0,a}}return t};return r(e,0)},Ry=zt("AsyncFunction"),Ny=e=>e&&(Vn(e)||vt(e))&&vt(e.then)&&vt(e.catch),au=((e,n)=>e?setImmediate:n?((r,t)=>(Ar.addEventListener("message",({source:o,data:a})=>{o===Ar&&a===r&&t.length&&t.shift()()},!1),o=>{t.push(o),Ar.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",vt(Ar.postMessage)),$y=typeof queueMicrotask<"u"?queueMicrotask.bind(Ar):typeof process<"u"&&process.nextTick||au,M={isArray:an,isArrayBuffer:Xl,isBuffer:Fn,isFormData:ly,isArrayBufferView:ey,isString:ty,isNumber:eu,isBoolean:ry,isObject:Vn,isPlainObject:sa,isEmptyObject:ny,isReadableStream:dy,isRequest:fy,isResponse:py,isHeaders:hy,isUndefined:Bn,isDate:oy,isFile:ay,isBlob:iy,isRegExp:Ey,isFunction:vt,isStream:cy,isURLSearchParams:uy,isTypedArray:Sy,isFileList:sy,forEach:Yn,merge:Pi,extend:gy,trim:my,stripBOM:vy,inherits:yy,toFlatObject:by,kindOf:aa,kindOfTest:zt,endsWith:_y,toArray:wy,forEachEntry:xy,matchAll:ky,isHTMLForm:Cy,hasOwnProperty:nu,hasOwnProp:nu,reduceDescriptors:ou,freezeMethods:Ty,toObjectSet:Oy,toCamelCase:Dy,noop:My,toFiniteNumber:Ay,findKey:tu,global:Ar,isContextDefined:ru,isSpecCompliantForm:Py,toJSONObject:Iy,isAsyncFn:Ry,isThenable:Ny,setImmediate:au,asap:$y,isIterable:e=>e!=null&&vt(e[oa])};function ve(e,n,r,t,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),r&&(this.config=r),t&&(this.request=t),o&&(this.response=o,this.status=o.status?o.status:null)}M.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.status}}});const iu=ve.prototype,su={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{su[e]={value:e}}),Object.defineProperties(ve,su),Object.defineProperty(iu,"isAxiosError",{value:!0}),ve.from=(e,n,r,t,o,a)=>{const i=Object.create(iu);return M.toFlatObject(e,i,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ve.call(i,e.message,n,r,t,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Ly=null;function Ii(e){return M.isPlainObject(e)||M.isArray(e)}function cu(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function lu(e,n,r){return e?e.concat(n).map(function(o,a){return o=cu(o),!r&&a?"["+o+"]":o}).join(r?".":""):n}function jy(e){return M.isArray(e)&&!e.some(Ii)}const zy=M.toFlatObject(M,{},null,function(n){return/^is[A-Z]/.test(n)});function ca(e,n,r){if(!M.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,y){return!M.isUndefined(y[p])});const t=r.metaTokens,o=r.visitor||u,a=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(n);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(M.isDate(m))return m.toISOString();if(M.isBoolean(m))return m.toString();if(!c&&M.isBlob(m))throw new ve("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(m)||M.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,p,y){let k=m;if(m&&!y&&typeof m=="object"){if(M.endsWith(p,"{}"))p=t?p:p.slice(0,-2),m=JSON.stringify(m);else if(M.isArray(m)&&jy(m)||(M.isFileList(m)||M.endsWith(p,"[]"))&&(k=M.toArray(m)))return p=cu(p),k.forEach(function(E,D){!(M.isUndefined(E)||E===null)&&n.append(i===!0?lu([p],D,a):i===null?p:p+"[]",l(E))}),!1}return Ii(m)?!0:(n.append(lu(y,p,a),l(m)),!1)}const d=[],f=Object.assign(zy,{defaultVisitor:u,convertValue:l,isVisitable:Ii});function h(m,p){if(!M.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),M.forEach(m,function(k,x){(!(M.isUndefined(k)||k===null)&&o.call(n,k,M.isString(x)?x.trim():x,p,f))===!0&&h(k,p?p.concat(x):[x])}),d.pop()}}if(!M.isObject(e))throw new TypeError("data must be an object");return h(e),n}function uu(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(t){return n[t]})}function Ri(e,n){this._pairs=[],e&&ca(e,this,n)}const du=Ri.prototype;du.append=function(n,r){this._pairs.push([n,r])},du.toString=function(n){const r=n?function(t){return n.call(this,t,uu)}:uu;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function By(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fu(e,n,r){if(!n)return e;const t=r&&r.encode||By;M.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let a;if(o?a=o(n,r):a=M.isURLSearchParams(n)?n.toString():new Ri(n,r).toString(t),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class pu{constructor(){this.handlers=[]}use(n,r,t){return this.handlers.push({fulfilled:n,rejected:r,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){M.forEach(this.handlers,function(t){t!==null&&n(t)})}}const hu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fy={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ri,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ni=typeof window<"u"&&typeof document<"u",$i=typeof navigator=="object"&&navigator||void 0,Vy=Ni&&(!$i||["ReactNative","NativeScript","NS"].indexOf($i.product)<0),Yy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Uy=Ni&&window.location.href||"http://localhost",ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ni,hasStandardBrowserEnv:Vy,hasStandardBrowserWebWorkerEnv:Yy,navigator:$i,origin:Uy},Symbol.toStringTag,{value:"Module"})),...Fy};function Hy(e,n){return ca(e,new ut.classes.URLSearchParams,{visitor:function(r,t,o,a){return ut.isNode&&M.isBuffer(r)?(this.append(t,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...n})}function Wy(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Zy(e){const n={},r=Object.keys(e);let t;const o=r.length;let a;for(t=0;t<o;t++)a=r[t],n[a]=e[a];return n}function mu(e){function n(r,t,o,a){let i=r[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),c=a>=r.length;return i=!i&&M.isArray(o)?o.length:i,c?(M.hasOwnProp(o,i)?o[i]=[o[i],t]:o[i]=t,!s):((!o[i]||!M.isObject(o[i]))&&(o[i]=[]),n(r,t,o[i],a)&&M.isArray(o[i])&&(o[i]=Zy(o[i])),!s)}if(M.isFormData(e)&&M.isFunction(e.entries)){const r={};return M.forEachEntry(e,(t,o)=>{n(Wy(t),o,r,0)}),r}return null}function Ky(e,n,r){if(M.isString(e))try{return(n||JSON.parse)(e),M.trim(e)}catch(t){if(t.name!=="SyntaxError")throw t}return(r||JSON.stringify)(e)}const Un={transitional:hu,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const t=r.getContentType()||"",o=t.indexOf("application/json")>-1,a=M.isObject(n);if(a&&M.isHTMLForm(n)&&(n=new FormData(n)),M.isFormData(n))return o?JSON.stringify(mu(n)):n;if(M.isArrayBuffer(n)||M.isBuffer(n)||M.isStream(n)||M.isFile(n)||M.isBlob(n)||M.isReadableStream(n))return n;if(M.isArrayBufferView(n))return n.buffer;if(M.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(a){if(t.indexOf("application/x-www-form-urlencoded")>-1)return Hy(n,this.formSerializer).toString();if((s=M.isFileList(n))||t.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ca(s?{"files[]":n}:n,c&&new c,this.formSerializer)}}return a||o?(r.setContentType("application/json",!1),Ky(n)):n}],transformResponse:[function(n){const r=this.transitional||Un.transitional,t=r&&r.forcedJSONParsing,o=this.responseType==="json";if(M.isResponse(n)||M.isReadableStream(n))return n;if(n&&M.isString(n)&&(t&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(n)}catch(s){if(i)throw s.name==="SyntaxError"?ve.from(s,ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ut.classes.FormData,Blob:ut.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],e=>{Un.headers[e]={}});const qy=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gy=e=>{const n={};let r,t,o;return e&&e.split(`
|
|
153
153
|
`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),t=i.substring(o+1).trim(),!(!r||n[r]&&qy[r])&&(r==="set-cookie"?n[r]?n[r].push(t):n[r]=[t]:n[r]=n[r]?n[r]+", "+t:t)}),n},gu=Symbol("internals");function Hn(e){return e&&String(e).trim().toLowerCase()}function la(e){return e===!1||e==null?e:M.isArray(e)?e.map(la):String(e)}function Qy(e){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let t;for(;t=r.exec(e);)n[t[1]]=t[2];return n}const Jy=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Li(e,n,r,t,o){if(M.isFunction(t))return t.call(this,n,r);if(o&&(n=r),!!M.isString(n)){if(M.isString(t))return n.indexOf(t)!==-1;if(M.isRegExp(t))return t.test(n)}}function Xy(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,t)=>r.toUpperCase()+t)}function eb(e,n){const r=M.toCamelCase(" "+n);["get","set","has"].forEach(t=>{Object.defineProperty(e,t+r,{value:function(o,a,i){return this[t].call(this,n,o,a,i)},configurable:!0})})}let yt=class{constructor(n){n&&this.set(n)}set(n,r,t){const o=this;function a(s,c,l){const u=Hn(c);if(!u)throw new Error("header name must be a non-empty string");const d=M.findKey(o,u);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=la(s))}const i=(s,c)=>M.forEach(s,(l,u)=>a(l,u,c));if(M.isPlainObject(n)||n instanceof this.constructor)i(n,r);else if(M.isString(n)&&(n=n.trim())&&!Jy(n))i(Gy(n),r);else if(M.isObject(n)&&M.isIterable(n)){let s={},c,l;for(const u of n){if(!M.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[l=u[0]]=(c=s[l])?M.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(s,r)}else n!=null&&a(r,n,t);return this}get(n,r){if(n=Hn(n),n){const t=M.findKey(this,n);if(t){const o=this[t];if(!r)return o;if(r===!0)return Qy(o);if(M.isFunction(r))return r.call(this,o,t);if(M.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=Hn(n),n){const t=M.findKey(this,n);return!!(t&&this[t]!==void 0&&(!r||Li(this,this[t],t,r)))}return!1}delete(n,r){const t=this;let o=!1;function a(i){if(i=Hn(i),i){const s=M.findKey(t,i);s&&(!r||Li(t,t[s],s,r))&&(delete t[s],o=!0)}}return M.isArray(n)?n.forEach(a):a(n),o}clear(n){const r=Object.keys(this);let t=r.length,o=!1;for(;t--;){const a=r[t];(!n||Li(this,this[a],a,n,!0))&&(delete this[a],o=!0)}return o}normalize(n){const r=this,t={};return M.forEach(this,(o,a)=>{const i=M.findKey(t,a);if(i){r[i]=la(o),delete r[a];return}const s=n?Xy(a):String(a).trim();s!==a&&delete r[a],r[s]=la(o),t[s]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return M.forEach(this,(t,o)=>{t!=null&&t!==!1&&(r[o]=n&&M.isArray(t)?t.join(", "):t)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
|
|
154
154
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const t=new this(n);return r.forEach(o=>t.set(o)),t}static accessor(n){const t=(this[gu]=this[gu]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=Hn(i);t[s]||(eb(o,i),t[s]=!0)}return M.isArray(n)?n.forEach(a):a(n),this}};yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(yt.prototype,({value:e},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(t){this[r]=t}}}),M.freezeMethods(yt);function ji(e,n){const r=this||Un,t=n||r,o=yt.from(t.headers);let a=t.data;return M.forEach(e,function(s){a=s.call(r,a,o.normalize(),n?n.status:void 0)}),o.normalize(),a}function vu(e){return!!(e&&e.__CANCEL__)}function sn(e,n,r){ve.call(this,e??"canceled",ve.ERR_CANCELED,n,r),this.name="CanceledError"}M.inherits(sn,ve,{__CANCEL__:!0});function yu(e,n,r){const t=r.config.validateStatus;!r.status||!t||t(r.status)?e(r):n(new ve("Request failed with status code "+r.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function tb(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function rb(e,n){e=e||10;const r=new Array(e),t=new Array(e);let o=0,a=0,i;return n=n!==void 0?n:1e3,function(c){const l=Date.now(),u=t[a];i||(i=l),r[o]=c,t[o]=l;let d=a,f=0;for(;d!==o;)f+=r[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i<n)return;const h=u&&l-u;return h?Math.round(f*1e3/h):void 0}}function nb(e,n){let r=0,t=1e3/n,o,a;const i=(l,u=Date.now())=>{r=u,o=null,a&&(clearTimeout(a),a=null),e(...l)};return[(...l)=>{const u=Date.now(),d=u-r;d>=t?i(l,u):(o=l,a||(a=setTimeout(()=>{a=null,i(o)},t-d)))},()=>o&&i(o)]}const ua=(e,n,r=3)=>{let t=0;const o=rb(50,250);return nb(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,c=i-t,l=o(c),u=i<=s;t=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&u?(s-i)/l:void 0,event:a,lengthComputable:s!=null,[n?"download":"upload"]:!0};e(d)},r)},bu=(e,n)=>{const r=e!=null;return[t=>n[0]({lengthComputable:r,total:e,loaded:t}),n[1]]},_u=e=>(...n)=>M.asap(()=>e(...n)),ob=ut.hasStandardBrowserEnv?((e,n)=>r=>(r=new URL(r,ut.origin),e.protocol===r.protocol&&e.host===r.host&&(n||e.port===r.port)))(new URL(ut.origin),ut.navigator&&/(msie|trident)/i.test(ut.navigator.userAgent)):()=>!0,ab=ut.hasStandardBrowserEnv?{write(e,n,r,t,o,a){const i=[e+"="+encodeURIComponent(n)];M.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),M.isString(t)&&i.push("path="+t),M.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ib(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sb(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function wu(e,n,r){let t=!ib(n);return e&&(t||r==!1)?sb(e,n):n}const Su=e=>e instanceof yt?{...e}:e;function Pr(e,n){n=n||{};const r={};function t(l,u,d,f){return M.isPlainObject(l)&&M.isPlainObject(u)?M.merge.call({caseless:f},l,u):M.isPlainObject(u)?M.merge({},u):M.isArray(u)?u.slice():u}function o(l,u,d,f){if(M.isUndefined(u)){if(!M.isUndefined(l))return t(void 0,l,d,f)}else return t(l,u,d,f)}function a(l,u){if(!M.isUndefined(u))return t(void 0,u)}function i(l,u){if(M.isUndefined(u)){if(!M.isUndefined(l))return t(void 0,l)}else return t(void 0,u)}function s(l,u,d){if(d in n)return t(l,u);if(d in e)return t(void 0,l)}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(l,u,d)=>o(Su(l),Su(u),d,!0)};return M.forEach(Object.keys({...e,...n}),function(u){const d=c[u]||o,f=d(e[u],n[u],u);M.isUndefined(f)&&d!==s||(r[u]=f)}),r}const xu=e=>{const n=Pr({},e);let{data:r,withXSRFToken:t,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=n;n.headers=i=yt.from(i),n.url=fu(wu(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(M.isFormData(r)){if(ut.hasStandardBrowserEnv||ut.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(ut.hasStandardBrowserEnv&&(t&&M.isFunction(t)&&(t=t(n)),t||t!==!1&&ob(n.url))){const l=o&&a&&ab.read(a);l&&i.set(o,l)}return n},cb=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,t){const o=xu(e);let a=o.data;const i=yt.from(o.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:l}=o,u,d,f,h,m;function p(){h&&h(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function k(){if(!y)return;const E=yt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:E,config:e,request:y};yu(function(R){r(R),p()},function(R){t(R),p()},C),y=null}"onloadend"in y?y.onloadend=k:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(k)},y.onabort=function(){y&&(t(new ve("Request aborted",ve.ECONNABORTED,e,y)),y=null)},y.onerror=function(){t(new ve("Network Error",ve.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||hu;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),t(new ve(D,C.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,e,y)),y=null},a===void 0&&i.setContentType(null),"setRequestHeader"in y&&M.forEach(i.toJSON(),function(D,C){y.setRequestHeader(C,D)}),M.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),l&&([f,m]=ua(l,!0),y.addEventListener("progress",f)),c&&y.upload&&([d,h]=ua(c),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(u=E=>{y&&(t(!E||E.type?new sn(null,e,y):E),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=tb(o.url);if(x&&ut.protocols.indexOf(x)===-1){t(new ve("Unsupported protocol "+x+":",ve.ERR_BAD_REQUEST,e));return}y.send(a||null)})},lb=(e,n)=>{const{length:r}=e=e?e.filter(Boolean):[];if(n||r){let t=new AbortController,o;const a=function(l){if(!o){o=!0,s();const u=l instanceof Error?l:this.reason;t.abort(u instanceof ve?u:new sn(u instanceof Error?u.message:u))}};let i=n&&setTimeout(()=>{i=null,a(new ve(`timeout ${n} of ms exceeded`,ve.ETIMEDOUT))},n);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:c}=t;return c.unsubscribe=()=>M.asap(s),c}},ub=function*(e,n){let r=e.byteLength;if(r<n){yield e;return}let t=0,o;for(;t<r;)o=t+n,yield e.slice(t,o),t=o},db=async function*(e,n){for await(const r of fb(e))yield*ub(r,n)},fb=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:r,value:t}=await n.read();if(r)break;yield t}}finally{await n.cancel()}},ku=(e,n,r,t)=>{const o=db(e,n);let a=0,i,s=c=>{i||(i=!0,t&&t(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await o.next();if(l){s(),c.close();return}let d=u.byteLength;if(r){let f=a+=d;r(f)}c.enqueue(new Uint8Array(u))}catch(l){throw s(l),l}},cancel(c){return s(c),o.return()}},{highWaterMark:2})},da=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Cu=da&&typeof ReadableStream=="function",pb=da&&(typeof TextEncoder=="function"?(e=>n=>e.encode(n))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Du=(e,...n)=>{try{return!!e(...n)}catch{return!1}},hb=Cu&&Du(()=>{let e=!1;const n=new Request(ut.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!n}),Eu=64*1024,zi=Cu&&Du(()=>M.isReadableStream(new Response("").body)),fa={stream:zi&&(e=>e.body)};da&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!fa[n]&&(fa[n]=M.isFunction(e[n])?r=>r[n]():(r,t)=>{throw new ve(`Response type '${n}' is not supported`,ve.ERR_NOT_SUPPORT,t)})})})(new Response);const mb=async e=>{if(e==null)return 0;if(M.isBlob(e))return e.size;if(M.isSpecCompliantForm(e))return(await new Request(ut.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(M.isArrayBufferView(e)||M.isArrayBuffer(e))return e.byteLength;if(M.isURLSearchParams(e)&&(e=e+""),M.isString(e))return(await pb(e)).byteLength},gb=async(e,n)=>{const r=M.toFiniteNumber(e.getContentLength());return r??mb(n)},Bi={http:Ly,xhr:cb,fetch:da&&(async e=>{let{url:n,method:r,data:t,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:f}=xu(e);l=l?(l+"").toLowerCase():"text";let h=lb([o,a&&a.toAbortSignal()],i),m;const p=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&hb&&r!=="get"&&r!=="head"&&(y=await gb(u,t))!==0){let C=new Request(n,{method:"POST",body:t,duplex:"half"}),A;if(M.isFormData(t)&&(A=C.headers.get("content-type"))&&u.setContentType(A),C.body){const[R,K]=bu(y,ua(_u(c)));t=ku(C.body,Eu,R,K)}}M.isString(d)||(d=d?"include":"omit");const k="credentials"in Request.prototype;m=new Request(n,{...f,signal:h,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:t,duplex:"half",credentials:k?d:void 0});let x=await fetch(m,f);const E=zi&&(l==="stream"||l==="response");if(zi&&(s||E&&p)){const C={};["status","statusText","headers"].forEach(Y=>{C[Y]=x[Y]});const A=M.toFiniteNumber(x.headers.get("content-length")),[R,K]=s&&bu(A,ua(_u(s),!0))||[];x=new Response(ku(x.body,Eu,R,()=>{K&&K(),p&&p()}),C)}l=l||"text";let D=await fa[M.findKey(fa,l)||"text"](x,e);return!E&&p&&p(),await new Promise((C,A)=>{yu(C,A,{data:D,headers:yt.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(k){throw p&&p(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,e,m),{cause:k.cause||k}):ve.from(k,k&&k.code,e,m)}})};M.forEach(Bi,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const Tu=e=>`- ${e}`,vb=e=>M.isFunction(e)||e===null||e===!1,Ou={getAdapter:e=>{e=M.isArray(e)?e:[e];const{length:n}=e;let r,t;const o={};for(let a=0;a<n;a++){r=e[a];let i;if(t=r,!vb(r)&&(t=Bi[(i=String(r)).toLowerCase()],t===void 0))throw new ve(`Unknown adapter '${i}'`);if(t)break;o[i||"#"+a]=t}if(!t){const a=Object.entries(o).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=n?a.length>1?`since :
|
|
155
155
|
`+a.map(Tu).join(`
|
|
@@ -171,4 +171,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${n}Chann
|
|
|
171
171
|
} else {
|
|
172
172
|
newResult[${C}] = ${D}.value;
|
|
173
173
|
}
|
|
174
|
-
`)}h.write("payload.value = newResult;"),h.write("return payload;");const x=h.compile();return(E,D)=>x(f,E,D)};let a;const i=wa,s=!dd.jitless,l=s&&Kb.value,u=n.catchall;let d;e._zod.parse=(f,h)=>{d??(d=t.value);const m=f.value;return i(m)?s&&l&&h?.async===!1&&h.jitless!==!0?(a||(a=o(n.shape)),f=a(f,h),u?Od([],m,f,h,d,e):f):r(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function Md(e,n,r,t){for(const a of e)if(a.issues.length===0)return n.value=a.value,n;const o=e.filter(a=>!fn(a));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(a=>a.issues.map(i=>Lr(i,t,$r())))}),n)}const j1=L("$ZodUnion",(e,n)=>{We.init(e,n),je(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),je(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),je(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),je(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>ns(a.source)).join("|")})$`)}});const r=n.options.length===1,t=n.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return t(o,a);let i=!1;const s=[];for(const c of n.options){const l=c._zod.run({value:o.value,issues:[]},a);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(c=>Md(c,o,e,a)):Md(s,o,e,a)}}),z1=L("$ZodIntersection",(e,n)=>{We.init(e,n),e._zod.parse=(r,t)=>{const o=r.value,a=n.left._zod.run({value:o,issues:[]},t),i=n.right._zod.run({value:o,issues:[]},t);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([c,l])=>Ad(r,c,l)):Ad(r,a,i)}});function ss(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Qn(e)&&Qn(n)){const r=Object.keys(n),t=Object.keys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...n};for(const a of t){const i=ss(e[a],n[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};o[a]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let t=0;t<e.length;t++){const o=e[t],a=n[t],i=ss(o,a);if(!i.valid)return{valid:!1,mergeErrorPath:[t,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ad(e,n,r){if(n.issues.length&&e.issues.push(...n.issues),r.issues.length&&e.issues.push(...r.issues),fn(e))return e;const t=ss(n.value,r.value);if(!t.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(t.mergeErrorPath)}`);return e.value=t.data,e}const B1=L("$ZodEnum",(e,n)=>{We.init(e,n);const r=Hb(n.entries),t=new Set(r);e._zod.values=t,e._zod.pattern=new RegExp(`^(${r.filter(o=>qb.has(typeof o)).map(o=>typeof o=="string"?dn(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const i=o.value;return t.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),F1=L("$ZodLiteral",(e,n)=>{if(We.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(n.values),e._zod.pattern=new RegExp(`^(${n.values.map(r=>typeof r=="string"?dn(r):r?dn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,t)=>{const o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:n.values,input:o,inst:e}),r}}),V1=L("$ZodTransform",(e,n)=>{We.init(e,n),e._zod.parse=(r,t)=>{if(t.direction==="backward")throw new ud(e.constructor.name);const o=n.transform(r.value,r);if(t.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new ln;return r.value=o,r}});function Pd(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Y1=L("$ZodOptional",(e,n)=>{We.init(e,n),e._zod.optin="optional",e._zod.optout="optional",je(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),je(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${ns(r.source)})?$`):void 0}),e._zod.parse=(r,t)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>Pd(a,r.value)):Pd(o,r.value)}return r.value===void 0?r:n.innerType._zod.run(r,t)}}),U1=L("$ZodNullable",(e,n)=>{We.init(e,n),je(e._zod,"optin",()=>n.innerType._zod.optin),je(e._zod,"optout",()=>n.innerType._zod.optout),je(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${ns(r.source)}|null)$`):void 0}),je(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(r,t)=>r.value===null?r:n.innerType._zod.run(r,t)}),H1=L("$ZodDefault",(e,n)=>{We.init(e,n),e._zod.optin="optional",je(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,t)=>{if(t.direction==="backward")return n.innerType._zod.run(r,t);if(r.value===void 0)return r.value=n.defaultValue,r;const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>Id(a,n)):Id(o,n)}});function Id(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const W1=L("$ZodPrefault",(e,n)=>{We.init(e,n),e._zod.optin="optional",je(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,t)=>(t.direction==="backward"||r.value===void 0&&(r.value=n.defaultValue),n.innerType._zod.run(r,t))}),Z1=L("$ZodNonOptional",(e,n)=>{We.init(e,n),je(e._zod,"values",()=>{const r=n.innerType._zod.values;return r?new Set([...r].filter(t=>t!==void 0)):void 0}),e._zod.parse=(r,t)=>{const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>Rd(a,e)):Rd(o,e)}});function Rd(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const K1=L("$ZodCatch",(e,n)=>{We.init(e,n),je(e._zod,"optin",()=>n.innerType._zod.optin),je(e._zod,"optout",()=>n.innerType._zod.optout),je(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,t)=>{if(t.direction==="backward")return n.innerType._zod.run(r,t);const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>(r.value=a.value,a.issues.length&&(r.value=n.catchValue({...r,error:{issues:a.issues.map(i=>Lr(i,t,$r()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=n.catchValue({...r,error:{issues:o.issues.map(a=>Lr(a,t,$r()))},input:r.value}),r.issues=[]),r)}}),q1=L("$ZodPipe",(e,n)=>{We.init(e,n),je(e._zod,"values",()=>n.in._zod.values),je(e._zod,"optin",()=>n.in._zod.optin),je(e._zod,"optout",()=>n.out._zod.optout),je(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,t)=>{if(t.direction==="backward"){const a=n.out._zod.run(r,t);return a instanceof Promise?a.then(i=>Ma(i,n.in,t)):Ma(a,n.in,t)}const o=n.in._zod.run(r,t);return o instanceof Promise?o.then(a=>Ma(a,n.out,t)):Ma(o,n.out,t)}});function Ma(e,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},r)}const G1=L("$ZodReadonly",(e,n)=>{We.init(e,n),je(e._zod,"propValues",()=>n.innerType._zod.propValues),je(e._zod,"values",()=>n.innerType._zod.values),je(e._zod,"optin",()=>n.innerType._zod.optin),je(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(r,t)=>{if(t.direction==="backward")return n.innerType._zod.run(r,t);const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(Nd):Nd(o)}});function Nd(e){return e.value=Object.freeze(e.value),e}const Q1=L("$ZodCustom",(e,n)=>{_t.init(e,n),We.init(e,n),e._zod.parse=(r,t)=>r,e._zod.check=r=>{const t=r.value,o=n.fn(t);if(o instanceof Promise)return o.then(a=>$d(a,r,t,e));$d(o,r,t,e)}});function $d(e,n,r,t){if(!e){const o={code:"custom",input:r,inst:t,path:[...t._zod.def.path??[]],continue:!t._zod.def.abort};t._zod.def.params&&(o.params=t._zod.def.params),n.issues.push(Jn(o))}}class J1{constructor(){this._map=new Map,this._idmap=new Map}add(n,...r){const t=r[0];if(this._map.set(n,t),t&&typeof t=="object"&&"id"in t){if(this._idmap.has(t.id))throw new Error(`ID ${t.id} already exists in the registry`);this._idmap.set(t.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const r=this._map.get(n);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(n),this}get(n){const r=n._zod.parent;if(r){const t={...this.get(r)??{}};delete t.id;const o={...t,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function X1(){return new J1}const Aa=X1();function ew(e,n){return new e({type:"string",...se(n)})}function tw(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...se(n)})}function Ld(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...se(n)})}function rw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...se(n)})}function nw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...se(n)})}function ow(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...se(n)})}function aw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...se(n)})}function iw(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...se(n)})}function sw(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...se(n)})}function cw(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...se(n)})}function lw(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...se(n)})}function uw(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...se(n)})}function dw(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...se(n)})}function fw(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...se(n)})}function pw(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...se(n)})}function hw(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...se(n)})}function mw(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...se(n)})}function gw(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...se(n)})}function vw(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...se(n)})}function yw(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...se(n)})}function bw(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...se(n)})}function _w(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...se(n)})}function ww(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...se(n)})}function Sw(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...se(n)})}function xw(e,n){return new e({type:"string",format:"date",check:"string_format",...se(n)})}function kw(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...se(n)})}function Cw(e,n){return new e({type:"string",format:"duration",check:"string_format",...se(n)})}function Dw(e,n){return new e({type:"number",checks:[],...se(n)})}function Ew(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...se(n)})}function Tw(e,n){return new e({type:"boolean",...se(n)})}function Ow(e){return new e({type:"unknown"})}function Mw(e,n){return new e({type:"never",...se(n)})}function jd(e,n){return new xd({check:"less_than",...se(n),value:e,inclusive:!1})}function cs(e,n){return new xd({check:"less_than",...se(n),value:e,inclusive:!0})}function zd(e,n){return new kd({check:"greater_than",...se(n),value:e,inclusive:!1})}function ls(e,n){return new kd({check:"greater_than",...se(n),value:e,inclusive:!0})}function Bd(e,n){return new W_({check:"multiple_of",...se(n),value:e})}function Fd(e,n){return new K_({check:"max_length",...se(n),maximum:e})}function Pa(e,n){return new q_({check:"min_length",...se(n),minimum:e})}function Vd(e,n){return new G_({check:"length_equals",...se(n),length:e})}function Aw(e,n){return new Q_({check:"string_format",format:"regex",...se(n),pattern:e})}function Pw(e){return new J_({check:"string_format",format:"lowercase",...se(e)})}function Iw(e){return new X_({check:"string_format",format:"uppercase",...se(e)})}function Rw(e,n){return new e1({check:"string_format",format:"includes",...se(n),includes:e})}function Nw(e,n){return new t1({check:"string_format",format:"starts_with",...se(n),prefix:e})}function $w(e,n){return new r1({check:"string_format",format:"ends_with",...se(n),suffix:e})}function Xn(e){return new n1({check:"overwrite",tx:e})}function Lw(e){return Xn(n=>n.normalize(e))}function jw(){return Xn(e=>e.trim())}function zw(){return Xn(e=>e.toLowerCase())}function Bw(){return Xn(e=>e.toUpperCase())}function Fw(e,n,r){return new e({type:"array",element:n,...se(r)})}function Vw(e,n,r){return new e({type:"custom",check:"custom",fn:n,...se(r)})}function Yw(e){const n=Uw(r=>(r.addIssue=t=>{if(typeof t=="string")r.issues.push(Jn(t,r.value,n._zod.def));else{const o=t;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(Jn(o))}},e(r.value,r)));return n}function Uw(e,n){const r=new _t({check:"custom",...se(n)});return r._zod.check=e,r}function Yd(e,n){try{var r=e()}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}function Hw(e,n){for(var r={};e.length;){var t=e[0],o=t.code,a=t.message,i=t.path.join(".");if(!r[i])if("unionErrors"in t){var s=t.unionErrors[0].errors[0];r[i]={message:s.message,type:s.code}}else r[i]={message:a,type:o};if("unionErrors"in t&&t.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),n){var c=r[i].types,l=c&&c[t.code];r[i]=qi(i,n,r,o,l?[].concat(l,t.message):t.message)}e.shift()}return r}function Ww(e,n){for(var r={};e.length;){var t=e[0],o=t.code,a=t.message,i=t.path.join(".");if(!r[i])if(t.code==="invalid_union"&&t.errors.length>0){var s=t.errors[0][0];r[i]={message:s.message,type:s.code}}else r[i]={message:a,type:o};if(t.code==="invalid_union"&&t.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),n){var c=r[i].types,l=c&&c[t.code];r[i]=qi(i,n,r,o,l?[].concat(l,t.message):t.message)}e.shift()}return r}function Zw(e,n,r){if(r===void 0&&(r={}),(function(t){return"_def"in t&&typeof t._def=="object"&&"typeName"in t._def})(e))return function(t,o,a){try{return Promise.resolve(Yd(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](t,n)).then(function(i){return a.shouldUseNativeValidation&&Xi({},a),{errors:{},values:r.raw?Object.assign({},t):i}})},function(i){if((function(s){return Array.isArray(s?.issues)})(i))return{values:{},errors:cd(Hw(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};if((function(t){return"_zod"in t&&typeof t._zod=="object"})(e))return function(t,o,a){try{return Promise.resolve(Yd(function(){return Promise.resolve((r.mode==="sync"?s_:c_)(e,t,n)).then(function(i){return a.shouldUseNativeValidation&&Xi({},a),{errors:{},values:r.raw?Object.assign({},t):i}})},function(i){if((function(s){return s instanceof as})(i))return{values:{},errors:cd(Ww(i.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Kw=L("ZodISODateTime",(e,n)=>{v1.init(e,n),Ye.init(e,n)});function qw(e){return Sw(Kw,e)}const Gw=L("ZodISODate",(e,n)=>{y1.init(e,n),Ye.init(e,n)});function Qw(e){return xw(Gw,e)}const Jw=L("ZodISOTime",(e,n)=>{b1.init(e,n),Ye.init(e,n)});function Xw(e){return kw(Jw,e)}const e2=L("ZodISODuration",(e,n)=>{_1.init(e,n),Ye.init(e,n)});function t2(e){return Cw(e2,e)}const It=L("ZodError",(e,n)=>{as.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>i_(e,r)},flatten:{value:r=>a_(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,es,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,es,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),r2=ka(It),n2=Ca(It),o2=Da(It),a2=Ea(It),i2=d_(It),s2=f_(It),c2=p_(It),l2=h_(It),u2=m_(It),d2=g_(It),f2=v_(It),p2=y_(It),Je=L("ZodType",(e,n)=>(We.init(e,n),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...r)=>e.clone({...n,checks:[...n.checks??[],...r.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),e.clone=(r,t)=>_r(e,r,t),e.brand=()=>e,e.register=((r,t)=>(r.add(e,t),e)),e.parse=(r,t)=>r2(e,r,t,{callee:e.parse}),e.safeParse=(r,t)=>o2(e,r,t),e.parseAsync=async(r,t)=>n2(e,r,t,{callee:e.parseAsync}),e.safeParseAsync=async(r,t)=>a2(e,r,t),e.spa=e.safeParseAsync,e.encode=(r,t)=>i2(e,r,t),e.decode=(r,t)=>s2(e,r,t),e.encodeAsync=async(r,t)=>c2(e,r,t),e.decodeAsync=async(r,t)=>l2(e,r,t),e.safeEncode=(r,t)=>u2(e,r,t),e.safeDecode=(r,t)=>d2(e,r,t),e.safeEncodeAsync=async(r,t)=>f2(e,r,t),e.safeDecodeAsync=async(r,t)=>p2(e,r,t),e.refine=(r,t)=>e.check(lS(r,t)),e.superRefine=r=>e.check(uS(r)),e.overwrite=r=>e.check(Xn(r)),e.optional=()=>Gd(e),e.nullable=()=>Qd(e),e.nullish=()=>Gd(Qd(e)),e.nonoptional=r=>rS(e,r),e.array=()=>z2(e),e.or=r=>Y2([e,r]),e.and=r=>H2(e,r),e.transform=r=>Xd(e,G2(r)),e.default=r=>X2(e,r),e.prefault=r=>tS(e,r),e.catch=r=>oS(e,r),e.pipe=r=>Xd(e,r),e.readonly=()=>sS(e),e.describe=r=>{const t=e.clone();return Aa.add(t,{description:r}),t},Object.defineProperty(e,"description",{get(){return Aa.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Aa.get(e);const t=e.clone();return Aa.add(t,r[0]),t},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ud=L("_ZodString",(e,n)=>{is.init(e,n),Je.init(e,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...t)=>e.check(Aw(...t)),e.includes=(...t)=>e.check(Rw(...t)),e.startsWith=(...t)=>e.check(Nw(...t)),e.endsWith=(...t)=>e.check($w(...t)),e.min=(...t)=>e.check(Pa(...t)),e.max=(...t)=>e.check(Fd(...t)),e.length=(...t)=>e.check(Vd(...t)),e.nonempty=(...t)=>e.check(Pa(1,...t)),e.lowercase=t=>e.check(Pw(t)),e.uppercase=t=>e.check(Iw(t)),e.trim=()=>e.check(jw()),e.normalize=(...t)=>e.check(Lw(...t)),e.toLowerCase=()=>e.check(zw()),e.toUpperCase=()=>e.check(Bw())}),h2=L("ZodString",(e,n)=>{is.init(e,n),Ud.init(e,n),e.email=r=>e.check(tw(m2,r)),e.url=r=>e.check(iw(g2,r)),e.jwt=r=>e.check(ww(A2,r)),e.emoji=r=>e.check(sw(v2,r)),e.guid=r=>e.check(Ld(Hd,r)),e.uuid=r=>e.check(rw(Ia,r)),e.uuidv4=r=>e.check(nw(Ia,r)),e.uuidv6=r=>e.check(ow(Ia,r)),e.uuidv7=r=>e.check(aw(Ia,r)),e.nanoid=r=>e.check(cw(y2,r)),e.guid=r=>e.check(Ld(Hd,r)),e.cuid=r=>e.check(lw(b2,r)),e.cuid2=r=>e.check(uw(_2,r)),e.ulid=r=>e.check(dw(w2,r)),e.base64=r=>e.check(yw(T2,r)),e.base64url=r=>e.check(bw(O2,r)),e.xid=r=>e.check(fw(S2,r)),e.ksuid=r=>e.check(pw(x2,r)),e.ipv4=r=>e.check(hw(k2,r)),e.ipv6=r=>e.check(mw(C2,r)),e.cidrv4=r=>e.check(gw(D2,r)),e.cidrv6=r=>e.check(vw(E2,r)),e.e164=r=>e.check(_w(M2,r)),e.datetime=r=>e.check(qw(r)),e.date=r=>e.check(Qw(r)),e.time=r=>e.check(Xw(r)),e.duration=r=>e.check(t2(r))});function Yt(e){return ew(h2,e)}const Ye=L("ZodStringFormat",(e,n)=>{Ve.init(e,n),Ud.init(e,n)}),m2=L("ZodEmail",(e,n)=>{c1.init(e,n),Ye.init(e,n)}),Hd=L("ZodGUID",(e,n)=>{i1.init(e,n),Ye.init(e,n)}),Ia=L("ZodUUID",(e,n)=>{s1.init(e,n),Ye.init(e,n)}),g2=L("ZodURL",(e,n)=>{l1.init(e,n),Ye.init(e,n)}),v2=L("ZodEmoji",(e,n)=>{u1.init(e,n),Ye.init(e,n)}),y2=L("ZodNanoID",(e,n)=>{d1.init(e,n),Ye.init(e,n)}),b2=L("ZodCUID",(e,n)=>{f1.init(e,n),Ye.init(e,n)}),_2=L("ZodCUID2",(e,n)=>{p1.init(e,n),Ye.init(e,n)}),w2=L("ZodULID",(e,n)=>{h1.init(e,n),Ye.init(e,n)}),S2=L("ZodXID",(e,n)=>{m1.init(e,n),Ye.init(e,n)}),x2=L("ZodKSUID",(e,n)=>{g1.init(e,n),Ye.init(e,n)}),k2=L("ZodIPv4",(e,n)=>{w1.init(e,n),Ye.init(e,n)}),C2=L("ZodIPv6",(e,n)=>{S1.init(e,n),Ye.init(e,n)}),D2=L("ZodCIDRv4",(e,n)=>{x1.init(e,n),Ye.init(e,n)}),E2=L("ZodCIDRv6",(e,n)=>{k1.init(e,n),Ye.init(e,n)}),T2=L("ZodBase64",(e,n)=>{C1.init(e,n),Ye.init(e,n)}),O2=L("ZodBase64URL",(e,n)=>{E1.init(e,n),Ye.init(e,n)}),M2=L("ZodE164",(e,n)=>{T1.init(e,n),Ye.init(e,n)}),A2=L("ZodJWT",(e,n)=>{M1.init(e,n),Ye.init(e,n)}),Wd=L("ZodNumber",(e,n)=>{Dd.init(e,n),Je.init(e,n),e.gt=(t,o)=>e.check(zd(t,o)),e.gte=(t,o)=>e.check(ls(t,o)),e.min=(t,o)=>e.check(ls(t,o)),e.lt=(t,o)=>e.check(jd(t,o)),e.lte=(t,o)=>e.check(cs(t,o)),e.max=(t,o)=>e.check(cs(t,o)),e.int=t=>e.check(Zd(t)),e.safe=t=>e.check(Zd(t)),e.positive=t=>e.check(zd(0,t)),e.nonnegative=t=>e.check(ls(0,t)),e.negative=t=>e.check(jd(0,t)),e.nonpositive=t=>e.check(cs(0,t)),e.multipleOf=(t,o)=>e.check(Bd(t,o)),e.step=(t,o)=>e.check(Bd(t,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function P2(e){return Dw(Wd,e)}const I2=L("ZodNumberFormat",(e,n)=>{A1.init(e,n),Wd.init(e,n)});function Zd(e){return Ew(I2,e)}const R2=L("ZodBoolean",(e,n)=>{P1.init(e,n),Je.init(e,n)});function us(e){return Tw(R2,e)}const N2=L("ZodUnknown",(e,n)=>{I1.init(e,n),Je.init(e,n)});function Kd(){return Ow(N2)}const $2=L("ZodNever",(e,n)=>{R1.init(e,n),Je.init(e,n)});function L2(e){return Mw($2,e)}const j2=L("ZodArray",(e,n)=>{N1.init(e,n),Je.init(e,n),e.element=n.element,e.min=(r,t)=>e.check(Pa(r,t)),e.nonempty=r=>e.check(Pa(1,r)),e.max=(r,t)=>e.check(Fd(r,t)),e.length=(r,t)=>e.check(Vd(r,t)),e.unwrap=()=>e.element});function z2(e,n){return Fw(j2,e,n)}const B2=L("ZodObject",(e,n)=>{L1.init(e,n),Je.init(e,n),je(e,"shape",()=>n.shape),e.keyof=()=>W2(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Kd()}),e.loose=()=>e.clone({...e._zod.def,catchall:Kd()}),e.strict=()=>e.clone({...e._zod.def,catchall:L2()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>e_(e,r),e.safeExtend=r=>t_(e,r),e.merge=r=>r_(e,r),e.pick=r=>Jb(e,r),e.omit=r=>Xb(e,r),e.partial=(...r)=>n_(qd,e,r[0]),e.required=(...r)=>o_(Jd,e,r[0])});function F2(e,n){const r={type:"object",get shape(){return br(this,"shape",e?Zb(e):{}),this.shape},...se(n)};return new B2(r)}const V2=L("ZodUnion",(e,n)=>{j1.init(e,n),Je.init(e,n),e.options=n.options});function Y2(e,n){return new V2({type:"union",options:e,...se(n)})}const U2=L("ZodIntersection",(e,n)=>{z1.init(e,n),Je.init(e,n)});function H2(e,n){return new U2({type:"intersection",left:e,right:n})}const ds=L("ZodEnum",(e,n)=>{B1.init(e,n),Je.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const r=new Set(Object.keys(n.entries));e.extract=(t,o)=>{const a={};for(const i of t)if(r.has(i))a[i]=n.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ds({...n,checks:[],...se(o),entries:a})},e.exclude=(t,o)=>{const a={...n.entries};for(const i of t)if(r.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new ds({...n,checks:[],...se(o),entries:a})}});function W2(e,n){const r=Array.isArray(e)?Object.fromEntries(e.map(t=>[t,t])):e;return new ds({type:"enum",entries:r,...se(n)})}const Z2=L("ZodLiteral",(e,n)=>{F1.init(e,n),Je.init(e,n),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function K2(e,n){return new Z2({type:"literal",values:Array.isArray(e)?e:[e],...se(n)})}const q2=L("ZodTransform",(e,n)=>{V1.init(e,n),Je.init(e,n),e._zod.parse=(r,t)=>{if(t.direction==="backward")throw new ud(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Jn(a,r.value,n));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Jn(i))}};const o=n.transform(r.value,r);return o instanceof Promise?o.then(a=>(r.value=a,r)):(r.value=o,r)}});function G2(e){return new q2({type:"transform",transform:e})}const qd=L("ZodOptional",(e,n)=>{Y1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Gd(e){return new qd({type:"optional",innerType:e})}const Q2=L("ZodNullable",(e,n)=>{U1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Qd(e){return new Q2({type:"nullable",innerType:e})}const J2=L("ZodDefault",(e,n)=>{H1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function X2(e,n){return new J2({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():md(n)}})}const eS=L("ZodPrefault",(e,n)=>{W1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function tS(e,n){return new eS({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():md(n)}})}const Jd=L("ZodNonOptional",(e,n)=>{Z1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function rS(e,n){return new Jd({type:"nonoptional",innerType:e,...se(n)})}const nS=L("ZodCatch",(e,n)=>{K1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oS(e,n){return new nS({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const aS=L("ZodPipe",(e,n)=>{q1.init(e,n),Je.init(e,n),e.in=n.in,e.out=n.out});function Xd(e,n){return new aS({type:"pipe",in:e,out:n})}const iS=L("ZodReadonly",(e,n)=>{G1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function sS(e){return new iS({type:"readonly",innerType:e})}const cS=L("ZodCustom",(e,n)=>{Q1.init(e,n),Je.init(e,n)});function lS(e,n={}){return Vw(cS,e,n)}function uS(e){return Yw(e)}const ef=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,dS=F2({titulo:Yt().min(1,"El campo Título es requerido."),fechaInicio:Yt().min(1,"El campo fecha inicio es requerido."),horaInicio:Yt().min(1,"La hora de inicio es requerida.").regex(ef,{message:"Formato inválido"}),horaFin:Yt().min(1,"La hora fin es requerida.").regex(ef,{message:"Formato inválido"}),todoElDia:us(),fechaFin:Yt().optional(),showEndDate:us().optional(),horaInicio2:Yt().optional(),TodoElDia2:us().optional(),client:Yt().optional(),repetir:Yt().optional(),link:Yt().url("Debe ser una URL válida ejemplo https://www.google.com.").or(K2("")).optional(),descripcion:Yt().optional(),color:Yt().optional(),solID:P2().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"]}),tf=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.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"}),G.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"})),fS="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",pS=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.createElement("g",{clipPath:"url(#a)"},G.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"})),G.createElement("defs",null,G.createElement("clipPath",{id:"a"},G.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),hS="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",mS=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},G.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"}),G.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"}),G.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"})),G.createElement("defs",null,G.createElement("clipPath",{id:"a"},G.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),gS="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",vS=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.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"}),G.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"})),rf=mr(_.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),fs=mr(_.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"),yS={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"},ps=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],nf=(()=>{const e=[];for(let n=0;n<24;n++)for(let r=0;r<60;r+=15){const t=n.toString().padStart(2,"0"),o=r.toString().padStart(2,"0");e.push(`${t}:${o}`)}return e})(),bS=({isVisible:e,onClose:n,onSave:r,onDelete:t,selectedDate:o,initialEvent:a,userId:i,masNombreBD:s,disId:c})=>{const[l,u]=b.useState(!1),[d,f]=b.useState(!1),h=v.format(new Date,"yyyy-MM-dd"),[m,p]=b.useState(""),[y,k]=b.useState([]),[x,E]=b.useState(!1),D=$u(),[C,A]=b.useState([]),{control:R,handleSubmit:K,reset:Y,formState:{errors:W},watch:Q,setValue:g}=Yb({resolver:Zw(dS),defaultValues:{titulo:"",fechaInicio:v.format(new Date,"yyyy-MM-dd"),horaInicio:v.format(new Date,"HH:mm"),horaFin:v.format(v.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:ps[5],solID:null}}),P=Q("fechaInicio"),O=Q("fechaFin"),F=Q("todoElDia");b.useEffect(()=>{if(m.trim()===""||!i||!c||!s){k([]);return}E(!0);const j=setTimeout(()=>{D.getClients(m,c,s,i).then(re=>{E(!1);const I=Array.from(new Map(re.map(z=>[z.nombreCliente,z])).values());k(I)}).catch(re=>{console.error("Error al buscar clientes:",re),E(!1)})},500);return()=>clearTimeout(j)},[m,i,c,s]),b.useEffect(()=>{if(P&&O){const j=new Date(P),re=new Date(O);(j===re||j>re)&&g("fechaFin",P)}},[P,O,g]),b.useEffect(()=>{g("showEndDate",l)},[l,g]),b.useEffect(()=>{if(a){const j=v.format(a.fechaInicio,"yyyy-MM-dd")===v.format(a.fechaFin,"yyyy-MM-dd");u(!j),g("titulo",a?.titulo),g("fechaInicio",v.format(a.fechaInicio,"yyyy-MM-dd")),g("fechaFin",v.format(a.fechaFin,"yyyy-MM-dd")),g("horaInicio",v.format(a.fechaInicio,"HH:mm")),g("horaFin",v.format(a.fechaFin,"HH:mm")),g("horaInicio2",v.format(a.fechaFin,"HH:mm")),g("descripcion",a.descripcion),g("link",a.link),g("repetir",a.repetir),g("color",a.color),g("todoElDia",a.todoElDia)}else{const j=o||new Date,re=new Date,I=new Date(j.getFullYear(),j.getMonth(),j.getDate(),re.getHours(),re.getMinutes()),z=v.addHours(I,1);Y({titulo:"",fechaInicio:v.format(I,"yyyy-MM-dd"),horaInicio:v.format(I,"HH:mm"),fechaFin:v.format(z,"yyyy-MM-dd"),horaFin:v.format(z,"HH:mm"),horaInicio2:v.format(z,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:ps[5],solID:null}),u(!1)}},[a,e,o]);const B=K(j=>{r(j,a?.eventoID),n(),Y(),u(!1)},j=>{console.log("Errores de validación:",j)});b.useEffect(()=>{F&&(g("horaInicio","00:00"),g("horaFin","23:59"))},[F,g,Q]);const ee=()=>{const j=Q("fechaInicio");if(j){const re=new Date(`${j}T00:00:00`),I=v.addDays(re,1);g("fechaFin",v.format(I,"yyyy-MM-dd"))}u(!0)};return _.jsx(U.Modal,{open:e,onClose:n,children:_.jsxs(U.Box,{sx:yS,children:[_.jsx(U.IconButton,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:12},children:_.jsx(fs,{})}),_.jsx(U.Typography,{variant:"h6",mb:2,children:a?"Editar evento":"Agregar evento"}),_.jsxs(U.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(Ft,{name:"titulo",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,label:"Título",fullWidth:!0,variant:"outlined",size:"small",color:"secondary",error:!!W.titulo,helperText:W.titulo?.message,sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"}}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(U.Divider,{})}),_.jsx(U.Grid,{size:{xs:12,md:4},children:_.jsx(Ft,{name:"fechaInicio",control:R,render:({field:j})=>_.jsx(U.TextField,{fullWidth:!0,...j,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!W.fechaInicio,helperText:W.fechaInicio?.message})})}),l?_.jsxs(_.Fragment,{children:[_.jsx(U.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),_.jsx(U.Grid,{size:{xs:11,md:4},children:_.jsx(Ft,{name:"fechaFin",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:P||h},error:!!W.fechaFin,helperText:W.fechaFin?.message})})}),!a&&_.jsx(U.Grid,{size:{xs:1,md:1},children:_.jsx(U.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:_.jsx(tf,{})})})]}):_.jsx(U.Grid,{size:{xs:12,md:7}})]}),l&&_.jsx(_.Fragment,{children:_.jsxs(U.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[_.jsx(U.Grid,{size:{xs:6,md:5}}),_.jsx(U.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:_.jsx(rf,{sx:{color:"#757575",margin:0,padding:0}})})]})}),_.jsxs(U.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[_.jsx(U.Grid,{size:{xs:12,md:4},children:_.jsx(Ft,{name:"horaInicio",control:R,render:({field:{onChange:j,value:re,...I}})=>_.jsx(U.Autocomplete,{freeSolo:!0,options:nf,value:re||"",onChange:(z,ce)=>j(ce||""),onInputChange:(z,ce)=>j(ce),renderInput:z=>_.jsx(U.TextField,{...z,...I,size:"small",error:!!W.horaInicio,helperText:W.horaInicio?.message,InputProps:{...z.InputProps,endAdornment:_.jsx(U.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:_.jsx(Lu,{})})}}),disabled:Q("todoElDia")})})}),_.jsx(U.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:!l&&_.jsx(rf,{sx:{color:"#757575"}})}),l&&_.jsx(U.Grid,{size:{xs:2,md:2}}),_.jsx(U.Grid,{size:{xs:12,md:4},children:_.jsx(Ft,{name:"horaFin",control:R,render:({field:{onChange:j,value:re,...I}})=>_.jsx(U.Autocomplete,{freeSolo:!0,options:nf,value:re||"",onChange:(z,ce)=>j(ce||""),onInputChange:(z,ce)=>j(ce),renderInput:z=>_.jsx(U.TextField,{...z,...I,size:"small",error:!!W.horaFin,helperText:W.horaFin?.message,InputProps:{...z.InputProps,endAdornment:_.jsx(U.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:_.jsx(Lu,{})})}}),disabled:Q("todoElDia")})})}),_.jsx(U.Grid,{size:{xs:12,md:3},hidden:l,children:_.jsx(Ft,{name:"todoElDia",control:R,render:({field:j})=>_.jsx(U.FormControlLabel,{control:_.jsx(U.Checkbox,{checked:j.value,onChange:re=>j.onChange(re.target.checked)}),label:_.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:!l&&_.jsx(_.Fragment,{children:_.jsxs(U.Button,{onClick:ee,size:"small",sx:{textTransform:"none",fontSize:16},children:[_.jsx(mS,{})," Agregar fecha final"]})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(U.Divider,{})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:!d&&_.jsxs(U.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[_.jsx(vS,{})," Vincular cliente"]})}),d&&_.jsxs(_.Fragment,{children:[_.jsx(U.Grid,{size:{xs:12,md:7},children:_.jsx(Ft,{name:"client",control:R,render:({field:j})=>_.jsx(U.Autocomplete,{options:y,loading:x,getOptionLabel:re=>re.nombreCliente?.trim()||"",value:y.find(re=>re.nombreCliente===j.value)||null,onInputChange:(re,I)=>{p(I)},onChange:(re,I)=>{if(j.onChange(I?I.nombreCliente:""),g("solID",I?I.solID:null),I&&I.nombreCliente){const z=y.filter(ce=>ce.nombreCliente===I.nombreCliente&&ce.solID).map(ce=>ce.solID);A([...new Set(z)])}else A([])},renderInput:re=>_.jsx(U.TextField,{...re,placeholder:"Buscar cliente...",size:"small",InputProps:{...re.InputProps,startAdornment:_.jsx("img",{src:hS,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}}),endAdornment:_.jsxs(_.Fragment,{children:[x?_.jsx(U.CircularProgress,{color:"inherit",size:20}):null,re.InputProps.endAdornment]})}})})})}),_.jsx(U.Grid,{size:{xs:11,md:4},children:_.jsx(Ft,{name:"solID",control:R,render:({field:j})=>_.jsx(U.Autocomplete,{options:C,getOptionLabel:re=>re.toString(),value:j.value??null,onChange:(re,I)=>j.onChange(I),renderInput:re=>_.jsx(U.TextField,{...re,label:"#Registro",variant:"outlined",size:"small"}),disabled:!y})})}),_.jsx(U.Grid,{size:{xs:1,md:1},children:_.jsx(U.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:_.jsx(tf,{})})})]}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(U.Divider,{})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(Ft,{name:"link",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!W.link,helperText:W.link?.message,InputProps:{startAdornment:_.jsx("img",{src:fS,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(Ft,{name:"descripcion",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,variant:"outlined",size:"small",InputProps:{startAdornment:_.jsx("img",{src:gS,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsxs(U.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[_.jsx(pS,{}),ps.map(j=>_.jsx(Ft,{name:"color",control:R,render:({field:re})=>_.jsx(U.IconButton,{onClick:()=>re.onChange(j),sx:{width:24,height:24,borderRadius:"50%",bgcolor:j,border:re.value===j?"2px solid":"none",borderColor:re.value===j?"primary.main":"transparent"}})},j))]})})]}),_.jsxs(U.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[a&&_.jsx(U.Button,{onClick:t,variant:"outlined",color:"error",children:"Eliminar"}),_.jsx(U.Button,{onClick:n,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),_.jsx(U.Button,{onClick:B,variant:"contained",sx:{textTransform:"none"},children:"Guardar"})]})]})})},_S="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",wS={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},SS=({isOpen:e,onClose:n,onConfirm:r,title:t,message:o})=>_.jsx(U.Modal,{open:e,onClose:n,children:_.jsxs(U.Box,{sx:wS,children:[_.jsx("img",{src:_S}),_.jsx(U.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:t}),_.jsx(U.Typography,{sx:{mt:2},children:o}),_.jsxs(U.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[_.jsx(U.Button,{variant:"outlined",onClick:n,sx:{textTransform:"none"},children:"Regresar"}),_.jsxs(U.Button,{variant:"contained",color:"error",onClick:r,sx:{textTransform:"none"},children:[_.jsx("span",{className:"icon-eliminar",children:" "})," Eliminar"]})]})]})}),xS={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},kS=({isOpen:e,onClose:n,events:r,date:t,onEventClick:o})=>{if(!t)return null;const a=i=>{o(i),n()};return _.jsx(U.Modal,{open:e,onClose:n,children:_.jsxs(U.Box,{sx:xS,children:[_.jsxs(U.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[_.jsxs(U.Typography,{variant:"h6",component:"h2",children:["Eventos del ",t.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),_.jsx(U.IconButton,{onClick:n,children:_.jsx(fs,{})})]}),_.jsx(U.Divider,{}),_.jsx(U.List,{children:r.map(i=>_.jsx(U.ListItem,{disablePadding:!0,children:_.jsxs(U.ListItemButton,{onClick:()=>a(i),sx:{py:.5},children:[_.jsx(U.Box,{sx:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:i.color||"#ccc",mr:2}}),_.jsx(U.ListItemText,{primary:i.titulo,secondary:`${v.format(i.fechaInicio,"HH:mm")} - ${v.format(i.fechaFin,"HH:mm")}`,sx:{my:0}})]})},i.eventoID))})]})})},CS=mr(_.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"),DS=mr(_.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"),ES="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",TS="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",of=b.forwardRef(({id:e,message:n,variant:r},t)=>{const{closeSnackbar:o}=$a.useSnackbar(),a={success:{color:"#fff",icon:_.jsx("img",{width:25,src:TS,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:_.jsx(CS,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:_.jsx(DS,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:_.jsx("img",{src:ES,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},i=a[r]||a.info;return _.jsx($a.SnackbarContent,{ref:t,children:_.jsxs(U.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 ${i.color}`},children:[_.jsx(U.Box,{sx:{mr:1.5},children:i.icon}),_.jsx(U.Typography,{variant:"body2",sx:{flexGrow:1},children:n}),_.jsx(U.IconButton,{size:"small",onClick:()=>o(e),children:_.jsx(fs,{fontSize:"small"})})]})})}),OS=({userId:e,leads30Days:n,leads90Days:r,disId:t,masNombreBD:o})=>{const[a,i]=b.useState(new Date),[s,c]=b.useState([]),[l,u]=b.useState(!1),[d,f]=b.useState(null),[h,m]=b.useState(!1),[p,y]=b.useState(null),[k,x]=b.useState([]),{enqueueSnackbar:E}=$a.useSnackbar(),D=$u(),[C,A]=b.useState(!1),[R,K]=b.useState([]),[Y,W]=b.useState(null),Q=(Z,le)=>{K(Z),W(le),A(!0)};console.log(t),b.useEffect(()=>{(async()=>{try{if(e){const le=await D.getEventsByUser(e);c(le)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}finally{console.log("Eventos han sido cargados")}})()},[a]),b.useEffect(()=>{const Z=new Date,le=v.startOfDay(Z),ue=v.endOfDay(v.addDays(le,6)),de={start:le,end:ue},he=s.filter(me=>{const fe={start:me.fechaInicio,end:me.fechaFin};return zl(fe,de)}).sort((me,fe)=>me.fechaInicio.getTime()-fe.fechaInicio.getTime());x(he)},[s]);const g=async Z=>{try{const le=await D.getEventById(Z.eventoID);f(le),u(!0)}catch(le){console.error(le)}},P=()=>{u(!1),f(null)},O=async(Z,le)=>{let ue,de;Z.todoElDia?(ue=new Date(`${Z.fechaInicio}T${Z.horaInicio}`),de=new Date(`${Z.fechaInicio}T${Z.horaFin}`)):(ue=new Date(`${Z.fechaInicio}T${Z.horaInicio}`),de=Z.fechaFin&&Z.horaInicio2?new Date(`${Z.fechaFin}T${Z.horaInicio2}`):new Date(ue.getTime()+3600*1e3));const he=v.format(ue,"yyyy-MM-dd HH:mm:ss.SSS"),me=v.format(de,"yyyy-MM-dd HH:mm:ss.SSS");if(le){const Ze={...Z,eventoID:le,fechaInicio:he,fechaFin:me};try{const q=await D.updateEvent(Ze);var fe=s.map(at=>at.eventoID===q.eventoID?q:at);c(fe),E("El evento se ha actualizado correctamente.",{variant:"success"}),P()}catch{E("Error al eliactualizar Evento",{variant:"error"})}}else{const Ze={...Z,fechaInicio:he,fechaFin:me,todoElDia:Z.todoElDia};try{const q=await D.createEvent(Ze,e);c(at=>[...at,q]),E("El evento se ha creado con éxito",{variant:"success"}),P()}catch{E("Error al guardar Evento",{variant:"error"})}}},F=()=>{i(Z=>new Date(Z.getFullYear(),Z.getMonth()-1,1))},B=()=>{i(Z=>new Date(Z.getFullYear(),Z.getMonth()+1,1))},ee=()=>{m(!0)},j=()=>{y(new Date),u(!0)},re=()=>alert("Sincronizar con Google Calendar"),I=()=>alert("Sincronizar con Outlook Calendar"),z=Z=>{Z&&i(Z)},ce=Z=>{y(Z),u(!0),f(null)},ge=async()=>{if(d)try{await D.deleteEvent(d.eventoID),c(s.filter(Z=>Z.eventoID!==d.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(Z,le)=>_.jsx(of,{id:Z,message:String(le),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{P(),m(!1)}};return _.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[_.jsx(Fm,{header:_.jsx(sv,{currentDate:a,onPrevMonth:F,onNextMonth:B,onAddEvent:j,onDateChange:z}),sidebar:_.jsx(Yv,{onEventClick:g,upcomingEvents:k,onSyncGoogle:re,onSyncOutlook:I,leads30Days:n,leads90Days:r}),mainContent:_.jsx(Jv,{onSeeMoreClick:Q,currentDate:a,events:s,onDayClick:ce,onEventClick:g})}),_.jsx(bS,{isVisible:l,onClose:P,onSave:O,onDelete:ee,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:t}),_.jsx(SS,{isOpen:h,onClose:()=>m(!1),onConfirm:ge,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),_.jsx(kS,{isOpen:C,onClose:()=>A(!1),events:R,date:Y,onEventClick:g})]})},MS={page:"_page_ok84c_1"},AS=()=>_.jsx("div",{className:MS.page,children:_.jsx("h1",{children:"Page Clientes"})});mt.ApiProvider=xb,mt.Clientes=AS,mt.CustomSnackbar=of,mt.MyCalendar=OS,Object.defineProperty(mt,Symbol.toStringTag,{value:"Module"})}));
|
|
174
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const x=h.compile();return(E,D)=>x(f,E,D)};let a;const i=wa,s=!dd.jitless,l=s&&Kb.value,u=n.catchall;let d;e._zod.parse=(f,h)=>{d??(d=t.value);const m=f.value;return i(m)?s&&l&&h?.async===!1&&h.jitless!==!0?(a||(a=o(n.shape)),f=a(f,h),u?Od([],m,f,h,d,e):f):r(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function Md(e,n,r,t){for(const a of e)if(a.issues.length===0)return n.value=a.value,n;const o=e.filter(a=>!fn(a));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(a=>a.issues.map(i=>Lr(i,t,$r())))}),n)}const j1=L("$ZodUnion",(e,n)=>{We.init(e,n),je(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),je(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),je(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),je(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>ns(a.source)).join("|")})$`)}});const r=n.options.length===1,t=n.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return t(o,a);let i=!1;const s=[];for(const c of n.options){const l=c._zod.run({value:o.value,issues:[]},a);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(c=>Md(c,o,e,a)):Md(s,o,e,a)}}),z1=L("$ZodIntersection",(e,n)=>{We.init(e,n),e._zod.parse=(r,t)=>{const o=r.value,a=n.left._zod.run({value:o,issues:[]},t),i=n.right._zod.run({value:o,issues:[]},t);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([c,l])=>Ad(r,c,l)):Ad(r,a,i)}});function ss(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Qn(e)&&Qn(n)){const r=Object.keys(n),t=Object.keys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...n};for(const a of t){const i=ss(e[a],n[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};o[a]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let t=0;t<e.length;t++){const o=e[t],a=n[t],i=ss(o,a);if(!i.valid)return{valid:!1,mergeErrorPath:[t,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ad(e,n,r){if(n.issues.length&&e.issues.push(...n.issues),r.issues.length&&e.issues.push(...r.issues),fn(e))return e;const t=ss(n.value,r.value);if(!t.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(t.mergeErrorPath)}`);return e.value=t.data,e}const B1=L("$ZodEnum",(e,n)=>{We.init(e,n);const r=Hb(n.entries),t=new Set(r);e._zod.values=t,e._zod.pattern=new RegExp(`^(${r.filter(o=>qb.has(typeof o)).map(o=>typeof o=="string"?dn(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const i=o.value;return t.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),F1=L("$ZodLiteral",(e,n)=>{if(We.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(n.values),e._zod.pattern=new RegExp(`^(${n.values.map(r=>typeof r=="string"?dn(r):r?dn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,t)=>{const o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:n.values,input:o,inst:e}),r}}),V1=L("$ZodTransform",(e,n)=>{We.init(e,n),e._zod.parse=(r,t)=>{if(t.direction==="backward")throw new ud(e.constructor.name);const o=n.transform(r.value,r);if(t.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new ln;return r.value=o,r}});function Pd(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Y1=L("$ZodOptional",(e,n)=>{We.init(e,n),e._zod.optin="optional",e._zod.optout="optional",je(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),je(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${ns(r.source)})?$`):void 0}),e._zod.parse=(r,t)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>Pd(a,r.value)):Pd(o,r.value)}return r.value===void 0?r:n.innerType._zod.run(r,t)}}),U1=L("$ZodNullable",(e,n)=>{We.init(e,n),je(e._zod,"optin",()=>n.innerType._zod.optin),je(e._zod,"optout",()=>n.innerType._zod.optout),je(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${ns(r.source)}|null)$`):void 0}),je(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(r,t)=>r.value===null?r:n.innerType._zod.run(r,t)}),H1=L("$ZodDefault",(e,n)=>{We.init(e,n),e._zod.optin="optional",je(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,t)=>{if(t.direction==="backward")return n.innerType._zod.run(r,t);if(r.value===void 0)return r.value=n.defaultValue,r;const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>Id(a,n)):Id(o,n)}});function Id(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const W1=L("$ZodPrefault",(e,n)=>{We.init(e,n),e._zod.optin="optional",je(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,t)=>(t.direction==="backward"||r.value===void 0&&(r.value=n.defaultValue),n.innerType._zod.run(r,t))}),Z1=L("$ZodNonOptional",(e,n)=>{We.init(e,n),je(e._zod,"values",()=>{const r=n.innerType._zod.values;return r?new Set([...r].filter(t=>t!==void 0)):void 0}),e._zod.parse=(r,t)=>{const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>Rd(a,e)):Rd(o,e)}});function Rd(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const K1=L("$ZodCatch",(e,n)=>{We.init(e,n),je(e._zod,"optin",()=>n.innerType._zod.optin),je(e._zod,"optout",()=>n.innerType._zod.optout),je(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,t)=>{if(t.direction==="backward")return n.innerType._zod.run(r,t);const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(a=>(r.value=a.value,a.issues.length&&(r.value=n.catchValue({...r,error:{issues:a.issues.map(i=>Lr(i,t,$r()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=n.catchValue({...r,error:{issues:o.issues.map(a=>Lr(a,t,$r()))},input:r.value}),r.issues=[]),r)}}),q1=L("$ZodPipe",(e,n)=>{We.init(e,n),je(e._zod,"values",()=>n.in._zod.values),je(e._zod,"optin",()=>n.in._zod.optin),je(e._zod,"optout",()=>n.out._zod.optout),je(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,t)=>{if(t.direction==="backward"){const a=n.out._zod.run(r,t);return a instanceof Promise?a.then(i=>Ma(i,n.in,t)):Ma(a,n.in,t)}const o=n.in._zod.run(r,t);return o instanceof Promise?o.then(a=>Ma(a,n.out,t)):Ma(o,n.out,t)}});function Ma(e,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},r)}const G1=L("$ZodReadonly",(e,n)=>{We.init(e,n),je(e._zod,"propValues",()=>n.innerType._zod.propValues),je(e._zod,"values",()=>n.innerType._zod.values),je(e._zod,"optin",()=>n.innerType._zod.optin),je(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(r,t)=>{if(t.direction==="backward")return n.innerType._zod.run(r,t);const o=n.innerType._zod.run(r,t);return o instanceof Promise?o.then(Nd):Nd(o)}});function Nd(e){return e.value=Object.freeze(e.value),e}const Q1=L("$ZodCustom",(e,n)=>{_t.init(e,n),We.init(e,n),e._zod.parse=(r,t)=>r,e._zod.check=r=>{const t=r.value,o=n.fn(t);if(o instanceof Promise)return o.then(a=>$d(a,r,t,e));$d(o,r,t,e)}});function $d(e,n,r,t){if(!e){const o={code:"custom",input:r,inst:t,path:[...t._zod.def.path??[]],continue:!t._zod.def.abort};t._zod.def.params&&(o.params=t._zod.def.params),n.issues.push(Jn(o))}}class J1{constructor(){this._map=new Map,this._idmap=new Map}add(n,...r){const t=r[0];if(this._map.set(n,t),t&&typeof t=="object"&&"id"in t){if(this._idmap.has(t.id))throw new Error(`ID ${t.id} already exists in the registry`);this._idmap.set(t.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const r=this._map.get(n);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(n),this}get(n){const r=n._zod.parent;if(r){const t={...this.get(r)??{}};delete t.id;const o={...t,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function X1(){return new J1}const Aa=X1();function ew(e,n){return new e({type:"string",...se(n)})}function tw(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...se(n)})}function Ld(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...se(n)})}function rw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...se(n)})}function nw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...se(n)})}function ow(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...se(n)})}function aw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...se(n)})}function iw(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...se(n)})}function sw(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...se(n)})}function cw(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...se(n)})}function lw(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...se(n)})}function uw(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...se(n)})}function dw(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...se(n)})}function fw(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...se(n)})}function pw(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...se(n)})}function hw(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...se(n)})}function mw(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...se(n)})}function gw(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...se(n)})}function vw(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...se(n)})}function yw(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...se(n)})}function bw(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...se(n)})}function _w(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...se(n)})}function ww(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...se(n)})}function Sw(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...se(n)})}function xw(e,n){return new e({type:"string",format:"date",check:"string_format",...se(n)})}function kw(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...se(n)})}function Cw(e,n){return new e({type:"string",format:"duration",check:"string_format",...se(n)})}function Dw(e,n){return new e({type:"number",checks:[],...se(n)})}function Ew(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...se(n)})}function Tw(e,n){return new e({type:"boolean",...se(n)})}function Ow(e){return new e({type:"unknown"})}function Mw(e,n){return new e({type:"never",...se(n)})}function jd(e,n){return new xd({check:"less_than",...se(n),value:e,inclusive:!1})}function cs(e,n){return new xd({check:"less_than",...se(n),value:e,inclusive:!0})}function zd(e,n){return new kd({check:"greater_than",...se(n),value:e,inclusive:!1})}function ls(e,n){return new kd({check:"greater_than",...se(n),value:e,inclusive:!0})}function Bd(e,n){return new W_({check:"multiple_of",...se(n),value:e})}function Fd(e,n){return new K_({check:"max_length",...se(n),maximum:e})}function Pa(e,n){return new q_({check:"min_length",...se(n),minimum:e})}function Vd(e,n){return new G_({check:"length_equals",...se(n),length:e})}function Aw(e,n){return new Q_({check:"string_format",format:"regex",...se(n),pattern:e})}function Pw(e){return new J_({check:"string_format",format:"lowercase",...se(e)})}function Iw(e){return new X_({check:"string_format",format:"uppercase",...se(e)})}function Rw(e,n){return new e1({check:"string_format",format:"includes",...se(n),includes:e})}function Nw(e,n){return new t1({check:"string_format",format:"starts_with",...se(n),prefix:e})}function $w(e,n){return new r1({check:"string_format",format:"ends_with",...se(n),suffix:e})}function Xn(e){return new n1({check:"overwrite",tx:e})}function Lw(e){return Xn(n=>n.normalize(e))}function jw(){return Xn(e=>e.trim())}function zw(){return Xn(e=>e.toLowerCase())}function Bw(){return Xn(e=>e.toUpperCase())}function Fw(e,n,r){return new e({type:"array",element:n,...se(r)})}function Vw(e,n,r){return new e({type:"custom",check:"custom",fn:n,...se(r)})}function Yw(e){const n=Uw(r=>(r.addIssue=t=>{if(typeof t=="string")r.issues.push(Jn(t,r.value,n._zod.def));else{const o=t;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(Jn(o))}},e(r.value,r)));return n}function Uw(e,n){const r=new _t({check:"custom",...se(n)});return r._zod.check=e,r}function Yd(e,n){try{var r=e()}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}function Hw(e,n){for(var r={};e.length;){var t=e[0],o=t.code,a=t.message,i=t.path.join(".");if(!r[i])if("unionErrors"in t){var s=t.unionErrors[0].errors[0];r[i]={message:s.message,type:s.code}}else r[i]={message:a,type:o};if("unionErrors"in t&&t.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),n){var c=r[i].types,l=c&&c[t.code];r[i]=qi(i,n,r,o,l?[].concat(l,t.message):t.message)}e.shift()}return r}function Ww(e,n){for(var r={};e.length;){var t=e[0],o=t.code,a=t.message,i=t.path.join(".");if(!r[i])if(t.code==="invalid_union"&&t.errors.length>0){var s=t.errors[0][0];r[i]={message:s.message,type:s.code}}else r[i]={message:a,type:o};if(t.code==="invalid_union"&&t.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),n){var c=r[i].types,l=c&&c[t.code];r[i]=qi(i,n,r,o,l?[].concat(l,t.message):t.message)}e.shift()}return r}function Zw(e,n,r){if(r===void 0&&(r={}),(function(t){return"_def"in t&&typeof t._def=="object"&&"typeName"in t._def})(e))return function(t,o,a){try{return Promise.resolve(Yd(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](t,n)).then(function(i){return a.shouldUseNativeValidation&&Xi({},a),{errors:{},values:r.raw?Object.assign({},t):i}})},function(i){if((function(s){return Array.isArray(s?.issues)})(i))return{values:{},errors:cd(Hw(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};if((function(t){return"_zod"in t&&typeof t._zod=="object"})(e))return function(t,o,a){try{return Promise.resolve(Yd(function(){return Promise.resolve((r.mode==="sync"?s_:c_)(e,t,n)).then(function(i){return a.shouldUseNativeValidation&&Xi({},a),{errors:{},values:r.raw?Object.assign({},t):i}})},function(i){if((function(s){return s instanceof as})(i))return{values:{},errors:cd(Ww(i.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Kw=L("ZodISODateTime",(e,n)=>{v1.init(e,n),Ye.init(e,n)});function qw(e){return Sw(Kw,e)}const Gw=L("ZodISODate",(e,n)=>{y1.init(e,n),Ye.init(e,n)});function Qw(e){return xw(Gw,e)}const Jw=L("ZodISOTime",(e,n)=>{b1.init(e,n),Ye.init(e,n)});function Xw(e){return kw(Jw,e)}const e2=L("ZodISODuration",(e,n)=>{_1.init(e,n),Ye.init(e,n)});function t2(e){return Cw(e2,e)}const It=L("ZodError",(e,n)=>{as.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>i_(e,r)},flatten:{value:r=>a_(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,es,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,es,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),r2=ka(It),n2=Ca(It),o2=Da(It),a2=Ea(It),i2=d_(It),s2=f_(It),c2=p_(It),l2=h_(It),u2=m_(It),d2=g_(It),f2=v_(It),p2=y_(It),Je=L("ZodType",(e,n)=>(We.init(e,n),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...r)=>e.clone({...n,checks:[...n.checks??[],...r.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),e.clone=(r,t)=>_r(e,r,t),e.brand=()=>e,e.register=((r,t)=>(r.add(e,t),e)),e.parse=(r,t)=>r2(e,r,t,{callee:e.parse}),e.safeParse=(r,t)=>o2(e,r,t),e.parseAsync=async(r,t)=>n2(e,r,t,{callee:e.parseAsync}),e.safeParseAsync=async(r,t)=>a2(e,r,t),e.spa=e.safeParseAsync,e.encode=(r,t)=>i2(e,r,t),e.decode=(r,t)=>s2(e,r,t),e.encodeAsync=async(r,t)=>c2(e,r,t),e.decodeAsync=async(r,t)=>l2(e,r,t),e.safeEncode=(r,t)=>u2(e,r,t),e.safeDecode=(r,t)=>d2(e,r,t),e.safeEncodeAsync=async(r,t)=>f2(e,r,t),e.safeDecodeAsync=async(r,t)=>p2(e,r,t),e.refine=(r,t)=>e.check(lS(r,t)),e.superRefine=r=>e.check(uS(r)),e.overwrite=r=>e.check(Xn(r)),e.optional=()=>Gd(e),e.nullable=()=>Qd(e),e.nullish=()=>Gd(Qd(e)),e.nonoptional=r=>rS(e,r),e.array=()=>z2(e),e.or=r=>Y2([e,r]),e.and=r=>H2(e,r),e.transform=r=>Xd(e,G2(r)),e.default=r=>X2(e,r),e.prefault=r=>tS(e,r),e.catch=r=>oS(e,r),e.pipe=r=>Xd(e,r),e.readonly=()=>sS(e),e.describe=r=>{const t=e.clone();return Aa.add(t,{description:r}),t},Object.defineProperty(e,"description",{get(){return Aa.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Aa.get(e);const t=e.clone();return Aa.add(t,r[0]),t},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ud=L("_ZodString",(e,n)=>{is.init(e,n),Je.init(e,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...t)=>e.check(Aw(...t)),e.includes=(...t)=>e.check(Rw(...t)),e.startsWith=(...t)=>e.check(Nw(...t)),e.endsWith=(...t)=>e.check($w(...t)),e.min=(...t)=>e.check(Pa(...t)),e.max=(...t)=>e.check(Fd(...t)),e.length=(...t)=>e.check(Vd(...t)),e.nonempty=(...t)=>e.check(Pa(1,...t)),e.lowercase=t=>e.check(Pw(t)),e.uppercase=t=>e.check(Iw(t)),e.trim=()=>e.check(jw()),e.normalize=(...t)=>e.check(Lw(...t)),e.toLowerCase=()=>e.check(zw()),e.toUpperCase=()=>e.check(Bw())}),h2=L("ZodString",(e,n)=>{is.init(e,n),Ud.init(e,n),e.email=r=>e.check(tw(m2,r)),e.url=r=>e.check(iw(g2,r)),e.jwt=r=>e.check(ww(A2,r)),e.emoji=r=>e.check(sw(v2,r)),e.guid=r=>e.check(Ld(Hd,r)),e.uuid=r=>e.check(rw(Ia,r)),e.uuidv4=r=>e.check(nw(Ia,r)),e.uuidv6=r=>e.check(ow(Ia,r)),e.uuidv7=r=>e.check(aw(Ia,r)),e.nanoid=r=>e.check(cw(y2,r)),e.guid=r=>e.check(Ld(Hd,r)),e.cuid=r=>e.check(lw(b2,r)),e.cuid2=r=>e.check(uw(_2,r)),e.ulid=r=>e.check(dw(w2,r)),e.base64=r=>e.check(yw(T2,r)),e.base64url=r=>e.check(bw(O2,r)),e.xid=r=>e.check(fw(S2,r)),e.ksuid=r=>e.check(pw(x2,r)),e.ipv4=r=>e.check(hw(k2,r)),e.ipv6=r=>e.check(mw(C2,r)),e.cidrv4=r=>e.check(gw(D2,r)),e.cidrv6=r=>e.check(vw(E2,r)),e.e164=r=>e.check(_w(M2,r)),e.datetime=r=>e.check(qw(r)),e.date=r=>e.check(Qw(r)),e.time=r=>e.check(Xw(r)),e.duration=r=>e.check(t2(r))});function Yt(e){return ew(h2,e)}const Ye=L("ZodStringFormat",(e,n)=>{Ve.init(e,n),Ud.init(e,n)}),m2=L("ZodEmail",(e,n)=>{c1.init(e,n),Ye.init(e,n)}),Hd=L("ZodGUID",(e,n)=>{i1.init(e,n),Ye.init(e,n)}),Ia=L("ZodUUID",(e,n)=>{s1.init(e,n),Ye.init(e,n)}),g2=L("ZodURL",(e,n)=>{l1.init(e,n),Ye.init(e,n)}),v2=L("ZodEmoji",(e,n)=>{u1.init(e,n),Ye.init(e,n)}),y2=L("ZodNanoID",(e,n)=>{d1.init(e,n),Ye.init(e,n)}),b2=L("ZodCUID",(e,n)=>{f1.init(e,n),Ye.init(e,n)}),_2=L("ZodCUID2",(e,n)=>{p1.init(e,n),Ye.init(e,n)}),w2=L("ZodULID",(e,n)=>{h1.init(e,n),Ye.init(e,n)}),S2=L("ZodXID",(e,n)=>{m1.init(e,n),Ye.init(e,n)}),x2=L("ZodKSUID",(e,n)=>{g1.init(e,n),Ye.init(e,n)}),k2=L("ZodIPv4",(e,n)=>{w1.init(e,n),Ye.init(e,n)}),C2=L("ZodIPv6",(e,n)=>{S1.init(e,n),Ye.init(e,n)}),D2=L("ZodCIDRv4",(e,n)=>{x1.init(e,n),Ye.init(e,n)}),E2=L("ZodCIDRv6",(e,n)=>{k1.init(e,n),Ye.init(e,n)}),T2=L("ZodBase64",(e,n)=>{C1.init(e,n),Ye.init(e,n)}),O2=L("ZodBase64URL",(e,n)=>{E1.init(e,n),Ye.init(e,n)}),M2=L("ZodE164",(e,n)=>{T1.init(e,n),Ye.init(e,n)}),A2=L("ZodJWT",(e,n)=>{M1.init(e,n),Ye.init(e,n)}),Wd=L("ZodNumber",(e,n)=>{Dd.init(e,n),Je.init(e,n),e.gt=(t,o)=>e.check(zd(t,o)),e.gte=(t,o)=>e.check(ls(t,o)),e.min=(t,o)=>e.check(ls(t,o)),e.lt=(t,o)=>e.check(jd(t,o)),e.lte=(t,o)=>e.check(cs(t,o)),e.max=(t,o)=>e.check(cs(t,o)),e.int=t=>e.check(Zd(t)),e.safe=t=>e.check(Zd(t)),e.positive=t=>e.check(zd(0,t)),e.nonnegative=t=>e.check(ls(0,t)),e.negative=t=>e.check(jd(0,t)),e.nonpositive=t=>e.check(cs(0,t)),e.multipleOf=(t,o)=>e.check(Bd(t,o)),e.step=(t,o)=>e.check(Bd(t,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function P2(e){return Dw(Wd,e)}const I2=L("ZodNumberFormat",(e,n)=>{A1.init(e,n),Wd.init(e,n)});function Zd(e){return Ew(I2,e)}const R2=L("ZodBoolean",(e,n)=>{P1.init(e,n),Je.init(e,n)});function us(e){return Tw(R2,e)}const N2=L("ZodUnknown",(e,n)=>{I1.init(e,n),Je.init(e,n)});function Kd(){return Ow(N2)}const $2=L("ZodNever",(e,n)=>{R1.init(e,n),Je.init(e,n)});function L2(e){return Mw($2,e)}const j2=L("ZodArray",(e,n)=>{N1.init(e,n),Je.init(e,n),e.element=n.element,e.min=(r,t)=>e.check(Pa(r,t)),e.nonempty=r=>e.check(Pa(1,r)),e.max=(r,t)=>e.check(Fd(r,t)),e.length=(r,t)=>e.check(Vd(r,t)),e.unwrap=()=>e.element});function z2(e,n){return Fw(j2,e,n)}const B2=L("ZodObject",(e,n)=>{L1.init(e,n),Je.init(e,n),je(e,"shape",()=>n.shape),e.keyof=()=>W2(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Kd()}),e.loose=()=>e.clone({...e._zod.def,catchall:Kd()}),e.strict=()=>e.clone({...e._zod.def,catchall:L2()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>e_(e,r),e.safeExtend=r=>t_(e,r),e.merge=r=>r_(e,r),e.pick=r=>Jb(e,r),e.omit=r=>Xb(e,r),e.partial=(...r)=>n_(qd,e,r[0]),e.required=(...r)=>o_(Jd,e,r[0])});function F2(e,n){const r={type:"object",get shape(){return br(this,"shape",e?Zb(e):{}),this.shape},...se(n)};return new B2(r)}const V2=L("ZodUnion",(e,n)=>{j1.init(e,n),Je.init(e,n),e.options=n.options});function Y2(e,n){return new V2({type:"union",options:e,...se(n)})}const U2=L("ZodIntersection",(e,n)=>{z1.init(e,n),Je.init(e,n)});function H2(e,n){return new U2({type:"intersection",left:e,right:n})}const ds=L("ZodEnum",(e,n)=>{B1.init(e,n),Je.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const r=new Set(Object.keys(n.entries));e.extract=(t,o)=>{const a={};for(const i of t)if(r.has(i))a[i]=n.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ds({...n,checks:[],...se(o),entries:a})},e.exclude=(t,o)=>{const a={...n.entries};for(const i of t)if(r.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new ds({...n,checks:[],...se(o),entries:a})}});function W2(e,n){const r=Array.isArray(e)?Object.fromEntries(e.map(t=>[t,t])):e;return new ds({type:"enum",entries:r,...se(n)})}const Z2=L("ZodLiteral",(e,n)=>{F1.init(e,n),Je.init(e,n),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function K2(e,n){return new Z2({type:"literal",values:Array.isArray(e)?e:[e],...se(n)})}const q2=L("ZodTransform",(e,n)=>{V1.init(e,n),Je.init(e,n),e._zod.parse=(r,t)=>{if(t.direction==="backward")throw new ud(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Jn(a,r.value,n));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Jn(i))}};const o=n.transform(r.value,r);return o instanceof Promise?o.then(a=>(r.value=a,r)):(r.value=o,r)}});function G2(e){return new q2({type:"transform",transform:e})}const qd=L("ZodOptional",(e,n)=>{Y1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Gd(e){return new qd({type:"optional",innerType:e})}const Q2=L("ZodNullable",(e,n)=>{U1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Qd(e){return new Q2({type:"nullable",innerType:e})}const J2=L("ZodDefault",(e,n)=>{H1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function X2(e,n){return new J2({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():md(n)}})}const eS=L("ZodPrefault",(e,n)=>{W1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function tS(e,n){return new eS({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():md(n)}})}const Jd=L("ZodNonOptional",(e,n)=>{Z1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function rS(e,n){return new Jd({type:"nonoptional",innerType:e,...se(n)})}const nS=L("ZodCatch",(e,n)=>{K1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oS(e,n){return new nS({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const aS=L("ZodPipe",(e,n)=>{q1.init(e,n),Je.init(e,n),e.in=n.in,e.out=n.out});function Xd(e,n){return new aS({type:"pipe",in:e,out:n})}const iS=L("ZodReadonly",(e,n)=>{G1.init(e,n),Je.init(e,n),e.unwrap=()=>e._zod.def.innerType});function sS(e){return new iS({type:"readonly",innerType:e})}const cS=L("ZodCustom",(e,n)=>{Q1.init(e,n),Je.init(e,n)});function lS(e,n={}){return Vw(cS,e,n)}function uS(e){return Yw(e)}const ef=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,dS=F2({titulo:Yt().min(1,"El campo Título es requerido."),fechaInicio:Yt().min(1,"El campo fecha inicio es requerido."),horaInicio:Yt().min(1,"La hora de inicio es requerida.").regex(ef,{message:"Formato inválido"}),horaFin:Yt().min(1,"La hora fin es requerida.").regex(ef,{message:"Formato inválido"}),todoElDia:us(),fechaFin:Yt().optional(),showEndDate:us().optional(),horaInicio2:Yt().optional(),TodoElDia2:us().optional(),client:Yt().optional(),repetir:Yt().optional(),link:Yt().url("Debe ser una URL válida ejemplo https://www.google.com.").or(K2("")).optional(),descripcion:Yt().optional(),color:Yt().optional(),solID:P2().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"]}),tf=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.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"}),G.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"})),fS="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",pS=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.createElement("g",{clipPath:"url(#a)"},G.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"})),G.createElement("defs",null,G.createElement("clipPath",{id:"a"},G.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),hS="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",mS=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},G.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"}),G.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"}),G.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"})),G.createElement("defs",null,G.createElement("clipPath",{id:"a"},G.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),gS="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",vS=e=>G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},G.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"}),G.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"})),rf=mr(_.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),fs=mr(_.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"),yS={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"},ps=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],nf=(()=>{const e=[];for(let n=0;n<24;n++)for(let r=0;r<60;r+=15){const t=n.toString().padStart(2,"0"),o=r.toString().padStart(2,"0");e.push(`${t}:${o}`)}return e})(),bS=({isVisible:e,onClose:n,onSave:r,onDelete:t,selectedDate:o,initialEvent:a,userId:i,masNombreBD:s,disId:c})=>{const[l,u]=b.useState(!1),[d,f]=b.useState(!1),h=v.format(new Date,"yyyy-MM-dd"),[m,p]=b.useState(""),[y,k]=b.useState([]),[x,E]=b.useState(!1),D=$u(),[C,A]=b.useState([]),{control:R,handleSubmit:K,reset:Y,formState:{errors:W},watch:Q,setValue:g}=Yb({resolver:Zw(dS),defaultValues:{titulo:"",fechaInicio:v.format(new Date,"yyyy-MM-dd"),horaInicio:v.format(new Date,"HH:mm"),horaFin:v.format(v.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:ps[5],solID:null}}),P=Q("fechaInicio"),O=Q("fechaFin"),F=Q("todoElDia");b.useEffect(()=>{if(m.trim()===""||!i||!c||!s){k([]);return}E(!0);const j=setTimeout(()=>{D.getClients(m,c,s,i).then(re=>{E(!1);const I=Array.from(new Map(re.map(z=>[z.nombreCliente,z])).values());k(I)}).catch(re=>{console.error("Error al buscar clientes:",re),E(!1)})},500);return()=>clearTimeout(j)},[m,i,c,s]),b.useEffect(()=>{if(P&&O){const j=new Date(P),re=new Date(O);(j===re||j>re)&&g("fechaFin",P)}},[P,O,g]),b.useEffect(()=>{g("showEndDate",l)},[l,g]),b.useEffect(()=>{if(a){const j=v.format(a.fechaInicio,"yyyy-MM-dd")===v.format(a.fechaFin,"yyyy-MM-dd");u(!j),g("titulo",a?.titulo),g("fechaInicio",v.format(a.fechaInicio,"yyyy-MM-dd")),g("fechaFin",v.format(a.fechaFin,"yyyy-MM-dd")),g("horaInicio",v.format(a.fechaInicio,"HH:mm")),g("horaFin",v.format(a.fechaFin,"HH:mm")),g("horaInicio2",v.format(a.fechaFin,"HH:mm")),g("descripcion",a.descripcion),g("link",a.link),g("repetir",a.repetir),g("color",a.color),g("todoElDia",a.todoElDia)}else{const j=o||new Date,re=new Date,I=new Date(j.getFullYear(),j.getMonth(),j.getDate(),re.getHours(),re.getMinutes()),z=v.addHours(I,1);Y({titulo:"",fechaInicio:v.format(I,"yyyy-MM-dd"),horaInicio:v.format(I,"HH:mm"),fechaFin:v.format(z,"yyyy-MM-dd"),horaFin:v.format(z,"HH:mm"),horaInicio2:v.format(z,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:ps[5],solID:null}),u(!1)}},[a,e,o]);const B=K(j=>{r(j,a?.eventoID),n(),Y(),u(!1)},j=>{console.log("Errores de validación:",j)});b.useEffect(()=>{F&&(g("horaInicio","00:00"),g("horaFin","23:59"))},[F,g,Q]);const ee=()=>{const j=Q("fechaInicio");if(j){const re=new Date(`${j}T00:00:00`),I=v.addDays(re,1);g("fechaFin",v.format(I,"yyyy-MM-dd"))}u(!0)};return _.jsx(U.Modal,{open:e,onClose:n,children:_.jsxs(U.Box,{sx:yS,children:[_.jsx(U.IconButton,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:12},children:_.jsx(fs,{})}),_.jsx(U.Typography,{variant:"h6",mb:2,children:a?"Editar evento":"Agregar evento"}),_.jsxs(U.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(Ft,{name:"titulo",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!W.titulo,helperText:W.titulo?.message,sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"},"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(U.Divider,{})}),_.jsx(U.Grid,{size:{xs:12,md:4},children:_.jsx(Ft,{name:"fechaInicio",control:R,render:({field:j})=>_.jsx(U.TextField,{fullWidth:!0,...j,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!W.fechaInicio,helperText:W.fechaInicio?.message})})}),l?_.jsxs(_.Fragment,{children:[_.jsx(U.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),_.jsx(U.Grid,{size:{xs:11,md:4},children:_.jsx(Ft,{name:"fechaFin",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:P||h},error:!!W.fechaFin,helperText:W.fechaFin?.message})})}),!a&&_.jsx(U.Grid,{size:{xs:1,md:1},children:_.jsx(U.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:_.jsx(tf,{})})})]}):_.jsx(U.Grid,{size:{xs:12,md:7}})]}),l&&_.jsx(_.Fragment,{children:_.jsxs(U.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[_.jsx(U.Grid,{size:{xs:6,md:5}}),_.jsx(U.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:_.jsx(rf,{sx:{color:"#757575",margin:0,padding:0}})})]})}),_.jsxs(U.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[_.jsx(U.Grid,{size:{xs:12,md:4},children:_.jsx(Ft,{name:"horaInicio",control:R,render:({field:{onChange:j,value:re,...I}})=>_.jsx(U.Autocomplete,{freeSolo:!0,options:nf,value:re||"",onChange:(z,ce)=>j(ce||""),onInputChange:(z,ce)=>j(ce),renderInput:z=>_.jsx(U.TextField,{...z,...I,size:"small",error:!!W.horaInicio,helperText:W.horaInicio?.message,InputProps:{...z.InputProps,endAdornment:_.jsx(U.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:_.jsx(Lu,{})})}}),disabled:Q("todoElDia")})})}),_.jsx(U.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:!l&&_.jsx(rf,{sx:{color:"#757575"}})}),l&&_.jsx(U.Grid,{size:{xs:2,md:2}}),_.jsx(U.Grid,{size:{xs:12,md:4},children:_.jsx(Ft,{name:"horaFin",control:R,render:({field:{onChange:j,value:re,...I}})=>_.jsx(U.Autocomplete,{freeSolo:!0,options:nf,value:re||"",onChange:(z,ce)=>j(ce||""),onInputChange:(z,ce)=>j(ce),renderInput:z=>_.jsx(U.TextField,{...z,...I,size:"small",error:!!W.horaFin,helperText:W.horaFin?.message,InputProps:{...z.InputProps,endAdornment:_.jsx(U.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:_.jsx(Lu,{})})}}),disabled:Q("todoElDia")})})}),_.jsx(U.Grid,{size:{xs:12,md:3},hidden:l,children:_.jsx(Ft,{name:"todoElDia",control:R,render:({field:j})=>_.jsx(U.FormControlLabel,{control:_.jsx(U.Checkbox,{checked:j.value,onChange:re=>j.onChange(re.target.checked)}),label:_.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:!l&&_.jsx(_.Fragment,{children:_.jsxs(U.Button,{onClick:ee,size:"small",sx:{textTransform:"none",fontSize:16},children:[_.jsx(mS,{})," Agregar fecha final"]})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(U.Divider,{})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:!d&&_.jsxs(U.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[_.jsx(vS,{})," Vincular cliente"]})}),d&&_.jsxs(_.Fragment,{children:[_.jsx(U.Grid,{size:{xs:12,md:7},children:_.jsx(Ft,{name:"client",control:R,render:({field:j})=>_.jsx(U.Autocomplete,{options:y,loading:x,getOptionLabel:re=>re.nombreCliente?.trim()||"",value:y.find(re=>re.nombreCliente===j.value)||null,onInputChange:(re,I)=>{p(I)},onChange:(re,I)=>{if(j.onChange(I?I.nombreCliente:""),g("solID",I?I.solID:null),I&&I.nombreCliente){const z=y.filter(ce=>ce.nombreCliente===I.nombreCliente&&ce.solID).map(ce=>ce.solID);A([...new Set(z)])}else A([])},renderInput:re=>_.jsx(U.TextField,{...re,placeholder:"Buscar cliente...",size:"small",InputProps:{...re.InputProps,startAdornment:_.jsx("img",{src:hS,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}}),endAdornment:_.jsxs(_.Fragment,{children:[x?_.jsx(U.CircularProgress,{color:"inherit",size:20}):null,re.InputProps.endAdornment]})}})})})}),_.jsx(U.Grid,{size:{xs:11,md:4},children:_.jsx(Ft,{name:"solID",control:R,render:({field:j})=>_.jsx(U.Autocomplete,{options:C,getOptionLabel:re=>re.toString(),value:j.value??null,onChange:(re,I)=>j.onChange(I),renderInput:re=>_.jsx(U.TextField,{...re,label:"#Registro",variant:"outlined",size:"small"}),disabled:!y})})}),_.jsx(U.Grid,{size:{xs:1,md:1},children:_.jsx(U.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:_.jsx(tf,{})})})]}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(U.Divider,{})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(Ft,{name:"link",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!W.link,helperText:W.link?.message,InputProps:{startAdornment:_.jsx("img",{src:fS,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsx(Ft,{name:"descripcion",control:R,render:({field:j})=>_.jsx(U.TextField,{...j,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,variant:"outlined",size:"small",InputProps:{startAdornment:_.jsx("img",{src:gS,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),_.jsx(U.Grid,{size:{xs:12,md:12},children:_.jsxs(U.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[_.jsx(pS,{}),ps.map(j=>_.jsx(Ft,{name:"color",control:R,render:({field:re})=>_.jsx(U.IconButton,{onClick:()=>re.onChange(j),sx:{width:24,height:24,borderRadius:"50%",bgcolor:j,border:re.value===j?"2px solid":"none",borderColor:re.value===j?"primary.main":"transparent"}})},j))]})})]}),_.jsxs(U.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[a&&_.jsx(U.Button,{onClick:t,variant:"outlined",color:"error",children:"Eliminar"}),_.jsx(U.Button,{onClick:n,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),_.jsx(U.Button,{onClick:B,variant:"contained",sx:{textTransform:"none"},children:"Guardar"})]})]})})},_S="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",wS={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},SS=({isOpen:e,onClose:n,onConfirm:r,title:t,message:o})=>_.jsx(U.Modal,{open:e,onClose:n,children:_.jsxs(U.Box,{sx:wS,children:[_.jsx("img",{src:_S}),_.jsx(U.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:t}),_.jsx(U.Typography,{sx:{mt:2},children:o}),_.jsxs(U.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[_.jsx(U.Button,{variant:"outlined",onClick:n,sx:{textTransform:"none"},children:"Regresar"}),_.jsxs(U.Button,{variant:"contained",color:"error",onClick:r,sx:{textTransform:"none"},children:[_.jsx("span",{className:"icon-eliminar",children:" "})," Eliminar"]})]})]})}),xS={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},kS=({isOpen:e,onClose:n,events:r,date:t,onEventClick:o})=>{if(!t)return null;const a=i=>{o(i),n()};return _.jsx(U.Modal,{open:e,onClose:n,children:_.jsxs(U.Box,{sx:xS,children:[_.jsxs(U.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[_.jsxs(U.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",t.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),_.jsx(U.IconButton,{onClick:n,children:_.jsx(fs,{})})]}),_.jsx(U.Divider,{}),_.jsx(U.List,{children:r.map(i=>_.jsx(U.ListItem,{disablePadding:!0,children:_.jsxs(U.ListItemButton,{onClick:()=>a(i),sx:{py:.5},children:[_.jsx(U.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:i.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),_.jsx(U.ListItemText,{primary:i.titulo,secondary:`${v.format(i.fechaInicio,"HH:mm")} - ${v.format(i.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"}}})]})},i.eventoID))})]})})},CS=mr(_.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"),DS=mr(_.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"),ES="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",TS="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",of=b.forwardRef(({id:e,message:n,variant:r},t)=>{const{closeSnackbar:o}=$a.useSnackbar(),a={success:{color:"#fff",icon:_.jsx("img",{width:25,src:TS,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:_.jsx(CS,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:_.jsx(DS,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:_.jsx("img",{src:ES,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},i=a[r]||a.info;return _.jsx($a.SnackbarContent,{ref:t,children:_.jsxs(U.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 ${i.color}`},children:[_.jsx(U.Box,{sx:{mr:1.5},children:i.icon}),_.jsx(U.Typography,{variant:"body2",sx:{flexGrow:1},children:n}),_.jsx(U.IconButton,{size:"small",onClick:()=>o(e),children:_.jsx(fs,{fontSize:"small"})})]})})}),OS=({userId:e,leads30Days:n,leads90Days:r,disId:t,masNombreBD:o})=>{const[a,i]=b.useState(new Date),[s,c]=b.useState([]),[l,u]=b.useState(!1),[d,f]=b.useState(null),[h,m]=b.useState(!1),[p,y]=b.useState(null),[k,x]=b.useState([]),{enqueueSnackbar:E}=$a.useSnackbar(),D=$u(),[C,A]=b.useState(!1),[R,K]=b.useState([]),[Y,W]=b.useState(null),Q=(Z,le)=>{K(Z),W(le),A(!0)};console.log(t),b.useEffect(()=>{(async()=>{try{if(e){const le=await D.getEventsByUser(e);c(le)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}finally{console.log("Eventos han sido cargados")}})()},[a]),b.useEffect(()=>{const Z=new Date,le=v.startOfDay(Z),ue=v.endOfDay(v.addDays(le,6)),de={start:le,end:ue},he=s.filter(me=>{const fe={start:me.fechaInicio,end:me.fechaFin};return zl(fe,de)}).sort((me,fe)=>me.fechaInicio.getTime()-fe.fechaInicio.getTime());x(he)},[s]);const g=async Z=>{try{const le=await D.getEventById(Z.eventoID);f(le),u(!0)}catch(le){console.error(le)}},P=()=>{u(!1),f(null)},O=async(Z,le)=>{let ue,de;Z.todoElDia?(ue=new Date(`${Z.fechaInicio}T${Z.horaInicio}`),de=new Date(`${Z.fechaInicio}T${Z.horaFin}`)):(ue=new Date(`${Z.fechaInicio}T${Z.horaInicio}`),de=Z.fechaFin&&Z.horaInicio2?new Date(`${Z.fechaFin}T${Z.horaInicio2}`):new Date(ue.getTime()+3600*1e3));const he=v.format(ue,"yyyy-MM-dd HH:mm:ss.SSS"),me=v.format(de,"yyyy-MM-dd HH:mm:ss.SSS");if(le){const Ze={...Z,eventoID:le,fechaInicio:he,fechaFin:me};try{const q=await D.updateEvent(Ze);var fe=s.map(at=>at.eventoID===q.eventoID?q:at);c(fe),E("El evento se ha actualizado correctamente.",{variant:"success"}),P()}catch{E("Error al eliactualizar Evento",{variant:"error"})}}else{const Ze={...Z,fechaInicio:he,fechaFin:me,todoElDia:Z.todoElDia};try{const q=await D.createEvent(Ze,e);c(at=>[...at,q]),E("El evento se ha creado con éxito",{variant:"success"}),P()}catch{E("Error al guardar Evento",{variant:"error"})}}},F=()=>{i(Z=>new Date(Z.getFullYear(),Z.getMonth()-1,1))},B=()=>{i(Z=>new Date(Z.getFullYear(),Z.getMonth()+1,1))},ee=()=>{m(!0)},j=()=>{y(new Date),u(!0)},re=()=>alert("Sincronizar con Google Calendar"),I=()=>alert("Sincronizar con Outlook Calendar"),z=Z=>{Z&&i(Z)},ce=Z=>{y(Z),u(!0),f(null)},ge=async()=>{if(d)try{await D.deleteEvent(d.eventoID),c(s.filter(Z=>Z.eventoID!==d.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(Z,le)=>_.jsx(of,{id:Z,message:String(le),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{P(),m(!1)}};return _.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[_.jsx(Fm,{header:_.jsx(sv,{currentDate:a,onPrevMonth:F,onNextMonth:B,onAddEvent:j,onDateChange:z}),sidebar:_.jsx(Yv,{onEventClick:g,upcomingEvents:k,onSyncGoogle:re,onSyncOutlook:I,leads30Days:n,leads90Days:r}),mainContent:_.jsx(Jv,{onSeeMoreClick:Q,currentDate:a,events:s,onDayClick:ce,onEventClick:g})}),_.jsx(bS,{isVisible:l,onClose:P,onSave:O,onDelete:ee,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:t}),_.jsx(SS,{isOpen:h,onClose:()=>m(!1),onConfirm:ge,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),_.jsx(kS,{isOpen:C,onClose:()=>A(!1),events:R,date:Y,onEventClick:g})]})},MS={page:"_page_ok84c_1"},AS=()=>_.jsx("div",{className:MS.page,children:_.jsx("h1",{children:"Page Clientes"})});mt.ApiProvider=xb,mt.Clientes=AS,mt.CustomSnackbar=of,mt.MyCalendar=OS,Object.defineProperty(mt,Symbol.toStringTag,{value:"Module"})}));
|