@everymatrix/casino-tournament-duration 1.55.0 → 1.56.0

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 (24) hide show
  1. package/dist/casino-tournament-duration/casino-tournament-duration.esm.js +1 -1
  2. package/dist/casino-tournament-duration/p-201e69cb.entry.js +1 -0
  3. package/dist/casino-tournament-duration/p-bd114f3e.js +2 -0
  4. package/dist/cjs/casino-tournament-duration.cjs.entry.js +7 -10
  5. package/dist/cjs/casino-tournament-duration.cjs.js +2 -2
  6. package/dist/cjs/{index-00365530.js → index-03d730d9.js} +167 -66
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/components/casino-tournament-duration/casino-tournament-duration.js +20 -9
  10. package/dist/esm/casino-tournament-duration.entry.js +7 -10
  11. package/dist/esm/casino-tournament-duration.js +3 -3
  12. package/dist/esm/{index-bc0a3067.js → index-570a45b6.js} +167 -66
  13. package/dist/esm/loader.js +2 -2
  14. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/packages/stencil/casino-tournament-duration/stencil.config.d.ts +2 -0
  15. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/packages/stencil/casino-tournament-duration/stencil.config.dev.d.ts +2 -0
  16. package/package.json +1 -1
  17. package/dist/casino-tournament-duration/p-a0f351f6.entry.js +0 -1
  18. package/dist/casino-tournament-duration/p-dfd4b2cb.js +0 -2
  19. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/packages/stencil/casino-tournament-duration/stencil.config.d.ts +0 -2
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/packages/stencil/casino-tournament-duration/stencil.config.dev.d.ts +0 -2
  21. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/tools/plugins/index.d.ts +0 -0
  22. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  23. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  24. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-tournament-duration/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -2,18 +2,15 @@ import { h } from "@stencil/core";
2
2
  import { translate, getTranslations } from "../../utils/locale.utils";
3
3
  export class CasinoTournamentDuration {
4
4
  constructor() {
5
- this.startTime = undefined;
6
- this.endTime = undefined;
7
- this.status = undefined;
8
- this.language = undefined;
5
+ /**
6
+ * Client custom styling via inline styles
7
+ */
9
8
  this.clientStyling = '';
9
+ /**
10
+ * Client custom styling via url
11
+ */
10
12
  this.clientStylingUrl = '';
11
- this.translationData = undefined;
12
- this.tournamentUntilStartDays = undefined;
13
- this.tournamentLeftDays = undefined;
14
- this.showRemain = undefined;
15
13
  this.limitStylingAppends = false;
16
- this.durationInterval = undefined;
17
14
  }
18
15
  watchLanguage(newValue, oldValue) {
19
16
  if (newValue && newValue != oldValue) {
@@ -148,6 +145,8 @@ export class CasinoTournamentDuration {
148
145
  "tags": [],
149
146
  "text": "Tournament start time"
150
147
  },
148
+ "getter": false,
149
+ "setter": false,
151
150
  "attribute": "start-time",
152
151
  "reflect": false
153
152
  },
@@ -165,6 +164,8 @@ export class CasinoTournamentDuration {
165
164
  "tags": [],
166
165
  "text": "Tournament end time"
167
166
  },
167
+ "getter": false,
168
+ "setter": false,
168
169
  "attribute": "end-time",
169
170
  "reflect": false
170
171
  },
@@ -182,6 +183,8 @@ export class CasinoTournamentDuration {
182
183
  "tags": [],
183
184
  "text": "Tournament status"
184
185
  },
186
+ "getter": false,
187
+ "setter": false,
185
188
  "attribute": "status",
186
189
  "reflect": false
187
190
  },
@@ -199,6 +202,8 @@ export class CasinoTournamentDuration {
199
202
  "tags": [],
200
203
  "text": "Widget language to show"
201
204
  },
205
+ "getter": false,
206
+ "setter": false,
202
207
  "attribute": "language",
203
208
  "reflect": false
