@botuyo/chat-widget-standalone 1.0.39 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/botuyo-chat.es.js +3 -3
- package/dist/botuyo-chat.es.js.map +1 -1
- package/dist/botuyo-chat.umd.js +1 -1
- package/dist/botuyo-chat.umd.js.map +1 -1
- package/dist/{chunk-audio-COeJdzjG.js → chunk-audio-BI6-EeUY.js} +2 -2
- package/dist/{chunk-audio-COeJdzjG.js.map → chunk-audio-BI6-EeUY.js.map} +1 -1
- package/dist/{chunk-chat-ui-SifgaVaw.js → chunk-chat-ui-BNRuIw2B.js} +10 -10
- package/dist/chunk-chat-ui-BNRuIw2B.js.map +1 -0
- package/dist/{chunk-gallery-CvYRVmRl.js → chunk-gallery-Bz3WiOp4.js} +2 -2
- package/dist/{chunk-gallery-CvYRVmRl.js.map → chunk-gallery-Bz3WiOp4.js.map} +1 -1
- package/dist/src/chat-widget/ChatWidget.d.ts.map +1 -1
- package/dist/src/chat-widget/components/MessageBubble.d.ts.map +1 -1
- package/dist/stats-umd.html +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/chunk-chat-ui-SifgaVaw.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as r,jsx as e,Fragment as a}from"react/jsx-runtime";import{memo as t,useState as l,useRef as o,useMemo as n,useCallback as i}from"react";import{g as s,c,R as d,L as u,P as h,a as m,C as f}from"./chunk-chat-ui-
|
|
1
|
+
import{jsxs as r,jsx as e,Fragment as a}from"react/jsx-runtime";import{memo as t,useState as l,useRef as o,useMemo as n,useCallback as i}from"react";import{g as s,c,R as d,L as u,P as h,a as m,C as f}from"./chunk-chat-ui-BNRuIw2B.js";const p=t(function({url:t,isBot:p,primaryColor:y}){const[x,N]=l(!1),[g,w]=l(0),[b,v]=l(0),[C,k]=l(!0),[j,M]=l(null),P=o(null),S=n(()=>s({primaryColor:y}),[y]),E=i(()=>{j||(x?P.current?.pause():P.current?.play().catch(r=>{console.error("[AudioPlayer] Play error:",r),M("Error al reproducir")}),N(!x))},[x,j]),T=i(()=>{w(P.current?.duration||0)},[]),$=i(()=>{k(!1),M(null)},[]),A=i(()=>{console.error("[AudioPlayer] Failed to load audio:",t),k(!1),M("No se pudo cargar")},[t]),L=i(()=>{k(!0),M(null),P.current&&P.current.load()},[]);/* @__PURE__ */
|
|
2
2
|
return r("div",{className:c("flex items-center gap-3 py-1 min-w-[200px]",p?"text-foreground":"text-primary-foreground"),children:[
|
|
3
3
|
/* @__PURE__ */e("audio",{ref:P,src:t,preload:"metadata",onLoadedMetadata:T,onCanPlayThrough:$,onTimeUpdate:()=>v(P.current?.currentTime||0),onEnded:()=>N(!1),onError:A}),
|
|
4
4
|
/* @__PURE__ */e("button",j?{onClick:L,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 bg-red-500/20 text-red-500 hover:bg-red-500/30 transition-colors",title:"Reintentar",children:/* @__PURE__ */e(d,{className:"w-4 h-4"})}:{onClick:E,disabled:C,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-opacity",style:{backgroundColor:p?S:"hsl(var(--card))",color:p?"white":S,opacity:C?.6:1},children:C?/* @__PURE__ */e(u,{className:"w-4 h-4 animate-spin"}):x?/* @__PURE__ */e(h,{className:"w-4 h-4 fill-current"}):/* @__PURE__ */e(m,{className:"w-4 h-4 fill-current ml-0.5"})}),
|
|
@@ -9,4 +9,4 @@ return r("div",{className:c("flex items-center gap-3 py-1 min-w-[200px]",p?"text
|
|
|
9
9
|
/* @__PURE__ */r("div",{className:"flex justify-between text-[9px] font-bold opacity-60",children:[
|
|
10
10
|
/* @__PURE__ */r("span",{children:[Math.floor(b/60),":",Math.floor(b%60).toString().padStart(2,"0")]}),
|
|
11
11
|
/* @__PURE__ */e("span",{children:C?"--:--":`${Math.floor(g/60)}:${Math.floor(g%60).toString().padStart(2,"0")}`})]})]})})]})});export{p as AudioPlayer};
|
|
12
|
-
//# sourceMappingURL=chunk-audio-
|
|
12
|
+
//# sourceMappingURL=chunk-audio-BI6-EeUY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-audio-
|
|
1
|
+
{"version":3,"file":"chunk-audio-BI6-EeUY.js","sources":["../src/chat-widget/components/AudioPlayer.tsx"],"sourcesContent":["'use client'\r\n\r\nimport { useState, useRef, useMemo, memo, useCallback } from 'react'\r\nimport { Play, Pause, Loader2, AlertCircle, RotateCw } from './Icons'\r\nimport { cn } from '@/lib/utils'\r\nimport { getPrimaryColor } from '../utils/theme'\r\n\r\ninterface AudioPlayerProps {\r\n url: string\r\n isBot: boolean\r\n primaryColor?: string\r\n}\r\n\r\nexport type { AudioPlayerProps }\r\n\r\nexport const AudioPlayer = memo(function AudioPlayer({\r\n url,\r\n isBot,\r\n primaryColor,\r\n}: AudioPlayerProps) {\r\n const [isPlaying, setIsPlaying] = useState(false)\r\n const [duration, setDuration] = useState(0)\r\n const [currentTime, setCurrentTime] = useState(0)\r\n const [isLoading, setIsLoading] = useState(true)\r\n const [error, setError] = useState<string | null>(null)\r\n const audioRef = useRef<HTMLAudioElement>(null)\r\n\r\n const brandColor = useMemo(() => getPrimaryColor({ primaryColor }), [primaryColor])\r\n\r\n const togglePlay = useCallback(() => {\r\n if (error) return\r\n if (isPlaying) audioRef.current?.pause()\r\n else audioRef.current?.play().catch((e) => {\r\n console.error('[AudioPlayer] Play error:', e)\r\n setError('Error al reproducir')\r\n })\r\n setIsPlaying(!isPlaying)\r\n }, [isPlaying, error])\r\n\r\n const handleLoadedMetadata = useCallback(() => {\r\n setDuration(audioRef.current?.duration || 0)\r\n }, [])\r\n\r\n const handleCanPlayThrough = useCallback(() => {\r\n setIsLoading(false)\r\n setError(null)\r\n }, [])\r\n\r\n const handleError = useCallback(() => {\r\n console.error('[AudioPlayer] Failed to load audio:', url)\r\n setIsLoading(false)\r\n setError('No se pudo cargar')\r\n }, [url])\r\n\r\n const handleRetry = useCallback(() => {\r\n setIsLoading(true)\r\n setError(null)\r\n if (audioRef.current) {\r\n audioRef.current.load()\r\n }\r\n }, [])\r\n\r\n return (\r\n <div\r\n className={cn(\r\n 'flex items-center gap-3 py-1 min-w-[200px]',\r\n isBot ? 'text-foreground' : 'text-primary-foreground'\r\n )}\r\n >\r\n <audio\r\n ref={audioRef}\r\n src={url}\r\n preload=\"metadata\"\r\n onLoadedMetadata={handleLoadedMetadata}\r\n onCanPlayThrough={handleCanPlayThrough}\r\n onTimeUpdate={() => setCurrentTime(audioRef.current?.currentTime || 0)}\r\n onEnded={() => setIsPlaying(false)}\r\n onError={handleError}\r\n />\r\n \r\n {error ? (\r\n // Error state - show retry button\r\n <button\r\n onClick={handleRetry}\r\n className=\"w-8 h-8 rounded-full flex items-center justify-center shrink-0 bg-red-500/20 text-red-500 hover:bg-red-500/30 transition-colors\"\r\n title=\"Reintentar\"\r\n >\r\n <RotateCw className=\"w-4 h-4\" />\r\n </button>\r\n ) : (\r\n // Normal play/pause button\r\n <button\r\n onClick={togglePlay}\r\n disabled={isLoading}\r\n className=\"w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-opacity\"\r\n style={{\r\n backgroundColor: isBot ? brandColor : 'hsl(var(--card))',\r\n color: isBot ? 'white' : brandColor,\r\n opacity: isLoading ? 0.6 : 1,\r\n }}\r\n >\r\n {isLoading ? (\r\n <Loader2 className=\"w-4 h-4 animate-spin\" />\r\n ) : isPlaying ? (\r\n <Pause className=\"w-4 h-4 fill-current\" />\r\n ) : (\r\n <Play className=\"w-4 h-4 fill-current ml-0.5\" />\r\n )}\r\n </button>\r\n )}\r\n \r\n <div className=\"flex-1 space-y-1\">\r\n {error ? (\r\n <div className=\"flex items-center gap-1.5 text-red-500\">\r\n <AlertCircle className=\"w-3 h-3\" />\r\n <span className=\"text-[9px] font-bold\">{error}</span>\r\n </div>\r\n ) : (\r\n <>\r\n <div className=\"relative h-1 w-full bg-current/20 rounded-full overflow-hidden\">\r\n <div\r\n className=\"absolute h-full bg-current rounded-full transition-all\"\r\n style={{ width: `${(currentTime / duration) * 100 || 0}%` }}\r\n />\r\n </div>\r\n <div className=\"flex justify-between text-[9px] font-bold opacity-60\">\r\n <span>\r\n {Math.floor(currentTime / 60)}:\r\n {Math.floor(currentTime % 60)\r\n .toString()\r\n .padStart(2, '0')}\r\n </span>\r\n <span>\r\n {isLoading ? '--:--' : `${Math.floor(duration / 60)}:${Math.floor(duration % 60).toString().padStart(2, '0')}`}\r\n </span>\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n </div>\r\n )\r\n})\r\n"],"names":["AudioPlayer","memo","url","isBot","primaryColor","isPlaying","setIsPlaying","useState","duration","setDuration","currentTime","setCurrentTime","isLoading","setIsLoading","error","setError","audioRef","useRef","brandColor","useMemo","getPrimaryColor","togglePlay","useCallback","current","pause","play","catch","e","console","handleLoadedMetadata","handleCanPlayThrough","handleError","handleRetry","load","jsxs","className","cn","children","jsx","ref","src","preload","onLoadedMetadata","onCanPlayThrough","onTimeUpdate","onEnded","onError","onClick","title","RotateCw","disabled","style","backgroundColor","color","opacity","Loader2","Pause","Play","AlertCircle","Fragment","width","Math","floor","toString","padStart"],"mappings":"0OAeO,MAAMA,EAAcC,EAAK,UAAqBC,IACnDA,EAAAC,MACAA,EAAAC,aACAA,IAEA,MAAOC,EAAWC,GAAgBC,GAAS,IACpCC,EAAUC,GAAeF,EAAS,IAClCG,EAAaC,GAAkBJ,EAAS,IACxCK,EAAWC,GAAgBN,GAAS,IACpCO,EAAOC,GAAYR,EAAwB,MAC5CS,EAAWC,EAAyB,MAEpCC,EAAaC,EAAQ,IAAMC,EAAgB,CAAEhB,iBAAiB,CAACA,IAE/DiB,EAAaC,EAAY,KACzBR,IACAT,EAAWW,EAASO,SAASC,UACnBD,SAASE,OAAOC,MAAOC,IACnCC,QAAQd,MAAM,4BAA6Ba,GAC3CZ,EAAS,yBAEXT,GAAcD,KACb,CAACA,EAAWS,IAETe,EAAuBP,EAAY,KACvCb,EAAYO,EAASO,SAASf,UAAY,IACzC,IAEGsB,EAAuBR,EAAY,KACvCT,GAAa,GACbE,EAAS,OACR,IAEGgB,EAAcT,EAAY,KAC9BM,QAAQd,MAAM,sCAAuCZ,GACrDW,GAAa,GACbE,EAAS,sBACR,CAACb,IAEE8B,EAAcV,EAAY,KAC9BT,GAAa,GACbE,EAAS,MACLC,EAASO,SACXP,EAASO,QAAQU,QAElB;AAEH,OACEC,EAAC,MAAA,CACCC,UAAWC,EACT,6CACAjC,EAAQ,kBAAoB,2BAG9BkC,SAAA;eAAAC,EAAC,QAAA,CACCC,IAAKvB,EACLwB,IAAKtC,EACLuC,QAAQ,WACRC,iBAAkBb,EAClBc,iBAAkBb,EAClBc,aAAc,IAAMjC,EAAeK,EAASO,SAASb,aAAe,GACpEmC,QAAS,IAAMvC,GAAa,GAC5BwC,QAASf;eAKTO,EAAC,SAFFxB,EAEE,CACCiC,QAASf,EACTG,UAAU,kIACVa,MAAM,aAENX,wBAAAC,EAACW,EAAA,CAASd,UAAU,aAIrB,CACCY,QAAS1B,EACT6B,SAAUtC,EACVuB,UAAU,oFACVgB,MAAO,CACLC,gBAAiBjD,EAAQe,EAAa,mBACtCmC,MAAOlD,EAAQ,QAAUe,EACzBoC,QAAS1C,EAAY,GAAM,GAG5ByB,SAAAzB,iBACC0B,EAACiB,EAAA,CAAQpB,UAAU,yBACjB9B,iBACFiC,EAACkB,EAAA,CAAMrB,UAAU,0CAEhBsB,EAAA,CAAKtB,UAAU;eAKtBG,EAAC,OAAIH,UAAU,mBACZE,0BACCH,EAAC,MAAA,CAAIC,UAAU,yCACbE,SAAA;eAAAC,EAACoB,EAAA,CAAYvB,UAAU;iBACtB,OAAA,CAAKA,UAAU,uBAAwBE,SAAAvB,sBAG1CoB,EAAAyB,EAAA,CACEtB,SAAA;eAAAC,EAAC,MAAA,CAAIH,UAAU,iEACbE,wBAAAC,EAAC,MAAA,CACCH,UAAU,yDACVgB,MAAO,CAAES,MAAO,GAAIlD,EAAcF,EAAY,KAAO;eAGzD0B,EAAC,MAAA,CAAIC,UAAU,uDACbE,SAAA;eAAAH,EAAC,OAAA,CACEG,SAAA,CAAAwB,KAAKC,MAAMpD,EAAc,IAAI,IAC7BmD,KAAKC,MAAMpD,EAAc,IACvBqD,WACAC,SAAS,EAAG;eAEjB1B,EAAC,QACED,SAAAzB,EAAY,QAAU,GAAGiD,KAAKC,MAAMtD,EAAW,OAAOqD,KAAKC,MAAMtD,EAAW,IAAIuD,WAAWC,SAAS,EAAG,mBAQxH"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
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 h,useRef as m,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",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",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",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",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},$=F("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),L=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"}]]),P=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"}]]),R=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=[],he=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 me(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}}},me=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const r=me(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,$e=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Le=/^\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)\(.+\)$/,Pe=e=>Le.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>!!e&&Number.isInteger(Number(e)),Ve=e=>e.endsWith("%")&&Re(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=>ht(e,ft,Ke),Qe=e=>Fe.test(e),et=e=>ht(e,bt,Ge),tt=e=>ht(e,xt,Re),rt=e=>ht(e,pt,Ke),nt=e=>ht(e,gt,Ye),ot=e=>ht(e,yt,Ze),at=e=>$e.test(e),st=e=>mt(e,bt),it=e=>mt(e,vt),lt=e=>mt(e,pt),ct=e=>mt(e,ft),dt=e=>mt(e,gt),ut=e=>mt(e,yt,!0),ht=(e,t,r)=>{const n=Fe.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},mt=(e,t,r=!1)=>{const n=$e.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:h,maybePostfixModifierPosition:m}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!m,g=n(p?h.substring(0,m):h);if(!g){if(!p){l=e+(l.length>0?" "+l:l);continue}if(g=n(h),!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),...he(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"),h=Ie("text-shadow"),m=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=()=>[Pe,"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=()=>[Pe,"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=()=>["",Re,st,et],$=()=>[Re,Ve,lt,rt],L=()=>["","none",p,at,Qe],T=()=>["none",Re,at,Qe],O=()=>["none",Re,at,Qe],D=()=>[Re,at,Qe],U=()=>[Pe,"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",Re],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pe,Qe,at,f]}],container:["container"],columns:[{columns:[Re,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:[Pe,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,Pe,"auto","initial","none",Qe]}],grow:[{grow:["",Re,at,Qe]}],shrink:[{shrink:["",Re,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":[Re,"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:[Re,"from-font","auto",at,et]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Re,"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":[Re,at,Qe]}],"outline-w":[{outline:["",Re,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":[Re,et]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",h,ut,ot]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Re,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":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"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":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"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":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"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":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"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":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"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":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"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":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"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":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"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":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"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:L()}],brightness:[{brightness:[Re,at,Qe]}],contrast:[{contrast:[Re,at,Qe]}],"drop-shadow":[{"drop-shadow":["","none",m,ut,ot]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",Re,at,Qe]}],"hue-rotate":[{"hue-rotate":[Re,at,Qe]}],invert:[{invert:["",Re,at,Qe]}],saturate:[{saturate:[Re,at,Qe]}],sepia:[{sepia:["",Re,at,Qe]}],"backdrop-filter":[{"backdrop-filter":["","none",at,Qe]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[Re,at,Qe]}],"backdrop-contrast":[{"backdrop-contrast":[Re,at,Qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,at,Qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,at,Qe]}],"backdrop-invert":[{"backdrop-invert":["",Re,at,Qe]}],"backdrop-opacity":[{"backdrop-opacity":[Re,at,Qe]}],"backdrop-saturate":[{"backdrop-saturate":[Re,at,Qe]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,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:[Re,"initial",at,Qe]}],ease:[{ease:["linear","initial",b,at,Qe]}],delay:[{delay:[Re,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:[Re,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="hsl(160, 84%, 39%)";function Mt(e,t){const r={...Ct,...t?.cssVariables||{},...e?.cssVariables||{}};return{primaryColor:e?.primaryColor||t?.primaryColor||Nt,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 zt(e){return e.primaryColor||Nt}const St={enabled:!0,messageEntry:"spring",typingIndicator:"wave",buttonEffects:!0,smoothScroll:!0,speedMultiplier:1,staggerDelay:50,windowTransitions:!0,launcherPulse:!0},Et={glassmorphism:!0,gradients:!0,softShadows:!0,glowEffects:!0,particles:!1,soundEffects:!1,hapticFeedback:!0,shimmerLoading:!0,hoverLift:!0},jt=r(St),At=r(Et);function _t({children:e,animations:t,effects:r}){const n=c(()=>({...St,...t}),[t]),o=c(()=>({...Et,...r}),[r]);/* @__PURE__ */
|
|
2
|
-
return g(jt.Provider,{value:n,children:/* @__PURE__ */g(At.Provider,{value:o,children:e})})}function It(){return a(jt)}function Ft(){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 Lt={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)}},Tt=`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')}`,Ot=function(){const e=Math.floor(1200),t=2*e,r=44+t,n=new ArrayBuffer(r),o=new DataView(n);Dt(o,0,"RIFF"),o.setUint32(4,r-8,!0),Dt(o,8,"WAVE"),Dt(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),Dt(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 Dt(e,t,r){for(let n=0;n<r.length;n++)e.setUint8(t+n,r.charCodeAt(n))}function Ut(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 Wt(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)}},Rt=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Bt=e=>e,Vt=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},Ht=(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(Rt(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(Rt(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return a.observe(r,{box:"border-box"}),()=>{a.unobserve(r)}},qt={passive:!0},Gt="undefined"==typeof window||"onscrollend"in window,Kt=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const a=e.options.useScrollendEvent&&Gt?()=>{}: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,qt);const c=e.options.useScrollendEvent&≫return c&&r.addEventListener("scrollend",l,qt),()=>{r.removeEventListener("scroll",i),c&&r.removeEventListener("scrollend",l)}},Zt=(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"]},Yt=(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 Jt{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:Bt,rangeExtractor:Vt,onChange:()=>{},measureElement:Zt,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=Ut(()=>(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=Ut(()=>[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=Ut(()=>[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),h="number"==typeof u?u:this.options.estimateSize(d),m=i+h;l[d]={index:d,start:i,size:h,end:m,key:e,lane:a},c[a]=d}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ut(()=>[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=Xt(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=Ut(()=>{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=Ut(()=>[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 Wt(t[Xt(0,t.length-1,e=>Wt(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 Xt=(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},Qt="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;const er=h(()=>import("./chunk-audio-COeJdzjG.js").then(e=>({default:e.AudioPlayer}))),tr=h(()=>import("./chunk-gallery-CvYRVmRl.js").then(e=>({default:e.Gallery}))),rr=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"),h="user"===e.sender,m="system"===e.type||"system"===e.sender,p=!h&&!m,b=zt({primaryColor:t}),x=function(){const e=a(jt);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":""}(),k=c(()=>{if(h)return null;if("text"===e.type){const t=e;if(t.emotion&&o?.[t.emotion])return o[t.emotion]}return r},[e,o,r,h]),C=({href:e,children:t})=>{if(!e)return null;const r=String(t).toLowerCase(),n=r.includes("reservar")||r.includes("ver")||r.includes("pagar");return e.includes("maps.google")||e.includes("goo.gl")?/* @__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
|
-
/* @__PURE__ */g("span",{className:"flex-shrink-0 p-2 rounded-full",style:{backgroundColor:`${
|
|
2
|
+
return g(jt.Provider,{value:n,children:/* @__PURE__ */g(At.Provider,{value:o,children:e})})}function It(){return a(jt)}function Ft(){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 Lt={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)}},Tt=`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')}`,Ot=function(){const e=Math.floor(1200),t=2*e,r=44+t,n=new ArrayBuffer(r),o=new DataView(n);Dt(o,0,"RIFF"),o.setUint32(4,r-8,!0),Dt(o,8,"WAVE"),Dt(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),Dt(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 Dt(e,t,r){for(let n=0;n<r.length;n++)e.setUint8(t+n,r.charCodeAt(n))}function Ut(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 Wt(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)}},Rt=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Bt=e=>e,Vt=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},Ht=(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(Rt(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(Rt(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return a.observe(r,{box:"border-box"}),()=>{a.unobserve(r)}},qt={passive:!0},Gt="undefined"==typeof window||"onscrollend"in window,Kt=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let o=0;const a=e.options.useScrollendEvent&&Gt?()=>{}: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,qt);const c=e.options.useScrollendEvent&≫return c&&r.addEventListener("scrollend",l,qt),()=>{r.removeEventListener("scroll",i),c&&r.removeEventListener("scrollend",l)}},Zt=(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"]},Yt=(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 Jt{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:Bt,rangeExtractor:Vt,onChange:()=>{},measureElement:Zt,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=Ut(()=>(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=Ut(()=>[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=Ut(()=>[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),h="number"==typeof u?u:this.options.estimateSize(d),m=i+h;l[d]={index:d,start:i,size:h,end:m,key:e,lane:a},c[a]=d}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ut(()=>[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=Xt(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=Ut(()=>{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=Ut(()=>[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 Wt(t[Xt(0,t.length-1,e=>Wt(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 Xt=(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},Qt="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;const er=h(()=>import("./chunk-audio-BI6-EeUY.js").then(e=>({default:e.AudioPlayer}))),tr=h(()=>import("./chunk-gallery-Bz3WiOp4.js").then(e=>({default:e.Gallery}))),rr=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"),h="user"===e.sender,m="system"===e.type||"system"===e.sender,p=!h&&!m,x=zt({primaryColor:t}),k=function(){const e=a(jt);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(h)return null;if("text"===e.type){const t=e;if(t.emotion&&o?.[t.emotion])return o[t.emotion]}return r},[e,o,r,h]),N=({href:e,children:t})=>{if(!e)return null;const r=String(t).toLowerCase(),n=r.includes("reservar")||r.includes("ver")||r.includes("pagar");return e.includes("maps.google")||e.includes("goo.gl")||e.includes("google.com/maps")?/* @__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
|
+
/* @__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
|
-
/* @__PURE__ */g(W,{size:12,className:"text-muted-foreground/40 group-hover:text-primary"})]})}):n?/* @__PURE__ */f("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 mt-2 text-[11px] font-black w-full sm:w-auto rounded-xl shadow-md uppercase tracking-widest transition-transform active:scale-95 text-white",style:{backgroundColor:
|
|
6
|
-
/* @__PURE__ */g($,{size:14})]}):/* @__PURE__ */g("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"font-bold underline decoration-primary/30 hover:decoration-primary transition-all",style:{color:h?"inherit":
|
|
7
|
-
/* @__PURE__ */f("div",{className:kt("max-w-[85%] shadow-sm transition-all duration-300 relative",h?"text-primary-foreground":"border",h?kt("rounded-[18px]",s&&"rounded-tr-[4px]",!i&&"rounded-br-[4px]",!s&&!i&&"rounded-r-[4px]"):kt("rounded-[18px]",s&&"rounded-tl-[4px]",!i&&"rounded-bl-[4px]",!s&&!i&&"rounded-l-[4px]")),style:h?{padding:"var(--spacing-4) var(--spacing-5)",backgroundColor:
|
|
5
|
+
/* @__PURE__ */g(W,{size:12,className:"text-muted-foreground/40 group-hover:text-primary"})]})}):n?/* @__PURE__ */f("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 mt-2 text-[11px] font-black w-full sm:w-auto rounded-xl shadow-md uppercase tracking-widest transition-transform active:scale-95 text-white",style:{backgroundColor:x},children:[t," ",
|
|
6
|
+
/* @__PURE__ */g($,{size:14})]}):/* @__PURE__ */g("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"font-bold underline decoration-primary/30 hover:decoration-primary transition-all",style:{color:h?"inherit":x},children:t})},M=({src:e,alt:t})=>e?/* @__PURE__ */g(u,{fallback:/* @__PURE__ */g("div",{className:"my-3 animate-pulse",children:/* @__PURE__ */g("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:/* @__PURE__ */g(tr,{images:[{src:e,alt:t}],radius:"rounded-xl"})}):null;return m?/* @__PURE__ */g("div",{className:"flex justify-center my-4 animate-in fade-in zoom-in-95 w-full",children:/* @__PURE__ */g("span",{className:"px-3 py-1 border rounded-full text-[9px] font-black uppercase tracking-widest",style:{backgroundColor:"hsl(var(--muted))",borderColor:"hsl(var(--border))",color:"hsl(var(--muted-foreground))"},children:e.content})}):/* @__PURE__ */f("div",{className:kt("flex w-full mb-0.5 group",k,h?"justify-end":"justify-start gap-3",s&&"mt-3",i&&"mb-3"),style:{animationDelay:50*l+"ms"},children:[!h&&/* @__PURE__ */g("div",{className:"w-9 shrink-0 flex flex-col justify-end pb-1",children:/* @__PURE__ */g("div",i?{className:"h-9 w-9 rounded-full overflow-hidden border shadow-sm",style:{borderColor:"hsl(var(--border))",backgroundColor:"hsl(var(--background))"},children:C?/* @__PURE__ */g("img",{src:C,alt:n,className:"h-full w-full object-cover"}):/* @__PURE__ */g("div",{className:"h-full w-full flex items-center justify-center text-white text-[10px] font-black uppercase",style:{backgroundColor:x},children:n.charAt(0)})}:{className:"w-9"})}),
|
|
7
|
+
/* @__PURE__ */f("div",{className:kt("max-w-[85%] shadow-sm transition-all duration-300 relative",h?"text-primary-foreground":"border",h?kt("rounded-[18px]",s&&"rounded-tr-[4px]",!i&&"rounded-br-[4px]",!s&&!i&&"rounded-r-[4px]"):kt("rounded-[18px]",s&&"rounded-tl-[4px]",!i&&"rounded-bl-[4px]",!s&&!i&&"rounded-l-[4px]")),style:h?{padding:"var(--spacing-4) var(--spacing-5)",backgroundColor:x,boxShadow:i?`0 8px 20px -6px ${x}33`:"none"}:{padding:"var(--spacing-4) var(--spacing-5)",backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border) / 0.6)",color:"hsl(var(--foreground))"},children:[(()=>{switch(e.type){case"audio":/* @__PURE__ */
|
|
8
8
|
return g(u,{fallback:/* @__PURE__ */f("div",{className:"flex items-center gap-3 py-1 min-w-[200px] animate-pulse",children:[
|
|
9
9
|
/* @__PURE__ */g("div",{className:"w-8 h-8 rounded-full bg-muted"}),
|
|
10
10
|
/* @__PURE__ */g("div",{className:"flex-1 space-y-1",children:/* @__PURE__ */g("div",{className:"h-1 w-full bg-muted rounded-full"})})]}),children:/* @__PURE__ */g(er,{url:e.content,isBot:p,primaryColor:t})});case"image":{const t=e;/* @__PURE__ */
|
|
11
11
|
return g(u,{fallback:/* @__PURE__ */g("div",{className:"my-3 animate-pulse",children:/* @__PURE__ */g("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:/* @__PURE__ */g(tr,{images:[{src:t.imageUrl||t.content,alt:t.altText||"Imagen"}],radius:"rounded-xl"})})}case"location":{const t=e;/* @__PURE__ */
|
|
12
|
-
return g(
|
|
12
|
+
return g(N,{href:`https://www.google.com/maps/search/?api=1&query=${t.latitude},${t.longitude}`,children:"Ver ubicación"})}case"file":{const t=e,r=t.fileName?.split(".").pop()?.toLowerCase()||"",n=t.fileSize?`${(t.fileSize/1024/1024).toFixed(2)} MB`:"";/* @__PURE__ */
|
|
13
13
|
return f("a",{href:t.fileUrl,download:t.fileName,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 p-3 border rounded-xl transition-all hover:scale-[1.02] group",style:{backgroundColor:h?"rgba(255,255,255,0.1)":"hsl(var(--muted))",borderColor:h?"rgba(255,255,255,0.2)":"hsl(var(--border))"},children:[
|
|
14
|
-
/* @__PURE__ */g("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg shrink-0",style:{backgroundColor:h?"rgba(255,255,255,0.2)":`${
|
|
14
|
+
/* @__PURE__ */g("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg shrink-0",style:{backgroundColor:h?"rgba(255,255,255,0.2)":`${x}1a`,color:h?"white":x},children:/* @__PURE__ */g(P,{size:20,strokeWidth:2.5})}),
|
|
15
15
|
/* @__PURE__ */f("div",{className:"flex-1 min-w-0",children:[
|
|
16
16
|
/* @__PURE__ */g("p",{className:"text-sm font-bold truncate",children:t.fileName}),n&&/* @__PURE__ */f("p",{className:"text-xs opacity-60 mt-0.5",children:[r?.toUpperCase()," • ",n]})]}),
|
|
17
|
-
/* @__PURE__ */g(U,{size:18,className:"shrink-0 opacity-60 group-hover:opacity-100 transition-opacity"})]})}default
|
|
18
|
-
return g("div",{className:kt("prose prose-sm max-w-none break-words leading-relaxed dark:prose-invert",h?"text-primary-foreground prose-p:text-white":"text-foreground"),children:/* @__PURE__ */g(v,{remarkPlugins:[w],rehypePlugins:[[y,{tagNames:["p","a","img","strong","em","ul","ol","li","br","span"],attributes:{a:["href","target","rel"],img:["src","alt"],span:["className"]},protocols:{a:{href:["http","https","mailto","tel"]},img:{src:["http","https","data"]}}}]],components:{a:
|
|
17
|
+
/* @__PURE__ */g(U,{size:18,className:"shrink-0 opacity-60 group-hover:opacity-100 transition-opacity"})]})}default:{const t=e.content||"",r=/!\[([^\]]*)\]\(([^)]+)\)/g,n=[];let o;for(;null!==(o=r.exec(t));)n.push({src:o[2],alt:o[1]||"Foto"});const a=n.length>1?t.replace(/!\[[^\]]*\]\([^)]+\)/g,"").replace(/---\s*\n?\s*---/g,"").trim():t;/* @__PURE__ */
|
|
18
|
+
return f(b,{children:[n.length>1&&/* @__PURE__ */g(u,{fallback:/* @__PURE__ */g("div",{className:"my-3 animate-pulse",children:/* @__PURE__ */g("div",{className:"w-full h-48 bg-muted rounded-xl"})}),children:/* @__PURE__ */g(tr,{images:n,radius:"rounded-xl"})}),a&&/* @__PURE__ */g("div",{className:kt("prose prose-sm max-w-none break-words leading-relaxed dark:prose-invert",h?"text-primary-foreground prose-p:text-white":"text-foreground"),children:/* @__PURE__ */g(v,{remarkPlugins:[w],rehypePlugins:[[y,{tagNames:["p","a","img","strong","em","ul","ol","li","br","span"],attributes:{a:["href","target","rel"],img:["src","alt"],span:["className"]},protocols:{a:{href:["http","https","mailto","tel"]},img:{src:["http","https","data"]}}}]],components:{a:N,img:M,p:({children:e})=>/* @__PURE__ */g("p",{className:"mb-0 last:mb-0",children:e})},children:a})})]})}}})(),i&&/* @__PURE__ */f("div",{className:kt("flex items-center gap-1 mt-1.5 opacity-50 select-none text-[9px]",h?"justify-end":"justify-start"),children:[
|
|
19
19
|
/* @__PURE__ */g("span",{className:"font-bold tabular-nums uppercase tracking-tighter",children:(e=>{const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})})(e.timestamp)}),h&&/* @__PURE__ */g(L,{className:"h-2.5 w-2.5"})]})]})]})},(e,t)=>e.message.id===t.message.id&&e.message.timestamp===t.message.timestamp&&e.primaryColor===t.primaryColor&&e.botAvatar===t.botAvatar&&e.botName===t.botName&&e.isFirst===t.isFirst&&e.isLast===t.isLast&&JSON.stringify(e.styles)===JSON.stringify(t.styles)),nr=d(function(){/* @__PURE__ */
|
|
20
20
|
return g("div",{style:{display:"flex",alignItems:"center",alignSelf:"flex-start",maxWidth:"85%",animation:"message-fade 0.2s ease-out forwards"},children:/* @__PURE__ */g("div",{style:{backgroundColor:"hsl(var(--card, 0 0% 100%))",border:"1px solid hsl(var(--border, 0 0% 90%))",borderRadius:"18px",borderTopLeftRadius:"4px",padding:"14px 20px",boxShadow:"0 1px 3px rgba(0,0,0,0.06)"},children:/* @__PURE__ */g("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[0,1,2].map(e=>/* @__PURE__ */g("span",{className:"animate-typing-dots",style:{display:"inline-block",height:"8px",width:"8px",borderRadius:"50%",backgroundColor:"hsl(var(--primary, 250 84% 54%) / 0.6)",animationDelay:200*e+"ms"}},e))})})})});function or(e,t){const r=e.getTime()-t.getTime();return Math.floor(r/1e3/60)}function ar(e){return new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"2-digit"}).format(e)}const sr=d(function({messages:r,isTyping:a,welcomeMessage:s="¡Hola! ¿En qué puedo ayudarte?",primaryColor:i,logoUrl:l,botName:c="BotUyo",bubbleStyles:d,avatars:u}){const h=m(null),p=m(null),[b,v]=n(!1),[y,w]=n(!1),k=zt({primaryColor:i}),C=r.length>100,N=(M={count:r.length,getScrollElement:()=>p.current,estimateSize:()=>80,overscan:5,enabled:C},function({useFlushSync:t=!0,...r}){const n=e.useReducer(()=>({}),{})[1],o={...r,onChange:(e,o)=>{var a;t&&o?x(n):n(),null==(a=r.onChange)||a.call(r,e,o)}},[a]=e.useState(()=>new Jt(o));return a.setOptions(o),Qt(()=>a._didMount(),[]),Qt(()=>a._willUpdate()),a}({observeElementRect:Ht,observeElementOffset:Kt,scrollToFn:Yt,...M}));var M;o(()=>{v(!0)},[]),o(()=>{if(b&&(r.length>0||a)){const e=setTimeout(()=>{C?N.scrollToIndex(r.length-1,{align:"end",behavior:r.length<=1?"auto":"smooth"}):h.current?.scrollIntoView({behavior:r.length<=1?"auto":"smooth",block:"end"})},100);return()=>clearTimeout(e)}},[r.length,a,b,C,N]);const z=e=>{const t=new Date(e);return isNaN(t.getTime())?"":function(e){return function(e){const t=/* @__PURE__ */new Date;return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}(e)?`Hoy, ${ar(e)}`:function(e){const t=/* @__PURE__ */new Date;return t.setDate(t.getDate()-1),e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}(e)?`Ayer, ${ar(e)}`:function(e){return new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"}).format(e)}(e)}(t)};return b?/* @__PURE__ */f("div",C?{ref:p,className:"flex-1 overflow-y-auto scroll-smooth bg-background/50 scrollbar-none",style:{padding:"var(--spacing-5)"},children:[
|
|
21
21
|
/* @__PURE__ */g("div",{style:{height:`${N.getTotalSize()}px`,width:"100%",position:"relative"},children:N.getVirtualItems().map(e=>{const t=r[e.index],n=e.index,o=r[n-1],a=r[n+1],s=o&&or(new Date(t.timestamp),new Date(o.timestamp))>15,h=o&&o.sender===t.sender&&or(new Date(t.timestamp),new Date(o.timestamp))<5&&!s,m=a&&a.sender===t.sender&&or(new Date(a.timestamp),new Date(t.timestamp))<5;/* @__PURE__ */
|
|
@@ -131,4 +131,4 @@ return f(b,{children:[
|
|
|
131
131
|
/* @__PURE__ */g(R,{className:"h-2 w-2 text-primary fill-primary"}),
|
|
132
132
|
/* @__PURE__ */g("span",{className:"text-[7px] font-bold uppercase tracking-[0.2em]",children:$("con_amor_paseo_libre")})]})]}),
|
|
133
133
|
/* @__PURE__ */g(Cr,{isOpen:A,onClose:()=>_(!1),primaryColor:T,avatars:y,logoUrl:l,avatar3dUrl:M,getSocket:C,onAddMessage:N})]})]})}export{D as C,Tt 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,It as e,Ft as f,zt as g,Ot as h,S as i,_t as j,mr as k,Lt as l,Mt as m,Nr as n,E as o,hr as t,j as u};
|
|
134
|
-
//# sourceMappingURL=chunk-chat-ui-
|
|
134
|
+
//# sourceMappingURL=chunk-chat-ui-BNRuIw2B.js.map
|