@everymatrix/temporary-consents 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 = 'temporary-consents';
24
- const BUILD = /* temporary-consents */ { 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: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
24
+ const BUILD = /* temporary-consents */ { 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: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
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 : {};
@@ -150,12 +161,6 @@ var flush = () => {
150
161
  };
151
162
  var nextTick = (cb) => promiseResolve().then(cb);
152
163
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
153
-
154
- // src/utils/constants.ts
155
- var EMPTY_OBJ = {};
156
-
157
- // src/utils/helpers.ts
158
- var isDef = (v) => v != null;
159
164
  var isComplexType = (o) => {
160
165
  o = typeof o;
161
166
  return o === "object" || o === "function";
@@ -327,7 +332,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
327
332
  }
328
333
  if (!appliedStyles.has(scopeId2)) {
329
334
  {
330
- styleElm = doc.createElement("style");
335
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
331
336
  styleElm.innerHTML = style;
332
337
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
333
338
  if (nonce != null) {
@@ -337,7 +342,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
337
342
  if (styleContainerNode.nodeName === "HEAD") {
338
343
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
339
344
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
340
- styleContainerNode.insertBefore(styleElm, referenceNode2);
345
+ styleContainerNode.insertBefore(
346
+ styleElm,
347
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
348
+ );
341
349
  } else if ("host" in styleContainerNode) {
342
350
  if (supportsConstructableStylesheets) {
343
351
  const stylesheet = new CSSStyleSheet();
@@ -387,16 +395,18 @@ var attachStyles = (hostRef) => {
387
395
  endAttachStyles();
388
396
  };
389
397
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
390
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
398
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
391
399
  if (oldValue !== newValue) {
392
400
  let isProp = isMemberInElement(elm, memberName);
393
401
  let ln = memberName.toLowerCase();
394
402
  if (memberName === "class") {
395
403
  const classList = elm.classList;
396
404
  const oldClasses = parseClassList(oldValue);
397
- const newClasses = parseClassList(newValue);
398
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
399
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
405
+ let newClasses = parseClassList(newValue);
406
+ {
407
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
408
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
409
+ }
400
410
  } else if (memberName === "ref") {
401
411
  if (newValue) {
402
412
  newValue(elm);
@@ -434,7 +444,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
434
444
  elm.setAttribute(memberName, n);
435
445
  }
436
446
  }
437
- } else {
447
+ } else if (elm[memberName] !== newValue) {
438
448
  elm[memberName] = newValue;
439
449
  }
440
450
  } catch (e) {
@@ -456,24 +466,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
456
466
  }
457
467
  };
458
468
  var parseClassListRegex = /\s/;
459
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
469
+ var parseClassList = (value) => {
470
+ if (typeof value === "object" && value && "baseVal" in value) {
471
+ value = value.baseVal;
472
+ }
473
+ if (!value || typeof value !== "string") {
474
+ return [];
475
+ }
476
+ return value.split(parseClassListRegex);
477
+ };
460
478
  var CAPTURE_EVENT_SUFFIX = "Capture";
461
479
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
462
480
 
463
481
  // src/runtime/vdom/update-element.ts
464
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
482
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
465
483
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
466
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
467
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
484
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
485
+ const newVnodeAttrs = newVnode.$attrs$ || {};
468
486
  {
469
487
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
470
488
  if (!(memberName in newVnodeAttrs)) {
471
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
489
+ setAccessor(
490
+ elm,
491
+ memberName,
492
+ oldVnodeAttrs[memberName],
493
+ void 0,
494
+ isSvgMode2,
495
+ newVnode.$flags$);
472
496
  }
473
497
  }
474
498
  }
475
499
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
476
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
500
+ setAccessor(
501
+ elm,
502
+ memberName,
503
+ oldVnodeAttrs[memberName],
504
+ newVnodeAttrs[memberName],
505
+ isSvgMode2,
506
+ newVnode.$flags$);
477
507
  }
478
508
  };
479
509
  function sortedAttrNames(attrNames) {
@@ -485,13 +515,10 @@ function sortedAttrNames(attrNames) {
485
515
  attrNames
486
516
  );
487
517
  }
488
-
489
- // src/runtime/vdom/vdom-render.ts
490
- var scopeId;
491
518
  var hostTagName;
492
519
  var useNativeShadowDom = false;
493
520
  var isSvgMode = false;
494
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
521
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
495
522
  const newVNode2 = newParentVNode.$children$[childIndex];
496
523
  let i2 = 0;
497
524
  let elm;
@@ -505,11 +532,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
505
532
  {
506
533
  updateElement(null, newVNode2, isSvgMode);
507
534
  }
508
- const rootNode = elm.getRootNode();
509
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
510
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
511
- elm.classList.add(elm["s-si"] = scopeId);
512
- }
513
535
  if (newVNode2.$children$) {
514
536
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
515
537
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -614,6 +636,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
614
636
  };
615
637
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
616
638
  if (leftVNode.$tag$ === rightVNode.$tag$) {
639
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
640
+ leftVNode.$key$ = rightVNode.$key$;
641
+ }
617
642
  return true;
618
643
  }
619
644
  return false;
@@ -653,8 +678,9 @@ var nullifyVNodeRefs = (vNode) => {
653
678
  }
654
679
  };
655
680
  var insertBefore = (parent, newNode, reference) => {
656
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
657
- return inserted;
681
+ {
682
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
683
+ }
658
684
  };
659
685
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
660
686
  const hostElm = hostRef.$hostElement$;
@@ -679,9 +705,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
679
705
  rootVnode.$flags$ |= 4 /* isHost */;
680
706
  hostRef.$vnode$ = rootVnode;
681
707
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
682
- {
683
- scopeId = hostElm["s-sc"];
684
- }
685
708
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
686
709
  patch(oldVNode, rootVnode, isInitialLoad);
687
710
  };
@@ -689,7 +712,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
689
712
  // src/runtime/update-component.ts
690
713
  var attachToAncestor = (hostRef, ancestorComponent) => {
691
714
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
692
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
715
+ const index = ancestorComponent["s-p"].push(
716
+ new Promise(
717
+ (r) => hostRef.$onRenderResolve$ = () => {
718
+ ancestorComponent["s-p"].splice(index - 1, 1);
719
+ r();
720
+ }
721
+ )
722
+ );
693
723
  }
694
724
  };
695
725
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -716,7 +746,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
716
746
  let maybePromise;
717
747
  if (isInitialLoad) {
718
748
  {
719
- maybePromise = safeCall(instance, "componentWillLoad");
749
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
720
750
  }
721
751
  }
722
752
  endSchedule();
@@ -785,7 +815,7 @@ var postUpdateComponent = (hostRef) => {
785
815
  const instance = hostRef.$lazyInstance$ ;
786
816
  const ancestorComponent = hostRef.$ancestorComponent$;
787
817
  {
788
- safeCall(instance, "componentDidRender");
818
+ safeCall(instance, "componentDidRender", void 0, elm);
789
819
  }
790
820
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
791
821
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -819,12 +849,12 @@ var appDidLoad = (who) => {
819
849
  }
820
850
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
821
851
  };