204
209
  },
@@ -216,6 +221,8 @@ export class CasinoTournamentDuration {
216
221
  "tags": [],
217
222
  "text": "Client custom styling via inline styles"
218
223
  },
224
+ "getter": false,
225
+ "setter": false,
219
226
  "attribute": "client-styling",
220
227
  "reflect": false,
221
228
  "defaultValue": "''"
@@ -234,6 +241,8 @@ export class CasinoTournamentDuration {
234
241
  "tags": [],
235
242
  "text": "Client custom styling via url"
236
243
  },
244
+ "getter": false,
245
+ "setter": false,
237
246
  "attribute": "client-styling-url",
238
247
  "reflect": false,
239
248
  "defaultValue": "''"
@@ -252,6 +261,8 @@ export class CasinoTournamentDuration {
252
261
  "tags": [],
253
262
  "text": "Translations via parent component"
254
263
  },
264
+ "getter": false,
265
+ "setter": false,
255
266
  "attribute": "translation-data",
256
267
  "reflect": true
257
268
  }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, g as getElement } from './index-bc0a3067.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-570a45b6.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
@@ -102,18 +102,15 @@ const CasinoTournamentDurationStyle0 = casinoTournamentDurationCss;
102
102
  const CasinoTournamentDuration = class {
103
103
  constructor(hostRef) {
104
104
  registerInstance(this, hostRef);
105
- this.startTime = undefined;
106
- this.endTime = undefined;
107
- this.status = undefined;
108
- this.language = undefined;
105
+ /**
106
+ * Client custom styling via inline styles
107
+ */
109
108
  this.clientStyling = '';
109
+ /**
110
+ * Client custom styling via url
111
+ */
110
112
  this.clientStylingUrl = '';
111
- this.translationData = undefined;
112
- this.tournamentUntilStartDays = undefined;
113
- this.tournamentLeftDays = undefined;
114
- this.showRemain = undefined;
115
113
  this.limitStylingAppends = false;
116
- this.durationInterval = undefined;
117
114
  }
118
115
  watchLanguage(newValue, oldValue) {
119
116
  if (newValue && newValue != oldValue) {
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-bc0a3067.js';
2
- export { s as setNonce } from './index-bc0a3067.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-570a45b6.js';
2
+ export { s as setNonce } from './index-570a45b6.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -1,17 +1,21 @@
1
1
  const NAMESPACE = 'casino-tournament-duration';
2
- const BUILD = /* casino-tournament-duration */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* casino-tournament-duration */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
+
13
+ // src/client/client-host-ref.ts
12
14
  var hostRefs = /* @__PURE__ */ new WeakMap();
13
15
  var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
16
+ var registerInstance = (lazyInstance, hostRef) => {
17
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
18
+ };
15
19
  var registerHost = (hostElement, cmpMeta) => {
16
20
  const hostRef = {
17
21
  $flags$: 0,
@@ -24,7 +28,8 @@ var registerHost = (hostElement, cmpMeta) => {
24
28
  hostElement["s-p"] = [];
25
29
  hostElement["s-rc"] = [];
26
30
  }
27
- return hostRefs.set(hostElement, hostRef);
31
+ const ref = hostRefs.set(hostElement, hostRef);
32
+ return ref;
28
33
  };
29
34
  var isMemberInElement = (elm, memberName) => memberName in elm;
30
35
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -61,16 +66,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
61
66
  /* webpackExclude: /\.system\.entry\.js$/ */
62
67
  /* webpackMode: "lazy" */
63
68
  `./${bundleId}.entry.js${""}`
64
- ).then((importedModule) => {
65
- {
66
- cmpModules.set(bundleId, importedModule);
69
+ ).then(
70
+ (importedModule) => {
71
+ {
72
+ cmpModules.set(bundleId, importedModule);
73
+ }
74
+ return importedModule[exportName];
75
+ },
76
+ (e) => {
77
+ consoleError(e, hostRef.$hostElement$);
67
78
  }
68
- return importedModule[exportName];
69
- }, consoleError);
79
+ );
70
80
  };
71
81
 
72
82
  // src/client/client-style.ts
73
83
  var styles = /* @__PURE__ */ new Map();
84
+ var HYDRATED_STYLE_ID = "sty-id";
74
85
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
75
86
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
76
87
  var win = typeof window !== "undefined" ? window : {};
@@ -128,12 +139,6 @@ var flush = () => {
128
139
  };
129
140
  var nextTick = (cb) => promiseResolve().then(cb);
130
141
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
131
-
132
- // src/utils/constants.ts
133
- var EMPTY_OBJ = {};
134
-
135
- // src/utils/helpers.ts
136
- var isDef = (v) => v != null;
137
142
  var isComplexType = (o) => {
138
143
  o = typeof o;
139
144
  return o === "object" || o === "function";
@@ -316,7 +321,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
316
321
  }
317
322
  if (!appliedStyles.has(scopeId2)) {
318
323
  {
319
- styleElm = doc.createElement("style");
324
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
320
325
  styleElm.innerHTML = style;
321
326
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
322
327
  if (nonce != null) {
@@ -326,7 +331,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
326
331
  if (styleContainerNode.nodeName === "HEAD") {
327
332
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
328
333
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
329
- styleContainerNode.insertBefore(styleElm, referenceNode2);
334
+ styleContainerNode.insertBefore(
335
+ styleElm,
336
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
337
+ );
330
338
  } else if ("host" in styleContainerNode) {
331
339
  if (supportsConstructableStylesheets) {
332
340
  const stylesheet = new CSSStyleSheet();
@@ -344,7 +352,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
344
352
  styleContainerNode.append(styleElm);
345
353
  }
346
354
  }
347
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
355
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
348
356
  styleContainerNode.insertBefore(styleElm, null);
349
357
  }
350
358
  }
@@ -369,23 +377,25 @@ var attachStyles = (hostRef) => {
369
377
  const scopeId2 = addStyle(
370
378
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
371
379
  cmpMeta);
372
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
380
+ if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
373
381
  elm["s-sc"] = scopeId2;
374
382
  elm.classList.add(scopeId2 + "-h");
375
383
  }
376
384
  endAttachStyles();
377
385
  };
378
386
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
379
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
387
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
380
388
  if (oldValue !== newValue) {
381
389
  let isProp = isMemberInElement(elm, memberName);
382
390
  memberName.toLowerCase();
383
391
  if (memberName === "class") {
384
392
  const classList = elm.classList;
385
393
  const oldClasses = parseClassList(oldValue);
386
- const newClasses = parseClassList(newValue);
387
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
388
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
394
+ let newClasses = parseClassList(newValue);
395
+ {
396
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
397
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
398
+ }
389
399
  } else if (memberName === "style") {
390
400
  {
391
401
  for (const prop in oldValue) {
@@ -422,7 +432,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
422
432
  elm.setAttribute(memberName, n);
423
433
  }
424
434
  }
425
- } else {
435
+ } else if (elm[memberName] !== newValue) {
426
436
  elm[memberName] = newValue;
427
437
  }
428
438
  } catch (e) {
@@ -444,22 +454,42 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
444
454
  }
445
455
  };
446
456
  var parseClassListRegex = /\s/;
447
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
457
+ var parseClassList = (value) => {
458
+ if (typeof value === "object" && value && "baseVal" in value) {
459
+ value = value.baseVal;
460
+ }
461
+ if (!value || typeof value !== "string") {
462
+ return [];
463
+ }
464
+ return value.split(parseClassListRegex);
465
+ };
448
466
 
449
467
  // src/runtime/vdom/update-element.ts
450
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
468
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
451
469
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
452
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
453
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
470
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
471
+ const newVnodeAttrs = newVnode.$attrs$ || {};
454
472
  {
455
473
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
456
474
  if (!(memberName in newVnodeAttrs)) {
457
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
475
+ setAccessor(
476
+ elm,
477
+ memberName,
478
+ oldVnodeAttrs[memberName],
479
+ void 0,
480
+ isSvgMode2,
481
+ newVnode.$flags$);
458
482
  }
459
483
  }
460
484
  }
