@everymatrix/mini-games-hub 0.2.8 → 0.2.10
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/ArrowLeftIcon--eD-7fsx.cjs +1 -0
- package/components/ArrowLeftIcon-Bfs5TaL6.js +20 -0
- package/components/ArrowLeftIcon-D98iyiSl.js +20 -0
- package/components/ArrowLeftIcon-Ypzji-S_.cjs +1 -0
- package/components/{CoinFlip-BOrc1Sgy.cjs → CoinFlip-BI2KQoYz.cjs} +1 -1
- package/components/{CoinFlip-uc2aguuz.js → CoinFlip-BxeM60kP.js} +2 -2
- package/components/{CoinFlip-DgM6tDy5.js → CoinFlip-CIqBL9-4.js} +18 -18
- package/components/{CoinFlip-DiCOvx3Q.cjs → CoinFlip-tTQwMgSv.cjs} +1 -1
- package/components/{CoinRoyale-DLL1bCAy.js → CoinRoyale-AIjHyYRF.js} +120 -116
- package/components/{CoinRoyale-Bkr3Rd-u.cjs → CoinRoyale-B08ETrbd.cjs} +4 -4
- package/components/{CoinRoyale-BH73ZSrU.cjs → CoinRoyale-DqOsokVD.cjs} +4 -4
- package/components/{CoinRoyale-fp-xfwl2.js → CoinRoyale-gjCYpNk5.js} +105 -101
- package/components/{GameCard-D78hDMaL.js → GameCard-BAO-RWT9.js} +36 -36
- package/components/{GameCard-BiO9Cay-.cjs → GameCard-CehoUog_.cjs} +3 -3
- package/components/{GameCard-Qh_fk15-.cjs → GameCard-DfHnwOqs.cjs} +3 -3
- package/components/{GameCard-jCZ6S2Wu.js → GameCard-pddtwXsP.js} +31 -31
- package/components/{MiniGamesHub-Bf2Cd1bB.js → MiniGamesHub-BPYHmhQ0.js} +157 -88
- package/components/{MiniGamesHub-KqAdBJEX.js → MiniGamesHub-CJjxsGLO.js} +138 -69
- package/components/MiniGamesHub-DzY6bqFU.cjs +79 -0
- package/components/MiniGamesHub-rHaCMzIp.cjs +79 -0
- package/components/{WheelOfFortune-CBYo6vCg.js → WheelOfFortune-Bz-AxMjO.js} +20 -20
- package/components/{WheelOfFortune-CDTzbAjp.cjs → WheelOfFortune-C0aA8AWD.cjs} +1 -1
- package/components/{WheelOfFortune-8HCl7aHv.js → WheelOfFortune-CBD1u1Ya.js} +29 -29
- package/components/{WheelOfFortune-XfmUFV3-.cjs → WheelOfFortune-D3EtOxbR.cjs} +1 -1
- package/components/WheelOfFortuneDrawResults-BBd3dkqS.cjs +1 -0
- package/components/WheelOfFortuneDrawResults-D7SxQsQ4.cjs +1 -0
- package/components/WheelOfFortuneDrawResults-Dg54Kewh.js +286 -0
- package/components/WheelOfFortuneDrawResults-XxUjXAw4.js +261 -0
- package/components/WheelOfFortuneHistory-C8xiNova.js +222 -0
- package/components/WheelOfFortuneHistory-KBjh_Fju.cjs +13 -0
- package/components/WheelOfFortuneHistory-QwT2V9EM.cjs +13 -0
- package/components/WheelOfFortuneHistory-txMyUapV.js +223 -0
- package/components/WheelOfFortuneRules-BJENXLzh.cjs +5 -0
- package/components/WheelOfFortuneRules-BtC1z4Di.js +109 -0
- package/components/WheelOfFortuneRules-C3McWywL.js +120 -0
- package/components/WheelOfFortuneRules-YSDAQ18X.cjs +5 -0
- package/components/{WheelOfFortuneWheel-F62aU_CL.js → WheelOfFortuneWheel-B11sYKJn.js} +364 -346
- package/components/{WheelOfFortuneWheel-CiyQZNAd.js → WheelOfFortuneWheel-D1cbM2SU.js} +718 -700
- package/components/WheelOfFortuneWheel-DB0BZCUo.cjs +3 -0
- package/components/WheelOfFortuneWheel-DWAdby4o.cjs +3 -0
- package/components/utils-BqkCy2Rz.cjs +3 -0
- package/components/{utils-3LNftCeZ.js → utils-CzSqbDv1.js} +633 -639
- package/components/{utils-DGrEJJ_K.js → utils-UAFcjwcH.js} +1737 -1745
- package/components/utils-uE8V9ar8.cjs +3 -0
- package/es2015/mini-games-hub.cjs +1 -1
- package/es2015/mini-games-hub.js +1 -1
- package/esnext/mini-games-hub.cjs +1 -1
- package/esnext/mini-games-hub.js +1 -1
- package/package.json +1 -1
- package/components/MiniGamesHub-5tuj6CDm.cjs +0 -16
- package/components/MiniGamesHub-SxucWl3S.cjs +0 -16
- package/components/WheelOfFortuneDrawResults-CASEqNiM.cjs +0 -1
- package/components/WheelOfFortuneDrawResults-DqgsImHB.js +0 -254
- package/components/WheelOfFortuneDrawResults-DsfJ3803.js +0 -279
- package/components/WheelOfFortuneDrawResults-l8iWZa_e.cjs +0 -1
- package/components/WheelOfFortuneHistory-CF8B0i5m.js +0 -213
- package/components/WheelOfFortuneHistory-Cnk8otCw.js +0 -213
- package/components/WheelOfFortuneHistory-DARohsMs.cjs +0 -12
- package/components/WheelOfFortuneHistory-ld2sGzjI.cjs +0 -12
- package/components/WheelOfFortuneRules-BZqR4cT9.js +0 -118
- package/components/WheelOfFortuneRules-Bv-d_VAp.cjs +0 -3
- package/components/WheelOfFortuneRules-CRGG3J0S.js +0 -107
- package/components/WheelOfFortuneRules-DLj96pqu.cjs +0 -3
- package/components/WheelOfFortuneWheel-CrRAYCB1.cjs +0 -3
- package/components/WheelOfFortuneWheel-DGD-zfeE.cjs +0 -3
- package/components/utils-BxNmJ6YA.cjs +0 -3
- package/components/utils-DyVEmMSf.cjs +0 -3
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { d as Oa, c as Za, a as Da, p as na, o as Ga, i as j, b as Ua, e as r, s as qa, f as m, g as Ja, h as va, j as pa, k as ca, l as n, m as za, n as ma, q as Qa, r as da } from "./WheelOfFortuneWheel-B11sYKJn.js";
|
|
2
|
+
import { b1 as Z, aQ as Xa, ar as T, a9 as Ya, aU as ha, a5 as $a, b3 as Ka, b6 as u, L as a, ba as g, aJ as I, b9 as Na, b2 as N, b5 as l, b7 as v, O as Va, bh as xa, bc as ga } from "./utils-CzSqbDv1.js";
|
|
3
|
+
var ae = m('<div class="lucky-wheel-history-item history-grid history-skeleton-row svelte-4la0az" aria-hidden="true"><p class="svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az"></span></p> <p class="svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--name svelte-4la0az"> </span></p> <div class="date-time-cell svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az">Oct 00, 0000</span> <span class="history-skeleton-bar svelte-4la0az">00:00:00</span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div></div>'), ee = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>', 1), ya = ma('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'), ba = ma('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'), te = m('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'), se = m('<span class="pagination-ellipsis svelte-4la0az">…</span>'), le = m("<button> </button>"), oe = m('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">‹</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">›</button></div>'), re = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>', 1), ie = m('<h2 class="no-history svelte-4la0az"> </h2>'), ne = m('<div class="history-list svelte-4la0az"><!></div>');
|
|
4
|
+
const ve = {
|
|
5
|
+
hash: "svelte-4la0az",
|
|
6
|
+
code: `.svelte-4la0az,
|
|
7
|
+
.svelte-4la0az::before,
|
|
8
|
+
.svelte-4la0az::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.history-list.svelte-4la0az {display:flex;flex-direction:column;gap:6px;width:100%;max-width:700px;margin:0 auto;}.history-grid.svelte-4la0az {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;}.date-time-cell.svelte-4la0az {display:flex;flex-direction:column;gap:2px;}.date-time-cell.svelte-4la0az span:where(.svelte-4la0az):last-child {opacity:0.6;font-size:10px;}.lucky-wheel-history-item.svelte-4la0az {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;}.lucky-wheel-history-header.svelte-4la0az {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}.history-icon.svelte-4la0az {display:flex;align-items:center;justify-content:center;}.no-history.svelte-4la0az {width:100%;font-size:14px;font-weight:400;margin-top:12px;}.lucky-wheel-pagination.svelte-4la0az {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;}.pagination-pages.svelte-4la0az {display:flex;align-items:center;gap:4px;}.pagination-ellipsis.svelte-4la0az {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;}.pagination-button.svelte-4la0az {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;}.pagination-button.svelte-4la0az:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));}.pagination-button.svelte-4la0az:disabled {opacity:0.4;cursor:not-allowed;}.pagination-page.svelte-4la0az {min-width:32px;text-align:center;padding:6px 8px;}.pagination-nav.svelte-4la0az {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;}.pagination-page.active.svelte-4la0az {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
|
|
9
|
+
|
|
10
|
+
@keyframes svelte-4la0az-skeleton-pulse {
|
|
11
|
+
0%, 100% {
|
|
12
|
+
opacity: 0.3;
|
|
13
|
+
}
|
|
14
|
+
50% {
|
|
15
|
+
opacity: 0.6;
|
|
16
|
+
}
|
|
17
|
+
}.history-skeleton-row.svelte-4la0az {pointer-events:none;
|
|
18
|
+
animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;}.history-skeleton-bar.svelte-4la0az {display:inline-block;max-width:100%;border-radius:4px;background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));color:transparent;user-select:none;}.history-skeleton-bar--name.svelte-4la0az {width:70%;}.history-skeleton-bar--icon.svelte-4la0az {width:12px;height:12px;}`
|
|
19
|
+
};
|
|
20
|
+
function pe(ua, D) {
|
|
21
|
+
$a(D, !0), Da(ua, ve);
|
|
22
|
+
const t = () => qa(Ka, "$_", _a), [_a, wa] = Ja(), V = na(D, "programId", 7), aa = na(D, "endpoint", 7), G = na(D, "session", 7);
|
|
23
|
+
let U = Z(!0), f = Z(Xa([])), ka = Z(!1);
|
|
24
|
+
const B = 10;
|
|
25
|
+
let d = Z(1);
|
|
26
|
+
const q = ga(() => a(f) && a(f).length > 0 ? Math.ceil(a(f).length / B) : 1), Ca = ga(() => a(f) && a(f).length > 0 ? a(f).slice((a(d) - 1) * B, a(d) * B) : []), La = {
|
|
27
|
+
bonus: t()("prizeBonus"),
|
|
28
|
+
role: t()("prizeRole"),
|
|
29
|
+
tournament: t()("prizeTournament"),
|
|
30
|
+
ticket: t()("prizeTicket"),
|
|
31
|
+
loyalty: t()("prizeLoyalty"),
|
|
32
|
+
challenge: t()("prizeChallenge"),
|
|
33
|
+
noprize: t()("noWin"),
|
|
34
|
+
custom: t()("prizeCustom")
|
|
35
|
+
}, Ea = ga(() => {
|
|
36
|
+
const e = a(q);
|
|
37
|
+
if (e <= 5)
|
|
38
|
+
return Array.from({ length: e }, (i, z) => z + 1);
|
|
39
|
+
const s = [], h = a(d);
|
|
40
|
+
s.push(1), h > 3 && s.push("...");
|
|
41
|
+
const c = Math.max(2, h - 1), L = Math.min(e - 1, h + 1);
|
|
42
|
+
for (let i = c; i <= L; i++)
|
|
43
|
+
s.push(i);
|
|
44
|
+
return h < e - 2 && s.push("..."), e > 1 && s.push(e), s;
|
|
45
|
+
});
|
|
46
|
+
let ea = Z(void 0);
|
|
47
|
+
const Ta = () => {
|
|
48
|
+
for (let e = a(ea)?.parentElement; e; e = e.parentElement) {
|
|
49
|
+
const { overflowY: s } = getComputedStyle(e);
|
|
50
|
+
(s === "auto" || s === "scroll") && e.scrollHeight > e.clientHeight && e.scrollTo({ top: 0, behavior: "smooth" });
|
|
51
|
+
}
|
|
52
|
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
53
|
+
}, ta = (e) => {
|
|
54
|
+
e < 1 || e > a(q) || (I(d, e, !0), Ta());
|
|
55
|
+
}, Ia = () => {
|
|
56
|
+
I(U, !0);
|
|
57
|
+
const e = new URL(`${aa()}/v1/wof/outcome/${V()}`), s = new Headers();
|
|
58
|
+
G() && s.append("X-SessionId", G()), fetch(e, { method: "GET", headers: s, cache: "no-store" }).then((c) => c.json()).then((c) => {
|
|
59
|
+
I(f, c?.items.map((L) => Na(L, "history")), !0), I(d, 1);
|
|
60
|
+
}).catch((c) => {
|
|
61
|
+
console.log(c), I(ka, !0);
|
|
62
|
+
}).finally(() => I(U, !1));
|
|
63
|
+
};
|
|
64
|
+
Ga(() => {
|
|
65
|
+
Ia();
|
|
66
|
+
});
|
|
67
|
+
var Ma = {
|
|
68
|
+
get programId() {
|
|
69
|
+
return V();
|
|
70
|
+
},
|
|
71
|
+
set programId(e) {
|
|
72
|
+
V(e), ha();
|
|
73
|
+
},
|
|
74
|
+
get endpoint() {
|
|
75
|
+
return aa();
|
|
76
|
+
},
|
|
77
|
+
set endpoint(e) {
|
|
78
|
+
aa(e), ha();
|
|
79
|
+
},
|
|
80
|
+
get session() {
|
|
81
|
+
return G();
|
|
82
|
+
},
|
|
83
|
+
set session(e) {
|
|
84
|
+
G(e), ha();
|
|
85
|
+
}
|
|
86
|
+
}, W = ne(), Ha = u(W);
|
|
87
|
+
{
|
|
88
|
+
var Pa = (e) => {
|
|
89
|
+
var s = ee(), h = N(s), c = l(u(h), 2), L = v(c, !0), i = l(c, 2), z = v(i, !0), _ = l(i, 2), M = v(_, !0), sa = l(_, 2), J = v(sa, !0);
|
|
90
|
+
g(h);
|
|
91
|
+
var la = l(h, 2);
|
|
92
|
+
pa(la, 17, () => Array(B), ca, (H, Q, A, X) => {
|
|
93
|
+
var P = ae(), Y = u(P), oa = u(Y);
|
|
94
|
+
oa.textContent = `${A + 1}.`, g(Y), Va(8), g(P), r(H, P);
|
|
95
|
+
}), T(
|
|
96
|
+
(H, Q, A, X) => {
|
|
97
|
+
n(L, H), n(z, Q), n(M, A), n(J, X);
|
|
98
|
+
},
|
|
99
|
+
[
|
|
100
|
+
() => t()("name"),
|
|
101
|
+
() => t()("date"),
|
|
102
|
+
() => t()("spin"),
|
|
103
|
+
() => t()("assigned")
|
|
104
|
+
]
|
|
105
|
+
), r(e, s);
|
|
106
|
+
}, Ra = (e) => {
|
|
107
|
+
var s = za(), h = N(s);
|
|
108
|
+
{
|
|
109
|
+
var c = (i) => {
|
|
110
|
+
var z = re(), _ = N(z), M = l(u(_), 2), sa = v(M, !0), J = l(M, 2), la = v(J, !0), H = l(J, 2), Q = v(H, !0), A = l(H, 2), X = v(A, !0);
|
|
111
|
+
g(_);
|
|
112
|
+
var P = l(_, 2);
|
|
113
|
+
pa(P, 17, () => a(Ca), ca, (E, p, w) => {
|
|
114
|
+
var x = te(), R = u(x), F = v(R), y = l(R, 2), $ = v(y, !0), O = l(y, 2), K = u(O), ra = v(K, !0), k = l(K, 2), C = v(k, !0);
|
|
115
|
+
g(O);
|
|
116
|
+
var S = l(O, 2), ia = u(S);
|
|
117
|
+
{
|
|
118
|
+
var ja = (o) => {
|
|
119
|
+
var b = ya();
|
|
120
|
+
r(o, b);
|
|
121
|
+
}, Ba = (o) => {
|
|
122
|
+
var b = ba();
|
|
123
|
+
r(o, b);
|
|
124
|
+
};
|
|
125
|
+
j(ia, (o) => {
|
|
126
|
+
a(p).state === "drawn" || a(p).state === "fulfilled" ? o(ja) : o(Ba, -1);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
g(S);
|
|
130
|
+
var fa = l(S, 2), Wa = u(fa);
|
|
131
|
+
{
|
|
132
|
+
var Aa = (o) => {
|
|
133
|
+
var b = ya();
|
|
134
|
+
r(o, b);
|
|
135
|
+
}, Fa = (o) => {
|
|
136
|
+
var b = ba();
|
|
137
|
+
r(o, b);
|
|
138
|
+
};
|
|
139
|
+
j(Wa, (o) => {
|
|
140
|
+
a(p).completed && a(p).state === "fulfilled" ? o(Aa) : o(Fa, -1);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
g(fa), g(x), T(
|
|
144
|
+
(o, b) => {
|
|
145
|
+
n(F, `${(a(d) - 1) * B + w + 1}.`), n($, La[a(p).type] || "-"), n(ra, o), n(C, b);
|
|
146
|
+
},
|
|
147
|
+
[
|
|
148
|
+
() => xa(a(p).time).date,
|
|
149
|
+
() => xa(a(p).time).time
|
|
150
|
+
]
|
|
151
|
+
), r(E, x);
|
|
152
|
+
});
|
|
153
|
+
var Y = l(P, 2);
|
|
154
|
+
{
|
|
155
|
+
var oa = (E) => {
|
|
156
|
+
var p = oe(), w = u(p), x = l(w, 2);
|
|
157
|
+
pa(x, 21, () => a(Ea), ca, (F, y) => {
|
|
158
|
+
var $ = za(), O = N($);
|
|
159
|
+
{
|
|
160
|
+
var K = (k) => {
|
|
161
|
+
var C = se();
|
|
162
|
+
r(k, C);
|
|
163
|
+
}, ra = (k) => {
|
|
164
|
+
var C = le();
|
|
165
|
+
let S;
|
|
166
|
+
var ia = v(C, !0);
|
|
167
|
+
T(() => {
|
|
168
|
+
S = Qa(C, 1, "pagination-button pagination-page svelte-4la0az", null, S, { active: a(d) === a(y) }), n(ia, a(y));
|
|
169
|
+
}), da("click", C, () => ta(a(y))), r(k, C);
|
|
170
|
+
};
|
|
171
|
+
j(O, (k) => {
|
|
172
|
+
a(y) === "..." ? k(K) : k(ra, -1);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
r(F, $);
|
|
176
|
+
}), g(x);
|
|
177
|
+
var R = l(x, 2);
|
|
178
|
+
g(p), T(
|
|
179
|
+
(F, y) => {
|
|
180
|
+
w.disabled = a(d) === 1, va(w, "aria-label", F), R.disabled = a(d) === a(q), va(R, "aria-label", y);
|
|
181
|
+
},
|
|
182
|
+
[() => t()("previous"), () => t()("next")]
|
|
183
|
+
), da("click", w, () => ta(a(d) - 1)), da("click", R, () => ta(a(d) + 1)), r(E, p);
|
|
184
|
+
};
|
|
185
|
+
j(Y, (E) => {
|
|
186
|
+
a(q) > 1 && E(oa);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
T(
|
|
190
|
+
(E, p, w, x) => {
|
|
191
|
+
n(sa, E), n(la, p), n(Q, w), n(X, x);
|
|
192
|
+
},
|
|
193
|
+
[
|
|
194
|
+
() => t()("name"),
|
|
195
|
+
() => t()("date"),
|
|
196
|
+
() => t()("spin"),
|
|
197
|
+
() => t()("assigned")
|
|
198
|
+
]
|
|
199
|
+
), r(i, z);
|
|
200
|
+
}, L = (i) => {
|
|
201
|
+
var z = ie(), _ = v(z, !0);
|
|
202
|
+
T((M) => n(_, M), [() => t()("noHistory")]), r(i, z);
|
|
203
|
+
};
|
|
204
|
+
j(h, (i) => {
|
|
205
|
+
a(f) && a(f).length > 0 ? i(c) : i(L, -1);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
r(e, s);
|
|
209
|
+
};
|
|
210
|
+
j(Ha, (e) => {
|
|
211
|
+
a(U) ? e(Pa) : e(Ra, -1);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
g(W), Ua(W, (e) => I(ea, e), () => a(ea)), T(() => va(W, "aria-busy", a(U))), r(ua, W);
|
|
215
|
+
var Sa = Ya(Ma);
|
|
216
|
+
return wa(), Sa;
|
|
217
|
+
}
|
|
218
|
+
Oa(["click"]);
|
|
219
|
+
Za(pe, { programId: {}, endpoint: {}, session: {} }, [], [], { mode: "open" });
|
|
220
|
+
export {
|
|
221
|
+
pe as W
|
|
222
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const t=require("./WheelOfFortuneWheel-DB0BZCUo.cjs"),e=require("./utils-BqkCy2Rz.cjs");var ye=t.from_html('<div class="lucky-wheel-history-item history-grid history-skeleton-row svelte-4la0az" aria-hidden="true"><p class="svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az"></span></p> <p class="svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--name svelte-4la0az"> </span></p> <div class="date-time-cell svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az">Oct 00, 0000</span> <span class="history-skeleton-bar svelte-4la0az">00:00:00</span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div></div>'),be=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>',1),V=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'),ee=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'),ze=t.from_html('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'),we=t.from_html('<span class="pagination-ellipsis svelte-4la0az">…</span>'),ke=t.from_html("<button> </button>"),Ce=t.from_html('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">‹</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">›</button></div>'),Le=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>',1),Te=t.from_html('<h2 class="no-history svelte-4la0az"> </h2>'),Ee=t.from_html('<div class="history-list svelte-4la0az"><!></div>');const He={hash:"svelte-4la0az",code:`.svelte-4la0az,
|
|
2
|
+
.svelte-4la0az::before,
|
|
3
|
+
.svelte-4la0az::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.history-list.svelte-4la0az {display:flex;flex-direction:column;gap:6px;width:100%;max-width:700px;margin:0 auto;}.history-grid.svelte-4la0az {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;}.date-time-cell.svelte-4la0az {display:flex;flex-direction:column;gap:2px;}.date-time-cell.svelte-4la0az span:where(.svelte-4la0az):last-child {opacity:0.6;font-size:10px;}.lucky-wheel-history-item.svelte-4la0az {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;}.lucky-wheel-history-header.svelte-4la0az {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}.history-icon.svelte-4la0az {display:flex;align-items:center;justify-content:center;}.no-history.svelte-4la0az {width:100%;font-size:14px;font-weight:400;margin-top:12px;}.lucky-wheel-pagination.svelte-4la0az {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;}.pagination-pages.svelte-4la0az {display:flex;align-items:center;gap:4px;}.pagination-ellipsis.svelte-4la0az {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;}.pagination-button.svelte-4la0az {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;}.pagination-button.svelte-4la0az:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));}.pagination-button.svelte-4la0az:disabled {opacity:0.4;cursor:not-allowed;}.pagination-page.svelte-4la0az {min-width:32px;text-align:center;padding:6px 8px;}.pagination-nav.svelte-4la0az {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;}.pagination-page.active.svelte-4la0az {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
|
|
4
|
+
|
|
5
|
+
@keyframes svelte-4la0az-skeleton-pulse {
|
|
6
|
+
0%, 100% {
|
|
7
|
+
opacity: 0.3;
|
|
8
|
+
}
|
|
9
|
+
50% {
|
|
10
|
+
opacity: 0.6;
|
|
11
|
+
}
|
|
12
|
+
}.history-skeleton-row.svelte-4la0az {pointer-events:none;
|
|
13
|
+
animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;}.history-skeleton-bar.svelte-4la0az {display:inline-block;max-width:100%;border-radius:4px;background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));color:transparent;user-select:none;}.history-skeleton-bar--name.svelte-4la0az {width:70%;}.history-skeleton-bar--icon.svelte-4la0az {width:12px;height:12px;}`};function te(N,S){e.push(S,!0),t.append_styles(N,He);const l=()=>t.store_get(e.$format,"$_",ae),[ae,le]=t.setup_stores(),Z=t.prop(S,"programId",7),q=t.prop(S,"endpoint",7),F=t.prop(S,"session",7);let W=e.state(!0),c=e.state(e.proxy([])),se=e.state(!1);const T=10;let p=e.state(1);const P=e.user_derived(()=>e.get(c)&&e.get(c).length>0?Math.ceil(e.get(c).length/T):1),ie=e.user_derived(()=>e.get(c)&&e.get(c).length>0?e.get(c).slice((e.get(p)-1)*T,e.get(p)*T):[]),oe={bonus:l()("prizeBonus"),role:l()("prizeRole"),tournament:l()("prizeTournament"),ticket:l()("prizeTicket"),loyalty:l()("prizeLoyalty"),challenge:l()("prizeChallenge"),noprize:l()("noWin"),custom:l()("prizeCustom")},re=e.user_derived(()=>{const a=e.get(P);if(a<=5)return Array.from({length:a},(o,d)=>d+1);const s=[],v=e.get(p);s.push(1),v>3&&s.push("...");const n=Math.max(2,v-1),y=Math.min(a-1,v+1);for(let o=n;o<=y;o++)s.push(o);return v<a-2&&s.push("..."),a>1&&s.push(a),s});let G=e.state(void 0);const ne=()=>{for(let a=e.get(G)?.parentElement;a;a=a.parentElement){const{overflowY:s}=getComputedStyle(a);(s==="auto"||s==="scroll")&&a.scrollHeight>a.clientHeight&&a.scrollTo({top:0,behavior:"smooth"})}window.scrollTo({top:0,behavior:"smooth"})},U=a=>{a<1||a>e.get(P)||(e.set(p,a,!0),ne())},pe=()=>{e.set(W,!0);const a=new URL(`${q()}/v1/wof/outcome/${Z()}`),s=new Headers;F()&&s.append("X-SessionId",F()),fetch(a,{method:"GET",headers:s,cache:"no-store"}).then(n=>n.json()).then(n=>{e.set(c,n?.items.map(y=>e.normalizeDrawResult(y,"history")),!0),e.set(p,1)}).catch(n=>{console.log(n),e.set(se,!0)}).finally(()=>e.set(W,!1))};t.onMount(()=>{pe()});var ve={get programId(){return Z()},set programId(a){Z(a),e.flushSync()},get endpoint(){return q()},set endpoint(a){q(a),e.flushSync()},get session(){return F()},set session(a){F(a),e.flushSync()}},E=Ee(),ce=e.child(E);{var de=a=>{var s=be(),v=e.first_child(s),n=e.sibling(e.child(v),2),y=e.only_child(n,!0),o=e.sibling(n,2),d=e.only_child(o,!0),_=e.sibling(o,2),z=e.only_child(_,!0),X=e.sibling(_,2),R=e.only_child(X,!0);e.reset(v);var Y=e.sibling(v,2);t.each(Y,17,()=>Array(T),t.index,(w,B,H,O)=>{var k=ye(),j=e.child(k),$=e.child(j);$.textContent=`${H+1}.`,e.reset(j),e.next(8),e.reset(k),t.append(w,k)}),e.template_effect((w,B,H,O)=>{t.set_text(y,w),t.set_text(d,B),t.set_text(z,H),t.set_text(R,O)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(a,s)},ge=a=>{var s=t.comment(),v=e.first_child(s);{var n=o=>{var d=Le(),_=e.first_child(d),z=e.sibling(e.child(_),2),X=e.only_child(z,!0),R=e.sibling(z,2),Y=e.only_child(R,!0),w=e.sibling(R,2),B=e.only_child(w,!0),H=e.sibling(w,2),O=e.only_child(H,!0);e.reset(_);var k=e.sibling(_,2);t.each(k,17,()=>e.get(ie),t.index,(b,r,u)=>{var g=ze(),C=e.child(g),I=e.only_child(C),h=e.sibling(C,2),A=e.only_child(h,!0),M=e.sibling(h,2),D=e.child(M),J=e.only_child(D,!0),m=e.sibling(D,2),x=e.only_child(m,!0);e.reset(M);var L=e.sibling(M,2),K=e.child(L);{var fe=i=>{var f=V();t.append(i,f)},_e=i=>{var f=ee();t.append(i,f)};t.if_block(K,i=>{e.get(r).state==="drawn"||e.get(r).state==="fulfilled"?i(fe):i(_e,-1)})}e.reset(L);var Q=e.sibling(L,2),ue=e.child(Q);{var me=i=>{var f=V();t.append(i,f)},xe=i=>{var f=ee();t.append(i,f)};t.if_block(ue,i=>{e.get(r).completed&&e.get(r).state==="fulfilled"?i(me):i(xe,-1)})}e.reset(Q),e.reset(g),e.template_effect((i,f)=>{t.set_text(I,`${(e.get(p)-1)*T+u+1}.`),t.set_text(A,oe[e.get(r).type]||"-"),t.set_text(J,i),t.set_text(x,f)},[()=>e.formatDateTimeForHistory(e.get(r).time).date,()=>e.formatDateTimeForHistory(e.get(r).time).time]),t.append(b,g)});var j=e.sibling(k,2);{var $=b=>{var r=Ce(),u=e.child(r),g=e.sibling(u,2);t.each(g,21,()=>e.get(re),t.index,(I,h)=>{var A=t.comment(),M=e.first_child(A);{var D=m=>{var x=we();t.append(m,x)},J=m=>{var x=ke();let L;var K=e.only_child(x,!0);e.template_effect(()=>{L=t.set_class(x,1,"pagination-button pagination-page svelte-4la0az",null,L,{active:e.get(p)===e.get(h)}),t.set_text(K,e.get(h))}),t.delegated("click",x,()=>U(e.get(h))),t.append(m,x)};t.if_block(M,m=>{e.get(h)==="..."?m(D):m(J,-1)})}t.append(I,A)}),e.reset(g);var C=e.sibling(g,2);e.reset(r),e.template_effect((I,h)=>{u.disabled=e.get(p)===1,t.set_attribute(u,"aria-label",I),C.disabled=e.get(p)===e.get(P),t.set_attribute(C,"aria-label",h)},[()=>l()("previous"),()=>l()("next")]),t.delegated("click",u,()=>U(e.get(p)-1)),t.delegated("click",C,()=>U(e.get(p)+1)),t.append(b,r)};t.if_block(j,b=>{e.get(P)>1&&b($)})}e.template_effect((b,r,u,g)=>{t.set_text(X,b),t.set_text(Y,r),t.set_text(B,u),t.set_text(O,g)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(o,d)},y=o=>{var d=Te(),_=e.only_child(d,!0);e.template_effect(z=>t.set_text(_,z),[()=>l()("noHistory")]),t.append(o,d)};t.if_block(v,o=>{e.get(c)&&e.get(c).length>0?o(n):o(y,-1)})}t.append(a,s)};t.if_block(ce,a=>{e.get(W)?a(de):a(ge,-1)})}e.reset(E),t.bind_this(E,a=>e.set(G,a),()=>e.get(G)),e.template_effect(()=>t.set_attribute(E,"aria-busy",e.get(W))),t.append(N,E);var he=e.pop(ve);return le(),he}t.delegate(["click"]);t.create_custom_element(te,{programId:{},endpoint:{},session:{}},[],[],{mode:"open"});exports.WheelOfFortuneHistory=te;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const t=require("./WheelOfFortuneWheel-DWAdby4o.cjs"),e=require("./utils-uE8V9ar8.cjs");var ye=t.from_html('<div class="lucky-wheel-history-item history-grid history-skeleton-row svelte-4la0az" aria-hidden="true"><p class="svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az"></span></p> <p class="svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--name svelte-4la0az"> </span></p> <div class="date-time-cell svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az">Oct 00, 0000</span> <span class="history-skeleton-bar svelte-4la0az">00:00:00</span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div></div>'),be=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>',1),V=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'),ee=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'),ze=t.from_html('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'),we=t.from_html('<span class="pagination-ellipsis svelte-4la0az">…</span>'),ke=t.from_html("<button> </button>"),Ce=t.from_html('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">‹</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">›</button></div>'),Le=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>',1),Te=t.from_html('<h2 class="no-history svelte-4la0az"> </h2>'),Ee=t.from_html('<div class="history-list svelte-4la0az"><!></div>');const He={hash:"svelte-4la0az",code:`.svelte-4la0az,
|
|
2
|
+
.svelte-4la0az::before,
|
|
3
|
+
.svelte-4la0az::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.history-list.svelte-4la0az {display:flex;flex-direction:column;gap:6px;width:100%;max-width:700px;margin:0 auto;}.history-grid.svelte-4la0az {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;}.date-time-cell.svelte-4la0az {display:flex;flex-direction:column;gap:2px;}.date-time-cell.svelte-4la0az span:where(.svelte-4la0az):last-child {opacity:0.6;font-size:10px;}.lucky-wheel-history-item.svelte-4la0az {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;}.lucky-wheel-history-header.svelte-4la0az {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}.history-icon.svelte-4la0az {display:flex;align-items:center;justify-content:center;}.no-history.svelte-4la0az {width:100%;font-size:14px;font-weight:400;margin-top:12px;}.lucky-wheel-pagination.svelte-4la0az {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;}.pagination-pages.svelte-4la0az {display:flex;align-items:center;gap:4px;}.pagination-ellipsis.svelte-4la0az {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;}.pagination-button.svelte-4la0az {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;}.pagination-button.svelte-4la0az:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));}.pagination-button.svelte-4la0az:disabled {opacity:0.4;cursor:not-allowed;}.pagination-page.svelte-4la0az {min-width:32px;text-align:center;padding:6px 8px;}.pagination-nav.svelte-4la0az {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;}.pagination-page.active.svelte-4la0az {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
|
|
4
|
+
|
|
5
|
+
@keyframes svelte-4la0az-skeleton-pulse {
|
|
6
|
+
0%, 100% {
|
|
7
|
+
opacity: 0.3;
|
|
8
|
+
}
|
|
9
|
+
50% {
|
|
10
|
+
opacity: 0.6;
|
|
11
|
+
}
|
|
12
|
+
}.history-skeleton-row.svelte-4la0az {pointer-events:none;
|
|
13
|
+
animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;}.history-skeleton-bar.svelte-4la0az {display:inline-block;max-width:100%;border-radius:4px;background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));color:transparent;user-select:none;}.history-skeleton-bar--name.svelte-4la0az {width:70%;}.history-skeleton-bar--icon.svelte-4la0az {width:12px;height:12px;}`};function te(N,S){e.push(S,!0),t.append_styles(N,He);const s=()=>t.store_get(e.$format,"$_",ae),[ae,le]=t.setup_stores(),Z=t.prop(S,"programId",7),q=t.prop(S,"endpoint",7),F=t.prop(S,"session",7);let W=e.state(!0),c=e.state(e.proxy([])),se=e.state(!1);const T=10;let v=e.state(1);const P=e.user_derived(()=>e.get(c)&&e.get(c).length>0?Math.ceil(e.get(c).length/T):1),ie=e.user_derived(()=>e.get(c)&&e.get(c).length>0?e.get(c).slice((e.get(v)-1)*T,e.get(v)*T):[]),oe={bonus:s()("prizeBonus"),role:s()("prizeRole"),tournament:s()("prizeTournament"),ticket:s()("prizeTicket"),loyalty:s()("prizeLoyalty"),challenge:s()("prizeChallenge"),noprize:s()("noWin"),custom:s()("prizeCustom")},re=e.user_derived(()=>{const a=e.get(P);if(a<=5)return Array.from({length:a},(n,d)=>d+1);const l=[],o=e.get(v);l.push(1),o>3&&l.push("...");const r=Math.max(2,o-1),y=Math.min(a-1,o+1);for(let n=r;n<=y;n++)l.push(n);return o<a-2&&l.push("..."),a>1&&l.push(a),l});let G=e.state(void 0);const ne=()=>{var a;for(let l=(a=e.get(G))==null?void 0:a.parentElement;l;l=l.parentElement){const{overflowY:o}=getComputedStyle(l);(o==="auto"||o==="scroll")&&l.scrollHeight>l.clientHeight&&l.scrollTo({top:0,behavior:"smooth"})}window.scrollTo({top:0,behavior:"smooth"})},U=a=>{a<1||a>e.get(P)||(e.set(v,a,!0),ne())},pe=()=>{e.set(W,!0);const a=new URL(`${q()}/v1/wof/outcome/${Z()}`),l=new Headers;F()&&l.append("X-SessionId",F()),fetch(a,{method:"GET",headers:l,cache:"no-store"}).then(r=>r.json()).then(r=>{e.set(c,r==null?void 0:r.items.map(y=>e.normalizeDrawResult(y,"history")),!0),e.set(v,1)}).catch(r=>{console.log(r),e.set(se,!0)}).finally(()=>e.set(W,!1))};t.onMount(()=>{pe()});var ve={get programId(){return Z()},set programId(a){Z(a),e.flushSync()},get endpoint(){return q()},set endpoint(a){q(a),e.flushSync()},get session(){return F()},set session(a){F(a),e.flushSync()}},E=Ee(),ce=e.child(E);{var de=a=>{var l=be(),o=e.first_child(l),r=e.sibling(e.child(o),2),y=e.only_child(r,!0),n=e.sibling(r,2),d=e.only_child(n,!0),_=e.sibling(n,2),z=e.only_child(_,!0),X=e.sibling(_,2),R=e.only_child(X,!0);e.reset(o);var Y=e.sibling(o,2);t.each(Y,17,()=>Array(T),t.index,(w,B,H,O)=>{var k=ye(),j=e.child(k),$=e.child(j);$.textContent=`${H+1}.`,e.reset(j),e.next(8),e.reset(k),t.append(w,k)}),e.template_effect((w,B,H,O)=>{t.set_text(y,w),t.set_text(d,B),t.set_text(z,H),t.set_text(R,O)},[()=>s()("name"),()=>s()("date"),()=>s()("spin"),()=>s()("assigned")]),t.append(a,l)},ge=a=>{var l=t.comment(),o=e.first_child(l);{var r=n=>{var d=Le(),_=e.first_child(d),z=e.sibling(e.child(_),2),X=e.only_child(z,!0),R=e.sibling(z,2),Y=e.only_child(R,!0),w=e.sibling(R,2),B=e.only_child(w,!0),H=e.sibling(w,2),O=e.only_child(H,!0);e.reset(_);var k=e.sibling(_,2);t.each(k,17,()=>e.get(ie),t.index,(b,p,u)=>{var g=ze(),C=e.child(g),I=e.only_child(C),h=e.sibling(C,2),A=e.only_child(h,!0),M=e.sibling(h,2),D=e.child(M),J=e.only_child(D,!0),m=e.sibling(D,2),x=e.only_child(m,!0);e.reset(M);var L=e.sibling(M,2),K=e.child(L);{var fe=i=>{var f=V();t.append(i,f)},_e=i=>{var f=ee();t.append(i,f)};t.if_block(K,i=>{e.get(p).state==="drawn"||e.get(p).state==="fulfilled"?i(fe):i(_e,-1)})}e.reset(L);var Q=e.sibling(L,2),ue=e.child(Q);{var me=i=>{var f=V();t.append(i,f)},xe=i=>{var f=ee();t.append(i,f)};t.if_block(ue,i=>{e.get(p).completed&&e.get(p).state==="fulfilled"?i(me):i(xe,-1)})}e.reset(Q),e.reset(g),e.template_effect((i,f)=>{t.set_text(I,`${(e.get(v)-1)*T+u+1}.`),t.set_text(A,oe[e.get(p).type]||"-"),t.set_text(J,i),t.set_text(x,f)},[()=>e.formatDateTimeForHistory(e.get(p).time).date,()=>e.formatDateTimeForHistory(e.get(p).time).time]),t.append(b,g)});var j=e.sibling(k,2);{var $=b=>{var p=Ce(),u=e.child(p),g=e.sibling(u,2);t.each(g,21,()=>e.get(re),t.index,(I,h)=>{var A=t.comment(),M=e.first_child(A);{var D=m=>{var x=we();t.append(m,x)},J=m=>{var x=ke();let L;var K=e.only_child(x,!0);e.template_effect(()=>{L=t.set_class(x,1,"pagination-button pagination-page svelte-4la0az",null,L,{active:e.get(v)===e.get(h)}),t.set_text(K,e.get(h))}),t.delegated("click",x,()=>U(e.get(h))),t.append(m,x)};t.if_block(M,m=>{e.get(h)==="..."?m(D):m(J,-1)})}t.append(I,A)}),e.reset(g);var C=e.sibling(g,2);e.reset(p),e.template_effect((I,h)=>{u.disabled=e.get(v)===1,t.set_attribute(u,"aria-label",I),C.disabled=e.get(v)===e.get(P),t.set_attribute(C,"aria-label",h)},[()=>s()("previous"),()=>s()("next")]),t.delegated("click",u,()=>U(e.get(v)-1)),t.delegated("click",C,()=>U(e.get(v)+1)),t.append(b,p)};t.if_block(j,b=>{e.get(P)>1&&b($)})}e.template_effect((b,p,u,g)=>{t.set_text(X,b),t.set_text(Y,p),t.set_text(B,u),t.set_text(O,g)},[()=>s()("name"),()=>s()("date"),()=>s()("spin"),()=>s()("assigned")]),t.append(n,d)},y=n=>{var d=Te(),_=e.only_child(d,!0);e.template_effect(z=>t.set_text(_,z),[()=>s()("noHistory")]),t.append(n,d)};t.if_block(o,n=>{e.get(c)&&e.get(c).length>0?n(r):n(y,-1)})}t.append(a,l)};t.if_block(ce,a=>{e.get(W)?a(de):a(ge,-1)})}e.reset(E),t.bind_this(E,a=>e.set(G,a),()=>e.get(G)),e.template_effect(()=>t.set_attribute(E,"aria-busy",e.get(W))),t.append(N,E);var he=e.pop(ve);return le(),he}t.delegate(["click"]);t.create_custom_element(te,{programId:{},endpoint:{},session:{}},[],[],{mode:"open"});exports.WheelOfFortuneHistory=te;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { d as Oe, c as Ze, a as De, p as ne, o as Ge, i as j, b as Ue, e as r, s as qe, f as m, g as Je, h as ve, j as pe, k as p, l as ze, m as ce, n as me, q as Qe, r as de } from "./WheelOfFortuneWheel-D1cbM2SU.js";
|
|
2
|
+
import { a5 as Xe, b1 as Z, aQ as Ye, L as e, ar as T, a9 as $e, aJ as I, b9 as Ke, b6 as u, aU as he, b4 as Ne, b2 as N, b3 as l, b7 as c, ba as g, O as Ve, bh as xe, bb as ge } from "./utils-UAFcjwcH.js";
|
|
3
|
+
var ea = m('<div class="lucky-wheel-history-item history-grid history-skeleton-row svelte-4la0az" aria-hidden="true"><p class="svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az"></span></p> <p class="svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--name svelte-4la0az"> </span></p> <div class="date-time-cell svelte-4la0az"><span class="history-skeleton-bar svelte-4la0az">Oct 00, 0000</span> <span class="history-skeleton-bar svelte-4la0az">00:00:00</span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div> <div class="history-icon svelte-4la0az"><span class="history-skeleton-bar history-skeleton-bar--icon svelte-4la0az"></span></div></div>'), aa = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>', 1), ye = me('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'), be = me('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'), ta = m('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'), sa = m('<span class="pagination-ellipsis svelte-4la0az">…</span>'), la = m("<button> </button>"), oa = m('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">‹</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">›</button></div>'), ra = m('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>', 1), ia = m('<h2 class="no-history svelte-4la0az"> </h2>'), na = m('<div class="history-list svelte-4la0az"><!></div>');
|
|
4
|
+
const va = {
|
|
5
|
+
hash: "svelte-4la0az",
|
|
6
|
+
code: `.svelte-4la0az,
|
|
7
|
+
.svelte-4la0az::before,
|
|
8
|
+
.svelte-4la0az::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.history-list.svelte-4la0az {display:flex;flex-direction:column;gap:6px;width:100%;max-width:700px;margin:0 auto;}.history-grid.svelte-4la0az {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;}.date-time-cell.svelte-4la0az {display:flex;flex-direction:column;gap:2px;}.date-time-cell.svelte-4la0az span:where(.svelte-4la0az):last-child {opacity:0.6;font-size:10px;}.lucky-wheel-history-item.svelte-4la0az {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;}.lucky-wheel-history-header.svelte-4la0az {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}.history-icon.svelte-4la0az {display:flex;align-items:center;justify-content:center;}.no-history.svelte-4la0az {width:100%;font-size:14px;font-weight:400;margin-top:12px;}.lucky-wheel-pagination.svelte-4la0az {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;}.pagination-pages.svelte-4la0az {display:flex;align-items:center;gap:4px;}.pagination-ellipsis.svelte-4la0az {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;}.pagination-button.svelte-4la0az {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;}.pagination-button.svelte-4la0az:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));}.pagination-button.svelte-4la0az:disabled {opacity:0.4;cursor:not-allowed;}.pagination-page.svelte-4la0az {min-width:32px;text-align:center;padding:6px 8px;}.pagination-nav.svelte-4la0az {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;}.pagination-page.active.svelte-4la0az {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
|
|
9
|
+
|
|
10
|
+
@keyframes svelte-4la0az-skeleton-pulse {
|
|
11
|
+
0%, 100% {
|
|
12
|
+
opacity: 0.3;
|
|
13
|
+
}
|
|
14
|
+
50% {
|
|
15
|
+
opacity: 0.6;
|
|
16
|
+
}
|
|
17
|
+
}.history-skeleton-row.svelte-4la0az {pointer-events:none;
|
|
18
|
+
animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;}.history-skeleton-bar.svelte-4la0az {display:inline-block;max-width:100%;border-radius:4px;background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));color:transparent;user-select:none;}.history-skeleton-bar--name.svelte-4la0az {width:70%;}.history-skeleton-bar--icon.svelte-4la0az {width:12px;height:12px;}`
|
|
19
|
+
};
|
|
20
|
+
function pa(ue, D) {
|
|
21
|
+
Xe(D, !0), De(ue, va);
|
|
22
|
+
const s = () => qe(Ne, "$_", _e), [_e, we] = Je(), V = ne(D, "programId", 7), ee = ne(D, "endpoint", 7), G = ne(D, "session", 7);
|
|
23
|
+
let U = Z(!0), f = Z(Ye([])), ke = Z(!1);
|
|
24
|
+
const B = 10;
|
|
25
|
+
let h = Z(1);
|
|
26
|
+
const q = ge(() => e(f) && e(f).length > 0 ? Math.ceil(e(f).length / B) : 1), Ce = ge(() => e(f) && e(f).length > 0 ? e(f).slice((e(h) - 1) * B, e(h) * B) : []), Le = {
|
|
27
|
+
bonus: s()("prizeBonus"),
|
|
28
|
+
role: s()("prizeRole"),
|
|
29
|
+
tournament: s()("prizeTournament"),
|
|
30
|
+
ticket: s()("prizeTicket"),
|
|
31
|
+
loyalty: s()("prizeLoyalty"),
|
|
32
|
+
challenge: s()("prizeChallenge"),
|
|
33
|
+
noprize: s()("noWin"),
|
|
34
|
+
custom: s()("prizeCustom")
|
|
35
|
+
}, Ee = ge(() => {
|
|
36
|
+
const a = e(q);
|
|
37
|
+
if (a <= 5)
|
|
38
|
+
return Array.from({ length: a }, (v, z) => z + 1);
|
|
39
|
+
const t = [], i = e(h);
|
|
40
|
+
t.push(1), i > 3 && t.push("...");
|
|
41
|
+
const n = Math.max(2, i - 1), L = Math.min(a - 1, i + 1);
|
|
42
|
+
for (let v = n; v <= L; v++)
|
|
43
|
+
t.push(v);
|
|
44
|
+
return i < a - 2 && t.push("..."), a > 1 && t.push(a), t;
|
|
45
|
+
});
|
|
46
|
+
let ae = Z(void 0);
|
|
47
|
+
const Te = () => {
|
|
48
|
+
var a;
|
|
49
|
+
for (let t = (a = e(ae)) == null ? void 0 : a.parentElement; t; t = t.parentElement) {
|
|
50
|
+
const { overflowY: i } = getComputedStyle(t);
|
|
51
|
+
(i === "auto" || i === "scroll") && t.scrollHeight > t.clientHeight && t.scrollTo({ top: 0, behavior: "smooth" });
|
|
52
|
+
}
|
|
53
|
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
54
|
+
}, te = (a) => {
|
|
55
|
+
a < 1 || a > e(q) || (I(h, a, !0), Te());
|
|
56
|
+
}, Ie = () => {
|
|
57
|
+
I(U, !0);
|
|
58
|
+
const a = new URL(`${ee()}/v1/wof/outcome/${V()}`), t = new Headers();
|
|
59
|
+
G() && t.append("X-SessionId", G()), fetch(a, { method: "GET", headers: t, cache: "no-store" }).then((n) => n.json()).then((n) => {
|
|
60
|
+
I(f, n == null ? void 0 : n.items.map((L) => Ke(L, "history")), !0), I(h, 1);
|
|
61
|
+
}).catch((n) => {
|
|
62
|
+
console.log(n), I(ke, !0);
|
|
63
|
+
}).finally(() => I(U, !1));
|
|
64
|
+
};
|
|
65
|
+
Ge(() => {
|
|
66
|
+
Ie();
|
|
67
|
+
});
|
|
68
|
+
var Me = {
|
|
69
|
+
get programId() {
|
|
70
|
+
return V();
|
|
71
|
+
},
|
|
72
|
+
set programId(a) {
|
|
73
|
+
V(a), he();
|
|
74
|
+
},
|
|
75
|
+
get endpoint() {
|
|
76
|
+
return ee();
|
|
77
|
+
},
|
|
78
|
+
set endpoint(a) {
|
|
79
|
+
ee(a), he();
|
|
80
|
+
},
|
|
81
|
+
get session() {
|
|
82
|
+
return G();
|
|
83
|
+
},
|
|
84
|
+
set session(a) {
|
|
85
|
+
G(a), he();
|
|
86
|
+
}
|
|
87
|
+
}, W = na(), He = u(W);
|
|
88
|
+
{
|
|
89
|
+
var Pe = (a) => {
|
|
90
|
+
var t = aa(), i = N(t), n = l(u(i), 2), L = c(n, !0), v = l(n, 2), z = c(v, !0), _ = l(v, 2), M = c(_, !0), se = l(_, 2), J = c(se, !0);
|
|
91
|
+
g(i);
|
|
92
|
+
var le = l(i, 2);
|
|
93
|
+
ve(le, 17, () => Array(B), pe, (H, Q, A, X) => {
|
|
94
|
+
var P = ea(), Y = u(P), oe = u(Y);
|
|
95
|
+
oe.textContent = `${A + 1}.`, g(Y), Ve(8), g(P), r(H, P);
|
|
96
|
+
}), T(
|
|
97
|
+
(H, Q, A, X) => {
|
|
98
|
+
p(L, H), p(z, Q), p(M, A), p(J, X);
|
|
99
|
+
},
|
|
100
|
+
[
|
|
101
|
+
() => s()("name"),
|
|
102
|
+
() => s()("date"),
|
|
103
|
+
() => s()("spin"),
|
|
104
|
+
() => s()("assigned")
|
|
105
|
+
]
|
|
106
|
+
), r(a, t);
|
|
107
|
+
}, Re = (a) => {
|
|
108
|
+
var t = ze(), i = N(t);
|
|
109
|
+
{
|
|
110
|
+
var n = (v) => {
|
|
111
|
+
var z = ra(), _ = N(z), M = l(u(_), 2), se = c(M, !0), J = l(M, 2), le = c(J, !0), H = l(J, 2), Q = c(H, !0), A = l(H, 2), X = c(A, !0);
|
|
112
|
+
g(_);
|
|
113
|
+
var P = l(_, 2);
|
|
114
|
+
ve(P, 17, () => e(Ce), pe, (E, d, w) => {
|
|
115
|
+
var x = ta(), R = u(x), F = c(R), y = l(R, 2), $ = c(y, !0), O = l(y, 2), K = u(O), re = c(K, !0), k = l(K, 2), C = c(k, !0);
|
|
116
|
+
g(O);
|
|
117
|
+
var S = l(O, 2), ie = u(S);
|
|
118
|
+
{
|
|
119
|
+
var je = (o) => {
|
|
120
|
+
var b = ye();
|
|
121
|
+
r(o, b);
|
|
122
|
+
}, Be = (o) => {
|
|
123
|
+
var b = be();
|
|
124
|
+
r(o, b);
|
|
125
|
+
};
|
|
126
|
+
j(ie, (o) => {
|
|
127
|
+
e(d).state === "drawn" || e(d).state === "fulfilled" ? o(je) : o(Be, -1);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
g(S);
|
|
131
|
+
var fe = l(S, 2), We = u(fe);
|
|
132
|
+
{
|
|
133
|
+
var Ae = (o) => {
|
|
134
|
+
var b = ye();
|
|
135
|
+
r(o, b);
|
|
136
|
+
}, Fe = (o) => {
|
|
137
|
+
var b = be();
|
|
138
|
+
r(o, b);
|
|
139
|
+
};
|
|
140
|
+
j(We, (o) => {
|
|
141
|
+
e(d).completed && e(d).state === "fulfilled" ? o(Ae) : o(Fe, -1);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
g(fe), g(x), T(
|
|
145
|
+
(o, b) => {
|
|
146
|
+
p(F, `${(e(h) - 1) * B + w + 1}.`), p($, Le[e(d).type] || "-"), p(re, o), p(C, b);
|
|
147
|
+
},
|
|
148
|
+
[
|
|
149
|
+
() => xe(e(d).time).date,
|
|
150
|
+
() => xe(e(d).time).time
|
|
151
|
+
]
|
|
152
|
+
), r(E, x);
|
|
153
|
+
});
|
|
154
|
+
var Y = l(P, 2);
|
|
155
|
+
{
|
|
156
|
+
var oe = (E) => {
|
|
157
|
+
var d = oa(), w = u(d), x = l(w, 2);
|
|
158
|
+
ve(x, 21, () => e(Ee), pe, (F, y) => {
|
|
159
|
+
var $ = ze(), O = N($);
|
|
160
|
+
{
|
|
161
|
+
var K = (k) => {
|
|
162
|
+
var C = sa();
|
|
163
|
+
r(k, C);
|
|
164
|
+
}, re = (k) => {
|
|
165
|
+
var C = la();
|
|
166
|
+
let S;
|
|
167
|
+
var ie = c(C, !0);
|
|
168
|
+
T(() => {
|
|
169
|
+
S = Qe(C, 1, "pagination-button pagination-page svelte-4la0az", null, S, { active: e(h) === e(y) }), p(ie, e(y));
|
|
170
|
+
}), de("click", C, () => te(e(y))), r(k, C);
|
|
171
|
+
};
|
|
172
|
+
j(O, (k) => {
|
|
173
|
+
e(y) === "..." ? k(K) : k(re, -1);
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
r(F, $);
|
|
177
|
+
}), g(x);
|
|
178
|
+
var R = l(x, 2);
|
|
179
|
+
g(d), T(
|
|
180
|
+
(F, y) => {
|
|
181
|
+
w.disabled = e(h) === 1, ce(w, "aria-label", F), R.disabled = e(h) === e(q), ce(R, "aria-label", y);
|
|
182
|
+
},
|
|
183
|
+
[() => s()("previous"), () => s()("next")]
|
|
184
|
+
), de("click", w, () => te(e(h) - 1)), de("click", R, () => te(e(h) + 1)), r(E, d);
|
|
185
|
+
};
|
|
186
|
+
j(Y, (E) => {
|
|
187
|
+
e(q) > 1 && E(oe);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
T(
|
|
191
|
+
(E, d, w, x) => {
|
|
192
|
+
p(se, E), p(le, d), p(Q, w), p(X, x);
|
|
193
|
+
},
|
|
194
|
+
[
|
|
195
|
+
() => s()("name"),
|
|
196
|
+
() => s()("date"),
|
|
197
|
+
() => s()("spin"),
|
|
198
|
+
() => s()("assigned")
|
|
199
|
+
]
|
|
200
|
+
), r(v, z);
|
|
201
|
+
}, L = (v) => {
|
|
202
|
+
var z = ia(), _ = c(z, !0);
|
|
203
|
+
T((M) => p(_, M), [() => s()("noHistory")]), r(v, z);
|
|
204
|
+
};
|
|
205
|
+
j(i, (v) => {
|
|
206
|
+
e(f) && e(f).length > 0 ? v(n) : v(L, -1);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
r(a, t);
|
|
210
|
+
};
|
|
211
|
+
j(He, (a) => {
|
|
212
|
+
e(U) ? a(Pe) : a(Re, -1);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
g(W), Ue(W, (a) => I(ae, a), () => e(ae)), T(() => ce(W, "aria-busy", e(U))), r(ue, W);
|
|
216
|
+
var Se = $e(Me);
|
|
217
|
+
return we(), Se;
|
|
218
|
+
}
|
|
219
|
+
Oe(["click"]);
|
|
220
|
+
Ze(pa, { programId: {}, endpoint: {}, session: {} }, [], [], { mode: "open" });
|
|
221
|
+
export {
|
|
222
|
+
pa as W
|
|
223
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const t=require("./WheelOfFortuneWheel-DWAdby4o.cjs"),e=require("./utils-uE8V9ar8.cjs");var M=t.from_html('<a class="terms-link svelte-1b0ztto" target="_blank" rel="noopener"><span class="svelte-1b0ztto"> </span></a>'),N=t.from_html('<div class="detail-item svelte-1b0ztto"><div class="detail-text svelte-1b0ztto"><strong class="svelte-1b0ztto"> </strong> <span class="svelte-1b0ztto"> </span></div></div>'),Q=t.from_html('<span class="reward-label svelte-1b0ztto"> </span>'),V=t.from_html('<img class="reward-icon svelte-1b0ztto" alt=""/>'),X=t.from_html('<span class="reward-item svelte-1b0ztto"><!></span>'),Y=t.from_html('<div class="rules-content svelte-1b0ztto"><div class="game-description svelte-1b0ztto"> </div> <!> <div class="rules-details svelte-1b0ztto"><div class="detail-item svelte-1b0ztto"><div class="detail-text svelte-1b0ztto"><strong class="svelte-1b0ztto"> </strong> <span class="svelte-1b0ztto"> </span></div></div> <!> <div class="detail-item rewards svelte-1b0ztto"><div class="detail-text svelte-1b0ztto"><strong class="svelte-1b0ztto"> </strong> <span class="reward-list svelte-1b0ztto"><!></span></div></div></div></div>');const Z={hash:"svelte-1b0ztto",code:`.svelte-1b0ztto,
|
|
2
|
+
.svelte-1b0ztto::before,
|
|
3
|
+
.svelte-1b0ztto::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.rules-content.svelte-1b0ztto {display:flex;flex-direction:column;gap:16px;width:100%;max-width:700px;margin:0 auto;color:var(--color-text-default, #ffffff);font-family:inherit;}.game-description.svelte-1b0ztto {font-size:12px;color:var(--color-text-default, #ffffff);}.terms-link.svelte-1b0ztto {display:inline-flex;align-items:center;gap:6px;align-self:flex-start;font-style:italic;font-weight:600;text-decoration:underline;text-underline-offset:3px;color:var(--color-text-default, #ffffff);cursor:pointer;}.rules-details.svelte-1b0ztto {display:flex;flex-direction:column;gap:12px;}.detail-item.svelte-1b0ztto {display:flex;width:100%;gap:10px;justify-content:space-between;align-items:flex-start;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);}.detail-text.svelte-1b0ztto {display:flex;flex-direction:column;gap:4px;flex:1 1 auto;min-width:0;}.detail-text.svelte-1b0ztto strong:where(.svelte-1b0ztto) {font-size:14px;font-weight:700;opacity:0.9;}.detail-text.svelte-1b0ztto > span:where(.svelte-1b0ztto) {font-size:12px;opacity:0.95;font-style:italic;}
|
|
4
|
+
|
|
5
|
+
/* Rewards list */.reward-list.svelte-1b0ztto {display:flex;flex-direction:column;gap:10px;}.reward-item.svelte-1b0ztto {display:flex;align-items:center;gap:10px;}.reward-label.svelte-1b0ztto {font-size:12px;}.reward-icon.svelte-1b0ztto {width:22px;height:22px;object-fit:contain;}`};function j(h,g){e.push(g,!0),t.append_styles(h,Z);const c=()=>t.store_get(e.$format,"$_",q),[q,S]=t.setup_stores(),o=t.prop(g,"program",7),p=t.prop(g,"language",7,"en");var U={get program(){return o()},set program(r){o(r),e.flushSync()},get language(){return p()},set language(r="en"){p(r),e.flushSync()}},m=Y(),z=e.child(m),L=e.only_child(z,!0),y=e.sibling(z,2);{var P=r=>{var a=M(),i=e.child(a),s=e.only_child(i,!0);e.reset(a),e.template_effect(l=>{t.set_attribute(a,"href",o().termsUrl),t.set_text(s,l)},[()=>c()("terms")]),t.append(r,a)};t.if_block(y,r=>{o().termsUrl&&r(P)})}var w=e.sibling(y,2),b=e.child(w),k=e.child(b),F=e.child(k),A=e.only_child(F,!0),B=e.sibling(F,2),C=e.only_child(B);e.reset(k),e.reset(b);var R=e.sibling(b,2);{var E=r=>{var a=t.comment(),i=e.first_child(a);t.each(i,17,()=>o().periods,t.index,(s,l)=>{var d=N(),f=e.child(d),_=e.child(f),x=e.only_child(_,!0),n=e.sibling(_,2),v=e.only_child(n,!0);e.reset(f),e.reset(d),e.template_effect((u,K)=>{t.set_text(x,u),t.set_text(v,K)},[()=>c()("recurrenceLabel"),()=>e.getRecurrenceText(e.get(l))]),t.append(s,d)}),t.append(r,a)};t.if_block(R,r=>{var a;(a=o())!=null&&a.periods&&r(E)})}var W=e.sibling(R,2),D=e.child(W),O=e.child(D),G=e.only_child(O,!0),T=e.sibling(O,2),H=e.child(T);{var I=r=>{var a=t.comment(),i=e.first_child(a);t.each(i,17,()=>{var s;return(s=o())==null?void 0:s.partitions},t.index,(s,l)=>{var d=X(),f=e.child(d);{var _=n=>{var v=Q(),u=e.only_child(v,!0);e.template_effect(()=>t.set_text(u,e.get(l).name["*"]||e.get(l).name[p()])),t.append(n,v)},x=n=>{var v=V();e.template_effect(()=>t.set_attribute(v,"src",e.get(l).image1["*"]||e.get(l).image1[p()])),t.append(n,v)};t.if_block(f,n=>{e.get(l).name["*"]?n(_):n(x,-1)})}e.reset(d),t.append(s,d)}),t.append(r,a)};t.if_block(H,r=>{var a;(a=o())!=null&&a.partitions&&r(I)})}e.reset(T),e.reset(D),e.reset(W),e.reset(w),e.reset(m),e.template_effect((r,a,i,s,l)=>{t.set_text(L,r),t.set_text(A,a),t.set_text(C,`${i!=null?i:""} ~ ${s!=null?s:""}`),t.set_text(G,l)},[()=>c()("rulesDescription"),()=>c()("availablePeriod"),()=>{var r;return e.getFormattedDate((r=o())==null?void 0:r.startTime)},()=>{var r;return e.getFormattedDate((r=o())==null?void 0:r.endTime)},()=>c()("topRewards")]),t.append(h,m);var J=e.pop(U);return S(),J}t.create_custom_element(j,{program:{},language:{}},[],[],{mode:"open"});exports.WheelOfFortuneRules=j;
|