822
- var safeCall = (instance, method, arg) => {
852
+ var safeCall = (instance, method, arg, elm) => {
823
853
  if (instance && instance[method]) {
824
854
  try {
825
855
  return instance[method](arg);
826
856
  } catch (e) {
827
- consoleError(e);
857
+ consoleError(e, elm);
828
858
  }
829
859
  }
830
860
  return void 0;
@@ -867,15 +897,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
867
897
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
868
898
  members.map(([memberName, [memberFlags]]) => {
869
899
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
900
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
901
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
902
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
903
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
904
+ Object.defineProperty(prototype, memberName, {
905
+ get() {
906
+ {
907
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
908
+ return getValue(this, memberName);
909
+ }
910
+ const ref = getHostRef(this);
911
+ const instance = ref ? ref.$lazyInstance$ : prototype;
912
+ if (!instance) return;
913
+ return instance[memberName];
914
+ }
915
+ },
916
+ configurable: true,
917
+ enumerable: true
918
+ });
919
+ }
870
920
  Object.defineProperty(prototype, memberName, {
871
- get() {
872
- return getValue(this, memberName);
873
- },
874
921
  set(newValue) {
875
- setValue(this, memberName, newValue, cmpMeta);
876
- },
877
- configurable: true,
878
- enumerable: true
922
+ const ref = getHostRef(this);
923
+ if (origSetter) {
924
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
925
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
926
+ newValue = ref.$instanceValues$.get(memberName);
927
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
928
+ ref.$instanceValues$.set(memberName, currentValue);
929
+ }
930
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
931
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
932
+ setValue(this, memberName, newValue, cmpMeta);
933
+ return;
934
+ }
935
+ {
936
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
937
+ setValue(this, memberName, newValue, cmpMeta);
938
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
939
+ ref.$onReadyPromise$.then(() => {
940
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
941
+ ref.$lazyInstance$[memberName] = newValue;
942
+ }
943
+ });
944
+ }
945
+ return;
946
+ }
947
+ const setterSetVal = () => {
948
+ const currentValue = ref.$lazyInstance$[memberName];
949
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
950
+ ref.$instanceValues$.set(memberName, currentValue);
951
+ }
952
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
953
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
954
+ };
955
+ if (ref.$lazyInstance$) {
956
+ setterSetVal();
957
+ } else {
958
+ ref.$onReadyPromise$.then(() => setterSetVal());
959
+ }
960
+ }
961
+ }
879
962
  });
880
963
  }
881
964
  });
@@ -885,7 +968,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
885
968
  plt.jmp(() => {
886
969
  var _a2;
887
970
  const propName = attrNameToPropName.get(attrName);
888
- if (this.hasOwnProperty(propName)) {
971
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
889
972
  newValue = this[propName];
890
973
  delete this[propName];
891
974
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -905,7 +988,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
905
988
  }
906
989
  return;
907
990
  }
908
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
991
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
992
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
993
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
994
+ this[propName] = newValue;
995
+ }
909
996
  });
910
997
  };
911
998
  Cstr.observedAttributes = Array.from(
@@ -932,9 +1019,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
932
1019
  let Cstr;
933
1020
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
934
1021
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
935
- const bundleId = cmpMeta.$lazyBundleId$;
936
- if (bundleId) {
937
- const CstrImport = loadModule(cmpMeta);
1022
+ {
1023
+ const CstrImport = loadModule(cmpMeta, hostRef);
938
1024
  if (CstrImport && "then" in CstrImport) {
939
1025
  const endLoad = uniqueTime();
940
1026
  Cstr = await CstrImport;
@@ -956,16 +1042,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
956
1042
  try {
957
1043
  new Cstr(hostRef);
958
1044
  } catch (e) {
959
- consoleError(e);
1045
+ consoleError(e, elm);
960
1046
  }
961
1047
  {
962
1048
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
963
1049
  }
964
1050
  endNewInstance();
965
- } else {
966
- Cstr = elm.constructor;
967
- const cmpTag = elm.localName;
968
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
969
1051
  }
970
1052
  if (Cstr && Cstr.style) {
971
1053
  let style;
@@ -988,7 +1070,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
988
1070
  schedule();
989
1071
  }
990
1072
  };
991
- var fireConnectedCallback = (instance) => {
1073
+ var fireConnectedCallback = (instance, elm) => {
992
1074
  };
993
1075
 
994
1076
  // src/runtime/connected-callback.ts
@@ -1028,7 +1110,7 @@ var connectedCallback = (elm) => {
1028
1110
  endConnected();
1029
1111
  }
1030
1112
  };
1031
- var disconnectInstance = (instance) => {
1113
+ var disconnectInstance = (instance, elm) => {
1032
1114
  };
1033
1115
  var disconnectedCallback = async (elm) => {
1034
1116
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1037,6 +1119,12 @@ var disconnectedCallback = async (elm) => {
1037
1119
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1038
1120
  }
1039
1121
  }
1122
+ if (rootAppliedStyles.has(elm)) {
1123
+ rootAppliedStyles.delete(elm);
1124
+ }
1125
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1126
+ rootAppliedStyles.delete(elm.shadowRoot);
1127
+ }
1040
1128
  };
1041
1129
 
1042
1130
  // src/runtime/bootstrap-lazy.ts
@@ -1113,6 +1201,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1113
1201
  }
1114
1202
  disconnectedCallback() {
1115
1203
  plt.jmp(() => disconnectedCallback(this));
1204
+ plt.raf(() => {
1205
+ var _a3;
1206
+ const hostRef = getHostRef(this);
1207
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1208
+ delete hostRef.$vnode$.$elm$;
1209
+ }
1210
+ });
1116
1211
  }
1117
1212
  componentOnReady() {
1118
1213
  return getHostRef(this).$onReadyPromise$;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-417efc18.js');
5
+ const index = require('./index-9372c90f.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-417efc18.js');
5
+ const index = require('./index-9372c90f.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  let TRANSLATIONS = {
@@ -112,6 +112,19 @@ const TemporaryConsentsStyle0 = temporaryConsentsCss;
112
112
  const TemporaryConsents = class {
113
113
  constructor(hostRef) {
114
114
  index.registerInstance(this, hostRef);
115
+ /**
116
+ * Client custom styling via inline styles
117
+ */
118
+ this.clientStyling = '';
119
+ /**
120
+ * Client custom styling via url
121
+ */
122
+ this.clientStylingUrl = '';
123
+ /**
124
+ * Translation via url
125
+ */
126
+ this.translationUrl = '';
127
+ this.stylingAppends = false;
115
128
  this.isLoading = false;
116
129
  this.setClientStyling = () => {
117
130
  let sheet = document.createElement('style');
@@ -131,15 +144,6 @@ const TemporaryConsents = class {
131
144
  console.log('error ', err);
132
145
  });
133
146
  };
134
- this.endpoint = undefined;
135
- this.userId = undefined;
136
- this.sessionId = undefined;
137
- this.daysUntilLockout = undefined;
138
- this.lang = undefined;
139
- this.clientStyling = '';
140
- this.clientStylingUrl = '';
141
- this.translationUrl = '';
142
- this.stylingAppends = false;
143
147
  }
144
148
  componentWillLoad() {
145
149
  const promises = [];
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-417efc18.js');
5
+ const index = require('./index-9372c90f.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('temporary-consents.cjs.js', document.baseURI).href));
@@ -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": [],
@@ -2,6 +2,19 @@ import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/locale.utils";
3
3
  export class TemporaryConsents {
4
4
  constructor() {
5
+ /**
6
+ * Client custom styling via inline styles
7
+ */
8
+ this.clientStyling = '';
9
+ /**
10
+ * Client custom styling via url
11
+ */
12
+ this.clientStylingUrl = '';
13
+ /**
14
+ * Translation via url
15
+ */
16
+ this.translationUrl = '';
17
+ this.stylingAppends = false;
5
18
  this.isLoading = false;
6
19
  this.setClientStyling = () => {
7
20
  let sheet = document.createElement('style');
@@ -21,15 +34,6 @@ export class TemporaryConsents {
21
34
  console.log('error ', err);
22
35
  });
23
36
  };
24
- this.endpoint = undefined;
25
- this.userId = undefined;
26
- this.sessionId = undefined;
27
- this.daysUntilLockout = undefined;
28
- this.lang = undefined;
29
- this.clientStyling = '';
30
- this.clientStylingUrl = '';
31
- this.translationUrl = '';
32
- this.stylingAppends = false;
33
37
  }
34
38
  componentWillLoad() {
35
39
  const promises = [];
@@ -154,6 +158,8 @@ export class TemporaryConsents {
154
158
  "tags": [],
155
159
  "text": "The NWA endpoint"
156
160
  },
161
+ "getter": false,
162
+ "setter": false,
157
163
  "attribute": "endpoint",
158
164
  "reflect": true
159
165
  },
@@ -171,6 +177,8 @@ export class TemporaryConsents {
171
177
  "tags": [],
172
178
  "text": "The NWA user id"
173
179
  },
180
+ "getter": false,
181
+ "setter": false,
174
182
  "attribute": "user-id",
175
183
  "reflect": true
176
184
  },
@@ -188,6 +196,8 @@ export class TemporaryConsents {
188
196
  "tags": [],
189
197
  "text": "The NWA session for the logged in user"
190
198
  },
199
+ "getter": false,
200
+ "setter": false,
191
201
  "attribute": "session-id",
192
202
  "reflect": true
193
203
  },
@@ -205,6 +215,8 @@ export class TemporaryConsents {
205
215
  "tags": [],
206
216
  "text": "The language of the integrator"
207
217
  },
218
+ "getter": false,
219
+ "setter": false,
208
220
  "attribute": "days-until-lockout",
209
221
  "reflect": true
210
222
  },
@@ -222,6 +234,8 @@ export class TemporaryConsents {
222
234
  "tags": [],
223
235
  "text": "The language of the integrator"
224
236
  },
237
+ "getter": false,
238
+ "setter": false,
225
239
  "attribute": "lang",
226
240
  "reflect": true
227
241
  },