461
485
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
462
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
486
+ setAccessor(
487
+ elm,
488
+ memberName,
489
+ oldVnodeAttrs[memberName],
490
+ newVnodeAttrs[memberName],
491
+ isSvgMode2,
492
+ newVnode.$flags$);
463
493
  }
464
494
  };
465
495
  function sortedAttrNames(attrNames) {
@@ -471,13 +501,10 @@ function sortedAttrNames(attrNames) {
471
501
  attrNames
472
502
  );
473
503
  }
474
-
475
- // src/runtime/vdom/vdom-render.ts
476
- var scopeId;
477
504
  var hostTagName;
478
505
  var useNativeShadowDom = false;
479
506
  var isSvgMode = false;
480
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
507
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
481
508
  const newVNode2 = newParentVNode.$children$[childIndex];
482
509
  let i2 = 0;
483
510
  let elm;
@@ -491,11 +518,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
491
518
  {
492
519
  updateElement(null, newVNode2, isSvgMode);
493
520
  }
494
- const rootNode = elm.getRootNode();
495
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
496
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
497
- elm.classList.add(elm["s-si"] = scopeId);
498
- }
499
521
  if (newVNode2.$children$) {
500
522
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
501
523
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -624,6 +646,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
624
646
  if (!isInitialRender) {
625
647
  return leftVNode.$key$ === rightVNode.$key$;
626
648
  }
649
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
650
+ leftVNode.$key$ = rightVNode.$key$;
651
+ }
627
652
  return true;
