@soft-toast/vue 1.0.2 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { ref as R, computed as z, defineComponent as pe, shallowRef as cn, onMounted as qe, watch as G, onUnmounted as Ve, h as Ge, nextTick as Ie, openBlock as E, createElementBlock as $, createVNode as ot, unref as $t, createElementVNode as Q, normalizeStyle as De, normalizeClass as Fe, renderSlot as ie, withModifiers as $e, createCommentVNode as _, createBlock as K, resolveDynamicComponent as mt, toDisplayString as we, Fragment as Se, createTextVNode as un, renderList as Ee, Teleport as Nt, withDirectives as fn, createSlots as Ht, withCtx as qt, mergeProps as Ke, vShow as dn, createApp as pn } from "vue";
2
- import { gsap as O } from "gsap";
3
- let xe = null, Vt = !1;
4
- const hn = () => {
5
- Vt = !0;
1
+ import { ref as R, computed as z, defineComponent as pe, shallowRef as un, onMounted as qe, watch as G, onUnmounted as Ve, h as Ge, nextTick as ke, openBlock as P, createElementBlock as $, createVNode as st, unref as Nt, createElementVNode as Q, normalizeStyle as De, normalizeClass as Fe, renderSlot as re, withModifiers as $e, createCommentVNode as ee, createBlock as K, resolveDynamicComponent as gt, toDisplayString as ye, Fragment as Ie, createTextVNode as fn, renderList as Se, Teleport as Ht, withDirectives as dn, createSlots as qt, withCtx as Vt, mergeProps as Ke, vShow as pn, createApp as hn } from "vue";
2
+ import { gsap as F } from "gsap";
3
+ let we = null, Yt = !1;
4
+ const mn = () => {
5
+ Yt = !0;
6
6
  };
7
7
  typeof window < "u" && ["click", "keydown", "pointerdown", "touchstart"].forEach(
8
- (e) => window.addEventListener(e, hn, { once: !0, passive: !0 })
8
+ (e) => window.addEventListener(e, mn, { once: !0, passive: !0 })
9
9
  );
10
- const mn = () => typeof window > "u" || typeof AudioContext > "u" ? null : (xe || (xe = new AudioContext()), xe.state === "suspended" && xe.resume().catch(() => {
11
- }), xe), U = (e, t, n, o = "sine", s = 0) => {
12
- const i = mn();
10
+ const gn = () => typeof window > "u" || typeof AudioContext > "u" ? null : (we || (we = new AudioContext()), we.state === "suspended" && we.resume().catch(() => {
11
+ }), we), U = (e, t, n, o = "sine", s = 0) => {
12
+ const i = gn();
13
13
  if (i)
14
14
  try {
15
15
  const r = i.createOscillator(), a = i.createGain();
16
16
  r.connect(a), a.connect(i.destination), r.type = o, r.frequency.setValueAtTime(e, i.currentTime + s), a.gain.setValueAtTime(0, i.currentTime + s), a.gain.linearRampToValueAtTime(n, i.currentTime + s + 0.01), a.gain.exponentialRampToValueAtTime(1e-3, i.currentTime + s + t), r.start(i.currentTime + s), r.stop(i.currentTime + s + t + 0.02);
17
17
  } catch {
18
18
  }
19
- }, gt = {
19
+ }, vt = {
20
20
  success: (e) => {
21
21
  U(523.25, 0.12, e * 0.45, "sine", 0), U(659.25, 0.14, e * 0.5, "sine", 0.08), U(783.99, 0.2, e * 0.55, "sine", 0.16);
22
22
  },
@@ -36,8 +36,8 @@ const mn = () => typeof window > "u" || typeof AudioContext > "u" ? null : (xe |
36
36
  promise: (e) => {
37
37
  U(523.25, 0.12, e * 0.3, "sine", 0);
38
38
  }
39
- }, vt = (e, t, n = 0.5) => {
40
- if (!t || typeof window > "u" || !Vt) return;
39
+ }, yt = (e, t, n = 0.5) => {
40
+ if (!t || typeof window > "u" || !Yt) return;
41
41
  const o = Math.max(0, Math.min(1, n));
42
42
  if (typeof t == "string") {
43
43
  try {
@@ -48,8 +48,8 @@ const mn = () => typeof window > "u" || typeof AudioContext > "u" ? null : (xe |
48
48
  }
49
49
  return;
50
50
  }
51
- (gt[e] ?? gt.default)(o);
52
- }, gn = () => `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, oe = {
51
+ (vt[e] ?? vt.default)(o);
52
+ }, vn = () => `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, se = {
53
53
  type: "default",
54
54
  duration: 4e3,
55
55
  position: "top-right",
@@ -58,8 +58,14 @@ const mn = () => typeof window > "u" || typeof AudioContext > "u" ? null : (xe |
58
58
  spring: !0,
59
59
  showTimestamp: !1,
60
60
  showProgress: !1
61
- }, k = R([]), W = /* @__PURE__ */ new Map(), vn = (e) => z(() => k.value.filter((t) => t.position === e)), yn = z(() => k.value), re = (e) => {
62
- const t = e.id || gn(), n = k.value.findIndex((a) => a.id === t);
61
+ }, k = R([]), X = /* @__PURE__ */ new Map(), Je = (e, t, n = !1) => {
62
+ if (t === 1 / 0) {
63
+ X.delete(e);
64
+ return;
65
+ }
66
+ X.set(e, { remainingTime: t, isPaused: n });
67
+ }, yn = (e) => z(() => k.value.filter((t) => t.position === e)), wn = z(() => k.value), ae = (e) => {
68
+ const t = e.id || vn(), n = k.value.findIndex((a) => a.id === t);
63
69
  if (n !== -1 && !k.value[n].isLeaving) {
64
70
  const a = k.value[n];
65
71
  k.value[n] = {
@@ -70,12 +76,12 @@ const mn = () => typeof window > "u" || typeof AudioContext > "u" ? null : (xe |
70
76
  remainingTime: e.duration ?? a.duration,
71
77
  isPaused: a.isPaused,
72
78
  isLeaving: !1
73
- };
74
- const c = e.sound, l = e.soundVolume ?? 0.5;
75
- return c && vt(e.type ?? a.type, c, l), t;
79
+ }, Je(t, e.duration ?? a.duration, a.isPaused);
80
+ const l = e.sound, c = e.soundVolume ?? 0.5;
81
+ return l && yt(e.type ?? a.type, l, c), t;
76
82
  }
77
- const o = e.duration ?? oe.duration, s = {
78
- ...oe,
83
+ const o = e.duration ?? se.duration, s = {
84
+ ...se,
79
85
  ...e,
80
86
  id: t,
81
87
  createdAt: Date.now(),
@@ -83,131 +89,138 @@ const mn = () => typeof window > "u" || typeof AudioContext > "u" ? null : (xe |
83
89
  isPaused: !1,
84
90
  isExpanded: !0,
85
91
  isLeaving: !1,
86
- preset: e.preset ?? oe.preset,
87
- bounce: e.bounce ?? oe.bounce,
88
- spring: e.spring ?? oe.spring,
89
- showTimestamp: e.showTimestamp ?? oe.showTimestamp,
90
- showProgress: e.showProgress ?? oe.showProgress
92
+ preset: e.preset ?? se.preset,
93
+ bounce: e.bounce ?? se.bounce,
94
+ spring: e.spring ?? se.spring,
95
+ showTimestamp: e.showTimestamp ?? se.showTimestamp,
96
+ showProgress: e.showProgress ?? se.showProgress
91
97
  };
92
- W.set(t, { remainingTime: o, isPaused: !1 }), k.value.unshift(s), In();
98
+ Je(t, o, !1), k.value.unshift(s), Sn();
93
99
  const i = e.sound, r = e.soundVolume ?? 0.5;
94
- return i && vt(s.type, i, r), t;
95
- }, Je = (e, t) => {
100
+ return i && yt(s.type, i, r), t;
101
+ }, Ze = (e, t) => {
96
102
  const n = k.value.findIndex((o) => o.id === e);
97
- n !== -1 && (k.value[n] = { ...k.value[n], ...t });
98
- }, wn = (e) => {
103
+ if (n !== -1) {
104
+ const o = k.value[n], s = t.duration ?? o.duration, i = t.duration === void 0 ? o.remainingTime : s;
105
+ k.value[n] = {
106
+ ...o,
107
+ ...t,
108
+ remainingTime: i
109
+ }, t.duration !== void 0 && Je(e, s, o.isPaused);
110
+ }
111
+ }, xn = (e) => {
99
112
  var t;
100
113
  if (!e) {
101
114
  k.value.forEach((n) => {
102
115
  n.isLeaving = !0;
103
- }), W.clear(), setTimeout(() => {
116
+ }), X.clear(), setTimeout(() => {
104
117
  k.value = [];
105
118
  }, 400);
106
119
  return;
107
120
  }
108
121
  if (typeof e == "string") {
109
122
  const n = k.value.find((o) => o.id === e);
110
- n && (n.isLeaving = !0, (t = n.onDismiss) == null || t.call(n, e), W.delete(e), setTimeout(() => {
123
+ n && (n.isLeaving = !0, (t = n.onDismiss) == null || t.call(n, e), X.delete(e), setTimeout(() => {
111
124
  k.value = k.value.filter((o) => o.id !== e);
112
125
  }, 400));
113
126
  } else {
114
127
  const n = Array.isArray(e.type) ? e.type : [e.type];
115
128
  k.value.forEach((o) => {
116
129
  var s;
117
- n.includes(o.type) && (o.isLeaving = !0, (s = o.onDismiss) == null || s.call(o, o.id), W.delete(o.id));
130
+ n.includes(o.type) && (o.isLeaving = !0, (s = o.onDismiss) == null || s.call(o, o.id), X.delete(o.id));
118
131
  }), setTimeout(() => {
119
132
  k.value = k.value.filter((o) => !n.includes(o.type));
120
133
  }, 400);
121
134
  }
122
- }, xn = (e) => {
123
- const t = W.get(e);
135
+ }, bn = (e) => {
136
+ const t = X.get(e);
124
137
  t && (t.isPaused = !0);
125
138
  const n = k.value.find((o) => o.id === e);
126
139
  n && (n.isPaused = !0);
127
- }, bn = (e) => {
128
- const t = W.get(e);
140
+ }, Tn = (e) => {
141
+ const t = X.get(e);
129
142
  t && (t.isPaused = !1);
130
143
  const n = k.value.find((o) => o.id === e);
131
144
  n && (n.isPaused = !1);
132
- }, Tn = (e) => {
145
+ }, kn = (e) => {
133
146
  const t = k.value.find((n) => n.id === e);
134
147
  t && (t.isExpanded = !0);
135
- }, kn = (e) => {
148
+ }, In = (e) => {
136
149
  const t = k.value.find((n) => n.id === e);
137
150
  t && (t.isExpanded = !1);
138
151
  };
139
- let be = 0, Me = null;
140
- const In = () => {
152
+ let xe = 0, Me = null;
153
+ const Sn = () => {
141
154
  if (Me !== null || typeof window > "u") return;
142
155
  const e = (t) => {
143
156
  var s;
144
- be === 0 && (be = t);
145
- const n = t - be;
146
- be = t;
157
+ xe === 0 && (xe = t);
158
+ const n = t - xe;
159
+ xe = t;
147
160
  const o = [];
148
- W.forEach((i, r) => {
161
+ X.forEach((i, r) => {
149
162
  if (i.isPaused) return;
150
- const a = k.value.find((c) => c.id === r);
163
+ const a = k.value.find((l) => l.id === r);
151
164
  !a || a.isLeaving || a.duration === 1 / 0 || (i.remainingTime -= n, a.showProgress && (a.remainingTime = i.remainingTime), i.remainingTime <= 0 && o.push(r));
152
165
  });
153
166
  for (const i of o) {
154
- W.delete(i);
167
+ X.delete(i);
155
168
  const r = k.value.find((a) => a.id === i);
156
169
  r && !r.isLeaving && (r.isLeaving = !0, (s = r.onAutoClose) == null || s.call(r, i), setTimeout(() => {
157
170
  k.value = k.value.filter((a) => a.id !== i);
158
171
  }, 400));
159
172
  }
160
- k.value.length > 0 ? Me = requestAnimationFrame(e) : (Me = null, be = 0);
173
+ k.value.length > 0 ? Me = requestAnimationFrame(e) : (Me = null, xe = 0);
161
174
  };
162
175
  Me = requestAnimationFrame(e);
163
- }, Sn = (e, t) => re({ ...t, type: "success", title: e }), En = (e, t) => re({ ...t, type: "error", title: e }), Pn = (e, t) => re({ ...t, type: "warning", title: e }), Cn = (e, t) => re({ ...t, type: "info", title: e }), An = (e, t) => re({ ...t, type: "promise", title: e, duration: 1 / 0 }), Ln = async (e, t, n) => {
164
- var s, i, r;
165
- const o = re({
176
+ }, En = (e, t) => ae({ ...t, type: "success", title: e }), Pn = (e, t) => ae({ ...t, type: "error", title: e }), Ln = (e, t) => ae({ ...t, type: "warning", title: e }), Cn = (e, t) => ae({ ...t, type: "info", title: e }), An = (e, t) => ae({ ...t, type: "promise", title: e, duration: 1 / 0 }), On = async (e, t, n) => {
177
+ var s, i, r, a, l;
178
+ const o = ae({
166
179
  ...n,
167
180
  type: "promise",
168
181
  title: t.loading,
169
182
  duration: 1 / 0
170
183
  });
171
184
  try {
172
- const a = await e;
173
- return Je(o, {
185
+ const c = await e;
186
+ return Ze(o, {
174
187
  type: "success",
175
- title: t.success,
176
- description: (s = t.description) == null ? void 0 : s.success,
188
+ title: typeof t.success == "function" ? t.success(c) : t.success,
189
+ description: typeof ((s = t.description) == null ? void 0 : s.success) == "function" ? t.description.success(c) : (i = t.description) == null ? void 0 : i.success,
177
190
  duration: 4e3
178
- }), a;
179
- } catch (a) {
180
- throw Je(o, {
191
+ }), c;
192
+ } catch (c) {
193
+ throw Ze(o, {
181
194
  type: "error",
182
- title: t.error,
183
- description: (i = t.description) == null ? void 0 : i.error,
184
- action: (r = t.action) == null ? void 0 : r.error,
195
+ title: typeof t.error == "function" ? t.error(c) : t.error,
196
+ description: typeof ((r = t.description) == null ? void 0 : r.error) == "function" ? t.description.error(c) : (a = t.description) == null ? void 0 : a.error,
197
+ action: (l = t.action) == null ? void 0 : l.error,
185
198
  duration: 6e3
186
- }), a;
199
+ }), c;
187
200
  }
188
- }, On = () => {
189
- W.clear(), k.value = [];
190
- }, Mn = (e) => {
191
- W.delete(e), k.value = k.value.filter((t) => t.id !== e);
192
- }, v = {
193
- toasts: yn,
194
- getToastsByPosition: vn,
195
- add: re,
196
- update: Je,
197
- dismiss: wn,
198
- pause: xn,
199
- resume: bn,
200
- expand: Tn,
201
- collapse: kn,
202
- success: Sn,
203
- error: En,
204
- warning: Pn,
201
+ }, Mn = () => {
202
+ X.clear(), k.value = [];
203
+ }, Dn = (e) => {
204
+ X.delete(e), k.value = k.value.filter((t) => t.id !== e);
205
+ }, y = {
206
+ toasts: wn,
207
+ getToastsByPosition: yn,
208
+ add: ae,
209
+ update: Ze,
210
+ dismiss: xn,
211
+ pause: bn,
212
+ resume: Tn,
213
+ expand: kn,
214
+ collapse: In,
215
+ success: En,
216
+ error: Pn,
217
+ warning: Ln,
205
218
  info: Cn,
206
219
  loading: An,
207
- promise: Ln,
208
- clearAll: On,
209
- remove: Mn
210
- }, Yt = /^[a-z0-9]+(-[a-z0-9]+)*$/, Ye = (e, t, n, o = "") => {
220
+ promise: On,
221
+ clearAll: Mn,
222
+ remove: Dn
223
+ }, zt = /^[a-z0-9]+(-[a-z0-9]+)*$/, Ye = (e, t, n, o = "") => {
211
224
  const s = e.split(":");
212
225
  if (e.slice(0, 1) === "@") {
213
226
  if (s.length < 2 || s.length > 3) return null;
@@ -215,12 +228,12 @@ const In = () => {
215
228
  }
216
229
  if (s.length > 3 || !s.length) return null;
217
230
  if (s.length > 1) {
218
- const a = s.pop(), c = s.pop(), l = {
231
+ const a = s.pop(), l = s.pop(), c = {
219
232
  provider: s.length > 0 ? s[0] : o,
220
- prefix: c,
233
+ prefix: l,
221
234
  name: a
222
235
  };
223
- return t && !Be(l) ? null : l;
236
+ return t && !Be(c) ? null : c;
224
237
  }
225
238
  const i = s[0], r = i.split("-");
226
239
  if (r.length > 1) {
@@ -241,20 +254,20 @@ const In = () => {
241
254
  }
242
255
  return null;
243
256
  }, Be = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
244
- function Dn(e, t) {
257
+ function Fn(e, t) {
245
258
  const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null);
246
259
  function i(r) {
247
260
  if (n[r]) return s[r] = [];
248
261
  if (!(r in s)) {
249
262
  s[r] = null;
250
- const a = o[r] && o[r].parent, c = a && i(a);
251
- c && (s[r] = [a].concat(c));
263
+ const a = o[r] && o[r].parent, l = a && i(a);
264
+ l && (s[r] = [a].concat(l));
252
265
  }
253
266
  return s[r];
254
267
  }
255
268
  return Object.keys(n).concat(Object.keys(o)).forEach(i), s;
256
269
  }
257
- const zt = Object.freeze({
270
+ const Qt = Object.freeze({
258
271
  left: 0,
259
272
  top: 0,
260
273
  width: 16,
@@ -264,73 +277,73 @@ const zt = Object.freeze({
264
277
  vFlip: !1,
265
278
  hFlip: !1
266
279
  }), ze = Object.freeze({
267
- ...zt,
280
+ ...Qt,
268
281
  ...Ne
269
- }), Ze = Object.freeze({
282
+ }), _e = Object.freeze({
270
283
  ...ze,
271
284
  body: "",
272
285
  hidden: !1
273
286
  });
274
- function Fn(e, t) {
287
+ function Bn(e, t) {
275
288
  const n = {};
276
289
  !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
277
290
  const o = ((e.rotate || 0) + (t.rotate || 0)) % 4;
278
291
  return o && (n.rotate = o), n;
279
292
  }
280
- function yt(e, t) {
281
- const n = Fn(e, t);
282
- for (const o in Ze) o in Ne ? o in e && !(o in n) && (n[o] = Ne[o]) : o in t ? n[o] = t[o] : o in e && (n[o] = e[o]);
293
+ function wt(e, t) {
294
+ const n = Bn(e, t);
295
+ for (const o in _e) o in Ne ? o in e && !(o in n) && (n[o] = Ne[o]) : o in t ? n[o] = t[o] : o in e && (n[o] = e[o]);
283
296
  return n;
284
297
  }
285
- function Bn(e, t, n) {
298
+ function jn(e, t, n) {
286
299
  const o = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null);
287
300
  let i = {};
288
301
  function r(a) {
289
- i = yt(o[a] || s[a], i);
302
+ i = wt(o[a] || s[a], i);
290
303
  }
291
- return r(t), n.forEach(r), yt(e, i);
304
+ return r(t), n.forEach(r), wt(e, i);
292
305
  }
293
- function Qt(e, t) {
306
+ function Ut(e, t) {
294
307
  const n = [];
295
308
  if (typeof e != "object" || typeof e.icons != "object") return n;
296
309
  e.not_found instanceof Array && e.not_found.forEach((s) => {
297
310
  t(s, null), n.push(s);
298
311
  });
299
- const o = Dn(e);
312
+ const o = Fn(e);
300
313
  for (const s in o) {
301
314
  const i = o[s];
302
- i && (t(s, Bn(e, s, i)), n.push(s));
315
+ i && (t(s, jn(e, s, i)), n.push(s));
303
316
  }
304
317
  return n;
305
318
  }
306
- const jn = {
319
+ const Rn = {
307
320
  provider: "",
308
321
  aliases: {},
309
322
  not_found: {},
310
- ...zt
323
+ ...Qt
311
324
  };
312
325
  function Xe(e, t) {
313
326
  for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
314
327
  return !0;
315
328
  }
316
- function Ut(e) {
329
+ function Xt(e) {
317
330
  if (typeof e != "object" || e === null) return null;
318
331
  const t = e;
319
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !Xe(e, jn)) return null;
332
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !Xe(e, Rn)) return null;
320
333
  const n = t.icons;
321
334
  for (const s in n) {
322
335
  const i = n[s];
323
- if (!s || typeof i.body != "string" || !Xe(i, Ze)) return null;
336
+ if (!s || typeof i.body != "string" || !Xe(i, _e)) return null;
324
337
  }
325
338
  const o = t.aliases || /* @__PURE__ */ Object.create(null);
326
339
  for (const s in o) {
327
340
  const i = o[s], r = i.parent;
328
- if (!s || typeof r != "string" || !n[r] && !o[r] || !Xe(i, Ze)) return null;
341
+ if (!s || typeof r != "string" || !n[r] && !o[r] || !Xe(i, _e)) return null;
329
342
  }
330
343
  return t;
331
344
  }
332
- const wt = /* @__PURE__ */ Object.create(null);
333
- function Rn(e, t) {
345
+ const xt = /* @__PURE__ */ Object.create(null);
346
+ function $n(e, t) {
334
347
  return {
335
348
  provider: e,
336
349
  prefix: t,
@@ -338,16 +351,16 @@ function Rn(e, t) {
338
351
  missing: /* @__PURE__ */ new Set()
339
352
  };
340
353
  }
341
- function fe(e, t) {
342
- const n = wt[e] || (wt[e] = /* @__PURE__ */ Object.create(null));
343
- return n[t] || (n[t] = Rn(e, t));
354
+ function de(e, t) {
355
+ const n = xt[e] || (xt[e] = /* @__PURE__ */ Object.create(null));
356
+ return n[t] || (n[t] = $n(e, t));
344
357
  }
345
- function Xt(e, t) {
346
- return Ut(t) ? Qt(t, (n, o) => {
358
+ function Wt(e, t) {
359
+ return Xt(t) ? Ut(t, (n, o) => {
347
360
  o ? e.icons[n] = o : e.missing.add(n);
348
361
  }) : [];
349
362
  }
350
- function $n(e, t, n) {
363
+ function Nn(e, t, n) {
351
364
  try {
352
365
  if (typeof n.body == "string")
353
366
  return e.icons[t] = { ...n }, !0;
@@ -355,52 +368,52 @@ function $n(e, t, n) {
355
368
  }
356
369
  return !1;
357
370
  }
358
- let Pe = !1;
359
- function Wt(e) {
360
- return typeof e == "boolean" && (Pe = e), Pe;
371
+ let Ee = !1;
372
+ function Gt(e) {
373
+ return typeof e == "boolean" && (Ee = e), Ee;
361
374
  }
362
- function Nn(e) {
363
- const t = typeof e == "string" ? Ye(e, !0, Pe) : e;
375
+ function Hn(e) {
376
+ const t = typeof e == "string" ? Ye(e, !0, Ee) : e;
364
377
  if (t) {
365
- const n = fe(t.provider, t.prefix), o = t.name;
378
+ const n = de(t.provider, t.prefix), o = t.name;
366
379
  return n.icons[o] || (n.missing.has(o) ? null : void 0);
367
380
  }
368
381
  }
369
- function se(e, t) {
370
- const n = Ye(e, !0, Pe);
382
+ function ie(e, t) {
383
+ const n = Ye(e, !0, Ee);
371
384
  if (!n) return !1;
372
- const o = fe(n.provider, n.prefix);
373
- return t ? $n(o, n.name, t) : (o.missing.add(n.name), !0);
385
+ const o = de(n.provider, n.prefix);
386
+ return t ? Nn(o, n.name, t) : (o.missing.add(n.name), !0);
374
387
  }
375
- function Hn(e, t) {
388
+ function qn(e, t) {
376
389
  if (typeof e != "object") return !1;
377
- if (typeof t != "string" && (t = e.provider || ""), Pe && !t && !e.prefix) {
390
+ if (typeof t != "string" && (t = e.provider || ""), Ee && !t && !e.prefix) {
378
391
  let o = !1;
379
- return Ut(e) && (e.prefix = "", Qt(e, (s, i) => {
380
- se(s, i) && (o = !0);
392
+ return Xt(e) && (e.prefix = "", Ut(e, (s, i) => {
393
+ ie(s, i) && (o = !0);
381
394
  })), o;
382
395
  }
383
396
  const n = e.prefix;
384
397
  return Be({
385
398
  prefix: n,
386
399
  name: "a"
387
- }) ? !!Xt(fe(t, n), e) : !1;
400
+ }) ? !!Wt(de(t, n), e) : !1;
388
401
  }
389
- const Gt = Object.freeze({
402
+ const Kt = Object.freeze({
390
403
  width: null,
391
404
  height: null
392
- }), Kt = Object.freeze({
393
- ...Gt,
405
+ }), Jt = Object.freeze({
406
+ ...Kt,
394
407
  ...Ne
395
- }), qn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Vn = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
396
- function xt(e, t, n) {
408
+ }), Vn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Yn = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
409
+ function bt(e, t, n) {
397
410
  if (t === 1) return e;
398
411
  if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
399
412
  if (typeof e != "string") return e;
400
- const o = e.split(qn);
413
+ const o = e.split(Vn);
401
414
  if (o === null || !o.length) return e;
402
415
  const s = [];
403
- let i = o.shift(), r = Vn.test(i);
416
+ let i = o.shift(), r = Yn.test(i);
404
417
  for (; ; ) {
405
418
  if (r) {
406
419
  const a = parseFloat(i);
@@ -410,7 +423,7 @@ function xt(e, t, n) {
410
423
  r = !r;
411
424
  }
412
425
  }
413
- function Yn(e, t = "defs") {
426
+ function zn(e, t = "defs") {
414
427
  let n = "";
415
428
  const o = e.indexOf("<" + t);
416
429
  for (; o >= 0; ) {
@@ -425,20 +438,20 @@ function Yn(e, t = "defs") {
425
438
  content: e
426
439
  };
427
440
  }
428
- function zn(e, t) {
441
+ function Qn(e, t) {
429
442
  return e ? "<defs>" + e + "</defs>" + t : t;
430
443
  }
431
- function Qn(e, t, n) {
432
- const o = Yn(e);
433
- return zn(o.defs, t + o.content + n);
444
+ function Un(e, t, n) {
445
+ const o = zn(e);
446
+ return Qn(o.defs, t + o.content + n);
434
447
  }
435
- const Un = (e) => e === "unset" || e === "undefined" || e === "none";
436
- function Xn(e, t) {
448
+ const Xn = (e) => e === "unset" || e === "undefined" || e === "none";
449
+ function Wn(e, t) {
437
450
  const n = {
438
451
  ...ze,
439
452
  ...e
440
453
  }, o = {
441
- ...Kt,
454
+ ...Jt,
442
455
  ...t
443
456
  }, s = {
444
457
  left: n.left,
@@ -448,9 +461,9 @@ function Xn(e, t) {
448
461
  };
449
462
  let i = n.body;
450
463
  [n, o].forEach((I) => {
451
- const h = [], F = I.hFlip, D = I.vFlip;
464
+ const h = [], N = I.hFlip, O = I.vFlip;
452
465
  let b = I.rotate;
453
- F ? D ? b += 2 : (h.push("translate(" + (s.width + s.left).toString() + " " + (0 - s.top).toString() + ")"), h.push("scale(-1 1)"), s.top = s.left = 0) : D && (h.push("translate(" + (0 - s.left).toString() + " " + (s.height + s.top).toString() + ")"), h.push("scale(1 -1)"), s.top = s.left = 0);
466
+ N ? O ? b += 2 : (h.push("translate(" + (s.width + s.left).toString() + " " + (0 - s.top).toString() + ")"), h.push("scale(-1 1)"), s.top = s.left = 0) : O && (h.push("translate(" + (0 - s.left).toString() + " " + (s.height + s.top).toString() + ")"), h.push("scale(1 -1)"), s.top = s.left = 0);
454
467
  let T;
455
468
  switch (b < 0 && (b -= Math.floor(b / 4) * 4), b = b % 4, b) {
456
469
  case 1:
@@ -463,52 +476,52 @@ function Xn(e, t) {
463
476
  T = s.width / 2 + s.left, h.unshift("rotate(-90 " + T.toString() + " " + T.toString() + ")");
464
477
  break;
465
478
  }
466
- b % 2 === 1 && (s.left !== s.top && (T = s.left, s.left = s.top, s.top = T), s.width !== s.height && (T = s.width, s.width = s.height, s.height = T)), h.length && (i = Qn(i, '<g transform="' + h.join(" ") + '">', "</g>"));
479
+ b % 2 === 1 && (s.left !== s.top && (T = s.left, s.left = s.top, s.top = T), s.width !== s.height && (T = s.width, s.width = s.height, s.height = T)), h.length && (i = Un(i, '<g transform="' + h.join(" ") + '">', "</g>"));
467
480
  });
468
- const r = o.width, a = o.height, c = s.width, l = s.height;
481
+ const r = o.width, a = o.height, l = s.width, c = s.height;
469
482
  let d, w;
470
- r === null ? (w = a === null ? "1em" : a === "auto" ? l : a, d = xt(w, c / l)) : (d = r === "auto" ? c : r, w = a === null ? xt(d, l / c) : a === "auto" ? l : a);
483
+ r === null ? (w = a === null ? "1em" : a === "auto" ? c : a, d = bt(w, l / c)) : (d = r === "auto" ? l : r, w = a === null ? bt(d, c / l) : a === "auto" ? c : a);
471
484
  const x = {}, S = (I, h) => {
472
- Un(h) || (x[I] = h.toString());
485
+ Xn(h) || (x[I] = h.toString());
473
486
  };
474
487
  S("width", d), S("height", w);
475
- const y = [
488
+ const g = [
476
489
  s.left,
477
490
  s.top,
478
- c,
479
- l
491
+ l,
492
+ c
480
493
  ];
481
- return x.viewBox = y.join(" "), {
494
+ return x.viewBox = g.join(" "), {
482
495
  attributes: x,
483
- viewBox: y,
496
+ viewBox: g,
484
497
  body: i
485
498
  };
486
499
  }
487
- const Wn = /\sid="(\S+)"/g, bt = /* @__PURE__ */ new Map();
488
- function Gn(e) {
500
+ const Gn = /\sid="(\S+)"/g, Tt = /* @__PURE__ */ new Map();
501
+ function Kn(e) {
489
502
  e = e.replace(/[0-9]+$/, "") || "a";
490
- const t = bt.get(e) || 0;
491
- return bt.set(e, t + 1), t ? `${e}${t}` : e;
503
+ const t = Tt.get(e) || 0;
504
+ return Tt.set(e, t + 1), t ? `${e}${t}` : e;
492
505
  }
493
- function Kn(e) {
506
+ function Jn(e) {
494
507
  const t = [];
495
508
  let n;
496
- for (; n = Wn.exec(e); ) t.push(n[1]);
509
+ for (; n = Gn.exec(e); ) t.push(n[1]);
497
510
  if (!t.length) return e;
498
511
  const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
499
512
  return t.forEach((s) => {
500
- const i = Gn(s), r = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
513
+ const i = Kn(s), r = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
501
514
  e = e.replace(new RegExp('([#;"])(' + r + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
502
515
  }), e = e.replace(new RegExp(o, "g"), ""), e;
503
516
  }
504
- const _e = /* @__PURE__ */ Object.create(null);
505
- function Jn(e, t) {
506
- _e[e] = t;
517
+ const et = /* @__PURE__ */ Object.create(null);
518
+ function Zn(e, t) {
519
+ et[e] = t;
507
520
  }
508
- function et(e) {
509
- return _e[e] || _e[""];
521
+ function tt(e) {
522
+ return et[e] || et[""];
510
523
  }
511
- function st(e) {
524
+ function it(e) {
512
525
  let t;
513
526
  if (typeof e.resources == "string") t = [e.resources];
514
527
  else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
@@ -523,26 +536,26 @@ function st(e) {
523
536
  dataAfterTimeout: e.dataAfterTimeout !== !1
524
537
  };
525
538
  }
526
- const it = /* @__PURE__ */ Object.create(null), Te = ["https://api.simplesvg.com", "https://api.unisvg.com"], je = [];
527
- for (; Te.length > 0; ) Te.length === 1 || Math.random() > 0.5 ? je.push(Te.shift()) : je.push(Te.pop());
528
- it[""] = st({ resources: ["https://api.iconify.design"].concat(je) });
529
- function Zn(e, t) {
530
- const n = st(t);
531
- return n === null ? !1 : (it[e] = n, !0);
539
+ const rt = /* @__PURE__ */ Object.create(null), be = ["https://api.simplesvg.com", "https://api.unisvg.com"], je = [];
540
+ for (; be.length > 0; ) be.length === 1 || Math.random() > 0.5 ? je.push(be.shift()) : je.push(be.pop());
541
+ rt[""] = it({ resources: ["https://api.iconify.design"].concat(je) });
542
+ function _n(e, t) {
543
+ const n = it(t);
544
+ return n === null ? !1 : (rt[e] = n, !0);
532
545
  }
533
- function rt(e) {
534
- return it[e];
546
+ function at(e) {
547
+ return rt[e];
535
548
  }
536
- const _n = () => {
549
+ const eo = () => {
537
550
  let e;
538
551
  try {
539
552
  if (e = fetch, typeof e == "function") return e;
540
553
  } catch {
541
554
  }
542
555
  };
543
- let Tt = _n();
544
- function eo(e, t) {
545
- const n = rt(e);
556
+ let kt = eo();
557
+ function to(e, t) {
558
+ const n = at(e);
546
559
  if (!n) return 0;
547
560
  let o;
548
561
  if (!n.maxURL) o = 0;
@@ -556,39 +569,39 @@ function eo(e, t) {
556
569
  }
557
570
  return o;
558
571
  }
559
- function to(e) {
572
+ function no(e) {
560
573
  return e === 404;
561
574
  }
562
- const no = (e, t, n) => {
563
- const o = [], s = eo(e, t), i = "icons";
575
+ const oo = (e, t, n) => {
576
+ const o = [], s = to(e, t), i = "icons";
564
577
  let r = {
565
578
  type: i,
566
579
  provider: e,
567
580
  prefix: t,
568
581
  icons: []
569
582
  }, a = 0;
570
- return n.forEach((c, l) => {
571
- a += c.length + 1, a >= s && l > 0 && (o.push(r), r = {
583
+ return n.forEach((l, c) => {
584
+ a += l.length + 1, a >= s && c > 0 && (o.push(r), r = {
572
585
  type: i,
573
586
  provider: e,
574
587
  prefix: t,
575
588
  icons: []
576
- }, a = c.length), r.icons.push(c);
589
+ }, a = l.length), r.icons.push(l);
577
590
  }), o.push(r), o;
578
591
  };
579
- function oo(e) {
592
+ function so(e) {
580
593
  if (typeof e == "string") {
581
- const t = rt(e);
594
+ const t = at(e);
582
595
  if (t) return t.path;
583
596
  }
584
597
  return "/";
585
598
  }
586
- const so = (e, t, n) => {
587
- if (!Tt) {
599
+ const io = (e, t, n) => {
600
+ if (!kt) {
588
601
  n("abort", 424);
589
602
  return;
590
603
  }
591
- let o = oo(t.provider);
604
+ let o = so(t.provider);
592
605
  switch (t.type) {
593
606
  case "icons": {
594
607
  const i = t.prefix, r = t.icons.join(","), a = new URLSearchParams({ icons: r });
@@ -605,11 +618,11 @@ const so = (e, t, n) => {
605
618
  return;
606
619
  }
607
620
  let s = 503;
608
- Tt(e + o).then((i) => {
621
+ kt(e + o).then((i) => {
609
622
  const r = i.status;
610
623
  if (r !== 200) {
611
624
  setTimeout(() => {
612
- n(to(r) ? "abort" : "next", r);
625
+ n(no(r) ? "abort" : "next", r);
613
626
  });
614
627
  return;
615
628
  }
@@ -627,17 +640,17 @@ const so = (e, t, n) => {
627
640
  }).catch(() => {
628
641
  n("next", s);
629
642
  });
630
- }, io = {
631
- prepare: no,
632
- send: so
643
+ }, ro = {
644
+ prepare: oo,
645
+ send: io
633
646
  };
634
- function Jt(e, t) {
647
+ function Zt(e, t) {
635
648
  e.forEach((n) => {
636
649
  const o = n.loaderCallbacks;
637
650
  o && (n.loaderCallbacks = o.filter((s) => s.id !== t));
638
651
  });
639
652
  }
640
- function ro(e) {
653
+ function ao(e) {
641
654
  e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
642
655
  e.pendingCallbacksFlag = !1;
643
656
  const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
@@ -646,29 +659,29 @@ function ro(e) {
646
659
  const o = e.provider, s = e.prefix;
647
660
  t.forEach((i) => {
648
661
  const r = i.icons, a = r.pending.length;
649
- r.pending = r.pending.filter((c) => {
650
- if (c.prefix !== s) return !0;
651
- const l = c.name;
652
- if (e.icons[l]) r.loaded.push({
662
+ r.pending = r.pending.filter((l) => {
663
+ if (l.prefix !== s) return !0;
664
+ const c = l.name;
665
+ if (e.icons[c]) r.loaded.push({
653
666
  provider: o,
654
667
  prefix: s,
655
- name: l
668
+ name: c
656
669
  });
657
- else if (e.missing.has(l)) r.missing.push({
670
+ else if (e.missing.has(c)) r.missing.push({
658
671
  provider: o,
659
672
  prefix: s,
660
- name: l
673
+ name: c
661
674
  });
662
675
  else
663
676
  return n = !0, !0;
664
677
  return !1;
665
- }), r.pending.length !== a && (n || Jt([e], i.id), i.callback(r.loaded.slice(0), r.missing.slice(0), r.pending.slice(0), i.abort));
678
+ }), r.pending.length !== a && (n || Zt([e], i.id), i.callback(r.loaded.slice(0), r.missing.slice(0), r.pending.slice(0), i.abort));
666
679
  });
667
680
  }));
668
681
  }
669
- let ao = 0;
682
+ let co = 0;
670
683
  function lo(e, t, n) {
671
- const o = ao++, s = Jt.bind(null, n, o);
684
+ const o = co++, s = Zt.bind(null, n, o);
672
685
  if (!t.pending.length) return s;
673
686
  const i = {
674
687
  id: o,
@@ -680,7 +693,7 @@ function lo(e, t, n) {
680
693
  (r.loaderCallbacks || (r.loaderCallbacks = [])).push(i);
681
694
  }), s;
682
695
  }
683
- function co(e) {
696
+ function uo(e) {
684
697
  const t = {
685
698
  loaded: [],
686
699
  missing: [],
@@ -695,9 +708,9 @@ function co(e) {
695
708
  return e.forEach((s) => {
696
709
  if (o.name === s.name && o.prefix === s.prefix && o.provider === s.provider) return;
697
710
  o = s;
698
- const i = s.provider, r = s.prefix, a = s.name, c = n[i] || (n[i] = /* @__PURE__ */ Object.create(null)), l = c[r] || (c[r] = fe(i, r));
711
+ const i = s.provider, r = s.prefix, a = s.name, l = n[i] || (n[i] = /* @__PURE__ */ Object.create(null)), c = l[r] || (l[r] = de(i, r));
699
712
  let d;
700
- a in l.icons ? d = t.loaded : r === "" || l.missing.has(a) ? d = t.missing : d = t.pending;
713
+ a in c.icons ? d = t.loaded : r === "" || c.missing.has(a) ? d = t.missing : d = t.pending;
701
714
  const w = {
702
715
  provider: i,
703
716
  prefix: r,
@@ -706,14 +719,14 @@ function co(e) {
706
719
  d.push(w);
707
720
  }), t;
708
721
  }
709
- function uo(e, t = !0, n = !1) {
722
+ function fo(e, t = !0, n = !1) {
710
723
  const o = [];
711
724
  return e.forEach((s) => {
712
725
  const i = typeof s == "string" ? Ye(s, t, n) : s;
713
726
  i && o.push(i);
714
727
  }), o;
715
728
  }
716
- const fo = {
729
+ const po = {
717
730
  resources: [],
718
731
  index: 0,
719
732
  timeout: 2e3,
@@ -721,55 +734,55 @@ const fo = {
721
734
  random: !1,
722
735
  dataAfterTimeout: !1
723
736
  };
724
- function po(e, t, n, o) {
737
+ function ho(e, t, n, o) {
725
738
  const s = e.resources.length, i = e.random ? Math.floor(Math.random() * s) : e.index;
726
739
  let r;
727
740
  if (e.random) {
728
- let g = e.resources.slice(0);
729
- for (r = []; g.length > 1; ) {
730
- const B = Math.floor(Math.random() * g.length);
731
- r.push(g[B]), g = g.slice(0, B).concat(g.slice(B + 1));
741
+ let v = e.resources.slice(0);
742
+ for (r = []; v.length > 1; ) {
743
+ const M = Math.floor(Math.random() * v.length);
744
+ r.push(v[M]), v = v.slice(0, M).concat(v.slice(M + 1));
732
745
  }
733
- r = r.concat(g);
746
+ r = r.concat(v);
734
747
  } else r = e.resources.slice(i).concat(e.resources.slice(0, i));
735
748
  const a = Date.now();
736
- let c = "pending", l = 0, d, w = null, x = [], S = [];
749
+ let l = "pending", c = 0, d, w = null, x = [], S = [];
737
750
  typeof o == "function" && S.push(o);
738
- function y() {
751
+ function g() {
739
752
  w && (clearTimeout(w), w = null);
740
753
  }
741
754
  function I() {
742
- c === "pending" && (c = "aborted"), y(), x.forEach((g) => {
743
- g.status === "pending" && (g.status = "aborted");
755
+ l === "pending" && (l = "aborted"), g(), x.forEach((v) => {
756
+ v.status === "pending" && (v.status = "aborted");
744
757
  }), x = [];
745
758
  }
746
- function h(g, B) {
747
- B && (S = []), typeof g == "function" && S.push(g);
759
+ function h(v, M) {
760
+ M && (S = []), typeof v == "function" && S.push(v);
748
761
  }
749
- function F() {
762
+ function N() {
750
763
  return {
751
764
  startTime: a,
752
765
  payload: t,
753
- status: c,
754
- queriesSent: l,
766
+ status: l,
767
+ queriesSent: c,
755
768
  queriesPending: x.length,
756
769
  subscribe: h,
757
770
  abort: I
758
771
  };
759
772
  }
760
- function D() {
761
- c = "failed", S.forEach((g) => {
762
- g(void 0, d);
773
+ function O() {
774
+ l = "failed", S.forEach((v) => {
775
+ v(void 0, d);
763
776
  });
764
777
  }
765
778
  function b() {
766
- x.forEach((g) => {
767
- g.status === "pending" && (g.status = "aborted");
779
+ x.forEach((v) => {
780
+ v.status === "pending" && (v.status = "aborted");
768
781
  }), x = [];
769
782
  }
770
- function T(g, B, X) {
771
- const J = B !== "success";
772
- switch (x = x.filter((L) => L !== g), c) {
783
+ function T(v, M, W) {
784
+ const J = M !== "success";
785
+ switch (x = x.filter((E) => E !== v), l) {
773
786
  case "pending":
774
787
  break;
775
788
  case "failed":
@@ -778,61 +791,61 @@ function po(e, t, n, o) {
778
791
  default:
779
792
  return;
780
793
  }
781
- if (B === "abort") {
782
- d = X, D();
794
+ if (M === "abort") {
795
+ d = W, O();
783
796
  return;
784
797
  }
785
798
  if (J) {
786
- d = X, x.length || (r.length ? q() : D());
799
+ d = W, x.length || (r.length ? H() : O());
787
800
  return;
788
801
  }
789
- if (y(), b(), !e.random) {
790
- const L = e.resources.indexOf(g.resource);
791
- L !== -1 && L !== e.index && (e.index = L);
802
+ if (g(), b(), !e.random) {
803
+ const E = e.resources.indexOf(v.resource);
804
+ E !== -1 && E !== e.index && (e.index = E);
792
805
  }
793
- c = "completed", S.forEach((L) => {
794
- L(X);
806
+ l = "completed", S.forEach((E) => {
807
+ E(W);
795
808
  });
796
809
  }
797
- function q() {
798
- if (c !== "pending") return;
799
- y();
800
- const g = r.shift();
801
- if (g === void 0) {
810
+ function H() {
811
+ if (l !== "pending") return;
812
+ g();
813
+ const v = r.shift();
814
+ if (v === void 0) {
802
815
  if (x.length) {
803
816
  w = setTimeout(() => {
804
- y(), c === "pending" && (b(), D());
817
+ g(), l === "pending" && (b(), O());
805
818
  }, e.timeout);
806
819
  return;
807
820
  }
808
- D();
821
+ O();
809
822
  return;
810
823
  }
811
- const B = {
824
+ const M = {
812
825
  status: "pending",
813
- resource: g,
814
- callback: (X, J) => {
815
- T(B, X, J);
826
+ resource: v,
827
+ callback: (W, J) => {
828
+ T(M, W, J);
816
829
  }
817
830
  };
818
- x.push(B), l++, w = setTimeout(q, e.rotate), n(g, t, B.callback);
831
+ x.push(M), c++, w = setTimeout(H, e.rotate), n(v, t, M.callback);
819
832
  }
820
- return setTimeout(q), F;
833
+ return setTimeout(H), N;
821
834
  }
822
- function Zt(e) {
835
+ function _t(e) {
823
836
  const t = {
824
- ...fo,
837
+ ...po,
825
838
  ...e
826
839
  };
827
840
  let n = [];
828
841
  function o() {
829
842
  n = n.filter((r) => r().status === "pending");
830
843
  }
831
- function s(r, a, c) {
832
- const l = po(t, r, a, (d, w) => {
833
- o(), c && c(d, w);
844
+ function s(r, a, l) {
845
+ const c = ho(t, r, a, (d, w) => {
846
+ o(), l && l(d, w);
834
847
  });
835
- return n.push(l), l;
848
+ return n.push(c), c;
836
849
  }
837
850
  function i(r) {
838
851
  return n.find((a) => r(a)) || null;
@@ -847,56 +860,56 @@ function Zt(e) {
847
860
  cleanup: o
848
861
  };
849
862
  }
850
- function kt() {
863
+ function It() {
851
864
  }
852
865
  const We = /* @__PURE__ */ Object.create(null);
853
- function ho(e) {
866
+ function mo(e) {
854
867
  if (!We[e]) {
855
- const t = rt(e);
868
+ const t = at(e);
856
869
  if (!t) return;
857
870
  We[e] = {
858
871
  config: t,
859
- redundancy: Zt(t)
872
+ redundancy: _t(t)
860
873
  };
861
874
  }
862
875
  return We[e];
863
876
  }
864
- function mo(e, t, n) {
877
+ function go(e, t, n) {
865
878
  let o, s;
866
879
  if (typeof e == "string") {
867
- const i = et(e);
880
+ const i = tt(e);
868
881
  if (!i)
869
- return n(void 0, 424), kt;
882
+ return n(void 0, 424), It;
870
883
  s = i.send;
871
- const r = ho(e);
884
+ const r = mo(e);
872
885
  r && (o = r.redundancy);
873
886
  } else {
874
- const i = st(e);
887
+ const i = it(e);
875
888
  if (i) {
876
- o = Zt(i);
877
- const r = et(e.resources ? e.resources[0] : "");
889
+ o = _t(i);
890
+ const r = tt(e.resources ? e.resources[0] : "");
878
891
  r && (s = r.send);
879
892
  }
880
893
  }
881
- return !o || !s ? (n(void 0, 424), kt) : o.query(t, s, n)().abort;
894
+ return !o || !s ? (n(void 0, 424), It) : o.query(t, s, n)().abort;
882
895
  }
883
- function It() {
896
+ function St() {
884
897
  }
885
- function go(e) {
898
+ function vo(e) {
886
899
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
887
- e.iconsLoaderFlag = !1, ro(e);
900
+ e.iconsLoaderFlag = !1, ao(e);
888
901
  }));
889
902
  }
890
- function vo(e) {
903
+ function yo(e) {
891
904
  const t = [], n = [];
892
905
  return e.forEach((o) => {
893
- (o.match(Yt) ? t : n).push(o);
906
+ (o.match(zt) ? t : n).push(o);
894
907
  }), {
895
908
  valid: t,
896
909
  invalid: n
897
910
  };
898
911
  }
899
- function ke(e, t, n) {
912
+ function Te(e, t, n) {
900
913
  function o() {
901
914
  const s = e.pendingIcons;
902
915
  t.forEach((i) => {
@@ -904,65 +917,65 @@ function ke(e, t, n) {
904
917
  });
905
918
  }
906
919
  if (n && typeof n == "object") try {
907
- if (!Xt(e, n).length) {
920
+ if (!Wt(e, n).length) {
908
921
  o();
909
922
  return;
910
923
  }
911
924
  } catch (s) {
912
925
  console.error(s);
913
926
  }
914
- o(), go(e);
927
+ o(), vo(e);
915
928
  }
916
- function St(e, t) {
929
+ function Et(e, t) {
917
930
  e instanceof Promise ? e.then((n) => {
918
931
  t(n);
919
932
  }).catch(() => {
920
933
  t(null);
921
934
  }) : t(e);
922
935
  }
923
- function yo(e, t) {
936
+ function wo(e, t) {
924
937
  e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
925
938
  e.iconsQueueFlag = !1;
926
939
  const { provider: n, prefix: o } = e, s = e.iconsToLoad;
927
940
  if (delete e.iconsToLoad, !s || !s.length) return;
928
941
  const i = e.loadIcon;
929
942
  if (e.loadIcons && (s.length > 1 || !i)) {
930
- St(e.loadIcons(s, o, n), (l) => {
931
- ke(e, s, l);
943
+ Et(e.loadIcons(s, o, n), (c) => {
944
+ Te(e, s, c);
932
945
  });
933
946
  return;
934
947
  }
935
948
  if (i) {
936
- s.forEach((l) => {
937
- St(i(l, o, n), (d) => {
938
- ke(e, [l], d ? {
949
+ s.forEach((c) => {
950
+ Et(i(c, o, n), (d) => {
951
+ Te(e, [c], d ? {
939
952
  prefix: o,
940
- icons: { [l]: d }
953
+ icons: { [c]: d }
941
954
  } : null);
942
955
  });
943
956
  });
944
957
  return;
945
958
  }
946
- const { valid: r, invalid: a } = vo(s);
947
- if (a.length && ke(e, a, null), !r.length) return;
948
- const c = o.match(Yt) ? et(n) : null;
949
- if (!c) {
950
- ke(e, r, null);
959
+ const { valid: r, invalid: a } = yo(s);
960
+ if (a.length && Te(e, a, null), !r.length) return;
961
+ const l = o.match(zt) ? tt(n) : null;
962
+ if (!l) {
963
+ Te(e, r, null);
951
964
  return;
952
965
  }
953
- c.prepare(n, o, r).forEach((l) => {
954
- mo(n, l, (d) => {
955
- ke(e, l.icons, d);
966
+ l.prepare(n, o, r).forEach((c) => {
967
+ go(n, c, (d) => {
968
+ Te(e, c.icons, d);
956
969
  });
957
970
  });
958
971
  }));
959
972
  }
960
- const wo = (e, t) => {
961
- const n = co(uo(e, !0, Wt()));
973
+ const xo = (e, t) => {
974
+ const n = uo(fo(e, !0, Gt()));
962
975
  if (!n.pending.length) {
963
976
  let a = !0;
964
977
  return t && setTimeout(() => {
965
- a && t(n.loaded, n.missing, n.pending, It);
978
+ a && t(n.loaded, n.missing, n.pending, St);
966
979
  }), () => {
967
980
  a = !1;
968
981
  };
@@ -970,30 +983,30 @@ const wo = (e, t) => {
970
983
  const o = /* @__PURE__ */ Object.create(null), s = [];
971
984
  let i, r;
972
985
  return n.pending.forEach((a) => {
973
- const { provider: c, prefix: l } = a;
974
- if (l === r && c === i) return;
975
- i = c, r = l, s.push(fe(c, l));
976
- const d = o[c] || (o[c] = /* @__PURE__ */ Object.create(null));
977
- d[l] || (d[l] = []);
986
+ const { provider: l, prefix: c } = a;
987
+ if (c === r && l === i) return;
988
+ i = l, r = c, s.push(de(l, c));
989
+ const d = o[l] || (o[l] = /* @__PURE__ */ Object.create(null));
990
+ d[c] || (d[c] = []);
978
991
  }), n.pending.forEach((a) => {
979
- const { provider: c, prefix: l, name: d } = a, w = fe(c, l), x = w.pendingIcons || (w.pendingIcons = /* @__PURE__ */ new Set());
980
- x.has(d) || (x.add(d), o[c][l].push(d));
992
+ const { provider: l, prefix: c, name: d } = a, w = de(l, c), x = w.pendingIcons || (w.pendingIcons = /* @__PURE__ */ new Set());
993
+ x.has(d) || (x.add(d), o[l][c].push(d));
981
994
  }), s.forEach((a) => {
982
- const c = o[a.provider][a.prefix];
983
- c.length && yo(a, c);
984
- }), t ? lo(t, n, s) : It;
995
+ const l = o[a.provider][a.prefix];
996
+ l.length && wo(a, l);
997
+ }), t ? lo(t, n, s) : St;
985
998
  };
986
- function xo(e, t) {
999
+ function bo(e, t) {
987
1000
  const n = { ...e };
988
1001
  for (const o in t) {
989
1002
  const s = t[o], i = typeof s;
990
- o in Gt ? (s === null || s && (i === "string" || i === "number")) && (n[o] = s) : i === typeof n[o] && (n[o] = o === "rotate" ? s % 4 : s);
1003
+ o in Kt ? (s === null || s && (i === "string" || i === "number")) && (n[o] = s) : i === typeof n[o] && (n[o] = o === "rotate" ? s % 4 : s);
991
1004
  }
992
1005
  return n;
993
1006
  }
994
- const bo = /[\s,]+/;
995
- function To(e, t) {
996
- t.split(bo).forEach((n) => {
1007
+ const To = /[\s,]+/;
1008
+ function ko(e, t) {
1009
+ t.split(To).forEach((n) => {
997
1010
  switch (n.trim()) {
998
1011
  case "horizontal":
999
1012
  e.hFlip = !0;
@@ -1004,7 +1017,7 @@ function To(e, t) {
1004
1017
  }
1005
1018
  });
1006
1019
  }
1007
- function ko(e, t = 0) {
1020
+ function Io(e, t = 0) {
1008
1021
  const n = e.replace(/^-?[0-9.]*/, "");
1009
1022
  function o(s) {
1010
1023
  for (; s < 0; ) s += 4;
@@ -1029,22 +1042,22 @@ function ko(e, t = 0) {
1029
1042
  }
1030
1043
  return t;
1031
1044
  }
1032
- function Io(e, t) {
1045
+ function So(e, t) {
1033
1046
  let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1034
1047
  for (const o in t) n += " " + o + '="' + t[o] + '"';
1035
1048
  return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
1036
1049
  }
1037
- function So(e) {
1038
- return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1039
- }
1040
1050
  function Eo(e) {
1041
- return "data:image/svg+xml," + So(e);
1051
+ return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1042
1052
  }
1043
1053
  function Po(e) {
1044
- return 'url("' + Eo(e) + '")';
1054
+ return "data:image/svg+xml," + Eo(e);
1045
1055
  }
1046
- const Et = {
1047
- ...Kt,
1056
+ function Lo(e) {
1057
+ return 'url("' + Po(e) + '")';
1058
+ }
1059
+ const Pt = {
1060
+ ...Jt,
1048
1061
  inline: !1
1049
1062
  }, Co = {
1050
1063
  xmlns: "http://www.w3.org/2000/svg",
@@ -1053,23 +1066,23 @@ const Et = {
1053
1066
  role: "img"
1054
1067
  }, Ao = {
1055
1068
  display: "inline-block"
1056
- }, tt = {
1069
+ }, nt = {
1057
1070
  backgroundColor: "currentColor"
1058
- }, _t = {
1071
+ }, en = {
1059
1072
  backgroundColor: "transparent"
1060
- }, Pt = {
1073
+ }, Lt = {
1061
1074
  Image: "var(--svg)",
1062
1075
  Repeat: "no-repeat",
1063
1076
  Size: "100% 100%"
1064
1077
  }, Ct = {
1065
- webkitMask: tt,
1066
- mask: tt,
1067
- background: _t
1078
+ webkitMask: nt,
1079
+ mask: nt,
1080
+ background: en
1068
1081
  };
1069
1082
  for (const e in Ct) {
1070
1083
  const t = Ct[e];
1071
- for (const n in Pt)
1072
- t[e + n] = Pt[n];
1084
+ for (const n in Lt)
1085
+ t[e + n] = Lt[n];
1073
1086
  }
1074
1087
  const Re = {};
1075
1088
  ["horizontal", "vertical"].forEach((e) => {
@@ -1079,8 +1092,8 @@ const Re = {};
1079
1092
  function At(e) {
1080
1093
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
1081
1094
  }
1082
- const Lt = (e, t) => {
1083
- const n = xo(Et, t), o = { ...Co }, s = t.mode || "svg", i = {}, r = t.style, a = typeof r == "object" && !(r instanceof Array) ? r : {};
1095
+ const Ot = (e, t) => {
1096
+ const n = bo(Pt, t), o = { ...Co }, s = t.mode || "svg", i = {}, r = t.style, a = typeof r == "object" && !(r instanceof Array) ? r : {};
1084
1097
  for (let I in t) {
1085
1098
  const h = t[I];
1086
1099
  if (h !== void 0)
@@ -1098,47 +1111,47 @@ const Lt = (e, t) => {
1098
1111
  n[I] = h === !0 || h === "true" || h === 1;
1099
1112
  break;
1100
1113
  case "flip":
1101
- typeof h == "string" && To(n, h);
1114
+ typeof h == "string" && ko(n, h);
1102
1115
  break;
1103
1116
  case "color":
1104
1117
  i.color = h;
1105
1118
  break;
1106
1119
  case "rotate":
1107
- typeof h == "string" ? n[I] = ko(h) : typeof h == "number" && (n[I] = h);
1120
+ typeof h == "string" ? n[I] = Io(h) : typeof h == "number" && (n[I] = h);
1108
1121
  break;
1109
1122
  case "ariaHidden":
1110
1123
  case "aria-hidden":
1111
1124
  h !== !0 && h !== "true" && delete o["aria-hidden"];
1112
1125
  break;
1113
1126
  default: {
1114
- const F = Re[I];
1115
- F ? (h === !0 || h === "true" || h === 1) && (n[F] = !0) : Et[I] === void 0 && (o[I] = h);
1127
+ const N = Re[I];
1128
+ N ? (h === !0 || h === "true" || h === 1) && (n[N] = !0) : Pt[I] === void 0 && (o[I] = h);
1116
1129
  }
1117
1130
  }
1118
1131
  }
1119
- const c = Xn(e, n), l = c.attributes;
1132
+ const l = Wn(e, n), c = l.attributes;
1120
1133
  if (n.inline && (i.verticalAlign = "-0.125em"), s === "svg")
1121
1134
  return o.style = {
1122
1135
  ...i,
1123
1136
  ...a
1124
- }, Object.assign(o, l), o.innerHTML = Kn(c.body), Ge("svg", o);
1125
- const { body: d, width: w, height: x } = e, S = s === "mask" || (s === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = Io(d, {
1126
- ...l,
1137
+ }, Object.assign(o, c), o.innerHTML = Jn(l.body), Ge("svg", o);
1138
+ const { body: d, width: w, height: x } = e, S = s === "mask" || (s === "bg" ? !1 : d.indexOf("currentColor") !== -1), g = So(d, {
1139
+ ...c,
1127
1140
  width: w + "",
1128
1141
  height: x + ""
1129
1142
  });
1130
1143
  return o.style = {
1131
1144
  ...i,
1132
- "--svg": Po(y),
1133
- width: At(l.width),
1134
- height: At(l.height),
1145
+ "--svg": Lo(g),
1146
+ width: At(c.width),
1147
+ height: At(c.height),
1135
1148
  ...Ao,
1136
- ...S ? tt : _t,
1149
+ ...S ? nt : en,
1137
1150
  ...a
1138
1151
  }, Ge("span", o);
1139
1152
  };
1140
- Wt(!0);
1141
- Jn("", io);
1153
+ Gt(!0);
1154
+ Zn("", ro);
1142
1155
  if (typeof document < "u" && typeof window < "u") {
1143
1156
  const e = window;
1144
1157
  if (e.IconifyPreload !== void 0) {
@@ -1148,7 +1161,7 @@ if (typeof document < "u" && typeof window < "u") {
1148
1161
  // Check if item is an object and not null/array
1149
1162
  (typeof o != "object" || o === null || o instanceof Array || // Check for 'icons' and 'prefix'
1150
1163
  typeof o.icons != "object" || typeof o.prefix != "string" || // Add icon set
1151
- !Hn(o)) && console.error(n);
1164
+ !qn(o)) && console.error(n);
1152
1165
  } catch {
1153
1166
  console.error(n);
1154
1167
  }
@@ -1163,72 +1176,72 @@ if (typeof document < "u" && typeof window < "u") {
1163
1176
  const s = t[n];
1164
1177
  if (typeof s != "object" || !s || s.resources === void 0)
1165
1178
  continue;
1166
- Zn(n, s) || console.error(o);
1179
+ _n(n, s) || console.error(o);
1167
1180
  } catch {
1168
1181
  console.error(o);
1169
1182
  }
1170
1183
  }
1171
1184
  }
1172
1185
  }
1173
- const Lo = {
1186
+ const Oo = {
1174
1187
  ...ze,
1175
1188
  body: ""
1176
- }, en = pe((e, { emit: t }) => {
1189
+ }, tn = pe((e, { emit: t }) => {
1177
1190
  const n = R(null);
1178
1191
  function o() {
1179
- var l, d;
1180
- n.value && ((d = (l = n.value).abort) == null || d.call(l), n.value = null);
1192
+ var c, d;
1193
+ n.value && ((d = (c = n.value).abort) == null || d.call(c), n.value = null);
1181
1194
  }
1182
- const s = R(!!e.ssr), i = R(""), r = cn(null);
1195
+ const s = R(!!e.ssr), i = R(""), r = un(null);
1183
1196
  function a() {
1184
- const l = e.icon;
1185
- if (typeof l == "object" && l !== null && typeof l.body == "string")
1197
+ const c = e.icon;
1198
+ if (typeof c == "object" && c !== null && typeof c.body == "string")
1186
1199
  return i.value = "", {
1187
- data: l
1200
+ data: c
1188
1201
  };
1189
1202
  let d;
1190
- if (typeof l != "string" || (d = Ye(l, !1, !0)) === null)
1203
+ if (typeof c != "string" || (d = Ye(c, !1, !0)) === null)
1191
1204
  return null;
1192
- let w = Nn(d);
1205
+ let w = Hn(d);
1193
1206
  if (!w) {
1194
- const y = n.value;
1195
- return (!y || y.name !== l) && (w === null ? n.value = {
1196
- name: l
1207
+ const g = n.value;
1208
+ return (!g || g.name !== c) && (w === null ? n.value = {
1209
+ name: c
1197
1210
  } : n.value = {
1198
- name: l,
1199
- abort: wo([d], c)
1211
+ name: c,
1212
+ abort: xo([d], l)
1200
1213
  }), null;
1201
1214
  }
1202
- o(), i.value !== l && (i.value = l, Ie(() => {
1203
- t("load", l);
1215
+ o(), i.value !== c && (i.value = c, ke(() => {
1216
+ t("load", c);
1204
1217
  }));
1205
1218
  const x = e.customise;
1206
1219
  if (x) {
1207
1220
  w = Object.assign({}, w);
1208
- const y = x(w.body, d.name, d.prefix, d.provider);
1209
- typeof y == "string" && (w.body = y);
1221
+ const g = x(w.body, d.name, d.prefix, d.provider);
1222
+ typeof g == "string" && (w.body = g);
1210
1223
  }
1211
1224
  const S = ["iconify"];
1212
1225
  return d.prefix !== "" && S.push("iconify--" + d.prefix), d.provider !== "" && S.push("iconify--" + d.provider), { data: w, classes: S };
1213
1226
  }
1214
- function c() {
1227
+ function l() {
1215
1228
  var d;
1216
- const l = a();
1217
- l ? l.data !== ((d = r.value) == null ? void 0 : d.data) && (r.value = l) : r.value = null;
1229
+ const c = a();
1230
+ c ? c.data !== ((d = r.value) == null ? void 0 : d.data) && (r.value = c) : r.value = null;
1218
1231
  }
1219
- return s.value ? c() : qe(() => {
1220
- s.value = !0, c();
1221
- }), G(() => e.icon, c), Ve(o), () => {
1222
- const l = r.value;
1223
- if (!l)
1224
- return Lt(Lo, e);
1232
+ return s.value ? l() : qe(() => {
1233
+ s.value = !0, l();
1234
+ }), G(() => e.icon, l), Ve(o), () => {
1235
+ const c = r.value;
1236
+ if (!c)
1237
+ return Ot(Oo, e);
1225
1238
  let d = e;
1226
- return l.classes && (d = {
1239
+ return c.classes && (d = {
1227
1240
  ...e,
1228
- class: l.classes.join(" ")
1229
- }), Lt({
1241
+ class: c.classes.join(" ")
1242
+ }), Ot({
1230
1243
  ...ze,
1231
- ...l.data
1244
+ ...c.data
1232
1245
  }, d);
1233
1246
  };
1234
1247
  }, {
@@ -1258,38 +1271,38 @@ const Lo = {
1258
1271
  ],
1259
1272
  emits: ["load"]
1260
1273
  });
1261
- let Ot = !1;
1274
+ let Mt = !1;
1262
1275
  const ue = {
1263
1276
  width: 24,
1264
1277
  height: 24
1265
- }, tn = () => {
1266
- Ot || (Ot = !0, se("lucide:circle-check", {
1278
+ }, nn = () => {
1279
+ Mt || (Mt = !0, ie("lucide:circle-check", {
1267
1280
  ...ue,
1268
1281
  body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m9 12l2 2l4-4"/></g>'
1269
- }), se("lucide:circle-x", {
1282
+ }), ie("lucide:circle-x", {
1270
1283
  ...ue,
1271
1284
  body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m15 9l-6 6m0-6l6 6"/></g>'
1272
- }), se("lucide:triangle-alert", {
1285
+ }), ie("lucide:triangle-alert", {
1273
1286
  ...ue,
1274
1287
  body: '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01"/>'
1275
- }), se("lucide:info", {
1288
+ }), ie("lucide:info", {
1276
1289
  ...ue,
1277
1290
  body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4m0-4h.01"/></g>'
1278
- }), se("lucide:bell", {
1291
+ }), ie("lucide:bell", {
1279
1292
  ...ue,
1280
1293
  body: '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.268 21a2 2 0 0 0 3.464 0m-10.47-5.674A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/>'
1281
- }), se("lucide:loader-circle", {
1294
+ }), ie("lucide:loader-circle", {
1282
1295
  ...ue,
1283
1296
  body: '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 1 1-6.219-8.56"/>'
1284
1297
  }));
1285
- }, Oo = { class: "soft-toast-icon" }, Mt = /* @__PURE__ */ pe({
1298
+ }, Mo = { class: "soft-toast-icon" }, Dt = /* @__PURE__ */ pe({
1286
1299
  __name: "ToastIcon",
1287
1300
  props: {
1288
1301
  type: {},
1289
1302
  customIcon: {}
1290
1303
  },
1291
1304
  setup(e) {
1292
- tn();
1305
+ nn();
1293
1306
  const t = e, n = {
1294
1307
  success: "lucide:circle-check",
1295
1308
  error: "lucide:circle-x",
@@ -1297,8 +1310,8 @@ const ue = {
1297
1310
  info: "lucide:info",
1298
1311
  default: "lucide:bell"
1299
1312
  }, o = () => t.customIcon ? t.customIcon : n[t.type] || n.default;
1300
- return (s, i) => (E(), $("span", Oo, [
1301
- ot($t(en), {
1313
+ return (s, i) => (P(), $("span", Mo, [
1314
+ st(Nt(tn), {
1302
1315
  class: "soft-toast-icon-svg",
1303
1316
  icon: o(),
1304
1317
  width: 18,
@@ -1328,32 +1341,32 @@ const ue = {
1328
1341
  duration: 0.5
1329
1342
  }
1330
1343
  };
1331
- O.defaults({ overwrite: "auto" });
1332
- const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches, de = (e) => Mo ? e * 0.65 : e, Do = 0.22, nt = "power2.out", Fo = (e) => {
1344
+ F.defaults({ overwrite: "auto" });
1345
+ const Do = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches, fe = (e) => Do ? e * 0.65 : e, Fo = 0.22, ot = "power2.out", Bo = (e) => {
1333
1346
  const t = 0.8 + e * 0.8, n = 0.55 - e * 0.15;
1334
1347
  return `elastic.out(${t.toFixed(2)}, ${n.toFixed(2)})`;
1335
- }, Bo = (e, t, n) => Math.max(t, Math.min(n, e)), Dt = (e, t) => {
1336
- const n = Number(O.getProperty(e, "y")) || 0, o = t.y - n, s = Math.abs(o);
1337
- return s < 0.5 ? O.to(e, {
1348
+ }, jo = (e, t, n) => Math.max(t, Math.min(n, e)), Ft = (e, t) => {
1349
+ const n = Number(F.getProperty(e, "y")) || 0, o = t.y - n, s = Math.abs(o);
1350
+ return s < 0.5 ? F.to(e, {
1338
1351
  y: t.y,
1339
1352
  scale: t.scale,
1340
1353
  opacity: t.opacity,
1341
1354
  force3D: !0,
1342
1355
  overwrite: !0,
1343
- duration: Do,
1344
- ease: nt
1345
- }) : O.to(e, {
1356
+ duration: Fo,
1357
+ ease: ot
1358
+ }) : F.to(e, {
1346
1359
  y: t.y,
1347
1360
  scale: t.scale,
1348
1361
  opacity: t.opacity,
1349
1362
  force3D: !0,
1350
1363
  overwrite: !0,
1351
- duration: de(Bo(0.34 + s * 3e-3, 0.36, 0.46)),
1364
+ duration: fe(jo(0.34 + s * 3e-3, 0.36, 0.46)),
1352
1365
  ease: "sine.out"
1353
1366
  });
1354
- }, jo = (e, t = {}) => {
1355
- const { direction: n = "up", preset: o = "smooth" } = t, s = He[o] || He.smooth, i = n === "down" ? -14 : 14, r = de(Math.min(s.duration, 0.46)), a = o === "bouncy" ? "back.out(1.35)" : nt, c = O.timeline(), l = e.querySelector(".soft-toast-extra");
1356
- return l && O.set(l, { height: 0, opacity: 0 }), c.fromTo(
1367
+ }, Ro = (e, t = {}) => {
1368
+ const { direction: n = "up", preset: o = "smooth" } = t, s = He[o] || He.smooth, i = n === "down" ? -14 : 14, r = fe(Math.min(s.duration, 0.46)), a = o === "bouncy" ? "back.out(1.35)" : ot, l = F.timeline(), c = e.querySelector(".soft-toast-extra");
1369
+ return c && F.set(c, { height: 0, opacity: 0 }), l.fromTo(
1357
1370
  e,
1358
1371
  { y: i, opacity: 0, scale: 0.94 },
1359
1372
  {
@@ -1364,35 +1377,38 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1364
1377
  ease: a,
1365
1378
  transformOrigin: n === "down" ? "top center" : "bottom center"
1366
1379
  }
1367
- ), l && c.to(l, {
1380
+ ), c && l.to(c, {
1368
1381
  height: "auto",
1369
1382
  opacity: 1,
1370
- duration: de(0.36),
1383
+ duration: fe(0.36),
1371
1384
  force3D: !0,
1372
- ease: nt,
1385
+ ease: ot,
1373
1386
  clearProps: "overflow"
1374
- }, "-=0.32"), c;
1375
- }, Ro = (e) => O.to(e, {
1376
- scale: 0.8,
1377
- opacity: 0,
1378
- force3D: !0,
1379
- overwrite: "auto",
1380
- duration: 0.25,
1381
- ease: "power2.out"
1382
- }), $o = (e, t) => O.to(e, {
1387
+ }, "-=0.32"), l;
1388
+ }, $o = (e) => {
1389
+ const t = F.timeline();
1390
+ return t.to(e, {
1391
+ scale: 0.85,
1392
+ opacity: 0,
1393
+ force3D: !0,
1394
+ overwrite: "auto",
1395
+ duration: 0.2,
1396
+ ease: "power2.out"
1397
+ }), t.to(e, {
1398
+ height: 0,
1399
+ paddingTop: 0,
1400
+ paddingBottom: 0,
1401
+ marginBottom: 0,
1402
+ duration: 0.14,
1403
+ ease: "power2.in"
1404
+ }, "-=0.05"), t;
1405
+ }, No = (e, t) => F.to(e, {
1383
1406
  x: t,
1384
1407
  opacity: 0,
1385
1408
  force3D: !0,
1386
1409
  overwrite: "auto",
1387
1410
  duration: 0.28,
1388
1411
  ease: "power3.out"
1389
- }), No = (e) => O.to(e, {
1390
- x: 0,
1391
- opacity: 1,
1392
- force3D: !0,
1393
- overwrite: "auto",
1394
- duration: de(0.45),
1395
- ease: "elastic.out(1, 0.55)"
1396
1412
  }), Ho = (e, t) => {
1397
1413
  const {
1398
1414
  index: n,
@@ -1401,49 +1417,64 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1401
1417
  bounce: i = 0.4,
1402
1418
  spring: r = !0,
1403
1419
  direction: a = "up",
1404
- expandedOffset: c = 0,
1405
- liftPx: l = 14,
1420
+ expandedOffset: l = 0,
1421
+ liftPx: c = 14,
1406
1422
  scaleStep: d = 0.055,
1407
1423
  opacityStep: w = 0.2,
1408
1424
  maxVisible: x = 3,
1409
- reposition: S = !1
1410
- } = t, y = He[s] || He.smooth, I = a === "up" ? -1 : 1;
1425
+ reposition: S = !1,
1426
+ resetSwipe: g = !1
1427
+ } = t, I = He[s] || He.smooth, h = a === "up" ? -1 : 1;
1411
1428
  if (o) {
1412
- const g = {
1413
- y: c * I,
1429
+ const M = {
1430
+ x: g ? 0 : void 0,
1431
+ y: l * h,
1414
1432
  scale: 1,
1415
- opacity: 1
1433
+ opacity: 1,
1434
+ rotate: g ? 0 : void 0
1416
1435
  };
1417
- return S && r ? Dt(e, g) : O.to(e, {
1418
- ...g,
1436
+ return S && r && !g ? Ft(e, M) : F.to(e, {
1437
+ ...M,
1419
1438
  force3D: !0,
1420
- overwrite: "auto",
1421
- duration: de(0.12),
1422
- ease: "power2.out"
1439
+ overwrite: !0,
1440
+ duration: fe(g ? 0.34 : 0.12),
1441
+ ease: g ? "elastic.out(1, 0.55)" : "power2.out"
1423
1442
  });
1424
1443
  }
1425
- const h = n >= x, F = Math.min(n, x), D = F * l * I, b = 1 - F * d, T = h ? 0 : Math.max(0, 1 - F * w);
1444
+ const N = n >= x, O = Math.min(n, x), b = O * c * h, T = 1 - O * d, H = N ? 0 : Math.max(0, 1 - O * w);
1426
1445
  if (S && r)
1427
- return Dt(e, {
1428
- y: D,
1429
- scale: b,
1430
- opacity: T
1446
+ return g ? F.to(e, {
1447
+ x: 0,
1448
+ y: b,
1449
+ scale: T,
1450
+ opacity: H,
1451
+ rotate: 0,
1452
+ force3D: !0,
1453
+ overwrite: !0,
1454
+ duration: fe(0.38),
1455
+ ease: "elastic.out(1, 0.55)"
1456
+ }) : Ft(e, {
1457
+ y: b,
1458
+ scale: T,
1459
+ opacity: H
1431
1460
  });
1432
- const q = r ? Fo(i) : y.ease;
1433
- return O.to(e, {
1434
- y: D,
1435
- scale: b,
1436
- opacity: T,
1461
+ const v = r ? Bo(i) : I.ease;
1462
+ return F.to(e, {
1463
+ x: g ? 0 : void 0,
1464
+ y: b,
1465
+ scale: T,
1466
+ opacity: H,
1467
+ rotate: g ? 0 : void 0,
1437
1468
  force3D: !0,
1438
- overwrite: "auto",
1439
- duration: de(y.duration * 0.85),
1440
- ease: q
1469
+ overwrite: g ? !0 : "auto",
1470
+ duration: fe(g ? 0.38 : I.duration * 0.85),
1471
+ ease: g ? "elastic.out(1, 0.55)" : v
1441
1472
  });
1442
- }, qo = (e, t, n) => O.fromTo(
1473
+ }, qo = (e, t, n) => F.fromTo(
1443
1474
  e,
1444
1475
  { scaleX: 1 },
1445
1476
  { scaleX: 0, duration: t / 1e3, ease: "linear", onComplete: n }
1446
- ), Ft = (e) => e.pause(), Vo = (e) => e.play(), Yo = (e) => O.killTweensOf(e), zo = { class: "soft-toast-progress" }, Qo = /* @__PURE__ */ pe({
1477
+ ), Bt = (e) => e.pause(), Vo = (e) => e.play(), Yo = (e) => F.killTweensOf(e), zo = { class: "soft-toast-progress" }, Qo = /* @__PURE__ */ pe({
1447
1478
  __name: "ToastProgress",
1448
1479
  props: {
1449
1480
  remainingTime: {},
@@ -1456,13 +1487,13 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1456
1487
  n.value && (o.value = qo(
1457
1488
  n.value,
1458
1489
  t.remainingTime
1459
- ), t.isPaused && Ft(o.value));
1490
+ ), t.isPaused && Bt(o.value));
1460
1491
  }), G(() => t.isPaused, (s) => {
1461
- o.value && (s ? Ft(o.value) : Vo(o.value));
1492
+ o.value && (s ? Bt(o.value) : Vo(o.value));
1462
1493
  }), Ve(() => {
1463
1494
  var s;
1464
1495
  (s = o.value) == null || s.kill();
1465
- }), (s, i) => (E(), $("div", zo, [
1496
+ }), (s, i) => (P(), $("div", zo, [
1466
1497
  Q(
1467
1498
  "div",
1468
1499
  {
@@ -1501,7 +1532,7 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1501
1532
  }, is = {
1502
1533
  key: 1,
1503
1534
  class: "soft-toast-timestamp"
1504
- }, Bt = /* @__PURE__ */ pe({
1535
+ }, jt = /* @__PURE__ */ pe({
1505
1536
  __name: "ToastItem",
1506
1537
  props: {
1507
1538
  toast: {},
@@ -1516,23 +1547,23 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1516
1547
  interactive: { type: Boolean, default: !0 }
1517
1548
  },
1518
1549
  setup(e, { expose: t }) {
1519
- tn();
1550
+ nn();
1520
1551
  const n = e, o = R(null), s = R(!1), i = R("");
1521
1552
  let r = !1;
1522
- const a = z(() => new Date(n.toast.createdAt).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })), c = z(() => n.swipeToDismiss !== !1), l = () => {
1523
- var N, H;
1553
+ const a = z(() => new Date(n.toast.createdAt).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })), l = z(() => n.swipeToDismiss !== !1), c = () => {
1554
+ var B, q;
1524
1555
  if (r || !o.value) return;
1525
- const p = n.toast.id, P = n.toast.isLeaving;
1526
- r = !0, n.toast.isLeaving = !0, P || (H = (N = n.toast).onDismiss) == null || H.call(N, p), g !== null && window.clearTimeout(g), g = window.setTimeout(() => {
1527
- v.remove(p), g = null;
1528
- }, 320), Ro(o.value);
1556
+ const p = n.toast.id, L = n.toast.isLeaving;
1557
+ r = !0, n.toast.isLeaving = !0, L || (q = (B = n.toast).onDismiss) == null || q.call(B, p), v !== null && window.clearTimeout(v), v = window.setTimeout(() => {
1558
+ y.remove(p), v = null;
1559
+ }, 320), $o(o.value);
1529
1560
  }, d = async (p) => {
1530
1561
  if (p)
1531
1562
  try {
1532
- await p.onClick(), p.successLabel && (s.value = !0, i.value = p.successLabel, setTimeout(l, 1200));
1563
+ await p.onClick(), p.successLabel && (s.value = !0, i.value = p.successLabel, setTimeout(c, 1200));
1533
1564
  } catch {
1534
1565
  }
1535
- }, w = z(() => n.toast.action ? Array.isArray(n.toast.action) ? n.toast.action : [n.toast.action] : []), x = (p = !1, P) => {
1566
+ }, w = z(() => n.toast.action ? Array.isArray(n.toast.action) ? n.toast.action : [n.toast.action] : []), x = (p = !1, L, B = !1) => {
1536
1567
  !o.value || n.toast.isLeaving || h || Ho(o.value, {
1537
1568
  index: n.index,
1538
1569
  expanded: n.expanded,
@@ -1540,95 +1571,102 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1540
1571
  bounce: n.toast.bounce,
1541
1572
  spring: n.toast.spring,
1542
1573
  direction: n.stackDirection,
1543
- expandedOffset: P ?? n.expandedOffset,
1544
- reposition: p
1574
+ expandedOffset: L ?? n.expandedOffset,
1575
+ reposition: p,
1576
+ resetSwipe: B
1545
1577
  });
1546
1578
  };
1547
- let S = 0, y = 0, I = 0, h = !1, F = !1, D = 0, b = null, T = null, q = null, g = null;
1548
- const B = () => {
1549
- q !== null && (window.clearTimeout(q), q = null);
1550
- }, X = () => {
1579
+ let S = 0, g = 0, I = 0, h = !1, N = !1, O = 0, b = null, T = null, H = null, v = null;
1580
+ const M = () => {
1581
+ H !== null && (window.clearTimeout(H), H = null);
1582
+ }, W = () => {
1551
1583
  if (!(b === null || !T))
1552
1584
  try {
1553
1585
  T.hasPointerCapture(b) && T.releasePointerCapture(b);
1554
1586
  } catch {
1555
1587
  }
1556
1588
  }, J = () => {
1557
- window.removeEventListener("pointermove", Ce), window.removeEventListener("pointerup", ge), window.removeEventListener("pointercancel", Z);
1558
- }, L = () => {
1559
- h = !1, F = !1, B(), X(), J(), b = null, T = null;
1560
- }, ae = () => {
1561
- o.value && (O.set(o.value, { rotate: 0 }), No(o.value), v.resume(n.toast.id));
1562
- }, he = () => {
1589
+ window.removeEventListener("pointermove", Le), window.removeEventListener("pointerup", me), window.removeEventListener("pointercancel", _);
1590
+ }, E = () => {
1591
+ h = !1, N = !1, M(), W(), J(), b = null, T = null;
1592
+ }, Z = () => {
1593
+ o.value && (n.expanded || y.resume(n.toast.id), x(!0, void 0, !0));
1594
+ }, Pe = () => {
1563
1595
  if (!o.value) return;
1564
- const p = D, P = Math.max(1, Date.now() - I), N = Math.abs(p) / P * 1e3, H = o.value.offsetWidth, te = H * 0.35;
1565
- if (L(), Math.abs(p) >= te || N >= 500) {
1596
+ const p = O, L = Math.max(1, Date.now() - I), B = Math.abs(p) / L * 1e3, q = o.value.offsetWidth, ne = q * 0.35;
1597
+ if (E(), Math.abs(p) >= ne || B >= 500) {
1566
1598
  r = !0;
1567
- const ne = n.toast.id;
1568
- n.toast.isLeaving = !0, g !== null && window.clearTimeout(g), g = window.setTimeout(() => {
1569
- v.remove(ne), g = null;
1599
+ const oe = n.toast.id;
1600
+ n.toast.isLeaving = !0, v !== null && window.clearTimeout(v), v = window.setTimeout(() => {
1601
+ y.remove(oe), v = null;
1570
1602
  }, 320);
1571
- const ve = p > 0 ? H * 1.6 : -H * 1.6;
1572
- $o(o.value, ve);
1603
+ const ge = p > 0 ? q * 1.6 : -q * 1.6;
1604
+ No(o.value, ge);
1573
1605
  } else
1574
- ae();
1575
- }, me = (p) => {
1576
- if (!(!c.value || r || h || p.pointerType === "mouse" && p.button !== 0 || p.target.closest("button, a"))) {
1577
- S = p.clientX, y = p.clientY, I = Date.now(), h = !0, F = !1, D = 0, b = p.pointerId, T = p.currentTarget, O.killTweensOf(o.value);
1606
+ Z();
1607
+ }, he = (p) => {
1608
+ if (h && b !== null)
1609
+ try {
1610
+ (T ?? p.currentTarget).hasPointerCapture(b) || (E(), Z());
1611
+ } catch {
1612
+ E();
1613
+ }
1614
+ if (!(!l.value || r || h || n.toast.isLeaving || p.pointerType === "mouse" && p.button !== 0 || p.target.closest("button, a"))) {
1615
+ S = p.clientX, g = p.clientY, I = Date.now(), h = !0, N = !1, O = 0, b = p.pointerId, T = p.currentTarget, F.killTweensOf(o.value);
1578
1616
  try {
1579
1617
  T.setPointerCapture(p.pointerId);
1580
1618
  } catch {
1581
1619
  }
1582
- window.addEventListener("pointermove", Ce), window.addEventListener("pointerup", ge), window.addEventListener("pointercancel", Z), v.pause(n.toast.id);
1620
+ window.addEventListener("pointermove", Le), window.addEventListener("pointerup", me), window.addEventListener("pointercancel", _), y.pause(n.toast.id);
1583
1621
  }
1584
- }, Ce = (p) => {
1622
+ }, Le = (p) => {
1585
1623
  if (!h || !o.value || b !== null && p.pointerId !== b) return;
1586
- B();
1587
- const P = p.clientX - S, N = p.clientY - y;
1588
- if (!F) {
1589
- if (Math.abs(N) > Math.abs(P) + 4) {
1590
- L(), ae();
1624
+ M();
1625
+ const L = p.clientX - S, B = p.clientY - g;
1626
+ if (!N) {
1627
+ if (Math.abs(B) > Math.abs(L) + 4) {
1628
+ E(), Z();
1591
1629
  return;
1592
1630
  }
1593
- if (Math.abs(P) > Math.abs(N) + 4)
1594
- F = !0;
1631
+ if (Math.abs(L) > Math.abs(B) + 4)
1632
+ N = !0;
1595
1633
  else
1596
1634
  return;
1597
1635
  }
1598
- p.preventDefault(), D = P;
1599
- const H = o.value.offsetWidth, te = Math.max(0, 1 - Math.abs(P) / (H * 0.7)), ne = P / H * 6;
1600
- O.set(o.value, { x: P, opacity: te, rotate: ne, overwrite: "auto" });
1601
- }, ge = (p) => {
1602
- !h || !o.value || b !== null && p.pointerId !== b || he();
1603
- }, Z = (p) => {
1604
- !h || !o.value || p && b !== null && p.pointerId !== b || (L(), ae());
1605
- }, ee = (p) => {
1606
- !h || !o.value || b !== null && p.pointerId !== b || (T = null, B(), q = window.setTimeout(() => {
1607
- h && he();
1608
- }, 300));
1609
- }, le = () => {
1610
- document.hidden && h && (L(), ae());
1636
+ p.preventDefault(), O = L;
1637
+ const q = o.value.offsetWidth, ne = Math.max(0, 1 - Math.abs(L) / (q * 0.7)), oe = L / q * 6;
1638
+ F.set(o.value, { x: L, opacity: ne, rotate: oe, overwrite: "auto" });
1639
+ }, me = (p) => {
1640
+ !h || !o.value || b !== null && p.pointerId !== b || Pe();
1641
+ }, _ = (p) => {
1642
+ !h || !o.value || p && b !== null && p.pointerId !== b || (E(), Z());
1643
+ }, te = (p) => {
1644
+ !h || !o.value || b !== null && p.pointerId !== b || (T = null, M(), H = window.setTimeout(() => {
1645
+ h && (E(), Z());
1646
+ }, 150));
1647
+ }, ce = () => {
1648
+ document.hidden && h && (E(), Z());
1611
1649
  };
1612
1650
  return qe(() => {
1613
- if (document.addEventListener("visibilitychange", le), !o.value) return;
1651
+ if (document.addEventListener("visibilitychange", ce), !o.value) return;
1614
1652
  const p = n.toast.position.includes("bottom");
1615
- jo(o.value, {
1653
+ Ro(o.value, {
1616
1654
  preset: n.toast.preset,
1617
1655
  bounce: n.toast.bounce,
1618
1656
  spring: n.toast.spring,
1619
1657
  direction: p ? "up" : "down"
1620
1658
  }).eventCallback("onComplete", () => {
1621
- Ie(x);
1659
+ ke(x);
1622
1660
  });
1623
1661
  }), G(
1624
1662
  () => n.index,
1625
- (p, P) => {
1626
- n.expanded || x(p < P || n.reposition);
1663
+ (p, L) => {
1664
+ n.expanded || x(p < L || n.reposition);
1627
1665
  }
1628
1666
  ), G(
1629
1667
  () => n.expandedOffset,
1630
- (p, P) => {
1631
- n.expanded && x(p !== P);
1668
+ (p, L) => {
1669
+ n.expanded && x(p !== L);
1632
1670
  }
1633
1671
  ), G(
1634
1672
  () => n.expanded,
@@ -1638,41 +1676,41 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1638
1676
  ), G(
1639
1677
  () => n.expanded,
1640
1678
  (p) => {
1641
- p ? v.pause(n.toast.id) : v.resume(n.toast.id);
1679
+ p ? y.pause(n.toast.id) : !h && !n.toast.isLeaving && y.resume(n.toast.id);
1642
1680
  }
1643
1681
  ), G(
1644
1682
  () => n.toast.isLeaving,
1645
1683
  (p) => {
1646
- p && l();
1684
+ p && (h && E(), c());
1647
1685
  }
1648
1686
  ), t({ applyStackPosition: x }), Ve(() => {
1649
- document.removeEventListener("visibilitychange", le), h && (L(), v.resume(n.toast.id)), g !== null && (window.clearTimeout(g), g = null), o.value && Yo(o.value);
1650
- }), (p, P) => (E(), $("div", {
1687
+ document.removeEventListener("visibilitychange", ce), h && (E(), y.resume(n.toast.id)), v !== null && (window.clearTimeout(v), v = null), o.value && Yo(o.value);
1688
+ }), (p, L) => (P(), $("div", {
1651
1689
  ref_key: "toastRef",
1652
1690
  ref: o,
1653
- class: Fe(["soft-toast-item", { "soft-toast-item--swipeable": c.value }]),
1691
+ class: Fe(["soft-toast-item", { "soft-toast-item--swipeable": l.value }]),
1654
1692
  "data-type": e.toast.type,
1655
1693
  "data-st-index": e.index,
1656
1694
  "data-toast-id": e.toast.id,
1657
1695
  "data-leaving": e.toast.isLeaving,
1658
1696
  "data-interactive": e.interactive,
1659
1697
  style: De({ zIndex: 1e3 - e.index }),
1660
- onPointerdown: me,
1661
- onPointercancel: Z,
1662
- onLostpointercapture: ee
1698
+ onPointerdown: he,
1699
+ onPointercancel: _,
1700
+ onLostpointercapture: te
1663
1701
  }, [
1664
- ie(p.$slots, "close-button", {
1702
+ re(p.$slots, "close-button", {
1665
1703
  toast: e.toast,
1666
- dismiss: l,
1704
+ dismiss: c,
1667
1705
  closeButton: e.closeButton
1668
1706
  }, () => [
1669
- e.closeButton ? (E(), $("button", {
1707
+ e.closeButton ? (P(), $("button", {
1670
1708
  key: 0,
1671
1709
  class: "soft-toast-close",
1672
1710
  "data-position": typeof e.closeButton == "string" ? e.closeButton : "top-right",
1673
- onClick: $e(l, ["stop"]),
1711
+ onClick: $e(c, ["stop"]),
1674
1712
  "aria-label": "Close"
1675
- }, [...P[0] || (P[0] = [
1713
+ }, [...L[0] || (L[0] = [
1676
1714
  Q(
1677
1715
  "svg",
1678
1716
  {
@@ -1701,34 +1739,34 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1701
1739
  -1
1702
1740
  /* CACHED */
1703
1741
  )
1704
- ])], 8, Xo)) : _("v-if", !0)
1742
+ ])], 8, Xo)) : ee("v-if", !0)
1705
1743
  ]),
1706
1744
  Q("div", Wo, [
1707
- ie(p.$slots, "icon", {
1745
+ re(p.$slots, "icon", {
1708
1746
  toast: e.toast,
1709
1747
  closeButton: e.closeButton
1710
1748
  }, () => [
1711
- e.toast.type === "promise" ? (E(), $("div", Go, [
1712
- ot($t(en), {
1749
+ e.toast.type === "promise" ? (P(), $("div", Go, [
1750
+ st(Nt(tn), {
1713
1751
  class: "soft-toast-icon-svg",
1714
1752
  icon: "lucide:loader-circle",
1715
1753
  width: 18,
1716
1754
  height: 18
1717
1755
  })
1718
- ])) : e.toast.icon && typeof e.toast.icon == "string" ? (E(), K(Mt, {
1756
+ ])) : e.toast.icon && typeof e.toast.icon == "string" ? (P(), K(Dt, {
1719
1757
  key: 1,
1720
1758
  type: e.toast.type,
1721
1759
  customIcon: e.toast.icon
1722
- }, null, 8, ["type", "customIcon"])) : e.toast.icon ? (E(), $("div", Ko, [
1723
- (E(), K(mt(e.toast.icon)))
1724
- ])) : e.toast.type !== "default" ? (E(), K(Mt, {
1760
+ }, null, 8, ["type", "customIcon"])) : e.toast.icon ? (P(), $("div", Ko, [
1761
+ (P(), K(gt(e.toast.icon)))
1762
+ ])) : e.toast.type !== "default" ? (P(), K(Dt, {
1725
1763
  key: 3,
1726
1764
  type: e.toast.type
1727
- }, null, 8, ["type"])) : _("v-if", !0)
1765
+ }, null, 8, ["type"])) : ee("v-if", !0)
1728
1766
  ]),
1729
1767
  Q("div", Jo, [
1730
1768
  Q("div", Zo, [
1731
- ie(p.$slots, "title", {
1769
+ re(p.$slots, "title", {
1732
1770
  toast: e.toast,
1733
1771
  closeButton: e.closeButton
1734
1772
  }, () => [
@@ -1739,24 +1777,24 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1739
1777
  "soft-toast-title--has-close": e.closeButton === !0 || e.closeButton === "top-right"
1740
1778
  }])
1741
1779
  },
1742
- we(e.toast.title),
1780
+ ye(e.toast.title),
1743
1781
  3
1744
1782
  /* TEXT, CLASS */
1745
1783
  )
1746
1784
  ])
1747
1785
  ]),
1748
- e.toast.description || e.toast.action ? (E(), $("div", _o, [
1749
- ie(p.$slots, "description", {
1786
+ e.toast.description || e.toast.action ? (P(), $("div", _o, [
1787
+ re(p.$slots, "description", {
1750
1788
  toast: e.toast,
1751
1789
  closeButton: e.closeButton
1752
1790
  }, () => [
1753
- e.toast.description ? (E(), $("p", es, [
1754
- typeof e.toast.description == "object" ? (E(), K(mt(e.toast.description), { key: 0 })) : (E(), $(
1755
- Se,
1791
+ e.toast.description ? (P(), $("p", es, [
1792
+ typeof e.toast.description == "object" ? (P(), K(gt(e.toast.description), { key: 0 })) : (P(), $(
1793
+ Ie,
1756
1794
  { key: 1 },
1757
1795
  [
1758
- un(
1759
- we(e.toast.description),
1796
+ fn(
1797
+ ye(e.toast.description),
1760
1798
  1
1761
1799
  /* TEXT */
1762
1800
  )
@@ -1764,59 +1802,59 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1764
1802
  64
1765
1803
  /* STABLE_FRAGMENT */
1766
1804
  ))
1767
- ])) : _("v-if", !0)
1805
+ ])) : ee("v-if", !0)
1768
1806
  ]),
1769
- ie(p.$slots, "action", {
1807
+ re(p.$slots, "action", {
1770
1808
  toast: e.toast,
1771
1809
  execute: d,
1772
1810
  hasSucceeded: s.value,
1773
1811
  closeButton: e.closeButton
1774
1812
  }, () => [
1775
- w.value.length > 0 && !s.value ? (E(), $("div", ts, [
1776
- (E(!0), $(
1777
- Se,
1813
+ w.value.length > 0 && !s.value ? (P(), $("div", ts, [
1814
+ (P(!0), $(
1815
+ Ie,
1778
1816
  null,
1779
- Ee(w.value, (N, H) => (E(), $("button", {
1780
- key: H,
1817
+ Se(w.value, (B, q) => (P(), $("button", {
1818
+ key: q,
1781
1819
  class: Fe(["soft-toast-action-button", [
1782
- N.class || "",
1783
- N.primary ? "soft-toast-action-primary" : ""
1820
+ B.class || "",
1821
+ B.primary ? "soft-toast-action-primary" : ""
1784
1822
  ]]),
1785
- onClick: $e(() => d(N), ["stop"])
1786
- }, we(N.label), 11, ns))),
1823
+ onClick: $e(() => d(B), ["stop"])
1824
+ }, ye(B.label), 11, ns))),
1787
1825
  128
1788
1826
  /* KEYED_FRAGMENT */
1789
1827
  ))
1790
- ])) : s.value ? (E(), $("div", os, [
1828
+ ])) : s.value ? (P(), $("div", os, [
1791
1829
  Q(
1792
1830
  "span",
1793
1831
  ss,
1794
- we(i.value),
1832
+ ye(i.value),
1795
1833
  1
1796
1834
  /* TEXT */
1797
1835
  )
1798
- ])) : _("v-if", !0)
1836
+ ])) : ee("v-if", !0)
1799
1837
  ])
1800
- ])) : _("v-if", !0),
1801
- _(" Timestamp lives below all content — never overlaps close button "),
1802
- e.toast.showTimestamp ? (E(), $(
1838
+ ])) : ee("v-if", !0),
1839
+ ee(" Timestamp lives below all content — never overlaps close button "),
1840
+ e.toast.showTimestamp ? (P(), $(
1803
1841
  "span",
1804
1842
  is,
1805
- we(a.value),
1843
+ ye(a.value),
1806
1844
  1
1807
1845
  /* TEXT */
1808
- )) : _("v-if", !0)
1846
+ )) : ee("v-if", !0)
1809
1847
  ])
1810
1848
  ]),
1811
- e.toast.showProgress && e.toast.duration > 0 && e.toast.duration !== 1 / 0 ? (E(), K(Qo, {
1849
+ e.toast.showProgress && e.toast.duration > 0 && e.toast.duration !== 1 / 0 ? (P(), K(Qo, {
1812
1850
  key: 0,
1813
1851
  "remaining-time": e.toast.remainingTime,
1814
1852
  "total-duration": e.toast.duration,
1815
1853
  "is-paused": e.toast.isPaused
1816
- }, null, 8, ["remaining-time", "total-duration", "is-paused"])) : _("v-if", !0)
1854
+ }, null, 8, ["remaining-time", "total-duration", "is-paused"])) : ee("v-if", !0)
1817
1855
  ], 46, Uo));
1818
1856
  }
1819
- }), rs = ["data-position", "data-soft-toast-theme", "data-soft-toast-dir", "data-expanded"], as = ["data-direction"], ls = 15, cs = /* @__PURE__ */ pe({
1857
+ }), rs = ["data-position", "data-soft-toast-theme", "data-soft-toast-dir", "data-expanded"], as = ["data-direction"], cs = 15, ls = /* @__PURE__ */ pe({
1820
1858
  __name: "ToastRegion",
1821
1859
  props: {
1822
1860
  position: { default: "top-right" },
@@ -1845,119 +1883,119 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1845
1883
  /* @__PURE__ */ new Map()
1846
1884
  ), r = (u, f) => {
1847
1885
  f ? i.value.set(u, f) : i.value.delete(u);
1848
- }, a = z(() => v.getToastsByPosition(t.position).value), c = (u) => {
1886
+ }, a = z(() => y.getToastsByPosition(t.position).value), l = (u) => {
1849
1887
  if (u.key === "Escape" && t.closeOnEscape) {
1850
1888
  const f = a.value;
1851
- f.length > 0 && v.dismiss(f[0].id);
1889
+ f.length > 0 && y.dismiss(f[0].id);
1852
1890
  }
1853
- }, l = () => {
1891
+ }, c = () => {
1854
1892
  const u = a.value;
1855
- document.hidden ? u.forEach((f) => v.pause(f.id)) : u.forEach((f) => v.resume(f.id));
1893
+ document.hidden ? u.forEach((f) => y.pause(f.id)) : u.forEach((f) => y.resume(f.id));
1856
1894
  };
1857
1895
  qe(() => {
1858
1896
  var u;
1859
- t.closeOnEscape && document.addEventListener("keydown", c), document.addEventListener("visibilitychange", l), document.addEventListener("touchstart", ft, { passive: !0 }), (u = o.value) == null || u.addEventListener("touchmove", dt, {
1897
+ t.closeOnEscape && document.addEventListener("keydown", l), document.addEventListener("visibilitychange", c), document.addEventListener("touchstart", dt, { passive: !0 }), (u = o.value) == null || u.addEventListener("touchmove", pt, {
1860
1898
  passive: !1
1861
- }), typeof ResizeObserver < "u" && (Z = new ResizeObserver(() => g()), ee = new ResizeObserver(() => g()), s.value && Z.observe(s.value)), Ie(() => g());
1899
+ }), typeof ResizeObserver < "u" && (_ = new ResizeObserver(() => v()), te = new ResizeObserver(() => v()), s.value && _.observe(s.value)), ke(() => v());
1862
1900
  }), Ve(() => {
1863
1901
  var u;
1864
- t.closeOnEscape && document.removeEventListener("keydown", c), document.removeEventListener("visibilitychange", l), document.removeEventListener("touchstart", ft), (u = o.value) == null || u.removeEventListener("touchmove", dt), Z && Z.disconnect(), ee && ee.disconnect(), h(), le = /* @__PURE__ */ new WeakSet();
1902
+ t.closeOnEscape && document.removeEventListener("keydown", l), document.removeEventListener("visibilitychange", c), document.removeEventListener("touchstart", dt), (u = o.value) == null || u.removeEventListener("touchmove", pt), _ && _.disconnect(), te && te.disconnect(), h(), ce = /* @__PURE__ */ new WeakSet();
1865
1903
  }), G(
1866
1904
  () => a.value.map((u) => `${u.id}:${u.isLeaving}`).join(","),
1867
1905
  () => {
1868
- Ie(g);
1906
+ ke(v);
1869
1907
  }
1870
1908
  ), G(
1871
- () => v.toasts.value.length,
1909
+ () => y.toasts.value.length,
1872
1910
  (u, f) => {
1873
1911
  if (u > f) {
1874
- const m = v.toasts.value[0];
1912
+ const m = y.toasts.value[0];
1875
1913
  m && (m.duration || (m.duration = t.duration), m.preset || (m.preset = t.preset), m.bounce === void 0 && (m.bounce = t.bounce), m.spring === void 0 && (m.spring = t.spring), m.showProgress === void 0 && (m.showProgress = t.showProgress), m.showTimestamp === void 0 && (m.showTimestamp = t.showTimestamp));
1876
1914
  }
1877
1915
  }
1878
1916
  );
1879
1917
  const d = z(() => `soft-toast-container--${t.position}`), w = z(() => t.position.endsWith("-center")), x = z(
1880
1918
  () => a.value.filter((u) => !u.isLeaving)
1881
- ), S = (u, f) => u.isLeaving ? f : x.value.findIndex((m) => m.id === u.id), y = R(!1);
1919
+ ), S = (u, f) => u.isLeaving ? f : x.value.findIndex((m) => m.id === u.id), g = R(!1);
1882
1920
  let I = null;
1883
1921
  const h = () => {
1884
1922
  I !== null && (window.clearTimeout(I), I = null);
1885
- }, F = z(() => {
1886
- const u = a.value, f = u.slice(0, ls), m = u.filter((C) => C.isLeaving), M = new Set(f.map((C) => C.id));
1887
- return [...f, ...m.filter((C) => !M.has(C.id))];
1888
- }), D = R({}), b = R(0), T = R(0);
1889
- let q = null;
1890
- const g = () => {
1891
- q === null && (q = requestAnimationFrame(() => {
1892
- q = null, X(!1);
1923
+ }, N = z(() => {
1924
+ const u = a.value, f = u.slice(0, cs), m = u.filter((C) => C.isLeaving), D = new Set(f.map((C) => C.id));
1925
+ return [...f, ...m.filter((C) => !D.has(C.id))];
1926
+ }), O = R({}), b = R(0), T = R(0);
1927
+ let H = null;
1928
+ const v = () => {
1929
+ H === null && (H = requestAnimationFrame(() => {
1930
+ H = null, W(!1);
1893
1931
  }));
1894
- }, B = (u, f, m) => {
1932
+ }, M = (u, f, m) => {
1895
1933
  if (b.value !== f || T.value !== m) return !0;
1896
- const M = D.value, C = Object.keys(M), j = Object.keys(u);
1897
- return C.length !== j.length ? !0 : j.some((V) => M[V] !== u[V]);
1898
- }, X = (u = !1) => {
1934
+ const D = O.value, C = Object.keys(D), j = Object.keys(u);
1935
+ return C.length !== j.length ? !0 : j.some((V) => D[V] !== u[V]);
1936
+ }, W = (u = !1) => {
1899
1937
  if (!s.value) return;
1900
1938
  const f = Array.from(
1901
1939
  s.value.querySelectorAll(".soft-toast-item")
1902
1940
  );
1903
1941
  p(f);
1904
- const m = t.gap ?? 10, M = [];
1942
+ const m = t.gap ?? 10, D = [];
1905
1943
  let C = 0, j = 0;
1906
1944
  for (let Y = 0; Y < f.length; Y++)
1907
- if (M.push(C), f[Y].getAttribute("data-leaving") !== "true") {
1945
+ if (D.push(C), f[Y].getAttribute("data-leaving") !== "true") {
1908
1946
  C += f[Y].offsetHeight + m;
1909
- const Oe = f[Y].dataset.toastId, Ue = a.value.find((ht) => ht.id === Oe);
1947
+ const Oe = f[Y].dataset.toastId, Ue = a.value.find((mt) => mt.id === Oe);
1910
1948
  Ue && S(Ue, a.value.indexOf(Ue)) === 0 && (j = f[Y].offsetHeight);
1911
1949
  }
1912
1950
  const V = {};
1913
1951
  for (let Y = 0; Y < f.length; Y++) {
1914
1952
  const Oe = f[Y].dataset.toastId;
1915
- Oe && (V[Oe] = M[Y]);
1953
+ Oe && (V[Oe] = D[Y]);
1916
1954
  }
1917
- const ce = Math.max(0, C - m), Le = B(V, j, ce);
1918
- if (Le && (D.value = V, b.value = j, T.value = ce), y.value && s.value && Le && me(0), s.value && Le) {
1919
- const Y = y.value ? T.value : b.value;
1920
- O.set(s.value, { height: Y });
1955
+ const le = Math.max(0, C - m), Ae = M(V, j, le);
1956
+ if (Ae && (O.value = V, b.value = j, T.value = le), g.value && s.value && Ae && he(0), s.value && Ae) {
1957
+ const Y = g.value ? T.value : b.value;
1958
+ F.set(s.value, { height: Y });
1921
1959
  }
1922
- y.value && (Le || u) && J();
1960
+ g.value && (Ae || u) && J();
1923
1961
  }, J = () => {
1924
- F.value.forEach((u) => {
1962
+ N.value.forEach((u) => {
1925
1963
  const f = i.value.get(u.id);
1926
- f && f.applyStackPosition(!1, D.value[u.id] ?? 0);
1964
+ f && f.applyStackPosition(!1, O.value[u.id] ?? 0);
1927
1965
  });
1928
- }, L = R(0), ae = () => {
1966
+ }, E = R(0), Z = () => {
1929
1967
  const f = Math.max(
1930
1968
  0,
1931
1969
  T.value - window.innerHeight + 120
1932
1970
  );
1933
- return Ae.value === "up" ? { min: 0, max: f } : { min: -f, max: 0 };
1934
- }, he = (u, f = !0, m = 0.18, M = "power2.out") => {
1971
+ return Ce.value === "up" ? { min: 0, max: f } : { min: -f, max: 0 };
1972
+ }, Pe = (u, f = !0, m = 0.18, D = "power2.out") => {
1935
1973
  if (!s.value) return;
1936
- const { min: C, max: j } = ae();
1937
- if (L.value = Math.max(C, Math.min(u, j)), !f) {
1938
- O.set(s.value, {
1939
- y: L.value,
1974
+ const { min: C, max: j } = Z();
1975
+ if (E.value = Math.max(C, Math.min(u, j)), !f) {
1976
+ F.set(s.value, {
1977
+ y: E.value,
1940
1978
  force3D: !0,
1941
1979
  overwrite: !0
1942
1980
  });
1943
1981
  return;
1944
1982
  }
1945
- O.to(s.value, {
1946
- y: L.value,
1983
+ F.to(s.value, {
1984
+ y: E.value,
1947
1985
  duration: m,
1948
- ease: M,
1986
+ ease: D,
1949
1987
  overwrite: "auto"
1950
1988
  });
1951
- }, me = (u, f = !0) => {
1952
- he(L.value - u, f);
1953
- }, Ce = (u) => {
1954
- if (!y.value) return;
1989
+ }, he = (u, f = !0) => {
1990
+ Pe(E.value - u, f);
1991
+ }, Le = (u) => {
1992
+ if (!g.value) return;
1955
1993
  let f = u.target, m = !1;
1956
1994
  for (; f && f !== o.value; ) {
1957
1995
  const j = window.getComputedStyle(f).overflowY;
1958
1996
  if ((j === "auto" || j === "scroll") && f.scrollHeight > f.clientHeight) {
1959
- const V = Math.ceil(f.scrollTop + f.clientHeight) < f.scrollHeight, ce = f.scrollTop > 0;
1960
- if (u.deltaY > 0 && V || u.deltaY < 0 && ce) {
1997
+ const V = Math.ceil(f.scrollTop + f.clientHeight) < f.scrollHeight, le = f.scrollTop > 0;
1998
+ if (u.deltaY > 0 && V || u.deltaY < 0 && le) {
1961
1999
  m = !0;
1962
2000
  break;
1963
2001
  }
@@ -1967,29 +2005,29 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1967
2005
  m || Math.max(
1968
2006
  0,
1969
2007
  T.value - window.innerHeight + 120
1970
- ) <= 0 || (u.preventDefault(), me(u.deltaY));
1971
- }, ge = (u) => {
2008
+ ) <= 0 || (u.preventDefault(), he(u.deltaY));
2009
+ }, me = (u) => {
1972
2010
  if (!s.value) return;
1973
2011
  const f = u ? T.value : b.value;
1974
- O.to(s.value, {
2012
+ F.to(s.value, {
1975
2013
  height: f,
1976
2014
  duration: u ? 0.14 : 0.16,
1977
2015
  ease: u ? "power3.out" : "power2.out",
1978
2016
  overwrite: "auto"
1979
2017
  });
1980
2018
  };
1981
- let Z = null, ee = null, le = /* @__PURE__ */ new WeakSet();
2019
+ let _ = null, te = null, ce = /* @__PURE__ */ new WeakSet();
1982
2020
  const p = (u) => {
1983
- if (ee)
2021
+ if (te)
1984
2022
  for (const f of u)
1985
- le.has(f) || (le.add(f), ee.observe(f));
1986
- }, P = () => {
1987
- h(), !y.value && (y.value = !0, Ie(() => {
1988
- X(!0), ge(!0);
2023
+ ce.has(f) || (ce.add(f), te.observe(f));
2024
+ }, L = () => {
2025
+ h(), !g.value && (g.value = !0, ke(() => {
2026
+ W(!0), me(!0);
1989
2027
  }));
1990
- }, N = () => {
2028
+ }, B = () => {
1991
2029
  h(), I = window.setTimeout(() => {
1992
- I = null, y.value = !1, ge(!1), L.value = 0, s.value && O.to(s.value, {
2030
+ I = null, g.value = !1, me(!1), E.value = 0, s.value && F.to(s.value, {
1993
2031
  y: 0,
1994
2032
  duration: 0.2,
1995
2033
  ease: "power2.out",
@@ -1997,24 +2035,24 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
1997
2035
  });
1998
2036
  }, 80);
1999
2037
  };
2000
- let H = 0, te = 0, ne = 0, ve = 0, ye = 0, Qe = !1;
2001
- const sn = (u) => {
2002
- H = u.touches[0].clientX, te = u.touches[0].clientY, ne = u.touches[0].clientY, ve = performance.now(), ye = 0, Qe = !1, s.value && O.killTweensOf(s.value);
2003
- }, rn = (u) => {
2004
- var M, C;
2038
+ let q = 0, ne = 0, oe = 0, ge = 0, ve = 0, Qe = !1;
2039
+ const rn = (u) => {
2040
+ q = u.touches[0].clientX, ne = u.touches[0].clientY, oe = u.touches[0].clientY, ge = performance.now(), ve = 0, Qe = !1, s.value && F.killTweensOf(s.value);
2041
+ }, an = (u) => {
2042
+ var D, C;
2005
2043
  if (a.value.length <= 1) return;
2006
- const f = Math.abs((((M = u.changedTouches[0]) == null ? void 0 : M.clientX) ?? H) - H), m = Math.abs((((C = u.changedTouches[0]) == null ? void 0 : C.clientY) ?? te) - te);
2044
+ const f = Math.abs((((D = u.changedTouches[0]) == null ? void 0 : D.clientX) ?? q) - q), m = Math.abs((((C = u.changedTouches[0]) == null ? void 0 : C.clientY) ?? ne) - ne);
2007
2045
  if (f > 8 || m > 8) {
2008
- if (y.value && Qe && Math.abs(ye) > 0.08) {
2046
+ if (g.value && Qe && Math.abs(ve) > 0.08) {
2009
2047
  const j = Math.max(
2010
2048
  -460,
2011
- Math.min(ye * 560, 460)
2049
+ Math.min(ve * 560, 460)
2012
2050
  ), V = Math.max(
2013
2051
  0.32,
2014
2052
  Math.min(Math.abs(j) / 780, 0.62)
2015
2053
  );
2016
- he(
2017
- L.value + j,
2054
+ Pe(
2055
+ E.value + j,
2018
2056
  !0,
2019
2057
  V,
2020
2058
  "power3.out"
@@ -2022,49 +2060,49 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
2022
2060
  }
2023
2061
  return;
2024
2062
  }
2025
- y.value ? N() : (u.preventDefault(), P());
2026
- }, ft = (u) => {
2027
- y.value && n.value && !n.value.contains(u.target) && N();
2063
+ g.value ? B() : (u.preventDefault(), L());
2028
2064
  }, dt = (u) => {
2029
- if (!y.value) return;
2065
+ g.value && n.value && !n.value.contains(u.target) && B();
2066
+ }, pt = (u) => {
2067
+ if (!g.value) return;
2030
2068
  u.preventDefault();
2031
- const f = u.touches[0].clientY, m = ne - f, M = performance.now(), C = Math.max(1, M - ve);
2032
- if (ne = f, ve = M, Math.max(
2069
+ const f = u.touches[0].clientY, m = oe - f, D = performance.now(), C = Math.max(1, D - ge);
2070
+ if (oe = f, ge = D, Math.max(
2033
2071
  0,
2034
2072
  T.value - window.innerHeight + 120
2035
2073
  ) <= 0) return;
2036
- const V = L.value;
2037
- me(m, !1);
2038
- const ce = (L.value - V) / C;
2039
- ye = ye * 0.35 + ce * 0.65, Qe = !0;
2040
- }, Ae = z(
2074
+ const V = E.value;
2075
+ he(m, !1);
2076
+ const le = (E.value - V) / C;
2077
+ ve = ve * 0.35 + le * 0.65, Qe = !0;
2078
+ }, Ce = z(
2041
2079
  () => t.position.includes("bottom") ? "up" : "down"
2042
- ), an = z(() => ({
2080
+ ), cn = z(() => ({
2043
2081
  width: w.value ? "100%" : void 0
2044
2082
  })), ln = (u) => {
2045
2083
  var f;
2046
2084
  return ((f = t.slotFilter) == null ? void 0 : f.call(t, u)) ?? !0;
2047
- }, pt = z(() => t.swipeToDismiss !== !1);
2048
- return (u, f) => (E(), K(Nt, { to: "body" }, [
2049
- fn(Q("div", {
2085
+ }, ht = z(() => t.swipeToDismiss !== !1);
2086
+ return (u, f) => (P(), K(Ht, { to: "body" }, [
2087
+ dn(Q("div", {
2050
2088
  ref_key: "containerRef",
2051
2089
  ref: n,
2052
2090
  class: Fe(["soft-toast-container", d.value]),
2053
2091
  "data-position": e.position,
2054
2092
  "data-soft-toast-theme": e.theme,
2055
2093
  "data-soft-toast-dir": e.dir,
2056
- "data-expanded": y.value
2094
+ "data-expanded": g.value
2057
2095
  }, [
2058
2096
  Q("div", {
2059
2097
  ref_key: "stackRef",
2060
2098
  ref: o,
2061
2099
  class: "soft-toast-stack",
2062
- "data-direction": Ae.value,
2063
- onMouseenter: P,
2064
- onMouseleave: N,
2065
- onTouchstart: $e(sn, ["stop"]),
2066
- onTouchend: $e(rn, ["stop"]),
2067
- onWheel: Ce,
2100
+ "data-direction": Ce.value,
2101
+ onMouseenter: L,
2102
+ onMouseleave: B,
2103
+ onTouchstart: $e(rn, ["stop"]),
2104
+ onTouchend: $e(an, ["stop"]),
2105
+ onWheel: Le,
2068
2106
  "data-lenis-prevent": "true"
2069
2107
  }, [
2070
2108
  Q(
@@ -2073,57 +2111,57 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
2073
2111
  ref_key: "listRef",
2074
2112
  ref: s,
2075
2113
  class: "soft-toast-list",
2076
- style: De(an.value)
2114
+ style: De(cn.value)
2077
2115
  },
2078
2116
  [
2079
- (E(!0), $(
2080
- Se,
2117
+ (P(!0), $(
2118
+ Ie,
2081
2119
  null,
2082
- Ee(F.value, (m, M) => (E(), $(
2083
- Se,
2120
+ Se(N.value, (m, D) => (P(), $(
2121
+ Ie,
2084
2122
  {
2085
2123
  key: m.id
2086
2124
  },
2087
2125
  [
2088
- ln(m) ? (E(), K(Bt, {
2126
+ ln(m) ? (P(), K(jt, {
2089
2127
  key: 0,
2090
2128
  ref_for: !0,
2091
2129
  ref: (C) => r(m.id, C),
2092
2130
  toast: m,
2093
- index: S(m, M),
2131
+ index: S(m, D),
2094
2132
  total: x.value.length,
2095
- expanded: y.value,
2096
- "expanded-offset": D.value[m.id] ?? 0,
2097
- "stack-direction": Ae.value,
2098
- interactive: y.value || S(m, M) === 0,
2133
+ expanded: g.value,
2134
+ "expanded-offset": O.value[m.id] ?? 0,
2135
+ "stack-direction": Ce.value,
2136
+ interactive: !m.isLeaving && (g.value || S(m, D) === 0),
2099
2137
  "close-button": m.closeButton ?? e.closeButton,
2100
- "swipe-to-dismiss": pt.value,
2138
+ "swipe-to-dismiss": ht.value,
2101
2139
  style: De(
2102
2140
  w.value ? { left: "50%", marginLeft: "-50%" } : void 0
2103
2141
  )
2104
- }, Ht({
2142
+ }, qt({
2105
2143
  _: 2
2106
2144
  /* DYNAMIC */
2107
2145
  }, [
2108
- Ee(u.$slots, (C, j) => ({
2146
+ Se(u.$slots, (C, j) => ({
2109
2147
  name: j,
2110
- fn: qt((V) => [
2111
- ie(u.$slots, j, Ke({ ref_for: !0 }, V || {}), void 0, !0)
2148
+ fn: Vt((V) => [
2149
+ re(u.$slots, j, Ke({ ref_for: !0 }, V || {}), void 0, !0)
2112
2150
  ])
2113
2151
  }))
2114
- ]), 1032, ["toast", "index", "total", "expanded", "expanded-offset", "stack-direction", "interactive", "close-button", "swipe-to-dismiss", "style"])) : (E(), K(Bt, {
2152
+ ]), 1032, ["toast", "index", "total", "expanded", "expanded-offset", "stack-direction", "interactive", "close-button", "swipe-to-dismiss", "style"])) : (P(), K(jt, {
2115
2153
  key: 1,
2116
2154
  ref_for: !0,
2117
2155
  ref: (C) => r(m.id, C),
2118
2156
  toast: m,
2119
- index: S(m, M),
2157
+ index: S(m, D),
2120
2158
  total: x.value.length,
2121
- expanded: y.value,
2122
- "expanded-offset": D.value[m.id] ?? 0,
2123
- "stack-direction": Ae.value,
2124
- interactive: y.value || S(m, M) === 0,
2159
+ expanded: g.value,
2160
+ "expanded-offset": O.value[m.id] ?? 0,
2161
+ "stack-direction": Ce.value,
2162
+ interactive: !m.isLeaving && (g.value || S(m, D) === 0),
2125
2163
  "close-button": m.closeButton ?? e.closeButton,
2126
- "swipe-to-dismiss": pt.value,
2164
+ "swipe-to-dismiss": ht.value,
2127
2165
  style: De(
2128
2166
  w.value ? { left: "50%", marginLeft: "-50%" } : void 0
2129
2167
  )
@@ -2141,7 +2179,7 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
2141
2179
  )
2142
2180
  ], 40, as)
2143
2181
  ], 10, rs), [
2144
- [dn, a.value.length > 0]
2182
+ [pn, a.value.length > 0]
2145
2183
  ])
2146
2184
  ]));
2147
2185
  }
@@ -2150,7 +2188,7 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
2150
2188
  for (const [o, s] of t)
2151
2189
  n[o] = s;
2152
2190
  return n;
2153
- }, fs = /* @__PURE__ */ us(cs, [["__scopeId", "data-v-ee86226d"]]), jt = /* @__PURE__ */ pe({
2191
+ }, fs = /* @__PURE__ */ us(ls, [["__scopeId", "data-v-ad802395"]]), Rt = /* @__PURE__ */ pe({
2154
2192
  __name: "ToastContainer",
2155
2193
  props: {
2156
2194
  position: { default: "top-right" },
@@ -2187,18 +2225,18 @@ const Mo = typeof window < "u" && window.matchMedia("(pointer: coarse)").matches
2187
2225
  "bottom-center",
2188
2226
  "bottom-right"
2189
2227
  ];
2190
- return (o, s) => (E(), K(Nt, { to: "body" }, [
2191
- (E(), $(
2192
- Se,
2228
+ return (o, s) => (P(), K(Ht, { to: "body" }, [
2229
+ (P(), $(
2230
+ Ie,
2193
2231
  null,
2194
- Ee(n, (i) => ot(fs, Ke({ key: i }, { ref_for: !0 }, t, { position: i }), Ht({
2232
+ Se(n, (i) => st(fs, Ke({ key: i }, { ref_for: !0 }, t, { position: i }), qt({
2195
2233
  _: 2
2196
2234
  /* DYNAMIC */
2197
2235
  }, [
2198
- Ee(o.$slots, (r, a) => ({
2236
+ Se(o.$slots, (r, a) => ({
2199
2237
  name: a,
2200
- fn: qt((c) => [
2201
- ie(o.$slots, a, Ke({ ref_for: !0 }, c || {}))
2238
+ fn: Vt((l) => [
2239
+ re(o.$slots, a, Ke({ ref_for: !0 }, l || {}))
2202
2240
  ])
2203
2241
  }))
2204
2242
  ]), 1040, ["position"])),
@@ -2225,14 +2263,14 @@ let A = {
2225
2263
  swipeToDismiss: !0,
2226
2264
  teleportTarget: "body",
2227
2265
  autoMount: !0
2228
- }, Rt = !1;
2266
+ }, $t = !1;
2229
2267
  const hs = {
2230
2268
  install(e, t = {}) {
2231
- if (A = { ...A, ...t }, e.component("SoftToastContainer", jt), A.autoMount !== !1 && !Rt && typeof window < "u") {
2269
+ if (A = { ...A, ...t }, e.component("SoftToastContainer", Rt), A.autoMount !== !1 && !$t && typeof window < "u") {
2232
2270
  const n = "soft-toast-global-container";
2233
2271
  let o = document.getElementById(n);
2234
- o || (o = document.createElement("div"), o.id = n, document.body.appendChild(o)), pn({
2235
- render: () => Ge(jt, {
2272
+ o || (o = document.createElement("div"), o.id = n, document.body.appendChild(o)), hn({
2273
+ render: () => Ge(Rt, {
2236
2274
  position: A.position,
2237
2275
  duration: A.duration,
2238
2276
  gap: A.gap,
@@ -2251,63 +2289,63 @@ const hs = {
2251
2289
  showTimestamp: A.showTimestamp,
2252
2290
  slotFilter: A.slotFilter
2253
2291
  })
2254
- }).mount(o), Rt = !0;
2292
+ }).mount(o), $t = !0;
2255
2293
  }
2256
2294
  e.provide("softToastOptions", A), typeof document < "u" && (document.body.setAttribute("data-soft-toast-theme", A.theme || "light"), document.body.setAttribute("data-soft-toast-dir", A.dir || "ltr"));
2257
2295
  }
2258
- }, ms = () => A, nn = "@soft-toast/vue:flash", at = () => {
2296
+ }, ms = () => A, on = "@soft-toast/vue:flash", ct = () => {
2259
2297
  if (typeof sessionStorage > "u") return [];
2260
2298
  try {
2261
- return JSON.parse(sessionStorage.getItem(nn) || "[]");
2299
+ return JSON.parse(sessionStorage.getItem(on) || "[]");
2262
2300
  } catch {
2263
2301
  return [];
2264
2302
  }
2265
- }, on = (e) => {
2303
+ }, sn = (e) => {
2266
2304
  if (!(typeof sessionStorage > "u"))
2267
2305
  try {
2268
- sessionStorage.setItem(nn, JSON.stringify(e));
2306
+ sessionStorage.setItem(on, JSON.stringify(e));
2269
2307
  } catch {
2270
2308
  }
2271
2309
  }, lt = (e, t = {}) => {
2272
- const n = at().filter(
2310
+ const n = ct().filter(
2273
2311
  (o) => Date.now() - o.queuedAt < 3e4
2274
2312
  // discard stale flashes
2275
2313
  );
2276
- n.push({ title: e, options: t, queuedAt: Date.now() }), on(n);
2277
- }, ct = () => {
2278
- const e = at().filter(
2314
+ n.push({ title: e, options: t, queuedAt: Date.now() }), sn(n);
2315
+ }, ut = () => {
2316
+ const e = ct().filter(
2279
2317
  (t) => Date.now() - t.queuedAt < 3e4
2280
2318
  );
2281
- return on([]), e.forEach((t) => {
2282
- v.add({ title: t.title, type: "default", ...t.options });
2319
+ return sn([]), e.forEach((t) => {
2320
+ y.add({ title: t.title, type: "default", ...t.options });
2283
2321
  }), e.length;
2284
- }, ut = () => at().some((e) => Date.now() - e.queuedAt < 3e4), gs = () => ({
2322
+ }, ft = () => ct().some((e) => Date.now() - e.queuedAt < 3e4), gs = () => ({
2285
2323
  /** Queue a toast that will appear on the next page/route */
2286
2324
  flash: lt,
2287
2325
  /** Show all pending flashes now — call in onMounted */
2288
- showPendingFlashes: ct,
2326
+ showPendingFlashes: ut,
2289
2327
  /** True if there are flashes waiting to be shown */
2290
- hasPending: ut
2328
+ hasPending: ft
2291
2329
  }), vs = () => ({
2292
- default: (e, t) => v.add({ ...t, type: "default", title: e }),
2293
- success: (e, t) => v.add({ ...t, type: "success", title: e }),
2294
- error: (e, t) => v.add({ ...t, type: "error", title: e }),
2295
- warning: (e, t) => v.add({ ...t, type: "warning", title: e }),
2296
- info: (e, t) => v.add({ ...t, type: "info", title: e }),
2297
- loading: (e, t) => v.loading(e, t),
2298
- promise: (e, t, n) => v.promise(e, t, n),
2299
- custom: (e) => v.add(e),
2300
- update: (e, t) => v.update(e, t),
2301
- dismiss: (e) => v.dismiss(e),
2302
- dismissAll: () => v.dismiss(),
2303
- pause: (e) => v.pause(e),
2304
- resume: (e) => v.resume(e),
2330
+ default: (e, t) => y.add({ ...t, type: "default", title: e }),
2331
+ success: (e, t) => y.add({ ...t, type: "success", title: e }),
2332
+ error: (e, t) => y.add({ ...t, type: "error", title: e }),
2333
+ warning: (e, t) => y.add({ ...t, type: "warning", title: e }),
2334
+ info: (e, t) => y.add({ ...t, type: "info", title: e }),
2335
+ loading: (e, t) => y.loading(e, t),
2336
+ promise: (e, t, n) => y.promise(e, t, n),
2337
+ custom: (e) => y.add(e),
2338
+ update: (e, t) => y.update(e, t),
2339
+ dismiss: (e) => y.dismiss(e),
2340
+ dismissAll: () => y.dismiss(),
2341
+ pause: (e) => y.pause(e),
2342
+ resume: (e) => y.resume(e),
2305
2343
  /**
2306
2344
  * Queue a toast that will be shown on the next page load / route navigation.
2307
2345
  * Perfect for the "submit → redirect → show success" pattern.
2308
2346
  *
2309
2347
  * @example
2310
- * const { flash } = useToast()
2348
+ * const { flash } = useSoftToast()
2311
2349
  * await api.save()
2312
2350
  * flash('Saved!', { type: 'success' })
2313
2351
  * router.push('/dashboard')
@@ -2317,37 +2355,37 @@ const hs = {
2317
2355
  * Show any toasts that were queued with flash() before a page navigation.
2318
2356
  * Call this in onMounted() of your root layout or App.vue.
2319
2357
  */
2320
- showFlashes: () => ct(),
2358
+ showFlashes: () => ut(),
2321
2359
  /** Check if there are pending flash messages without consuming them. */
2322
- hasFlashes: () => ut()
2360
+ hasFlashes: () => ft()
2323
2361
  }), ys = {
2324
- default: (e, t) => v.add({ ...t, type: "default", title: e }),
2325
- success: (e, t) => v.add({ ...t, type: "success", title: e }),
2326
- error: (e, t) => v.add({ ...t, type: "error", title: e }),
2327
- warning: (e, t) => v.add({ ...t, type: "warning", title: e }),
2328
- info: (e, t) => v.add({ ...t, type: "info", title: e }),
2329
- loading: (e, t) => v.loading(e, t),
2330
- promise: (e, t, n) => v.promise(e, t, n),
2331
- custom: (e) => v.add(e),
2332
- update: (e, t) => v.update(e, t),
2333
- dismiss: (e) => v.dismiss(e),
2334
- dismissAll: () => v.dismiss(),
2335
- pause: (e) => v.pause(e),
2336
- resume: (e) => v.resume(e),
2362
+ default: (e, t) => y.add({ ...t, type: "default", title: e }),
2363
+ success: (e, t) => y.add({ ...t, type: "success", title: e }),
2364
+ error: (e, t) => y.add({ ...t, type: "error", title: e }),
2365
+ warning: (e, t) => y.add({ ...t, type: "warning", title: e }),
2366
+ info: (e, t) => y.add({ ...t, type: "info", title: e }),
2367
+ loading: (e, t) => y.loading(e, t),
2368
+ promise: (e, t, n) => y.promise(e, t, n),
2369
+ custom: (e) => y.add(e),
2370
+ update: (e, t) => y.update(e, t),
2371
+ dismiss: (e) => y.dismiss(e),
2372
+ dismissAll: () => y.dismiss(),
2373
+ pause: (e) => y.pause(e),
2374
+ resume: (e) => y.resume(e),
2337
2375
  flash: (e, t = {}) => lt(e, t),
2338
- showFlashes: () => ct(),
2339
- hasFlashes: () => ut()
2376
+ showFlashes: () => ut(),
2377
+ hasFlashes: () => ft()
2340
2378
  };
2341
2379
  export {
2342
2380
  hs as SoftToastPlugin,
2343
- jt as ToastContainer,
2344
- Bt as ToastItem,
2345
- ct as consumeFlashes,
2381
+ Rt as ToastContainer,
2382
+ jt as ToastItem,
2383
+ ut as consumeFlashes,
2346
2384
  ms as getToastOptions,
2347
- ut as hasPendingFlashes,
2385
+ ft as hasPendingFlashes,
2348
2386
  lt as queueFlash,
2349
- ys as toast,
2350
- v as toastStore,
2387
+ ys as softToast,
2388
+ y as toastStore,
2351
2389
  gs as useFlash,
2352
- vs as useToast
2390
+ vs as useSoftToast
2353
2391
  };