@namba_one/ui-kit-2 1.0.0

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.
Files changed (61) hide show
  1. package/README.md +62 -0
  2. package/dist/fonts/SFMono-Bold.ttf +0 -0
  3. package/dist/fonts/SFMono-Bold.woff +0 -0
  4. package/dist/fonts/SFMono-Bold.woff2 +0 -0
  5. package/dist/fonts/SFMono-Heavy.ttf +0 -0
  6. package/dist/fonts/SFMono-Heavy.woff +0 -0
  7. package/dist/fonts/SFMono-Heavy.woff2 +0 -0
  8. package/dist/fonts/SFMono-Light.ttf +0 -0
  9. package/dist/fonts/SFMono-Light.woff +0 -0
  10. package/dist/fonts/SFMono-Light.woff2 +0 -0
  11. package/dist/fonts/SFMono-Medium.ttf +0 -0
  12. package/dist/fonts/SFMono-Medium.woff +0 -0
  13. package/dist/fonts/SFMono-Medium.woff2 +0 -0
  14. package/dist/fonts/SFMono-Regular.ttf +0 -0
  15. package/dist/fonts/SFMono-Regular.woff +0 -0
  16. package/dist/fonts/SFMono-Regular.woff2 +0 -0
  17. package/dist/fonts/SFMono-Semibold.ttf +0 -0
  18. package/dist/fonts/SFMono-Semibold.woff +0 -0
  19. package/dist/fonts/SFMono-Semibold.woff2 +0 -0
  20. package/dist/fonts/SFPro.ttf +0 -0
  21. package/dist/fonts/SFPro.woff +0 -0
  22. package/dist/fonts/SFPro.woff2 +0 -0
  23. package/dist/fonts/SFProDisplay-Black.ttf +0 -0
  24. package/dist/fonts/SFProDisplay-Black.woff +0 -0
  25. package/dist/fonts/SFProDisplay-Black.woff2 +0 -0
  26. package/dist/fonts/SFProDisplay-Bold.ttf +0 -0
  27. package/dist/fonts/SFProDisplay-Bold.woff +0 -0
  28. package/dist/fonts/SFProDisplay-Bold.woff2 +0 -0
  29. package/dist/fonts/SFProDisplay-Heavy.ttf +0 -0
  30. package/dist/fonts/SFProDisplay-Heavy.woff +0 -0
  31. package/dist/fonts/SFProDisplay-Heavy.woff2 +0 -0
  32. package/dist/fonts/SFProDisplay-Light.ttf +0 -0
  33. package/dist/fonts/SFProDisplay-Light.woff +0 -0
  34. package/dist/fonts/SFProDisplay-Light.woff2 +0 -0
  35. package/dist/fonts/SFProDisplay-Medium.ttf +0 -0
  36. package/dist/fonts/SFProDisplay-Medium.woff +0 -0
  37. package/dist/fonts/SFProDisplay-Medium.woff2 +0 -0
  38. package/dist/fonts/SFProDisplay-Regular.ttf +0 -0
  39. package/dist/fonts/SFProDisplay-Regular.woff +0 -0
  40. package/dist/fonts/SFProDisplay-Regular.woff2 +0 -0
  41. package/dist/fonts/SFProDisplay-Semibold.ttf +0 -0
  42. package/dist/fonts/SFProDisplay-Semibold.woff +0 -0
  43. package/dist/fonts/SFProDisplay-Semibold.woff2 +0 -0
  44. package/dist/fonts/SFProDisplay-Thin.ttf +0 -0
  45. package/dist/fonts/SFProDisplay-Thin.woff +0 -0
  46. package/dist/fonts/SFProDisplay-Thin.woff2 +0 -0
  47. package/dist/fonts/SFProDisplay-Ultralight.ttf +0 -0
  48. package/dist/fonts/SFProDisplay-Ultralight.woff +0 -0
  49. package/dist/fonts/SFProDisplay-Ultralight.woff2 +0 -0
  50. package/dist/fonts/iconfont.ttf +0 -0
  51. package/dist/fonts/iconfont.woff +0 -0
  52. package/dist/fonts/iconfont.woff2 +0 -0
  53. package/dist/index.d.ts +304 -0
  54. package/dist/index.es.js +1252 -0
  55. package/dist/index.umd.js +1 -0
  56. package/dist/namba-one-uikit.css +1 -0
  57. package/dist/scss/functions.scss +86 -0
  58. package/dist/scss/mixins.scss +178 -0
  59. package/dist/scss/spaces.scss +47 -0
  60. package/dist/scss/typography.scss +162 -0
  61. package/package.json +129 -0
