@everymatrix/cashier-page 1.44.0 → 1.45.2

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 (47) hide show
  1. package/components/CashierConfirmModal-DDkEGERx.cjs +4 -0
  2. package/components/CashierConfirmModal-DcDzn1gw.js +1067 -0
  3. package/components/CashierError-BN74rRfp.js +3759 -0
  4. package/components/CashierError-BUdqkPz2.cjs +5 -0
  5. package/components/CashierHeader-CWh9KvU8.cjs +1 -0
  6. package/components/CashierHeader-GJVoWu3a.js +360 -0
  7. package/components/CashierIframeRedirect-7U7Ng9Ft.js +383 -0
  8. package/components/CashierIframeRedirect-CPmCxUNQ.cjs +1 -0
  9. package/components/CashierMethodDetails-C1P_A8Q-.cjs +18 -0
  10. package/components/CashierMethodDetails-CcOrusOp.js +8095 -0
  11. package/components/CashierMethodsList-Cz8-AN80.js +651 -0
  12. package/components/CashierMethodsList-DV1rRC_l.cjs +1 -0
  13. package/components/CashierModal-BYaRLT3T.cjs +1 -0
  14. package/components/CashierModal-WFQXcGM-.js +226 -0
  15. package/components/CashierNotifications-C46bpv5c.js +136 -0
  16. package/components/CashierNotifications-DxsqjmwN.cjs +1 -0
  17. package/components/CashierPage-BFzFcqIV.js +1954 -0
  18. package/components/CashierPage-BiLUhOOi.cjs +1 -0
  19. package/components/CashierReceiptPage-C-U0DylA.js +1092 -0
  20. package/components/CashierReceiptPage-D9D2pfkv.cjs +1 -0
  21. package/components/CashierSessionExpirationModal-BPz4T6IO.js +1109 -0
  22. package/components/CashierSessionExpirationModal-Cm1_wYpc.cjs +2 -0
  23. package/components/CashierSpinner-BDeVd6_8.js +71 -0
  24. package/components/CashierSpinner-BHiwUIfx.cjs +1 -0
  25. package/components/CashierVerifications-ChU2M2Cq.cjs +1 -0
  26. package/components/CashierVerifications-T229JPdw.js +495 -0
  27. package/es2015/cashier-page.cjs +1 -0
  28. package/es2015/cashier-page.js +16 -0
  29. package/package.json +23 -32
  30. package/CHANGELOG.md +0 -22
  31. package/README.md +0 -30
  32. package/dist/cashier-page.js +0 -1346
  33. package/dist/cashier-page.js.map +0 -1
  34. package/index.html +0 -37
  35. package/index.js +0 -1
  36. package/public/favicon.png +0 -0
  37. package/public/reset.css +0 -48
  38. package/rollup.config.js +0 -65
  39. package/src/CashierPage.svelte +0 -669
  40. package/src/CashierPage.types.ts +0 -81
  41. package/src/assets/maintenance.png +0 -0
  42. package/src/assets/session-expired-icon.png +0 -0
  43. package/src/i18n.js +0 -33
  44. package/src/index.ts +0 -4
  45. package/src/translations.js +0 -73
  46. package/stories/CashierPage.stories.js +0 -13
  47. package/tsconfig.json +0 -6