628
653
  }
629
654
  return false;
@@ -657,8 +682,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
657
682
  }
658
683
  };
659
684
  var insertBefore = (parent, newNode, reference) => {
660
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
661
- return inserted;
685
+ {
686
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
687
+ }
662
688
  };
663
689
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
664
690
  const hostElm = hostRef.$hostElement$;
@@ -683,17 +709,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
683
709
  rootVnode.$flags$ |= 4 /* isHost */;
684
710
  hostRef.$vnode$ = rootVnode;
685
711
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
686
- {
687
- scopeId = hostElm["s-sc"];
688
- }
689
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
712
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
690
713
  patch(oldVNode, rootVnode, isInitialLoad);
691
714
  };
692
715
 
693
716
  // src/runtime/update-component.ts
694
717
  var attachToAncestor = (hostRef, ancestorComponent) => {
695
718
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
696
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
719
+ const index = ancestorComponent["s-p"].push(
720
+ new Promise(
721
+ (r) => hostRef.$onRenderResolve$ = () => {
722
+ ancestorComponent["s-p"].splice(index - 1, 1);
723
+ r();
724
+ }
725
+ )
726
+ );
697
727
  }
698
728
  };
699
729
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -720,7 +750,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
720
750
  let maybePromise;
721
751
  if (isInitialLoad) {
722
752
  {
723
- maybePromise = safeCall(instance, "componentWillLoad");
753
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
724
754
  }
725
755
  }
726
756
  endSchedule();
@@ -789,7 +819,7 @@ var postUpdateComponent = (hostRef) => {
789
819
  const instance = hostRef.$lazyInstance$ ;
790
820
  const ancestorComponent = hostRef.$ancestorComponent$;
791
821
  {
792
- safeCall(instance, "componentDidRender");
822
+ safeCall(instance, "componentDidRender", void 0, elm);
793
823
  }
794
824
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
795
825
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -818,17 +848,14 @@ var postUpdateComponent = (hostRef) => {
818
848
  }
819
849
  };
820
850
  var appDidLoad = (who) => {
821
- {
822
- addHydratedFlag(doc.documentElement);
823
- }
824
851
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
825
852
  };
