@everymatrix/user-action-controller 1.37.10 → 1.37.11
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-87049e21.js → index-493ff4f6.js} +8 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/player-user-consents_2.cjs.entry.js +61 -43
- package/dist/cjs/user-action-controller.cjs.js +2 -2
- package/dist/collection/components/user-action-controller/user-action-controller.js +9 -40
- package/dist/collection/utils/locale.utils.js +36 -24
- package/dist/components/player-user-consents2.js +15 -12
- package/dist/components/user-action-controller.js +45 -32
- package/dist/esm/{index-71f14530.js → index-48c00f0b.js} +8 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/player-user-consents_2.entry.js +61 -43
- package/dist/esm/user-action-controller.js +2 -2
- package/dist/types/components/user-action-controller/user-action-controller.d.ts +1 -8
- package/dist/types/components.d.ts +0 -16
- package/dist/user-action-controller/p-14f59175.js +1 -0
- package/dist/user-action-controller/p-b752e6c9.entry.js +1 -0
- package/dist/user-action-controller/user-action-controller.esm.js +1 -1
- package/package.json +4 -1
- package/dist/user-action-controller/p-52129348.entry.js +0 -1
- package/dist/user-action-controller/p-ba444709.js +0 -1
|
@@ -1025,6 +1025,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1025
1025
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1026
1026
|
}
|
|
1027
1027
|
endNewInstance();
|
|
1028
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1028
1029
|
}
|
|
1029
1030
|
if (Cstr.style) {
|
|
1030
1031
|
// this component has styles but we haven't registered them yet
|
|
@@ -1053,6 +1054,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1053
1054
|
schedule();
|
|
1054
1055
|
}
|
|
1055
1056
|
};
|
|
1057
|
+
const fireConnectedCallback = (instance) => {
|
|
1058
|
+
{
|
|
1059
|
+
safeCall(instance, 'connectedCallback');
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1056
1062
|
const connectedCallback = (elm) => {
|
|
1057
1063
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1058
1064
|
const hostRef = getHostRef(elm);
|
|
@@ -1096,6 +1102,8 @@ const connectedCallback = (elm) => {
|
|
|
1096
1102
|
// reattach any event listeners to the host
|
|
1097
1103
|
// since they would have been removed when disconnected
|
|
1098
1104
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1105
|
+
// fire off connectedCallback() on component instance
|
|
1106
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1099
1107
|
}
|
|
1100
1108
|
endConnected();
|
|
1101
1109
|
}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-493ff4f6.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["player-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"
|
|
17
|
+
return index.bootstrapLazy([["player-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]]],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-493ff4f6.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
8
8
|
const TRANSLATIONS$1 = {
|
|
@@ -38,18 +38,18 @@ const TRANSLATIONS$1 = {
|
|
|
38
38
|
},
|
|
39
39
|
hr: {
|
|
40
40
|
termsAndConditions: {
|
|
41
|
-
acceptPart1: "
|
|
42
|
-
acceptPart2: "
|
|
43
|
-
acceptPart3: "
|
|
44
|
-
|
|
41
|
+
acceptPart1: "Prihvaćam Opće uvjete i odredbe ",
|
|
42
|
+
acceptPart2: "",
|
|
43
|
+
acceptPart3: "",
|
|
44
|
+
tcLink: "Opći uvjeti i odredbe"
|
|
45
45
|
},
|
|
46
46
|
privacyPolicy: {
|
|
47
|
-
readUnderstandPart1: "
|
|
48
|
-
readUnderstandPart2: ",
|
|
49
|
-
|
|
47
|
+
readUnderstandPart1: "Pročitao sam i razumijem Politiku Privatnosti ",
|
|
48
|
+
readUnderstandPart2: ", i potvrđujem da imam više od 18 godina",
|
|
49
|
+
privacyLink: "Politika Privatnosti"
|
|
50
50
|
},
|
|
51
|
-
sms: "
|
|
52
|
-
emailmarketing: "
|
|
51
|
+
sms: "Želim dobivati marketinški sadržaj putem sms",
|
|
52
|
+
emailmarketing: "Želim dobivati marketinški sadržaj putem e-maila"
|
|
53
53
|
},
|
|
54
54
|
fr: {
|
|
55
55
|
termsAndConditions: {
|
|
@@ -189,6 +189,9 @@ const PlayerUserConsents = class {
|
|
|
189
189
|
await getTranslations$1(this.translationUrl);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
+
connectedCallback() {
|
|
193
|
+
console.log('limba puliiiiii', this.lang);
|
|
194
|
+
}
|
|
192
195
|
userLegislationConsentHandler() {
|
|
193
196
|
this.userLegislationConsent.emit({
|
|
194
197
|
type: this.consentType,
|
|
@@ -207,15 +210,15 @@ const PlayerUserConsents = class {
|
|
|
207
210
|
determineTextContent() {
|
|
208
211
|
if (this.gmVersion === 'gmcore') {
|
|
209
212
|
if (this.consentType === 'termsandconditions') {
|
|
210
|
-
return index.h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.
|
|
213
|
+
return index.h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)), translate$1('termsAndConditions.acceptPart2', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('termsAndConditions.acceptPart3', this.lang));
|
|
211
214
|
}
|
|
212
215
|
}
|
|
213
216
|
if (this.gmVersion === 'gm16') {
|
|
214
217
|
if (this.consentType === 'termsandconditions') {
|
|
215
|
-
return index.h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.
|
|
218
|
+
return index.h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)));
|
|
216
219
|
}
|
|
217
220
|
if (this.consentType === 'privacypolicy') {
|
|
218
|
-
return index.h("p", null, translate$1('privacyPolicy.readUnderstandPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.
|
|
221
|
+
return index.h("p", null, translate$1('privacyPolicy.readUnderstandPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('privacyPolicy.readUnderstandPart2', this.lang));
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
return index.h("p", null, translate$1(this.consentType, this.lang));
|
|
@@ -236,40 +239,52 @@ const DEFAULT_LANGUAGE = 'en';
|
|
|
236
239
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
|
|
237
240
|
const TRANSLATIONS = {
|
|
238
241
|
en: {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
242
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
243
|
+
smsTitle: 'SMS marketing',
|
|
244
|
+
emailMarketingTitle: 'Email marketing',
|
|
245
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
246
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
247
|
+
submitButtonText: 'Submit'
|
|
243
248
|
},
|
|
244
249
|
ro: {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
250
|
+
termsAndConditionsTitle: 'Termeni şi condiţii',
|
|
251
|
+
smsTitle: 'SMS marketing',
|
|
252
|
+
emailMarketingTitle: 'Email marketing',
|
|
253
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
254
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
255
|
+
submitButtonText: 'Submit'
|
|
249
256
|
},
|
|
250
257
|
hr: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
258
|
+
termsAndConditionsTitle: 'Opći uvjeti i odredbe',
|
|
259
|
+
smsTitle: 'SMS makretinški sadržaj',
|
|
260
|
+
emailMarketingTitle: 'E-mail makretinški sadržaj',
|
|
261
|
+
privacyPolicyTitle: 'Politika Privatnosti',
|
|
262
|
+
userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
|
|
263
|
+
submitButtonText: 'Pošalji'
|
|
255
264
|
},
|
|
256
265
|
fr: {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
266
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
267
|
+
smsTitle: 'SMS marketing',
|
|
268
|
+
emailMarketingTitle: 'Email marketing',
|
|
269
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
270
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
271
|
+
submitButtonText: 'Submit'
|
|
261
272
|
},
|
|
262
273
|
cs: {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
274
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
275
|
+
smsTitle: 'SMS marketing',
|
|
276
|
+
emailMarketingTitle: 'Email marketing',
|
|
277
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
278
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
279
|
+
submitButtonText: 'Submit'
|
|
267
280
|
},
|
|
268
281
|
de: {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
282
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
283
|
+
smsTitle: 'SMS marketing',
|
|
284
|
+
emailMarketingTitle: 'Email marketing',
|
|
285
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
286
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
287
|
+
submitButtonText: 'Submit'
|
|
273
288
|
},
|
|
274
289
|
};
|
|
275
290
|
const getTranslations = (url) => {
|
|
@@ -339,10 +354,10 @@ const UserActionController = class {
|
|
|
339
354
|
this.mandatoryActions = ['termsandconditions', 'privacypolicy'];
|
|
340
355
|
this.userActions = [];
|
|
341
356
|
this.consentTitles = {
|
|
342
|
-
termsandconditions: translate('
|
|
343
|
-
sms: translate('
|
|
344
|
-
emailmarketing: translate('
|
|
345
|
-
privacypolicy: translate('
|
|
357
|
+
termsandconditions: translate('termsAndConditionsTitle', this.lang),
|
|
358
|
+
sms: translate('smsTitle', this.lang),
|
|
359
|
+
emailmarketing: translate('emailMarketingTitle', this.lang),
|
|
360
|
+
privacypolicy: translate('privacyPolicyTitle', this.lang)
|
|
346
361
|
};
|
|
347
362
|
this.setClientStyling = () => {
|
|
348
363
|
let sheet = document.createElement('style');
|
|
@@ -390,6 +405,9 @@ const UserActionController = class {
|
|
|
390
405
|
this.receivedQueryResponses++;
|
|
391
406
|
}
|
|
392
407
|
}
|
|
408
|
+
connectedCallback() {
|
|
409
|
+
console.log('--------', this.consentTitles);
|
|
410
|
+
}
|
|
393
411
|
determineUserActionsCore() {
|
|
394
412
|
const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
|
|
395
413
|
const headers = new Headers();
|
|
@@ -524,8 +542,8 @@ const UserActionController = class {
|
|
|
524
542
|
this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
|
|
525
543
|
return (index.h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (index.h("slot", { name: 'spinner' })
|
|
526
544
|
&&
|
|
527
|
-
index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (index.h("div", { class: "UserActionController" }, index.h("h2", { class: "UserConsentNotice" }, this.
|
|
528
|
-
index.h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, this.
|
|
545
|
+
index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (index.h("div", { class: "UserActionController" }, index.h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), index.h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (index.h("slot", { name: action }, index.h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
|
|
546
|
+
index.h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
|
|
529
547
|
}
|
|
530
548
|
else {
|
|
531
549
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-493ff4f6.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["player-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"
|
|
18
|
+
return index.bootstrapLazy([["player-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]]],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -38,10 +38,10 @@ export class UserActionController {
|
|
|
38
38
|
this.mandatoryActions = ['termsandconditions', 'privacypolicy'];
|
|
39
39
|
this.userActions = [];
|
|
40
40
|
this.consentTitles = {
|
|
41
|
-
termsandconditions: translate('
|
|
42
|
-
sms: translate('
|
|
43
|
-
emailmarketing: translate('
|
|
44
|
-
privacypolicy: translate('
|
|
41
|
+
termsandconditions: translate('termsAndConditionsTitle', this.lang),
|
|
42
|
+
sms: translate('smsTitle', this.lang),
|
|
43
|
+
emailmarketing: translate('emailMarketingTitle', this.lang),
|
|
44
|
+
privacypolicy: translate('privacyPolicyTitle', this.lang)
|
|
45
45
|
};
|
|
46
46
|
this.setClientStyling = () => {
|
|
47
47
|
let sheet = document.createElement('style');
|
|
@@ -89,6 +89,9 @@ export class UserActionController {
|
|
|
89
89
|
this.receivedQueryResponses++;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
+
connectedCallback() {
|
|
93
|
+
console.log('--------', this.consentTitles);
|
|
94
|
+
}
|
|
92
95
|
determineUserActionsCore() {
|
|
93
96
|
const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
|
|
94
97
|
const headers = new Headers();
|
|
@@ -225,11 +228,11 @@ export class UserActionController {
|
|
|
225
228
|
&&
|
|
226
229
|
h("svg", { class: "spinner", viewBox: "0 0 50 50" },
|
|
227
230
|
h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" },
|
|
228
|
-
h("h2", { class: "UserConsentNotice" }, this.
|
|
231
|
+
h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)),
|
|
229
232
|
h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action },
|
|
230
233
|
h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling": this.clientStyling }))))),
|
|
231
234
|
this.includeSubmitButton &&
|
|
232
|
-
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, this.
|
|
235
|
+
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
|
|
233
236
|
}
|
|
234
237
|
else {
|
|
235
238
|
return;
|
|
@@ -330,40 +333,6 @@ export class UserActionController {
|
|
|
330
333
|
"attribute": "include-submit-button",
|
|
331
334
|
"reflect": true
|
|
332
335
|
},
|
|
333
|
-
"submitButtonText": {
|
|
334
|
-
"type": "string",
|
|
335
|
-
"mutable": false,
|
|
336
|
-
"complexType": {
|
|
337
|
-
"original": "string",
|
|
338
|
-
"resolved": "string",
|
|
339
|
-
"references": {}
|
|
340
|
-
},
|
|
341
|
-
"required": false,
|
|
342
|
-
"optional": false,
|
|
343
|
-
"docs": {
|
|
344
|
-
"tags": [],
|
|
345
|
-
"text": "the text of the button, if button is enabled"
|
|
346
|
-
},
|
|
347
|
-
"attribute": "submit-button-text",
|
|
348
|
-
"reflect": true
|
|
349
|
-
},
|
|
350
|
-
"userNoticeText": {
|
|
351
|
-
"type": "string",
|
|
352
|
-
"mutable": false,
|
|
353
|
-
"complexType": {
|
|
354
|
-
"original": "string",
|
|
355
|
-
"resolved": "string",
|
|
356
|
-
"references": {}
|
|
357
|
-
},
|
|
358
|
-
"required": false,
|
|
359
|
-
"optional": false,
|
|
360
|
-
"docs": {
|
|
361
|
-
"tags": [],
|
|
362
|
-
"text": "the title of the action group"
|
|
363
|
-
},
|
|
364
|
-
"attribute": "user-notice-text",
|
|
365
|
-
"reflect": true
|
|
366
|
-
},
|
|
367
336
|
"gmVersion": {
|
|
368
337
|
"type": "string",
|
|
369
338
|
"mutable": false,
|
|
@@ -2,40 +2,52 @@ const DEFAULT_LANGUAGE = 'en';
|
|
|
2
2
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
4
|
en: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
6
|
+
smsTitle: 'SMS marketing',
|
|
7
|
+
emailMarketingTitle: 'Email marketing',
|
|
8
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
9
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
10
|
+
submitButtonText: 'Submit'
|
|
9
11
|
},
|
|
10
12
|
ro: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
termsAndConditionsTitle: 'Termeni şi condiţii',
|
|
14
|
+
smsTitle: 'SMS marketing',
|
|
15
|
+
emailMarketingTitle: 'Email marketing',
|
|
16
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
17
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
18
|
+
submitButtonText: 'Submit'
|
|
15
19
|
},
|
|
16
20
|
hr: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
termsAndConditionsTitle: 'Opći uvjeti i odredbe',
|
|
22
|
+
smsTitle: 'SMS makretinški sadržaj',
|
|
23
|
+
emailMarketingTitle: 'E-mail makretinški sadržaj',
|
|
24
|
+
privacyPolicyTitle: 'Politika Privatnosti',
|
|
25
|
+
userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
|
|
26
|
+
submitButtonText: 'Pošalji'
|
|
21
27
|
},
|
|
22
28
|
fr: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
30
|
+
smsTitle: 'SMS marketing',
|
|
31
|
+
emailMarketingTitle: 'Email marketing',
|
|
32
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
33
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
34
|
+
submitButtonText: 'Submit'
|
|
27
35
|
},
|
|
28
36
|
cs: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
38
|
+
smsTitle: 'SMS marketing',
|
|
39
|
+
emailMarketingTitle: 'Email marketing',
|
|
40
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
41
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
42
|
+
submitButtonText: 'Submit'
|
|
33
43
|
},
|
|
34
44
|
de: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
46
|
+
smsTitle: 'SMS marketing',
|
|
47
|
+
emailMarketingTitle: 'Email marketing',
|
|
48
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
49
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
50
|
+
submitButtonText: 'Submit'
|
|
39
51
|
},
|
|
40
52
|
};
|
|
41
53
|
export const getTranslations = (url) => {
|
|
@@ -34,18 +34,18 @@ const TRANSLATIONS = {
|
|
|
34
34
|
},
|
|
35
35
|
hr: {
|
|
36
36
|
termsAndConditions: {
|
|
37
|
-
acceptPart1: "
|
|
38
|
-
acceptPart2: "
|
|
39
|
-
acceptPart3: "
|
|
40
|
-
|
|
37
|
+
acceptPart1: "Prihvaćam Opće uvjete i odredbe ",
|
|
38
|
+
acceptPart2: "",
|
|
39
|
+
acceptPart3: "",
|
|
40
|
+
tcLink: "Opći uvjeti i odredbe"
|
|
41
41
|
},
|
|
42
42
|
privacyPolicy: {
|
|
43
|
-
readUnderstandPart1: "
|
|
44
|
-
readUnderstandPart2: ",
|
|
45
|
-
|
|
43
|
+
readUnderstandPart1: "Pročitao sam i razumijem Politiku Privatnosti ",
|
|
44
|
+
readUnderstandPart2: ", i potvrđujem da imam više od 18 godina",
|
|
45
|
+
privacyLink: "Politika Privatnosti"
|
|
46
46
|
},
|
|
47
|
-
sms: "
|
|
48
|
-
emailmarketing: "
|
|
47
|
+
sms: "Želim dobivati marketinški sadržaj putem sms",
|
|
48
|
+
emailmarketing: "Želim dobivati marketinški sadržaj putem e-maila"
|
|
49
49
|
},
|
|
50
50
|
fr: {
|
|
51
51
|
termsAndConditions: {
|
|
@@ -187,6 +187,9 @@ const PlayerUserConsents = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
187
187
|
await getTranslations(this.translationUrl);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
+
connectedCallback() {
|
|
191
|
+
console.log('limba puliiiiii', this.lang);
|
|
192
|
+
}
|
|
190
193
|
userLegislationConsentHandler() {
|
|
191
194
|
this.userLegislationConsent.emit({
|
|
192
195
|
type: this.consentType,
|
|
@@ -205,15 +208,15 @@ const PlayerUserConsents = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
205
208
|
determineTextContent() {
|
|
206
209
|
if (this.gmVersion === 'gmcore') {
|
|
207
210
|
if (this.consentType === 'termsandconditions') {
|
|
208
|
-
return h("p", null, translate('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.
|
|
211
|
+
return h("p", null, translate('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.tcLink', this.lang)), translate('termsAndConditions.acceptPart2', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacyPolicy.privacyLink', this.lang)), translate('termsAndConditions.acceptPart3', this.lang));
|
|
209
212
|
}
|
|
210
213
|
}
|
|
211
214
|
if (this.gmVersion === 'gm16') {
|
|
212
215
|
if (this.consentType === 'termsandconditions') {
|
|
213
|
-
return h("p", null, translate('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.
|
|
216
|
+
return h("p", null, translate('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.tcLink', this.lang)));
|
|
214
217
|
}
|
|
215
218
|
if (this.consentType === 'privacypolicy') {
|
|
216
|
-
return h("p", null, translate('privacyPolicy.readUnderstandPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacyPolicy.
|
|
219
|
+
return h("p", null, translate('privacyPolicy.readUnderstandPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacyPolicy.privacyLink', this.lang)), translate('privacyPolicy.readUnderstandPart2', this.lang));
|
|
217
220
|
}
|
|
218
221
|
}
|
|
219
222
|
return h("p", null, translate(this.consentType, this.lang));
|
|
@@ -5,40 +5,52 @@ const DEFAULT_LANGUAGE = 'en';
|
|
|
5
5
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
|
|
6
6
|
const TRANSLATIONS = {
|
|
7
7
|
en: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
9
|
+
smsTitle: 'SMS marketing',
|
|
10
|
+
emailMarketingTitle: 'Email marketing',
|
|
11
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
12
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
13
|
+
submitButtonText: 'Submit'
|
|
12
14
|
},
|
|
13
15
|
ro: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
termsAndConditionsTitle: 'Termeni şi condiţii',
|
|
17
|
+
smsTitle: 'SMS marketing',
|
|
18
|
+
emailMarketingTitle: 'Email marketing',
|
|
19
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
20
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
21
|
+
submitButtonText: 'Submit'
|
|
18
22
|
},
|
|
19
23
|
hr: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
termsAndConditionsTitle: 'Opći uvjeti i odredbe',
|
|
25
|
+
smsTitle: 'SMS makretinški sadržaj',
|
|
26
|
+
emailMarketingTitle: 'E-mail makretinški sadržaj',
|
|
27
|
+
privacyPolicyTitle: 'Politika Privatnosti',
|
|
28
|
+
userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
|
|
29
|
+
submitButtonText: 'Pošalji'
|
|
24
30
|
},
|
|
25
31
|
fr: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
33
|
+
smsTitle: 'SMS marketing',
|
|
34
|
+
emailMarketingTitle: 'Email marketing',
|
|
35
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
36
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
37
|
+
submitButtonText: 'Submit'
|
|
30
38
|
},
|
|
31
39
|
cs: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
41
|
+
smsTitle: 'SMS marketing',
|
|
42
|
+
emailMarketingTitle: 'Email marketing',
|
|
43
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
44
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
45
|
+
submitButtonText: 'Submit'
|
|
36
46
|
},
|
|
37
47
|
de: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
49
|
+
smsTitle: 'SMS marketing',
|
|
50
|
+
emailMarketingTitle: 'Email marketing',
|
|
51
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
52
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
53
|
+
submitButtonText: 'Submit'
|
|
42
54
|
},
|
|
43
55
|
};
|
|
44
56
|
const getTranslations = (url) => {
|
|
@@ -110,10 +122,10 @@ const UserActionController$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
110
122
|
this.mandatoryActions = ['termsandconditions', 'privacypolicy'];
|
|
111
123
|
this.userActions = [];
|
|
112
124
|
this.consentTitles = {
|
|
113
|
-
termsandconditions: translate('
|
|
114
|
-
sms: translate('
|
|
115
|
-
emailmarketing: translate('
|
|
116
|
-
privacypolicy: translate('
|
|
125
|
+
termsandconditions: translate('termsAndConditionsTitle', this.lang),
|
|
126
|
+
sms: translate('smsTitle', this.lang),
|
|
127
|
+
emailmarketing: translate('emailMarketingTitle', this.lang),
|
|
128
|
+
privacypolicy: translate('privacyPolicyTitle', this.lang)
|
|
117
129
|
};
|
|
118
130
|
this.setClientStyling = () => {
|
|
119
131
|
let sheet = document.createElement('style');
|
|
@@ -161,6 +173,9 @@ const UserActionController$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
161
173
|
this.receivedQueryResponses++;
|
|
162
174
|
}
|
|
163
175
|
}
|
|
176
|
+
connectedCallback() {
|
|
177
|
+
console.log('--------', this.consentTitles);
|
|
178
|
+
}
|
|
164
179
|
determineUserActionsCore() {
|
|
165
180
|
const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
|
|
166
181
|
const headers = new Headers();
|
|
@@ -295,8 +310,8 @@ const UserActionController$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
295
310
|
this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
|
|
296
311
|
return (h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("slot", { name: 'spinner' })
|
|
297
312
|
&&
|
|
298
|
-
h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, this.
|
|
299
|
-
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, this.
|
|
313
|
+
h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
|
|
314
|
+
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
|
|
300
315
|
}
|
|
301
316
|
else {
|
|
302
317
|
return;
|
|
@@ -313,8 +328,6 @@ const UserActionController$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
313
328
|
"userId": [513, "user-id"],
|
|
314
329
|
"lang": [1537],
|
|
315
330
|
"includeSubmitButton": [516, "include-submit-button"],
|
|
316
|
-
"submitButtonText": [513, "submit-button-text"],
|
|
317
|
-
"userNoticeText": [513, "user-notice-text"],
|
|
318
331
|
"gmVersion": [1, "gm-version"],
|
|
319
332
|
"translationUrl": [513, "translation-url"],
|
|
320
333
|
"clientStyling": [1537, "client-styling"],
|
|
@@ -1003,6 +1003,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1003
1003
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1004
1004
|
}
|
|
1005
1005
|
endNewInstance();
|
|
1006
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1006
1007
|
}
|
|
1007
1008
|
if (Cstr.style) {
|
|
1008
1009
|
// this component has styles but we haven't registered them yet
|
|
@@ -1031,6 +1032,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1031
1032
|
schedule();
|
|
1032
1033
|
}
|
|
1033
1034
|
};
|
|
1035
|
+
const fireConnectedCallback = (instance) => {
|
|
1036
|
+
{
|
|
1037
|
+
safeCall(instance, 'connectedCallback');
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1034
1040
|
const connectedCallback = (elm) => {
|
|
1035
1041
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1036
1042
|
const hostRef = getHostRef(elm);
|
|
@@ -1074,6 +1080,8 @@ const connectedCallback = (elm) => {
|
|
|
1074
1080
|
// reattach any event listeners to the host
|
|
1075
1081
|
// since they would have been removed when disconnected
|
|
1076
1082
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1083
|
+
// fire off connectedCallback() on component instance
|
|
1084
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1077
1085
|
}
|
|
1078
1086
|
endConnected();
|
|
1079
1087
|
}
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-48c00f0b.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"
|
|
13
|
+
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]]],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-48c00f0b.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
4
4
|
const TRANSLATIONS$1 = {
|
|
@@ -34,18 +34,18 @@ const TRANSLATIONS$1 = {
|
|
|
34
34
|
},
|
|
35
35
|
hr: {
|
|
36
36
|
termsAndConditions: {
|
|
37
|
-
acceptPart1: "
|
|
38
|
-
acceptPart2: "
|
|
39
|
-
acceptPart3: "
|
|
40
|
-
|
|
37
|
+
acceptPart1: "Prihvaćam Opće uvjete i odredbe ",
|
|
38
|
+
acceptPart2: "",
|
|
39
|
+
acceptPart3: "",
|
|
40
|
+
tcLink: "Opći uvjeti i odredbe"
|
|
41
41
|
},
|
|
42
42
|
privacyPolicy: {
|
|
43
|
-
readUnderstandPart1: "
|
|
44
|
-
readUnderstandPart2: ",
|
|
45
|
-
|
|
43
|
+
readUnderstandPart1: "Pročitao sam i razumijem Politiku Privatnosti ",
|
|
44
|
+
readUnderstandPart2: ", i potvrđujem da imam više od 18 godina",
|
|
45
|
+
privacyLink: "Politika Privatnosti"
|
|
46
46
|
},
|
|
47
|
-
sms: "
|
|
48
|
-
emailmarketing: "
|
|
47
|
+
sms: "Želim dobivati marketinški sadržaj putem sms",
|
|
48
|
+
emailmarketing: "Želim dobivati marketinški sadržaj putem e-maila"
|
|
49
49
|
},
|
|
50
50
|
fr: {
|
|
51
51
|
termsAndConditions: {
|
|
@@ -185,6 +185,9 @@ const PlayerUserConsents = class {
|
|
|
185
185
|
await getTranslations$1(this.translationUrl);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
+
connectedCallback() {
|
|
189
|
+
console.log('limba puliiiiii', this.lang);
|
|
190
|
+
}
|
|
188
191
|
userLegislationConsentHandler() {
|
|
189
192
|
this.userLegislationConsent.emit({
|
|
190
193
|
type: this.consentType,
|
|
@@ -203,15 +206,15 @@ const PlayerUserConsents = class {
|
|
|
203
206
|
determineTextContent() {
|
|
204
207
|
if (this.gmVersion === 'gmcore') {
|
|
205
208
|
if (this.consentType === 'termsandconditions') {
|
|
206
|
-
return h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.
|
|
209
|
+
return h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)), translate$1('termsAndConditions.acceptPart2', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('termsAndConditions.acceptPart3', this.lang));
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
212
|
if (this.gmVersion === 'gm16') {
|
|
210
213
|
if (this.consentType === 'termsandconditions') {
|
|
211
|
-
return h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.
|
|
214
|
+
return h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)));
|
|
212
215
|
}
|
|
213
216
|
if (this.consentType === 'privacypolicy') {
|
|
214
|
-
return h("p", null, translate$1('privacyPolicy.readUnderstandPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.
|
|
217
|
+
return h("p", null, translate$1('privacyPolicy.readUnderstandPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('privacyPolicy.readUnderstandPart2', this.lang));
|
|
215
218
|
}
|
|
216
219
|
}
|
|
217
220
|
return h("p", null, translate$1(this.consentType, this.lang));
|
|
@@ -232,40 +235,52 @@ const DEFAULT_LANGUAGE = 'en';
|
|
|
232
235
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
|
|
233
236
|
const TRANSLATIONS = {
|
|
234
237
|
en: {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
239
|
+
smsTitle: 'SMS marketing',
|
|
240
|
+
emailMarketingTitle: 'Email marketing',
|
|
241
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
242
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
243
|
+
submitButtonText: 'Submit'
|
|
239
244
|
},
|
|
240
245
|
ro: {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
246
|
+
termsAndConditionsTitle: 'Termeni şi condiţii',
|
|
247
|
+
smsTitle: 'SMS marketing',
|
|
248
|
+
emailMarketingTitle: 'Email marketing',
|
|
249
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
250
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
251
|
+
submitButtonText: 'Submit'
|
|
245
252
|
},
|
|
246
253
|
hr: {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
254
|
+
termsAndConditionsTitle: 'Opći uvjeti i odredbe',
|
|
255
|
+
smsTitle: 'SMS makretinški sadržaj',
|
|
256
|
+
emailMarketingTitle: 'E-mail makretinški sadržaj',
|
|
257
|
+
privacyPolicyTitle: 'Politika Privatnosti',
|
|
258
|
+
userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
|
|
259
|
+
submitButtonText: 'Pošalji'
|
|
251
260
|
},
|
|
252
261
|
fr: {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
262
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
263
|
+
smsTitle: 'SMS marketing',
|
|
264
|
+
emailMarketingTitle: 'Email marketing',
|
|
265
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
266
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
267
|
+
submitButtonText: 'Submit'
|
|
257
268
|
},
|
|
258
269
|
cs: {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
271
|
+
smsTitle: 'SMS marketing',
|
|
272
|
+
emailMarketingTitle: 'Email marketing',
|
|
273
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
274
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
275
|
+
submitButtonText: 'Submit'
|
|
263
276
|
},
|
|
264
277
|
de: {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
278
|
+
termsAndConditionsTitle: 'Terms and Conditions',
|
|
279
|
+
smsTitle: 'SMS marketing',
|
|
280
|
+
emailMarketingTitle: 'Email marketing',
|
|
281
|
+
privacyPolicyTitle: 'Privacy Policy',
|
|
282
|
+
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
283
|
+
submitButtonText: 'Submit'
|
|
269
284
|
},
|
|
270
285
|
};
|
|
271
286
|
const getTranslations = (url) => {
|
|
@@ -335,10 +350,10 @@ const UserActionController = class {
|
|
|
335
350
|
this.mandatoryActions = ['termsandconditions', 'privacypolicy'];
|
|
336
351
|
this.userActions = [];
|
|
337
352
|
this.consentTitles = {
|
|
338
|
-
termsandconditions: translate('
|
|
339
|
-
sms: translate('
|
|
340
|
-
emailmarketing: translate('
|
|
341
|
-
privacypolicy: translate('
|
|
353
|
+
termsandconditions: translate('termsAndConditionsTitle', this.lang),
|
|
354
|
+
sms: translate('smsTitle', this.lang),
|
|
355
|
+
emailmarketing: translate('emailMarketingTitle', this.lang),
|
|
356
|
+
privacypolicy: translate('privacyPolicyTitle', this.lang)
|
|
342
357
|
};
|
|
343
358
|
this.setClientStyling = () => {
|
|
344
359
|
let sheet = document.createElement('style');
|
|
@@ -386,6 +401,9 @@ const UserActionController = class {
|
|
|
386
401
|
this.receivedQueryResponses++;
|
|
387
402
|
}
|
|
388
403
|
}
|
|
404
|
+
connectedCallback() {
|
|
405
|
+
console.log('--------', this.consentTitles);
|
|
406
|
+
}
|
|
389
407
|
determineUserActionsCore() {
|
|
390
408
|
const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
|
|
391
409
|
const headers = new Headers();
|
|
@@ -520,8 +538,8 @@ const UserActionController = class {
|
|
|
520
538
|
this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
|
|
521
539
|
return (h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("slot", { name: 'spinner' })
|
|
522
540
|
&&
|
|
523
|
-
h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, this.
|
|
524
|
-
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, this.
|
|
541
|
+
h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
|
|
542
|
+
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
|
|
525
543
|
}
|
|
526
544
|
else {
|
|
527
545
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-48c00f0b.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"
|
|
16
|
+
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]]],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -24,14 +24,6 @@ export declare class UserActionController {
|
|
|
24
24
|
* whether or not to include the submit button (in case we want to compose a different )
|
|
25
25
|
*/
|
|
26
26
|
includeSubmitButton: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* the text of the button, if button is enabled
|
|
29
|
-
*/
|
|
30
|
-
submitButtonText: string;
|
|
31
|
-
/**
|
|
32
|
-
* the title of the action group
|
|
33
|
-
*/
|
|
34
|
-
userNoticeText: string;
|
|
35
27
|
/**
|
|
36
28
|
* Select GM version
|
|
37
29
|
*/
|
|
@@ -67,6 +59,7 @@ export declare class UserActionController {
|
|
|
67
59
|
private userActions;
|
|
68
60
|
private stylingContainer;
|
|
69
61
|
private consentTitles;
|
|
62
|
+
connectedCallback(): void;
|
|
70
63
|
determineUserActionsCore(): Promise<void>;
|
|
71
64
|
determineUserActions16(): Promise<void>;
|
|
72
65
|
updateUserConsents(): void;
|
|
@@ -31,10 +31,6 @@ export namespace Components {
|
|
|
31
31
|
* Language
|
|
32
32
|
*/
|
|
33
33
|
"lang": string;
|
|
34
|
-
/**
|
|
35
|
-
* the text of the button, if button is enabled
|
|
36
|
-
*/
|
|
37
|
-
"submitButtonText": string;
|
|
38
34
|
/**
|
|
39
35
|
* Translation url
|
|
40
36
|
*/
|
|
@@ -43,10 +39,6 @@ export namespace Components {
|
|
|
43
39
|
* user id required for the update call
|
|
44
40
|
*/
|
|
45
41
|
"userId": string;
|
|
46
|
-
/**
|
|
47
|
-
* the title of the action group
|
|
48
|
-
*/
|
|
49
|
-
"userNoticeText": string;
|
|
50
42
|
/**
|
|
51
43
|
* user session required for the update call
|
|
52
44
|
*/
|
|
@@ -90,10 +82,6 @@ declare namespace LocalJSX {
|
|
|
90
82
|
* Language
|
|
91
83
|
*/
|
|
92
84
|
"lang"?: string;
|
|
93
|
-
/**
|
|
94
|
-
* the text of the button, if button is enabled
|
|
95
|
-
*/
|
|
96
|
-
"submitButtonText"?: string;
|
|
97
85
|
/**
|
|
98
86
|
* Translation url
|
|
99
87
|
*/
|
|
@@ -102,10 +90,6 @@ declare namespace LocalJSX {
|
|
|
102
90
|
* user id required for the update call
|
|
103
91
|
*/
|
|
104
92
|
"userId": string;
|
|
105
|
-
/**
|
|
106
|
-
* the title of the action group
|
|
107
|
-
*/
|
|
108
|
-
"userNoticeText"?: string;
|
|
109
93
|
/**
|
|
110
94
|
* user session required for the update call
|
|
111
95
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},c={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=e,r=a(t,s),i=f(n);c.ael(o,l,r,i),(t.o=t.o||[]).push((()=>c.rel(o,l,r,i)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){K(e)}},f=e=>0!=(2&e),h=new WeakMap,d=e=>"sc-"+e.h,$={},m=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...n)=>{let l=null,s=!1,o=!1,c=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?c[c.length-1].$+=l:c.push(s?y(null,l):l),o=s)};if(r(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=y(e,null);return i.m=t,c.length>0&&(i.p=c),i},y=(e,t)=>({t:0,g:e,$:t,v:null,p:null,m:null}),b={},w=(e,t,n,l,o,r)=>{if(n!==l){let i=J(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=v(n),o=v(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const s=m(l);if((i||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):J(s,u)?u.slice(2):u[2]+t.slice(3),n&&c.rel(e,t,n,!1),l&&c.ael(e,t,l,!1)}},g=/\s/,v=e=>e?e.split(g):[],S=(e,t,n,l)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.m||$,c=t.m||$;for(l in o)l in c||w(s,l,o[l],void 0,n,t.t);for(l in c)w(s,l,o[l],c[l],n,t.t)},j=(t,l,s)=>{let c,r,i=l.p[s],u=0;if(null!==i.$)c=i.v=o.createTextNode(i.$);else{if(n||(n="svg"===i.g),c=i.v=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.g),n&&"foreignObject"===i.g&&(n=!1),S(null,i,n),null!=e&&c["s-si"]!==e&&c.classList.add(c["s-si"]=e),i.p)for(u=0;u<i.p.length;++u)r=j(t,i,u),r&&c.appendChild(r);"svg"===i.g?n=!1:"foreignObject"===c.tagName&&(n=!0)}return c},O=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=j(null,l,o),r&&(s[o].v=r,i.insertBefore(r,n)))},M=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.v,x(l),s.remove())},k=(e,t)=>e.g===t.g,C=(e,t)=>{const l=t.v=e.v,s=e.p,o=t.p,c=t.g,r=t.$;null===r?(n="svg"===c||"foreignObject"!==c&&n,"slot"===c||S(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],u=t[r],a=l.length-1,f=l[0],h=l[a];for(;o<=r&&c<=a;)null==i?i=t[++o]:null==u?u=t[--r]:null==f?f=l[++c]:null==h?h=l[--a]:k(i,f)?(C(i,f),i=t[++o],f=l[++c]):k(u,h)?(C(u,h),u=t[--r],h=l[--a]):k(i,h)?(C(i,h),e.insertBefore(i.v,u.v.nextSibling),i=t[++o],h=l[--a]):k(u,f)?(C(u,f),e.insertBefore(u.v,i.v),u=t[--r],f=l[++c]):(s=j(t&&t[c],n,c),f=l[++c],s&&i.v.parentNode.insertBefore(s,i.v));o>r?O(e,null==l[a+1]?null:l[a+1].v,n,l,c,a):c>a&&M(t,o,r)})(l,s,t,o):null!==o?(null!==e.$&&(l.textContent=""),O(l,null,t,o,0,o.length-1)):null!==s&&M(s,0,s.length-1),n&&"svg"===c&&(n=!1)):e.$!==r&&(l.data=r)},x=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(x)},P=(e,t,n)=>{const l=(e=>B(e).S)(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=c.ce(t,n);return e.dispatchEvent(l),l},L=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},N=(e,t)=>{if(e.t|=16,!(4&e.t))return L(e,e.O),oe((()=>R(e,t)));e.t|=512},R=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>q(n,e,t))),e.u=null),l=q(n,"componentWillLoad")),D(l,(()=>T(e,n,t)))},T=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.S,l=t.t,s=((e,t)=>{let n=d(t),l=Y.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);W(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>A(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},W=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.M,c=n.k||y(null,null),r=(e=>e&&e.g===b)(l)?l:p(null,null,l);t=s.tagName,o.C&&(r.m=r.m||{},o.C.map((([e,t])=>r.m[t]=s[e]))),r.g=null,r.t|=4,n.k=r,r.v=c.v=s.shadowRoot||s,e=s["s-sc"],C(c,r)})(n,l)}catch(e){K(e,n.S)}return null},A=e=>{const t=e.S,n=e.O;q(e.i,"componentDidRender"),64&e.t||(e.t|=64,F(t),e.P(t),n||U()),e.j&&(e.j(),e.j=void 0),512&e.t&&se((()=>N(e,!1))),e.t&=-517},U=()=>{F(o.documentElement),se((()=>E(s,"appload",{detail:{namespace:"user-action-controller"}})))},q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){K(e)}},D=(e,t)=>e&&e.then?e.then(t):t(),F=e=>e.classList.add("hydrated"),H=(e,t,n)=>{if(t.L){e.watchers&&(t.N=e.watchers);const l=Object.entries(t.L),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>B(this).R.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=B(e),o=s.S,c=s.R.get(t),r=s.t,i=s.i;if(n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.L[t][0]),(!(8&r)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.R.set(t,n),i)){if(l.N&&128&r){const e=l.N[t];e&&e.map((e=>{try{i[e](n,c,t)}catch(e){K(e,o)}}))}2==(18&r)&&N(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){c.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.C.push([e,s]),s}))}}return e},V=e=>{q(e,"connectedCallback")},_=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let m,p=!0;Object.assign(c,t),c.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],h:t[1],L:t[2],T:t[3]};s.L=t[2],s.T=t[3],s.C=[],s.N={};const o=s.h,a=class extends HTMLElement{constructor(e){super(e),I(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){m&&(clearTimeout(m),m=null),p?$.push(this):c.jmp((()=>(e=>{if(0==(1&c.t)){const t=B(e),n=t.M,l=()=>{};if(1&t.t)u(e,t,n.T),V(t.i);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){L(t,t.O=n);break}}n.L&&Object.entries(n.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=X(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.N=s.watchers,H(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){K(e)}t.t&=-9,t.t|=128,e(),V(t.i)}if(s.style){let e=s.style;const t=d(n);if(!Y.has(t)){const l=()=>{};((e,t,n)=>{let l=Y.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,Y.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.O,c=()=>N(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){c.jmp((()=>(()=>{if(0==(1&c.t)){const e=B(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return B(this).W}};s.A=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,H(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),p=!1,$.length?$.map((e=>e.connectedCallback())):c.jmp((()=>m=setTimeout(U,30)))},z=new WeakMap,B=e=>z.get(e),G=(e,t)=>z.set(t.i=e,t),I=(e,t)=>{const n={t:0,S:e,M:t,R:new Map};return n.W=new Promise((e=>n.P=e)),e["s-p"]=[],e["s-rc"]=[],u(e,n,t.T),z.set(e,n)},J=(e,t)=>t in e,K=(e,t)=>(0,console.error)(e,t),Q=new Map,X=e=>{const t=e.h.replace(/-/g,"_"),n=e.A,l=Q.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(Q.set(n,e),e[t])),K)},Y=new Map,Z=[],ee=[],te=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&c.t?se(le):c.raf(le))},ne=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){K(e)}e.length=0},le=()=>{ne(Z),ne(ee),(l=Z.length>0)&&c.raf(le)},se=e=>r().then(e),oe=te(ee,!0);export{_ as b,P as c,p as h,r as p,G as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-14f59175.js";const s={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"Prihvaćam Opće uvjete i odredbe ",acceptPart2:"",acceptPart3:"",tcLink:"Opći uvjeti i odredbe"},privacyPolicy:{readUnderstandPart1:"Pročitao sam i razumijem Politiku Privatnosti ",readUnderstandPart2:", i potvrđujem da imam više od 18 godina",privacyLink:"Politika Privatnosti"},sms:"Želim dobivati marketinški sadržaj putem sms",emailmarketing:"Želim dobivati marketinški sadržaj putem e-maila"},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},n=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])s[e][i]=t[e][i]})),e(!0)}))})),o=(t,e,i)=>{let n=(o=s[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),o));var o;if(null===n)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},a=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1,this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}handleNewTranslations(){n(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await n(this.translationUrl)}connectedCallback(){console.log("limba puliiiiii",this.lang)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,o("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},o("termsAndConditions.tcLink",this.lang)),o("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},o("privacyPolicy.privacyLink",this.lang)),o("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,o("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},o("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,o("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},o("privacyPolicy.privacyLink",this.lang)),o("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,o(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{ref:t=>this.stylingContainer=t},i("p",{class:"ConsentTitle"},this.consentTitle),i("label",{class:"UserConsent",htmlFor:"userConsent"},i("input",{ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};a.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emfe-w-color-primary);font-weight:bold}";const r=["ro","en","cz","de","hr"],c={en:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},ro:{termsAndConditionsTitle:"Termeni şi condiţii",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},hr:{termsAndConditionsTitle:"Opći uvjeti i odredbe",smsTitle:"SMS makretinški sadržaj",emailMarketingTitle:"E-mail makretinški sadržaj",privacyPolicyTitle:"Politika Privatnosti",userNoticeText:"Prije nego što možete nastaviti, morate pristati na sljedeće",submitButtonText:"Pošalji"},fr:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},cs:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},de:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"}},d=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])c[e][i]=t[e][i]})),e(!0)}))})),l=(t,e,i)=>{const s=e;let n=c[void 0!==s&&r.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},h=class{constructor(e){t(this,e),this.lang="en",this.gmVersion="",this.translationUrl="",this.clientStyling="",this.clientStylingUrl="",this.queryFired=!1,this.readyActionsCount=0,this.activeUserActions=[],this.userActionsValidated=!0,this.receivedQueryResponses=0,this.limitStylingAppends=!1,this.isLoading=!0,this.mandatoryActionsChecked=0,this.mandatoryActions=["termsandconditions","privacypolicy"],this.userActions=[],this.consentTitles={termsandconditions:l("termsAndConditionsTitle",this.lang),sms:l("smsTitle",this.lang),emailmarketing:l("emailMarketingTitle",this.lang),privacypolicy:l("privacyPolicyTitle",this.lang)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStyling=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}handleNewTranslations(){d(this.translationUrl)}handleQueryResponse(){this.receivedQueryResponses===this.activeUserActions.length&&this.updateUserConsents()}userLegislationConsentHandler(t){const e=t.detail.type,i=t.detail.value;this.mandatoryActions.includes(e)&&!1===this.queryFired&&(!0===i?this.mandatoryActionsChecked++:this.mandatoryActionsChecked--),this.queryFired&&(this.userActions.push(Object.assign({tagCode:e,status:(t=>"gm16"===this.gmVersion?t?1:0:t?"Accepted":"Denied")(i)},"gm16"===this.gmVersion&&{note:""})),this.receivedQueryResponses++)}connectedCallback(){console.log("--------",this.consentTitles)}determineUserActionsCore(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/consent`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.items.forEach((t=>{"Expired"===t.status&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}determineUserActions16(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.consents.forEach((t=>{2===t.status&&"pepconsent"!==t.tagCode&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}updateUserConsents(){const t="gmcore"===this.gmVersion?new URL(`${this.endpoint}/v1/player/${this.userId}/consent`):new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);let e={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-SessionId":`${this.userSession}`},body:JSON.stringify({consents:this.userActions})};fetch(t.href,e).then((t=>t.json())).then((()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:"Consent update successful!"}},window.location.href)})).catch((t=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Server might not be responding",err:t}},window.location.href)})).finally((()=>{window.postMessage({type:"UserActionsCompleted"},window.location.href)}))}handleApplyClick(){this.queryFired=!0}async componentWillLoad(){"gmcore"===this.gmVersion&&this.determineUserActionsCore(),"gm16"===this.gmVersion&&this.determineUserActions16(),this.translationUrl.length>2&&await d(this.translationUrl)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}calcMandatoryActions(){this.mandatoryItems=0,this.mandatoryActions.map((t=>{this.activeUserActions.includes(t)&&this.mandatoryItems++}))}render(){return this.mandatoryItems>0?(this.userActionsValidated=this.mandatoryActionsChecked===this.mandatoryItems,i("div",{class:"QueryReferenceContainer",ref:t=>this.stylingContainer=t},this.isLoading?i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})):i("div",{class:"UserActionController"},i("h2",{class:"UserConsentNotice"},l("userNoticeText",this.lang)),i("div",{class:"PlayerLegislationWrapper"},this.activeUserActions.map((t=>i("slot",{name:t},i("player-user-consents",{lang:this.lang,"gm-version":this.gmVersion,"translation-url":this.translationUrl,consentType:t,consentTitle:this.consentTitles[t],queried:this.queryFired,mandatory:this.mandatoryActions.includes(t),"client-styling":this.clientStyling}))))),this.includeSubmitButton&&i("button",{class:"ConsentSubmitButton",disabled:!this.userActionsValidated,onClick:()=>this.handleApplyClick()},l("submitButtonText",this.lang))))):void 0}static get watchers(){return{translationUrl:["handleNewTranslations"],receivedQueryResponses:["handleQueryResponse"]}}};h.style=":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserConsentNotice{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserActionController{font-family:Arial, Helvetica, sans-serif;font-weight:100;height:100%;width:100%;padding:1rem 1.5rem 2rem;background-color:#fff;display:flex;flex-direction:column;justify-content:space-between;border-radius:5%}.ConsentSubmitButton{font-size:1rem;padding:0.4rem 1.4rem;background:#fff;border:2px solid #000;color:#000;border-radius:5px;align-self:flex-end;cursor:pointer}.ConsentSubmitButton:disabled{border:2px solid #ccc;color:#ccc;cursor:unset}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:blue}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";export{a as player_user_consents,h as user_action_controller}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as n,b as t}from"./p-14f59175.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((n=>t([["p-b752e6c9",[[1,"user-action-controller",{endpoint:[513],userSession:[513,"user-session"],userId:[513,"user-id"],lang:[1537],includeSubmitButton:[516,"include-submit-button"],gmVersion:[1,"gm-version"],translationUrl:[513,"translation-url"],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],queryFired:[32],readyActionsCount:[32],activeUserActions:[32],userActionsValidated:[32],receivedQueryResponses:[32],limitStylingAppends:[32],isLoading:[32],mandatoryActionsChecked:[32],mandatoryItems:[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]]],[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],gmVersion:[1,"gm-version"],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],translationUrl:[513,"translation-url"],textContent:[32],limitStylingAppends:[32]}]]]],n)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/user-action-controller",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.11",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"es2015": "./dist/esm/index.mjs",
|
|
@@ -15,5 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@everymatrix/player-user-consents": "*"
|
|
18
21
|
}
|
|
19
22
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-ba444709.js";const s={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},n=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])s[e][i]=t[e][i]})),e(!0)}))})),a=(t,e,i)=>{let n=(a=s[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),a));var a;if(null===n)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},r=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1,this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}handleNewTranslations(){n(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await n(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,a("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},a("termsAndConditions.tc",this.lang)),a("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},a("privacyPolicy.privacy",this.lang)),a("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,a("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},a("termsAndConditions.tc",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,a("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},a("privacyPolicy.privacy",this.lang)),a("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,a(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{ref:t=>this.stylingContainer=t},i("p",{class:"ConsentTitle"},this.consentTitle),i("label",{class:"UserConsent",htmlFor:"userConsent"},i("input",{ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};r.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emfe-w-color-primary);font-weight:bold}";const o=["ro","en","cz","de","hr"],c={en:{termsandconditions:"Terms and Conditions",sms:"SMS marketing",emailmarketing:"Email marketing",privacypolicy:"Privacy Policy"},ro:{termsandconditions:"Termeni şi condiţii",sms:"SMS marketing",emailmarketing:"Email marketing",privacypolicy:"Privacy Policy"},hr:{termsandconditions:"Terms and Conditions",sms:"SMS marketing",emailmarketing:"Email marketing",privacypolicy:"Privacy Policy"},fr:{termsandconditions:"Terms and Conditions",sms:"SMS marketing",emailmarketing:"Email marketing",privacypolicy:"Privacy Policy"},cs:{termsandconditions:"Terms and Conditions",sms:"SMS marketing",emailmarketing:"Email marketing",privacypolicy:"Privacy Policy"},de:{termsandconditions:"Terms and Conditions",sms:"SMS marketing",emailmarketing:"Email marketing",privacypolicy:"Privacy Policy"}},d=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])c[e][i]=t[e][i]})),e(!0)}))})),h=(t,e,i)=>{const s=e;let n=c[void 0!==s&&o.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},l=class{constructor(e){t(this,e),this.lang="en",this.gmVersion="",this.translationUrl="",this.clientStyling="",this.clientStylingUrl="",this.queryFired=!1,this.readyActionsCount=0,this.activeUserActions=[],this.userActionsValidated=!0,this.receivedQueryResponses=0,this.limitStylingAppends=!1,this.isLoading=!0,this.mandatoryActionsChecked=0,this.mandatoryActions=["termsandconditions","privacypolicy"],this.userActions=[],this.consentTitles={termsandconditions:h("termsandconditions",this.lang),sms:h("sms",this.lang),emailmarketing:h("emailmarketing",this.lang),privacypolicy:h("privacypolicy",this.lang)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStyling=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}handleNewTranslations(){d(this.translationUrl)}handleQueryResponse(){this.receivedQueryResponses===this.activeUserActions.length&&this.updateUserConsents()}userLegislationConsentHandler(t){const e=t.detail.type,i=t.detail.value;this.mandatoryActions.includes(e)&&!1===this.queryFired&&(!0===i?this.mandatoryActionsChecked++:this.mandatoryActionsChecked--),this.queryFired&&(this.userActions.push(Object.assign({tagCode:e,status:(t=>"gm16"===this.gmVersion?t?1:0:t?"Accepted":"Denied")(i)},"gm16"===this.gmVersion&&{note:""})),this.receivedQueryResponses++)}determineUserActionsCore(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/consent`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.items.forEach((t=>{"Expired"===t.status&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}determineUserActions16(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.consents.forEach((t=>{2===t.status&&"pepconsent"!==t.tagCode&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}updateUserConsents(){const t="gmcore"===this.gmVersion?new URL(`${this.endpoint}/v1/player/${this.userId}/consent`):new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);let e={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-SessionId":`${this.userSession}`},body:JSON.stringify({consents:this.userActions})};fetch(t.href,e).then((t=>t.json())).then((()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:"Consent update successful!"}},window.location.href)})).catch((t=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Server might not be responding",err:t}},window.location.href)})).finally((()=>{window.postMessage({type:"UserActionsCompleted"},window.location.href)}))}handleApplyClick(){this.queryFired=!0}async componentWillLoad(){"gmcore"===this.gmVersion&&this.determineUserActionsCore(),"gm16"===this.gmVersion&&this.determineUserActions16(),this.translationUrl.length>2&&await d(this.translationUrl)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}calcMandatoryActions(){this.mandatoryItems=0,this.mandatoryActions.map((t=>{this.activeUserActions.includes(t)&&this.mandatoryItems++}))}render(){return this.mandatoryItems>0?(this.userActionsValidated=this.mandatoryActionsChecked===this.mandatoryItems,i("div",{class:"QueryReferenceContainer",ref:t=>this.stylingContainer=t},this.isLoading?i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})):i("div",{class:"UserActionController"},i("h2",{class:"UserConsentNotice"},this.userNoticeText),i("div",{class:"PlayerLegislationWrapper"},this.activeUserActions.map((t=>i("slot",{name:t},i("player-user-consents",{lang:this.lang,"gm-version":this.gmVersion,"translation-url":this.translationUrl,consentType:t,consentTitle:this.consentTitles[t],queried:this.queryFired,mandatory:this.mandatoryActions.includes(t),"client-styling":this.clientStyling}))))),this.includeSubmitButton&&i("button",{class:"ConsentSubmitButton",disabled:!this.userActionsValidated,onClick:()=>this.handleApplyClick()},this.submitButtonText)))):void 0}static get watchers(){return{translationUrl:["handleNewTranslations"],receivedQueryResponses:["handleQueryResponse"]}}};l.style=":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserConsentNotice{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserActionController{font-family:Arial, Helvetica, sans-serif;font-weight:100;height:100%;width:100%;padding:1rem 1.5rem 2rem;background-color:#fff;display:flex;flex-direction:column;justify-content:space-between;border-radius:5%}.ConsentSubmitButton{font-size:1rem;padding:0.4rem 1.4rem;background:#fff;border:2px solid #000;color:#000;border-radius:5px;align-self:flex-end;cursor:pointer}.ConsentSubmitButton:disabled{border:2px solid #ccc;color:#ccc;cursor:unset}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:blue}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";export{r as player_user_consents,l as user_action_controller}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=e,c=a(t,s),i=f(n);r.ael(o,l,c,i),(t.o=t.o||[]).push((()=>r.rel(o,l,c,i)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){J(e)}},f=e=>0!=(2&e),h=new WeakMap,d=e=>"sc-"+e.h,$={},m=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?r[r.length-1].$+=l:r.push(s?y(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=y(e,null);return i.m=t,r.length>0&&(i.p=r),i},y=(e,t)=>({t:0,g:e,$:t,v:null,p:null,m:null}),b={},w=(e,t,n,l,o,c)=>{if(n!==l){let i=I(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=v(n),o=v(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const s=m(l);if((i||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):I(s,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},g=/\s/,v=e=>e?e.split(g):[],S=(e,t,n,l)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.m||$,r=t.m||$;for(l in o)l in r||w(s,l,o[l],void 0,n,t.t);for(l in r)w(s,l,o[l],r[l],n,t.t)},j=(t,l,s)=>{let r,c,i=l.p[s],u=0;if(null!==i.$)r=i.v=o.createTextNode(i.$);else{if(n||(n="svg"===i.g),r=i.v=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.g),n&&"foreignObject"===i.g&&(n=!1),S(null,i,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),i.p)for(u=0;u<i.p.length;++u)c=j(t,i,u),c&&r.appendChild(c);"svg"===i.g?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},O=(e,n,l,s,o,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=j(null,l,o),c&&(s[o].v=c,i.insertBefore(c,n)))},M=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.v,x(l),s.remove())},k=(e,t)=>e.g===t.g,C=(e,t)=>{const l=t.v=e.v,s=e.p,o=t.p,r=t.g,c=t.$;null===c?(n="svg"===r||"foreignObject"!==r&&n,"slot"===r||S(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,c=t.length-1,i=t[0],u=t[c],a=l.length-1,f=l[0],h=l[a];for(;o<=c&&r<=a;)null==i?i=t[++o]:null==u?u=t[--c]:null==f?f=l[++r]:null==h?h=l[--a]:k(i,f)?(C(i,f),i=t[++o],f=l[++r]):k(u,h)?(C(u,h),u=t[--c],h=l[--a]):k(i,h)?(C(i,h),e.insertBefore(i.v,u.v.nextSibling),i=t[++o],h=l[--a]):k(u,f)?(C(u,f),e.insertBefore(u.v,i.v),u=t[--c],f=l[++r]):(s=j(t&&t[r],n,r),f=l[++r],s&&i.v.parentNode.insertBefore(s,i.v));o>c?O(e,null==l[a+1]?null:l[a+1].v,n,l,r,a):r>a&&M(t,o,c)})(l,s,t,o):null!==o?(null!==e.$&&(l.textContent=""),O(l,null,t,o,0,o.length-1)):null!==s&&M(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.$!==c&&(l.data=c)},x=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(x)},P=(e,t,n)=>{const l=(e=>z(e).S)(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=r.ce(t,n);return e.dispatchEvent(l),l},L=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},N=(e,t)=>{if(e.t|=16,!(4&e.t))return L(e,e.O),se((()=>R(e,t)));e.t|=512},R=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>q(n,e,t))),e.u=null),l=q(n,"componentWillLoad")),D(l,(()=>T(e,n,t)))},T=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.S,l=t.t,s=((e,t)=>{let n=d(t),l=X.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);W(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>A(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},W=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.M,r=n.k||y(null,null),c=(e=>e&&e.g===b)(l)?l:p(null,null,l);t=s.tagName,o.C&&(c.m=c.m||{},o.C.map((([e,t])=>c.m[t]=s[e]))),c.g=null,c.t|=4,n.k=c,c.v=r.v=s.shadowRoot||s,e=s["s-sc"],C(r,c)})(n,l)}catch(e){J(e,n.S)}return null},A=e=>{const t=e.S,n=e.O;q(e.i,"componentDidRender"),64&e.t||(e.t|=64,F(t),e.P(t),n||U()),e.j&&(e.j(),e.j=void 0),512&e.t&&le((()=>N(e,!1))),e.t&=-517},U=()=>{F(o.documentElement),le((()=>E(s,"appload",{detail:{namespace:"user-action-controller"}})))},q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){J(e)}},D=(e,t)=>e&&e.then?e.then(t):t(),F=e=>e.classList.add("hydrated"),H=(e,t,n)=>{if(t.L){e.watchers&&(t.N=e.watchers);const l=Object.entries(t.L),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>z(this).R.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=z(e),o=s.S,r=s.R.get(t),c=s.t,i=s.i;if(n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.L[t][0]),(!(8&c)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(s.R.set(t,n),i)){if(l.N&&128&c){const e=l.N[t];e&&e.map((e=>{try{i[e](n,r,t)}catch(e){J(e,o)}}))}2==(18&c)&&N(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){r.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.C.push([e,s]),s}))}}return e},V=(e,t={})=>{const n=[],l=t.exclude||[],c=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let m,p=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],h:t[1],L:t[2],T:t[3]};s.L=t[2],s.T=t[3],s.C=[],s.N={};const o=s.h,a=class extends HTMLElement{constructor(e){super(e),G(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){m&&(clearTimeout(m),m=null),p?$.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=z(e),n=t.M,l=()=>{};if(1&t.t)u(e,t,n.T);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){L(t,t.O=n);break}}n.L&&Object.entries(n.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.N=s.watchers,H(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){J(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=d(n);if(!X.has(t)){const l=()=>{};((e,t,n)=>{let l=X.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,X.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.O,r=()=>N(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{if(0==(1&r.t)){const e=z(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return z(this).W}};s.A=e[0],l.includes(o)||c.get(o)||(n.push(o),c.define(o,H(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),p=!1,$.length?$.map((e=>e.connectedCallback())):r.jmp((()=>m=setTimeout(U,30)))},_=new WeakMap,z=e=>_.get(e),B=(e,t)=>_.set(t.i=e,t),G=(e,t)=>{const n={t:0,S:e,M:t,R:new Map};return n.W=new Promise((e=>n.P=e)),e["s-p"]=[],e["s-rc"]=[],u(e,n,t.T),_.set(e,n)},I=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),K=new Map,Q=e=>{const t=e.h.replace(/-/g,"_"),n=e.A,l=K.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(K.set(n,e),e[t])),J)},X=new Map,Y=[],Z=[],ee=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?le(ne):r.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){J(e)}e.length=0},ne=()=>{te(Y),te(Z),(l=Y.length>0)&&r.raf(ne)},le=e=>c().then(e),se=ee(Z,!0);export{V as b,P as c,p as h,c as p,B as r}
|