@everymatrix/cashier-spinner 1.87.25 → 1.87.27

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.
@@ -0,0 +1 @@
1
+ "use strict";var J=Object.defineProperty,V=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var k=(e,t,n)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))W.call(t,n)&&k(e,n,t[n]);if(N)for(var n of N(t))Y.call(t,n)&&k(e,n,t[n]);return e},T=(e,t)=>V(e,K(t));var f=(e,t,n)=>(k(e,typeof t!="symbol"?t+"":t,n),n);var P=(e,t,n)=>new Promise((s,i)=>{var r=l=>{try{u(n.next(l))}catch(c){i(c)}},o=l=>{try{u(n.throw(l))}catch(c){i(c)}},u=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);u((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _(){}function U(e){return e()}function R(){return Object.create(null)}function S(e){e.forEach(U)}function z(e){return typeof e=="function"}function q(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Q(e){return Object.keys(e).length===0}function X(e,t){e.appendChild(t)}function Z(e,t,n){const s=tt(e);if(!s.getElementById(t)){const i=O("style");i.id=t,i.textContent=n,et(s,i)}}function tt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function et(e,t){return X(e.head||e,t),t.sheet}function D(e,t,n){e.insertBefore(t,n||null)}function j(e){e.parentNode&&e.parentNode.removeChild(e)}function O(e){return document.createElement(e)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function nt(e){return Array.from(e.childNodes)}function st(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let g;function y(e){g=e}function rt(){if(!g)throw new Error("Function called outside component initialization");return g}function it(e){rt().$$.on_mount.push(e)}const d=[],C=[];let p=[];const H=[],ot=Promise.resolve();let E=!1;function ct(){E||(E=!0,ot.then(m))}function L(e){p.push(e)}const x=new Set;let h=0;function m(){if(h!==0)return;const e=g;do{try{for(;h<d.length;){const t=d[h];h++,y(t),ut(t.$$)}}catch(t){throw d.length=0,h=0,t}for(y(null),d.length=0,h=0;C.length;)C.pop()();for(let t=0;t<p.length;t+=1){const n=p[t];x.has(n)||(x.add(n),n())}p.length=0}while(d.length);for(;H.length;)H.pop()();E=!1,x.clear(),y(e)}function ut(e){if(e.fragment!==null){e.update(),S(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(L)}}function lt(e){const t=[],n=[];p.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),p=t}const ft=new Set;function at(e,t){e&&e.i&&(ft.delete(e),e.i(t))}function ht(e,t,n){const{fragment:s,after_update:i}=e.$$;s&&s.m(t,n),L(()=>{const r=e.$$.on_mount.map(U).filter(z);e.$$.on_destroy?e.$$.on_destroy.push(...r):S(r),e.$$.on_mount=[]}),i.forEach(L)}function dt(e,t){const n=e.$$;n.fragment!==null&&(lt(n.after_update),S(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function $t(e,t){e.$$.dirty[0]===-1&&(d.push(e),ct(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function _t(e,t,n,s,i,r,o=null,u=[-1]){const l=g;y(e);const c=e.$$={fragment:null,ctx:[],props:r,update:_,not_equal:i,bound:R(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:R(),dirty:u,skip_bound:!1,root:t.target||l.$$.root};o&&o(c.root);let b=!1;if(c.ctx=n?n(e,t.props||{},(a,A,...v)=>{const M=v.length?v[0]:A;return c.ctx&&i(c.ctx[a],c.ctx[a]=M)&&(!c.skip_bound&&c.bound[a]&&c.bound[a](M),b&&$t(e,a)),A}):[],c.update(),b=!0,S(c.before_update),c.fragment=s?s(c.ctx):!1,t.target){if(t.hydrate){const a=nt(t.target);c.fragment&&c.fragment.l(a),a.forEach(j)}else c.fragment&&c.fragment.c();t.intro&&at(e.$$.fragment),ht(e,t.target,t.anchor),m()}y(l)}let F;typeof HTMLElement=="function"&&(F=class extends HTMLElement{constructor(t,n,s){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,s&&this.attachShadow({mode:"open"})}addEventListener(t,n,s){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,s)}removeEventListener(t,n,s){if(super.removeEventListener(t,n,s),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return P(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(r){return()=>{let o;return{c:function(){o=O("slot"),r!=="default"&&I(o,"name",r)},m:function(c,b){D(c,o,b)},d:function(c){c&&j(o)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=st(this);for(const r of this.$$s)r in s&&(n[r]=[t(r)]);for(const r of this.attributes){const o=this.$$g_p(r.name);o in this.$$d||(this.$$d[o]=w(o,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:T(B({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const r in this.$$p_d)if(this.$$d[r]=this.$$c.$$.ctx[this.$$c.$$.props[r]],this.$$p_d[r].reflect){const o=w(r,this.$$d[r],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,o)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const r in this.$$l)for(const o of this.$$l[r]){const u=this.$$c.$on(r,o);this.$$l_u.set(o,u)}this.$$l={}}})}attributeChangedCallback(t,n,s){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=w(t,s,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$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 w(e,t,n,s){var r;const i=(r=n[e])==null?void 0:r.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[e])return t;if(s==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function pt(e,t,n,s,i,r){let o=class extends F{constructor(){super(e,n,i),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(o.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(l){var c;l=w(u,l,t),this.$$d[u]=l,(c=this.$$c)==null||c.$set({[u]:l})}})}),s.forEach(u=>{Object.defineProperty(o.prototype,u,{get(){var l;return(l=this.$$c)==null?void 0:l[u]}})}),e.element=o,o}class yt{constructor(){f(this,"$$");f(this,"$$set")}$destroy(){dt(this,1),this.$destroy=_}$on(t,n){if(!z(n))return _;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(t){this.$$set&&!Q(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const mt="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(mt);const $="__WIDGET_GLOBAL_STYLE_CACHE__";function gt(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function bt(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(s=>s.text()).then(s=>{const i=document.createElement("style");i.innerHTML=s,e&&e.appendChild(i)}).catch(s=>{console.error("There was an error while trying to load client styling from URL",s)})}function wt(e,t,n,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return n=St(e,t),n;window[$]||(window[$]={}),n=kt(e,t);const r=n.unsubscribe.bind(n),o=()=>{if(window[$][t]){const u=window[$][t];u.refCount>1?u.refCount=u.refCount-1:delete window[$][t]}r()};return n.unsubscribe=o,n}function St(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,s=>{e&&(n.innerHTML=s,e.appendChild(n))})}function kt(e,t){return window.emMessageBus.subscribe(t,n=>{var u;if(!e)return;const s=e.getRootNode(),i=window[$];let r=(u=i[t])==null?void 0:u.sheet;r?i[t].refCount=i[t].refCount+1:(r=new CSSStyleSheet,r.replaceSync(n),i[t]={sheet:r,refCount:1});const o=s.adoptedStyleSheets||[];o.includes(r)||(s.adoptedStyleSheets=[...o,r])})}function xt(e){Z(e,"svelte-sjjtuo",".CashierSpinner{display:block;width:var(--emw--spinner-size, 32px);height:var(--emw--spinner-size, 32px);position:absolute;top:var(--emw--spinner-top-position, 50%);left:var(--emw--spinner-left-position, 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-width:var(--emw--stroke-width, 2px);stroke:var(--emw--spinner-color, #2dcc70)}@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 Ct(e){let t;return{c(){t=O("div"),t.innerHTML='<svg class="spinner" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"></circle></svg>',I(t,"class","CashierSpinner")},m(n,s){D(n,t,s),e[4](t)},p:_,i:_,o:_,d(n){n&&j(t),e[4](null)}}}function Et(e,t,n){let{clientstyling:s=""}=t,{clientstylingurl:i=""}=t,{mbsource:r=""}=t,o,u;it(()=>()=>{});function l(c){C[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"clientstyling"in c&&n(1,s=c.clientstyling),"clientstylingurl"in c&&n(2,i=c.clientstylingurl),"mbsource"in c&&n(3,r=c.mbsource)},e.$$.update=()=>{e.$$.dirty&3&&s&&o&&gt(o,s),e.$$.dirty&5&&i&&o&&bt(o,i),e.$$.dirty&9&&r&&o&&wt(o,`${r}.Style`,u)},[o,s,i,r,l]}class G extends yt{constructor(t){super(),_t(this,t,Et,Ct,q,{clientstyling:1,clientstylingurl:2,mbsource:3},xt)}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()}get mbsource(){return this.$$.ctx[3]}set mbsource(t){this.$$set({mbsource:t}),m()}}pt(G,{clientstyling:{},clientstylingurl:{},mbsource:{}},[],[],!0);exports.default=G;
@@ -1,34 +1,34 @@
1
- function h() {
1
+ function d() {
2
2
  }
3
- function M(t) {
3
+ function N(t) {
4
4
  return t();
5
5
  }
6
6
  function v() {
7
7
  return /* @__PURE__ */ Object.create(null);
8
8
  }
9
- function y(t) {
10
- t.forEach(M);
9
+ function b(t) {
10
+ t.forEach(N);
11
11
  }
12
- function N(t) {
12
+ function B(t) {
13
13
  return typeof t == "function";
14
14
  }
15
- function T(t, e) {
15
+ function H(t, e) {
16
16
  return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
17
17
  }
18
- function H(t) {
18
+ function U(t) {
19
19
  return Object.keys(t).length === 0;
20
20
  }
21
21
  function z(t, e) {
22
22
  t.appendChild(e);
23
23
  }
24
- function I(t, e, n) {
25
- const i = U(t);
26
- if (!i.getElementById(e)) {
27
- const s = C("style");
28
- s.id = e, s.textContent = n, D(i, s);
24
+ function D(t, e, n) {
25
+ const r = I(t);
26
+ if (!r.getElementById(e)) {
27
+ const s = E("style");
28
+ s.id = e, s.textContent = n, F(r, s);
29
29
  }
30
30
  }
31
- function U(t) {
31
+ function I(t) {
32
32
  if (!t)
33
33
  return document;
34
34
  const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
@@ -38,26 +38,26 @@ function U(t) {
38
38
  e
39
39
  ) : t.ownerDocument;
40
40
  }
41
- function D(t, e) {
41
+ function F(t, e) {
42
42
  return z(
43
43
  /** @type {Document} */
44
44
  t.head || t,
45
45
  e
46
46
  ), e.sheet;
47
47
  }
48
- function B(t, e, n) {
48
+ function T(t, e, n) {
49
49
  t.insertBefore(e, n || null);
50
50
  }
51
- function E(t) {
51
+ function C(t) {
52
52
  t.parentNode && t.parentNode.removeChild(t);
53
53
  }
54
- function C(t) {
54
+ function E(t) {
55
55
  return document.createElement(t);
56
56
  }
57
- function P(t, e, n) {
57
+ function R(t, e, n) {
58
58
  n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
59
59
  }
60
- function F(t) {
60
+ function G(t) {
61
61
  return Array.from(t.childNodes);
62
62
  }
63
63
  function J(t) {
@@ -69,93 +69,93 @@ function J(t) {
69
69
  }
70
70
  ), e;
71
71
  }
72
- let p;
73
- function _(t) {
74
- p = t;
72
+ let m;
73
+ function p(t) {
74
+ m = t;
75
75
  }
76
76
  function V() {
77
- if (!p)
77
+ if (!m)
78
78
  throw new Error("Function called outside component initialization");
79
- return p;
79
+ return m;
80
80
  }
81
- function q(t) {
81
+ function K(t) {
82
82
  V().$$.on_mount.push(t);
83
83
  }
84
- const a = [], w = [];
85
- let d = [];
86
- const A = [], G = /* @__PURE__ */ Promise.resolve();
84
+ const h = [], S = [];
85
+ let _ = [];
86
+ const M = [], W = /* @__PURE__ */ Promise.resolve();
87
87
  let x = !1;
88
- function K() {
89
- x || (x = !0, G.then(m));
88
+ function Y() {
89
+ x || (x = !0, W.then(y));
90
90
  }
91
91
  function k(t) {
92
- d.push(t);
92
+ _.push(t);
93
93
  }
94
- const b = /* @__PURE__ */ new Set();
95
- let $ = 0;
96
- function m() {
97
- if ($ !== 0)
94
+ const w = /* @__PURE__ */ new Set();
95
+ let a = 0;
96
+ function y() {
97
+ if (a !== 0)
98
98
  return;
99
- const t = p;
99
+ const t = m;
100
100
  do {
101
101
  try {
102
- for (; $ < a.length; ) {
103
- const e = a[$];
104
- $++, _(e), Q(e.$$);
102
+ for (; a < h.length; ) {
103
+ const e = h[a];
104
+ a++, p(e), q(e.$$);
105
105
  }
106
106
  } catch (e) {
107
- throw a.length = 0, $ = 0, e;
107
+ throw h.length = 0, a = 0, e;
108
108
  }
109
- for (_(null), a.length = 0, $ = 0; w.length; )
110
- w.pop()();
111
- for (let e = 0; e < d.length; e += 1) {
112
- const n = d[e];
113
- b.has(n) || (b.add(n), n());
109
+ for (p(null), h.length = 0, a = 0; S.length; )
110
+ S.pop()();
111
+ for (let e = 0; e < _.length; e += 1) {
112
+ const n = _[e];
113
+ w.has(n) || (w.add(n), n());
114
114
  }
115
- d.length = 0;
116
- } while (a.length);
117
- for (; A.length; )
118
- A.pop()();
119
- x = !1, b.clear(), _(t);
115
+ _.length = 0;
116
+ } while (h.length);
117
+ for (; M.length; )
118
+ M.pop()();
119
+ x = !1, w.clear(), p(t);
120
120
  }
121
- function Q(t) {
121
+ function q(t) {
122
122
  if (t.fragment !== null) {
123
- t.update(), y(t.before_update);
123
+ t.update(), b(t.before_update);
124
124
  const e = t.dirty;
125
125
  t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(k);
126
126
  }
127
127
  }
128
- function W(t) {
128
+ function Q(t) {
129
129
  const e = [], n = [];
130
- d.forEach((i) => t.indexOf(i) === -1 ? e.push(i) : n.push(i)), n.forEach((i) => i()), d = e;
130
+ _.forEach((r) => t.indexOf(r) === -1 ? e.push(r) : n.push(r)), n.forEach((r) => r()), _ = e;
131
131
  }
132
132
  const X = /* @__PURE__ */ new Set();
133
- function Y(t, e) {
133
+ function Z(t, e) {
134
134
  t && t.i && (X.delete(t), t.i(e));
135
135
  }
136
- function Z(t, e, n) {
137
- const { fragment: i, after_update: s } = t.$$;
138
- i && i.m(e, n), k(() => {
139
- const r = t.$$.on_mount.map(M).filter(N);
140
- t.$$.on_destroy ? t.$$.on_destroy.push(...r) : y(r), t.$$.on_mount = [];
136
+ function tt(t, e, n) {
137
+ const { fragment: r, after_update: s } = t.$$;
138
+ r && r.m(e, n), k(() => {
139
+ const i = t.$$.on_mount.map(N).filter(B);
140
+ t.$$.on_destroy ? t.$$.on_destroy.push(...i) : b(i), t.$$.on_mount = [];
141
141
  }), s.forEach(k);
142
142
  }
143
- function tt(t, e) {
143
+ function et(t, e) {
144
144
  const n = t.$$;
145
- n.fragment !== null && (W(n.after_update), y(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
145
+ n.fragment !== null && (Q(n.after_update), b(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
146
146
  }
147
- function et(t, e) {
148
- t.$$.dirty[0] === -1 && (a.push(t), K(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
147
+ function nt(t, e) {
148
+ t.$$.dirty[0] === -1 && (h.push(t), Y(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
149
149
  }
150
- function nt(t, e, n, i, s, r, c = null, u = [-1]) {
151
- const o = p;
152
- _(t);
153
- const l = t.$$ = {
150
+ function st(t, e, n, r, s, i, c = null, u = [-1]) {
151
+ const l = m;
152
+ p(t);
153
+ const o = t.$$ = {
154
154
  fragment: null,
155
155
  ctx: [],
156
156
  // state
157
- props: r,
158
- update: h,
157
+ props: i,
158
+ update: d,
159
159
  not_equal: s,
160
160
  bound: v(),
161
161
  // lifecycle
@@ -164,30 +164,30 @@ function nt(t, e, n, i, s, r, c = null, u = [-1]) {
164
164
  on_disconnect: [],
165
165
  before_update: [],
166
166
  after_update: [],
167
- context: new Map(e.context || (o ? o.$$.context : [])),
167
+ context: new Map(e.context || (l ? l.$$.context : [])),
168
168
  // everything else
169
169
  callbacks: v(),
170
170
  dirty: u,
171
171
  skip_bound: !1,
172
- root: e.target || o.$$.root
172
+ root: e.target || l.$$.root
173
173
  };
174
- c && c(l.root);
175
- let S = !1;
176
- if (l.ctx = n ? n(t, e.props || {}, (f, L, ...j) => {
177
- const O = j.length ? j[0] : L;
178
- return l.ctx && s(l.ctx[f], l.ctx[f] = O) && (!l.skip_bound && l.bound[f] && l.bound[f](O), S && et(t, f)), L;
179
- }) : [], l.update(), S = !0, y(l.before_update), l.fragment = i ? i(l.ctx) : !1, e.target) {
174
+ c && c(o.root);
175
+ let L = !1;
176
+ if (o.ctx = n ? n(t, e.props || {}, (f, j, ...O) => {
177
+ const A = O.length ? O[0] : j;
178
+ return o.ctx && s(o.ctx[f], o.ctx[f] = A) && (!o.skip_bound && o.bound[f] && o.bound[f](A), L && nt(t, f)), j;
179
+ }) : [], o.update(), L = !0, b(o.before_update), o.fragment = r ? r(o.ctx) : !1, e.target) {
180
180
  if (e.hydrate) {
181
- const f = F(e.target);
182
- l.fragment && l.fragment.l(f), f.forEach(E);
181
+ const f = G(e.target);
182
+ o.fragment && o.fragment.l(f), f.forEach(C);
183
183
  } else
184
- l.fragment && l.fragment.c();
185
- e.intro && Y(t.$$.fragment), Z(t, e.target, e.anchor), m();
184
+ o.fragment && o.fragment.c();
185
+ e.intro && Z(t.$$.fragment), tt(t, e.target, e.anchor), y();
186
186
  }
187
- _(o);
187
+ p(l);
188
188
  }
189
- let R;
190
- typeof HTMLElement == "function" && (R = class extends HTMLElement {
189
+ let P;
190
+ typeof HTMLElement == "function" && (P = class extends HTMLElement {
191
191
  /** The Svelte component constructor */
192
192
  $$ctor;
193
193
  /** Slots */
@@ -211,35 +211,35 @@ typeof HTMLElement == "function" && (R = class extends HTMLElement {
211
211
  }
212
212
  addEventListener(t, e, n) {
213
213
  if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(e), this.$$c) {
214
- const i = this.$$c.$on(t, e);
215
- this.$$l_u.set(e, i);
214
+ const r = this.$$c.$on(t, e);
215
+ this.$$l_u.set(e, r);
216
216
  }
217
217
  super.addEventListener(t, e, n);
218
218
  }
219
219
  removeEventListener(t, e, n) {
220
220
  if (super.removeEventListener(t, e, n), this.$$c) {
221
- const i = this.$$l_u.get(e);
222
- i && (i(), this.$$l_u.delete(e));
221
+ const r = this.$$l_u.get(e);
222
+ r && (r(), this.$$l_u.delete(e));
223
223
  }
224
224
  }
225
225
  async connectedCallback() {
226
226
  if (this.$$cn = !0, !this.$$c) {
227
227
  let t = function(s) {
228
228
  return () => {
229
- let r;
229
+ let i;
230
230
  return {
231
231
  c: function() {
232
- r = C("slot"), s !== "default" && P(r, "name", s);
232
+ i = E("slot"), s !== "default" && R(i, "name", s);
233
233
  },
234
234
  /**
235
235
  * @param {HTMLElement} target
236
236
  * @param {HTMLElement} [anchor]
237
237
  */
238
- m: function(o, l) {
239
- B(o, r, l);
238
+ m: function(l, o) {
239
+ T(l, i, o);
240
240
  },
241
- d: function(o) {
242
- o && E(r);
241
+ d: function(l) {
242
+ l && C(i);
243
243
  }
244
244
  };
245
245
  };
@@ -250,8 +250,8 @@ typeof HTMLElement == "function" && (R = class extends HTMLElement {
250
250
  for (const s of this.$$s)
251
251
  s in n && (e[s] = [t(s)]);
252
252
  for (const s of this.attributes) {
253
- const r = this.$$g_p(s.name);
254
- r in this.$$d || (this.$$d[r] = g(r, s.value, this.$$p_d, "toProp"));
253
+ const i = this.$$g_p(s.name);
254
+ i in this.$$d || (this.$$d[i] = g(i, s.value, this.$$p_d, "toProp"));
255
255
  }
256
256
  for (const s in this.$$p_d)
257
257
  !(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
@@ -265,25 +265,25 @@ typeof HTMLElement == "function" && (R = class extends HTMLElement {
265
265
  }
266
266
  }
267
267
  });
268
- const i = () => {
268
+ const r = () => {
269
269
  this.$$r = !0;
270
270
  for (const s in this.$$p_d)
271
271
  if (this.$$d[s] = this.$$c.$$.ctx[this.$$c.$$.props[s]], this.$$p_d[s].reflect) {
272
- const r = g(
272
+ const i = g(
273
273
  s,
274
274
  this.$$d[s],
275
275
  this.$$p_d,
276
276
  "toAttribute"
277
277
  );
278
- r == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, r);
278
+ i == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, i);
279
279
  }
280
280
  this.$$r = !1;
281
281
  };
282
- this.$$c.$$.after_update.push(i), i();
282
+ this.$$c.$$.after_update.push(r), r();
283
283
  for (const s in this.$$l)
284
- for (const r of this.$$l[s]) {
285
- const c = this.$$c.$on(s, r);
286
- this.$$l_u.set(r, c);
284
+ for (const i of this.$$l[s]) {
285
+ const c = this.$$c.$on(s, i);
286
+ this.$$l_u.set(i, c);
287
287
  }
288
288
  this.$$l = {};
289
289
  }
@@ -304,11 +304,11 @@ typeof HTMLElement == "function" && (R = class extends HTMLElement {
304
304
  ) || t;
305
305
  }
306
306
  });
307
- function g(t, e, n, i) {
307
+ function g(t, e, n, r) {
308
308
  const s = n[t]?.type;
309
- if (e = s === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !n[t])
309
+ if (e = s === "Boolean" && typeof e != "boolean" ? e != null : e, !r || !n[t])
310
310
  return e;
311
- if (i === "toAttribute")
311
+ if (r === "toAttribute")
312
312
  switch (s) {
313
313
  case "Object":
314
314
  case "Array":
@@ -333,8 +333,8 @@ function g(t, e, n, i) {
333
333
  return e;
334
334
  }
335
335
  }
336
- function st(t, e, n, i, s, r) {
337
- let c = class extends R {
336
+ function rt(t, e, n, r, s, i) {
337
+ let c = class extends P {
338
338
  constructor() {
339
339
  super(t, n, s), this.$$p_d = e;
340
340
  }
@@ -349,11 +349,11 @@ function st(t, e, n, i, s, r) {
349
349
  get() {
350
350
  return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
351
351
  },
352
- set(o) {
353
- o = g(u, o, e), this.$$d[u] = o, this.$$c?.$set({ [u]: o });
352
+ set(l) {
353
+ l = g(u, l, e), this.$$d[u] = l, this.$$c?.$set({ [u]: l });
354
354
  }
355
355
  });
356
- }), i.forEach((u) => {
356
+ }), r.forEach((u) => {
357
357
  Object.defineProperty(c.prototype, u, {
358
358
  get() {
359
359
  return this.$$c?.[u];
@@ -381,7 +381,7 @@ class it {
381
381
  $$set = void 0;
382
382
  /** @returns {void} */
383
383
  $destroy() {
384
- tt(this, 1), this.$destroy = h;
384
+ et(this, 1), this.$destroy = d;
385
385
  }
386
386
  /**
387
387
  * @template {Extract<keyof Events, string>} K
@@ -390,12 +390,12 @@ class it {
390
390
  * @returns {() => void}
391
391
  */
392
392
  $on(e, n) {
393
- if (!N(n))
394
- return h;
395
- const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
396
- return i.push(n), () => {
397
- const s = i.indexOf(n);
398
- s !== -1 && i.splice(s, 1);
393
+ if (!B(n))
394
+ return d;
395
+ const r = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
396
+ return r.push(n), () => {
397
+ const s = r.indexOf(n);
398
+ s !== -1 && r.splice(s, 1);
399
399
  };
400
400
  }
401
401
  /**
@@ -403,110 +403,138 @@ class it {
403
403
  * @returns {void}
404
404
  */
405
405
  $set(e) {
406
- this.$$set && !H(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
406
+ this.$$set && !U(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
407
407
  }
408
408
  }
409
- const rt = "4";
410
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(rt);
411
- function ot(t, e) {
409
+ const ot = "4";
410
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ot);
411
+ const $ = "__WIDGET_GLOBAL_STYLE_CACHE__";
412
+ function ct(t, e) {
412
413
  if (t) {
413
414
  const n = document.createElement("style");
414
415
  n.innerHTML = e, t.appendChild(n);
415
416
  }
416
417
  }
417
- function ct(t, e) {
418
+ function ut(t, e) {
418
419
  if (!t || !e)
419
420
  return;
420
421
  const n = new URL(e);
421
- fetch(n.href).then((i) => i.text()).then((i) => {
422
+ fetch(n.href).then((r) => r.text()).then((r) => {
422
423
  const s = document.createElement("style");
423
- s.innerHTML = i, t && t.appendChild(s);
424
- }).catch((i) => {
425
- console.error("There was an error while trying to load client styling from URL", i);
424
+ s.innerHTML = r, t && t.appendChild(s);
425
+ }).catch((r) => {
426
+ console.error("There was an error while trying to load client styling from URL", r);
427
+ });
428
+ }
429
+ function lt(t, e, n, r = !1) {
430
+ if (!window.emMessageBus)
431
+ return;
432
+ if (!("adoptedStyleSheets" in Document.prototype) || !r)
433
+ return n = ft(t, e), n;
434
+ window[$] || (window[$] = {}), n = at(t, e);
435
+ const i = n.unsubscribe.bind(n), c = () => {
436
+ if (window[$][e]) {
437
+ const u = window[$][e];
438
+ u.refCount > 1 ? u.refCount = u.refCount - 1 : delete window[$][e];
439
+ }
440
+ i();
441
+ };
442
+ return n.unsubscribe = c, n;
443
+ }
444
+ function ft(t, e) {
445
+ const n = document.createElement("style");
446
+ return window.emMessageBus.subscribe(e, (r) => {
447
+ t && (n.innerHTML = r, t.appendChild(n));
426
448
  });
427
449
  }
428
- function ut(t, e, n) {
429
- if (window.emMessageBus) {
430
- const i = document.createElement("style");
431
- window.emMessageBus.subscribe(e, (s) => {
432
- i.innerHTML = s, t && t.appendChild(i);
450
+ function at(t, e) {
451
+ return window.emMessageBus.subscribe(e, (n) => {
452
+ if (!t)
453
+ return;
454
+ const r = t.getRootNode(), s = window[$];
455
+ let i = s[e]?.sheet;
456
+ i ? s[e].refCount = s[e].refCount + 1 : (i = new CSSStyleSheet(), i.replaceSync(n), s[e] = {
457
+ sheet: i,
458
+ refCount: 1
433
459
  });
434
- }
460
+ const c = r.adoptedStyleSheets || [];
461
+ c.includes(i) || (r.adoptedStyleSheets = [...c, i]);
462
+ });
435
463
  }
436
- function lt(t) {
437
- I(t, "svelte-sjjtuo", ".CashierSpinner{display:block;width:var(--emw--spinner-size, 32px);height:var(--emw--spinner-size, 32px);position:absolute;top:var(--emw--spinner-top-position, 50%);left:var(--emw--spinner-left-position, 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-width:var(--emw--stroke-width, 2px);stroke:var(--emw--spinner-color, #2dcc70)}@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}}");
464
+ function ht(t) {
465
+ D(t, "svelte-sjjtuo", ".CashierSpinner{display:block;width:var(--emw--spinner-size, 32px);height:var(--emw--spinner-size, 32px);position:absolute;top:var(--emw--spinner-top-position, 50%);left:var(--emw--spinner-left-position, 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-width:var(--emw--stroke-width, 2px);stroke:var(--emw--spinner-color, #2dcc70)}@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}}");
438
466
  }
439
- function ft(t) {
467
+ function $t(t) {
440
468
  let e;
441
469
  return {
442
470
  c() {
443
- e = C("div"), e.innerHTML = '<svg class="spinner" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"></circle></svg>', P(e, "class", "CashierSpinner");
471
+ e = E("div"), e.innerHTML = '<svg class="spinner" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"></circle></svg>', R(e, "class", "CashierSpinner");
444
472
  },
445
- m(n, i) {
446
- B(n, e, i), t[4](e);
473
+ m(n, r) {
474
+ T(n, e, r), t[4](e);
447
475
  },
448
- p: h,
449
- i: h,
450
- o: h,
476
+ p: d,
477
+ i: d,
478
+ o: d,
451
479
  d(n) {
452
- n && E(e), t[4](null);
480
+ n && C(e), t[4](null);
453
481
  }
454
482
  };
455
483
  }
456
- function $t(t, e, n) {
457
- let { clientstyling: i = "" } = e, { clientstylingurl: s = "" } = e, { mbsource: r = "" } = e, c;
458
- q(() => () => {
484
+ function dt(t, e, n) {
485
+ let { clientstyling: r = "" } = e, { clientstylingurl: s = "" } = e, { mbsource: i = "" } = e, c, u;
486
+ K(() => () => {
459
487
  });
460
- function u(o) {
461
- w[o ? "unshift" : "push"](() => {
488
+ function l(o) {
489
+ S[o ? "unshift" : "push"](() => {
462
490
  c = o, n(0, c);
463
491
  });
464
492
  }
465
493
  return t.$$set = (o) => {
466
- "clientstyling" in o && n(1, i = o.clientstyling), "clientstylingurl" in o && n(2, s = o.clientstylingurl), "mbsource" in o && n(3, r = o.mbsource);
494
+ "clientstyling" in o && n(1, r = o.clientstyling), "clientstylingurl" in o && n(2, s = o.clientstylingurl), "mbsource" in o && n(3, i = o.mbsource);
467
495
  }, t.$$.update = () => {
468
496
  t.$$.dirty & /*clientstyling, customStylingContainer*/
469
- 3 && i && c && ot(c, i), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
470
- 5 && s && c && ct(c, s), t.$$.dirty & /*mbsource, customStylingContainer*/
471
- 9 && r && c && ut(c, `${r}.Style`);
472
- }, [c, i, s, r, u];
497
+ 3 && r && c && ct(c, r), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
498
+ 5 && s && c && ut(c, s), t.$$.dirty & /*mbsource, customStylingContainer*/
499
+ 9 && i && c && lt(c, `${i}.Style`, u);
500
+ }, [c, r, s, i, l];
473
501
  }
474
- class at extends it {
502
+ class _t extends it {
475
503
  constructor(e) {
476
- super(), nt(
504
+ super(), st(
477
505
  this,
478
506
  e,
507
+ dt,
479
508
  $t,
480
- ft,
481
- T,
509
+ H,
482
510
  {
483
511
  clientstyling: 1,
484
512
  clientstylingurl: 2,
485
513
  mbsource: 3
486
514
  },
487
- lt
515
+ ht
488
516
  );
489
517
  }
490
518
  get clientstyling() {
491
519
  return this.$$.ctx[1];
492
520
  }
493
521
  set clientstyling(e) {
494
- this.$$set({ clientstyling: e }), m();
522
+ this.$$set({ clientstyling: e }), y();
495
523
  }
496
524
  get clientstylingurl() {
497
525
  return this.$$.ctx[2];
498
526
  }
499
527
  set clientstylingurl(e) {
500
- this.$$set({ clientstylingurl: e }), m();
528
+ this.$$set({ clientstylingurl: e }), y();
501
529
  }
502
530
  get mbsource() {
503
531
  return this.$$.ctx[3];
504
532
  }
505
533
  set mbsource(e) {
506
- this.$$set({ mbsource: e }), m();
534
+ this.$$set({ mbsource: e }), y();
507
535
  }
508
536
  }
509
- st(at, { clientstyling: {}, clientstylingurl: {}, mbsource: {} }, [], [], !0);
537
+ rt(_t, { clientstyling: {}, clientstylingurl: {}, mbsource: {} }, [], [], !0);
510
538
  export {
511
- at as C
539
+ _t as C
512
540
  };