@everymatrix/loyalty-shop 0.1.14 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{LoyaltyPagination-B-q5gKJj.js → LoyaltyPagination-Bdx-smp6.js} +2756 -2359
- package/components/LoyaltyPagination-ClX3N4HA.cjs +16 -0
- package/components/LoyaltyPagination-DdJI2Ptf.cjs +16 -0
- package/components/LoyaltyPagination-kvqB9vki.js +7157 -0
- package/components/{LoyaltyPointsCard-yCHI1R_t.js → LoyaltyPointsCard-CpUgbUoh.js} +4 -5
- package/components/{LoyaltyPointsCard-Dh-TnTTL.cjs → LoyaltyPointsCard-DAwt9_VW.cjs} +3 -3
- package/components/{LoyaltyPointsCard-DRKV1-dq.js → LoyaltyPointsCard-Dte4kVve.js} +4 -5
- package/components/{LoyaltyPointsCard-BhdXzF1P.cjs → LoyaltyPointsCard-a-ERcIbF.cjs} +3 -3
- package/components/{LoyaltyShop-DoIx97J9.js → LoyaltyShop-B5kW3Kng.js} +223 -256
- package/components/{LoyaltyShop-CtNpYAKa.js → LoyaltyShop-D4hhy3SS.js} +227 -260
- package/components/LoyaltyShop-Dvy8bKVO.cjs +27 -0
- package/components/LoyaltyShop-ICV4lgAz.cjs +27 -0
- package/components/{LoyaltyShopItem-C2xuJLoW.js → LoyaltyShopItem-B-9ignkf.js} +26 -29
- package/components/{LoyaltyShopItem-BRiUNphq.cjs → LoyaltyShopItem-DCnDun5S.cjs} +3 -3
- package/components/{LoyaltyShopItem-D_oViqJP.cjs → LoyaltyShopItem-DY4h5OAR.cjs} +3 -3
- package/components/{LoyaltyShopItem-bXQ_G5NK.js → LoyaltyShopItem-Dwm024JF.js} +27 -30
- package/es2015/loyalty-shop.cjs +1 -1
- package/es2015/loyalty-shop.js +2 -2
- package/esnext/loyalty-shop.cjs +1 -1
- package/esnext/loyalty-shop.js +2 -2
- package/package.json +1 -1
- package/components/LoyaltyPagination-Boz7CVJt.cjs +0 -16
- package/components/LoyaltyPagination-CEvN3M3n.cjs +0 -16
- package/components/LoyaltyPagination-Z_igiBkY.js +0 -6754
- package/components/LoyaltyShop-BsZThRDe.cjs +0 -27
- package/components/LoyaltyShop-Cx8CxsMn.cjs +0 -27
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { y as
|
|
2
|
-
import { L as
|
|
1
|
+
import { y as He, c as pe, p as me, a as Ke, b as h, s as Fe, d as ae, z as f, A as oe, O as le, C as O, m as t, E as i, B as Je, G as ie, S as We, i as X, h as x, j as ge, P as R, Q as Ye, u as re, H as Ze, I as Ge, J as Qe, K as Xe, v as q, k as y, l as $e, n as E, r as b, R as de, T as et, t as ue, q as V, g as tt, o as z, w as nt, $ as st, U as at, N as ce, L as $, V as ot, W as lt, M as it, X as rt } from "./LoyaltyPagination-Bdx-smp6.js";
|
|
2
|
+
import { L as dt } from "./LoyaltyShopItem-B-9ignkf.js";
|
|
3
3
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
4
4
|
}, globalThis.customElements = { define() {
|
|
5
5
|
}, get() {
|
|
6
6
|
}, whenDefined() {
|
|
7
7
|
} });
|
|
8
8
|
if (typeof window < "u") {
|
|
9
|
-
let
|
|
10
|
-
return function(...
|
|
9
|
+
let _ = function(n) {
|
|
10
|
+
return function(...o) {
|
|
11
11
|
try {
|
|
12
|
-
return n.apply(this,
|
|
13
|
-
} catch (
|
|
14
|
-
if (
|
|
12
|
+
return n.apply(this, o);
|
|
13
|
+
} catch (l) {
|
|
14
|
+
if (l instanceof DOMException && l.message.includes("has already been used with this registry") || l instanceof Error && l.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
15
15
|
return !1;
|
|
16
|
-
throw
|
|
16
|
+
throw l;
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
customElements.define =
|
|
21
|
-
const
|
|
22
|
-
customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination",
|
|
20
|
+
customElements.define = _(customElements.define), import("./LoyaltyPagination-Bdx-smp6.js").then((n) => n.Y).then((n) => {
|
|
21
|
+
const o = n.default || n;
|
|
22
|
+
customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", o.element || o);
|
|
23
23
|
}).catch((n) => {
|
|
24
24
|
console.error("BOOT ERROR:", n);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
if (typeof window < "u") {
|
|
28
|
-
let
|
|
29
|
-
return function(...
|
|
28
|
+
let _ = function(n) {
|
|
29
|
+
return function(...o) {
|
|
30
30
|
try {
|
|
31
|
-
return n.apply(this,
|
|
32
|
-
} catch (
|
|
33
|
-
if (
|
|
31
|
+
return n.apply(this, o);
|
|
32
|
+
} catch (l) {
|
|
33
|
+
if (l instanceof DOMException && l.message.includes("has already been used with this registry") || l instanceof Error && l.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
34
34
|
return !1;
|
|
35
|
-
throw
|
|
35
|
+
throw l;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
customElements.define =
|
|
40
|
-
const
|
|
41
|
-
customElements.get("loyalty-shop-item") || customElements.define("loyalty-shop-item",
|
|
39
|
+
customElements.define = _(customElements.define), import("./LoyaltyShopItem-B-9ignkf.js").then((n) => n.a).then((n) => {
|
|
40
|
+
const o = n.default || n;
|
|
41
|
+
customElements.get("loyalty-shop-item") || customElements.define("loyalty-shop-item", o.element || o);
|
|
42
42
|
}).catch((n) => {
|
|
43
43
|
console.error("BOOT ERROR:", n);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const ut = {
|
|
47
47
|
en: {
|
|
48
48
|
loading: "Loading…",
|
|
49
49
|
noContent: "There are no bonus items available for redemption.",
|
|
@@ -100,9 +100,9 @@ const yt = {
|
|
|
100
100
|
buyNow: "Vásárlás",
|
|
101
101
|
generalError: "Hiba történt. Kérjük, próbáld újra."
|
|
102
102
|
}
|
|
103
|
-
},
|
|
104
|
-
var
|
|
105
|
-
const
|
|
103
|
+
}, ct = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='800px'%20height='800px'%20viewBox='0%200%20120%20120'%20fill='none'%3e%3crect%20width='120'%20height='120'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M33.2503%2038.4816C33.2603%2037.0472%2034.4199%2035.8864%2035.8543%2035.875H83.1463C84.5848%2035.875%2085.7503%2037.0431%2085.7503%2038.4816V80.5184C85.7403%2081.9528%2084.5807%2083.1136%2083.1463%2083.125H35.8543C34.4158%2083.1236%2033.2503%2081.957%2033.2503%2080.5184V38.4816ZM80.5006%2041.1251H38.5006V77.8751L62.8921%2053.4783C63.9172%2052.4536%2065.5788%2052.4536%2066.6039%2053.4783L80.5006%2067.4013V41.1251ZM43.75%2051.6249C43.75%2054.5244%2046.1005%2056.8749%2049%2056.8749C51.8995%2056.8749%2054.25%2054.5244%2054.25%2051.6249C54.25%2048.7254%2051.8995%2046.3749%2049%2046.3749C46.1005%2046.3749%2043.75%2048.7254%2043.75%2051.6249Z'%20fill='%23687787'/%3e%3c/svg%3e";
|
|
104
|
+
var pt = q('<div class="loyalty-shop__item loyalty-shop__item--skeleton svelte-1f1q033"><div class="loyalty-shop__item-image skeleton-box svelte-1f1q033"></div> <div class="loyalty-shop__item-title skeleton-line svelte-1f1q033"></div> <div class="loyalty-shop__item-points skeleton-line skeleton-line--short svelte-1f1q033"></div> <div class="loyalty-shop__item-button-skeleton skeleton-box svelte-1f1q033"></div></div>'), mt = q('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton svelte-1f1q033"></div>'), gt = q('<div class="loyalty-shop__unavailable svelte-1f1q033"> </div>'), ft = q('<div><div role="button" tabindex="0" class="loyalty-shop__item-image-container svelte-1f1q033"><img class="loyalty-shop__item-image svelte-1f1q033"/></div> <span class="loyalty-shop__item-title svelte-1f1q033"> </span> <span class="loyalty-shop__item-points svelte-1f1q033"> </span> <button class="loyalty-shop__item-button svelte-1f1q033" type="button"> </button></div>'), ht = q('<div class="load-more-sentinel svelte-1f1q033" aria-hidden="true"></div>'), yt = q('<div class="loyalty-shop__grid svelte-1f1q033"></div> <!> <!>', 1), vt = q('<div class="loyalty-shop svelte-1f1q033"><!></div>');
|
|
105
|
+
const bt = {
|
|
106
106
|
hash: "svelte-1f1q033",
|
|
107
107
|
code: `.loyalty-shop.svelte-1f1q033 {padding:16px;border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));background-color:var(--app-container-bg-default, #022652);width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;}.loyalty-shop__unavailable.svelte-1f1q033 {color:var(--text-subtle, #dfe3e8);font-size:14px;padding:24px 0;text-align:center;}.loyalty-shop__grid.svelte-1f1q033 {display:grid;gap:16px;grid-template-columns:repeat(2, 1fr);margin:0;}.loyalty-shop__item.svelte-1f1q033 {display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:10px;border:1px solid var(--border-default, rgba(251, 251, 251, 0.15));background-color:var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1));}.loyalty-shop__item--unavailable.svelte-1f1q033 {opacity:1;}.loyalty-shop__item-image.svelte-1f1q033 {width:100%;height:82px;border-radius:6px;}.loyalty-shop__item-title.svelte-1f1q033 {color:var(--text-default, #ffffff);font-size:12px;font-weight:400;}.loyalty-shop__item-points.svelte-1f1q033 {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-shop__item-button.svelte-1f1q033 {margin-top:auto;width:100%;height:37px;padding:8px 16px;border:none;border-radius:6px;background:var(--button-primary-bg-default, #ffcc00);color:var(--button-primary-text-default, #261d00);font-size:12px;font-weight:400;cursor:pointer;}.loyalty-shop__item-button.svelte-1f1q033:disabled {opacity:0.4;cursor:default;}.skeleton-box.svelte-1f1q033 {background:linear-gradient(
|
|
108
108
|
90deg,
|
|
@@ -131,279 +131,247 @@ const It = {
|
|
|
131
131
|
@media (min-width: 768px) {.loyalty-shop__grid.svelte-1f1q033 {grid-template-columns:repeat(4, 1fr);justify-content:start;margin:0;}.loyalty-shop__item.svelte-1f1q033 {width:100%;height:100%;box-sizing:border-box;}.loyalty-shop__item-image.svelte-1f1q033 {height:200px;}.loyalty-shop__item--skeleton.svelte-1f1q033 .loyalty-shop__item-image:where(.svelte-1f1q033) {height:200px;}
|
|
132
132
|
}`
|
|
133
133
|
};
|
|
134
|
-
function
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
const
|
|
134
|
+
function fe(_, n) {
|
|
135
|
+
me(n, !0), Ke(_, bt);
|
|
136
|
+
const o = () => nt(st, "$_", l), [l, L] = $e(), c = h(n, "apiEndpoint", 7, ""), p = h(n, "userSession", 7, ""), v = h(n, "locale", 7, ""), r = h(n, "limitItem", 7, R), P = h(n, "translationUrl");
|
|
137
|
+
Fe({ withLocale: v(), translations: {} });
|
|
138
|
+
const ye = async () => {
|
|
139
139
|
try {
|
|
140
|
-
const e = new URL(
|
|
141
|
-
if (!
|
|
140
|
+
const e = new URL(P(), window.location.href), s = await fetch(e.href);
|
|
141
|
+
if (!s.ok)
|
|
142
142
|
throw new Error("Failed to fetch translations");
|
|
143
|
-
const
|
|
144
|
-
Object.entries(
|
|
145
|
-
|
|
143
|
+
const a = await s.json();
|
|
144
|
+
Object.entries(a).forEach(([d, I]) => {
|
|
145
|
+
ae(d, I);
|
|
146
146
|
});
|
|
147
147
|
} catch (e) {
|
|
148
148
|
console.error("loyalty shop translation url err:", e);
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
-
Object.entries(
|
|
152
|
-
|
|
151
|
+
Object.entries(ut).forEach(([e, s]) => {
|
|
152
|
+
ae(e, s);
|
|
153
153
|
});
|
|
154
|
-
let
|
|
155
|
-
const
|
|
156
|
-
if (!
|
|
154
|
+
let g = f(oe([])), N = f(void 0), U = f(0), k = f(0), S = f(oe(le)), H = f(!1), K = f(!1), T = f(void 0), w = f(!1), B = f(void 0), A = 0;
|
|
155
|
+
const ve = re(() => typeof r() == "number" ? r() : parseInt(r(), R) || R), ee = () => {
|
|
156
|
+
if (!c() || !p())
|
|
157
157
|
return;
|
|
158
|
-
|
|
159
|
-
const e = ++
|
|
160
|
-
|
|
158
|
+
i(H, !0), i(K, !1);
|
|
159
|
+
const e = ++A, s = t(w) && t(k) > 0;
|
|
160
|
+
Ye(
|
|
161
161
|
{
|
|
162
|
-
apiEndpoint:
|
|
163
|
-
userSession:
|
|
164
|
-
locale:
|
|
162
|
+
apiEndpoint: c(),
|
|
163
|
+
userSession: p(),
|
|
164
|
+
locale: v()
|
|
165
165
|
},
|
|
166
|
-
t(
|
|
167
|
-
t(
|
|
168
|
-
).then((
|
|
169
|
-
if (e !==
|
|
166
|
+
t(k),
|
|
167
|
+
t(S)
|
|
168
|
+
).then((a) => {
|
|
169
|
+
if (e !== A)
|
|
170
170
|
return;
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
}).catch((
|
|
174
|
-
e ===
|
|
171
|
+
const d = a.data ?? [];
|
|
172
|
+
i(U, a.total ?? 0, !0), s ? i(g, [...t(g), ...d], !0) : i(g, d, !0);
|
|
173
|
+
}).catch((a) => {
|
|
174
|
+
e === A && (i(K, !0), console.error("Failed to load shop rewards:", a));
|
|
175
175
|
}).finally(() => {
|
|
176
|
-
e ===
|
|
176
|
+
e === A && i(H, !1);
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}),
|
|
182
|
-
const e = window.matchMedia("(max-width: 767px)"),
|
|
183
|
-
|
|
179
|
+
O(() => {
|
|
180
|
+
c(), p(), v(), t(k), t(S), ee();
|
|
181
|
+
}), O(() => {
|
|
182
|
+
const e = window.matchMedia("(max-width: 767px)"), s = (a) => {
|
|
183
|
+
i(w, a.matches, !0);
|
|
184
184
|
};
|
|
185
|
-
return
|
|
186
|
-
}),
|
|
187
|
-
|
|
188
|
-
}),
|
|
189
|
-
if (!t(
|
|
185
|
+
return i(w, e.matches, !0), e.addEventListener("change", s), () => e.removeEventListener("change", s);
|
|
186
|
+
}), O(() => {
|
|
187
|
+
i(S, t(w) ? le : t(ve), !0);
|
|
188
|
+
}), O(() => {
|
|
189
|
+
if (!t(w) || !t(B)) return;
|
|
190
190
|
const e = new IntersectionObserver(
|
|
191
|
-
(
|
|
192
|
-
|
|
191
|
+
(s) => {
|
|
192
|
+
s.some((a) => a.isIntersecting) && t(g).length < t(U) && i(k, t(k) + t(S));
|
|
193
193
|
},
|
|
194
194
|
{ rootMargin: "200px" }
|
|
195
195
|
);
|
|
196
|
-
return e.observe(t(
|
|
197
|
-
}),
|
|
198
|
-
|
|
196
|
+
return e.observe(t(B)), () => e.disconnect();
|
|
197
|
+
}), Je(() => {
|
|
198
|
+
P() && ye();
|
|
199
199
|
});
|
|
200
|
-
const
|
|
201
|
-
t(
|
|
202
|
-
},
|
|
203
|
-
if (!(!
|
|
204
|
-
|
|
200
|
+
const be = (e) => e.presentation?.assets?.[0] ?? ct, F = (e) => e.displayName ?? e.presentation?.displayName ?? "", J = (e) => e.available === "true", _e = (e) => {
|
|
201
|
+
t(T) || !J(e) || it(F(e), e.id);
|
|
202
|
+
}, ke = async (e) => {
|
|
203
|
+
if (!(!c() || t(T))) {
|
|
204
|
+
i(T, e, !0);
|
|
205
205
|
try {
|
|
206
|
-
await
|
|
207
|
-
} catch (
|
|
208
|
-
|
|
206
|
+
await Ze({ apiEndpoint: c(), userSession: p() }, e), Ge(e), Qe(), ee();
|
|
207
|
+
} catch (s) {
|
|
208
|
+
Xe(e, s);
|
|
209
209
|
} finally {
|
|
210
|
-
|
|
210
|
+
i(T, void 0);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
|
-
|
|
215
|
-
const e = (
|
|
216
|
-
const { type:
|
|
217
|
-
switch (
|
|
218
|
-
case
|
|
219
|
-
|
|
214
|
+
O(() => {
|
|
215
|
+
const e = (s) => {
|
|
216
|
+
const { type: a, id: d, source: I } = s.data ?? {};
|
|
217
|
+
switch (a) {
|
|
218
|
+
case ie.REDEEM_REWARD_CONFIRMED:
|
|
219
|
+
d && t(g).some((D) => D.id === d) && ke(d);
|
|
220
220
|
break;
|
|
221
|
-
case
|
|
222
|
-
|
|
221
|
+
case ie.BACK_BUTTON_CLICKED:
|
|
222
|
+
I === We && i(N, void 0);
|
|
223
223
|
break;
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
227
227
|
});
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
},
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
},
|
|
235
|
-
(
|
|
228
|
+
const we = () => t(g).length ? o()("generalError") : o()("noContent"), xe = (e) => {
|
|
229
|
+
i(k, e, !0);
|
|
230
|
+
}, Ee = (e) => {
|
|
231
|
+
rt(e.displayName || e.presentation.displayName, e.id);
|
|
232
|
+
}, te = (e) => {
|
|
233
|
+
i(N, e, !0), Ee(e);
|
|
234
|
+
}, qe = (e) => (s) => {
|
|
235
|
+
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), te(e));
|
|
236
236
|
};
|
|
237
|
-
var
|
|
237
|
+
var Se = {
|
|
238
238
|
get apiEndpoint() {
|
|
239
|
-
return
|
|
239
|
+
return c();
|
|
240
240
|
},
|
|
241
241
|
set apiEndpoint(e = "") {
|
|
242
|
-
|
|
242
|
+
c(e), y();
|
|
243
243
|
},
|
|
244
244
|
get userSession() {
|
|
245
|
-
return
|
|
245
|
+
return p();
|
|
246
246
|
},
|
|
247
247
|
set userSession(e = "") {
|
|
248
|
-
|
|
248
|
+
p(e), y();
|
|
249
249
|
},
|
|
250
250
|
get locale() {
|
|
251
|
-
return
|
|
251
|
+
return v();
|
|
252
252
|
},
|
|
253
253
|
set locale(e = "") {
|
|
254
|
-
|
|
254
|
+
v(e), y();
|
|
255
255
|
},
|
|
256
256
|
get limitItem() {
|
|
257
257
|
return r();
|
|
258
258
|
},
|
|
259
|
-
set limitItem(e =
|
|
260
|
-
r(e),
|
|
259
|
+
set limitItem(e = R) {
|
|
260
|
+
r(e), y();
|
|
261
261
|
},
|
|
262
262
|
get translationUrl() {
|
|
263
|
-
return
|
|
263
|
+
return P();
|
|
264
264
|
},
|
|
265
265
|
set translationUrl(e) {
|
|
266
|
-
|
|
266
|
+
P(e), y();
|
|
267
267
|
}
|
|
268
|
-
},
|
|
268
|
+
}, W = vt(), Ie = E(W);
|
|
269
269
|
{
|
|
270
|
-
var
|
|
271
|
-
|
|
270
|
+
var Ce = (e) => {
|
|
271
|
+
dt(e, {
|
|
272
272
|
get itemId() {
|
|
273
|
-
return t(
|
|
273
|
+
return t(N).id;
|
|
274
274
|
},
|
|
275
275
|
get elevateReward() {
|
|
276
|
-
return t(
|
|
276
|
+
return t(N);
|
|
277
277
|
},
|
|
278
278
|
get apiEndpoint() {
|
|
279
|
-
return
|
|
279
|
+
return c();
|
|
280
280
|
},
|
|
281
281
|
get userSession() {
|
|
282
|
-
return
|
|
282
|
+
return p();
|
|
283
283
|
},
|
|
284
284
|
get locale() {
|
|
285
|
-
return
|
|
285
|
+
return v();
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
|
-
},
|
|
289
|
-
var
|
|
288
|
+
}, Re = (e) => {
|
|
289
|
+
var s = mt();
|
|
290
|
+
de(s, 21, () => Array(t(S)), et, (a, d, I, D) => {
|
|
291
|
+
var Y = pt();
|
|
292
|
+
x(a, Y);
|
|
293
|
+
}), b(s), x(e, s);
|
|
294
|
+
}, Le = (e) => {
|
|
295
|
+
var s = gt(), a = E(s, !0);
|
|
296
|
+
b(s), ue((d) => V(a, d), [() => we()]), x(e, s);
|
|
297
|
+
}, Ne = (e) => {
|
|
298
|
+
var s = yt(), a = tt(s);
|
|
299
|
+
de(a, 21, () => t(g), (m) => m.id, (m, u) => {
|
|
300
|
+
var C = ft();
|
|
301
|
+
let ne;
|
|
302
|
+
var M = E(C), Me = re(() => qe(t(u))), se = E(M);
|
|
303
|
+
b(M);
|
|
304
|
+
var Z = z(M, 2), Oe = E(Z, !0);
|
|
305
|
+
b(Z);
|
|
306
|
+
var G = z(Z, 2), ze = E(G);
|
|
307
|
+
b(G);
|
|
308
|
+
var j = z(G, 2), Pe = E(j, !0);
|
|
309
|
+
b(j), b(C), ue(
|
|
310
|
+
(Q, Ue, Be, Ae, De, je, Ve) => {
|
|
311
|
+
ne = at(C, 1, "loyalty-shop__item svelte-1f1q033", null, ne, Q), ce(se, "src", Ue), ce(se, "alt", Be), V(Oe, Ae), V(ze, `${t(u).points ?? ""}
|
|
312
|
+
${De ?? ""}`), j.disabled = je, V(Pe, Ve);
|
|
313
|
+
},
|
|
314
|
+
[
|
|
315
|
+
() => ({
|
|
316
|
+
"loyalty-shop__item--unavailable": !J(t(u))
|
|
317
|
+
}),
|
|
318
|
+
() => be(t(u)),
|
|
319
|
+
() => F(t(u)),
|
|
320
|
+
() => F(t(u)),
|
|
321
|
+
() => o()("tokens"),
|
|
322
|
+
() => !J(t(u)) || t(T) === t(u).id,
|
|
323
|
+
() => o()("buyNow")
|
|
324
|
+
]
|
|
325
|
+
), $("click", M, () => te(t(u))), $("keydown", M, function(...Q) {
|
|
326
|
+
t(Me)?.apply(this, Q);
|
|
327
|
+
}), $("click", j, () => _e(t(u))), x(m, C);
|
|
328
|
+
}), b(a);
|
|
329
|
+
var d = z(a, 2);
|
|
290
330
|
{
|
|
291
|
-
var
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
let de;
|
|
308
|
-
var B = I(N);
|
|
309
|
-
B.__click = () => le(t(d));
|
|
310
|
-
var Ve = ge(() => Me(t(d)));
|
|
311
|
-
B.__keydown = function(...ae) {
|
|
312
|
-
t(Ve)?.apply(this, ae);
|
|
313
|
-
};
|
|
314
|
-
var ue = I(B);
|
|
315
|
-
b(B);
|
|
316
|
-
var te = j(B, 2), He = I(te, !0);
|
|
317
|
-
b(te);
|
|
318
|
-
var ne = j(te, 2), Ke = I(ne);
|
|
319
|
-
b(ne);
|
|
320
|
-
var W = j(ne, 2);
|
|
321
|
-
W.__click = () => Ce(t(d));
|
|
322
|
-
var Fe = I(W, !0);
|
|
323
|
-
b(W), b(N), ye(
|
|
324
|
-
(ae, Je, We, Ze, Ge, Ye, Qe) => {
|
|
325
|
-
de = ut(N, 1, "loyalty-shop__item svelte-1f1q033", null, de, ae), _e(ue, "src", Je), _e(ue, "alt", We), Z(He, Ze), Z(Ke, `${t(d).points ?? ""}
|
|
326
|
-
${Ge ?? ""}`), W.disabled = Ye, Z(Fe, Qe);
|
|
327
|
-
},
|
|
328
|
-
[
|
|
329
|
-
() => ({
|
|
330
|
-
"loyalty-shop__item--unavailable": !X(t(d))
|
|
331
|
-
}),
|
|
332
|
-
() => Ie(t(d)),
|
|
333
|
-
() => Q(t(d)),
|
|
334
|
-
() => Q(t(d)),
|
|
335
|
-
() => s()("tokens"),
|
|
336
|
-
() => !X(t(d)) || t(z) === t(d).id,
|
|
337
|
-
() => s()("buyNow")
|
|
338
|
-
]
|
|
339
|
-
), _(p, N);
|
|
340
|
-
}), b(U);
|
|
341
|
-
var J = j(U, 2);
|
|
342
|
-
{
|
|
343
|
-
var Ae = (p) => {
|
|
344
|
-
gt(p, {
|
|
345
|
-
get offset() {
|
|
346
|
-
return t(E);
|
|
347
|
-
},
|
|
348
|
-
get limit() {
|
|
349
|
-
return t(R);
|
|
350
|
-
},
|
|
351
|
-
get total() {
|
|
352
|
-
return t(H);
|
|
353
|
-
},
|
|
354
|
-
onPageChange: Ne,
|
|
355
|
-
get locale() {
|
|
356
|
-
return y();
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
};
|
|
360
|
-
D(J, (p) => {
|
|
361
|
-
t(q) || p(Ae);
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
var De = j(J, 2);
|
|
365
|
-
{
|
|
366
|
-
var je = (p) => {
|
|
367
|
-
var d = Et();
|
|
368
|
-
ht(d, (N) => l(K, N), () => t(K)), _(p, d);
|
|
369
|
-
};
|
|
370
|
-
D(De, (p) => {
|
|
371
|
-
t(q) && t(m).length < t(H) && p(je);
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
_(S, x);
|
|
375
|
-
};
|
|
376
|
-
D(
|
|
377
|
-
ee,
|
|
378
|
-
(S) => {
|
|
379
|
-
!t(m).length || t(Y) ? S(re) : S(ie, !1);
|
|
380
|
-
},
|
|
381
|
-
!0
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
_(w, L);
|
|
331
|
+
var I = (m) => {
|
|
332
|
+
ot(m, {
|
|
333
|
+
get offset() {
|
|
334
|
+
return t(k);
|
|
335
|
+
},
|
|
336
|
+
get limit() {
|
|
337
|
+
return t(S);
|
|
338
|
+
},
|
|
339
|
+
get total() {
|
|
340
|
+
return t(U);
|
|
341
|
+
},
|
|
342
|
+
onPageChange: xe,
|
|
343
|
+
get locale() {
|
|
344
|
+
return v();
|
|
345
|
+
}
|
|
346
|
+
});
|
|
385
347
|
};
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
)
|
|
348
|
+
X(d, (m) => {
|
|
349
|
+
t(w) || m(I);
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
var D = z(d, 2);
|
|
353
|
+
{
|
|
354
|
+
var Y = (m) => {
|
|
355
|
+
var u = ht();
|
|
356
|
+
lt(u, (C) => i(B, C), () => t(B)), x(m, u);
|
|
357
|
+
};
|
|
358
|
+
X(D, (m) => {
|
|
359
|
+
t(w) && t(g).length < t(U) && m(Y);
|
|
360
|
+
});
|
|
393
361
|
}
|
|
394
|
-
|
|
362
|
+
x(e, s);
|
|
395
363
|
};
|
|
396
|
-
|
|
397
|
-
t(
|
|
364
|
+
X(Ie, (e) => {
|
|
365
|
+
t(N) ? e(Ce) : t(H) && t(g).length === 0 ? e(Re, 1) : !t(g).length || t(K) ? e(Le, 2) : e(Ne, -1);
|
|
398
366
|
});
|
|
399
367
|
}
|
|
400
|
-
b(
|
|
401
|
-
var
|
|
402
|
-
return
|
|
368
|
+
b(W), x(_, W);
|
|
369
|
+
var Te = ge(Se);
|
|
370
|
+
return L(), Te;
|
|
403
371
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
372
|
+
He(["click", "keydown"]);
|
|
373
|
+
pe(
|
|
374
|
+
fe,
|
|
407
375
|
{
|
|
408
376
|
apiEndpoint: {},
|
|
409
377
|
userSession: {},
|
|
@@ -413,63 +381,63 @@ be(
|
|
|
413
381
|
},
|
|
414
382
|
[],
|
|
415
383
|
[],
|
|
416
|
-
|
|
384
|
+
{ mode: "open" }
|
|
417
385
|
);
|
|
418
|
-
function
|
|
419
|
-
|
|
420
|
-
let
|
|
421
|
-
var
|
|
386
|
+
function he(_, n) {
|
|
387
|
+
me(n, !0);
|
|
388
|
+
let o = h(n, "apiEndpoint", 7, ""), l = h(n, "userSession", 7, ""), L = h(n, "locale", 7, ""), c = h(n, "limitItem", 7, R), p = h(n, "translationUrl");
|
|
389
|
+
var v = {
|
|
422
390
|
get apiEndpoint() {
|
|
423
|
-
return
|
|
391
|
+
return o();
|
|
424
392
|
},
|
|
425
393
|
set apiEndpoint(r = "") {
|
|
426
|
-
|
|
394
|
+
o(r), y();
|
|
427
395
|
},
|
|
428
396
|
get userSession() {
|
|
429
|
-
return
|
|
397
|
+
return l();
|
|
430
398
|
},
|
|
431
399
|
set userSession(r = "") {
|
|
432
|
-
|
|
400
|
+
l(r), y();
|
|
433
401
|
},
|
|
434
402
|
get locale() {
|
|
435
|
-
return
|
|
403
|
+
return L();
|
|
436
404
|
},
|
|
437
405
|
set locale(r = "") {
|
|
438
|
-
|
|
406
|
+
L(r), y();
|
|
439
407
|
},
|
|
440
408
|
get limitItem() {
|
|
441
|
-
return
|
|
409
|
+
return c();
|
|
442
410
|
},
|
|
443
|
-
set limitItem(r =
|
|
444
|
-
|
|
411
|
+
set limitItem(r = R) {
|
|
412
|
+
c(r), y();
|
|
445
413
|
},
|
|
446
414
|
get translationUrl() {
|
|
447
|
-
return
|
|
415
|
+
return p();
|
|
448
416
|
},
|
|
449
417
|
set translationUrl(r) {
|
|
450
|
-
|
|
418
|
+
p(r), y();
|
|
451
419
|
}
|
|
452
420
|
};
|
|
453
|
-
return
|
|
421
|
+
return fe(_, {
|
|
454
422
|
get apiEndpoint() {
|
|
455
|
-
return
|
|
423
|
+
return o();
|
|
456
424
|
},
|
|
457
425
|
get userSession() {
|
|
458
|
-
return
|
|
426
|
+
return l();
|
|
459
427
|
},
|
|
460
428
|
get locale() {
|
|
461
|
-
return
|
|
429
|
+
return L();
|
|
462
430
|
},
|
|
463
431
|
get limitItem() {
|
|
464
|
-
return
|
|
432
|
+
return c();
|
|
465
433
|
},
|
|
466
434
|
get translationUrl() {
|
|
467
|
-
return
|
|
435
|
+
return p();
|
|
468
436
|
}
|
|
469
|
-
}),
|
|
437
|
+
}), ge(v);
|
|
470
438
|
}
|
|
471
|
-
customElements.define("loyalty-shop",
|
|
472
|
-
|
|
439
|
+
customElements.define("loyalty-shop", pe(
|
|
440
|
+
he,
|
|
473
441
|
{
|
|
474
442
|
apiEndpoint: {},
|
|
475
443
|
userSession: {},
|
|
@@ -478,14 +446,13 @@ customElements.define("loyalty-shop", be(
|
|
|
478
446
|
translationUrl: {}
|
|
479
447
|
},
|
|
480
448
|
[],
|
|
481
|
-
[]
|
|
482
|
-
!1
|
|
449
|
+
[]
|
|
483
450
|
));
|
|
484
|
-
const
|
|
451
|
+
const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
485
452
|
__proto__: null,
|
|
486
|
-
default:
|
|
453
|
+
default: he
|
|
487
454
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
488
455
|
export {
|
|
489
|
-
|
|
490
|
-
|
|
456
|
+
fe as L,
|
|
457
|
+
wt as a
|
|
491
458
|
};
|