@@ -239,6 +253,8 @@ export class TemporaryConsents {
239
253
  "tags": [],
240
254
  "text": "Client custom styling via inline styles"
241
255
  },
256
+ "getter": false,
257
+ "setter": false,
242
258
  "attribute": "client-styling",
243
259
  "reflect": true,
244
260
  "defaultValue": "''"
@@ -257,6 +273,8 @@ export class TemporaryConsents {
257
273
  "tags": [],
258
274
  "text": "Client custom styling via url"
259
275
  },
276
+ "getter": false,
277
+ "setter": false,
260
278
  "attribute": "client-styling-url",
261
279
  "reflect": true,
262
280
  "defaultValue": "''"
@@ -275,6 +293,8 @@ export class TemporaryConsents {
275
293
  "tags": [],
276
294
  "text": "Translation via url"
277
295
  },
296
+ "getter": false,
297
+ "setter": false,
278
298
  "attribute": "translation-url",
279
299
  "reflect": true,
280
300
  "defaultValue": "''"
@@ -1,17 +1,21 @@
1
1
  const NAMESPACE = 'temporary-consents';
2
- const BUILD = /* temporary-consents */ { 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: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* temporary-consents */ { 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: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.25.1 | 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";
@@ -305,7 +310,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
305
310
  }
306
311
  if (!appliedStyles.has(scopeId2)) {
307
312
  {
308
- styleElm = doc.createElement("style");
313
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
309
314
  styleElm.innerHTML = style;
310
315
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
311
316
  if (nonce != null) {
@@ -315,7 +320,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
315
320
  if (styleContainerNode.nodeName === "HEAD") {
316
321
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
317
322
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
318
- styleContainerNode.insertBefore(styleElm, referenceNode2);
323
+ styleContainerNode.insertBefore(
324
+ styleElm,
325
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
326
+ );
319
327
  } else if ("host" in styleContainerNode) {
320
328
  if (supportsConstructableStylesheets) {
321
329
  const stylesheet = new CSSStyleSheet();
@@ -365,16 +373,18 @@ var attachStyles = (hostRef) => {
365
373
  endAttachStyles();
366
374
  };
367
375
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
368
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
376
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
369
377
  if (oldValue !== newValue) {
370
378
  let isProp = isMemberInElement(elm, memberName);
371
379
  let ln = memberName.toLowerCase();
372
380
  if (memberName === "class") {
373
381
  const classList = elm.classList;
374
382
  const oldClasses = parseClassList(oldValue);
375
- const newClasses = parseClassList(newValue);
376
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
377
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
383
+ let newClasses = parseClassList(newValue);
384
+ {
385
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
386
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
387
+ }
378
388
  } else if (memberName === "ref") {
379
389
  if (newValue) {
380
390
  newValue(elm);
@@ -412,7 +422,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
412
422
  elm.setAttribute(memberName, n);
413
423
  }
414
424
  }
415
- } else {
425
+ } else if (elm[memberName] !== newValue) {
416
426
  elm[memberName] = newValue;
417
427
  }
418
428
  } catch (e) {
@@ -434,24 +444,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
434
444
  }
435
445
  };
436
446
  var parseClassListRegex = /\s/;
437
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
447
+ var parseClassList = (value) => {
448
+ if (typeof value === "object" && value && "baseVal" in value) {
449
+ value = value.baseVal;
450
+ }
451
+ if (!value || typeof value !== "string") {
452
+ return [];
453
+ }
454
+ return value.split(parseClassListRegex);
455
+ };
438
456
  var CAPTURE_EVENT_SUFFIX = "Capture";
439
457
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
440
458
 
441
459
  // src/runtime/vdom/update-element.ts
442
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
460
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
443
461
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
444
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
445
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
462
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
463
+ const newVnodeAttrs = newVnode.$attrs$ || {};
446
464
  {
447
465
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
448
466
  if (!(memberName in newVnodeAttrs)) {
449
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
467
+ setAccessor(
468
+ elm,
469
+ memberName,
470
+ oldVnodeAttrs[memberName],
471
+ void 0,
472
+ isSvgMode2,
473
+ newVnode.$flags$);
450
474
  }
451
475
  }
452
476
  }
453
477
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
454
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
478
+ setAccessor(
479
+ elm,
480
+ memberName,
481
+ oldVnodeAttrs[memberName],
482
+ newVnodeAttrs[memberName],
483
+ isSvgMode2,
484
+ newVnode.$flags$);
455
485
  }
456
486
  };
457
487
  function sortedAttrNames(attrNames) {
@@ -463,13 +493,10 @@ function sortedAttrNames(attrNames) {
463
493
  attrNames
464
494
  );
465
495
  }
466
-
467
- // src/runtime/vdom/vdom-render.ts
468
- var scopeId;
469
496
  var hostTagName;
470
497
  var useNativeShadowDom = false;
471
498
  var isSvgMode = false;
472
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
499
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
473
500
  const newVNode2 = newParentVNode.$children$[childIndex];
474
501
  let i2 = 0;
475
502
  let elm;
@@ -483,11 +510,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
483
510
  {
484
511
  updateElement(null, newVNode2, isSvgMode);
485
512
  }
486
- const rootNode = elm.getRootNode();
487
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
488
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
489
- elm.classList.add(elm["s-si"] = scopeId);
490
- }
491
513
  if (newVNode2.$children$) {
492
514
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
493
515
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -592,6 +614,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
592
614
  };
