@everymatrix/promoting-banners 1.56.0 → 1.56.2

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.
Files changed (32) hide show
  1. package/dist/cjs/{index-1ddadbf2.js → index-cb64c2ca.js} +73 -208
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{promoting-banners-4b1eaf97.js → promoting-banners-570e15dc.js} +3 -19
  5. package/dist/cjs/promoting-banners.cjs.entry.js +2 -2
  6. package/dist/cjs/promoting-banners.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/components/promoting-banners/promoting-banners.js +2 -32
  9. package/dist/esm/{index-31b0a838.js → index-43b1379d.js} +73 -208
  10. package/dist/esm/index.js +2 -2
  11. package/dist/esm/loader.js +2 -2
  12. package/dist/esm/{promoting-banners-daee1325.js → promoting-banners-79d679c1.js} +3 -19
  13. package/dist/esm/promoting-banners.entry.js +2 -2
  14. package/dist/esm/promoting-banners.js +3 -3
  15. package/dist/promoting-banners/index.esm.js +1 -1
  16. package/dist/promoting-banners/p-33973aec.entry.js +1 -0
  17. package/dist/promoting-banners/p-53cf2adf.js +2 -0
  18. package/dist/promoting-banners/p-5c9ce269.js +1 -0
  19. package/dist/promoting-banners/promoting-banners.esm.js +1 -1
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/promoting-banners/.stencil/packages/stencil/promoting-banners/stencil.config.d.ts +2 -0
  21. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/promoting-banners/.stencil/packages/stencil/promoting-banners/stencil.config.dev.d.ts +2 -0
  22. package/dist/types/stencil-public-runtime.d.ts +0 -6
  23. package/package.json +1 -1
  24. package/dist/promoting-banners/p-18729188.entry.js +0 -1
  25. package/dist/promoting-banners/p-54b909eb.js +0 -2
  26. package/dist/promoting-banners/p-ae2aca95.js +0 -1
  27. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/promoting-banners/.stencil/packages/stencil/promoting-banners/stencil.config.d.ts +0 -2
  28. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/promoting-banners/.stencil/packages/stencil/promoting-banners/stencil.config.dev.d.ts +0 -2
  29. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/promoting-banners/.stencil/tools/plugins/index.d.ts +0 -0
  30. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/promoting-banners/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  31. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/promoting-banners/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  32. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/promoting-banners/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-31b0a838.js';
1
+ import { r as registerInstance, h } from './index-43b1379d.js';
2
2
 
