@everymatrix/lottery-ticket-controller 0.0.3 → 0.1.4
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/dist/cjs/helper-accordion_5.cjs.entry.js +514 -0
- package/dist/cjs/{index-498fdd8e.js → index-95915aab.js} +136 -12
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/lottery-ticket-controller.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +27 -2
- package/dist/components/helper-accordion.js +6 -0
- package/dist/components/helper-accordion2.js +115 -0
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +0 -1
- package/dist/components/lottery-bullet.js +6 -0
- package/dist/components/lottery-bullet2.js +56 -0
- package/dist/components/lottery-grid.js +6 -0
- package/dist/components/lottery-grid2.js +196 -0
- package/dist/components/lottery-ticket-controller.js +25 -3
- package/dist/components/lottery-ticket.js +6 -0
- package/dist/components/lottery-ticket2.js +208 -0
- package/dist/esm/helper-accordion_5.entry.js +506 -0
- package/dist/esm/{index-4b81518c.js → index-e3877ca0.js} +136 -12
- package/dist/esm/loader.js +3 -3
- package/dist/esm/lottery-ticket-controller.js +3 -3
- package/dist/lottery-ticket-controller/lottery-ticket-controller.esm.js +1 -1
- package/dist/lottery-ticket-controller/p-3971b8e6.js +1 -0
- package/dist/lottery-ticket-controller/p-95406ad0.entry.js +1 -0
- package/dist/types/components.d.ts +1 -5
- package/package.json +1 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -71
- package/dist/esm/lottery-ticket-controller.entry.js +0 -67
- package/dist/lottery-ticket-controller/p-5186fd30.entry.js +0 -1
- package/dist/lottery-ticket-controller/p-fe83d21a.js +0 -2
|
@@ -28,7 +28,7 @@ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
|
28
28
|
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
29
29
|
if (listeners) {
|
|
30
30
|
listeners.map(([flags, name, method]) => {
|
|
31
|
-
const target = elm;
|
|
31
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
32
32
|
const handler = hostListenerProxy(hostRef, method);
|
|
33
33
|
const opts = hostListenerOpts(flags);
|
|
34
34
|
plt.ael(target, name, handler, opts);
|
|
@@ -52,6 +52,13 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
52
52
|
consoleError(e);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
56
|
+
if (flags & 4 /* TargetDocument */)
|
|
57
|
+
return doc;
|
|
58
|
+
if (flags & 8 /* TargetWindow */)
|
|
59
|
+
return win;
|
|
60
|
+
return elm;
|
|
61
|
+
};
|
|
55
62
|
// prettier-ignore
|
|
56
63
|
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
57
64
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
@@ -83,7 +90,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
83
90
|
};
|
|
84
91
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
85
92
|
let scopeId = getScopeId(cmpMeta);
|
|
86
|
-
|
|
93
|
+
let style = styles.get(scopeId);
|
|
87
94
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
88
95
|
// so the fallback is to always use the document for the root node in those cases
|
|
89
96
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -163,7 +170,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
163
170
|
let child = null;
|
|
164
171
|
let simple = false;
|
|
165
172
|
let lastSimple = false;
|
|
166
|
-
|
|
173
|
+
let vNodeChildren = [];
|
|
167
174
|
const walk = (c) => {
|
|
168
175
|
for (let i = 0; i < c.length; i++) {
|
|
169
176
|
child = c[i];
|
|
@@ -187,6 +194,19 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
187
194
|
}
|
|
188
195
|
};
|
|
189
196
|
walk(children);
|
|
197
|
+
if (vnodeData) {
|
|
198
|
+
{
|
|
199
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
200
|
+
if (classData) {
|
|
201
|
+
vnodeData.class =
|
|
202
|
+
typeof classData !== 'object'
|
|
203
|
+
? classData
|
|
204
|
+
: Object.keys(classData)
|
|
205
|
+
.filter((k) => classData[k])
|
|
206
|
+
.join(' ');
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
190
210
|
const vnode = newVNode(nodeName, null);
|
|
191
211
|
vnode.$attrs$ = vnodeData;
|
|
192
212
|
if (vNodeChildren.length > 0) {
|
|
@@ -220,14 +240,60 @@ const isHost = (node) => node && node.$tag$ === Host;
|
|
|
220
240
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
221
241
|
if (oldValue !== newValue) {
|
|
222
242
|
let isProp = isMemberInElement(elm, memberName);
|
|
223
|
-
memberName.toLowerCase();
|
|
224
|
-
{
|
|
243
|
+
let ln = memberName.toLowerCase();
|
|
244
|
+
if (memberName === 'class') {
|
|
245
|
+
const classList = elm.classList;
|
|
246
|
+
const oldClasses = parseClassList(oldValue);
|
|
247
|
+
const newClasses = parseClassList(newValue);
|
|
248
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
249
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
250
|
+
}
|
|
251
|
+
else if ((!isProp ) &&
|
|
252
|
+
memberName[0] === 'o' &&
|
|
253
|
+
memberName[1] === 'n') {
|
|
254
|
+
// Event Handlers
|
|
255
|
+
// so if the member name starts with "on" and the 3rd characters is
|
|
256
|
+
// a capital letter, and it's not already a member on the element,
|
|
257
|
+
// then we're assuming it's an event listener
|
|
258
|
+
if (memberName[2] === '-') {
|
|
259
|
+
// on- prefixed events
|
|
260
|
+
// allows to be explicit about the dom event to listen without any magic
|
|
261
|
+
// under the hood:
|
|
262
|
+
// <my-cmp on-click> // listens for "click"
|
|
263
|
+
// <my-cmp on-Click> // listens for "Click"
|
|
264
|
+
// <my-cmp on-ionChange> // listens for "ionChange"
|
|
265
|
+
// <my-cmp on-EVENTS> // listens for "EVENTS"
|
|
266
|
+
memberName = memberName.slice(3);
|
|
267
|
+
}
|
|
268
|
+
else if (isMemberInElement(win, ln)) {
|
|
269
|
+
// standard event
|
|
270
|
+
// the JSX attribute could have been "onMouseOver" and the
|
|
271
|
+
// member name "onmouseover" is on the window's prototype
|
|
272
|
+
// so let's add the listener "mouseover", which is all lowercased
|
|
273
|
+
memberName = ln.slice(2);
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
// custom event
|
|
277
|
+
// the JSX attribute could have been "onMyCustomEvent"
|
|
278
|
+
// so let's trim off the "on" prefix and lowercase the first character
|
|
279
|
+
// and add the listener "myCustomEvent"
|
|
280
|
+
// except for the first character, we keep the event name case
|
|
281
|
+
memberName = ln[2] + memberName.slice(3);
|
|
282
|
+
}
|
|
283
|
+
if (oldValue) {
|
|
284
|
+
plt.rel(elm, memberName, oldValue, false);
|
|
285
|
+
}
|
|
286
|
+
if (newValue) {
|
|
287
|
+
plt.ael(elm, memberName, newValue, false);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
225
291
|
// Set property if it exists and it's not a SVG
|
|
226
292
|
const isComplex = isComplexType(newValue);
|
|
227
293
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
228
294
|
try {
|
|
229
295
|
if (!elm.tagName.includes('-')) {
|
|
230
|
-
|
|
296
|
+
let n = newValue == null ? '' : newValue;
|
|
231
297
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
232
298
|
if (memberName === 'list') {
|
|
233
299
|
isProp = false;
|
|
@@ -258,6 +324,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
258
324
|
}
|
|
259
325
|
}
|
|
260
326
|
};
|
|
327
|
+
const parseClassListRegex = /\s/;
|
|
328
|
+
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
261
329
|
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
262
330
|
// if the element passed in is a shadow root, which is a document fragment
|
|
263
331
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
@@ -282,11 +350,15 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
282
350
|
};
|
|
283
351
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
284
352
|
// tslint:disable-next-line: prefer-const
|
|
285
|
-
|
|
353
|
+
let newVNode = newParentVNode.$children$[childIndex];
|
|
286
354
|
let i = 0;
|
|
287
355
|
let elm;
|
|
288
356
|
let childNode;
|
|
289
|
-
{
|
|
357
|
+
if (newVNode.$text$ !== null) {
|
|
358
|
+
// create text node
|
|
359
|
+
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
290
362
|
// create element
|
|
291
363
|
elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
|
|
292
364
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -415,10 +487,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
415
487
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
416
488
|
const oldChildren = oldVNode.$children$;
|
|
417
489
|
const newChildren = newVNode.$children$;
|
|
418
|
-
|
|
490
|
+
const tag = newVNode.$tag$;
|
|
491
|
+
const text = newVNode.$text$;
|
|
492
|
+
if (text === null) {
|
|
419
493
|
// element node
|
|
420
494
|
{
|
|
421
|
-
|
|
495
|
+
if (tag === 'slot')
|
|
496
|
+
;
|
|
497
|
+
else {
|
|
422
498
|
// either this is the first render of an element OR it's an update
|
|
423
499
|
// AND we already know it's possible it could have changed
|
|
424
500
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
@@ -430,6 +506,11 @@ const patch = (oldVNode, newVNode) => {
|
|
|
430
506
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
431
507
|
}
|
|
432
508
|
else if (newChildren !== null) {
|
|
509
|
+
// no old child vnodes, but there are new child vnodes to add
|
|
510
|
+
if (oldVNode.$text$ !== null) {
|
|
511
|
+
// the old vnode was text, so be sure to clear it out
|
|
512
|
+
elm.textContent = '';
|
|
513
|
+
}
|
|
433
514
|
// add the new vnode children
|
|
434
515
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
435
516
|
}
|
|
@@ -438,6 +519,11 @@ const patch = (oldVNode, newVNode) => {
|
|
|
438
519
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
439
520
|
}
|
|
440
521
|
}
|
|
522
|
+
else if (oldVNode.$text$ !== text) {
|
|
523
|
+
// update the text content for the text only vnode
|
|
524
|
+
// and also only if the text is different than before
|
|
525
|
+
elm.data = text;
|
|
526
|
+
}
|
|
441
527
|
};
|
|
442
528
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
443
529
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -689,6 +775,7 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
|
|
|
689
775
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
690
776
|
// check our new property value against our internal value
|
|
691
777
|
const hostRef = getHostRef(ref);
|
|
778
|
+
const elm = hostRef.$hostElement$ ;
|
|
692
779
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
693
780
|
const flags = hostRef.$flags$;
|
|
694
781
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -701,6 +788,22 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
701
788
|
// set our new value!
|
|
702
789
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
703
790
|
if (instance) {
|
|
791
|
+
// get an array of method names of watch functions to call
|
|
792
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
793
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
794
|
+
if (watchMethods) {
|
|
795
|
+
// this instance is watching for when this property changed
|
|
796
|
+
watchMethods.map((watchMethodName) => {
|
|
797
|
+
try {
|
|
798
|
+
// fire off each of the watch methods that are watching this property
|
|
799
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
800
|
+
}
|
|
801
|
+
catch (e) {
|
|
802
|
+
consoleError(e, elm);
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
}
|
|
704
807
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
705
808
|
// looks like this value actually changed, so we've got work to do!
|
|
706
809
|
// but only if we've already rendered, otherwise just chill out
|
|
@@ -713,6 +816,9 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
713
816
|
};
|
|
714
817
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
715
818
|
if (cmpMeta.$members$) {
|
|
819
|
+
if (Cstr.watchers) {
|
|
820
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
821
|
+
}
|
|
716
822
|
// It's better to have a const than two Object.entries()
|
|
717
823
|
const members = Object.entries(cmpMeta.$members$);
|
|
718
824
|
const prototype = Cstr.prototype;
|
|
@@ -817,6 +923,12 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
817
923
|
endLoad();
|
|
818
924
|
}
|
|
819
925
|
if (!Cstr.isProxied) {
|
|
926
|
+
// we've never proxied this Constructor before
|
|
927
|
+
// let's add the getters/setters to its prototype before
|
|
928
|
+
// the first time we create an instance of the implementation
|
|
929
|
+
{
|
|
930
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
931
|
+
}
|
|
820
932
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
821
933
|
Cstr.isProxied = true;
|
|
822
934
|
}
|
|
@@ -840,7 +952,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
840
952
|
{
|
|
841
953
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
842
954
|
}
|
|
955
|
+
{
|
|
956
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
957
|
+
}
|
|
843
958
|
endNewInstance();
|
|
959
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
844
960
|
}
|
|
845
961
|
if (Cstr.style) {
|
|
846
962
|
// this component has styles but we haven't registered them yet
|
|
@@ -869,6 +985,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
869
985
|
schedule();
|
|
870
986
|
}
|
|
871
987
|
};
|
|
988
|
+
const fireConnectedCallback = (instance) => {
|
|
989
|
+
{
|
|
990
|
+
safeCall(instance, 'connectedCallback');
|
|
991
|
+
}
|
|
992
|
+
};
|
|
872
993
|
const connectedCallback = (elm) => {
|
|
873
994
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
874
995
|
const hostRef = getHostRef(elm);
|
|
@@ -912,6 +1033,8 @@ const connectedCallback = (elm) => {
|
|
|
912
1033
|
// reattach any event listeners to the host
|
|
913
1034
|
// since they would have been removed when disconnected
|
|
914
1035
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1036
|
+
// fire off connectedCallback() on component instance
|
|
1037
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
915
1038
|
}
|
|
916
1039
|
endConnected();
|
|
917
1040
|
}
|
|
@@ -954,6 +1077,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
954
1077
|
{
|
|
955
1078
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
956
1079
|
}
|
|
1080
|
+
{
|
|
1081
|
+
cmpMeta.$watchers$ = {};
|
|
1082
|
+
}
|
|
957
1083
|
const tagName = cmpMeta.$tagName$;
|
|
958
1084
|
const HostElement = class extends HTMLElement {
|
|
959
1085
|
// StencilLazyHost
|
|
@@ -1048,9 +1174,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1048
1174
|
if (module) {
|
|
1049
1175
|
return module[exportName];
|
|
1050
1176
|
}
|
|
1051
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1052
1177
|
return import(
|
|
1053
|
-
/* @vite-ignore */
|
|
1054
1178
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1055
1179
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1056
1180
|
/* webpackMode: "lazy" */
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-e3877ca0.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
4
|
+
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["
|
|
13
|
+
return bootstrapLazy([["helper-accordion_5",[[1,"lottery-ticket-controller",{"endpoint":[1],"ticketId":[2,"ticket-id"],"ticketDescription":[1,"ticket-description"],"gameId":[1,"game-id"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"numberOfGrids":[2,"number-of-grids"],"last":[4],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfGrids":[2,"number-of-grids"],"multipleDraws":[4,"multiple-draws"],"ticketId":[2,"ticket-id"],"resetButton":[4,"reset-button"],"autoPick":[4,"auto-pick"],"language":[1],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-e3877ca0.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.
|
|
4
|
+
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchBrowser = () => {
|
|
7
7
|
const importMeta = import.meta.url;
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["
|
|
16
|
+
return bootstrapLazy([["helper-accordion_5",[[1,"lottery-ticket-controller",{"endpoint":[1],"ticketId":[2,"ticket-id"],"ticketDescription":[1,"ticket-description"],"gameId":[1,"game-id"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"numberOfGrids":[2,"number-of-grids"],"last":[4],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfGrids":[2,"number-of-grids"],"multipleDraws":[4,"multiple-draws"],"ticketId":[2,"ticket-id"],"resetButton":[4,"reset-button"],"autoPick":[4,"auto-pick"],"language":[1],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-3971b8e6.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-95406ad0",[[1,"lottery-ticket-controller",{endpoint:[1],ticketId:[2,"ticket-id"],ticketDescription:[1,"ticket-description"],gameId:[1,"game-id"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],numberOfGrids:[2,"number-of-grids"],last:[4],language:[1],autoPick:[4,"auto-pick"],resetButton:[4,"reset-button"]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{endpoint:[1],gameId:[1,"game-id"],numberOfGrids:[2,"number-of-grids"],multipleDraws:[4,"multiple-draws"],ticketId:[2,"ticket-id"],resetButton:[4,"reset-button"],autoPick:[4,"auto-pick"],language:[1],multiplier:[32],numberOfDraws:[32],isLoading:[32],hasErrors:[32],ticketDone:[32],isCustomSelect:[32],amountInfo:[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]],[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],showContent:[32]}],[1,"lottery-grid",{ticketId:[2,"ticket-id"],totalNumbers:[2,"total-numbers"],gameId:[1,"game-id"],maximumAllowed:[2,"maximum-allowed"],minimumAllowed:[2,"minimum-allowed"],selectable:[4],selectedNumbers:[1,"selected-numbers"],displaySelected:[4,"display-selected"],language:[1],gridIndex:[2,"grid-index"],numbers:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[1],selectable:[4],isSelected:[4,"is-selected"]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=(e,t,n)=>{n&&n.map((([n,l,s])=>{const c=a(e,n),r=u(t,s),i=f(n);o.ael(c,l,r,i),(t.o=t.o||[]).push((()=>o.rel(c,l,r,i)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){J(e)}},a=(e,t)=>4&t?s:8&t?l:e,f=e=>0!=(2&e),h=new WeakMap,y=e=>"sc-"+e.h,$={},d=e=>"object"==(e=typeof e)||"function"===e,m=(e,t,...n)=>{let l=null,s=!1,o=!1,c=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!d(l))&&(l+=""),s&&o?c[c.length-1].$+=l:c.push(s?p(null,l):l),o=s)};if(r(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=p(e,null);return i.m=t,c.length>0&&(i.p=c),i},p=(e,t)=>({t:0,S:e,$:t,g:null,p:null,m:null}),b={},w=(e,t,n,s,c,r)=>{if(n!==s){let i=I(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=g(n),o=g(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const l=d(s);if((i||l&&null!==s)&&!c)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||c)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):I(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},S=/\s/,g=e=>e?e.split(S):[],j=(e,t,n,l)=>{const s=11===t.g.nodeType&&t.g.host?t.g.host:t.g,o=e&&e.m||$,c=t.m||$;for(l in o)l in c||w(s,l,o[l],void 0,n,t.t);for(l in c)w(s,l,o[l],c[l],n,t.t)},v=(t,n,l)=>{let o,c,r=n.p[l],i=0;if(null!==r.$)o=r.g=s.createTextNode(r.$);else if(o=r.g=s.createElement(r.S),j(null,r,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),r.p)for(i=0;i<r.p.length;++i)c=v(t,r,i),c&&o.appendChild(c);return o},k=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=v(null,l,o),r&&(s[o].g=r,i.insertBefore(r,n)))},M=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.g.remove()},C=(e,t)=>e.S===t.S,O=(e,t)=>{const n=t.g=e.g,l=e.p,s=t.p,o=t.$;null===o?("slot"===t.S||j(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],u=t[r],a=l.length-1,f=l[0],h=l[a];for(;o<=r&&c<=a;)null==i?i=t[++o]:null==u?u=t[--r]:null==f?f=l[++c]:null==h?h=l[--a]:C(i,f)?(O(i,f),i=t[++o],f=l[++c]):C(u,h)?(O(u,h),u=t[--r],h=l[--a]):C(i,h)?(O(i,h),e.insertBefore(i.g,u.g.nextSibling),i=t[++o],h=l[--a]):C(u,f)?(O(u,f),e.insertBefore(u.g,i.g),u=t[--r],f=l[++c]):(s=v(t&&t[c],n,c),f=l[++c],s&&i.g.parentNode.insertBefore(s,i.g));o>r?k(e,null==l[a+1]?null:l[a+1].g,n,l,c,a):c>a&&M(t,o,r)})(n,l,t,s):null!==s?(null!==e.$&&(n.textContent=""),k(n,null,t,s,0,s.length-1)):null!==l&&M(l,0,l.length-1)):e.$!==o&&(n.data=o)},P=(e,t,n)=>{const l=(e=>B(e).j)(e);return{emit:e=>x(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},x=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},E=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},N=(e,t)=>{if(e.t|=16,!(4&e.t))return E(e,e.k),se((()=>T(e,t)));e.t|=512},T=(e,t)=>{const n=e.i;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>U(n,e,t))),e.u=null)),W(void 0,(()=>A(e,n,t)))},A=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.j,l=t.t,o=((e,t)=>{let n=y(t),l=X.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=h.get(e=e.head||e);o||h.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);F(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>L(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},F=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.C||p(null,null),c=(e=>e&&e.S===b)(l)?l:m(null,null,l);t=s.tagName,c.S=null,c.t|=4,n.C=c,c.g=o.g=s.shadowRoot||s,e=s["s-sc"],O(o,c)})(n,l)}catch(e){J(e,n.j)}return null},L=e=>{const t=e.j,n=e.k;64&e.t||(e.t|=64,q(t),e.O(t),n||R()),e.v&&(e.v(),e.v=void 0),512&e.t&&le((()=>N(e,!1))),e.t&=-517},R=()=>{q(s.documentElement),le((()=>x(l,"appload",{detail:{namespace:"lottery-ticket-controller"}})))},U=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){J(e)}},W=(e,t)=>e&&e.then?e.then(t):t(),q=e=>e.classList.add("hydrated"),H=(e,t,n)=>{if(t.P){e.watchers&&(t.N=e.watchers);const l=Object.entries(t.P),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>B(this).T.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=B(e),o=s.j,c=s.T.get(t),r=s.t,i=s.i;if(n=((e,t)=>null==e||d(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.P[t][0]),(!(8&r)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.T.set(t,n),i)){if(l.N&&128&r){const e=l.N[t];e&&e.map((e=>{try{i[e](n,c,t)}catch(e){J(e,o)}}))}2==(18&r)&&N(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){o.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},V=e=>{U(e,"connectedCallback")},_=(e,t={})=>{const n=[],c=t.exclude||[],u=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),h=s.createElement("style"),$=[];let d,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],h:t[1],P:t[2],A:t[3]};l.P=t[2],l.A=t[3],l.N={};const s=l.h,a=class extends HTMLElement{constructor(e){super(e),G(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),m?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=B(e),n=t.M,l=()=>{};if(1&t.t)i(e,t,n.A),V(t.i);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){E(t,t.k=n);break}}n.P&&Object.entries(n.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.N=s.watchers,H(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){J(e)}t.t&=-9,t.t|=128,e(),V(t.i)}if(s.style){let e=s.style;const t=y(n);if(!X.has(t)){const l=()=>{};((e,t,n)=>{let l=X.get(e);r&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,X.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.k,c=()=>N(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{if(0==(1&o.t)){const e=B(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return B(this).F}};l.L=e[0],c.includes(s)||u.get(s)||(n.push(s),u.define(s,H(a,l,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>d=setTimeout(R,30)))},z=new WeakMap,B=e=>z.get(e),D=(e,t)=>z.set(t.i=e,t),G=(e,t)=>{const n={t:0,j:e,M:t,T:new Map};return n.F=new Promise((e=>n.O=e)),e["s-p"]=[],e["s-rc"]=[],i(e,n,t.A),z.set(e,n)},I=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),K=new Map,Q=e=>{const t=e.h.replace(/-/g,"_"),n=e.L,l=K.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(K.set(n,e),e[t])),J)},X=new Map,Y=[],Z=[],ee=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?le(ne):o.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){J(e)}e.length=0},ne=()=>{te(Y),te(Z),(n=Y.length>0)&&o.raf(ne)},le=e=>c().then(e),se=ee(Z,!0);export{_ as b,P as c,m as h,c as p,D as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-3971b8e6.js";const s=["ro","en"],r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}},o=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en"}connectedCallback(){this.showContent=!this.collapsed}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper"},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return r[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};o.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';const a=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))}}render(){return i("div",{class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select()},this.value)}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const n=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.totalNumbers=0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.numbers=[],this.selectedCounter=0}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1)).sort((()=>.5-Math.random()));e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return i("div",{class:"GridContainer"},i("div",{class:"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected}))))))}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:25px}';const l=["ro","en"],c={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",grid:"Grid",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"Ma simt norocos"}},d=(t,e)=>{const i=e;return c[void 0!==i&&l.includes(i)?i:"en"][t]},p=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.numberOfGrids=1,this.multipleDraws=!0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.multiplier=!1,this.numberOfDraws=1,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=!1,this.isCustomSelect=!1,this.amountInfo={}}checkForClickOutside(t){"SelectComponent"!==t.composedPath()[0].getAttribute("data-cluster")&&(this.isCustomSelect=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{this.isLoading=!1,this.gameData=t,this.grids=[...Array(t.rules.boards.length).keys()],this.amountInfo=this.gameData.rules.stakes[0]})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}multiplierChangeHandler(t){this.multiplier=!!t.target&&t.target.checked,this.multiplierChange.emit(this.multiplier)}drawsChangeHandler(t){this.ticket=Object.assign(Object.assign({},this.ticket),{draws:t}),this.ticketCompleted.emit(this.ticket)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{draws:this.numberOfDraws}),this.ticketDone=!0,this.ticketCompleted.emit(this.ticket)}toggleAutoSelection(){this.ticketDone=!0,this.autoSelection.emit(this.ticketId)}toggleResetSelection(){this.ticketDone=!1,this.resetSelection.emit(this.ticketId)}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}setDropdownItem(t){this.amountInfo={amount:t.amount,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.amount)}render(){if(this.isLoading)return i("div",null,i("p",null,d("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,d("error",this.language)));{const{rules:t}=this.gameData;return i("div",{class:"TicketContainer"},i("p",{class:"TicketTitle"},this.gameData.name),this.resetButton&&this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection()},d("resetButton",this.language))),this.autoPick&&!this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection()},d("autoButton",this.language))),this.grids.map(((e,s)=>i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},d("grid",this.language)," ",e),i("lottery-grid",{"grid-index":s,"maximum-allowed":t.boards[s].maximumAllowed,"minimum-allowed":t.boards[s].minimumAllowed,"total-numbers":t.boards[s].totalNumbers,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,language:this.language})))),t.multiplier&&i("div",null,i("label",{class:"Toggle"},i("label",{class:"Label"},d("multiplier",this.language),": "),i("input",{class:"ToggleCheckbox",type:"checkbox",onInput:t=>this.multiplierChangeHandler(t)}),i("div",{class:"ToggleSwitch"}))),this.multipleDraws&&i("div",{class:"TicketDraws"},i("label",{class:"Label"},d("numberOfDraws",this.language),": "),i("div",{class:"NumberInput"},i("button",{onClick:()=>this.numberOfDraws>1?this.numberOfDraws--:this.numberOfDraws=1,class:"Minus"},"-"),i("input",{class:"InputDefault",min:"1",value:this.numberOfDraws,type:"number"}),i("button",{onClick:()=>this.numberOfDraws++,class:"Plus"},"+"))),i("div",null,i("label",{class:"Label"},d("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{"data-cluster":"SelectComponent",class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{"data-cluster":"SelectComponent",class:"SelectButton",onClick:()=>this.toggleClass()},i("span",{"data-cluster":"SelectComponent"},this.amountInfo.amount," ",this.amountInfo.currency),i("span",{"data-cluster":"SelectComponent",class:"SelectExpand"},"▼")),i("div",{"data-cluster":"SelectComponent",class:"SelectContent"},i("ul",{"data-cluster":"SelectComponent",class:"SelectOptions"},t.stakes.map((t=>i("li",{"data-cluster":"SelectComponent",class:this.amountInfo.amount==t.amount?"SelectedValue":"",value:t.amount,onClick:()=>this.setDropdownItem(t)},t.amount," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].amount,type:"number",disabled:!0}),i("p",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{numberOfDraws:["drawsChangeHandler"]}}};p.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.ButtonContainer{display:flex;justify-content:flex-end}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:#FFF;background:#009993}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:#FFF;background:#009993}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid #ccc;border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid #ccc;overflow:hidden;background:#fff}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:#009993;color:#fff}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:#f1f1f1;border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:#ccc;border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:#f2f2f2}';const h=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}render(){return i("div",null,i("helper-accordion",{"header-title":"Ticket "+this.ticketId,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":!0,collapsed:!this.last||this.collapsed,language:this.language},i("div",{slot:"accordionContent"},i("lottery-ticket",{endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick}))))}};h.style=":host{display:block}";export{o as helper_accordion,a as lottery_bullet,n as lottery_grid,p as lottery_ticket,h as lottery_ticket_controller}
|
|
@@ -57,10 +57,6 @@ export namespace Components {
|
|
|
57
57
|
"ticketId": number;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
export interface LotteryTicketControllerCustomEvent<T> extends CustomEvent<T> {
|
|
61
|
-
detail: T;
|
|
62
|
-
target: HTMLLotteryTicketControllerElement;
|
|
63
|
-
}
|
|
64
60
|
declare global {
|
|
65
61
|
interface HTMLLotteryTicketControllerElement extends Components.LotteryTicketController, HTMLStencilElement {
|
|
66
62
|
}
|
|
@@ -106,7 +102,7 @@ declare namespace LocalJSX {
|
|
|
106
102
|
* Number of grids?
|
|
107
103
|
*/
|
|
108
104
|
"numberOfGrids"?: number;
|
|
109
|
-
"onDeleteTicket"?: (event:
|
|
105
|
+
"onDeleteTicket"?: (event: CustomEvent<any>) => void;
|
|
110
106
|
/**
|
|
111
107
|
* Activates postMessages as events for actions from the widget
|
|
112
108
|
*/
|
package/package.json
CHANGED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-498fdd8e.js');
|
|
6
|
-
require('@everymatrix/helper-accordion');
|
|
7
|
-
require('@everymatrix/lottery-ticket');
|
|
8
|
-
|
|
9
|
-
const lotteryTicketControllerCss = ":host{display:block}";
|
|
10
|
-
|
|
11
|
-
const LotteryTicketController = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.deleteTicketEvent = index.createEvent(this, "deleteTicket", 7);
|
|
15
|
-
/**
|
|
16
|
-
* Endpoint URL for the source of data (NorWAy standard)
|
|
17
|
-
*/
|
|
18
|
-
this.endpoint = '';
|
|
19
|
-
/**
|
|
20
|
-
* Ticket number
|
|
21
|
-
*/
|
|
22
|
-
this.ticketId = 1;
|
|
23
|
-
/**
|
|
24
|
-
* Activates postMessages as events for actions from the widget
|
|
25
|
-
*/
|
|
26
|
-
this.postMessage = false;
|
|
27
|
-
/**
|
|
28
|
-
* Name of the event emitter by the action button
|
|
29
|
-
*/
|
|
30
|
-
this.eventName = 'deleteTicketAction';
|
|
31
|
-
/**
|
|
32
|
-
* Collapsed
|
|
33
|
-
*/
|
|
34
|
-
this.collapsed = true;
|
|
35
|
-
/**
|
|
36
|
-
* Number of grids?
|
|
37
|
-
*/
|
|
38
|
-
this.numberOfGrids = 1;
|
|
39
|
-
/**
|
|
40
|
-
* This toggles if the last ticket added should be expanded or not
|
|
41
|
-
*/
|
|
42
|
-
this.last = false;
|
|
43
|
-
/**
|
|
44
|
-
* Language
|
|
45
|
-
*/
|
|
46
|
-
this.language = 'en';
|
|
47
|
-
/**
|
|
48
|
-
* Shows the auto-pick button
|
|
49
|
-
*/
|
|
50
|
-
this.autoPick = false;
|
|
51
|
-
/**
|
|
52
|
-
* Shows the reset button
|
|
53
|
-
*/
|
|
54
|
-
this.resetButton = false;
|
|
55
|
-
}
|
|
56
|
-
// @TODO fix the `any` type
|
|
57
|
-
helperAccordionActionHandler() {
|
|
58
|
-
if (this.postMessage) {
|
|
59
|
-
window.postMessage({ type: this.eventName }, window.location.href);
|
|
60
|
-
}
|
|
61
|
-
this.deleteTicketEvent.emit({
|
|
62
|
-
ticketId: this.ticketId
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
render() {
|
|
66
|
-
return (index.h("div", null, index.h("helper-accordion", { "header-title": 'Ticket ' + this.ticketId, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": true, collapsed: !this.last || this.collapsed, language: this.language }, index.h("div", { slot: "accordionContent" }, index.h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick })))));
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
LotteryTicketController.style = lotteryTicketControllerCss;
|
|
70
|
-
|
|
71
|
-
exports.lottery_ticket_controller = LotteryTicketController;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-4b81518c.js';
|
|
2
|
-
import '@everymatrix/helper-accordion';
|
|
3
|
-
import '@everymatrix/lottery-ticket';
|
|
4
|
-
|
|
5
|
-
const lotteryTicketControllerCss = ":host{display:block}";
|
|
6
|
-
|
|
7
|
-
const LotteryTicketController = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.deleteTicketEvent = createEvent(this, "deleteTicket", 7);
|
|
11
|
-
/**
|
|
12
|
-
* Endpoint URL for the source of data (NorWAy standard)
|
|
13
|
-
*/
|
|
14
|
-
this.endpoint = '';
|
|
15
|
-
/**
|
|
16
|
-
* Ticket number
|
|
17
|
-
*/
|
|
18
|
-
this.ticketId = 1;
|
|
19
|
-
/**
|
|
20
|
-
* Activates postMessages as events for actions from the widget
|
|
21
|
-
*/
|
|
22
|
-
this.postMessage = false;
|
|
23
|
-
/**
|
|
24
|
-
* Name of the event emitter by the action button
|
|
25
|
-
*/
|
|
26
|
-
this.eventName = 'deleteTicketAction';
|
|
27
|
-
/**
|
|
28
|
-
* Collapsed
|
|
29
|
-
*/
|
|
30
|
-
this.collapsed = true;
|
|
31
|
-
/**
|
|
32
|
-
* Number of grids?
|
|
33
|
-
*/
|
|
34
|
-
this.numberOfGrids = 1;
|
|
35
|
-
/**
|
|
36
|
-
* This toggles if the last ticket added should be expanded or not
|
|
37
|
-
*/
|
|
38
|
-
this.last = false;
|
|
39
|
-
/**
|
|
40
|
-
* Language
|
|
41
|
-
*/
|
|
42
|
-
this.language = 'en';
|
|
43
|
-
/**
|
|
44
|
-
* Shows the auto-pick button
|
|
45
|
-
*/
|
|
46
|
-
this.autoPick = false;
|
|
47
|
-
/**
|
|
48
|
-
* Shows the reset button
|
|
49
|
-
*/
|
|
50
|
-
this.resetButton = false;
|
|
51
|
-
}
|
|
52
|
-
// @TODO fix the `any` type
|
|
53
|
-
helperAccordionActionHandler() {
|
|
54
|
-
if (this.postMessage) {
|
|
55
|
-
window.postMessage({ type: this.eventName }, window.location.href);
|
|
56
|
-
}
|
|
57
|
-
this.deleteTicketEvent.emit({
|
|
58
|
-
ticketId: this.ticketId
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
render() {
|
|
62
|
-
return (h("div", null, h("helper-accordion", { "header-title": 'Ticket ' + this.ticketId, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": true, collapsed: !this.last || this.collapsed, language: this.language }, h("div", { slot: "accordionContent" }, h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick })))));
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
LotteryTicketController.style = lotteryTicketControllerCss;
|
|
66
|
-
|
|
67
|
-
export { LotteryTicketController as lottery_ticket_controller };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-fe83d21a.js";import"@everymatrix/helper-accordion";import"@everymatrix/lottery-ticket";const s=class{constructor(e){t(this,e),this.deleteTicketEvent=i(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}render(){return e("div",null,e("helper-accordion",{"header-title":"Ticket "+this.ticketId,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":!0,collapsed:!this.last||this.collapsed,language:this.language},e("div",{slot:"accordionContent"},e("lottery-ticket",{endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick}))))}};s.style=":host{display:block}";export{s as lottery_ticket_controller}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let t,e,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},r=t=>Promise.resolve(t),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(t){}return!1})(),i=(t,e,n)=>{n&&n.map((([n,l,s])=>{const r=t,c=u(e,s),i=a(n);o.ael(r,l,c,i),(e.o=e.o||[]).push((()=>o.rel(r,l,c,i)))}))},u=(t,e)=>n=>{try{256&t.t?t.i[e](n):(t.u=t.u||[]).push([e,n])}catch(t){B(t)}},a=t=>0!=(2&t),f=new WeakMap,h=t=>"sc-"+t.h,$={},d=t=>"object"==(t=typeof t)||"function"===t,y=(t,e,...n)=>{let l=null,s=!1,o=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!d(l))&&(l+=""),s&&o?r[r.length-1].$+=l:r.push(s?m(null,l):l),o=s)};c(n);const i=m(t,null);return i.m=e,r.length>0&&(i.p=r),i},m=(t,e)=>({t:0,S:t,$:e,g:null,p:null,m:null}),p={},b=(t,e,n,l,s,o)=>{if(n!==l){let r=z(t,e);e.toLowerCase();{const c=d(l);if((r||c&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&o||s)&&!c&&t.setAttribute(e,l=!0===l?"":l)}}},w=(t,e,n,l)=>{const s=11===e.g.nodeType&&e.g.host?e.g.host:e.g,o=t&&t.m||$,r=e.m||$;for(l in o)l in r||b(s,l,o[l],void 0,n,e.t);for(l in r)b(s,l,o[l],r[l],n,e.t)},S=(e,n,l)=>{const o=n.p[l];let r,c,i=0;if(r=o.g=s.createElement(o.S),w(null,o,!1),null!=t&&r["s-si"]!==t&&r.classList.add(r["s-si"]=t),o.p)for(i=0;i<o.p.length;++i)c=S(e,o,i),c&&r.appendChild(c);return r},g=(t,n,l,s,o,r)=>{let c,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=S(null,l,o),c&&(s[o].g=c,i.insertBefore(c,n)))},v=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.g.remove()},M=(t,e)=>t.S===e.S,j=(t,e)=>{const n=e.g=t.g,l=t.p,s=e.p;w(t,e,!1),null!==l&&null!==s?((t,e,n,l)=>{let s,o=0,r=0,c=e.length-1,i=e[0],u=e[c],a=l.length-1,f=l[0],h=l[a];for(;o<=c&&r<=a;)null==i?i=e[++o]:null==u?u=e[--c]:null==f?f=l[++r]:null==h?h=l[--a]:M(i,f)?(j(i,f),i=e[++o],f=l[++r]):M(u,h)?(j(u,h),u=e[--c],h=l[--a]):M(i,h)?(j(i,h),t.insertBefore(i.g,u.g.nextSibling),i=e[++o],h=l[--a]):M(u,f)?(j(u,f),t.insertBefore(u.g,i.g),u=e[--c],f=l[++r]):(s=S(e&&e[r],n,r),f=l[++r],s&&i.g.parentNode.insertBefore(s,i.g));o>c?g(t,null==l[a+1]?null:l[a+1].g,n,l,r,a):r>a&&v(e,o,c)})(n,l,e,s):null!==s?g(n,null,e,s,0,s.length-1):null!==l&&v(l,0,l.length-1)},k=(t,e,n)=>{const l=(t=>H(t).v)(t);return{emit:t=>C(l,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},C=(t,e,n)=>{const l=o.ce(e,n);return t.dispatchEvent(l),l},O=(t,e)=>{e&&!t.M&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.M=e)))},P=(t,e)=>{if(t.t|=16,!(4&t.t))return O(t,t.j),tt((()=>x(t,e)));t.t|=512},x=(t,e)=>{const n=t.i;return e&&(t.t|=256,t.u&&(t.u.map((([t,e])=>F(n,t,e))),t.u=null)),L(void 0,(()=>E(t,n,e)))},E=async(t,e,n)=>{const l=t.v,o=l["s-rc"];n&&(t=>{const e=t.k,n=t.v,l=e.t,o=((t,e)=>{let n=h(e);const l=I.get(n);if(t=11===t.nodeType?t:s,l)if("string"==typeof l){let e,o=f.get(t=t.head||t);o||f.set(t,o=new Set),o.has(n)||(e=s.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),o&&o.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);N(t,e),o&&(o.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>T(t);0===e.length?n():(Promise.all(e).then(n),t.t|=4,e.length=0)}},N=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.v,o=n.C||m(null,null),r=(t=>t&&t.S===p)(l)?l:y(null,null,l);e=s.tagName,r.S=null,r.t|=4,n.C=r,r.g=o.g=s.shadowRoot||s,t=s["s-sc"],j(o,r)})(n,l)}catch(t){B(t,n.v)}return null},T=t=>{const e=t.v,n=t.j;64&t.t||(t.t|=64,R(e),t.O(e),n||A()),t.M&&(t.M(),t.M=void 0),512&t.t&&Z((()=>P(t,!1))),t.t&=-517},A=()=>{R(s.documentElement),Z((()=>C(l,"appload",{detail:{namespace:"lottery-ticket-controller"}})))},F=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){B(t)}},L=(t,e)=>t&&t.then?t.then(e):e(),R=t=>t.classList.add("hydrated"),U=(t,e,n)=>{if(e.P){const l=Object.entries(e.P),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>H(this).N.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=H(t),o=s.N.get(e),r=s.t,c=s.i;n=((t,e)=>null==t||d(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.P[e][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.N.set(e,n),c&&2==(18&r)&&P(s,!1))})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;s.attributeChangedCallback=function(t,n,l){o.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},W=(t,e={})=>{const n=[],r=e.exclude||[],u=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),d=[];let y,m=!0;Object.assign(o,e),o.l=new URL(e.resourcesUrl||"./",s.baseURI).href,t.map((t=>{t[1].map((e=>{const l={t:e[0],h:e[1],P:e[2],T:e[3]};l.P=e[2],l.T=e[3];const s=l.h,a=class extends HTMLElement{constructor(t){super(t),_(t=this,l),1&l.t&&t.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),m?d.push(this):o.jmp((()=>(t=>{if(0==(1&o.t)){const e=H(t),n=e.k,l=()=>{};if(1&e.t)i(t,e,n.T);else{e.t|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){O(e,e.j=n);break}}n.P&&Object.entries(n.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.t)){{if(e.t|=32,(s=G(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(U(s,n,2),s.isProxied=!0);const t=()=>{};e.t|=8;try{new s(e)}catch(t){B(t)}e.t&=-9,t()}if(s.style){let t=s.style;const e=h(n);if(!I.has(e)){const l=()=>{};((t,e,n)=>{let l=I.get(t);c&&n?(l=l||new CSSStyleSheet,l.replace(e)):l=e,I.set(t,l)})(e,t,!!(1&n.t)),l()}}}const o=e.j,r=()=>P(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{if(0==(1&o.t)){const t=H(this);t.o&&(t.o.map((t=>t())),t.o=void 0)}})()))}componentOnReady(){return H(this).A}};l.F=t[0],r.includes(s)||u.get(s)||(n.push(s),u.define(s,U(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),m=!1,d.length?d.map((t=>t.connectedCallback())):o.jmp((()=>y=setTimeout(A,30)))},q=new WeakMap,H=t=>q.get(t),V=(t,e)=>q.set(e.i=t,e),_=(t,e)=>{const n={t:0,v:t,k:e,N:new Map};return n.A=new Promise((t=>n.O=t)),t["s-p"]=[],t["s-rc"]=[],i(t,n,e.T),q.set(t,n)},z=(t,e)=>e in t,B=(t,e)=>(0,console.error)(t,e),D=new Map,G=t=>{const e=t.h.replace(/-/g,"_"),n=t.F,l=D.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(D.set(n,t),t[e])),B)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},I=new Map,J=[],K=[],Q=(t,e)=>l=>{t.push(l),n||(n=!0,e&&4&o.t?Z(Y):o.raf(Y))},X=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){B(t)}t.length=0},Y=()=>{X(J),X(K),(n=J.length>0)&&o.raf(Y)},Z=t=>r().then(t),tt=Q(K,!0);export{W as b,k as c,y as h,r as p,V as r}
|