@everymatrix/prize-engine-suite 0.0.1
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/README.md +138 -0
- package/components/PrizeEngineChest-BVPAgurG.js +309 -0
- package/components/PrizeEngineChest-C0N7lnkh.js +331 -0
- package/components/PrizeEngineChest-IjXQ3Npg.cjs +1 -0
- package/components/PrizeEngineCoin-BSbJruG-.js +293 -0
- package/components/PrizeEngineCoin-CfvghnNb.js +271 -0
- package/components/PrizeEngineCoin-DSfNslVg.cjs +1 -0
- package/components/PrizeEngineDetails-3-kB4O56.js +2000 -0
- package/components/PrizeEngineDetails-BB_QSozG.cjs +1 -0
- package/components/PrizeEngineDetails-CjKeFIuU.js +1960 -0
- package/components/PrizeEngineHistory-60ER0uV1.js +1786 -0
- package/components/PrizeEngineHistory-BpILiR5F.cjs +1 -0
- package/components/PrizeEngineHistory-DN5bFRQB.js +1816 -0
- package/components/PrizeEngineList-DQ8Mn6nB.js +471 -0
- package/components/PrizeEngineList-QzCyrAut.cjs +1 -0
- package/components/PrizeEngineList-mINVnC_b.js +437 -0
- package/components/PrizeEngineLuckywheel-BgWt7wEl.cjs +1 -0
- package/components/PrizeEngineLuckywheel-BncCaQEg.js +272 -0
- package/components/PrizeEngineLuckywheel-CTlHcFBH.js +272 -0
- package/components/PrizeEngineSuite-BhF-GlCv.js +5378 -0
- package/components/PrizeEngineSuite-DNby9KuV.cjs +23 -0
- package/components/PrizeEngineSuite-DWvvEtv_.js +5337 -0
- package/components/WheelSVG-BxjEfPQo.js +1475 -0
- package/components/WheelSVG-DYz6PQPq.cjs +34 -0
- package/components/WheelSVG-MY7KdRdd.js +1441 -0
- package/es2015/prize-engine-suite.cjs +1 -0
- package/es2015/prize-engine-suite.js +16 -0
- package/esnext/prize-engine-suite.js +14 -0
- package/package.json +25 -0
- package/stencil/app-globals-0f993ce5-D-kw1sls.js +5 -0
- package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
- package/stencil/index-b2193545-9K-aI7zC.cjs +1 -0
- package/stencil/index-b2193545-DsMHU6jb.js +519 -0
- package/stencil/index-b2193545-R7ZoV-kY.js +503 -0
- package/stencil/ui-skeleton-BreIU6e5.cjs +1 -0
- package/stencil/ui-skeleton-W50o8tfg.js +11 -0
- package/stencil/ui-skeleton-ed169f8f-CVY4B-CP.js +155 -0
- package/stencil/ui-skeleton-ed169f8f-CpiCXJrP.cjs +55 -0
- package/stencil/ui-skeleton-ed169f8f-D3TjbVKy.js +155 -0
- package/stencil/ui-skeleton-xXZA3rYO.js +29 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { S as N, i as V, s as F, f as g, c as H, d as G, J as M, H as z, O as I, K, h as R, k as L, l as P, t as T, o as B, p as Q, a1 as X, j as Y, a2 as Z, a3 as $, q as E, C as ee, D as te, E as ne, F as ie } from "./PrizeEngineSuite-BhF-GlCv.js";
|
|
2
|
+
import { s as se, a as le, W as re, b as ae } from "./WheelSVG-BxjEfPQo.js";
|
|
3
|
+
function oe(i) {
|
|
4
|
+
H(i, "svelte-12d9sfg", '.PrizeLuckywheelContainer.svelte-12d9sfg{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;padding:20px;box-sizing:border-box;font-family:var(--emw--font-family-primary, "Ubuntu", sans-serif)}.PrizeLuckywheelContainer.Mobile.svelte-12d9sfg{padding:10px}.MainSection.svelte-12d9sfg{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;position:relative}.WheelWrapper.svelte-12d9sfg{flex-grow:1;display:flex;align-items:center;justify-content:center;min-height:0;width:100%}');
|
|
5
|
+
}
|
|
6
|
+
function W(i) {
|
|
7
|
+
let e, s, t, r, c = {
|
|
8
|
+
lang: (
|
|
9
|
+
/*lang*/
|
|
10
|
+
i[0]
|
|
11
|
+
),
|
|
12
|
+
contentdirection: (
|
|
13
|
+
/*contentdirection*/
|
|
14
|
+
i[1]
|
|
15
|
+
),
|
|
16
|
+
bonus: (
|
|
17
|
+
/*activeGame*/
|
|
18
|
+
i[4]
|
|
19
|
+
),
|
|
20
|
+
size: (
|
|
21
|
+
/*_internalSize*/
|
|
22
|
+
i[3]
|
|
23
|
+
),
|
|
24
|
+
radius: (
|
|
25
|
+
/*radius*/
|
|
26
|
+
i[7]
|
|
27
|
+
)
|
|
28
|
+
};
|
|
29
|
+
return t = new re({ props: c }), i[17](t), t.$on(
|
|
30
|
+
"spinning",
|
|
31
|
+
/*spinning_handler*/
|
|
32
|
+
i[18]
|
|
33
|
+
), t.$on(
|
|
34
|
+
"spinning-request",
|
|
35
|
+
/*spinning_request_handler*/
|
|
36
|
+
i[19]
|
|
37
|
+
), t.$on(
|
|
38
|
+
"success",
|
|
39
|
+
/*success_handler*/
|
|
40
|
+
i[20]
|
|
41
|
+
), {
|
|
42
|
+
c() {
|
|
43
|
+
e = L("div"), s = L("div"), $(t.$$.fragment), P(s, "class", "WheelWrapper svelte-12d9sfg"), P(e, "class", "MainSection svelte-12d9sfg");
|
|
44
|
+
},
|
|
45
|
+
m(l, a) {
|
|
46
|
+
R(l, e, a), Y(e, s), Z(t, s, null), r = !0;
|
|
47
|
+
},
|
|
48
|
+
p(l, a) {
|
|
49
|
+
const o = {};
|
|
50
|
+
a & /*lang*/
|
|
51
|
+
1 && (o.lang = /*lang*/
|
|
52
|
+
l[0]), a & /*contentdirection*/
|
|
53
|
+
2 && (o.contentdirection = /*contentdirection*/
|
|
54
|
+
l[1]), a & /*activeGame*/
|
|
55
|
+
16 && (o.bonus = /*activeGame*/
|
|
56
|
+
l[4]), a & /*_internalSize*/
|
|
57
|
+
8 && (o.size = /*_internalSize*/
|
|
58
|
+
l[3]), a & /*radius*/
|
|
59
|
+
128 && (o.radius = /*radius*/
|
|
60
|
+
l[7]), t.$set(o);
|
|
61
|
+
},
|
|
62
|
+
i(l) {
|
|
63
|
+
r || (z(t.$$.fragment, l), r = !0);
|
|
64
|
+
},
|
|
65
|
+
o(l) {
|
|
66
|
+
M(t.$$.fragment, l), r = !1;
|
|
67
|
+
},
|
|
68
|
+
d(l) {
|
|
69
|
+
l && G(e), i[17](null), X(t);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function ce(i) {
|
|
74
|
+
let e, s, t = (
|
|
75
|
+
/*activeGame*/
|
|
76
|
+
i[4] && W(i)
|
|
77
|
+
);
|
|
78
|
+
return {
|
|
79
|
+
c() {
|
|
80
|
+
e = L("div"), t && t.c(), P(e, "class", "PrizeLuckywheelContainer svelte-12d9sfg"), T(
|
|
81
|
+
e,
|
|
82
|
+
"Mobile",
|
|
83
|
+
/*mobileView*/
|
|
84
|
+
i[8]
|
|
85
|
+
);
|
|
86
|
+
},
|
|
87
|
+
m(r, c) {
|
|
88
|
+
R(r, e, c), t && t.m(e, null), i[21](e), s = !0;
|
|
89
|
+
},
|
|
90
|
+
p(r, [c]) {
|
|
91
|
+
/*activeGame*/
|
|
92
|
+
r[4] ? t ? (t.p(r, c), c & /*activeGame*/
|
|
93
|
+
16 && z(t, 1)) : (t = W(r), t.c(), z(t, 1), t.m(e, null)) : t && (I(), M(t, 1, 1, () => {
|
|
94
|
+
t = null;
|
|
95
|
+
}), K());
|
|
96
|
+
},
|
|
97
|
+
i(r) {
|
|
98
|
+
s || (z(t), s = !0);
|
|
99
|
+
},
|
|
100
|
+
o(r) {
|
|
101
|
+
M(t), s = !1;
|
|
102
|
+
},
|
|
103
|
+
d(r) {
|
|
104
|
+
r && G(e), t && t.d(), i[21](null);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
let ue = null;
|
|
109
|
+
function fe(i, e, s) {
|
|
110
|
+
let t, r, c, { data: l = null } = e, { lang: a = "en" } = e, { clientstyling: o = "" } = e, { clientstylingurl: y = "" } = e, { translationurl: w = "" } = e, { mbsource: b = "" } = e, { size: S = 324 } = e, { mobilesize: _ = 240 } = e, { contentdirection: C = "anticlockwise" } = e, k = null, u;
|
|
111
|
+
const v = B(window.navigator.userAgent);
|
|
112
|
+
let f, m = !1;
|
|
113
|
+
se();
|
|
114
|
+
const j = () => {
|
|
115
|
+
fetch(w).then((d) => d.json()).then((d) => {
|
|
116
|
+
Object.keys(d).forEach((h) => {
|
|
117
|
+
ae(h, d[h]);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}, q = (n) => {
|
|
121
|
+
f && f.setDrawResult(n);
|
|
122
|
+
}, D = () => {
|
|
123
|
+
m || (s(6, m = !0), f && f.eventSpin());
|
|
124
|
+
};
|
|
125
|
+
Q(() => {
|
|
126
|
+
const n = (d) => {
|
|
127
|
+
const { type: h, data: J } = d.data;
|
|
128
|
+
h === "PrizeGameResult" ? q(J) : h === "PrizeResultClose" ? (s(6, m = !1), f && f.closeMessage()) : h === "PrizeGameStartAnimation" && D();
|
|
129
|
+
};
|
|
130
|
+
return window.addEventListener("message", n), () => {
|
|
131
|
+
window.removeEventListener("message", n);
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
function p(n) {
|
|
135
|
+
E[n ? "unshift" : "push"](() => {
|
|
136
|
+
f = n, s(5, f);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const x = () => s(6, m = !0), O = () => window.postMessage({ type: "PrizeGameRequestDraw" }, "*"), U = () => window.postMessage({ type: "PrizeGameSpinEnd" }, "*");
|
|
140
|
+
function A(n) {
|
|
141
|
+
E[n ? "unshift" : "push"](() => {
|
|
142
|
+
u = n, s(2, u);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return i.$$set = (n) => {
|
|
146
|
+
"data" in n && s(9, l = n.data), "lang" in n && s(0, a = n.lang), "clientstyling" in n && s(10, o = n.clientstyling), "clientstylingurl" in n && s(11, y = n.clientstylingurl), "translationurl" in n && s(12, w = n.translationurl), "mbsource" in n && s(13, b = n.mbsource), "size" in n && s(14, S = n.size), "mobilesize" in n && s(15, _ = n.mobilesize), "contentdirection" in n && s(1, C = n.contentdirection);
|
|
147
|
+
}, i.$$.update = () => {
|
|
148
|
+
if (i.$$.dirty & /*data*/
|
|
149
|
+
512)
|
|
150
|
+
if (typeof l == "string")
|
|
151
|
+
try {
|
|
152
|
+
s(4, k = JSON.parse(l));
|
|
153
|
+
} catch (n) {
|
|
154
|
+
console.error("[Luckywheel] Parse failed", n);
|
|
155
|
+
}
|
|
156
|
+
else
|
|
157
|
+
s(4, k = l);
|
|
158
|
+
i.$$.dirty & /*lang*/
|
|
159
|
+
1 && a && le(a), i.$$.dirty & /*translationurl*/
|
|
160
|
+
4096 && w && j(), i.$$.dirty & /*clientstyling, rootContainer*/
|
|
161
|
+
1028 && o && u && ee(u, o), i.$$.dirty & /*clientstylingurl, rootContainer*/
|
|
162
|
+
2052 && y && u && te(u, y), i.$$.dirty & /*mbsource, rootContainer*/
|
|
163
|
+
8196 && b && u && ne(u, `${b}.Style`, ue), i.$$.dirty & /*mobilesize, size*/
|
|
164
|
+
49152 && s(16, t = v && _ ? _ : S), i.$$.dirty & /*_size*/
|
|
165
|
+
65536 && s(3, r = t / 0.6875), i.$$.dirty & /*_internalSize*/
|
|
166
|
+
8 && s(7, c = 0.62 * r / 2);
|
|
167
|
+
}, [
|
|
168
|
+
a,
|
|
169
|
+
C,
|
|
170
|
+
u,
|
|
171
|
+
r,
|
|
172
|
+
k,
|
|
173
|
+
f,
|
|
174
|
+
m,
|
|
175
|
+
c,
|
|
176
|
+
v,
|
|
177
|
+
l,
|
|
178
|
+
o,
|
|
179
|
+
y,
|
|
180
|
+
w,
|
|
181
|
+
b,
|
|
182
|
+
S,
|
|
183
|
+
_,
|
|
184
|
+
t,
|
|
185
|
+
p,
|
|
186
|
+
x,
|
|
187
|
+
O,
|
|
188
|
+
U,
|
|
189
|
+
A
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
class ge extends N {
|
|
193
|
+
constructor(e) {
|
|
194
|
+
super(), V(
|
|
195
|
+
this,
|
|
196
|
+
e,
|
|
197
|
+
fe,
|
|
198
|
+
ce,
|
|
199
|
+
F,
|
|
200
|
+
{
|
|
201
|
+
data: 9,
|
|
202
|
+
lang: 0,
|
|
203
|
+
clientstyling: 10,
|
|
204
|
+
clientstylingurl: 11,
|
|
205
|
+
translationurl: 12,
|
|
206
|
+
mbsource: 13,
|
|
207
|
+
size: 14,
|
|
208
|
+
mobilesize: 15,
|
|
209
|
+
contentdirection: 1
|
|
210
|
+
},
|
|
211
|
+
oe
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
get data() {
|
|
215
|
+
return this.$$.ctx[9];
|
|
216
|
+
}
|
|
217
|
+
set data(e) {
|
|
218
|
+
this.$$set({ data: e }), g();
|
|
219
|
+
}
|
|
220
|
+
get lang() {
|
|
221
|
+
return this.$$.ctx[0];
|
|
222
|
+
}
|
|
223
|
+
set lang(e) {
|
|
224
|
+
this.$$set({ lang: e }), g();
|
|
225
|
+
}
|
|
226
|
+
get clientstyling() {
|
|
227
|
+
return this.$$.ctx[10];
|
|
228
|
+
}
|
|
229
|
+
set clientstyling(e) {
|
|
230
|
+
this.$$set({ clientstyling: e }), g();
|
|
231
|
+
}
|
|
232
|
+
get clientstylingurl() {
|
|
233
|
+
return this.$$.ctx[11];
|
|
234
|
+
}
|
|
235
|
+
set clientstylingurl(e) {
|
|
236
|
+
this.$$set({ clientstylingurl: e }), g();
|
|
237
|
+
}
|
|
238
|
+
get translationurl() {
|
|
239
|
+
return this.$$.ctx[12];
|
|
240
|
+
}
|
|
241
|
+
set translationurl(e) {
|
|
242
|
+
this.$$set({ translationurl: e }), g();
|
|
243
|
+
}
|
|
244
|
+
get mbsource() {
|
|
245
|
+
return this.$$.ctx[13];
|
|
246
|
+
}
|
|
247
|
+
set mbsource(e) {
|
|
248
|
+
this.$$set({ mbsource: e }), g();
|
|
249
|
+
}
|
|
250
|
+
get size() {
|
|
251
|
+
return this.$$.ctx[14];
|
|
252
|
+
}
|
|
253
|
+
set size(e) {
|
|
254
|
+
this.$$set({ size: e }), g();
|
|
255
|
+
}
|
|
256
|
+
get mobilesize() {
|
|
257
|
+
return this.$$.ctx[15];
|
|
258
|
+
}
|
|
259
|
+
set mobilesize(e) {
|
|
260
|
+
this.$$set({ mobilesize: e }), g();
|
|
261
|
+
}
|
|
262
|
+
get contentdirection() {
|
|
263
|
+
return this.$$.ctx[1];
|
|
264
|
+
}
|
|
265
|
+
set contentdirection(e) {
|
|
266
|
+
this.$$set({ contentdirection: e }), g();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
customElements.define("prize-engine-luckywheel", ie(ge, { data: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {}, size: {}, mobilesize: {}, contentdirection: {} }, [], [], !0));
|
|
270
|
+
export {
|
|
271
|
+
ge as default
|
|
272
|
+
};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { S as O, i as V, s as F, f as g, d as H, e as W, J as M, H as z, N as I, K, k as R, m as L, o as P, t as T, q as B, r as Q, a1 as X, l as Y, a2 as Z, a3 as $, u as E, E as ee, F as te, G as ne, c as ie } from "./PrizeEngineSuite-DWvvEtv_.js";
|
|
2
|
+
import { s as se, a as le, W as re, b as ae } from "./WheelSVG-MY7KdRdd.js";
|
|
3
|
+
function oe(i) {
|
|
4
|
+
H(i, "svelte-12d9sfg", '.PrizeLuckywheelContainer.svelte-12d9sfg{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;padding:20px;box-sizing:border-box;font-family:var(--emw--font-family-primary, "Ubuntu", sans-serif)}.PrizeLuckywheelContainer.Mobile.svelte-12d9sfg{padding:10px}.MainSection.svelte-12d9sfg{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;position:relative}.WheelWrapper.svelte-12d9sfg{flex-grow:1;display:flex;align-items:center;justify-content:center;min-height:0;width:100%}');
|
|
5
|
+
}
|
|
6
|
+
function G(i) {
|
|
7
|
+
let e, s, t, r, c = {
|
|
8
|
+
lang: (
|
|
9
|
+
/*lang*/
|
|
10
|
+
i[0]
|
|
11
|
+
),
|
|
12
|
+
contentdirection: (
|
|
13
|
+
/*contentdirection*/
|
|
14
|
+
i[1]
|
|
15
|
+
),
|
|
16
|
+
bonus: (
|
|
17
|
+
/*activeGame*/
|
|
18
|
+
i[4]
|
|
19
|
+
),
|
|
20
|
+
size: (
|
|
21
|
+
/*_internalSize*/
|
|
22
|
+
i[3]
|
|
23
|
+
),
|
|
24
|
+
radius: (
|
|
25
|
+
/*radius*/
|
|
26
|
+
i[7]
|
|
27
|
+
)
|
|
28
|
+
};
|
|
29
|
+
return t = new re({ props: c }), i[17](t), t.$on(
|
|
30
|
+
"spinning",
|
|
31
|
+
/*spinning_handler*/
|
|
32
|
+
i[18]
|
|
33
|
+
), t.$on(
|
|
34
|
+
"spinning-request",
|
|
35
|
+
/*spinning_request_handler*/
|
|
36
|
+
i[19]
|
|
37
|
+
), t.$on(
|
|
38
|
+
"success",
|
|
39
|
+
/*success_handler*/
|
|
40
|
+
i[20]
|
|
41
|
+
), {
|
|
42
|
+
c() {
|
|
43
|
+
e = L("div"), s = L("div"), $(t.$$.fragment), P(s, "class", "WheelWrapper svelte-12d9sfg"), P(e, "class", "MainSection svelte-12d9sfg");
|
|
44
|
+
},
|
|
45
|
+
m(l, a) {
|
|
46
|
+
R(l, e, a), Y(e, s), Z(t, s, null), r = !0;
|
|
47
|
+
},
|
|
48
|
+
p(l, a) {
|
|
49
|
+
const o = {};
|
|
50
|
+
a & /*lang*/
|
|
51
|
+
1 && (o.lang = /*lang*/
|
|
52
|
+
l[0]), a & /*contentdirection*/
|
|
53
|
+
2 && (o.contentdirection = /*contentdirection*/
|
|
54
|
+
l[1]), a & /*activeGame*/
|
|
55
|
+
16 && (o.bonus = /*activeGame*/
|
|
56
|
+
l[4]), a & /*_internalSize*/
|
|
57
|
+
8 && (o.size = /*_internalSize*/
|
|
58
|
+
l[3]), a & /*radius*/
|
|
59
|
+
128 && (o.radius = /*radius*/
|
|
60
|
+
l[7]), t.$set(o);
|
|
61
|
+
},
|
|
62
|
+
i(l) {
|
|
63
|
+
r || (z(t.$$.fragment, l), r = !0);
|
|
64
|
+
},
|
|
65
|
+
o(l) {
|
|
66
|
+
M(t.$$.fragment, l), r = !1;
|
|
67
|
+
},
|
|
68
|
+
d(l) {
|
|
69
|
+
l && W(e), i[17](null), X(t);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function ce(i) {
|
|
74
|
+
let e, s, t = (
|
|
75
|
+
/*activeGame*/
|
|
76
|
+
i[4] && G(i)
|
|
77
|
+
);
|
|
78
|
+
return {
|
|
79
|
+
c() {
|
|
80
|
+
e = L("div"), t && t.c(), P(e, "class", "PrizeLuckywheelContainer svelte-12d9sfg"), T(
|
|
81
|
+
e,
|
|
82
|
+
"Mobile",
|
|
83
|
+
/*mobileView*/
|
|
84
|
+
i[8]
|
|
85
|
+
);
|
|
86
|
+
},
|
|
87
|
+
m(r, c) {
|
|
88
|
+
R(r, e, c), t && t.m(e, null), i[21](e), s = !0;
|
|
89
|
+
},
|
|
90
|
+
p(r, [c]) {
|
|
91
|
+
/*activeGame*/
|
|
92
|
+
r[4] ? t ? (t.p(r, c), c & /*activeGame*/
|
|
93
|
+
16 && z(t, 1)) : (t = G(r), t.c(), z(t, 1), t.m(e, null)) : t && (I(), M(t, 1, 1, () => {
|
|
94
|
+
t = null;
|
|
95
|
+
}), K());
|
|
96
|
+
},
|
|
97
|
+
i(r) {
|
|
98
|
+
s || (z(t), s = !0);
|
|
99
|
+
},
|
|
100
|
+
o(r) {
|
|
101
|
+
M(t), s = !1;
|
|
102
|
+
},
|
|
103
|
+
d(r) {
|
|
104
|
+
r && W(e), t && t.d(), i[21](null);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
let ue = null;
|
|
109
|
+
function fe(i, e, s) {
|
|
110
|
+
let t, r, c, { data: l = null } = e, { lang: a = "en" } = e, { clientstyling: o = "" } = e, { clientstylingurl: y = "" } = e, { translationurl: w = "" } = e, { mbsource: b = "" } = e, { size: S = 324 } = e, { mobilesize: _ = 240 } = e, { contentdirection: v = "anticlockwise" } = e, k = null, u;
|
|
111
|
+
const C = B(window.navigator.userAgent);
|
|
112
|
+
let f, m = !1;
|
|
113
|
+
se();
|
|
114
|
+
const q = () => {
|
|
115
|
+
fetch(w).then((d) => d.json()).then((d) => {
|
|
116
|
+
Object.keys(d).forEach((h) => {
|
|
117
|
+
ae(h, d[h]);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}, j = (n) => {
|
|
121
|
+
f && f.setDrawResult(n);
|
|
122
|
+
}, D = () => {
|
|
123
|
+
m || (s(6, m = !0), f && f.eventSpin());
|
|
124
|
+
};
|
|
125
|
+
Q(() => {
|
|
126
|
+
const n = (d) => {
|
|
127
|
+
const { type: h, data: J } = d.data;
|
|
128
|
+
h === "PrizeGameResult" ? j(J) : h === "PrizeResultClose" ? (s(6, m = !1), f && f.closeMessage()) : h === "PrizeGameStartAnimation" && D();
|
|
129
|
+
};
|
|
130
|
+
return window.addEventListener("message", n), () => {
|
|
131
|
+
window.removeEventListener("message", n);
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
function p(n) {
|
|
135
|
+
E[n ? "unshift" : "push"](() => {
|
|
136
|
+
f = n, s(5, f);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const x = () => s(6, m = !0), N = () => window.postMessage({ type: "PrizeGameRequestDraw" }, "*"), U = () => window.postMessage({ type: "PrizeGameSpinEnd" }, "*");
|
|
140
|
+
function A(n) {
|
|
141
|
+
E[n ? "unshift" : "push"](() => {
|
|
142
|
+
u = n, s(2, u);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return i.$$set = (n) => {
|
|
146
|
+
"data" in n && s(9, l = n.data), "lang" in n && s(0, a = n.lang), "clientstyling" in n && s(10, o = n.clientstyling), "clientstylingurl" in n && s(11, y = n.clientstylingurl), "translationurl" in n && s(12, w = n.translationurl), "mbsource" in n && s(13, b = n.mbsource), "size" in n && s(14, S = n.size), "mobilesize" in n && s(15, _ = n.mobilesize), "contentdirection" in n && s(1, v = n.contentdirection);
|
|
147
|
+
}, i.$$.update = () => {
|
|
148
|
+
if (i.$$.dirty & /*data*/
|
|
149
|
+
512)
|
|
150
|
+
if (typeof l == "string")
|
|
151
|
+
try {
|
|
152
|
+
s(4, k = JSON.parse(l));
|
|
153
|
+
} catch (n) {
|
|
154
|
+
console.error("[Luckywheel] Parse failed", n);
|
|
155
|
+
}
|
|
156
|
+
else
|
|
157
|
+
s(4, k = l);
|
|
158
|
+
i.$$.dirty & /*lang*/
|
|
159
|
+
1 && a && le(a), i.$$.dirty & /*translationurl*/
|
|
160
|
+
4096 && w && q(), i.$$.dirty & /*clientstyling, rootContainer*/
|
|
161
|
+
1028 && o && u && ee(u, o), i.$$.dirty & /*clientstylingurl, rootContainer*/
|
|
162
|
+
2052 && y && u && te(u, y), i.$$.dirty & /*mbsource, rootContainer*/
|
|
163
|
+
8196 && b && u && ne(u, `${b}.Style`, ue), i.$$.dirty & /*mobilesize, size*/
|
|
164
|
+
49152 && s(16, t = C && _ ? _ : S), i.$$.dirty & /*_size*/
|
|
165
|
+
65536 && s(3, r = t / 0.6875), i.$$.dirty & /*_internalSize*/
|
|
166
|
+
8 && s(7, c = 0.62 * r / 2);
|
|
167
|
+
}, [
|
|
168
|
+
a,
|
|
169
|
+
v,
|
|
170
|
+
u,
|
|
171
|
+
r,
|
|
172
|
+
k,
|
|
173
|
+
f,
|
|
174
|
+
m,
|
|
175
|
+
c,
|
|
176
|
+
C,
|
|
177
|
+
l,
|
|
178
|
+
o,
|
|
179
|
+
y,
|
|
180
|
+
w,
|
|
181
|
+
b,
|
|
182
|
+
S,
|
|
183
|
+
_,
|
|
184
|
+
t,
|
|
185
|
+
p,
|
|
186
|
+
x,
|
|
187
|
+
N,
|
|
188
|
+
U,
|
|
189
|
+
A
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
class ge extends O {
|
|
193
|
+
constructor(e) {
|
|
194
|
+
super(), V(
|
|
195
|
+
this,
|
|
196
|
+
e,
|
|
197
|
+
fe,
|
|
198
|
+
ce,
|
|
199
|
+
F,
|
|
200
|
+
{
|
|
201
|
+
data: 9,
|
|
202
|
+
lang: 0,
|
|
203
|
+
clientstyling: 10,
|
|
204
|
+
clientstylingurl: 11,
|
|
205
|
+
translationurl: 12,
|
|
206
|
+
mbsource: 13,
|
|
207
|
+
size: 14,
|
|
208
|
+
mobilesize: 15,
|
|
209
|
+
contentdirection: 1
|
|
210
|
+
},
|
|
211
|
+
oe
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
get data() {
|
|
215
|
+
return this.$$.ctx[9];
|
|
216
|
+
}
|
|
217
|
+
set data(e) {
|
|
218
|
+
this.$$set({ data: e }), g();
|
|
219
|
+
}
|
|
220
|
+
get lang() {
|
|
221
|
+
return this.$$.ctx[0];
|
|
222
|
+
}
|
|
223
|
+
set lang(e) {
|
|
224
|
+
this.$$set({ lang: e }), g();
|
|
225
|
+
}
|
|
226
|
+
get clientstyling() {
|
|
227
|
+
return this.$$.ctx[10];
|
|
228
|
+
}
|
|
229
|
+
set clientstyling(e) {
|
|
230
|
+
this.$$set({ clientstyling: e }), g();
|
|
231
|
+
}
|
|
232
|
+
get clientstylingurl() {
|
|
233
|
+
return this.$$.ctx[11];
|
|
234
|
+
}
|
|
235
|
+
set clientstylingurl(e) {
|
|
236
|
+
this.$$set({ clientstylingurl: e }), g();
|
|
237
|
+
}
|
|
238
|
+
get translationurl() {
|
|
239
|
+
return this.$$.ctx[12];
|
|
240
|
+
}
|
|
241
|
+
set translationurl(e) {
|
|
242
|
+
this.$$set({ translationurl: e }), g();
|
|
243
|
+
}
|
|
244
|
+
get mbsource() {
|
|
245
|
+
return this.$$.ctx[13];
|
|
246
|
+
}
|
|
247
|
+
set mbsource(e) {
|
|
248
|
+
this.$$set({ mbsource: e }), g();
|
|
249
|
+
}
|
|
250
|
+
get size() {
|
|
251
|
+
return this.$$.ctx[14];
|
|
252
|
+
}
|
|
253
|
+
set size(e) {
|
|
254
|
+
this.$$set({ size: e }), g();
|
|
255
|
+
}
|
|
256
|
+
get mobilesize() {
|
|
257
|
+
return this.$$.ctx[15];
|
|
258
|
+
}
|
|
259
|
+
set mobilesize(e) {
|
|
260
|
+
this.$$set({ mobilesize: e }), g();
|
|
261
|
+
}
|
|
262
|
+
get contentdirection() {
|
|
263
|
+
return this.$$.ctx[1];
|
|
264
|
+
}
|
|
265
|
+
set contentdirection(e) {
|
|
266
|
+
this.$$set({ contentdirection: e }), g();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
customElements.define("prize-engine-luckywheel", ie(ge, { data: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {}, size: {}, mobilesize: {}, contentdirection: {} }, [], [], !0));
|
|
270
|
+
export {
|
|
271
|
+
ge as default
|
|
272
|
+
};
|