593
615
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
594
616
  if (leftVNode.$tag$ === rightVNode.$tag$) {
617
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
618
+ leftVNode.$key$ = rightVNode.$key$;
619
+ }
595
620
  return true;
596
621
  }
597
622
  return false;
@@ -631,8 +656,9 @@ var nullifyVNodeRefs = (vNode) => {
631
656
  }
632
657
  };
633
658
  var insertBefore = (parent, newNode, reference) => {
634
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
635
- return inserted;
659
+ {
660
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
661
+ }
636
662
  };
637
663
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
638
664
  const hostElm = hostRef.$hostElement$;
@@ -657,9 +683,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
657
683
  rootVnode.$flags$ |= 4 /* isHost */;
658
684
  hostRef.$vnode$ = rootVnode;
659
685
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
660
- {
661
- scopeId = hostElm["s-sc"];
662
- }
663
686
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
664
687
  patch(oldVNode, rootVnode, isInitialLoad);
665
688
  };
@@ -667,7 +690,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
667
690
  // src/runtime/update-component.ts
668
691
  var attachToAncestor = (hostRef, ancestorComponent) => {
669
692
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
670
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
693
+ const index = ancestorComponent["s-p"].push(
694
+ new Promise(
695
+ (r) => hostRef.$onRenderResolve$ = () => {
696
+ ancestorComponent["s-p"].splice(index - 1, 1);
697
+ r();
698
+ }
699
+ )
700
+ );
671
701
  }
672
702
  };
673
703
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -694,7 +724,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
694
724
  let maybePromise;
695
725
  if (isInitialLoad) {
696
726
  {
697
- maybePromise = safeCall(instance, "componentWillLoad");
727
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
698
728
  }
699
729
  }
700
730
  endSchedule();
@@ -763,7 +793,7 @@ var postUpdateComponent = (hostRef) => {
763
793
  const instance = hostRef.$lazyInstance$ ;
764
794
  const ancestorComponent = hostRef.$ancestorComponent$;
765
795
  {
766
- safeCall(instance, "componentDidRender");
796
+ safeCall(instance, "componentDidRender", void 0, elm);
767
797
  }
768
798
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
769
799
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -797,12 +827,12 @@ var appDidLoad = (who) => {
797
827
  }
798
828
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
799
829
  };
800
- var safeCall = (instance, method, arg) => {
830
+ var safeCall = (instance, method, arg, elm) => {
801
831
  if (instance && instance[method]) {
802
832
  try {
803
833
  return instance[method](arg);
804
834
  } catch (e) {
805
- consoleError(e);
835
+ consoleError(e, elm);
806
836
  }
807
837
  }
808
838
  return void 0;
@@ -845,15 +875,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
845
875
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
846
876
  members.map(([memberName, [memberFlags]]) => {
847
877
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
878
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
879
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
880
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
881
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
882
+ Object.defineProperty(prototype, memberName, {
883
+ get() {
884
+ {
885
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
886
+ return getValue(this, memberName);
887
+ }
888
+ const ref = getHostRef(this);
889
+ const instance = ref ? ref.$lazyInstance$ : prototype;
890
+ if (!instance) return;
891
+ return instance[memberName];
892
+ }
893
+ },
894
+ configurable: true,
895
+ enumerable: true
896
+ });
897
+ }
848
898
  Object.defineProperty(prototype, memberName, {
849
- get() {
850
- return getValue(this, memberName);
851
- },
852
899
  set(newValue) {
853
- setValue(this, memberName, newValue, cmpMeta);
854
- },
855
- configurable: true,
856
- enumerable: true
900
+ const ref = getHostRef(this);
901
+ if (origSetter) {
902
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
903
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
904
+ newValue = ref.$instanceValues$.get(memberName);
905
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
906
+ ref.$instanceValues$.set(memberName, currentValue);
907
+ }
908
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
909
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
910
+ setValue(this, memberName, newValue, cmpMeta);
911
+ return;
912
+ }
913
+ {
914
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
915
+ setValue(this, memberName, newValue, cmpMeta);
916
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
917
+ ref.$onReadyPromise$.then(() => {
918
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
919
+ ref.$lazyInstance$[memberName] = newValue;
920
+ }
921
+ });
922
+ }
923
+ return;
924
+ }
925
+ const setterSetVal = () => {
926
+ const currentValue = ref.$lazyInstance$[memberName];
927
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
928
+ ref.$instanceValues$.set(memberName, currentValue);
929
+ }
930
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
931
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
932
+ };
933
+ if (ref.$lazyInstance$) {
934
+ setterSetVal();
935
+ } else {
936
+ ref.$onReadyPromise$.then(() => setterSetVal());
937
+ }
938
+ }
939
+ }
857
940
  });
858
941
  }
859
942
  });
@@ -863,7 +946,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
863
946
  plt.jmp(() => {
864
947
  var _a2;
865
948
  const propName = attrNameToPropName.get(attrName);
866
- if (this.hasOwnProperty(propName)) {
949
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
867
950
  newValue = this[propName];
868
951
  delete this[propName];
869
952
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -883,7 +966,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
883
966
  }
884
967
  return;
885
968
  }
886
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
969
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
970
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
971
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
972
+ this[propName] = newValue;
973
+ }
887
974
  });
888
975
  };
889
976
  Cstr.observedAttributes = Array.from(
@@ -910,9 +997,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
910
997
  let Cstr;
911
998
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
912
999
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
913
- const bundleId = cmpMeta.$lazyBundleId$;
914
- if (bundleId) {
915
- const CstrImport = loadModule(cmpMeta);
1000
+ {
1001
+ const CstrImport = loadModule(cmpMeta, hostRef);
916
1002
  if (CstrImport && "then" in CstrImport) {
917
1003
  const endLoad = uniqueTime();
918
1004
  Cstr = await CstrImport;
@@ -934,16 +1020,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
934
1020
  try {
935
1021
  new Cstr(hostRef);
936
1022
  } catch (e) {
937
- consoleError(e);
1023
+ consoleError(e, elm);
938
1024
  }
939
1025
  {
940
1026
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
941
1027
  }
942
1028
  endNewInstance();
943
- } else {
944
- Cstr = elm.constructor;
945
- const cmpTag = elm.localName;
946
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
947
1029
  }
948
1030
  if (Cstr && Cstr.style) {
949
1031
  let style;
@@ -966,7 +1048,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
966
1048
  schedule();
967
1049
  }
968
1050
  };
969
- var fireConnectedCallback = (instance) => {
1051
+ var fireConnectedCallback = (instance, elm) => {
970
1052
  };
971
1053
 
972
1054
  // src/runtime/connected-callback.ts
@@ -1006,7 +1088,7 @@ var connectedCallback = (elm) => {
1006
1088
  endConnected();
1007
1089
  }
1008
1090
  };
1009
- var disconnectInstance = (instance) => {
1091
+ var disconnectInstance = (instance, elm) => {
1010
1092
  };
1011
1093
  var disconnectedCallback = async (elm) => {
1012
1094
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1015,6 +1097,12 @@ var disconnectedCallback = async (elm) => {
1015
1097
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1016
1098
  }
1017
1099
  }
1100
+ if (rootAppliedStyles.has(elm)) {
1101
+ rootAppliedStyles.delete(elm);
1102
+ }
1103
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1104
+ rootAppliedStyles.delete(elm.shadowRoot);
1105
+ }
1018
1106
  };
1019
1107
 
1020
1108
  // src/runtime/bootstrap-lazy.ts
@@ -1091,6 +1179,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1091
1179
  }
