@everymatrix/mini-games-hub 0.1.14 → 0.1.15
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/BackButton-BMWvZ9Lb.js +39 -0
- package/components/BackButton-BNp3jVLa.js +39 -0
- package/components/BackButton-Bi1zFTns.js +38 -0
- package/components/BackButton-BvRNh4nJ.js +39 -0
- package/components/BackButton-C2-HXI2m.cjs +1 -0
- package/components/BackButton-C_v3b0Ky.cjs +1 -0
- package/components/BackButton-D5gfQ3NI.cjs +1 -0
- package/components/BackButton-DOW_OP-H.cjs +1 -0
- package/components/BackButton-DznJk3U4.js +38 -0
- package/components/BackButton-gIVGAf6v.js +38 -0
- package/components/BackButton-s0YqvufR.cjs +1 -0
- package/components/CoinFlip-5qt33VpA.js +399 -0
- package/components/CoinFlip-9-7FNYAn.js +364 -0
- package/components/CoinFlip-B0Q-xZDI.cjs +1 -0
- package/components/CoinFlip-BWNJK7aS.js +402 -0
- package/components/CoinFlip-BaNNMAYb.cjs +1 -0
- package/components/CoinFlip-BgRZmhbg.js +367 -0
- package/components/CoinFlip-COwy7cq1.cjs +1 -0
- package/components/CoinFlip-CSel9VZR.js +398 -0
- package/components/CoinFlip-CfHvSwpV.cjs +1 -0
- package/components/CoinFlip-ClRh6gz2.js +363 -0
- package/components/CoinFlip-D7Bwnl8W.cjs +1 -0
- package/components/CoinFlip-D8OLaQiA.js +367 -0
- package/components/CoinFlip-Dg2ZA_B2.cjs +1 -0
- package/components/CoinFlip-DoASIhfX.cjs +1 -0
- package/components/CoinFlip-pvtcTO4f.cjs +1 -0
- package/components/CoinFlip-vrZpkrnS.js +402 -0
- package/components/CoinRoyale-4Oe-x5-J.cjs +734 -0
- package/components/CoinRoyale-9nHMXODj.js +1017 -0
- package/components/CoinRoyale-B3bu5S4n.cjs +734 -0
- package/components/CoinRoyale-B4dKiGgG.cjs +736 -0
- package/components/CoinRoyale-BNxFDqe1.js +999 -0
- package/components/CoinRoyale-BwNvG3QI.js +1009 -0
- package/components/CoinRoyale-Bza84vCL.cjs +738 -0
- package/components/CoinRoyale-C-x6uDgh.js +989 -0
- package/components/CoinRoyale-CAI2JCvG.js +1020 -0
- package/components/CoinRoyale-CGHKZ-kc.js +997 -0
- package/components/CoinRoyale-CbqmmMPg.cjs +736 -0
- package/components/CoinRoyale-ChWsctqo.cjs +759 -0
- package/components/CoinRoyale-Cw8ImDP5.js +1040 -0
- package/components/CoinRoyale-CxIBSKFK.js +1017 -0
- package/components/CoinRoyale-D-rF6BV4.js +1019 -0
- package/components/CoinRoyale-DH-tQHtT.cjs +736 -0
- package/components/CoinRoyale-DmcgvBwG.js +997 -0
- package/components/CoinRoyale-d2utu3E3.cjs +759 -0
- package/components/CoinRoyale-xAkf1dm_.cjs +738 -0
- package/components/DrawResult-BHZeM1oX.cjs +1 -0
- package/components/DrawResult-BVtwLs-z.js +373 -0
- package/components/DrawResult-CG5KTjF7.cjs +1 -0
- package/components/DrawResult-COyPm6Cv.cjs +1 -0
- package/components/DrawResult-CbLPtjvZ.js +343 -0
- package/components/DrawResult-Cul15bW0.cjs +1 -0
- package/components/DrawResult-DMRODSxk.cjs +1 -0
- package/components/DrawResult-DTJJfQkP.js +373 -0
- package/components/DrawResult-DdL4fFZM.js +343 -0
- package/components/DrawResult-DxG4CaKK.cjs +1 -0
- package/components/DrawResult-SyzKXHgd.js +343 -0
- package/components/DrawResult-ZEAa0flC.js +373 -0
- package/components/GameCard-8k9KvRun.cjs +3 -0
- package/components/GameCard-A3k7RxF5.js +63 -0
- package/components/GameCard-B2td6J8K.js +62 -0
- package/components/{GameCard-BIn8BJ4U.cjs → GameCard-Bku9nP58.cjs} +3 -3
- package/components/GameCard-CBGi9i6m.cjs +3 -0
- package/components/GameCard-CHZmVd6n.cjs +3 -0
- package/components/GameCard-Cj4zAE8_.js +59 -0
- package/components/GameCard-CrKoQU1B.js +59 -0
- package/components/GameCard-DFVjSdtd.cjs +3 -0
- package/components/GameCard-DHetS96-.js +66 -0
- package/components/GameCard-DcWpuwMl.cjs +3 -0
- package/components/GameCard-jIcB63Tt.js +62 -0
- package/components/GameHistory-9Mf_u0La.js +231 -0
- package/components/GameHistory-BktmYuDa.js +231 -0
- package/components/GameHistory-CGAhNQKk.js +231 -0
- package/components/GameHistory-ChYjWDsa.cjs +12 -0
- package/components/GameHistory-CmiIChL-.cjs +12 -0
- package/components/GameHistory-CrrlOaAg.js +231 -0
- package/components/GameHistory-DVsHn3lx.cjs +12 -0
- package/components/GameHistory-_jU0BiqI.js +231 -0
- package/components/GameHistory-aQf3vf9u.cjs +12 -0
- package/components/GameHistory-lyXo0tYb.cjs +12 -0
- package/components/GameHistory-uzrT81kU.js +231 -0
- package/components/GameHistory-v6cI-TIF.cjs +12 -0
- package/components/GamePlaceholder-4oI8uJ-1.cjs +1 -0
- package/components/GamePlaceholder-Bp4nTJeL.js +84 -0
- package/components/GamePlaceholder-COiYGwNi.cjs +15 -0
- package/components/GamePlaceholder-CfJ4hx9w.js +70 -0
- package/components/GamePlaceholder-D9JEXsAk.js +84 -0
- package/components/GamePlaceholder-DGnB06iW.js +71 -0
- package/components/GamePlaceholder-DS5evGU6.js +85 -0
- package/components/GamePlaceholder-DmiU1G7G.cjs +15 -0
- package/components/GamePlaceholder-Dwo_YAUQ.cjs +1 -0
- package/components/GamePlaceholder-Uni3xW09.cjs +15 -0
- package/components/GamePlaceholder-fVPk29f9.cjs +15 -0
- package/components/GamePlaceholder-vUYYV2Ps.js +85 -0
- package/components/GameRules-41OkRwZu.js +115 -0
- package/components/GameRules-BwLJBo6z.cjs +3 -0
- package/components/GameRules-CRiycUU8.js +115 -0
- package/components/GameRules-CTKyBDZO.cjs +3 -0
- package/components/GameRules-CV9sxZYz.js +126 -0
- package/components/GameRules-CuuoMoqN.cjs +3 -0
- package/components/GameRules-Cy7jwBok.js +126 -0
- package/components/GameRules-DUD8OKC0.js +115 -0
- package/components/GameRules-Dkl0qVzr.js +126 -0
- package/components/GameRules-DpGqZdSj.cjs +3 -0
- package/components/GameRules-DrBYjWA6.cjs +3 -0
- package/components/GameRules-DrZ6w0LM.cjs +3 -0
- package/components/MiniGamesHub-BWPRLpyq.cjs +16 -0
- package/components/MiniGamesHub-BXcQ_faH.js +1022 -0
- package/components/MiniGamesHub-BjME_rom.cjs +16 -0
- package/components/{MiniGamesHub-D3n-AyD7.js → MiniGamesHub-Bn-xvO1e.js} +419 -743
- package/components/MiniGamesHub-BpjzFxHO.cjs +16 -0
- package/components/MiniGamesHub-BtC6TmtK.cjs +16 -0
- package/components/MiniGamesHub-C-9Nf-x7.js +1029 -0
- package/components/MiniGamesHub-C0ESIt9P.cjs +16 -0
- package/components/MiniGamesHub-CfIFEVOU.js +1022 -0
- package/components/MiniGamesHub-Cj_6ebsL.cjs +16 -0
- package/components/MiniGamesHub-CktxKKTj.cjs +16 -0
- package/components/MiniGamesHub-CrPltGGl.js +1042 -0
- package/components/MiniGamesHub-D2Eet3pe.js +1048 -0
- package/components/{MiniGamesHub-BYJ7lK90.js → MiniGamesHub-DCCeYwnc.js} +416 -760
- package/components/MiniGamesHub-DuyWceLB.cjs +16 -0
- package/components/MiniGamesHub-Dz8Ltp98.js +1048 -0
- package/components/MiniGamesHub-_uRBhzYg.js +1029 -0
- package/components/MiniGamesHub-kIXoGqbZ.cjs +16 -0
- package/components/MiniGamesHub-v8PPHifq.js +1072 -0
- package/components/MysteryChest-B4h9tqVR.js +1301 -0
- package/components/MysteryChest-BJCFkn02.cjs +737 -0
- package/components/MysteryChest-BXPAdruk.js +1290 -0
- package/components/MysteryChest-BuB9PD57.js +1240 -0
- package/components/MysteryChest-C40hwiCW.cjs +745 -0
- package/components/MysteryChest-CKPELFiF.cjs +737 -0
- package/components/MysteryChest-CRJtPhlo.cjs +743 -0
- package/components/MysteryChest-CScyc3Jw.cjs +745 -0
- package/components/MysteryChest-CheF_Rh5.cjs +739 -0
- package/components/MysteryChest-CrL8IXga.js +1309 -0
- package/components/MysteryChest-CrXzepqD.js +1296 -0
- package/components/MysteryChest-D6eks4QE.js +1254 -0
- package/components/MysteryChest-DJuhkpSa.cjs +743 -0
- package/components/MysteryChest-DOTlHt7A.js +1248 -0
- package/components/MysteryChest-DfggF659.js +1262 -0
- package/components/MysteryChest-Di-dVQnd.cjs +745 -0
- package/components/MysteryChest-DnstXEZJ.js +1298 -0
- package/components/MysteryChest-IcRh-Dcp.js +1247 -0
- package/components/MysteryChest-dyhqTxMg.cjs +739 -0
- package/components/WheelOfFortune--1feiOUD.js +950 -0
- package/components/WheelOfFortune-B0g1znMo.cjs +627 -0
- package/components/{WheelOfFortune--4nTtnMR.cjs → WheelOfFortune-BC0wwnC-.cjs} +6 -6
- package/components/{WheelOfFortune-BjNsD2ND.js → WheelOfFortune-BYxOqBjA.js} +148 -159
- package/components/WheelOfFortune-BgUB1tnc.js +942 -0
- package/components/WheelOfFortune-Bh2XAbs4.cjs +619 -0
- package/components/WheelOfFortune-BwmCnHru.js +926 -0
- package/components/WheelOfFortune-CHgHhi9q.cjs +619 -0
- package/components/WheelOfFortune-CRgnumXh.cjs +627 -0
- package/components/WheelOfFortune-CZ2cERqz.cjs +619 -0
- package/components/WheelOfFortune-CpYsfi8D.js +934 -0
- package/components/WheelOfFortune-Cy64rFDw.js +942 -0
- package/components/WheelOfFortune-DZ7fGpS9.cjs +619 -0
- package/components/WheelOfFortune-DZg0i79U.js +949 -0
- package/components/{WheelOfFortune-DkVQIxzg.js → WheelOfFortune-DawF7WTd.js} +178 -214
- package/components/WheelOfFortune-DjdKhLGF.cjs +617 -0
- package/components/WheelOfFortune-M5VMIsnw.cjs +619 -0
- package/components/WheelOfFortune-kXjxp6t7.js +926 -0
- package/components/WheelOfFortune-pBG33-QJ.js +933 -0
- package/components/WheelOfFortuneWheel-7PqVvd_8.cjs +3 -0
- package/components/WheelOfFortuneWheel-B4fe-idJ.cjs +3 -0
- package/components/WheelOfFortuneWheel-BABzaEBd.js +1812 -0
- package/components/WheelOfFortuneWheel-BQFaJ7ZB.cjs +3 -0
- package/components/WheelOfFortuneWheel-BYEHNHdI.js +1807 -0
- package/components/WheelOfFortuneWheel-BoZ9evN7.cjs +3 -0
- package/components/WheelOfFortuneWheel-BuBjvGRI.cjs +3 -0
- package/components/{WheelOfFortuneWheel-BAR98ByP.js → WheelOfFortuneWheel-CQCLWOFi.js} +310 -302
- package/components/WheelOfFortuneWheel-CsOjhUcv.cjs +3 -0
- package/components/WheelOfFortuneWheel-DUE4gyGP.js +1741 -0
- package/components/{WheelOfFortuneWheel-DxFn6jjg.js → WheelOfFortuneWheel-DXhwrWpD.js} +548 -539
- package/components/WheelOfFortuneWheel-DgVQP4GA.js +1735 -0
- package/components/bg-scene-Bz42V1FW.cjs +1 -0
- package/components/bg-scene-DpHgKCHj.js +4 -0
- package/components/coin-heads-BuJOLpyg.cjs +1 -0
- package/components/coin-heads-loqcEtH2.js +4 -0
- package/components/coin-tails-20vJmhwv.cjs +1 -0
- package/components/coin-tails-BTbsTwkz.js +4 -0
- package/components/confetti-CIk02Iw8.cjs +1 -0
- package/components/confetti-QNsE8ssC.js +14 -0
- package/components/constants-BDMySuIA.cjs +1 -0
- package/components/constants-DNSPUges.cjs +1 -0
- package/components/{constants-BYsDpbRv.js → constants-DdcZGwlM.js} +28 -19
- package/components/constants-DgCBmV7S.js +29 -0
- package/components/constants-Ds7J0meH.cjs +1 -0
- package/components/constants-Q_kcdbM6.js +29 -0
- package/components/countdown-2m_26DZf.js +157 -0
- package/components/countdown-BhZfvy-p.cjs +1 -0
- package/components/countdown-Bp3yWidJ.cjs +1 -0
- package/components/countdown-CH5h-cVr.js +146 -0
- package/components/countdown-CnUPVFlE.cjs +1 -0
- package/components/countdown-DmWNNDzv.js +168 -0
- package/components/countdown-YmZm4DrD.js +146 -0
- package/components/countdown-o9wqo7P7.cjs +1 -0
- package/components/key-CFhvp9Ju.cjs +1 -0
- package/components/key-D1g9LqMU.js +4 -0
- package/components/mystery-chest-bg-CGT-JTBW.js +4 -0
- package/components/mystery-chest-bg-vrQMNafs.cjs +1 -0
- package/components/mystery-chest-empty-CSY7-Vbl.cjs +1 -0
- package/components/mystery-chest-empty-D7bbrCHH.js +4 -0
- package/components/mystery-chest-locked-CIxpYU3v.js +4 -0
- package/components/mystery-chest-locked-DiyrvNm3.cjs +1 -0
- package/components/mystery-chest-win-D1NYItcd.js +4 -0
- package/components/mystery-chest-win-OxXZtQQd.cjs +1 -0
- package/components/remaining-times-Dexper1E.js +52 -0
- package/components/remaining-times-DiYnfuZB.js +23 -0
- package/components/remaining-times-Eqo69UfM.cjs +1 -0
- package/components/remaining-times-Gt6ytHaa.cjs +1 -0
- package/components/sparkles-B2kHtb3R.js +14 -0
- package/components/sparkles-BBLT1jhq.js +14 -0
- package/components/sparkles-BIl7-lvq.cjs +1 -0
- package/components/sparkles-BRrL2C0i.cjs +1 -0
- package/components/sparkles-BXFe6GK6.js +18 -0
- package/components/sparkles-C2rT-gN_.cjs +1 -0
- package/components/sparkles-Cfa1xTlQ.js +14 -0
- package/components/sparkles-Cot5wZXx.cjs +1 -0
- package/components/sparkles-D1RTsqBU.js +18 -0
- package/components/sparkles-DKbGLSaY.cjs +1 -0
- package/components/sparkles-DmL-n8od.cjs +1 -0
- package/components/sparkles-WqrZ-iXs.js +18 -0
- package/components/spin-controller-3wmy9F5-.cjs +1 -0
- package/components/{spin-controller-CIshWmlA.cjs → spin-controller-BF6ymCY4.cjs} +1 -1
- package/components/spin-controller-Bc8nQATS.cjs +1 -0
- package/components/{spin-controller-BuBkKrNR.js → spin-controller-BcBfHUn9.js} +7 -7
- package/components/{spin-controller-REPdRwaB.js → spin-controller-CC3QZvWl.js} +8 -8
- package/components/spin-controller-CEIahkSh.cjs +1 -0
- package/components/spin-controller-CUb1rpPl.js +177 -0
- package/components/spin-controller-CVXfvzb7.cjs +1 -0
- package/components/spin-controller-DBglqs7W.js +175 -0
- package/components/spin-controller-Db-fwR9V.cjs +1 -0
- package/components/spin-controller-DkSQ07IL.js +177 -0
- package/components/spin-controller-Dxxx3-ya.js +175 -0
- package/components/utils-8EFTHKcu.cjs +3 -0
- package/components/utils-AGVOgUGK.cjs +3 -0
- package/components/{utils-C7uxZXaZ.js → utils-B3aNdyMX.js} +968 -958
- package/components/utils-BJHloM10.js +6055 -0
- package/components/utils-C1uNHR_J.cjs +3 -0
- package/components/{utils-d-JrZBJu.js → utils-DEov6Qk_.js} +902 -892
- package/components/utils-DQ220WK3.js +6016 -0
- package/components/utils-DwrHy7a0.js +6007 -0
- package/components/utils-Dwz-wUFC.cjs +3 -0
- package/components/utils-Rda5erjI.cjs +3 -0
- package/components/utils-fG_nzyoc.cjs +3 -0
- package/components/utils-qUyu-MNU.js +6064 -0
- package/es2015/mini-games-hub.cjs +1 -1
- package/es2015/mini-games-hub.js +1 -1
- package/esnext/mini-games-hub.cjs +1 -0
- package/esnext/mini-games-hub.js +1 -1
- package/package.json +12 -13
- package/components/GameCard-D3knomma.js +0 -56
- package/components/GameCard-Ds0FcnPp.js +0 -56
- package/components/MiniGamesHub-zNncMSFn.cjs +0 -94
- package/components/WheelOfFortuneDrawResults-1lzyxrks.cjs +0 -1
- package/components/WheelOfFortuneDrawResults-DQweghnp.js +0 -301
- package/components/WheelOfFortuneDrawResults-dOeQDVub.js +0 -276
- package/components/WheelOfFortuneHistory-CQZ9QtVt.js +0 -232
- package/components/WheelOfFortuneHistory-DZNPM57t.cjs +0 -13
- package/components/WheelOfFortuneHistory-DygZEtcR.js +0 -232
- package/components/WheelOfFortuneRules-D3N1c8PX.js +0 -117
- package/components/WheelOfFortuneRules-DuiCet95.js +0 -128
- package/components/WheelOfFortuneRules-VAMAiK0m.cjs +0 -5
- package/components/WheelOfFortuneWheel-hSjxThyU.cjs +0 -3
- package/components/constants-DM6Vdc6Z.cjs +0 -1
- package/components/sparkles-BnriHiyw.cjs +0 -1
- package/components/sparkles-CSfeD2Zu.js +0 -25
- package/components/sparkles-CTrQ372y.js +0 -29
- package/components/utils-DQIHJIDu.cjs +0 -3
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
var bt = Object.defineProperty, Tt = Object.defineProperties;
|
|
2
|
+
var xt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var $e = Object.getOwnPropertySymbols;
|
|
4
|
+
var Et = Object.prototype.hasOwnProperty, Mt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ee = Math.pow, qe = (m, r, i) => r in m ? bt(m, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : m[r] = i, Me = (m, r) => {
|
|
6
|
+
for (var i in r || (r = {}))
|
|
7
|
+
Et.call(r, i) && qe(m, i, r[i]);
|
|
8
|
+
if ($e)
|
|
9
|
+
for (var i of $e(r))
|
|
10
|
+
Mt.call(r, i) && qe(m, i, r[i]);
|
|
11
|
+
return m;
|
|
12
|
+
}, Be = (m, r) => Tt(m, xt(r));
|
|
13
|
+
var Re = (m, r, i) => new Promise((fe, ie) => {
|
|
14
|
+
var E = (d) => {
|
|
15
|
+
try {
|
|
16
|
+
P(i.next(d));
|
|
17
|
+
} catch (L) {
|
|
18
|
+
ie(L);
|
|
19
|
+
}
|
|
20
|
+
}, O = (d) => {
|
|
21
|
+
try {
|
|
22
|
+
P(i.throw(d));
|
|
23
|
+
} catch (L) {
|
|
24
|
+
ie(L);
|
|
25
|
+
}
|
|
26
|
+
}, P = (d) => d.done ? fe(d.value) : Promise.resolve(d.value).then(E, O);
|
|
27
|
+
P((i = i.apply(m, r)).next());
|
|
28
|
+
});
|
|
29
|
+
import { d as Rt, c as St, p as C, o as At, n as _e, i as ve, l as Se, j, s as A, m as se, b as D, f as Z, u as Pt } from "./WheelOfFortuneWheel-BYEHNHdI.js";
|
|
30
|
+
import { G as Ft, aM as Y, aC as It, W as Ae, au as x, a0 as t, aN as Je, aO as p, aT as _, ah as W, L as Ct, aP as kt, aQ as Lt, aX as Dt, aU as Yt, aV as Ot, aG as k, aR as zt, aW as v, b1 as Nt } from "./utils-B3aNdyMX.js";
|
|
31
|
+
import { E as Pe, R as Ut, T as Ht, k as Vt, j as Xt, l as Fe, m as Gt, n as Ke, o as Qe, p as jt } from "./constants-DgCBmV7S.js";
|
|
32
|
+
import { f as Wt } from "./countdown-YmZm4DrD.js";
|
|
33
|
+
import { c as et } from "./coin-heads-loqcEtH2.js";
|
|
34
|
+
import { c as Zt } from "./coin-tails-BTbsTwkz.js";
|
|
35
|
+
var $t = Z('<div><span class="coin-royale__chev">︿</span> <span class="coin-royale__hint-text"> </span> <span class="coin-royale__chev coin-royale__chev--down">﹀</span></div> <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M9 11V5.5a1.5 1.5 0 0 1 3 0V11h.5V7.5a1.5 1.5 0 0 1 3 0V11h.5V9a1.5 1.5 0 0 1 3 0v6.5c0 3-2 5.5-5.5 5.5H12c-2 0-3.2-.8-4.2-2.3l-2.4-3.6a1.5 1.5 0 0 1 2.3-1.9L9 15.5V11Z"></path></svg>', 1), qt = Z('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-countdown"> </p></div>'), Bt = Z('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-body"> </p> <button class="coin-royale__badge-close" type="button"> </button></div>'), Jt = Z('<span class="coin-royale__flips-loader"></span>'), Kt = Z('<p class="coin-royale__flips"> <span class="coin-royale__flips-count"><img class="coin-royale__flips-icon" alt="" aria-hidden="true"/> <!></span></p>'), Qt = Z('<div class="coin-royale__play"><div class="coin-royale__stage"><div role="button"><div class="coin-royale__coin-shadow"></div> <div class="coin-royale__coin"><div class="coin-royale__coin-drop-shadow" aria-hidden="true"></div> <div class="coin-royale__coin-edge" aria-hidden="true"></div> <div class="coin-royale__face coin-royale__face--front"><img alt="" draggable="false"/></div> <div class="coin-royale__face coin-royale__face--back"><img alt="" draggable="false"/></div></div> <!></div> <!></div></div> <!> <button class="coin-royale__cta" type="button"> </button>', 1);
|
|
36
|
+
function ea(m, r) {
|
|
37
|
+
Ft(r, !0);
|
|
38
|
+
const i = () => kt(Lt, "$_", fe), [fe, ie] = zt();
|
|
39
|
+
let E = C(r, "program", 7, null), O = C(r, "endpoint", 7, null), P = C(r, "session", 7, null), d = C(r, "isAvailable", 7, !1), L = C(r, "spinResults", 15, null), w = C(r, "spinActive", 15, !1), re = C(r, "remainingTimesLoading", 7, !1), pe = C(r, "onFlip", 7, () => {
|
|
40
|
+
}), $ = Y(It({}));
|
|
41
|
+
Ae(() => {
|
|
42
|
+
if (!d() && E()) {
|
|
43
|
+
const e = () => {
|
|
44
|
+
var n, l;
|
|
45
|
+
return x($, Wt((l = (n = E()) == null ? void 0 : n.next) == null ? void 0 : l.startTime), !0);
|
|
46
|
+
};
|
|
47
|
+
e();
|
|
48
|
+
const a = setInterval(e, 1e3);
|
|
49
|
+
return () => clearInterval(a);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
let q = Y(!1);
|
|
53
|
+
Ae(() => {
|
|
54
|
+
if (d()) {
|
|
55
|
+
const e = setTimeout(() => x(q, !0), 2e3);
|
|
56
|
+
return () => clearTimeout(e);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
let B = Y(!1), F = Y(void 0), c = Y(void 0), z = Y(void 0), I = Y(void 0);
|
|
60
|
+
const me = Dt(() => d() && !w() && !t(B) && !re());
|
|
61
|
+
let N = 0, U = !1, J = !1, ge = 0, K = 0, ye = 0, s = null, H = null, Ie, Q = !1;
|
|
62
|
+
const V = (e, a = 1, n = 0) => {
|
|
63
|
+
t(c) && (t(c).style.transform = `translateY(${n}px) rotateX(${e}deg) scale(${a})`);
|
|
64
|
+
};
|
|
65
|
+
Ae(() => {
|
|
66
|
+
if (!t(F) || !t(c) || !t(z)) return;
|
|
67
|
+
Ce(), V(N);
|
|
68
|
+
const e = new ResizeObserver(() => Ce());
|
|
69
|
+
return e.observe(t(F)), () => e.disconnect();
|
|
70
|
+
});
|
|
71
|
+
const Ce = () => {
|
|
72
|
+
if (!t(F) || !t(c) || !t(z)) return;
|
|
73
|
+
const e = t(F).clientWidth;
|
|
74
|
+
if (!e) return;
|
|
75
|
+
const a = e / 2 * Ut, n = Math.max(14, e * Ht), l = 2 * a * Math.tan(Math.PI / Pe) + 0.6;
|
|
76
|
+
t(c).style.setProperty("--half-t", `${(n / 2).toFixed(2)}px`), t(z).replaceChildren();
|
|
77
|
+
for (let o = 0; o < Pe; o++) {
|
|
78
|
+
const f = document.createElement("div");
|
|
79
|
+
f.className = `coin-royale__edge-seg coin-royale__edge-seg--${o % 2 === 0 ? "a" : "b"}`, f.style.width = `${l.toFixed(2)}px`, f.style.height = `${n.toFixed(2)}px`, f.style.transform = `translate(-50%,-50%) rotateZ(${o * 360 / Pe}deg) translateY(${(-a).toFixed(2)}px) rotateX(90deg)`, t(z).appendChild(f);
|
|
80
|
+
}
|
|
81
|
+
}, ke = (e) => {
|
|
82
|
+
N = e, s == null || s.cancel(), s = null, V(e, 1), t(c) && (t(c).style.animation = ""), t(I) && (t(I).style.opacity = "", t(I).style.width = "");
|
|
83
|
+
}, tt = (e, a) => new Promise((n) => {
|
|
84
|
+
if (!t(c)) return n();
|
|
85
|
+
s == null || s.cancel(), s = t(c).animate(e, Me({ fill: "forwards" }, a)), s.onfinish = () => n(), s.oncancel = () => n();
|
|
86
|
+
}), at = (e, a) => Re(this, null, function* () {
|
|
87
|
+
var o;
|
|
88
|
+
const n = new Headers({ "Content-Type": "application/json" });
|
|
89
|
+
P() && n.append("X-SessionId", P());
|
|
90
|
+
const l = yield fetch(new URL(`${O()}/v1/wof/draw/${(o = E()) == null ? void 0 : o.id}`), {
|
|
91
|
+
method: "PUT",
|
|
92
|
+
headers: n,
|
|
93
|
+
cache: "no-store",
|
|
94
|
+
body: JSON.stringify({ action: 1, guid: e }),
|
|
95
|
+
signal: a
|
|
96
|
+
});
|
|
97
|
+
if (!l.ok) throw new Error(`draw request failed: ${l.status}`);
|
|
98
|
+
return l.json();
|
|
99
|
+
}), oe = (e) => Re(this, null, function* () {
|
|
100
|
+
var ee, te;
|
|
101
|
+
if (!t(me) || !t(c) || !t(F) || !O()) return;
|
|
102
|
+
pe()();
|
|
103
|
+
const a = typeof e == "number" ? e : N;
|
|
104
|
+
w(!0), x(q, !0), x(B, !1), s == null || s.cancel();
|
|
105
|
+
const n = -(t(F).clientHeight * Vt);
|
|
106
|
+
t(I) && (t(I).style.opacity = "0.3", t(I).style.width = "34%");
|
|
107
|
+
const l = () => new Promise((h, R) => requestAnimationFrame((be) => Q ? R(new Error("destroyed")) : h(be)));
|
|
108
|
+
let o = !1, f = !1, g;
|
|
109
|
+
const T = Yt(), u = new AbortController();
|
|
110
|
+
H = u;
|
|
111
|
+
const M = Promise.race([
|
|
112
|
+
at(T, u.signal),
|
|
113
|
+
new Promise((h, R) => {
|
|
114
|
+
g = setTimeout(
|
|
115
|
+
() => {
|
|
116
|
+
f = !0, u.abort(), R(new Error("draw timed out"));
|
|
117
|
+
},
|
|
118
|
+
Xt
|
|
119
|
+
);
|
|
120
|
+
})
|
|
121
|
+
]);
|
|
122
|
+
M.then(() => o = !0, () => o = !0);
|
|
123
|
+
let y = a;
|
|
124
|
+
try {
|
|
125
|
+
let h = yield l();
|
|
126
|
+
const R = h;
|
|
127
|
+
for (; !o || h - R < Fe; ) {
|
|
128
|
+
const S = yield l(), X = Math.min(S - h, 50) / 1e3;
|
|
129
|
+
h = S;
|
|
130
|
+
const ae = S - R, G = Math.min(ae / Gt, 1);
|
|
131
|
+
y += Ke * G * G * (3 - 2 * G) * X;
|
|
132
|
+
const ne = Math.min(ae / Fe, 1), ue = 1 - Ee(1 - ne, 3), Ze = ne >= 1 ? Math.sin((ae - Fe) / 380) * 0.015 : 0;
|
|
133
|
+
V(y, 1 + Qe * (ue + Ze), n * (ue + Ze));
|
|
134
|
+
}
|
|
135
|
+
const be = yield M;
|
|
136
|
+
clearTimeout(g);
|
|
137
|
+
const de = Ot(be, "draw");
|
|
138
|
+
if (de.success !== !0) throw new Error("draw failed");
|
|
139
|
+
const gt = Be(Me({}, de), {
|
|
140
|
+
guid: T,
|
|
141
|
+
lotteryProgramID: (te = de.lotteryProgramID) != null ? te : (ee = E()) == null ? void 0 : ee.id
|
|
142
|
+
}), yt = de.type === "noprize" ? 180 : 0, je = 360, Te = je + (yt - ((y + je) % 360 + 360) % 360 + 360) % 360, ht = y + Te, We = 2 * Te / Ke * 1e3, wt = y, xe = yield l();
|
|
143
|
+
for (let S = xe; S - xe < We; S = yield l()) {
|
|
144
|
+
const X = (S - xe) / We, ae = 1 - Ee(1 - X, 2), G = Math.min(X / 0.78, 1), ne = 1 - G * G, ue = X > 0.78 ? Math.sin((X - 0.78) / 0.22 * Math.PI) * 5 : 0;
|
|
145
|
+
V(wt + Te * ae, 1 + Qe * ne, n * ne + ue);
|
|
146
|
+
}
|
|
147
|
+
if (ke(ht), yield new Promise((S) => Ie = setTimeout(S, 550)), Q) return;
|
|
148
|
+
L(gt), w(!1);
|
|
149
|
+
} catch (h) {
|
|
150
|
+
if (clearTimeout(g), Q) return;
|
|
151
|
+
console.log(h);
|
|
152
|
+
const R = y + ((a - y) % 360 + 360) % 360;
|
|
153
|
+
if (t(c) && (yield tt(
|
|
154
|
+
[
|
|
155
|
+
{ transform: t(c).style.transform },
|
|
156
|
+
{ transform: `translateY(0px) rotateX(${R}deg) scale(1)` }
|
|
157
|
+
],
|
|
158
|
+
{ duration: 420, easing: "cubic-bezier(.55,0,.75,.4)" }
|
|
159
|
+
)), Q) return;
|
|
160
|
+
ke(R), f && x(B, !0), w(!1);
|
|
161
|
+
} finally {
|
|
162
|
+
H === u && (H = null);
|
|
163
|
+
}
|
|
164
|
+
}), nt = () => {
|
|
165
|
+
x(B, !1), w(!1);
|
|
166
|
+
}, Le = (e) => {
|
|
167
|
+
t(c) && (s == null || s.cancel(), s = t(c).animate(
|
|
168
|
+
[
|
|
169
|
+
{ transform: `translateY(0px) rotateX(${e}deg) scale(1)` },
|
|
170
|
+
{
|
|
171
|
+
transform: `translateY(0px) rotateX(${N}deg) scale(1)`
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
{
|
|
175
|
+
duration: 320,
|
|
176
|
+
easing: "cubic-bezier(.22,.61,.32,1)",
|
|
177
|
+
fill: "forwards"
|
|
178
|
+
}
|
|
179
|
+
), s.onfinish = () => {
|
|
180
|
+
s == null || s.cancel(), s = null, V(N, 1), t(c) && (t(c).style.animation = "");
|
|
181
|
+
});
|
|
182
|
+
}, st = (e) => {
|
|
183
|
+
t(me) && (U = !0, J = !1, ge = e.clientY, ye = 0, K = N, s == null || s.cancel(), t(c) && (t(c).style.animation = "none"), x(q, !0));
|
|
184
|
+
}, De = (e) => {
|
|
185
|
+
if (!U || w()) return;
|
|
186
|
+
const a = ge - e.clientY;
|
|
187
|
+
ye = a, Math.abs(a) > 4 && (J = !0), V(K + a * 1.1, 1 + Math.min(Math.abs(a) / 400, 0.12));
|
|
188
|
+
}, Ye = (e) => {
|
|
189
|
+
if (!U) return;
|
|
190
|
+
U = !1;
|
|
191
|
+
const a = ge - e.clientY;
|
|
192
|
+
if (Math.abs(a) > jt) {
|
|
193
|
+
oe(K + a * 1.1);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
Le(K + a * 1.1);
|
|
197
|
+
}, Oe = () => {
|
|
198
|
+
U && (U = !1, J = !1, Le(K + ye * 1.1));
|
|
199
|
+
}, it = () => {
|
|
200
|
+
if (J) {
|
|
201
|
+
J = !1;
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
oe();
|
|
205
|
+
};
|
|
206
|
+
At(() => (window.addEventListener("pointermove", De), window.addEventListener("pointerup", Ye), window.addEventListener("pointercancel", Oe), () => {
|
|
207
|
+
Q = !0, H == null || H.abort(), clearTimeout(Ie), window.removeEventListener("pointermove", De), window.removeEventListener("pointerup", Ye), window.removeEventListener("pointercancel", Oe), s == null || s.cancel();
|
|
208
|
+
}));
|
|
209
|
+
var rt = {
|
|
210
|
+
get program() {
|
|
211
|
+
return E();
|
|
212
|
+
},
|
|
213
|
+
set program(e = null) {
|
|
214
|
+
E(e), k();
|
|
215
|
+
},
|
|
216
|
+
get endpoint() {
|
|
217
|
+
return O();
|
|
218
|
+
},
|
|
219
|
+
set endpoint(e = null) {
|
|
220
|
+
O(e), k();
|
|
221
|
+
},
|
|
222
|
+
get session() {
|
|
223
|
+
return P();
|
|
224
|
+
},
|
|
225
|
+
set session(e = null) {
|
|
226
|
+
P(e), k();
|
|
227
|
+
},
|
|
228
|
+
get isAvailable() {
|
|
229
|
+
return d();
|
|
230
|
+
},
|
|
231
|
+
set isAvailable(e = !1) {
|
|
232
|
+
d(e), k();
|
|
233
|
+
},
|
|
234
|
+
get spinResults() {
|
|
235
|
+
return L();
|
|
236
|
+
},
|
|
237
|
+
set spinResults(e = null) {
|
|
238
|
+
L(e), k();
|
|
239
|
+
},
|
|
240
|
+
get spinActive() {
|
|
241
|
+
return w();
|
|
242
|
+
},
|
|
243
|
+
set spinActive(e = !1) {
|
|
244
|
+
w(e), k();
|
|
245
|
+
},
|
|
246
|
+
get remainingTimesLoading() {
|
|
247
|
+
return re();
|
|
248
|
+
},
|
|
249
|
+
set remainingTimesLoading(e = !1) {
|
|
250
|
+
re(e), k();
|
|
251
|
+
},
|
|
252
|
+
get onFlip() {
|
|
253
|
+
return pe();
|
|
254
|
+
},
|
|
255
|
+
set onFlip(e = () => {
|
|
256
|
+
}) {
|
|
257
|
+
pe(e), k();
|
|
258
|
+
}
|
|
259
|
+
}, ze = Qt(), he = Je(ze), Ne = _(he), b = _(Ne);
|
|
260
|
+
let Ue;
|
|
261
|
+
var He = _(b);
|
|
262
|
+
_e(He, (e) => x(I, e), () => t(I));
|
|
263
|
+
var le = p(He, 2), Ve = p(_(le), 2);
|
|
264
|
+
_e(Ve, (e) => x(z, e), () => t(z));
|
|
265
|
+
var we = p(Ve, 2), ot = _(we);
|
|
266
|
+
v(we);
|
|
267
|
+
var Xe = p(we, 2), lt = _(Xe);
|
|
268
|
+
v(Xe), v(le), _e(le, (e) => x(c, e), () => t(c));
|
|
269
|
+
var ct = p(le, 2);
|
|
270
|
+
{
|
|
271
|
+
var dt = (e) => {
|
|
272
|
+
var a = $t(), n = Je(a);
|
|
273
|
+
let l;
|
|
274
|
+
var o = p(_(n), 2), f = _(o, !0);
|
|
275
|
+
v(o), Nt(2), v(n);
|
|
276
|
+
var g = p(n, 2);
|
|
277
|
+
let T;
|
|
278
|
+
W(
|
|
279
|
+
(u) => {
|
|
280
|
+
l = Se(n, 1, "coin-royale__drag-hint", null, l, {
|
|
281
|
+
"coin-royale__drag-hint--hidden": t(q) || w()
|
|
282
|
+
}), A(f, u), T = Se(g, 0, "coin-royale__finger-cue", null, T, {
|
|
283
|
+
"coin-royale__finger-cue--hidden": t(q) || w()
|
|
284
|
+
});
|
|
285
|
+
},
|
|
286
|
+
[() => i()("dragToFlip")]
|
|
287
|
+
), D(e, a);
|
|
288
|
+
};
|
|
289
|
+
ve(ct, (e) => {
|
|
290
|
+
d() && e(dt);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
v(b), _e(b, (e) => x(F, e), () => t(F));
|
|
294
|
+
var ut = p(b, 2);
|
|
295
|
+
{
|
|
296
|
+
var _t = (e) => {
|
|
297
|
+
var a = qt(), n = _(a), l = _(n, !0);
|
|
298
|
+
v(n);
|
|
299
|
+
var o = p(n, 2), f = _(o, !0);
|
|
300
|
+
v(o), v(a), W(
|
|
301
|
+
(g, T) => {
|
|
302
|
+
A(l, g), A(f, T);
|
|
303
|
+
},
|
|
304
|
+
[
|
|
305
|
+
() => i()("nextAvailable"),
|
|
306
|
+
() => i()("countdown", {
|
|
307
|
+
values: {
|
|
308
|
+
days: t($).days,
|
|
309
|
+
hours: t($).hours,
|
|
310
|
+
minutes: t($).minutes,
|
|
311
|
+
seconds: t($).seconds
|
|
312
|
+
}
|
|
313
|
+
})
|
|
314
|
+
]
|
|
315
|
+
), D(e, a);
|
|
316
|
+
}, vt = (e) => {
|
|
317
|
+
var a = Bt(), n = _(a), l = _(n, !0);
|
|
318
|
+
v(n);
|
|
319
|
+
var o = p(n, 2), f = _(o, !0);
|
|
320
|
+
v(o);
|
|
321
|
+
var g = p(o, 2), T = _(g, !0);
|
|
322
|
+
v(g), v(a), W(
|
|
323
|
+
(u, M, y) => {
|
|
324
|
+
A(l, u), A(f, M), A(T, y);
|
|
325
|
+
},
|
|
326
|
+
[
|
|
327
|
+
() => i()("timeoutTitle"),
|
|
328
|
+
() => i()("timeoutDescription"),
|
|
329
|
+
() => i()("close")
|
|
330
|
+
]
|
|
331
|
+
), se("click", g, nt), D(e, a);
|
|
332
|
+
};
|
|
333
|
+
ve(ut, (e) => {
|
|
334
|
+
d() ? t(B) && e(vt, 1) : e(_t);
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
v(Ne), v(he);
|
|
338
|
+
var Ge = p(he, 2);
|
|
339
|
+
{
|
|
340
|
+
var ft = (e) => {
|
|
341
|
+
var a = Kt(), n = _(a), l = p(n), o = _(l), f = p(o, 2);
|
|
342
|
+
{
|
|
343
|
+
var g = (u) => {
|
|
344
|
+
var M = Jt();
|
|
345
|
+
D(u, M);
|
|
346
|
+
}, T = (u) => {
|
|
347
|
+
var M = Pt();
|
|
348
|
+
W(() => {
|
|
349
|
+
var y, ee, te, h;
|
|
350
|
+
return A(M, (h = (ee = (y = E()) == null ? void 0 : y.current) == null ? void 0 : ee.remainingTimes) != null ? h : (te = E()) == null ? void 0 : te.remainingTimes);
|
|
351
|
+
}), D(u, M);
|
|
352
|
+
};
|
|
353
|
+
ve(f, (u) => {
|
|
354
|
+
re() ? u(g) : u(T, -1);
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
v(l), v(a), W(
|
|
358
|
+
(u) => {
|
|
359
|
+
A(n, `${u != null ? u : ""} `), j(o, "src", et);
|
|
360
|
+
},
|
|
361
|
+
[() => i()("remainingFlips")]
|
|
362
|
+
), D(e, a);
|
|
363
|
+
};
|
|
364
|
+
ve(Ge, (e) => {
|
|
365
|
+
d() && e(ft);
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
var ce = p(Ge, 2), pt = _(ce, !0);
|
|
369
|
+
v(ce), W(
|
|
370
|
+
(e, a) => {
|
|
371
|
+
Ue = Se(b, 1, "coin-royale__flip-zone", null, Ue, {
|
|
372
|
+
"coin-royale__flip-zone--disabled": !d(),
|
|
373
|
+
"coin-royale__flip-zone--settling": w()
|
|
374
|
+
}), j(b, "tabindex", d() ? 0 : -1), j(b, "aria-label", e), j(b, "aria-disabled", !t(me)), j(ot, "src", et), j(lt, "src", Zt), ce.disabled = !d(), A(pt, a);
|
|
375
|
+
},
|
|
376
|
+
[() => i()("flipCoin"), () => i()("flipCoin")]
|
|
377
|
+
), se("pointerdown", b, st), se("click", b, it), se("keydown", b, (e) => {
|
|
378
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), oe());
|
|
379
|
+
}), se("click", ce, () => oe()), D(m, ze);
|
|
380
|
+
var mt = Ct(rt);
|
|
381
|
+
return ie(), mt;
|
|
382
|
+
}
|
|
383
|
+
Rt(["pointerdown", "click", "keydown"]);
|
|
384
|
+
St(
|
|
385
|
+
ea,
|
|
386
|
+
{
|
|
387
|
+
program: {},
|
|
388
|
+
endpoint: {},
|
|
389
|
+
session: {},
|
|
390
|
+
isAvailable: {},
|
|
391
|
+
spinResults: {},
|
|
392
|
+
spinActive: {},
|
|
393
|
+
remainingTimesLoading: {},
|
|
394
|
+
onFlip: {}
|
|
395
|
+
},
|
|
396
|
+
[],
|
|
397
|
+
[],
|
|
398
|
+
{ mode: "open" }
|
|
399
|
+
);
|
|
400
|
+
export {
|
|
401
|
+
ea as C
|
|
402
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var it=Object.defineProperty,at=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var ke=Object.getOwnPropertySymbols;var ot=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var ge=Math.pow,Ce=(p,o,r)=>o in p?it(p,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):p[o]=r,ue=(p,o)=>{for(var r in o||(o={}))ot.call(o,r)&&Ce(p,r,o[r]);if(ke)for(var r of ke(o))lt.call(o,r)&&Ce(p,r,o[r]);return p},De=(p,o)=>at(p,rt(o));var fe=(p,o,r)=>new Promise((te,$)=>{var E=g=>{try{M(r.next(g))}catch(R){$(R)}},F=g=>{try{M(r.throw(g))}catch(R){$(R)}},M=g=>g.done?te(g.value):Promise.resolve(g.value).then(E,F);M((r=r.apply(p,o)).next())});const n=require("./WheelOfFortuneWheel-B4fe-idJ.cjs"),e=require("./utils-Rda5erjI.cjs"),f=require("./constants-DNSPUges.cjs"),ct=require("./countdown-Bp3yWidJ.cjs"),Le=require("./coin-heads-BuJOLpyg.cjs"),dt=require("./coin-tails-20vJmhwv.cjs");var _t=n.from_html('<div><span class="coin-royale__chev">︿</span> <span class="coin-royale__hint-text"> </span> <span class="coin-royale__chev coin-royale__chev--down">﹀</span></div> <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M9 11V5.5a1.5 1.5 0 0 1 3 0V11h.5V7.5a1.5 1.5 0 0 1 3 0V11h.5V9a1.5 1.5 0 0 1 3 0v6.5c0 3-2 5.5-5.5 5.5H12c-2 0-3.2-.8-4.2-2.3l-2.4-3.6a1.5 1.5 0 0 1 2.3-1.9L9 15.5V11Z"></path></svg>',1),gt=n.from_html('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-countdown"> </p></div>'),ut=n.from_html('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-body"> </p> <button class="coin-royale__badge-close" type="button"> </button></div>'),ft=n.from_html('<span class="coin-royale__flips-loader"></span>'),pt=n.from_html('<p class="coin-royale__flips"> <span class="coin-royale__flips-count"><img class="coin-royale__flips-icon" alt="" aria-hidden="true"/> <!></span></p>'),vt=n.from_html('<div class="coin-royale__play"><div class="coin-royale__stage"><div role="button"><div class="coin-royale__coin-shadow"></div> <div class="coin-royale__coin"><div class="coin-royale__coin-drop-shadow" aria-hidden="true"></div> <div class="coin-royale__coin-edge" aria-hidden="true"></div> <div class="coin-royale__face coin-royale__face--front"><img alt="" draggable="false"/></div> <div class="coin-royale__face coin-royale__face--back"><img alt="" draggable="false"/></div></div> <!></div> <!></div></div> <!> <button class="coin-royale__cta" type="button"> </button>',1);function Ne(p,o){e.push(o,!0);const r=()=>e.store_get(e.$format,"$_",te),[te,$]=e.setup_stores();let E=n.prop(o,"program",7,null),F=n.prop(o,"endpoint",7,null),M=n.prop(o,"session",7,null),g=n.prop(o,"isAvailable",7,!1),R=n.prop(o,"spinResults",15,null),y=n.prop(o,"spinActive",15,!1),j=n.prop(o,"remainingTimesLoading",7,!1),ne=n.prop(o,"onFlip",7,()=>{}),z=e.state(e.proxy({}));e.user_effect(()=>{if(!g()&&E()){const t=()=>{var i,c;return e.set(z,ct.formatTimeRemaining((c=(i=E())==null?void 0:i.next)==null?void 0:c.startTime),!0)};t();const s=setInterval(t,1e3);return()=>clearInterval(s)}});let P=e.state(!1),se;const Ye=()=>{clearTimeout(se),se=setTimeout(()=>e.set(P,!1),400)};let G=e.state(!1),I=e.state(void 0),d=e.state(void 0),k=e.state(void 0),A=e.state(void 0);const ie=e.user_derived(()=>g()&&!y()&&!e.get(G)&&!j());let C=0,D=!1,q=!1,ae=0,U=0,re=0,a=null,L=null,pe,N=!1;const Y=(t,s=1,i=0)=>{e.get(d)&&(e.get(d).style.transform=`translateY(${i}px) rotateX(${t}deg) scale(${s})`)};e.user_effect(()=>{if(!e.get(I)||!e.get(d)||!e.get(k))return;ve(),Y(C);const t=new ResizeObserver(()=>ve());return t.observe(e.get(I)),()=>t.disconnect()});const ve=()=>{if(!e.get(I)||!e.get(d)||!e.get(k))return;const t=e.get(I).clientWidth;if(!t)return;const s=t/2*f.RIM_FACTOR,i=Math.max(14,t*f.THICKNESS_FACTOR),c=2*s*Math.tan(Math.PI/f.EDGE_SEGMENTS)+.6;e.get(d).style.setProperty("--half-t",`${(i/2).toFixed(2)}px`),e.get(k).replaceChildren();for(let l=0;l<f.EDGE_SEGMENTS;l++){const u=document.createElement("div");u.className=`coin-royale__edge-seg coin-royale__edge-seg--${l%2===0?"a":"b"}`,u.style.width=`${c.toFixed(2)}px`,u.style.height=`${i.toFixed(2)}px`,u.style.transform=`translate(-50%,-50%) rotateZ(${l*360/f.EDGE_SEGMENTS}deg) translateY(${(-s).toFixed(2)}px) rotateX(90deg)`,e.get(k).appendChild(u)}},me=t=>{C=t,a==null||a.cancel(),a=null,Y(t,1),e.get(d)&&(e.get(d).style.animation=""),e.get(A)&&(e.get(A).style.opacity="",e.get(A).style.width="")},He=(t,s)=>new Promise(i=>{if(!e.get(d))return i();a==null||a.cancel(),a=e.get(d).animate(t,ue({fill:"forwards"},s)),a.onfinish=()=>i(),a.oncancel=()=>i()}),Oe=(t,s)=>fe(this,null,function*(){var l;const i=new Headers({"Content-Type":"application/json"});M()&&i.append("X-SessionId",M());const c=yield fetch(new URL(`${F()}/v1/wof/draw/${(l=E())==null?void 0:l.id}`),{method:"PUT",headers:i,cache:"no-store",body:JSON.stringify({action:1,guid:t}),signal:s});if(!c.ok)throw new Error(`draw request failed: ${c.status}`);return c.json()}),B=t=>fe(this,null,function*(){var V,X;if(!e.get(ie)||!e.get(d)||!e.get(I)||!F())return;ne()();const s=typeof t=="number"?t:C;y(!0),e.set(P,!0),e.set(G,!1),a==null||a.cancel();const i=-(e.get(I).clientHeight*f.RISE_FACTOR);e.get(A)&&(e.get(A).style.opacity="0.3",e.get(A).style.width="34%");const c=()=>new Promise((h,S)=>requestAnimationFrame(ce=>N?S(new Error("destroyed")):h(ce)));let l=!1,u=!1,v;const w=e.generateUUID(),_=new AbortController;L=_;const x=Promise.race([Oe(w,_.signal),new Promise((h,S)=>{v=setTimeout(()=>{u=!0,_.abort(),S(new Error("draw timed out"))},f.SPIN_TIMEOUT_MS)})]);x.then(()=>l=!0,()=>l=!0);let m=s;try{let h=yield c();const S=h;for(;!l||h-S<f.RISE_MS;){const T=yield c(),H=Math.min(T-h,50)/1e3;h=T;const W=T-S,O=Math.min(W/f.SPIN_UP_MS,1);m+=f.SPIN_SPEED*O*O*(3-2*O)*H;const Z=Math.min(W/f.RISE_MS,1),ee=1-ge(1-Z,3),Pe=Z>=1?Math.sin((W-f.RISE_MS)/380)*.015:0;Y(m,1+f.SCALE_GAIN*(ee+Pe),i*(ee+Pe))}const ce=yield x;clearTimeout(v);const Q=e.normalizeDrawResult(ce,"draw");if(Q.success!==!0)throw new Error("draw failed");const et=De(ue({},Q),{guid:w,lotteryProgramID:(X=Q.lotteryProgramID)!=null?X:(V=E())==null?void 0:V.id}),tt=Q.type==="noprize"?180:0,Re=360,de=Re+(tt-((m+Re)%360+360)%360+360)%360,nt=m+de,Fe=2*de/f.SPIN_SPEED*1e3,st=m,_e=yield c();for(let T=_e;T-_e<Fe;T=yield c()){const H=(T-_e)/Fe,W=1-ge(1-H,2),O=Math.min(H/.78,1),Z=1-O*O,ee=H>.78?Math.sin((H-.78)/.22*Math.PI)*5:0;Y(st+de*W,1+f.SCALE_GAIN*Z,i*Z+ee)}if(me(nt),yield new Promise(T=>pe=setTimeout(T,550)),N)return;R(et),y(!1)}catch(h){if(clearTimeout(v),N)return;console.log(h);const S=m+((s-m)%360+360)%360;if(e.get(d)&&(yield He([{transform:e.get(d).style.transform},{transform:`translateY(0px) rotateX(${S}deg) scale(1)`}],{duration:420,easing:"cubic-bezier(.55,0,.75,.4)"})),N)return;me(S),u&&e.set(G,!0),y(!1)}finally{L===_&&(L=null),N||Ye()}}),ze=()=>{e.set(G,!1),y(!1)},he=t=>{e.get(d)&&(a==null||a.cancel(),a=e.get(d).animate([{transform:`translateY(0px) rotateX(${t}deg) scale(1)`},{transform:`translateY(0px) rotateX(${C}deg) scale(1)`}],{duration:320,easing:"cubic-bezier(.22,.61,.32,1)",fill:"forwards"}),a.onfinish=()=>{a==null||a.cancel(),a=null,Y(C,1),e.get(d)&&(e.get(d).style.animation=""),e.set(P,!1)})},Ge=t=>{e.get(ie)&&(D=!0,q=!1,ae=t.clientY,re=0,U=C,a==null||a.cancel(),e.get(d)&&(e.get(d).style.animation="none"),e.set(P,!0))},ye=t=>{if(!D||y())return;const s=ae-t.clientY;re=s,Math.abs(s)>4&&(q=!0),Y(U+s*1.1,1+Math.min(Math.abs(s)/400,.12))},be=t=>{if(!D)return;D=!1;const s=ae-t.clientY;if(Math.abs(s)>f.DRAG_THRESHOLD){B(U+s*1.1);return}he(U+s*1.1)},we=()=>{D&&(D=!1,q=!1,he(U+re*1.1))},qe=()=>{if(q){q=!1;return}B()};n.onMount(()=>(window.addEventListener("pointermove",ye),window.addEventListener("pointerup",be),window.addEventListener("pointercancel",we),()=>{N=!0,L==null||L.abort(),clearTimeout(pe),clearTimeout(se),window.removeEventListener("pointermove",ye),window.removeEventListener("pointerup",be),window.removeEventListener("pointercancel",we),a==null||a.cancel()}));var Ue={get program(){return E()},set program(t=null){E(t),e.flushSync()},get endpoint(){return F()},set endpoint(t=null){F(t),e.flushSync()},get session(){return M()},set session(t=null){M(t),e.flushSync()},get isAvailable(){return g()},set isAvailable(t=!1){g(t),e.flushSync()},get spinResults(){return R()},set spinResults(t=null){R(t),e.flushSync()},get spinActive(){return y()},set spinActive(t=!1){y(t),e.flushSync()},get remainingTimesLoading(){return j()},set remainingTimesLoading(t=!1){j(t),e.flushSync()},get onFlip(){return ne()},set onFlip(t=()=>{}){ne(t),e.flushSync()}},Ee=vt(),oe=e.first_child(Ee),xe=e.child(oe),b=e.child(xe);let Se;var Te=e.child(b);n.bind_this(Te,t=>e.set(A,t),()=>e.get(A));var J=e.sibling(Te,2),Me=e.sibling(e.child(J),2);n.bind_this(Me,t=>e.set(k,t),()=>e.get(k));var le=e.sibling(Me,2),Ve=e.child(le);e.reset(le);var Ie=e.sibling(le,2),Xe=e.child(Ie);e.reset(Ie),e.reset(J),n.bind_this(J,t=>e.set(d,t),()=>e.get(d));var We=e.sibling(J,2);{var Ze=t=>{var s=_t(),i=e.first_child(s);let c;var l=e.sibling(e.child(i),2),u=e.child(l,!0);e.reset(l),e.next(2),e.reset(i);var v=e.sibling(i,2);let w;e.template_effect(_=>{c=n.set_class(i,1,"coin-royale__drag-hint",null,c,{"coin-royale__drag-hint--hidden":e.get(P)||y()}),n.set_text(u,_),w=n.set_class(v,0,"coin-royale__finger-cue",null,w,{"coin-royale__finger-cue--hidden":e.get(P)||y()})},[()=>r()("dragToFlip")]),n.append(t,s)};n.if_block(We,t=>{g()&&t(Ze)})}e.reset(b),n.bind_this(b,t=>e.set(I,t),()=>e.get(I));var $e=e.sibling(b,2);{var je=t=>{var s=gt(),i=e.child(s),c=e.child(i,!0);e.reset(i);var l=e.sibling(i,2),u=e.child(l,!0);e.reset(l),e.reset(s),e.template_effect((v,w)=>{n.set_text(c,v),n.set_text(u,w)},[()=>r()("nextAvailable"),()=>r()("countdown",{values:{days:e.get(z).days,hours:e.get(z).hours,minutes:e.get(z).minutes,seconds:e.get(z).seconds}})]),n.append(t,s)},Be=t=>{var s=ut(),i=e.child(s),c=e.child(i,!0);e.reset(i);var l=e.sibling(i,2),u=e.child(l,!0);e.reset(l);var v=e.sibling(l,2),w=e.child(v,!0);e.reset(v),e.reset(s),e.template_effect((_,x,m)=>{n.set_text(c,_),n.set_text(u,x),n.set_text(w,m)},[()=>r()("timeoutTitle"),()=>r()("timeoutDescription"),()=>r()("close")]),n.delegated("click",v,ze),n.append(t,s)};n.if_block($e,t=>{g()?e.get(G)&&t(Be,1):t(je)})}e.reset(xe),e.reset(oe);var Ae=e.sibling(oe,2);{var Je=t=>{var s=pt(),i=e.child(s),c=e.sibling(i),l=e.child(c),u=e.sibling(l,2);{var v=_=>{var x=ft();n.append(_,x)},w=_=>{var x=n.text();e.template_effect(()=>{var m,V,X,h;return n.set_text(x,(h=(V=(m=E())==null?void 0:m.current)==null?void 0:V.remainingTimes)!=null?h:(X=E())==null?void 0:X.remainingTimes)}),n.append(_,x)};n.if_block(u,_=>{j()?_(v):_(w,-1)})}e.reset(c),e.reset(s),e.template_effect(_=>{n.set_text(i,`${_!=null?_:""} `),n.set_attribute(l,"src",Le.coinHeads)},[()=>r()("remainingFlips")]),n.append(t,s)};n.if_block(Ae,t=>{g()&&t(Je)})}var K=e.sibling(Ae,2),Ke=e.child(K,!0);e.reset(K),e.template_effect((t,s)=>{Se=n.set_class(b,1,"coin-royale__flip-zone",null,Se,{"coin-royale__flip-zone--disabled":!g(),"coin-royale__flip-zone--settling":y()}),n.set_attribute(b,"tabindex",g()?0:-1),n.set_attribute(b,"aria-label",t),n.set_attribute(b,"aria-disabled",!e.get(ie)),n.set_attribute(Ve,"src",Le.coinHeads),n.set_attribute(Xe,"src",dt.coinTails),K.disabled=!g(),n.set_text(Ke,s)},[()=>r()("flipCoin"),()=>r()("flipCoin")]),n.delegated("pointerdown",b,Ge),n.delegated("click",b,qe),n.delegated("keydown",b,t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),B())}),n.delegated("click",K,()=>B()),n.append(p,Ee);var Qe=e.pop(Ue);return $(),Qe}n.delegate(["pointerdown","click","keydown"]);n.create_custom_element(Ne,{program:{},endpoint:{},session:{},isAvailable:{},spinResults:{},spinActive:{},remainingTimesLoading:{},onFlip:{}},[],[],{mode:"open"});exports.CoinFlip=Ne;
|