@botuyo/chat-widget-standalone 1.0.48 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import*as e from"react";import t,{createContext as r,useState as n,useEffect as o,useContext as a,useCallback as s,forwardRef as i,createElement as l,useMemo as c,memo as d,Suspense as u,lazy as m,useRef as h,Component as p}from"react";import{jsx as g,jsxs as f,Fragment as b}from"react/jsx-runtime";import{flushSync as x}from"react-dom";import{M as v,r as y,a as w}from"./chunk-markdown-QS0MJc8h.js";const k={es:{online:"En línea",offline:"Desconectado",connecting:"Conectando...",con_amor_paseo_libre:"Con ❤️ por BotUyo",preview:"Vista previa",fotos:"Fotos",ubicacion:"Ubicación",input_placeholder:"Escribe un mensaje...",send:"Enviar",cancel:"Cancelar",call:"Llamar",call_confirm:"¿Iniciar llamada de voz?",attach_photo:"Adjuntar foto",attach_location:"Compartir ubicación",recording:"Grabando...",rate_limit_exceeded:"Has enviado demasiados mensajes. Espera un momento.",connection_error:"Error de conexión",file_too_large:"Archivo demasiado grande",invalid_file:"Tipo de archivo no válido",extracted:{assistant:"Asistente",anterior:"Anterior",siguiente:"Siguiente",cerrar:"Cerrar",cerrar_chat:"Cerrar chat",abrir_chat:"Abrir chat",ver_ubicacion:"Ver ubicación"},accessibility:{closeChat:"Cerrar ventana de chat",closeChatHint:"Presiona Escape para cerrar",chatMessages:"Mensajes del chat",messageHistory:"Historial de mensajes",dialogDescription:"Ventana de chat con {{botName}}. Presiona Escape para cerrar. Usa Ctrl+Enter para enviar mensajes.",sendMessage:"Enviar mensaje",sendMessageHint:"Presiona Enter o Ctrl+Enter para enviar",typeMessage:"Escribe tu mensaje aquí",botMessage:"Mensaje del asistente",userMessage:"Tu mensaje",messageFrom:"Mensaje de {{sender}}",messageTime:"Enviado {{time}}",newMessage:"Nuevo mensaje recibido"}},en:{online:"Online",offline:"Offline",connecting:"Connecting...",con_amor_paseo_libre:"With ❤️ by BotUyo",preview:"Preview",fotos:"Photos",ubicacion:"Location",input_placeholder:"Type a message...",send:"Send",cancel:"Cancel",call:"Call",call_confirm:"Start a voice call?",attach_photo:"Attach photo",attach_location:"Share location",recording:"Recording...",rate_limit_exceeded:"You have sent too many messages. Please wait.",connection_error:"Connection error",file_too_large:"File too large",invalid_file:"Invalid file type",extracted:{assistant:"Assistant",anterior:"Previous",siguiente:"Next",cerrar:"Close",cerrar_chat:"Close chat",abrir_chat:"Open chat",ver_ubicacion:"View location"},accessibility:{closeChat:"Close chat window",closeChatHint:"Press Escape to close",chatMessages:"Chat messages",messageHistory:"Message history",dialogDescription:"Chat window with {{botName}}. Press Escape to close. Use Ctrl+Enter to send messages.",sendMessage:"Send message",sendMessageHint:"Press Enter or Ctrl+Enter to send",typeMessage:"Type your message here",botMessage:"Assistant message",userMessage:"Your message",messageFrom:"Message from {{sender}}",messageTime:"Sent {{time}}",newMessage:"New message received"}},pt:{online:"Online",offline:"Desconectado",connecting:"Conectando...",con_amor_paseo_libre:"Com ❤️ por BotUyo",preview:"Visualizar",fotos:"Fotos",ubicacion:"Localização",input_placeholder:"Digite uma mensagem...",send:"Enviar",cancel:"Cancelar",call:"Ligar",call_confirm:"Iniciar chamada de voz?",attach_photo:"Anexar foto",attach_location:"Compartilhar localização",recording:"Gravando...",rate_limit_exceeded:"Você enviou muitas mensagens. Aguarde um momento.",connection_error:"Erro de conexão",file_too_large:"Arquivo muito grande",invalid_file:"Tipo de arquivo inválido",extracted:{assistant:"Assistente",anterior:"Anterior",siguiente:"Próximo",cerrar:"Fechar",cerrar_chat:"Fechar chat",abrir_chat:"Abrir chat",ver_ubicacion:"Ver localização"},accessibility:{closeChat:"Fechar janela de chat",closeChatHint:"Pressione Escape para fechar",chatMessages:"Mensagens do chat",messageHistory:"Histórico de mensagens",dialogDescription:"Janela de chat com {{botName}}. Pressione Escape para fechar. Use Ctrl+Enter para enviar mensagens.",sendMessage:"Enviar mensagem",sendMessageHint:"Pressione Enter ou Ctrl+Enter para enviar",typeMessage:"Digite sua mensagem aqui",botMessage:"Mensagem do assistente",userMessage:"Sua mensagem",messageFrom:"Mensagem de {{sender}}",messageTime:"Enviado {{time}}",newMessage:"Nova mensagem recebida"}},fr:{online:"En ligne",offline:"Déconnecté",connecting:"Connexion...",con_amor_paseo_libre:"Avec ❤️ par BotUyo",preview:"Aperçu",fotos:"Photos",ubicacion:"Emplacement",input_placeholder:"Tapez un message...",send:"Envoyer",cancel:"Annuler",call:"Appeler",call_confirm:"Démarrer un appel vocal?",attach_photo:"Joindre une photo",attach_location:"Partager la localisation",recording:"Enregistrement...",rate_limit_exceeded:"Vous avez envoyé trop de messages. Veuillez patienter.",connection_error:"Erreur de connexion",file_too_large:"Fichier trop volumineux",invalid_file:"Type de fichier invalide",extracted:{assistant:"Assistant",anterior:"Précédent",siguiente:"Suivant",cerrar:"Fermer",cerrar_chat:"Fermer le chat",abrir_chat:"Ouvrir le chat",ver_ubicacion:"Voir l'emplacement"},accessibility:{closeChat:"Fermer la fenêtre de chat",closeChatHint:"Appuyez sur Échap pour fermer",chatMessages:"Messages du chat",messageHistory:"Historique des messages",dialogDescription:"Fenêtre de chat avec {{botName}}. Appuyez sur Échap pour fermer. Utilisez Ctrl+Entrée pour envoyer des messages.",sendMessage:"Envoyer un message",sendMessageHint:"Appuyez sur Entrée ou Ctrl+Entrée pour envoyer",typeMessage:"Tapez votre message ici",botMessage:"Message de l'assistant",userMessage:"Votre message",messageFrom:"Message de {{sender}}",messageTime:"Envoyé {{time}}",newMessage:"Nouveau message reçu"}}};function C(){if("undefined"==typeof navigator)return"es";const e=navigator.language.split("-")[0];return k[e]?e:"es"}const N={locale:C(),setLocale:()=>{}},M=r(N),z="botuyo-chat-locale";function S({children:e,defaultLocale:t}){const[r,a]=n(()=>{if(t)return t;if("undefined"!=typeof window){const e=localStorage.getItem(z);if(e)return e}return C()});return o(()=>{if("undefined"==typeof window||t)return;const e=()=>{localStorage.getItem(z)||a(C())};return window.addEventListener("languagechange",e),()=>window.removeEventListener("languagechange",e)},[t]),/* @__PURE__ */g(M.Provider,{value:{locale:r,setLocale:e=>{["es","en","pt","fr"].includes(e)?(a(e),"undefined"!=typeof window&&localStorage.setItem(z,e)):console.warn(`[BotUyo] Locale "${e}" no es soportado. Manteniendo "${r}"`)}},children:e})}function E(){return a(M)??N}function j(e){const{locale:t,setLocale:r}=E();return{t:s(r=>{var n,o;return(n=k[t],(o=e?`${e}.${r}`:r).split(".").reduce((e,t)=>e?.[t],n)||o)||r},[t,e]),setLocale:r,currentLocale:t}}const A=(...e)=>e.filter((e,t,r)=>Boolean(e)&&r.indexOf(e)===t).join(" ");var _={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const I=i(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...i},c)=>l("svg",{ref:c,..._,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:A("lucide",o),...i},[...s.map(([e,t])=>l(e,t)),...Array.isArray(a)?a:[a]])),F=(e,t)=>{const r=i(({className:r,...n},o)=>{return l(I,{ref:o,iconNode:t,className:A(`lucide-${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n});var a});return r.displayName=`${e}`,r},L=F("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),$=F("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),T=F("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),O=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),D=F("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),U=F("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),W=F("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),R=F("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),P=F("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),B=F("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),V=F("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),H=F("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),q=F("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),G=F("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),K=F("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),Z=F("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),Y=F("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),J=F("PhoneOff",[["path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91",key:"z86iuo"}],["line",{x1:"22",x2:"2",y1:"2",y2:"22",key:"11kh81"}]]),X=F("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),Q=F("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),ee=F("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),te=F("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),re=F("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),ne=F("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),oe=F("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ae=F("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]),se=F("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ie=F("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function le(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=le(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const ce=(e=/* @__PURE__ */new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),de="-",ue=[],me=e=>{const t=ge(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return pe(e);const r=e.split(de),n=""===r[0]&&r.length>1?1:0;return he(r,n,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=n[e],o=r[e];return t?o?((e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r})(o,t):t:o||ue}return r[e]||ue}}},he=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const r=he(e,t+1,o);if(r)return r}const a=r.validators;if(null===a)return;const s=0===t?e.join(de):e.slice(t).join(de),i=a.length;for(let l=0;l<i;l++){const e=a[l];if(e.validator(s))return e.classGroupId}},pe=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?"arbitrary.."+n:void 0})(),ge=e=>{const{theme:t,classGroups:r}=e;return fe(r,t)},fe=(e,t)=>{const r=ce();for(const n in e){const o=e[n];be(o,r,n,t)}return r},be=(e,t,r,n)=>{const o=e.length;for(let a=0;a<o;a++){const o=e[a];xe(o,t,r,n)}},xe=(e,t,r,n)=>{"string"!=typeof e?"function"!=typeof e?we(e,t,r,n):ye(e,t,r,n):ve(e,t,r)},ve=(e,t,r)=>{(""===e?t:ke(t,e)).classGroupId=r},ye=(e,t,r,n)=>{Ce(e)?be(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},we=(e,t,r,n)=>{const o=Object.entries(e),a=o.length;for(let s=0;s<a;s++){const[e,a]=o[s];be(a,ke(t,e),r,n)}},ke=(e,t)=>{let r=e;const n=t.split(de),o=n.length;for(let a=0;a<o;a++){const e=n[a];let t=r.nextPart.get(e);t||(t=ce(),r.nextPart.set(e,t)),r=t}return r},Ce=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=/* @__PURE__ */Object.create(null),n=/* @__PURE__ */Object.create(null);const o=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=/* @__PURE__ */Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(o(e,t),t):void 0},set(e,t){e in r?r[e]=t:o(e,t)}}},Me=[],ze=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Se=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,a=0;const s=e.length;for(let d=0;d<s;d++){const s=e[d];if(0===n&&0===o){if(":"===s){t.push(e.slice(a,d)),a=d+1;continue}if("/"===s){r=d;continue}}"["===s?n++:"]"===s?n--:"("===s?o++:")"===s&&o--}const i=0===t.length?e:e.slice(a);let l=i,c=!1;return i.endsWith("!")?(l=i.slice(0,-1),c=!0):i.startsWith("!")&&(l=i.slice(1),c=!0),ze(t,c,l,r&&r>a?r-a:void 0)};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):ze(Me,!1,t,void 0,!0)}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},Ee=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let n=[];for(let o=0;o<e.length;o++){const a=e[o],s="["===a[0],i=t.has(a);s||i?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(a)):n.push(a)}return n.length>0&&(n.sort(),r.push(...n)),r}},je=/\s+/,Ae=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ae(e[n]))&&(r&&(r+=" "),r+=t);return r},_e=[],Ie=e=>{const t=t=>t[e]||_e;return t.isThemeGetter=!0,t},Fe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Le=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$e=/^\d+\/\d+$/,Te=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,De=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,We=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Re=e=>$e.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>!!e&&Number.isInteger(Number(e)),Ve=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),He=e=>Te.test(e),qe=()=>!0,Ge=e=>Oe.test(e)&&!De.test(e),Ke=()=>!1,Ze=e=>Ue.test(e),Ye=e=>We.test(e),Je=e=>!Qe(e)&&!at(e),Xe=e=>mt(e,ft,Ke),Qe=e=>Fe.test(e),et=e=>mt(e,bt,Ge),tt=e=>mt(e,xt,Pe),rt=e=>mt(e,pt,Ke),nt=e=>mt(e,gt,Ye),ot=e=>mt(e,yt,Ze),at=e=>Le.test(e),st=e=>ht(e,bt),it=e=>ht(e,vt),lt=e=>ht(e,pt),ct=e=>ht(e,ft),dt=e=>ht(e,gt),ut=e=>ht(e,yt,!0),mt=(e,t,r)=>{const n=Fe.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},ht=(e,t,r=!1)=>{const n=Le.exec(e);return!!n&&(n[1]?t(n[1]):r)},pt=e=>"position"===e||"percentage"===e,gt=e=>"image"===e||"url"===e,ft=e=>"length"===e||"size"===e||"bg-size"===e,bt=e=>"length"===e,xt=e=>"number"===e,vt=e=>"family-name"===e,yt=e=>"shadow"===e,wt=/* @__PURE__ */((e,...t)=>{let r,n,o,a;const s=e=>{const t=n(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(je);let l="";for(let c=i.length-1;c>=0;c-=1){const e=i[c],{isExternal:t,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:h}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!h,g=n(p?m.substring(0,h):m);if(!g){if(!p){l=e+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=e+(l.length>0?" "+l:l);continue}p=!1}const f=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=u?f+"!":f,x=b+g;if(s.indexOf(x)>-1)continue;s.push(x);const v=o(g,p);for(let r=0;r<v.length;++r){const e=v[r];s.push(b+e)}l=e+(l.length>0?" "+l:l)}return l})(e,r);return o(e,a),a};return a=i=>{const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:Ne(e.cacheSize),parseClassName:Se(e),sortModifiers:Ee(e),...me(e)}))(l),n=r.cache.get,o=r.cache.set,a=s,s(i)},(...e)=>a(((...e)=>{let t,r,n=0,o="";for(;n<e.length;)(t=e[n++])&&(r=Ae(t))&&(o&&(o+=" "),o+=r);return o})(...e))})(()=>{const e=Ie("color"),t=Ie("font"),r=Ie("text"),n=Ie("font-weight"),o=Ie("tracking"),a=Ie("leading"),s=Ie("breakpoint"),i=Ie("container"),l=Ie("spacing"),c=Ie("radius"),d=Ie("shadow"),u=Ie("inset-shadow"),m=Ie("text-shadow"),h=Ie("drop-shadow"),p=Ie("blur"),g=Ie("perspective"),f=Ie("aspect"),b=Ie("ease"),x=Ie("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",at,Qe],y=()=>[at,Qe,l],w=()=>[Re,"full","auto",...y()],k=()=>[Be,"none","subgrid",at,Qe],C=()=>["auto",{span:["full",Be,at,Qe]},Be,at,Qe],N=()=>[Be,"auto",at,Qe],M=()=>["auto","min","max","fr",at,Qe],z=()=>["auto",...y()],S=()=>[Re,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],E=()=>[e,at,Qe],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",lt,rt,{position:[at,Qe]}],A=()=>["auto","cover","contain",ct,Xe,{size:[at,Qe]}],_=()=>[Ve,st,et],I=()=>["","none","full",c,at,Qe],F=()=>["",Pe,st,et],L=()=>[Pe,Ve,lt,rt],$=()=>["","none",p,at,Qe],T=()=>["none",Pe,at,Qe],O=()=>["none",Pe,at,Qe],D=()=>[Pe,at,Qe],U=()=>[Re,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[qe],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[Je],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",Pe],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Re,Qe,at,f]}],container:["container"],columns:[{columns:[Pe,Qe,at,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",at,Qe]}],basis:[{basis:[Re,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Re,"auto","initial","none",Qe]}],grow:[{grow:["",Pe,at,Qe]}],shrink:[{shrink:["",Pe,at,Qe]}],order:[{order:[Be,"first","last","none",at,Qe]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[i,"screen",...S()]}],"min-w":[{"min-w":[i,"screen","none",...S()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",r,st,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,at,tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ve,Qe]}],"font-family":[{font:[it,Qe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,at,Qe]}],"line-clamp":[{"line-clamp":[Pe,"none",at,tt]}],leading:[{leading:[a,...y()]}],"list-image":[{"list-image":["none",at,Qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",at,Qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",at,et]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Pe,"auto",at,Qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",at,Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",at,Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,at,Qe],radial:["",at,Qe],conic:[Be,at,Qe]},dt,nt]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,at,Qe]}],"outline-w":[{outline:["",Pe,st,et]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",d,ut,ot]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",u,ut,ot]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[Pe,et]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",m,ut,ot]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Pe,at,Qe]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[at,Qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",at,Qe]}],filter:[{filter:["","none",at,Qe]}],blur:[{blur:$()}],brightness:[{brightness:[Pe,at,Qe]}],contrast:[{contrast:[Pe,at,Qe]}],"drop-shadow":[{"drop-shadow":["","none",h,ut,ot]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",Pe,at,Qe]}],"hue-rotate":[{"hue-rotate":[Pe,at,Qe]}],invert:[{invert:["",Pe,at,Qe]}],saturate:[{saturate:[Pe,at,Qe]}],sepia:[{sepia:["",Pe,at,Qe]}],"backdrop-filter":[{"backdrop-filter":["","none",at,Qe]}],"backdrop-blur":[{"backdrop-blur":$()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,at,Qe]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,at,Qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,at,Qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,at,Qe]}],"backdrop-invert":[{"backdrop-invert":["",Pe,at,Qe]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,at,Qe]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,at,Qe]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,at,Qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",at,Qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",at,Qe]}],ease:[{ease:["linear","initial",b,at,Qe]}],delay:[{delay:[Pe,at,Qe]}],animate:[{animate:["none",x,at,Qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,at,Qe]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:T()}],"rotate-x":[{"rotate-x":T()}],"rotate-y":[{"rotate-y":T()}],"rotate-z":[{"rotate-z":T()}],scale:[{scale:O()}],"scale-x":[{"scale-x":O()}],"scale-y":[{"scale-y":O()}],"scale-z":[{"scale-z":O()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[at,Qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",at,Qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",at,Qe]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[Pe,st,et,tt]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function kt(...e){return wt(function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=le(e))&&(n&&(n+=" "),n+=t);return n}(e))}const Ct={background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%",cardForeground:"240 10% 3.9%",primary:"160 84% 39%",primaryForeground:"0 0% 100%",muted:"240 4.8% 95.9%",mutedForeground:"240 3.8% 46.1%",border:"240 5.9% 90%",destructive:"0 84.2% 60.2%",radius:"0.5rem",spacing1:"0.25rem",spacing2:"0.5rem",spacing3:"0.75rem",spacing4:"1rem",spacing5:"0.75rem",spacing6:"1.5rem",spacing8:"2rem"},Nt={background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 10%",cardForeground:"0 0% 98%",primary:"160 84% 39%",primaryForeground:"0 0% 100%",muted:"240 3.7% 15.9%",mutedForeground:"240 5% 64.9%",border:"240 3.7% 15.9%",destructive:"0 63% 31%",radius:"0.5rem",spacing1:"0.25rem",spacing2:"0.5rem",spacing3:"0.75rem",spacing4:"1rem",spacing5:"0.75rem",spacing6:"1.5rem",spacing8:"2rem"},Mt="hsl(160, 84%, 39%)";function zt(e,t){const r={...Ct,...t?.cssVariables||{},...e?.cssVariables||{}};return{primaryColor:e?.primaryColor||t?.primaryColor||Mt,botName:e?.botName||t?.botName||"BotUyo",logoUrl:e?.logoUrl||t?.logoUrl||"",position:e?.position||t?.position||"bottom-right",welcomeMessage:e?.welcomeMessage||t?.welcomeMessage||"¡Hola! ¿En qué puedo ayudarte?",inputPlaceholder:e?.inputPlaceholder||t?.inputPlaceholder||"Escribe un mensaje...",cssVariables:r,isHidden:e?.isHidden??t?.isHidden??!1}}function St(e){return e.primaryColor||Mt}const Et={enabled:!0,messageEntry:"spring",typingIndicator:"wave",buttonEffects:!0,smoothScroll:!0,speedMultiplier:1,staggerDelay:50,windowTransitions:!0,launcherPulse:!0},jt={glassmorphism:!0,gradients:!0,softShadows:!0,glowEffects:!0,particles:!1,soundEffects:!1,hapticFeedback:!0,shimmerLoading:!0,hoverLift:!0},At=r(Et),_t=r(jt);function It({children:e,animations:t,effects:r}){const n=c(()=>({...Et,...t}),[t]),o=c(()=>({...jt,...r}),[r]);/* @__PURE__ */
2
- return g(At.Provider,{value:n,children:/* @__PURE__ */g(_t.Provider,{value:o,children:e})})}function Ft(){return a(At)}function Lt(){const e=a(_t);return{getGlassClass:()=>e.glassmorphism?"backdrop-blur-md bg-white/80 dark:bg-black/80":"",getShadowClass:()=>e.softShadows?"shadow-soft-xl":"shadow-md",getGlowClass:()=>e.glowEffects?"hover:shadow-primary/20":"",getHoverLiftClass:()=>e.hoverLift?"hover:-translate-y-1 hover:shadow-lg transition-all":"",getGradientClass:()=>e.gradients?"bg-gradient-to-br from-primary/10 to-transparent":"",getShimmerClass:()=>e.shimmerLoading?"animate-shimmer":"animate-pulse",triggerHaptic:()=>{e.hapticFeedback&&"vibrate"in navigator&&navigator.vibrate(10)},playSound:t=>{e.soundEffects&&console.log(`[Sound] ${t}`)},triggerParticles:t=>{e.particles&&console.log("[Particles] triggered on",t)}}}function $t(){return"undefined"!=typeof window&&!!window.DEBUG}const Tt={log:(e,...t)=>{$t()&&console.log(`[BotUyo] ${e}`,...t)},warn:(e,...t)=>{$t()&&console.warn(`[BotUyo] ${e}`,...t)},error:(e,...t)=>{console.error(`[BotUyo] ${e}`,...t)},debug:(e,...t)=>{$t()},info:(e,...t)=>{$t()&&console.info(`[BotUyo] ${e}`,...t)}},Ot=`data:image/svg+xml,${encodeURIComponent('\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">\n <defs>\n <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">\n <stop offset="0%" style="stop-color:#10b981"/>\n <stop offset="100%" style="stop-color:#059669"/>\n </linearGradient>\n </defs>\n <circle cx="32" cy="32" r="32" fill="url(#bg)"/>\n <rect x="16" y="20" width="32" height="24" rx="4" fill="white"/>\n <circle cx="24" cy="30" r="3" fill="#10b981"/>\n <circle cx="40" cy="30" r="3" fill="#10b981"/>\n <rect x="22" y="36" width="20" height="3" rx="1.5" fill="#10b981"/>\n <rect x="28" y="12" width="8" height="8" rx="2" fill="white"/>\n</svg>\n')}`,Dt=function(){const e=Math.floor(1200),t=2*e,r=44+t,n=new ArrayBuffer(r),o=new DataView(n);Ut(o,0,"RIFF"),o.setUint32(4,r-8,!0),Ut(o,8,"WAVE"),Ut(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,8e3,!0),o.setUint32(28,16e3,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),Ut(o,36,"data"),o.setUint32(40,t,!0);for(let i=0;i<e;i++){const t=i/8e3,r=1-i/e,n=Math.sin(2*Math.PI*880*t)*r*.5*32767;o.setInt16(44+2*i,n,!0)}const a=new Uint8Array(n);let s="";for(let i=0;i<a.length;i++)s+=String.fromCharCode(a[i]);return`data:audio/wav;base64,${btoa(s)}`}();function Ut(e,t,r){for(let n=0;n<r.length;n++)e.setUint8(t+n,r.charCodeAt(n))}function Wt(e,t,r){let n,o=r.initialDeps??[],a=!0;function s(){var s,i,l;let c;r.key&&(null==(s=r.debug)?void 0:s.call(r))&&(c=Date.now());const d=e();if(d.length===o.length&&!d.some((e,t)=>o[t]!==e))return n;let u;if(o=d,r.key&&(null==(i=r.debug)?void 0:i.call(r))&&(u=Date.now()),n=t(...d),r.key&&(null==(l=r.debug)?void 0:l.call(r))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-u))/100,n=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==r?void 0:r.key)}return!(null==r?void 0:r.onChange)||a&&r.skipInitialOnChange||r.onChange(n),a=!1,n}return s.updateDeps=e=>{o=e},s}function Rt(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const Pt=(e,t,r)=>{let n;return function(...o){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,o),r)}},Bt=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Vt=e=>e,Ht=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let o=t;o<=r;o++)n.push(o);return n},qt=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const o=e=>{const{width:r,height:n}=e;t({width:Math.round(r),height:Math.round(n)})};if(o(Bt(r)),!n.ResizeObserver)return()=>{};const a=new n.ResizeObserver(t=>{const n=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void o({width:t.inlineSize,height:t.blockSize})}o(Bt(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return a.observe(r,{box:"border-box"}),()=>{a.unobserve(r)}},Gt={passive:!0},Kt="undefined"==typeof window||"onscrollend"in window,Zt=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const a=e.options.useScrollendEvent&&Kt?()=>{}:Pt(n,()=>{t(o,!1)},e.options.isScrollingResetDelay),s=n=>()=>{const{horizontal:s,isRtl:i}=e.options;o=s?r.scrollLeft*(i?-1:1):r.scrollTop,a(),t(o,n)},i=s(!0),l=s(!1);r.addEventListener("scroll",i,Gt);const c=e.options.useScrollendEvent&&Kt;return c&&r.addEventListener("scrollend",l,Gt),()=>{r.removeEventListener("scroll",i),c&&r.removeEventListener("scrollend",l)}},Yt=(e,t,r)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},Jt=(e,{adjustments:t=0,behavior:r},n)=>{var o,a;const s=e+t;null==(a=null==(o=n.scrollElement)?void 0:o.scrollTo)||a.call(o,{[n.options.horizontal?"left":"top"]:s,behavior:r})};class Xt{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=/* @__PURE__ */new Map,this.laneAssignments=/* @__PURE__ */new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=/* @__PURE__ */new Map,this.observer=/* @__PURE__ */(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var r;null==(r=t())||r.disconnect(),e=null},observe:e=>{var r;return null==(r=t())?void 0:r.observe(e,{box:"border-box"})},unobserve:e=>{var r;return null==(r=t())?void 0:r.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,r])=>{void 0===r&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Vt,rangeExtractor:Ht,onChange:()=>{},measureElement:Yt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,r;null==(r=(t=this.options).onChange)||r.call(t,this,e)},this.maybeNotify=Wt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const r=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(r.has(t.lane))continue;const a=n.get(t.lane);if(null==a||t.end>a.end?n.set(t.lane,t):t.end<a.end&&r.set(t.lane,!0),r.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Wt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,r,n,o,a)=>(void 0!==this.prevLanes&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:o,lanes:a}),{key:!1}),this.getMeasurements=Wt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:o,lanes:a},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const d of this.laneAssignments.keys())d>=e&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const i=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const l=this.measurementsCache.slice(0,i),c=new Array(a).fill(void 0);for(let d=0;d<i;d++){const e=l[d];e&&(c[e.lane]=d)}for(let d=i;d<e;d++){const e=n(d),o=this.laneAssignments.get(d);let a,i;if(void 0!==o&&this.options.lanes>1){a=o;const e=c[a],n=void 0!==e?l[e]:void 0;i=n?n.end+this.options.gap:t+r}else{const e=1===this.options.lanes?l[d-1]:this.getFurthestMeasurement(l,d);i=e?e.end+this.options.gap:t+r,a=e?e.lane:d%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(d,a)}const u=s.get(e),m="number"==typeof u?u:this.options.estimateSize(d),h=i+m;l[d]={index:d,start:i,size:m,end:h,key:e,lane:a},c[a]=d}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Wt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,r,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const o=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:o};let a=Qt(0,o,t=>e[t].start,r),s=a;if(1===n)for(;s<o&&e[s].end<r+t;)s++;else if(n>1){const i=Array(n).fill(0);for(;s<o&&i.some(e=>e<r+t);){const t=e[s];i[t.lane]=t.end,s++}const l=Array(n).fill(r+t);for(;a>=0&&l.some(e=>e>=r);){const t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%n),s=Math.min(o,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:r,lanes:n}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Wt(()=>{let e=null,t=null;const r=this.calculateRange();return r&&(e=r.startIndex,t=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,r,n,o)=>null===n||null===o?[]:e({startIndex:n,endIndex:o,overscan:t,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,r=e.getAttribute(t);return r?parseInt(r,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const r=this.indexFromElement(e),n=this.measurementsCache[r];if(!n)return;const o=n.key,a=this.elementsCache.get(o);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(r,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const r=this.measurementsCache[e];if(!r)return;const n=t-(this.itemSizeCache.get(r.key)??r.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,n,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=Wt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const r=[];for(let n=0,o=e.length;n<o;n++){const o=t[e[n]];r.push(o)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return Rt(t[Qt(0,t.length-1,e=>Rt(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,r=0)=>{if(!this.scrollElement)return 0;const n=this.getSize(),o=this.getScrollOffset();"auto"===t&&(t=e>=o+n?"end":"start"),"center"===t?e+=(r-n)/2:"end"===t&&(e-=n);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const r=this.measurementsCache[e];if(!r)return;const n=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(r.end>=o+n-this.options.scrollPaddingEnd)t="end";else{if(!(r.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const a="end"===t?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,r.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:r}={})=>{"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:r})},this.scrollToIndex=(e,{align:t="auto",behavior:r}={})=>{"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let n=0;const o=t=>{if(!this.targetWindow)return;const n=this.getOffsetForIndex(e,t);if(!n)return void console.warn("Failed to get offset for index:",e);const[o,s]=n;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const t=()=>{if(this.currentScrollToIndex!==e)return;const t=this.getScrollOffset(),r=this.getOffsetForIndex(e,s);var n,o;r?(n=r[0],o=t,Math.abs(n-o)<1.01||a(s)):console.warn("Failed to get offset for index:",e)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},a=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(n++,n<10?this.targetWindow.requestAnimationFrame(()=>o(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};o(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let r;if(0===t.length)r=this.options.paddingStart;else if(1===this.options.lanes)r=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let n=t.length-1;for(;n>=0&&e.some(e=>null===e);){const r=t[n];null===e[r.lane]&&(e[r.lane]=r.end),n--}r=Math.max(...e.filter(e=>null!==e))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:r})=>{this.options.scrollToFn(e,{behavior:r,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=/* @__PURE__ */new Map,this.laneAssignments=/* @__PURE__ */new Map,this.notify(!1)},this.setOptions(e)}}const Qt=(e,t,r,n)=>{for(;e<=t;){const o=(e+t)/2|0,a=r(o);if(a<n)e=o+1;else{if(!(a>n))return o;t=o-1}}return e>0?e-1:0},er="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;const tr=m(()=>import("./chunk-audio-CyGpZ-uC.js").then(e=>({default:e.AudioPlayer}))),rr=m(()=>import("./chunk-gallery-BbhpBhzp.js").then(e=>({default:e.Gallery}))),nr=d(function({message:e,primaryColor:t,botAvatar:r,botName:n="BotUyo",avatars:o,isFirst:s=!0,isLast:i=!0,index:l=0}){const{t:d}=j("extracted"),m="user"===e.sender,h="system"===e.type||"system"===e.sender,p=!m&&!h,x=St({primaryColor:t}),k=function(){const e=a(At);return e.enabled&&"none"!==e.messageEntry?{slide:"animate-message-slide",fade:"animate-message-fade",scale:"animate-message-scale",spring:"animate-message-spring"}[e.messageEntry]||"animate-message-spring":""}(),C=c(()=>{if(m)return null;if("text"===e.type){const t=e;if(t.emotion&&o?.[t.emotion])return o[t.emotion]}return r},[e,o,r,m]),N=({href:e,children:t})=>{if(!e)return null;const r=String(t).toLowerCase(),n=r.includes("reservar")||r.includes("ver")||r.includes("pagar"),o=e.includes("maps.google")||e.includes("goo.gl")||e.includes("google.com/maps");let a=!1;try{a=new URL(e,window.location.origin).hostname===window.location.hostname}catch{}const s=a?t=>{t.preventDefault(),window.location.href=e}:void 0,i=a?void 0:"_blank",l=a?void 0:"noopener noreferrer";return o?/* @__PURE__ */g("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"block my-2 no-underline group",children:/* @__PURE__ */f("span",{className:"flex items-center gap-3 p-3 border rounded-xl shadow-sm group-hover:border-primary/30 transition-all",style:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))"},children:[
1
+ import*as e from"react";import t,{createContext as r,useState as n,useEffect as o,useContext as a,useCallback as s,forwardRef as i,createElement as l,useMemo as c,memo as d,Suspense as u,lazy as m,useRef as h,Component as p}from"react";import{jsx as g,jsxs as f,Fragment as b}from"react/jsx-runtime";import{flushSync as x}from"react-dom";import{M as v,r as y,a as w}from"./chunk-markdown-QS0MJc8h.js";const k={es:{online:"En línea",offline:"Desconectado",connecting:"Conectando...",con_amor_paseo_libre:"Con ❤️ por BotUyo",preview:"Vista previa",fotos:"Fotos",ubicacion:"Ubicación",input_placeholder:"Escribe un mensaje...",send:"Enviar",cancel:"Cancelar",call:"Llamar",call_confirm:"¿Iniciar llamada de voz?",attach_photo:"Adjuntar foto",attach_location:"Compartir ubicación",recording:"Grabando...",rate_limit_exceeded:"Has enviado demasiados mensajes. Espera un momento.",connection_error:"Error de conexión",file_too_large:"Archivo demasiado grande",invalid_file:"Tipo de archivo no válido",extracted:{assistant:"Asistente",anterior:"Anterior",siguiente:"Siguiente",cerrar:"Cerrar",cerrar_chat:"Cerrar chat",abrir_chat:"Abrir chat",ver_ubicacion:"Ver ubicación"},accessibility:{closeChat:"Cerrar ventana de chat",closeChatHint:"Presiona Escape para cerrar",chatMessages:"Mensajes del chat",messageHistory:"Historial de mensajes",dialogDescription:"Ventana de chat con {{botName}}. Presiona Escape para cerrar. Usa Ctrl+Enter para enviar mensajes.",sendMessage:"Enviar mensaje",sendMessageHint:"Presiona Enter o Ctrl+Enter para enviar",typeMessage:"Escribe tu mensaje aquí",botMessage:"Mensaje del asistente",userMessage:"Tu mensaje",messageFrom:"Mensaje de {{sender}}",messageTime:"Enviado {{time}}",newMessage:"Nuevo mensaje recibido"}},en:{online:"Online",offline:"Offline",connecting:"Connecting...",con_amor_paseo_libre:"With ❤️ by BotUyo",preview:"Preview",fotos:"Photos",ubicacion:"Location",input_placeholder:"Type a message...",send:"Send",cancel:"Cancel",call:"Call",call_confirm:"Start a voice call?",attach_photo:"Attach photo",attach_location:"Share location",recording:"Recording...",rate_limit_exceeded:"You have sent too many messages. Please wait.",connection_error:"Connection error",file_too_large:"File too large",invalid_file:"Invalid file type",extracted:{assistant:"Assistant",anterior:"Previous",siguiente:"Next",cerrar:"Close",cerrar_chat:"Close chat",abrir_chat:"Open chat",ver_ubicacion:"View location"},accessibility:{closeChat:"Close chat window",closeChatHint:"Press Escape to close",chatMessages:"Chat messages",messageHistory:"Message history",dialogDescription:"Chat window with {{botName}}. Press Escape to close. Use Ctrl+Enter to send messages.",sendMessage:"Send message",sendMessageHint:"Press Enter or Ctrl+Enter to send",typeMessage:"Type your message here",botMessage:"Assistant message",userMessage:"Your message",messageFrom:"Message from {{sender}}",messageTime:"Sent {{time}}",newMessage:"New message received"}},pt:{online:"Online",offline:"Desconectado",connecting:"Conectando...",con_amor_paseo_libre:"Com ❤️ por BotUyo",preview:"Visualizar",fotos:"Fotos",ubicacion:"Localização",input_placeholder:"Digite uma mensagem...",send:"Enviar",cancel:"Cancelar",call:"Ligar",call_confirm:"Iniciar chamada de voz?",attach_photo:"Anexar foto",attach_location:"Compartilhar localização",recording:"Gravando...",rate_limit_exceeded:"Você enviou muitas mensagens. Aguarde um momento.",connection_error:"Erro de conexão",file_too_large:"Arquivo muito grande",invalid_file:"Tipo de arquivo inválido",extracted:{assistant:"Assistente",anterior:"Anterior",siguiente:"Próximo",cerrar:"Fechar",cerrar_chat:"Fechar chat",abrir_chat:"Abrir chat",ver_ubicacion:"Ver localização"},accessibility:{closeChat:"Fechar janela de chat",closeChatHint:"Pressione Escape para fechar",chatMessages:"Mensagens do chat",messageHistory:"Histórico de mensagens",dialogDescription:"Janela de chat com {{botName}}. Pressione Escape para fechar. Use Ctrl+Enter para enviar mensagens.",sendMessage:"Enviar mensagem",sendMessageHint:"Pressione Enter ou Ctrl+Enter para enviar",typeMessage:"Digite sua mensagem aqui",botMessage:"Mensagem do assistente",userMessage:"Sua mensagem",messageFrom:"Mensagem de {{sender}}",messageTime:"Enviado {{time}}",newMessage:"Nova mensagem recebida"}},fr:{online:"En ligne",offline:"Déconnecté",connecting:"Connexion...",con_amor_paseo_libre:"Avec ❤️ par BotUyo",preview:"Aperçu",fotos:"Photos",ubicacion:"Emplacement",input_placeholder:"Tapez un message...",send:"Envoyer",cancel:"Annuler",call:"Appeler",call_confirm:"Démarrer un appel vocal?",attach_photo:"Joindre une photo",attach_location:"Partager la localisation",recording:"Enregistrement...",rate_limit_exceeded:"Vous avez envoyé trop de messages. Veuillez patienter.",connection_error:"Erreur de connexion",file_too_large:"Fichier trop volumineux",invalid_file:"Type de fichier invalide",extracted:{assistant:"Assistant",anterior:"Précédent",siguiente:"Suivant",cerrar:"Fermer",cerrar_chat:"Fermer le chat",abrir_chat:"Ouvrir le chat",ver_ubicacion:"Voir l'emplacement"},accessibility:{closeChat:"Fermer la fenêtre de chat",closeChatHint:"Appuyez sur Échap pour fermer",chatMessages:"Messages du chat",messageHistory:"Historique des messages",dialogDescription:"Fenêtre de chat avec {{botName}}. Appuyez sur Échap pour fermer. Utilisez Ctrl+Entrée pour envoyer des messages.",sendMessage:"Envoyer un message",sendMessageHint:"Appuyez sur Entrée ou Ctrl+Entrée pour envoyer",typeMessage:"Tapez votre message ici",botMessage:"Message de l'assistant",userMessage:"Votre message",messageFrom:"Message de {{sender}}",messageTime:"Envoyé {{time}}",newMessage:"Nouveau message reçu"}}};function C(){if("undefined"==typeof navigator)return"es";const e=navigator.language.split("-")[0];return k[e]?e:"es"}const N={locale:C(),setLocale:()=>{}},M=r(N),z="botuyo-chat-locale";function S({children:e,defaultLocale:t}){const[r,a]=n(()=>{if(t)return t;if("undefined"!=typeof window){const e=localStorage.getItem(z);if(e)return e}return C()});return o(()=>{if("undefined"==typeof window||t)return;const e=()=>{localStorage.getItem(z)||a(C())};return window.addEventListener("languagechange",e),()=>window.removeEventListener("languagechange",e)},[t]),/* @__PURE__ */g(M.Provider,{value:{locale:r,setLocale:e=>{["es","en","pt","fr"].includes(e)?(a(e),"undefined"!=typeof window&&localStorage.setItem(z,e)):console.warn(`[BotUyo] Locale "${e}" no es soportado. Manteniendo "${r}"`)}},children:e})}function E(){return a(M)??N}function j(e){const{locale:t,setLocale:r}=E();return{t:s(r=>{var n,o;return(n=k[t],(o=e?`${e}.${r}`:r).split(".").reduce((e,t)=>e?.[t],n)||o)||r},[t,e]),setLocale:r,currentLocale:t}}const _=(...e)=>e.filter((e,t,r)=>Boolean(e)&&r.indexOf(e)===t).join(" ");var A={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const I=i(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...i},c)=>l("svg",{ref:c,...A,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:_("lucide",o),...i},[...s.map(([e,t])=>l(e,t)),...Array.isArray(a)?a:[a]])),F=(e,t)=>{const r=i(({className:r,...n},o)=>{return l(I,{ref:o,iconNode:t,className:_(`lucide-${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n});var a});return r.displayName=`${e}`,r},L=F("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),$=F("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),T=F("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),O=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),D=F("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),U=F("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),W=F("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),R=F("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),P=F("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),B=F("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),V=F("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),H=F("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),q=F("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),G=F("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),K=F("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),Z=F("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),Y=F("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),J=F("PhoneOff",[["path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91",key:"z86iuo"}],["line",{x1:"22",x2:"2",y1:"2",y2:"22",key:"11kh81"}]]),X=F("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),Q=F("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),ee=F("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),te=F("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),re=F("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),ne=F("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),oe=F("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ae=F("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]),se=F("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ie=F("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function le(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=le(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const ce=(e=/* @__PURE__ */new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),de="-",ue=[],me=e=>{const t=ge(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return pe(e);const r=e.split(de),n=""===r[0]&&r.length>1?1:0;return he(r,n,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=n[e],o=r[e];return t?o?((e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r})(o,t):t:o||ue}return r[e]||ue}}},he=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const r=he(e,t+1,o);if(r)return r}const a=r.validators;if(null===a)return;const s=0===t?e.join(de):e.slice(t).join(de),i=a.length;for(let l=0;l<i;l++){const e=a[l];if(e.validator(s))return e.classGroupId}},pe=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?"arbitrary.."+n:void 0})(),ge=e=>{const{theme:t,classGroups:r}=e;return fe(r,t)},fe=(e,t)=>{const r=ce();for(const n in e){const o=e[n];be(o,r,n,t)}return r},be=(e,t,r,n)=>{const o=e.length;for(let a=0;a<o;a++){const o=e[a];xe(o,t,r,n)}},xe=(e,t,r,n)=>{"string"!=typeof e?"function"!=typeof e?we(e,t,r,n):ye(e,t,r,n):ve(e,t,r)},ve=(e,t,r)=>{(""===e?t:ke(t,e)).classGroupId=r},ye=(e,t,r,n)=>{Ce(e)?be(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},we=(e,t,r,n)=>{const o=Object.entries(e),a=o.length;for(let s=0;s<a;s++){const[e,a]=o[s];be(a,ke(t,e),r,n)}},ke=(e,t)=>{let r=e;const n=t.split(de),o=n.length;for(let a=0;a<o;a++){const e=n[a];let t=r.nextPart.get(e);t||(t=ce(),r.nextPart.set(e,t)),r=t}return r},Ce=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=/* @__PURE__ */Object.create(null),n=/* @__PURE__ */Object.create(null);const o=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=/* @__PURE__ */Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(o(e,t),t):void 0},set(e,t){e in r?r[e]=t:o(e,t)}}},Me=[],ze=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Se=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,a=0;const s=e.length;for(let d=0;d<s;d++){const s=e[d];if(0===n&&0===o){if(":"===s){t.push(e.slice(a,d)),a=d+1;continue}if("/"===s){r=d;continue}}"["===s?n++:"]"===s?n--:"("===s?o++:")"===s&&o--}const i=0===t.length?e:e.slice(a);let l=i,c=!1;return i.endsWith("!")?(l=i.slice(0,-1),c=!0):i.startsWith("!")&&(l=i.slice(1),c=!0),ze(t,c,l,r&&r>a?r-a:void 0)};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):ze(Me,!1,t,void 0,!0)}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},Ee=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let n=[];for(let o=0;o<e.length;o++){const a=e[o],s="["===a[0],i=t.has(a);s||i?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(a)):n.push(a)}return n.length>0&&(n.sort(),r.push(...n)),r}},je=/\s+/,_e=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=_e(e[n]))&&(r&&(r+=" "),r+=t);return r},Ae=[],Ie=e=>{const t=t=>t[e]||Ae;return t.isThemeGetter=!0,t},Fe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Le=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$e=/^\d+\/\d+$/,Te=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,De=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,We=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Re=e=>$e.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>!!e&&Number.isInteger(Number(e)),Ve=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),He=e=>Te.test(e),qe=()=>!0,Ge=e=>Oe.test(e)&&!De.test(e),Ke=()=>!1,Ze=e=>Ue.test(e),Ye=e=>We.test(e),Je=e=>!Qe(e)&&!at(e),Xe=e=>mt(e,ft,Ke),Qe=e=>Fe.test(e),et=e=>mt(e,bt,Ge),tt=e=>mt(e,xt,Pe),rt=e=>mt(e,pt,Ke),nt=e=>mt(e,gt,Ye),ot=e=>mt(e,yt,Ze),at=e=>Le.test(e),st=e=>ht(e,bt),it=e=>ht(e,vt),lt=e=>ht(e,pt),ct=e=>ht(e,ft),dt=e=>ht(e,gt),ut=e=>ht(e,yt,!0),mt=(e,t,r)=>{const n=Fe.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},ht=(e,t,r=!1)=>{const n=Le.exec(e);return!!n&&(n[1]?t(n[1]):r)},pt=e=>"position"===e||"percentage"===e,gt=e=>"image"===e||"url"===e,ft=e=>"length"===e||"size"===e||"bg-size"===e,bt=e=>"length"===e,xt=e=>"number"===e,vt=e=>"family-name"===e,yt=e=>"shadow"===e,wt=/* @__PURE__ */((e,...t)=>{let r,n,o,a;const s=e=>{const t=n(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(je);let l="";for(let c=i.length-1;c>=0;c-=1){const e=i[c],{isExternal:t,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:h}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!h,g=n(p?m.substring(0,h):m);if(!g){if(!p){l=e+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=e+(l.length>0?" "+l:l);continue}p=!1}const f=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=u?f+"!":f,x=b+g;if(s.indexOf(x)>-1)continue;s.push(x);const v=o(g,p);for(let r=0;r<v.length;++r){const e=v[r];s.push(b+e)}l=e+(l.length>0?" "+l:l)}return l})(e,r);return o(e,a),a};return a=i=>{const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:Ne(e.cacheSize),parseClassName:Se(e),sortModifiers:Ee(e),...me(e)}))(l),n=r.cache.get,o=r.cache.set,a=s,s(i)},(...e)=>a(((...e)=>{let t,r,n=0,o="";for(;n<e.length;)(t=e[n++])&&(r=_e(t))&&(o&&(o+=" "),o+=r);return o})(...e))})(()=>{const e=Ie("color"),t=Ie("font"),r=Ie("text"),n=Ie("font-weight"),o=Ie("tracking"),a=Ie("leading"),s=Ie("breakpoint"),i=Ie("container"),l=Ie("spacing"),c=Ie("radius"),d=Ie("shadow"),u=Ie("inset-shadow"),m=Ie("text-shadow"),h=Ie("drop-shadow"),p=Ie("blur"),g=Ie("perspective"),f=Ie("aspect"),b=Ie("ease"),x=Ie("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",at,Qe],y=()=>[at,Qe,l],w=()=>[Re,"full","auto",...y()],k=()=>[Be,"none","subgrid",at,Qe],C=()=>["auto",{span:["full",Be,at,Qe]},Be,at,Qe],N=()=>[Be,"auto",at,Qe],M=()=>["auto","min","max","fr",at,Qe],z=()=>["auto",...y()],S=()=>[Re,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],E=()=>[e,at,Qe],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",lt,rt,{position:[at,Qe]}],_=()=>["auto","cover","contain",ct,Xe,{size:[at,Qe]}],A=()=>[Ve,st,et],I=()=>["","none","full",c,at,Qe],F=()=>["",Pe,st,et],L=()=>[Pe,Ve,lt,rt],$=()=>["","none",p,at,Qe],T=()=>["none",Pe,at,Qe],O=()=>["none",Pe,at,Qe],D=()=>[Pe,at,Qe],U=()=>[Re,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[qe],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[Je],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",Pe],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Re,Qe,at,f]}],container:["container"],columns:[{columns:[Pe,Qe,at,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",at,Qe]}],basis:[{basis:[Re,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Re,"auto","initial","none",Qe]}],grow:[{grow:["",Pe,at,Qe]}],shrink:[{shrink:["",Pe,at,Qe]}],order:[{order:[Be,"first","last","none",at,Qe]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[i,"screen",...S()]}],"min-w":[{"min-w":[i,"screen","none",...S()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",r,st,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,at,tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ve,Qe]}],"font-family":[{font:[it,Qe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,at,Qe]}],"line-clamp":[{"line-clamp":[Pe,"none",at,tt]}],leading:[{leading:[a,...y()]}],"list-image":[{"list-image":["none",at,Qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",at,Qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",at,et]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Pe,"auto",at,Qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",at,Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",at,Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,at,Qe],radial:["",at,Qe],conic:[Be,at,Qe]},dt,nt]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:A()}],"gradient-via-pos":[{via:A()}],"gradient-to-pos":[{to:A()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,at,Qe]}],"outline-w":[{outline:["",Pe,st,et]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",d,ut,ot]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",u,ut,ot]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[Pe,et]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",m,ut,ot]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Pe,at,Qe]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[at,Qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",at,Qe]}],filter:[{filter:["","none",at,Qe]}],blur:[{blur:$()}],brightness:[{brightness:[Pe,at,Qe]}],contrast:[{contrast:[Pe,at,Qe]}],"drop-shadow":[{"drop-shadow":["","none",h,ut,ot]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",Pe,at,Qe]}],"hue-rotate":[{"hue-rotate":[Pe,at,Qe]}],invert:[{invert:["",Pe,at,Qe]}],saturate:[{saturate:[Pe,at,Qe]}],sepia:[{sepia:["",Pe,at,Qe]}],"backdrop-filter":[{"backdrop-filter":["","none",at,Qe]}],"backdrop-blur":[{"backdrop-blur":$()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,at,Qe]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,at,Qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,at,Qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,at,Qe]}],"backdrop-invert":[{"backdrop-invert":["",Pe,at,Qe]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,at,Qe]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,at,Qe]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,at,Qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",at,Qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",at,Qe]}],ease:[{ease:["linear","initial",b,at,Qe]}],delay:[{delay:[Pe,at,Qe]}],animate:[{animate:["none",x,at,Qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,at,Qe]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:T()}],"rotate-x":[{"rotate-x":T()}],"rotate-y":[{"rotate-y":T()}],"rotate-z":[{"rotate-z":T()}],scale:[{scale:O()}],"scale-x":[{"scale-x":O()}],"scale-y":[{"scale-y":O()}],"scale-z":[{"scale-z":O()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[at,Qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",at,Qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",at,Qe]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[Pe,st,et,tt]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function kt(...e){return wt(function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=le(e))&&(n&&(n+=" "),n+=t);return n}(e))}const Ct={background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%",cardForeground:"240 10% 3.9%",primary:"160 84% 39%",primaryForeground:"0 0% 100%",muted:"240 4.8% 95.9%",mutedForeground:"240 3.8% 46.1%",border:"240 5.9% 90%",destructive:"0 84.2% 60.2%",radius:"0.5rem",spacing1:"0.25rem",spacing2:"0.5rem",spacing3:"0.75rem",spacing4:"1rem",spacing5:"0.75rem",spacing6:"1.5rem",spacing8:"2rem"},Nt={background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 10%",cardForeground:"0 0% 98%",primary:"160 84% 39%",primaryForeground:"0 0% 100%",muted:"240 3.7% 15.9%",mutedForeground:"240 5% 64.9%",border:"240 3.7% 15.9%",destructive:"0 63% 31%",radius:"0.5rem",spacing1:"0.25rem",spacing2:"0.5rem",spacing3:"0.75rem",spacing4:"1rem",spacing5:"0.75rem",spacing6:"1.5rem",spacing8:"2rem"},Mt="hsl(160, 84%, 39%)";function zt(e,t){const r={...Ct,...t?.cssVariables||{},...e?.cssVariables||{}};return{primaryColor:e?.primaryColor||t?.primaryColor||Mt,botName:e?.botName||t?.botName||"BotUyo",logoUrl:e?.logoUrl||t?.logoUrl||"",position:e?.position||t?.position||"bottom-right",welcomeMessage:e?.welcomeMessage||t?.welcomeMessage||"¡Hola! ¿En qué puedo ayudarte?",inputPlaceholder:e?.inputPlaceholder||t?.inputPlaceholder||"Escribe un mensaje...",cssVariables:r,isHidden:e?.isHidden??t?.isHidden??!1}}function St(e){return e.primaryColor||Mt}const Et={enabled:!0,messageEntry:"spring",typingIndicator:"wave",buttonEffects:!0,smoothScroll:!0,speedMultiplier:1,staggerDelay:50,windowTransitions:!0,launcherPulse:!0},jt={glassmorphism:!0,gradients:!0,softShadows:!0,glowEffects:!0,particles:!1,soundEffects:!1,hapticFeedback:!0,shimmerLoading:!0,hoverLift:!0},_t=r(Et),At=r(jt);function It({children:e,animations:t,effects:r}){const n=c(()=>({...Et,...t}),[t]),o=c(()=>({...jt,...r}),[r]);/* @__PURE__ */
2
+ return g(_t.Provider,{value:n,children:/* @__PURE__ */g(At.Provider,{value:o,children:e})})}function Ft(){return a(_t)}function Lt(){const e=a(At);return{getGlassClass:()=>e.glassmorphism?"backdrop-blur-md bg-white/80 dark:bg-black/80":"",getShadowClass:()=>e.softShadows?"shadow-soft-xl":"shadow-md",getGlowClass:()=>e.glowEffects?"hover:shadow-primary/20":"",getHoverLiftClass:()=>e.hoverLift?"hover:-translate-y-1 hover:shadow-lg transition-all":"",getGradientClass:()=>e.gradients?"bg-gradient-to-br from-primary/10 to-transparent":"",getShimmerClass:()=>e.shimmerLoading?"animate-shimmer":"animate-pulse",triggerHaptic:()=>{e.hapticFeedback&&"vibrate"in navigator&&navigator.vibrate(10)},playSound:t=>{e.soundEffects&&console.log(`[Sound] ${t}`)},triggerParticles:t=>{e.particles&&console.log("[Particles] triggered on",t)}}}function $t(){return"undefined"!=typeof window&&!!window.DEBUG}const Tt={log:(e,...t)=>{$t()&&console.log(`[BotUyo] ${e}`,...t)},warn:(e,...t)=>{$t()&&console.warn(`[BotUyo] ${e}`,...t)},error:(e,...t)=>{console.error(`[BotUyo] ${e}`,...t)},debug:(e,...t)=>{$t()},info:(e,...t)=>{$t()&&console.info(`[BotUyo] ${e}`,...t)}},Ot=`data:image/svg+xml,${encodeURIComponent('\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">\n <defs>\n <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">\n <stop offset="0%" style="stop-color:#10b981"/>\n <stop offset="100%" style="stop-color:#059669"/>\n </linearGradient>\n </defs>\n <circle cx="32" cy="32" r="32" fill="url(#bg)"/>\n <rect x="16" y="20" width="32" height="24" rx="4" fill="white"/>\n <circle cx="24" cy="30" r="3" fill="#10b981"/>\n <circle cx="40" cy="30" r="3" fill="#10b981"/>\n <rect x="22" y="36" width="20" height="3" rx="1.5" fill="#10b981"/>\n <rect x="28" y="12" width="8" height="8" rx="2" fill="white"/>\n</svg>\n')}`,Dt=function(){const e=Math.floor(1200),t=2*e,r=44+t,n=new ArrayBuffer(r),o=new DataView(n);Ut(o,0,"RIFF"),o.setUint32(4,r-8,!0),Ut(o,8,"WAVE"),Ut(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,8e3,!0),o.setUint32(28,16e3,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),Ut(o,36,"data"),o.setUint32(40,t,!0);for(let i=0;i<e;i++){const t=i/8e3,r=1-i/e,n=Math.sin(2*Math.PI*880*t)*r*.5*32767;o.setInt16(44+2*i,n,!0)}const a=new Uint8Array(n);let s="";for(let i=0;i<a.length;i++)s+=String.fromCharCode(a[i]);return`data:audio/wav;base64,${btoa(s)}`}();function Ut(e,t,r){for(let n=0;n<r.length;n++)e.setUint8(t+n,r.charCodeAt(n))}function Wt(e,t,r){let n,o=r.initialDeps??[],a=!0;function s(){var s,i,l;let c;r.key&&(null==(s=r.debug)?void 0:s.call(r))&&(c=Date.now());const d=e();if(d.length===o.length&&!d.some((e,t)=>o[t]!==e))return n;let u;if(o=d,r.key&&(null==(i=r.debug)?void 0:i.call(r))&&(u=Date.now()),n=t(...d),r.key&&(null==(l=r.debug)?void 0:l.call(r))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-u))/100,n=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==r?void 0:r.key)}return!(null==r?void 0:r.onChange)||a&&r.skipInitialOnChange||r.onChange(n),a=!1,n}return s.updateDeps=e=>{o=e},s}function Rt(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const Pt=(e,t,r)=>{let n;return function(...o){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,o),r)}},Bt=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Vt=e=>e,Ht=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let o=t;o<=r;o++)n.push(o);return n},qt=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const o=e=>{const{width:r,height:n}=e;t({width:Math.round(r),height:Math.round(n)})};if(o(Bt(r)),!n.ResizeObserver)return()=>{};const a=new n.ResizeObserver(t=>{const n=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void o({width:t.inlineSize,height:t.blockSize})}o(Bt(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return a.observe(r,{box:"border-box"}),()=>{a.unobserve(r)}},Gt={passive:!0},Kt="undefined"==typeof window||"onscrollend"in window,Zt=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const a=e.options.useScrollendEvent&&Kt?()=>{}:Pt(n,()=>{t(o,!1)},e.options.isScrollingResetDelay),s=n=>()=>{const{horizontal:s,isRtl:i}=e.options;o=s?r.scrollLeft*(i?-1:1):r.scrollTop,a(),t(o,n)},i=s(!0),l=s(!1);r.addEventListener("scroll",i,Gt);const c=e.options.useScrollendEvent&&Kt;return c&&r.addEventListener("scrollend",l,Gt),()=>{r.removeEventListener("scroll",i),c&&r.removeEventListener("scrollend",l)}},Yt=(e,t,r)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},Jt=(e,{adjustments:t=0,behavior:r},n)=>{var o,a;const s=e+t;null==(a=null==(o=n.scrollElement)?void 0:o.scrollTo)||a.call(o,{[n.options.horizontal?"left":"top"]:s,behavior:r})};class Xt{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=/* @__PURE__ */new Map,this.laneAssignments=/* @__PURE__ */new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=/* @__PURE__ */new Map,this.observer=/* @__PURE__ */(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var r;null==(r=t())||r.disconnect(),e=null},observe:e=>{var r;return null==(r=t())?void 0:r.observe(e,{box:"border-box"})},unobserve:e=>{var r;return null==(r=t())?void 0:r.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,r])=>{void 0===r&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Vt,rangeExtractor:Ht,onChange:()=>{},measureElement:Yt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,r;null==(r=(t=this.options).onChange)||r.call(t,this,e)},this.maybeNotify=Wt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const r=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(r.has(t.lane))continue;const a=n.get(t.lane);if(null==a||t.end>a.end?n.set(t.lane,t):t.end<a.end&&r.set(t.lane,!0),r.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Wt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,r,n,o,a)=>(void 0!==this.prevLanes&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:o,lanes:a}),{key:!1}),this.getMeasurements=Wt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:o,lanes:a},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const d of this.laneAssignments.keys())d>=e&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const i=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const l=this.measurementsCache.slice(0,i),c=new Array(a).fill(void 0);for(let d=0;d<i;d++){const e=l[d];e&&(c[e.lane]=d)}for(let d=i;d<e;d++){const e=n(d),o=this.laneAssignments.get(d);let a,i;if(void 0!==o&&this.options.lanes>1){a=o;const e=c[a],n=void 0!==e?l[e]:void 0;i=n?n.end+this.options.gap:t+r}else{const e=1===this.options.lanes?l[d-1]:this.getFurthestMeasurement(l,d);i=e?e.end+this.options.gap:t+r,a=e?e.lane:d%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(d,a)}const u=s.get(e),m="number"==typeof u?u:this.options.estimateSize(d),h=i+m;l[d]={index:d,start:i,size:m,end:h,key:e,lane:a},c[a]=d}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Wt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,r,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const o=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:o};let a=Qt(0,o,t=>e[t].start,r),s=a;if(1===n)for(;s<o&&e[s].end<r+t;)s++;else if(n>1){const i=Array(n).fill(0);for(;s<o&&i.some(e=>e<r+t);){const t=e[s];i[t.lane]=t.end,s++}const l=Array(n).fill(r+t);for(;a>=0&&l.some(e=>e>=r);){const t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%n),s=Math.min(o,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:r,lanes:n}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Wt(()=>{let e=null,t=null;const r=this.calculateRange();return r&&(e=r.startIndex,t=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,r,n,o)=>null===n||null===o?[]:e({startIndex:n,endIndex:o,overscan:t,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,r=e.getAttribute(t);return r?parseInt(r,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const r=this.indexFromElement(e),n=this.measurementsCache[r];if(!n)return;const o=n.key,a=this.elementsCache.get(o);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(r,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const r=this.measurementsCache[e];if(!r)return;const n=t-(this.itemSizeCache.get(r.key)??r.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,n,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=Wt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const r=[];for(let n=0,o=e.length;n<o;n++){const o=t[e[n]];r.push(o)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return Rt(t[Qt(0,t.length-1,e=>Rt(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,r=0)=>{if(!this.scrollElement)return 0;const n=this.getSize(),o=this.getScrollOffset();"auto"===t&&(t=e>=o+n?"end":"start"),"center"===t?e+=(r-n)/2:"end"===t&&(e-=n);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const r=this.measurementsCache[e];if(!r)return;const n=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(r.end>=o+n-this.options.scrollPaddingEnd)t="end";else{if(!(r.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const a="end"===t?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,r.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:r}={})=>{"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:r})},this.scrollToIndex=(e,{align:t="auto",behavior:r}={})=>{"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let n=0;const o=t=>{if(!this.targetWindow)return;const n=this.getOffsetForIndex(e,t);if(!n)return void console.warn("Failed to get offset for index:",e);const[o,s]=n;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const t=()=>{if(this.currentScrollToIndex!==e)return;const t=this.getScrollOffset(),r=this.getOffsetForIndex(e,s);var n,o;r?(n=r[0],o=t,Math.abs(n-o)<1.01||a(s)):console.warn("Failed to get offset for index:",e)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},a=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(n++,n<10?this.targetWindow.requestAnimationFrame(()=>o(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};o(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let r;if(0===t.length)r=this.options.paddingStart;else if(1===this.options.lanes)r=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let n=t.length-1;for(;n>=0&&e.some(e=>null===e);){const r=t[n];null===e[r.lane]&&(e[r.lane]=r.end),n--}r=Math.max(...e.filter(e=>null!==e))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:r})=>{this.options.scrollToFn(e,{behavior:r,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=/* @__PURE__ */new Map,this.laneAssignments=/* @__PURE__ */new Map,this.notify(!1)},this.setOptions(e)}}const Qt=(e,t,r,n)=>{for(;e<=t;){const o=(e+t)/2|0,a=r(o);if(a<n)e=o+1;else{if(!(a>n))return o;t=o-1}}return e>0?e-1:0},er="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;const tr=m(()=>import("./chunk-audio-C2yGhaaL.js").then(e=>({default:e.AudioPlayer}))),rr=m(()=>import("./chunk-gallery-BeGSPPtK.js").then(e=>({default:e.Gallery}))),nr=d(function({message:e,primaryColor:t,botAvatar:r,botName:n="BotUyo",avatars:o,isFirst:s=!0,isLast:i=!0,index:l=0}){const{t:d}=j("extracted"),m="user"===e.sender,h="system"===e.type||"system"===e.sender,p=!m&&!h,x=St({primaryColor:t}),k=function(){const e=a(_t);return e.enabled&&"none"!==e.messageEntry?{slide:"animate-message-slide",fade:"animate-message-fade",scale:"animate-message-scale",spring:"animate-message-spring"}[e.messageEntry]||"animate-message-spring":""}(),C=c(()=>{if(m)return null;if("text"===e.type){const t=e;if(t.emotion&&o?.[t.emotion])return o[t.emotion]}return r},[e,o,r,m]),N=({href:e,children:t})=>{if(!e)return null;const r=String(t).toLowerCase(),n=r.includes("reservar")||r.includes("ver")||r.includes("pagar"),o=e.includes("maps.google")||e.includes("goo.gl")||e.includes("google.com/maps");let a=!1;try{a=new URL(e,window.location.origin).hostname===window.location.hostname}catch{}const s=a?t=>{t.preventDefault(),window.location.href=e}:void 0,i=a?void 0:"_blank",l=a?void 0:"noopener noreferrer";return o?/* @__PURE__ */g("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"block my-2 no-underline group",children:/* @__PURE__ */f("span",{className:"flex items-center gap-3 p-3 border rounded-xl shadow-sm group-hover:border-primary/30 transition-all",style:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))"},children:[
3
3
  /* @__PURE__ */g("span",{className:"flex-shrink-0 p-2 rounded-full",style:{backgroundColor:`${x}1a`,color:x},children:/* @__PURE__ */g(q,{size:16,strokeWidth:2.5})}),
4
4
  /* @__PURE__ */g("span",{className:"flex flex-col min-w-0 flex-1 text-[11px] font-bold text-foreground leading-tight uppercase tracking-tight",children:d("ver_ubicacion")}),
5
5
  /* @__PURE__ */g(W,{size:12,className:"text-muted-foreground/40 group-hover:text-primary"})]})}):n?/* @__PURE__ */f("a",{href:e,target:i,rel:l,onClick:s,className:"inline-flex items-center justify-center gap-2 px-4 py-2.5 mt-2 mx-1 text-[11px] font-black w-[calc(100%-0.5rem)] sm:w-auto rounded-xl shadow-md uppercase tracking-widest transition-transform active:scale-95 text-white",style:{backgroundColor:x},children:[t," ",
@@ -41,7 +41,7 @@ return f(t.Fragment,{children:[s&&/* @__PURE__ */g("div",{className:"flex justif
41
41
  /* @__PURE__ */g("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.3s]"}),
42
42
  /* @__PURE__ */g("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce [animation-delay:-0.15s]"}),
43
43
  /* @__PURE__ */g("span",{className:"w-1 h-1 bg-primary/50 rounded-full animate-bounce"})]})}),
44
- /* @__PURE__ */g(or,{})]})]}):/* @__PURE__ */g("div",{className:"flex-1 bg-background"})},(e,t)=>{if(e.messages.length!==t.messages.length)return!1;if(e.isTyping!==t.isTyping)return!1;if(e.primaryColor!==t.primaryColor)return!1;if(e.botName!==t.botName)return!1;if(e.logoUrl!==t.logoUrl)return!1;const r=e.messages[e.messages.length-1],n=t.messages[t.messages.length-1];return r?.id===n?.id}),lr={"image/jpeg":[255,216,255],"image/png":[137,80,78,71,13,10,26,10],"image/webp":[82,73,70,70],"image/gif":[71,73,70,56],"audio/mpeg":[255,251],"audio/wav":[82,73,70,70],"audio/webm":[26,69,223,163],"audio/ogg":[79,103,103,83]};async function cr(e,t={}){const{maxSizeMB:r=10,allowedExtensions:n,checkMagicBytes:o=!0}=t;if(!function(e,t=10){const r=1024*t*1024;return e.size<=r}(e,r))return{valid:!1,error:`El archivo es demasiado grande. Máximo ${r}MB`};if(n&&!function(e,t){const r=e.name.split(".").pop()?.toLowerCase();return!!r&&t.includes(r)}(e,n))return{valid:!1,error:`Extensión no permitida. Solo: ${n.join(", ")}`};if(o){const t=await async function(e){try{const t=lr[e.type];if(!t)return!0;const r=await e.slice(0,12).arrayBuffer(),n=new Uint8Array(r);return t.every((e,t)=>n[t]===e)}catch(t){return console.error("File validation error:",t),!1}}(e);if(!t)return{valid:!1,error:"El archivo está corrupto o no es del tipo indicado"}}return{valid:!0}}const dr=1e3,ur={enableImages:!0,enableAudio:!0,enableFiles:!0,enableLocation:!0,allowedFileTypes:["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],maxFileSizeMB:10};function mr({isConnected:e,placeholder:t="Escribe un mensaje...",primaryColor:r,mediaConfig:o,onSendMessage:a,onSendAttachment:s,onSendLocation:i,onVoiceCall:l}){const{t:d}=j(),[u,m]=n(""),[p,x]=n(!1),[v,y]=n(!1),[w,k]=n(0),[C,N]=n(null),[M,z]=n(!1),[S,E]=n(!1),A=h(null),_=h(null),I=h(null),F=h(null),L=h([]),$=h(null),T=St({primaryColor:r}),O=c(()=>({...ur,...o}),[o]),D=c(()=>O.enableImages||O.enableAudio||O.enableFiles||O.enableLocation,[O]),U=()=>{const t=u.trim();C?(s?.(C.file,C.type),N(null),m("")):t&&e&&(a(t),m("")),A.current&&(A.current.style.height="40px",requestAnimationFrame(()=>A.current?.focus()))},W=async e=>{const t=e.target.files?.[0];if(!t)return;x(!1);const r=await cr(t,{maxSizeMB:O.maxFileSizeMB||10,allowedExtensions:O.allowedFileTypes||["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],checkMagicBytes:!0});if(r.valid)if(t.type.startsWith("image/")&&O.enableImages){z(!0);try{const{default:e}=await import("./browser-image-compression-CsxM8KJN.js"),r={maxSizeMB:.8,maxWidthOrHeight:1200,useWebWorker:!0},n=await e(t,r);N({type:"image",file:n,previewUrl:URL.createObjectURL(n)})}catch(n){Tt.error("Image compression failed:",n),N({type:"image",file:t,previewUrl:URL.createObjectURL(t)})}finally{z(!1)}}else N({type:"file",file:t,previewUrl:""});else alert(r.error||"Archivo no válido")},P=async e=>{if(F.current&&(e||(F.current.onstop=null),F.current.stop(),F.current.stream.getTracks().forEach(e=>e.stop())),$.current&&clearInterval($.current),y(!1),k(0),e&&L.current.length>0){const e=new Blob(L.current,{type:"audio/webm"}),t=new File([e],`audio-${Date.now()}.webm`,{type:"audio/webm"}),r=await cr(t,{maxSizeMB:10});if(!r.valid)return Tt.error("Audio validation failed:",r.error),alert(r.error),void(L.current=[]);s?.(t,"audio"),L.current=[]}};/* @__PURE__ */
44
+ /* @__PURE__ */g(or,{})]})]}):/* @__PURE__ */g("div",{className:"flex-1 bg-background"})},(e,t)=>{if(e.messages.length!==t.messages.length)return!1;if(e.isTyping!==t.isTyping)return!1;if(e.primaryColor!==t.primaryColor)return!1;if(e.botName!==t.botName)return!1;if(e.logoUrl!==t.logoUrl)return!1;const r=e.messages[e.messages.length-1],n=t.messages[t.messages.length-1];return r?.id===n?.id}),lr={"image/jpeg":[255,216,255],"image/png":[137,80,78,71,13,10,26,10],"image/webp":[82,73,70,70],"image/gif":[71,73,70,56],"audio/mpeg":[255,251],"audio/wav":[82,73,70,70],"audio/webm":[26,69,223,163],"audio/ogg":[79,103,103,83]};async function cr(e,t={}){const{maxSizeMB:r=10,allowedExtensions:n,checkMagicBytes:o=!0}=t;if(!function(e,t=10){const r=1024*t*1024;return e.size<=r}(e,r))return{valid:!1,error:`El archivo es demasiado grande. Máximo ${r}MB`};if(n&&!function(e,t){const r=e.name.split(".").pop()?.toLowerCase();return!!r&&t.includes(r)}(e,n))return{valid:!1,error:`Extensión no permitida. Solo: ${n.join(", ")}`};if(o){const t=await async function(e){try{const t=lr[e.type];if(!t)return!0;const r=await e.slice(0,12).arrayBuffer(),n=new Uint8Array(r);return t.every((e,t)=>n[t]===e)}catch(t){return console.error("File validation error:",t),!1}}(e);if(!t)return{valid:!1,error:"El archivo está corrupto o no es del tipo indicado"}}return{valid:!0}}const dr=1e3,ur={enableImages:!0,enableAudio:!0,enableFiles:!0,enableLocation:!0,allowedFileTypes:["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],maxFileSizeMB:10};function mr({isConnected:e,placeholder:t="Escribe un mensaje...",primaryColor:r,mediaConfig:o,onSendMessage:a,onSendAttachment:s,onSendLocation:i,onVoiceCall:l}){const{t:d}=j(),[u,m]=n(""),[p,x]=n(!1),[v,y]=n(!1),[w,k]=n(0),[C,N]=n(null),[M,z]=n(!1),[S,E]=n(!1),_=h(null),A=h(null),I=h(null),F=h(null),L=h([]),$=h(null),T=St({primaryColor:r}),O=c(()=>({...ur,...o}),[o]),D=c(()=>O.enableImages||O.enableAudio||O.enableFiles||O.enableLocation,[O]),U=()=>{const t=u.trim();C?(s?.(C.file,C.type),N(null),m("")):t&&e&&(a(t),m("")),_.current&&(_.current.style.height="40px",requestAnimationFrame(()=>_.current?.focus()))},W=async e=>{const t=e.target.files?.[0];if(!t)return;x(!1);const r=await cr(t,{maxSizeMB:O.maxFileSizeMB||10,allowedExtensions:O.allowedFileTypes||["jpg","jpeg","png","webp","gif","pdf","doc","docx","txt","zip"],checkMagicBytes:!0});if(r.valid)if(t.type.startsWith("image/")&&O.enableImages){z(!0);try{const{default:e}=await import("./browser-image-compression-CsxM8KJN.js"),r={maxSizeMB:.8,maxWidthOrHeight:1200,useWebWorker:!0},n=await e(t,r);N({type:"image",file:n,previewUrl:URL.createObjectURL(n)})}catch(n){Tt.error("Image compression failed:",n),N({type:"image",file:t,previewUrl:URL.createObjectURL(t)})}finally{z(!1)}}else N({type:"file",file:t,previewUrl:""});else alert(r.error||"Archivo no válido")},P=async e=>{if(F.current&&(e||(F.current.onstop=null),F.current.stop(),F.current.stream.getTracks().forEach(e=>e.stop())),$.current&&clearInterval($.current),y(!1),k(0),e&&L.current.length>0){const e=new Blob(L.current,{type:"audio/webm"}),t=new File([e],`audio-${Date.now()}.webm`,{type:"audio/webm"}),r=await cr(t,{maxSizeMB:10});if(!r.valid)return Tt.error("Audio validation failed:",r.error),alert(r.error),void(L.current=[]);s?.(t,"audio"),L.current=[]}};/* @__PURE__ */
45
45
  return f("div",{className:"relative",children:[(C||M)&&/* @__PURE__ */g("div",{className:"absolute bottom-full left-0 mb-2 p-2 rounded-2xl border shadow-soft-2xl animate-in slide-in-from-bottom-2 z-50",style:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))"},children:/* @__PURE__ */g("div",{className:"relative w-16 h-16",children:M?/* @__PURE__ */g("div",{className:"w-full h-full flex flex-col items-center justify-center bg-muted rounded-xl",children:/* @__PURE__ */g(H,{className:"animate-spin text-primary h-5 w-5"})}):/* @__PURE__ */f(b,"image"===C?.type?{children:[
46
46
  /* @__PURE__ */g("img",{src:C?.previewUrl,className:"w-full h-full object-cover rounded-xl border",alt:d("preview")}),
47
47
  /* @__PURE__ */g("button",{onClick:()=>N(null),className:"absolute -top-1.5 -right-1.5 bg-destructive text-white rounded-full p-1 shadow-md hover:scale-105",children:/* @__PURE__ */g(se,{size:10,strokeWidth:3})})]}:{children:[
@@ -50,9 +50,9 @@ return f("div",{className:"relative",children:[(C||M)&&/* @__PURE__ */g("div",{c
50
50
  /* @__PURE__ */g("span",{className:"text-[8px] mt-1 font-bold truncate max-w-[60px]",children:C?.file.name})]}),
51
51
  /* @__PURE__ */g("button",{onClick:()=>N(null),className:"absolute -top-1.5 -right-1.5 bg-destructive text-white rounded-full p-1 shadow-md hover:scale-105",children:/* @__PURE__ */g(se,{size:10,strokeWidth:3})})]})})}),
