cexp-gamification 1.0.1-beta.9 → 1.0.1-test.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -63
- package/dist/cexp-web-sdk.js +2 -2
- package/package.json +37 -37
package/README.md
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
# Gamification SDK
|
|
2
|
-
|
|
3
|
-
A comprehensive, plug-and-play solution for integrating engagement campaigns into your website. This SDK automatically fetches your pre-configured campaign template (Lucky Wheel, Flip Cards, etc.) based on your Client ID and handles the entire user lifecycle from eligibility checks to reward distribution.
|
|
4
|
-
|
|
5
|
-
## 📖 Overview
|
|
6
|
-
|
|
7
|
-
This SDK is designed for **instant integration**. You do not need to code the game logic or design the UI.
|
|
8
|
-
|
|
9
|
-
For more information check out our [website](https://cexp.fpt.com/)
|
|
10
|
-
|
|
11
|
-
1. **Dynamic Loading:** The SDK receives your unique `Client ID`, connects to our servers, and retrieves the specific game template configured for your current campaign.
|
|
12
|
-
2. **Eligibility Management:** Automatically checks if a user has already participated to prevent spam and duplicate entries.
|
|
13
|
-
3. **Lead Generation:** securely collects user information (Name, Phone, etc.) and synchronizes it with your CRM/Data backend.
|
|
14
|
-
|
|
15
|
-
## 📦 Installation
|
|
16
|
-
|
|
17
|
-
Include the SDK script directly into your HTML page (usually before the closing `</body>` tag).
|
|
18
|
-
|
|
19
|
-
```html
|
|
20
|
-
<script src="https://cdn.jsdelivr.net/npm/cexp-gamification@1.0.1-beta.0/dist/cexp-web-sdk.js"></script>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 🚀 Usage
|
|
24
|
-
|
|
25
|
-
Once the script is loaded, the SDK initializes automatically. It will:
|
|
26
|
-
|
|
27
|
-
1. Identify the user context.
|
|
28
|
-
2. Check the campaign configuration associated with your Account.
|
|
29
|
-
3. Render the appropriate engagement module (e.g., a Trigger Button or Pop-up) if the user is eligible to play.
|
|
30
|
-
|
|
31
|
-
### Configuration
|
|
32
|
-
|
|
33
|
-
The SDK operates based on the `clientId` provided during the build or initialization process. It fetches the following configurations remotely:
|
|
34
|
-
|
|
35
|
-
- **Game Type:** (e.g., Wheel, Flip Card, Scratch Card) determined by your backend settings.
|
|
36
|
-
- **Visual Assets:** Background images, icons, and colors.
|
|
37
|
-
- **Rewards & Logic:** Winning probabilities and voucher codes.
|
|
38
|
-
|
|
39
|
-
## ⚠️ Important Notes
|
|
40
|
-
|
|
41
|
-
### 🔒 No Code Modification Required
|
|
42
|
-
|
|
43
|
-
This package is provided as a **compiled, ready-to-use solution**.
|
|
44
|
-
|
|
45
|
-
- **Do not** attempt to decompile, modify, or inject custom CSS/JS into the SDK wrapper.
|
|
46
|
-
- The UI, game logic, and form validation are managed centrally via your Campaign Dashboard to ensure security and data integrity.
|
|
47
|
-
|
|
48
|
-
### 📞 Customization & Support
|
|
49
|
-
|
|
50
|
-
This SDK supports standard campaign templates.
|
|
51
|
-
|
|
52
|
-
**Have a specific requirement?**
|
|
53
|
-
If you need a custom game type, specialized form fields, or a unique integration flow that is not currently supported by your template configuration:
|
|
54
|
-
|
|
55
|
-
> **Please contact our Sales or Customer Success Team.**
|
|
56
|
-
> Custom developments require a tailored implementation plan and cannot be achieved by modifying this client-side package.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## 📄 License
|
|
61
|
-
|
|
62
|
-
Property of [FPT corporation]. All rights reserved.
|
|
63
|
-
Unauthorized copying or modification of this file is strictly prohibited.
|
|
1
|
+
# Gamification SDK
|
|
2
|
+
|
|
3
|
+
A comprehensive, plug-and-play solution for integrating engagement campaigns into your website. This SDK automatically fetches your pre-configured campaign template (Lucky Wheel, Flip Cards, etc.) based on your Client ID and handles the entire user lifecycle from eligibility checks to reward distribution.
|
|
4
|
+
|
|
5
|
+
## 📖 Overview
|
|
6
|
+
|
|
7
|
+
This SDK is designed for **instant integration**. You do not need to code the game logic or design the UI.
|
|
8
|
+
|
|
9
|
+
For more information check out our [website](https://cexp.fpt.com/)
|
|
10
|
+
|
|
11
|
+
1. **Dynamic Loading:** The SDK receives your unique `Client ID`, connects to our servers, and retrieves the specific game template configured for your current campaign.
|
|
12
|
+
2. **Eligibility Management:** Automatically checks if a user has already participated to prevent spam and duplicate entries.
|
|
13
|
+
3. **Lead Generation:** securely collects user information (Name, Phone, etc.) and synchronizes it with your CRM/Data backend.
|
|
14
|
+
|
|
15
|
+
## 📦 Installation
|
|
16
|
+
|
|
17
|
+
Include the SDK script directly into your HTML page (usually before the closing `</body>` tag).
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<script src="https://cdn.jsdelivr.net/npm/cexp-gamification@1.0.1-beta.0/dist/cexp-web-sdk.js"></script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 🚀 Usage
|
|
24
|
+
|
|
25
|
+
Once the script is loaded, the SDK initializes automatically. It will:
|
|
26
|
+
|
|
27
|
+
1. Identify the user context.
|
|
28
|
+
2. Check the campaign configuration associated with your Account.
|
|
29
|
+
3. Render the appropriate engagement module (e.g., a Trigger Button or Pop-up) if the user is eligible to play.
|
|
30
|
+
|
|
31
|
+
### Configuration
|
|
32
|
+
|
|
33
|
+
The SDK operates based on the `clientId` provided during the build or initialization process. It fetches the following configurations remotely:
|
|
34
|
+
|
|
35
|
+
- **Game Type:** (e.g., Wheel, Flip Card, Scratch Card) determined by your backend settings.
|
|
36
|
+
- **Visual Assets:** Background images, icons, and colors.
|
|
37
|
+
- **Rewards & Logic:** Winning probabilities and voucher codes.
|
|
38
|
+
|
|
39
|
+
## ⚠️ Important Notes
|
|
40
|
+
|
|
41
|
+
### 🔒 No Code Modification Required
|
|
42
|
+
|
|
43
|
+
This package is provided as a **compiled, ready-to-use solution**.
|
|
44
|
+
|
|
45
|
+
- **Do not** attempt to decompile, modify, or inject custom CSS/JS into the SDK wrapper.
|
|
46
|
+
- The UI, game logic, and form validation are managed centrally via your Campaign Dashboard to ensure security and data integrity.
|
|
47
|
+
|
|
48
|
+
### 📞 Customization & Support
|
|
49
|
+
|
|
50
|
+
This SDK supports standard campaign templates.
|
|
51
|
+
|
|
52
|
+
**Have a specific requirement?**
|
|
53
|
+
If you need a custom game type, specialized form fields, or a unique integration flow that is not currently supported by your template configuration:
|
|
54
|
+
|
|
55
|
+
> **Please contact our Sales or Customer Success Team.**
|
|
56
|
+
> Custom developments require a tailored implementation plan and cannot be achieved by modifying this client-side package.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 📄 License
|
|
61
|
+
|
|
62
|
+
Property of [FPT corporation]. All rights reserved.
|
|
63
|
+
Unauthorized copying or modification of this file is strictly prohibited.
|
package/dist/cexp-web-sdk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var
|
|
2
|
-
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function t(){var n=["4981963XEhmxt","puzzle","2974870iYWixA","3082812YDNvlo","pzuGM","card","2161008IZDcSJ","PUZZEL","5954296LyFCBf","wheel","WHEEL","1522914UnDXXK","aKBWW","454510OyURwb","3SiKIsl"];return(t=function(){return n})()}function n(e,r){var o=t();return(n=function(t,n){return o[t-=186]})(e,r)}!function(t){for(var e=n,r=t();;)try{if(458808===-parseInt(e(190))/1+parseInt(e(188))/2+-parseInt(e(191))/3*(parseInt(e(195))/4)+parseInt(e(194))/5+parseInt(e(198))/6+parseInt(e(192))/7+-parseInt(e(200))/8)break;r.push(r.shift())}catch(o){r.push(r.shift())}}(t);var e,r,o,s=(e=s||{},o={uazqb:(r=n)(187),dqDlb:r(186),ekpVk:"CARD",aKBWW:r(197),pzuGM:r(199),NOwOd:r(193)},e[o.uazqb]=o.dqDlb,e[o.ekpVk]=o[r(189)],e[o[r(196)]]=o.NOwOd,e);function a(t,n){var e=c();return(a=function(t,n){return e[t-=405]})(t,n)}function c(){var t=["hKqpz","XAxvD","CENTER_CENTER","wRWRE","LKNsV","top-right","kweXZ","xeJvM","VSRcM","5121QgLvIf","30JOEWsK","eKJQk","bottom-right","1133965WivREk","nlIjV","12ghpkZW","BOTTOM_CENTER","bottom-left","81976FoaVuH","WUmde","TOP_RIGHT","mid-left","BOTTOM_RIGHT","Hpula","bottom-center","top-center","4aTuAdi","Urvsh","BOTTOM_LEFT","567483Wtmqfd","CjKXB","TOP_LEFT","CENTER_LEFT","mid-center","1776fAmIXg","861280SUhuau","1600iFQFwL","top-left","630ejDPgD","7624551ByFeFI"];return(c=function(){return t})()}!function(t){for(var n=a,e=t();;)try{if(224423===-parseInt(n(420))/1+-parseInt(n(438))/2*(parseInt(n(440))/3)+parseInt(n(428))/4*(parseInt(n(415))/5)+parseInt(n(412))/6*(-parseInt(n(431))/7)+parseInt(n(436))/8*(-parseInt(n(411))/9)+parseInt(n(437))/10+-parseInt(n(441))/11*(-parseInt(n(417))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(c);var i,u,p,l=(i=l||{},p={hKqpz:(u=a)(430),fWrrs:u(419),wRWRE:u(418),WUmde:u(426),Hpula:u(424),ytisl:u(414),nlIjV:u(434),LKNsV:u(423),xeJvM:u(435),VSRcM:"CENTER_RIGHT",XAxvD:u(433),caGGt:u(439),eKJQk:"TOP_CENTER",Urvsh:u(427),kweXZ:u(422),CjKXB:u(407)},i[p[u(442)]]=p.fWrrs,i[p[u(405)]]=p[u(421)],i[p[u(425)]]=p.ytisl,i[p[u(416)]]=p[u(406)],i[u(444)]=p[u(409)],i[p[u(410)]]="mid-right",i[p[u(443)]]=p.caGGt,i[p[u(413)]]=p[u(429)],i[p[u(408)]]=p[u(432)],i);function f(t,n){var e=d();return(f=function(t,n){return e[t-=386]})(t,n)}function d(){var t=["7172608ltlBki","8540dSmiiv","1fNJRZX","342331wVMxOb","414272SxlPlb","8847954CizRHl","150gQtiUR","44AEvRNv","5027820ONHWGy","26943cxckCo","1350uSiQJp"];return(d=function(){return t})()}function m(t,n){const e=g();return(m=function(t,n){return e[t-=131]})(t,n)}function h(t){const n=m,e={JphbW:n(145),mPwcc:"size-4",yAIvd:function(t,n){return t||n},HHicA:n(147),xMCqY:n(154),JwXUC:n(137),efouU:n(132),mtcvW:n(136),MGwtl:n(160),UVjrY:n(165),WgecF:n(166),egZxz:n(150),xWEce:n(152),OemvI:n(148),awMDP:n(151)},{size:r=24,fill:o=e[n(146)],className:s=e[n(153)]}=e[n(163)](t,{}),a=e[n(155)],c=document[n(140)](a,e[n(134)]);c[n(144)](e[n(167)],r[n(159)]()),c[n(144)](n(162),r[n(159)]()),c[n(144)](e[n(143)],e[n(142)]),c[n(144)](e[n(156)],e[n(157)]),c[n(144)](e[n(158)],a),s&&c[n(144)]("class",s);const i=document[n(140)](a,"g");i.setAttribute("id",e[n(131)]);const u=document[n(140)](a,e.xWEce);return u[n(144)]("id",e.OemvI),u[n(144)]("d",e.awMDP),u[n(144)](e.MGwtl,o),i.appendChild(u),c[n(168)](i),c}function g(){const t=["var(--neutral-gray-900)","JphbW","http://www.w3.org/2000/svg","Shape","8IEhxiB","Dismiss","M4.2097 4.3871L4.29289 4.29289C4.65338 3.93241 5.22061 3.90468 5.6129 4.2097L5.70711 4.29289L12 10.585L18.2929 4.29289C18.6834 3.90237 19.3166 3.90237 19.7071 4.29289C20.0976 4.68342 20.0976 5.31658 19.7071 5.70711L13.415 12L19.7071 18.2929C20.0676 18.6534 20.0953 19.2206 19.7903 19.6129L19.7071 19.7071C19.3466 20.0676 18.7794 20.0953 18.3871 19.7903L18.2929 19.7071L12 13.415L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071C3.90237 19.3166 3.90237 18.6834 4.29289 18.2929L10.585 12L4.29289 5.70711C3.93241 5.34662 3.90468 4.77939 4.2097 4.3871L4.29289 4.29289L4.2097 4.3871Z","path","mPwcc","svg","HHicA","MGwtl","UVjrY","WgecF","toString","fill","725150AgsGyE","height","yAIvd","3103235KakNae","none","xmlns","JwXUC","appendChild","egZxz","viewBox","752278pLymib","xMCqY","16541400XmSHct","0 0 24 24","width","1076325UXZyXC","3366125KPbuYU","createElementNS","5020488QeUOck","mtcvW","efouU","setAttribute"];return(g=function(){return t})()}function I(){const t=["128SGDHZb","1546160KMswhm","6019605TmzRaV","35807290TVjnAm","1363TfXuMY","sv/token","pl/games","1138tlOegt","pl/games/","2134761IeOPPO","261317yChccb","7164459XUWyry","6ILDavj","pl/games/reward"];return(I=function(){return t})()}!function(t){for(var n=f,e=t();;)try{if(605900===parseInt(n(391))/1*(-parseInt(n(393))/2)+-parseInt(n(387))/3*(-parseInt(n(396))/4)+parseInt(n(390))/5*(-parseInt(n(388))/6)+parseInt(n(386))/7+parseInt(n(389))/8+-parseInt(n(394))/9+-parseInt(n(395))/10*(-parseInt(n(392))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(d),function(t){const n=m,e=t();for(;;)try{if(513610===-parseInt(n(161))/1+-parseInt(n(133))/2+-parseInt(n(138))/3*(parseInt(n(149))/4)+parseInt(n(164))/5+-parseInt(n(141))/6+parseInt(n(139))/7+parseInt(n(135))/8)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(g);const b=y;function y(t,n){const e=I();return(y=function(t,n){return e[t-=210]})(t,n)}!function(t){const n=y,e=t();for(;;)try{if(701889===-parseInt(n(221))/1*(parseInt(n(210))/2)+-parseInt(n(212))/3+-parseInt(n(218))/4+-parseInt(n(219))/5*(parseInt(n(215))/6)+parseInt(n(213))/7*(-parseInt(n(217))/8)+parseInt(n(214))/9+parseInt(n(220))/10)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(I),b(222);const x=b(223),T=b(216),w=E;function C(){const t=["6rPsIGs","18DFjTEl","error","GET","765205ihoMlu","183508tBDPVU","1360562pXfbGG","yTTCV","VoRBJ","3kxVwOU","json","http://staging-cdp-api.cads.live/gamification","Bearer ","body","7097874cAAUBR","HTTP error! Status: ","3365840TuWHPa","headers","21135800FqhlNG","API Call Failed (",". Message: ","status","substring","agxwX","): ","Content-Type","173552rUBJWz"];return(C=function(){return t})()}!function(t){const n=E,e=t();for(;;)try{if(715304===parseInt(n(117))/1+parseInt(n(118))/2*(parseInt(n(121))/3)+-parseInt(n(111))/4+-parseInt(n(116))/5*(-parseInt(n(112))/6)+parseInt(n(126))/7+-parseInt(n(128))/8*(-parseInt(n(113))/9)+-parseInt(n(130))/10)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(C);const v=w(123);function E(t,n){const e=C();return(E=function(t,n){return e[t-=110]})(t,n)}async function k(t,n,e={}){const r=w,o={VoRBJ:r(110),haHSz:"application/json",yTTCV:function(t,n,e){return t(n,e)}},s=v+"/"+t,a={Authorization:r(124)+n,...e[r(125)]&&!e[r(129)]?.[o[r(120)]]?{"Content-Type":o.haHSz}:{}},c=await o[r(119)](fetch,s,{...e,headers:{...a,...e.headers}});if(!c.ok){const t=await c.text();throw console.error(r(131)+c[r(133)]+r(136)+s,t),new Error(r(127)+c.status+r(132)+t[r(134)](0,100))}return c[r(122)]()}function O(){const t=["uWziY","jCanu","\n top: 20px;\n left: 20px;\n ","yqZhQ","eoKrr","none","desktopConfig","TOP_CENTER","\n bottom: 50%;\n left: 20px;\n transform: translateY(-50%);\n ","\n bottom: 20px;\n right: 20px;\n ","button-root","click","result-header","WHoJj","uSIQY","absolute px-4","gDGMi","fwTfH","matches","\n top: 20px;\n right: 25px;\n ","errors","YdMdm","innerText","PAwcK","absolute px-4 text-white pb-16","\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n ","9118629gZOdTT","dgjHx","tIZxX","IfLdf","Nhập họ và tên","\n bottom: 20px;\n left: 20px;\n ","Nhập số điện thoại","OmOGH","oRpeb","BOTTOM_RIGHT","QYBCu","phone","url(","stringify","eSGcK","bYZiJ","wrap-text","test","YAyrC","TOP_RIGHT","BOTTOM_CENTER","style","bottom-right","text-white hight-light","QZGaZ","error","close-result-btn","off","wheel-form-wrapper","gkZHT","XSKoE","text-field","removeChild","result-header-title","lOUYS","CENTER_CENTER","\n bottom: calc(50% + 55px) ;\n right: 5px;\n transform: translateY(-50%);\n ","body","5374410pntmih","lAcsp","nVTdk","Vui lòng nhập số điện thoại","trigger-btn","createElement","WPJGU","zcKQF","className","_blank","cexp-backdrop-wheel","WcvEn","3904166vFMFmV","wheel-policy","\n bottom: 20px;\n right: 50%;\n transform: translateX(-50%);\n ","TOP_LEFT","map","lSCkS","isValid","b2-medium text-white","OgrRV","GtyGY","d-flex gap-2","fOfun","BOTTOM_LEFT","type","cexp-wrapper","\n bottom: 20px !important;\n right: 20px;\n ","block","appendChild","\n top: 20px;\n left: 65px;\n transform: translateY(-50%);\n ","querySelectorAll","display","VDpsy","Zxtvi","Xin chúc mừng","vYceZ","Brhuf","nStLo","PUdOj","title","515MwGrKb","UwIZl","3518hIftan","vzpjx","ouxaV","qBcvp","--backgroundTriggerMb","\n bottom: calc(50% + 65px) ;\n left: calc(50% + 40px);\n transform: translate(-50%);\n ","ZDsgk","jECus","target","\n top: 10px;\n left: calc(50% + 30px);\n transform: translateX(-50%);\n ","vyFic","aSoPT","name","Săn ngay","bHWSN","\n bottom: calc(50% + 60px);\n transform: translateY(-50%);\n left: 65px;\n ","observe","cexp-wheel","then","fWitp","39220AYbYBB","length","autocomplete","../assets/wheel_background.png","\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n ","--backgroundModalMb","flex","TqHHr","addEventListener","setProperty","Xem thể lệ>>","documentElement","MxQdY","input","error-msg","gNUGk","modal-wrapper","mobileConfig","matchMedia","forEach","animate","IZITL","CfyRW","3653262NZFDKw","cssText","wheel-modal","button","rotate(0deg)","\n top: 10px;\n ","translateX(-251px) rotate(0deg)","div","value","ofAKK","XhWtf","submit","text-field ","\n flex-direction: column\n ","PbSzA","NmByQ","715ddOxUE","log","document","Failure","rotate(360deg)","placeholder","button-root b2-medium bg-black","wheel_result_background","JfOOV","--backgroundWheelMb","--backgroundResultMb","AhIjB","wrap-text mb-2","mMndO","4975632WsCFDD","--backgroundTrigger","(max-width: 768px)","../assets/wheel.png"];return(O=function(){return t})()}function W(t,n){const e=O();return(W=function(t,n){return e[t-=402]})(t,n)}function G(t){const n=W,e={uWziY:"POST",zGPRh:"Số điện thoại không chính xác!",aSoPT:n(521),XhWtf:n(486),gDGMi:n(488),YAyrC:n(502),yqZhQ:"translateX(-251px) rotate(360deg)",TUvzF:"linear",iMEWh:function(t,n,e){return t(n,e)},MxQdY:n(553),eSGcK:n(424),mMndO:n(515),ofAKK:n(462),dgjHx:n(564),GtyGY:"cexp-gamification",YdMdm:n(489),mjBeK:n(584),jCanu:n(485),QYBCu:n(526),Brhuf:function(t,n,e,r){return t(n,e,r)},ouxaV:function(t,n){return t||n},vyFic:n(513),ZDsgk:n(443),uSIQY:n(422),lAcsp:n(475),uKDvP:n(484),PUdOj:function(t,n){return t||n},NmByQ:n(464),TqHHr:function(t,n){return t(n)},tIZxX:"#333",bHWSN:function(t,n){return t||n},fwTfH:"--backgroundWheel",bPKsQ:"wheel-modal-title",lSCkS:n(540),zcKQF:function(t,n){return t??n},WHoJj:n(472),UwIZl:n(409),IZITL:n(531),OgrRV:n(573),Zxtvi:n(451),aCnhd:"text",XSKoE:n(546),fOfun:n(569),vzpjx:n(494),IfLdf:n(548),VDpsy:n(452),CfyRW:n(493),qBcvp:"text-white b1-medium text-underline",PbSzA:n(405),fWitp:n(418),JfOOV:"click",PAwcK:n(501),lOUYS:n(514),CFvlL:n(508),duaPw:"--backgroundResult",ApXrU:n(528),nVTdk:n(431),oRpeb:n(568),DJUZj:n(510),ZNsHh:n(415),jECus:n(565),AhIjB:n(558),WcvEn:n(469),FJfoj:'[id*="cexp"]',bYZiJ:function(t,n){return t>n},gkZHT:function(t){return t()}},{gameConfig:r,apiKey:o,game_id:s}=t;let a,c=!1,i={isValid:!1,disabled:!1,errors:[{name:e[n(430)],message:""},{name:"phone",message:""}]};async function u(t){const r=n;a&&clearInterval(a);try{return await k(T,o,{method:e[r(516)],body:JSON[r(555)]({customer:t,game_id:s})})}catch(c){throw c}}function p(t,e,r){const o=n;switch(r){case l[o(551)]:t[o(563)][o(483)]=o(525),t.style[o(483)]=o(525);break;case l[o(562)]:t.style[o(483)]=o(410),e[o(563)].cssText="\n right: 50%;\n transform: translateX(-50%);\n ";break;case l[o(420)]:t[o(563)][o(483)]=o(547),e[o(563)][o(483)]="\n left: 65px;\n ";break;case l.CENTER_LEFT:t[o(563)].cssText=o(524),e[o(563)][o(483)]=o(454);break;case l[o(577)]:t[o(563)].cssText=o(541),e[o(563)].cssText=o(444);break;case l.CENTER_RIGHT:t[o(563)][o(483)]="\n bottom: 50%;\n right: 20px;\n transform: translateY(-50%);\n ",e.style.cssText=o(578);break;case l[o(411)]:t[o(563)][o(483)]=o(518),e[o(563)][o(483)]=o(426);break;case l[o(523)]:t[o(563)][o(483)]=o(463),e[o(563)][o(483)]=o(448);break;case l[o(561)]:t[o(563)][o(483)]=o(535),e[o(563)][o(483)]=o(487);break;default:t[o(563)][o(483)]=o(423)}}function f(){const t=n,o={eoKrr:e[t(471)],vYceZ:e[t(450)],ABaKl:e[t(556)],nStLo:t(465)},s=window[t(477)](t(514)).matches,l=document[t(470)],{desktopConfig:f,mobileConfig:m}=r??{},{backgroundTrigger:g="../assets/wheel_trigger.png",triggerPosition:I=t(564),backgroundWheel:b=e[t(511)],backgroundModal:y=e[t(491)],title:x,rule:T={title:"",url:""}}=f,{backgroundTrigger:w,triggerPosition:C=e[t(543)],backgroundModal:v,backgroundWheel:E,title:k,rule:O}=m,W=document[t(585)](t(489));W.id=e[t(417)];const G=document[t(585)](e.YdMdm);G.id=e.mjBeK;const K=document[t(585)](e[t(517)]);K.id="close-trigger-btn",K[t(404)]=e[t(552)],console[t(499)](C),e[t(433)](p,G,K,s?C:I);const P=h({size:12,fill:"#333"});K[t(425)](P),W[t(425)](K),W[t(425)](G),e[t(441)](g,w)&&(l[t(563)][t(468)](e[t(449)],t(554)+g+")"),l[t(563)][t(468)](e[t(445)],t(554)+w+")"));const M=document.createElement(e.YdMdm);M.id=e[t(530)];const R=document[t(585)](e[t(537)]);R.id=e[t(581)];const H=document[t(585)](e[t(537)]);H.id=t(406);const Y=document[t(585)](e[t(537)]);Y.id=e.uKDvP,e[t(435)](y,v)&&(l[t(563)][t(468)]("--backgroundModal",t(554)+y+")"),l.style[t(468)](e[t(497)],t(554)+v+")")),R[t(425)](Y);const N=document[t(585)](e[t(517)]);N.id="close-modal-btn",N[t(404)]=e[t(552)];const S=e[t(466)](h,{size:16,fill:e[t(544)]});N[t(425)](S),Y[t(425)](N);const L=document[t(585)](e.YdMdm);L.id=t(456),e[t(453)](b,E)&&(l[t(563)][t(468)](e[t(533)],t(554)+b+")"),l.style[t(468)](t(507),"url("+E+")"));const Z=document[t(585)]("h1");Z.id=e.bPKsQ,Z.className=e[t(413)],Z[t(538)]=s?k:e[t(403)](x,"");const U=document[t(585)](e[t(537)]),V=document[t(585)]("form"),j=document.createElement(e[t(529)]),A=document[t(585)](e[t(529)]),B=document.createElement(e[t(517)]),F=document.createElement("a");F.id=e[t(438)],U[t(404)]=e[t(480)],U.id=t(570);const X=document[t(585)](e[t(537)]);X[t(404)]=e[t(416)],j[t(451)]=e.Zxtvi,j.type=e.aCnhd,j[t(503)]=e[t(572)],j[t(461)]=e[t(419)],X[t(425)](j);const z=document[t(585)](t(489));z.className=e[t(440)],A[t(451)]=e[t(471)],A[t(421)]="text",A[t(503)]=e[t(545)],A.title=e[t(545)],A[t(461)]=e[t(419)];const D=document[t(585)]("p");if(D.id=t(473),z[t(425)](A),B[t(404)]=t(504),B[t(538)]=e[t(429)],B[t(421)]=e[t(481)],e[t(453)](T,O)){const{title:n,url:r}=s?O:T;F[t(404)]=e[t(442)],F.innerText=n??"",F.href=e[t(403)](r,""),F[t(447)]=e[t(496)]}V[t(404)]=e[t(458)],V[t(563)][t(483)]=t(495),V.appendChild(X),V.appendChild(z),V[t(425)](D),V[t(425)](B),V[t(425)](F),U.appendChild(V);let J=!1;A[t(467)](e.WHoJj,n=>{const r=t;A[r(490)]=A.value.replace(/[^\d+]/g,"");const s=/^(0|84|\+84)(3|5|7|8|9)([0-9]{8})$/[r(559)](n?.[r(447)]?.[r(490)]);s?(D.innerText="",B.disabled=!1):(D[r(538)]=e.zGPRh,B.disabled=!0),i={isValid:s,disabled:!s,errors:i[r(536)]?.[r(412)](t=>{const n=r;return t[n(451)]===o[n(520)]?{...t,message:s?"":n(583)}:t})}}),V[t(467)](e.CfyRW,async n=>{const r=t,o={WPJGU:e.aSoPT,gNUGk:function(t,n){return t(n)}};n.preventDefault();const c={name:j[r(490)],phone:A[r(490)]};i[r(414)]&&(!J&&L[r(479)]([{transform:s?e[r(492)]:e[r(532)]},{transform:s?e[r(560)]:e[r(519)]}],{duration:3e3,easing:e.TUvzF,iterations:1/0}),J=!0,B.disabled=!0,a||(a=e.iMEWh(setInterval,()=>{const t=r,n={QZGaZ:o[t(402)],OmOGH:function(t,n,e){return t(n,e)}};o[t(474)](u,c)[t(457)](e=>{const r=t;R[r(563)][r(428)]=n[r(566)],G.style[r(428)]=n[r(566)],n[r(549)](d,!0,e),document[r(579)][r(574)](H)}).catch(e=>{const r=t;R[r(563)].display=n[r(566)],G[r(563)][r(428)]=n[r(566)],d(!1),document[r(579)][r(574)](H)})},2e3)))}),N[t(467)](t(527),()=>{const n=t;console[n(499)](c),c?(R[n(563)].display="none",G[n(563)][n(428)]=n(521),document[n(579)][n(574)](H)):(R.style[n(428)]="flex",G[n(563)][n(428)]=e.aSoPT,document[n(579)][n(574)](H)),c=!c}),G[t(467)](e[t(506)],()=>{const n=t;c?(R[n(563)][n(428)]=o[n(432)],G[n(563)][n(428)]=o.ABaKl,K.style.display=o[n(432)]):(R.style[n(428)]=o[n(434)],G[n(563)][n(428)]=o[n(432)],K[n(563)][n(428)]=n(521),document.body[n(425)](H)),c=!c}),K[t(467)](e[t(506)],()=>{const n=t;R.style[n(428)]=n(521),G[n(563)][n(428)]=o[n(432)],K[n(563)].display=n(521)}),Y.appendChild(L),Y[t(425)](Z),Y[t(425)](U),M[t(425)](R),document[t(579)][t(425)](M),document[t(579)][t(425)](W)}function d(t,o){const s=n;if(!t)return console[s(567)](e[s(539)]);const a=window[s(477)](e[s(576)])[s(534)],i=document[s(470)],{backdropResult:u}=a?r[s(476)]:r[s(522)]??{};u[s(505)]&&(a?i.style.setProperty(e.CFvlL,"url("+u[s(505)]+")"):i[s(563)][s(468)](e.duaPw,s(554)+u[s(505)]+")"));const p=document[s(585)](e.YdMdm);p.id="cexp-result-container";const l=document[s(585)](s(489));l.id=e.ApXrU;const f=document.createElement(e.YdMdm);f.id=s(575),f[s(538)]=u?.[s(436)]??e[s(582)];const d=document[s(585)](e[s(517)]);d.className=s(526),d.id=e[s(550)];const m=h({size:16,fill:e[s(544)]});d[s(425)](m);const g=document.createElement(e[s(537)]);g.className=e.DJUZj;const I=document[s(585)]("p");I[s(404)]=e.ZNsHh,I[s(538)]=(o?.[s(436)]??"")+": ";const b=document[s(585)]("a");b[s(404)]=e[s(446)],b[s(538)]=o?.voucher??"",I[s(425)](b);const y=document.createElement(e.YdMdm);y[s(404)]=e[s(509)];const x=document.createElement("a");x[s(404)]=s(565),x.innerText=e[s(407)],g[s(425)](I),p.appendChild(l),p[s(425)](d),p[s(425)](f),p[s(425)](g),p[s(425)](y),d[s(467)](e[s(506)],()=>{const t=s;c=!1,p[t(563)][t(428)]=e[t(450)]}),document[s(579)].appendChild(p)}function m(){const t=n,r=document[t(427)](e.FJfoj);e[t(557)](r[t(460)],0)&&r[t(478)](t=>t.remove())}new ResizeObserver(t=>{const r=n;e[r(571)](m),e[r(571)](f)})[n(455)](window[n(500)][n(579)])}!function(t){const n=W,e=t();for(;;)try{if(916754===parseInt(n(498))/1*(-parseInt(n(439))/2)+parseInt(n(482))/3+parseInt(n(459))/4*(parseInt(n(437))/5)+parseInt(n(580))/6+-parseInt(n(408))/7+parseInt(n(512))/8+-parseInt(n(542))/9)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(O);const K=M;function P(){const t=["20KifBhJ","2217wpDtfO","map","AeTiH","forEach","TFqHM","removeChild","7385973HTuESk","pQGvt","VGFPc","phone","object","4266024syonRC","value","1330002VpHVsf","694593gJiiDU","body","4089936bNHjdj",'[id*="cexp"]',"init","10496106ZphIWk","location","querySelectorAll","1996UTTHbD","includes","all"];return(P=function(){return t})()}function M(t,n){const e=P();return(M=function(t,n){return e[t-=106]})(t,n)}!function(t){const n=M,e=t();for(;;)try{if(852130===parseInt(n(119))/1+-parseInt(n(127))/2*(-parseInt(n(131))/3)+-parseInt(n(116))/4+-parseInt(n(130))/5*(-parseInt(n(118))/6)+-parseInt(n(111))/7+-parseInt(n(121))/8+parseInt(n(124))/9)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(P);const R={isValid:!1,disabled:!1,errors:[{name:"name",message:""},{name:K(114),message:""}]};class H{#t;#n;constructor(t){const{apiKey:n,gameConfig:e}=t,r=e;this.#t=r,this.#n=n,this.formState=R}#e(t,n){const e={AeTiH:function(t,n){return t(n)},pQGvt:function(t,n,e){return t(n,e)}};let r;return function(...o){const s=M;e[s(107)](clearTimeout,r),r=e[s(112)](setTimeout,()=>t.apply(this,o),n)}}#r(){({VGFPc:function(t,n){return t(n)}})[K(113)](G,{gameConfig:this.#t,apiKey:this.#n,game_id:this.#t.game_id})}async[K(123)](){const t=K,n={rCExb:t(115),TFqHM:t(129)},{allowedUrl:e}=this.#t;if(typeof e===n.rCExb){const n=e[t(106)](n=>n[t(117)]),r=window[t(125)].href;return void(n[t(128)](r)&&this.#r())}if(e===n[t(109)])return void this.#r();document[t(126)](t(122))[t(108)](n=>document[t(120)][t(110)](n))}}function Y(){var t=["47115TigGBh","906nxjJwp","343ILvlzK","191512aOHxuJ","42GbGYZA","6342VZRZry","890IXCJhM","140921otlmtq","4188918wRTspR","6001911mBltbu","6005492AahOzr"];return(Y=function(){return t})()}function N(t,n){var e=Y();return(N=function(t,n){return e[t-=479]})(t,n)}!function(t){for(var n=N,e=t();;)try{if(973941===-parseInt(n(484))/1*(-parseInt(n(485))/2)+parseInt(n(488))/3+parseInt(n(479))/4+-parseInt(n(480))/5*(parseInt(n(481))/6)+parseInt(n(482))/7*(parseInt(n(483))/8)+-parseInt(n(489))/9+parseInt(n(486))/10*(-parseInt(n(487))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(Y);const S=Z;function L(){const t=["forEach","aELNw","11754207VeNBfy","hWjhn","714177dGQrSC","game","2316GqODnN","mdCfL","709640EPPGUE","eOCBm","amd","5871436vQsmWW","14819112VYjYja","Error:","length","init","qkPud","function","pFPey","game_id","wXzNi","31836nYGWIT","OTcjR","394VWHIFj","type","siqiY","InZnJ","error","undefined","uuAVs","19449PpElRc"];return(L=function(){return t})()}function Z(t,n){const e=L();return(Z=function(t,n){return e[t-=303]})(t,n)}!function(t){const n=Z,e=t();for(;;)try{if(963599===-parseInt(n(309))/1+parseInt(n(328))/2*(parseInt(n(304))/3)+parseInt(n(316))/4+parseInt(n(313))/5+-parseInt(n(311))/6*(parseInt(n(326))/7)+parseInt(n(317))/8+-parseInt(n(307))/9)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(L),function(t,n){const e=Z,r={pFPey:"object",qkPud:function(t,n){return t!==n},OTcjR:function(t){return t()},siqiY:function(t,n){return t===n},eOCBm:e(322),hWjhn:function(t,n){return t(n)},uuAVs:e(333)};if(typeof exports===r[e(323)]&&r[e(321)](typeof module,e(333)))module.exports=r[e(327)](n);else if(r[e(330)](typeof define,r[e(314)])&&define[e(315)])r[e(308)](define,n);else{(r.qkPud(typeof globalThis,e(333))?globalThis:t||(typeof self!==r[e(303)]?self:{})).cexp=r[e(327)](n)}}(typeof window!==S(333)?window:void 0,()=>{const t=S,n={wXzNi:"API Key is required",InZnJ:function(t,n,e){return t(n,e)},mdCfL:t(318),prYDU:function(t,n){return t===n},aELNw:"Your game not available!"};class e{#n;constructor({apiKey:e}){const r=t;!e&&console[r(332)](n[r(325)]),this.#n=e}async#o(){const e=t;try{return n[e(331)](k,x,this.#n)}catch(r){throw console.error(n.mdCfL,r),r}}async#s(e){const r=t;try{const t=(o=e,b(211)+o);return n[r(331)](k,t,this.#n)}catch(s){throw console.error(n[r(312)],s),s}var o}async#a(e){const r=t;e[r(305)](async t=>{const e=r;try{const r=await this.#s(t[e(324)]),{config:{gameConfig:o}}=r;console.log(r);const a={game_id:t[e(324)],...o?.game?JSON.parse(o?.[e(310)]):{}};if(a&&n.prYDU(a[e(329)],s.WHEEL)){new H({apiKey:this.#n,gameConfig:a}).init()}else a&&console.info(n[e(306)])}catch(o){console[e(332)](o)}})}async[t(320)](){const n=t;if(this.#n)try{const t=await this.#o();t[n(319)]&&this.#a(t)}catch(e){}}}return e})});
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(':root{--backgroundTrigger: "";--backgroundTriggerMb: "";--backgroundWheel: "";--backgroundWheelMb: "";--backgroundModal: "";--backgroundModalMb: "";--backgroundResult: "";--backgroundResultMb: ""}*{box-sizing:border-box}.relative{position:relative}.absolute{position:absolute}.gap-2{gap:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.mb-2{margin-bottom:2rem}.pb-12{padding-bottom:3rem}.pb-16{padding-bottom:4rem}.d-flex{display:flex}.flex-col{flex-direction:column}.w-full{width:100%}.text-field{font-size:14px;font-weight:400;line-height:20px;width:100%;height:36px;background-color:#fff;border-radius:8px;padding:.75rem;border-style:none;outline:2px solid transparent;outline-offset:2px}.text-field input{border-style:none;flex:1 1 0%;outline:2px solid transparent;outline-offset:2px;margin:0;padding:0}.bt-transparent{background-color:transparent}.b1-medium{font-size:16px;line-height:24px;font-weight:500}.b2-medium{font-size:14px;font-weight:500;line-height:20px}.text-white{opacity:1;color:#fff}.text-underline{text-decoration:underline}.bg-black{background-color:#000}.button-root{display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s;height:2.5rem;border-radius:.5rem;cursor:pointer}.cexp-preview-wrapper div{position:relative;display:block;font-style:inherit;text-align:inherit}.wrap-text{display:flex!important;align-items:flex-start;word-break:break-word;padding:0 30px!important;font-size:16px!important;font-weight:400!important;font-family:Insider-Roboto,sans-serif!important;color:#fff!important}.hight-light{font-weight:600;text-decoration:underline}.trigger-btn{width:100%;height:100%;background-image:var(--backgroundTrigger);background-size:contain;background-repeat:no-repeat;background-position:center;cursor:pointer;position:absolute;z-index:100}.close-trigger-btn{border:none;outline:none;z-index:10000}.cexp-wrapper{position:fixed;width:100%;height:100vh;z-index:9999}.backdrop-wheel{display:block;opacity:.8;position:fixed;z-index:100;width:100%;height:100%;background-color:#000;opacity:.6;top:0;left:0;cursor:pointer}.modal-wrapper{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.wheel-modal-banner{background-size:contain;background-repeat:no-repeat;background-position:center;width:100%;max-width:70%;height:30%;top:0;right:0}.wheel-form-wrapper{width:321px;right:0;bottom:0;padding-bottom:20px}.cexp-wheel{width:300px;height:300px;transform:translate(-251px);background:var(--backgroundWheel);background-size:cover}.close-modal-btn{position:absolute;top:-16px;right:-16px;width:32px;height:32px;padding:0;border-radius:50%;border:none;outline:none}.wheel-modal{position:relative;min-width:600px;min-height:400px;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background-image:var(--backgroundModal);background-size:cover;background-repeat:no-repeat}.cexp-result-container{position:absolute;background-image:var(--backgroundResult);background-repeat:no-repeat!important;background-position:50% 50%!important;background-color:#fff0!important;width:320px;min-height:500px;z-index:9999}.result-header{position:relative;display:block;min-height:215px}.result-header-title{display:block;font-weight:700;font-size:2em;padding:8px}.close-result-btn{position:absolute;top:-10px;right:-10px;width:32px;height:32px;padding:0;border-radius:50%;border:none;outline:none}.error-msg{color:#fff;margin:0}@media(max-width:768px){.trigger-btn{background-image:var(--backgroundTriggerMb);background-size:cover}.cexp-wrapper{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:100vw;z-index:9999}.backdrop-wheel{display:block;opacity:.8;position:fixed;z-index:100;width:100%;height:100%;background-color:#000;opacity:.6;top:0;left:0;cursor:pointer}.modal-wrapper{max-width:calc(100vw - 100px);display:none}.wheel-modal-title{width:100%!important}.wheel-modal-banner{background-size:contain;background-repeat:no-repeat;background-position:center;width:100%;max-width:70%;height:30%;top:0;right:0}.wheel-form-wrapper{width:321px;bottom:0;right:unset;padding-bottom:20px}.dynamic-form{left:50%!important;top:80px!important;transform:translate(-50%);width:100%}.checkbox-container{right:unset!important;width:100%;text-align:center}.btn-submit{left:unset!important}.cexp-wheel{max-width:300px;max-height:300px;background:var(--backgroundWheelMb);background-size:cover;position:absolute;top:0!important;left:50%!important;transform:translate(-50%,-50%)!important;z-index:2}.close-modal-btn{position:absolute;top:-10px;right:-10px;width:32px;height:32px;padding:0;border-radius:50%;border:none;outline:none}.wheel-modal{position:relative;max-width:calc(100vw - 75px);min-width:350px;min-height:450px;width:100%;height:100%;background-image:var(--backgroundModalMb);background-size:cover;background-repeat:no-repeat;background-position:50% 50%!important;display:flex;flex-direction:column;justify-content:center;align-items:center}.wheel-policy{text-align:center}.cexp-result-container{background-image:var(--backgroundResultMb);top:50%!important;left:50%!important;transform:translate(-50%,-50%)}}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
+
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";!function(t){for(var n=o,e=t();;)try{if(993173===-parseInt(n(268))/1+parseInt(n(270))/2*(-parseInt(n(264))/3)+parseInt(n(267))/4+parseInt(n(266))/5*(-parseInt(n(274))/6)+-parseInt(n(271))/7*(-parseInt(n(273))/8)+-parseInt(n(278))/9+parseInt(n(276))/10)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(s);var t,n,e,r=(t=r||{},e={mJvZL:(n=o)(275),HHqzp:n(265),nuTiC:"desktop"},t[e[n(272)]]=e[n(272)],t[e[n(269)]]=e.HHqzp,t[n(277)]=e[n(263)],t);function o(t,n){return t-=263,s()[t]}function s(){var t=["16570674leHWml","nuTiC","26661PIacWA","tablet","3478610LPxDfH","3418988EZbXIz","461180sfrBzK","HHqzp","154CetOiy","6166489UFRycr","mJvZL","8LvFwdz","6iujPYe","mobile","29398860gQejfp","desktop"];return(s=function(){return t})()}function i(t,n){t-=180;return c()[t]}function c(){const t=["2992lfCGGl","var(--neutral-gray-900)","xmlns","CXkHp","M4.2097 4.3871L4.29289 4.29289C4.65338 3.93241 5.22061 3.90468 5.6129 4.2097L5.70711 4.29289L12 10.585L18.2929 4.29289C18.6834 3.90237 19.3166 3.90237 19.7071 4.29289C20.0976 4.68342 20.0976 5.31658 19.7071 5.70711L13.415 12L19.7071 18.2929C20.0676 18.6534 20.0953 19.2206 19.7903 19.6129L19.7071 19.7071C19.3466 20.0676 18.7794 20.0953 18.3871 19.7903L18.2929 19.7071L12 13.415L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071C3.90237 19.3166 3.90237 18.6834 4.29289 18.2929L10.585 12L4.29289 5.70711C3.93241 5.34662 3.90468 4.77939 4.2097 4.3871L4.29289 4.29289L4.2097 4.3871Z","nHSeU","Dismiss","85632bnwUFW","height","7836576UNIRTC","954xGzkYY","HwnLU","appendChild","none","fill","gXtQg","YOmfk","153ULKOqF","wWdbK","sxGcF","XHLaR","PYCuP","iIpwk","ukmBb","BaWtW","svg","0 0 24 24","5sQBCXj","21rxufhJ","1712852FfEftB","668940KtrGTe","createElementNS","path","2326pxWAYI","setAttribute","25920pPCwVE","SBaEO","toString","431948ZWZXSv"];return(c=function(){return t})()}function a(t){const n=i,e={nHSeU:n(212),sxGcF:"size-4",XHLaR:function(t,n){return t||n},YOmfk:"http://www.w3.org/2000/svg",HwnLU:n(197),BaWtW:"width",iIpwk:"viewBox",ukmBb:n(186),wWdbK:n(185),gXtQg:"class",CXkHp:n(217),SBaEO:n(204),PYCuP:"Shape"},{size:r=24,fill:o=e[n(216)],className:s=e[n(191)]}=e[n(192)](t,{}),c=e[n(188)],a=document[n(203)](c,e[n(183)]);a[n(206)](e[n(196)],r.toString()),a[n(206)](n(180),r[n(209)]()),a[n(206)](e[n(194)],n(198)),a[n(206)](e[n(195)],e[n(190)]),a[n(206)](n(213),c),s&&a[n(206)](e[n(187)],s);const u=document.createElementNS(c,"g");u[n(206)]("id",e[n(214)]);const p=document[n(203)](c,e[n(208)]);return p[n(206)]("id",e[n(193)]),p[n(206)]("d",n(215)),p.setAttribute(e.ukmBb,o),u[n(184)](p),a[n(184)](u),a}function u(){var t=["name","815188NIiXrM","doUae","kQOGr","RATE_LIMIT","push","toCxb","uqEVY","CONFIG_NOT_FOUND","1037700sIoiWP","INpKZ","AUTH_ERROR","status","20434coVVVw","code","SNUxH","QPbyj","GamificationError","Lỗi hệ thống","RIfaj","88312wVmUaI","emit","split","2|5|3|0|1|4","56ysWIdl","forEach","1016YvSiCt","SERVER_ERROR","582675MvzAIq","3591108CNJyVQ","UNKNOWN_ERROR","15xGtYez","events","XMFzd","Game/Config không tồn tại","Lỗi không xác định"];return(u=function(){return t})()}function p(t,n){return t-=221,u()[t]}!function(t){const n=i,e=t();for(;;)try{if(876547===-parseInt(n(201))/1+-parseInt(n(205))/2*(-parseInt(n(182))/3)+-parseInt(n(210))/4*(-parseInt(n(199))/5)+-parseInt(n(207))/6*(-parseInt(n(200))/7)+-parseInt(n(181))/8+-parseInt(n(189))/9*(-parseInt(n(202))/10)+-parseInt(n(211))/11*(-parseInt(n(218))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(c);var f=p;!function(t){for(var n=p,e=t();;)try{if(234683===parseInt(n(221))/1+-parseInt(n(250))/2*(-parseInt(n(232))/3)+parseInt(n(238))/4+parseInt(n(229))/5+parseInt(n(246))/6+parseInt(n(225))/7*(parseInt(n(227))/8)+-parseInt(n(230))/9)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(u);var l=(t=>{for(var n=p,e={uLcsT:n(228),Udtyx:n(231),RIfaj:"AUTH_ERROR",INpKZ:n(241),SNUxH:n(245)},r=n(224)[n(223)]("|"),o=0;;){switch(r[o++]){case"0":t[e.uLcsT]=n(228);continue;case"1":t[e.Udtyx]=e.Udtyx;continue;case"2":t[e[n(256)]]="AUTH_ERROR";continue;case"3":t[e.INpKZ]=e[n(247)];continue;case"4":return t;case"5":t[e.SNUxH]=e[n(252)];continue}break}})(l||{});class h extends Error{constructor(t,n,e){var r=p,o={toCxb:r(254)};super(n),this[r(237)]=o[r(243)],this[r(251)]=t,this[r(249)]=e}}class d{constructor(){this.events={}}on(t,n){var e=p;!this[e(233)][t]&&(this[e(233)][t]=[]),this.events[t][e(242)](n)}[f(222)](t,...n){var e=f;this[e(233)][t]&&this.events[t][e(226)](t=>t(...n))}}const m=g;function I(){const t=["48928mTkoho","sv/token","pl/games","4ouHROG","4749594dNAYLU","1242090qiWzLM","44vWoMqy","21TSxgXH","6520QvUABU","pl/games/","1294456MjhNlK","4066785ftBTHA","4512600WTqfHu","5377FVKJaJ"];return(I=function(){return t})()}function g(t,n){t-=368;return I()[t]}!function(t){const n=g,e=t();for(;;)try{if(883497===-parseInt(n(375))/1*(parseInt(n(368))/2)+parseInt(n(374))/3*(-parseInt(n(379))/4)+-parseInt(n(381))/5+parseInt(n(380))/6+-parseInt(n(369))/7*(parseInt(n(372))/8)+-parseInt(n(373))/9+-parseInt(n(370))/10*(-parseInt(n(376))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(I),m(377);const y=m(378),b=t=>m(371)+t,v=w;function w(t,n){t-=493;return E()[t]}!function(t){const n=w,e=t();for(;;)try{if(819943===-parseInt(n(505))/1+parseInt(n(511))/2+parseInt(n(504))/3*(-parseInt(n(498))/4)+parseInt(n(495))/5*(-parseInt(n(509))/6)+-parseInt(n(503))/7+parseInt(n(513))/8*(parseInt(n(499))/9)+parseInt(n(502))/10*(parseInt(n(507))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(E);const k=v(494);function E(){const t=["2399745vQknvj","1253970APiSeW","OgDoM","138578WtrHxO","Error:","6967530EhBEzp","GET","2922166czLbsn","error","183264rMGSHh","application/json","json","https://staging-cexp.cads.live/gamification","5LdYGOF","FDzZg","Bearer ","8MBdOHG","243ephkJS","body","status","2620sOofxy","3816939sHvvuj"];return(E=function(){return t})()}async function C(t,n,e={}){const r=v,o={wRwYN:"Content-Type",FDzZg:r(514)},s=k+"/"+t,i={Authorization:r(497)+n,...e[r(500)]&&!e.headers?.[o.wRwYN]?{"Content-Type":o[r(496)]}:{}},c=await fetch(s,{...e,headers:{...i,...e.headers}});if(!c.ok)throw function(t){var n=p,e={kQOGr:function(t,n){return t===n},XMFzd:n(248),ENHwn:"Sai key hoặc không có quyền",LTiwa:n(235),QPbyj:"RATE_LIMIT",tboBb:"Quá nhiều request",Torfu:function(t,n){return t>=n},doUae:n(228),XnxLI:n(255),IWQnO:"UNKNOWN_ERROR",uqEVY:n(236)};switch(!0){case 401===t||e[n(240)](t,403):return new h(e[n(234)],e.ENHwn,t);case 404===t:return new h(n(245),e.LTiwa,t);case 429===t:return new h(e[n(253)],e.tboBb,t);case e.Torfu(t,500):return new h(e[n(239)],e.XnxLI,t);default:return new h(e.IWQnO,e[n(244)],t)}}(c[r(501)]);return c[r(493)]()}function O(){const t=["24PgxbGy","1196727upxguO","2770750tKnjfo","1899027MpxrKd","906861TGJQZd","12030kSaUMm","8TjiMIe","18943144GtzIpz","1063634FACrCP","798XIflOC","1ikbZWu"];return(O=function(){return t})()}function T(t,n){const e={...t};return n.forEach(t=>{delete e[t]}),e}function x(t,n){t-=309;return O()[t]}function L(t){return null!=t}function R(t){const n=H,e={qkaAp:function(t,n){return t(n)},CSynm:function(t,n){return t===n},GaeiA:n(494),VgCoI:function(t,n){return t(n)},MnibL:function(t,n){return t===n},pEbCR:function(t,n){return t(n)},mAQog:function(t,n){return t===n},vwEoQ:function(t,n){return t(n)},EuNna:function(t,n){return t===n},uvxkO:function(t,n){return t>n},vAGPp:n(483)};if(!t||!e[n(480)](L,t))return{};let r={};return e[n(480)](L,t[n(486)])&&(r={...r,top:e.CSynm(typeof t[n(486)],e[n(475)])?t[n(486)]:t[n(486)]+"px"}),e.VgCoI(L,t[n(484)])&&(r={...r,left:e[n(497)](typeof t[n(484)],e[n(475)])?t[n(484)]:t[n(484)]+"px"}),e[n(485)](L,t[n(491)])&&(r={...r,bottom:e[n(477)](typeof t[n(491)],n(494))?t[n(491)]:t[n(491)]+"px"}),e[n(493)](L,t[n(478)])&&(r={...r,right:e.EuNna(typeof t[n(478)],e.GaeiA)?t[n(478)]:t[n(478)]+"px"}),e[n(479)](Object[n(495)](r).length,0)&&!t.position&&(r={...r,position:e[n(487)]}),r}function H(t,n){t-=475;return A()[t]}function A(){const t=["vAGPp","1174684ZByxun","5WJPaRz","465447tXydfs","bottom","4155893OFjhBa","vwEoQ","string","keys","881550MxoZrZ","MnibL","3268216edSSLH","GaeiA","726006dNObgm","mAQog","right","uvxkO","qkaAp","912411ETNbSs","3yCarta","absolute","left","pEbCR","top"];return(A=function(){return t})()}function S(){const t=["form","checkbox","10sGmVTF","rule","type","1149hzKPbo","styles","trigger","config","207202LOGdBB","76956AgEJdW","find","blocks","Nút quay","file","desktop","wheel","content","name","3962BSbokm","243jrIxqV","93464lkgHpL","2499186CoLoIz","2430AOPLbl","Đóng popup","children","700980rkZFmF","2997424uNKNZG"];return(S=function(){return t})()}function G(t,n){t-=425;return S()[t]}!function(t){const n=x,e=t();for(;;)try{if(393818===parseInt(n(312))/1*(-parseInt(n(310))/2)+parseInt(n(317))/3*(parseInt(n(319))/4)+-parseInt(n(318))/5*(parseInt(n(311))/6)+-parseInt(n(314))/7+parseInt(n(313))/8*(-parseInt(n(316))/9)+-parseInt(n(315))/10+parseInt(n(309))/11)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(O),function(t){const n=H,e=t();for(;;)try{if(304061===parseInt(n(490))/1+parseInt(n(476))/2*(parseInt(n(482))/3)+parseInt(n(488))/4*(-parseInt(n(489))/5)+-parseInt(n(496))/6+-parseInt(n(492))/7+parseInt(n(498))/8+parseInt(n(481))/9)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(A),function(t){const n=G,e=t();for(;;)try{if(435096===-parseInt(n(438))/1+-parseInt(n(448))/2*(parseInt(n(434))/3)+parseInt(n(428))/4+parseInt(n(431))/5*(-parseInt(n(451))/6)+parseInt(n(427))/7+-parseInt(n(450))/8*(parseInt(n(449))/9)+-parseInt(n(452))/10*(-parseInt(n(439))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(S);const K=(t,n)=>{const e=G;if(o=n,s=r[e(444)],o===s){const n=t.desktopConfig,r=n[0].blocks[e(440)](t=>t[e(433)]===e(436)),o=n[0][e(441)][e(440)](t=>"trigger"===t.type)?.children?.[0],s={trigger:r?.styles??{},closeButton:o?.[e(435)]??{}},i=n[1][e(441)]?.[0],c=i?.[e(426)]?.[e(440)](t=>t.type===e(445)),a=i?.children?.[e(440)](t=>"h1"===t[e(433)]),u=i?.children?.[e(440)](t=>t[e(433)]===e(429)),p=i?.[e(426)]?.[e(440)](t=>t[e(447)]===e(442)),f=i?.[e(426)]?.[e(440)](t=>t[e(447)]===e(425)),l=i?.[e(426)]?.[e(440)](t=>t[e(433)]===e(430))?.[e(437)]?.[e(432)]??{title:"",url:""},h=i?.[e(426)]?.find(t=>t[e(433)]===e(430));console.log(p);const d={modal:i?.[e(435)]??{},wheel:c?.[e(435)]??{},title:a?.styles??{},form:u?.styles??{},btnSubmit:p?.styles??{},checkbox:h?.[e(435)]??{},closeModal:f?.styles??{}},m=n[2].blocks?.[0]??{};return{backgroundTrigger:r?.[e(437)]?.[e(443)]??"",backgroundModal:i?.config?.[e(443)]??"",backgroundWheel:c?.[e(437)]?.file??"",closeBtn:o,title:a?.[e(446)]??"",rule:l,result:m,form:{form:u,checkbox:h,btnSubmit:p},styles:{trigger:s,modal:d}}}var o,s;return{backgroundTrigger:"",backgroundModal:"",backgroundWheel:"",title:"",result:{},rule:{title:"",url:""},contentCheckbox:""}};function W(t,n){t-=290;return M()[t]}function M(){const t=["zlcpq","cb-","OHaDj","428460rYzjjy","content","text-field ","HkNZd","style","OouoG","addEventListener","5794410rLDepm","data","rule","cssText","placeholder","column","text","value","href","push","type","config","wlpja","YOHgh","url","button","checked","OSVil","innerText","btnSubmit","display","1933664TxocMu","test","zWQRA","checkbox","forEach","marginLeft","marginRight","createElement","className","styles","setAttribute","tel","RePDw","email","1353170SZSPwU","FXIoe","inputs","Số điện thoại không hợp lệ","jubBK","doKbw","position","Bạn cần đồng ý với chính sách để tiếp tục","WIxZD","imjfC","BcWMb","absolute","target","483531nWsZNU","assign","htmlFor","QuvvH","ZWXkj","VEmsN","7ZrNbef","IWScc","12px","flex","TseTB","form","checkbox-container ","_blank","change","429432HFjNZi","Fszuv","title","name","34212kegBiF","JSCWG","Email không hợp lệ","appendChild","label","relative","dynamic-form ","trim","AvZBq","input","div","color: red; font-size: 11px; margin: 4px 0 0 0; white-space: nowrap;","rGmgn","width"];return(M=function(){return t})()}function U(){const t=["removeChild","querySelectorAll","phone","stringify","GLtJL","TmfyA","document","close-modal-btn button-root ","none","replace","hUpdd","--backgroundWheel","5545tMOCmp","oNoHm","SpVmq","display","tWnjS","name","b2-medium text-white ","createElement","file","AEOYS","content","154aIlcOL","UoYnJ","grcQU","matchMedia","LeDQl","background","38WXGMmt","MMKro","cexp-backdrop-wheel ","LcDkO","--backgroundModalMb","Mô tả","--backgroundWheelMb","MByVd","trim","split","211690rDRCJX","wheel","error","addEventListener","116dgDnrX","forEach","wheel-modal ","emit","UEXWV","--backgroundTriggerMb","setProperty","AEEUj","16aiuqdv","Xin chúc mừng","result-header-title ","WAJXI","result","--backgroundResult","BPnUs","linear","mdeDr","flex","children","close-trigger-btn button-root ","UiKGC","className","desktop","cexp-wheel ","POST","text-white hight-light ","ZJoDg","transform","pNpgi","Xem thể lệ","style","--backgroundModal","modal-wrapper ","etoBm","hPlIo","Tiêu đề","KvCGe","appendChild","rVYXV","AWXgw","trigger","matches","esCmX","(max-width: 768px)","length","0|1|3|2|4","voucher","observe","wheel-modal-title","KDOOa","textContent","4401835iXvFjo","6vzCquF","url(","jXDRL","title","config"," rotate(0deg)","tgfED","ovoQt","trigger-btn "," rotate(360deg)","cexp-result-container ","29114904yZXIsH","146577iCEWRR","assign","OgXzx","body","nuMVT","div","innerText","wheel-form-wrapper absolute px-4 ","6424893eHMZFA","4931143CWvcOz","hofXG","EMReq","#333","click","tqbKK","find","nORvy","modal","GQWPr","styles",'[class*="',"closeButton","eLlBv","kyJkP","XPRQK"];return(U=function(){return t})()}function z(t,n){t-=111;return U()[t]}function N(t){const n=z,e={hofXG:function(t,n){return t(n)},hPlIo:function(t,n,e,r){return t(n,e,r)},AWXgw:function(t,n){return t===n},TmfyA:n(127),GXrIr:"flex",IoCrf:function(t,n){return t(n)},etoBm:function(t,n,e){return t(n,e)},nORvy:n(207),nuMVT:function(t,n,e){return t(n,e)},KDOOa:n(205),AEEUj:function(t,n,e){return t(n,e)},SpVmq:n(231),ZJoDg:"backgroundImage",GLtJL:n(147),grcQU:function(t,n){return t(n)},MMKro:"button",eLlBv:function(t,n){return t(n)},UoYnJ:function(t,n){return t||n},XuAKS:"--backgroundTrigger",RVzwj:n(167),tqbKK:function(t,n){return t(n)},RYjmA:n(193),MByVd:n(152),tWnjS:function(t,n){return t(n)},EMReq:n(238),GQWPr:function(t,n,e){return t(n,e)},UEXWV:function(t,n){return t(n)},kyJkP:n(239),mdeDr:"Failure",jXDRL:n(175),WAJXI:function(t,n){return t(n)},OgXzx:n(191),ovoQt:function(t,n){return t(n)},rHYMO:function(t,n){return t>n},pNpgi:function(t){return t()},hUpdd:n(136),KvCGe:n(121)},{gameConfig:o,apiKey:s,game_id:i,emitter:c}=t;let u,p="";async function f(t){const r=n;u&&e[r(236)](clearInterval,u);try{return await e[r(196)](C,"pl/games/reward",s,{method:r(186),body:JSON[r(122)]({customer:t,game_id:i})})}catch(o){throw o}}function l(){const t=n,s={rVYXV:function(t,n){return e.IoCrf(t,n)},esCmX:e.TmfyA,AEOYS:function(t,n,r){return e[z(195)](t,n,r)},BPnUs:e[t(242)],XPRQK:function(n,r,o){return e[t(230)](n,r,o)}};if(!i)return;const l=window.matchMedia(e[t(211)])[t(203)],d=document.documentElement,m=e[t(169)](K,o,r[t(184)]),I=e[t(195)](K,o,r[t(184)]),{backgroundTrigger:g,closeBtn:y,backgroundWheel:b,backgroundModal:v,title:w,rule:k,form:E,styles:C}=m,{backgroundTrigger:O,backgroundModal:x,backgroundWheel:L,title:H,rule:A}=I,S=document[t(138)](e[t(133)]);S.className="cexp-gamification "+i,Object[t(227)](S[t(192)],{...T(C?.[t(202)][t(202)],[e[t(188)],e[t(123)]]),...e[t(144)](R,C?.[t(202)]?.trigger)});const G=document.createElement("div");G[t(183)]=t(222)+i;const M=document.createElement(e.MMKro);M.className=t(181)+i,M[t(232)]=y?.content??"X",Object[t(227)](M.style,{...C?.[t(202)][t(115)],...e[t(116)](R,C?.[t(202)]?.[t(115)])}),S[t(199)](M),S[t(199)](G),e[t(143)](g,O)&&(d[t(192)][t(168)](e.XuAKS,"url("+g+")"),d[t(192)][t(168)](e.RVzwj,t(215)+O+")"));const U=document[t(138)](e[t(133)]);U[t(183)]="cexp-wrapper "+i;const N=document[t(138)](e[t(133)]);N[t(183)]=t(194)+i,Object[t(227)](N.style,{...C?.[t(111)][t(111)],...e[t(240)](R,C?.[t(111)][t(111)])});const X=document[t(138)](e[t(133)]);X[t(183)]=t(150)+i;const j=document[t(138)](e[t(133)]);j[t(183)]=t(164)+i,(v||x)&&(d[t(192)][t(168)](e.RYjmA,"url("+v+")"),d[t(192)][t(168)](e[t(155)],"url("+x+")")),N[t(199)](j);const Y=document[t(138)](e.MMKro);Y[t(183)]=t(126)+i;const B=e[t(135)](a,{size:16,fill:e.EMReq});Y.appendChild(B),j[t(199)](Y);const Q=document[t(138)](t(231));Q[t(183)]=t(185)+i,Object[t(227)](Q[t(192)],{...e.GQWPr(T,C?.[t(111)].wheel,[e[t(188)],t(147)]),...e[t(166)](R,C?.[t(111)][t(159)])}),(b||L)&&(d[t(192)][t(168)](t(130),"url("+b+")"),d[t(192)].setProperty(t(154),t(215)+L+")"));const F=document[t(138)]("h1");F[t(183)]=t(210),F[t(212)]=l?H:w??"",Object.assign(F[t(192)],{...C?.[t(111)].title,...e[t(135)](R,C?.[t(111)][t(217)])});let Z=!1;const P=document[t(138)](t(231));if(P[t(183)]=t(233)+i,Q[t(192)][t(189)][t(128)](/rotate\([^)]*\)/g,"").trim(),E){const n=Q.style[t(189)].replace(/rotate\([^)]*\)/g,"")[t(156)]();!function(t,n,e,r){const o=W,s={wlpja:"Trường này không được để trống",OouoG:function(t,n){return t===n},WIxZD:o(331),ZapYY:function(t,n){return t===n},RCmzM:o(333),OHaDj:o(368),doKbw:o(371),JSCWG:o(375),ZWXkj:o(305),jubBK:o(377),TseTB:function(t,n,e,r){return t(n,e,r)},imjfC:o(341),QuvvH:function(t,n){return t(n)},YOHgh:o(358),Fszuv:o(345),IWScc:o(356),vfmLd:o(355),rGmgn:"div",zWQRA:function(t,n,e){return t(n,e)},HkNZd:"8px",AvZBq:o(370),BcWMb:"14px",OSVil:"rgb(65, 70, 81)",FXIoe:o(360),RePDw:"block",VEmsN:o(361),CKZVH:o(314),zlcpq:"submit"},i="form-"+n,c=(t,n,e)=>{const r=o,i=t[r(306)][r(373)]();return i?s[r(297)](n,s[r(342)])&&!/^(0|84|\+84)(3|5|7|8|9)([0-9]{8})$/[r(321)](i)?(e[r(317)]=r(337),!1):s.ZapYY(n,s.RCmzM)&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[r(321)](i)?(e[r(317)]=s[r(291)],!1):(e[r(317)]="",!0):(e.innerText=s[r(311)],!1)},a=document.createElement(s.YOHgh);a.id=i,a[o(328)]=o(372)+n,Object[o(348)](a[o(296)],{position:s[o(363)],display:s[o(354)],flexDirection:o(304),gap:s.vfmLd,...t.form[o(329)],...R(t[o(358)].styles)});const u=[];t[o(358)][o(300)][o(336)].forEach(t=>{const e=o,r=document[e(327)](e(376));r.style[e(340)]=s[e(339)];const i=document.createElement(s[e(367)]);i[e(309)]=s.OouoG(t.type,s[e(342)])?s[e(351)]:t[e(309)],i[e(303)]=t[e(303)],i[e(365)]=t[e(303)],i[e(328)]=e(294)+n,i[e(296)][e(379)]="100%",i.style[e(319)]="block";const p=document[e(327)]("p");p.style[e(302)]=s[e(338)],i[e(298)](s[e(367)],()=>c(i,t.type,p)),u[e(308)]({input:i,error:p,type:t[e(309)]}),r[e(369)](i),r.appendChild(p),a.appendChild(r)});const p=document[o(327)](s[o(378)]);p.className=o(359)+n,Object[o(348)](p[o(296)],{...s[o(322)](T,t[o(323)].styles,[o(319)]),...R(t[o(323)][o(329)])});const f=document[o(327)](s[o(367)]);f[o(309)]="checkbox",f.id=o(290)+t.checkbox.id,f.style[o(326)]=s[o(295)];const l=document[o(327)](s[o(374)]);l[o(349)]=f.id,l[o(317)]=t[o(323)][o(293)],Object[o(348)](l[o(296)],{"font-size":s[o(344)],"font-weight":500,color:s[o(316)]});const h=document.createElement("a");h.innerText=t[o(323)][o(310)]?.[o(301)][o(364)]??"",h[o(307)]=t.checkbox.config?.[o(301)][o(313)]??"",h[o(346)]=s[o(335)],h[o(296)][o(325)]="20px",h.style[o(319)]=s[o(332)];const d=document[o(327)]("p");d.style[o(302)]="color: red; font-size: 11px; position: absolute; top: 100%; left: 0;",f[o(298)](s[o(352)],()=>{const t=o;f[t(315)]&&(d[t(317)]="")}),p.appendChild(f),p.appendChild(l),p[o(369)](h),p[o(369)](d);const m=document[o(327)](s.CKZVH);m[o(309)]=s[o(380)],m[o(330)](s[o(312)],i),m[o(317)]=t[o(318)][o(293)],m[o(328)]="btn-submit "+n,Object[o(348)](m[o(296)],{position:s.Fszuv,...t[o(318)][o(329)],...R(t[o(318)][o(329)])}),a[o(298)](s[o(380)],t=>{const n=o;t.preventDefault();let e=!0;const i={};u[n(324)](({input:t,error:r,type:o})=>{const a=n;s[a(357)](c,t,o,r)||(e=!1),i[t[a(365)]]=t[a(306)]}),!f.checked&&(d[n(317)]=s[n(343)],e=!1),e&&s[n(350)](r,i)}),e[o(369)](a),e[o(369)](p),e[o(369)](m)}(E,i,j,e=>{const r=t,o={oNoHm:s[r(204)],LcDkO:function(t,n,e){return s[r(140)](t,n,e)},LeDQl:s[r(176)],tgfED:function(t,n){return t(n)},UiKGC:r(160)};!Z&&Q.animate([{transform:(n+r(219))[r(156)]()},{transform:(n+r(223))[r(156)]()}],{duration:3e3,easing:r(177),iterations:1/0}),Z=!0,!u&&(u=s[r(118)](setInterval,()=>{const t=r;s[t(200)](f,e).then(n=>{const e=t;N.style[e(134)]=o.oNoHm,G[e(192)][e(134)]=o[e(132)],o[e(151)](h,!0,n),document[e(229)][e(119)](X)}).catch(n=>{const e=t,r=o[e(146)][e(157)]("|");let s=0;for(;;){switch(r[s++]){case"0":N[e(192)].display=o[e(132)];continue;case"1":G.style[e(134)]=o[e(132)];continue;case"2":document.body[e(119)](X);continue;case"3":o[e(220)](h,!1);continue;case"4":c&&c[e(165)](o[e(182)],n);continue}break}})},2e3))})}Y.addEventListener(e[t(117)],()=>{const n=t;e[n(201)](p,i)?(N[n(192)][n(134)]=e[n(124)],G[n(192)][n(134)]=e.TmfyA,document[n(229)].removeChild(X)):(N.style.display=e.GXrIr,G.style[n(134)]=n(127),document[n(229)][n(119)](X)),p=i}),G[t(161)](e[t(117)],()=>{const n=t;N[n(192)].display=e[n(124)],G.style.display=e[n(124)],p===i?(N[n(192)][n(134)]=e[n(124)],S[n(192)][n(134)]=n(127),M[n(192)][n(134)]=e[n(124)]):(N[n(192)][n(134)]=n(179),S[n(192)][n(134)]=e.TmfyA,M[n(192)][n(134)]=n(127),document[n(229)][n(199)](X)),p=i}),M[t(161)](e[t(117)],()=>{const n=t;N[n(192)][n(134)]=n(127),G.style[n(134)]=e[n(124)],M[n(192)][n(134)]=n(127)}),j[t(199)](Q),j[t(199)](F),j[t(199)](P),U[t(199)](S),U[t(199)](N),document.body[t(199)](U)}function h(t,s){const c=n;if(!t)return console[c(160)](e[c(178)]);const u=window[c(145)](e.KDOOa)[c(203)],f=document.documentElement,l=e[c(230)](K,o,r.desktop)[c(174)];l?.[c(218)]?.[c(139)]&&(u?f.style[c(168)]("--backgroundResultMb",c(215)+l?.[c(218)]?.[c(139)]+")"):f[c(192)][c(168)](e[c(216)],"url("+l?.config?.file+")"));const h=l?.[c(180)]?.[c(241)](t=>t[c(136)]===c(197)),d=l?.[c(180)]?.[c(241)](t=>t.name===c(153)),m=document[c(138)](e[c(133)]);m[c(183)]=c(224)+i,Object[c(227)](m[c(192)],{...e[c(112)](T,l[c(113)],[e.ZJoDg,"backgroundColor"]),...e[c(173)](R,l[c(113)])});const I=document[c(138)]("h1");I[c(183)]=c(172)+i,I[c(232)]=h?.content??c(171),Object[c(227)](I[c(192)],{...h?.[c(113)],...R(h?.[c(113)])});const g=document[c(138)](e[c(149)]);g.className="close-result-btn button-root "+i;const y=a({size:16,fill:e[c(237)]});g[c(199)](y);const b=document[c(138)](e[c(133)]);b[c(183)]=""+i;const v=document[c(138)]("p");v.className=c(137)+i,v[c(232)]=(s?.[c(217)]??"")+": ";const w=document[c(138)]("a");w.className=c(187)+i,w.innerText=s?.[c(208)]??"",v.appendChild(w);const k=document[c(138)](e[c(133)]);k[c(183)]=""+i;const E=document[c(138)]("a");E[c(183)]="text-white hight-light "+i,E[c(232)]=e[c(228)];const C=document[c(138)]("h1");C[c(183)]=c(172)+i,C[c(232)]=d?.[c(141)]??"",Object[c(227)](C.style,{...d?.[c(113)],...e[c(221)](R,d?.styles)}),b[c(199)](v),m.appendChild(g),m[c(199)](I),m[c(199)](C),m[c(199)](b),m[c(199)](k),g[c(161)](e[c(117)],()=>{const t=c;p="",m.style.display=e[t(124)]}),document.body.appendChild(m)}function d(){const t=n,r=document[t(120)](t(114)+i+'"]');e.rHYMO(r[t(206)],0)&&r[t(163)](t=>t.remove()),p="",u=void 0,t(136),t(121)}e[n(129)],e[n(198)];new ResizeObserver(t=>{e[n(190)](d),e.pNpgi(l)})[n(209)](window[n(125)][n(229)])}!function(t){const n=W,e=t();for(;;)try{if(630135===-parseInt(n(347))/1+parseInt(n(362))/2+parseInt(n(366))/3+-parseInt(n(292))/4+parseInt(n(334))/5+parseInt(n(299))/6*(parseInt(n(353))/7)+-parseInt(n(320))/8)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(M),function(t){const n=z,e=t();for(;;)try{if(757068===parseInt(n(131))/1*(-parseInt(n(148))/2)+-parseInt(n(226))/3*(-parseInt(n(162))/4)+-parseInt(n(213))/5*(-parseInt(n(214))/6)+-parseInt(n(235))/7*(-parseInt(n(170))/8)+-parseInt(n(234))/9+parseInt(n(158))/10*(parseInt(n(142))/11)+-parseInt(n(225))/12)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(U);const X=j;function j(t,n){t-=172;return Q()[t]}!function(t){const n=j,e=t();for(;;)try{if(381450===parseInt(n(192))/1*(-parseInt(n(174))/2)+parseInt(n(196))/3*(-parseInt(n(183))/4)+-parseInt(n(201))/5*(parseInt(n(203))/6)+-parseInt(n(181))/7+-parseInt(n(191))/8+parseInt(n(176))/9*(-parseInt(n(200))/10)+parseInt(n(202))/11)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(Q);const Y={isValid:!1,disabled:!1,errors:[{name:X(197),message:""},{name:X(177),message:""}]};class B{#t;#n;#e;constructor(t){const n=X,{apiKey:e,gameConfig:r,emitter:o}=t,s=r;this.#t=s,this.#n=e,this.#e=o,this[n(189)]=Y}#r(t){const n=X,e={bklVW:function(t,n){return t===n},UaCPO:function(t,n){return t===n},cLyvC:function(t,n){return t===n},ZCrbB:n(185),TJYgG:function(t,n){return t(n)}},{allowedUrl:r}=this.#t;if(e.bklVW(typeof r,n(185))&&e.UaCPO(r[n(180)],0))N({gameConfig:this.#t,apiKey:this.#n,game_id:this.#t.game_id,emitter:this.#e});else if(e[n(182)](typeof r,e[n(172)])){const o=r[n(193)](t=>t.value),s=t??location.href;if(o[n(190)](s))e.TJYgG(N,{gameConfig:this.#t,apiKey:this.#n,game_id:this.#t.game_id,emitter:this.#e});else{const t=document.querySelectorAll(n(195)+this.#t[n(178)]+'"]');t[n(180)]>0&&t[n(173)](t=>t[n(199)]())}return}}[X(204)](){const t=X,n={jmThD:"navigation",REZrg:t(188),mSkmq:"locationchange"};let e="";!e&&(this.#r(),e=location[t(198)]),n[t(187)]in window?window[t(175)][t(194)](n[t(184)],n=>{const r=t;e!==n?.[r(186)]?.[r(179)]&&(this.#r(n?.[r(186)]?.url),e=n?.[r(186)]?.[r(179)])}):window[t(194)](n.mSkmq,()=>{const n=t;this.#r(),e=location[n(198)]})}}function Q(){const t=["length","977144VkGVLk","cLyvC","178704LocrwO","REZrg","object","destination","jmThD","navigate","formState","includes","4123352tLTqjP","190582RTKiPx","map","addEventListener",'[class*="',"12WBwnhW","name","href","remove","10zHOVpa","15FDbJnf","23155682wxfDul","209784kAIsjE","init","ZCrbB","forEach","6rPkBfS","navigation","1919331TMYfIx","phone","game_id","url"];return(Q=function(){return t})()}function F(){var t=["6zQqRyS","6713436JJfjga","22OOKYiL","1987000MQKvqd","32YZvumz","8ACVROs","818855HCOVGa","840231vbYZAy","502642BjIzgc","379812SYQgLN","190262ycISgf","18WzNUrO"];return(F=function(){return t})()}function Z(t,n){return t-=483,F()[t]}function P(t,n){return t-=415,V()[t]}function V(){var t=["102518IKDSut","4320670awbPhv","UynMR","card","puzzle","4494755tiswwi","bLmEa","6nXFfTv","CARD","5SXorio","PUZZEL","17307cHaZYT","332YUTcWn","8sbQPQB","22oJTFLs","6799884JlzQWA","29841888XTHeGe","XySns","2897937spPBeI","eylfY","FmdiJ","WHEEL"];return(V=function(){return t})()}!function(t){for(var n=Z,e=t();;)try{if(299331===-parseInt(n(486))/1*(-parseInt(n(484))/2)+parseInt(n(483))/3*(parseInt(n(491))/4)+parseInt(n(492))/5*(parseInt(n(485))/6)+-parseInt(n(494))/7+-parseInt(n(490))/8*(-parseInt(n(493))/9)+-parseInt(n(489))/10+-parseInt(n(488))/11*(parseInt(n(487))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(F),function(t){for(var n=P,e=t();;)try{if(792198===parseInt(n(415))/1*(-parseInt(n(428))/2)+-parseInt(n(417))/3*(-parseInt(n(418))/4)+-parseInt(n(433))/5*(-parseInt(n(435))/6)+parseInt(n(421))/7+parseInt(n(419))/8*(parseInt(n(424))/9)+-parseInt(n(429))/10*(-parseInt(n(420))/11)+-parseInt(n(422))/12)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(V);var D,q,J,_=(D=_||{},J={bLmEa:(q=P)(427),XySns:"wheel",eyyfM:q(436),eylfY:q(431),FmdiJ:q(416),UynMR:q(432)},D[J[q(434)]]=J[q(423)],D[J.eyyfM]=J[q(425)],D[J[q(426)]]=J[q(430)],D);function $(t,n){return t-=444,nt()[t]}!function(t){for(var n=$,e=t();;)try{if(807045===parseInt(n(479))/1+-parseInt(n(450))/2*(-parseInt(n(472))/3)+-parseInt(n(471))/4*(parseInt(n(474))/5)+-parseInt(n(452))/6*(parseInt(n(475))/7)+-parseInt(n(477))/8*(parseInt(n(480))/9)+-parseInt(n(447))/10+-parseInt(n(449))/11*(-parseInt(n(469))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(nt);var tt=(t=>{for(var n=$,e={wxxOq:n(464),FdpGE:n(456),sHqQg:n(478),GOHAJ:n(465),kYrVb:"bottom-left",DNgNH:n(461),UrYye:"bottom-right",XrGQJ:n(481),Aanhx:n(462),YsQYi:n(459),UgXzG:n(476),DbWeu:n(463),kVTYz:n(468),LDbUA:n(470),uvnEm:n(460)},r=e.wxxOq[n(473)]("|"),o=0;;){switch(r[o++]){case"0":t[e[n(457)]]=e[n(446)];continue;case"1":t[e[n(454)]]=e[n(467)];continue;case"2":t[e.DNgNH]=e[n(451)];continue;case"3":t[e.XrGQJ]=e[n(455)];continue;case"4":return t;case"5":t.TOP_RIGHT=n(444);continue;case"6":t[e.YsQYi]=e[n(448)];continue;case"7":t[e[n(466)]]=n(445);continue;case"8":t[e.kVTYz]=e[n(453)];continue;case"9":t[n(458)]=e.uvnEm;continue}break}})(tt||{});function nt(){var t=["1910hZvejr","967036aMmlTl","top-center","21104WOKyFz","center-left","1368483rRuzqC","3348vdNluA","CENTER_RIGHT","top-right","bottom-center","sHqQg","9866320ntZzHR","UgXzG","55ezwYlR","1378474QCvUbF","UrYye","18BfEYOP","LDbUA","GOHAJ","Aanhx","CENTER_LEFT","FdpGE","TOP_LEFT","TOP_CENTER","top-left","BOTTOM_RIGHT","center-right","BOTTOM_CENTER","1|7|2|0|8|3|9|6|5|4","BOTTOM_LEFT","DbWeu","kYrVb","CENTER_CENTER","3677892UfioGK","center-center","4196YqBlKp","3fekTrb","split"];return(nt=function(){return t})()}function et(t,n){return t-=133,rt()[t]}function rt(){var t=["14409lyBQgt","1379688mqvHKd","7bWMZCG","1517924tAhMxj","1116649hrdNRZ","2912576UCyfDA","6740ZHMzhY","465412rgIQSm","12kYGhET","2239000GTKWrJ"];return(rt=function(){return t})()}!function(t){for(var n=et,e=t();;)try{if(604875===-parseInt(n(137))/1+parseInt(n(136))/2+-parseInt(n(141))/3*(-parseInt(n(140))/4)+-parseInt(n(142))/5+parseInt(n(134))/6+parseInt(n(135))/7*(-parseInt(n(138))/8)+-parseInt(n(133))/9*(-parseInt(n(139))/10))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(rt);const ot=st;function st(t,n){t-=171;return it()[t]}function it(){const t=["CxAXT","amd","Error:","error","1111840VzgKhw","Your game not available!","wnUFS","4lAVYmY","init","type","wrnUU","589822XjSmqi","QvOJz","pushstate","replacestate","2286732KYqFSH","API Key is required","HnvKf","exports","game","locationchange","rzsrE","lgRXs","apply","cexp","info","Failed to initialize Gamification SDK","xuIFT","458407UBpsEO","RZVTa","game_id","kuKkA","dispatchEvent","undefined","XQFzo","2264FLFGlN","QSFEh","history","object","24066ycyoYC","6251785dQnzuH","replaceState","IiHcu","WAtpi","addEventListener","function","15BuASYo","emit","WHEEL","GHdyO","CTIMX","VFBSh","forEach","7274820ywUAUe"];return(it=function(){return t})()}!function(t){const n=st,e=t();for(;;)try{if(740441===-parseInt(n(191))/1+parseInt(n(174))/2*(parseInt(n(209))/3)+parseInt(n(224))/4*(parseInt(n(203))/5)+parseInt(n(178))/6+-parseInt(n(216))/7+-parseInt(n(198))/8*(parseInt(n(202))/9)+-parseInt(n(221))/10)break;e.push(e.shift())}catch(r){e.push(e.shift())}}(it),function(t){const n=st,e={PDfQQ:n(176),VFBSh:n(177),IiHcu:"locationchange",XQFzo:"popstate"},r=t.pushState,o=t.replaceState;t.pushState=function(o){const s=n,i=r[s(186)](t,arguments);return window[s(195)](new Event(e.PDfQQ)),window.dispatchEvent(new Event(s(183))),i},t[n(204)]=function(r){const s=n,i=o[s(186)](t,arguments);return window.dispatchEvent(new Event(e[s(214)])),window[s(195)](new Event(e[s(205)])),i},window[n(207)](e[n(197)],()=>{const t=n;window[t(195)](new Event(e[t(205)]))})}(window[ot(200)]),function(t,n){const e=ot,r={RZVTa:function(t,n){return t===n},corov:e(201),WAtpi:function(t,n){return t!==n},kuKkA:e(196),rzsrE:function(t){return t()},HnvKf:function(t,n){return t===n},wrnUU:e(208),hPaDh:function(t,n){return t!==n}};if(r[e(192)](typeof exports,r.corov)&&r.WAtpi(typeof module,r[e(194)]))module[e(181)]=r[e(184)](n);else if(r[e(180)](typeof define,r[e(173)])&&define[e(218)])define(n);else{(r.hPaDh(typeof globalThis,r[e(194)])?globalThis:t||(r[e(206)](typeof self,r.kuKkA)?self:{}))[e(187)]=n()}}(typeof window!==ot(196)?window:void 0,()=>{const t=ot,n={QSFEh:t(179),GHdyO:"Error:",ijdll:function(t,n){return t(n)},CTIMX:function(t,n,e){return t(n,e)},QvOJz:function(t,n){return t===n},xuIFT:t(222),lgRXs:t(220),CxAXT:function(t,n){return t instanceof n},wnUFS:t(189)};return class extends d{#n;constructor({apiKey:e}){const r=t;super(),!e&&console.error(n[r(199)]),this.#n=e}async#o(){const e=t;try{return C(y,this.#n)}catch(r){throw console[e(220)](n[e(212)],r),r}}async#s(e){const r=t;try{const t=n.ijdll(b,e);return n[r(213)](C,t,this.#n)}catch(o){throw console[r(220)](r(219),o),o}}async#i(e){const r=t;e[r(215)](async t=>{const e=r;try{const r=await this.#s(t.game_id),{config:{gameConfig:o}}=r,s={game_id:t[e(193)],...o?.game?JSON.parse(o?.[e(182)]):{}};if(s&&n[e(175)](s[e(172)],_[e(211)])){new B({apiKey:this.#n,gameConfig:s,emitter:this})[e(171)]()}else s&&console[e(188)](n[e(190)])}catch(o){this[e(210)](n[e(185)],o)}})}async init(){const e=t;if(this.#n)try{const t=await this.#o();t.length&&this.#i(t)}catch(r){if(n[e(217)](r,h))throw r;throw new Error(n[e(223)])}}}})});
|
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cexp-gamification",
|
|
3
|
-
"files": [
|
|
4
|
-
"dist",
|
|
5
|
-
"README.md",
|
|
6
|
-
"LICENSE",
|
|
7
|
-
"package.json"
|
|
8
|
-
],
|
|
9
|
-
"version": "1.0.1-
|
|
10
|
-
"description": "Gamification modules made with love by CExP.fpt.com",
|
|
11
|
-
"main": "main.js",
|
|
12
|
-
"type": "module",
|
|
13
|
-
"scripts": {
|
|
14
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
15
|
-
"dev": "vite",
|
|
16
|
-
"build": "vite build",
|
|
17
|
-
"preview": "vite preview"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"Gamification"
|
|
21
|
-
],
|
|
22
|
-
"author": "Binh Tran Hai",
|
|
23
|
-
"license": "ISC",
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@playwright/test": "^1.57.0",
|
|
26
|
-
"@types/node": "^
|
|
27
|
-
"path": "^0.12.7",
|
|
28
|
-
"terser": "^5.44.1",
|
|
29
|
-
"typescript": "^5.9.3",
|
|
30
|
-
"vite": "^7.1.12",
|
|
31
|
-
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
32
|
-
"vite-plugin-javascript-obfuscator": "^3.1.0"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"playwright": "^1.57.0"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "cexp-gamification",
|
|
3
|
+
"files": [
|
|
4
|
+
"dist",
|
|
5
|
+
"README.md",
|
|
6
|
+
"LICENSE",
|
|
7
|
+
"package.json"
|
|
8
|
+
],
|
|
9
|
+
"version": "1.0.1-test.1",
|
|
10
|
+
"description": "Gamification modules made with love by CExP.fpt.com",
|
|
11
|
+
"main": "main.js",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
15
|
+
"dev": "vite",
|
|
16
|
+
"build": "vite build",
|
|
17
|
+
"preview": "vite preview"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"Gamification"
|
|
21
|
+
],
|
|
22
|
+
"author": "Binh Tran Hai",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@playwright/test": "^1.57.0",
|
|
26
|
+
"@types/node": "^25.6.0",
|
|
27
|
+
"path": "^0.12.7",
|
|
28
|
+
"terser": "^5.44.1",
|
|
29
|
+
"typescript": "^5.9.3",
|
|
30
|
+
"vite": "^7.1.12",
|
|
31
|
+
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
32
|
+
"vite-plugin-javascript-obfuscator": "^3.1.0"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"playwright": "^1.57.0"
|
|
36
|
+
}
|
|
37
|
+
}
|