@everymatrix/lottery-ticket-controller 1.52.6 → 1.53.10

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.
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'lottery-ticket-controller';
24
- const BUILD = /* lottery-ticket-controller */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, 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: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* lottery-ticket-controller */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, 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: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
+
35
+ // src/client/client-host-ref.ts
34
36
  var hostRefs = /* @__PURE__ */ new WeakMap();
35
37
  var getHostRef = (ref) => hostRefs.get(ref);
36
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
38
+ var registerInstance = (lazyInstance, hostRef) => {
39
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
40
+ };
37
41
  var registerHost = (hostElement, cmpMeta) => {
38
42
  const hostRef = {
39
43
  $flags$: 0,
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
46
50
  hostElement["s-p"] = [];
47
51
  hostElement["s-rc"] = [];
48
52
  }
49
- return hostRefs.set(hostElement, hostRef);
53
+ const ref = hostRefs.set(hostElement, hostRef);
54
+ return ref;
50
55
  };
51
56
  var isMemberInElement = (elm, memberName) => memberName in elm;
52
57
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
83
88
  /* webpackExclude: /\.system\.entry\.js$/ */
84
89
  /* webpackMode: "lazy" */
85
90
  `./${bundleId}.entry.js${""}`
86
- )); }).then((importedModule) => {
87
- {
88
- cmpModules.set(bundleId, importedModule);
91
+ )); }).then(
92
+ (importedModule) => {
93
+ {
94
+ cmpModules.set(bundleId, importedModule);
95
+ }
96
+ return importedModule[exportName];
97
+ },
98
+ (e) => {
99
+ consoleError(e, hostRef.$hostElement$);
89
100
  }
90
- return importedModule[exportName];
91
- }, consoleError);
101
+ );
92
102
  };
93
103
 
94
104
  // src/client/client-style.ts
95
105
  var styles = /* @__PURE__ */ new Map();
106
+ var HYDRATED_STYLE_ID = "sty-id";
96
107
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
97
108
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
98
109
  var win = typeof window !== "undefined" ? window : {};
@@ -166,12 +177,6 @@ var flush = () => {
166
177
  };
167
178
  var nextTick = (cb) => promiseResolve().then(cb);
168
179
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
169
-
170
- // src/utils/constants.ts
171
- var EMPTY_OBJ = {};
172
-
173
- // src/utils/helpers.ts
174
- var isDef = (v) => v != null;
175
180
  var isComplexType = (o) => {
176
181
  o = typeof o;
177
182
  return o === "object" || o === "function";
@@ -375,7 +380,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
375
380
  }
