customizable-toast-notification 3.11.4 β 3.11.5
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/CHANGELOG.md +7 -0
- package/README.md +132 -128
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +121 -6
- package/dist/index.esm.mjs +4 -4
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.11.5](https://github.com/sammy-cool/customizable-toast-notification/compare/v3.11.4...v3.11.5) (2026-08-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* correct README defaults and add real TypeScript types ([8f262d3](https://github.com/sammy-cool/customizable-toast-notification/commit/8f262d387363cc7931b8431594d9147fd45ef2c1))
|
|
7
|
+
|
|
1
8
|
## [3.11.4](https://github.com/sammy-cool/customizable-toast-notification/compare/v3.11.3...v3.11.4) (2026-08-19)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -5,24 +5,23 @@
|
|
|
5
5
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
6
6
|
[](https://bundlephobia.com/package/customizable-toast-notification)
|
|
7
7
|
|
|
8
|
-
A **lightweight**, **zero-dependency** toast notification library for modern JavaScript applications. Built with production-grade reliability and comprehensive
|
|
8
|
+
A **lightweight**, **zero-dependency** toast notification library for modern JavaScript applications. Built with production-grade reliability and comprehensive safety mechanisms.
|
|
9
9
|
|
|
10
10
|
## β¨ Key Features
|
|
11
11
|
|
|
12
|
-
- π« **Zero Dependencies** - Pure JavaScript with no external requirements
|
|
12
|
+
- π« **Zero Dependencies** - Pure JavaScript with no external requirements, lightweight and fast
|
|
13
13
|
- π‘οΈ **Production Ready** - Reliable and scalable for production environments
|
|
14
|
-
- π¨ **Highly Customizable** - Colors, positions, animations, progress bars
|
|
14
|
+
- π¨ **Highly Customizable** - Colors, positions, animations, progress bars, and styling
|
|
15
15
|
- π **Framework Agnostic** - Works with React, Vue, Angular, or vanilla JS
|
|
16
16
|
- π± **Responsive** - Works on all screen sizes and devices
|
|
17
17
|
- β‘ **CDN Ready** - Easy integration via CDN or npm
|
|
18
|
-
- π¨ **Fully Customizable** - Colors, positions, animations, and styling
|
|
19
18
|
- βΏ **Accessible** - ARIA live regions and keyboard navigation support
|
|
20
19
|
- π **Smart Grouping** - Duplicate notifications are automatically grouped with badges
|
|
21
20
|
- βΈοΈ **Pause on Hover** - CTA toasts pause when user hovers or focuses
|
|
22
21
|
- π― **Call-to-Action** - Built-in support for interactive buttons and links
|
|
23
22
|
- π **Queue Management** - Maximum 3 visible toasts with intelligent queueing
|
|
24
23
|
- π **Multiple Themes** - Success, error, warning, and info styles
|
|
25
|
-
- π§ **TypeScript Ready** -
|
|
24
|
+
- π§ **TypeScript Ready** - Full type definitions included, with real autocomplete and type-checking (not just placeholder types)
|
|
26
25
|
|
|
27
26
|
## π¦ Installation
|
|
28
27
|
|
|
@@ -42,29 +41,31 @@ yarn add customizable-toast-notification
|
|
|
42
41
|
|
|
43
42
|
### ES Modules
|
|
44
43
|
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
```js
|
|
45
|
+
import {
|
|
46
|
+
createToast,
|
|
47
|
+
setDefaultColors,
|
|
48
|
+
setDefaultMessages,
|
|
49
|
+
} from "customizable-toast-notification";
|
|
48
50
|
|
|
49
51
|
// Simple usage
|
|
50
52
|
createToast({
|
|
51
|
-
message: "Hello World!",
|
|
52
|
-
type: "success",
|
|
53
|
-
duration: 3000
|
|
53
|
+
message: "Hello World!",
|
|
54
|
+
type: "success",
|
|
55
|
+
duration: 3000,
|
|
54
56
|
});
|
|
55
|
-
|
|
56
57
|
```
|
|
57
58
|
|
|
58
59
|
### CDN/Browser (UMD Build) / Quick Try with jsDelivr
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
Global Variable Name: customizableToast
|
|
61
|
+
Global Variable Name: `customizableToast`
|
|
62
62
|
|
|
63
|
+
```html
|
|
63
64
|
<!-- Always latest version -->
|
|
64
65
|
<script src="https://cdn.jsdelivr.net/npm/customizable-toast-notification/dist/index.umd.js"></script>
|
|
65
66
|
|
|
66
67
|
<!-- OR pin to a specific version (recommended for stability) -->
|
|
67
|
-
<script src="https://cdn.jsdelivr.net/npm/customizable-toast-notification@3.
|
|
68
|
+
<script src="https://cdn.jsdelivr.net/npm/customizable-toast-notification@3.11.4/dist/index.umd.js"></script>
|
|
68
69
|
|
|
69
70
|
<script>
|
|
70
71
|
// Access the global UMD export
|
|
@@ -77,15 +78,14 @@ Global Variable Name: customizableToast
|
|
|
77
78
|
animationEasing: "ease",
|
|
78
79
|
progressPosition: "top",
|
|
79
80
|
cta: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
81
|
+
autoClose: false,
|
|
82
|
+
label: "Check Pkg!",
|
|
83
|
+
href: "https://www.npmjs.com/package/customizable-toast-notification",
|
|
84
|
+
variant: "link",
|
|
85
|
+
target: "_blank",
|
|
86
|
+
},
|
|
86
87
|
});
|
|
87
88
|
</script>
|
|
88
|
-
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
## π API Reference
|
|
@@ -96,27 +96,30 @@ Creates and displays a toast notification.
|
|
|
96
96
|
|
|
97
97
|
#### Options
|
|
98
98
|
|
|
99
|
-
| Parameter | Type | Default
|
|
100
|
-
| ------------------- | --------- |
|
|
101
|
-
| `message` | `string` | Based on `type`
|
|
102
|
-
| `type` | `string` | `"info"`
|
|
103
|
-
| `duration` | `number` | `
|
|
104
|
-
| `position` | `string` | `"bottom-right"`
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
99
|
+
| Parameter | Type | Default | Description |
|
|
100
|
+
| ------------------- | --------- | ------------------------------- | --------------------------------------------------------- |
|
|
101
|
+
| `message` | `string` | Based on `type` | Toast message content |
|
|
102
|
+
| `type` | `string` | `"info"` | `"info"`, `"success"`, `"error"`, `"warning"` |
|
|
103
|
+
| `duration` | `number` | `2500` | Auto-dismiss time in milliseconds |
|
|
104
|
+
| `position` | `string` | `"bottom-right"` | Toast position on screen |
|
|
105
|
+
| `borderRadius` | `string` | `"50px"` | Toast corner radius |
|
|
106
|
+
| `backgroundColor` | `string` | Based on `type` | Custom background color |
|
|
107
|
+
| `textColor` | `string` | Auto-computed for WCAG contrast | Custom text color |
|
|
108
|
+
| `showCloseButton` | `boolean` | `true` | Show close (Γ) button |
|
|
109
|
+
| `showProgressBar` | `boolean` | `true` | Show countdown progress bar |
|
|
110
|
+
| `animationDuration` | `string` | `"0.4s"` | CSS animation duration |
|
|
111
|
+
| `animationEasing` | `string` | `"ease"` | CSS animation easing function |
|
|
112
|
+
| `progressColor` | `string` | Falls back to `textColor` | Progress bar color |
|
|
113
|
+
| `progressHeight` | `string` | `"4px"` | Progress bar height |
|
|
114
|
+
| `progressPosition` | `string` | `"bottom"` | Progress bar position: `"top"` or `"bottom"` |
|
|
115
|
+
| `pauseOnHover` | `boolean` | `auto` | Pause timer on hover (auto: true for CTA toasts) |
|
|
116
|
+
| `allowHtml` | `boolean` | `false` | Render `message` as sanitized HTML instead of plain text |
|
|
117
|
+
| `wrapText` | `string` | `"normal"` | `"normal"` wraps naturally; falsy truncates to 3 lines |
|
|
118
|
+
| `cta` | `object` | `null` | Call-to-action configuration (see [CTA](#call-to-action)) |
|
|
116
119
|
|
|
117
120
|
#### Position Options
|
|
118
121
|
|
|
119
|
-
```
|
|
122
|
+
```
|
|
120
123
|
// Corner positions
|
|
121
124
|
- "top-left", "top-right", "bottom-left", "bottom-right"
|
|
122
125
|
|
|
@@ -128,105 +131,98 @@ Creates and displays a toast notification.
|
|
|
128
131
|
|
|
129
132
|
// Center
|
|
130
133
|
- "center"
|
|
131
|
-
|
|
132
134
|
```
|
|
133
135
|
|
|
134
136
|
## π― Call-to-Action (CTA)
|
|
135
137
|
|
|
136
138
|
Add interactive buttons or links to your toasts:
|
|
137
139
|
|
|
138
|
-
```
|
|
140
|
+
```js
|
|
139
141
|
// Button CTA
|
|
140
142
|
createToast({
|
|
141
|
-
message: "File uploaded successfully!",
|
|
142
|
-
type: "success",
|
|
143
|
-
cta: {
|
|
144
|
-
label: "View File",
|
|
145
|
-
onClick: () => {
|
|
146
|
-
window.open(
|
|
147
|
-
},
|
|
148
|
-
autoClose: true // Close toast after click (default: true)
|
|
149
|
-
}
|
|
143
|
+
message: "File uploaded successfully!",
|
|
144
|
+
type: "success",
|
|
145
|
+
cta: {
|
|
146
|
+
label: "View File",
|
|
147
|
+
onClick: () => {
|
|
148
|
+
window.open("/files/latest");
|
|
149
|
+
},
|
|
150
|
+
autoClose: true, // Close toast after click (default: true)
|
|
151
|
+
},
|
|
150
152
|
});
|
|
151
153
|
|
|
152
154
|
// Link CTA
|
|
153
155
|
createToast({
|
|
154
|
-
message: "New version available!",
|
|
155
|
-
cta: {
|
|
156
|
-
label: "Download",
|
|
157
|
-
href: "https://example.com/download",
|
|
158
|
-
variant: "link",
|
|
159
|
-
target: "_blank"
|
|
160
|
-
}
|
|
156
|
+
message: "New version available!",
|
|
157
|
+
cta: {
|
|
158
|
+
label: "Download",
|
|
159
|
+
href: "https://example.com/download",
|
|
160
|
+
variant: "link",
|
|
161
|
+
target: "_blank",
|
|
162
|
+
},
|
|
161
163
|
});
|
|
162
164
|
|
|
163
165
|
// Advanced CTA with async action
|
|
164
166
|
createToast({
|
|
165
|
-
message: "Ready to sync your data?",
|
|
166
|
-
cta: {
|
|
167
|
-
label: "Sync Now",
|
|
168
|
-
ariaLabel: "Start data synchronization",
|
|
169
|
-
autoClose: false,
|
|
170
|
-
onClick: async () => {
|
|
171
|
-
await performDataSync();
|
|
172
|
-
// Manually close if needed
|
|
173
|
-
}
|
|
174
|
-
}
|
|
167
|
+
message: "Ready to sync your data?",
|
|
168
|
+
cta: {
|
|
169
|
+
label: "Sync Now",
|
|
170
|
+
ariaLabel: "Start data synchronization",
|
|
171
|
+
autoClose: false,
|
|
172
|
+
onClick: async () => {
|
|
173
|
+
await performDataSync();
|
|
174
|
+
// Manually close if needed
|
|
175
|
+
},
|
|
176
|
+
},
|
|
175
177
|
});
|
|
176
|
-
|
|
177
178
|
```
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
| Parameter | Type | Default | Description |
|
|
182
|
-
| ----------- | ---------- | ---------- | ------------------------------ |
|
|
183
|
-
| `label` | `string` | `required` | Button/link text |
|
|
184
|
-
| `onClick` | `function` | `null` | Click handler (for buttons) |
|
|
185
|
-
| `href` | `string` | `null` | URL (for links) |
|
|
186
|
-
| `variant` | `string` | `"button"` | `"button"` or `"link"` |
|
|
187
|
-
| `target` | `string` | `null` | Link target (`"_blank"`, etc.) |
|
|
188
|
-
| `rel` | `string` | `auto` | Link relationship |
|
|
189
|
-
| `autoClose` | `boolean` | `true` | Close toast after CTA click |
|
|
190
|
-
| `ariaLabel` | `string` | `label` | Accessibility label |
|
|
180
|
+
Any toast with a `cta` automatically gets `pauseOnHover: true` unless you override it.
|
|
191
181
|
|
|
192
|
-
|
|
182
|
+
### CTA Options
|
|
193
183
|
|
|
194
|
-
|
|
184
|
+
| Parameter | Type | Default | Description |
|
|
185
|
+
| ----------- | ---------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
186
|
+
| `label` | `string` | `"CTA Label Missing!"` if omitted | Button/link text |
|
|
187
|
+
| `onClick` | `function` | `null` | Click handler (for buttons); may be async β the toast waits for it to resolve before auto-closing |
|
|
188
|
+
| `href` | `string` | `null` | URL (for links) |
|
|
189
|
+
| `variant` | `string` | `"button"` | `"button"` or `"link"` |
|
|
190
|
+
| `target` | `string` | `null` | Link target (`"_blank"`, etc.) |
|
|
191
|
+
| `rel` | `string` | `auto` | Link relationship β `target="_blank"` automatically gets `rel="noopener noreferrer"` unless you set your own |
|
|
192
|
+
| `autoClose` | `boolean` | `true` | Close toast after CTA click |
|
|
193
|
+
| `ariaLabel` | `string` | `label` | Accessibility label |
|
|
195
194
|
|
|
196
195
|
### `setDefaultColors(colors)`
|
|
197
196
|
|
|
198
|
-
```bash
|
|
199
|
-
|
|
200
197
|
Configure default colors for toast types.
|
|
201
198
|
|
|
199
|
+
```js
|
|
202
200
|
setDefaultColors({
|
|
203
|
-
success: "#10b981",
|
|
204
|
-
error: "#ef4444",
|
|
205
|
-
warning: "#f59e0b",
|
|
206
|
-
info: "#3b82f6"
|
|
201
|
+
success: "#10b981",
|
|
202
|
+
error: "#ef4444",
|
|
203
|
+
warning: "#f59e0b",
|
|
204
|
+
info: "#3b82f6",
|
|
207
205
|
});
|
|
208
|
-
|
|
209
206
|
```
|
|
210
207
|
|
|
211
208
|
### `setDefaultMessages(messages)`
|
|
212
209
|
|
|
213
|
-
```bash
|
|
214
210
|
Configure default messages for toast types.
|
|
215
211
|
|
|
212
|
+
```js
|
|
216
213
|
setDefaultMessages({
|
|
217
|
-
success: "Operation completed successfully!",
|
|
218
|
-
error: "Something went wrong!",
|
|
219
|
-
warning: "Please check your input!",
|
|
220
|
-
info: "Here's some information!"
|
|
214
|
+
success: "Operation completed successfully!",
|
|
215
|
+
error: "Something went wrong!",
|
|
216
|
+
warning: "Please check your input!",
|
|
217
|
+
info: "Here's some information!",
|
|
221
218
|
});
|
|
222
|
-
|
|
223
219
|
```
|
|
224
220
|
|
|
225
221
|
## π‘ Examples
|
|
226
222
|
|
|
227
223
|
### Basic Toast Types
|
|
228
224
|
|
|
229
|
-
```
|
|
225
|
+
```js
|
|
230
226
|
// Success
|
|
231
227
|
createToast({ type: "success", message: "Data saved!" });
|
|
232
228
|
|
|
@@ -238,50 +234,61 @@ createToast({ type: "warning", message: "Please confirm!" });
|
|
|
238
234
|
|
|
239
235
|
// Info
|
|
240
236
|
createToast({ type: "info", message: "New update available!" });
|
|
241
|
-
|
|
242
237
|
```
|
|
243
238
|
|
|
244
239
|
### Advanced Customization
|
|
245
240
|
|
|
246
|
-
```
|
|
241
|
+
```js
|
|
247
242
|
createToast({
|
|
248
|
-
message: "File uploading...",
|
|
249
|
-
type: "info",
|
|
250
|
-
duration: 5000,
|
|
251
|
-
position: "top-center",
|
|
252
|
-
showProgressBar: true,
|
|
253
|
-
showCloseButton: true,
|
|
254
|
-
backgroundColor: "#6366f1",
|
|
255
|
-
textColor: "white",
|
|
256
|
-
progressColor: "#e0e7ff",
|
|
257
|
-
progressPosition: "top",
|
|
258
|
-
animationDuration: "0.8s",
|
|
259
|
-
animationEasing: "ease-out"
|
|
243
|
+
message: "File uploading...",
|
|
244
|
+
type: "info",
|
|
245
|
+
duration: 5000,
|
|
246
|
+
position: "top-center",
|
|
247
|
+
showProgressBar: true,
|
|
248
|
+
showCloseButton: true,
|
|
249
|
+
backgroundColor: "#6366f1",
|
|
250
|
+
textColor: "white",
|
|
251
|
+
progressColor: "#e0e7ff",
|
|
252
|
+
progressPosition: "top",
|
|
253
|
+
animationDuration: "0.8s",
|
|
254
|
+
animationEasing: "ease-out",
|
|
260
255
|
});
|
|
256
|
+
```
|
|
261
257
|
|
|
262
258
|
### App-wide Configuration
|
|
263
259
|
|
|
260
|
+
```js
|
|
264
261
|
// Set your brand colors once
|
|
265
262
|
setDefaultColors({
|
|
266
|
-
success: "#10b981", // Your brand green
|
|
267
|
-
error: "#ef4444", // Your brand red
|
|
268
|
-
warning: "#f59e0b", // Your brand yellow
|
|
269
|
-
info: "#3b82f6" // Your brand blue
|
|
263
|
+
success: "#10b981", // Your brand green
|
|
264
|
+
error: "#ef4444", // Your brand red
|
|
265
|
+
warning: "#f59e0b", // Your brand yellow
|
|
266
|
+
info: "#3b82f6", // Your brand blue
|
|
270
267
|
});
|
|
271
268
|
|
|
272
269
|
// Set your app messages
|
|
273
270
|
setDefaultMessages({
|
|
274
|
-
success: "β
Success! Changes saved.",
|
|
275
|
-
error: "β Error! Please try again.",
|
|
276
|
-
warning: "β οΈ Warning! Check your input.",
|
|
277
|
-
info: "π‘ Info! Here's a tip."
|
|
271
|
+
success: "β
Success! Changes saved.",
|
|
272
|
+
error: "β Error! Please try again.",
|
|
273
|
+
warning: "β οΈ Warning! Check your input.",
|
|
274
|
+
info: "π‘ Info! Here's a tip.",
|
|
278
275
|
});
|
|
279
276
|
|
|
280
277
|
// Now just use types throughout your app
|
|
281
278
|
createToast({ type: "success" }); // Uses your custom colors & messages
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### HTML content (sanitized)
|
|
282
282
|
|
|
283
|
+
```js
|
|
284
|
+
createToast({
|
|
285
|
+
message: '<b>Bold text</b> and a <a href="https://example.com">link</a>',
|
|
286
|
+
allowHtml: true,
|
|
287
|
+
});
|
|
283
288
|
```
|
|
284
289
|
|
|
290
|
+
`allowHtml` content is always sanitized before rendering β `<script>` tags, event-handler attributes, and `javascript:` URIs are stripped regardless. Uses [DOMPurify](https://github.com/cure53/DOMPurify) automatically if it's loaded on the page, otherwise a built-in fallback sanitizer with the same allowlist.
|
|
291
|
+
|
|
285
292
|
## π Advanced Features
|
|
286
293
|
|
|
287
294
|
### Smart Grouping
|
|
@@ -301,7 +308,7 @@ Identical toasts (same type, message, and position) are automatically grouped:
|
|
|
301
308
|
### Accessibility
|
|
302
309
|
|
|
303
310
|
- ARIA live regions announce new toasts to screen readers
|
|
304
|
-
- Keyboard navigation support (Tab, Enter, Escape)
|
|
311
|
+
- Keyboard navigation support (Tab, Enter, Escape β Escape dismisses the most recent toast)
|
|
305
312
|
- High contrast badge design
|
|
306
313
|
- Semantic HTML structure
|
|
307
314
|
|
|
@@ -309,10 +316,9 @@ Identical toasts (same type, message, and position) are automatically grouped:
|
|
|
309
316
|
|
|
310
317
|
### Production-Grade System
|
|
311
318
|
|
|
312
|
-
-
|
|
319
|
+
- **Layered fallback**: Rich toast β Basic toast β Emergency alert
|
|
313
320
|
- **Zero-Crash Guarantee**: Comprehensive error handling prevents application crashes
|
|
314
321
|
- **Memory Management**: Automatic cleanup prevents memory leaks
|
|
315
|
-
- **CDN Cache-Busting**: Ensures fresh content delivery
|
|
316
322
|
|
|
317
323
|
### Browser Compatibility
|
|
318
324
|
|
|
@@ -324,10 +330,10 @@ Identical toasts (same type, message, and position) are automatically grouped:
|
|
|
324
330
|
|
|
325
331
|
## π Bundle Information
|
|
326
332
|
|
|
327
|
-
- **Size**:
|
|
333
|
+
- **Size**: see the live bundle size badge above (auto-updates from the published package)
|
|
328
334
|
- **Dependencies**: Zero
|
|
329
|
-
- **Formats**: UMD, ES Modules
|
|
330
|
-
- **TypeScript**:
|
|
335
|
+
- **Formats**: UMD, ES Modules, CommonJS
|
|
336
|
+
- **TypeScript**: Full type definitions included β real autocomplete and type-checking, not just placeholder types
|
|
331
337
|
|
|
332
338
|
## π€ Contributing
|
|
333
339
|
|
|
@@ -336,12 +342,10 @@ Exciting times ahead! Looking for sponsors and eager to explore new collaboratio
|
|
|
336
342
|
### Development Setup
|
|
337
343
|
|
|
338
344
|
```bash
|
|
339
|
-
|
|
340
345
|
git clone https://github.com/sammy-cool/customizable-toast-notification.git
|
|
341
346
|
cd customizable-toast-notification
|
|
342
347
|
npm install
|
|
343
|
-
npm run build
|
|
344
|
-
|
|
348
|
+
npm run zone-build
|
|
345
349
|
```
|
|
346
350
|
|
|
347
351
|
## π License
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Customizable Toast Notifications
|
|
3
|
-
* Build: 2026-08-19
|
|
4
|
-
* Cache-Buster:
|
|
2
|
+
* Customizable Toast Notifications
|
|
3
|
+
* Build: 2026-08-23 19:38:24
|
|
4
|
+
* Cache-Buster: 1787513904109
|
|
5
5
|
* Author: Priyanshu Patel
|
|
6
6
|
* Email: priyanshu.alt191@gmail.com
|
|
7
7
|
* License: Apache-2.0
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
* Supports flexible positioning, theming, icons, animations, and timing options
|
|
13
13
|
* out of the box β with CTA support and zero dependencies.
|
|
14
14
|
*/
|
|
15
|
-
"use strict";async function t(t,e){const n=document.createElement(t);return n.id=function(t){return`${t}-${Date.now().toString(36)}-${Math.floor(1048575*Math.random()).toString(36)}`}(e),n}const e=new class{constructor(t=200){this.maxSize=t,this.map=new Map}get(t){if(!this.map.has(t))return;const e=this.map.get(t);return this.map.delete(t),this.map.set(t,e),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxSize){const t=this.map.keys().next().value;this.map.delete(t)}this.map.set(t,e)}}(200),n={};function o(t,o=1){if(!t)return"snow";const r=`${t}|${o}`,i=e.get(r);if(i)return i;if(n[null==t?void 0:t.toLowerCase()]){const o=n[t.toLowerCase()];return e.set(r,o),o}let a,s,l;try{const e=function(t){const e=null==t?void 0:t.match(/^#([0-9a-f]{3,8})$/i);if(e){let t=e[1];return 3===t.length&&(t=t.split("").map(t=>t+t).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}}const n=null==t?void 0:t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/i);if(n)return{r:Number(n[1]),g:Number(n[2]),b:Number(n[3])};const o=null==t?void 0:t.match(/hsla?\(\s*([\d.]+)(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*[\d.]+)?\)/i);if(o){const t=Number(o[1])/360,e=Number(o[2])/100,n=Number(o[3])/100;if(0===e){const t=Math.round(255*n);return{r:t,g:t,b:t}}const r=(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;return{r:Math.round(255*r(a,i,t+1/3)),g:Math.round(255*r(a,i,t)),b:Math.round(255*r(a,i,t-1/3))}}return null}(function(t){var e;const n=null==t?void 0:t.match(/^var\((--[\w-]+)(?:\s*,\s*(.+))?\)$/i);if(!n)return t;try{if("undefined"!=typeof document&&"function"==typeof getComputedStyle){const t=getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim();if(t)return t}}catch(t){}return(null===(e=n[2])||void 0===e?void 0:e.trim())||t}(t));if(!e)throw new Error("Unknown color");({r:a,g:s,b:l}=e)}catch{a=s=l=128}a=Math.round(a*o+255*(1-o)),s=Math.round(s*o+255*(1-o)),l=Math.round(l*o+255*(1-o));const c=(t,e,n)=>{const o=[t,e,n].map(t=>(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4));return.2126*o[0]+.7152*o[1]+.0722*o[2]},u=(t,e)=>{const n=c(...t),o=c(...e);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)};let[d,m,f]=((t,e,n)=>{t/=255,e/=255,n/=255;const o=Math.max(t,e,n),r=Math.min(t,e,n);let i,a,s=(o+r)/2;if(o===r)i=a=0;else{const l=o-r;switch(a=s>.5?l/(2-o-r):l/(o+r),o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return[360*i,a,s]})(a,s,l);let p=f<.5?Math.min(f+.5,1):Math.max(f-.5,0),[h,y,g]=((t,e,n)=>{let o,r,i;if(t/=360,0===e)o=r=i=n;else{const a=(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;o=a(l,s,t+1/3),r=a(l,s,t),i=a(l,s,t-1/3)}return[Math.round(255*o),Math.round(255*r),Math.round(255*i)]})(d,m,p);if(u([a,s,l],[h,y,g])<4.5){const t=u([a,s,l],[0,0,0]),e=u([a,s,l],[255,255,255]);[h,y,g]=t>=e?[0,0,0]:[255,255,255]}const b=((t,e,n)=>`#${t.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`)(h,y,g);return e.set(r,b),b}Object.entries({aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}).forEach(([t,[e,o,r]])=>{const i=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},a=.2126*i(e)+.7152*i(o)+.0722*i(r),s=(a+.05)/.05,l=1.05/(a+.05);n[t.toLowerCase()]=s>=l?"#000000":"#ffffff"});const r=new Set(["DIV","SPAN","P","BR","STRONG","B","EM","I","U","SMALL","UL","OL","LI","A","IMG","PRE","CODE","MARK"]),i=new Set(["href","src","alt","title","class","target","rel"]);function a(t){if(!t||"string"!=typeof t)return"";let e=t.replace(/<\/?(script|iframe|object|embed|link|meta|style|form|input|button)[^>]*>/gi,"");e=e.replace(/\s(on\w+)\s*=\s*(['"])[\s\S]*?\2/gi,""),e=e.replace(/(href|src)\s*=\s*(['"])\s*javascript:[^'"]*\2/gi,"$1=$2#$2");const n=document.createElement("div");function o(t){if(t.nodeType===Node.TEXT_NODE)return document.createTextNode(t.nodeValue);if(t.nodeType!==Node.ELEMENT_NODE)return null;const e=t.tagName.toUpperCase();if(!r.has(e)){const e=document.createDocumentFragment();return Array.from(t.childNodes).forEach(t=>{const n=o(t);n&&e.appendChild(n)}),e}const n=document.createElement(t.tagName);return Array.from(t.attributes||[]).forEach(e=>{const o=e.name.toLowerCase(),r=e.value;i.has(o)&&("href"!==o&&"src"!==o||!/^\s*javascript:/i.test(r))&&("src"!==o||/^\s*(https?:|data:image\/)/i.test(r))&&("target"===o&&"_blank"===r&&n.setAttribute("rel",(t.getAttribute("rel")||"")+" noopener noreferrer"),n.setAttribute(o,r))}),Array.from(t.childNodes).forEach(t=>{const e=o(t);e&&n.appendChild(e)}),n}n.innerHTML=e;const a=document.createDocumentFragment();Array.from(n.childNodes).forEach(t=>{const e=o(t);e&&a.appendChild(e)});const s=document.createElement("div");return s.appendChild(a),s.innerHTML}function s(t,e={}){if(!t)return"";try{if(!e.forceFallback&&function(){try{if("undefined"!=typeof window&&window.DOMPurify)return!0}catch(t){}return!1}()){const e=window.DOMPurify.sanitize(t,{ALLOWED_TAGS:Array.from(r),ALLOWED_ATTR:Array.from(i),ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|ftp|tel|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i}),n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll('a[target="_blank"]').forEach(t=>{const e=(t.getAttribute("rel")||"").split(/\s+/).filter(Boolean);e.includes("noopener")||e.push("noopener"),e.includes("noreferrer")||e.push("noreferrer"),t.setAttribute("rel",e.join(" "))}),n.innerHTML}}catch(t){}return a(t)}async function l(t,e,n){const o=await async function(t){if("number"==typeof t&&t>0)return t;if("string"==typeof t){if(t.endsWith("s")&&!t.endsWith("ms")){const e=1e3*parseFloat(t);return e>0?e:500}const e=parseFloat(t);return e>0?e:500}return 500}(null==e?void 0:e.animationDuration);t.className=`toast toast-${(null==e?void 0:e.type)??"info"}`,Object.assign(t.style,{background:null==e?void 0:e.backgroundColor,padding:"12px 16px",marginBottom:"10px",borderRadius:null==e?void 0:e.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:null==e?void 0:e.maxWidth,opacity:"0",position:"relative",cursor:"default",boxSizing:"border-box",userSelect:"text",transition:`opacity ${null==e?void 0:e.animationDuration} ${null==e?void 0:e.animationEasing}, transform ${null==e?void 0:e.animationDuration} ${null==e?void 0:e.animationEasing}`,transform:"translateY(20px)",zIndex:"9999"}),t.setAttribute("role","alert"),t.setAttribute("aria-live","polite"),t.tabIndex=0,t._animationDuration=o;const r=document.createElement("span");null!=e&&e.wrapText?Object.assign(r.style,{display:"block",whiteSpace:"normal"}):Object.assign(r.style,{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",whiteSpace:"nowrap"}),Object.assign(r.style,{flex:"1",padding:null==e?void 0:e.fontPadding,fontFamily:null==e?void 0:e.fontFamily,fontSize:null==e?void 0:e.fontSize,fontWeight:null==e?void 0:e.fontWeight,lineHeight:null==e?void 0:e.fontLineHeight,color:null==e?void 0:e.textColor,userSelect:"text",wordBreak:"break-word",overflow:"hidden",textOverflow:"ellipsis"});const i=!!e.allowHtml,a=e.message??"";if(e.loader||e.showLoader){const t=function(t={}){const e=t.size||14,n=t.color||"currentColor",o=t.text||"",r=document.createElement("span");r.className="toast-loader",r.style.display="inline-flex",r.style.alignItems="center",r.style.gap="8px";const i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"svg");a.setAttribute("width",String(e)),a.setAttribute("height",String(e)),a.setAttribute("viewBox","0 0 50 50"),a.setAttribute("aria-hidden","true");const s=document.createElementNS(i,"circle");if(s.setAttribute("cx","25"),s.setAttribute("cy","25"),s.setAttribute("r","20"),s.setAttribute("fill","none"),s.setAttribute("stroke",n),s.setAttribute("stroke-width","4"),s.setAttribute("stroke-linecap","round"),s.style.opacity="0.85",s.style.strokeDasharray="90",s.style.strokeDashoffset="60",s.style.transformOrigin="center",s.style.animation="toast-spinner 1s linear infinite",a.appendChild(s),r.appendChild(a),o){const t=document.createElement("span");t.style.fontSize="13px",t.textContent=o,r.appendChild(t)}if(!document.getElementById("toast-spinner-styles")){const t=document.createElement("style");t.id="toast-spinner-styles",t.innerHTML="@keyframes toast-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }",document.head.appendChild(t)}return r}(e.loader||{});r.appendChild(t);const n=document.createElement("span");n.style.display="inline-block",n.style.width="8px",r.appendChild(n)}if(i&&"string"==typeof a&&a.trim().length>0)try{const t=s(a),e=document.createElement("div");for(e.innerHTML=t;e.firstChild;)r.appendChild(e.firstChild)}catch(t){console.warn("HTML message sanitization failed, falling back to text:",t),r.textContent=a}else r.textContent=String(a);r.setAttribute("aria-label","Toast Notification Center"),r.setAttribute("title","string"==typeof a?a.replace(/<[^>]+>/g,""):String(a)),t.appendChild(r),null!=e&&e.cta&&0!==Object.keys(e.cta).length&&function(t,e,n){const o=null==e?void 0:e.cta;if(!o)return;const r={...o};r.label||(r.label="CTA Label Missing!");const i=!!r.href&&"link"===r.variant,a=document.createElement(i?"a":"button");i?(a.href=r.href,r.target&&(a.target=r.target),a.rel=r.rel||("_blank"===r.target?"noopener noreferrer":"")):a.type="button",a.setAttribute("aria-label",r.ariaLabel||r.label),Object.assign(a.style,{marginLeft:"10px",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",border:"1px solid rgba(255,255,255,0.35)",color:e.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),a.textContent=r.label;const s=async e=>{try{if("function"==typeof r.onClick){const t=r.onClick(e);null!=t&&t.then&&await t}}finally{!1!==r.autoClose&&n(t)}};a.addEventListener("click",s),a._cleanup=()=>a.removeEventListener("click",s),t.appendChild(a)}(t,e,n),null!=e&&e.showCloseButton&&function(t,e,n){const o=document.createElement("button");o.setAttribute("aria-label","Close notification"),o.setAttribute("title","Close"),o.textContent="Γ",Object.assign(o.style,{background:"none",border:"none",color:e.textColor||"white",fontSize:"18px",marginLeft:"10px",cursor:"pointer"});const r=()=>n(t);o.addEventListener("click",r),t._cleanupCloseButton=()=>{o.removeEventListener("click",r)},t.appendChild(o)}(t,e,n),null!=e&&e.showProgressBar&&function(t,e){const n=document.createElement("div"),o=e.borderRadius||0,r=parseInt(o,10),i=r?"12px":"0",a=r?12:0,s=Math.max(r-10,a),l=r?`calc(100% - ${s}px)`:"100%";Object.assign(n.style,{position:"absolute",left:`${i}`,height:e.progressHeight||"4px",background:e.progressColor||"rgba(255, 255, 255, 0.3)",width:`${l}`,transition:`width ${e.duration||1800}ms linear`,["top"===e.progressPosition?"top":"bottom"]:"0",borderRadius:e.borderRadius||"4px"}),t.appendChild(n),"function"==typeof n.animate?t._progressAnimation=n.animate([{width:l},{width:"0%"}],{duration:Number(e.duration)||1800,easing:"linear",fill:"forwards",delay:50}):(n.style.transition=`width ${e.duration||1800}ms linear`,setTimeout(()=>{n.offsetWidth,n.style.width="0%"},50))}(t,e),function(t){setTimeout(()=>{requestAnimationFrame(()=>{t.style.opacity="1",t.style.transform="translateY(0)"})},50)}(t)}async function c(t,e){try{const n=document.createElement("div");Object.assign(n.style,{background:"#333",color:"white",padding:"10px 15px",position:"fixed",top:"20px",right:"20px",zIndex:"99999",borderRadius:"3px",maxWidth:"250px",wordWrap:"break-word",boxShadow:"0 2px 10px rgba(0,0,0,0.3)",cursor:"pointer"});const o=document.createElement("div"),r=document.createElement("span");r.style.display="inline-block",t.allowHtml?r.innerHTML=s(String(t.message||"Emergency Toast Showing!")):r.textContent=String(t.message||"Emergency Toast Creation Showing!"),o.appendChild(r);const i=document.createElement("span");for(i.style.cssText="float: right; margin-left: 10px; font-weight: bold;",i.textContent="Γ",o.appendChild(i);n.firstChild;)n.removeChild(n.firstChild);return n.appendChild(o),i.onclick=()=>{n.remove(),e(n)},document.body.appendChild(n),setTimeout(()=>{n.remove(),e(n)},null==t?void 0:t.duration),n}catch(n){return console.error("Emergency toast creation failed:",n),setTimeout(()=>{alert((null==t?void 0:t.message)||"Emergency Toast Creation Showing!"),e(null)},100),null}}const u=new Map,d=new Map;function m(t){return`toast-container-${function(t){return String(t).toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-")}(t)}`}async function f(t,e){const n=m(t.position);if(d.has(n))return d.get(n);const o=(async()=>{const o=u.get(n);if(null!=o&&o.isConnected)return o;let r=document.getElementById(n);r&&!r.isConnected&&document.body.appendChild(r),r?(r.style.position=r.style.position||"fixed",r.style.zIndex=r.style.zIndex||"9999","function"==typeof e&&await e(r,t)):(r=document.createElement("div"),r.id=n,r.setAttribute("role","status"),r.setAttribute("aria-atomic","true"),r.style.position="fixed",r.style.zIndex="9999",r.style.inset="auto 10px 10px auto",r.style.display="flex",r.style.justifyContent="space-between",r.style.alignItems="center",r.style.flexDirection="column",r.style.overflow="hidden","function"==typeof e&&await e(r,t),document.body.appendChild(r));const i=document.querySelectorAll(`#${n}`);if(i.length>1)for(let t=1;t<i.length;t++)try{i[t].remove()}catch{}return u.set(n,r),r})();d.set(n,o);try{return await o}finally{d.delete(m(t.position))}}async function p(t,e){if(!t||!e.position)throw new Error("Invalid container or position!");!function(t){t.style.top="auto",t.style.bottom="auto",t.style.left="auto",t.style.right="auto",t.style.transform="none"}(t);const n=function(t){const e=t.toLowerCase().trim();return{hasTop:e.includes("top"),hasBottom:e.includes("bottom")||e.includes("below"),hasLeft:e.includes("left"),hasRight:e.includes("right"),hasCenter:e.includes("center"),hasFullWidth:e.includes("top-full-width")||e.includes("bottom-full-width")||e.includes("fullwidth")}}(e.position);(function(t,e,n){if(!n.hasFullWidth)return!1;if(n.hasTop)return e.maxWidth="100vw",t.style.top="10px",t.style.left="10px",t.style.right="10px",!0;if(n.hasBottom)return e.maxWidth="100vw",t.style.bottom="10px",t.style.left="10px",t.style.right="10px",!0;return!1})(t,e,n)||function(t,e){if(!e.hasCenter)return!1;if(e.hasTop&&!e.hasLeft&&!e.hasRight)return t.style.top="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0;if(e.hasBottom&&!e.hasLeft&&!e.hasRight)return t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0;if(e.hasLeft&&!e.hasTop&&!e.hasBottom)return t.style.left="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0;if(e.hasRight&&!e.hasTop&&!e.hasBottom)return t.style.right="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0;if(!(e.hasLeft||e.hasRight||e.hasTop||e.hasBottom))return t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",!0;return!1}(t,n)||function(t,e){e.hasBottom?t.style.bottom="10px":e.hasTop&&(t.style.top="10px");e.hasRight?t.style.right="10px":e.hasLeft?t.style.left="10px":(e.hasBottom||e.hasTop||(t.style.bottom="10px"),t.style.left="50%",t.style.transform="translateX(-50%)")}(t,n)}class h{constructor(t,e){this.callback=t,this.delay=e,this.remaining=e,this.startTime=null,this.timeoutId=null,this.isPaused=!1,this.isCompleted=!1}start(){return this.isCompleted||this.timeoutId||(this.startTime=Date.now(),this.timeoutId=setTimeout(()=>{this.isCompleted=!0,this.timeoutId=null,this.callback()},this.remaining)),this}pause(){return this.isPaused||!this.timeoutId||this.isCompleted||(clearTimeout(this.timeoutId),this.timeoutId=null,this.remaining-=Date.now()-this.startTime,this.remaining=Math.max(0,this.remaining),this.isPaused=!0),this}resume(){return!this.isPaused||this.isCompleted||(this.isPaused=!1,this.start()),this}clear(){return this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isCompleted=!0,this}getRemainingTime(){return this.isCompleted?0:this.isPaused?this.remaining:this.timeoutId?Math.max(0,this.remaining-(Date.now()-this.startTime)):this.delay}}const y=new Map,g=new Map,b=[];let w=0;async function v(t={}){try{const e=function(t={}){return`${String(t.type).trim().toLowerCase()}|${function(t){let e=5381;for(let n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n);return e>>>0}(String(t.message||"")).toString(16)}|${String(t.position).trim().toLowerCase()}`}(t);if(y.has(e)){const n=y.get(e);if(!n)throw new Error(`Active toast with key ${e} not found`);return n.count++,n.timer.clear(),n.timer=E(n.toast,t),await S(n),void await L(n)}if(g.has(e)){const t=g.get(e);if(!t)throw new Error(`Pending toast with key ${e} not found`);return void t.count++}const n={options:t,count:1,rafId:0};g.set(e,n),n.rafId=requestAnimationFrame(async()=>{const t=g.get(e);if(t){if(g.delete(e),w>=3)return b.push({options:t.options,key:e,count:t.count}),void await A();try{await x(t.options,e,t.count)}catch(t){console.error("showToast failed:",t)}}})}catch(t){console.error("showToast failed:",t)}}async function x(e,n,o){try{if(!e||"object"!=typeof e)throw new TypeError("options must be an object");w++;const r=await f(e,p);if(!r)throw new Error("Failed to create toast container");const i=await async function(e,n){if(!document.querySelector('[id^="toast-container-"]'))return null;let o;try{return o=await t("div","toast"),await l(o,e,n),o}catch(t){return console.warn("toast creation failed with error showing fallback one: ",t),o=await c(e,n),o}}(e,T);if(!i)throw new Error("Toast element creation failed");const a=document.createElement("div");Object.assign(a.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"});const s=document.createElement("div");Object.assign(s.style,{position:"relative",overflow:"hidden",zIndex:"1"}),s.appendChild(i),a.appendChild(s),r.id.includes("toast-container-")&&r.appendChild(a);const u=!1!==e.pauseOnHover&&(!0===e.pauseOnHover||!!e.cta),d={outer:a,toast:i,count:Math.max(1,Math.floor(o??0)),timeout:null,pauseOnHover:u};y.set(n,d),i._key=n,d.count>1&&await L(d),d.timer=E(i,e),await S(d)}catch(t){console.error("Something went wrong: ",t),w=Math.max(0,w-1);(document.querySelector('[id^="toast-container-"]')||document.body).appendChild(await c(e,T))}}const C=async function(){try{if(0===y.size)return;let t=null;if(document.querySelectorAll('[id^="toast-container-"]').forEach(e=>{const n=Array.from(e.children||[]);if(0===n.length)return;const o=n.at(-1);o&&(t=o.querySelector('[id^="toast-"]')||o)}),!t){const e=Array.from(y.entries());if(e.length>0){const[,n]=e.at(-1);t=n.toast||n.outer&&n.outer.querySelector('[id^="toast-"]')}}if(!t)return;const e=t._key?t:t.querySelector('[id^="toast-"]')||t;await T(e)}catch(t){console.error("dismissMostRecent failed:",t)}},k=async function(){try{const t=Array.from(y.values()).map(t=>t.toast).filter(Boolean);b.length=0,g.clear();for(const e of t)try{await T(e)}catch(t){console.warn("closeAllToasts: failed to close one toast:",t)}}catch(t){console.error("closeAllToasts failed:",t)}};function E(t,e){const n=Number(e.duration??1800)+5,o=new h(async()=>await T(t),n);return o.start(),o}async function S(t){if(!t.pauseOnHover||!t.outer||!t.timer)return;const{outer:e,timer:n,toast:o}=t,r=()=>{var t;n.pause(),null==o||null===(t=o._progressAnimation)||void 0===t||t.pause()},i=()=>{var t;n.resume(),null==o||null===(t=o._progressAnimation)||void 0===t||t.play()},a=t=>{var e;t.target.matches("[tabindex], div, span, button, a")&&(n.pause(),null==o||null===(e=o._progressAnimation)||void 0===e||e.pause())},s=t=>{var r;e.contains(t.relatedTarget)||(n.resume(),null==o||null===(r=o._progressAnimation)||void 0===r||r.play())};e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",i),e.addEventListener("focusin",a),e.addEventListener("focusout",s),e._pauseCleanup=()=>{e.removeEventListener("mouseenter",r),e.removeEventListener("mouseleave",i),e.removeEventListener("focusin",a),e.removeEventListener("focusout",s)}}async function T(t){try{var e,n,o;if(null==t||!t._key)return;const r=y.get(t._key);if(!r)return;null===(e=r.timer)||void 0===e||e.clear(),null===(n=r.outer)||void 0===n||null===(o=n._pauseCleanup)||void 0===o||o.call(n),y.delete(t._key),w=Math.max(0,w-1);const i=r.outer.querySelector(".toast-count-badge");i&&i.remove(),await async function(t){return t?new Promise(e=>{let n=!1;const o=()=>{n||(n=!0,async function(t){if(!t)return!0;try{var e;if(null!=t&&null!==(e=t.parentNode)&&void 0!==e&&e.id.includes("toast-container-"))return t.parentNode.removeChild(t),!0}catch{}try{if(t.remove)return t.remove(),!0}catch{}try{return Object.assign(t.style,{display:"none",opacity:"0",pointerEvents:"none",position:"absolute",left:"-9999px"}),!0}catch{}}(t),e())},r=t.firstElementChild||t;if(!r)return e();const i=t=>{try{if(t.target!==r)return;r.removeEventListener("transitionend",i,!0),o()}catch(t){console.error("removeWithTransition error:",t)}};try{r.addEventListener("transitionend",i,!0)}catch(t){console.error("removeWithTransition error:",t)}setTimeout(()=>{try{r.removeEventListener("transitionend",i,!0),o()}catch(t){console.error("removeWithTransition error:",t)}},700)}):Promise.resolve()}(r.outer),await A()}catch(t){console.error("Closing Toast failed!: ",t)}}async function A(){for(;w<3&&b.length;){const t=b.shift();if(y.has(t.key)){const e=y.get(t.key);e.count+=t.count,await L(e);continue}x(t.options,t.key,t.count)}}async function L({outer:t,count:e}){if(!(t&&t instanceof HTMLElement))throw new Error("updateBadge: outer must be a valid HTMLElement");if(e<2){const e=t.querySelector(".toast-count-badge");return void(e&&e.remove())}let n=t.querySelector(".toast-count-badge");n||(n=document.createElement("span"),n.className="toast-count-badge",n.setAttribute("aria-label",`${e} identical notifications`),Object.assign(n.style,{position:"absolute",top:"6px",right:"6px",backgroundColor:"#f44336",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff",boxShadow:"0 2px 6px rgba(0,0,0,0.3)",zIndex:"2",pointerEvents:"none",transition:"transform 150ms ease"}),t.appendChild(n)),n.textContent=e>99?"99+":String(e);try{n.style.transform="scale(1.2)",setTimeout(()=>n.style.transform="scale(1)",150)}catch(t){console.error("updateBadge animation error:",t)}}let M={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},I={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"};const O=[];let D=!1;async function $(t={}){try{const e=await async function(t){var e;const n=null==t||null===(e=t.position)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim(),r=null!=n&&n.includes("top-full-width")||null!=n&&n.includes("bottom-full-width")?"100vw":"400px",i={allowHtml:!1,sanitizeHtml:!0,pauseOnHover:void 0,duration:2500,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",animationEasing:"ease",showProgressBar:!0,progressColor:void 0,progressHeight:"4px",progressPosition:"bottom",fontPosition:"relative",fontPadding:void 0,fontBorderRadius:void 0,fontBackgroundColor:void 0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontWeight:"400",fontLineHeight:"1.4",fontDirection:"auto",wrapText:"normal",maxWidth:r,..."object"!=typeof t||Array.isArray(t)?{}:t};i.message=(null==t?void 0:t.message)??i.message;try{var a;if(!i.backgroundColor)i.backgroundColor=(null===(a=M)||void 0===a?void 0:a[i.type])??(window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111")}catch(t){console.warn("Background color resolution failed:",t)}try{var s;i.message=i.message||(null===(s=I)||void 0===s?void 0:s[i.type])||"No Message Provided!"}catch(t){console.warn("Default message resolution failed:",t)}try{!i.textColor&&i.backgroundColor&&(i.textColor=o(i.backgroundColor))}catch(t){console.warn("Text color resolution failed:",t)}try{!i.progressColor&&i.backgroundColor&&(i.progressColor=i.textColor||o(i.backgroundColor))}catch(t){console.warn("Progress bar color resolution failed:",t)}"string"!=typeof i.message&&(i.message="No Message Provided!");return i}(t);await async function(t){try{return await f(t,p)}catch(t){return console.error("Failed to create toast container:",t),document.body}}(e),await v(e)}catch(e){console.error("CreateToast failed:",e);const n="string"==typeof(null==t?void 0:t.message)&&null!==(null==t?void 0:t.message)?`${t.message.substring(0,200)} toast creation failed!`:"Toast creation failed!";alert(n)}}function N(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(M={...M,...t})}catch(t){console.error("setDefaultColors failed:",t)}}function j(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(I={...I,...t})}catch(t){console.error("setDefaultMessages failed:",t)}}let z=!1,B=null;const W=async function(t={}){"undefined"!=typeof window&&"undefined"!=typeof document?(await async function(){if(D)return;"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(D=!0,O.forEach(t=>setTimeout(()=>$(t),200)),O.length=0):document.addEventListener("DOMContentLoaded",()=>{D=!0,O.forEach(t=>setTimeout(()=>$(t),200)),O.length=0},{once:!0}))}(),D?await $(t):O.push(t)):console.warn("ToastNotification: running in non-browser environment, no DOM available.")};async function P(t={}){return async function(t){if(z&&B)try{await B}catch(t){console.warn("Previous close operation failed (continuing anyway):",t)}return t()}(()=>W(t))}const H=async()=>{z=!0,B=(async()=>{try{await C()}finally{z=!1,B=null}})(),await B},R=async()=>{z=!0,B=(async()=>{try{await k()}finally{z=!1,B=null}})(),await B};if("undefined"!=typeof window&&"undefined"!=typeof document){const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||(async()=>{z=!0,B=(async()=>{try{await C()}finally{z=!1,B=null}})(),await B})()};window.addEventListener("keydown",t,{passive:!0})}try{"undefined"!=typeof window&&(window.customizableToast={createToast:P,setDefaultColors:N,setDefaultMessages:j,noop:R,dismiss:H})}catch(t){console.error("Global assignment failed:",t)}exports.createToast=P,exports.dismiss=H,exports.dismissToast=H,exports.noop=R,exports.noopAll=R,exports.setDefaultColors=N,exports.setDefaultMessages=j;
|
|
15
|
+
"use strict";async function t(t,e){const n=document.createElement(t);return n.id=function(t){return`${t}-${Date.now().toString(36)}-${Math.floor(1048575*Math.random()).toString(36)}`}(e),n}const e=new class{constructor(t=200){this.maxSize=t,this.map=new Map}get(t){if(!this.map.has(t))return;const e=this.map.get(t);return this.map.delete(t),this.map.set(t,e),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxSize){const t=this.map.keys().next().value;this.map.delete(t)}this.map.set(t,e)}}(200),n={};function o(t,o=1){if(!t)return"snow";const r=`${t}|${o}`,i=e.get(r);if(i)return i;if(n[null==t?void 0:t.toLowerCase()]){const o=n[t.toLowerCase()];return e.set(r,o),o}let a,s,l;try{const e=function(t){const e=null==t?void 0:t.match(/^#([0-9a-f]{3,8})$/i);if(e){let t=e[1];return 3===t.length&&(t=t.split("").map(t=>t+t).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}}const n=null==t?void 0:t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/i);if(n)return{r:Number(n[1]),g:Number(n[2]),b:Number(n[3])};const o=null==t?void 0:t.match(/hsla?\(\s*([\d.]+)(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*[\d.]+)?\)/i);if(o){const t=Number(o[1])/360,e=Number(o[2])/100,n=Number(o[3])/100;if(0===e){const t=Math.round(255*n);return{r:t,g:t,b:t}}const r=(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;return{r:Math.round(255*r(a,i,t+1/3)),g:Math.round(255*r(a,i,t)),b:Math.round(255*r(a,i,t-1/3))}}return null}(function(t){var e;const n=null==t?void 0:t.match(/^var\((--[\w-]+)(?:\s*,\s*(.+))?\)$/i);if(!n)return t;try{if("undefined"!=typeof document&&"function"==typeof getComputedStyle){const t=getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim();if(t)return t}}catch(t){}return(null===(e=n[2])||void 0===e?void 0:e.trim())||t}(t));if(!e)throw new Error("Unknown color");({r:a,g:s,b:l}=e)}catch{a=s=l=128}a=Math.round(a*o+255*(1-o)),s=Math.round(s*o+255*(1-o)),l=Math.round(l*o+255*(1-o));const c=(t,e,n)=>{const o=[t,e,n].map(t=>(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4));return.2126*o[0]+.7152*o[1]+.0722*o[2]},u=(t,e)=>{const n=c(...t),o=c(...e);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)};let[d,m,f]=((t,e,n)=>{t/=255,e/=255,n/=255;const o=Math.max(t,e,n),r=Math.min(t,e,n);let i,a,s=(o+r)/2;if(o===r)i=a=0;else{const l=o-r;switch(a=s>.5?l/(2-o-r):l/(o+r),o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return[360*i,a,s]})(a,s,l);let p=f<.5?Math.min(f+.5,1):Math.max(f-.5,0),[h,y,g]=((t,e,n)=>{let o,r,i;if(t/=360,0===e)o=r=i=n;else{const a=(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;o=a(l,s,t+1/3),r=a(l,s,t),i=a(l,s,t-1/3)}return[Math.round(255*o),Math.round(255*r),Math.round(255*i)]})(d,m,p);if(u([a,s,l],[h,y,g])<4.5){const t=u([a,s,l],[0,0,0]),e=u([a,s,l],[255,255,255]);[h,y,g]=t>=e?[0,0,0]:[255,255,255]}const b=((t,e,n)=>`#${t.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`)(h,y,g);return e.set(r,b),b}Object.entries({aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}).forEach(([t,[e,o,r]])=>{const i=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},a=.2126*i(e)+.7152*i(o)+.0722*i(r),s=(a+.05)/.05,l=1.05/(a+.05);n[t.toLowerCase()]=s>=l?"#000000":"#ffffff"});const r=new Set(["DIV","SPAN","P","BR","STRONG","B","EM","I","U","SMALL","UL","OL","LI","A","IMG","PRE","CODE","MARK"]),i=new Set(["href","src","alt","title","class","target","rel"]);function a(t){if(!t||"string"!=typeof t)return"";let e=t.replace(/<\/?(script|iframe|object|embed|link|meta|style|form|input|button)[^>]*>/gi,"");e=e.replace(/\s(on\w+)\s*=\s*(['"])[\s\S]*?\2/gi,""),e=e.replace(/(href|src)\s*=\s*(['"])\s*javascript:[^'"]*\2/gi,"$1=$2#$2");const n=document.createElement("div");function o(t){if(t.nodeType===Node.TEXT_NODE)return document.createTextNode(t.nodeValue);if(t.nodeType!==Node.ELEMENT_NODE)return null;const e=t.tagName.toUpperCase();if(!r.has(e)){const e=document.createDocumentFragment();return Array.from(t.childNodes).forEach(t=>{const n=o(t);n&&e.appendChild(n)}),e}const n=document.createElement(t.tagName);return Array.from(t.attributes||[]).forEach(e=>{const o=e.name.toLowerCase(),r=e.value;i.has(o)&&("href"!==o&&"src"!==o||!/^\s*javascript:/i.test(r))&&("src"!==o||/^\s*(https?:|data:image\/)/i.test(r))&&("target"===o&&"_blank"===r&&n.setAttribute("rel",(t.getAttribute("rel")||"")+" noopener noreferrer"),n.setAttribute(o,r))}),Array.from(t.childNodes).forEach(t=>{const e=o(t);e&&n.appendChild(e)}),n}n.innerHTML=e;const a=document.createDocumentFragment();Array.from(n.childNodes).forEach(t=>{const e=o(t);e&&a.appendChild(e)});const s=document.createElement("div");return s.appendChild(a),s.innerHTML}function s(t,e={}){if(!t)return"";try{if(!e.forceFallback&&function(){try{if("undefined"!=typeof window&&window.DOMPurify)return!0}catch(t){}return!1}()){const e=window.DOMPurify.sanitize(t,{ALLOWED_TAGS:Array.from(r),ALLOWED_ATTR:Array.from(i),ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|ftp|tel|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i}),n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll('a[target="_blank"]').forEach(t=>{const e=(t.getAttribute("rel")||"").split(/\s+/).filter(Boolean);e.includes("noopener")||e.push("noopener"),e.includes("noreferrer")||e.push("noreferrer"),t.setAttribute("rel",e.join(" "))}),n.innerHTML}}catch(t){}return a(t)}async function l(t,e,n){const o=await async function(t){if("number"==typeof t&&t>0)return t;if("string"==typeof t){if(t.endsWith("s")&&!t.endsWith("ms")){const e=1e3*parseFloat(t);return e>0?e:500}const e=parseFloat(t);return e>0?e:500}return 500}(null==e?void 0:e.animationDuration);t.className=`toast toast-${(null==e?void 0:e.type)??"info"}`,Object.assign(t.style,{background:null==e?void 0:e.backgroundColor,padding:"12px 16px",marginBottom:"10px",borderRadius:null==e?void 0:e.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:null==e?void 0:e.maxWidth,opacity:"0",position:"relative",cursor:"default",boxSizing:"border-box",userSelect:"text",transition:`opacity ${null==e?void 0:e.animationDuration} ${null==e?void 0:e.animationEasing}, transform ${null==e?void 0:e.animationDuration} ${null==e?void 0:e.animationEasing}`,transform:"translateY(20px)",zIndex:"9999"}),t.setAttribute("role","alert"),t.setAttribute("aria-live","polite"),t.tabIndex=0,t._animationDuration=o;const r=document.createElement("span");null!=e&&e.wrapText?Object.assign(r.style,{display:"block",whiteSpace:"normal"}):Object.assign(r.style,{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",whiteSpace:"nowrap"}),Object.assign(r.style,{flex:"1",padding:null==e?void 0:e.fontPadding,fontFamily:null==e?void 0:e.fontFamily,fontSize:null==e?void 0:e.fontSize,fontWeight:null==e?void 0:e.fontWeight,lineHeight:null==e?void 0:e.fontLineHeight,color:null==e?void 0:e.textColor,userSelect:"text",wordBreak:"break-word",overflow:"hidden",textOverflow:"ellipsis"});const i=!!e.allowHtml,a=e.message??"";if(e.loader||e.showLoader){const t=function(t={}){const e=t.size||14,n=t.color||"currentColor",o=t.text||"",r=document.createElement("span");r.className="toast-loader",r.style.display="inline-flex",r.style.alignItems="center",r.style.gap="8px";const i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"svg");a.setAttribute("width",String(e)),a.setAttribute("height",String(e)),a.setAttribute("viewBox","0 0 50 50"),a.setAttribute("aria-hidden","true");const s=document.createElementNS(i,"circle");if(s.setAttribute("cx","25"),s.setAttribute("cy","25"),s.setAttribute("r","20"),s.setAttribute("fill","none"),s.setAttribute("stroke",n),s.setAttribute("stroke-width","4"),s.setAttribute("stroke-linecap","round"),s.style.opacity="0.85",s.style.strokeDasharray="90",s.style.strokeDashoffset="60",s.style.transformOrigin="center",s.style.animation="toast-spinner 1s linear infinite",a.appendChild(s),r.appendChild(a),o){const t=document.createElement("span");t.style.fontSize="13px",t.textContent=o,r.appendChild(t)}if(!document.getElementById("toast-spinner-styles")){const t=document.createElement("style");t.id="toast-spinner-styles",t.innerHTML="@keyframes toast-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }",document.head.appendChild(t)}return r}(e.loader||{});r.appendChild(t);const n=document.createElement("span");n.style.display="inline-block",n.style.width="8px",r.appendChild(n)}if(i&&"string"==typeof a&&a.trim().length>0)try{const t=s(a),e=document.createElement("div");for(e.innerHTML=t;e.firstChild;)r.appendChild(e.firstChild)}catch(t){console.warn("HTML message sanitization failed, falling back to text:",t),r.textContent=a}else r.textContent=String(a);r.setAttribute("aria-label","Toast Notification Center"),r.setAttribute("title","string"==typeof a?a.replace(/<[^>]+>/g,""):String(a)),t.appendChild(r),null!=e&&e.cta&&0!==Object.keys(e.cta).length&&function(t,e,n){const o=null==e?void 0:e.cta;if(!o)return;const r={...o};r.label||(r.label="CTA Label Missing!");const i=!!r.href&&"link"===r.variant,a=document.createElement(i?"a":"button");i?(a.href=r.href,r.target&&(a.target=r.target),a.rel=r.rel||("_blank"===r.target?"noopener noreferrer":"")):a.type="button",a.setAttribute("aria-label",r.ariaLabel||r.label),Object.assign(a.style,{marginLeft:"10px",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",border:"1px solid rgba(255,255,255,0.35)",color:e.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),a.textContent=r.label;const s=async e=>{try{if("function"==typeof r.onClick){const t=r.onClick(e);null!=t&&t.then&&await t}}finally{!1!==r.autoClose&&n(t)}};a.addEventListener("click",s),a._cleanup=()=>a.removeEventListener("click",s),t.appendChild(a)}(t,e,n),null!=e&&e.showCloseButton&&function(t,e,n){const o=document.createElement("button");o.setAttribute("aria-label","Close notification"),o.setAttribute("title","Close"),o.textContent="Γ",Object.assign(o.style,{background:"none",border:"none",color:e.textColor||"white",fontSize:"18px",marginLeft:"10px",cursor:"pointer"});const r=()=>n(t);o.addEventListener("click",r),t._cleanupCloseButton=()=>{o.removeEventListener("click",r)},t.appendChild(o)}(t,e,n),null!=e&&e.showProgressBar&&function(t,e){const n=document.createElement("div"),o=e.borderRadius||0,r=parseInt(o,10),i=r?"12px":"0",a=r?12:0,s=Math.max(r-10,a),l=r?`calc(100% - ${s}px)`:"100%";Object.assign(n.style,{position:"absolute",left:`${i}`,height:e.progressHeight||"4px",background:e.progressColor||"rgba(255, 255, 255, 0.3)",width:`${l}`,transition:`width ${e.duration||1800}ms linear`,["top"===e.progressPosition?"top":"bottom"]:"0",borderRadius:e.borderRadius||"4px"}),t.appendChild(n),"function"==typeof n.animate?t._progressAnimation=n.animate([{width:l},{width:"0%"}],{duration:Number(e.duration)||1800,easing:"linear",fill:"forwards",delay:50}):(n.style.transition=`width ${e.duration||1800}ms linear`,setTimeout(()=>{n.offsetWidth,n.style.width="0%"},50))}(t,e),function(t){setTimeout(()=>{requestAnimationFrame(()=>{t.style.opacity="1",t.style.transform="translateY(0)"})},50)}(t)}async function c(t,e){try{const n=document.createElement("div");Object.assign(n.style,{background:"#333",color:"white",padding:"10px 15px",position:"fixed",top:"20px",right:"20px",zIndex:"99999",borderRadius:"3px",maxWidth:"250px",wordWrap:"break-word",boxShadow:"0 2px 10px rgba(0,0,0,0.3)",cursor:"pointer"});const o=document.createElement("div"),r=document.createElement("span");r.style.display="inline-block",t.allowHtml?r.innerHTML=s(String(t.message||"Emergency Toast Showing!")):r.textContent=String(t.message||"Emergency Toast Creation Showing!"),o.appendChild(r);const i=document.createElement("span");for(i.style.cssText="float: right; margin-left: 10px; font-weight: bold;",i.textContent="Γ",o.appendChild(i);n.firstChild;)n.removeChild(n.firstChild);return n.appendChild(o),i.onclick=()=>{n.remove(),e(n)},document.body.appendChild(n),setTimeout(()=>{n.remove(),e(n)},null==t?void 0:t.duration),n}catch(n){return console.error("Emergency toast creation failed:",n),setTimeout(()=>{alert((null==t?void 0:t.message)||"Emergency Toast Creation Showing!"),e(null)},100),null}}const u=new Map,d=new Map;function m(t){return`toast-container-${function(t){return String(t).toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-")}(t)}`}async function f(t,e){const n=m(t.position);if(d.has(n))return d.get(n);const o=(async()=>{const o=u.get(n);if(null!=o&&o.isConnected)return o;let r=document.getElementById(n);r&&!r.isConnected&&document.body.appendChild(r),r?(r.style.position=r.style.position||"fixed",r.style.zIndex=r.style.zIndex||"9999","function"==typeof e&&await e(r,t)):(r=document.createElement("div"),r.id=n,r.setAttribute("role","status"),r.setAttribute("aria-atomic","true"),r.style.position="fixed",r.style.zIndex="9999",r.style.inset="auto 10px 10px auto",r.style.display="flex",r.style.justifyContent="space-between",r.style.alignItems="center",r.style.flexDirection="column",r.style.overflow="hidden","function"==typeof e&&await e(r,t),document.body.appendChild(r));const i=document.querySelectorAll(`#${n}`);if(i.length>1)for(let t=1;t<i.length;t++)try{i[t].remove()}catch{}return u.set(n,r),r})();d.set(n,o);try{return await o}finally{d.delete(m(t.position))}}async function p(t,e){if(!t||!e.position)throw new Error("Invalid container or position!");!function(t){t.style.top="auto",t.style.bottom="auto",t.style.left="auto",t.style.right="auto",t.style.transform="none"}(t);const n=function(t){const e=t.toLowerCase().trim();return{hasTop:e.includes("top"),hasBottom:e.includes("bottom")||e.includes("below"),hasLeft:e.includes("left"),hasRight:e.includes("right"),hasCenter:e.includes("center"),hasFullWidth:e.includes("top-full-width")||e.includes("bottom-full-width")||e.includes("fullwidth")}}(e.position);(function(t,e,n){if(!n.hasFullWidth)return!1;if(n.hasTop)return e.maxWidth="100vw",t.style.top="10px",t.style.left="10px",t.style.right="10px",!0;if(n.hasBottom)return e.maxWidth="100vw",t.style.bottom="10px",t.style.left="10px",t.style.right="10px",!0;return!1})(t,e,n)||function(t,e){if(!e.hasCenter)return!1;if(e.hasTop&&!e.hasLeft&&!e.hasRight)return t.style.top="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0;if(e.hasBottom&&!e.hasLeft&&!e.hasRight)return t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0;if(e.hasLeft&&!e.hasTop&&!e.hasBottom)return t.style.left="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0;if(e.hasRight&&!e.hasTop&&!e.hasBottom)return t.style.right="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0;if(!(e.hasLeft||e.hasRight||e.hasTop||e.hasBottom))return t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",!0;return!1}(t,n)||function(t,e){e.hasBottom?t.style.bottom="10px":e.hasTop&&(t.style.top="10px");e.hasRight?t.style.right="10px":e.hasLeft?t.style.left="10px":(e.hasBottom||e.hasTop||(t.style.bottom="10px"),t.style.left="50%",t.style.transform="translateX(-50%)")}(t,n)}class h{constructor(t,e){this.callback=t,this.delay=e,this.remaining=e,this.startTime=null,this.timeoutId=null,this.isPaused=!1,this.isCompleted=!1}start(){return this.isCompleted||this.timeoutId||(this.startTime=Date.now(),this.timeoutId=setTimeout(()=>{this.isCompleted=!0,this.timeoutId=null,this.callback()},this.remaining)),this}pause(){return this.isPaused||!this.timeoutId||this.isCompleted||(clearTimeout(this.timeoutId),this.timeoutId=null,this.remaining-=Date.now()-this.startTime,this.remaining=Math.max(0,this.remaining),this.isPaused=!0),this}resume(){return!this.isPaused||this.isCompleted||(this.isPaused=!1,this.start()),this}clear(){return this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isCompleted=!0,this}getRemainingTime(){return this.isCompleted?0:this.isPaused?this.remaining:this.timeoutId?Math.max(0,this.remaining-(Date.now()-this.startTime)):this.delay}}const y=new Map,g=new Map,b=[];let w=0;async function v(t={}){try{const e=function(t={}){return`${String(t.type).trim().toLowerCase()}|${function(t){let e=5381;for(let n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n);return e>>>0}(String(t.message||"")).toString(16)}|${String(t.position).trim().toLowerCase()}`}(t);if(y.has(e)){const n=y.get(e);if(!n)throw new Error(`Active toast with key ${e} not found`);return n.count++,n.timer.clear(),n.timer=E(n.toast,t),await S(n),void await L(n)}if(g.has(e)){const t=g.get(e);if(!t)throw new Error(`Pending toast with key ${e} not found`);return void t.count++}const n={options:t,count:1,rafId:0};g.set(e,n),n.rafId=requestAnimationFrame(async()=>{const t=g.get(e);if(t){if(g.delete(e),w>=3)return b.push({options:t.options,key:e,count:t.count}),void await A();try{await x(t.options,e,t.count)}catch(t){console.error("showToast failed:",t)}}})}catch(t){console.error("showToast failed:",t)}}async function x(e,n,o){try{if(!e||"object"!=typeof e)throw new TypeError("options must be an object");w++;const r=await f(e,p);if(!r)throw new Error("Failed to create toast container");const i=await async function(e,n){if(!document.querySelector('[id^="toast-container-"]'))return null;let o;try{return o=await t("div","toast"),await l(o,e,n),o}catch(t){return console.warn("toast creation failed with error showing fallback one: ",t),o=await c(e,n),o}}(e,T);if(!i)throw new Error("Toast element creation failed");const a=document.createElement("div");Object.assign(a.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"});const s=document.createElement("div");Object.assign(s.style,{position:"relative",overflow:"hidden",zIndex:"1"}),s.appendChild(i),a.appendChild(s),r.id.includes("toast-container-")&&r.appendChild(a);const u=!1!==e.pauseOnHover&&(!0===e.pauseOnHover||!!e.cta),d={outer:a,toast:i,count:Math.max(1,Math.floor(o??0)),timeout:null,pauseOnHover:u};y.set(n,d),i._key=n,d.count>1&&await L(d),d.timer=E(i,e),await S(d)}catch(t){console.error("Something went wrong: ",t),w=Math.max(0,w-1);(document.querySelector('[id^="toast-container-"]')||document.body).appendChild(await c(e,T))}}const C=async function(){try{if(0===y.size)return;let t=null;if(document.querySelectorAll('[id^="toast-container-"]').forEach(e=>{const n=Array.from(e.children||[]);if(0===n.length)return;const o=n.at(-1);o&&(t=o.querySelector('[id^="toast-"]')||o)}),!t){const e=Array.from(y.entries());if(e.length>0){const[,n]=e.at(-1);t=n.toast||n.outer&&n.outer.querySelector('[id^="toast-"]')}}if(!t)return;const e=t._key?t:t.querySelector('[id^="toast-"]')||t;await T(e)}catch(t){console.error("dismissMostRecent failed:",t)}},k=async function(){try{const t=Array.from(y.values()).map(t=>t.toast).filter(Boolean);b.length=0,g.clear();for(const e of t)try{await T(e)}catch(t){console.warn("closeAllToasts: failed to close one toast:",t)}}catch(t){console.error("closeAllToasts failed:",t)}};function E(t,e){const n=Number(e.duration??1800)+5,o=new h(async()=>await T(t),n);return o.start(),o}async function S(t){if(!t.pauseOnHover||!t.outer||!t.timer)return;const{outer:e,timer:n,toast:o}=t,r=()=>{var t;n.pause(),null==o||null===(t=o._progressAnimation)||void 0===t||t.pause()},i=()=>{var t;n.resume(),null==o||null===(t=o._progressAnimation)||void 0===t||t.play()},a=t=>{var e;t.target.matches("[tabindex], div, span, button, a")&&(n.pause(),null==o||null===(e=o._progressAnimation)||void 0===e||e.pause())},s=t=>{var r;e.contains(t.relatedTarget)||(n.resume(),null==o||null===(r=o._progressAnimation)||void 0===r||r.play())};e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",i),e.addEventListener("focusin",a),e.addEventListener("focusout",s),e._pauseCleanup=()=>{e.removeEventListener("mouseenter",r),e.removeEventListener("mouseleave",i),e.removeEventListener("focusin",a),e.removeEventListener("focusout",s)}}async function T(t){try{var e,n,o;if(null==t||!t._key)return;const r=y.get(t._key);if(!r)return;null===(e=r.timer)||void 0===e||e.clear(),null===(n=r.outer)||void 0===n||null===(o=n._pauseCleanup)||void 0===o||o.call(n),y.delete(t._key),w=Math.max(0,w-1);const i=r.outer.querySelector(".toast-count-badge");i&&i.remove(),await async function(t){return t?new Promise(e=>{let n=!1;const o=()=>{n||(n=!0,async function(t){if(!t)return!0;try{var e;if(null!=t&&null!==(e=t.parentNode)&&void 0!==e&&e.id.includes("toast-container-"))return t.parentNode.removeChild(t),!0}catch{}try{if(t.remove)return t.remove(),!0}catch{}try{return Object.assign(t.style,{display:"none",opacity:"0",pointerEvents:"none",position:"absolute",left:"-9999px"}),!0}catch{}}(t),e())},r=t.firstElementChild||t;if(!r)return e();const i=t=>{try{if(t.target!==r)return;r.removeEventListener("transitionend",i,!0),o()}catch(t){console.error("removeWithTransition error:",t)}};try{r.addEventListener("transitionend",i,!0)}catch(t){console.error("removeWithTransition error:",t)}setTimeout(()=>{try{r.removeEventListener("transitionend",i,!0),o()}catch(t){console.error("removeWithTransition error:",t)}},700)}):Promise.resolve()}(r.outer),await A()}catch(t){console.error("Closing Toast failed!: ",t)}}async function A(){for(;w<3&&b.length;){const t=b.shift();if(y.has(t.key)){const e=y.get(t.key);e.count+=t.count,await L(e);continue}x(t.options,t.key,t.count)}}async function L({outer:t,count:e}){if(!(t&&t instanceof HTMLElement))throw new Error("updateBadge: outer must be a valid HTMLElement");if(e<2){const e=t.querySelector(".toast-count-badge");return void(e&&e.remove())}let n=t.querySelector(".toast-count-badge");n||(n=document.createElement("span"),n.className="toast-count-badge",n.setAttribute("aria-label",`${e} identical notifications`),Object.assign(n.style,{position:"absolute",top:"6px",right:"6px",backgroundColor:"#f44336",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff",boxShadow:"0 2px 6px rgba(0,0,0,0.3)",zIndex:"2",pointerEvents:"none",transition:"transform 150ms ease"}),t.appendChild(n)),n.textContent=e>99?"99+":String(e);try{n.style.transform="scale(1.2)",setTimeout(()=>n.style.transform="scale(1)",150)}catch(t){console.error("updateBadge animation error:",t)}}let M={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},I={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"};const O=[];let D=!1;async function $(t={}){try{const e=await async function(t){var e;const n=null==t||null===(e=t.position)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim(),r=null!=n&&n.includes("top-full-width")||null!=n&&n.includes("bottom-full-width")?"100vw":"400px",i={allowHtml:!1,sanitizeHtml:!0,pauseOnHover:void 0,duration:2500,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",animationEasing:"ease",showProgressBar:!0,progressColor:void 0,progressHeight:"4px",progressPosition:"bottom",fontPosition:"relative",fontPadding:void 0,fontBorderRadius:void 0,fontBackgroundColor:void 0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontWeight:"400",fontLineHeight:"1.4",fontDirection:"auto",wrapText:"normal",maxWidth:r,..."object"!=typeof t||Array.isArray(t)?{}:t};i.message=(null==t?void 0:t.message)??i.message;try{var a;if(!i.backgroundColor)i.backgroundColor=(null===(a=M)||void 0===a?void 0:a[i.type])??(window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111")}catch(t){console.warn("Background color resolution failed:",t)}try{var s;i.message=i.message||(null===(s=I)||void 0===s?void 0:s[i.type])||"No Message Provided!"}catch(t){console.warn("Default message resolution failed:",t)}try{!i.textColor&&i.backgroundColor&&(i.textColor=o(i.backgroundColor))}catch(t){console.warn("Text color resolution failed:",t)}try{!i.progressColor&&i.backgroundColor&&(i.progressColor=i.textColor||o(i.backgroundColor))}catch(t){console.warn("Progress bar color resolution failed:",t)}"string"!=typeof i.message&&(i.message="No Message Provided!");return i}(t);await async function(t){try{return await f(t,p)}catch(t){return console.error("Failed to create toast container:",t),document.body}}(e),await v(e)}catch(e){console.error("CreateToast failed:",e);const n="string"==typeof(null==t?void 0:t.message)&&null!==(null==t?void 0:t.message)?`${t.message.substring(0,200)} toast creation failed!`:"Toast creation failed!";alert(n)}}function N(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(M={...M,...t})}catch(t){console.error("setDefaultColors failed:",t)}}function j(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(I={...I,...t})}catch(t){console.error("setDefaultMessages failed:",t)}}let z=!1,B=null;const W=async function(t={}){"undefined"!=typeof window&&"undefined"!=typeof document?(await async function(){if(D)return;"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(D=!0,O.forEach(t=>setTimeout(()=>$(t),200)),O.length=0):document.addEventListener("DOMContentLoaded",()=>{D=!0,O.forEach(t=>setTimeout(()=>$(t),200)),O.length=0},{once:!0}))}(),D?await $(t):O.push(t)):console.warn("ToastNotification: running in non-browser environment, no DOM available.")};async function P(t={}){return async function(t){if(z&&B)try{await B}catch(t){console.warn("Previous close operation failed (continuing anyway):",t)}return t()}(()=>W(t))}const H=async()=>{z=!0,B=(async()=>{try{await C()}finally{z=!1,B=null}})(),await B},R=async()=>{z=!0,B=(async()=>{try{await k()}finally{z=!1,B=null}})(),await B};if("undefined"!=typeof window&&"undefined"!=typeof document){const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||(async()=>{z=!0,B=(async()=>{try{await C()}finally{z=!1,B=null}})(),await B})()};window.addEventListener("keydown",t,{passive:!0})}try{"undefined"!=typeof window&&(window.customizableToast={createToast:P,setDefaultColors:N,setDefaultMessages:j,noop:R,dismiss:H})}catch(t){console.error("Global assignment failed:",t)}exports.createToast=P,exports.dismiss=H,exports.noop=R,exports.setDefaultColors=N,exports.setDefaultMessages=j;
|
|
16
16
|
//# sourceMappingURL=index.cjs.map
|