webs-sdk 0.14.2 → 0.14.3

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.
Files changed (60) hide show
  1. package/README.md +398 -398
  2. package/dist/components/ARFilters/ARFilters.js +52 -52
  3. package/dist/components/AvatarAI.js +4 -4
  4. package/dist/components/CreativeFaceSwap.js +12 -12
  5. package/dist/components/MemeGenerator.js +12 -12
  6. package/dist/components/SpinningWheel/SpinningWheel.js +7 -7
  7. package/dist/components/esports/index.d.ts +5 -0
  8. package/dist/components/esports/index.d.ts.map +1 -0
  9. package/dist/components/esports/index.js +13 -0
  10. package/dist/components/esports/index.js.map +1 -0
  11. package/dist/components/esports/news/EsportsNews.d.ts +4 -0
  12. package/dist/components/esports/news/EsportsNews.d.ts.map +1 -0
  13. package/dist/components/esports/news/EsportsNews.js +173 -0
  14. package/dist/components/esports/news/EsportsNews.js.map +1 -0
  15. package/dist/components/esports/news/api.d.ts +15 -0
  16. package/dist/components/esports/news/api.d.ts.map +1 -0
  17. package/dist/components/esports/news/api.js +153 -0
  18. package/dist/components/esports/news/api.js.map +1 -0
  19. package/dist/components/esports/news/index.d.ts +5 -0
  20. package/dist/components/esports/news/index.d.ts.map +1 -0
  21. package/dist/components/esports/news/index.js +9 -0
  22. package/dist/components/esports/news/index.js.map +1 -0
  23. package/dist/components/esports/news/types.d.ts +98 -0
  24. package/dist/components/esports/news/types.d.ts.map +1 -0
  25. package/dist/components/esports/news/types.js +3 -0
  26. package/dist/components/esports/news/types.js.map +1 -0
  27. package/dist/components/esports/utils.d.ts +11 -0
  28. package/dist/components/esports/utils.d.ts.map +1 -0
  29. package/dist/components/esports/utils.js +57 -0
  30. package/dist/components/esports/utils.js.map +1 -0
  31. package/dist/index.d.ts +2 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +8 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/libraries/auth.d.ts.map +1 -1
  36. package/dist/libraries/auth.js +12 -9
  37. package/dist/libraries/auth.js.map +1 -1
  38. package/index.js +67 -67
  39. package/package.json +42 -40
  40. package/public/spin2win/assets/border-afristream.svg +26 -26
  41. package/public/spin2win/assets/border-efc.svg +23 -23
  42. package/public/spin2win/assets/border-totalgym.svg +27 -27
  43. package/public/spin2win/assets/border-womantoday.svg +26 -26
  44. package/public/spin2win/assets/indicator-afristream.svg +28 -28
  45. package/public/spin2win/assets/indicator-efc.svg +29 -29
  46. package/public/spin2win/assets/indicator-totalgym.svg +29 -29
  47. package/public/spin2win/fonts/switzer/README.md +22 -22
  48. package/types/index.d.ts +415 -415
  49. package/dist/components/ARFilters/ARFilters.jsx +0 -97
  50. package/dist/components/ARFilters/ARFilters.jsx.map +0 -1
  51. package/dist/components/ARFilters/FilterCarousel.jsx +0 -136
  52. package/dist/components/ARFilters/FilterCarousel.jsx.map +0 -1
  53. package/dist/components/ARFilters/Popups.jsx +0 -69
  54. package/dist/components/ARFilters/Popups.jsx.map +0 -1
  55. package/dist/components/CreativeFaceSwap.jsx +0 -536
  56. package/dist/components/CreativeFaceSwap.jsx.map +0 -1
  57. package/dist/components/Ringtone.jsx +0 -80
  58. package/dist/components/Ringtone.jsx.map +0 -1
  59. package/dist/components/SpinningWheel/SpinningWheel.jsx +0 -744
  60. package/dist/components/SpinningWheel/SpinningWheel.jsx.map +0 -1