376
381
  if (!appliedStyles.has(scopeId2)) {
377
382
  {
378
- styleElm = doc.createElement("style");
383
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
379
384
  styleElm.innerHTML = style;
380
385
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
381
386
  if (nonce != null) {
@@ -385,7 +390,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
385
390
  if (styleContainerNode.nodeName === "HEAD") {
386
391
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
387
392
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
388
- styleContainerNode.insertBefore(styleElm, referenceNode2);
393
+ styleContainerNode.insertBefore(
394
+ styleElm,
395
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
396
+ );
389
397
  } else if ("host" in styleContainerNode) {
390
398
  if (supportsConstructableStylesheets) {
391
399
  const stylesheet = new CSSStyleSheet();
@@ -435,16 +443,39 @@ var attachStyles = (hostRef) => {
435
443
  endAttachStyles();
436
444
  };
437
445
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
438
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
446
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
439
447
  if (oldValue !== newValue) {
440
448
  let isProp = isMemberInElement(elm, memberName);
441
449
  let ln = memberName.toLowerCase();
442
450
  if (memberName === "class") {
443
451
  const classList = elm.classList;
444
452
  const oldClasses = parseClassList(oldValue);
445
- const newClasses = parseClassList(newValue);
446
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
447
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
453
+ let newClasses = parseClassList(newValue);
454
+ {
455
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
456
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
457
+ }
458
+ } else if (memberName === "style") {
459
+ {
460
+ for (const prop in oldValue) {
461
+ if (!newValue || newValue[prop] == null) {
462
+ if (prop.includes("-")) {
463
+ elm.style.removeProperty(prop);
464
+ } else {
465
+ elm.style[prop] = "";
466
+ }
467
+ }
468
+ }
469
+ }
470
+ for (const prop in newValue) {
471
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
472
+ if (prop.includes("-")) {
473
+ elm.style.setProperty(prop, newValue[prop]);
474
+ } else {
475
+ elm.style[prop] = newValue[prop];
476
+ }
477
+ }
478
+ }
448
479
  } else if (memberName === "key") ; else if (memberName === "ref") {
449
480
  if (newValue) {
450
481
  newValue(elm);
@@ -482,7 +513,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
482
513
  elm.setAttribute(memberName, n);
483
514
  }
484
515
  }
485
- } else {
516
+ } else if (elm[memberName] !== newValue) {
486
517
  elm[memberName] = newValue;
487
518
  }
488
519
  } catch (e) {
@@ -504,24 +535,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
504
535
  }
505
536
  };
506
537
  var parseClassListRegex = /\s/;
507
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
538
+ var parseClassList = (value) => {
539
+ if (typeof value === "object" && value && "baseVal" in value) {
540
+ value = value.baseVal;
541
+ }
542
+ if (!value || typeof value !== "string") {
543
+ return [];
544
+ }
545
+ return value.split(parseClassListRegex);
546
+ };
508
547
  var CAPTURE_EVENT_SUFFIX = "Capture";
509
548
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
510
549
 
511
550
  // src/runtime/vdom/update-element.ts
512
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
551
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
513
552
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
514
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
515
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
553
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
554
+ const newVnodeAttrs = newVnode.$attrs$ || {};
516
555
  {
517
556
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
518
557
  if (!(memberName in newVnodeAttrs)) {
519
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
558
+ setAccessor(
559
+ elm,
560
+ memberName,
561
+ oldVnodeAttrs[memberName],
562
+ void 0,
563
+ isSvgMode2,
564
+ newVnode.$flags$);
520
565
  }
521
566
  }
522
567
  }
523
568
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
524
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
569
+ setAccessor(
570
+ elm,
571
+ memberName,
572
+ oldVnodeAttrs[memberName],
573
+ newVnodeAttrs[memberName],
574
+ isSvgMode2,
575
+ newVnode.$flags$);
525
576
  }
526
577
  };
527
578
  function sortedAttrNames(attrNames) {
@@ -533,13 +584,10 @@ function sortedAttrNames(attrNames) {
533
584
  attrNames
534
585
  );
535
586
  }
536
-
537
- // src/runtime/vdom/vdom-render.ts
538
- var scopeId;
539
587
  var hostTagName;
540
588
  var useNativeShadowDom = false;
541
589
  var isSvgMode = false;
542
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
590
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
543
591
  const newVNode2 = newParentVNode.$children$[childIndex];
544
592
  let i2 = 0;
545
593
  let elm;
@@ -553,11 +601,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
553
601
  {
554
602
  updateElement(null, newVNode2, isSvgMode);
555
603
  }
556
- const rootNode = elm.getRootNode();
557
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
558
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
559
- elm.classList.add(elm["s-si"] = scopeId);
560
- }
561
604
  if (newVNode2.$children$) {
562
605
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
563
606
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -687,6 +730,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
687
730
  if (!isInitialRender) {
688
731
  return leftVNode.$key$ === rightVNode.$key$;
689
732
  }
733
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
734
+ leftVNode.$key$ = rightVNode.$key$;
735
+ }
690
736
  return true;
691
737
  }
692
738
  return false;
@@ -727,8 +773,9 @@ var nullifyVNodeRefs = (vNode) => {
727
773
  }
728
774
  };
729
775
  var insertBefore = (parent, newNode, reference) => {
730
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
731
- return inserted;
776
+ {
777
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
778
+ }
732
779
  };
733
780
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
734
781
  const hostElm = hostRef.$hostElement$;
@@ -753,9 +800,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
753
800
  rootVnode.$flags$ |= 4 /* isHost */;
754
801
  hostRef.$vnode$ = rootVnode;
755
802
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
756
- {
757
- scopeId = hostElm["s-sc"];
758
- }
759
803
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
760
804
  patch(oldVNode, rootVnode, isInitialLoad);
761
805
  };
@@ -763,7 +807,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
763
807
  // src/runtime/update-component.ts
764
808
  var attachToAncestor = (hostRef, ancestorComponent) => {
765
809
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
766
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
810
+ const index = ancestorComponent["s-p"].push(
811
+ new Promise(
812
+ (r) => hostRef.$onRenderResolve$ = () => {
813
+ ancestorComponent["s-p"].splice(index - 1, 1);
814
+ r();
815
+ }
816
+ )
817
+ );
767
818
  }
768
819
  };
