@everymatrix/promoting-banners 1.60.2 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-cb64c2ca.js → index-44da17c0.js} +4 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{promoting-banners-570e15dc.js → promoting-banners-bfea186e.js} +5 -5
- package/dist/cjs/promoting-banners.cjs.js +2 -2
- package/dist/cjs/promoting-banners_2.cjs.entry.js +73 -0
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/promoting-banners/promoting-banners.css +1 -1
- package/dist/collection/components/promoting-banners/promoting-banners.js +4 -3
- package/dist/esm/{index-43b1379d.js → index-597ecf15.js} +4 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{promoting-banners-79d679c1.js → promoting-banners-84a2f526.js} +5 -5
- package/dist/esm/promoting-banners.js +3 -3
- package/dist/esm/promoting-banners_2.entry.js +68 -0
- package/dist/promoting-banners/index.esm.js +1 -1
- package/dist/promoting-banners/p-7d3c251c.entry.js +1 -0
- package/dist/promoting-banners/p-ab4da639.js +1 -0
- package/dist/promoting-banners/p-d5e26899.js +2 -0
- package/dist/promoting-banners/promoting-banners.esm.js +1 -1
- package/dist/types/components/promoting-banners/promoting-banners.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/promoting-banners.cjs.entry.js +0 -10
- package/dist/esm/promoting-banners.entry.js +0 -2
- package/dist/promoting-banners/p-33973aec.entry.js +0 -1
- package/dist/promoting-banners/p-53cf2adf.js +0 -2
- package/dist/promoting-banners/p-5c9ce269.js +0 -1
|
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
71
71
|
}
|
|
72
72
|
switch(bundleId) {
|
|
73
73
|
|
|
74
|
-
case 'promoting-
|
|
74
|
+
case 'promoting-banners_2.cjs':
|
|
75
75
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
76
76
|
/* webpackMode: "lazy" */
|
|
77
|
-
'./promoting-
|
|
77
|
+
'./promoting-banners_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
@@ -302,6 +302,7 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
302
302
|
}
|
|
303
303
|
return propValue;
|
|
304
304
|
};
|
|
305
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
305
306
|
var emitEvent = (elm, name, opts) => {
|
|
306
307
|
const ev = plt.ce(name, opts);
|
|
307
308
|
elm.dispatchEvent(ev);
|
|
@@ -1218,6 +1219,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1218
1219
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1219
1220
|
|
|
1220
1221
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1222
|
+
exports.getElement = getElement;
|
|
1221
1223
|
exports.h = h;
|
|
1222
1224
|
exports.promiseResolve = promiseResolve;
|
|
1223
1225
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const promotingBanners = require('./promoting-banners-
|
|
6
|
-
require('./index-
|
|
5
|
+
const promotingBanners = require('./promoting-banners-bfea186e.js');
|
|
6
|
+
require('./index-44da17c0.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-44da17c0.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([["promoting-
|
|
11
|
+
return index.bootstrapLazy([["promoting-banners_2.cjs",[[1,"promoting-banners",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"promotingBannersArray":[32],"hasErrors":[32],"isLoading":[32],"translationData":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["handleNewTranslations"]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"imgClass":[1,"img-class"],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-44da17c0.js');
|
|
4
4
|
|
|
5
5
|
const getDevice = () => {
|
|
6
6
|
let userAgent = window.navigator.userAgent;
|
|
@@ -136,7 +136,7 @@ function setStreamStyling(stylingContainer, domain, subscription) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
const promotingBannersCss = ".PromotingBannersIconContainer img{width:50px;height:50px;border-radius:var(--emw--border-radius-image, 50%);background-size:contain;margin:10px}.PromotingBannersSection{padding:10px;border-radius:var(--emw--border-radius-small, 5px);background-color:var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));background-repeat:no-repeat;background-position:center;color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff));font-family:var(--emw--font-family-primary, \"Montserrat\", sans-serif);overflow:hidden;position:relative}.PromotingBannersGrid{display:grid;grid-gap:30px;background-size:contain;background-repeat:no-repeat;padding:10px;width:100%;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));box-sizing:border-box}.PromotingBannersContent{color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff))}.PromotingBannersContent p{display:block;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.PromotingBannersHeader{display:flex;justify-content:center;flex-direction:column;align-items:center}.PromotingBannersHeader p{text-align:center}.PromotingBannersBox{min-width:200px;display:flex;justify-content:flex-start;overflow:hidden;flex-direction:row;gap:20px;text-decoration:none;color:inherit;background-size:cover;background-position:center;border-radius:var(--emw--border-radius-small, 5px)}.PromotingBannersSectionTitle,.PromotingBannersSectionSubtitle{margin:10px auto;background:transparent}.PromotingBannersTextContainer{margin:5px;overflow:hidden;position:relative;padding-bottom:30px}.PromotingBannersTitle{margin:5px auto}.PromotingBannersButton{cursor:pointer;color:inherit;text-decoration:none;position:absolute;bottom:5px;border:0;background:transparent}.ButtonDisabled{cursor:not-allowed}.PromotionalBannersTextContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AboutUsError .ErrorInfo{color:var(--emw--promo-color-error, var(--emw--color-error, #ed0909))}.SkeletonGrid{display:grid}.Skeleton{animation:skeleton-loading 0.6s linear infinite alternate}@keyframes skeleton-loading{0%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%)}12%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%)}25%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%)}33%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%)}50%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%)}63%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%)}75%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%)}88%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%)}100%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%)}}.SkeletonItem{opacity:0.5;margin:0 15px;width:125px;height:150px;border-radius:var(--emw--border-radius-medium, 15px);margin:20px}";
|
|
139
|
+
const promotingBannersCss = ".PromotingBannersIconContainer ui-image img{width:50px;height:50px;border-radius:var(--emw--border-radius-image, 50%);background-size:contain;margin:10px}.PromotingBannersSection{padding:10px;border-radius:var(--emw--border-radius-small, 5px);background-color:var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));background-repeat:no-repeat;background-position:center;color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff));font-family:var(--emw--font-family-primary, \"Montserrat\", sans-serif);overflow:hidden;position:relative}.PromotingBannersGrid{display:grid;grid-gap:30px;background-size:contain;background-repeat:no-repeat;padding:10px;width:100%;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));box-sizing:border-box}.PromotingBannersContent{color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff))}.PromotingBannersContent p{display:block;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.PromotingBannersHeader{display:flex;justify-content:center;flex-direction:column;align-items:center}.PromotingBannersHeader p{text-align:center}.PromotingBannersBox{min-width:200px;display:flex;justify-content:flex-start;overflow:hidden;flex-direction:row;gap:20px;text-decoration:none;color:inherit;background-size:cover;background-position:center;border-radius:var(--emw--border-radius-small, 5px)}.PromotingBannersSectionTitle,.PromotingBannersSectionSubtitle{margin:10px auto;background:transparent}.PromotingBannersTextContainer{margin:5px;overflow:hidden;position:relative;padding-bottom:30px}.PromotingBannersTitle{margin:5px auto}.PromotingBannersButton{cursor:pointer;color:inherit;text-decoration:none;position:absolute;bottom:5px;border:0;background:transparent}.ButtonDisabled{cursor:not-allowed}.PromotionalBannersTextContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AboutUsError .ErrorInfo{color:var(--emw--promo-color-error, var(--emw--color-error, #ed0909))}.SkeletonGrid{display:grid}.Skeleton{animation:skeleton-loading 0.6s linear infinite alternate}@keyframes skeleton-loading{0%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%)}12%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%)}25%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%)}33%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%)}50%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%)}63%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%)}75%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%)}88%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%)}100%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%)}}.SkeletonItem{opacity:0.5;margin:0 15px;width:125px;height:150px;border-radius:var(--emw--border-radius-medium, 15px);margin:20px}";
|
|
140
140
|
const PromotingBannersStyle0 = promotingBannersCss;
|
|
141
141
|
|
|
142
142
|
const PromotingBanners = class {
|
|
@@ -242,13 +242,13 @@ const PromotingBanners = class {
|
|
|
242
242
|
}
|
|
243
243
|
renderBannersGrid(banner) {
|
|
244
244
|
var _a, _b, _c;
|
|
245
|
-
return index.h("a", { class: "PromotingBannersBox", href: banner === null || banner === void 0 ? void 0 : banner.url, target: banner.targetType, style: { backgroundImage: `url(${banner === null || banner === void 0 ? void 0 : banner.backgroundImage})` } }, index.h("div", { class: "PromotingBannersIconContainer" }, index.h("
|
|
245
|
+
return index.h("a", { class: "PromotingBannersBox", href: banner === null || banner === void 0 ? void 0 : banner.url, target: banner.targetType, style: { backgroundImage: `url(${banner === null || banner === void 0 ? void 0 : banner.backgroundImage})` } }, index.h("div", { class: "PromotingBannersIconContainer" }, index.h("ui-image", { src: (getDevice() === 'Android' || getDevice() === 'iPhone') ? (_a = banner.icon) === null || _a === void 0 ? void 0 : _a.mobile : (getDevice() === 'iPad') ? (_b = banner.image) === null || _b === void 0 ? void 0 : _b.srcTablet : (_c = banner.icon) === null || _c === void 0 ? void 0 : _c.desktop, alt: "Banner image" })), index.h("div", { class: "PromotingBannersTextContainer" }, index.h("h3", { class: "PromotingBannersTitle" }, banner === null || banner === void 0 ? void 0 : banner.title), index.h("div", { class: "PromotingBannersContent", innerHTML: banner === null || banner === void 0 ? void 0 : banner.description }), banner.button &&
|
|
246
246
|
index.h("button", { class: `PromotingBannersButton ${(banner === null || banner === void 0 ? void 0 : banner.button.text) ? '' : 'ButtonDisabled'}`, innerHTML: banner === null || banner === void 0 ? void 0 : banner.button.text, onClick: this.sendOpenLink.bind(this, banner === null || banner === void 0 ? void 0 : banner.button.url, banner === null || banner === void 0 ? void 0 : banner.button.externalLink, banner === null || banner === void 0 ? void 0 : banner.button.target) })));
|
|
247
247
|
}
|
|
248
248
|
render() {
|
|
249
249
|
var _a, _b, _c, _d;
|
|
250
|
-
return (index.h("div", { key: '
|
|
251
|
-
index.h("div", { key: '
|
|
250
|
+
return (index.h("div", { key: '222d41290fac9b23b64dfede12360488a97d05b2', class: "PromotingBannersSection", ref: el => this.stylingContainer = el }, this.hasErrors && index.h("div", { key: 'a3b82bcf69a62dea11e7fa192bf987ed8c7465a2', class: "AboutUsError" }, index.h("div", { key: 'a126b4cc7a0eca5c43bff9d5e8738f9ee27dc06d', class: "ErrorInfo" }, translate('error', this.language))), this.isLoading && index.h("div", { key: '50adb915a6bc0484c794f0d2460c71e4b49e203f', class: "SkeletonGrid" }, new Array(4).fill(null).map((index$1) => (index.h("div", { key: index$1, class: "Skeleton SkeletonItem" })))), !this.isLoading &&
|
|
251
|
+
index.h("div", { key: '0d19d75637fdd04bcce848d7314ccb1755c74361', class: "PromotingBannersWrapper" }, index.h("div", { key: '60240503118b807a9ef5745bef90f3e14a2f5294', class: getDevice() === 'PC' ? 'PromotingBannersHeader' : 'PromotingBannersHeader PromotingBannersHeaderMobile' }, ((_a = this.promotingBannersArray) === null || _a === void 0 ? void 0 : _a.title) && index.h("h1", { key: 'a9e5a6a67c82997e77ffdbedfa0c1f71b6d06916', class: "PromotingBannersSectionTitle" }, (_b = this.promotingBannersArray) === null || _b === void 0 ? void 0 : _b.title), ((_c = this.promotingBannersArray) === null || _c === void 0 ? void 0 : _c.description) && index.h("h5", { key: 'c4216110a1e624d526be7af55b4f868aa76db9fd', class: "PromotingBannersSectionSubtitle", style: { 'display': `${getDevice() !== 'PC' ? 'inline-block' : 'none'}` }, innerHTML: (_d = this.promotingBannersArray) === null || _d === void 0 ? void 0 : _d.description })), index.h("div", { key: 'fc41dc707b2dbc2eb7898ef275112c8fd53f5d8d', class: "PromotingBannersGrid" }, this.promotingBannersArray.map(banner => (this.renderBannersGrid(banner)))))));
|
|
252
252
|
}
|
|
253
253
|
static get watchers() { return {
|
|
254
254
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -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-44da17c0.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([["promoting-
|
|
22
|
+
return index.bootstrapLazy([["promoting-banners_2.cjs",[[1,"promoting-banners",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"promotingBannersArray":[32],"hasErrors":[32],"isLoading":[32],"translationData":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["handleNewTranslations"]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"imgClass":[1,"img-class"],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const promotingBanners = require('./promoting-banners-bfea186e.js');
|
|
6
|
+
const index = require('./index-44da17c0.js');
|
|
7
|
+
|
|
8
|
+
const uiImageCss = ":host{display:block}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;transition:opacity 0.5s ease-in-out}";
|
|
9
|
+
const UiImageStyle0 = uiImageCss;
|
|
10
|
+
|
|
11
|
+
const UiImage = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.src = undefined;
|
|
15
|
+
this.width = undefined;
|
|
16
|
+
this.height = undefined;
|
|
17
|
+
this.alt = undefined;
|
|
18
|
+
this.imgClass = '';
|
|
19
|
+
this.styles = undefined;
|
|
20
|
+
this.detectDistance = '200px';
|
|
21
|
+
this.imgLoaded = false;
|
|
22
|
+
this.shouldLoad = false;
|
|
23
|
+
}
|
|
24
|
+
handleSrc() {
|
|
25
|
+
if (!this.shouldLoad) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const tempImage = new Image();
|
|
29
|
+
tempImage.src = this.src;
|
|
30
|
+
tempImage.onload = () => {
|
|
31
|
+
if (this.image) {
|
|
32
|
+
this.image.src = this.src;
|
|
33
|
+
this.imgLoaded = true;
|
|
34
|
+
this.el.dispatchEvent(new CustomEvent('load', { bubbles: true }));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
componentDidLoad() {
|
|
39
|
+
if ('IntersectionObserver' in window) {
|
|
40
|
+
this.el.__uxComponent = this;
|
|
41
|
+
if (!window.EMUxObserver) {
|
|
42
|
+
window.EMUxObserver = new IntersectionObserver((entries) => {
|
|
43
|
+
entries.forEach(entry => {
|
|
44
|
+
if (entry.isIntersecting) {
|
|
45
|
+
const comp = entry.target.__uxComponent;
|
|
46
|
+
if (comp) {
|
|
47
|
+
comp.shouldLoad = true;
|
|
48
|
+
comp.handleSrc();
|
|
49
|
+
}
|
|
50
|
+
window.EMUxObserver.unobserve(entry.target);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}, { rootMargin: this.detectDistance });
|
|
54
|
+
}
|
|
55
|
+
window.EMUxObserver.observe(this.el);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.shouldLoad = true;
|
|
59
|
+
this.handleSrc();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return (index.h("img", { key: '2bb4dc391fc2f753514103e91c0abf065de3236a', ref: el => (this.image = el), style: this.styles, class: `${this.imgClass} ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
|
|
64
|
+
}
|
|
65
|
+
get el() { return index.getElement(this); }
|
|
66
|
+
static get watchers() { return {
|
|
67
|
+
"src": ["handleSrc"]
|
|
68
|
+
}; }
|
|
69
|
+
};
|
|
70
|
+
UiImage.style = UiImageStyle0;
|
|
71
|
+
|
|
72
|
+
exports.promoting_banners = promotingBanners.PromotingBanners;
|
|
73
|
+
exports.ui_image = UiImage;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { getDevice, getDevicePlatform } from "../../utils/utils";
|
|
3
3
|
import { translate, getTranslations } from "../../utils/locale.utils";
|
|
4
|
+
import "../../../../../ui-image/dist/types/index";
|
|
4
5
|
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
5
6
|
export class PromotingBanners {
|
|
6
7
|
constructor() {
|
|
@@ -104,13 +105,13 @@ export class PromotingBanners {
|
|
|
104
105
|
}
|
|
105
106
|
renderBannersGrid(banner) {
|
|
106
107
|
var _a, _b, _c;
|
|
107
|
-
return h("a", { class: "PromotingBannersBox", href: banner === null || banner === void 0 ? void 0 : banner.url, target: banner.targetType, style: { backgroundImage: `url(${banner === null || banner === void 0 ? void 0 : banner.backgroundImage})` } }, h("div", { class: "PromotingBannersIconContainer" }, h("
|
|
108
|
+
return h("a", { class: "PromotingBannersBox", href: banner === null || banner === void 0 ? void 0 : banner.url, target: banner.targetType, style: { backgroundImage: `url(${banner === null || banner === void 0 ? void 0 : banner.backgroundImage})` } }, h("div", { class: "PromotingBannersIconContainer" }, h("ui-image", { src: (getDevice() === 'Android' || getDevice() === 'iPhone') ? (_a = banner.icon) === null || _a === void 0 ? void 0 : _a.mobile : (getDevice() === 'iPad') ? (_b = banner.image) === null || _b === void 0 ? void 0 : _b.srcTablet : (_c = banner.icon) === null || _c === void 0 ? void 0 : _c.desktop, alt: "Banner image" })), h("div", { class: "PromotingBannersTextContainer" }, h("h3", { class: "PromotingBannersTitle" }, banner === null || banner === void 0 ? void 0 : banner.title), h("div", { class: "PromotingBannersContent", innerHTML: banner === null || banner === void 0 ? void 0 : banner.description }), banner.button &&
|
|
108
109
|
h("button", { class: `PromotingBannersButton ${(banner === null || banner === void 0 ? void 0 : banner.button.text) ? '' : 'ButtonDisabled'}`, innerHTML: banner === null || banner === void 0 ? void 0 : banner.button.text, onClick: this.sendOpenLink.bind(this, banner === null || banner === void 0 ? void 0 : banner.button.url, banner === null || banner === void 0 ? void 0 : banner.button.externalLink, banner === null || banner === void 0 ? void 0 : banner.button.target) })));
|
|
109
110
|
}
|
|
110
111
|
render() {
|
|
111
112
|
var _a, _b, _c, _d;
|
|
112
|
-
return (h("div", { key: '
|
|
113
|
-
h("div", { key: '
|
|
113
|
+
return (h("div", { key: '222d41290fac9b23b64dfede12360488a97d05b2', class: "PromotingBannersSection", ref: el => this.stylingContainer = el }, this.hasErrors && h("div", { key: 'a3b82bcf69a62dea11e7fa192bf987ed8c7465a2', class: "AboutUsError" }, h("div", { key: 'a126b4cc7a0eca5c43bff9d5e8738f9ee27dc06d', class: "ErrorInfo" }, translate('error', this.language))), this.isLoading && h("div", { key: '50adb915a6bc0484c794f0d2460c71e4b49e203f', class: "SkeletonGrid" }, new Array(4).fill(null).map((index) => (h("div", { key: index, class: "Skeleton SkeletonItem" })))), !this.isLoading &&
|
|
114
|
+
h("div", { key: '0d19d75637fdd04bcce848d7314ccb1755c74361', class: "PromotingBannersWrapper" }, h("div", { key: '60240503118b807a9ef5745bef90f3e14a2f5294', class: getDevice() === 'PC' ? 'PromotingBannersHeader' : 'PromotingBannersHeader PromotingBannersHeaderMobile' }, ((_a = this.promotingBannersArray) === null || _a === void 0 ? void 0 : _a.title) && h("h1", { key: 'a9e5a6a67c82997e77ffdbedfa0c1f71b6d06916', class: "PromotingBannersSectionTitle" }, (_b = this.promotingBannersArray) === null || _b === void 0 ? void 0 : _b.title), ((_c = this.promotingBannersArray) === null || _c === void 0 ? void 0 : _c.description) && h("h5", { key: 'c4216110a1e624d526be7af55b4f868aa76db9fd', class: "PromotingBannersSectionSubtitle", style: { 'display': `${getDevice() !== 'PC' ? 'inline-block' : 'none'}` }, innerHTML: (_d = this.promotingBannersArray) === null || _d === void 0 ? void 0 : _d.description })), h("div", { key: 'fc41dc707b2dbc2eb7898ef275112c8fd53f5d8d', class: "PromotingBannersGrid" }, this.promotingBannersArray.map(banner => (this.renderBannersGrid(banner)))))));
|
|
114
115
|
}
|
|
115
116
|
static get is() { return "promoting-banners"; }
|
|
116
117
|
static get encapsulation() { return "shadow"; }
|
|
@@ -49,10 +49,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
49
49
|
}
|
|
50
50
|
switch(bundleId) {
|
|
51
51
|
|
|
52
|
-
case 'promoting-
|
|
52
|
+
case 'promoting-banners_2':
|
|
53
53
|
return import(
|
|
54
54
|
/* webpackMode: "lazy" */
|
|
55
|
-
'./promoting-
|
|
55
|
+
'./promoting-banners_2.entry.js').then(processMod, consoleError);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return import(
|
|
@@ -280,6 +280,7 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
280
280
|
}
|
|
281
281
|
return propValue;
|
|
282
282
|
};
|
|
283
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
283
284
|
var emitEvent = (elm, name, opts) => {
|
|
284
285
|
const ev = plt.ce(name, opts);
|
|
285
286
|
elm.dispatchEvent(ev);
|
|
@@ -1195,4 +1196,4 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1195
1196
|
// src/runtime/nonce.ts
|
|
1196
1197
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1197
1198
|
|
|
1198
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1199
|
+
export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as PromotingBanners } from './promoting-banners-
|
|
2
|
-
import './index-
|
|
1
|
+
export { P as PromotingBanners } from './promoting-banners-84a2f526.js';
|
|
2
|
+
import './index-597ecf15.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-597ecf15.js';
|
|
2
|
+
export { s as setNonce } from './index-597ecf15.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([["promoting-
|
|
8
|
+
return bootstrapLazy([["promoting-banners_2",[[1,"promoting-banners",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"promotingBannersArray":[32],"hasErrors":[32],"isLoading":[32],"translationData":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["handleNewTranslations"]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"imgClass":[1,"img-class"],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-597ecf15.js';
|
|
2
2
|
|
|
3
3
|
const getDevice = () => {
|
|
4
4
|
let userAgent = window.navigator.userAgent;
|
|
@@ -134,7 +134,7 @@ function setStreamStyling(stylingContainer, domain, subscription) {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
const promotingBannersCss = ".PromotingBannersIconContainer img{width:50px;height:50px;border-radius:var(--emw--border-radius-image, 50%);background-size:contain;margin:10px}.PromotingBannersSection{padding:10px;border-radius:var(--emw--border-radius-small, 5px);background-color:var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));background-repeat:no-repeat;background-position:center;color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff));font-family:var(--emw--font-family-primary, \"Montserrat\", sans-serif);overflow:hidden;position:relative}.PromotingBannersGrid{display:grid;grid-gap:30px;background-size:contain;background-repeat:no-repeat;padding:10px;width:100%;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));box-sizing:border-box}.PromotingBannersContent{color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff))}.PromotingBannersContent p{display:block;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.PromotingBannersHeader{display:flex;justify-content:center;flex-direction:column;align-items:center}.PromotingBannersHeader p{text-align:center}.PromotingBannersBox{min-width:200px;display:flex;justify-content:flex-start;overflow:hidden;flex-direction:row;gap:20px;text-decoration:none;color:inherit;background-size:cover;background-position:center;border-radius:var(--emw--border-radius-small, 5px)}.PromotingBannersSectionTitle,.PromotingBannersSectionSubtitle{margin:10px auto;background:transparent}.PromotingBannersTextContainer{margin:5px;overflow:hidden;position:relative;padding-bottom:30px}.PromotingBannersTitle{margin:5px auto}.PromotingBannersButton{cursor:pointer;color:inherit;text-decoration:none;position:absolute;bottom:5px;border:0;background:transparent}.ButtonDisabled{cursor:not-allowed}.PromotionalBannersTextContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AboutUsError .ErrorInfo{color:var(--emw--promo-color-error, var(--emw--color-error, #ed0909))}.SkeletonGrid{display:grid}.Skeleton{animation:skeleton-loading 0.6s linear infinite alternate}@keyframes skeleton-loading{0%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%)}12%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%)}25%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%)}33%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%)}50%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%)}63%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%)}75%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%)}88%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%)}100%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%)}}.SkeletonItem{opacity:0.5;margin:0 15px;width:125px;height:150px;border-radius:var(--emw--border-radius-medium, 15px);margin:20px}";
|
|
137
|
+
const promotingBannersCss = ".PromotingBannersIconContainer ui-image img{width:50px;height:50px;border-radius:var(--emw--border-radius-image, 50%);background-size:contain;margin:10px}.PromotingBannersSection{padding:10px;border-radius:var(--emw--border-radius-small, 5px);background-color:var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));background-repeat:no-repeat;background-position:center;color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff));font-family:var(--emw--font-family-primary, \"Montserrat\", sans-serif);overflow:hidden;position:relative}.PromotingBannersGrid{display:grid;grid-gap:30px;background-size:contain;background-repeat:no-repeat;padding:10px;width:100%;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));box-sizing:border-box}.PromotingBannersContent{color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff))}.PromotingBannersContent p{display:block;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.PromotingBannersHeader{display:flex;justify-content:center;flex-direction:column;align-items:center}.PromotingBannersHeader p{text-align:center}.PromotingBannersBox{min-width:200px;display:flex;justify-content:flex-start;overflow:hidden;flex-direction:row;gap:20px;text-decoration:none;color:inherit;background-size:cover;background-position:center;border-radius:var(--emw--border-radius-small, 5px)}.PromotingBannersSectionTitle,.PromotingBannersSectionSubtitle{margin:10px auto;background:transparent}.PromotingBannersTextContainer{margin:5px;overflow:hidden;position:relative;padding-bottom:30px}.PromotingBannersTitle{margin:5px auto}.PromotingBannersButton{cursor:pointer;color:inherit;text-decoration:none;position:absolute;bottom:5px;border:0;background:transparent}.ButtonDisabled{cursor:not-allowed}.PromotionalBannersTextContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AboutUsError .ErrorInfo{color:var(--emw--promo-color-error, var(--emw--color-error, #ed0909))}.SkeletonGrid{display:grid}.Skeleton{animation:skeleton-loading 0.6s linear infinite alternate}@keyframes skeleton-loading{0%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%)}12%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%)}25%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%)}33%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%)}50%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%)}63%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%)}75%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%)}88%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%)}100%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%)}}.SkeletonItem{opacity:0.5;margin:0 15px;width:125px;height:150px;border-radius:var(--emw--border-radius-medium, 15px);margin:20px}";
|
|
138
138
|
const PromotingBannersStyle0 = promotingBannersCss;
|
|
139
139
|
|
|
140
140
|
const PromotingBanners = class {
|
|
@@ -240,13 +240,13 @@ const PromotingBanners = class {
|
|
|
240
240
|
}
|
|
241
241
|
renderBannersGrid(banner) {
|
|
242
242
|
var _a, _b, _c;
|
|
243
|
-
return h("a", { class: "PromotingBannersBox", href: banner === null || banner === void 0 ? void 0 : banner.url, target: banner.targetType, style: { backgroundImage: `url(${banner === null || banner === void 0 ? void 0 : banner.backgroundImage})` } }, h("div", { class: "PromotingBannersIconContainer" }, h("
|
|
243
|
+
return h("a", { class: "PromotingBannersBox", href: banner === null || banner === void 0 ? void 0 : banner.url, target: banner.targetType, style: { backgroundImage: `url(${banner === null || banner === void 0 ? void 0 : banner.backgroundImage})` } }, h("div", { class: "PromotingBannersIconContainer" }, h("ui-image", { src: (getDevice() === 'Android' || getDevice() === 'iPhone') ? (_a = banner.icon) === null || _a === void 0 ? void 0 : _a.mobile : (getDevice() === 'iPad') ? (_b = banner.image) === null || _b === void 0 ? void 0 : _b.srcTablet : (_c = banner.icon) === null || _c === void 0 ? void 0 : _c.desktop, alt: "Banner image" })), h("div", { class: "PromotingBannersTextContainer" }, h("h3", { class: "PromotingBannersTitle" }, banner === null || banner === void 0 ? void 0 : banner.title), h("div", { class: "PromotingBannersContent", innerHTML: banner === null || banner === void 0 ? void 0 : banner.description }), banner.button &&
|
|
244
244
|
h("button", { class: `PromotingBannersButton ${(banner === null || banner === void 0 ? void 0 : banner.button.text) ? '' : 'ButtonDisabled'}`, innerHTML: banner === null || banner === void 0 ? void 0 : banner.button.text, onClick: this.sendOpenLink.bind(this, banner === null || banner === void 0 ? void 0 : banner.button.url, banner === null || banner === void 0 ? void 0 : banner.button.externalLink, banner === null || banner === void 0 ? void 0 : banner.button.target) })));
|
|
245
245
|
}
|
|
246
246
|
render() {
|
|
247
247
|
var _a, _b, _c, _d;
|
|
248
|
-
return (h("div", { key: '
|
|
249
|
-
h("div", { key: '
|
|
248
|
+
return (h("div", { key: '222d41290fac9b23b64dfede12360488a97d05b2', class: "PromotingBannersSection", ref: el => this.stylingContainer = el }, this.hasErrors && h("div", { key: 'a3b82bcf69a62dea11e7fa192bf987ed8c7465a2', class: "AboutUsError" }, h("div", { key: 'a126b4cc7a0eca5c43bff9d5e8738f9ee27dc06d', class: "ErrorInfo" }, translate('error', this.language))), this.isLoading && h("div", { key: '50adb915a6bc0484c794f0d2460c71e4b49e203f', class: "SkeletonGrid" }, new Array(4).fill(null).map((index) => (h("div", { key: index, class: "Skeleton SkeletonItem" })))), !this.isLoading &&
|
|
249
|
+
h("div", { key: '0d19d75637fdd04bcce848d7314ccb1755c74361', class: "PromotingBannersWrapper" }, h("div", { key: '60240503118b807a9ef5745bef90f3e14a2f5294', class: getDevice() === 'PC' ? 'PromotingBannersHeader' : 'PromotingBannersHeader PromotingBannersHeaderMobile' }, ((_a = this.promotingBannersArray) === null || _a === void 0 ? void 0 : _a.title) && h("h1", { key: 'a9e5a6a67c82997e77ffdbedfa0c1f71b6d06916', class: "PromotingBannersSectionTitle" }, (_b = this.promotingBannersArray) === null || _b === void 0 ? void 0 : _b.title), ((_c = this.promotingBannersArray) === null || _c === void 0 ? void 0 : _c.description) && h("h5", { key: 'c4216110a1e624d526be7af55b4f868aa76db9fd', class: "PromotingBannersSectionSubtitle", style: { 'display': `${getDevice() !== 'PC' ? 'inline-block' : 'none'}` }, innerHTML: (_d = this.promotingBannersArray) === null || _d === void 0 ? void 0 : _d.description })), h("div", { key: 'fc41dc707b2dbc2eb7898ef275112c8fd53f5d8d', class: "PromotingBannersGrid" }, this.promotingBannersArray.map(banner => (this.renderBannersGrid(banner)))))));
|
|
250
250
|
}
|
|
251
251
|
static get watchers() { return {
|
|
252
252
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-597ecf15.js';
|
|
2
|
+
export { s as setNonce } from './index-597ecf15.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([["promoting-
|
|
19
|
+
return bootstrapLazy([["promoting-banners_2",[[1,"promoting-banners",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"promotingBannersArray":[32],"hasErrors":[32],"isLoading":[32],"translationData":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["handleNewTranslations"]}],[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"imgClass":[1,"img-class"],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export { P as promoting_banners } from './promoting-banners-84a2f526.js';
|
|
2
|
+
import { r as registerInstance, h, g as getElement } from './index-597ecf15.js';
|
|
3
|
+
|
|
4
|
+
const uiImageCss = ":host{display:block}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;transition:opacity 0.5s ease-in-out}";
|
|
5
|
+
const UiImageStyle0 = uiImageCss;
|
|
6
|
+
|
|
7
|
+
const UiImage = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.src = undefined;
|
|
11
|
+
this.width = undefined;
|
|
12
|
+
this.height = undefined;
|
|
13
|
+
this.alt = undefined;
|
|
14
|
+
this.imgClass = '';
|
|
15
|
+
this.styles = undefined;
|
|
16
|
+
this.detectDistance = '200px';
|
|
17
|
+
this.imgLoaded = false;
|
|
18
|
+
this.shouldLoad = false;
|
|
19
|
+
}
|
|
20
|
+
handleSrc() {
|
|
21
|
+
if (!this.shouldLoad) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const tempImage = new Image();
|
|
25
|
+
tempImage.src = this.src;
|
|
26
|
+
tempImage.onload = () => {
|
|
27
|
+
if (this.image) {
|
|
28
|
+
this.image.src = this.src;
|
|
29
|
+
this.imgLoaded = true;
|
|
30
|
+
this.el.dispatchEvent(new CustomEvent('load', { bubbles: true }));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
componentDidLoad() {
|
|
35
|
+
if ('IntersectionObserver' in window) {
|
|
36
|
+
this.el.__uxComponent = this;
|
|
37
|
+
if (!window.EMUxObserver) {
|
|
38
|
+
window.EMUxObserver = new IntersectionObserver((entries) => {
|
|
39
|
+
entries.forEach(entry => {
|
|
40
|
+
if (entry.isIntersecting) {
|
|
41
|
+
const comp = entry.target.__uxComponent;
|
|
42
|
+
if (comp) {
|
|
43
|
+
comp.shouldLoad = true;
|
|
44
|
+
comp.handleSrc();
|
|
45
|
+
}
|
|
46
|
+
window.EMUxObserver.unobserve(entry.target);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}, { rootMargin: this.detectDistance });
|
|
50
|
+
}
|
|
51
|
+
window.EMUxObserver.observe(this.el);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.shouldLoad = true;
|
|
55
|
+
this.handleSrc();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
return (h("img", { key: '2bb4dc391fc2f753514103e91c0abf065de3236a', ref: el => (this.image = el), style: this.styles, class: `${this.imgClass} ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
|
|
60
|
+
}
|
|
61
|
+
get el() { return getElement(this); }
|
|
62
|
+
static get watchers() { return {
|
|
63
|
+
"src": ["handleSrc"]
|
|
64
|
+
}; }
|
|
65
|
+
};
|
|
66
|
+
UiImage.style = UiImageStyle0;
|
|
67
|
+
|
|
68
|
+
export { UiImage as ui_image };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PromotingBanners}from"./p-
|
|
1
|
+
export{P as PromotingBanners}from"./p-ab4da639.js";import"./p-d5e26899.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as promoting_banners}from"./p-ab4da639.js";import{r as i,h as t,g as s}from"./p-d5e26899.js";const e=class{constructor(t){i(this,t),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.imgClass="",this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const i=new Image;i.src=this.src,i.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,this.el.dispatchEvent(new CustomEvent("load",{bubbles:!0})))}}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((i=>{i.forEach((i=>{if(i.isIntersecting){const t=i.target.__uxComponent;t&&(t.shouldLoad=!0,t.handleSrc()),window.EMUxObserver.unobserve(i.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return t("img",{key:"2bb4dc391fc2f753514103e91c0abf065de3236a",ref:i=>this.image=i,style:this.styles,class:`${this.imgClass} ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"})}get el(){return s(this)}static get watchers(){return{src:["handleSrc"]}}};e.style=":host{display:block}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;transition:opacity 0.5s ease-in-out}";export{e as ui_image}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as n}from"./p-d5e26899.js";const r=()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"},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 ..."}},o=e=>new Promise(((n,r)=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((n=>{for(let r in e[n])i[n][r]=e[n][r]})),n(i)})).catch((e=>{r(e)}))}));function t(e,n){if(e){const r=document.createElement("style");r.innerHTML=n,e.appendChild(r)}}function a(e,n){const r=new URL(n);fetch(r.href).then((e=>e.text())).then((n=>{const r=document.createElement("style");r.innerHTML=n,e&&e.appendChild(r)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const s=class{constructor(n){e(this,n),this.cmsEndpoint="",this.language="en",this.cmsEnv="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.promotingBannersArray=[],this.hasErrors=!1,this.isLoading=!0,this.translationData=void 0}handleClientStylingChange(e,n){e!=n&&t(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,n){e!=n&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}handleNewTranslations(){this.isLoading=!0,o(this.translationUrl).then((()=>{this.isLoading=!1}))}connectedCallback(){this.cmsEndpoint&&this.language&&this.getPromotingBanners()}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(e,n){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(n,(n=>{r.innerHTML=n,e&&e.appendChild(r)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&t(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getPromotingBanners(){const e=new URL(`${this.cmsEndpoint}/${this.language}/homepage`),n=new URLSearchParams;n.append("language",this.language),n.append("env",this.cmsEnv),n.append("device",(()=>{const e=r();if(e)return"PC"===e?"dk":"mtWeb"})()),e.search=n.toString();let i={method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}};return new Promise(((n,r)=>{this.isLoading=!0,fetch(e.href,i).then((e=>e.json())).then((e=>{const{promotingBanners:r}=e;this.promotingBannersArray=r,n(r)})).catch((e=>{console.error("Error fetching data:",e),this.hasErrors=!0,r(e)})).finally((()=>{this.isLoading=!1}))}))}sendOpenLink(e,n,r){window.postMessage({type:"NavigateTo",path:e,target:r||null,externalLink:n||!1},window.location.href)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=o(this.translationUrl).then((e=>{this.translationData=JSON.stringify(e)})).catch((e=>{console.log(e)}));e.push(n)}return Promise.all(e)}renderBannersGrid(e){var i,o,t;return n("a",{class:"PromotingBannersBox",href:null==e?void 0:e.url,target:e.targetType,style:{backgroundImage:`url(${null==e?void 0:e.backgroundImage})`}},n("div",{class:"PromotingBannersIconContainer"},n("ui-image",{src:"Android"===r()||"iPhone"===r()?null===(i=e.icon)||void 0===i?void 0:i.mobile:"iPad"===r()?null===(o=e.image)||void 0===o?void 0:o.srcTablet:null===(t=e.icon)||void 0===t?void 0:t.desktop,alt:"Banner image"})),n("div",{class:"PromotingBannersTextContainer"},n("h3",{class:"PromotingBannersTitle"},null==e?void 0:e.title),n("div",{class:"PromotingBannersContent",innerHTML:null==e?void 0:e.description}),e.button&&n("button",{class:"PromotingBannersButton "+((null==e?void 0:e.button.text)?"":"ButtonDisabled"),innerHTML:null==e?void 0:e.button.text,onClick:this.sendOpenLink.bind(this,null==e?void 0:e.button.url,null==e?void 0:e.button.externalLink,null==e?void 0:e.button.target)})))}render(){var e,o,t,a,s;return n("div",{key:"222d41290fac9b23b64dfede12360488a97d05b2",class:"PromotingBannersSection",ref:e=>this.stylingContainer=e},this.hasErrors&&n("div",{key:"a3b82bcf69a62dea11e7fa192bf987ed8c7465a2",class:"AboutUsError"},n("div",{key:"a126b4cc7a0eca5c43bff9d5e8738f9ee27dc06d",class:"ErrorInfo"},i[void 0!==(s=this.language)&&s in i?s:"en"].error)),this.isLoading&&n("div",{key:"50adb915a6bc0484c794f0d2460c71e4b49e203f",class:"SkeletonGrid"},new Array(4).fill(null).map((e=>n("div",{key:e,class:"Skeleton SkeletonItem"})))),!this.isLoading&&n("div",{key:"0d19d75637fdd04bcce848d7314ccb1755c74361",class:"PromotingBannersWrapper"},n("div",{key:"60240503118b807a9ef5745bef90f3e14a2f5294",class:"PC"===r()?"PromotingBannersHeader":"PromotingBannersHeader PromotingBannersHeaderMobile"},(null===(e=this.promotingBannersArray)||void 0===e?void 0:e.title)&&n("h1",{key:"a9e5a6a67c82997e77ffdbedfa0c1f71b6d06916",class:"PromotingBannersSectionTitle"},null===(o=this.promotingBannersArray)||void 0===o?void 0:o.title),(null===(t=this.promotingBannersArray)||void 0===t?void 0:t.description)&&n("h5",{key:"c4216110a1e624d526be7af55b4f868aa76db9fd",class:"PromotingBannersSectionSubtitle",style:{display:"PC"!==r()?"inline-block":"none"},innerHTML:null===(a=this.promotingBannersArray)||void 0===a?void 0:a.description})),n("div",{key:"fc41dc707b2dbc2eb7898ef275112c8fd53f5d8d",class:"PromotingBannersGrid"},this.promotingBannersArray.map((e=>this.renderBannersGrid(e))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"]}}};s.style='.PromotingBannersIconContainer ui-image img{width:50px;height:50px;border-radius:var(--emw--border-radius-image, 50%);background-size:contain;margin:10px}.PromotingBannersSection{padding:10px;border-radius:var(--emw--border-radius-small, 5px);background-color:var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));background-repeat:no-repeat;background-position:center;color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff));font-family:var(--emw--font-family-primary, "Montserrat", sans-serif);overflow:hidden;position:relative}.PromotingBannersGrid{display:grid;grid-gap:30px;background-size:contain;background-repeat:no-repeat;padding:10px;width:100%;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));box-sizing:border-box}.PromotingBannersContent{color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff))}.PromotingBannersContent p{display:block;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.PromotingBannersHeader{display:flex;justify-content:center;flex-direction:column;align-items:center}.PromotingBannersHeader p{text-align:center}.PromotingBannersBox{min-width:200px;display:flex;justify-content:flex-start;overflow:hidden;flex-direction:row;gap:20px;text-decoration:none;color:inherit;background-size:cover;background-position:center;border-radius:var(--emw--border-radius-small, 5px)}.PromotingBannersSectionTitle,.PromotingBannersSectionSubtitle{margin:10px auto;background:transparent}.PromotingBannersTextContainer{margin:5px;overflow:hidden;position:relative;padding-bottom:30px}.PromotingBannersTitle{margin:5px auto}.PromotingBannersButton{cursor:pointer;color:inherit;text-decoration:none;position:absolute;bottom:5px;border:0;background:transparent}.ButtonDisabled{cursor:not-allowed}.PromotionalBannersTextContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AboutUsError .ErrorInfo{color:var(--emw--promo-color-error, var(--emw--color-error, #ed0909))}.SkeletonGrid{display:grid}.Skeleton{animation:skeleton-loading 0.6s linear infinite alternate}@keyframes skeleton-loading{0%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%)}12%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%)}25%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%)}33%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%)}50%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%)}63%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%)}75%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%)}88%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%)}100%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%)}}.SkeletonItem{opacity:0.5;margin:0 15px;width:125px;height:150px;border-radius:var(--emw--border-radius-medium, 15px);margin:20px}';export{s as P}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",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)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?v(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{w(m),w(y),(p=m.length>0)&&f.raf(b)},v=e=>h().then(e),g=$(y,!0),S={},k=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>C,map:()=>E,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return C(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],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&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},N=e=>n(e).$hostElement$,U=new WeakMap,W=e=>"sc-"+e.v,D=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=H(n),s=H(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(q);t=t.replace(G,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},F=/\s/,H=e=>e?e.split(F):[],q="Capture",G=RegExp(q+"$"),V=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of _(Object.keys(o)))e in s||D(l,e,o[e],void 0,n,t.l);for(const e of _(Object.keys(s)))D(l,e,o[e],s[e],n,t.l)};function _(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=!1,B=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),V(null,l,z),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=B(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},I=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=B(null,n,o),r&&(l[o].$=r,Y(i,r,t)))},J=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;X(t),e&&e.remove()}}},K=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Q=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(V(e,t,z),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(K(h,m,o))Q(h,m,o),h=t[++i],m=l[++c];else if(K(d,y,o))Q(d,y,o),d=t[--f],y=l[--p];else if(K(h,y,o))Q(h,y,o),Y(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(K(d,m,o))Q(d,m,o),Y(e,d.$,h.$),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=B(t&&t[c],n,u):(Q(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=B(t&&t[c],n,c),m=l[++c]),s&&Y(h.$.parentNode,s,h.$)}i>f?I(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&J(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),I(l,null,t,s,0,s.length-1)):null!==o&&J(o,0,o.length-1)):e.i!==r&&(l.data=r)},X=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(X)},Y=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Z=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ee=(e,t)=>{if(e.l|=16,!(4&e.l))return Z(e,e.k),g((()=>te(e,t)));e.l|=512},te=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ce(n,"componentWillLoad")),ne(l,(()=>oe(e,n,t)))},ne=(e,t)=>le(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),le=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,oe=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=W(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=U.get(e=e.head||e);if(r||U.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:j(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);se(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>re(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},se=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.j,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],Q(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},re=e=>{const t=e.$hostElement$,n=e.t,l=e.k;64&e.l||(e.l|=64,ue(t),ce(n,"componentDidLoad"),e.P(t),l||ie()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>ee(e,!1))),e.l&=-517},ie=()=>{ue(a.documentElement),v((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"promoting-banners"}});return e.dispatchEvent(t),t})(u)))},ce=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||k(e)?e:1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&ee(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);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 l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.R)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},fe=e=>{ce(e,"connectedCallback")},he=e=>{ce(e,"disconnectedCallback")},de=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,T:new Map};l.N=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.j,o=()=>{};if(1&t.l)(null==t?void 0:t.t)?fe(t.t):(null==t?void 0:t.N)&&t.N.then((()=>fe(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(t,t.k=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.W}" was not found`);l.isProxied||(n.R=l.watchers,ae(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o(),fe(t.t)}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=W(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,c=()=>ee(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?he(e.t):(null==e?void 0:e.N)&&e.N.then((()=>he(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ae(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ie,30)))},pe=e=>f.O=e;export{de as b,N as g,R as h,h as p,l as r,pe as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as t}from"./p-
|
|
1
|
+
import{p as n,b as t}from"./p-d5e26899.js";export{s as setNonce}from"./p-d5e26899.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),n(a)})().then((async n=>(await a(),t([["p-7d3c251c",[[1,"promoting-banners",{cmsEndpoint:[513,"cms-endpoint"],language:[513],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],promotingBannersArray:[32],hasErrors:[32],isLoading:[32],translationData:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"]}],[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],imgClass:[1,"img-class"],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}]]]],n))));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as promoting_banners}from"./p-5c9ce269.js";import"./p-53cf2adf.js";
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",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)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?v(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{w(m),w(y),(p=m.length>0)&&f.raf(b)},v=e=>h().then(e),g=$(y,!0),S={},k=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>C,map:()=>E,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return C(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],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&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},N=new WeakMap,U=e=>"sc-"+e.v,W=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=F(n),s=F(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(H);t=t.replace(q,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},D=/\s/,F=e=>e?e.split(D):[],H="Capture",q=RegExp(H+"$"),G=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of V(Object.keys(o)))e in s||W(l,e,o[e],void 0,n,t.l);for(const e of V(Object.keys(s)))W(l,e,o[e],s[e],n,t.l)};function V(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var _=!1,z=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),G(null,l,_),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=z(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},B=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=z(null,n,o),r&&(l[o].$=r,X(i,r,t)))},I=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Q(t),e&&e.remove()}}},J=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),K=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(G(e,t,_),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(J(h,m,o))K(h,m,o),h=t[++i],m=l[++c];else if(J(d,y,o))K(d,y,o),d=t[--f],y=l[--p];else if(J(h,y,o))K(h,y,o),X(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(J(d,m,o))K(d,m,o),X(e,d.$,h.$),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=z(t&&t[c],n,u):(K(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=z(t&&t[c],n,c),m=l[++c]),s&&X(h.$.parentNode,s,h.$)}i>f?B(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&I(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),B(l,null,t,s,0,s.length-1)):null!==o&&I(o,0,o.length-1)):e.i!==r&&(l.data=r)},Q=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Q)},X=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Z=(e,t)=>{if(e.l|=16,!(4&e.l))return Y(e,e.k),g((()=>ee(e,t)));e.l|=512},ee=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ie(n,"componentWillLoad")),te(l,(()=>le(e,n,t)))},te=(e,t)=>ne(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ne=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=U(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=N.get(e=e.head||e);if(r||N.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:j(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);oe(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},oe=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.j,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],K(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.t,l=e.k;64&e.l||(e.l|=64,ce(t),ie(n,"componentDidLoad"),e.P(t),l||re()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>Z(e,!1))),e.l&=-517},re=()=>{ce(a.documentElement),v((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"promoting-banners"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ce=e=>e.classList.add("hydrated"),ue=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||k(e)?e:1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&Z(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);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 l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.R)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},ae=e=>{ie(e,"connectedCallback")},fe=e=>{ie(e,"disconnectedCallback")},he=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,T:new Map};l.N=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.j,o=()=>{};if(1&t.l)(null==t?void 0:t.t)?ae(t.t):(null==t?void 0:t.N)&&t.N.then((()=>ae(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(t,t.k=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.W}" was not found`);l.isProxied||(n.R=l.watchers,ue(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o(),ae(t.t)}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=U(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,c=()=>Z(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?fe(e.t):(null==e?void 0:e.N)&&e.N.then((()=>fe(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ue(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(re,30)))},de=e=>f.O=e;export{he as b,R as h,h as p,l as r,de as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as n}from"./p-53cf2adf.js";const r=()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"},o={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 ..."}},i=e=>new Promise(((n,r)=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((n=>{for(let r in e[n])o[n][r]=e[n][r]})),n(o)})).catch((e=>{r(e)}))}));function t(e,n){if(e){const r=document.createElement("style");r.innerHTML=n,e.appendChild(r)}}function a(e,n){const r=new URL(n);fetch(r.href).then((e=>e.text())).then((n=>{const r=document.createElement("style");r.innerHTML=n,e&&e.appendChild(r)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const s=class{constructor(n){e(this,n),this.cmsEndpoint="",this.language="en",this.cmsEnv="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.promotingBannersArray=[],this.hasErrors=!1,this.isLoading=!0,this.translationData=void 0}handleClientStylingChange(e,n){e!=n&&t(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,n){e!=n&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}handleNewTranslations(){this.isLoading=!0,i(this.translationUrl).then((()=>{this.isLoading=!1}))}connectedCallback(){this.cmsEndpoint&&this.language&&this.getPromotingBanners()}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(e,n){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(n,(n=>{r.innerHTML=n,e&&e.appendChild(r)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&t(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getPromotingBanners(){const e=new URL(`${this.cmsEndpoint}/${this.language}/homepage`),n=new URLSearchParams;n.append("language",this.language),n.append("env",this.cmsEnv),n.append("device",(()=>{const e=r();if(e)return"PC"===e?"dk":"mtWeb"})()),e.search=n.toString();let o={method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}};return new Promise(((n,r)=>{this.isLoading=!0,fetch(e.href,o).then((e=>e.json())).then((e=>{const{promotingBanners:r}=e;this.promotingBannersArray=r,n(r)})).catch((e=>{console.error("Error fetching data:",e),this.hasErrors=!0,r(e)})).finally((()=>{this.isLoading=!1}))}))}sendOpenLink(e,n,r){window.postMessage({type:"NavigateTo",path:e,target:r||null,externalLink:n||!1},window.location.href)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=i(this.translationUrl).then((e=>{this.translationData=JSON.stringify(e)})).catch((e=>{console.log(e)}));e.push(n)}return Promise.all(e)}renderBannersGrid(e){var o,i,t;return n("a",{class:"PromotingBannersBox",href:null==e?void 0:e.url,target:e.targetType,style:{backgroundImage:`url(${null==e?void 0:e.backgroundImage})`}},n("div",{class:"PromotingBannersIconContainer"},n("img",{src:"Android"===r()||"iPhone"===r()?null===(o=e.icon)||void 0===o?void 0:o.mobile:"iPad"===r()?null===(i=e.image)||void 0===i?void 0:i.srcTablet:null===(t=e.icon)||void 0===t?void 0:t.desktop,alt:"Banner image"})),n("div",{class:"PromotingBannersTextContainer"},n("h3",{class:"PromotingBannersTitle"},null==e?void 0:e.title),n("div",{class:"PromotingBannersContent",innerHTML:null==e?void 0:e.description}),e.button&&n("button",{class:"PromotingBannersButton "+((null==e?void 0:e.button.text)?"":"ButtonDisabled"),innerHTML:null==e?void 0:e.button.text,onClick:this.sendOpenLink.bind(this,null==e?void 0:e.button.url,null==e?void 0:e.button.externalLink,null==e?void 0:e.button.target)})))}render(){var e,i,t,a,s;return n("div",{key:"7b5d4fb98c2e5f281e88ee55796acbdbccea9b18",class:"PromotingBannersSection",ref:e=>this.stylingContainer=e},this.hasErrors&&n("div",{key:"a94b12073ffc5f31c16869980a788958c3cd094d",class:"AboutUsError"},n("div",{key:"01b900b7b20a509fdfe5b42fd922498b9c401dd1",class:"ErrorInfo"},o[void 0!==(s=this.language)&&s in o?s:"en"].error)),this.isLoading&&n("div",{key:"a3154cc38eb0ff53ac4a95e8d7637b0d827d3703",class:"SkeletonGrid"},new Array(4).fill(null).map((e=>n("div",{key:e,class:"Skeleton SkeletonItem"})))),!this.isLoading&&n("div",{key:"2482f3de75009242aaf9017a5143d54ad4215454",class:"PromotingBannersWrapper"},n("div",{key:"03a427cd483369db58e4167336b36b7e84a84abf",class:"PC"===r()?"PromotingBannersHeader":"PromotingBannersHeader PromotingBannersHeaderMobile"},(null===(e=this.promotingBannersArray)||void 0===e?void 0:e.title)&&n("h1",{key:"3506a22eef9b94146424307dcdde934e21c2b348",class:"PromotingBannersSectionTitle"},null===(i=this.promotingBannersArray)||void 0===i?void 0:i.title),(null===(t=this.promotingBannersArray)||void 0===t?void 0:t.description)&&n("h5",{key:"36783744584e48a83a629be83de187f552668c8b",class:"PromotingBannersSectionSubtitle",style:{display:"PC"!==r()?"inline-block":"none"},innerHTML:null===(a=this.promotingBannersArray)||void 0===a?void 0:a.description})),n("div",{key:"4fd616bb2759411e226c3e912f0a9096f64703d0",class:"PromotingBannersGrid"},this.promotingBannersArray.map((e=>this.renderBannersGrid(e))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"]}}};s.style='.PromotingBannersIconContainer img{width:50px;height:50px;border-radius:var(--emw--border-radius-image, 50%);background-size:contain;margin:10px}.PromotingBannersSection{padding:10px;border-radius:var(--emw--border-radius-small, 5px);background-color:var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));background-repeat:no-repeat;background-position:center;color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff));font-family:var(--emw--font-family-primary, "Montserrat", sans-serif);overflow:hidden;position:relative}.PromotingBannersGrid{display:grid;grid-gap:30px;background-size:contain;background-repeat:no-repeat;padding:10px;width:100%;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));box-sizing:border-box}.PromotingBannersContent{color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff))}.PromotingBannersContent p{display:block;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.PromotingBannersHeader{display:flex;justify-content:center;flex-direction:column;align-items:center}.PromotingBannersHeader p{text-align:center}.PromotingBannersBox{min-width:200px;display:flex;justify-content:flex-start;overflow:hidden;flex-direction:row;gap:20px;text-decoration:none;color:inherit;background-size:cover;background-position:center;border-radius:var(--emw--border-radius-small, 5px)}.PromotingBannersSectionTitle,.PromotingBannersSectionSubtitle{margin:10px auto;background:transparent}.PromotingBannersTextContainer{margin:5px;overflow:hidden;position:relative;padding-bottom:30px}.PromotingBannersTitle{margin:5px auto}.PromotingBannersButton{cursor:pointer;color:inherit;text-decoration:none;position:absolute;bottom:5px;border:0;background:transparent}.ButtonDisabled{cursor:not-allowed}.PromotionalBannersTextContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AboutUsError .ErrorInfo{color:var(--emw--promo-color-error, var(--emw--color-error, #ed0909))}.SkeletonGrid{display:grid}.Skeleton{animation:skeleton-loading 0.6s linear infinite alternate}@keyframes skeleton-loading{0%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%)}12%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%)}25%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%)}33%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%)}50%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%)}63%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%)}75%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%)}88%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%)}100%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%)}}.SkeletonItem{opacity:0.5;margin:0 15px;width:125px;height:150px;border-radius:var(--emw--border-radius-medium, 15px);margin:20px}';export{s as P}
|