@@ -0,0 +1,1067 @@
1
+ var St = Object.defineProperty, At = Object.defineProperties;
2
+ var Nt = Object.getOwnPropertyDescriptors;
3
+ var at = Object.getOwnPropertySymbols;
4
+ var Pt = Object.prototype.hasOwnProperty, zt = Object.prototype.propertyIsEnumerable;
5
+ var Y = (t, e, n) => e in t ? St(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ft = (t, e) => {
6
+ for (var n in e || (e = {}))
7
+ Pt.call(e, n) && Y(t, n, e[n]);
8
+ if (at)
9
+ for (var n of at(e))
10
+ zt.call(e, n) && Y(t, n, e[n]);
11
+ return t;
12
+ }, dt = (t, e) => At(t, Nt(e));
13
+ var C = (t, e, n) => Y(t, typeof e != "symbol" ? e + "" : e, n);
14
+ var ht = (t, e, n) => new Promise((s, r) => {
15
+ var i = (u) => {
16
+ try {
17
+ o(n.next(u));
18
+ } catch (c) {
19
+ r(c);
20
+ }
21
+ }, l = (u) => {
22
+ try {
23
+ o(n.throw(u));
24
+ } catch (c) {
25
+ r(c);
26
+ }
27
+ }, o = (u) => u.done ? s(u.value) : Promise.resolve(u.value).then(i, l);
28
+ o((n = n.apply(t, e)).next());
29
+ });
30
+ function k() {
31
+ }
32
+ const Bt = (t) => t;
33
+ function Tt(t, e) {
34
+ for (const n in e) t[n] = e[n];
35
+ return (
36
+ /** @type {T & S} */
37
+ t
38
+ );
39
+ }
40
+ function Ct(t) {
41
+ return t();
42
+ }
43
+ function $t() {
44
+ return /* @__PURE__ */ Object.create(null);
45
+ }
46
+ function j(t) {
47
+ t.forEach(Ct);
48
+ }
49
+ function ot(t) {
50
+ return typeof t == "function";
51
+ }
52
+ function Rt(t, e) {
53
+ return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
54
+ }
55
+ let D;
56
+ function be(t, e) {
57
+ return t === e ? !0 : (D || (D = document.createElement("a")), D.href = e, t === D.href);
58
+ }
59
+ function Dt(t) {
60
+ return Object.keys(t).length === 0;
61
+ }
62
+ function Wt(t, ...e) {
63
+ if (t == null) {
64
+ for (const s of e)
65
+ s(void 0);
66
+ return k;
67
+ }
68
+ const n = t.subscribe(...e);
69
+ return n.unsubscribe ? () => n.unsubscribe() : n;
70
+ }
71
+ function we(t, e, n) {
72
+ t.$$.on_destroy.push(Wt(e, n));
73
+ }
74
+ function W(t, e, n, s) {
75
+ if (t) {
76
+ const r = xt(t, e, n, s);
77
+ return t[0](r);
78
+ }
79
+ }
80
+ function xt(t, e, n, s) {
81
+ return t[1] && s ? Tt(n.ctx.slice(), t[1](s(e))) : n.ctx;
82
+ }
83
+ function H(t, e, n, s) {
84
+ if (t[2] && s) {
85
+ const r = t[2](s(n));
86
+ if (e.dirty === void 0)
87
+ return r;
88
+ if (typeof r == "object") {
89
+ const i = [], l = Math.max(e.dirty.length, r.length);
90
+ for (let o = 0; o < l; o += 1)
91
+ i[o] = e.dirty[o] | r[o];
92
+ return i;
93
+ }
94
+ return e.dirty | r;
95
+ }
96
+ return e.dirty;
97
+ }
98
+ function I(t, e, n, s, r, i) {
99
+ if (r) {
100
+ const l = xt(e, n, s, i);
101
+ t.p(l, r);
102
+ }
103
+ }
104
+ function q(t) {
105
+ if (t.ctx.length > 32) {
106
+ const e = [], n = t.ctx.length / 32;
107
+ for (let s = 0; s < n; s++)
108
+ e[s] = -1;
109
+ return e;
110
+ }
111
+ return -1;
112
+ }
113
+ const vt = typeof window != "undefined";
114
+ let Ht = vt ? () => window.performance.now() : () => Date.now(), rt = vt ? (t) => requestAnimationFrame(t) : k;
115
+ const A = /* @__PURE__ */ new Set();
116
+ function Et(t) {
117
+ A.forEach((e) => {
118
+ e.c(t) || (A.delete(e), e.f());
119
+ }), A.size !== 0 && rt(Et);
120
+ }
121
+ function It(t) {
122
+ let e;
123
+ return A.size === 0 && rt(Et), {
124
+ promise: new Promise((n) => {
125
+ A.add(e = { c: t, f: n });
126
+ }),
127
+ abort() {
128
+ A.delete(e);
129
+ }
130
+ };
131
+ }
132
+ const Ce = typeof window != "undefined" ? window : typeof globalThis != "undefined" ? globalThis : (
133
+ // @ts-ignore Node typings have this
134
+ global
135
+ );
136
+ function x(t, e) {
137
+ t.appendChild(e);
138
+ }
139
+ function qt(t, e, n) {
140
+ const s = lt(t);
141
+ if (!s.getElementById(e)) {
142
+ const r = v("style");
143
+ r.id = e, r.textContent = n, Mt(s, r);
144
+ }
145
+ }
146
+ function lt(t) {
147
+ if (!t) return document;
148
+ const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
149
+ return e && /** @type {ShadowRoot} */
150
+ e.host ? (
151
+ /** @type {ShadowRoot} */
152
+ e
153
+ ) : t.ownerDocument;
154
+ }
155
+ function Ft(t) {
156
+ const e = v("style");
157
+ return e.textContent = "/* empty */", Mt(lt(t), e), e.sheet;
158
+ }
159
+ function Mt(t, e) {
160
+ return x(
161
+ /** @type {Document} */
162
+ t.head || t,
163
+ e
164
+ ), e.sheet;
165
+ }
166
+ function ct(t, e, n) {
167
+ t.insertBefore(e, n || null);
168
+ }
169
+ function P(t) {
170
+ t.parentNode && t.parentNode.removeChild(t);
171
+ }
172
+ function xe(t, e) {
173
+ for (let n = 0; n < t.length; n += 1)
174
+ t[n] && t[n].d(e);
175
+ }
176
+ function v(t) {
177
+ return document.createElement(t);
178
+ }
179
+ function mt(t) {
180
+ return document.createElementNS("http://www.w3.org/2000/svg", t);
181
+ }
182
+ function Lt(t) {
183
+ return document.createTextNode(t);
184
+ }
185
+ function tt() {
186
+ return Lt(" ");
187
+ }
188
+ function ve() {
189
+ return Lt("");
190
+ }
191
+ function G(t, e, n, s) {
192
+ return t.addEventListener(e, n, s), () => t.removeEventListener(e, n, s);
193
+ }
194
+ function Ee(t) {
195
+ return function(e) {
196
+ return e.preventDefault(), t.call(this, e);
197
+ };
198
+ }
199
+ function m(t, e, n) {
200
+ n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
201
+ }
202
+ function Me(t, e, n) {
203
+ const s = e.toLowerCase();
204
+ s in t ? t[s] = typeof t[s] == "boolean" && n === "" ? !0 : n : e in t ? t[e] = typeof t[e] == "boolean" && n === "" ? !0 : n : m(t, e, n);
205
+ }
206
+ function Le(t) {
207
+ return t === "" ? null : +t;
208
+ }
209
+ function Ut(t) {
210
+ return Array.from(t.childNodes);
211
+ }
212
+ function ke(t, e) {
213
+ e = "" + e, t.data !== e && (t.data = /** @type {string} */
214
+ e);
215
+ }
216
+ function je(t, e) {
217
+ t.value = e == null ? "" : e;
218
+ }
219
+ function Oe(t, e, n, s) {
220
+ n == null ? t.style.removeProperty(e) : t.style.setProperty(e, n, "");
221
+ }
222
+ let F;
223
+ function Jt() {
224
+ if (F === void 0) {
225
+ F = !1;
226
+ try {
227
+ typeof window != "undefined" && window.parent && window.parent.document;
228
+ } catch (t) {
229
+ F = !0;
230
+ }
231
+ }
232
+ return F;
233
+ }
234
+ function Se(t, e) {
235
+ getComputedStyle(t).position === "static" && (t.style.position = "relative");
236
+ const s = v("iframe");
237
+ s.setAttribute(
238
+ "style",
239
+ "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"
240
+ ), s.setAttribute("aria-hidden", "true"), s.tabIndex = -1;
241
+ const r = Jt();
242
+ let i;
243
+ return r ? (s.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>", i = G(
244
+ window,
245
+ "message",
246
+ /** @param {MessageEvent} event */
247
+ (l) => {
248
+ l.source === s.contentWindow && e();
249
+ }
250
+ )) : (s.src = "about:blank", s.onload = () => {
251
+ i = G(s.contentWindow, "resize", e), e();
252
+ }), x(t, s), () => {
253
+ (r || i && s.contentWindow) && i(), P(s);
254
+ };
255
+ }
256
+ function Ae(t, e, n) {
257
+ t.classList.toggle(e, !!n);
258
+ }
259
+ function kt(t, e, { bubbles: n = !1, cancelable: s = !1 } = {}) {
260
+ return new CustomEvent(t, { detail: e, bubbles: n, cancelable: s });
261
+ }
262
+ function Vt(t) {
263
+ const e = {};
264
+ return t.childNodes.forEach(
265
+ /** @param {Element} node */
266
+ (n) => {
267
+ e[n.slot || "default"] = !0;
268
+ }
269
+ ), e;
270
+ }
271
+ const K = /* @__PURE__ */ new Map();
272
+ let Q = 0;
273
+ function Gt(t) {
274
+ let e = 5381, n = t.length;
275
+ for (; n--; ) e = (e << 5) - e ^ t.charCodeAt(n);
276
+ return e >>> 0;
277
+ }
278
+ function Kt(t, e) {
279
+ const n = { stylesheet: Ft(e), rules: {} };
280
+ return K.set(t, n), n;
281
+ }
282
+ function _t(t, e, n, s, r, i, l, o = 0) {
283
+ const u = 16.666 / s;
284
+ let c = `{
285
+ `;
286
+ for (let g = 0; g <= 1; g += u) {
287
+ const _ = e + (n - e) * i(g);
288
+ c += g * 100 + `%{${l(_, 1 - _)}}
289
+ `;
290
+ }
291
+ const p = c + `100% {${l(n, 1 - n)}}
292
+ }`, $ = `__svelte_${Gt(p)}_${o}`, y = lt(t), { stylesheet: f, rules: d } = K.get(y) || Kt(y, t);
293
+ d[$] || (d[$] = !0, f.insertRule(`@keyframes ${$} ${p}`, f.cssRules.length));
294
+ const h = t.style.animation || "";
295
+ return t.style.animation = `${h ? `${h}, ` : ""}${$} ${s}ms linear ${r}ms 1 both`, Q += 1, $;
296
+ }
297
+ function Qt(t, e) {
298
+ const n = (t.style.animation || "").split(", "), s = n.filter(
299
+ e ? (i) => i.indexOf(e) < 0 : (i) => i.indexOf("__svelte") === -1
300
+ // remove all Svelte animations
301
+ ), r = n.length - s.length;
302
+ r && (t.style.animation = s.join(", "), Q -= r, Q || Zt());
303
+ }
304
+ function Zt() {
305
+ rt(() => {
306
+ Q || (K.forEach((t) => {
307
+ const { ownerNode: e } = t.stylesheet;
308
+ e && P(e);
309
+ }), K.clear());
310
+ });
311
+ }
312
+ let R;
313
+ function T(t) {
314
+ R = t;
315
+ }
316
+ function ut() {
317
+ if (!R) throw new Error("Function called outside component initialization");
318
+ return R;
319
+ }
320
+ function Ne(t) {
321
+ ut().$$.on_mount.push(t);
322
+ }
323
+ function Pe(t) {
324
+ ut().$$.on_destroy.push(t);
325
+ }
326
+ function ze() {
327
+ const t = ut();
328
+ return (e, n, { cancelable: s = !1 } = {}) => {
329
+ const r = t.$$.callbacks[e];
330
+ if (r) {
331
+ const i = kt(
332
+ /** @type {string} */
333
+ e,
334
+ n,
335
+ { cancelable: s }
336
+ );
337
+ return r.slice().forEach((l) => {
338
+ l.call(t, i);
339
+ }), !i.defaultPrevented;
340
+ }
341
+ return !0;
342
+ };
343
+ }
344
+ const S = [], st = [];
345
+ let N = [];
346
+ const pt = [], Xt = /* @__PURE__ */ Promise.resolve();
347
+ let it = !1;
348
+ function Yt() {
349
+ it || (it = !0, Xt.then(X));
350
+ }
351
+ function Z(t) {
352
+ N.push(t);
353
+ }
354
+ const et = /* @__PURE__ */ new Set();
355
+ let O = 0;
356
+ function X() {
357
+ if (O !== 0)
358
+ return;
359
+ const t = R;
360
+ do {
361
+ try {
362
+ for (; O < S.length; ) {
363
+ const e = S[O];
364
+ O++, T(e), te(e.$$);
365
+ }
366
+ } catch (e) {
367
+ throw S.length = 0, O = 0, e;
368
+ }
369
+ for (T(null), S.length = 0, O = 0; st.length; ) st.pop()();
370
+ for (let e = 0; e < N.length; e += 1) {
371
+ const n = N[e];
372
+ et.has(n) || (et.add(n), n());
373
+ }
374
+ N.length = 0;
375
+ } while (S.length);
376
+ for (; pt.length; )
377
+ pt.pop()();
378
+ it = !1, et.clear(), T(t);
379
+ }
380
+ function te(t) {
381
+ if (t.fragment !== null) {
382
+ t.update(), j(t.before_update);
383
+ const e = t.dirty;
384
+ t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(Z);
385
+ }
386
+ }
387
+ function ee(t) {
388
+ const e = [], n = [];
389
+ N.forEach((s) => t.indexOf(s) === -1 ? e.push(s) : n.push(s)), n.forEach((s) => s()), N = e;
390
+ }
391
+ let z;
392
+ function ne() {
393
+ return z || (z = Promise.resolve(), z.then(() => {
394
+ z = null;
395
+ })), z;
396
+ }
397
+ function nt(t, e, n) {
398
+ t.dispatchEvent(kt(`${e ? "intro" : "outro"}${n}`));
399
+ }
400
+ const J = /* @__PURE__ */ new Set();
401
+ let E;
402
+ function Be() {
403
+ E = {
404
+ r: 0,
405
+ c: [],
406
+ p: E
407
+ // parent group
408
+ };
409
+ }
410
+ function Te() {
411
+ E.r || j(E.c), E = E.p;
412
+ }
413
+ function B(t, e) {
414
+ t && t.i && (J.delete(t), t.i(e));
415
+ }
416
+ function U(t, e, n, s) {
417
+ if (t && t.o) {
418
+ if (J.has(t)) return;
419
+ J.add(t), E.c.push(() => {
420
+ J.delete(t), s && (n && t.d(1), s());
421
+ }), t.o(e);
422
+ } else s && s();
423
+ }
424
+ const se = { duration: 0 };
425
+ function Re(t, e, n, s) {
426
+ let i = e(t, n, { direction: "both" }), l = s ? 0 : 1, o = null, u = null, c = null, p;
427
+ function $() {
428
+ c && Qt(t, c);
429
+ }
430
+ function y(d, h) {
431
+ const g = (
432
+ /** @type {Program['d']} */
433
+ d.b - l
434
+ );
435
+ return h *= Math.abs(g), {
436
+ a: l,
437
+ b: d.b,
438
+ d: g,
439
+ duration: h,
440
+ start: d.start,
441
+ end: d.start + h,
442
+ group: d.group
443
+ };
444
+ }
445
+ function f(d) {
446
+ const {
447
+ delay: h = 0,
448
+ duration: g = 300,
449
+ easing: _ = Bt,
450
+ tick: L = k,
451
+ css: M
452
+ } = i || se, b = {
453
+ start: Ht() + h,
454
+ b: d
455
+ };
456
+ d || (b.group = E, E.r += 1), "inert" in t && (d ? p !== void 0 && (t.inert = p) : (p = /** @type {HTMLElement} */
457
+ t.inert, t.inert = !0)), o || u ? u = b : (M && ($(), c = _t(t, l, d, g, h, _, M)), d && L(0, 1), o = y(b, g), Z(() => nt(t, d, "start")), It((a) => {
458
+ if (u && a > u.start && (o = y(u, g), u = null, nt(t, o.b, "start"), M && ($(), c = _t(
459
+ t,
460
+ l,
461
+ o.b,
462
+ o.duration,
463
+ 0,
464
+ _,
465
+ i.css
466
+ ))), o) {
467
+ if (a >= o.end)
468
+ L(l = o.b, 1 - l), nt(t, o.b, "end"), u || (o.b ? $() : --o.group.r || j(o.group.c)), o = null;
469
+ else if (a >= o.start) {
470
+ const w = a - o.start;
471
+ l = o.a + o.d * _(w / o.duration), L(l, 1 - l);
472
+ }
473
+ }
474
+ return !!(o || u);
475
+ }));
476
+ }
477
+ return {
478
+ run(d) {
479
+ ot(i) ? ne().then(() => {
480
+ i = i({ direction: d ? "in" : "out" }), f(d);
481
+ }) : f(d);
482
+ },
483
+ end() {
484
+ $(), o = u = null;
485
+ }
486
+ };
487
+ }
488
+ function De(t) {
489
+ return (t == null ? void 0 : t.length) !== void 0 ? t : Array.from(t);
490
+ }
491
+ function ie(t, e, n) {
492
+ const { fragment: s, after_update: r } = t.$$;
493
+ s && s.m(e, n), Z(() => {
494
+ const i = t.$$.on_mount.map(Ct).filter(ot);
495
+ t.$$.on_destroy ? t.$$.on_destroy.push(...i) : j(i), t.$$.on_mount = [];
496
+ }), r.forEach(Z);
497
+ }
498
+ function oe(t, e) {
499
+ const n = t.$$;
500
+ n.fragment !== null && (ee(n.after_update), j(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
501
+ }
502
+ function re(t, e) {
503
+ t.$$.dirty[0] === -1 && (S.push(t), Yt(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
504
+ }
505
+ function le(t, e, n, s, r, i, l = null, o = [-1]) {
506
+ const u = R;
507
+ T(t);
508
+ const c = t.$$ = {
509
+ fragment: null,
510
+ ctx: [],
511
+ // state
512
+ props: i,
513
+ update: k,
514
+ not_equal: r,
515
+ bound: $t(),
516
+ // lifecycle
517
+ on_mount: [],
518
+ on_destroy: [],
519
+ on_disconnect: [],
520
+ before_update: [],
521
+ after_update: [],
522
+ context: new Map(e.context || (u ? u.$$.context : [])),
523
+ // everything else
524
+ callbacks: $t(),
525
+ dirty: o,
526
+ skip_bound: !1,
527
+ root: e.target || u.$$.root
528
+ };
529
+ l && l(c.root);
530
+ let p = !1;
531
+ if (c.ctx = n ? n(t, e.props || {}, ($, y, ...f) => {
532
+ const d = f.length ? f[0] : y;
533
+ return c.ctx && r(c.ctx[$], c.ctx[$] = d) && (!c.skip_bound && c.bound[$] && c.bound[$](d), p && re(t, $)), y;
534
+ }) : [], c.update(), p = !0, j(c.before_update), c.fragment = s ? s(c.ctx) : !1, e.target) {
535
+ if (e.hydrate) {
536
+ const $ = Ut(e.target);
537
+ c.fragment && c.fragment.l($), $.forEach(P);
538
+ } else
539
+ c.fragment && c.fragment.c();
540
+ e.intro && B(t.$$.fragment), ie(t, e.target, e.anchor), X();
541
+ }
542
+ T(u);
543
+ }
544
+ let jt;
545
+ typeof HTMLElement == "function" && (jt = class extends HTMLElement {
546
+ constructor(e, n, s) {
547
+ super();
548
+ /** The Svelte component constructor */
549
+ C(this, "$$ctor");
550
+ /** Slots */
551
+ C(this, "$$s");
552
+ /** The Svelte component instance */
553
+ C(this, "$$c");
554
+ /** Whether or not the custom element is connected */
555
+ C(this, "$$cn", !1);
556
+ /** Component props data */
557
+ C(this, "$$d", {});
558
+ /** `true` if currently in the process of reflecting component props back to attributes */
559
+ C(this, "$$r", !1);
560
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
561
+ C(this, "$$p_d", {});
562
+ /** @type {Record<string, Function[]>} Event listeners */
563
+ C(this, "$$l", {});
564
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
565
+ C(this, "$$l_u", /* @__PURE__ */ new Map());
566
+ this.$$ctor = e, this.$$s = n, s && this.attachShadow({ mode: "open" });
567
+ }
568
+ addEventListener(e, n, s) {
569
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(n), this.$$c) {
570
+ const r = this.$$c.$on(e, n);
571
+ this.$$l_u.set(n, r);
572
+ }
573
+ super.addEventListener(e, n, s);
574
+ }
575
+ removeEventListener(e, n, s) {
576
+ if (super.removeEventListener(e, n, s), this.$$c) {
577
+ const r = this.$$l_u.get(n);
578
+ r && (r(), this.$$l_u.delete(n));
579
+ }
580
+ }
581
+ connectedCallback() {
582
+ return ht(this, null, function* () {
583
+ if (this.$$cn = !0, !this.$$c) {
584
+ let e = function(i) {
585
+ return () => {
586
+ let l;
587
+ return {
588
+ c: function() {
589
+ l = v("slot"), i !== "default" && m(l, "name", i);
590
+ },
591
+ /**
592
+ * @param {HTMLElement} target
593
+ * @param {HTMLElement} [anchor]
594
+ */
595
+ m: function(c, p) {
596
+ ct(c, l, p);
597
+ },
598
+ d: function(c) {
599
+ c && P(l);
600
+ }
601
+ };
602
+ };
603
+ };
604
+ if (yield Promise.resolve(), !this.$$cn || this.$$c)
605
+ return;
606
+ const n = {}, s = Vt(this);
607
+ for (const i of this.$$s)
608
+ i in s && (n[i] = [e(i)]);
609
+ for (const i of this.attributes) {
610
+ const l = this.$$g_p(i.name);
611
+ l in this.$$d || (this.$$d[l] = V(l, i.value, this.$$p_d, "toProp"));
612
+ }
613
+ for (const i in this.$$p_d)
614
+ !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
615
+ this.$$c = new this.$$ctor({
616
+ target: this.shadowRoot || this,
617
+ props: dt(ft({}, this.$$d), {
618
+ $$slots: n,
619
+ $$scope: {
620
+ ctx: []
621
+ }
622
+ })
623
+ });
624
+ const r = () => {
625
+ this.$$r = !0;
626
+ for (const i in this.$$p_d)
627
+ if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
628
+ const l = V(
629
+ i,
630
+ this.$$d[i],
631
+ this.$$p_d,
632
+ "toAttribute"
633
+ );
634
+ l == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, l);
635
+ }
636
+ this.$$r = !1;
637
+ };
638
+ this.$$c.$$.after_update.push(r), r();
639
+ for (const i in this.$$l)
640
+ for (const l of this.$$l[i]) {
641
+ const o = this.$$c.$on(i, l);
642
+ this.$$l_u.set(l, o);
643
+ }
644
+ this.$$l = {};
645
+ }
646
+ });
647
+ }
648
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
649
+ // and setting attributes through setAttribute etc, this is helpful
650
+ attributeChangedCallback(e, n, s) {
651
+ var r;
652
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = V(e, s, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [e]: this.$$d[e] }));
653
+ }
654
+ disconnectedCallback() {
655
+ this.$$cn = !1, Promise.resolve().then(() => {
656
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
657
+ });
658
+ }
659
+ $$g_p(e) {
660
+ return Object.keys(this.$$p_d).find(
661
+ (n) => this.$$p_d[n].attribute === e || !this.$$p_d[n].attribute && n.toLowerCase() === e
662
+ ) || e;
663
+ }
664
+ });
665
+ function V(t, e, n, s) {
666
+ var i;
667
+ const r = (i = n[t]) == null ? void 0 : i.type;
668
+ if (e = r === "Boolean" && typeof e != "boolean" ? e != null : e, !s || !n[t])
669
+ return e;
670
+ if (s === "toAttribute")
671
+ switch (r) {
672
+ case "Object":
673
+ case "Array":
674
+ return e == null ? null : JSON.stringify(e);
675
+ case "Boolean":
676
+ return e ? "" : null;
677
+ case "Number":
678
+ return e == null ? null : e;
679
+ default:
680
+ return e;
681
+ }
682
+ else
683
+ switch (r) {
684
+ case "Object":
685
+ case "Array":
686
+ return e && JSON.parse(e);
687
+ case "Boolean":
688
+ return e;
689
+ case "Number":
690
+ return e != null ? +e : e;
691
+ default:
692
+ return e;
693
+ }
694
+ }
695
+ function ce(t, e, n, s, r, i) {
696
+ let l = class extends jt {
697
+ constructor() {
698
+ super(t, n, r), this.$$p_d = e;
699
+ }
700
+ static get observedAttributes() {
701
+ return Object.keys(e).map(
702
+ (o) => (e[o].attribute || o).toLowerCase()
703
+ );
704
+ }
705
+ };
706
+ return Object.keys(e).forEach((o) => {
707
+ Object.defineProperty(l.prototype, o, {
708
+ get() {
709
+ return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
710
+ },
711
+ set(u) {
712
+ var c;
713
+ u = V(o, u, e), this.$$d[o] = u, (c = this.$$c) == null || c.$set({ [o]: u });
714
+ }
715
+ });
716
+ }), s.forEach((o) => {
717
+ Object.defineProperty(l.prototype, o, {
718
+ get() {
719
+ var u;
720
+ return (u = this.$$c) == null ? void 0 : u[o];
721
+ }
722
+ });
723
+ }), t.element = /** @type {any} */
724
+ l, l;
725
+ }
726
+ class ue {
727
+ constructor() {
728
+ /**
729
+ * ### PRIVATE API
730
+ *
731
+ * Do not use, may change at any time
732
+ *
733
+ * @type {any}
734
+ */
735
+ C(this, "$$");
736
+ /**
737
+ * ### PRIVATE API
738
+ *
739
+ * Do not use, may change at any time
740
+ *
741
+ * @type {any}
742
+ */
743
+ C(this, "$$set");
744
+ }
745
+ /** @returns {void} */
746
+ $destroy() {
747
+ oe(this, 1), this.$destroy = k;
748
+ }
749
+ /**
750
+ * @template {Extract<keyof Events, string>} K
751
+ * @param {K} type
752
+ * @param {((e: Events[K]) => void) | null | undefined} callback
753
+ * @returns {() => void}
754
+ */
755
+ $on(e, n) {
756
+ if (!ot(n))
757
+ return k;
758
+ const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
759
+ return s.push(n), () => {
760
+ const r = s.indexOf(n);
761
+ r !== -1 && s.splice(r, 1);
762
+ };
763
+ }
764
+ /**
765
+ * @param {Partial<Props>} props
766
+ * @returns {void}
767
+ */
768
+ $set(e) {
769
+ this.$$set && !Dt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
770
+ }
771
+ }
772
+ const ae = "4";
773
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ae);
774
+ function fe(t) {
775
+ qt(t, "svelte-tf74md", "*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CashierModalWindow{container-type:inline-size;container-name:confirm-modal;display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:4;top:0;left:0;background-color:var(--emw--color-background, rgba(255, 255, 255, 0.5))}.CashierModalContainer{width:500px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:var(--emw--spacing-large, 20px);position:relative;padding:var(--emw--spacing-medium, 15px);min-height:200px;box-shadow:0 2px 6px 0 var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));border-radius:var(--mmw--border-radius-large-plus, 10px);background-color:var(--emw--color-white, #fff)}.ModalOkBtn{color:var(--emw--color-white, #fff);display:flex;align-items:center;justify-content:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-normal, 400);font-family:inherit;height:46px;width:100%;border:none;border-radius:50px;line-height:125%;background-color:var(--emw--color-primary, #7EC51E);margin-top:var(--emw--spacing-small, 12px);cursor:pointer}.ModalCloseBtn{position:absolute;display:flex;justify-content:space-between;align-items:center;padding:var(--emw--spacing-small, 12px) var(--emw--spacing-small, 12px);height:inherit;right:0;top:0;cursor:pointer}@container confirm-modal (max-width: 750px){.CashierModalContainer{margin:var(--emw--spacing-x-large, 30px) var(--emw--spacing-small, 12px)}}");
776
+ }
777
+ const de = (t) => ({}), gt = (t) => ({}), he = (t) => ({}), yt = (t) => ({}), $e = (t) => ({}), bt = (t) => ({ class: "CashierModalText" }), me = (t) => ({}), wt = (t) => ({ class: "CashierModalTitle" });
778
+ function _e(t) {
779
+ let e, n;
780
+ return {
781
+ c() {
782
+ e = mt("svg"), n = mt("path"), m(n, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), m(n, "fill", "#111111"), m(e, "xmlns", "http://www.w3.org/2000/svg"), m(e, "width", "13"), m(e, "height", "20"), m(e, "viewBox", "0 0 13 13"), m(e, "fill", "none");
783
+ },
784
+ m(s, r) {
785
+ ct(s, e, r), x(e, n);
786
+ },
787
+ p: k,
788
+ d(s) {
789
+ s && P(e);
790
+ }
791
+ };
792
+ }
793
+ function pe(t) {
794
+ let e, n, s, r, i, l, o, u, c, p, $;
795
+ const y = (
796
+ /*#slots*/
797
+ t[6].title
798
+ ), f = W(
799
+ y,
800
+ t,
801
+ /*$$scope*/
802
+ t[5],
803
+ wt
804
+ ), d = (
805
+ /*#slots*/
806
+ t[6].text
807
+ ), h = W(
808
+ d,
809
+ t,
810
+ /*$$scope*/
811
+ t[5],
812
+ bt
813
+ ), g = (
814
+ /*#slots*/
815
+ t[6].confirm
816
+ ), _ = W(
817
+ g,
818
+ t,
819
+ /*$$scope*/
820
+ t[5],
821
+ yt
822
+ ), L = (
823
+ /*#slots*/
824
+ t[6].close
825
+ ), M = W(
826
+ L,
827
+ t,
828
+ /*$$scope*/
829
+ t[5],
830
+ gt
831
+ ), b = M || _e();
832
+ return {
833
+ c() {
834
+ e = v("div"), n = v("div"), s = v("div"), f && f.c(), r = tt(), h && h.c(), i = tt(), l = v("span"), _ && _.c(), o = tt(), u = v("span"), b && b.c(), m(l, "class", "ModalOkBtn"), m(l, "role", "button"), m(u, "class", "ModalCloseBtn"), m(u, "role", "button"), m(s, "class", "CashierModalContainer"), m(s, "part", "CashierModalContainer"), m(n, "class", "CashierModalWindow"), m(n, "part", "CashierModalWindow"), m(n, "id", "Modal"), m(e, "part", "CustomStylingContainer");
835
+ },
836
+ m(a, w) {
837
+ ct(a, e, w), x(e, n), x(n, s), f && f.m(s, null), x(s, r), h && h.m(s, null), x(s, i), x(s, l), _ && _.m(l, null), x(s, o), x(s, u), b && b.m(u, null), t[7](e), c = !0, p || ($ = [
838
+ G(
839
+ l,
840
+ "click",
841
+ /*confirm*/
842
+ t[2]
843
+ ),
844
+ G(
845
+ u,
846
+ "click",
847
+ /*close*/
848
+ t[1]
849
+ )
850
+ ], p = !0);
851
+ },
852
+ p(a, [w]) {
853
+ f && f.p && (!c || w & /*$$scope*/
854
+ 32) && I(
855
+ f,
856
+ y,
857
+ a,
858
+ /*$$scope*/
859
+ a[5],
860
+ c ? H(
861
+ y,
862
+ /*$$scope*/
863
+ a[5],
864
+ w,
865
+ me
866
+ ) : q(
867
+ /*$$scope*/
868
+ a[5]
869
+ ),
870
+ wt
871
+ ), h && h.p && (!c || w & /*$$scope*/
872
+ 32) && I(
873
+ h,
874
+ d,
875
+ a,
876
+ /*$$scope*/
877
+ a[5],
878
+ c ? H(
879
+ d,
880
+ /*$$scope*/
881
+ a[5],
882
+ w,
883
+ $e
884
+ ) : q(
885
+ /*$$scope*/
886
+ a[5]
887
+ ),
888
+ bt
889
+ ), _ && _.p && (!c || w & /*$$scope*/
890
+ 32) && I(
891
+ _,
892
+ g,
893
+ a,
894
+ /*$$scope*/
895
+ a[5],
896
+ c ? H(
897
+ g,
898
+ /*$$scope*/
899
+ a[5],
900
+ w,
901
+ he
902
+ ) : q(
903
+ /*$$scope*/
904
+ a[5]
905
+ ),
906
+ yt
907
+ ), M && M.p && (!c || w & /*$$scope*/
908
+ 32) && I(
909
+ M,
910
+ L,
911
+ a,
912
+ /*$$scope*/
913
+ a[5],
914
+ c ? H(
915
+ L,
916
+ /*$$scope*/
917
+ a[5],
918
+ w,
919
+ de
920
+ ) : q(
921
+ /*$$scope*/
922
+ a[5]
923
+ ),
924
+ gt
925
+ );
926
+ },
927
+ i(a) {
928
+ c || (B(f, a), B(h, a), B(_, a), B(b, a), c = !0);
929
+ },
930
+ o(a) {
931
+ U(f, a), U(h, a), U(_, a), U(b, a), c = !1;
932
+ },
933
+ d(a) {
934
+ a && P(e), f && f.d(a), h && h.d(a), _ && _.d(a), b && b.d(a), t[7](null), p = !1, j($);
935
+ }
936
+ };
937
+ }
938
+ function ge(t, e, n) {
939
+ let { $$slots: s = {}, $$scope: r } = e, { clientstyling: i = "" } = e, { clientstylingurl: l = "" } = e, o;
940
+ const u = () => {
941
+ dispatchEvent(new CustomEvent(
942
+ "closeModal",
943
+ {
944
+ bubbles: !0,
945
+ cancelable: !0,
946
+ composed: !0
947
+ // makes the event jump shadow DOM boundary
948
+ }
949
+ ));
950
+ }, c = () => {
951
+ dispatchEvent(new CustomEvent(
952
+ "confirmModal",
953
+ {
954
+ bubbles: !0,
955
+ cancelable: !0,
956
+ composed: !0
957
+ }
958
+ )), u();
959
+ }, p = () => {
960
+ let f = document.createElement("style");
961
+ f.innerHTML = i, o.appendChild(f);
962
+ }, $ = () => {
963
+ let f = new URL(l), d = document.createElement("style");
964
+ fetch(f.href).then((h) => h.text()).then((h) => {
965
+ d.innerHTML = h, setTimeout(
966
+ () => {
967
+ o.appendChild(d);
968
+ },
969
+ 1
970
+ );
971
+ });
972
+ };
973
+ function y(f) {
974
+ st[f ? "unshift" : "push"](() => {
975
+ o = f, n(0, o);
976
+ });
977
+ }
978
+ return t.$$set = (f) => {
979
+ "clientstyling" in f && n(3, i = f.clientstyling), "clientstylingurl" in f && n(4, l = f.clientstylingurl), "$$scope" in f && n(5, r = f.$$scope);
980
+ }, t.$$.update = () => {
981
+ t.$$.dirty & /*clientstyling, customStylingContainer*/
982
+ 9 && i && o && p(), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
983
+ 17 && l && o && $();
984
+ }, [
985
+ o,
986
+ u,
987
+ c,
988
+ i,
989
+ l,
990
+ r,
991
+ s,
992
+ y
993
+ ];
994
+ }
995
+ class Ot extends ue {
996
+ constructor(e) {
997
+ super(), le(this, e, ge, pe, Rt, { clientstyling: 3, clientstylingurl: 4 }, fe);
998
+ }
999
+ get clientstyling() {
1000
+ return this.$$.ctx[3];
1001
+ }
1002
+ set clientstyling(e) {
1003
+ this.$$set({ clientstyling: e }), X();
1004
+ }
1005
+ get clientstylingurl() {
1006
+ return this.$$.ctx[4];
1007
+ }
1008
+ set clientstylingurl(e) {
1009
+ this.$$set({ clientstylingurl: e }), X();
1010
+ }
1011
+ }
1012
+ ce(Ot, { clientstyling: {}, clientstylingurl: {} }, ["title", "text", "confirm", "close"], [], !0);
1013
+ const We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1014
+ __proto__: null,
1015
+ default: Ot
1016
+ }, Symbol.toStringTag, { value: "Module" }));
1017
+ export {
1018
+ G as A,
1019
+ Be as B,
1020
+ st as C,
1021
+ be as D,
1022
+ Me as E,
1023
+ ze as F,
1024
+ Z as G,
1025
+ Ne as H,
1026
+ Ce as I,
1027
+ Ae as J,
1028
+ De as K,
1029
+ Ee as L,
1030
+ xe as M,
1031
+ Le as N,
1032
+ je as O,
1033
+ mt as P,
1034
+ Oe as Q,
1035
+ Bt as R,
1036
+ ue as S,
1037
+ Se as T,
1038
+ Re as U,
1039
+ Pe as V,
1040
+ We as W,
1041
+ Rt as a,
1042
+ le as b,
1043
+ ce as c,
1044
+ qt as d,
1045
+ W as e,
1046
+ X as f,
1047
+ v as g,
1048
+ tt as h,
1049
+ ot as i,
1050
+ m as j,
1051
+ ct as k,
1052
+ x as l,
1053
+ q as m,
1054
+ k as n,
1055
+ H as o,
1056
+ U as p,
1057
+ Te as q,
1058
+ j as r,
1059
+ Wt as s,
1060
+ B as t,
1061
+ I as u,
1062
+ P as v,
1063
+ we as w,
1064
+ ve as x,
1065
+ Lt as y,
1066
+ ke as z
1067
+ };