3
3
  const getDevice = () => {
4
4
  let userAgent = window.navigator.userAgent;
@@ -140,33 +140,17 @@ const PromotingBannersStyle0 = promotingBannersCss;
140
140
  const PromotingBanners = class {
141
141
  constructor(hostRef) {
142
142
  registerInstance(this, hostRef);
143
- /**
144
- * The endpoint
145
- */
146
143
  this.cmsEndpoint = '';
147
- /**
148
- * The language
149
- */
150
144
  this.language = 'en';
151
- /**
152
- * The CMS environment
153
- */
154
145
  this.cmsEnv = '';
155
- /**
156
- * Client custom styling via inline style
157
- */
146
+ this.mbSource = undefined;
158
147
  this.clientStyling = '';
159
- /**
160
- * Client custom styling via url
161
- */
162
148
  this.clientStylingUrl = '';
163
- /**
164
- * Translations via URL
165
- */
166
149
  this.translationUrl = '';
167
150
  this.promotingBannersArray = [];
168
151
  this.hasErrors = false;
169
152
  this.isLoading = true;
153
+ this.translationData = undefined;
170
154
  }
171
155
  handleClientStylingChange(newValue, oldValue) {
172
156
  if (newValue != oldValue) {
@@ -1,2 +1,2 @@
1
- export { P as promoting_banners } from './promoting-banners-daee1325.js';
2
- import './index-31b0a838.js';
1
+ export { P as promoting_banners } from './promoting-banners-79d679c1.js';
2
+ import './index-43b1379d.js';
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-31b0a838.js';
2
- export { s as setNonce } from './index-31b0a838.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-43b1379d.js';
2
+ export { s as setNonce } from './index-43b1379d.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -1 +1 @@
1
- export{P as PromotingBanners}from"./p-ae2aca95.js";import"./p-54b909eb.js";
1
+ export{P as PromotingBanners}from"./p-5c9ce269.js";import"./p-53cf2adf.js";
@@ -0,0 +1 @@
1
+ export{P as promoting_banners}from"./p-5c9ce269.js";import"./p-53cf2adf.js";
@@ -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=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}
@@ -0,0 +1 @@
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}
@@ -1 +1 @@
1
- import{p as n,b as t}from"./p-54b909eb.js";export{s as setNonce}from"./p-54b909eb.js";import{g as l}from"./p-e1255160.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),n(l)})().then((async n=>(await l(),t([["p-18729188",[[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"]}]]]],n))));
1
+ import{p as n,b as t}from"./p-53cf2adf.js";export{s as setNonce}from"./p-53cf2adf.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-33973aec",[[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"]}]]]],n))));
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -1015,8 +1015,6 @@ export declare namespace JSXBase {
1015
1015
  autoPlay?: boolean;
1016
1016
  autoplay?: boolean | string;
1017
1017
  controls?: boolean;
1018
- controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1019
- controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1020
1018
  crossOrigin?: string;
1021
1019
  crossorigin?: string;
1022
1020
  loop?: boolean;
@@ -1566,10 +1564,6 @@ export declare namespace JSXBase {
1566
1564
  onSubmitCapture?: (event: Event) => void;
1567
1565
  onInvalid?: (event: Event) => void;
1568
1566
  onInvalidCapture?: (event: Event) => void;
1569
- onBeforeToggle?: (event: Event) => void;
1570
- onBeforeToggleCapture?: (event: Event) => void;
1571
- onToggle?: (event: Event) => void;
1572
- onToggleCapture?: (event: Event) => void;
1573
1567
  onLoad?: (event: Event) => void;
1574
1568
  onLoadCapture?: (event: Event) => void;
1575
1569
  onError?: (event: Event) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/promoting-banners",
3
- "version": "1.56.0",
3
+ "version": "1.56.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- export{P as promoting_banners}from"./p-ae2aca95.js";import"./p-54b909eb.js";
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>{t.set(n.t=e,n)},l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),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:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.o?w(b):f.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(m),$(y),(p=m.length>0)&&f.raf(b)},w=e=>h().then(e),S=v(y,!0),g=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>k,unwrap:()=>M,unwrapErr:()=>x});var k=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return O(e.value);throw"should never get here"}var E,M=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},P=(e,t,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof e&&!g(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?A(null,o):o),i=s)};if(c(n),t){t.key&&(l=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=A(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=l,u},A=(e,t)=>({o:0,m:e,i:t,v:null,h:null,u:null,p:null}),L={},N=(e,t)=>null==e||g(e)?e:1&t?e+"":e,R=new WeakMap,T=e=>"sc-"+e.$,D=(e,t,n,o,s,i)=>{if(n!==o){let r=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=U(n);let s=U(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if("ref"===t)o&&o(e);else if(r||"o"!==t[0]||"n"!==t[1]){const l=g(o);if((r||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]!==o&&(e[t]=o);else{const l=null==o?"":o;"list"===t?r=!1:null!=n&&e[t]==l||("function"==typeof e.__lookupSetter__(t)?e[t]=l:e.setAttribute(t,l))}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(u,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(W);t=t.replace(F,""),n&&f.rel(e,t,n,l),o&&f.ael(e,t,o,l)}}},H=/\s/,U=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(H):[]),W="Capture",F=RegExp(W+"$"),V=(e,t,n)=>{const o=11===t.v.nodeType&&t.v.host?t.v.host:t.v,l=e&&e.u||{},s=t.u||{};for(const e of q(Object.keys(l)))e in s||D(o,e,l[e],void 0,n,t.o);for(const e of q(Object.keys(s)))D(o,e,l[e],s[e],n,t.o)};function q(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var G=!1,_=(e,t,n)=>{const o=t.h[n];let l,s,i=0;if(null!==o.i)l=o.v=a.createTextNode(o.i);else if(l=o.v=a.createElement(o.m),V(null,o,G),o.h)for(i=0;i<o.h.length;++i)s=_(e,o,i),s&&l.appendChild(s);return l["s-hn"]=E,l},z=(e,t,n,o,l,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===E&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=_(null,n,l),i&&(o[l].v=i,Q(r,i,t)))},B=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.v;K(t),e&&e.remove()}}},I=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),J=(e,t,n=!1)=>{const o=t.v=e.v,l=e.h,s=t.h,i=t.i;null===i?(V(e,t,G),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=o.length-1,m=o[0],y=o[p];for(;r<=f&&c<=p;)if(null==h)h=t[++r];else if(null==d)d=t[--f];else if(null==m)m=o[++c];else if(null==y)y=o[--p];else if(I(h,m,l))J(h,m,l),h=t[++r],m=o[++c];else if(I(d,y,l))J(d,y,l),d=t[--f],y=o[--p];else if(I(h,y,l))J(h,y,l),Q(e,h.v,d.v.nextSibling),h=t[++r],y=o[--p];else if(I(d,m,l))J(d,m,l),Q(e,d.v,h.v),d=t[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(i=t[u],i.m!==m.m?s=_(t&&t[c],n,u):(J(i,m,l),t[u]=void 0,s=i.v),m=o[++c]):(s=_(t&&t[c],n,c),m=o[++c]),s&&Q(h.v.parentNode,s,h.v)}r>f?z(e,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&B(t,r,f)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),z(o,null,t,s,0,s.length-1)):!n&&null!==l&&B(l,0,l.length-1)):e.i!==i&&(o.data=i)},K=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(K)},Q=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),X=(e,t)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((o=>e.S=()=>{t["s-p"].splice(n-1,1),o()})))}},Y=(e,t)=>{if(e.o|=16,!(4&e.o))return X(e,e.j),S((()=>Z(e,t)));e.o|=512},Z=(e,t)=>{const n=e.$hostElement$,o=e.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 t&&(l=ie(o,"componentWillLoad",void 0,n)),ee(l,(()=>ne(e,o,t)))},ee=(e,t)=>te(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),te=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ne=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=T(t),l=r.get(o);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let s,i=R.get(e=e.head||e);if(i||R.set(e,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.O)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(l),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=l+t.innerHTML:e.prepend(s)}else e.append(s);1&t.o&&e.insertBefore(s,null)}4&t.o&&(s.innerHTML+=c),i&&i.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);oe(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>le(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},oe=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.k,s=e.C||A(null,null),i=(e=>e&&e.m===L)(t)?t:P(null,null,t);if(E=o.tagName,l.M&&(i.u=i.u||{},l.M.map((([e,t])=>i.u[t]=o[e]))),n&&i.u)for(const e of Object.keys(i.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=o[e]);i.m=null,i.o|=4,e.C=i,i.v=s.v=o.shadowRoot||o,J(s,i,n)})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},le=e=>{const t=e.$hostElement$,n=e.t,o=e.j;64&e.o||(e.o|=64,re(t),ie(n,"componentDidLoad",void 0,t),e.P(t),o||se()),e.S&&(e.S(),e.S=void 0),512&e.o&&w((()=>Y(e,!1))),e.o&=-517},se=()=>{w((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"promoting-banners"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n,o)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,o)}},re=e=>e.classList.add("hydrated"),ce=(e,t,o,l)=>{const i=n(e);if(!i)throw Error(`Couldn't find host element for "${l.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.A.get(t),u=i.o,a=i.t;if(o=N(o,l.L[t][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.A.set(t,o),a)){if(l.N&&128&u){const e=l.N[t];e&&e.map((e=>{try{a[e](o,c,t)}catch(e){s(e,r)}}))}2==(18&u)&&Y(i,!1)}},ue=(e,t,o)=>{var l,s;const i=e.prototype;if(t.L||t.N||e.watchers){e.watchers&&!t.N&&(t.N=e.watchers);const r=Object.entries(null!=(l=t.L)?l:{});if(r.map((([e,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.L[e][0]|=2048),r&&(t.L[e][0]|=4096),(1&o||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.L[e][0]))return((e,t)=>n(this).A.get(t))(0,e);const o=n(this),l=o?o.t:i;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(r){const n=32&l?this[e]:i.$hostElement$[e];return void 0===n&&i.A.get(e)?s=i.A.get(e):!i.A.get(e)&&n&&i.A.set(e,n),r.call(this,N(s,l)),void ce(this,e,s=32&l?this[e]:i.$hostElement$[e],t)}{if(!(1&o&&4096&t.L[e][0]))return ce(this,e,s,t),void(1&o&&!i.t&&i.R.then((()=>{4096&t.L[e][0]&&i.t[e]!==i.A.get(e)&&(i.t[e]=s)})));const n=()=>{const n=i.t[e];!i.A.get(e)&&n&&i.A.set(e,n),i.t[e]=N(s,l),ce(this,e,i.t[e],t)};i.t?n():i.R.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var r;const c=o.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 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=t.N)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.N)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.M)||l.push([e,s])),s}))]))}}return e},ae=(e,t)=>{ie(e,"connectedCallback",void 0,t)},fe=(e,t)=>{ie(e,"disconnectedCallback",void 0,t||e)},he=(e,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(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],$: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.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,k:n,A:new Map};o.R=new Promise((e=>o.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,c),1&c.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! 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),w&&(clearTimeout(w),w=null),S?b.push(this):f.jmp((()=>(e=>{if(!(1&f.o)){const t=n(e),o=t.k,l=()=>{};if(1&t.o)(null==t?void 0:t.t)?ae(t.t,e):(null==t?void 0:t.R)&&t.R.then((()=>ae(t.t,e)));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(t,t.j=n);break}}o.L&&Object.entries(o.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 o;if(!(32&t.o)){if(t.o|=32,n.D){const l=((e,t)=>{const n=e.$.replace(/-/g,"_"),o=e.D;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((e=>(i.set(o,e),e[n])),(e=>{s(e,t.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(l&&"then"in l){const e=()=>{};o=await l,e()}else o=l;if(!o)throw Error(`Constructor for "${n.$}#${t.H}" was not found`);o.isProxied||(n.N=o.watchers,ue(o,n,2),o.isProxied=!0);const r=()=>{};t.o|=8;try{new o(t)}catch(t){s(t,e)}t.o&=-9,t.o|=128,r(),ae(t.t,e)}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=T(n);if(!r.has(t)){const o=()=>{};((e,t,n)=>{let o=r.get(e);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,r.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.j,c=()=>Y(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async e=>{if(!(1&f.o)){const t=n(e);(null==t?void 0:t.t)?fe(t.t,e):(null==t?void 0:t.R)&&t.R.then((()=>fe(t.t,e)))}R.has(e)&&R.delete(e),e.shadowRoot&&R.has(e.shadowRoot)&&R.delete(e.shadowRoot)})(this))),f.raf((()=>{var e;const t=n(this),o=b.findIndex((e=>e===this));o>-1&&b.splice(o,1),(null==(e=null==t?void 0:t.C)?void 0:e.v)instanceof Node&&!t.C.v.isConnected&&delete t.C.v}))}componentOnReady(){return n(this).R}};c.D=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ue(a,c,1)))}))})),h.length>0&&(g&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(l=f.O)?l:j(a);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(se,30)))},de=e=>f.O=e;export{he as b,P as h,h as p,o as r,de as s}
@@ -1 +0,0 @@
1
- import{r as e,h as n}from"./p-54b909eb.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.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.promotingBannersArray=[],this.hasErrors=!1,this.isLoading=!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}
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;