769
820
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -792,7 +843,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
792
843
  {
793
844
  hostRef.$flags$ |= 256 /* isListenReady */;
794
845
  if (hostRef.$queuedListeners$) {
795
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
846
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
796
847
  hostRef.$queuedListeners$ = void 0;
797
848
  }
798
849
  }
@@ -863,7 +914,7 @@ var postUpdateComponent = (hostRef) => {
863
914
  const instance = hostRef.$lazyInstance$ ;
864
915
  const ancestorComponent = hostRef.$ancestorComponent$;
865
916
  {
866
- safeCall(instance, "componentDidRender");
917
+ safeCall(instance, "componentDidRender", void 0, elm);
867
918
  }
868
919
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
869
920
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -897,12 +948,12 @@ var appDidLoad = (who) => {
897
948
  }
898
949
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
899
950
  };
900
- var safeCall = (instance, method, arg) => {
951
+ var safeCall = (instance, method, arg, elm) => {
901
952
  if (instance && instance[method]) {
902
953
  try {
903
954
  return instance[method](arg);
904
955
  } catch (e) {
905
- consoleError(e);
956
+ consoleError(e, elm);
906
957
  }
907
958
  }
908
959
  return void 0;
@@ -961,15 +1012,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
961
1012
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
962
1013
  members.map(([memberName, [memberFlags]]) => {
963
1014
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1015
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1016
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1017
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1018
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1019
+ Object.defineProperty(prototype, memberName, {
1020
+ get() {
1021
+ {
1022
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1023
+ return getValue(this, memberName);
1024
+ }
1025
+ const ref = getHostRef(this);
1026
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1027
+ if (!instance) return;
1028
+ return instance[memberName];
1029
+ }
1030
+ },
1031
+ configurable: true,
1032
+ enumerable: true
1033
+ });
1034
+ }
964
1035
  Object.defineProperty(prototype, memberName, {
965
- get() {
966
- return getValue(this, memberName);
967
- },
968
1036
  set(newValue) {
969
- setValue(this, memberName, newValue, cmpMeta);
970
- },
971
- configurable: true,
972
- enumerable: true
1037
+ const ref = getHostRef(this);
1038
+ if (origSetter) {
1039
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1040
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1041
+ newValue = ref.$instanceValues$.get(memberName);
1042
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1043
+ ref.$instanceValues$.set(memberName, currentValue);
1044
+ }
1045
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1046
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1047
+ setValue(this, memberName, newValue, cmpMeta);
1048
+ return;
1049
+ }
1050
+ {
1051
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1052
+ setValue(this, memberName, newValue, cmpMeta);
1053
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1054
+ ref.$onReadyPromise$.then(() => {
1055
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1056
+ ref.$lazyInstance$[memberName] = newValue;
1057
+ }
1058
+ });
1059
+ }
1060
+ return;
1061
+ }
1062
+ const setterSetVal = () => {
1063
+ const currentValue = ref.$lazyInstance$[memberName];
1064
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1065
+ ref.$instanceValues$.set(memberName, currentValue);
1066
+ }
1067
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1068
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1069
+ };
1070
+ if (ref.$lazyInstance$) {
1071
+ setterSetVal();
1072
+ } else {
1073
+ ref.$onReadyPromise$.then(() => setterSetVal());
1074
+ }
1075
+ }
1076
+ }
973
1077
  });
974
1078
  }
975
1079
  });
@@ -979,7 +1083,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
979
1083
  plt.jmp(() => {
980
1084
  var _a2;
981
1085
  const propName = attrNameToPropName.get(attrName);
982
- if (this.hasOwnProperty(propName)) {
1086
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
983
1087
  newValue = this[propName];
984
1088
  delete this[propName];
985
1089
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -999,7 +1103,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
999
1103
  }
1000
1104
  return;
1001
1105
  }
1002
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1106
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1107
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1108
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1109
+ this[propName] = newValue;
1110
+ }
1003
1111
  });
1004
1112
  };