1092
1180
  disconnectedCallback() {
1093
1181
  plt.jmp(() => disconnectedCallback(this));
1182
+ plt.raf(() => {
1183
+ var _a3;
1184
+ const hostRef = getHostRef(this);
1185
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1186
+ delete hostRef.$vnode$.$elm$;
1187
+ }
1188
+ });
1094
1189
  }
1095
1190
  componentOnReady() {
1096
1191
  return getHostRef(this).$onReadyPromise$;
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-2541c410.js';
2
- export { s as setNonce } from './index-2541c410.js';
1
+ import { b as bootstrapLazy } from './index-b15f0935.js';
2
+ export { s as setNonce } from './index-b15f0935.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-2541c410.js';
1
+ import { r as registerInstance, h } from './index-b15f0935.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  let TRANSLATIONS = {
@@ -108,6 +108,19 @@ const TemporaryConsentsStyle0 = temporaryConsentsCss;
108
108
  const TemporaryConsents = class {
109
109
  constructor(hostRef) {
110
110
  registerInstance(this, hostRef);
111
+ /**
112
+ * Client custom styling via inline styles
113
+ */
114
+ this.clientStyling = '';
115
+ /**
116
+ * Client custom styling via url
117
+ */
118
+ this.clientStylingUrl = '';
119
+ /**
120
+ * Translation via url
121
+ */
122
+ this.translationUrl = '';
123
+ this.stylingAppends = false;
111
124
  this.isLoading = false;
112
125
  this.setClientStyling = () => {
113
126
  let sheet = document.createElement('style');
@@ -127,15 +140,6 @@ const TemporaryConsents = class {
127
140
  console.log('error ', err);
128
141
  });
129
142
  };
130
- this.endpoint = undefined;
131
- this.userId = undefined;
132
- this.sessionId = undefined;
133
- this.daysUntilLockout = undefined;
134
- this.lang = undefined;
135
- this.clientStyling = '';
136
- this.clientStylingUrl = '';
137
- this.translationUrl = '';
138
- this.stylingAppends = false;
139
143
  }
140
144
  componentWillLoad() {
141
145
  const promises = [];
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-2541c410.js';
2
- export { s as setNonce } from './index-2541c410.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-b15f0935.js';
2
+ export { s as setNonce } from './index-b15f0935.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.25.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./p-dd417b7b.js";let i={en:{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},"en-us":{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},ro:{title:"Condiții de participare",description:"Important: Verificarea completă este necesară pentru a putea utiliza întreaga ofertă. Dacă verificarea nu este finalizată, retragerile nu sunt posibile, iar contul de pariuri va fi blocat în {daysUntilLockout} zile.",declineButton:"Refuză și deloghează-te",acceptButton:"Acceptă",loading:"Vă rugăm să așteptați, se încarcă..."},hr:{title:"Uvjeti sudjelovanja",description:"Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.",declineButton:"Odbijte i odjavite se",acceptButton:"Prihvatiti",loading:"Molimo pričekajte, učitavanje..."},"es-mx":{title:"Condiciones de participación",description:"Importante: Una verificación completa es requerida para poder utilizar nuestra oferta. Si no se verifica, no será posible hacer retiros y la cuenta para realizar apuestas será bloqueada.",declineButton:"Declinar y salir",acceptButton:"Aceptar",Loading:"Espere por favor, Cargando..."},"pt-br":{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar a nossa oferta. Se não for verificado, os saques não serão possíveis e a conta de apostas será bloqueada.",declineButton:"Recusar e sair",acceptButton:"Aceitar",Loading:"Espere, por favor, Carregando..."},fr:{title:"Conditions de participation",description:"Important : Une vérification complète est requise pour pouvoir utiliser l'ensemble de notre offre. Si la vérification n'est pas effectuée, les retraits ne seront pas possibles et le compte de paris sera bloqué dans {daysUntilLockout} jours.",declineButton:"Refuser et se déconnecter",acceptButton:"Accepter",loading:"Veuillez patienter, chargement en cours..."},de:{title:"Teilnahmebedingungen",description:"Wichtig: Eine vollständige Verifizierung ist erforderlich, um unser gesamtes Angebot nutzen zu können. Wenn die Verifizierung nicht abgeschlossen wird, sind Auszahlungen nicht möglich und das Wettkonto wird in {daysUntilLockout} Tagen gesperrt.",declineButton:"Ablehnen und ausloggen",acceptButton:"Akzeptieren",loading:"Bitte warten, wird geladen..."},es:{title:"Condiciones de participación",description:"Importante: Se requiere una verificación completa para poder utilizar toda nuestra oferta. Si no se completa la verificación, no será posible realizar retiros y la cuenta de apuestas se bloqueará en {daysUntilLockout} días.",declineButton:"Rechazar y cerrar sesión",acceptButton:"Aceptar",loading:"Por favor, espere, cargando..."},pt:{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar toda a nossa oferta. Se a verificação não for concluída, não será possível realizar saques e a conta de apostas será bloqueada em {daysUntilLockout} dias.",declineButton:"Recusar e sair",acceptButton:"Aceitar",loading:"Por favor, aguarde, carregando..."}};const o=(e,t,o)=>{let n=i[void 0!==t&&t in i?t:"en"][e];if(void 0!==o)for(const[e,t]of Object.entries(o.values)){const i=new RegExp(`{${e}}`,"g");n=n.replace(i,t)}return n},n=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.isLoading=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))}}componentWillLoad(){const e=[];if(this.endpoint&&this.userId){const t=this.getConsents().then((e=>{this.temporaryAccountConsent=e.consents.some((e=>"temporaryaccountconsent"==e.tagCode))}));e.push(t)}if(this.translationUrl){const o=(t=this.translationUrl,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]||(i[e]={});for(let o in t[e])i[e][o]=t[e][o]})),e(!0)}))})));e.push(o)}var t;return Promise.all(e)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}getConsents(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),t=new Headers;t.append("X-SessionId",this.sessionId),t.append("Accept","application/json");const i={method:"GET",headers:t};return new Promise(((t,o)=>{this.isLoading=!0,fetch(e.href,i).then((e=>e.json())).then((e=>{t(e)})).catch((e=>{console.error(e),o(e)})).finally((()=>{this.isLoading=!1}))}))}setConsents(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),t=new Headers;t.append("X-SessionId",this.sessionId),t.append("Accept","application/json"),t.append("Content-Type","application/json");const i={method:"POST",headers:t,body:JSON.stringify({consents:[{tagCode:"temporaryaccountconsent",note:"",status:1}]})};return new Promise(((t,o)=>{this.isLoading=!0,fetch(e.href,i).then((e=>e.json())).then((e=>{t(e)})).catch((e=>{console.error(e),o(e)})).finally((()=>{this.isLoading=!1}))}))}handleDecline(){window.postMessage({type:"TemporaryConsentsDeclined"},window.location.href)}handleAccept(){this.setConsents(),window.postMessage({type:"TemporaryConsentsAccepted"},window.location.href)}render(){if(this.temporaryAccountConsent)return this.isLoading?t("p",null,o("loading",this.lang)):t("div",{class:"TemporaryConsents",ref:e=>this.stylingContainer=e},t("h2",{class:"TemporaryConsentsTitle"}," ",o("title",this.lang)," "),t("p",{class:"TemporaryConsentsText"}," ",o("description",this.lang,{values:{daysUntilLockout:this.daysUntilLockout}})," "),t("div",{class:"TemporaryConsentsButtonsWrapper"},t("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonDecline",onClick:()=>this.handleDecline()},o("declineButton",this.lang)),t("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonAccept",onClick:this.handleAccept},o("acceptButton",this.lang))))}};n.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0}:host{display:block}.TemporaryConsents{max-width:500px;display:flex;gap:35px;flex-direction:column;box-shadow:0px 1px 5px 1px rgba(0, 0, 0, 0.1);padding:20px;font-family:sans-serif}.TemporaryConsentsTitle{text-align:left;font-family:inherit;color:#000;font-weight:400;font-size:18px;display:block;border-bottom:1px solid #000;padding-bottom:10px}.TemporaryConsentsText{font-family:inherit;font-weight:300;font-size:16px}.TemporaryConsentsButtonsWrapper{display:flex;justify-content:space-evenly;gap:50px}.TemporaryConsentsButton{font-family:inherit;font-weight:300;font-size:14px;border:none;padding:10px;min-width:150px;border-radius:4px}.TemporaryConsentsButtonDecline{background-color:transparent;border:1px solid #000}.TemporaryConsentsButtonAccept{color:white;background-color:#000}";export{n as temporary_consents}
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],y=[],v=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?b(w):f.raf(w))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},w=()=>{$(m),$(y),(p=m.length>0)&&f.raf(w)},b=t=>h().then(t),S=v(y,!0),g=t=>"object"==(t=typeof t)||"function"===t;function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>k,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function k(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return E(t.value);throw"should never get here"}var C,M=t=>{if(t.isOk)return t.value;throw t.value},x=t=>{if(t.isErr)return t.value;throw t.value},P=(t,e,...n)=>{let o=null,l=!1,s=!1;const i=[],r=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?r(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!g(o))&&(o+=""),l&&s?i[i.length-1].i+=o:i.push(l?A(null,o):o),s=l)};if(r(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=A(t,null);return c.u=e,i.length>0&&(c.h=i),c},A=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),R={},D=(t,e)=>null==t||g(t)?t:1&e?t+"":t,H=new WeakMap,N=t=>"sc-"+t.v,T=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=U(n);let s=U(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=g(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(W);e=e.replace(F,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},L=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(L):[]),W="Capture",F=RegExp(W+"$"),V=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||{},s=e.u||{};for(const t of q(Object.keys(l)))t in s||T(o,t,l[t],void 0,n,e.o);for(const t of q(Object.keys(s)))T(o,t,l[t],s[t],n,e.o)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,_=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else if(l=o.m=a.createElement(o.p),V(null,o,G),o.h)for(i=0;i<o.h.length;++i)s=_(t,o,i),s&&l.appendChild(s);return l["s-hn"]=C,l},z=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=_(null,n,l),i&&(o[l].m=i,Q(r,i,e)))},B=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;K(e),t&&t.remove()}}},I=(t,e,n=!1)=>t.p===e.p&&(n&&!t.$&&e.$&&(t.$=e.$),!0),J=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,i=e.i;null===i?(V(t,e,G),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i=0,r=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],d=o[f];for(;i<=c&&r<=f;)null==u?u=e[++i]:null==a?a=e[--c]:null==h?h=o[++r]:null==d?d=o[--f]:I(u,h,l)?(J(u,h,l),u=e[++i],h=o[++r]):I(a,d,l)?(J(a,d,l),a=e[--c],d=o[--f]):I(u,d,l)?(J(u,d,l),Q(t,u.m,a.m.nextSibling),u=e[++i],d=o[--f]):I(a,h,l)?(J(a,h,l),Q(t,a.m,u.m),a=e[--c],h=o[++r]):(s=_(e&&e[r],n,r),h=o[++r],s&&Q(u.m.parentNode,s,u.m));i>c?z(t,null==o[f+1]?null:o[f+1].m,n,o,r,f):r>f&&B(e,i,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),z(o,null,e,s,0,s.length-1)):!n&&null!==l&&B(l,0,l.length-1)):t.i!==i&&(o.data=i)},K=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(K)},Q=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),X=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},Y=(t,e)=>{if(t.o|=16,!(4&t.o))return X(t,t.j),S((()=>Z(t,e)));t.o|=512},Z=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=it(o,"componentWillLoad",void 0,n)),tt(l,(()=>nt(t,o,e)))},tt=(t,e)=>et(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),et=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,nt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=N(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=H.get(t=t.head||t);if(i||H.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&"HEAD"!==t.nodeName&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ot(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>lt(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ot=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.O,s=t.C||A(null,null),i=(t=>t&&t.p===R)(e)?e:P(null,null,e);if(C=o.tagName,l.M&&(i.u=i.u||{},l.M.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.p=null,i.o|=4,t.C=i,i.m=s.m=o.shadowRoot||o,J(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},lt=t=>{const e=t.$hostElement$,n=t.j;it(t.t,"componentDidRender",void 0,e),64&t.o||(t.o|=64,rt(e),t.P(e),n||st()),t.S&&(t.S(),t.S=void 0),512&t.o&&b((()=>Y(t,!1))),t.o&=-517},st=()=>{rt(a.documentElement),b((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"temporary-consents"}});return t.dispatchEvent(e),e})(u)))},it=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},rt=t=>t.classList.add("hydrated"),ct=(t,e,o,l)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.A.get(e),r=s.o,c=s.t;o=D(o,l.R[e][0]),8&r&&void 0!==i||o===i||Number.isNaN(i)&&Number.isNaN(o)||(s.A.set(e,o),c&&2==(18&r)&&Y(s,!1))},ut=(t,e,o)=>{var l,s;const i=t.prototype;if(e.R){const r=Object.entries(null!=(l=e.R)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.R[t][0]|=2048),r&&(e.R[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.R[t][0]))return((t,e)=>n(this).A.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.A.get(t)?s=i.A.get(t):!i.A.get(t)&&n&&i.A.set(t,n),r.call(this,D(s,l)),void ct(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.R[t][0]))return ct(this,t,s,e),void(1&o&&!i.t&&i.D.then((()=>{4096&e.R[t][0]&&i.t[t]!==i.A.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.A.get(t)&&n&&i.A.set(t,n),i.t[t]=D(s,l),ct(this,t,i.t[t],e)};i.t?n():i.D.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.H)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.H)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.M)||l.push([t,s])),s}))]))}}return t},at=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),w=[];let b,S=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let g=!1;if(t.map((t=>{t[1].map((o=>{const l={o:o[0],v:o[1],R:o[2],N:o[3]};4&l.o&&(g=!0),l.R=o[2],l.M=[];const c=l.v,u=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,O:n,A:new Map};o.D=new Promise((t=>o.P=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,l),1&l.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${l.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),S?w.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.D)&&e.D.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(e,e.j=n);break}}o.R&&Object.entries(o.R).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){e.o|=32;{const l=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.T;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.v}#${e.L}" was not found`);o.isProxied||(ut(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,r()}if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=N(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.j,c=()=>Y(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.o)){const e=n(t);(null==e?void 0:e.t)||(null==e?void 0:e.D)&&e.D.then((()=>{}))}H.has(t)&&H.delete(t),t.shadowRoot&&H.has(t.shadowRoot)&&H.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this);(null==(t=null==e?void 0:e.C)?void 0:t.m)instanceof Node&&!e.C.m.isConnected&&delete e.C.m}))}componentOnReady(){return n(this).D}};l.T=t[0],p.includes(c)||m.get(c)||(h.push(c),m.define(c,ut(u,l,1)))}))})),h.length>0&&(g&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(l=f.k)?l:j(a);null!=t&&$.setAttribute("nonce",t),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,w.length?w.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(st,30)))},ft=t=>f.k=t;export{at as b,P as h,h as p,o as r,ft as s}
@@ -1 +1 @@
1
- import{p as t,b as n}from"./p-d44ae3da.js";export{s as setNonce}from"./p-d44ae3da.js";import{g as i}from"./p-e1255160.js";(()=>{const s=import.meta.url,n={};return""!==s&&(n.resourcesUrl=new URL(".",s).href),t(n)})().then((async s=>(await i(),n([["p-cc111f92",[[1,"temporary-consents",{endpoint:[513],userId:[513,"user-id"],sessionId:[513,"session-id"],daysUntilLockout:[513,"days-until-lockout"],lang:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],stylingAppends:[32]}]]]],s))));
1
+ import{p as t,b as n}from"./p-dd417b7b.js";export{s as setNonce}from"./p-dd417b7b.js";import{g as i}from"./p-e1255160.js";(()=>{const s=import.meta.url,n={};return""!==s&&(n.resourcesUrl=new URL(".",s).href),t(n)})().then((async s=>(await i(),n([["p-13355281",[[1,"temporary-consents",{endpoint:[513],userId:[513,"user-id"],sessionId:[513,"session-id"],daysUntilLockout:[513,"days-until-lockout"],lang:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],stylingAppends:[32]}]]]],s))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/temporary-consents",
3
- "version": "1.52.6",
3
+ "version": "1.53.10",
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 e,h as t}from"./p-d44ae3da.js";let i={en:{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},"en-us":{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},ro:{title:"Condiții de participare",description:"Important: Verificarea completă este necesară pentru a putea utiliza întreaga ofertă. Dacă verificarea nu este finalizată, retragerile nu sunt posibile, iar contul de pariuri va fi blocat în {daysUntilLockout} zile.",declineButton:"Refuză și deloghează-te",acceptButton:"Acceptă",loading:"Vă rugăm să așteptați, se încarcă..."},hr:{title:"Uvjeti sudjelovanja",description:"Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.",declineButton:"Odbijte i odjavite se",acceptButton:"Prihvatiti",loading:"Molimo pričekajte, učitavanje..."},"es-mx":{title:"Condiciones de participación",description:"Importante: Una verificación completa es requerida para poder utilizar nuestra oferta. Si no se verifica, no será posible hacer retiros y la cuenta para realizar apuestas será bloqueada.",declineButton:"Declinar y salir",acceptButton:"Aceptar",Loading:"Espere por favor, Cargando..."},"pt-br":{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar a nossa oferta. Se não for verificado, os saques não serão possíveis e a conta de apostas será bloqueada.",declineButton:"Recusar e sair",acceptButton:"Aceitar",Loading:"Espere, por favor, Carregando..."},fr:{title:"Conditions de participation",description:"Important : Une vérification complète est requise pour pouvoir utiliser l'ensemble de notre offre. Si la vérification n'est pas effectuée, les retraits ne seront pas possibles et le compte de paris sera bloqué dans {daysUntilLockout} jours.",declineButton:"Refuser et se déconnecter",acceptButton:"Accepter",loading:"Veuillez patienter, chargement en cours..."},de:{title:"Teilnahmebedingungen",description:"Wichtig: Eine vollständige Verifizierung ist erforderlich, um unser gesamtes Angebot nutzen zu können. Wenn die Verifizierung nicht abgeschlossen wird, sind Auszahlungen nicht möglich und das Wettkonto wird in {daysUntilLockout} Tagen gesperrt.",declineButton:"Ablehnen und ausloggen",acceptButton:"Akzeptieren",loading:"Bitte warten, wird geladen..."},es:{title:"Condiciones de participación",description:"Importante: Se requiere una verificación completa para poder utilizar toda nuestra oferta. Si no se completa la verificación, no será posible realizar retiros y la cuenta de apuestas se bloqueará en {daysUntilLockout} días.",declineButton:"Rechazar y cerrar sesión",acceptButton:"Aceptar",loading:"Por favor, espere, cargando..."},pt:{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar toda a nossa oferta. Se a verificação não for concluída, não será possível realizar saques e a conta de apostas será bloqueada em {daysUntilLockout} dias.",declineButton:"Recusar e sair",acceptButton:"Aceitar",loading:"Por favor, aguarde, carregando..."}};const o=(e,t,o)=>{let n=i[void 0!==t&&t in i?t:"en"][e];if(void 0!==o)for(const[e,t]of Object.entries(o.values)){const i=new RegExp(`{${e}}`,"g");n=n.replace(i,t)}return n},n=class{constructor(t){e(this,t),this.isLoading=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.endpoint=void 0,this.userId=void 0,this.sessionId=void 0,this.daysUntilLockout=void 0,this.lang=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1}componentWillLoad(){const e=[];if(this.endpoint&&this.userId){const t=this.getConsents().then((e=>{this.temporaryAccountConsent=e.consents.some((e=>"temporaryaccountconsent"==e.tagCode))}));e.push(t)}if(this.translationUrl){const o=(t=this.translationUrl,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]||(i[e]={});for(let o in t[e])i[e][o]=t[e][o]})),e(!0)}))})));e.push(o)}var t;return Promise.all(e)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}getConsents(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),t=new Headers;t.append("X-SessionId",this.sessionId),t.append("Accept","application/json");const i={method:"GET",headers:t};return new Promise(((t,o)=>{this.isLoading=!0,fetch(e.href,i).then((e=>e.json())).then((e=>{t(e)})).catch((e=>{console.error(e),o(e)})).finally((()=>{this.isLoading=!1}))}))}setConsents(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),t=new Headers;t.append("X-SessionId",this.sessionId),t.append("Accept","application/json"),t.append("Content-Type","application/json");const i={method:"POST",headers:t,body:JSON.stringify({consents:[{tagCode:"temporaryaccountconsent",note:"",status:1}]})};return new Promise(((t,o)=>{this.isLoading=!0,fetch(e.href,i).then((e=>e.json())).then((e=>{t(e)})).catch((e=>{console.error(e),o(e)})).finally((()=>{this.isLoading=!1}))}))}handleDecline(){window.postMessage({type:"TemporaryConsentsDeclined"},window.location.href)}handleAccept(){this.setConsents(),window.postMessage({type:"TemporaryConsentsAccepted"},window.location.href)}render(){if(this.temporaryAccountConsent)return this.isLoading?t("p",null,o("loading",this.lang)):t("div",{class:"TemporaryConsents",ref:e=>this.stylingContainer=e},t("h2",{class:"TemporaryConsentsTitle"}," ",o("title",this.lang)," "),t("p",{class:"TemporaryConsentsText"}," ",o("description",this.lang,{values:{daysUntilLockout:this.daysUntilLockout}})," "),t("div",{class:"TemporaryConsentsButtonsWrapper"},t("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonDecline",onClick:()=>this.handleDecline()},o("declineButton",this.lang)),t("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonAccept",onClick:this.handleAccept},o("acceptButton",this.lang))))}};n.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0}:host{display:block}.TemporaryConsents{max-width:500px;display:flex;gap:35px;flex-direction:column;box-shadow:0px 1px 5px 1px rgba(0, 0, 0, 0.1);padding:20px;font-family:sans-serif}.TemporaryConsentsTitle{text-align:left;font-family:inherit;color:#000;font-weight:400;font-size:18px;display:block;border-bottom:1px solid #000;padding-bottom:10px}.TemporaryConsentsText{font-family:inherit;font-weight:300;font-size:16px}.TemporaryConsentsButtonsWrapper{display:flex;justify-content:space-evenly;gap:50px}.TemporaryConsentsButton{font-family:inherit;font-weight:300;font-size:14px;border:none;padding:10px;min-width:150px;border-radius:4px}.TemporaryConsentsButtonDecline{background-color:transparent;border:1px solid #000}.TemporaryConsentsButtonAccept{color:white;background-color:#000}";export{n as temporary_consents}
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,d=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.o?v(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{w(d),w(y),(m=d.length>0)&&f.raf(b)},v=e=>h().then(e),S=$(y,!0),g={},j=e=>"object"==(e=typeof e)||"function"===e;function E(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>C,ok:()=>O,unwrap:()=>x,unwrapErr:()=>P});var O=e=>({isOk:!0,isErr:!1,value:e}),k=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return k(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},A=(e,t,...n)=>{let o=null,l=!1,s=!1;const r=[],i=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof e&&!j(o))&&(o+=""),l&&s?r[r.length-1].i+=o:r.push(l?R(null,o):o),s=l)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=R(e,null);return c.u=t,r.length>0&&(c.h=r),c},R=(e,t)=>({o:0,p:e,i:t,m:null,h:null,u:null}),D={},H=new WeakMap,T=e=>"sc-"+e.$,L=(e,t,n,o,s,r)=>{if(n!==o){let i=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=U(n),s=U(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("ref"===t)o&&o(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=j(o);if((i||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?i=!1:null!=n&&e[t]==l||("function"==typeof e.__lookupSetter__(t)?e[t]=l:e.setAttribute(t,l))}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(u,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(W);t=t.replace(F,""),n&&f.rel(e,t,n,l),o&&f.ael(e,t,o,l)}}},N=/\s/,U=e=>e?e.split(N):[],W="Capture",F=RegExp(W+"$"),q=(e,t,n)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,l=e&&e.u||g,s=t.u||g;for(const e of G(Object.keys(l)))e in s||L(o,e,l[e],void 0,n,t.o);for(const e of G(Object.keys(s)))L(o,e,l[e],s[e],n,t.o)};function G(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var V=!1,_=(e,t,n)=>{const o=t.h[n];let l,s,r=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else if(l=o.m=a.createElement(o.p),q(null,o,V),l.getRootNode().querySelector("body"),o.h)for(r=0;r<o.h.length;++r)s=_(e,o,r),s&&l.appendChild(s);return l["s-hn"]=M,l},z=(e,t,n,o,l,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);l<=s;++l)o[l]&&(r=_(null,n,l),r&&(o[l].m=r,Q(i,r,t)))},B=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.m;K(t),e&&e.remove()}}},I=(e,t)=>e.p===t.p,J=(e,t,n=!1)=>{const o=t.m=e.m,l=e.h,s=t.h,r=t.i;null===r?(q(e,t,V),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,r=0,i=0,c=t.length-1,u=t[0],a=t[c],f=o.length-1,h=o[0],p=o[f];for(;r<=c&&i<=f;)null==u?u=t[++r]:null==a?a=t[--c]:null==h?h=o[++i]:null==p?p=o[--f]:I(u,h)?(J(u,h,l),u=t[++r],h=o[++i]):I(a,p)?(J(a,p,l),a=t[--c],p=o[--f]):I(u,p)?(J(u,p,l),Q(e,u.m,a.m.nextSibling),u=t[++r],p=o[--f]):I(a,h)?(J(a,h,l),Q(e,a.m,u.m),a=t[--c],h=o[++i]):(s=_(t&&t[i],n,i),h=o[++i],s&&Q(u.m.parentNode,s,u.m));r>c?z(e,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&B(t,r,c)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),z(o,null,t,s,0,s.length-1)):!n&&null!==l&&B(l,0,l.length-1)):e.i!==r&&(o.data=r)},K=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(K)},Q=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),X=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},Y=(e,t)=>{if(e.o|=16,!(4&e.o))return X(e,e.S),S((()=>Z(e,t)));e.o|=512},Z=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(o=re(n,"componentWillLoad")),ee(o,(()=>ne(e,n,t)))},ee=(e,t)=>te(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),te=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ne=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=T(t),l=i.get(o);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let s,r=H.get(e=e.head||e);if(r||H.set(e,r=new Set),!r.has(o)){{s=a.createElement("style"),s.innerHTML=l;const o=null!=(n=f.O)?n:E(a);if(null!=o&&s.setAttribute("nonce",o),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(p){const t=new CSSStyleSheet;t.replaceSync(l),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=l+t.innerHTML:e.prepend(s)}else e.append(s);1&t.o&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.o&&(s.innerHTML+=c),r&&r.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);oe(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>le(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},oe=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.j,s=e.k||R(null,null),r=(e=>e&&e.p===D)(t)?t:A(null,null,t);if(M=o.tagName,l.C&&(r.u=r.u||{},l.C.map((([e,t])=>r.u[t]=o[e]))),n&&r.u)for(const e of Object.keys(r.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=o[e]);r.p=null,r.o|=4,e.k=r,r.m=s.m=o.shadowRoot||o,J(s,r,n)})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},le=e=>{const t=e.$hostElement$,n=e.S;re(e.t,"componentDidRender"),64&e.o||(e.o|=64,ie(t),e.M(t),n||se()),e.v&&(e.v(),e.v=void 0),512&e.o&&v((()=>Y(e,!1))),e.o&=-517},se=()=>{ie(a.documentElement),v((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"temporary-consents"}});return e.dispatchEvent(t),t})(u)))},re=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ie=e=>e.classList.add("hydrated"),ce=(e,t,o)=>{var l,s;const r=e.prototype;if(t.P){const i=Object.entries(null!=(l=t.P)?l:{});if(i.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(o){((e,t,o,l)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${l.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=s.A.get(t),i=s.o,c=s.t;o=((e,t)=>null==e||j(e)?e:1&t?e+"":e)(o,l.P[t][0]),8&i&&void 0!==r||o===r||Number.isNaN(r)&&Number.isNaN(o)||(s.A.set(t,o),c&&2==(18&i)&&Y(s,!1))})(this,e,o,t)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;r.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var i;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),r=null==o?void 0:o.o;if(r&&!(8&r)&&128&r&&s!==l){const n=o.t,r=null==(i=t.R)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.R)?s:{}),...i.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.C)||l.push([e,s])),s}))]))}}return e},ue=(e,o={})=>{var l;const h=[],m=o.exclude||[],d=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let v,S=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((o=>{const l={o:o[0],$:o[1],P:o[2],D:o[3]};4&l.o&&(g=!0),l.P=o[2],l.C=[];const c=l.$,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,j:n,A:new Map};o.H=new Promise((e=>o.M=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,l),1&l.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${l.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),S?b.push(this):f.jmp((()=>(e=>{if(!(1&f.o)){const t=n(e),o=t.j,l=()=>{};if(1&t.o)(null==t?void 0:t.t)||(null==t?void 0:t.H)&&t.H.then((()=>{}));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(t,t.S=n);break}}o.P&&Object.entries(o.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.T){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.T;if(!n)return;const o=r.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.$}#${t.L}" was not found`);o.isProxied||(ce(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){s(e)}t.o&=-9,l()}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=T(n);if(!i.has(t)){const o=()=>{};((e,t,n)=>{let o=i.get(e);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,i.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.S,c=()=>Y(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const e=n(this);(null==e?void 0:e.t)||(null==e?void 0:e.H)&&e.H.then((()=>{}))}})()))}componentOnReady(){return n(this).H}};l.T=e[0],m.includes(c)||d.get(c)||(h.push(c),d.define(c,ce(u,l,1)))}))})),h.length>0&&(g&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(l=f.O)?l:E(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}S=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(se,30)))},ae=e=>f.O=e;export{ue as b,A as h,h as p,o as r,ae as s}