@everymatrix/general-about-us 1.54.12 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-89f8f750.js');
5
+ const index = require('./index-e275fea3.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -36,6 +36,63 @@ const translate = (key, customLang) => {
36
36
  return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
37
37
  };
38
38
 
39
+ /**
40
+ * @name setClientStyling
41
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
42
+ * @param {HTMLElement} stylingContainer The reference element of the widget
43
+ * @param {string} clientStyling The style content
44
+ */
45
+ function setClientStyling(stylingContainer, clientStyling) {
46
+ if (stylingContainer) {
47
+ const sheet = document.createElement('style');
48
+ sheet.innerHTML = clientStyling;
49
+ stylingContainer.appendChild(sheet);
50
+ }
51
+ }
52
+
53
+ /**
54
+ * @name setClientStylingURL
55
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
56
+ * @param {HTMLElement} stylingContainer The reference element of the widget
57
+ * @param {string} clientStylingUrl The URL of the style content
58
+ */
59
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
60
+ const url = new URL(clientStylingUrl);
61
+
62
+ fetch(url.href)
63
+ .then((res) => res.text())
64
+ .then((data) => {
65
+ const cssFile = document.createElement('style');
66
+ cssFile.innerHTML = data;
67
+ if (stylingContainer) {
68
+ stylingContainer.appendChild(cssFile);
69
+ }
70
+ })
71
+ .catch((err) => {
72
+ console.error('There was an error while trying to load client styling from URL', err);
73
+ });
74
+ }
75
+
76
+ /**
77
+ * @name setStreamLibrary
78
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
79
+ * @param {HTMLElement} stylingContainer The highest element of the widget
80
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
81
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
82
+ */
83
+ function setStreamStyling(stylingContainer, domain, subscription) {
84
+ if (window.emMessageBus) {
85
+ const sheet = document.createElement('style');
86
+
87
+ window.emMessageBus.subscribe(domain, (data) => {
88
+ sheet.innerHTML = data;
89
+ if (stylingContainer) {
90
+ stylingContainer.appendChild(sheet);
91
+ }
92
+ });
93
+ }
94
+ }
95
+
39
96
  function checkDeviceType() {
40
97
  const userAgent = navigator.userAgent.toLowerCase();
41
98
  const width = screen.availWidth;
@@ -123,7 +180,6 @@ const GeneralAboutUs = class {
123
180
  this.clientStylingUrl = '';
124
181
  this.hasErrors = false;
125
182
  this.isLoading = true;
126
- this.limitStylingAppends = false;
127
183
  this.device = '';
128
184
  this.handleClick = (url, target, location, isExternal) => {
129
185
  window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
@@ -151,25 +207,6 @@ const GeneralAboutUs = class {
151
207
  }
152
208
  return source;
153
209
  };
154
- this.setClientStyling = () => {
155
- let sheet = document.createElement('style');
156
- sheet.innerHTML = this.clientStyling;
157
- this.stylingContainer.prepend(sheet);
158
- };
159
- this.setClientStylingURL = () => {
160
- let url = new URL(this.clientStylingUrl);
161
- let cssFile = document.createElement('style');
162
- fetch(url.href)
163
- .then((res) => res.text())
164
- .then((data) => {
165
- cssFile.innerHTML = data;
166
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
167
- })
168
- .catch((err) => {
169
- console.log('error ', err);
170
- });
171
- };
172
- // end custom styling area
173
210
  this.formatTitle = (title, language) => {
174
211
  let firstWord, restOfTitle;
175
212
  // Check for common languages that do not use space - here: Chinese, Japanese, Thai
@@ -190,6 +227,17 @@ const GeneralAboutUs = class {
190
227
  this.getAboutUs();
191
228
  }
192
229
  }
230
+ handleClientStylingChange(newValue, oldValue) {
231
+ if (newValue != oldValue) {
232
+ setClientStyling(this.stylingContainer, this.clientStyling);
233
+ }
234
+ }
235
+ handleClientStylingChangeURL(newValue, oldValue) {
236
+ if (newValue != oldValue) {
237
+ if (this.clientStylingUrl)
238
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
239
+ }
240
+ }
193
241
  componentWillLoad() {
194
242
  if (this.cmsEndpoint && this.language) {
195
243
  return this.getAboutUs();
@@ -197,6 +245,20 @@ const GeneralAboutUs = class {
197
245
  }
198
246
  componentDidLoad() {
199
247
  this.device = getDeviceCustom();
248
+ if (this.stylingContainer) {
249
+ if (window.emMessageBus != undefined) {
250
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
251
+ }
252
+ else {
253
+ if (this.clientStyling)
254
+ setClientStyling(this.stylingContainer, this.clientStyling);
255
+ if (this.clientStylingUrl)
256
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
257
+ }
258
+ }
259
+ }
260
+ disconnectedCallback() {
261
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
200
262
  }
201
263
  getAboutUs() {
202
264
  let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
@@ -226,16 +288,6 @@ const GeneralAboutUs = class {
226
288
  });
227
289
  });
228
290
  }
229
- componentDidRender() {
230
- // start custom styling area
231
- if (!this.limitStylingAppends && this.stylingContainer) {
232
- if (this.clientStyling)
233
- this.setClientStyling();
234
- if (this.clientStylingUrl)
235
- this.setClientStylingURL();
236
- this.limitStylingAppends = true;
237
- }
238
- }
239
291
  render() {
240
292
  var _a, _b, _c, _d, _e;
241
293
  if (this.hasErrors) {
@@ -256,7 +308,9 @@ const GeneralAboutUs = class {
256
308
  "cmsEndpoint": ["watchEndpoint"],
257
309
  "language": ["watchEndpoint"],
258
310
  "userRoles": ["watchEndpoint"],
259
- "device": ["watchEndpoint"]
311
+ "device": ["watchEndpoint"],
312
+ "clientStyling": ["handleClientStylingChange"],
313
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
260
314
  }; }
261
315
  };
262
316
  GeneralAboutUs.style = GeneralAboutUsStyle0;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-89f8f750.js');
5
+ const index = require('./index-e275fea3.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["general-about-us.cjs",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"limitStylingAppends":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"]}]]]], options);
22
+ return index.bootstrapLazy([["general-about-us.cjs",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'general-about-us';
24
- const BUILD = /* general-about-us */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* general-about-us */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -835,9 +835,6 @@ var postUpdateComponent = (hostRef) => {
835
835
  const endPostUpdate = createTime("postUpdate", tagName);
836
836
  const instance = hostRef.$lazyInstance$ ;
837
837
  const ancestorComponent = hostRef.$ancestorComponent$;
838
- {
839
- safeCall(instance, "componentDidRender", void 0, elm);
840
- }
841
838
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
842
839
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
843
840
  {
@@ -1159,12 +1156,17 @@ var connectedCallback = (elm) => {
1159
1156
  }
1160
1157
  };
1161
1158
  var disconnectInstance = (instance, elm) => {
1159
+ {
1160
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1161
+ }
1162
1162
  };
1163
1163
  var disconnectedCallback = async (elm) => {
1164
1164
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1165
1165
  const hostRef = getHostRef(elm);
1166
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1167
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1166
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1167
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1168
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1169
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1168
1170
  }
1169
1171
  }
1170
1172
  if (rootAppliedStyles.has(elm)) {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-89f8f750.js');
5
+ const index = require('./index-e275fea3.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["general-about-us.cjs",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"limitStylingAppends":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"]}]]]], options);
11
+ return index.bootstrapLazy([["general-about-us.cjs",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { translate } from "../../utils/locale.utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  import { getDeviceCustom, checkDeviceType, getDevicePlatform } from "../../utils/utils";
4
5
  import chevronRight from "../../utils/chevron.svg";
5
6
  export class GeneralAboutUs {
@@ -26,7 +27,6 @@ export class GeneralAboutUs {
26
27
  this.clientStylingUrl = '';
27
28
  this.hasErrors = false;
28
29
  this.isLoading = true;
29
- this.limitStylingAppends = false;
30
30
  this.device = '';
31
31
  this.handleClick = (url, target, location, isExternal) => {
32
32
  window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
@@ -54,25 +54,6 @@ export class GeneralAboutUs {
54
54
  }
55
55
  return source;
56
56
  };
57
- this.setClientStyling = () => {
58
- let sheet = document.createElement('style');
59
- sheet.innerHTML = this.clientStyling;
60
- this.stylingContainer.prepend(sheet);
61
- };
62
- this.setClientStylingURL = () => {
63
- let url = new URL(this.clientStylingUrl);
64
- let cssFile = document.createElement('style');
65
- fetch(url.href)
66
- .then((res) => res.text())
67
- .then((data) => {
68
- cssFile.innerHTML = data;
69
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
70
- })
71
- .catch((err) => {
72
- console.log('error ', err);
73
- });
74
- };
75
- // end custom styling area
76
57
  this.formatTitle = (title, language) => {
77
58
  let firstWord, restOfTitle;
78
59
  // Check for common languages that do not use space - here: Chinese, Japanese, Thai
@@ -93,6 +74,17 @@ export class GeneralAboutUs {
93
74
  this.getAboutUs();
94
75
  }
95
76
  }
77
+ handleClientStylingChange(newValue, oldValue) {
78
+ if (newValue != oldValue) {
79
+ setClientStyling(this.stylingContainer, this.clientStyling);
80
+ }
81
+ }
82
+ handleClientStylingChangeURL(newValue, oldValue) {
83
+ if (newValue != oldValue) {
84
+ if (this.clientStylingUrl)
85
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
86
+ }
87
+ }
96
88
  componentWillLoad() {
97
89
  if (this.cmsEndpoint && this.language) {
98
90
  return this.getAboutUs();
@@ -100,6 +92,20 @@ export class GeneralAboutUs {
100
92
  }
101
93
  componentDidLoad() {
102
94
  this.device = getDeviceCustom();
95
+ if (this.stylingContainer) {
96
+ if (window.emMessageBus != undefined) {
97
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
98
+ }
99
+ else {
100
+ if (this.clientStyling)
101
+ setClientStyling(this.stylingContainer, this.clientStyling);
102
+ if (this.clientStylingUrl)
103
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
104
+ }
105
+ }
106
+ }
107
+ disconnectedCallback() {
108
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
103
109
  }
104
110
  getAboutUs() {
105
111
  let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
@@ -129,16 +135,6 @@ export class GeneralAboutUs {
129
135
  });
130
136
  });
131
137
  }
132
- componentDidRender() {
133
- // start custom styling area
134
- if (!this.limitStylingAppends && this.stylingContainer) {
135
- if (this.clientStyling)
136
- this.setClientStyling();
137
- if (this.clientStylingUrl)
138
- this.setClientStylingURL();
139
- this.limitStylingAppends = true;
140
- }
141
- }
142
138
  render() {
143
139
  var _a, _b, _c, _d, _e;
144
140
  if (this.hasErrors) {
@@ -248,6 +244,25 @@ export class GeneralAboutUs {
248
244
  "reflect": true,
249
245
  "defaultValue": "'stage'"
250
246
  },
247
+ "mbSource": {
248
+ "type": "string",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "string",
252
+ "resolved": "string",
253
+ "references": {}
254
+ },
255
+ "required": false,
256
+ "optional": false,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Client custom styling via inline streamStyling"
260
+ },
261
+ "getter": false,
262
+ "setter": false,
263
+ "attribute": "mb-source",
264
+ "reflect": false
265
+ },
251
266
  "clientStyling": {
252
267
  "type": "string",
253
268
  "mutable": false,
@@ -294,7 +309,6 @@ export class GeneralAboutUs {
294
309
  return {
295
310
  "hasErrors": {},
296
311
  "isLoading": {},
297
- "limitStylingAppends": {},
298
312
  "device": {}
299
313
  };
300
314
  }
@@ -311,6 +325,12 @@ export class GeneralAboutUs {
311
325
  }, {
312
326
  "propName": "device",
313
327
  "methodName": "watchEndpoint"
328
+ }, {
329
+ "propName": "clientStyling",
330
+ "methodName": "handleClientStylingChange"
331
+ }, {
332
+ "propName": "clientStylingUrl",
333
+ "methodName": "handleClientStylingChangeURL"
314
334
  }];
315
335
  }
316
336
  }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-1fa28ad9.js';
1
+ import { r as registerInstance, h } from './index-5f2a97a2.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
@@ -32,6 +32,63 @@ const translate = (key, customLang) => {
32
32
  return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
33
33
  };
34
34
 
35
+ /**
36
+ * @name setClientStyling
37
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
38
+ * @param {HTMLElement} stylingContainer The reference element of the widget
39
+ * @param {string} clientStyling The style content
40
+ */
41
+ function setClientStyling(stylingContainer, clientStyling) {
42
+ if (stylingContainer) {
43
+ const sheet = document.createElement('style');
44
+ sheet.innerHTML = clientStyling;
45
+ stylingContainer.appendChild(sheet);
46
+ }
47
+ }
48
+
49
+ /**
50
+ * @name setClientStylingURL
51
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
52
+ * @param {HTMLElement} stylingContainer The reference element of the widget
53
+ * @param {string} clientStylingUrl The URL of the style content
54
+ */
55
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
56
+ const url = new URL(clientStylingUrl);
57
+
58
+ fetch(url.href)
59
+ .then((res) => res.text())
60
+ .then((data) => {
61
+ const cssFile = document.createElement('style');
62
+ cssFile.innerHTML = data;
63
+ if (stylingContainer) {
64
+ stylingContainer.appendChild(cssFile);
65
+ }
66
+ })
67
+ .catch((err) => {
68
+ console.error('There was an error while trying to load client styling from URL', err);
69
+ });
70
+ }
71
+
72
+ /**
73
+ * @name setStreamLibrary
74
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
75
+ * @param {HTMLElement} stylingContainer The highest element of the widget
76
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
77
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
78
+ */
79
+ function setStreamStyling(stylingContainer, domain, subscription) {
80
+ if (window.emMessageBus) {
81
+ const sheet = document.createElement('style');
82
+
83
+ window.emMessageBus.subscribe(domain, (data) => {
84
+ sheet.innerHTML = data;
85
+ if (stylingContainer) {
86
+ stylingContainer.appendChild(sheet);
87
+ }
88
+ });
89
+ }
90
+ }
91
+
35
92
  function checkDeviceType() {
36
93
  const userAgent = navigator.userAgent.toLowerCase();
37
94
  const width = screen.availWidth;
@@ -119,7 +176,6 @@ const GeneralAboutUs = class {
119
176
  this.clientStylingUrl = '';
120
177
  this.hasErrors = false;
121
178
  this.isLoading = true;
122
- this.limitStylingAppends = false;
123
179
  this.device = '';
124
180
  this.handleClick = (url, target, location, isExternal) => {
125
181
  window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
@@ -147,25 +203,6 @@ const GeneralAboutUs = class {
147
203
  }
148
204
  return source;
149
205
  };
150
- this.setClientStyling = () => {
151
- let sheet = document.createElement('style');
152
- sheet.innerHTML = this.clientStyling;
153
- this.stylingContainer.prepend(sheet);
154
- };
155
- this.setClientStylingURL = () => {
156
- let url = new URL(this.clientStylingUrl);
157
- let cssFile = document.createElement('style');
158
- fetch(url.href)
159
- .then((res) => res.text())
160
- .then((data) => {
161
- cssFile.innerHTML = data;
162
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
163
- })
164
- .catch((err) => {
165
- console.log('error ', err);
166
- });
167
- };
168
- // end custom styling area
169
206
  this.formatTitle = (title, language) => {
170
207
  let firstWord, restOfTitle;
171
208
  // Check for common languages that do not use space - here: Chinese, Japanese, Thai
@@ -186,6 +223,17 @@ const GeneralAboutUs = class {
186
223
  this.getAboutUs();
187
224
  }
188
225
  }
226
+ handleClientStylingChange(newValue, oldValue) {
227
+ if (newValue != oldValue) {
228
+ setClientStyling(this.stylingContainer, this.clientStyling);
229
+ }
230
+ }
231
+ handleClientStylingChangeURL(newValue, oldValue) {
232
+ if (newValue != oldValue) {
233
+ if (this.clientStylingUrl)
234
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
235
+ }
236
+ }
189
237
  componentWillLoad() {
190
238
  if (this.cmsEndpoint && this.language) {
191
239
  return this.getAboutUs();
@@ -193,6 +241,20 @@ const GeneralAboutUs = class {
193
241
  }
194
242
  componentDidLoad() {
195
243
  this.device = getDeviceCustom();
244
+ if (this.stylingContainer) {
245
+ if (window.emMessageBus != undefined) {
246
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
247
+ }
248
+ else {
249
+ if (this.clientStyling)
250
+ setClientStyling(this.stylingContainer, this.clientStyling);
251
+ if (this.clientStylingUrl)
252
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
253
+ }
254
+ }
255
+ }
256
+ disconnectedCallback() {
257
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
196
258
  }
197
259
  getAboutUs() {
198
260
  let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
@@ -222,16 +284,6 @@ const GeneralAboutUs = class {
222
284
  });
223
285
  });
224
286
  }
225
- componentDidRender() {
226
- // start custom styling area
227
- if (!this.limitStylingAppends && this.stylingContainer) {
228
- if (this.clientStyling)
229
- this.setClientStyling();
230
- if (this.clientStylingUrl)
231
- this.setClientStylingURL();
232
- this.limitStylingAppends = true;
233
- }
234
- }
235
287
  render() {
236
288
  var _a, _b, _c, _d, _e;
237
289
  if (this.hasErrors) {
@@ -252,7 +304,9 @@ const GeneralAboutUs = class {
252
304
  "cmsEndpoint": ["watchEndpoint"],
253
305
  "language": ["watchEndpoint"],
254
306
  "userRoles": ["watchEndpoint"],
255
- "device": ["watchEndpoint"]
307
+ "device": ["watchEndpoint"],
308
+ "clientStyling": ["handleClientStylingChange"],
309
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
256
310
  }; }
257
311
  };
258
312
  GeneralAboutUs.style = GeneralAboutUsStyle0;
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-1fa28ad9.js';
2
- export { s as setNonce } from './index-1fa28ad9.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-5f2a97a2.js';
2
+ export { s as setNonce } from './index-5f2a97a2.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["general-about-us",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"limitStylingAppends":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"]}]]]], options);
19
+ return bootstrapLazy([["general-about-us",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
20
20
  });
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'general-about-us';
2
- const BUILD = /* general-about-us */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* general-about-us */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -813,9 +813,6 @@ var postUpdateComponent = (hostRef) => {
813
813
  const endPostUpdate = createTime("postUpdate", tagName);
814
814
  const instance = hostRef.$lazyInstance$ ;
815
815
  const ancestorComponent = hostRef.$ancestorComponent$;
816
- {
817
- safeCall(instance, "componentDidRender", void 0, elm);
818
- }
819
816
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
820
817
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
821
818
  {
@@ -1137,12 +1134,17 @@ var connectedCallback = (elm) => {
1137
1134
  }
1138
1135
  };
1139
1136
  var disconnectInstance = (instance, elm) => {
1137
+ {
1138
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1139
+ }
1140
1140
  };
1141
1141
  var disconnectedCallback = async (elm) => {
1142
1142
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1143
1143
  const hostRef = getHostRef(elm);
1144
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1145
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1144
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1145
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1146
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1147
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1146
1148
  }
1147
1149
  }
1148
1150
  if (rootAppliedStyles.has(elm)) {
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-1fa28ad9.js';
2
- export { s as setNonce } from './index-1fa28ad9.js';
1
+ import { b as bootstrapLazy } from './index-5f2a97a2.js';
2
+ export { s as setNonce } from './index-5f2a97a2.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["general-about-us",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"limitStylingAppends":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"]}]]]], options);
8
+ return bootstrapLazy([["general-about-us",[[1,"general-about-us",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasErrors":[32],"isLoading":[32],"device":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"userRoles":["watchEndpoint"],"device":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{p as n,b as t}from"./p-1249f60f.js";export{s as setNonce}from"./p-1249f60f.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-a7e030e4",[[1,"general-about-us",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],hasErrors:[32],isLoading:[32],limitStylingAppends:[32],device:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],userRoles:["watchEndpoint"],device:["watchEndpoint"]}]]]],n))));
1
+ import{p as n,b as e}from"./p-c303f99c.js";export{s as setNonce}from"./p-c303f99c.js";import{g as t}from"./p-e1255160.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["p-73146ff7",[[1,"general-about-us",{cmsEndpoint:[513,"cms-endpoint"],language:[513],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],hasErrors:[32],isLoading:[32],device:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],userRoles:["watchEndpoint"],device:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],n))));
@@ -0,0 +1 @@
1
+ import{r as n,h as t}from"./p-c303f99c.js";const i={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."}};function e(n,t){if(n){const i=document.createElement("style");i.innerHTML=t,n.appendChild(i)}}function o(n,t){const i=new URL(t);fetch(i.href).then((n=>n.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,n&&n.appendChild(i)})).catch((n=>{console.error("There was an error while trying to load client styling from URL",n)}))}const r=class{constructor(i){n(this,i),this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.clientStyling="",this.clientStylingUrl="",this.hasErrors=!1,this.isLoading=!0,this.device="",this.handleClick=(n,t,i,e)=>{window.postMessage({type:"NavigateTo",path:n,target:t,locations:i,externalLink:e||!1},window.location.href),"function"==typeof gtag&&gtag("event","GeneralAboutUs",{context:"AboutUsContent"})},this.setImage=n=>{let t="";switch(this.device=function(){const n=navigator.userAgent.toLowerCase(),t=screen.availWidth,i=screen.availHeight;if(n.includes("iphone"))return"mobile";if(n.includes("android")){if(i>t&&t<800)return"mobile";if(t>i&&i<800)return"tablet"}return"desktop"}(),this.device){case"mobile":t=n.imageMobile;break;case"tablet":t=n.imageTablet;break;case"desktop":t=n.imageDesktop}return t},this.formatTitle=(n,i)=>{let e,o;if(["zh","ja","th"].includes(i))e=n.substring(0,1),o=n.substring(1);else{const t=n.split(" ");e=t.shift(),o=t.join(" ")}return t("div",{class:"Title"},t("span",{class:"FirstWord"},e," "),t("span",null,o))}}watchEndpoint(n,t){n&&n!=t&&this.cmsEndpoint&&this.getAboutUs()}handleClientStylingChange(n,t){n!=t&&e(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(n,t){n!=t&&this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getAboutUs()}componentDidLoad(){this.device=function(){const n=navigator.userAgent.toLowerCase();let t="";return t=n.includes("android")||n.includes("iphone")||n.includes("ipad")?function(){const n=screen.availWidth;return n<600?"mobile":n>=600&&n<1100?"tablet":void 0}():"desktop",t}(),this.stylingContainer&&(null!=window.emMessageBus?function(n,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,n&&n.appendChild(i)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&e(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getAboutUs(){let n=new URL(`${this.cmsEndpoint}/${this.language}/homepage`);return n.searchParams.append("env",this.cmsEnv),n.searchParams.append("userRoles",this.userRoles),n.searchParams.append("device",(()=>{const n=(()=>{let n=window.navigator.userAgent.toLocaleLowerCase();return n.includes("android/i")?"android":n.includes("iphone/i")?"iPhone":n.includes("ipad/i")||n.includes("ipod/i")?"iPad":"PC"})();if(n)return"PC"===n?"dk":"mtWeb"})()),new Promise(((t,i)=>{this.isLoading=!0,fetch(n.href).then((n=>n.json())).then((n=>{const i=["title","description","images","button","externalLink","targetType","locations"],e=Object.entries(n).filter((([n])=>i.includes(n))).reduce(((n,[t,i])=>(n[t]=i,n)),{});this.aboutUsData=e,t(e)})).catch((n=>{console.error(n),this.hasErrors=!0,i(n)})).finally((()=>{this.isLoading=!1}))}))}render(){var n,e,o,r,a,s;return this.hasErrors?t("div",{class:"AboutUsError"},t("div",{class:"ErrorInfo"},i[void 0!==(s=this.language)&&s in i?s:"en"].error)):this.isLoading?void 0:t("div",{ref:n=>this.stylingContainer=n},t("div",{class:"AboutUsWrapper"},t("div",{class:"ItemImage"},t("div",{class:"ForegroundImage",style:{background:`linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),\n linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),\n linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),\n url(${this.setImage(null===(n=this.aboutUsData)||void 0===n?void 0:n.images)}) no-repeat center center / cover`}}),t("img",{class:"BackgroundImage",src:this.setImage(this.aboutUsData.images),alt:"image"}),t("div",{class:"ItemDetails"},this.formatTitle(null===(e=this.aboutUsData)||void 0===e?void 0:e.title,this.language),t("div",{class:"Description",innerHTML:null===(o=this.aboutUsData)||void 0===o?void 0:o.description}),t("button",{class:"Button",onClick:()=>{var n,t,i,e,o;return this.handleClick(null===(t=null===(n=this.aboutUsData)||void 0===n?void 0:n.button)||void 0===t?void 0:t.buttonUrl,null===(i=this.aboutUsData)||void 0===i?void 0:i.targetType,null===(e=this.aboutUsData)||void 0===e?void 0:e.locations,null===(o=this.aboutUsData)||void 0===o?void 0:o.externalLink)}},null===(a=null===(r=this.aboutUsData)||void 0===r?void 0:r.button)||void 0===a?void 0:a.buttonText,t("img",{src:"data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==",alt:"right chevron",class:"Chevron"}))))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],userRoles:["watchEndpoint"],device:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};r.style=":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 20px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n border-radius: var(--emw--border-radius-medium, 5px);\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, white);\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, white);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 50px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}";export{r as general_about_us}
@@ -1,2 +1,2 @@
1
- var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],y=[],v=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?w(b):f.raf(b))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{$(m),$(y),(p=m.length>0)&&f.raf(b)},w=t=>h().then(t),S=v(y,!0),g=t=>"object"==(t=typeof t)||"function"===t;function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>k,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function k(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return E(t.value);throw"should never get here"}var C,M=t=>{if(t.isOk)return t.value;throw t.value},x=t=>{if(t.isErr)return t.value;throw t.value},P=(t,e,...n)=>{let o=null,l=!1,s=!1;const i=[],r=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?r(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!g(o))&&(o+=""),l&&s?i[i.length-1].i+=o:i.push(l?R(null,o):o),s=l)};if(r(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=R(t,null);return c.u=e,i.length>0&&(c.h=i),c},R=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},D=(t,e)=>null==t||g(t)?t:1&e?t+"":t,L=new WeakMap,N=t=>"sc-"+t.v,T=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=U(n);let s=U(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=g(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(W);e=e.replace(F,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},H=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(H):[]),W="Capture",F=RegExp(W+"$"),V=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||{},s=e.u||{};for(const t of q(Object.keys(l)))t in s||T(o,t,l[t],void 0,n,e.o);for(const t of q(Object.keys(s)))T(o,t,l[t],s[t],n,e.o)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,_=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else if(l=o.m=a.createElement(o.p),V(null,o,G),o.h)for(i=0;i<o.h.length;++i)s=_(t,o,i),s&&l.appendChild(s);return l["s-hn"]=C,l},z=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=_(null,n,l),i&&(o[l].m=i,Q(r,i,e)))},B=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;K(e),t&&t.remove()}}},I=(t,e,n=!1)=>t.p===e.p&&(n&&!t.$&&e.$&&(t.$=e.$),!0),J=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,i=e.i;null===i?(V(t,e,G),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i=0,r=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],d=o[f];for(;i<=c&&r<=f;)null==u?u=e[++i]:null==a?a=e[--c]:null==h?h=o[++r]:null==d?d=o[--f]:I(u,h,l)?(J(u,h,l),u=e[++i],h=o[++r]):I(a,d,l)?(J(a,d,l),a=e[--c],d=o[--f]):I(u,d,l)?(J(u,d,l),Q(t,u.m,a.m.nextSibling),u=e[++i],d=o[--f]):I(a,h,l)?(J(a,h,l),Q(t,a.m,u.m),a=e[--c],h=o[++r]):(s=_(e&&e[r],n,r),h=o[++r],s&&Q(u.m.parentNode,s,u.m));i>c?z(t,null==o[f+1]?null:o[f+1].m,n,o,r,f):r>f&&B(e,i,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),z(o,null,e,s,0,s.length-1)):!n&&null!==l&&B(l,0,l.length-1)):t.i!==i&&(o.data=i)},K=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(K)},Q=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),X=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},Y=(t,e)=>{if(t.o|=16,!(4&t.o))return X(t,t.j),S((()=>Z(t,e)));t.o|=512},Z=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=it(o,"componentWillLoad",void 0,n)),tt(l,(()=>nt(t,o,e)))},tt=(t,e)=>et(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),et=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,nt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=N(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=L.get(t=t.head||t);if(i||L.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ot(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>lt(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ot=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.O,s=t.C||R(null,null),i=(t=>t&&t.p===A)(e)?e:P(null,null,e);if(C=o.tagName,l.M&&(i.u=i.u||{},l.M.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.p=null,i.o|=4,t.C=i,i.m=s.m=o.shadowRoot||o,J(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},lt=t=>{const e=t.$hostElement$,n=t.t,o=t.j;it(n,"componentDidRender",void 0,e),64&t.o||(t.o|=64,rt(e),it(n,"componentDidLoad",void 0,e),t.P(e),o||st()),t.S&&(t.S(),t.S=void 0),512&t.o&&w((()=>Y(t,!1))),t.o&=-517},st=()=>{w((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-about-us"}});return t.dispatchEvent(e),e})(u)))},it=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},rt=t=>t.classList.add("hydrated"),ct=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.R.get(e),u=i.o,a=i.t;if(o=D(o,l.A[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.R.set(e,o),a)){if(l.D&&128&u){const t=l.D[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&Y(i,!1)}},ut=(t,e,o)=>{var l,s;const i=t.prototype;if(e.A||e.D||t.watchers){t.watchers&&!e.D&&(e.D=t.watchers);const r=Object.entries(null!=(l=e.A)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.A[t][0]|=2048),r&&(e.A[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.A[t][0]))return((t,e)=>n(this).R.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.R.get(t)?s=i.R.get(t):!i.R.get(t)&&n&&i.R.set(t,n),r.call(this,D(s,l)),void ct(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.A[t][0]))return ct(this,t,s,e),void(1&o&&!i.t&&i.L.then((()=>{4096&e.A[t][0]&&i.t[t]!==i.R.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.R.get(t)&&n&&i.R.set(t,n),i.t[t]=D(s,l),ct(this,t,i.t[t],e)};i.t?n():i.L.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.D)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.D)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.M)||l.push([t,s])),s}))]))}}return t},at=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,S=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let g=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],v:o[1],A:o[2],N:o[3]};4&c.o&&(g=!0),c.A=o[2],c.M=[],c.D=null!=(l=o[4])?l:{};const u=c.v,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,O:n,R:new Map};o.L=new Promise((t=>o.P=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?b.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.L)&&e.L.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(e,e.j=n);break}}o.A&&Object.entries(o.A).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.T){const l=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.T;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.v}#${e.H}" was not found`);o.isProxied||(n.D=o.watchers,ut(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=N(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.j,c=()=>Y(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.o)){const e=n(t);(null==e?void 0:e.t)||(null==e?void 0:e.L)&&e.L.then((()=>{}))}L.has(t)&&L.delete(t),t.shadowRoot&&L.has(t.shadowRoot)&&L.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this),o=b.findIndex((t=>t===this));o>-1&&b.splice(o,1),(null==(t=null==e?void 0:e.C)?void 0:t.m)instanceof Node&&!e.C.m.isConnected&&delete e.C.m}))}componentOnReady(){return n(this).L}};c.T=t[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ut(a,c,1)))}))})),h.length>0&&(g&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(l=f.k)?l:j(a);null!=t&&$.setAttribute("nonce",t),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>w=setTimeout(st,30)))},ft=t=>f.k=t;export{at as b,P as h,h as p,o as r,ft as s}
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],y=[],v=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?w(b):f.raf(b))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{$(m),$(y),(p=m.length>0)&&f.raf(b)},w=t=>h().then(t),S=v(y,!0),g=t=>"object"==(t=typeof t)||"function"===t;function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>E,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function E(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return k(t.value);throw"should never get here"}var C,M=t=>{if(t.isOk)return t.value;throw t.value},x=t=>{if(t.isErr)return t.value;throw t.value},P=(t,e,...n)=>{let o=null,l=!1,s=!1;const i=[],r=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?r(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!g(o))&&(o+=""),l&&s?i[i.length-1].i+=o:i.push(l?A(null,o):o),s=l)};if(r(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=A(t,null);return c.u=e,i.length>0&&(c.h=i),c},A=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),L={},N=(t,e)=>null==t||g(t)?t:1&e?t+"":t,R=new WeakMap,T=t=>"sc-"+t.v,D=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=U(n);let s=U(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=g(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(W);e=e.replace(F,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},H=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(H):[]),W="Capture",F=RegExp(W+"$"),V=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||{},s=e.u||{};for(const t of q(Object.keys(l)))t in s||D(o,t,l[t],void 0,n,e.o);for(const t of q(Object.keys(s)))D(o,t,l[t],s[t],n,e.o)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,_=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else if(l=o.m=a.createElement(o.p),V(null,o,G),o.h)for(i=0;i<o.h.length;++i)s=_(t,o,i),s&&l.appendChild(s);return l["s-hn"]=C,l},z=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=_(null,n,l),i&&(o[l].m=i,Q(r,i,e)))},B=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;K(e),t&&t.remove()}}},I=(t,e,n=!1)=>t.p===e.p&&(n&&!t.$&&e.$&&(t.$=e.$),!0),J=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,i=e.i;null===i?(V(t,e,G),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i=0,r=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],d=o[f];for(;i<=c&&r<=f;)null==u?u=e[++i]:null==a?a=e[--c]:null==h?h=o[++r]:null==d?d=o[--f]:I(u,h,l)?(J(u,h,l),u=e[++i],h=o[++r]):I(a,d,l)?(J(a,d,l),a=e[--c],d=o[--f]):I(u,d,l)?(J(u,d,l),Q(t,u.m,a.m.nextSibling),u=e[++i],d=o[--f]):I(a,h,l)?(J(a,h,l),Q(t,a.m,u.m),a=e[--c],h=o[++r]):(s=_(e&&e[r],n,r),h=o[++r],s&&Q(u.m.parentNode,s,u.m));i>c?z(t,null==o[f+1]?null:o[f+1].m,n,o,r,f):r>f&&B(e,i,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),z(o,null,e,s,0,s.length-1)):!n&&null!==l&&B(l,0,l.length-1)):t.i!==i&&(o.data=i)},K=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(K)},Q=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),X=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},Y=(t,e)=>{if(t.o|=16,!(4&t.o))return X(t,t.j),S((()=>Z(t,e)));t.o|=512},Z=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=it(o,"componentWillLoad",void 0,n)),tt(l,(()=>nt(t,o,e)))},tt=(t,e)=>et(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),et=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,nt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=T(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=R.get(t=t.head||t);if(i||R.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ot(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>lt(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ot=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.O,s=t.C||A(null,null),i=(t=>t&&t.p===L)(e)?e:P(null,null,e);if(C=o.tagName,l.M&&(i.u=i.u||{},l.M.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.p=null,i.o|=4,t.C=i,i.m=s.m=o.shadowRoot||o,J(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},lt=t=>{const e=t.$hostElement$,n=t.t,o=t.j;64&t.o||(t.o|=64,rt(e),it(n,"componentDidLoad",void 0,e),t.P(e),o||st()),t.S&&(t.S(),t.S=void 0),512&t.o&&w((()=>Y(t,!1))),t.o&=-517},st=()=>{w((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-about-us"}});return t.dispatchEvent(e),e})(u)))},it=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},rt=t=>t.classList.add("hydrated"),ct=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.A.get(e),u=i.o,a=i.t;if(o=N(o,l.L[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.A.set(e,o),a)){if(l.N&&128&u){const t=l.N[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&Y(i,!1)}},ut=(t,e,o)=>{var l,s;const i=t.prototype;if(e.L||e.N||t.watchers){t.watchers&&!e.N&&(e.N=t.watchers);const r=Object.entries(null!=(l=e.L)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.L[t][0]|=2048),r&&(e.L[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.L[t][0]))return((t,e)=>n(this).A.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.A.get(t)?s=i.A.get(t):!i.A.get(t)&&n&&i.A.set(t,n),r.call(this,N(s,l)),void ct(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.L[t][0]))return ct(this,t,s,e),void(1&o&&!i.t&&i.R.then((()=>{4096&e.L[t][0]&&i.t[t]!==i.A.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.A.get(t)&&n&&i.A.set(t,n),i.t[t]=N(s,l),ct(this,t,i.t[t],e)};i.t?n():i.R.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.N)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.M)||l.push([t,s])),s}))]))}}return t},at=(t,e)=>{it(t,"disconnectedCallback",void 0,e||t)},ft=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,S=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let g=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],v:o[1],L:o[2],T:o[3]};4&c.o&&(g=!0),c.L=o[2],c.M=[],c.N=null!=(l=o[4])?l:{};const u=c.v,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,O:n,A:new Map};o.R=new Promise((t=>o.P=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?b.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.R)&&e.R.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(e,e.j=n);break}}o.L&&Object.entries(o.L).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.D){const l=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.D;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.v}#${e.H}" was not found`);o.isProxied||(n.N=o.watchers,ut(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=T(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.j,c=()=>Y(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.o)){const e=n(t);(null==e?void 0:e.t)?at(e.t,t):(null==e?void 0:e.R)&&e.R.then((()=>at(e.t,t)))}R.has(t)&&R.delete(t),t.shadowRoot&&R.has(t.shadowRoot)&&R.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this),o=b.findIndex((t=>t===this));o>-1&&b.splice(o,1),(null==(t=null==e?void 0:e.C)?void 0:t.m)instanceof Node&&!e.C.m.isConnected&&delete e.C.m}))}componentOnReady(){return n(this).R}};c.D=t[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ut(a,c,1)))}))})),h.length>0&&(g&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(l=f.k)?l:j(a);null!=t&&$.setAttribute("nonce",t),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>w=setTimeout(st,30)))},ht=t=>f.k=t;export{ft as b,P as h,h as p,o as r,ht as s}
@@ -16,6 +16,10 @@ export declare class GeneralAboutUs {
16
16
  * CMS Endpoint stage
17
17
  */
18
18
  cmsEnv: string;
19
+ /**
20
+ * Client custom styling via inline streamStyling
21
+ */
22
+ mbSource: string;
19
23
  /**
20
24
  * Client custom styling via inline style
21
25
  */
@@ -26,19 +30,19 @@ export declare class GeneralAboutUs {
26
30
  clientStylingUrl: string;
27
31
  private hasErrors;
28
32
  private isLoading;
29
- private limitStylingAppends;
30
33
  device: string;
31
34
  private stylingContainer;
35
+ private stylingSubscription;
32
36
  private aboutUsData;
33
37
  watchEndpoint(newValue: string, oldValue: string): void;
38
+ handleClientStylingChange(newValue: any, oldValue: any): void;
39
+ handleClientStylingChangeURL(newValue: any, oldValue: any): void;
34
40
  componentWillLoad(): Promise<any>;
35
41
  componentDidLoad(): void;
42
+ disconnectedCallback(): void;
36
43
  getAboutUs(): Promise<any>;
37
44
  handleClick: (url: string, target: string, location: string, isExternal: boolean) => void;
38
45
  setImage: (image: ImageSort) => string;
39
- setClientStyling: () => void;
40
- setClientStylingURL: () => void;
41
- componentDidRender(): void;
42
46
  formatTitle: (title: string, language: string) => any;
43
47
  render(): void;
44
48
  }
@@ -27,6 +27,10 @@ export namespace Components {
27
27
  * Language of the widget
28
28
  */
29
29
  "language": string;
30
+ /**
31
+ * Client custom styling via inline streamStyling
32
+ */
33
+ "mbSource": string;
30
34
  /**
31
35
  * User roles
32
36
  */
@@ -66,6 +70,10 @@ declare namespace LocalJSX {
66
70
  * Language of the widget
67
71
  */
68
72
  "language"?: string;
73
+ /**
74
+ * Client custom styling via inline streamStyling
75
+ */
76
+ "mbSource"?: string;
69
77
  /**
70
78
  * User roles
71
79
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-about-us",
3
- "version": "1.54.12",
3
+ "version": "1.56.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as n,h as t}from"./p-1249f60f.js";const e={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."}};const i=class{constructor(e){n(this,e),this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.clientStyling="",this.clientStylingUrl="",this.hasErrors=!1,this.isLoading=!0,this.limitStylingAppends=!1,this.device="",this.handleClick=(n,t,e,i)=>{window.postMessage({type:"NavigateTo",path:n,target:t,locations:e,externalLink:i||!1},window.location.href),"function"==typeof gtag&&gtag("event","GeneralAboutUs",{context:"AboutUsContent"})},this.setImage=n=>{let t="";switch(this.device=function(){const n=navigator.userAgent.toLowerCase(),t=screen.availWidth,e=screen.availHeight;if(n.includes("iphone"))return"mobile";if(n.includes("android")){if(e>t&&t<800)return"mobile";if(t>e&&e<800)return"tablet"}return"desktop"}(),this.device){case"mobile":t=n.imageMobile;break;case"tablet":t=n.imageTablet;break;case"desktop":t=n.imageDesktop}return t},this.setClientStyling=()=>{let n=document.createElement("style");n.innerHTML=this.clientStyling,this.stylingContainer.prepend(n)},this.setClientStylingURL=()=>{let n=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{t.innerHTML=n,setTimeout((()=>{this.stylingContainer.prepend(t)}),1)})).catch((n=>{console.log("error ",n)}))},this.formatTitle=(n,e)=>{let i,o;if(["zh","ja","th"].includes(e))i=n.substring(0,1),o=n.substring(1);else{const t=n.split(" ");i=t.shift(),o=t.join(" ")}return t("div",{class:"Title"},t("span",{class:"FirstWord"},i," "),t("span",null,o))}}watchEndpoint(n,t){n&&n!=t&&this.cmsEndpoint&&this.getAboutUs()}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getAboutUs()}componentDidLoad(){this.device=function(){const n=navigator.userAgent.toLowerCase();let t="";return t=n.includes("android")||n.includes("iphone")||n.includes("ipad")?function(){const n=screen.availWidth;return n<600?"mobile":n>=600&&n<1100?"tablet":void 0}():"desktop",t}()}getAboutUs(){let n=new URL(`${this.cmsEndpoint}/${this.language}/homepage`);return n.searchParams.append("env",this.cmsEnv),n.searchParams.append("userRoles",this.userRoles),n.searchParams.append("device",(()=>{const n=(()=>{let n=window.navigator.userAgent.toLocaleLowerCase();return n.includes("android/i")?"android":n.includes("iphone/i")?"iPhone":n.includes("ipad/i")||n.includes("ipod/i")?"iPad":"PC"})();if(n)return"PC"===n?"dk":"mtWeb"})()),new Promise(((t,e)=>{this.isLoading=!0,fetch(n.href).then((n=>n.json())).then((n=>{const e=["title","description","images","button","externalLink","targetType","locations"],i=Object.entries(n).filter((([n])=>e.includes(n))).reduce(((n,[t,e])=>(n[t]=e,n)),{});this.aboutUsData=i,t(i)})).catch((n=>{console.error(n),this.hasErrors=!0,e(n)})).finally((()=>{this.isLoading=!1}))}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){var n,i,o,r,a,s;return this.hasErrors?t("div",{class:"AboutUsError"},t("div",{class:"ErrorInfo"},e[void 0!==(s=this.language)&&s in e?s:"en"].error)):this.isLoading?void 0:t("div",{ref:n=>this.stylingContainer=n},t("div",{class:"AboutUsWrapper"},t("div",{class:"ItemImage"},t("div",{class:"ForegroundImage",style:{background:`linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),\n linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),\n linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),\n url(${this.setImage(null===(n=this.aboutUsData)||void 0===n?void 0:n.images)}) no-repeat center center / cover`}}),t("img",{class:"BackgroundImage",src:this.setImage(this.aboutUsData.images),alt:"image"}),t("div",{class:"ItemDetails"},this.formatTitle(null===(i=this.aboutUsData)||void 0===i?void 0:i.title,this.language),t("div",{class:"Description",innerHTML:null===(o=this.aboutUsData)||void 0===o?void 0:o.description}),t("button",{class:"Button",onClick:()=>{var n,t,e,i,o;return this.handleClick(null===(t=null===(n=this.aboutUsData)||void 0===n?void 0:n.button)||void 0===t?void 0:t.buttonUrl,null===(e=this.aboutUsData)||void 0===e?void 0:e.targetType,null===(i=this.aboutUsData)||void 0===i?void 0:i.locations,null===(o=this.aboutUsData)||void 0===o?void 0:o.externalLink)}},null===(a=null===(r=this.aboutUsData)||void 0===r?void 0:r.button)||void 0===a?void 0:a.buttonText,t("img",{src:"data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==",alt:"right chevron",class:"Chevron"}))))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],userRoles:["watchEndpoint"],device:["watchEndpoint"]}}};i.style=":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 20px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 20px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n border-radius: var(--emw--border-radius-medium, 5px);\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, white);\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, white);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 50px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}";export{i as general_about_us}