@@ -1,744 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.SpinningWheel = SpinningWheel;
38
- const react_1 = __importStar(require("react"));
39
- const react_2 = require("motion/react");
40
- const config_1 = require("./config");
41
- function SpinningWheel({ config, onResult, onError, canSpin = true, alreadySpunToday = false, theme = 'womantoday', userId, websiteId, apiBaseUrl = '/api/spin2win' }) {
42
- const [isSpinning, setIsSpinning] = (0, react_1.useState)(false);
43
- const [rotation, setRotation] = (0, react_1.useState)(0);
44
- const [result, setResult] = (0, react_1.useState)(null);
45
- const [showConfetti, setShowConfetti] = (0, react_1.useState)(false);
46
- const [error, setError] = (0, react_1.useState)(null);
47
- const [hasSpunToday, setHasSpunToday] = (0, react_1.useState)(alreadySpunToday);
48
- const [isCheckingStatus, setIsCheckingStatus] = (0, react_1.useState)(true);
49
- const wheelRef = (0, react_1.useRef)(null);
50
- (0, react_1.useEffect)(() => {
51
- const checkSpinStatus = async () => {
52
- try {
53
- const response = await fetch(`${apiBaseUrl}/status`, {
54
- method: 'POST',
55
- headers: {
56
- 'Content-Type': 'application/json',
57
- },
58
- body: JSON.stringify({
59
- w: websiteId,
60
- u: userId
61
- })
62
- });
63
- if (!response.ok) {
64
- throw new Error(`Status API error: ${response.status}`);
65
- }
66
- const data = await response.json();
67
- if (data.success === false || data.allow === false) {
68
- setHasSpunToday(true);
69
- }
70
- else {
71
- setHasSpunToday(false);
72
- }
73
- }
74
- catch (err) {
75
- console.error('Error checking spin status:', err);
76
- }
77
- finally {
78
- setIsCheckingStatus(false);
79
- }
80
- };
81
- checkSpinStatus();
82
- }, [userId, websiteId, apiBaseUrl]);
83
- const currentTheme = config_1.wheelThemes[theme];
84
- const imgIndicator = currentTheme.indicatorAsset;
85
- const imgFrame = currentTheme.borderAsset;
86
- const imgPortions = currentTheme.wheelPortionsAsset;
87
- const textFont = currentTheme.fonts.text;
88
- const uiFont = currentTheme.fonts.ui;
89
- const wheelSegments = [
90
- {
91
- id: 0,
92
- reward_title: 'Oops',
93
- reward_description: 'Nice try! Come back tomorrow for another chance',
94
- reward_type: 'try-again',
95
- reward_value: null,
96
- color: '#FFDCDC'
97
- },
98
- {
99
- id: 1,
100
- reward_title: 'R10',
101
- reward_description: 'Airtime prize',
102
- reward_type: 'real',
103
- reward_value: 10,
104
- color: '#FE9595'
105
- },
106
- {
107
- id: 2,
108
- reward_title: 'Oops',
109
- reward_description: 'So close! Try again tomorrow',
110
- reward_type: 'boost',
111
- reward_value: null,
112
- color: '#FFDCDC'
113
- },
114
- {
115
- id: 3,
116
- reward_title: 'R10',
117
- reward_description: 'Airtime prize',
118
- reward_type: 'real',
119
- reward_value: 10,
120
- color: '#FE9595'
121
- },
122
- {
123
- id: 4,
124
- reward_title: 'Oops',
125
- reward_description: 'Nice try! Come back tomorrow for another chance',
126
- reward_type: 'try-again',
127
- reward_value: null,
128
- color: '#FFDCDC'
129
- },
130
- {
131
- id: 5,
132
- reward_title: 'R20',
133
- reward_description: 'Airtime prize',
134
- reward_type: 'real',
135
- reward_value: 20,
136
- color: '#FE9595'
137
- },
138
- {
139
- id: 6,
140
- reward_title: 'Oops',
141
- reward_description: 'So close! Try again tomorrow',
142
- reward_type: 'boost',
143
- reward_value: null,
144
- color: '#FFDCDC'
145
- },
146
- {
147
- id: 7,
148
- reward_title: 'R20',
149
- reward_description: 'Airtime prize',
150
- reward_type: 'real',
151
- reward_value: 20,
152
- color: '#FE9595'
153
- },
154
- ];
155
- const segmentAngle = 360 / wheelSegments.length;
156
- const spin = async () => {
157
- if (isSpinning || !canSpin || hasSpunToday)
158
- return;
159
- setIsSpinning(true);
160
- setResult(null);
161
- setShowConfetti(false);
162
- setError(null);
163
- try {
164
- const resultResponse = await fetch(`${apiBaseUrl}/throw-result`, {
165
- method: 'POST',
166
- headers: {
167
- 'Content-Type': 'application/json',
168
- },
169
- body: JSON.stringify({
170
- u: userId,
171
- w: websiteId
172
- })
173
- });
174
- if (!resultResponse.ok) {
175
- throw new Error(`Result API error: ${resultResponse.status}`);
176
- }
177
- const resultData = await resultResponse.json();
178
- if (!resultData.success || resultData.segmentId === undefined) {
179
- throw new Error('Invalid result from server');
180
- }
181
- const winningSegment = wheelSegments.find(s => s.id === resultData.segmentId);
182
- if (!winningSegment) {
183
- throw new Error(`Invalid segment ID: ${resultData.segmentId}`);
184
- }
185
- const imageAlignmentOffset = -22.5;
186
- const segmentCenterAngle = (winningSegment.id * segmentAngle) + (segmentAngle / 2) + imageAlignmentOffset;
187
- const randomOffset = (Math.random() - 0.5) * 20;
188
- const randomSpins = Math.floor(Math.random() * 3) + 3;
189
- const targetAngle = 360 - (segmentCenterAngle + randomOffset);
190
- const totalRotation = rotation + (randomSpins * 360) + targetAngle;
191
- setRotation(totalRotation);
192
- setTimeout(async () => {
193
- setIsSpinning(false);
194
- try {
195
- const response = await fetch(`${apiBaseUrl}/throw`, {
196
- method: 'POST',
197
- headers: {
198
- 'Content-Type': 'application/json',
199
- },
200
- body: JSON.stringify({
201
- u: userId,
202
- w: websiteId,
203
- result: {
204
- id: winningSegment.id,
205
- text: winningSegment.reward_title
206
- }
207
- })
208
- });
209
- if (!response.ok) {
210
- throw new Error(`API error: ${response.status}`);
211
- }
212
- const data = await response.json();
213
- if (data.success === false) {
214
- throw new Error('Spin was not successful');
215
- }
216
- setHasSpunToday(true);
217
- setTimeout(() => {
218
- setResult(winningSegment);
219
- onResult === null || onResult === void 0 ? void 0 : onResult(winningSegment);
220
- if (winningSegment.reward_type === 'real') {
221
- setShowConfetti(true);
222
- }
223
- }, 500);
224
- }
225
- catch (err) {
226
- const error = err instanceof Error ? err : new Error('Unknown error occurred');
227
- setError(error);
228
- onError === null || onError === void 0 ? void 0 : onError(error);
229
- setHasSpunToday(true);
230
- }
231
- }, 3000);
232
- }
233
- catch (err) {
234
- setIsSpinning(false);
235
- const error = err instanceof Error ? err : new Error('Failed to get spin result');
236
- setError(error);
237
- onError === null || onError === void 0 ? void 0 : onError(error);
238
- }
239
- };
240
- return (<div className="flex flex-col items-center gap-8 p-8">
241
-
242
- {result && (<react_2.motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} className="fixed inset-0 z-50 flex items-center justify-center" onClick={() => setResult(null)}>
243
- <react_2.motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} className="absolute inset-0 bg-black/40" style={{ backdropFilter: 'blur(16px)' }}/>
244
-
245
- {showConfetti && (<div className="absolute inset-0 pointer-events-none overflow-hidden">
246
- {[...Array(30)].map((_, i) => (<react_2.motion.div key={i} className="absolute w-3 h-3 rounded-full" style={{
247
- background: ['#FFD700', '#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4'][i % 5],
248
- left: '50%',
249
- top: '50%',
250
- }} initial={{ scale: 0, x: 0, y: 0, opacity: 1 }} animate={{
251
- scale: [0, 1, 0.5],
252
- x: (Math.random() - 0.5) * 800,
253
- y: (Math.random() - 0.5) * 800,
254
- opacity: [1, 1, 0],
255
- }} transition={{
256
- duration: 2,
257
- delay: i * 0.03,
258
- ease: "easeOut"
259
- }}/>))}
260
- </div>)}
261
-
262
- <react_2.motion.div initial={{ opacity: 0, scale: 0.8, y: 50 }} animate={{ opacity: 1, scale: 1, y: 0 }} transition={{ duration: 0.4, ease: "easeOut", delay: 0.1 }} onClick={(e) => e.stopPropagation()} style={{
263
- position: 'relative',
264
- zIndex: 10,
265
- backgroundColor: '#FFFFFF',
266
- borderRadius: '24px',
267
- width: '392px',
268
- maxWidth: '90%',
269
- padding: '0 24px',
270
- boxShadow: '0px 25px 50px -12px rgba(0, 0, 0, 0.25)'
271
- }}>
272
- <button onClick={() => setResult(null)} style={{
273
- position: 'absolute',
274
- top: 0,
275
- right: 0,
276
- padding: '20px',
277
- background: 'transparent',
278
- border: 'none',
279
- cursor: 'pointer',
280
- display: 'flex',
281
- alignItems: 'center',
282
- gap: '10px'
283
- }} aria-label="Close">
284
- <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
285
- <path d="M1 1L9 9M9 1L1 9" stroke="#6D6665" strokeWidth="2" strokeLinecap="round"/>
286
- </svg>
287
- </button>
288
-
289
- <div style={{
290
- display: 'flex',
291
- flexDirection: 'column',
292
- alignItems: 'center',
293
- gap: '16px',
294
- paddingTop: '60px',
295
- paddingBottom: '60px'
296
- }}>
297
- {result.reward_type === 'real' ? (<>
298
- <react_2.motion.div initial={{ scale: 0, rotate: -180 }} animate={{ scale: 1, rotate: 0 }} transition={{ delay: 0.3, type: "spring", stiffness: 200, damping: 10 }}>
299
- <img src="/spin2win/assets/Icon-Celebrate@2x.png" alt="Celebrate" style={{ width: '105px', height: '105px' }}/>
300
- </react_2.motion.div>
301
-
302
- <react_2.motion.h3 initial={{ opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.5 }} style={{
303
- fontFamily: uiFont,
304
- fontWeight: 700,
305
- fontSize: '26.25px',
306
- lineHeight: '1.2em',
307
- letterSpacing: '0.9%',
308
- textAlign: 'center',
309
- color: '#6D6665',
310
- margin: 0
311
- }}>
312
- You won {result.reward_title}!
313
- </react_2.motion.h3>
314
-
315
- <react_2.motion.p initial={{ opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.7 }} style={{
316
- fontFamily: uiFont,
317
- fontWeight: 500,
318
- fontSize: '16px',
319
- lineHeight: '1.32em',
320
- textAlign: 'center',
321
- color: '#6D6665',
322
- margin: 0
323
- }}>
324
- The money will be sent to your Vodacom account. Processing may take up to 24 hours.
325
- </react_2.motion.p>
326
- </>) : (<>
327
- <react_2.motion.div initial={{ scale: 0 }} animate={{ scale: 1 }} transition={{ delay: 0.3, type: "spring", stiffness: 200, damping: 10 }}>
328
- <img src="/spin2win/assets/Icon-Sad@2x.png" alt="Sad" style={{ width: '105px', height: '105px' }}/>
329
- </react_2.motion.div>
330
-
331
- <react_2.motion.h3 initial={{ opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.5 }} style={{
332
- fontFamily: uiFont,
333
- fontWeight: 700,
334
- fontSize: '26.25px',
335
- lineHeight: '1.2em',
336
- letterSpacing: '0.9%',
337
- textAlign: 'center',
338
- color: '#6D6665',
339
- margin: 0
340
- }}>
341
- Oops... so close!
342
- </react_2.motion.h3>
343
-
344
- <react_2.motion.p initial={{ opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.7 }} style={{
345
- fontFamily: uiFont,
346
- fontWeight: 500,
347
- fontSize: '16px',
348
- lineHeight: '1.32em',
349
- textAlign: 'center',
350
- color: '#6D6665',
351
- margin: 0
352
- }}>
353
- No cash reward this time, but you can try again tomorrow!
354
- </react_2.motion.p>
355
- </>)}
356
- </div>
357
- </react_2.motion.div>
358
- </react_2.motion.div>)}
359
-
360
-
361
- {error && (<react_2.motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} className="fixed inset-0 z-50 flex items-center justify-center" onClick={() => setError(null)}>
362
- <react_2.motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} className="absolute inset-0 bg-black/40" style={{ backdropFilter: 'blur(16px)' }}/>
363
-
364
- <react_2.motion.div initial={{ opacity: 0, scale: 0.8, y: 50 }} animate={{ opacity: 1, scale: 1, y: 0 }} transition={{ duration: 0.4, ease: "easeOut", delay: 0.1 }} onClick={(e) => e.stopPropagation()} style={{
365
- position: 'relative',
366
- zIndex: 10,
367
- backgroundColor: '#FFFFFF',
368
- borderRadius: '24px',
369
- width: '392px',
370
- maxWidth: '90%',
371
- padding: '0 24px',
372
- boxShadow: '0px 25px 50px -12px rgba(0, 0, 0, 0.25)'
373
- }}>
374
- <button onClick={() => setError(null)} style={{
375
- position: 'absolute',
376
- top: 0,
377
- right: 0,
378
- padding: '20px',
379
- background: 'transparent',
380
- border: 'none',
381
- cursor: 'pointer',
382
- display: 'flex',
383
- alignItems: 'center',
384
- gap: '10px'
385
- }} aria-label="Close">
386
- <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
387
- <path d="M1 1L9 9M9 1L1 9" stroke="#6D6665" strokeWidth="2" strokeLinecap="round"/>
388
- </svg>
389
- </button>
390
-
391
- <div style={{
392
- display: 'flex',
393
- flexDirection: 'column',
394
- alignItems: 'center',
395
- gap: '16px',
396
- paddingTop: '60px',
397
- paddingBottom: '60px'
398
- }}>
399
- <react_2.motion.div initial={{ scale: 0 }} animate={{ scale: 1 }} transition={{ delay: 0.3, type: "spring", stiffness: 200, damping: 10 }}>
400
- <img src="/spin2win/assets/Icon-Warning@2x.png" alt="Warning" style={{ width: '105px', height: '105px' }}/>
401
- </react_2.motion.div>
402
-
403
- <react_2.motion.h3 initial={{ opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.5 }} style={{
404
- fontFamily: uiFont,
405
- fontWeight: 700,
406
- fontSize: '26.25px',
407
- lineHeight: '1.2em',
408
- letterSpacing: '0.9%',
409
- textAlign: 'center',
410
- color: '#595959',
411
- margin: 0
412
- }}>
413
- Something went wrong
414
- </react_2.motion.h3>
415
-
416
- <react_2.motion.p initial={{ opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.7 }} style={{
417
- fontFamily: uiFont,
418
- fontWeight: 500,
419
- fontSize: '16px',
420
- lineHeight: '1.37em',
421
- textAlign: 'center',
422
- color: '#595959',
423
- margin: 0
424
- }}>
425
- Your spin was registered, but we couldn't process the payment right now.
426
- <br />
427
- Please contact support if the issue persists.
428
- </react_2.motion.p>
429
- </div>
430
- </react_2.motion.div>
431
- </react_2.motion.div>)}
432
-
433
-
434
- <div className="flex flex-col items-center max-w-md" style={{ gap: '24px' }}>
435
- {!result && !isSpinning ? (<>
436
- <h1 style={{
437
- fontFamily: uiFont,
438
- fontSize: '32px',
439
- fontWeight: 700,
440
- lineHeight: '1.25em',
441
- color: currentTheme.colors.heading,
442
- margin: 0
443
- }}>
444
- {config.copy.headline}
445
- </h1>
446
- <p style={{
447
- fontFamily: uiFont,
448
- fontSize: '16px',
449
- fontWeight: 400,
450
- lineHeight: '1.5em',
451
- textAlign: 'center',
452
- color: '#3f3f3f',
453
- margin: 0
454
- }}>
455
- {config.copy.subcopy}
456
- </p>
457
- </>) : isSpinning ? (<>
458
- <h1 style={{
459
- fontFamily: uiFont,
460
- fontSize: '32px',
461
- fontWeight: 700,
462
- lineHeight: '1.25em',
463
- color: currentTheme.colors.heading,
464
- margin: 0
465
- }}>
466
- {config.copy.spinningHeadline}
467
- </h1>
468
- <p style={{
469
- fontFamily: uiFont,
470
- fontSize: '16px',
471
- fontWeight: 400,
472
- lineHeight: '1.5em',
473
- textAlign: 'center',
474
- color: '#6D6665',
475
- margin: 0
476
- }}>
477
- {config.copy.spinningSubcopy}
478
- </p>
479
- </>) : null}
480
- </div>
481
-
482
-
483
- <div className="relative w-[400px] h-[400px]" style={{
484
- filter: 'drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.15))'
485
- }}>
486
-
487
- <react_2.motion.div ref={wheelRef} className="absolute left-[1.39%] top-[1.44%] w-[97.17%] h-[97.17%] z-5" style={{
488
- filter: 'drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.1))',
489
- willChange: 'transform',
490
- backfaceVisibility: 'hidden',
491
- WebkitFontSmoothing: 'antialiased'
492
- }} animate={{ rotate: rotation }} transition={{ duration: 3, ease: "easeOut" }}>
493
- <img src={imgPortions} alt="" className="w-full h-full object-contain" style={{
494
- imageRendering: 'auto',
495
- backfaceVisibility: 'hidden',
496
- transform: 'translateZ(0)'
497
- }}/>
498
- </react_2.motion.div>
499
-
500
-
501
- <react_2.motion.div className="absolute left-[1.39%] top-[1.44%] w-[97.17%] h-[97.17%] z-10" style={{
502
- willChange: 'transform',
503
- backfaceVisibility: 'hidden',
504
- WebkitFontSmoothing: 'antialiased'
505
- }} animate={{ rotate: rotation }} transition={{ duration: 3, ease: "easeOut" }}>
506
- <div className="absolute inset-0">
507
-
508
- <div className="absolute flex left-1/2 -translate-x-1/2 items-center justify-center" style={{ top: '8%' }}>
509
- <div className="flex flex-col gap-0.5 items-center" style={{ transform: 'rotate(0deg)' }}>
510
- <div className="text-center" style={{
511
- fontFamily: textFont,
512
- fontWeight: 600,
513
- fontSize: '30px',
514
- lineHeight: '1.2em',
515
- color: currentTheme.colors.text.primary
516
- }}>
517
- Oops
518
- </div>
519
- </div>
520
- </div>
521
-
522
-
523
- <div className="absolute flex items-center justify-center" style={{ top: '18%', right: '18%' }}>
524
- <div className="flex flex-col gap-[7px] items-center" style={{ transform: 'rotate(45deg)' }}>
525
- <div className="text-center" style={{
526
- fontFamily: textFont,
527
- fontWeight: 600,
528
- fontSize: '30px',
529
- lineHeight: '1.2em',
530
- color: currentTheme.colors.text.primary
531
- }}>
532
- R10
533
- </div>
534
- <div className="text-center" style={{
535
- fontFamily: uiFont,
536
- fontWeight: 600,
537
- fontSize: '28px',
538
- lineHeight: '1.2em',
539
- color: currentTheme.colors.text.secondary
540
- }}>
541
- 💰
542
- </div>
543
- </div>
544
- </div>
545
-
546
-
547
- <div className="absolute flex items-center justify-center" style={{ top: '50%', right: '2%', transform: 'translateY(-50%)' }}>
548
- <div className="flex flex-col gap-0.5 items-center" style={{ transform: 'rotate(90deg)' }}>
549
- <div className="text-center" style={{
550
- fontFamily: textFont,
551
- fontWeight: 600,
552
- fontSize: '30px',
553
- lineHeight: '1.2em',
554
- color: currentTheme.colors.text.primary
555
- }}>
556
- Oops
557
- </div>
558
- </div>
559
- </div>
560
-
561
-
562
- <div className="absolute flex items-center justify-center" style={{ bottom: '18%', right: '18%' }}>
563
- <div className="flex flex-col gap-[7px] items-center" style={{ transform: 'rotate(135deg)' }}>
564
- <div className="text-center" style={{
565
- fontFamily: textFont,
566
- fontWeight: 600,
567
- fontSize: '30px',
568
- lineHeight: '1.2em',
569
- color: currentTheme.colors.text.primary
570
- }}>
571
- R10
572
- </div>
573
- <div className="text-center" style={{
574
- fontFamily: uiFont,
575
- fontWeight: 600,
576
- fontSize: '28px',
577
- lineHeight: '1.2em',
578
- color: currentTheme.colors.text.secondary
579
- }}>
580
- 💰
581
- </div>
582
- </div>
583
- </div>
584
-
585
-
586
- <div className="absolute flex left-1/2 -translate-x-1/2 items-center justify-center" style={{ bottom: '8%' }}>
587
- <div className="flex flex-col gap-0.5 items-center" style={{ transform: 'rotate(180deg)' }}>
588
- <div className="text-center" style={{
589
- fontFamily: textFont,
590
- fontWeight: 600,
591
- fontSize: '30px',
592
- lineHeight: '1.2em',
593
- color: currentTheme.colors.text.primary
594
- }}>
595
- Oops
596
- </div>
597
- </div>
598
- </div>
599
-
600
-
601
- <div className="absolute flex items-center justify-center" style={{ bottom: '18%', left: '18%' }}>
602
- <div className="flex flex-col gap-[7px] items-center" style={{ transform: 'rotate(-135deg)' }}>
603
- <div className="text-center" style={{
604
- fontFamily: textFont,
605
- fontWeight: 600,
606
- fontSize: '30px',
607
- lineHeight: '1.2em',
608
- color: currentTheme.colors.text.primary
609
- }}>
610
- R20
611
- </div>
612
- <div className="text-center" style={{
613
- fontFamily: uiFont,
614
- fontWeight: 600,
615
- fontSize: '28px',
616
- lineHeight: '1.2em',
617
- color: currentTheme.colors.text.secondary
618
- }}>
619
- 💰
620
- </div>
621
- </div>
622
- </div>
623
-
624
-
625
- <div className="absolute flex items-center justify-center" style={{ top: '50%', left: '2%', transform: 'translateY(-50%)' }}>
626
- <div className="flex flex-col gap-0.5 items-center" style={{ transform: 'rotate(-90deg)' }}>
627
- <div className="text-center" style={{
628
- fontFamily: textFont,
629
- fontWeight: 600,
630
- fontSize: '30px',
631
- lineHeight: '1.2em',
632
- color: currentTheme.colors.text.primary
633
- }}>
634
- Oops
635
- </div>
636
- </div>
637
- </div>
638
-
639
-
640
- <div className="absolute flex items-center justify-center" style={{ top: '18%', left: '18%' }}>
641
- <div className="flex flex-col gap-[7px] items-center" style={{ transform: 'rotate(-45deg)' }}>
642
- <div className="text-center" style={{
643
- fontFamily: textFont,
644
- fontWeight: 600,
645
- fontSize: '30px',
646
- lineHeight: '1.2em',
647
- color: currentTheme.colors.text.primary
648
- }}>
649
- R20
650
- </div>
651
- <div className="text-center" style={{
652
- fontFamily: uiFont,
653
- fontWeight: 600,
654
- fontSize: '28px',
655
- lineHeight: '1.2em',
656
- color: currentTheme.colors.text.secondary
657
- }}>
658
- 💰
659
- </div>
660
- </div>
661
- </div>
662
- </div>
663
- </react_2.motion.div>
664
-
665
-
666
- <div className="absolute inset-0 z-15 pointer-events-none">
667
- <img src={imgFrame} alt="" className="w-full h-full object-contain" style={{
668
- filter: 'drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1))',
669
- imageRendering: 'auto',
670
- backfaceVisibility: 'hidden',
671
- transform: 'translateZ(0)'
672
- }}/>
673
- </div>
674
-
675
-
676
- <div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none z-20" style={{ marginTop: '-15px' }}>
677
- <react_2.motion.div className="w-[120px] h-[120px] relative" style={{
678
- filter: 'drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.25)) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.15))'
679
- }} animate={isSpinning ? { scale: [1, 1.15, 1] } : {}} transition={{
680
- duration: 0.5,
681
- repeat: isSpinning ? Infinity : 0,
682
- ease: "easeInOut"
683
- }}>
684
- <img src={imgIndicator} alt="" className="w-full h-full object-contain" style={{
685
- imageRendering: 'auto',
686
- backfaceVisibility: 'hidden',
687
- transform: 'translateZ(0)'
688
- }}/>
689
- <img src="/spin2win/assets/circle-inner-56586a.png" alt="" className="absolute object-contain" style={{
690
- width: '60px',
691
- height: '60px',
692
- left: '48%',
693
- top: '60%',
694
- transform: 'translate(-50%, -50%) translateZ(0)',
695
- imageRendering: 'auto',
696
- backfaceVisibility: 'hidden'
697
- }}/>
698
- </react_2.motion.div>
699
- </div>
700
- </div>
701
-
702
- <div className="flex flex-col items-center gap-4" style={{ width: '70%', maxWidth: '1200px' }}>
703
- {!isCheckingStatus && (<button onClick={spin} disabled={isSpinning || !canSpin || hasSpunToday} style={{
704
- fontFamily: uiFont,
705
- fontWeight: 700,
706
- fontSize: '14px',
707
- lineHeight: '1.32em',
708
- letterSpacing: '0.5%',
709
- color: '#FFFFFF',
710
- backgroundColor: currentTheme.colors.button,
711
- borderRadius: '40px',
712
- padding: '10px 15px',
713
- border: 'none',
714
- cursor: isSpinning || !canSpin || hasSpunToday ? 'not-allowed' : 'pointer',
715
- opacity: isSpinning || !canSpin || hasSpunToday ? 0.5 : 1,
716
- transition: 'all 0.2s ease'
717
- }} onMouseEnter={(e) => {
718
- if (!isSpinning && canSpin && !hasSpunToday) {
719
- e.currentTarget.style.transform = 'scale(1.05)';
720
- }
721
- }} onMouseLeave={(e) => {
722
- e.currentTarget.style.transform = 'scale(1)';
723
- }}>
724
- {isSpinning ? 'SPINNING...' : 'SPIN THE WHEEL!'}
725
- </button>)}
726
- </div>
727
-
728
- <p style={{
729
- fontFamily: uiFont,
730
- fontWeight: 400,
731
- fontSize: '16px',
732
- lineHeight: '1.5em',
733
- textAlign: 'center',
734
- color: '#B6B2B2',
735
- margin: 0,
736
- padding: '0 20px',
737
- marginTop: '60px'
738
- }}>
739
- Cash prizes are transferred to the Vodacom account linked to your profile. Please make sure your account details are up to date to receive cash prizes.
740
- </p>
741
- </div>);
742
- }
743
- exports.default = SpinningWheel;
744
- //# sourceMappingURL=SpinningWheel.jsx.map