@everymatrix/mini-games-hub 0.1.13 → 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-D3BazHMT.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-Cu8_8yFl.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-BlHeZ0q7.cjs → WheelOfFortune-BC0wwnC-.cjs} +8 -23
- package/components/{WheelOfFortune-CnaDpfpq.js → WheelOfFortune-BYxOqBjA.js} +151 -177
- 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-Lfc_l9kc.js → WheelOfFortune-DawF7WTd.js} +180 -231
- 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-SjsgF4e2.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 @@
|
|
|
1
|
+
"use strict";var O=(q,x,a)=>new Promise((B,W)=>{var S=y=>{try{T(a.next(y))}catch(z){W(z)}},M=y=>{try{T(a.throw(y))}catch(z){W(z)}},T=y=>y.done?B(y.value):Promise.resolve(y.value).then(S,M);T((a=a.apply(q,x)).next())});const t=require("./WheelOfFortuneWheel-B4fe-idJ.cjs"),e=require("./utils-Rda5erjI.cjs"),fe=require("./error-YyYl7p6_.cjs"),he=require("./confetti-CIk02Iw8.cjs");var ye=t.from_html('<span class="button-spinner"></span>'),be=t.from_html('<span class="button-spinner"></span>'),we=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),xe=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ze=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ke=t.from_html('<span class="draw-result-dust__puff"></span>'),Se=t.from_html('<div class="draw-result-dust" aria-hidden="true"></div>'),Te=t.from_html('<div class="draw-result-image-wrap"><!> <img alt=""/></div>'),Pe=t.from_html('<!> <h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),Fe=t.from_html('<div class="draw-result-image-wrap"><img alt=""/></div>'),Re=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),je=t.from_html('<span class="button-spinner"></span>'),Me=t.from_html('<!> <h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),Ae=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),Ce=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function te(q,x){e.push(x,!0);const a=()=>e.store_get(e.$format,"$_",B),[B,W]=e.setup_stores(),S=t.prop(x,"result",7),M=t.prop(x,"endpoint",7),T=t.prop(x,"session",7),y=t.prop(x,"liteMode",7,!1),z=t.prop(x,"images",7,null),G=t.prop(x,"noPrizeDust",7,!1),A=t.prop(x,"onFetchRemainingTimes",7,()=>{}),se=[{size:30,dx:-40,dy:-60,delay:.08},{size:16,dx:26,dy:-70,delay:.19},{size:33,dx:-22,dy:-91,delay:.31},{size:17,dx:-9,dy:-72,delay:.02},{size:22,dx:8,dy:-65,delay:.48},{size:27,dx:-50,dy:-128,delay:.23},{size:34,dx:-27,dy:-124,delay:.06},{size:22,dx:25,dy:-71,delay:.3},{size:22,dx:34,dy:-50,delay:.49},{size:16,dx:28,dy:-99,delay:.02},{size:34,dx:-51,dy:-75,delay:.07},{size:34,dx:-44,dy:-102,delay:.54}],J=e.user_derived(()=>{var s;return((s=S())==null?void 0:s.success)!==!0}),D=e.user_derived(()=>{var s;return(s=S())==null?void 0:s.type}),H=e.user_derived(()=>e.get(D)==="noprize"),re=new Set(["loyalty"]),ae={bonus:a()("prizeBonus"),role:a()("prizeRole"),tournament:a()("prizeTournament"),ticket:a()("prizeTicket"),loyalty:a()("prizeLoyalty"),challenge:a()("prizeChallenge"),custom:a()("prizeCustom")},ie=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let U=e.state(void 0),k=e.state("initial"),v=e.state(null);e.user_effect(()=>{e.get(U)&&e.get(k)==="claimSuccess"&&!y()&&he.burstSuccessConfetti(e.get(U))}),e.user_effect(()=>{(e.get(H)||e.get(J))&&e.untrack(()=>A()())});const K=s=>{const r=new URL(`${M()}/v1/wof/draw/${S().lotteryProgramID}`),l=new Headers;T()&&l.append("X-SessionId",T()),l.append("Content-Type","application/json");const u={action:s,guid:S().guid};return fetch(r,{method:"PUT",headers:l,body:JSON.stringify(u)}).then(n=>n.json())},X=()=>O(this,null,function*(){e.set(v,"claim");try{const s=yield K(0),r=e.normalizeDrawResult(s,"draw"),l=(r==null?void 0:r.state)==="fulfilled"&&(r==null?void 0:r.completed),u=(r==null?void 0:r.state)==="drawn"&&!(r!=null&&r.completed);l?e.set(k,"claimSuccess"):e.set(k,"claimFailed")}catch(s){console.log(s),e.set(k,"claimFailed")}finally{e.set(v,null),A()()}}),le=()=>O(this,null,function*(){e.set(v,"reject"),e.set(k,"initial");const s=A();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),yield K(2),s==null||s()}catch(r){console.log(r)}finally{e.set(v,null)}}),ne=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},I=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var de={get result(){return S()},set result(s){S(s),e.flushSync()},get endpoint(){return M()},set endpoint(s){M(s),e.flushSync()},get session(){return T()},set session(s){T(s),e.flushSync()},get liteMode(){return y()},set liteMode(s=!1){y(s),e.flushSync()},get images(){return z()},set images(s=null){z(s),e.flushSync()},get noPrizeDust(){return G()},set noPrizeDust(s=!1){G(s),e.flushSync()},get onFetchRemainingTimes(){return A()},set onFetchRemainingTimes(s=()=>{}){A(s),e.flushSync()}},N=Ce(),Y=e.child(N);t.bind_this(Y,s=>e.set(U,s),()=>e.get(U));var Z=e.sibling(Y,2);{var oe=s=>{var r=we(),l=e.child(r),u=e.child(l,!0);e.reset(l);var n=e.sibling(l,2);t.html(n,()=>a()("rejectWarningText"),!0),e.reset(n);var g=e.sibling(n,2),d=e.child(g),o=e.child(d);let f;var _=e.child(o,!0);e.reset(o);var b=e.sibling(o,2);{var h=i=>{var p=ye();t.append(i,p)};t.if_block(b,i=>{e.get(v)==="claim"&&i(h)})}e.reset(d);var m=e.sibling(d,2),w=e.child(m);let j;var P=e.child(w,!0);e.reset(w);var F=e.sibling(w,2);{var c=i=>{var p=be();t.append(i,p)};t.if_block(F,i=>{e.get(v)==="reject"&&i(c)})}e.reset(m),e.reset(g),e.reset(r),e.template_effect((i,p,R)=>{t.set_text(u,i),d.disabled=!!e.get(v),f=t.set_style(o,"",f,{opacity:e.get(v)==="claim"?0:1}),t.set_text(_,p),m.disabled=!!e.get(v),j=t.set_style(w,"",j,{opacity:e.get(v)==="reject"?0:1}),t.set_text(P,R)},[()=>a()("areYouSure"),()=>a()("keepPrize"),()=>a()("rejectPrize")]),t.delegated("click",d,X),t.delegated("click",m,le),t.append(s,r)};t.if_block(Z,s=>{e.get(k)==="rejectModal"&&s(oe)})}var Q=e.sibling(Z,2),ce=e.child(Q);{var _e=s=>{var r=xe(),l=e.first_child(r),u=e.child(l,!0);e.reset(l);var n=e.sibling(l,2),g=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d),f=e.child(o,!0);e.reset(o),e.reset(d),e.template_effect((_,b,h)=>{t.set_text(u,_),t.set_text(g,b),t.set_text(f,h)},[()=>a()("prizeAssignedTitle"),()=>a()("prizeAssigned"),()=>a()("backToGame")]),t.delegated("click",o,ne),t.append(s,r)},pe=s=>{var r=ze(),l=e.first_child(r),u=e.child(l,!0);e.reset(l);var n=e.sibling(l,2),g=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d),f=e.child(o,!0);e.reset(o),e.reset(d),e.template_effect((_,b,h)=>{t.set_text(u,_),t.set_text(g,b),t.set_text(f,h)},[()=>a()("drawFailedTitle"),()=>a()("drawFailed"),()=>a()("backToGame")]),t.delegated("click",o,I),t.append(s,r)},ue=s=>{var r=Pe(),l=e.first_child(r);{var u=h=>{var m=Te(),w=e.child(m);{var j=F=>{var c=Se();t.each(c,21,()=>se,t.index,(i,p)=>{var R=ke();let C;e.template_effect(()=>{var E,L,V,$,ee;return C=t.set_style(R,"",C,{width:`${(E=e.get(p).size)!=null?E:""}px`,height:`${(L=e.get(p).size)!=null?L:""}px`,"--dust-dx":`${(V=e.get(p).dx)!=null?V:""}px`,"--dust-dy":`${($=e.get(p).dy)!=null?$:""}px`,"animation-delay":`${(ee=e.get(p).delay)!=null?ee:""}s`})}),t.append(i,R)}),e.reset(c),t.append(F,c)};t.if_block(w,F=>{G()&&!y()&&F(j)})}var P=e.sibling(w,2);e.reset(m),e.template_effect(()=>t.set_attribute(P,"src",z().noPrize)),t.append(h,m)};t.if_block(l,h=>{var m;(m=z())!=null&&m.noPrize&&h(u)})}var n=e.sibling(l,2),g=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d,!0);e.reset(d);var f=e.sibling(d,2),_=e.child(f),b=e.child(_,!0);e.reset(_),e.reset(f),e.template_effect((h,m,w)=>{t.set_text(g,h),t.set_text(o,m),_.disabled=!!e.get(v),t.set_text(b,w)},[()=>a()("noPrizeTitle"),()=>a()("noPrize"),()=>a()("spinAgain")]),t.delegated("click",_,I),t.append(s,r)},ve=s=>{var r=Me(),l=e.first_child(r);{var u=c=>{var i=Fe(),p=e.child(i);e.reset(i),e.template_effect(()=>t.set_attribute(p,"src",z().win)),t.append(c,i)};t.if_block(l,c=>{var i;(i=z())!=null&&i.win&&c(u)})}var n=e.sibling(l,2),g=e.child(n),d=e.sibling(g);t.each(d,17,()=>ie,t.index,(c,i)=>{var p=Re();e.template_effect(()=>{var R,C,E,L;return t.set_style(p,`top:${(R=e.get(i).t)!=null?R:""};left:${(C=e.get(i).l)!=null?C:""};font-size:${(E=e.get(i).s)!=null?E:""};animation-delay:${(L=e.get(i).d)!=null?L:""}`)}),t.append(c,p)}),e.reset(n);var o=e.sibling(n,2);t.html(o,()=>a()("success",{values:{prize:ae[e.get(D)],form:re.has(e.get(D))?"plural":"singular"}}),!0),e.reset(o);var f=e.sibling(o,2),_=e.child(f),b=e.child(_);let h;var m=e.child(b,!0);e.reset(b);var w=e.sibling(b,2);{var j=c=>{var i=je();t.append(c,i)};t.if_block(w,c=>{e.get(v)==="claim"&&c(j)})}e.reset(_);var P=e.sibling(_,2),F=e.child(P,!0);e.reset(P),e.reset(f),e.template_effect((c,i,p)=>{t.set_text(g,`${c!=null?c:""} `),_.disabled=!!e.get(v),h=t.set_style(b,"",h,{opacity:e.get(v)==="claim"?0:1}),t.set_text(m,i),P.disabled=!!e.get(v),t.set_text(F,p)},[()=>a()("congratulations"),()=>a()("claimReward"),()=>a()("reject")]),t.delegated("click",_,X),t.delegated("click",P,()=>e.set(k,"rejectModal")),t.append(s,r)},me=s=>{var r=Ae(),l=e.first_child(r),u=e.sibling(l,2),n=e.child(u,!0);e.reset(u);var g=e.sibling(u,2),d=e.child(g),o=e.child(d,!0);e.reset(d),e.reset(g),e.template_effect((f,_)=>{t.set_attribute(l,"src",fe.Error),t.set_text(n,f),t.set_text(o,_)},[()=>a()("errorJSON"),()=>a()("backToGame")]),t.delegated("click",d,I),t.append(s,r)};t.if_block(ce,s=>{e.get(k)==="claimSuccess"?s(_e):e.get(k)==="claimFailed"?s(pe,1):e.get(H)?s(ue,2):e.get(J)?s(me,-1):s(ve,3)})}e.reset(Q),e.reset(N),t.append(q,N);var ge=e.pop(de);return W(),ge}t.delegate(["click"]);t.create_custom_element(te,{result:{},endpoint:{},session:{},liteMode:{},images:{},noPrizeDust:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.DrawResult=te;
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
var se = (Y, F, r) => new Promise((Z, Q) => {
|
|
2
|
+
var A = (k) => {
|
|
3
|
+
try {
|
|
4
|
+
E(r.next(k));
|
|
5
|
+
} catch (R) {
|
|
6
|
+
Q(R);
|
|
7
|
+
}
|
|
8
|
+
}, I = (k) => {
|
|
9
|
+
try {
|
|
10
|
+
E(r.throw(k));
|
|
11
|
+
} catch (R) {
|
|
12
|
+
Q(R);
|
|
13
|
+
}
|
|
14
|
+
}, E = (k) => k.done ? Z(k.value) : Promise.resolve(k.value).then(A, I);
|
|
15
|
+
E((r = r.apply(Y, F)).next());
|
|
16
|
+
});
|
|
17
|
+
import { d as Ge, c as We, p as B, n as Ue, i as C, b as w, f as h, q as fe, s as y, r as H, m as G, e as ge, g as we, j as re } from "./WheelOfFortuneWheel-BABzaEBd.js";
|
|
18
|
+
import { G as Be, W as he, a0 as t, X as Ne, L as De, aP as Ie, aQ as Oe, aM as ie, aX as ne, aO as d, aT as i, aG as N, aR as Xe, au as S, aW as s, ah as M, aN as K, aV as Je } from "./utils-BJHloM10.js";
|
|
19
|
+
import { E as qe } from "./error-DJgbe-Bh.js";
|
|
20
|
+
import { b as He } from "./confetti-QNsE8ssC.js";
|
|
21
|
+
var Ke = h('<span class="button-spinner"></span>'), Qe = h('<span class="button-spinner"></span>'), Ve = h('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'), Ye = h('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), Ze = h('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), $e = h('<span class="draw-result-dust__puff"></span>'), ea = h('<div class="draw-result-dust" aria-hidden="true"></div>'), aa = h('<div class="draw-result-image-wrap"><!> <img alt=""/></div>'), ta = h('<!> <h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), sa = h('<div class="draw-result-image-wrap"><img alt=""/></div>'), ra = h('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'), ia = h('<span class="button-spinner"></span>'), na = h('<!> <h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>', 1), la = h('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), oa = h('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');
|
|
22
|
+
function da(Y, F) {
|
|
23
|
+
Be(F, !0);
|
|
24
|
+
const r = () => Ie(Oe, "$_", Z), [Z, Q] = Xe(), A = B(F, "result", 7), I = B(F, "endpoint", 7), E = B(F, "session", 7), k = B(F, "liteMode", 7, !1), R = B(F, "images", 7, null), $ = B(F, "noPrizeDust", 7, !1), O = B(F, "onFetchRemainingTimes", 7, () => {
|
|
25
|
+
}), be = [
|
|
26
|
+
{ size: 30, dx: -40, dy: -60, delay: 0.08 },
|
|
27
|
+
{ size: 16, dx: 26, dy: -70, delay: 0.19 },
|
|
28
|
+
{ size: 33, dx: -22, dy: -91, delay: 0.31 },
|
|
29
|
+
{ size: 17, dx: -9, dy: -72, delay: 0.02 },
|
|
30
|
+
{ size: 22, dx: 8, dy: -65, delay: 0.48 },
|
|
31
|
+
{ size: 27, dx: -50, dy: -128, delay: 0.23 },
|
|
32
|
+
{ size: 34, dx: -27, dy: -124, delay: 0.06 },
|
|
33
|
+
{ size: 22, dx: 25, dy: -71, delay: 0.3 },
|
|
34
|
+
{ size: 22, dx: 34, dy: -50, delay: 0.49 },
|
|
35
|
+
{ size: 16, dx: 28, dy: -99, delay: 0.02 },
|
|
36
|
+
{ size: 34, dx: -51, dy: -75, delay: 0.07 },
|
|
37
|
+
{ size: 34, dx: -44, dy: -102, delay: 0.54 }
|
|
38
|
+
], le = ne(() => {
|
|
39
|
+
var e;
|
|
40
|
+
return ((e = A()) == null ? void 0 : e.success) !== !0;
|
|
41
|
+
}), ee = ne(() => {
|
|
42
|
+
var e;
|
|
43
|
+
return (e = A()) == null ? void 0 : e.type;
|
|
44
|
+
}), oe = ne(() => t(ee) === "noprize"), xe = /* @__PURE__ */ new Set(["loyalty"]), ze = {
|
|
45
|
+
bonus: r()("prizeBonus"),
|
|
46
|
+
role: r()("prizeRole"),
|
|
47
|
+
tournament: r()("prizeTournament"),
|
|
48
|
+
ticket: r()("prizeTicket"),
|
|
49
|
+
loyalty: r()("prizeLoyalty"),
|
|
50
|
+
challenge: r()("prizeChallenge"),
|
|
51
|
+
custom: r()("prizeCustom")
|
|
52
|
+
}, ke = [
|
|
53
|
+
{ t: "-0.7em", l: "5%", s: "0.45em", d: "680ms" },
|
|
54
|
+
{ t: "-0.5em", l: "22%", s: "0.28em", d: "760ms" },
|
|
55
|
+
{ t: "-0.9em", l: "40%", s: "0.38em", d: "820ms" },
|
|
56
|
+
{ t: "-0.6em", l: "58%", s: "0.3em", d: "740ms" },
|
|
57
|
+
{ t: "-0.8em", l: "76%", s: "0.42em", d: "900ms" },
|
|
58
|
+
{ t: "-0.4em", l: "92%", s: "0.25em", d: "860ms" },
|
|
59
|
+
{ t: "0.1em", l: "14%", s: "0.22em", d: "800ms" },
|
|
60
|
+
{ t: "0em", l: "72%", s: "0.2em", d: "950ms" }
|
|
61
|
+
];
|
|
62
|
+
let V = ie(void 0), j = ie("initial"), f = ie(null);
|
|
63
|
+
he(() => {
|
|
64
|
+
t(V) && t(j) === "claimSuccess" && !k() && He(t(V));
|
|
65
|
+
}), he(() => {
|
|
66
|
+
(t(oe) || t(le)) && Ne(() => O()());
|
|
67
|
+
});
|
|
68
|
+
const de = (e) => {
|
|
69
|
+
const a = new URL(`${I()}/v1/wof/draw/${A().lotteryProgramID}`), l = new Headers();
|
|
70
|
+
E() && l.append("X-SessionId", E()), l.append("Content-Type", "application/json");
|
|
71
|
+
const m = { action: e, guid: A().guid };
|
|
72
|
+
return fetch(a, { method: "PUT", headers: l, body: JSON.stringify(m) }).then((o) => o.json());
|
|
73
|
+
}, ce = () => se(this, null, function* () {
|
|
74
|
+
S(f, "claim");
|
|
75
|
+
try {
|
|
76
|
+
const e = yield de(0), a = Je(e, "draw"), l = (a == null ? void 0 : a.state) === "fulfilled" && (a == null ? void 0 : a.completed), m = (a == null ? void 0 : a.state) === "drawn" && !(a != null && a.completed);
|
|
77
|
+
l ? S(j, "claimSuccess") : m ? S(j, "claimFailed") : S(j, "claimFailed");
|
|
78
|
+
} catch (e) {
|
|
79
|
+
console.log(e), S(j, "claimFailed");
|
|
80
|
+
} finally {
|
|
81
|
+
S(f, null), O()();
|
|
82
|
+
}
|
|
83
|
+
}), Te = () => se(this, null, function* () {
|
|
84
|
+
S(f, "reject"), S(j, "initial");
|
|
85
|
+
const e = O();
|
|
86
|
+
try {
|
|
87
|
+
window.postMessage({ type: "BackToWheel", skipFetch: !0 }, window.location.href), yield de(2), e == null || e();
|
|
88
|
+
} catch (a) {
|
|
89
|
+
console.log(a);
|
|
90
|
+
} finally {
|
|
91
|
+
S(f, null);
|
|
92
|
+
}
|
|
93
|
+
}), Pe = () => {
|
|
94
|
+
window.postMessage({ type: "BackToWheel" }, window.location.href);
|
|
95
|
+
}, ae = () => {
|
|
96
|
+
window.postMessage({ type: "SpinAgain" }, window.location.href);
|
|
97
|
+
};
|
|
98
|
+
var Se = {
|
|
99
|
+
get result() {
|
|
100
|
+
return A();
|
|
101
|
+
},
|
|
102
|
+
set result(e) {
|
|
103
|
+
A(e), N();
|
|
104
|
+
},
|
|
105
|
+
get endpoint() {
|
|
106
|
+
return I();
|
|
107
|
+
},
|
|
108
|
+
set endpoint(e) {
|
|
109
|
+
I(e), N();
|
|
110
|
+
},
|
|
111
|
+
get session() {
|
|
112
|
+
return E();
|
|
113
|
+
},
|
|
114
|
+
set session(e) {
|
|
115
|
+
E(e), N();
|
|
116
|
+
},
|
|
117
|
+
get liteMode() {
|
|
118
|
+
return k();
|
|
119
|
+
},
|
|
120
|
+
set liteMode(e = !1) {
|
|
121
|
+
k(e), N();
|
|
122
|
+
},
|
|
123
|
+
get images() {
|
|
124
|
+
return R();
|
|
125
|
+
},
|
|
126
|
+
set images(e = null) {
|
|
127
|
+
R(e), N();
|
|
128
|
+
},
|
|
129
|
+
get noPrizeDust() {
|
|
130
|
+
return $();
|
|
131
|
+
},
|
|
132
|
+
set noPrizeDust(e = !1) {
|
|
133
|
+
$(e), N();
|
|
134
|
+
},
|
|
135
|
+
get onFetchRemainingTimes() {
|
|
136
|
+
return O();
|
|
137
|
+
},
|
|
138
|
+
set onFetchRemainingTimes(e = () => {
|
|
139
|
+
}) {
|
|
140
|
+
O(e), N();
|
|
141
|
+
}
|
|
142
|
+
}, te = oa(), ve = i(te);
|
|
143
|
+
Ue(ve, (e) => S(V, e), () => t(V));
|
|
144
|
+
var ue = d(ve, 2);
|
|
145
|
+
{
|
|
146
|
+
var Fe = (e) => {
|
|
147
|
+
var a = Ve(), l = i(a), m = i(l, !0);
|
|
148
|
+
s(l);
|
|
149
|
+
var o = d(l, 2);
|
|
150
|
+
fe(o, () => r()("rejectWarningText"), !0), s(o);
|
|
151
|
+
var b = d(o, 2), c = i(b), v = i(c);
|
|
152
|
+
let x;
|
|
153
|
+
var p = i(v, !0);
|
|
154
|
+
s(v);
|
|
155
|
+
var T = d(v, 2);
|
|
156
|
+
{
|
|
157
|
+
var z = (n) => {
|
|
158
|
+
var _ = Ke();
|
|
159
|
+
w(n, _);
|
|
160
|
+
};
|
|
161
|
+
C(T, (n) => {
|
|
162
|
+
t(f) === "claim" && n(z);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
s(c);
|
|
166
|
+
var g = d(c, 2), P = i(g);
|
|
167
|
+
let D;
|
|
168
|
+
var L = i(P, !0);
|
|
169
|
+
s(P);
|
|
170
|
+
var W = d(P, 2);
|
|
171
|
+
{
|
|
172
|
+
var u = (n) => {
|
|
173
|
+
var _ = Qe();
|
|
174
|
+
w(n, _);
|
|
175
|
+
};
|
|
176
|
+
C(W, (n) => {
|
|
177
|
+
t(f) === "reject" && n(u);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
s(g), s(b), s(a), M(
|
|
181
|
+
(n, _, U) => {
|
|
182
|
+
y(m, n), c.disabled = !!t(f), x = H(v, "", x, { opacity: t(f) === "claim" ? 0 : 1 }), y(p, _), g.disabled = !!t(f), D = H(P, "", D, { opacity: t(f) === "reject" ? 0 : 1 }), y(L, U);
|
|
183
|
+
},
|
|
184
|
+
[
|
|
185
|
+
() => r()("areYouSure"),
|
|
186
|
+
() => r()("keepPrize"),
|
|
187
|
+
() => r()("rejectPrize")
|
|
188
|
+
]
|
|
189
|
+
), G("click", c, ce), G("click", g, Te), w(e, a);
|
|
190
|
+
};
|
|
191
|
+
C(ue, (e) => {
|
|
192
|
+
t(j) === "rejectModal" && e(Fe);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
var pe = d(ue, 2), Re = i(pe);
|
|
196
|
+
{
|
|
197
|
+
var je = (e) => {
|
|
198
|
+
var a = Ye(), l = K(a), m = i(l, !0);
|
|
199
|
+
s(l);
|
|
200
|
+
var o = d(l, 2), b = i(o, !0);
|
|
201
|
+
s(o);
|
|
202
|
+
var c = d(o, 2), v = i(c), x = i(v, !0);
|
|
203
|
+
s(v), s(c), M(
|
|
204
|
+
(p, T, z) => {
|
|
205
|
+
y(m, p), y(b, T), y(x, z);
|
|
206
|
+
},
|
|
207
|
+
[
|
|
208
|
+
() => r()("prizeAssignedTitle"),
|
|
209
|
+
() => r()("prizeAssigned"),
|
|
210
|
+
() => r()("backToGame")
|
|
211
|
+
]
|
|
212
|
+
), G("click", v, Pe), w(e, a);
|
|
213
|
+
}, Me = (e) => {
|
|
214
|
+
var a = Ze(), l = K(a), m = i(l, !0);
|
|
215
|
+
s(l);
|
|
216
|
+
var o = d(l, 2), b = i(o, !0);
|
|
217
|
+
s(o);
|
|
218
|
+
var c = d(o, 2), v = i(c), x = i(v, !0);
|
|
219
|
+
s(v), s(c), M(
|
|
220
|
+
(p, T, z) => {
|
|
221
|
+
y(m, p), y(b, T), y(x, z);
|
|
222
|
+
},
|
|
223
|
+
[
|
|
224
|
+
() => r()("drawFailedTitle"),
|
|
225
|
+
() => r()("drawFailed"),
|
|
226
|
+
() => r()("backToGame")
|
|
227
|
+
]
|
|
228
|
+
), G("click", v, ae), w(e, a);
|
|
229
|
+
}, Ae = (e) => {
|
|
230
|
+
var a = ta(), l = K(a);
|
|
231
|
+
{
|
|
232
|
+
var m = (z) => {
|
|
233
|
+
var g = aa(), P = i(g);
|
|
234
|
+
{
|
|
235
|
+
var D = (W) => {
|
|
236
|
+
var u = ea();
|
|
237
|
+
ge(u, 21, () => be, we, (n, _) => {
|
|
238
|
+
var U = $e();
|
|
239
|
+
let X;
|
|
240
|
+
M(() => {
|
|
241
|
+
var J, q, _e, me, ye;
|
|
242
|
+
return X = H(U, "", X, {
|
|
243
|
+
width: `${(J = t(_).size) != null ? J : ""}px`,
|
|
244
|
+
height: `${(q = t(_).size) != null ? q : ""}px`,
|
|
245
|
+
"--dust-dx": `${(_e = t(_).dx) != null ? _e : ""}px`,
|
|
246
|
+
"--dust-dy": `${(me = t(_).dy) != null ? me : ""}px`,
|
|
247
|
+
"animation-delay": `${(ye = t(_).delay) != null ? ye : ""}s`
|
|
248
|
+
});
|
|
249
|
+
}), w(n, U);
|
|
250
|
+
}), s(u), w(W, u);
|
|
251
|
+
};
|
|
252
|
+
C(P, (W) => {
|
|
253
|
+
$() && !k() && W(D);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
var L = d(P, 2);
|
|
257
|
+
s(g), M(() => re(L, "src", R().noPrize)), w(z, g);
|
|
258
|
+
};
|
|
259
|
+
C(l, (z) => {
|
|
260
|
+
var g;
|
|
261
|
+
(g = R()) != null && g.noPrize && z(m);
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
var o = d(l, 2), b = i(o, !0);
|
|
265
|
+
s(o);
|
|
266
|
+
var c = d(o, 2), v = i(c, !0);
|
|
267
|
+
s(c);
|
|
268
|
+
var x = d(c, 2), p = i(x), T = i(p, !0);
|
|
269
|
+
s(p), s(x), M(
|
|
270
|
+
(z, g, P) => {
|
|
271
|
+
y(b, z), y(v, g), p.disabled = !!t(f), y(T, P);
|
|
272
|
+
},
|
|
273
|
+
[
|
|
274
|
+
() => r()("noPrizeTitle"),
|
|
275
|
+
() => r()("noPrize"),
|
|
276
|
+
() => r()("tryAgain")
|
|
277
|
+
]
|
|
278
|
+
), G("click", p, ae), w(e, a);
|
|
279
|
+
}, Ee = (e) => {
|
|
280
|
+
var a = na(), l = K(a);
|
|
281
|
+
{
|
|
282
|
+
var m = (u) => {
|
|
283
|
+
var n = sa(), _ = i(n);
|
|
284
|
+
s(n), M(() => re(_, "src", R().win)), w(u, n);
|
|
285
|
+
};
|
|
286
|
+
C(l, (u) => {
|
|
287
|
+
var n;
|
|
288
|
+
(n = R()) != null && n.win && u(m);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
var o = d(l, 2), b = i(o), c = d(b);
|
|
292
|
+
ge(c, 17, () => ke, we, (u, n) => {
|
|
293
|
+
var _ = ra();
|
|
294
|
+
M(() => {
|
|
295
|
+
var U, X, J, q;
|
|
296
|
+
return H(_, `top:${(U = t(n).t) != null ? U : ""};left:${(X = t(n).l) != null ? X : ""};font-size:${(J = t(n).s) != null ? J : ""};animation-delay:${(q = t(n).d) != null ? q : ""}`);
|
|
297
|
+
}), w(u, _);
|
|
298
|
+
}), s(o);
|
|
299
|
+
var v = d(o, 2);
|
|
300
|
+
fe(
|
|
301
|
+
v,
|
|
302
|
+
() => r()("success", {
|
|
303
|
+
values: {
|
|
304
|
+
prize: ze[t(ee)],
|
|
305
|
+
form: xe.has(t(ee)) ? "plural" : "singular"
|
|
306
|
+
}
|
|
307
|
+
}),
|
|
308
|
+
!0
|
|
309
|
+
), s(v);
|
|
310
|
+
var x = d(v, 2), p = i(x), T = i(p);
|
|
311
|
+
let z;
|
|
312
|
+
var g = i(T, !0);
|
|
313
|
+
s(T);
|
|
314
|
+
var P = d(T, 2);
|
|
315
|
+
{
|
|
316
|
+
var D = (u) => {
|
|
317
|
+
var n = ia();
|
|
318
|
+
w(u, n);
|
|
319
|
+
};
|
|
320
|
+
C(P, (u) => {
|
|
321
|
+
t(f) === "claim" && u(D);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
s(p);
|
|
325
|
+
var L = d(p, 2), W = i(L, !0);
|
|
326
|
+
s(L), s(x), M(
|
|
327
|
+
(u, n, _) => {
|
|
328
|
+
y(b, `${u != null ? u : ""} `), p.disabled = !!t(f), z = H(T, "", z, { opacity: t(f) === "claim" ? 0 : 1 }), y(g, n), L.disabled = !!t(f), y(W, _);
|
|
329
|
+
},
|
|
330
|
+
[
|
|
331
|
+
() => r()("congratulations"),
|
|
332
|
+
() => r()("claimReward"),
|
|
333
|
+
() => r()("reject")
|
|
334
|
+
]
|
|
335
|
+
), G("click", p, ce), G("click", L, () => S(j, "rejectModal")), w(e, a);
|
|
336
|
+
}, Le = (e) => {
|
|
337
|
+
var a = la(), l = K(a), m = d(l, 2), o = i(m, !0);
|
|
338
|
+
s(m);
|
|
339
|
+
var b = d(m, 2), c = i(b), v = i(c, !0);
|
|
340
|
+
s(c), s(b), M(
|
|
341
|
+
(x, p) => {
|
|
342
|
+
re(l, "src", qe), y(o, x), y(v, p);
|
|
343
|
+
},
|
|
344
|
+
[() => r()("errorJSON"), () => r()("backToGame")]
|
|
345
|
+
), G("click", c, ae), w(e, a);
|
|
346
|
+
};
|
|
347
|
+
C(Re, (e) => {
|
|
348
|
+
t(j) === "claimSuccess" ? e(je) : t(j) === "claimFailed" ? e(Me, 1) : t(oe) ? e(Ae, 2) : t(le) ? e(Le, -1) : e(Ee, 3);
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
s(pe), s(te), w(Y, te);
|
|
352
|
+
var Ce = De(Se);
|
|
353
|
+
return Q(), Ce;
|
|
354
|
+
}
|
|
355
|
+
Ge(["click"]);
|
|
356
|
+
We(
|
|
357
|
+
da,
|
|
358
|
+
{
|
|
359
|
+
result: {},
|
|
360
|
+
endpoint: {},
|
|
361
|
+
session: {},
|
|
362
|
+
liteMode: {},
|
|
363
|
+
images: {},
|
|
364
|
+
noPrizeDust: {},
|
|
365
|
+
onFetchRemainingTimes: {}
|
|
366
|
+
},
|
|
367
|
+
[],
|
|
368
|
+
[],
|
|
369
|
+
{ mode: "open" }
|
|
370
|
+
);
|
|
371
|
+
export {
|
|
372
|
+
da as D
|
|
373
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./WheelOfFortuneWheel-CsOjhUcv.cjs"),e=require("./utils-Dwz-wUFC.cjs"),_e=require("./error-YyYl7p6_.cjs"),pe=require("./confetti-CIk02Iw8.cjs");var ue=t.from_html('<span class="button-spinner"></span>'),ve=t.from_html('<span class="button-spinner"></span>'),me=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),ge=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),fe=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),he=t.from_html('<span class="draw-result-dust__puff"></span>'),ye=t.from_html('<div class="draw-result-dust" aria-hidden="true"></div>'),be=t.from_html('<div class="draw-result-image-wrap"><!> <img alt=""/></div>'),we=t.from_html('<!> <h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),xe=t.from_html('<div class="draw-result-image-wrap"><img alt=""/></div>'),ze=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),ke=t.from_html('<span class="button-spinner"></span>'),Se=t.from_html('<!> <h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),Te=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),Pe=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function H(K,x){e.push(x,!0);const r=()=>e.store_get(e.$format,"$_",X),[X,Y]=e.setup_stores(),S=t.prop(x,"result",7),A=t.prop(x,"endpoint",7),R=t.prop(x,"session",7),j=t.prop(x,"liteMode",7,!1),T=t.prop(x,"images",7,null),C=t.prop(x,"noPrizeDust",7,!1),F=t.prop(x,"onFetchRemainingTimes",7,()=>{}),Z=[{size:30,dx:-40,dy:-60,delay:.08},{size:16,dx:26,dy:-70,delay:.19},{size:33,dx:-22,dy:-91,delay:.31},{size:17,dx:-9,dy:-72,delay:.02},{size:22,dx:8,dy:-65,delay:.48},{size:27,dx:-50,dy:-128,delay:.23},{size:34,dx:-27,dy:-124,delay:.06},{size:22,dx:25,dy:-71,delay:.3},{size:22,dx:34,dy:-50,delay:.49},{size:16,dx:28,dy:-99,delay:.02},{size:34,dx:-51,dy:-75,delay:.07},{size:34,dx:-44,dy:-102,delay:.54}],U=e.user_derived(()=>S()?.success!==!0),E=e.user_derived(()=>S()?.type),q=e.user_derived(()=>e.get(E)==="noprize"),$=new Set(["loyalty"]),Q={bonus:r()("prizeBonus"),role:r()("prizeRole"),tournament:r()("prizeTournament"),ticket:r()("prizeTicket"),loyalty:r()("prizeLoyalty"),challenge:r()("prizeChallenge"),custom:r()("prizeCustom")},V=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let D=e.state(void 0),w=e.state("initial"),v=e.state(null);e.user_effect(()=>{e.get(D)&&e.get(w)==="claimSuccess"&&!j()&&pe.burstSuccessConfetti(e.get(D))}),e.user_effect(()=>{(e.get(q)||e.get(U))&&e.untrack(()=>F()())});const B=s=>{const a=new URL(`${A()}/v1/wof/draw/${S().lotteryProgramID}`),i=new Headers;R()&&i.append("X-SessionId",R()),i.append("Content-Type","application/json");const p={action:s,guid:S().guid};return fetch(a,{method:"PUT",headers:i,body:JSON.stringify(p)}).then(n=>n.json())},G=async()=>{e.set(v,"claim");try{const s=await B(0),a=e.normalizeDrawResult(s,"draw"),i=a?.state==="fulfilled"&&a?.completed,p=a?.state==="drawn"&&!a?.completed;i?e.set(w,"claimSuccess"):e.set(w,"claimFailed")}catch(s){console.log(s),e.set(w,"claimFailed")}finally{e.set(v,null),F()()}},ee=async()=>{e.set(v,"reject"),e.set(w,"initial");const s=F();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),await B(2),s?.()}catch(a){console.log(a)}finally{e.set(v,null)}},te=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},L=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var se={get result(){return S()},set result(s){S(s),e.flushSync()},get endpoint(){return A()},set endpoint(s){A(s),e.flushSync()},get session(){return R()},set session(s){R(s),e.flushSync()},get liteMode(){return j()},set liteMode(s=!1){j(s),e.flushSync()},get images(){return T()},set images(s=null){T(s),e.flushSync()},get noPrizeDust(){return C()},set noPrizeDust(s=!1){C(s),e.flushSync()},get onFetchRemainingTimes(){return F()},set onFetchRemainingTimes(s=()=>{}){F(s),e.flushSync()}},W=Pe(),I=e.child(W);t.bind_this(I,s=>e.set(D,s),()=>e.get(D));var N=e.sibling(I,2);{var ae=s=>{var a=me(),i=e.child(a),p=e.child(i,!0);e.reset(i);var n=e.sibling(i,2);t.html(n,()=>r()("rejectWarningText"),!0),e.reset(n);var m=e.sibling(n,2),d=e.child(m),o=e.child(d);let g;var c=e.child(o,!0);e.reset(o);var h=e.sibling(o,2);{var f=l=>{var _=ue();t.append(l,_)};t.if_block(h,l=>{e.get(v)==="claim"&&l(f)})}e.reset(d);var y=e.sibling(d,2),b=e.child(y);let P;var z=e.child(b,!0);e.reset(b);var k=e.sibling(b,2);{var u=l=>{var _=ve();t.append(l,_)};t.if_block(k,l=>{e.get(v)==="reject"&&l(u)})}e.reset(y),e.reset(m),e.reset(a),e.template_effect((l,_,M)=>{t.set_text(p,l),d.disabled=!!e.get(v),g=t.set_style(o,"",g,{opacity:e.get(v)==="claim"?0:1}),t.set_text(c,_),y.disabled=!!e.get(v),P=t.set_style(b,"",P,{opacity:e.get(v)==="reject"?0:1}),t.set_text(z,M)},[()=>r()("areYouSure"),()=>r()("keepPrize"),()=>r()("rejectPrize")]),t.delegated("click",d,G),t.delegated("click",y,ee),t.append(s,a)};t.if_block(N,s=>{e.get(w)==="rejectModal"&&s(ae)})}var O=e.sibling(N,2),re=e.child(O);{var ie=s=>{var a=ge(),i=e.first_child(a),p=e.child(i,!0);e.reset(i);var n=e.sibling(i,2),m=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d),g=e.child(o,!0);e.reset(o),e.reset(d),e.template_effect((c,h,f)=>{t.set_text(p,c),t.set_text(m,h),t.set_text(g,f)},[()=>r()("prizeAssignedTitle"),()=>r()("prizeAssigned"),()=>r()("backToGame")]),t.delegated("click",o,te),t.append(s,a)},le=s=>{var a=fe(),i=e.first_child(a),p=e.child(i,!0);e.reset(i);var n=e.sibling(i,2),m=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d),g=e.child(o,!0);e.reset(o),e.reset(d),e.template_effect((c,h,f)=>{t.set_text(p,c),t.set_text(m,h),t.set_text(g,f)},[()=>r()("drawFailedTitle"),()=>r()("drawFailed"),()=>r()("backToGame")]),t.delegated("click",o,L),t.append(s,a)},ne=s=>{var a=we(),i=e.first_child(a);{var p=f=>{var y=be(),b=e.child(y);{var P=k=>{var u=ye();t.each(u,21,()=>Z,t.index,(l,_)=>{var M=he();let J;e.template_effect(()=>J=t.set_style(M,"",J,{width:`${e.get(_).size??""}px`,height:`${e.get(_).size??""}px`,"--dust-dx":`${e.get(_).dx??""}px`,"--dust-dy":`${e.get(_).dy??""}px`,"animation-delay":`${e.get(_).delay??""}s`})),t.append(l,M)}),e.reset(u),t.append(k,u)};t.if_block(b,k=>{C()&&!j()&&k(P)})}var z=e.sibling(b,2);e.reset(y),e.template_effect(()=>t.set_attribute(z,"src",T().noPrize)),t.append(f,y)};t.if_block(i,f=>{T()?.noPrize&&f(p)})}var n=e.sibling(i,2),m=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d,!0);e.reset(d);var g=e.sibling(d,2),c=e.child(g),h=e.child(c,!0);e.reset(c),e.reset(g),e.template_effect((f,y,b)=>{t.set_text(m,f),t.set_text(o,y),c.disabled=!!e.get(v),t.set_text(h,b)},[()=>r()("noPrizeTitle"),()=>r()("noPrize"),()=>r()("spinAgain")]),t.delegated("click",c,L),t.append(s,a)},de=s=>{var a=Se(),i=e.first_child(a);{var p=u=>{var l=xe(),_=e.child(l);e.reset(l),e.template_effect(()=>t.set_attribute(_,"src",T().win)),t.append(u,l)};t.if_block(i,u=>{T()?.win&&u(p)})}var n=e.sibling(i,2),m=e.child(n),d=e.sibling(m);t.each(d,17,()=>V,t.index,(u,l)=>{var _=ze();e.template_effect(()=>t.set_style(_,`top:${e.get(l).t??""};left:${e.get(l).l??""};font-size:${e.get(l).s??""};animation-delay:${e.get(l).d??""}`)),t.append(u,_)}),e.reset(n);var o=e.sibling(n,2);t.html(o,()=>r()("success",{values:{prize:Q[e.get(E)],form:$.has(e.get(E))?"plural":"singular"}}),!0),e.reset(o);var g=e.sibling(o,2),c=e.child(g),h=e.child(c);let f;var y=e.child(h,!0);e.reset(h);var b=e.sibling(h,2);{var P=u=>{var l=ke();t.append(u,l)};t.if_block(b,u=>{e.get(v)==="claim"&&u(P)})}e.reset(c);var z=e.sibling(c,2),k=e.child(z,!0);e.reset(z),e.reset(g),e.template_effect((u,l,_)=>{t.set_text(m,`${u??""} `),c.disabled=!!e.get(v),f=t.set_style(h,"",f,{opacity:e.get(v)==="claim"?0:1}),t.set_text(y,l),z.disabled=!!e.get(v),t.set_text(k,_)},[()=>r()("congratulations"),()=>r()("claimReward"),()=>r()("reject")]),t.delegated("click",c,G),t.delegated("click",z,()=>e.set(w,"rejectModal")),t.append(s,a)},oe=s=>{var a=Te(),i=e.first_child(a),p=e.sibling(i,2),n=e.child(p,!0);e.reset(p);var m=e.sibling(p,2),d=e.child(m),o=e.child(d,!0);e.reset(d),e.reset(m),e.template_effect((g,c)=>{t.set_attribute(i,"src",_e.Error),t.set_text(n,g),t.set_text(o,c)},[()=>r()("errorJSON"),()=>r()("backToGame")]),t.delegated("click",d,L),t.append(s,a)};t.if_block(re,s=>{e.get(w)==="claimSuccess"?s(ie):e.get(w)==="claimFailed"?s(le,1):e.get(q)?s(ne,2):e.get(U)?s(oe,-1):s(de,3)})}e.reset(O),e.reset(W),t.append(K,W);var ce=e.pop(se);return Y(),ce}t.delegate(["click"]);t.create_custom_element(H,{result:{},endpoint:{},session:{},liteMode:{},images:{},noPrizeDust:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.DrawResult=H;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var O=(q,x,a)=>new Promise((B,W)=>{var S=y=>{try{T(a.next(y))}catch(z){W(z)}},M=y=>{try{T(a.throw(y))}catch(z){W(z)}},T=y=>y.done?B(y.value):Promise.resolve(y.value).then(S,M);T((a=a.apply(q,x)).next())});const t=require("./WheelOfFortuneWheel-7PqVvd_8.cjs"),e=require("./utils-C1uNHR_J.cjs"),fe=require("./error-YyYl7p6_.cjs"),he=require("./confetti-CIk02Iw8.cjs");var ye=t.from_html('<span class="button-spinner"></span>'),be=t.from_html('<span class="button-spinner"></span>'),we=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),xe=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ze=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ke=t.from_html('<span class="draw-result-dust__puff"></span>'),Se=t.from_html('<div class="draw-result-dust" aria-hidden="true"></div>'),Te=t.from_html('<div class="draw-result-image-wrap"><!> <img alt=""/></div>'),Pe=t.from_html('<!> <h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),Fe=t.from_html('<div class="draw-result-image-wrap"><img alt=""/></div>'),Re=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),je=t.from_html('<span class="button-spinner"></span>'),Me=t.from_html('<!> <h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),Ae=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),Ce=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function te(q,x){e.push(x,!0);const a=()=>e.store_get(e.$format,"$_",B),[B,W]=e.setup_stores(),S=t.prop(x,"result",7),M=t.prop(x,"endpoint",7),T=t.prop(x,"session",7),y=t.prop(x,"liteMode",7,!1),z=t.prop(x,"images",7,null),G=t.prop(x,"noPrizeDust",7,!1),A=t.prop(x,"onFetchRemainingTimes",7,()=>{}),se=[{size:30,dx:-40,dy:-60,delay:.08},{size:16,dx:26,dy:-70,delay:.19},{size:33,dx:-22,dy:-91,delay:.31},{size:17,dx:-9,dy:-72,delay:.02},{size:22,dx:8,dy:-65,delay:.48},{size:27,dx:-50,dy:-128,delay:.23},{size:34,dx:-27,dy:-124,delay:.06},{size:22,dx:25,dy:-71,delay:.3},{size:22,dx:34,dy:-50,delay:.49},{size:16,dx:28,dy:-99,delay:.02},{size:34,dx:-51,dy:-75,delay:.07},{size:34,dx:-44,dy:-102,delay:.54}],J=e.user_derived(()=>{var s;return((s=S())==null?void 0:s.success)!==!0}),D=e.user_derived(()=>{var s;return(s=S())==null?void 0:s.type}),H=e.user_derived(()=>e.get(D)==="noprize"),re=new Set(["loyalty"]),ae={bonus:a()("prizeBonus"),role:a()("prizeRole"),tournament:a()("prizeTournament"),ticket:a()("prizeTicket"),loyalty:a()("prizeLoyalty"),challenge:a()("prizeChallenge"),custom:a()("prizeCustom")},ie=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let U=e.state(void 0),k=e.state("initial"),v=e.state(null);e.user_effect(()=>{e.get(U)&&e.get(k)==="claimSuccess"&&!y()&&he.burstSuccessConfetti(e.get(U))}),e.user_effect(()=>{(e.get(H)||e.get(J))&&e.untrack(()=>A()())});const K=s=>{const r=new URL(`${M()}/v1/wof/draw/${S().lotteryProgramID}`),l=new Headers;T()&&l.append("X-SessionId",T()),l.append("Content-Type","application/json");const u={action:s,guid:S().guid};return fetch(r,{method:"PUT",headers:l,body:JSON.stringify(u)}).then(n=>n.json())},X=()=>O(this,null,function*(){e.set(v,"claim");try{const s=yield K(0),r=e.normalizeDrawResult(s,"draw"),l=(r==null?void 0:r.state)==="fulfilled"&&(r==null?void 0:r.completed),u=(r==null?void 0:r.state)==="drawn"&&!(r!=null&&r.completed);l?e.set(k,"claimSuccess"):e.set(k,"claimFailed")}catch(s){console.log(s),e.set(k,"claimFailed")}finally{e.set(v,null),A()()}}),le=()=>O(this,null,function*(){e.set(v,"reject"),e.set(k,"initial");const s=A();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),yield K(2),s==null||s()}catch(r){console.log(r)}finally{e.set(v,null)}}),ne=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},I=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var de={get result(){return S()},set result(s){S(s),e.flushSync()},get endpoint(){return M()},set endpoint(s){M(s),e.flushSync()},get session(){return T()},set session(s){T(s),e.flushSync()},get liteMode(){return y()},set liteMode(s=!1){y(s),e.flushSync()},get images(){return z()},set images(s=null){z(s),e.flushSync()},get noPrizeDust(){return G()},set noPrizeDust(s=!1){G(s),e.flushSync()},get onFetchRemainingTimes(){return A()},set onFetchRemainingTimes(s=()=>{}){A(s),e.flushSync()}},N=Ce(),Y=e.child(N);t.bind_this(Y,s=>e.set(U,s),()=>e.get(U));var Z=e.sibling(Y,2);{var oe=s=>{var r=we(),l=e.child(r),u=e.child(l,!0);e.reset(l);var n=e.sibling(l,2);t.html(n,()=>a()("rejectWarningText"),!0),e.reset(n);var g=e.sibling(n,2),d=e.child(g),o=e.child(d);let f;var _=e.child(o,!0);e.reset(o);var b=e.sibling(o,2);{var h=i=>{var p=ye();t.append(i,p)};t.if_block(b,i=>{e.get(v)==="claim"&&i(h)})}e.reset(d);var m=e.sibling(d,2),w=e.child(m);let j;var P=e.child(w,!0);e.reset(w);var F=e.sibling(w,2);{var c=i=>{var p=be();t.append(i,p)};t.if_block(F,i=>{e.get(v)==="reject"&&i(c)})}e.reset(m),e.reset(g),e.reset(r),e.template_effect((i,p,R)=>{t.set_text(u,i),d.disabled=!!e.get(v),f=t.set_style(o,"",f,{opacity:e.get(v)==="claim"?0:1}),t.set_text(_,p),m.disabled=!!e.get(v),j=t.set_style(w,"",j,{opacity:e.get(v)==="reject"?0:1}),t.set_text(P,R)},[()=>a()("areYouSure"),()=>a()("keepPrize"),()=>a()("rejectPrize")]),t.delegated("click",d,X),t.delegated("click",m,le),t.append(s,r)};t.if_block(Z,s=>{e.get(k)==="rejectModal"&&s(oe)})}var Q=e.sibling(Z,2),ce=e.child(Q);{var _e=s=>{var r=xe(),l=e.first_child(r),u=e.child(l,!0);e.reset(l);var n=e.sibling(l,2),g=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d),f=e.child(o,!0);e.reset(o),e.reset(d),e.template_effect((_,b,h)=>{t.set_text(u,_),t.set_text(g,b),t.set_text(f,h)},[()=>a()("prizeAssignedTitle"),()=>a()("prizeAssigned"),()=>a()("backToGame")]),t.delegated("click",o,ne),t.append(s,r)},pe=s=>{var r=ze(),l=e.first_child(r),u=e.child(l,!0);e.reset(l);var n=e.sibling(l,2),g=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d),f=e.child(o,!0);e.reset(o),e.reset(d),e.template_effect((_,b,h)=>{t.set_text(u,_),t.set_text(g,b),t.set_text(f,h)},[()=>a()("drawFailedTitle"),()=>a()("drawFailed"),()=>a()("backToGame")]),t.delegated("click",o,I),t.append(s,r)},ue=s=>{var r=Pe(),l=e.first_child(r);{var u=h=>{var m=Te(),w=e.child(m);{var j=F=>{var c=Se();t.each(c,21,()=>se,t.index,(i,p)=>{var R=ke();let C;e.template_effect(()=>{var E,L,V,$,ee;return C=t.set_style(R,"",C,{width:`${(E=e.get(p).size)!=null?E:""}px`,height:`${(L=e.get(p).size)!=null?L:""}px`,"--dust-dx":`${(V=e.get(p).dx)!=null?V:""}px`,"--dust-dy":`${($=e.get(p).dy)!=null?$:""}px`,"animation-delay":`${(ee=e.get(p).delay)!=null?ee:""}s`})}),t.append(i,R)}),e.reset(c),t.append(F,c)};t.if_block(w,F=>{G()&&!y()&&F(j)})}var P=e.sibling(w,2);e.reset(m),e.template_effect(()=>t.set_attribute(P,"src",z().noPrize)),t.append(h,m)};t.if_block(l,h=>{var m;(m=z())!=null&&m.noPrize&&h(u)})}var n=e.sibling(l,2),g=e.child(n,!0);e.reset(n);var d=e.sibling(n,2),o=e.child(d,!0);e.reset(d);var f=e.sibling(d,2),_=e.child(f),b=e.child(_,!0);e.reset(_),e.reset(f),e.template_effect((h,m,w)=>{t.set_text(g,h),t.set_text(o,m),_.disabled=!!e.get(v),t.set_text(b,w)},[()=>a()("noPrizeTitle"),()=>a()("noPrize"),()=>a()("tryAgain")]),t.delegated("click",_,I),t.append(s,r)},ve=s=>{var r=Me(),l=e.first_child(r);{var u=c=>{var i=Fe(),p=e.child(i);e.reset(i),e.template_effect(()=>t.set_attribute(p,"src",z().win)),t.append(c,i)};t.if_block(l,c=>{var i;(i=z())!=null&&i.win&&c(u)})}var n=e.sibling(l,2),g=e.child(n),d=e.sibling(g);t.each(d,17,()=>ie,t.index,(c,i)=>{var p=Re();e.template_effect(()=>{var R,C,E,L;return t.set_style(p,`top:${(R=e.get(i).t)!=null?R:""};left:${(C=e.get(i).l)!=null?C:""};font-size:${(E=e.get(i).s)!=null?E:""};animation-delay:${(L=e.get(i).d)!=null?L:""}`)}),t.append(c,p)}),e.reset(n);var o=e.sibling(n,2);t.html(o,()=>a()("success",{values:{prize:ae[e.get(D)],form:re.has(e.get(D))?"plural":"singular"}}),!0),e.reset(o);var f=e.sibling(o,2),_=e.child(f),b=e.child(_);let h;var m=e.child(b,!0);e.reset(b);var w=e.sibling(b,2);{var j=c=>{var i=je();t.append(c,i)};t.if_block(w,c=>{e.get(v)==="claim"&&c(j)})}e.reset(_);var P=e.sibling(_,2),F=e.child(P,!0);e.reset(P),e.reset(f),e.template_effect((c,i,p)=>{t.set_text(g,`${c!=null?c:""} `),_.disabled=!!e.get(v),h=t.set_style(b,"",h,{opacity:e.get(v)==="claim"?0:1}),t.set_text(m,i),P.disabled=!!e.get(v),t.set_text(F,p)},[()=>a()("congratulations"),()=>a()("claimReward"),()=>a()("reject")]),t.delegated("click",_,X),t.delegated("click",P,()=>e.set(k,"rejectModal")),t.append(s,r)},me=s=>{var r=Ae(),l=e.first_child(r),u=e.sibling(l,2),n=e.child(u,!0);e.reset(u);var g=e.sibling(u,2),d=e.child(g),o=e.child(d,!0);e.reset(d),e.reset(g),e.template_effect((f,_)=>{t.set_attribute(l,"src",fe.Error),t.set_text(n,f),t.set_text(o,_)},[()=>a()("errorJSON"),()=>a()("backToGame")]),t.delegated("click",d,I),t.append(s,r)};t.if_block(ce,s=>{e.get(k)==="claimSuccess"?s(_e):e.get(k)==="claimFailed"?s(pe,1):e.get(H)?s(ue,2):e.get(J)?s(me,-1):s(ve,3)})}e.reset(Q),e.reset(N),t.append(q,N);var ge=e.pop(de);return W(),ge}t.delegate(["click"]);t.create_custom_element(te,{result:{},endpoint:{},session:{},liteMode:{},images:{},noPrizeDust:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.DrawResult=te;
|