@everymatrix/cashier-spinner 1.54.4 → 1.54.8

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.
@@ -72,7 +72,7 @@ let S;
72
72
  function g(t) {
73
73
  S = t;
74
74
  }
75
- const f = [], k = [];
75
+ const a = [], k = [];
76
76
  let d = [];
77
77
  const N = [], F = /* @__PURE__ */ Promise.resolve();
78
78
  let x = !1;
@@ -83,27 +83,27 @@ function w(t) {
83
83
  d.push(t);
84
84
  }
85
85
  const b = /* @__PURE__ */ new Set();
86
- let a = 0;
86
+ let f = 0;
87
87
  function y() {
88
- if (a !== 0)
88
+ if (f !== 0)
89
89
  return;
90
90
  const t = S;
91
91
  do {
92
92
  try {
93
- for (; a < f.length; ) {
94
- const e = f[a];
95
- a++, g(e), G(e.$$);
93
+ for (; f < a.length; ) {
94
+ const e = a[f];
95
+ f++, g(e), G(e.$$);
96
96
  }
97
97
  } catch (e) {
98
- throw f.length = 0, a = 0, e;
98
+ throw a.length = 0, f = 0, e;
99
99
  }
100
- for (g(null), f.length = 0, a = 0; k.length; ) k.pop()();
100
+ for (g(null), a.length = 0, f = 0; k.length; ) k.pop()();
101
101
  for (let e = 0; e < d.length; e += 1) {
102
102
  const n = d[e];
103
103
  b.has(n) || (b.add(n), n());
104
104
  }
105
105
  d.length = 0;
106
- } while (f.length);
106
+ } while (a.length);
107
107
  for (; N.length; )
108
108
  N.pop()();
109
109
  x = !1, b.clear(), g(t);
@@ -135,7 +135,7 @@ function Y(t, e) {
135
135
  n.fragment !== null && (K(n.after_update), m(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
136
136
  }
137
137
  function Z(t, e) {
138
- t.$$.dirty[0] === -1 && (f.push(t), q(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
138
+ t.$$.dirty[0] === -1 && (a.push(t), q(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
139
139
  }
140
140
  function tt(t, e, n, i, s, o, u = null, c = [-1]) {
141
141
  const l = S;
@@ -163,10 +163,10 @@ function tt(t, e, n, i, s, o, u = null, c = [-1]) {
163
163
  };
164
164
  u && u(r.root);
165
165
  let _ = !1;
166
- if (r.ctx = n(t, e.props || {}, ($, j, ...L) => {
166
+ if (r.ctx = n ? n(t, e.props || {}, ($, j, ...L) => {
167
167
  const O = L.length ? L[0] : j;
168
168
  return r.ctx && s(r.ctx[$], r.ctx[$] = O) && (!r.skip_bound && r.bound[$] && r.bound[$](O), _ && Z(t, $)), j;
169
- }), r.update(), _ = !0, m(r.before_update), r.fragment = i(r.ctx), e.target) {
169
+ }) : [], r.update(), _ = !0, m(r.before_update), r.fragment = i ? i(r.ctx) : !1, e.target) {
170
170
  if (e.hydrate) {
171
171
  const $ = V(e.target);
172
172
  r.fragment && r.fragment.l($), $.forEach(C);
@@ -0,0 +1,507 @@
1
+ var V = Object.defineProperty, z = Object.defineProperties;
2
+ var F = Object.getOwnPropertyDescriptors;
3
+ var v = Object.getOwnPropertySymbols;
4
+ var q = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
5
+ var k = (e, t, n) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, P = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ q.call(t, n) && k(e, n, t[n]);
8
+ if (v)
9
+ for (var n of v(t))
10
+ G.call(t, n) && k(e, n, t[n]);
11
+ return e;
12
+ }, B = (e, t) => z(e, F(t));
13
+ var f = (e, t, n) => k(e, typeof t != "symbol" ? t + "" : t, n);
14
+ var M = (e, t, n) => new Promise((i, o) => {
15
+ var s = (l) => {
16
+ try {
17
+ u(n.next(l));
18
+ } catch (r) {
19
+ o(r);
20
+ }
21
+ }, c = (l) => {
22
+ try {
23
+ u(n.throw(l));
24
+ } catch (r) {
25
+ o(r);
26
+ }
27
+ }, u = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, c);
28
+ u((n = n.apply(e, t)).next());
29
+ });
30
+ function _() {
31
+ }
32
+ function H(e) {
33
+ return e();
34
+ }
35
+ function R() {
36
+ return /* @__PURE__ */ Object.create(null);
37
+ }
38
+ function b(e) {
39
+ e.forEach(H);
40
+ }
41
+ function I(e) {
42
+ return typeof e == "function";
43
+ }
44
+ function K(e, t) {
45
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
+ }
47
+ function Q(e) {
48
+ return Object.keys(e).length === 0;
49
+ }
50
+ function W(e, t) {
51
+ e.appendChild(t);
52
+ }
53
+ function X(e, t, n) {
54
+ const i = Y(e);
55
+ if (!i.getElementById(t)) {
56
+ const o = j("style");
57
+ o.id = t, o.textContent = n, Z(i, o);
58
+ }
59
+ }
60
+ function Y(e) {
61
+ if (!e) return document;
62
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
63
+ return t && /** @type {ShadowRoot} */
64
+ t.host ? (
65
+ /** @type {ShadowRoot} */
66
+ t
67
+ ) : e.ownerDocument;
68
+ }
69
+ function Z(e, t) {
70
+ return W(
71
+ /** @type {Document} */
72
+ e.head || e,
73
+ t
74
+ ), t.sheet;
75
+ }
76
+ function U(e, t, n) {
77
+ e.insertBefore(t, n || null);
78
+ }
79
+ function S(e) {
80
+ e.parentNode && e.parentNode.removeChild(e);
81
+ }
82
+ function j(e) {
83
+ return document.createElement(e);
84
+ }
85
+ function D(e, t, n) {
86
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
87
+ }
88
+ function tt(e) {
89
+ return Array.from(e.childNodes);
90
+ }
91
+ function et(e) {
92
+ const t = {};
93
+ return e.childNodes.forEach(
94
+ /** @param {Element} node */
95
+ (n) => {
96
+ t[n.slot || "default"] = !0;
97
+ }
98
+ ), t;
99
+ }
100
+ let L;
101
+ function p(e) {
102
+ L = e;
103
+ }
104
+ const d = [], w = [];
105
+ let g = [];
106
+ const T = [], nt = /* @__PURE__ */ Promise.resolve();
107
+ let E = !1;
108
+ function st() {
109
+ E || (E = !0, nt.then(m));
110
+ }
111
+ function C(e) {
112
+ g.push(e);
113
+ }
114
+ const x = /* @__PURE__ */ new Set();
115
+ let h = 0;
116
+ function m() {
117
+ if (h !== 0)
118
+ return;
119
+ const e = L;
120
+ do {
121
+ try {
122
+ for (; h < d.length; ) {
123
+ const t = d[h];
124
+ h++, p(t), it(t.$$);
125
+ }
126
+ } catch (t) {
127
+ throw d.length = 0, h = 0, t;
128
+ }
129
+ for (p(null), d.length = 0, h = 0; w.length; ) w.pop()();
130
+ for (let t = 0; t < g.length; t += 1) {
131
+ const n = g[t];
132
+ x.has(n) || (x.add(n), n());
133
+ }
134
+ g.length = 0;
135
+ } while (d.length);
136
+ for (; T.length; )
137
+ T.pop()();
138
+ E = !1, x.clear(), p(e);
139
+ }
140
+ function it(e) {
141
+ if (e.fragment !== null) {
142
+ e.update(), b(e.before_update);
143
+ const t = e.dirty;
144
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(C);
145
+ }
146
+ }
147
+ function rt(e) {
148
+ const t = [], n = [];
149
+ g.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : n.push(i)), n.forEach((i) => i()), g = t;
150
+ }
151
+ const ot = /* @__PURE__ */ new Set();
152
+ function ct(e, t) {
153
+ e && e.i && (ot.delete(e), e.i(t));
154
+ }
155
+ function lt(e, t, n) {
156
+ const { fragment: i, after_update: o } = e.$$;
157
+ i && i.m(t, n), C(() => {
158
+ const s = e.$$.on_mount.map(H).filter(I);
159
+ e.$$.on_destroy ? e.$$.on_destroy.push(...s) : b(s), e.$$.on_mount = [];
160
+ }), o.forEach(C);
161
+ }
162
+ function ut(e, t) {
163
+ const n = e.$$;
164
+ n.fragment !== null && (rt(n.after_update), b(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
165
+ }
166
+ function $t(e, t) {
167
+ e.$$.dirty[0] === -1 && (d.push(e), st(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
168
+ }
169
+ function ft(e, t, n, i, o, s, c = null, u = [-1]) {
170
+ const l = L;
171
+ p(e);
172
+ const r = e.$$ = {
173
+ fragment: null,
174
+ ctx: [],
175
+ // state
176
+ props: s,
177
+ update: _,
178
+ not_equal: o,
179
+ bound: R(),
180
+ // lifecycle
181
+ on_mount: [],
182
+ on_destroy: [],
183
+ on_disconnect: [],
184
+ before_update: [],
185
+ after_update: [],
186
+ context: new Map(t.context || (l ? l.$$.context : [])),
187
+ // everything else
188
+ callbacks: R(),
189
+ dirty: u,
190
+ skip_bound: !1,
191
+ root: t.target || l.$$.root
192
+ };
193
+ c && c(r.root);
194
+ let a = !1;
195
+ if (r.ctx = n ? n(e, t.props || {}, ($, O, ...A) => {
196
+ const N = A.length ? A[0] : O;
197
+ return r.ctx && o(r.ctx[$], r.ctx[$] = N) && (!r.skip_bound && r.bound[$] && r.bound[$](N), a && $t(e, $)), O;
198
+ }) : [], r.update(), a = !0, b(r.before_update), r.fragment = i ? i(r.ctx) : !1, t.target) {
199
+ if (t.hydrate) {
200
+ const $ = tt(t.target);
201
+ r.fragment && r.fragment.l($), $.forEach(S);
202
+ } else
203
+ r.fragment && r.fragment.c();
204
+ t.intro && ct(e.$$.fragment), lt(e, t.target, t.anchor), m();
205
+ }
206
+ p(l);
207
+ }
208
+ let J;
209
+ typeof HTMLElement == "function" && (J = class extends HTMLElement {
210
+ constructor(t, n, i) {
211
+ super();
212
+ /** The Svelte component constructor */
213
+ f(this, "$$ctor");
214
+ /** Slots */
215
+ f(this, "$$s");
216
+ /** The Svelte component instance */
217
+ f(this, "$$c");
218
+ /** Whether or not the custom element is connected */
219
+ f(this, "$$cn", !1);
220
+ /** Component props data */
221
+ f(this, "$$d", {});
222
+ /** `true` if currently in the process of reflecting component props back to attributes */
223
+ f(this, "$$r", !1);
224
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
225
+ f(this, "$$p_d", {});
226
+ /** @type {Record<string, Function[]>} Event listeners */
227
+ f(this, "$$l", {});
228
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
229
+ f(this, "$$l_u", /* @__PURE__ */ new Map());
230
+ this.$$ctor = t, this.$$s = n, i && this.attachShadow({ mode: "open" });
231
+ }
232
+ addEventListener(t, n, i) {
233
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
234
+ const o = this.$$c.$on(t, n);
235
+ this.$$l_u.set(n, o);
236
+ }
237
+ super.addEventListener(t, n, i);
238
+ }
239
+ removeEventListener(t, n, i) {
240
+ if (super.removeEventListener(t, n, i), this.$$c) {
241
+ const o = this.$$l_u.get(n);
242
+ o && (o(), this.$$l_u.delete(n));
243
+ }
244
+ }
245
+ connectedCallback() {
246
+ return M(this, null, function* () {
247
+ if (this.$$cn = !0, !this.$$c) {
248
+ let t = function(s) {
249
+ return () => {
250
+ let c;
251
+ return {
252
+ c: function() {
253
+ c = j("slot"), s !== "default" && D(c, "name", s);
254
+ },
255
+ /**
256
+ * @param {HTMLElement} target
257
+ * @param {HTMLElement} [anchor]
258
+ */
259
+ m: function(r, a) {
260
+ U(r, c, a);
261
+ },
262
+ d: function(r) {
263
+ r && S(c);
264
+ }
265
+ };
266
+ };
267
+ };
268
+ if (yield Promise.resolve(), !this.$$cn || this.$$c)
269
+ return;
270
+ const n = {}, i = et(this);
271
+ for (const s of this.$$s)
272
+ s in i && (n[s] = [t(s)]);
273
+ for (const s of this.attributes) {
274
+ const c = this.$$g_p(s.name);
275
+ c in this.$$d || (this.$$d[c] = y(c, s.value, this.$$p_d, "toProp"));
276
+ }
277
+ for (const s in this.$$p_d)
278
+ !(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
279
+ this.$$c = new this.$$ctor({
280
+ target: this.shadowRoot || this,
281
+ props: B(P({}, this.$$d), {
282
+ $$slots: n,
283
+ $$scope: {
284
+ ctx: []
285
+ }
286
+ })
287
+ });
288
+ const o = () => {
289
+ this.$$r = !0;
290
+ for (const s in this.$$p_d)
291
+ if (this.$$d[s] = this.$$c.$$.ctx[this.$$c.$$.props[s]], this.$$p_d[s].reflect) {
292
+ const c = y(
293
+ s,
294
+ this.$$d[s],
295
+ this.$$p_d,
296
+ "toAttribute"
297
+ );
298
+ c == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, c);
299
+ }
300
+ this.$$r = !1;
301
+ };
302
+ this.$$c.$$.after_update.push(o), o();
303
+ for (const s in this.$$l)
304
+ for (const c of this.$$l[s]) {
305
+ const u = this.$$c.$on(s, c);
306
+ this.$$l_u.set(c, u);
307
+ }
308
+ this.$$l = {};
309
+ }
310
+ });
311
+ }
312
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
313
+ // and setting attributes through setAttribute etc, this is helpful
314
+ attributeChangedCallback(t, n, i) {
315
+ var o;
316
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = y(t, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [t]: this.$$d[t] }));
317
+ }
318
+ disconnectedCallback() {
319
+ this.$$cn = !1, Promise.resolve().then(() => {
320
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
321
+ });
322
+ }
323
+ $$g_p(t) {
324
+ return Object.keys(this.$$p_d).find(
325
+ (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
326
+ ) || t;
327
+ }
328
+ });
329
+ function y(e, t, n, i) {
330
+ var s;
331
+ const o = (s = n[e]) == null ? void 0 : s.type;
332
+ if (t = o === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !n[e])
333
+ return t;
334
+ if (i === "toAttribute")
335
+ switch (o) {
336
+ case "Object":
337
+ case "Array":
338
+ return t == null ? null : JSON.stringify(t);
339
+ case "Boolean":
340
+ return t ? "" : null;
341
+ case "Number":
342
+ return t == null ? null : t;
343
+ default:
344
+ return t;
345
+ }
346
+ else
347
+ switch (o) {
348
+ case "Object":
349
+ case "Array":
350
+ return t && JSON.parse(t);
351
+ case "Boolean":
352
+ return t;
353
+ case "Number":
354
+ return t != null ? +t : t;
355
+ default:
356
+ return t;
357
+ }
358
+ }
359
+ function at(e, t, n, i, o, s) {
360
+ let c = class extends J {
361
+ constructor() {
362
+ super(e, n, o), this.$$p_d = t;
363
+ }
364
+ static get observedAttributes() {
365
+ return Object.keys(t).map(
366
+ (u) => (t[u].attribute || u).toLowerCase()
367
+ );
368
+ }
369
+ };
370
+ return Object.keys(t).forEach((u) => {
371
+ Object.defineProperty(c.prototype, u, {
372
+ get() {
373
+ return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
374
+ },
375
+ set(l) {
376
+ var r;
377
+ l = y(u, l, t), this.$$d[u] = l, (r = this.$$c) == null || r.$set({ [u]: l });
378
+ }
379
+ });
380
+ }), i.forEach((u) => {
381
+ Object.defineProperty(c.prototype, u, {
382
+ get() {
383
+ var l;
384
+ return (l = this.$$c) == null ? void 0 : l[u];
385
+ }
386
+ });
387
+ }), e.element = /** @type {any} */
388
+ c, c;
389
+ }
390
+ class ht {
391
+ constructor() {
392
+ /**
393
+ * ### PRIVATE API
394
+ *
395
+ * Do not use, may change at any time
396
+ *
397
+ * @type {any}
398
+ */
399
+ f(this, "$$");
400
+ /**
401
+ * ### PRIVATE API
402
+ *
403
+ * Do not use, may change at any time
404
+ *
405
+ * @type {any}
406
+ */
407
+ f(this, "$$set");
408
+ }
409
+ /** @returns {void} */
410
+ $destroy() {
411
+ ut(this, 1), this.$destroy = _;
412
+ }
413
+ /**
414
+ * @template {Extract<keyof Events, string>} K
415
+ * @param {K} type
416
+ * @param {((e: Events[K]) => void) | null | undefined} callback
417
+ * @returns {() => void}
418
+ */
419
+ $on(t, n) {
420
+ if (!I(n))
421
+ return _;
422
+ const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
423
+ return i.push(n), () => {
424
+ const o = i.indexOf(n);
425
+ o !== -1 && i.splice(o, 1);
426
+ };
427
+ }
428
+ /**
429
+ * @param {Partial<Props>} props
430
+ * @returns {void}
431
+ */
432
+ $set(t) {
433
+ this.$$set && !Q(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
434
+ }
435
+ }
436
+ const dt = "4";
437
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(dt);
438
+ function _t(e) {
439
+ X(e, "svelte-fidj5e", ".CashierSpinner{display:block;width:80px;height:80px;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1}.CashierSpinner .spinner{animation:rotate 2s linear infinite;transform-origin:center center}.CashierSpinner .spinner .path{stroke-dasharray:1, 200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke-linecap:round;stroke:var(--emw--color-primary, #7EC51E)}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}");
440
+ }
441
+ function gt(e) {
442
+ let t;
443
+ return {
444
+ c() {
445
+ t = j("div"), t.innerHTML = '<svg class="spinner" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"></circle></svg>', D(t, "class", "CashierSpinner");
446
+ },
447
+ m(n, i) {
448
+ U(n, t, i), e[3](t);
449
+ },
450
+ p: _,
451
+ i: _,
452
+ o: _,
453
+ d(n) {
454
+ n && S(t), e[3](null);
455
+ }
456
+ };
457
+ }
458
+ function pt(e, t, n) {
459
+ let { clientstyling: i = "" } = t, { clientstylingurl: o = "" } = t, s;
460
+ const c = () => {
461
+ let r = document.createElement("style");
462
+ r.innerHTML = i, s.appendChild(r);
463
+ }, u = () => {
464
+ let r = new URL(o), a = document.createElement("style");
465
+ fetch(r.href).then(($) => $.text()).then(($) => {
466
+ a.innerHTML = $, setTimeout(
467
+ () => {
468
+ s.appendChild(a);
469
+ },
470
+ 1
471
+ );
472
+ });
473
+ };
474
+ function l(r) {
475
+ w[r ? "unshift" : "push"](() => {
476
+ s = r, n(0, s);
477
+ });
478
+ }
479
+ return e.$$set = (r) => {
480
+ "clientstyling" in r && n(1, i = r.clientstyling), "clientstylingurl" in r && n(2, o = r.clientstylingurl);
481
+ }, e.$$.update = () => {
482
+ e.$$.dirty & /*clientstyling, customStylingContainer*/
483
+ 3 && i && s && c(), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
484
+ 5 && o && s && u();
485
+ }, [s, i, o, l];
486
+ }
487
+ class yt extends ht {
488
+ constructor(t) {
489
+ super(), ft(this, t, pt, gt, K, { clientstyling: 1, clientstylingurl: 2 }, _t);
490
+ }
491
+ get clientstyling() {
492
+ return this.$$.ctx[1];
493
+ }
494
+ set clientstyling(t) {
495
+ this.$$set({ clientstyling: t }), m();
496
+ }
497
+ get clientstylingurl() {
498
+ return this.$$.ctx[2];
499
+ }
500
+ set clientstylingurl(t) {
501
+ this.$$set({ clientstylingurl: t }), m();
502
+ }
503
+ }
504
+ at(yt, { clientstyling: {}, clientstylingurl: {} }, [], [], !0);
505
+ export {
506
+ yt as default
507
+ };
@@ -0,0 +1 @@
1
+ "use strict";var z=Object.defineProperty,F=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var k=(e,t,n)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))G.call(t,n)&&k(e,n,t[n]);if(v)for(var n of v(t))K.call(t,n)&&k(e,n,t[n]);return e},M=(e,t)=>F(e,q(t));var f=(e,t,n)=>k(e,typeof t!="symbol"?t+"":t,n);var B=(e,t,n)=>new Promise((i,o)=>{var s=l=>{try{u(n.next(l))}catch(r){o(r)}},c=l=>{try{u(n.throw(l))}catch(r){o(r)}},u=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,c);u((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _(){}function H(e){return e()}function T(){return Object.create(null)}function b(e){e.forEach(H)}function I(e){return typeof e=="function"}function Q(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function W(e){return Object.keys(e).length===0}function X(e,t){e.appendChild(t)}function Y(e,t,n){const i=Z(e);if(!i.getElementById(t)){const o=j("style");o.id=t,o.textContent=n,tt(i,o)}}function Z(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function tt(e,t){return X(e.head||e,t),t.sheet}function U(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode&&e.parentNode.removeChild(e)}function j(e){return document.createElement(e)}function D(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function et(e){return Array.from(e.childNodes)}function nt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let O;function y(e){O=e}const d=[],x=[];let g=[];const R=[],st=Promise.resolve();let E=!1;function it(){E||(E=!0,st.then(m))}function C(e){g.push(e)}const w=new Set;let h=0;function m(){if(h!==0)return;const e=O;do{try{for(;h<d.length;){const t=d[h];h++,y(t),rt(t.$$)}}catch(t){throw d.length=0,h=0,t}for(y(null),d.length=0,h=0;x.length;)x.pop()();for(let t=0;t<g.length;t+=1){const n=g[t];w.has(n)||(w.add(n),n())}g.length=0}while(d.length);for(;R.length;)R.pop()();E=!1,w.clear(),y(e)}function rt(e){if(e.fragment!==null){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(C)}}function ot(e){const t=[],n=[];g.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),g=t}const ct=new Set;function lt(e,t){e&&e.i&&(ct.delete(e),e.i(t))}function ut(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),C(()=>{const s=e.$$.on_mount.map(H).filter(I);e.$$.on_destroy?e.$$.on_destroy.push(...s):b(s),e.$$.on_mount=[]}),o.forEach(C)}function $t(e,t){const n=e.$$;n.fragment!==null&&(ot(n.after_update),b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ft(e,t){e.$$.dirty[0]===-1&&(d.push(e),it(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function at(e,t,n,i,o,s,c=null,u=[-1]){const l=O;y(e);const r=e.$$={fragment:null,ctx:[],props:s,update:_,not_equal:o,bound:T(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:T(),dirty:u,skip_bound:!1,root:t.target||l.$$.root};c&&c(r.root);let a=!1;if(r.ctx=n?n(e,t.props||{},($,L,...A)=>{const N=A.length?A[0]:L;return r.ctx&&o(r.ctx[$],r.ctx[$]=N)&&(!r.skip_bound&&r.bound[$]&&r.bound[$](N),a&&ft(e,$)),L}):[],r.update(),a=!0,b(r.before_update),r.fragment=i?i(r.ctx):!1,t.target){if(t.hydrate){const $=et(t.target);r.fragment&&r.fragment.l($),$.forEach(S)}else r.fragment&&r.fragment.c();t.intro&&lt(e.$$.fragment),ut(e,t.target,t.anchor),m()}y(l)}let J;typeof HTMLElement=="function"&&(J=class extends HTMLElement{constructor(t,n,i){super();f(this,"$$ctor");f(this,"$$s");f(this,"$$c");f(this,"$$cn",!1);f(this,"$$d",{});f(this,"$$r",!1);f(this,"$$p_d",{});f(this,"$$l",{});f(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}connectedCallback(){return B(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let c;return{c:function(){c=j("slot"),s!=="default"&&D(c,"name",s)},m:function(r,a){U(r,c,a)},d:function(r){r&&S(c)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=nt(this);for(const s of this.$$s)s in i&&(n[s]=[t(s)]);for(const s of this.attributes){const c=this.$$g_p(s.name);c in this.$$d||(this.$$d[c]=p(c,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:M(P({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const o=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const c=p(s,this.$$d[s],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,c)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const s in this.$$l)for(const c of this.$$l[s]){const u=this.$$c.$on(s,c);this.$$l_u.set(c,u)}this.$$l={}}})}attributeChangedCallback(t,n,i){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=p(t,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function p(e,t,n,i){var s;const o=(s=n[e])==null?void 0:s.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ht(e,t,n,i,o,s){let c=class extends J{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(u=>(t[u].attribute||u).toLowerCase())}};return Object.keys(t).forEach(u=>{Object.defineProperty(c.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(l){var r;l=p(u,l,t),this.$$d[u]=l,(r=this.$$c)==null||r.$set({[u]:l})}})}),i.forEach(u=>{Object.defineProperty(c.prototype,u,{get(){var l;return(l=this.$$c)==null?void 0:l[u]}})}),e.element=c,c}class dt{constructor(){f(this,"$$");f(this,"$$set")}$destroy(){$t(this,1),this.$destroy=_}$on(t,n){if(!I(n))return _;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!W(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const _t="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_t);function gt(e){Y(e,"svelte-fidj5e",".CashierSpinner{display:block;width:80px;height:80px;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1}.CashierSpinner .spinner{animation:rotate 2s linear infinite;transform-origin:center center}.CashierSpinner .spinner .path{stroke-dasharray:1, 200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke-linecap:round;stroke:var(--emw--color-primary, #7EC51E)}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}")}function yt(e){let t;return{c(){t=j("div"),t.innerHTML='<svg class="spinner" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"></circle></svg>',D(t,"class","CashierSpinner")},m(n,i){U(n,t,i),e[3](t)},p:_,i:_,o:_,d(n){n&&S(t),e[3](null)}}}function pt(e,t,n){let{clientstyling:i=""}=t,{clientstylingurl:o=""}=t,s;const c=()=>{let r=document.createElement("style");r.innerHTML=i,s.appendChild(r)},u=()=>{let r=new URL(o),a=document.createElement("style");fetch(r.href).then($=>$.text()).then($=>{a.innerHTML=$,setTimeout(()=>{s.appendChild(a)},1)})};function l(r){x[r?"unshift":"push"](()=>{s=r,n(0,s)})}return e.$$set=r=>{"clientstyling"in r&&n(1,i=r.clientstyling),"clientstylingurl"in r&&n(2,o=r.clientstylingurl)},e.$$.update=()=>{e.$$.dirty&3&&i&&s&&c(),e.$$.dirty&5&&o&&s&&u()},[s,i,o,l]}class V extends dt{constructor(t){super(),at(this,t,pt,yt,Q,{clientstyling:1,clientstylingurl:2},gt)}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),m()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),m()}}ht(V,{clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=V;
@@ -0,0 +1 @@
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CashierSpinner-gwVhaE0o.cjs")).then(({default:t})=>{!customElements.get("cashier-spinner")&&customElements.define("cashier-spinner",t.element)})}
@@ -0,0 +1,16 @@
1
+ if (typeof window != "undefined") {
2
+ let n = function(t) {
3
+ return function(...s) {
4
+ try {
5
+ return t.apply(this, s);
6
+ } catch (e) {
7
+ if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
+ return !1;
9
+ throw e;
10
+ }
11
+ };
12
+ };
13
+ customElements.define = n(customElements.define), import("../components/CashierSpinner-CqC-ZElS.js").then(({ default: t }) => {
14
+ !customElements.get("cashier-spinner") && customElements.define("cashier-spinner", t.element);
15
+ });
16
+ }
@@ -1,4 +1,4 @@
1
- import { C as s } from "../components/CashierSpinner-BoG2cSM8.js";
1
+ import { C as s } from "../components/CashierSpinner-CLM51vIQ.js";
2
2
  function i(t) {
3
3
  return function(...n) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-spinner",
3
- "version": "1.54.4",
3
+ "version": "1.54.8",
4
4
  "type": "module",
5
5
  "main": "esnext/cashier-spinner.js",
6
6
  "module": "esnext/cashier-spinner.js",