@@ -0,0 +1,1252 @@
1
+ var be = Object.defineProperty;
2
+ var $e = (e, t, s) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var q = (e, t, s) => $e(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { defineComponent as B, computed as u, createBlock as E, openBlock as d, resolveDynamicComponent as re, mergeProps as H, withCtx as j, renderSlot as K, createElementBlock as w, createElementVNode as y, useCssModule as D, unref as k, normalizeStyle as P, normalizeClass as m, ref as z, onMounted as Te, normalizeProps as ce, guardReactiveProps as we, createVNode as G, createCommentVNode as W, Transition as ee, watch as X, isRef as pe, shallowRef as oe, h as Se, createTextVNode as se, toDisplayString as ne, inject as _e, TransitionGroup as xe, Fragment as ze, renderList as ke, nextTick as ae, provide as Be } from "vue";
5
+ function Me(e, t, s) {
6
+ const o = e;
7
+ let n;
8
+ const l = (o.ownerDocument || document).defaultView;
9
+ if (l && l.getComputedStyle)
10
+ return t = t.replace(/([A-Z])/g, "-$1").toLowerCase(), l.getComputedStyle(o, null).getPropertyValue(t);
11
+ if (o.currentStyle)
12
+ return t = t.replace(/\-(\w)/g, function(c, i) {
13
+ return i.toUpperCase();
14
+ }), n = o.currentStyle[t], /^\d+(em|pt|%|ex)?$/i.test(n) ? function(c) {
15
+ const i = o.style.left, h = o.runtimeStyle.left;
16
+ return o.runtimeStyle.left = o.currentStyle.left, o.style.left = c || "0", c = o.style.pixelLeft + "px", o.style.left = i, o.runtimeStyle.left = h, c;
17
+ }(n) : n;
18
+ }
19
+ function Le(e, t) {
20
+ switch (e) {
21
+ case "button":
22
+ return {
23
+ role: "button",
24
+ type: "button"
25
+ };
26
+ case "router-link":
27
+ return {
28
+ to: t ?? {}
29
+ };
30
+ case "a":
31
+ return {
32
+ href: t,
33
+ ...!((t == null ? void 0 : t.indexOf("tel:")) !== -1 || (t == null ? void 0 : t.indexOf("mailto:")) !== -1) && {
34
+ rel: "noopener noreferrer",
35
+ target: "_blank"
36
+ }
37
+ };
38
+ default:
39
+ return {};
40
+ }
41
+ }
42
+ const ue = /* @__PURE__ */ B({
43
+ __name: "ButtonBase",
44
+ props: {
45
+ tag: { default: "button" },
46
+ href: {},
47
+ type: { default: "button" },
48
+ isLoading: { type: Boolean },
49
+ isDisabled: { type: Boolean }
50
+ },
51
+ emits: ["click"],
52
+ setup(e, { emit: t }) {
53
+ const s = t, o = u(() => ({
54
+ ...e.tag === "button" && {
55
+ type: e.type
56
+ },
57
+ ...Le(e.tag, e.href),
58
+ disabled: e.isLoading || e.isDisabled
59
+ }));
60
+ function n(l) {
61
+ if (!(e.isDisabled || e.isLoading))
62
+ return s("click", l);
63
+ }
64
+ return (l, c) => (d(), E(re(l.tag), H(o.value, { onClick: n }), {
65
+ default: j(() => [
66
+ K(l.$slots, "default")
67
+ ]),
68
+ _: 3
69
+ }, 16));
70
+ }
71
+ }), Ce = {
72
+ xmlns: "http://www.w3.org/2000/svg",
73
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
74
+ style: { width: "1em", height: "1em", fill: "currentColor" }
75
+ }, Ie = ["xlink:href"];
76
+ function Fe(e, t) {
77
+ return d(), w("svg", Ce, [
78
+ y("use", {
79
+ "xlink:href": "#" + e.name
80
+ }, null, 8, Ie)
81
+ ]);
82
+ }
83
+ const Re = {
84
+ name: "SvgIcon",
85
+ props: {
86
+ name: {
87
+ type: String,
88
+ required: !0
89
+ }
90
+ },
91
+ render: Fe
92
+ }, le = (e) => `${Number(e / 12).toFixed(3)}rem`, Oe = /* @__PURE__ */ B({
93
+ __name: "Icon",
94
+ props: {
95
+ name: {},
96
+ color: {},
97
+ size: {}
98
+ },
99
+ setup(e) {
100
+ const t = D(), s = u(() => [
101
+ t.root,
102
+ t.color,
103
+ t[`color_${e.color}`],
104
+ t[e.name]
105
+ ]), o = u(() => e.size ? { width: le(Number(e.size)), height: le(Number(e.size)) } : {});
106
+ return (n, l) => (d(), E(k(Re), {
107
+ class: m(s.value),
108
+ name: n.name,
109
+ style: P(o.value)
110
+ }, null, 8, ["class", "name", "style"]));
111
+ }
112
+ }), Pe = "Icon__root_9c34a", Ee = "Icon__color_9a568", je = "Icon__color_secondary_016e8", Ae = "Icon__color_base_49ca4", Ve = "Icon__color_error_21923", De = "Icon__color_success_e8b4a", Ne = "Icon__color_inverse_4d7fc", Ge = "Icon__color_green_35ae9", We = "Icon__color_blue_c217d", He = "Icon__color_red_ecc39", Ke = "Icon__color_disable_bf4c2", Ue = {
113
+ root: Pe,
114
+ color: Ee,
115
+ "color_brand-accent": "Icon__color_brand-accent_0f65a",
116
+ color_secondary: je,
117
+ color_base: Ae,
118
+ color_error: Ve,
119
+ color_success: De,
120
+ color_inverse: Ne,
121
+ color_green: Ge,
122
+ color_blue: We,
123
+ color_red: He,
124
+ color_disable: Ke
125
+ }, C = (e, t) => {
126
+ const s = e.__vccOpts || e;
127
+ for (const [o, n] of t)
128
+ s[o] = n;
129
+ return s;
130
+ }, Xe = {
131
+ $style: Ue
132
+ }, Y = /* @__PURE__ */ C(Oe, [["__cssModules", Xe]]), Ye = /* @__PURE__ */ B({
133
+ __name: "TheText",
134
+ props: {
135
+ testId: {},
136
+ tag: { default: "p" },
137
+ name: {},
138
+ align: {},
139
+ color: {},
140
+ isEllipsis: { type: Boolean },
141
+ numberOfLines: {},
142
+ fontFamily: {}
143
+ },
144
+ setup(e) {
145
+ const t = D(), s = u(() => [
146
+ t.root,
147
+ t[`font_${e.name}`],
148
+ t.color,
149
+ t[`color_${e.color}`],
150
+ t[`align_${e.align}`],
151
+ e.fontFamily === "SFMono" ? t["is-mono"] : ""
152
+ ]), o = u(() => e.numberOfLines ? {
153
+ style: {
154
+ "-webkit-line-clamp": e.numberOfLines,
155
+ display: "-webkit-box",
156
+ "-webkit-box-orient": "vertical",
157
+ "line-clamp": e.numberOfLines,
158
+ overflow: "hidden"
159
+ }
160
+ } : null);
161
+ return (n, l) => (d(), E(re(n.tag), H({
162
+ "data-testid": n.testId,
163
+ class: s.value
164
+ }, o.value), {
165
+ default: j(() => [
166
+ K(n.$slots, "default")
167
+ ]),
168
+ _: 3
169
+ }, 16, ["data-testid", "class"]));
170
+ }
171
+ }), Ze = "text__root_5b5d3", qe = "text__font_titleHuge_c2a02", Je = "text__font_titleExtraLarge_9e2ab", Qe = "text__font_titleLarge_adbbd", et = "text__font_titleLargeBold_401fa", tt = "text__font_titleLargeHeavy_d1dcb", ot = "text__font_titleLargeRegular_f5eaa", st = "text__font_titleMedium_11da4", nt = "text__font_titleSmall_aa4de", at = "text__font_titleSmallRegular_c400f", lt = "text__font_titleExtraSmall_fc2fb", it = "text__font_titleExtraSmallBold_c2bd8", rt = "text__font_headlineMedium_a22b3", ct = "text__font_headlineSmall_dfe04", _t = "text__font_subheadLarge_ad928", ut = "text__font_subheadMedium_b6060", dt = "text__font_subheadSmall_648fc", ft = "text__font_body_542cd", mt = "text__font_bodyMedium_9856a", ht = "text__font_textLarge_e8c08", vt = "text__font_textMedium_aac40", yt = "text__font_textSmall_3a961", gt = "text__font_captionLarge_0e2be", bt = "text__font_captionMedium_1f3aa", $t = "text__font_captionSmall_0c0b8", Tt = "text__color_70245", wt = "text__color_base_75fad", pt = "text__color_secondary_757e2", St = "text__color_error_3237c", xt = "text__color_success_df18c", zt = "text__color_inverse_7c356", kt = "text__color_disable_930e6", Bt = "text__align_left_078d3", Mt = "text__align_center_6444c", Lt = "text__align_right_daaa4", Ct = {
172
+ root: Ze,
173
+ "is-mono": "text__is-mono_8b95d",
174
+ font_titleHuge: qe,
175
+ font_titleExtraLarge: Je,
176
+ font_titleLarge: Qe,
177
+ font_titleLargeBold: et,
178
+ font_titleLargeHeavy: tt,
179
+ font_titleLargeRegular: ot,
180
+ font_titleMedium: st,
181
+ font_titleSmall: nt,
182
+ font_titleSmallRegular: at,
183
+ font_titleExtraSmall: lt,
184
+ font_titleExtraSmallBold: it,
185
+ font_headlineMedium: rt,
186
+ font_headlineSmall: ct,
187
+ font_subheadLarge: _t,
188
+ font_subheadMedium: ut,
189
+ font_subheadSmall: dt,
190
+ font_body: ft,
191
+ font_bodyMedium: mt,
192
+ font_textLarge: ht,
193
+ font_textMedium: vt,
194
+ font_textSmall: yt,
195
+ font_captionLarge: gt,
196
+ font_captionMedium: bt,
197
+ font_captionSmall: $t,
198
+ color: Tt,
199
+ color_base: wt,
200
+ color_secondary: pt,
201
+ "color_brand-accent": "text__color_brand-accent_2e45f",
202
+ "color_brand-market": "text__color_brand-market_06771",
203
+ color_error: St,
204
+ color_success: xt,
205
+ color_inverse: zt,
206
+ "color_inverse-secondary": "text__color_inverse-secondary_1ecb3",
207
+ color_disable: kt,
208
+ align_left: Bt,
209
+ align_center: Mt,
210
+ align_right: Lt,
211
+ "is-ellipsis": "text__is-ellipsis_4b9a7"
212
+ }, It = {
213
+ $style: Ct
214
+ }, Z = /* @__PURE__ */ C(Ye, [["__cssModules", It]]), Ft = /* @__PURE__ */ B({
215
+ __name: "TheTextSkeleton",
216
+ props: {
217
+ color: {},
218
+ size: {},
219
+ widthRange: {}
220
+ },
221
+ setup(e) {
222
+ const t = D(), s = z(), o = z(), n = u(() => [t.root, t[`size_${e.size}`], t[`color_${e.color}`]]);
223
+ function l() {
224
+ if (e.widthRange && e.widthRange[0] && e.widthRange[1] && s.value) {
225
+ const c = Me(s.value, "max-width");
226
+ if (c) {
227
+ const i = ~c.toString().indexOf("%") ? parseInt(c.toString().replace("%", ""), 10) : 100, h = parseFloat(
228
+ (Math.abs(e.widthRange[1] - e.widthRange[0]) * Math.random() * 100).toFixed(2)
229
+ ), p = (e.widthRange[0] >= e.widthRange[1] ? e.widthRange[0] : e.widthRange[1]) * 100;
230
+ o.value = `${(p - h) * i / 100}%`;
231
+ }
232
+ }
233
+ }
234
+ return Te(() => l()), (c, i) => (d(), w("div", {
235
+ ref_key: "skeleton",
236
+ ref: s,
237
+ class: m(n.value),
238
+ style: P({ width: o.value }),
239
+ key: o.value
240
+ }, i[0] || (i[0] = [
241
+ y("span", null, null, -1)
242
+ ]), 6));
243
+ }
244
+ }), Rt = "TheTextSkeleton__root_e7018", Ot = "TheTextSkeleton__color_620e0", Pt = "TheTextSkeleton__color_base_10465", Et = "TheTextSkeleton__color_secondary_e1ef1", jt = "TheTextSkeleton__color_error_64442", At = "TheTextSkeleton__color_success_5a3da", Vt = "TheTextSkeleton__color_inverse_54207", Dt = "TheTextSkeleton__color_disable_88db9", Nt = "TheTextSkeleton__size_title_huge_23e69", Gt = "TheTextSkeleton__size_title_large_3374c", Wt = "TheTextSkeleton__size_title_medium_0f6e0", Ht = "TheTextSkeleton__size_title_small_138c6", Kt = "TheTextSkeleton__size_title_extraSmall_2f6ca", Ut = "TheTextSkeleton__size_headline_small_96a95", Xt = "TheTextSkeleton__size_subhead_large_effd2", Yt = "TheTextSkeleton__size_text_small_e5cd8", Zt = "TheTextSkeleton__size_caption_small_f5390", qt = {
245
+ root: Rt,
246
+ color: Ot,
247
+ color_base: Pt,
248
+ color_secondary: Et,
249
+ "color_brand-accent": "TheTextSkeleton__color_brand-accent_afa16",
250
+ "color_brand-market": "TheTextSkeleton__color_brand-market_fca73",
251
+ color_error: jt,
252
+ color_success: At,
253
+ color_inverse: Vt,
254
+ "color_inverse-secondary": "TheTextSkeleton__color_inverse-secondary_5e112",
255
+ color_disable: Dt,
256
+ size_title_huge: Nt,
257
+ size_title_large: Gt,
258
+ size_title_medium: Wt,
259
+ size_title_small: Ht,
260
+ size_title_extraSmall: Kt,
261
+ size_headline_small: Ut,
262
+ size_subhead_large: Xt,
263
+ size_text_small: Yt,
264
+ size_caption_small: Zt
265
+ }, Jt = {
266
+ $style: qt
267
+ }, Qt = /* @__PURE__ */ C(Ft, [["__cssModules", Jt]]), eo = ["id"], to = { "stroke-width": "15" }, oo = ["stroke"], so = ["stroke"], no = /* @__PURE__ */ B({
268
+ __name: "Loader",
269
+ props: {
270
+ view: {},
271
+ size: {}
272
+ },
273
+ setup(e) {
274
+ const t = D(), s = {
275
+ orange: "rgba(255, 97, 0, 1)",
276
+ white: "rgba(255, 255, 255, 1)",
277
+ black: "rgba(35, 36, 37, 1)",
278
+ gray: "rgba(197, 205, 220, 1)",
279
+ red: "rgba(255, 45, 85, 1)"
280
+ }, o = {
281
+ a: `spinner-${e.view}-a`,
282
+ b: `spinner-${e.view}-b`
283
+ }, n = u(() => [t.root, t[`size_${e.size}`]]), l = u(
284
+ () => s[e.view]
285
+ ), c = u(() => ({
286
+ color: l.value,
287
+ xmlns: "http://www.w3.org/2000/svg",
288
+ fill: "none",
289
+ viewBox: "0 0 200 200",
290
+ width: "200",
291
+ height: "200"
292
+ }));
293
+ return (i, h) => (d(), w("div", {
294
+ class: m(n.value)
295
+ }, [
296
+ (d(), w("svg", ce(we(c.value)), [
297
+ h[1] || (h[1] = y("defs", null, [
298
+ y("stop", {
299
+ offset: "0%",
300
+ "stop-opacity": "0",
301
+ "stop-color": "currentColor"
302
+ }),
303
+ y("stop", {
304
+ offset: "100%",
305
+ "stop-opacity": ".5",
306
+ "stop-color": "currentColor"
307
+ })
308
+ ], -1)),
309
+ y("linearGradient", {
310
+ id: o.b
311
+ }, h[0] || (h[0] = [
312
+ y("stop", {
313
+ offset: "0%",
314
+ "stop-opacity": "0",
315
+ "stop-color": "currentColor"
316
+ }, null, -1),
317
+ y("stop", {
318
+ offset: "100%",
319
+ "stop-opacity": ".5",
320
+ "stop-color": "currentColor"
321
+ }, null, -1)
322
+ ]), 8, eo),
323
+ y("g", to, [
324
+ y("path", {
325
+ stroke: `url(#${o.a})`,
326
+ d: "M15 100a85 85 0 0 1 170 0"
327
+ }, null, 8, oo),
328
+ y("path", {
329
+ stroke: `url(#${o.b})`,
330
+ d: "M185 100a85 85 0 0 1-170 0"
331
+ }, null, 8, so)
332
+ ])
333
+ ], 16))
334
+ ], 2));
335
+ }
336
+ }), ao = "Loader__root_6a680", lo = "Loader__rotate360_01915", io = "Loader__size_xs_72d28", ro = "Loader__size_s_d91c3", co = "Loader__size_m_c2262", _o = "Loader__size_l_ab27e", uo = "Loader__size_xl_f9fa1", fo = {
337
+ root: ao,
338
+ rotate360: lo,
339
+ size_xs: io,
340
+ size_s: ro,
341
+ size_m: co,
342
+ size_l: _o,
343
+ size_xl: uo
344
+ }, mo = {
345
+ $style: fo
346
+ }, de = /* @__PURE__ */ C(no, [["__cssModules", mo]]), ho = {
347
+ xl: 20,
348
+ l: 20,
349
+ m: 20,
350
+ s: 18
351
+ }, vo = {
352
+ xl: "headlineSmall",
353
+ l: "headlineSmall",
354
+ m: "subheadMedium",
355
+ s: "textMedium"
356
+ }, yo = {
357
+ primary: "inverse",
358
+ tertiary: "brand-accent",
359
+ outlineBase: "base",
360
+ system: "secondary",
361
+ brandOpacity: "brand-accent",
362
+ secondary: "base",
363
+ criticalOnSurface: "error",
364
+ onDarkPrimary: "base",
365
+ base: "inverse",
366
+ criticalOpacity: "error"
367
+ }, fe = {
368
+ xl: "m",
369
+ l: "m",
370
+ m: "m",
371
+ s: "s"
372
+ }, go = {
373
+ primary: "white",
374
+ tertiary: "orange",
375
+ outlineBase: "black",
376
+ system: "gray",
377
+ brandOpacity: "orange",
378
+ secondary: "black",
379
+ criticalOnSurface: "red",
380
+ onDarkPrimary: "black",
381
+ base: "white",
382
+ criticalOpacity: "red"
383
+ }, bo = {
384
+ xl: "s",
385
+ l: "s",
386
+ m: "xs",
387
+ s: "xs"
388
+ }, $o = /* @__PURE__ */ B({
389
+ __name: "Button",
390
+ props: {
391
+ tag: {},
392
+ href: {},
393
+ type: {},
394
+ isLoading: { type: Boolean },
395
+ isDisabled: { type: Boolean },
396
+ view: {},
397
+ size: {},
398
+ interactionType: { default: "web" },
399
+ radius: {},
400
+ iconLeft: {},
401
+ iconRight: {},
402
+ isWide: { type: Boolean }
403
+ },
404
+ emits: ["click"],
405
+ setup(e, { emit: t }) {
406
+ const s = t, o = D(), n = u(() => ho[e.size]), l = u(() => vo[e.size]), c = u(() => e.isDisabled ? "disable" : yo[e.view]), i = u(() => e.radius ? e.radius : fe[e.size]), h = u(() => ({
407
+ class: o.loader,
408
+ view: go[e.view],
409
+ size: bo[e.size]
410
+ })), p = u(() => [
411
+ o.root,
412
+ o[`size_${e.size}`],
413
+ o[`view_${e.view}`],
414
+ o[`radius_${i.value}`],
415
+ o[`interaction-type_${e.interactionType}`],
416
+ e.isDisabled && o["is-disabled"],
417
+ e.isWide && o["is-wide"]
418
+ ]), v = u(() => [
419
+ o.wrapper,
420
+ e.isLoading && o["is-loading"]
421
+ ]);
422
+ function _(r) {
423
+ s("click", r);
424
+ }
425
+ return (r, b) => (d(), E(k(ue), {
426
+ class: m(p.value),
427
+ tag: r.tag,
428
+ href: r.href,
429
+ type: r.type,
430
+ "is-loading": r.isLoading,
431
+ "is-disabled": r.isDisabled,
432
+ onClick: _
433
+ }, {
434
+ default: j(() => [
435
+ y("div", {
436
+ class: m(v.value)
437
+ }, [
438
+ r.iconLeft ? (d(), E(k(Y), {
439
+ key: 0,
440
+ name: r.iconLeft,
441
+ color: c.value,
442
+ size: n.value
443
+ }, null, 8, ["name", "color", "size"])) : W("", !0),
444
+ G(k(Z), {
445
+ name: l.value,
446
+ color: c.value
447
+ }, {
448
+ default: j(() => [
449
+ K(r.$slots, "default")
450
+ ]),
451
+ _: 3
452
+ }, 8, ["name", "color"]),
453
+ r.iconRight ? (d(), E(k(Y), {
454
+ key: 1,
455
+ name: r.iconRight,
456
+ color: c.value,
457
+ size: n.value
458
+ }, null, 8, ["name", "color", "size"])) : W("", !0)
459
+ ], 2),
460
+ G(ee, {
461
+ name: "fade",
462
+ mode: "out-in"
463
+ }, {
464
+ default: j(() => [
465
+ r.isLoading ? (d(), E(k(de), ce(H({ key: 0 }, h.value)), null, 16)) : W("", !0)
466
+ ]),
467
+ _: 1
468
+ })
469
+ ]),
470
+ _: 3
471
+ }, 8, ["class", "tag", "href", "type", "is-loading", "is-disabled"]));
472
+ }
473
+ }), To = "Button__root_d73c7", wo = "Button__size_xl_d4508", po = "Button__size_l_36a47", So = "Button__size_m_a0dfa", xo = "Button__size_s_c29cc", zo = "Button__view_2d25c", ko = "Button__view_primary_2e1d8", Bo = "Button__view_tertiary_87211", Mo = "Button__view_outlineBase_c6ec7", Lo = "Button__view_system_b353e", Co = "Button__view_brandOpacity_464b2", Io = "Button__view_secondary_04e61", Fo = "Button__view_criticalOnSurface_466b2", Ro = "Button__view_criticalOpacity_0847b", Oo = "Button__view_onDarkPrimary_1e4eb", Po = "Button__view_base_a30a0", Eo = "Button__view_skeleton_fd281", jo = "Button__radius_m_ee05f", Ao = "Button__radius_s_f15d9", Vo = "Button__wrapper_e7d56", Do = "Button__loader_37a37", me = {
474
+ root: To,
475
+ "interaction-type_webview": "Button__interaction-type_webview_cbcd8",
476
+ size_xl: wo,
477
+ size_l: po,
478
+ size_m: So,
479
+ size_s: xo,
480
+ view: zo,
481
+ view_primary: ko,
482
+ view_tertiary: Bo,
483
+ view_outlineBase: Mo,
484
+ view_system: Lo,
485
+ view_brandOpacity: Co,
486
+ view_secondary: Io,
487
+ view_criticalOnSurface: Fo,
488
+ view_criticalOpacity: Ro,
489
+ view_onDarkPrimary: Oo,
490
+ view_base: Po,
491
+ view_skeleton: Eo,
492
+ radius_m: jo,
493
+ radius_s: Ao,
494
+ wrapper: Vo,
495
+ loader: Do,
496
+ "is-disabled": "Button__is-disabled_b357e",
497
+ "is-loading": "Button__is-loading_53182",
498
+ "is-wide": "Button__is-wide_3f0c1"
499
+ }, No = {
500
+ $style: me
501
+ }, Go = /* @__PURE__ */ C($o, [["__cssModules", No]]), Wo = /* @__PURE__ */ B({
502
+ __name: "ButtonSkeleton",
503
+ props: {
504
+ size: {}
505
+ },
506
+ setup(e) {
507
+ const t = D(), s = u(() => fe[e.size]), o = u(() => [
508
+ t.root,
509
+ t[`size_${e.size}`],
510
+ t.view_skeleton,
511
+ t[`radius_${s.value}`],
512
+ t["is-wide"]
513
+ ]);
514
+ return (n, l) => (d(), w("div", {
515
+ class: m(o.value)
516
+ }, null, 2));
517
+ }
518
+ }), Ho = {
519
+ $style: me
520
+ }, Ko = /* @__PURE__ */ C(Wo, [["__cssModules", Ho]]), Uo = /* @__PURE__ */ B({
521
+ __name: "SkeletonWrapper",
522
+ setup(e) {
523
+ const t = D(), s = u(() => [t.root]);
524
+ return (o, n) => (d(), w("div", {
525
+ class: m(s.value)
526
+ }, [
527
+ K(o.$slots, "default")
528
+ ], 2));
529
+ }
530
+ }), Xo = "SkeletonWrapper__root_e7206", Yo = "SkeletonWrapper__pulse_fef1d", Zo = {
531
+ root: Xo,
532
+ pulse: Yo
533
+ }, qo = {
534
+ $style: Zo
535
+ }, Jo = /* @__PURE__ */ C(Uo, [["__cssModules", qo]]);
536
+ function V(e) {
537
+ return typeof e == "function" ? e() : k(e);
538
+ }
539
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
540
+ const ie = () => {
541
+ };
542
+ function J(e, t = !1, s = "Timeout") {
543
+ return new Promise((o, n) => {
544
+ setTimeout(t ? () => n(s) : o, e);
545
+ });
546
+ }
547
+ function Q(e, t = !1) {
548
+ function s(_, { flush: r = "sync", deep: b = !1, timeout: M, throwOnTimeout: A } = {}) {
549
+ let S = null;
550
+ const L = [new Promise((R) => {
551
+ S = X(
552
+ e,
553
+ (T) => {
554
+ _(T) !== t && (S == null || S(), R(T));
555
+ },
556
+ {
557
+ flush: r,
558
+ deep: b,
559
+ immediate: !0
560
+ }
561
+ );
562
+ })];
563
+ return M != null && L.push(
564
+ J(M, A).then(() => V(e)).finally(() => S == null ? void 0 : S())
565
+ ), Promise.race(L);
566
+ }
567
+ function o(_, r) {
568
+ if (!pe(_))
569
+ return s((T) => T === _, r);
570
+ const { flush: b = "sync", deep: M = !1, timeout: A, throwOnTimeout: S } = r ?? {};
571
+ let $ = null;
572
+ const R = [new Promise((T) => {
573
+ $ = X(
574
+ [e, _],
575
+ ([a, f]) => {
576
+ t !== (a === f) && ($ == null || $(), T(a));
577
+ },
578
+ {
579
+ flush: b,
580
+ deep: M,
581
+ immediate: !0
582
+ }
583
+ );
584
+ })];
585
+ return A != null && R.push(
586
+ J(A, S).then(() => V(e)).finally(() => ($ == null || $(), V(e)))
587
+ ), Promise.race(R);
588
+ }
589
+ function n(_) {
590
+ return s((r) => !!r, _);
591
+ }
592
+ function l(_) {
593
+ return o(null, _);
594
+ }
595
+ function c(_) {
596
+ return o(void 0, _);
597
+ }
598
+ function i(_) {
599
+ return s(Number.isNaN, _);
600
+ }
601
+ function h(_, r) {
602
+ return s((b) => {
603
+ const M = Array.from(b);
604
+ return M.includes(_) || M.includes(V(_));
605
+ }, r);
606
+ }
607
+ function p(_) {
608
+ return v(1, _);
609
+ }
610
+ function v(_ = 1, r) {
611
+ let b = -1;
612
+ return s(() => (b += 1, b >= _), r);
613
+ }
614
+ return Array.isArray(V(e)) ? {
615
+ toMatch: s,
616
+ toContains: h,
617
+ changed: p,
618
+ changedTimes: v,
619
+ get not() {
620
+ return Q(e, !t);
621
+ }
622
+ } : {
623
+ toMatch: s,
624
+ toBe: o,
625
+ toBeTruthy: n,
626
+ toBeNull: l,
627
+ toBeNaN: i,
628
+ toBeUndefined: c,
629
+ changed: p,
630
+ changedTimes: v,
631
+ get not() {
632
+ return Q(e, !t);
633
+ }
634
+ };
635
+ }
636
+ function Qo(e) {
637
+ return Q(e);
638
+ }
639
+ function es(e, t, s) {
640
+ const {
641
+ immediate: o = !0,
642
+ delay: n = 0,
643
+ onError: l = ie,
644
+ onSuccess: c = ie,
645
+ resetOnExecute: i = !0,
646
+ shallow: h = !0,
647
+ throwError: p
648
+ } = s ?? {}, v = h ? oe(t) : z(t), _ = z(!1), r = z(!1), b = oe(void 0);
649
+ async function M($ = 0, ...L) {
650
+ i && (v.value = t), b.value = void 0, _.value = !1, r.value = !0, $ > 0 && await J($);
651
+ const R = typeof e == "function" ? e(...L) : e;
652
+ try {
653
+ const T = await R;
654
+ v.value = T, _.value = !0, c(T);
655
+ } catch (T) {
656
+ if (b.value = T, l(T), p)
657
+ throw T;
658
+ } finally {
659
+ r.value = !1;
660
+ }
661
+ return v.value;
662
+ }
663
+ o && M(n);
664
+ const A = {
665
+ state: v,
666
+ isReady: _,
667
+ isLoading: r,
668
+ error: b,
669
+ execute: M
670
+ };
671
+ function S() {
672
+ return new Promise(($, L) => {
673
+ Qo(r).toBe(!1).then(() => $(A)).catch(L);
674
+ });
675
+ }
676
+ return {
677
+ ...A,
678
+ then($, L) {
679
+ return S().then($, L);
680
+ }
681
+ };
682
+ }
683
+ async function ts(e) {
684
+ return new Promise((t, s) => {
685
+ const o = new Image(), { src: n, srcset: l, sizes: c, class: i, loading: h, crossorigin: p, referrerPolicy: v } = e;
686
+ o.src = n, l && (o.srcset = l), c && (o.sizes = c), i && (o.className = i), h && (o.loading = h), p && (o.crossOrigin = p), v && (o.referrerPolicy = v), o.onload = () => t(o), o.onerror = s;
687
+ });
688
+ }
689
+ function os(e, t = {}) {
690
+ const s = es(
691
+ () => ts(V(e)),
692
+ void 0,
693
+ {
694
+ resetOnExecute: !0,
695
+ ...t
696
+ }
697
+ );
698
+ return X(
699
+ () => V(e),
700
+ () => s.execute(t.delay),
701
+ { deep: !0 }
702
+ ), s;
703
+ }
704
+ const ss = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='_Слой_1'%20data-name='Слой_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%2024%2024'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.2.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20116)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0,%20.st1%20{%20fill:%20currentColor;%20}%20.st1%20{%20fill-rule:%20evenodd;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st1'%20d='M21.2,7c-.1-.9-.3-1.7-.8-2.4-.3-.4-.6-.8-1-1-.7-.5-1.5-.7-2.4-.8-.9,0-2,0-3.4,0h-3.1c-1.4,0-2.5,0-3.4,0-.9,0-1.7.3-2.4.8-.4.3-.8.6-1,1-.5.7-.7,1.5-.8,2.4,0,.9,0,2,0,3.4h0v3h0c0,1.4,0,2.6,0,3.5,0,.9.3,1.7.8,2.4.3.4.6.8,1,1,.7.5,1.5.7,2.4.8.9,0,2,0,3.4,0h3.1c1.4,0,2.5,0,3.4,0,.9-.1,1.7-.3,2.4-.8.4-.3.8-.6,1-1,.5-.7.7-1.5.8-2.4,0-.9,0-2,0-3.4h0v-3h0c0-1.4,0-2.6,0-3.5ZM19.4,16.8c0,.8-.2,1.2-.5,1.5-.2.2-.4.5-.7.7-.3.2-.8.4-1.5.5-.8,0-1.8,0-3.3,0h-3c-1.5,0-2.5,0-3.3,0-.5,0-.9-.1-1.1-.3l7.4-7.4c.5-.5.9-.9,1.2-1.1.3-.2.4-.3.5-.3.1,0,.2,0,.3,0,0,0,.2,0,.5.3.3.2.6.6,1.2,1.1l2.3,2.3c0,1.2,0,2,0,2.7ZM19.5,11.5l-1.1-1.1h0c-.5-.5-.9-.9-1.3-1.2-.4-.3-.8-.6-1.3-.7-.3,0-.6,0-.9,0-.5,0-1,.3-1.3.7-.4.3-.8.7-1.3,1.2h0s-7.4,7.5-7.4,7.5c-.1-.3-.2-.6-.3-1.1,0-.8,0-1.8,0-3.3v-3c0-1.5,0-2.5,0-3.3,0-.8.2-1.2.5-1.5.2-.2.4-.5.7-.7.3-.2.8-.4,1.5-.5.8,0,1.8,0,3.3,0h3c1.5,0,2.5,0,3.3,0,.8,0,1.2.2,1.5.5.2.2.5.4.7.7.2.3.4.8.5,1.5,0,.8,0,1.8,0,3.3v1Z'/%3e%3ccircle%20class='st0'%20cx='8.8'%20cy='8.5'%20r='1.8'/%3e%3c/svg%3e", U = {
705
+ "fade-enter-active": "TransitionFade__fade-enter-active_aa1d8",
706
+ "fade-leave-active": "TransitionFade__fade-leave-active_39194",
707
+ "fade-enter-from": "TransitionFade__fade-enter-from_74398",
708
+ "fade-leave-to": "TransitionFade__fade-leave-to_fab21"
709
+ }, he = B({
710
+ name: "TransitionFade",
711
+ props: {
712
+ appear: {
713
+ type: Boolean,
714
+ default: !1
715
+ },
716
+ mode: {
717
+ type: String,
718
+ default: "out-in"
719
+ },
720
+ duration: {
721
+ type: Number,
722
+ default: 300
723
+ }
724
+ },
725
+ setup(e, { slots: t }) {
726
+ return () => Se(
727
+ ee,
728
+ {
729
+ name: "fade",
730
+ appear: e.appear,
731
+ mode: e.mode,
732
+ duration: e.duration,
733
+ enterFromClass: U["fade-enter-from"],
734
+ enterActiveClass: U["fade-enter-active"],
735
+ leaveActiveClass: U["fade-leave-active"],
736
+ leaveToClass: U["fade-leave-to"]
737
+ },
738
+ () => t.default ? t.default() : []
739
+ );
740
+ }
741
+ }), ns = ["src"], as = ["fetchpriority", "width", "height", "src", "alt"], ls = { key: "loading" }, is = /* @__PURE__ */ B({
742
+ __name: "TheImage",
743
+ props: {
744
+ src: {},
745
+ alt: {},
746
+ width: {},
747
+ height: {},
748
+ objectFit: {},
749
+ hasPlaceholder: { type: Boolean, default: !1 },
750
+ hasPriority: { type: Boolean, default: !1 },
751
+ isLayoutFill: { type: Boolean },
752
+ hasMixBlendMode: { type: Boolean, default: !1 }
753
+ },
754
+ setup(e) {
755
+ const t = u(() => ({ src: e.src, alt: e.alt })), { isLoading: s, error: o } = os(t, {
756
+ immediate: !1
757
+ }), n = u(() => !+e.width && !+e.height ? "auto" : `${e.width}/${e.height}`), l = u(() => e.hasMixBlendMode && c.value === "idle"), c = u(() => s.value ? "loading" : o.value ? "error" : "idle");
758
+ return (i, h) => (d(), w("div", {
759
+ class: m([i.$style.root, c.value === "loading" && i.$style.hasPulse]),
760
+ style: P({ aspectRatio: n.value })
761
+ }, [
762
+ G(k(he), null, {
763
+ default: j(() => [
764
+ c.value === "error" && i.hasPlaceholder ? (d(), w("img", {
765
+ key: "error",
766
+ class: m(i.$style.placeholder),
767
+ src: k(ss),
768
+ alt: "image placeholder"
769
+ }, null, 10, ns)) : c.value === "idle" ? (d(), w("img", {
770
+ fetchpriority: i.hasPriority,
771
+ key: "image",
772
+ class: m([
773
+ i.$style.image,
774
+ l.value && i.$style.mixBlendMode,
775
+ i.$style[`objectFit_${i.objectFit}`]
776
+ ]),
777
+ width: i.width,
778
+ height: i.height,
779
+ src: i.src,
780
+ alt: i.alt
781
+ }, null, 10, as)) : (d(), w("div", ls))
782
+ ]),
783
+ _: 1
784
+ })
785
+ ], 6));
786
+ }
787
+ }), rs = "TheImage__root_484a1", cs = "TheImage__image_2c261", _s = "TheImage__mixBlendMode_ca9ee", us = "TheImage__objectFit_cover_8f5ee", ds = "TheImage__objectFit_contain_c6076", fs = "TheImage__placeholder_1e624", ms = "TheImage__hasPulse_af1f2", hs = "TheImage__pulse_56855", vs = {
788
+ root: rs,
789
+ image: cs,
790
+ mixBlendMode: _s,
791
+ objectFit_cover: us,
792
+ objectFit_contain: ds,
793
+ placeholder: fs,
794
+ hasPulse: ms,
795
+ pulse: hs
796
+ }, ys = {
797
+ $style: vs
798
+ }, gs = /* @__PURE__ */ C(is, [["__cssModules", ys]]), bs = ["srcset"], $s = ["width", "height", "src", "alt"], Ts = /* @__PURE__ */ B({
799
+ __name: "ThePicture",
800
+ props: {
801
+ src: {},
802
+ alt: {},
803
+ width: {},
804
+ height: {},
805
+ objectFit: {},
806
+ hasPriority: { type: Boolean }
807
+ },
808
+ setup(e) {
809
+ const t = u(() => {
810
+ const o = /\.(png|jpg|jpeg)$/;
811
+ return o.test(e.src) || console.warn("src prop must be png, jpg or jpeg"), e.src.replace(o, "");
812
+ }), s = u(() => ({
813
+ ...e.hasPriority && {
814
+ fetchpriority: "high"
815
+ }
816
+ }));
817
+ return (o, n) => (d(), w("picture", {
818
+ class: m(o.$style.root)
819
+ }, [
820
+ y("source", {
821
+ srcset: t.value + ".webp",
822
+ type: "image/webp"
823
+ }, null, 8, bs),
824
+ y("img", H(s.value, {
825
+ class: [o.$style.image, o.$style[`objectFit_${o.objectFit}`]],
826
+ width: o.width,
827
+ height: o.height,
828
+ src: o.src,
829
+ alt: o.alt,
830
+ loading: "lazy",
831
+ onError: n[0] || (n[0] = //@ts-ignore
832
+ (...l) => o.handleFailure && o.handleFailure(...l))
833
+ }), null, 16, $s)
834
+ ], 2));
835
+ }
836
+ }), ws = "ThePicture__root_e38eb", ps = "ThePicture__image_29186", Ss = "ThePicture__objectFit_cover_0c234", xs = "ThePicture__objectFit_contain_9e95d", zs = {
837
+ root: ws,
838
+ image: ps,
839
+ objectFit_cover: Ss,
840
+ objectFit_contain: xs
841
+ }, ks = {
842
+ $style: zs
843
+ }, Bs = /* @__PURE__ */ C(Ts, [["__cssModules", ks]]), Ms = {
844
+ "enter-active": "TransitionVisibilityToggle__enter-active_bc3d6",
845
+ "leave-active": "TransitionVisibilityToggle__leave-active_23b21",
846
+ "enter-from": "TransitionVisibilityToggle__enter-from_0ca29",
847
+ "enter-to": "TransitionVisibilityToggle__enter-to_6293c",
848
+ "leave-from": "TransitionVisibilityToggle__leave-from_4b6bf",
849
+ "leave-to": "TransitionVisibilityToggle__leave-to_d0bb6"
850
+ }, Ls = {};
851
+ function Cs(e, t) {
852
+ return d(), E(ee, {
853
+ mode: "out-in",
854
+ name: "toggle-visibility",
855
+ enterActiveClass: e.$style["enter-active"],
856
+ leaveActiveClass: e.$style["leave-active"],
857
+ enterToClass: e.$style["enter-to"],
858
+ enterFromClass: e.$style["enter-from"],
859
+ leaveToClass: e.$style["leave-to"],
860
+ leaveFromClass: e.$style["leave-from"]
861
+ }, {
862
+ default: j(() => [
863
+ K(e.$slots, "default")
864
+ ]),
865
+ _: 3
866
+ }, 8, ["enterActiveClass", "leaveActiveClass", "enterToClass", "enterFromClass", "leaveToClass", "leaveFromClass"]);
867
+ }
868
+ const Is = {
869
+ $style: Ms
870
+ }, Fs = /* @__PURE__ */ C(Ls, [["render", Cs], ["__cssModules", Is]]), Rs = /* @__PURE__ */ B({
871
+ __name: "ToastItem",
872
+ props: {
873
+ icon: {},
874
+ title: {},
875
+ timer: {},
876
+ buttonText: {},
877
+ onButtonClick: { type: Function }
878
+ },
879
+ setup(e) {
880
+ return (t, s) => (d(), w("div", {
881
+ class: m([t.$style.root, t.icon && t.$style["is-icon"]]),
882
+ onClick: s[0] || (s[0] = (o) => t.$emit("click"))
883
+ }, [
884
+ G(k(Z), {
885
+ class: m(t.$style.title),
886
+ name: "subheadSmall",
887
+ color: "inverse",
888
+ align: "left"
889
+ }, {
890
+ default: j(() => [
891
+ se(ne(t.title), 1)
892
+ ]),
893
+ _: 1
894
+ }, 8, ["class"]),
895
+ t.icon ? (d(), E(k(Y), {
896
+ key: 0,
897
+ class: m(t.$style.icon),
898
+ size: 20,
899
+ name: t.icon,
900
+ color: "inverse"
901
+ }, null, 8, ["class", "name"])) : W("", !0),
902
+ t.buttonText ? (d(), E(k(Z), {
903
+ key: 1,
904
+ class: m(t.$style.button),
905
+ name: "subheadSmall",
906
+ color: "brand-accent",
907
+ onClick: t.onButtonClick
908
+ }, {
909
+ default: j(() => [
910
+ se(ne(t.buttonText), 1)
911
+ ]),
912
+ _: 1
913
+ }, 8, ["class", "onClick"])) : W("", !0)
914
+ ], 2));
915
+ }
916
+ }), Os = "ToastItem__root_ef96a", Ps = "ToastItem__icon_27903", Es = "ToastItem__timer_1a2c8", js = "ToastItem__button_eb561", As = "ToastItem__title_949d1", Vs = {
917
+ root: Os,
918
+ "is-icon": "ToastItem__is-icon_fab71",
919
+ icon: Ps,
920
+ timer: Es,
921
+ button: js,
922
+ title: As
923
+ }, Ds = {
924
+ $style: Vs
925
+ }, Ns = /* @__PURE__ */ C(Rs, [["__cssModules", Ds]]);
926
+ class Gs {
927
+ constructor() {
928
+ q(this, "list", z([]));
929
+ q(this, "timeouts", z({}));
930
+ }
931
+ restartTimeouts() {
932
+ Object.keys(this.timeouts.value).forEach((t, s) => {
933
+ this.timeouts.value[t] = setTimeout(
934
+ () => {
935
+ this.remove(+t), clearTimeout(this.timeouts.value[t]);
936
+ },
937
+ 4e3 + s * 300
938
+ );
939
+ });
940
+ }
941
+ pauseTimeouts() {
942
+ Object.keys(this.timeouts.value).forEach((t) => {
943
+ clearTimeout(this.timeouts.value[t]);
944
+ });
945
+ }
946
+ remove(t) {
947
+ this.list.value = this.list.value.filter((s) => s.id !== t);
948
+ }
949
+ show(t) {
950
+ let s;
951
+ const o = this.list.value[0] ? this.list.value[0].id + 1 : 1;
952
+ let n = 5e3;
953
+ typeof t == "string" ? s = {
954
+ id: o,
955
+ title: t + ` ${o}`
956
+ } : (s = {
957
+ ...t,
958
+ title: t.title + ` ${o}`,
959
+ id: o
960
+ }, n = t.timer ? t.timer * 1e3 : 5e3), this.list.value.length === 3 && this.list.value.pop(), this.list.value.unshift(s), this.timeouts.value[o] = setTimeout(() => {
961
+ this.remove(s.id), clearTimeout(this.timeouts.value[o]);
962
+ }, n);
963
+ }
964
+ showError(t = "Упс, что-то пошло не так :(", s = "alert_fill") {
965
+ this.show({
966
+ title: t,
967
+ icon: s
968
+ });
969
+ }
970
+ install(t) {
971
+ t.provide(ve, this);
972
+ }
973
+ }
974
+ const ve = Symbol("ToastService"), nn = new Gs(), Ws = ["id"], Hs = /* @__PURE__ */ B({
975
+ __name: "Toaster",
976
+ setup(e) {
977
+ let t;
978
+ const s = _e(ve), o = z(), n = z([]), l = z(!1), c = z(S()), i = z(S()), h = z(S()), p = z(S());
979
+ function v(a) {
980
+ const f = $(a);
981
+ return {
982
+ toaster: {
983
+ transform: c.value[f]
984
+ },
985
+ body: {
986
+ transform: i.value[f]
987
+ },
988
+ left: {
989
+ transform: h.value[f]
990
+ },
991
+ right: {
992
+ transform: p.value[f]
993
+ }
994
+ };
995
+ }
996
+ function _(a, f) {
997
+ (f !== "main" || c.value.main.length) && (c.value[f] = a.mainTranslate), i.value[f] = a.scale, h.value[f] = a.leftTranslate, p.value[f] = a.rightTranslate;
998
+ }
999
+ function r() {
1000
+ let f = 0, I = 0;
1001
+ n.value.sort(L).forEach((F, g) => {
1002
+ const x = $(g), N = T(`-${f}px`);
1003
+ _(N, x), f += F.clientHeight + 12, I = Math.max(I, F.clientWidth);
1004
+ }), o.value.style.height = `-${f}px`, o.value.style.width = `${I}px`;
1005
+ }
1006
+ function b() {
1007
+ ae(() => {
1008
+ const [a, f, I] = n.value.sort(L), F = T("0");
1009
+ if (_(F, "main"), f) {
1010
+ const g = R({
1011
+ mainElement: a,
1012
+ element: f,
1013
+ translateY: "-15%",
1014
+ index: 1
1015
+ });
1016
+ _(g, "second");
1017
+ }
1018
+ if (I) {
1019
+ const g = R({
1020
+ mainElement: a,
1021
+ element: I,
1022
+ translateY: "-30%",
1023
+ index: 2
1024
+ });
1025
+ _(g, "third"), ae(() => {
1026
+ var N;
1027
+ const x = (N = o.value) == null ? void 0 : N.querySelector(
1028
+ ".toaster-leave-active"
1029
+ );
1030
+ if (x) {
1031
+ const O = R({
1032
+ mainElement: a,
1033
+ element: x,
1034
+ translateY: "45%",
1035
+ index: 3
1036
+ });
1037
+ x.setAttribute(
1038
+ "style",
1039
+ `transform: ${O.mainTranslate};`
1040
+ ), x.children[1].setAttribute(
1041
+ "style",
1042
+ `transform: ${O.scale};`
1043
+ ), x.children[0].setAttribute(
1044
+ "style",
1045
+ `transform: ${O.leftTranslate};`
1046
+ ), x.children[2].setAttribute(
1047
+ "style",
1048
+ `transform: ${O.rightTranslate};`
1049
+ ), x.children[4].setAttribute(
1050
+ "style",
1051
+ `transform: ${O.scale};`
1052
+ ), x.children[3].setAttribute(
1053
+ "style",
1054
+ `transform: ${O.leftTranslate};`
1055
+ ), x.children[5].setAttribute(
1056
+ "style",
1057
+ `transform: ${O.rightTranslate};`
1058
+ );
1059
+ }
1060
+ });
1061
+ }
1062
+ });
1063
+ }
1064
+ function M(a) {
1065
+ l.value && (s == null || s.remove(a), r());
1066
+ }
1067
+ function A() {
1068
+ l.value || (l.value = !0, s == null || s.pauseTimeouts(), r(), t = setTimeout(() => {
1069
+ l.value = !1, b(), o.value.style.height = "auto", o.value.style.width = "auto", s == null || s.restartTimeouts(), clearTimeout(t);
1070
+ }, 5e3));
1071
+ }
1072
+ X(
1073
+ () => s == null ? void 0 : s.list,
1074
+ () => {
1075
+ l.value ? r() : b();
1076
+ },
1077
+ { deep: !0 }
1078
+ );
1079
+ function S() {
1080
+ return {
1081
+ main: "",
1082
+ second: "",
1083
+ third: ""
1084
+ };
1085
+ }
1086
+ function $(a) {
1087
+ switch (a) {
1088
+ case 0:
1089
+ return "main";
1090
+ case 1:
1091
+ return "second";
1092
+ default:
1093
+ return "third";
1094
+ }
1095
+ }
1096
+ function L(a, f) {
1097
+ return Number(f.id) - Number(a.id);
1098
+ }
1099
+ function R({
1100
+ mainElement: a,
1101
+ element: f,
1102
+ translateY: I,
1103
+ index: F
1104
+ }) {
1105
+ const g = f.getBoundingClientRect(), x = a.getBoundingClientRect(), N = x.height / g.height, O = (x.width - 10 * F) / g.width, te = (g.width - O * g.width) / 2;
1106
+ return {
1107
+ mainTranslate: `translateY(${I}) translateX(-50%)`,
1108
+ scale: `scale(${O}, ${N})`,
1109
+ leftTranslate: `translateX(${te - 12}px)`,
1110
+ rightTranslate: `translateX(${-te + 12}px)`
1111
+ };
1112
+ }
1113
+ function T(a) {
1114
+ return {
1115
+ mainTranslate: `translateY(${a}) translateX(-50%)`,
1116
+ scale: "scale(1, 1)",
1117
+ leftTranslate: "translateX(-12px)",
1118
+ rightTranslate: "translateX(12px)"
1119
+ };
1120
+ }
1121
+ return (a, f) => (d(), w("div", {
1122
+ ref_key: "rootRef",
1123
+ ref: o,
1124
+ class: m([a.$style.root, l.value && a.$style["is-expand"]]),
1125
+ onClick: A
1126
+ }, [
1127
+ G(xe, {
1128
+ tag: "div",
1129
+ "enter-from-class": a.$style["toaster-enter-from"],
1130
+ "enter-to-class": a.$style["toaster-enter-to"],
1131
+ "enter-active-class": a.$style["toaster-enter-active"],
1132
+ "leave-from-class": a.$style["toaster-leave-from"],
1133
+ "leave-to-class": a.$style["toaster-leave-to"],
1134
+ "leave-active-class": a.$style["toaster-leave-active"]
1135
+ }, {
1136
+ default: j(() => {
1137
+ var I;
1138
+ return [
1139
+ (d(!0), w(ze, null, ke((I = k(s)) == null ? void 0 : I.list.value, (F, g) => (d(), w("div", {
1140
+ key: F.id,
1141
+ id: `${F.id}`,
1142
+ ref_for: !0,
1143
+ ref_key: "toastersRef",
1144
+ ref: n,
1145
+ class: m([a.$style.toaster, l.value ? "is-expand" : ""]),
1146
+ style: P(v(g).toaster)
1147
+ }, [
1148
+ y("div", {
1149
+ class: m(a.$style.left),
1150
+ style: P(v(g).left)
1151
+ }, null, 6),
1152
+ y("div", {
1153
+ class: m(a.$style.body),
1154
+ style: P(v(g).body)
1155
+ }, [
1156
+ G(Ns, H({ ref_for: !0 }, F, {
1157
+ onClick: () => M(F.id)
1158
+ }), null, 16, ["onClick"])
1159
+ ], 6),
1160
+ y("div", {
1161
+ class: m(a.$style.right),
1162
+ style: P(v(g).right)
1163
+ }, null, 6),
1164
+ y("div", {
1165
+ class: m([a.$style.left, a.$style.shadow]),
1166
+ style: P(v(g).left)
1167
+ }, null, 6),
1168
+ y("div", {
1169
+ class: m([a.$style.body, a.$style.shadow]),
1170
+ style: P(v(g).body)
1171
+ }, null, 6),
1172
+ y("div", {
1173
+ class: m([a.$style.right, a.$style.shadow]),
1174
+ style: P(v(g).right)
1175
+ }, null, 6)
1176
+ ], 14, Ws))), 128))
1177
+ ];
1178
+ }),
1179
+ _: 1
1180
+ }, 8, ["enter-from-class", "enter-to-class", "enter-active-class", "leave-from-class", "leave-to-class", "leave-active-class"])
1181
+ ], 2));
1182
+ }
1183
+ }), Ks = "Toaster__root_73fc8", Us = "Toaster__toaster_72d65", Xs = "Toaster__body_22a84", Ys = "Toaster__left_4f54d", Zs = "Toaster__right_9c31e", qs = "Toaster__shadow_acb59", Js = {
1184
+ "toaster-enter-from": "Toaster__toaster-enter-from_efcfd",
1185
+ "toaster-enter": "Toaster__toaster-enter_7d5d8",
1186
+ "toaster-enter-to": "Toaster__toaster-enter-to_6201a",
1187
+ "toaster-enter-active": "Toaster__toaster-enter-active_528d1",
1188
+ "toaster-leave-active": "Toaster__toaster-leave-active_952ab",
1189
+ "toaster-leave-from": "Toaster__toaster-leave-from_f98c0",
1190
+ "toaster-leave": "Toaster__toaster-leave_948f8",
1191
+ "toaster-leave-to": "Toaster__toaster-leave-to_05c33",
1192
+ root: Ks,
1193
+ "is-expand": "Toaster__is-expand_984b8",
1194
+ toaster: Us,
1195
+ body: Xs,
1196
+ left: Ys,
1197
+ right: Zs,
1198
+ shadow: qs
1199
+ }, Qs = {
1200
+ $style: Js
1201
+ }, en = /* @__PURE__ */ C(Hs, [["__cssModules", Qs]]), ye = {
1202
+ interactionType: "web"
1203
+ }, ge = Symbol("GlobalConfig"), an = (e) => {
1204
+ Be(ge, {
1205
+ ...ye,
1206
+ ...e
1207
+ });
1208
+ }, ln = () => _e(ge, ye), rn = {
1209
+ KGS: "KGS"
1210
+ }, tn = [
1211
+ Go,
1212
+ Ko,
1213
+ ue,
1214
+ de,
1215
+ Response,
1216
+ Jo,
1217
+ gs,
1218
+ Bs,
1219
+ Z,
1220
+ Qt,
1221
+ he,
1222
+ Fs,
1223
+ en,
1224
+ Y
1225
+ ], cn = {
1226
+ install: (e) => {
1227
+ tn.forEach((t) => {
1228
+ e.component(`${t.name}`, t);
1229
+ });
1230
+ }
1231
+ };
1232
+ export {
1233
+ Go as Button,
1234
+ ue as ButtonBase,
1235
+ Ko as ButtonSkeleton,
1236
+ rn as Currency,
1237
+ Y as Icon,
1238
+ de as Loader,
1239
+ Jo as SkeletonWrapper,
1240
+ gs as TheImage,
1241
+ Bs as ThePicture,
1242
+ Z as TheText,
1243
+ Qt as TheTextSkeleton,
1244
+ ve as ToastServiceKey,
1245
+ en as Toaster,
1246
+ he as TransitionFade,
1247
+ Fs as TransitionVisibilityToggle,
1248
+ cn as default,
1249
+ nn as toastService,
1250
+ ln as useGlobalConfig,
1251
+ an as useGlobalConfigProvide
1252
+ };