826
- var safeCall = (instance, method, arg) => {
853
+ var safeCall = (instance, method, arg, elm) => {
827
854
  if (instance && instance[method]) {
828
855
  try {
829
856
  return instance[method](arg);
830
857
  } catch (e) {
831
- consoleError(e);
858
+ consoleError(e, elm);
832
859
  }
833
860
  }
834
861
  return void 0;
@@ -887,15 +914,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
887
914
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
888
915
  members.map(([memberName, [memberFlags]]) => {
889
916
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
917
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
918
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
919
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
920
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
921
+ Object.defineProperty(prototype, memberName, {
922
+ get() {
923
+ {
924
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
925
+ return getValue(this, memberName);
926
+ }
927
+ const ref = getHostRef(this);
928
+ const instance = ref ? ref.$lazyInstance$ : prototype;
929
+ if (!instance) return;
930
+ return instance[memberName];
931
+ }
932
+ },
933
+ configurable: true,
934
+ enumerable: true
935
+ });
936
+ }
890
937
  Object.defineProperty(prototype, memberName, {
891
- get() {
892
- return getValue(this, memberName);
893
- },
894
938
  set(newValue) {
895
- setValue(this, memberName, newValue, cmpMeta);
896
- },
897
- configurable: true,
898
- enumerable: true
939
+ const ref = getHostRef(this);
940
+ if (origSetter) {
941
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
942
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
943
+ newValue = ref.$instanceValues$.get(memberName);
944
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
945
+ ref.$instanceValues$.set(memberName, currentValue);
946
+ }
947
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
948
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
949
+ setValue(this, memberName, newValue, cmpMeta);
950
+ return;
951
+ }
952
+ {
953
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
954
+ setValue(this, memberName, newValue, cmpMeta);
955
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
956
+ ref.$onReadyPromise$.then(() => {
957
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
958
+ ref.$lazyInstance$[memberName] = newValue;
959
+ }
960
+ });
961
+ }
962
+ return;
963
+ }
964
+ const setterSetVal = () => {
965
+ const currentValue = ref.$lazyInstance$[memberName];
966
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
967
+ ref.$instanceValues$.set(memberName, currentValue);
968
+ }
969
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
970
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
971
+ };
972
+ if (ref.$lazyInstance$) {
973
+ setterSetVal();
974
+ } else {
975
+ ref.$onReadyPromise$.then(() => setterSetVal());
976
+ }
977
+ }
978
+ }
899
979
  });
900
980
  }
901
981
  });
@@ -905,7 +985,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
905
985
  plt.jmp(() => {
906
986
  var _a2;
907
987
  const propName = attrNameToPropName.get(attrName);
908
- if (this.hasOwnProperty(propName)) {
988
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
909
989
  newValue = this[propName];
910
990
  delete this[propName];
911
991
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -925,7 +1005,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
925
1005
  }
926
1006
  return;
927
1007
  }
928
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1008
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1009
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1010
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1011
+ this[propName] = newValue;
1012
+ }
929
1013
  });
930
1014
  };
