@everymatrix/casino-games-category-section-nd 1.77.10 → 1.77.12
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/components/{CasinoGameThumbnailNd-BLfPtQiU.js → CasinoGameThumbnailNd-CKf2FWA3.js} +1 -1
- package/components/{CasinoGameThumbnailNd-ccriA-QP.cjs → CasinoGameThumbnailNd-DHulvNv5.cjs} +1 -1
- package/components/{CasinoGameThumbnailNd-CQMFezI2.js → CasinoGameThumbnailNd-lJatEwhs.js} +1 -1
- package/components/{CasinoGamesCategorySectionNd-CmKayyxt.js → CasinoGamesCategorySectionNd-Ax1gZuGM.js} +2 -2
- package/components/{CasinoGamesCategorySectionNd-BHqIT70G.js → CasinoGamesCategorySectionNd-BZr199gV.js} +2 -2
- package/components/{CasinoGamesCategorySectionNd-tcL7pNgs.cjs → CasinoGamesCategorySectionNd-Ftg0G2Od.cjs} +1 -1
- package/es2015/casino-games-category-section-nd.cjs +1 -1
- package/es2015/casino-games-category-section-nd.js +1 -1
- package/esnext/casino-games-category-section-nd.js +1 -1
- package/package.json +1 -1
- package/stencil/{index-256b7d4e-CSg5Fmgt.js → index-256b7d4e-B27ydHcs.js} +1 -1
- package/stencil/{index-256b7d4e-7jcaQ7rC.js → index-256b7d4e-DrOXnq3q.js} +1 -1
- package/stencil/{index-256b7d4e-BnoVkrXr.cjs → index-256b7d4e-yFNBIexD.cjs} +1 -1
- package/stencil/{ui-image-Bn9a7Spu.js → ui-image-Buu9LDKy.js} +1 -1
- package/stencil/{ui-image-CfDP8dmz.js → ui-image-BvxFHaEs.js} +1 -1
- package/stencil/{ui-image-8975d115-DxO6YS6C.js → ui-image-ae115205-Bmmit6PH.js} +18 -8
- package/stencil/{ui-image-8975d115-C8pJTCfZ.js → ui-image-ae115205-C9w0DS-q.js} +18 -8
- package/stencil/ui-image-ae115205-CcwMMc09.cjs +1 -0
- package/stencil/{ui-image-DB-cMaV6.cjs → ui-image-j5OhrDS4.cjs} +1 -1
- package/stencil/{ui-image_2-CXGY1IY3.cjs → ui-image_2-C-3C7pxb.cjs} +1 -1
- package/stencil/{ui-image_2-DwuycSdC.js → ui-image_2-D4c_LX5r.js} +2 -2
- package/stencil/{ui-image_2-rhY_9uoo.js → ui-image_2-hEBXfomA.js} +2 -2
- package/stencil/ui-image-8975d115-BIwRmPA-.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as n, h as t, H as r, g as a } from "./index-256b7d4e-
|
|
2
|
-
const
|
|
1
|
+
import { r as n, h as t, H as r, g as a } from "./index-256b7d4e-DrOXnq3q.js";
|
|
2
|
+
const o = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", d = o, h = class {
|
|
3
3
|
constructor(i) {
|
|
4
|
-
n(this, i), this.
|
|
4
|
+
n(this, i), this._onLoad = () => {
|
|
5
5
|
this.imgLoaded = !0;
|
|
6
6
|
}, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
|
|
7
7
|
}
|
|
8
8
|
onSrcChange() {
|
|
9
|
-
this.loading !== "eager" && (this.imgLoaded = !1,
|
|
9
|
+
this.loading !== "eager" && (this.imgLoaded = !1, (typeof window > "u" || !("IntersectionObserver" in window)) && this.beginLoad());
|
|
10
10
|
}
|
|
11
11
|
onLoadingChange(i, e) {
|
|
12
|
-
i !== e && (this.cleanupObserver(), i === "eager" ?
|
|
12
|
+
i !== e && (this.cleanupObserver(), i === "eager" ? this.imgEl && this.src && (this.imgEl.src = this.src) : (this.imgLoaded = !1, this.setupObserver()));
|
|
13
13
|
}
|
|
14
14
|
componentDidLoad() {
|
|
15
15
|
this.loading !== "eager" && this.setupObserver();
|
|
@@ -41,7 +41,17 @@ const h = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
|
|
|
41
41
|
(i = this.io) === null || i === void 0 || i.disconnect(), this.io = void 0;
|
|
42
42
|
}
|
|
43
43
|
beginLoad() {
|
|
44
|
-
this.
|
|
44
|
+
this.preloadAndSetSrc(), this.imgEl && this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
|
|
45
|
+
}
|
|
46
|
+
preloadAndSetSrc() {
|
|
47
|
+
if (!this.src || !this.imgEl)
|
|
48
|
+
return;
|
|
49
|
+
const i = new Image();
|
|
50
|
+
i.onload = () => {
|
|
51
|
+
this.imgEl && (this.imgEl.src = i.src, this.imgLoaded = !0);
|
|
52
|
+
}, i.onerror = () => {
|
|
53
|
+
this.imgEl && (this.imgEl.src = this.src);
|
|
54
|
+
}, i.src = this.src;
|
|
45
55
|
}
|
|
46
56
|
get showSkeleton() {
|
|
47
57
|
return this.loading !== "eager" && !this.imgLoaded;
|
|
@@ -65,7 +75,7 @@ const h = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
|
|
|
65
75
|
};
|
|
66
76
|
}
|
|
67
77
|
};
|
|
68
|
-
|
|
78
|
+
h.style = d;
|
|
69
79
|
export {
|
|
70
|
-
|
|
80
|
+
h as U
|
|
71
81
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as n, h as t, H as r, g as a } from "./index-256b7d4e-
|
|
2
|
-
const
|
|
1
|
+
import { r as n, h as t, H as r, g as a } from "./index-256b7d4e-B27ydHcs.js";
|
|
2
|
+
const o = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", d = o, h = class {
|
|
3
3
|
constructor(i) {
|
|
4
|
-
n(this, i), this.
|
|
4
|
+
n(this, i), this._onLoad = () => {
|
|
5
5
|
this.imgLoaded = !0;
|
|
6
6
|
}, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
|
|
7
7
|
}
|
|
8
8
|
onSrcChange() {
|
|
9
|
-
this.loading !== "eager" && (this.imgLoaded = !1,
|
|
9
|
+
this.loading !== "eager" && (this.imgLoaded = !1, (typeof window == "undefined" || !("IntersectionObserver" in window)) && this.beginLoad());
|
|
10
10
|
}
|
|
11
11
|
onLoadingChange(i, e) {
|
|
12
|
-
i !== e && (this.cleanupObserver(), i === "eager" ?
|
|
12
|
+
i !== e && (this.cleanupObserver(), i === "eager" ? this.imgEl && this.src && (this.imgEl.src = this.src) : (this.imgLoaded = !1, this.setupObserver()));
|
|
13
13
|
}
|
|
14
14
|
componentDidLoad() {
|
|
15
15
|
this.loading !== "eager" && this.setupObserver();
|
|
@@ -41,7 +41,17 @@ const h = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
|
|
|
41
41
|
(i = this.io) === null || i === void 0 || i.disconnect(), this.io = void 0;
|
|
42
42
|
}
|
|
43
43
|
beginLoad() {
|
|
44
|
-
this.
|
|
44
|
+
this.preloadAndSetSrc(), this.imgEl && this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
|
|
45
|
+
}
|
|
46
|
+
preloadAndSetSrc() {
|
|
47
|
+
if (!this.src || !this.imgEl)
|
|
48
|
+
return;
|
|
49
|
+
const i = new Image();
|
|
50
|
+
i.onload = () => {
|
|
51
|
+
this.imgEl && (this.imgEl.src = i.src, this.imgLoaded = !0);
|
|
52
|
+
}, i.onerror = () => {
|
|
53
|
+
this.imgEl && (this.imgEl.src = this.src);
|
|
54
|
+
}, i.src = this.src;
|
|
45
55
|
}
|
|
46
56
|
get showSkeleton() {
|
|
47
57
|
return this.loading !== "eager" && !this.imgLoaded;
|
|
@@ -65,7 +75,7 @@ const h = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
|
|
|
65
75
|
};
|
|
66
76
|
}
|
|
67
77
|
};
|
|
68
|
-
|
|
78
|
+
h.style = d;
|
|
69
79
|
export {
|
|
70
|
-
|
|
80
|
+
h as U
|
|
71
81
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index-256b7d4e-yFNBIexD.cjs"),n=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",a=n,r=class{constructor(i){e.registerInstance(this,i),this._onLoad=()=>{this.imgLoaded=!0},this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){this.loading!=="eager"&&(this.imgLoaded=!1,(typeof window=="undefined"||!("IntersectionObserver"in window))&&this.beginLoad())}onLoadingChange(i,t){i!==t&&(this.cleanupObserver(),i==="eager"?this.imgEl&&this.src&&(this.imgEl.src=this.src):(this.imgLoaded=!1,this.setupObserver()))}componentDidLoad(){this.loading!=="eager"&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.imgEl&&(this.imgEl.src="")}canUseIO(){return typeof window!="undefined"&&"IntersectionObserver"in window}setupObserver(){if(this.loading!=="eager"){if(!this.canUseIO()){this.beginLoad();return}this.io=new IntersectionObserver(i=>{var t;for(const s of i)if(s.isIntersecting){this.beginLoad(),(t=this.io)===null||t===void 0||t.unobserve(s.target),this.cleanupObserver();break}},{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)}}cleanupObserver(){var i;(i=this.io)===null||i===void 0||i.disconnect(),this.io=void 0}beginLoad(){this.preloadAndSetSrc(),this.imgEl&&this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0)}preloadAndSetSrc(){if(!this.src||!this.imgEl)return;const i=new Image;i.onload=()=>{this.imgEl&&(this.imgEl.src=i.src,this.imgLoaded=!0)},i.onerror=()=>{this.imgEl&&(this.imgEl.src=this.src)},i.src=this.src}get showSkeleton(){return this.loading!=="eager"&&!this.imgLoaded}renderEager(){return e.h(e.Host,{class:"HostContainer"},e.h("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return e.h(e.Host,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&e.h("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),e.h("img",{ref:i=>this.imgEl=i,src:void 0,decoding:"async",style:this.styles,onLoad:this._onLoad,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return this.loading==="eager"?this.renderEager():this.renderLazy()}get el(){return e.getElement(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};r.style=a;exports.UiImage=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var c=(t,r,i)=>new Promise((d,s)=>{var g=e=>{try{n(i.next(e))}catch(a){s(a)}},l=e=>{try{n(i.throw(e))}catch(a){s(a)}},n=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,l);n((i=i.apply(t,r)).next())});const u=require("./index-256b7d4e-
|
|
1
|
+
"use strict";var c=(t,r,i)=>new Promise((d,s)=>{var g=e=>{try{n(i.next(e))}catch(a){s(a)}},l=e=>{try{n(i.throw(e))}catch(a){s(a)}},n=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,l);n((i=i.apply(t,r)).next())});const u=require("./index-256b7d4e-yFNBIexD.cjs"),m=require("./app-globals-0f993ce5-sCt45RkC.cjs");var o=typeof document!="undefined"?document.currentScript:null,h=()=>{const t=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:o&&o.tagName.toUpperCase()==="SCRIPT"&&o.src||new URL("stencil/ui-image-j5OhrDS4.cjs",document.baseURI).href,r={};return t!==""&&(r.resourcesUrl=new URL(".",t).href),u.promiseResolve(r)};h().then(t=>c(exports,null,function*(){return yield m.globalScripts(),u.bootstrapLazy([["ui-image_2",[[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],loading:[1],imgLoaded:[32]},null,{src:["onSrcChange"],loading:["onLoadingChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],t)}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./ui-image-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./ui-image-ae115205-CcwMMc09.cjs"),t=require("./index-256b7d4e-yFNBIexD.cjs"),s=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",a=s,n=class{constructor(e){t.registerInstance(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,i){i!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return e===0?0:`${e}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset";default:return"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t.h("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((e,i)=>t.h("div",{key:i,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`
|
|
2
2
|
:host {
|
|
3
3
|
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
4
4
|
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as m } from "./ui-image-
|
|
2
|
-
import { r, h as t, H as n } from "./index-256b7d4e-
|
|
1
|
+
import { U as m } from "./ui-image-ae115205-C9w0DS-q.js";
|
|
2
|
+
import { r, h as t, H as n } from "./index-256b7d4e-B27ydHcs.js";
|
|
3
3
|
const s = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", a = s, l = class {
|
|
4
4
|
constructor(e) {
|
|
5
5
|
r(this, e), this.stylingValue = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as m } from "./ui-image-
|
|
2
|
-
import { r, h as t, H as n } from "./index-256b7d4e-
|
|
1
|
+
import { U as m } from "./ui-image-ae115205-Bmmit6PH.js";
|
|
2
|
+
import { r, h as t, H as n } from "./index-256b7d4e-DrOXnq3q.js";
|
|
3
3
|
const s = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", a = s, l = class {
|
|
4
4
|
constructor(e) {
|
|
5
5
|
r(this, e), this.stylingValue = {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./index-256b7d4e-BnoVkrXr.cjs"),n=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",a=n,r=class{constructor(e){i.registerInstance(this,e),this.hasStarted=!1,this._onLoad=()=>{this.imgLoaded=!0},this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){this.loading!=="eager"&&(this.imgLoaded=!1,this.hasStarted=!1,(typeof window=="undefined"||!("IntersectionObserver"in window))&&this.beginLoad())}onLoadingChange(e,t){e!==t&&(this.cleanupObserver(),e==="eager"?(this.imgEl&&this.src&&(this.imgEl.src=this.src),this.hasStarted=!0):(this.imgLoaded=!1,this.hasStarted=!1,this.setupObserver()))}componentDidLoad(){this.loading!=="eager"&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.imgEl&&(this.imgEl.src="")}canUseIO(){return typeof window!="undefined"&&"IntersectionObserver"in window}setupObserver(){if(this.loading!=="eager"){if(!this.canUseIO()){this.beginLoad();return}this.io=new IntersectionObserver(e=>{var t;for(const s of e)if(s.isIntersecting){this.beginLoad(),(t=this.io)===null||t===void 0||t.unobserve(s.target),this.cleanupObserver();break}},{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)}}cleanupObserver(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.io=void 0}beginLoad(){this.hasStarted||this.imgEl&&this.src&&(this.hasStarted=!0,this.imgEl.src=this.src,this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0))}get showSkeleton(){return this.loading!=="eager"&&!this.imgLoaded}renderEager(){return i.h(i.Host,{class:"HostContainer"},i.h("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return i.h(i.Host,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&i.h("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),i.h("img",{ref:e=>this.imgEl=e,src:void 0,decoding:"async",style:this.styles,onLoad:this._onLoad,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return this.loading==="eager"?this.renderEager():this.renderLazy()}get el(){return i.getElement(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};r.style=a;exports.UiImage=r;
|