1005
1113
  Cstr.observedAttributes = Array.from(
@@ -1026,9 +1134,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1026
1134
  let Cstr;
1027
1135
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1028
1136
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1029
- const bundleId = cmpMeta.$lazyBundleId$;
1030
- if (bundleId) {
1031
- const CstrImport = loadModule(cmpMeta);
1137
+ {
1138
+ const CstrImport = loadModule(cmpMeta, hostRef);
1032
1139
  if (CstrImport && "then" in CstrImport) {
1033
1140
  const endLoad = uniqueTime();
1034
1141
  Cstr = await CstrImport;
@@ -1053,7 +1160,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1053
1160
  try {
1054
1161
  new Cstr(hostRef);
1055
1162
  } catch (e) {
1056
- consoleError(e);
1163
+ consoleError(e, elm);
1057
1164
  }
1058
1165
  {
1059
1166
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1062,11 +1169,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1062
1169
  hostRef.$flags$ |= 128 /* isWatchReady */;
1063
1170
  }
1064
1171
  endNewInstance();
1065
- fireConnectedCallback(hostRef.$lazyInstance$);
1066
- } else {
1067
- Cstr = elm.constructor;
1068
- const cmpTag = elm.localName;
1069
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1172
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1070
1173
  }
1071
1174
  if (Cstr && Cstr.style) {
1072
1175
  let style;
@@ -1089,9 +1192,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1089
1192
  schedule();
1090
1193
  }
1091
1194
  };
1092
- var fireConnectedCallback = (instance) => {
1195
+ var fireConnectedCallback = (instance, elm) => {
1093
1196
  {
1094
- safeCall(instance, "connectedCallback");
1197
+ safeCall(instance, "connectedCallback", void 0, elm);
1095
1198
  }
1096
1199
  };
1097
1200
 
@@ -1127,15 +1230,15 @@ var connectedCallback = (elm) => {
1127
1230
  } else {
1128
1231
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1129
1232
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1130
- fireConnectedCallback(hostRef.$lazyInstance$);
1233
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1131
1234
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1132
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1235
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1133
1236
  }
1134
1237
  }
1135
1238
  endConnected();
1136
1239
  }
1137
1240
  };
1138
- var disconnectInstance = (instance) => {
1241
+ var disconnectInstance = (instance, elm) => {
1139
1242
  };
1140
1243
  var disconnectedCallback = async (elm) => {
1141
1244
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1150,6 +1253,12 @@ var disconnectedCallback = async (elm) => {
1150
1253
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1151
1254
  }
1152
1255
  }
1256
+ if (rootAppliedStyles.has(elm)) {
1257
+ rootAppliedStyles.delete(elm);
1258
+ }
1259
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1260
+ rootAppliedStyles.delete(elm.shadowRoot);
1261
+ }
1153
1262
  };
1154
1263
 
1155
1264
  // src/runtime/bootstrap-lazy.ts
@@ -1234,6 +1343,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1234
1343
  }
1235
1344
  disconnectedCallback() {
1236
1345
  plt.jmp(() => disconnectedCallback(this));
1346
+ plt.raf(() => {
1347
+ var _a3;
1348
+ const hostRef = getHostRef(this);
1349
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1350
+ delete hostRef.$vnode$.$elm$;
1351
+ }
1352
+ });
1237
1353
  }
1238
1354
  componentOnReady() {
1239
1355
  return getHostRef(this).$onReadyPromise$;
@@ -1297,7 +1413,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1297
1413
  }
1298
1414
  }
1299
1415
  } catch (e) {
1300
- consoleError(e);
1416
+ consoleError(e, hostRef.$hostElement$);
1301
1417
  }
1302
1418
  };