931
1015
  Cstr.observedAttributes = Array.from(
@@ -954,7 +1038,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
954
1038
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
955
1039
  const bundleId = cmpMeta.$lazyBundleId$;
956
1040
  if (bundleId) {
957
- const CstrImport = loadModule(cmpMeta);
1041
+ const CstrImport = loadModule(cmpMeta, hostRef);
958
1042
  if (CstrImport && "then" in CstrImport) {
959
1043
  const endLoad = uniqueTime();
960
1044
  Cstr = await CstrImport;
@@ -979,7 +1063,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
979
1063
  try {
980
1064
  new Cstr(hostRef);
981
1065
  } catch (e) {
982
- consoleError(e);
1066
+ consoleError(e, elm);
983
1067
  }
984
1068
  {
985
1069
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1014,7 +1098,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1014
1098
  schedule();
1015
1099
  }
1016
1100
  };
1017
- var fireConnectedCallback = (instance) => {
1101
+ var fireConnectedCallback = (instance, elm) => {
1018
1102
  };
1019
1103
 
1020
1104
  // src/runtime/connected-callback.ts
@@ -1054,7 +1138,7 @@ var connectedCallback = (elm) => {
1054
1138
  endConnected();
1055
1139
  }
1056
1140
  };
1057
- var disconnectInstance = (instance) => {
1141
+ var disconnectInstance = (instance, elm) => {
1058
1142
  };
1059
1143
  var disconnectedCallback = async (elm) => {
1060
1144
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1063,6 +1147,12 @@ var disconnectedCallback = async (elm) => {
1063
1147
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1064
1148
  }
1065
1149
  }
1150
+ if (rootAppliedStyles.has(elm)) {
1151
+ rootAppliedStyles.delete(elm);
1152
+ }
1153
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1154
+ rootAppliedStyles.delete(elm.shadowRoot);
1155
+ }
1066
1156
  };
1067
1157
 
1068
1158
  // src/runtime/bootstrap-lazy.ts
@@ -1143,6 +1233,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1143
1233
  }
1144
1234
  disconnectedCallback() {
1145
1235
  plt.jmp(() => disconnectedCallback(this));
1236
+ plt.raf(() => {
1237
+ var _a3;
1238
+ const hostRef = getHostRef(this);
1239
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1240
+ if (i2 > -1) {
1241
+ deferredConnectedCallbacks.splice(i2, 1);
1242
+ }
1243
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1244
+ delete hostRef.$vnode$.$elm$;
1245
+ }
1246
+ });
1146
1247
  }
