@botuyo/chat-widget-standalone 1.0.72 → 1.0.74
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/LICENSE +21 -21
- package/dist/Avatar3D-LfNJe183.js.map +1 -1
- package/dist/botuyo-chat.es.js +11 -11
- 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-Dglx4A0L.js → chunk-audio-BtKqgeW7.js} +2 -2
- package/dist/chunk-audio-BtKqgeW7.js.map +1 -0
- package/dist/{chunk-chat-ui-C9FmvFky.js → chunk-chat-ui-BE_4AcMc.js} +6 -6
- package/dist/chunk-chat-ui-BE_4AcMc.js.map +1 -0
- package/dist/{chunk-gallery-BubwgiKI.js → chunk-gallery-D20qs-fr.js} +2 -2
- package/dist/chunk-gallery-D20qs-fr.js.map +1 -0
- package/dist/src/chat-widget/ChatWidget.d.ts.map +1 -1
- package/dist/src/chat-widget/components/Gallery.stories.d.ts.map +1 -1
- package/dist/src/chat-widget/i18n/useTranslations.d.ts +2 -2
- package/dist/src/chat-widget/i18n/useTranslations.d.ts.map +1 -1
- package/dist/stats-umd.html +1 -1
- package/dist/stats.html +1 -1
- package/package.json +155 -155
- package/dist/chunk-audio-Dglx4A0L.js.map +0 -1
- package/dist/chunk-chat-ui-C9FmvFky.js.map +0 -1
- package/dist/chunk-gallery-BubwgiKI.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@botuyo/chat-widget-standalone",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "BotUyo Chat Widget - Standalone CDN version with React/TypeScript support",
|
|
6
|
-
"main": "dist/botuyo-chat.umd.js",
|
|
7
|
-
"module": "dist/botuyo-chat.es.js",
|
|
8
|
-
"types": "dist/standalone.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/standalone.d.ts",
|
|
12
|
-
"import": "./dist/botuyo-chat.es.js",
|
|
13
|
-
"require": "./dist/botuyo-chat.umd.js"
|
|
14
|
-
},
|
|
15
|
-
"./dist/style.css": "./dist/botuyo-chat.css",
|
|
16
|
-
"./style.css": "./dist/botuyo-chat.css"
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"dev": "vite",
|
|
20
|
-
"build": "npm run clean && npm run build:es && npm run build:umd && npm run build:types",
|
|
21
|
-
"build:es": "vite build",
|
|
22
|
-
"build:umd": "vite build -c vite.config.umd.mjs",
|
|
23
|
-
"build:types": "tsc --project tsconfig.build.json",
|
|
24
|
-
"preview": "vite preview",
|
|
25
|
-
"clean": "npx rimraf dist",
|
|
26
|
-
"lint": "eslint .",
|
|
27
|
-
"lint:fix": "eslint . --fix",
|
|
28
|
-
"typecheck": "tsc --noEmit",
|
|
29
|
-
"test": "vitest",
|
|
30
|
-
"test:ui": "vitest --ui",
|
|
31
|
-
"test:run": "vitest run",
|
|
32
|
-
"test:coverage": "vitest run --coverage",
|
|
33
|
-
"test:e2e": "playwright test",
|
|
34
|
-
"test:e2e:ui": "playwright test --ui",
|
|
35
|
-
"test:e2e:debug": "playwright test --debug",
|
|
36
|
-
"test:e2e:report": "playwright show-report",
|
|
37
|
-
"storybook": "storybook dev -p 6006",
|
|
38
|
-
"build-storybook": "storybook build",
|
|
39
|
-
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
|
|
40
|
-
"format:check": "prettier --check \"src/**/*.{ts,tsx,css}\""
|
|
41
|
-
},
|
|
42
|
-
"lint-staged": {
|
|
43
|
-
"*.{ts,tsx}": [
|
|
44
|
-
"eslint --fix",
|
|
45
|
-
"prettier --write"
|
|
46
|
-
],
|
|
47
|
-
"*.{css,md,json}": [
|
|
48
|
-
"prettier --write"
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"keywords": [
|
|
52
|
-
"chat",
|
|
53
|
-
"widget",
|
|
54
|
-
"chatbot",
|
|
55
|
-
"customer-support",
|
|
56
|
-
"botuyo",
|
|
57
|
-
"standalone",
|
|
58
|
-
"cdn",
|
|
59
|
-
"react",
|
|
60
|
-
"typescript",
|
|
61
|
-
"nextjs",
|
|
62
|
-
"socket.io"
|
|
63
|
-
],
|
|
64
|
-
"author": "BotUyo",
|
|
65
|
-
"license": "MIT",
|
|
66
|
-
"repository": {
|
|
67
|
-
"type": "git",
|
|
68
|
-
"url": "https://github.com/botuyo/chat-widget.git"
|
|
69
|
-
},
|
|
70
|
-
"bugs": {
|
|
71
|
-
"url": "https://github.com/botuyo/chat-widget/issues"
|
|
72
|
-
},
|
|
73
|
-
"homepage": "https://github.com/botuyo/chat-widget#readme",
|
|
74
|
-
"devDependencies": {
|
|
75
|
-
"@axe-core/playwright": "^4.11.0",
|
|
76
|
-
"@chromatic-com/storybook": "^5.0.0",
|
|
77
|
-
"@eslint/js": "^9.39.2",
|
|
78
|
-
"@playwright/test": "^1.58.0",
|
|
79
|
-
"@storybook/addon-a11y": "^10.2.0",
|
|
80
|
-
"@storybook/addon-docs": "^10.2.0",
|
|
81
|
-
"@storybook/addon-onboarding": "^10.2.0",
|
|
82
|
-
"@storybook/addon-vitest": "^10.2.0",
|
|
83
|
-
"@storybook/react-vite": "^10.2.0",
|
|
84
|
-
"@tailwindcss/postcss": "^4.1.18",
|
|
85
|
-
"@tanstack/react-virtual": "^3.13.18",
|
|
86
|
-
"@testing-library/dom": "^10.4.1",
|
|
87
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
88
|
-
"@testing-library/react": "^16.3.2",
|
|
89
|
-
"@testing-library/user-event": "^14.6.1",
|
|
90
|
-
"@types/node": "^25.0.10",
|
|
91
|
-
"@types/react": "^19.2.9",
|
|
92
|
-
"@types/react-dom": "^19.2.3",
|
|
93
|
-
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
94
|
-
"@typescript-eslint/parser": "^8.53.1",
|
|
95
|
-
"@vitejs/plugin-react": "^5.1.2",
|
|
96
|
-
"@vitest/browser-playwright": "^4.0.18",
|
|
97
|
-
"@vitest/coverage-v8": "^4.0.18",
|
|
98
|
-
"@vitest/ui": "^4.0.18",
|
|
99
|
-
"autoprefixer": "^10.4.23",
|
|
100
|
-
"axe-core": "^4.11.1",
|
|
101
|
-
"cors": "^2.8.6",
|
|
102
|
-
"cssnano": "^7.1.2",
|
|
103
|
-
"cssnano-preset-advanced": "^7.0.10",
|
|
104
|
-
"eslint": "^9.39.2",
|
|
105
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
106
|
-
"eslint-plugin-react-refresh": "^0.4.5",
|
|
107
|
-
"eslint-plugin-storybook": "^10.2.0",
|
|
108
|
-
"globals": "^17.1.0",
|
|
109
|
-
"happy-dom": "^20.3.7",
|
|
110
|
-
"husky": "^9.1.7",
|
|
111
|
-
"lint-staged": "^16.2.7",
|
|
112
|
-
"playwright": "^1.58.0",
|
|
113
|
-
"postcss": "^8.5.6",
|
|
114
|
-
"prettier": "^3.8.1",
|
|
115
|
-
"react": "^18.3.1",
|
|
116
|
-
"react-dom": "^18.3.1",
|
|
117
|
-
"rehype-sanitize": "^6.0.0",
|
|
118
|
-
"rollup-plugin-visualizer": "^6.0.5",
|
|
119
|
-
"socket.io": "^4.8.3",
|
|
120
|
-
"storybook": "^10.2.0",
|
|
121
|
-
"tailwindcss": "^4.1.18",
|
|
122
|
-
"terser": "^5.46.0",
|
|
123
|
-
"typescript": "^5.3.3",
|
|
124
|
-
"typescript-eslint": "^8.53.1",
|
|
125
|
-
"vite": "^7.3.1",
|
|
126
|
-
"vitest": "^4.0.18",
|
|
127
|
-
"zod": "^4.3.6"
|
|
128
|
-
},
|
|
129
|
-
"peerDependencies": {
|
|
130
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
131
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
132
|
-
},
|
|
133
|
-
"dependencies": {
|
|
134
|
-
"@pixiv/three-vrm": "^3.4.5",
|
|
135
|
-
"@react-three/drei": "^9.122.0",
|
|
136
|
-
"@react-three/fiber": "^8.18.0",
|
|
137
|
-
"@types/three": "^0.182.0",
|
|
138
|
-
"browser-image-compression": "^2.0.2",
|
|
139
|
-
"clsx": "^2.1.1",
|
|
140
|
-
"idb": "^8.0.3",
|
|
141
|
-
"lucide-react": "^0.400.0",
|
|
142
|
-
"react-markdown": "^10.1.0",
|
|
143
|
-
"remark-gfm": "^4.0.1",
|
|
144
|
-
"socket.io-client": "^4.7.4",
|
|
145
|
-
"tailwind-merge": "^3.4.0",
|
|
146
|
-
"three": "^0.182.0"
|
|
147
|
-
},
|
|
148
|
-
"files": [
|
|
149
|
-
"dist",
|
|
150
|
-
"README.md",
|
|
151
|
-
"INSTALLATION_GUIDE.md",
|
|
152
|
-
"LICENSE",
|
|
153
|
-
"examples"
|
|
154
|
-
]
|
|
155
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@botuyo/chat-widget-standalone",
|
|
3
|
+
"version": "1.0.74",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "BotUyo Chat Widget - Standalone CDN version with React/TypeScript support",
|
|
6
|
+
"main": "dist/botuyo-chat.umd.js",
|
|
7
|
+
"module": "dist/botuyo-chat.es.js",
|
|
8
|
+
"types": "dist/standalone.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/standalone.d.ts",
|
|
12
|
+
"import": "./dist/botuyo-chat.es.js",
|
|
13
|
+
"require": "./dist/botuyo-chat.umd.js"
|
|
14
|
+
},
|
|
15
|
+
"./dist/style.css": "./dist/botuyo-chat.css",
|
|
16
|
+
"./style.css": "./dist/botuyo-chat.css"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "vite",
|
|
20
|
+
"build": "npm run clean && npm run build:es && npm run build:umd && npm run build:types",
|
|
21
|
+
"build:es": "vite build",
|
|
22
|
+
"build:umd": "vite build -c vite.config.umd.mjs",
|
|
23
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
24
|
+
"preview": "vite preview",
|
|
25
|
+
"clean": "npx rimraf dist",
|
|
26
|
+
"lint": "eslint .",
|
|
27
|
+
"lint:fix": "eslint . --fix",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"test": "vitest",
|
|
30
|
+
"test:ui": "vitest --ui",
|
|
31
|
+
"test:run": "vitest run",
|
|
32
|
+
"test:coverage": "vitest run --coverage",
|
|
33
|
+
"test:e2e": "playwright test",
|
|
34
|
+
"test:e2e:ui": "playwright test --ui",
|
|
35
|
+
"test:e2e:debug": "playwright test --debug",
|
|
36
|
+
"test:e2e:report": "playwright show-report",
|
|
37
|
+
"storybook": "storybook dev -p 6006",
|
|
38
|
+
"build-storybook": "storybook build",
|
|
39
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
|
|
40
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx,css}\""
|
|
41
|
+
},
|
|
42
|
+
"lint-staged": {
|
|
43
|
+
"*.{ts,tsx}": [
|
|
44
|
+
"eslint --fix",
|
|
45
|
+
"prettier --write"
|
|
46
|
+
],
|
|
47
|
+
"*.{css,md,json}": [
|
|
48
|
+
"prettier --write"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"keywords": [
|
|
52
|
+
"chat",
|
|
53
|
+
"widget",
|
|
54
|
+
"chatbot",
|
|
55
|
+
"customer-support",
|
|
56
|
+
"botuyo",
|
|
57
|
+
"standalone",
|
|
58
|
+
"cdn",
|
|
59
|
+
"react",
|
|
60
|
+
"typescript",
|
|
61
|
+
"nextjs",
|
|
62
|
+
"socket.io"
|
|
63
|
+
],
|
|
64
|
+
"author": "BotUyo",
|
|
65
|
+
"license": "MIT",
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "https://github.com/botuyo/chat-widget.git"
|
|
69
|
+
},
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/botuyo/chat-widget/issues"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://github.com/botuyo/chat-widget#readme",
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@axe-core/playwright": "^4.11.0",
|
|
76
|
+
"@chromatic-com/storybook": "^5.0.0",
|
|
77
|
+
"@eslint/js": "^9.39.2",
|
|
78
|
+
"@playwright/test": "^1.58.0",
|
|
79
|
+
"@storybook/addon-a11y": "^10.2.0",
|
|
80
|
+
"@storybook/addon-docs": "^10.2.0",
|
|
81
|
+
"@storybook/addon-onboarding": "^10.2.0",
|
|
82
|
+
"@storybook/addon-vitest": "^10.2.0",
|
|
83
|
+
"@storybook/react-vite": "^10.2.0",
|
|
84
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
85
|
+
"@tanstack/react-virtual": "^3.13.18",
|
|
86
|
+
"@testing-library/dom": "^10.4.1",
|
|
87
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
88
|
+
"@testing-library/react": "^16.3.2",
|
|
89
|
+
"@testing-library/user-event": "^14.6.1",
|
|
90
|
+
"@types/node": "^25.0.10",
|
|
91
|
+
"@types/react": "^19.2.9",
|
|
92
|
+
"@types/react-dom": "^19.2.3",
|
|
93
|
+
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
94
|
+
"@typescript-eslint/parser": "^8.53.1",
|
|
95
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
96
|
+
"@vitest/browser-playwright": "^4.0.18",
|
|
97
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
98
|
+
"@vitest/ui": "^4.0.18",
|
|
99
|
+
"autoprefixer": "^10.4.23",
|
|
100
|
+
"axe-core": "^4.11.1",
|
|
101
|
+
"cors": "^2.8.6",
|
|
102
|
+
"cssnano": "^7.1.2",
|
|
103
|
+
"cssnano-preset-advanced": "^7.0.10",
|
|
104
|
+
"eslint": "^9.39.2",
|
|
105
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
106
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
107
|
+
"eslint-plugin-storybook": "^10.2.0",
|
|
108
|
+
"globals": "^17.1.0",
|
|
109
|
+
"happy-dom": "^20.3.7",
|
|
110
|
+
"husky": "^9.1.7",
|
|
111
|
+
"lint-staged": "^16.2.7",
|
|
112
|
+
"playwright": "^1.58.0",
|
|
113
|
+
"postcss": "^8.5.6",
|
|
114
|
+
"prettier": "^3.8.1",
|
|
115
|
+
"react": "^18.3.1",
|
|
116
|
+
"react-dom": "^18.3.1",
|
|
117
|
+
"rehype-sanitize": "^6.0.0",
|
|
118
|
+
"rollup-plugin-visualizer": "^6.0.5",
|
|
119
|
+
"socket.io": "^4.8.3",
|
|
120
|
+
"storybook": "^10.2.0",
|
|
121
|
+
"tailwindcss": "^4.1.18",
|
|
122
|
+
"terser": "^5.46.0",
|
|
123
|
+
"typescript": "^5.3.3",
|
|
124
|
+
"typescript-eslint": "^8.53.1",
|
|
125
|
+
"vite": "^7.3.1",
|
|
126
|
+
"vitest": "^4.0.18",
|
|
127
|
+
"zod": "^4.3.6"
|
|
128
|
+
},
|
|
129
|
+
"peerDependencies": {
|
|
130
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
131
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
132
|
+
},
|
|
133
|
+
"dependencies": {
|
|
134
|
+
"@pixiv/three-vrm": "^3.4.5",
|
|
135
|
+
"@react-three/drei": "^9.122.0",
|
|
136
|
+
"@react-three/fiber": "^8.18.0",
|
|
137
|
+
"@types/three": "^0.182.0",
|
|
138
|
+
"browser-image-compression": "^2.0.2",
|
|
139
|
+
"clsx": "^2.1.1",
|
|
140
|
+
"idb": "^8.0.3",
|
|
141
|
+
"lucide-react": "^0.400.0",
|
|
142
|
+
"react-markdown": "^10.1.0",
|
|
143
|
+
"remark-gfm": "^4.0.1",
|
|
144
|
+
"socket.io-client": "^4.7.4",
|
|
145
|
+
"tailwind-merge": "^3.4.0",
|
|
146
|
+
"three": "^0.182.0"
|
|
147
|
+
},
|
|
148
|
+
"files": [
|
|
149
|
+
"dist",
|
|
150
|
+
"README.md",
|
|
151
|
+
"INSTALLATION_GUIDE.md",
|
|
152
|
+
"LICENSE",
|
|
153
|
+
"examples"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-audio-Dglx4A0L.js","sources":["../src/chat-widget/components/AudioPlayer.tsx"],"sourcesContent":["'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":["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,IAExCK,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,2BAI9BkC,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"}
|