@botuyo/chat-widget-standalone 1.0.97 → 1.0.99
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/{AudioPlayer-oy-xH9pg.js → AudioPlayer-CRbfhCdt.js} +2 -2
- package/dist/{AudioPlayer-oy-xH9pg.js.map → AudioPlayer-CRbfhCdt.js.map} +1 -1
- package/dist/{Gallery-DxEy0FFC.js → Gallery-kONhAFwP.js} +2 -2
- package/dist/{Gallery-DxEy0FFC.js.map → Gallery-kONhAFwP.js.map} +1 -1
- package/dist/botuyo-chat.es.js +1 -1
- package/dist/botuyo-chat.umd.js +1 -1
- package/dist/botuyo-chat.umd.js.map +1 -1
- package/dist/src/chat-widget/components/Avatar3DPreview.d.ts +17 -0
- package/dist/src/chat-widget/components/Avatar3DPreview.d.ts.map +1 -0
- package/dist/src/chat-widget/index.d.ts +1 -0
- package/dist/src/chat-widget/index.d.ts.map +1 -1
- package/dist/{standalone-DJ7nk2ni.js → standalone-B1ikZxXc.js} +3 -3
- package/dist/standalone-B1ikZxXc.js.map +1 -0
- package/dist/stats-umd.html +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/standalone-DJ7nk2ni.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{memo as a,useState as l,useRef as o,useMemo as n,useCallback as i}from"react";import{c,g as s,L as d,a as u}from"./standalone-
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{memo as a,useState as l,useRef as o,useMemo as n,useCallback as i}from"react";import{c,g as s,L as d,a as u}from"./standalone-B1ikZxXc.js";const h=c("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"}]]),m=c("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"}]]),y=c("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),p=c("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"}]]),f=a(function({url:a,isBot:c,primaryColor:f}){const[x,g]=l(!1),[w,k]=l(0),[N,b]=l(0),[v,C]=l(!0),[M,P]=l(null),j=o(null),S=n(()=>s({primaryColor:f}),[f]),A=i(()=>{M||(x?j.current?.pause():j.current?.play().catch(e=>{console.error("[AudioPlayer] Play error:",e),P("Error al reproducir")}),g(!x))},[x,M]),E=i(()=>{k(j.current?.duration||0)},[]),L=i(()=>{C(!1),P(null)},[]),T=i(()=>{console.error("[AudioPlayer] Failed to load audio:",a),C(!1),P("No se pudo cargar")},[a]),$=i(()=>{C(!0),P(null),j.current&&j.current.load()},[]);/* @__PURE__ */
|
|
2
2
|
return e("div",{className:u("flex items-center gap-3 py-1 min-w-[200px]",c?"text-foreground":"text-primary-foreground"),children:[
|
|
3
3
|
/* @__PURE__ */r("audio",{ref:j,src:a,preload:"metadata",onLoadedMetadata:E,onCanPlayThrough:L,onTimeUpdate:()=>b(j.current?.currentTime||0),onEnded:()=>g(!1),onError:T}),
|
|
4
4
|
/* @__PURE__ */r("button",M?{onClick:$,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__ */r(p,{className:"w-4 h-4"})}:{onClick:A,disabled:v,className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-opacity",style:{backgroundColor:c?S:"hsl(var(--card))",color:c?"white":S,opacity:v?.6:1},children:v?/* @__PURE__ */r(d,{className:"w-4 h-4 animate-spin"}):x?/* @__PURE__ */r(m,{className:"w-4 h-4 fill-current"}):/* @__PURE__ */r(y,{className:"w-4 h-4 fill-current ml-0.5"})}),
|
|
@@ -9,4 +9,4 @@ return e("div",{className:u("flex items-center gap-3 py-1 min-w-[200px]",c?"text
|
|
|
9
9
|
/* @__PURE__ */e("div",{className:"flex justify-between text-[9px] font-bold opacity-60",children:[
|
|
10
10
|
/* @__PURE__ */e("span",{children:[Math.floor(N/60),":",Math.floor(N%60).toString().padStart(2,"0")]}),
|
|
11
11
|
/* @__PURE__ */r("span",{children:v?"--:--":`${Math.floor(w/60)}:${Math.floor(w%60).toString().padStart(2,"0")}`})]})]})})]})});export{f as AudioPlayer};
|
|
12
|
-
//# sourceMappingURL=AudioPlayer-
|
|
12
|
+
//# sourceMappingURL=AudioPlayer-CRbfhCdt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioPlayer-oy-xH9pg.js","sources":["../node_modules/lucide-react/dist/esm/icons/circle-alert.js","../node_modules/lucide-react/dist/esm/icons/pause.js","../node_modules/lucide-react/dist/esm/icons/play.js","../node_modules/lucide-react/dist/esm/icons/rotate-cw.js","../src/chat-widget/components/AudioPlayer.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst CircleAlert = createLucideIcon(\"CircleAlert\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"8\", y2: \"12\", key: \"1pkeuh\" }],\n [\"line\", { x1: \"12\", x2: \"12.01\", y1: \"16\", y2: \"16\", key: \"4dfq90\" }]\n]);\n\nexport { CircleAlert as default };\n//# sourceMappingURL=circle-alert.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Pause = createLucideIcon(\"Pause\", [\n [\"rect\", { x: \"14\", y: \"4\", width: \"4\", height: \"16\", rx: \"1\", key: \"zuxfzm\" }],\n [\"rect\", { x: \"6\", y: \"4\", width: \"4\", height: \"16\", rx: \"1\", key: \"1okwgv\" }]\n]);\n\nexport { Pause as default };\n//# sourceMappingURL=pause.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Play = createLucideIcon(\"Play\", [\n [\"polygon\", { points: \"6 3 20 12 6 21 6 3\", key: \"1oa8hb\" }]\n]);\n\nexport { Play as default };\n//# sourceMappingURL=play.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst RotateCw = createLucideIcon(\"RotateCw\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n]);\n\nexport { RotateCw as default };\n//# sourceMappingURL=rotate-cw.js.map\n","'use client'\n\nimport { useState, useRef, useMemo, memo, useCallback } from 'react'\nimport { Play, Pause, Loader2, AlertCircle, RotateCw } from './Icons'\nimport { cn } from '@/lib/utils'\nimport { getPrimaryColor } from '../utils/theme'\n\ninterface AudioPlayerProps {\n url: string\n isBot: boolean\n primaryColor?: string\n}\n\nexport type { AudioPlayerProps }\n\nexport const AudioPlayer = memo(function AudioPlayer({\n url,\n isBot,\n primaryColor,\n}: AudioPlayerProps) {\n const [isPlaying, setIsPlaying] = useState(false)\n const [duration, setDuration] = useState(0)\n const [currentTime, setCurrentTime] = useState(0)\n // Blob URLs from URL.createObjectURL() are valid during the current session\n const [isLoading, setIsLoading] = useState(true)\n const [error, setError] = useState<string | null>(null)\n const audioRef = useRef<HTMLAudioElement>(null)\n\n const brandColor = useMemo(() => getPrimaryColor({ primaryColor }), [primaryColor])\n\n const togglePlay = useCallback(() => {\n if (error) return\n if (isPlaying) audioRef.current?.pause()\n else audioRef.current?.play().catch((e) => {\n console.error('[AudioPlayer] Play error:', e)\n setError('Error al reproducir')\n })\n setIsPlaying(!isPlaying)\n }, [isPlaying, error])\n\n const handleLoadedMetadata = useCallback(() => {\n setDuration(audioRef.current?.duration || 0)\n }, [])\n\n const handleCanPlayThrough = useCallback(() => {\n setIsLoading(false)\n setError(null)\n }, [])\n\n const handleError = useCallback(() => {\n console.error('[AudioPlayer] Failed to load audio:', url)\n setIsLoading(false)\n setError('No se pudo cargar')\n }, [url])\n\n const handleRetry = useCallback(() => {\n setIsLoading(true)\n setError(null)\n if (audioRef.current) {\n audioRef.current.load()\n }\n }, [])\n\n return (\n <div\n className={cn(\n 'flex items-center gap-3 py-1 min-w-[200px]',\n isBot ? 'text-foreground' : 'text-primary-foreground'\n )}\n >\n {/* Always render <audio> — onError handles expired URLs naturally */}\n <audio\n ref={audioRef}\n src={url}\n preload=\"metadata\"\n onLoadedMetadata={handleLoadedMetadata}\n onCanPlayThrough={handleCanPlayThrough}\n onTimeUpdate={() => setCurrentTime(audioRef.current?.currentTime || 0)}\n onEnded={() => setIsPlaying(false)}\n onError={handleError}\n />\n \n {error ? (\n // Error state - show retry button\n <button\n onClick={handleRetry}\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\"\n title=\"Reintentar\"\n >\n <RotateCw className=\"w-4 h-4\" />\n </button>\n ) : (\n // Normal play/pause button\n <button\n onClick={togglePlay}\n disabled={isLoading}\n className=\"w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-opacity\"\n style={{\n backgroundColor: isBot ? brandColor : 'hsl(var(--card))',\n color: isBot ? 'white' : brandColor,\n opacity: isLoading ? 0.6 : 1,\n }}\n >\n {isLoading ? (\n <Loader2 className=\"w-4 h-4 animate-spin\" />\n ) : isPlaying ? (\n <Pause className=\"w-4 h-4 fill-current\" />\n ) : (\n <Play className=\"w-4 h-4 fill-current ml-0.5\" />\n )}\n </button>\n )}\n \n <div className=\"flex-1 space-y-1\">\n {error ? (\n <div className=\"flex items-center gap-1.5 text-red-500\">\n <AlertCircle className=\"w-3 h-3\" />\n <span className=\"text-[9px] font-bold\">{error}</span>\n </div>\n ) : (\n <>\n <div className=\"relative h-1 w-full bg-current/20 rounded-full overflow-hidden\">\n <div\n className=\"absolute h-full bg-current rounded-full transition-all\"\n style={{ width: `${(currentTime / duration) * 100 || 0}%` }}\n />\n </div>\n <div className=\"flex justify-between text-[9px] font-bold opacity-60\">\n <span>\n {Math.floor(currentTime / 60)}:\n {Math.floor(currentTime % 60)\n .toString()\n .padStart(2, '0')}\n </span>\n <span>\n {isLoading ? '--:--' : `${Math.floor(duration / 60)}:${Math.floor(duration % 60).toString().padStart(2, '0')}`}\n </span>\n </div>\n </>\n )}\n </div>\n </div>\n )\n})\n"],"names":["CircleAlert","createLucideIcon","cx","cy","r","key","x1","x2","y1","y2","Pause","x","y","width","height","rx","Play","points","RotateCw","d","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","disabled","style","backgroundColor","color","opacity","Loader2","AlertCircle","Fragment","Math","floor","toString","padStart"],"mappings":"kNASA,MAAMA,EAAcC,EAAiB,cAAe,CAClD,CAAC,SAAU,CAAEC,GAAI,KAAMC,GAAI,KAAMC,EAAG,KAAMC,IAAK,WAC/C,CAAC,OAAQ,CAAEC,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c,IACvBiD,WACAC,SAAS,EAAG;eAEjBtB,EAAC,QACED,SAAAzB,EAAY,QAAU,GAAG6C,KAAKC,MAAMlD,EAAW,OAAOiD,KAAKC,MAAMlD,EAAW,IAAImD,WAAWC,SAAS,EAAG,mBAQxH","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"AudioPlayer-CRbfhCdt.js","sources":["../node_modules/lucide-react/dist/esm/icons/circle-alert.js","../node_modules/lucide-react/dist/esm/icons/pause.js","../node_modules/lucide-react/dist/esm/icons/play.js","../node_modules/lucide-react/dist/esm/icons/rotate-cw.js","../src/chat-widget/components/AudioPlayer.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst CircleAlert = createLucideIcon(\"CircleAlert\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"8\", y2: \"12\", key: \"1pkeuh\" }],\n [\"line\", { x1: \"12\", x2: \"12.01\", y1: \"16\", y2: \"16\", key: \"4dfq90\" }]\n]);\n\nexport { CircleAlert as default };\n//# sourceMappingURL=circle-alert.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Pause = createLucideIcon(\"Pause\", [\n [\"rect\", { x: \"14\", y: \"4\", width: \"4\", height: \"16\", rx: \"1\", key: \"zuxfzm\" }],\n [\"rect\", { x: \"6\", y: \"4\", width: \"4\", height: \"16\", rx: \"1\", key: \"1okwgv\" }]\n]);\n\nexport { Pause as default };\n//# sourceMappingURL=pause.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Play = createLucideIcon(\"Play\", [\n [\"polygon\", { points: \"6 3 20 12 6 21 6 3\", key: \"1oa8hb\" }]\n]);\n\nexport { Play as default };\n//# sourceMappingURL=play.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst RotateCw = createLucideIcon(\"RotateCw\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n]);\n\nexport { RotateCw as default };\n//# sourceMappingURL=rotate-cw.js.map\n","'use client'\n\nimport { useState, useRef, useMemo, memo, useCallback } from 'react'\nimport { Play, Pause, Loader2, AlertCircle, RotateCw } from './Icons'\nimport { cn } from '@/lib/utils'\nimport { getPrimaryColor } from '../utils/theme'\n\ninterface AudioPlayerProps {\n url: string\n isBot: boolean\n primaryColor?: string\n}\n\nexport type { AudioPlayerProps }\n\nexport const AudioPlayer = memo(function AudioPlayer({\n url,\n isBot,\n primaryColor,\n}: AudioPlayerProps) {\n const [isPlaying, setIsPlaying] = useState(false)\n const [duration, setDuration] = useState(0)\n const [currentTime, setCurrentTime] = useState(0)\n // Blob URLs from URL.createObjectURL() are valid during the current session\n const [isLoading, setIsLoading] = useState(true)\n const [error, setError] = useState<string | null>(null)\n const audioRef = useRef<HTMLAudioElement>(null)\n\n const brandColor = useMemo(() => getPrimaryColor({ primaryColor }), [primaryColor])\n\n const togglePlay = useCallback(() => {\n if (error) return\n if (isPlaying) audioRef.current?.pause()\n else audioRef.current?.play().catch((e) => {\n console.error('[AudioPlayer] Play error:', e)\n setError('Error al reproducir')\n })\n setIsPlaying(!isPlaying)\n }, [isPlaying, error])\n\n const handleLoadedMetadata = useCallback(() => {\n setDuration(audioRef.current?.duration || 0)\n }, [])\n\n const handleCanPlayThrough = useCallback(() => {\n setIsLoading(false)\n setError(null)\n }, [])\n\n const handleError = useCallback(() => {\n console.error('[AudioPlayer] Failed to load audio:', url)\n setIsLoading(false)\n setError('No se pudo cargar')\n }, [url])\n\n const handleRetry = useCallback(() => {\n setIsLoading(true)\n setError(null)\n if (audioRef.current) {\n audioRef.current.load()\n }\n }, [])\n\n return (\n <div\n className={cn(\n 'flex items-center gap-3 py-1 min-w-[200px]',\n isBot ? 'text-foreground' : 'text-primary-foreground'\n )}\n >\n {/* Always render <audio> — onError handles expired URLs naturally */}\n <audio\n ref={audioRef}\n src={url}\n preload=\"metadata\"\n onLoadedMetadata={handleLoadedMetadata}\n onCanPlayThrough={handleCanPlayThrough}\n onTimeUpdate={() => setCurrentTime(audioRef.current?.currentTime || 0)}\n onEnded={() => setIsPlaying(false)}\n onError={handleError}\n />\n \n {error ? (\n // Error state - show retry button\n <button\n onClick={handleRetry}\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\"\n title=\"Reintentar\"\n >\n <RotateCw className=\"w-4 h-4\" />\n </button>\n ) : (\n // Normal play/pause button\n <button\n onClick={togglePlay}\n disabled={isLoading}\n className=\"w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-opacity\"\n style={{\n backgroundColor: isBot ? brandColor : 'hsl(var(--card))',\n color: isBot ? 'white' : brandColor,\n opacity: isLoading ? 0.6 : 1,\n }}\n >\n {isLoading ? (\n <Loader2 className=\"w-4 h-4 animate-spin\" />\n ) : isPlaying ? (\n <Pause className=\"w-4 h-4 fill-current\" />\n ) : (\n <Play className=\"w-4 h-4 fill-current ml-0.5\" />\n )}\n </button>\n )}\n \n <div className=\"flex-1 space-y-1\">\n {error ? (\n <div className=\"flex items-center gap-1.5 text-red-500\">\n <AlertCircle className=\"w-3 h-3\" />\n <span className=\"text-[9px] font-bold\">{error}</span>\n </div>\n ) : (\n <>\n <div className=\"relative h-1 w-full bg-current/20 rounded-full overflow-hidden\">\n <div\n className=\"absolute h-full bg-current rounded-full transition-all\"\n style={{ width: `${(currentTime / duration) * 100 || 0}%` }}\n />\n </div>\n <div className=\"flex justify-between text-[9px] font-bold opacity-60\">\n <span>\n {Math.floor(currentTime / 60)}:\n {Math.floor(currentTime % 60)\n .toString()\n .padStart(2, '0')}\n </span>\n <span>\n {isLoading ? '--:--' : `${Math.floor(duration / 60)}:${Math.floor(duration % 60).toString().padStart(2, '0')}`}\n </span>\n </div>\n </>\n )}\n </div>\n </div>\n )\n})\n"],"names":["CircleAlert","createLucideIcon","cx","cy","r","key","x1","x2","y1","y2","Pause","x","y","width","height","rx","Play","points","RotateCw","d","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","disabled","style","backgroundColor","color","opacity","Loader2","AlertCircle","Fragment","Math","floor","toString","padStart"],"mappings":"kNASA,MAAMA,EAAcC,EAAiB,cAAe,CAClD,CAAC,SAAU,CAAEC,GAAI,KAAMC,GAAI,KAAMC,EAAG,KAAMC,IAAK,WAC/C,CAAC,OAAQ,CAAEC,GAAI,KAAMC,GAAI,KAAMC,GAAI,IAAKC,GAAI,KAAMJ,IAAK,WACvD,CAAC,OAAQ,CAAEC,GAAI,KAAMC,GAAI,QAASC,GAAI,KAAMC,GAAI,KAAMJ,IAAK,aCHvDK,EAAQT,EAAiB,QAAS,CACtC,CAAC,OAAQ,CAAEU,EAAG,KAAMC,EAAG,IAAKC,MAAO,IAAKC,OAAQ,KAAMC,GAAI,IAAKV,IAAK,WACpE,CAAC,OAAQ,CAAEM,EAAG,IAAKC,EAAG,IAA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,GACpEmC,QAAS,IAAMvC,GAAa,GAC5BwC,QAASf;eAKTO,EAAC,SAFFxB,EAEE,CACCiC,QAASf,EACTG,UAAU,kIACVa,MAAM,aAENX,wBAAAC,EAACxC,EAAA,CAASqC,UAAU,aAIrB,CACCY,QAAS1B,EACT4B,SAAUrC,EACVuB,UAAU,oFACVe,MAAO,CACLC,gBAAiBhD,EAAQe,EAAa,mBACtCkC,MAAOjD,EAAQ,QAAUe,EACzBmC,QAASzC,EAAY,GAAM,GAG5ByB,SAAAzB,iBACC0B,EAACgB,EAAA,CAAQnB,UAAU,yBACjB9B,iBACFiC,EAAChD,EAAA,CAAM6C,UAAU,0CAEhBvC,EAAA,CAAKuC,UAAU;eAKtBG,EAAC,OAAIH,UAAU,mBACZE,0BACCH,EAAC,MAAA,CAAIC,UAAU,yCACbE,SAAA;eAAAC,EAACiB,EAAA,CAAYpB,UAAU;iBACtB,OAAA,CAAKA,UAAU,uBAAwBE,SAAAvB,sBAG1CoB,EAAAsB,EAAA,CACEnB,SAAA;eAAAC,EAAC,MAAA,CAAIH,UAAU,iEACbE,wBAAAC,EAAC,MAAA,CACCH,UAAU,yDACVe,MAAO,CAAEzD,MAAO,GAAIiB,EAAcF,EAAY,KAAO;eAGzD0B,EAAC,MAAA,CAAIC,UAAU,uDACbE,SAAA;eAAAH,EAAC,OAAA,CACEG,SAAA,CAAAoB,KAAKC,MAAMhD,EAAc,IAAI,IAC7B+C,KAAKC,MAAMhD,EAAc,IACvBiD,WACAC,SAAS,EAAG;eAEjBtB,EAAC,QACED,SAAAzB,EAAY,QAAU,GAAG6C,KAAKC,MAAMlD,EAAW,OAAOiD,KAAKC,MAAMlD,EAAW,IAAImD,WAAWC,SAAS,EAAG,mBAQxH","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as a}from"react/jsx-runtime";import{memo as o,useState as t,useEffect as l,useRef as n}from"react";import{c as s,u as i,a as c,X as d}from"./standalone-
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as a}from"react/jsx-runtime";import{memo as o,useState as t,useEffect as l,useRef as n}from"react";import{c as s,u as i,a as c,X as d}from"./standalone-B1ikZxXc.js";const h=s("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),u=s("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),m=s("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"}]]),b=o(function({images:o,radius:l="rounded-lg"}){const{t:n}=i("extracted"),[s,d]=t(0),[b,p]=t(!1),v=()=>{d(e=>(e+1)%o.length)},f=()=>{d(e=>(e-1+o.length)%o.length)},y=e=>{d(e),p(!0)},[x,k]=t(/* @__PURE__ */new Set),w=e=>{k(r=>new Set(r).add(e))};return 1===o.length?/* @__PURE__ */e("div",{className:"my-3 relative group",children:x.has(0)?/* @__PURE__ */r("div",{className:c("w-full h-48 flex flex-col items-center justify-center","border bg-muted text-muted-foreground",l),style:{borderColor:"hsl(var(--border))"},children:[
|
|
2
2
|
/* @__PURE__ */e("svg",{className:"w-12 h-12 mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),
|
|
3
3
|
/* @__PURE__ */e("span",{className:"text-sm",children:"Imagen no disponible"})]}):/* @__PURE__ */r(a,{children:[
|
|
4
4
|
/* @__PURE__ */e("img",{src:o[0].src,alt:o[0].alt||"Imagen",className:c("w-full h-auto object-cover cursor-pointer transition-all duration-300","border shadow-soft-md hover:shadow-soft-lg hover:scale-[1.02]",l),style:{borderColor:"hsl(var(--border))"},loading:"lazy",onClick:()=>y(0),onError:()=>w(0)}),
|
|
@@ -21,4 +21,4 @@ return r("div",{className:"absolute inset-0 z-[100000] bg-black/95 backdrop-blur
|
|
|
21
21
|
/* @__PURE__ */e("button",{onClick:e=>{e.stopPropagation(),b()},className:"absolute left-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10","aria-label":"Anterior",children:/* @__PURE__ */e(h,{size:32,className:"text-white"})}),
|
|
22
22
|
/* @__PURE__ */e("button",{onClick:e=>{e.stopPropagation(),m()},className:"absolute right-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10","aria-label":"Siguiente",children:/* @__PURE__ */e(u,{size:32,className:"text-white"})})]}),
|
|
23
23
|
/* @__PURE__ */e("img",{src:o[t].src,alt:o[t].alt||`Imagen ${t+1}`,className:"max-w-[90%] max-h-[85%] object-contain",onClick:e=>e.stopPropagation()}),o.length>1&&/* @__PURE__ */e("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2 bg-black/50 backdrop-blur-sm px-3 py-2 rounded-full z-10",children:o.map((r,a)=>/* @__PURE__ */e("button",{onClick:e=>{e.stopPropagation();const r=a-t;if(r>0)for(let a=0;a<r;a++)m();if(r<0)for(let a=0;a<Math.abs(r);a++)b()},className:c("w-2 h-2 rounded-full transition-all",a===t?"bg-white scale-125":"bg-white/40 hover:bg-white/60"),"aria-label":`Imagen ${a+1}`},a))})]})}export{b as Gallery};
|
|
24
|
-
//# sourceMappingURL=Gallery-
|
|
24
|
+
//# sourceMappingURL=Gallery-kONhAFwP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gallery-DxEy0FFC.js","sources":["../node_modules/lucide-react/dist/esm/icons/chevron-left.js","../node_modules/lucide-react/dist/esm/icons/chevron-right.js","../node_modules/lucide-react/dist/esm/icons/zoom-in.js","../src/chat-widget/components/Gallery.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronLeft = createLucideIcon(\"ChevronLeft\", [\n [\"path\", { d: \"m15 18-6-6 6-6\", key: \"1wnfg3\" }]\n]);\n\nexport { ChevronLeft as default };\n//# sourceMappingURL=chevron-left.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronRight = createLucideIcon(\"ChevronRight\", [\n [\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]\n]);\n\nexport { ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ZoomIn = createLucideIcon(\"ZoomIn\", [\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n [\"line\", { x1: \"21\", x2: \"16.65\", y1: \"21\", y2: \"16.65\", key: \"13gj7c\" }],\n [\"line\", { x1: \"11\", x2: \"11\", y1: \"8\", y2: \"14\", key: \"1vmskp\" }],\n [\"line\", { x1: \"8\", x2: \"14\", y1: \"11\", y2: \"11\", key: \"durymu\" }]\n]);\n\nexport { ZoomIn as default };\n//# sourceMappingURL=zoom-in.js.map\n","/**\n * @package @botuyo/chat-widget\n * Gallery - Componente visual para mostrar galerías de imágenes\n */\n\n'use client'\n\nimport { useState, memo, useRef, useEffect } from 'react'\nimport { useTranslations } from '@/chat-widget/i18n'\nimport { ChevronLeft, ChevronRight, X, ZoomIn } from './Icons'\nimport { cn } from '@/lib/utils'\n\ninterface GalleryProps {\n images: Array<{ src: string; alt?: string }>\n radius?: string\n}\n\nexport type { GalleryProps }\n\nexport const Gallery = memo(function Gallery({ images, radius = 'rounded-lg' }: GalleryProps) {\n const { t } = useTranslations('extracted')\n const [currentIndex, setCurrentIndex] = useState(0)\n const [isLightboxOpen, setIsLightboxOpen] = useState(false)\n\n const nextImage = () => {\n setCurrentIndex(prev => (prev + 1) % images.length)\n }\n\n const prevImage = () => {\n setCurrentIndex(prev => (prev - 1 + images.length) % images.length)\n }\n\n const openLightbox = (index: number) => {\n setCurrentIndex(index)\n setIsLightboxOpen(true)\n }\n\n const [imageError, setImageError] = useState<Set<number>>(new Set())\n\n const handleImageError = (index: number) => {\n setImageError(prev => new Set(prev).add(index))\n }\n\n // Si solo hay 1 imagen, mostrar como imagen simple\n if (images.length === 1) {\n return (\n <div className=\"my-3 relative group\">\n {imageError.has(0) ? (\n <div\n className={cn(\n 'w-full h-48 flex flex-col items-center justify-center',\n 'border bg-muted text-muted-foreground',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n >\n <svg\n className=\"w-12 h-12 mb-2 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n <span className=\"text-sm\">Imagen no disponible</span>\n </div>\n ) : (\n <>\n <img\n src={images[0].src}\n alt={images[0].alt || 'Imagen'}\n className={cn(\n 'w-full h-auto object-cover cursor-pointer transition-all duration-300',\n 'border shadow-soft-md hover:shadow-soft-lg hover:scale-[1.02]',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n loading=\"lazy\"\n onClick={() => openLightbox(0)}\n onError={() => handleImageError(0)}\n />\n <div className=\"absolute top-2 right-2 bg-black/50 backdrop-blur-sm p-1.5 rounded-full opacity-0 group-hover:opacity-100 transition-opacity\">\n <ZoomIn size={16} className=\"text-white\" />\n </div>\n </>\n )}\n </div>\n )\n }\n\n // Si hay 2-3 imágenes, mostrar grid horizontal\n if (images.length <= 3) {\n return (\n <div className={cn('my-3 grid gap-2', images.length === 2 ? 'grid-cols-2' : 'grid-cols-3')}>\n {images.map((img, idx) => (\n <div key={idx} className=\"relative group overflow-hidden\">\n {imageError.has(idx) ? (\n <div\n className={cn(\n 'w-full h-32 flex flex-col items-center justify-center',\n 'border bg-muted text-muted-foreground',\n radius\n )}\n >\n <svg\n className=\"w-8 h-8 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n </div>\n ) : (\n <>\n <img\n src={img.src}\n alt={img.alt || `Imagen ${idx + 1}`}\n className={cn(\n 'w-full h-32 object-cover cursor-pointer transition-all duration-300',\n 'border border-border shadow-soft-md hover:shadow-soft-lg hover:scale-110',\n radius\n )}\n loading=\"lazy\"\n onClick={() => openLightbox(idx)}\n onError={() => handleImageError(idx)}\n />\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-end p-2\">\n <span className=\"text-white text-xs font-bold bg-black/50 backdrop-blur-sm px-2 py-1 rounded-full\">\n {idx + 1}/{images.length}\n </span>\n </div>\n </>\n )}\n </div>\n ))}\n\n {/* Lightbox */}\n {isLightboxOpen && (\n <Lightbox\n images={images}\n currentIndex={currentIndex}\n onClose={() => setIsLightboxOpen(false)}\n onNext={nextImage}\n onPrev={prevImage}\n />\n )}\n </div>\n )\n }\n\n // Si hay 4+ imágenes, mostrar carrusel con thumbnails\n return (\n <div className=\"my-3 space-y-2\">\n {/* Imagen Principal */}\n <div className=\"relative group\">\n {imageError.has(currentIndex) ? (\n <div\n className={cn(\n 'w-full h-56 flex flex-col items-center justify-center',\n 'border bg-muted text-muted-foreground',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n >\n <svg\n className=\"w-12 h-12 mb-2 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n <span className=\"text-sm\">Imagen no disponible</span>\n </div>\n ) : (\n <>\n <img\n src={images[currentIndex].src}\n alt={images[currentIndex].alt || `Imagen ${currentIndex + 1}`}\n className={cn(\n 'w-full h-56 object-cover cursor-pointer transition-all duration-300',\n 'border shadow-soft-md',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n loading=\"lazy\"\n onClick={() => openLightbox(currentIndex)}\n onError={() => handleImageError(currentIndex)}\n />\n\n {/* Overlay con controles */}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-black/20 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-between px-3\">\n <button\n onClick={prevImage}\n className=\"p-2 rounded-full shadow-soft-lg transition-all hover:scale-110 active:scale-95\"\n style={{\n backgroundColor: 'hsl(var(--card) / 0.9)',\n color: 'hsl(var(--foreground))',\n }}\n aria-label={t('anterior')}\n >\n <ChevronLeft size={20} />\n </button>\n <button\n onClick={nextImage}\n className=\"p-2 rounded-full shadow-soft-lg transition-all hover:scale-110 active:scale-95\"\n style={{\n backgroundColor: 'hsl(var(--card) / 0.9)',\n color: 'hsl(var(--foreground))',\n }}\n aria-label={t('siguiente')}\n >\n <ChevronRight size={20} />\n </button>\n </div>\n\n {/* Badge con contador */}\n <div className=\"absolute top-3 right-3 bg-black/70 backdrop-blur-sm px-3 py-1 rounded-full\">\n <span className=\"text-white text-xs font-bold\">\n {currentIndex + 1} / {images.length}\n </span>\n </div>\n\n {/* Icono de zoom */}\n <div className=\"absolute bottom-3 right-3 bg-black/70 backdrop-blur-sm p-2 rounded-full opacity-0 group-hover:opacity-100 transition-opacity\">\n <ZoomIn size={16} className=\"text-white\" />\n </div>\n </>\n )}\n </div>\n\n {/* Thumbnails */}\n <div className=\"flex gap-2 overflow-x-auto pb-2 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent\">\n {images.map((img, idx) => (\n <button\n key={idx}\n onClick={() => setCurrentIndex(idx)}\n className={cn(\n 'flex-shrink-0 w-16 h-16 overflow-hidden transition-all duration-300 relative',\n 'border-2 hover:scale-110',\n radius,\n currentIndex === idx\n ? 'border-[hsl(210,90%,50%)] ring-2 ring-[hsl(210,90%,50%)]/30 scale-105'\n : 'border-border hover:border-[hsl(210,90%,70%)] opacity-70 hover:opacity-100'\n )}\n >\n {imageError.has(idx) ? (\n <div className=\"w-full h-full flex items-center justify-center bg-muted\">\n <svg\n className=\"w-6 h-6 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n </div>\n ) : (\n <img\n src={img.src}\n alt={img.alt || `Thumbnail ${idx + 1}`}\n className=\"w-full h-full object-cover\"\n loading=\"lazy\"\n onError={() => handleImageError(idx)}\n />\n )}\n </button>\n ))}\n </div>\n\n {/* Lightbox */}\n {isLightboxOpen && (\n <Lightbox\n images={images}\n currentIndex={currentIndex}\n onClose={() => setIsLightboxOpen(false)}\n onNext={nextImage}\n onPrev={prevImage}\n />\n )}\n </div>\n )\n})\n\n// ==========================================\n// 🔍 LIGHTBOX (Modal de Imagen)\n// ==========================================\n\ninterface LightboxProps {\n images: Array<{ src: string; alt?: string }>\n currentIndex: number\n onClose: () => void\n onNext: () => void\n onPrev: () => void\n}\n\nfunction Lightbox({ images, currentIndex, onClose, onNext, onPrev }: LightboxProps) {\n const { t } = useTranslations('extracted')\n\n // Keyboard navigation\n useEffect(() => {\n const handler = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose()\n if (e.key === 'ArrowLeft') onPrev()\n if (e.key === 'ArrowRight') onNext()\n }\n window.addEventListener('keydown', handler)\n return () => window.removeEventListener('keydown', handler)\n }, [onClose, onPrev, onNext])\n\n // Touch swipe support\n const touchStartX = useRef(0)\n const handleTouchStart = (e: React.TouchEvent) => {\n touchStartX.current = e.touches[0].clientX\n }\n const handleTouchEnd = (e: React.TouchEvent) => {\n const dx = e.changedTouches[0].clientX - touchStartX.current\n if (Math.abs(dx) > 50) {\n if (dx > 0) { onPrev() } else { onNext() }\n }\n }\n\n return (\n <div\n className=\"absolute inset-0 z-[100000] bg-black/95 backdrop-blur-sm flex items-center justify-center animate-in fade-in duration-200\"\n onClick={onClose}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n >\n {/* Botón Cerrar */}\n <button\n onClick={onClose}\n className=\"absolute top-4 right-4 bg-white/10 hover:bg-white/20 p-2 rounded-full transition-all hover:scale-110 active:scale-95 z-10\"\n aria-label={t('cerrar')}\n >\n <X size={24} className=\"text-white\" />\n </button>\n\n {/* Contador */}\n <div className=\"absolute top-4 left-4 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full z-10\">\n <span className=\"text-white text-sm font-bold\">\n {currentIndex + 1} / {images.length}\n </span>\n </div>\n\n {/* Controles de Navegación */}\n {images.length > 1 && (\n <>\n <button\n onClick={e => {\n e.stopPropagation()\n onPrev()\n }}\n className=\"absolute left-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10\"\n aria-label=\"Anterior\"\n >\n <ChevronLeft size={32} className=\"text-white\" />\n </button>\n <button\n onClick={e => {\n e.stopPropagation()\n onNext()\n }}\n className=\"absolute right-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10\"\n aria-label=\"Siguiente\"\n >\n <ChevronRight size={32} className=\"text-white\" />\n </button>\n </>\n )}\n\n {/* Imagen */}\n <img\n src={images[currentIndex].src}\n alt={images[currentIndex].alt || `Imagen ${currentIndex + 1}`}\n className=\"max-w-[90%] max-h-[85%] object-contain\"\n onClick={e => e.stopPropagation()}\n />\n\n {/* Thumbnails strip */}\n {images.length > 1 && (\n <div className=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2 bg-black/50 backdrop-blur-sm px-3 py-2 rounded-full z-10\">\n {images.map((_, idx) => (\n <button\n key={idx}\n onClick={e => {\n e.stopPropagation()\n // Navigate to this index — use repeated prev/next to reach\n const diff = idx - currentIndex\n if (diff > 0) for (let i = 0; i < diff; i++) onNext()\n if (diff < 0) for (let i = 0; i < Math.abs(diff); i++) onPrev()\n }}\n className={cn(\n 'w-2 h-2 rounded-full transition-all',\n idx === currentIndex ? 'bg-white scale-125' : 'bg-white/40 hover:bg-white/60'\n )}\n aria-label={`Imagen ${idx + 1}`}\n />\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"names":["ChevronLeft","createLucideIcon","d","key","ChevronRight","ZoomIn","cx","cy","r","x1","x2","y1","y2","Gallery","memo","images","radius","t","useTranslations","currentIndex","setCurrentIndex","useState","isLightboxOpen","setIsLightboxOpen","nextImage","prev","length","prevImage","openLightbox","index","imageError","setImageError","Set","handleImageError","add","className","children","has","jsxs","cn","style","borderColor","jsx","fill","stroke","viewBox","strokeLinecap","strokeLinejoin","strokeWidth","Fragment","src","alt","loading","onClick","onError","size","map","img","idx","Lightbox","onClose","onNext","onPrev","backgroundColor","color","useEffect","handler","e","window","addEventListener","removeEventListener","touchStartX","useRef","onTouchStart","current","touches","clientX","onTouchEnd","dx","changedTouches","Math","abs","X","stopPropagation","_","diff","i"],"mappings":"wMASA,MAAMA,EAAcC,EAAiB,cAAe,CAClD,CAAC,OAAQ,CAAEC,EAAG,iBAAkBC,IAAK,aCDjCC,EAAeH,EAAiB,eAAgB,CACpD,CAAC,OAAQ,CAAEC,EAAG,gBAAiBC,IAAK,aCDhCE,EAASJ,EAAiB,SAAU,CACxC,CAAC,SAAU,CAAEK,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKL,IAAK,WAC9C,CAAC,OAAQ,CAAEM,GAAI,KAAMC,GAAI,QAASC,GAAI,KAAMC,GAAI,QAAST,IAAK,WAC9D,CAAC,OAAQ,CAAEM,GAAI,KAAMC,GAAI,KAAMC,GAAI,IAAKC,GAAI,KAAMT,IAAK,WACvD,CAAC,OAAQ,CAAEM,GAAI,IAAKC,GAAI,KAAMC,GAAI,KAAMC,GAAI,KAAMT,IAAK,aCM5CU,EAAUC,EAAK,UAAiBC,OAAEA,EAAAC,OAAQA,EAAS,eAC9D,MAAMC,EAAEA,GAAMC,EAAgB,cACvBC,EAAcC,GAAmBC,EAAS,IAC1CC,EAAgBC,GAAqBF,GAAS,GAE/CG,EAAY,KAChBJ,EAAgBK,IAASA,EAAO,GAAKV,EAAOW,SAGxCC,EAAY,KAChBP,MAAyBK,EAAO,EAAIV,EAAOW,QAAUX,EAAOW,SAGxDE,EAAgBC,IACpBT,EAAgBS,GAChBN,GAAkB,KAGbO,EAAYC,GAAiBV,iBAAsB,IAAIW,KAExDC,EAAoBJ,IACxBE,KAAsB,IAAIC,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B,EAAC,SAAA,CAECW,QAASc,IACPA,EAAEgB,kBAEF,MAAME,EAAO3B,EAAMvC,EACnB,GAAIkE,EAAO,EAAG,IAAA,IAASC,EAAI,EAAGA,EAAID,EAAMC,IAAKzB,IAC7C,GAAIwB,EAAO,EAAG,IAAA,IAASC,EAAI,EAAGA,EAAIN,KAAKC,IAAII,GAAOC,IAAKxB,KAEzD3B,UAAWI,EACT,sCACAmB,IAAQvC,EAAe,qBAAuB,iCAEhD,aAAY,UAAUuC,EAAM,KAZvBA,QAmBnB","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"Gallery-kONhAFwP.js","sources":["../node_modules/lucide-react/dist/esm/icons/chevron-left.js","../node_modules/lucide-react/dist/esm/icons/chevron-right.js","../node_modules/lucide-react/dist/esm/icons/zoom-in.js","../src/chat-widget/components/Gallery.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronLeft = createLucideIcon(\"ChevronLeft\", [\n [\"path\", { d: \"m15 18-6-6 6-6\", key: \"1wnfg3\" }]\n]);\n\nexport { ChevronLeft as default };\n//# sourceMappingURL=chevron-left.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ChevronRight = createLucideIcon(\"ChevronRight\", [\n [\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]\n]);\n\nexport { ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n","/**\n * @license lucide-react v0.400.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ZoomIn = createLucideIcon(\"ZoomIn\", [\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n [\"line\", { x1: \"21\", x2: \"16.65\", y1: \"21\", y2: \"16.65\", key: \"13gj7c\" }],\n [\"line\", { x1: \"11\", x2: \"11\", y1: \"8\", y2: \"14\", key: \"1vmskp\" }],\n [\"line\", { x1: \"8\", x2: \"14\", y1: \"11\", y2: \"11\", key: \"durymu\" }]\n]);\n\nexport { ZoomIn as default };\n//# sourceMappingURL=zoom-in.js.map\n","/**\n * @package @botuyo/chat-widget\n * Gallery - Componente visual para mostrar galerías de imágenes\n */\n\n'use client'\n\nimport { useState, memo, useRef, useEffect } from 'react'\nimport { useTranslations } from '@/chat-widget/i18n'\nimport { ChevronLeft, ChevronRight, X, ZoomIn } from './Icons'\nimport { cn } from '@/lib/utils'\n\ninterface GalleryProps {\n images: Array<{ src: string; alt?: string }>\n radius?: string\n}\n\nexport type { GalleryProps }\n\nexport const Gallery = memo(function Gallery({ images, radius = 'rounded-lg' }: GalleryProps) {\n const { t } = useTranslations('extracted')\n const [currentIndex, setCurrentIndex] = useState(0)\n const [isLightboxOpen, setIsLightboxOpen] = useState(false)\n\n const nextImage = () => {\n setCurrentIndex(prev => (prev + 1) % images.length)\n }\n\n const prevImage = () => {\n setCurrentIndex(prev => (prev - 1 + images.length) % images.length)\n }\n\n const openLightbox = (index: number) => {\n setCurrentIndex(index)\n setIsLightboxOpen(true)\n }\n\n const [imageError, setImageError] = useState<Set<number>>(new Set())\n\n const handleImageError = (index: number) => {\n setImageError(prev => new Set(prev).add(index))\n }\n\n // Si solo hay 1 imagen, mostrar como imagen simple\n if (images.length === 1) {\n return (\n <div className=\"my-3 relative group\">\n {imageError.has(0) ? (\n <div\n className={cn(\n 'w-full h-48 flex flex-col items-center justify-center',\n 'border bg-muted text-muted-foreground',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n >\n <svg\n className=\"w-12 h-12 mb-2 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n <span className=\"text-sm\">Imagen no disponible</span>\n </div>\n ) : (\n <>\n <img\n src={images[0].src}\n alt={images[0].alt || 'Imagen'}\n className={cn(\n 'w-full h-auto object-cover cursor-pointer transition-all duration-300',\n 'border shadow-soft-md hover:shadow-soft-lg hover:scale-[1.02]',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n loading=\"lazy\"\n onClick={() => openLightbox(0)}\n onError={() => handleImageError(0)}\n />\n <div className=\"absolute top-2 right-2 bg-black/50 backdrop-blur-sm p-1.5 rounded-full opacity-0 group-hover:opacity-100 transition-opacity\">\n <ZoomIn size={16} className=\"text-white\" />\n </div>\n </>\n )}\n </div>\n )\n }\n\n // Si hay 2-3 imágenes, mostrar grid horizontal\n if (images.length <= 3) {\n return (\n <div className={cn('my-3 grid gap-2', images.length === 2 ? 'grid-cols-2' : 'grid-cols-3')}>\n {images.map((img, idx) => (\n <div key={idx} className=\"relative group overflow-hidden\">\n {imageError.has(idx) ? (\n <div\n className={cn(\n 'w-full h-32 flex flex-col items-center justify-center',\n 'border bg-muted text-muted-foreground',\n radius\n )}\n >\n <svg\n className=\"w-8 h-8 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n </div>\n ) : (\n <>\n <img\n src={img.src}\n alt={img.alt || `Imagen ${idx + 1}`}\n className={cn(\n 'w-full h-32 object-cover cursor-pointer transition-all duration-300',\n 'border border-border shadow-soft-md hover:shadow-soft-lg hover:scale-110',\n radius\n )}\n loading=\"lazy\"\n onClick={() => openLightbox(idx)}\n onError={() => handleImageError(idx)}\n />\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-end p-2\">\n <span className=\"text-white text-xs font-bold bg-black/50 backdrop-blur-sm px-2 py-1 rounded-full\">\n {idx + 1}/{images.length}\n </span>\n </div>\n </>\n )}\n </div>\n ))}\n\n {/* Lightbox */}\n {isLightboxOpen && (\n <Lightbox\n images={images}\n currentIndex={currentIndex}\n onClose={() => setIsLightboxOpen(false)}\n onNext={nextImage}\n onPrev={prevImage}\n />\n )}\n </div>\n )\n }\n\n // Si hay 4+ imágenes, mostrar carrusel con thumbnails\n return (\n <div className=\"my-3 space-y-2\">\n {/* Imagen Principal */}\n <div className=\"relative group\">\n {imageError.has(currentIndex) ? (\n <div\n className={cn(\n 'w-full h-56 flex flex-col items-center justify-center',\n 'border bg-muted text-muted-foreground',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n >\n <svg\n className=\"w-12 h-12 mb-2 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n <span className=\"text-sm\">Imagen no disponible</span>\n </div>\n ) : (\n <>\n <img\n src={images[currentIndex].src}\n alt={images[currentIndex].alt || `Imagen ${currentIndex + 1}`}\n className={cn(\n 'w-full h-56 object-cover cursor-pointer transition-all duration-300',\n 'border shadow-soft-md',\n radius\n )}\n style={{ borderColor: 'hsl(var(--border))' }}\n loading=\"lazy\"\n onClick={() => openLightbox(currentIndex)}\n onError={() => handleImageError(currentIndex)}\n />\n\n {/* Overlay con controles */}\n <div className=\"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-black/20 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-between px-3\">\n <button\n onClick={prevImage}\n className=\"p-2 rounded-full shadow-soft-lg transition-all hover:scale-110 active:scale-95\"\n style={{\n backgroundColor: 'hsl(var(--card) / 0.9)',\n color: 'hsl(var(--foreground))',\n }}\n aria-label={t('anterior')}\n >\n <ChevronLeft size={20} />\n </button>\n <button\n onClick={nextImage}\n className=\"p-2 rounded-full shadow-soft-lg transition-all hover:scale-110 active:scale-95\"\n style={{\n backgroundColor: 'hsl(var(--card) / 0.9)',\n color: 'hsl(var(--foreground))',\n }}\n aria-label={t('siguiente')}\n >\n <ChevronRight size={20} />\n </button>\n </div>\n\n {/* Badge con contador */}\n <div className=\"absolute top-3 right-3 bg-black/70 backdrop-blur-sm px-3 py-1 rounded-full\">\n <span className=\"text-white text-xs font-bold\">\n {currentIndex + 1} / {images.length}\n </span>\n </div>\n\n {/* Icono de zoom */}\n <div className=\"absolute bottom-3 right-3 bg-black/70 backdrop-blur-sm p-2 rounded-full opacity-0 group-hover:opacity-100 transition-opacity\">\n <ZoomIn size={16} className=\"text-white\" />\n </div>\n </>\n )}\n </div>\n\n {/* Thumbnails */}\n <div className=\"flex gap-2 overflow-x-auto pb-2 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent\">\n {images.map((img, idx) => (\n <button\n key={idx}\n onClick={() => setCurrentIndex(idx)}\n className={cn(\n 'flex-shrink-0 w-16 h-16 overflow-hidden transition-all duration-300 relative',\n 'border-2 hover:scale-110',\n radius,\n currentIndex === idx\n ? 'border-[hsl(210,90%,50%)] ring-2 ring-[hsl(210,90%,50%)]/30 scale-105'\n : 'border-border hover:border-[hsl(210,90%,70%)] opacity-70 hover:opacity-100'\n )}\n >\n {imageError.has(idx) ? (\n <div className=\"w-full h-full flex items-center justify-center bg-muted\">\n <svg\n className=\"w-6 h-6 opacity-50\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n </div>\n ) : (\n <img\n src={img.src}\n alt={img.alt || `Thumbnail ${idx + 1}`}\n className=\"w-full h-full object-cover\"\n loading=\"lazy\"\n onError={() => handleImageError(idx)}\n />\n )}\n </button>\n ))}\n </div>\n\n {/* Lightbox */}\n {isLightboxOpen && (\n <Lightbox\n images={images}\n currentIndex={currentIndex}\n onClose={() => setIsLightboxOpen(false)}\n onNext={nextImage}\n onPrev={prevImage}\n />\n )}\n </div>\n )\n})\n\n// ==========================================\n// 🔍 LIGHTBOX (Modal de Imagen)\n// ==========================================\n\ninterface LightboxProps {\n images: Array<{ src: string; alt?: string }>\n currentIndex: number\n onClose: () => void\n onNext: () => void\n onPrev: () => void\n}\n\nfunction Lightbox({ images, currentIndex, onClose, onNext, onPrev }: LightboxProps) {\n const { t } = useTranslations('extracted')\n\n // Keyboard navigation\n useEffect(() => {\n const handler = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose()\n if (e.key === 'ArrowLeft') onPrev()\n if (e.key === 'ArrowRight') onNext()\n }\n window.addEventListener('keydown', handler)\n return () => window.removeEventListener('keydown', handler)\n }, [onClose, onPrev, onNext])\n\n // Touch swipe support\n const touchStartX = useRef(0)\n const handleTouchStart = (e: React.TouchEvent) => {\n touchStartX.current = e.touches[0].clientX\n }\n const handleTouchEnd = (e: React.TouchEvent) => {\n const dx = e.changedTouches[0].clientX - touchStartX.current\n if (Math.abs(dx) > 50) {\n if (dx > 0) { onPrev() } else { onNext() }\n }\n }\n\n return (\n <div\n className=\"absolute inset-0 z-[100000] bg-black/95 backdrop-blur-sm flex items-center justify-center animate-in fade-in duration-200\"\n onClick={onClose}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n >\n {/* Botón Cerrar */}\n <button\n onClick={onClose}\n className=\"absolute top-4 right-4 bg-white/10 hover:bg-white/20 p-2 rounded-full transition-all hover:scale-110 active:scale-95 z-10\"\n aria-label={t('cerrar')}\n >\n <X size={24} className=\"text-white\" />\n </button>\n\n {/* Contador */}\n <div className=\"absolute top-4 left-4 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full z-10\">\n <span className=\"text-white text-sm font-bold\">\n {currentIndex + 1} / {images.length}\n </span>\n </div>\n\n {/* Controles de Navegación */}\n {images.length > 1 && (\n <>\n <button\n onClick={e => {\n e.stopPropagation()\n onPrev()\n }}\n className=\"absolute left-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10\"\n aria-label=\"Anterior\"\n >\n <ChevronLeft size={32} className=\"text-white\" />\n </button>\n <button\n onClick={e => {\n e.stopPropagation()\n onNext()\n }}\n className=\"absolute right-4 bg-white/10 hover:bg-white/20 p-3 rounded-full transition-all hover:scale-110 active:scale-95 z-10\"\n aria-label=\"Siguiente\"\n >\n <ChevronRight size={32} className=\"text-white\" />\n </button>\n </>\n )}\n\n {/* Imagen */}\n <img\n src={images[currentIndex].src}\n alt={images[currentIndex].alt || `Imagen ${currentIndex + 1}`}\n className=\"max-w-[90%] max-h-[85%] object-contain\"\n onClick={e => e.stopPropagation()}\n />\n\n {/* Thumbnails strip */}\n {images.length > 1 && (\n <div className=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2 bg-black/50 backdrop-blur-sm px-3 py-2 rounded-full z-10\">\n {images.map((_, idx) => (\n <button\n key={idx}\n onClick={e => {\n e.stopPropagation()\n // Navigate to this index — use repeated prev/next to reach\n const diff = idx - currentIndex\n if (diff > 0) for (let i = 0; i < diff; i++) onNext()\n if (diff < 0) for (let i = 0; i < Math.abs(diff); i++) onPrev()\n }}\n className={cn(\n 'w-2 h-2 rounded-full transition-all',\n idx === currentIndex ? 'bg-white scale-125' : 'bg-white/40 hover:bg-white/60'\n )}\n aria-label={`Imagen ${idx + 1}`}\n />\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"names":["ChevronLeft","createLucideIcon","d","key","ChevronRight","ZoomIn","cx","cy","r","x1","x2","y1","y2","Gallery","memo","images","radius","t","useTranslations","currentIndex","setCurrentIndex","useState","isLightboxOpen","setIsLightboxOpen","nextImage","prev","length","prevImage","openLightbox","index","imageError","setImageError","Set","handleImageError","add","className","children","has","jsxs","cn","style","borderColor","jsx","fill","stroke","viewBox","strokeLinecap","strokeLinejoin","strokeWidth","Fragment","src","alt","loading","onClick","onError","size","map","img","idx","Lightbox","onClose","onNext","onPrev","backgroundColor","color","useEffect","handler","e","window","addEventListener","removeEventListener","touchStartX","useRef","onTouchStart","current","touches","clientX","onTouchEnd","dx","changedTouches","Math","abs","X","stopPropagation","_","diff","i"],"mappings":"wMASA,MAAMA,EAAcC,EAAiB,cAAe,CAClD,CAAC,OAAQ,CAAEC,EAAG,iBAAkBC,IAAK,aCDjCC,EAAeH,EAAiB,eAAgB,CACpD,CAAC,OAAQ,CAAEC,EAAG,gBAAiBC,IAAK,aCDhCE,EAASJ,EAAiB,SAAU,CACxC,CAAC,SAAU,CAAEK,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKL,IAAK,WAC9C,CAAC,OAAQ,CAAEM,GAAI,KAAMC,GAAI,QAASC,GAAI,KAAMC,GAAI,QAAST,IAAK,WAC9D,CAAC,OAAQ,CAAEM,GAAI,KAAMC,GAAI,KAAMC,GAAI,IAAKC,GAAI,KAAMT,IAAK,WACvD,CAAC,OAAQ,CAAEM,GAAI,IAAKC,GAAI,KAAMC,GA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ACpC,EAAA,CAAYuD,KAAM,GAAIpB,UAAU;eAEnCO,EAAC,SAAA,CACCW,QAASc,IACPA,EAAEgB,kBACFtB,KAEF1B,UAAU,sHACV,aAAW,YAEXC,0BAAChC,EAAA,CAAamD,KAAM,GAAIpB,UAAU;eAMxCO,EAAC,MAAA,CACCQ,IAAKnC,EAAOI,GAAc+B,IAC1BC,IAAKpC,EAAOI,GAAcgC,KAAO,UAAUhC,EAAe,IAC1DgB,UAAU,yCACVkB,QAASc,GAAKA,EAAEgB,oBAIjBpE,EAAOW,OAAS,kBACfgB,EAAC,MAAA,CAAIP,UAAU,kHACZC,SAAArB,EAAOyC,IAAI,CAAC4B,EAAG1B,mBACdhB,EAAC,SAAA,CAECW,QAASc,IACPA,EAAEgB,kBAEF,MAAME,EAAO3B,EAAMvC,EACnB,GAAIkE,EAAO,EAAG,IAAA,IAASC,EAAI,EAAGA,EAAID,EAAMC,IAAKzB,IAC7C,GAAIwB,EAAO,EAAG,IAAA,IAASC,EAAI,EAAGA,EAAIN,KAAKC,IAAII,GAAOC,IAAKxB,KAEzD3B,UAAWI,EACT,sCACAmB,IAAQvC,EAAe,qBAAuB,iCAEhD,aAAY,UAAUuC,EAAM,KAZvBA,QAmBnB","x_google_ignoreList":[0,1,2]}
|
package/dist/botuyo-chat.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"react-dom/client";import"react";import{B as a,C as t,b as e,d as s,e as d,P as i,i as o,f as r,h as g}from"./standalone-
|
|
1
|
+
import"react-dom/client";import"react";import{B as a,C as t,b as e,d as s,e as d,P as i,i as o,f as r,h as g}from"./standalone-B1ikZxXc.js";export{a as BotUyoChatWidget,t as ChatWidget,e as ChatWidgetProvider,s as ChatWidgetUnstyled,d as LanguageProvider,i as PlaygroundView,o as default,r as useChatWidget,g as useLanguage};
|
|
2
2
|
//# sourceMappingURL=botuyo-chat.es.js.map
|