1147
1248
  componentOnReady() {
1148
1249
  return getHostRef(this).$onReadyPromise$;
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-bc0a3067.js';
2
- export { s as setNonce } from './index-bc0a3067.js';
1
+ import { b as bootstrapLazy } from './index-570a45b6.js';
2
+ export { s as setNonce } from './index-570a45b6.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-tournament-duration",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as s}from"./p-dfd4b2cb.js";const e={en:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"},hr:{finished:"Gotovo",starting:"Počinje u ",left:"lijevo",minutes:"minute",hours:"sati",days:"dani"},"zh-hk":{finished:"完成的",starting:"開始於",left:"剩下",minutes:"分鐘",hours:"小時",days:"天"},fr:{finished:"Fini",starting:"Début dans ",left:"restant",minutes:"minutes",hours:"heures",days:"jours"},ro:{finished:"Finalizat",starting:"Începe în",left:"rămase",minutes:"minute",hours:"ore",days:"zile"},tr:{finished:"Sona ermiş",starting:"Başlamasına ",left:"kaldı",minutes:"dakika",hours:"saat",days:"gün"},el:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",left:"απομένουν",minutes:"λεπτά",hours:"ώρες",days:"ημέρες"},es:{finished:"Finalizado",starting:"Iniciando en ",left:"izquierda",minutes:"minutos",hours:"horas",days:"días"},hu:{finished:"Befejezve",starting:"Kezdésig",left:"bal",minutes:"perc",hours:"óra",days:"nap"},pt:{finished:"Finalizado",starting:"Começando em",left:"Abandonou",minutes:"Minutos",hours:"Horas",days:"Dias"}},a=(t,i)=>{var s,a;return(null===(s=e[i])||void 0===s?void 0:s[t])||(null===(a=e.en)||void 0===a?void 0:a[t])},r=class{constructor(i){t(this,i),this.startTime=void 0,this.endTime=void 0,this.status=void 0,this.language=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationData=void 0,this.tournamentUntilStartDays=void 0,this.tournamentLeftDays=void 0,this.showRemain=void 0,this.limitStylingAppends=!1,this.durationInterval=void 0}watchLanguage(t,i){t&&t!=i&&this.getDuration()}getDateTimeDiff(t,i){return(new Date(i).getTime()-new Date(t).getTime())/6e4}getDuration(){const t=new Date;this.tournamentLeftDays=this.getDateTimeDiff(t,this.endTime),this.tournamentUntilStartDays=this.getDateTimeDiff(t,this.startTime),this.showRemain=this.getTextByDiff(this.tournamentLeftDays)}formatDate(t){let i=new Date(t),s=new Intl.DateTimeFormat(this.language,{month:"long"}).format(i);return`${i.getDate()} ${s}, ${i.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${i.getUTCFullYear()}`}getTextByDiff(t){if(t<1440){const i=t%60;return[t/60,i,60*(i-Math.floor(i))].map((t=>(t=>{const i=Math.floor(t);return i<10?`0${i}`:`${i}`})(t))).join(":")}return(t=>t+" "+a("days",this.language))(Math.ceil(t/1440))}getProgress(){if(this.tournamentLeftDays<=0)return 100;const t=this.getDateTimeDiff(this.startTime,this.endTime);return Math.floor(100/t*(t-this.tournamentLeftDays))}componentWillLoad(){var t;this.translationData&&(t=JSON.parse(this.translationData),Object.keys(t).forEach((i=>{for(let s in t[i])e[i][s]=t[i][s]}))),this.startTime&&this.endTime&&(this.getDuration(),this.getTextByDiff(this.tournamentLeftDays)),this.tournamentLeftDays<1440&&this.tournamentLeftDays>0?this.durationInterval=window.setInterval((()=>{this.startTime&&this.endTime&&this.getDuration()}),1e3):clearInterval(this.durationInterval)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){const t=new CSSStyleSheet;t.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}setClientStylingURL(){let t=new URL(this.clientStylingUrl);fetch(t.href).then((t=>t.text())).then((t=>{const i=new CSSStyleSheet;i.replace(t),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,i]}))}render(){if(this.startTime&&this.endTime)return i("div",{key:"d0051545a243161e89e126fd26b9ea9d2e09f8ab",class:"TournamentDurationWrap"},i("div",{key:"b585f0137268f0185dfd15e563a0075bfe617d5b",class:"TournamentDuration"},i("div",{key:"9cc3670780d9f8c40b77ac978cdadb0e0afdcacb",class:"TournamentDates"},i("div",{key:"85e4f3b1de4f36efd8d13b090f8f9013976d8685",class:"StartDate",part:"StartDate"},this.formatDate(this.startTime)),i("div",{key:"688a84ce16a4d26359637b80837a9c5f50fc24c3",class:"EndDate",part:"EndDate"},this.formatDate(this.endTime))),i("div",{key:"149c0431ac2d8f9b5058a2a269b50e01d23ed26f",class:"ProgressBarWrapper"},i("div",{key:"85523f37f511f9184260f8575ec08e914f535858",class:"ProgressBar",part:"ProgressBar"},"Finished"==this.status||"Closing"==this.status||"Closed"==this.status?i("div",null,i("div",{class:"ProgressBarFillEnd",part:"ProgressBarFillEnd"}),i("div",{class:"Finished",part:"Finished"},a("finished",this.language))):this.tournamentUntilStartDays>0?i("div",null,i("div",{class:"ProgressBarFillStarting",part:"ProgressBarFillStarting"}),i("div",{class:"Remaining",part:"Remaining"},a("starting",this.language)," ",this.getTextByDiff(this.tournamentUntilStartDays))):i("div",null,i("div",{class:"ProgressBarFill",part:"ProgressBarFill",style:{width:`${this.getProgress()}%`}}),this.tournamentLeftDays>0&&i("div",{class:"Remaining",part:"Remaining"},this.showRemain," ",a("left",this.language)))))))}get host(){return s(this)}static get watchers(){return{language:["watchLanguage"]}}};r.style=":host{display:block}.TournamentDates{display:flex;justify-content:space-between}.StartDate{font-size:10px;font-weight:700;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:10px;font-weight:700;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 0;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;font-weight:700;padding-top:6px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}";export{r as casino_tournament_duration}