@everymatrix/temporary-consents 1.55.0 → 1.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-417efc18.js → index-a64745fe.js} +167 -66
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/temporary-consents.cjs.entry.js +14 -10
- package/dist/cjs/temporary-consents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/temporary-consents/temporary-consents.js +29 -9
- package/dist/esm/{index-2541c410.js → index-54cb9543.js} +167 -66
- package/dist/esm/loader.js +2 -2
- package/dist/esm/temporary-consents.entry.js +14 -10
- package/dist/esm/temporary-consents.js +3 -3
- package/dist/temporary-consents/p-2b771aa1.js +2 -0
- package/dist/temporary-consents/p-f7c91a3a.entry.js +1 -0
- package/dist/temporary-consents/temporary-consents.esm.js +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/temporary-consents/.stencil/packages/stencil/temporary-consents/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/temporary-consents/.stencil/packages/stencil/temporary-consents/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/temporary-consents/p-cc111f92.entry.js +0 -1
- package/dist/temporary-consents/p-d44ae3da.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/temporary-consents/.stencil/packages/stencil/temporary-consents/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/temporary-consents/.stencil/packages/stencil/temporary-consents/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/temporary-consents/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/temporary-consents/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/temporary-consents/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/temporary-consents/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -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.
|
|
5
|
+
Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
// src/client/client-host-ref.ts
|
|
12
14
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
15
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
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
|
-
|
|
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(
|
|
65
|
-
{
|
|
66
|
-
|
|
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
|
-
|
|
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(
|
|
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();
|
|
@@ -333,7 +341,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
333
341
|
styleContainerNode.append(styleElm);
|
|
334
342
|
}
|
|
335
343
|
}
|
|
336
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
344
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
337
345
|
styleContainerNode.insertBefore(styleElm, null);
|
|
338
346
|
}
|
|
339
347
|
}
|
|
@@ -358,23 +366,25 @@ var attachStyles = (hostRef) => {
|
|
|
358
366
|
const scopeId2 = addStyle(
|
|
359
367
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
360
368
|
cmpMeta);
|
|
361
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
369
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
362
370
|
elm["s-sc"] = scopeId2;
|
|
363
371
|
elm.classList.add(scopeId2 + "-h");
|
|
364
372
|
}
|
|
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
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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) =>
|
|
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$ ||
|
|
445
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
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(
|
|
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(
|
|
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
|
|
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
|
-
|
|
635
|
-
|
|
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,17 +683,21 @@ 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
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
686
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
664
687
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
665
688
|
};
|
|
666
689
|
|
|
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(
|
|
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 */;
|
|
@@ -792,17 +822,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
792
822
|
}
|
|
793
823
|
};
|
|
794
824
|
var appDidLoad = (who) => {
|
|
795
|
-
{
|
|
796
|
-
addHydratedFlag(doc.documentElement);
|
|
797
|
-
}
|
|
798
825
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
799
826
|
};
|
|
800
|
-
var safeCall = (instance, method, arg) => {
|
|
827
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
801
828
|
if (instance && instance[method]) {
|
|
802
829
|
try {
|
|
803
830
|
return instance[method](arg);
|
|
804
831
|
} catch (e) {
|
|
805
|
-
consoleError(e);
|
|
832
|
+
consoleError(e, elm);
|
|
806
833
|
}
|
|
807
834
|
}
|
|
808
835
|
return void 0;
|
|
@@ -845,15 +872,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
845
872
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
846
873
|
members.map(([memberName, [memberFlags]]) => {
|
|
847
874
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
875
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
876
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
877
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
878
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
879
|
+
Object.defineProperty(prototype, memberName, {
|
|
880
|
+
get() {
|
|
881
|
+
{
|
|
882
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
883
|
+
return getValue(this, memberName);
|
|
884
|
+
}
|
|
885
|
+
const ref = getHostRef(this);
|
|
886
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
887
|
+
if (!instance) return;
|
|
888
|
+
return instance[memberName];
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
configurable: true,
|
|
892
|
+
enumerable: true
|
|
893
|
+
});
|
|
894
|
+
}
|
|
848
895
|
Object.defineProperty(prototype, memberName, {
|
|
849
|
-
get() {
|
|
850
|
-
return getValue(this, memberName);
|
|
851
|
-
},
|
|
852
896
|
set(newValue) {
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
897
|
+
const ref = getHostRef(this);
|
|
898
|
+
if (origSetter) {
|
|
899
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
900
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
901
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
902
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
903
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
904
|
+
}
|
|
905
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
906
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
907
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
{
|
|
911
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
912
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
913
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
914
|
+
ref.$onReadyPromise$.then(() => {
|
|
915
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
916
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
const setterSetVal = () => {
|
|
923
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
924
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
925
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
926
|
+
}
|
|
927
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
928
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
929
|
+
};
|
|
930
|
+
if (ref.$lazyInstance$) {
|
|
931
|
+
setterSetVal();
|
|
932
|
+
} else {
|
|
933
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
857
937
|
});
|
|
858
938
|
}
|
|
859
939
|
});
|
|
@@ -863,7 +943,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
863
943
|
plt.jmp(() => {
|
|
864
944
|
var _a2;
|
|
865
945
|
const propName = attrNameToPropName.get(attrName);
|
|
866
|
-
if (this.hasOwnProperty(propName)) {
|
|
946
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
867
947
|
newValue = this[propName];
|
|
868
948
|
delete this[propName];
|
|
869
949
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -883,7 +963,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
883
963
|
}
|
|
884
964
|
return;
|
|
885
965
|
}
|
|
886
|
-
|
|
966
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
967
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
968
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
969
|
+
this[propName] = newValue;
|
|
970
|
+
}
|
|
887
971
|
});
|
|
888
972
|
};
|
|
889
973
|
Cstr.observedAttributes = Array.from(
|
|
@@ -912,7 +996,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
912
996
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
913
997
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
914
998
|
if (bundleId) {
|
|
915
|
-
const CstrImport = loadModule(cmpMeta);
|
|
999
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
916
1000
|
if (CstrImport && "then" in CstrImport) {
|
|
917
1001
|
const endLoad = uniqueTime();
|
|
918
1002
|
Cstr = await CstrImport;
|
|
@@ -934,7 +1018,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
934
1018
|
try {
|
|
935
1019
|
new Cstr(hostRef);
|
|
936
1020
|
} catch (e) {
|
|
937
|
-
consoleError(e);
|
|
1021
|
+
consoleError(e, elm);
|
|
938
1022
|
}
|
|
939
1023
|
{
|
|
940
1024
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -966,7 +1050,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
966
1050
|
schedule();
|
|
967
1051
|
}
|
|
968
1052
|
};
|
|
969
|
-
var fireConnectedCallback = (instance) => {
|
|
1053
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
970
1054
|
};
|
|
971
1055
|
|
|
972
1056
|
// src/runtime/connected-callback.ts
|
|
@@ -1006,7 +1090,7 @@ var connectedCallback = (elm) => {
|
|
|
1006
1090
|
endConnected();
|
|
1007
1091
|
}
|
|
1008
1092
|
};
|
|
1009
|
-
var disconnectInstance = (instance) => {
|
|
1093
|
+
var disconnectInstance = (instance, elm) => {
|
|
1010
1094
|
};
|
|
1011
1095
|
var disconnectedCallback = async (elm) => {
|
|
1012
1096
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1015,6 +1099,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1015
1099
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1016
1100
|
}
|
|
1017
1101
|
}
|
|
1102
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1103
|
+
rootAppliedStyles.delete(elm);
|
|
1104
|
+
}
|
|
1105
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1106
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1107
|
+
}
|
|
1018
1108
|
};
|
|
1019
1109
|
|
|
1020
1110
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1091,6 +1181,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1091
1181
|
}
|
|
1092
1182
|
disconnectedCallback() {
|
|
1093
1183
|
plt.jmp(() => disconnectedCallback(this));
|
|
1184
|
+
plt.raf(() => {
|
|
1185
|
+
var _a3;
|
|
1186
|
+
const hostRef = getHostRef(this);
|
|
1187
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1188
|
+
if (i2 > -1) {
|
|
1189
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1190
|
+
}
|
|
1191
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1192
|
+
delete hostRef.$vnode$.$elm$;
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1094
1195
|
}
|
|
1095
1196
|
componentOnReady() {
|
|
1096
1197
|
return getHostRef(this).$onReadyPromise$;
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-54cb9543.js';
|
|
2
|
+
export { s as setNonce } from './index-54cb9543.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-
|
|
1
|
+
import { r as registerInstance, h } from './index-54cb9543.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-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-54cb9543.js';
|
|
2
|
+
export { s as setNonce } from './index-54cb9543.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
var patchBrowser = () => {
|
|
9
9
|
const importMeta = import.meta.url;
|
|
@@ -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?R(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=R(t,null);return c.u=e,i.length>0&&(c.h=i),c},R=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},N=(t,e)=>null==t||g(t)?t:1&e?t+"":t,T=new WeakMap,D=t=>"sc-"+t.v,H=(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||H(o,t,l[t],void 0,n,e.o);for(const t of q(Object.keys(s)))H(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=D(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=T.get(t=t.head||t);if(i||T.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&&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||128&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||R(null,null),i=(t=>t&&t.p===A)(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=()=>{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.R.get(e),r=s.o,c=s.t;o=N(o,l.A[e][0]),8&r&&void 0!==i||o===i||Number.isNaN(i)&&Number.isNaN(o)||(s.R.set(e,o),c&&2==(18&r)&&Y(s,!1))},ut=(t,e,o)=>{var l,s;const i=t.prototype;if(e.A){const r=Object.entries(null!=(l=e.A)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.A[t][0]|=2048),r&&(e.A[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.A[t][0]))return((t,e)=>n(this).R.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.R.get(t)?s=i.R.get(t):!i.R.get(t)&&n&&i.R.set(t,n),r.call(this,N(s,l)),void ct(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.A[t][0]))return ct(this,t,s,e),void(1&o&&!i.t&&i.N.then((()=>{4096&e.A[t][0]&&i.t[t]!==i.R.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.R.get(t)&&n&&i.R.set(t,n),i.t[t]=N(s,l),ct(this,t,i.t[t],e)};i.t?n():i.N.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.T)?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.T)?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],A:o[2],D:o[3]};4&l.o&&(g=!0),l.A=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,R:new Map};o.N=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.N)&&e.N.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.A&&Object.entries(o.A).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)){if(e.o|=32,n.H){const l=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.H;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()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=D(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.N)&&e.N.then((()=>{}))}T.has(t)&&T.delete(t),t.shadowRoot&&T.has(t.shadowRoot)&&T.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this),o=w.findIndex((t=>t===this));o>-1&&w.splice(o,1),(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).N}};l.H=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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t}from"./p-2b771aa1.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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as n}from"./p-
|
|
1
|
+
import{p as t,b as n}from"./p-2b771aa1.js";export{s as setNonce}from"./p-2b771aa1.js";import{g as a}from"./p-e1255160.js";(()=>{const s=import.meta.url,n={};return""!==s&&(n.resourcesUrl=new URL(".",s).href),t(n)})().then((async s=>(await a(),n([["p-f7c91a3a",[[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 +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}
|