1303
1419
  var getHostListenerTarget = (elm, flags) => {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-79c2688a.js');
5
+ const index = require('./index-805691f2.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["helper-accordion_5.cjs",[[1,"lottery-ticket-controller",{"endpoint":[513],"ticketId":[514,"ticket-id"],"ticketDescription":[513,"ticket-description"],"gameId":[513,"game-id"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"numberOfGrids":[514,"number-of-grids"],"last":[516],"language":[513],"autoPick":[516,"auto-pick"],"resetButton":[516,"reset-button"],"totalControllers":[514,"total-controllers"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[513],"gameId":[513,"game-id"],"numberOfGrids":[514,"number-of-grids"],"multipleDraws":[516,"multiple-draws"],"ticketId":[514,"ticket-id"],"resetButton":[516,"reset-button"],"autoPick":[516,"auto-pick"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]],{"numberOfDraws":["drawsChangeHandler"]}],[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
11
+ return index.bootstrapLazy([["helper-accordion_5.cjs",[[1,"lottery-ticket-controller",{"endpoint":[513],"ticketId":[514,"ticket-id"],"ticketDescription":[513,"ticket-description"],"gameId":[513,"game-id"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"numberOfGrids":[514,"number-of-grids"],"last":[516],"language":[513],"autoPick":[516,"auto-pick"],"resetButton":[516,"reset-button"],"totalControllers":[514,"total-controllers"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[513],"gameId":[513,"game-id"],"numberOfGrids":[514,"number-of-grids"],"multipleDraws":[516,"multiple-draws"],"ticketId":[514,"ticket-id"],"resetButton":[516,"reset-button"],"autoPick":[516,"auto-pick"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32],"stakeMultiplier":[32],"lineMultiplier":[32],"isCustomSelectStake":[32],"isCustomSelectDraw":[32],"isCustomSelectLine":[32],"drawMultiplier":[32],"secondarySelectionAllowed":[32],"partialQuickpickAvailable":[32],"boardsAllowed":[32],"tabIndex":[32],"groupType":[32],"playType":[32],"selectedPlayTypeId":[32],"maximumAllowed":[32],"numberRange":[32],"secondaryNumberRange":[32],"secondaryMaximumAllowed":[32],"minimumAllowed":[32],"secondaryMinimumAllowed":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"],[0,"gridClearAllEvent","handleGridClearAllEvent"]],{"lineMultiplier":["handleLineMultiplierChange"],"tabIndex":["handleTabIndexChange"]}],[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"numberRange":[513,"number-range"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"secondaryNumbers":[513,"secondary-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"highNumber":[514,"high-number"],"lowNumber":[514,"low-number"],"selectionType":[513,"selection-type"],"partialQuickpickAvailable":[516,"partial-quickpick-available"],"numbers":[32],"bonusNumbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"isBonus":[516,"is-bonus"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-79c2688a.js');
5
+ const index = require('./index-805691f2.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('lottery-ticket-controller.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["helper-accordion_5.cjs",[[1,"lottery-ticket-controller",{"endpoint":[513],"ticketId":[514,"ticket-id"],"ticketDescription":[513,"ticket-description"],"gameId":[513,"game-id"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"numberOfGrids":[514,"number-of-grids"],"last":[516],"language":[513],"autoPick":[516,"auto-pick"],"resetButton":[516,"reset-button"],"totalControllers":[514,"total-controllers"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[513],"gameId":[513,"game-id"],"numberOfGrids":[514,"number-of-grids"],"multipleDraws":[516,"multiple-draws"],"ticketId":[514,"ticket-id"],"resetButton":[516,"reset-button"],"autoPick":[516,"auto-pick"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]],{"numberOfDraws":["drawsChangeHandler"]}],[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
22
+ return index.bootstrapLazy([["helper-accordion_5.cjs",[[1,"lottery-ticket-controller",{"endpoint":[513],"ticketId":[514,"ticket-id"],"ticketDescription":[513,"ticket-description"],"gameId":[513,"game-id"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"numberOfGrids":[514,"number-of-grids"],"last":[516],"language":[513],"autoPick":[516,"auto-pick"],"resetButton":[516,"reset-button"],"totalControllers":[514,"total-controllers"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[1,"lottery-ticket",{"endpoint":[513],"gameId":[513,"game-id"],"numberOfGrids":[514,"number-of-grids"],"multipleDraws":[516,"multiple-draws"],"ticketId":[514,"ticket-id"],"resetButton":[516,"reset-button"],"autoPick":[516,"auto-pick"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32],"stakeMultiplier":[32],"lineMultiplier":[32],"isCustomSelectStake":[32],"isCustomSelectDraw":[32],"isCustomSelectLine":[32],"drawMultiplier":[32],"secondarySelectionAllowed":[32],"partialQuickpickAvailable":[32],"boardsAllowed":[32],"tabIndex":[32],"groupType":[32],"playType":[32],"selectedPlayTypeId":[32],"maximumAllowed":[32],"numberRange":[32],"secondaryNumberRange":[32],"secondaryMaximumAllowed":[32],"minimumAllowed":[32],"secondaryMinimumAllowed":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"],[0,"gridClearAllEvent","handleGridClearAllEvent"]],{"lineMultiplier":["handleLineMultiplierChange"],"tabIndex":["handleTabIndexChange"]}],[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"numberRange":[513,"number-range"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"secondaryNumbers":[513,"secondary-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"highNumber":[514,"high-number"],"lowNumber":[514,"low-number"],"selectionType":[513,"selection-type"],"partialQuickpickAvailable":[516,"partial-quickpick-available"],"numbers":[32],"bonusNumbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"isBonus":[516,"is-bonus"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.22.3",
7
+ "version": "4.25.1",
8
8
  "typescriptVersion": "5.5.4"
9
9
  },
10
10
  "collections": [