52
52
  /* @__PURE__ */g("input",{type:"file",accept:"image/*",className:"hidden",ref:I,onChange:W}),
53
- /* @__PURE__ */g("input",{type:"file",accept:O.allowedFileTypes?.map(e=>`.${e}`).join(","),className:"hidden",ref:_,onChange:W}),
53
+ /* @__PURE__ */g("input",{type:"file",accept:O.allowedFileTypes?.map(e=>`.${e}`).join(","),className:"hidden",ref:A,onChange:W}),
54
54
  /* @__PURE__ */f("div",{className:"flex items-center max-w-full",style:{gap:"var(--spacing-3)"},children:[D&&s&&/* @__PURE__ */f("div",{className:"relative shrink-0",children:[p&&/* @__PURE__ */f("div",{className:"absolute bottom-full left-0 flex flex-col animate-in fade-in slide-in-from-bottom-2 duration-300 z-[60]",style:{marginBottom:"var(--spacing-2)",gap:"var(--spacing-2)"},children:[O.enableImages&&/* @__PURE__ */f("button",{onClick:()=>I.current?.click(),className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[
55
- /* @__PURE__ */g(B,{size:18,className:"text-blue-500"})," ",d("fotos")]}),O.enableFiles&&/* @__PURE__ */f("button",{onClick:()=>_.current?.click(),className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[
55
+ /* @__PURE__ */g(B,{size:18,className:"text-blue-500"})," ",d("fotos")]}),O.enableFiles&&/* @__PURE__ */f("button",{onClick:()=>A.current?.click(),className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[
56
56
  /* @__PURE__ */g(R,{size:18,className:"text-purple-500"})," Archivos"]}),O.enableLocation&&i&&/* @__PURE__ */f("button",{onClick:()=>{E(!0),navigator.geolocation.getCurrentPosition(e=>{i?.({latitude:e.coords.latitude,longitude:e.coords.longitude}),E(!1),x(!1)},()=>E(!1))},className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[S?/* @__PURE__ */g(H,{size:18,className:"animate-spin"}):/* @__PURE__ */g(q,{size:18,className:"text-emerald-500"})," ",d("ubicacion")]}),O.enableVoice&&l&&/* @__PURE__ */f("button",{onClick:()=>{l?.(),x(!1)},className:"flex items-center border shadow-soft-2xl rounded-2xl transition-colors text-[10px] font-black uppercase tracking-widest",style:{gap:"var(--spacing-3)",padding:"var(--spacing-3) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--card-foreground))"},children:[
57
57
  /* @__PURE__ */g(X,{size:18,className:"text-amber-500"})," Llamar"]})]}),
58
58
  /* @__PURE__ */g("button",{onClick:()=>x(!p),className:kt("h-10 w-10 rounded-full flex items-center justify-center transition-all shadow-sm z-10",p?"bg-muted text-foreground rotate-45":"bg-muted/50 text-muted-foreground hover:bg-muted"),children:/* @__PURE__ */g(ee,{size:22,strokeWidth:2.5})})]}),
@@ -62,7 +62,7 @@ return f("div",{className:"relative",children:[(C||M)&&/* @__PURE__ */g("div",{c
62
62
  /* @__PURE__ */g("div",{className:"flex gap-[3px]",children:[1,2,3,4].map(e=>/* @__PURE__ */g("span",{className:"w-[3px] h-3 bg-destructive/60 rounded-full animate-pulse",style:{animationDelay:.15*e+"s"}},e))}),
63
63
  /* @__PURE__ */f("span",{className:"text-destructive font-black text-[11px] tabular-nums",children:[Math.floor(w/60),":",(w%60).toString().padStart(2,"0")]})]}),
64
64
  /* @__PURE__ */g("button",{onClick:()=>P(!0),className:"w-7 h-7 rounded-full bg-destructive flex items-center justify-center text-white shadow-lg",children:/* @__PURE__ */g(re,{size:12,fill:"currentColor"})})]}:{className:"w-full relative flex items-center",children:[
65
- /* @__PURE__ */g("textarea",{ref:A,rows:1,value:u,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey?"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),U()):(e.preventDefault(),U())},onChange:e=>{const t=e.target.value.slice(0,dr);m(t),A.current&&(A.current.style.height="40px",A.current.style.height=`${Math.min(A.current.scrollHeight,120)}px`)},onFocus:()=>x(!1),placeholder:t,"aria-label":d("accessibility.typeMessage"),"aria-describedby":"send-message-hint","aria-invalid":u.length>dr,disabled:!e,className:"w-full bg-transparent text-sm py-2.5 outline-none resize-none overflow-hidden leading-tight pr-8 scrollbar-none disabled:opacity-50",style:{scrollbarWidth:"none",msOverflowStyle:"none",color:"hsl(var(--foreground))"}}),
65
+ /* @__PURE__ */g("textarea",{ref:_,rows:1,value:u,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey?"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),U()):(e.preventDefault(),U())},onChange:e=>{const t=e.target.value.slice(0,dr);m(t),_.current&&(_.current.style.height="40px",_.current.style.height=`${Math.min(_.current.scrollHeight,120)}px`)},onFocus:()=>x(!1),placeholder:t,"aria-label":d("accessibility.typeMessage"),"aria-describedby":"send-message-hint","aria-invalid":u.length>dr,disabled:!e,className:"w-full bg-transparent text-sm py-2.5 outline-none resize-none overflow-hidden leading-tight pr-8 scrollbar-none disabled:opacity-50",style:{scrollbarWidth:"none",msOverflowStyle:"none",color:"hsl(var(--foreground))"}}),
66
66
  /* @__PURE__ */g("span",{id:"send-message-hint",className:"sr-only",children:d("accessibility.sendMessageHint")}),u.length>800&&/* @__PURE__ */g("span",{className:kt("absolute right-0 text-[9px] font-bold tabular-nums",u.length>=dr?"text-destructive":"text-muted-foreground/40"),children:dr-u.length})]})}),!v&&/* @__PURE__ */g(b,{children:u.trim()||C?/* @__PURE__ */g("button",{onClick:U,disabled:!e||M&&!!C,className:"h-10 w-10 rounded-full flex items-center justify-center transition-all active:scale-90 shadow-md shadow-primary/20 shrink-0 disabled:opacity-30 disabled:grayscale",style:{backgroundColor:T},children:/* @__PURE__ */g(re,{size:18,className:"text-white ml-0.5 fill-current"})}):O.enableAudio&&s?/* @__PURE__ */g("button",{onClick:async()=>{if(e)try{const e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e);F.current=t,L.current=[],t.ondataavailable=e=>L.current.push(e.data),t.onstop=()=>{const e=new File([new Blob(L.current)],"voice.webm",{type:"audio/webm"});s?.(e,"audio")},t.start(),y(!0),$.current=setInterval(()=>k(e=>e+1),1e3)}catch{alert("Micrófono denegado o no disponible")}},disabled:!e,className:"h-10 w-10 rounded-full flex items-center justify-center transition-all active:scale-90 shadow-md shadow-primary/20 shrink-0 disabled:opacity-30 disabled:grayscale",style:{backgroundColor:T},children:/* @__PURE__ */g(Z,{size:20,strokeWidth:2.5,className:"text-white"})}):/* @__PURE__ */g("button",{onClick:U,disabled:!e,className:"h-10 w-10 rounded-full flex items-center justify-center transition-all active:scale-90 shadow-md shadow-primary/20 shrink-0 disabled:opacity-30 disabled:grayscale",style:{backgroundColor:T},children:/* @__PURE__ */g(re,{size:18,className:"text-white ml-0.5 fill-current"})})})]})]})}function hr(e,t){let r=0,n=null;return function(...o){const a=Date.now(),s=a-r,i=()=>{r=a,e(...o)};s>=t?(n&&(clearTimeout(n),n=null),i()):n||(n=setTimeout(()=>{i(),n=null},t-s))}}function pr(e=640){const[t,r]=n(()=>"undefined"!=typeof window&&window.innerWidth<e);return o(()=>{const t=hr(()=>{r(window.innerWidth<e)},250);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t}const gr="24px",fr=m(()=>import("./Avatar3D-B2RkgErq.js")),br={happy:"😊",wink:"😉",thinking:"🤔",sad:"😢",excited:"🤩",love:"❤️",laugh:"😄",surprised:"😲",angry:"😠",confused:"😕",sorry:"😔",default:"💬"},xr={idle:"Llamada de voz",connecting:"Conectando...",listening:"Escuchando...",thinking:"Pensando...",speaking:"Hablando..."},vr={tagNames:["p","a","strong","em","ul","ol","li","br","span","code"],attributes:{a:["href","target","rel"],span:["className"],code:["className"]},protocols:{a:{href:["http","https","mailto","tel"]}}},yr=24e3;class wr extends p{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){console.warn("[Avatar3D] Three.js failed, falling back to 2D orb:",e.message),this.props.onError()}render(){return this.state.hasError?null:this.props.children}}function kr({avatars:e,logoUrl:t,avatar3dUrl:r,emotion:o,callState:a,audioLevel:s,config:i}){const l=e&&Object.keys(e).length>0,d=!!t,[m,h]=n(!1),p=c(()=>l||d?l?e[o||"default"]||e.default||t||Ot:t||Ot:null,[l,d,e,o,t]),b="listening"===a||"speaking"===a,x="speaking"===a?i.speakingColor:"thinking"===a?i.thinkingColor:"listening"===a?i.listeningColor:"#ffffff20",v="speaking"===a?i.speakingScale:"thinking"===a?i.thinkingScale:1,y=i.orbSize;/* @__PURE__ */
67
67
  return f("div",r&&!m?{className:"relative flex flex-col items-center gap-4",children:[
68
68
  /* @__PURE__ */g(wr,{onError:()=>h(!0),children:/* @__PURE__ */g(u,{fallback:/* @__PURE__ */g("div",{className:"rounded-full flex items-center justify-center animate-pulse",style:{width:`${i.orbSize}px`,height:`${i.orbSize}px`,background:`radial-gradient(circle at 35% 35%, ${i.speakingColor}40, ${i.speakingColor}10 60%, transparent 80%)`,boxShadow:`0 0 30px ${i.speakingColor}15`}}),children:/* @__PURE__ */g(fr,{modelUrl:r,emotion:o,callState:a,audioLevel:s,primaryColor:i.speakingColor,size:i.orbSize})})}),i.showWaveform&&/* @__PURE__ */g(Cr,{isActive:"listening"===a||"speaking"===a,audioLevel:s,color:"speaking"===a?i.speakingColor:"thinking"===a?i.thinkingColor:i.listeningColor})]}:p?{className:"relative flex flex-col items-center gap-4",children:[
@@ -73,7 +73,7 @@ return f("div",r&&!m?{className:"relative flex flex-col items-center gap-4",chil
73
73
  /* @__PURE__ */g("div",{className:"absolute rounded-full",style:{inset:"12px",border:`1px solid ${x}15`,animation:b?"spin 12s linear infinite reverse":"none"}}),
74
74
  /* @__PURE__ */g("div",{className:"absolute rounded-full flex items-center justify-center",style:{inset:"24px",background:`radial-gradient(circle at 35% 35%, ${x}40, ${x}10 60%, transparent 80%)`,boxShadow:b?`0 0 60px ${x}35, 0 0 120px ${x}15, inset 0 0 40px ${x}10`:`0 0 30px ${x}15`,transform:`scale(${v})`,transition:"all 0.5s cubic-bezier(0.4, 0, 0.2, 1)"},children:/* @__PURE__ */g("div",{className:"rounded-full",style:{width:.35*y+"px",height:.35*y+"px",background:`radial-gradient(circle, ${x}90, ${x}40)`,boxShadow:`0 0 20px ${x}60`,animation:b?"pulse 2s ease-in-out infinite":"none"}})}),b&&[0,1,2].map(e=>/* @__PURE__ */g("div",{className:"absolute rounded-full",style:{width:"4px",height:"4px",backgroundColor:x,opacity:.6,top:"50%",left:"50%",transform:`rotate(${120*e+Date.now()/20%360}deg) translateX(${(y+48)/2}px)`,animation:`spin ${6+2*e}s linear infinite`,boxShadow:`0 0 6px ${x}`}},e))]}),i.showWaveform&&/* @__PURE__ */g(Cr,{isActive:b,audioLevel:s,color:x})]})}function Cr({isActive:e,audioLevel:t,color:r}){/* @__PURE__ */
75
75
  return g("div",{className:"flex items-center gap-[3px] h-10",children:Array.from({length:12}).map((n,o)=>{const a=Math.abs(o-5.5)/5.5,s=e?Math.max(4,40*t*(1-.5*a)*(.5+.5*Math.sin(Date.now()/100+.8*o))):4;/* @__PURE__ */
76
- return g("div",{className:"rounded-full transition-all duration-100",style:{width:"3px",height:`${s}px`,backgroundColor:r,opacity:e?.7-.3*a:.2}},o)})})}function Nr({isOpen:e,onClose:t,primaryColor:r="#10b981",getSocket:a,avatars:i,logoUrl:l,avatar3dUrl:d,voiceConfig:u,onAddMessage:m}){const p=c(()=>function(e,t="#10b981"){return{backgroundColor:e?.backgroundColor??"#0a0a0a",listeningColor:e?.listeningColor??"#10b981",speakingColor:e?.speakingColor??t,thinkingColor:e?.thinkingColor??"#a855f7",showEmojis:e?.showEmojis??!0,showEmotionLabel:e?.showEmotionLabel??!0,showWaveform:e?.showWaveform??!0,showBadge:e?.showBadge??!1,badgeText:e?.badgeText??"",emotionEmojis:{...br,...e?.emotionEmojis},statusLabels:{...xr,...e?.statusLabels},orbSize:e?.orbSize??128,speakingScale:e?.speakingScale??1.08,thinkingScale:e?.thinkingScale??.95,avatar3dUrl:e?.avatar3dUrl}}(u,r),[u,r]),[x,k]=n("idle"),[C,N]=n(0),[M,z]=n(!1),[S,E]=n(0),[j,A]=n(null),[_,I]=n([]),[F,L]=n(!1),[$,T]=n(""),[O,D]=n(!1),U=h(null),W=h(null),R=h(null),P=h(null),B=h(null),H=h(0),q=h(!1),G=h(null),Y=h(null),X=h(()=>{}),Q=h(null),ee=h(0),te=h(null),ne=h([]),oe=h(!1),se=h(0),ie=h([]),le=s(e=>`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`,[]),ce=s(()=>{if(0===ne.current.length)return;te.current&&"closed"!==te.current.state||(te.current=new AudioContext({sampleRate:yr})),"suspended"===te.current.state&&te.current.resume().catch(()=>{});const e=te.current;oe.current=!0,k("speaking");const t=e.currentTime;for(se.current<t&&(se.current=t);ne.current.length>0;){const t=ne.current.shift(),r=e.createBuffer(1,t.length,yr);r.getChannelData(0).set(t);const n=e.createBufferSource();n.buffer=r,n.connect(e.destination),n.start(se.current),ie.current.push(n),n.onended=()=>{ie.current=ie.current.filter(e=>e!==n),0===ie.current.length&&0===ne.current.length&&(oe.current=!1,k(e=>"speaking"===e?"listening":e))},se.current+=t.length/yr}},[]),de=h({}),ue=s(()=>{const e=a?.();if(!e||q.current)return;const t=()=>{k("listening")},r=e=>{if(!e?.data)return;const t=function(e){const t=atob(e),r=new Uint8Array(t.length);for(let a=0;a<t.length;a++)r[a]=t.charCodeAt(a);const n=new Int16Array(r.buffer),o=new Float32Array(n.length);for(let a=0;a<n.length;a++)o[a]=n[a]/32768;return o}(e.data);ne.current.push(t),ce(),be()},n=()=>{ie.current.forEach(e=>{try{e.stop()}catch{}}),ie.current=[],ne.current.length=0,se.current=0,oe.current=!1,k("listening")},o=()=>{},s=e=>{console.error("[VoiceCall] Voice error:",e)},i=e=>{e?.emotion&&(A(e.emotion),setTimeout(()=>A(t=>t===e.emotion?null:t),4e3))},l=e=>{e?.text&&(be(),I(t=>{if(t.length>0&&"user"===t[t.length-1].role){const r=[...t],n=r[r.length-1].text,o=n.length>0&&!n.endsWith(" ")&&!e.text.startsWith(" ");return r[r.length-1]={...r[r.length-1],text:n+(o?" ":"")+e.text},r}return[...t,{role:"user",text:e.text}]}))},c=e=>{e?.text&&(be(),I(t=>{if(t.length>0&&"bot"===t[t.length-1].role){const r=[...t],n=r[r.length-1].text,o=n.length>0&&!n.endsWith(" ")&&!e.text.startsWith(" ");return r[r.length-1]={...r[r.length-1],text:n+(o?" ":"")+e.text},r}return[...t,{role:"bot",text:e.text}]}))},d=()=>{k("thinking"),be()};de.current={voiceReady:t,voiceAudioChunk:r,voiceInterrupted:n,voiceTurnComplete:o,voiceError:s,voiceEmotion:i,voiceUserTranscript:l,voiceModelTranscript:c,voiceModelThinking:d},e.on("voice_ready",t),e.on("voice_audio_chunk",r),e.on("voice_interrupted",n),e.on("voice_turn_complete",o),e.on("voice_error",s),e.on("voice_emotion",i),e.on("voice_user_transcript",l),e.on("voice_model_transcript",c),e.on("voice_model_thinking",d),e.on("voice_timeout",()=>{X.current()}),q.current=!0},[a,ce]),me=s(()=>{const e=a?.();if(!e||!q.current)return;const t=de.current;t.voiceReady&&e.off("voice_ready",t.voiceReady),t.voiceAudioChunk&&e.off("voice_audio_chunk",t.voiceAudioChunk),t.voiceInterrupted&&e.off("voice_interrupted",t.voiceInterrupted),t.voiceTurnComplete&&e.off("voice_turn_complete",t.voiceTurnComplete),t.voiceError&&e.off("voice_error",t.voiceError),t.voiceEmotion&&e.off("voice_emotion",t.voiceEmotion),t.voiceUserTranscript&&e.off("voice_user_transcript",t.voiceUserTranscript),t.voiceModelTranscript&&e.off("voice_model_transcript",t.voiceModelTranscript),t.voiceModelThinking&&e.off("voice_model_thinking",t.voiceModelThinking),e.off("voice_timeout"),de.current={},q.current=!1},[a]),he=s(async()=>{const e=a?.();if(!e)return;const t=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:16e3,channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});R.current=t;const r=new AudioContext({sampleRate:16e3});P.current=r,"suspended"===r.state&&await r.resume();const n=r.createMediaStreamSource(t),o=r.createAnalyser();if(o.fftSize=256,n.connect(o),W.current=o,!G.current){const e=new Blob(["\nclass VoicePCMProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffer = new Float32Array(1600); // 100ms at 16kHz\n this.bufferIndex = 0;\n }\n process(inputs) {\n const input = inputs[0]?.[0];\n if (!input) return true;\n for (let i = 0; i < input.length; i++) {\n this.buffer[this.bufferIndex++] = input[i];\n if (this.bufferIndex >= 1600) {\n // Convert Float32 → Int16 PCM\n const int16 = new Int16Array(1600);\n for (let j = 0; j < 1600; j++) {\n const s = Math.max(-1, Math.min(1, this.buffer[j]));\n int16[j] = s < 0 ? s * 0x8000 : s * 0x7FFF;\n }\n this.port.postMessage(int16.buffer, [int16.buffer]);\n this.buffer = new Float32Array(1600);\n this.bufferIndex = 0;\n }\n }\n return true;\n }\n}\nregisterProcessor('voice-pcm-processor', VoicePCMProcessor);\n"],{type:"application/javascript"});G.current=URL.createObjectURL(e)}await r.audioWorklet.addModule(G.current);const s=new AudioWorkletNode(r,"voice-pcm-processor");B.current=s,s.port.onmessage=t=>{if(e.connected&&!M){const r=function(e){const t=new Uint8Array(e);let r="";for(let n=0;n<t.byteLength;n++)r+=String.fromCharCode(t[n]);return btoa(r)}(t.data);e.emit("voice_audio_chunk",{data:r})}},n.connect(s);const i=()=>{if(!W.current)return;const e=new Uint8Array(W.current.frequencyBinCount);W.current.getByteFrequencyData(e);const t=e.reduce((e,t)=>e+t,0)/e.length;E(t/255),H.current=requestAnimationFrame(i)};i()},[a,M]),pe=s(()=>{cancelAnimationFrame(H.current),B.current?.disconnect(),B.current=null,R.current?.getTracks().forEach(e=>e.stop()),R.current=null,P.current?.close(),P.current=null,W.current=null,E(0)},[]),ge=s(async()=>{const e=a?.();if(e?.connected){k("connecting"),N(0),I([]),A(null),ne.current=[],ue(),te.current&&"closed"!==te.current.state||(te.current=new AudioContext({sampleRate:yr})),te.current.resume().catch(()=>{});try{await he()}catch(t){return console.error("[VoiceCall] Mic error:",t),void k("idle")}e.emit("voice_start",{language:"es-AR",voice:"Kore"}),U.current=setInterval(()=>{N(e=>e+1)},1e3),xe()}else console.error("[VoiceCall] Socket not connected")},[a,ue,he]),fe=s(()=>{pe(),ie.current.forEach(e=>{try{e.stop()}catch{}}),ie.current=[],ne.current=[],se.current=0,oe.current=!1,te.current?.close(),te.current=null,U.current&&(clearInterval(U.current),U.current=null),Q.current&&(clearInterval(Q.current),Q.current=null);const e=a?.();e?.connected&&e.emit("voice_stop"),m&&_.length>0&&_.forEach(e=>{m({sender:"user"===e.role?"user":"bot",content:e.text})}),me(),k("idle"),E(0),N(0),z(!1),I([]),D(!1),t()},[a,pe,me,t,m,_]);o(()=>{X.current=fe},[fe]);const be=s(()=>{ee.current=0,D(!1)},[]),xe=s(()=>{ee.current=0,Q.current&&clearInterval(Q.current),Q.current=setInterval(()=>{ee.current+=1;const e=ee.current;e>=90&&e<120&&D(!0),e>=120&&X.current()},1e3)},[]),ve=s(()=>{z(e=>!e)},[]),ye=s(()=>{const e=$.trim();if(!e)return;const t=a?.();t?.connected&&(t.emit("voice_text_input",{text:e}),T(""),L(!1))},[$,a]);if(o(()=>{e&&"idle"===x&&ge()},[e]),o(()=>()=>{pe(),U.current&&clearInterval(U.current),me()},[]),!e)return null;const we="speaking"===x?p.speakingColor:"thinking"===x?p.thinkingColor:"listening"===x?p.listeningColor:r;/* @__PURE__ */
76
+ return g("div",{className:"rounded-full transition-all duration-100",style:{width:"3px",height:`${s}px`,backgroundColor:r,opacity:e?.7-.3*a:.2}},o)})})}function Nr({isOpen:e,onClose:t,primaryColor:r="#10b981",getSocket:a,avatars:i,logoUrl:l,avatar3dUrl:d,voiceConfig:u,onAddMessage:m}){const p=c(()=>function(e,t="#10b981"){return{backgroundColor:e?.backgroundColor??"#0a0a0a",listeningColor:e?.listeningColor??"#10b981",speakingColor:e?.speakingColor??t,thinkingColor:e?.thinkingColor??"#a855f7",showEmojis:e?.showEmojis??!0,showEmotionLabel:e?.showEmotionLabel??!0,showWaveform:e?.showWaveform??!0,showBadge:e?.showBadge??!1,badgeText:e?.badgeText??"",emotionEmojis:{...br,...e?.emotionEmojis},statusLabels:{...xr,...e?.statusLabels},orbSize:e?.orbSize??128,speakingScale:e?.speakingScale??1.08,thinkingScale:e?.thinkingScale??.95,avatar3dUrl:e?.avatar3dUrl}}(u,r),[u,r]),[x,k]=n("idle"),[C,N]=n(0),[M,z]=n(!1),[S,E]=n(0),[j,_]=n(null),[A,I]=n([]),[F,L]=n(!1),[$,T]=n(""),[O,D]=n(!1),U=h(null),W=h(null),R=h(null),P=h(null),B=h(null),H=h(0),q=h(!1),G=h(null),Y=h(null),X=h(()=>{}),Q=h(null),ee=h(0),te=h(null),ne=h([]),oe=h(!1),se=h(0),ie=h([]),le=s(e=>`${Math.floor(e/60)}:${(e%60).toString().padStart(2,"0")}`,[]),ce=s(()=>{if(0===ne.current.length)return;te.current&&"closed"!==te.current.state||(te.current=new AudioContext({sampleRate:yr})),"suspended"===te.current.state&&te.current.resume().catch(()=>{});const e=te.current;oe.current=!0,k("speaking");const t=e.currentTime;for(se.current<t&&(se.current=t);ne.current.length>0;){const t=ne.current.shift(),r=e.createBuffer(1,t.length,yr);r.getChannelData(0).set(t);const n=e.createBufferSource();n.buffer=r,n.connect(e.destination),n.start(se.current),ie.current.push(n),n.onended=()=>{ie.current=ie.current.filter(e=>e!==n),0===ie.current.length&&0===ne.current.length&&(oe.current=!1,k(e=>"speaking"===e?"listening":e))},se.current+=t.length/yr}},[]),de=h({}),ue=s(()=>{const e=a?.();if(!e||q.current)return;const t=()=>{k("listening")},r=e=>{if(!e?.data)return;const t=function(e){const t=atob(e),r=new Uint8Array(t.length);for(let a=0;a<t.length;a++)r[a]=t.charCodeAt(a);const n=new Int16Array(r.buffer),o=new Float32Array(n.length);for(let a=0;a<n.length;a++)o[a]=n[a]/32768;return o}(e.data);ne.current.push(t),ce(),be()},n=()=>{ie.current.forEach(e=>{try{e.stop()}catch{}}),ie.current=[],ne.current.length=0,se.current=0,oe.current=!1,k("listening")},o=()=>{},s=e=>{console.error("[VoiceCall] Voice error:",e)},i=e=>{e?.emotion&&(_(e.emotion),setTimeout(()=>_(t=>t===e.emotion?null:t),4e3))},l=e=>{e?.text&&(be(),I(t=>{if(t.length>0&&"user"===t[t.length-1].role){const r=[...t],n=r[r.length-1].text,o=n.length>0&&!n.endsWith(" ")&&!e.text.startsWith(" ");return r[r.length-1]={...r[r.length-1],text:n+(o?" ":"")+e.text},r}return[...t,{role:"user",text:e.text}]}))},c=e=>{e?.text&&I(t=>{const r=t.map(e=>e.role).lastIndexOf("user");if(r>=0){const n=[...t];return n[r]={...n[r],text:e.text},n}return[...t,{role:"user",text:e.text}]})},d=e=>{e?.text&&(be(),I(t=>{if(t.length>0&&"bot"===t[t.length-1].role){const r=[...t],n=r[r.length-1].text,o=n.length>0&&!n.endsWith(" ")&&!e.text.startsWith(" ");return r[r.length-1]={...r[r.length-1],text:n+(o?" ":"")+e.text},r}return[...t,{role:"bot",text:e.text}]}))},u=()=>{k("thinking"),be()};de.current={voiceReady:t,voiceAudioChunk:r,voiceInterrupted:n,voiceTurnComplete:o,voiceError:s,voiceEmotion:i,voiceUserTranscript:l,voiceUserTranscriptFinal:c,voiceModelTranscript:d,voiceModelThinking:u},e.on("voice_ready",t),e.on("voice_audio_chunk",r),e.on("voice_interrupted",n),e.on("voice_turn_complete",o),e.on("voice_error",s),e.on("voice_emotion",i),e.on("voice_user_transcript",l),e.on("voice_user_transcript_final",c),e.on("voice_model_transcript",d),e.on("voice_model_thinking",u),e.on("voice_timeout",()=>{X.current()}),q.current=!0},[a,ce]),me=s(()=>{const e=a?.();if(!e||!q.current)return;const t=de.current;t.voiceReady&&e.off("voice_ready",t.voiceReady),t.voiceAudioChunk&&e.off("voice_audio_chunk",t.voiceAudioChunk),t.voiceInterrupted&&e.off("voice_interrupted",t.voiceInterrupted),t.voiceTurnComplete&&e.off("voice_turn_complete",t.voiceTurnComplete),t.voiceError&&e.off("voice_error",t.voiceError),t.voiceEmotion&&e.off("voice_emotion",t.voiceEmotion),t.voiceUserTranscript&&e.off("voice_user_transcript",t.voiceUserTranscript),t.voiceUserTranscriptFinal&&e.off("voice_user_transcript_final",t.voiceUserTranscriptFinal),t.voiceModelTranscript&&e.off("voice_model_transcript",t.voiceModelTranscript),t.voiceModelThinking&&e.off("voice_model_thinking",t.voiceModelThinking),e.off("voice_timeout"),de.current={},q.current=!1},[a]),he=s(async()=>{const e=a?.();if(!e)return;const t=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:16e3,channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});R.current=t;const r=new AudioContext({sampleRate:16e3});P.current=r,"suspended"===r.state&&await r.resume();const n=r.createMediaStreamSource(t),o=r.createAnalyser();if(o.fftSize=256,n.connect(o),W.current=o,!G.current){const e=new Blob(["\nclass VoicePCMProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.buffer = new Float32Array(1600); // 100ms at 16kHz\n this.bufferIndex = 0;\n }\n process(inputs) {\n const input = inputs[0]?.[0];\n if (!input) return true;\n for (let i = 0; i < input.length; i++) {\n this.buffer[this.bufferIndex++] = input[i];\n if (this.bufferIndex >= 1600) {\n // Convert Float32 → Int16 PCM\n const int16 = new Int16Array(1600);\n for (let j = 0; j < 1600; j++) {\n const s = Math.max(-1, Math.min(1, this.buffer[j]));\n int16[j] = s < 0 ? s * 0x8000 : s * 0x7FFF;\n }\n this.port.postMessage(int16.buffer, [int16.buffer]);\n this.buffer = new Float32Array(1600);\n this.bufferIndex = 0;\n }\n }\n return true;\n }\n}\nregisterProcessor('voice-pcm-processor', VoicePCMProcessor);\n"],{type:"application/javascript"});G.current=URL.createObjectURL(e)}await r.audioWorklet.addModule(G.current);const s=new AudioWorkletNode(r,"voice-pcm-processor");B.current=s,s.port.onmessage=t=>{if(e.connected&&!M){const r=function(e){const t=new Uint8Array(e);let r="";for(let n=0;n<t.byteLength;n++)r+=String.fromCharCode(t[n]);return btoa(r)}(t.data);e.emit("voice_audio_chunk",{data:r})}},n.connect(s);const i=()=>{if(!W.current)return;const e=new Uint8Array(W.current.frequencyBinCount);W.current.getByteFrequencyData(e);const t=e.reduce((e,t)=>e+t,0)/e.length;E(t/255),H.current=requestAnimationFrame(i)};i()},[a,M]),pe=s(()=>{cancelAnimationFrame(H.current),B.current?.disconnect(),B.current=null,R.current?.getTracks().forEach(e=>e.stop()),R.current=null,P.current?.close(),P.current=null,W.current=null,E(0)},[]),ge=s(async()=>{const e=a?.();if(e?.connected){k("connecting"),N(0),I([]),_(null),ne.current=[],ue(),te.current&&"closed"!==te.current.state||(te.current=new AudioContext({sampleRate:yr})),te.current.resume().catch(()=>{});try{await he()}catch(t){return console.error("[VoiceCall] Mic error:",t),void k("idle")}e.emit("voice_start",{language:"es-AR",voice:"Kore"}),U.current=setInterval(()=>{N(e=>e+1)},1e3),xe()}else console.error("[VoiceCall] Socket not connected")},[a,ue,he]),fe=s(()=>{pe(),ie.current.forEach(e=>{try{e.stop()}catch{}}),ie.current=[],ne.current=[],se.current=0,oe.current=!1,te.current?.close(),te.current=null,U.current&&(clearInterval(U.current),U.current=null),Q.current&&(clearInterval(Q.current),Q.current=null);const e=a?.();e?.connected&&e.emit("voice_stop"),m&&A.length>0&&A.forEach(e=>{m({sender:"user"===e.role?"user":"bot",content:e.text})}),me(),k("idle"),E(0),N(0),z(!1),I([]),D(!1),t()},[a,pe,me,t,m,A]);o(()=>{X.current=fe},[fe]);const be=s(()=>{ee.current=0,D(!1)},[]),xe=s(()=>{ee.current=0,Q.current&&clearInterval(Q.current),Q.current=setInterval(()=>{ee.current+=1;const e=ee.current;e>=90&&e<120&&D(!0),e>=120&&X.current()},1e3)},[]),ve=s(()=>{z(e=>!e)},[]),ye=s(()=>{const e=$.trim();if(!e)return;const t=a?.();t?.connected&&(t.emit("voice_text_input",{text:e}),T(""),L(!1))},[$,a]);if(o(()=>{e&&"idle"===x&&ge()},[e]),o(()=>()=>{pe(),U.current&&clearInterval(U.current),me()},[]),!e)return null;const we="speaking"===x?p.speakingColor:"thinking"===x?p.thinkingColor:"listening"===x?p.listeningColor:r;/* @__PURE__ */
77
77
  return f("div",{className:kt("absolute inset-0 z-50 flex flex-col overflow-hidden","animate-in fade-in duration-300"),style:{backgroundColor:"#0a0a0f",borderRadius:"inherit"},children:[
78
78
  /* @__PURE__ */f("div",{className:"absolute inset-0 pointer-events-none",style:{overflow:"hidden"},children:[
79
79
  /* @__PURE__ */g("div",{className:"absolute rounded-full",style:{width:"300px",height:"300px",top:"-80px",right:"-60px",background:`radial-gradient(circle, ${we}18 0%, transparent 70%)`,transition:"background 1.5s ease",filter:"blur(40px)"}}),
@@ -87,7 +87,7 @@ return f("div",{className:kt("absolute inset-0 z-50 flex flex-col overflow-hidde
87
87
  /* @__PURE__ */g("span",{style:{fontSize:"13px",fontFamily:"ui-monospace, monospace",color:"rgba(255,255,255,0.4)",fontVariantNumeric:"tabular-nums"},children:le(C)}),O&&(()=>{const e=120-ee.current,t=e<=15;/* @__PURE__ */
88
88
  return f("span",{style:{fontSize:"10px",padding:"2px 8px",borderRadius:"12px",backgroundColor:t?"rgba(239,68,68,0.2)":"rgba(245,158,11,0.15)",color:t?"#ef4444":"#f59e0b",fontWeight:700,fontVariantNumeric:"tabular-nums",animation:t?"pulse 1s ease-in-out infinite":"none"},children:["⏸ Inactivo — ",e>0?e:0,"s"]})})()]})]}),p.showBadge&&p.badgeText&&/* @__PURE__ */g("div",{style:{display:"flex",justifyContent:"center",padding:"8px 0"},children:/* @__PURE__ */g("span",{style:{padding:"4px 14px",borderRadius:"20px",fontSize:"11px",fontWeight:700,background:`linear-gradient(135deg, ${r}, ${p.thinkingColor})`,color:"white"},children:p.badgeText})}),
89
89
  /* @__PURE__ */g("div",{className:"relative flex-1 overflow-y-auto px-5 py-4",style:{scrollbarWidth:"none"},children:/* @__PURE__ */f("div",{className:"flex flex-col items-center justify-start h-full gap-4",children:[
90
- /* @__PURE__ */g(kr,{avatars:i,logoUrl:l,avatar3dUrl:d||p.avatar3dUrl,emotion:j,callState:x,audioLevel:S,config:p}),_.length>0&&/* @__PURE__ */f("div",{style:{display:"flex",flexDirection:"column",gap:"8px",width:"100%"},children:[_.slice(-2).map((e,t)=>/* @__PURE__ */g("div",{style:{maxWidth:"85%",padding:"10px 14px",borderRadius:"user"===e.role?"16px 16px 4px 16px":"16px 16px 16px 4px",fontSize:"13.5px",lineHeight:1.5,color:"white",marginLeft:"user"===e.role?"auto":"0",marginRight:"user"===e.role?"0":"auto",backgroundColor:"user"===e.role?"rgba(255,255,255,0.08)":`${r}25`,backdropFilter:"blur(8px)",border:"user"===e.role?"1px solid rgba(255,255,255,0.08)":`1px solid ${r}20`},children:/* @__PURE__ */g(v,{remarkPlugins:[w],rehypePlugins:[[y,vr]],components:{p:({children:e})=>/* @__PURE__ */g("p",{style:{margin:0},children:e}),a:({href:e,children:t})=>/* @__PURE__ */g("a",{href:e,target:"_blank",rel:"noopener noreferrer",style:{color:r,textDecoration:"underline"},children:t}),strong:({children:e})=>/* @__PURE__ */g("strong",{style:{fontWeight:600},children:e}),em:({children:e})=>/* @__PURE__ */g("em",{children:e}),ul:({children:e})=>/* @__PURE__ */g("ul",{style:{margin:"4px 0",paddingLeft:"18px"},children:e}),ol:({children:e})=>/* @__PURE__ */g("ol",{style:{margin:"4px 0",paddingLeft:"18px"},children:e}),li:({children:e})=>/* @__PURE__ */g("li",{style:{marginBottom:"2px"},children:e}),code:({children:e})=>/* @__PURE__ */g("code",{style:{background:"rgba(255,255,255,0.1)",padding:"0 4px",borderRadius:"3px",fontSize:"12px"},children:e})},children:e.text})},t)),
90
+ /* @__PURE__ */g(kr,{avatars:i,logoUrl:l,avatar3dUrl:d||p.avatar3dUrl,emotion:j,callState:x,audioLevel:S,config:p}),A.length>0&&/* @__PURE__ */f("div",{style:{display:"flex",flexDirection:"column",gap:"8px",width:"100%"},children:[A.slice(-2).map((e,t)=>/* @__PURE__ */g("div",{style:{maxWidth:"85%",padding:"10px 14px",borderRadius:"user"===e.role?"16px 16px 4px 16px":"16px 16px 16px 4px",fontSize:"13.5px",lineHeight:1.5,color:"white",marginLeft:"user"===e.role?"auto":"0",marginRight:"user"===e.role?"0":"auto",backgroundColor:"user"===e.role?"rgba(255,255,255,0.08)":`${r}25`,backdropFilter:"blur(8px)",border:"user"===e.role?"1px solid rgba(255,255,255,0.08)":`1px solid ${r}20`},children:/* @__PURE__ */g(v,{remarkPlugins:[w],rehypePlugins:[[y,vr]],components:{p:({children:e})=>/* @__PURE__ */g("p",{style:{margin:0},children:e}),a:({href:e,children:t})=>/* @__PURE__ */g("a",{href:e,target:"_blank",rel:"noopener noreferrer",style:{color:r,textDecoration:"underline"},children:t}),strong:({children:e})=>/* @__PURE__ */g("strong",{style:{fontWeight:600},children:e}),em:({children:e})=>/* @__PURE__ */g("em",{children:e}),ul:({children:e})=>/* @__PURE__ */g("ul",{style:{margin:"4px 0",paddingLeft:"18px"},children:e}),ol:({children:e})=>/* @__PURE__ */g("ol",{style:{margin:"4px 0",paddingLeft:"18px"},children:e}),li:({children:e})=>/* @__PURE__ */g("li",{style:{marginBottom:"2px"},children:e}),code:({children:e})=>/* @__PURE__ */g("code",{style:{background:"rgba(255,255,255,0.1)",padding:"0 4px",borderRadius:"3px",fontSize:"12px"},children:e})},children:e.text})},t)),
91
91
  /* @__PURE__ */g("div",{ref:Y})]})]})}),
92
92
  /* @__PURE__ */g("div",{style:{textAlign:"center",paddingBottom:"12px"},children:/* @__PURE__ */g("span",{style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 16px",borderRadius:"20px",fontSize:"11px",fontWeight:500,color:"rgba(255,255,255,0.35)",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",letterSpacing:"0.02em"},children:M?/* @__PURE__ */f(b,{children:[
93
93
  /* @__PURE__ */g(K,{style:{width:"12px",height:"12px"}})," Micrófono silenciado"]}):"thinking"===x?"Procesando...":"speaking"===x?/* @__PURE__ */f(b,{children:[
@@ -99,7 +99,7 @@ return f("span",{style:{fontSize:"10px",padding:"2px 8px",borderRadius:"12px",ba
99
99
  /* @__PURE__ */g("button",{onClick:()=>L(e=>!e),style:{width:"52px",height:"52px",borderRadius:"50%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",backgroundColor:F?`${r}20`:"rgba(255,255,255,0.08)",color:F?r:"rgba(255,255,255,0.5)",border:"1px solid "+(F?`${r}30`:"rgba(255,255,255,0.08)")},"aria-label":"Escribir texto",children:/* @__PURE__ */g(V,{style:{width:"20px",height:"20px"}})})]}),F&&/* @__PURE__ */f("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 20px 20px"},children:[
100
100
  /* @__PURE__ */g("input",{type:"text",value:$,onChange:e=>T(e.target.value),onKeyDown:e=>"Enter"===e.key&&ye(),placeholder:"Escribí email, teléfono, etc.",autoFocus:!0,style:{flex:1,padding:"10px 14px",borderRadius:"12px",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.06)",color:"white",fontSize:"13px",outline:"none",backdropFilter:"blur(8px)"}}),
101
101
  /* @__PURE__ */g("button",{onClick:ye,disabled:!$.trim(),style:{width:"40px",height:"40px",borderRadius:"50%",border:"none",cursor:$.trim()?"pointer":"default",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:$.trim()?r:"rgba(255,255,255,0.06)",color:$.trim()?"white":"rgba(255,255,255,0.2)",transition:"all 0.2s"},"aria-label":"Enviar texto",children:/* @__PURE__ */g(re,{style:{width:"16px",height:"16px"}})})]}),
102
- /* @__PURE__ */g("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n @keyframes pulse {\n 0%, 100% { opacity: 1; transform: scale(1); }\n 50% { opacity: 0.7; transform: scale(0.95); }\n }\n "})]})}function Mr({isOpen:e,isConnected:t,isTyping:r,messages:a,botName:i="BotUyo",logoUrl:l,welcomeMessage:c,inputPlaceholder:d,primaryColor:u,mediaConfig:m,onClose:p,onSendMessage:x,bubbleStyles:v,avatars:y,onSendAttachment:w,onSendLocation:k,getSocket:C,onAddVoiceMessage:N,avatar3dUrl:M,theme:z}){const[S,E]=n(!1),[A,_]=n(!1),[I,F]=n(!1),{t:L}=j(),$=pr(),T=St({primaryColor:u}),O=function({isOpen:e,height:t,bottom:r}){const a=pr(),[i,l]=n({}),c=s(()=>{if(a){const e=()=>{window.visualViewport?l({height:`${window.visualViewport.height}px`,width:"100%",top:`${window.visualViewport.offsetTop}px`,left:"0px",bottom:"auto",right:"auto",transform:"none"}):l({height:"100dvh",width:"100%",top:"0px",left:"0px"})};return e(),window.visualViewport?.addEventListener("resize",e),window.visualViewport?.addEventListener("scroll",e),()=>{window.visualViewport?.removeEventListener("resize",e),window.visualViewport?.removeEventListener("scroll",e)}}{const e=parseFloat(r||gr)||24,n=window.innerHeight-64-e;if(t){const e=parseFloat(t)||700,o=Math.min(e,n);l({height:`${o}px`,maxHeight:`${n}px`,bottom:r||gr})}else{const e=Math.min(700,Math.max(500,n));l({height:`${e}px`,maxHeight:`${n}px`,bottom:r||gr})}}},[a,t,r]);return o(()=>{if(!e)return;const t=c();return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),t&&t()}},[e,c]),i}({isOpen:e,height:z?.height,bottom:z?.bottom}),D=function({enabled:e,returnFocusRef:t,onEscape:r}){const n=h(null),a=h(null);return o(()=>{if(!e)return;a.current=document.activeElement;const o=t?.current,s=n.current;if(!s)return;const i=setTimeout(()=>{const e=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');e.length>0?e[0].focus():s.focus()},100),l=e=>{if(s)if("Escape"!==e.key){if("Tab"===e.key){const t=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const r=t[0],n=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n||(e.preventDefault(),r.focus())}}else r?.()};return document.addEventListener("keydown",l),()=>{clearTimeout(i),document.removeEventListener("keydown",l);const e=o||a.current;e&&"function"==typeof e.focus&&e.focus()}},[e,r,t]),n}({enabled:e,onEscape:p});if(o(()=>{if(e)return $&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"),()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""}},[e,$]),!e)return null;const U="bottom-left"===z?.position;/* @__PURE__ */
102
+ /* @__PURE__ */g("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n @keyframes pulse {\n 0%, 100% { opacity: 1; transform: scale(1); }\n 50% { opacity: 0.7; transform: scale(0.95); }\n }\n "})]})}function Mr({isOpen:e,isConnected:t,isTyping:r,messages:a,botName:i="BotUyo",logoUrl:l,welcomeMessage:c,inputPlaceholder:d,primaryColor:u,mediaConfig:m,onClose:p,onSendMessage:x,bubbleStyles:v,avatars:y,onSendAttachment:w,onSendLocation:k,getSocket:C,onAddVoiceMessage:N,avatar3dUrl:M,theme:z}){const[S,E]=n(!1),[_,A]=n(!1),[I,F]=n(!1),{t:L}=j(),$=pr(),T=St({primaryColor:u}),O=function({isOpen:e,height:t,bottom:r}){const a=pr(),[i,l]=n({}),c=s(()=>{if(a){const e=()=>{window.visualViewport?l({height:`${window.visualViewport.height}px`,width:"100%",top:`${window.visualViewport.offsetTop}px`,left:"0px",bottom:"auto",right:"auto",transform:"none"}):l({height:"100dvh",width:"100%",top:"0px",left:"0px"})};return e(),window.visualViewport?.addEventListener("resize",e),window.visualViewport?.addEventListener("scroll",e),()=>{window.visualViewport?.removeEventListener("resize",e),window.visualViewport?.removeEventListener("scroll",e)}}{const e=parseFloat(r||gr)||24,n=window.innerHeight-64-e;if(t){const e=parseFloat(t)||700,o=Math.min(e,n);l({height:`${o}px`,maxHeight:`${n}px`,bottom:r||gr})}else{const e=Math.min(700,Math.max(500,n));l({height:`${e}px`,maxHeight:`${n}px`,bottom:r||gr})}}},[a,t,r]);return o(()=>{if(!e)return;const t=c();return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),t&&t()}},[e,c]),i}({isOpen:e,height:z?.height,bottom:z?.bottom}),D=function({enabled:e,returnFocusRef:t,onEscape:r}){const n=h(null),a=h(null);return o(()=>{if(!e)return;a.current=document.activeElement;const o=t?.current,s=n.current;if(!s)return;const i=setTimeout(()=>{const e=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');e.length>0?e[0].focus():s.focus()},100),l=e=>{if(s)if("Escape"!==e.key){if("Tab"===e.key){const t=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const r=t[0],n=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n||(e.preventDefault(),r.focus())}}else r?.()};return document.addEventListener("keydown",l),()=>{clearTimeout(i),document.removeEventListener("keydown",l);const e=o||a.current;e&&"function"==typeof e.focus&&e.focus()}},[e,r,t]),n}({enabled:e,onEscape:p});if(o(()=>{if(e)return $&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"),()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""}},[e,$]),!e)return null;const U="bottom-left"===z?.position;/* @__PURE__ */
103
103
  return f(b,{children:[
104
104
  /* @__PURE__ */g("div",{id:"chat-window-description",className:"sr-only",children:L("accessibility.dialogDescription")}),
105
105
  /* @__PURE__ */f("div",{ref:D,role:"dialog","aria-modal":"true","aria-labelledby":"chat-window-title","aria-describedby":"chat-window-description",tabIndex:-1,className:kt("flex flex-col overflow-hidden transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)]","text-foreground z-[9999]",!$&&["fixed",U?"left-6":"right-6","w-[350px] min-w-[350px] max-w-[350px]","rounded-[32px] border shadow-soft-2xl","animate-in fade-in zoom-in-95","slide-in-from-bottom-10"],$&&["fixed inset-0 w-full"]),style:{...O,backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))",color:"hsl(var(--foreground))"},children:[
@@ -120,15 +120,15 @@ return f(b,{children:[
120
120
  /* @__PURE__ */g("p",{className:"text-xs font-bold text-center",style:{color:"hsl(var(--foreground))",marginBottom:"var(--spacing-3)"},children:L("call_confirm")||"¿Iniciar llamada de voz?"}),
121
121
  /* @__PURE__ */f("div",{className:"flex items-center justify-center",style:{gap:"var(--spacing-2)"},children:[
122
122
  /* @__PURE__ */g("button",{onClick:()=>F(!1),className:"h-8 rounded-xl text-[10px] font-black uppercase tracking-wider transition-all active:scale-95",style:{padding:"0 var(--spacing-4)",backgroundColor:"hsl(var(--muted))",color:"hsl(var(--muted-foreground))"},children:L("cancel")||"Cancelar"}),
123
- /* @__PURE__ */g("button",{onClick:()=>{F(!1),_(!0)},className:"h-8 rounded-xl text-[10px] font-black uppercase tracking-wider text-white transition-all active:scale-95 shadow-md",style:{padding:"0 var(--spacing-4)",backgroundColor:"#10b981"},children:L("call")||"Llamar"})]})]})]}),
123
+ /* @__PURE__ */g("button",{onClick:()=>{F(!1),A(!0)},className:"h-8 rounded-xl text-[10px] font-black uppercase tracking-wider text-white transition-all active:scale-95 shadow-md",style:{padding:"0 var(--spacing-4)",backgroundColor:"#10b981"},children:L("call")||"Llamar"})]})]})]}),
124
124
  /* @__PURE__ */g("button",{onClick:p,"aria-label":L("accessibility.closeChat"),title:"Esc",className:"h-8 w-8 flex items-center justify-center rounded-full bg-muted/60 hover:bg-muted text-foreground transition-all active:scale-90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:/* @__PURE__ */g(se,{className:"h-4 w-4","aria-hidden":"true"})})]})]})}),
125
125
  /* @__PURE__ */f("main",{role:"region","aria-label":L("accessibility.chatMessages"),className:"flex-1 min-h-0 relative flex flex-col",style:{padding:"var(--spacing-5)",backgroundColor:"hsl(var(--muted))"},children:[
126
126
  /* @__PURE__ */g(ir,{messages:a,isTyping:r,welcomeMessage:c,primaryColor:u,logoUrl:l,botName:i,bubbleStyles:v,avatars:y}),
127
127
  /* @__PURE__ */g("div",{className:"absolute top-0 left-0 right-0 h-6 bg-gradient-to-b from-background/10 to-transparent pointer-events-none"})]}),
128
128
  /* @__PURE__ */f("footer",{className:"border-t",style:{paddingTop:"var(--spacing-5)",paddingLeft:"var(--spacing-5)",paddingRight:"var(--spacing-5)",paddingBottom:$?"max(var(--spacing-3), env(safe-area-inset-bottom))":"var(--spacing-3)",backgroundColor:"hsl(var(--background))",borderColor:"hsl(var(--border))"},children:[
129
- /* @__PURE__ */g(mr,{isConnected:t,placeholder:d,primaryColor:T,mediaConfig:m,onSendMessage:x,onSendAttachment:w,onSendLocation:k,onVoiceCall:m?.enableVoice?()=>_(!0):void 0}),
129
+ /* @__PURE__ */g(mr,{isConnected:t,placeholder:d,primaryColor:T,mediaConfig:m,onSendMessage:x,onSendAttachment:w,onSendLocation:k,onVoiceCall:m?.enableVoice?()=>A(!0):void 0}),
130
130
  /* @__PURE__ */f("div",{className:"flex items-center justify-center gap-1 opacity-25 select-none",style:{marginTop:"var(--spacing-2)",paddingBottom:"var(--spacing-1)"},children:[
131
131
  /* @__PURE__ */g(P,{className:"h-2 w-2 text-primary fill-primary"}),
132
132
  /* @__PURE__ */g("span",{className:"text-[7px] font-bold uppercase tracking-[0.2em]",children:L("con_amor_paseo_libre")})]})]}),
133
- /* @__PURE__ */g(Nr,{isOpen:A,onClose:()=>_(!1),primaryColor:T,avatars:y,logoUrl:l,avatar3dUrl:M,getSocket:C,onAddMessage:N})]})]})}export{D as C,Ot as D,H as L,G as M,Y as P,te as R,se as X,ie as Z,Q as a,T as b,kt as c,O as d,Ft as e,Lt as f,St as g,Dt as h,S as i,It as j,pr as k,Tt as l,zt as m,Nt as n,Mr as o,E as p,hr as t,j as u};
134
- //# sourceMappingURL=chunk-chat-ui-BMNIwxGE.js.map
133
+ /* @__PURE__ */g(Nr,{isOpen:_,onClose:()=>A(!1),primaryColor:T,avatars:y,logoUrl:l,avatar3dUrl:M,getSocket:C,onAddMessage:N})]})]})}export{D as C,Ot as D,H as L,G as M,Y as P,te as R,se as X,ie as Z,Q as a,T as b,kt as c,O as d,Ft as e,Lt as f,St as g,Dt as h,S as i,It as j,pr as k,Tt as l,zt as m,Nt as n,Mr as o,E as p,hr as t,j as u};
134
+ //# sourceMappingURL=chunk-chat-ui-FjQZGYF0.js.map