@everymatrix/general-styling-wrapper 1.15.0 → 1.16.1
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/general-styling-wrapper.cjs.entry.js +6 -5
- package/dist/cjs/general-styling-wrapper.cjs.js +1 -1
- package/dist/cjs/{index-38077f5d.js → index-821c995f.js} +2 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/general-styling-wrapper/general-styling-wrapper.js +6 -5
- package/dist/components/general-styling-wrapper.js +5 -4
- package/dist/esm/general-styling-wrapper.entry.js +6 -5
- package/dist/esm/general-styling-wrapper.js +1 -1
- package/dist/esm/{index-10c47fc0.js → index-764451bb.js} +2 -14
- package/dist/esm/loader.js +1 -1
- package/dist/general-styling-wrapper/general-styling-wrapper.esm.js +1 -1
- package/dist/general-styling-wrapper/p-789f8087.js +1 -0
- package/dist/general-styling-wrapper/p-a7ea48d0.entry.js +1 -0
- package/dist/types/components/general-styling-wrapper/general-styling-wrapper.d.ts +1 -1
- package/package.json +1 -1
- package/dist/general-styling-wrapper/p-05de0679.js +0 -1
- package/dist/general-styling-wrapper/p-69081248.entry.js +0 -1
|
@@ -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-821c995f.js');
|
|
6
6
|
|
|
7
7
|
const mergeTranslations = (url, target) => {
|
|
8
8
|
return new Promise((resolve) => {
|
|
@@ -41,7 +41,7 @@ const GeneralStylingWrapper = class {
|
|
|
41
41
|
this.setClientStyling = () => {
|
|
42
42
|
let sheet = document.createElement('style');
|
|
43
43
|
sheet.innerHTML = this.clientStyling;
|
|
44
|
-
this.
|
|
44
|
+
this.el.prepend(sheet);
|
|
45
45
|
};
|
|
46
46
|
this.setClientStylingURL = () => {
|
|
47
47
|
let url = new URL(this.clientStylingUrl);
|
|
@@ -51,7 +51,7 @@ const GeneralStylingWrapper = class {
|
|
|
51
51
|
.then((data) => {
|
|
52
52
|
cssFile.innerHTML = data;
|
|
53
53
|
setTimeout(() => {
|
|
54
|
-
this.
|
|
54
|
+
this.el.prepend(cssFile);
|
|
55
55
|
}, 1);
|
|
56
56
|
})
|
|
57
57
|
.catch((err) => {
|
|
@@ -61,7 +61,7 @@ const GeneralStylingWrapper = class {
|
|
|
61
61
|
}
|
|
62
62
|
componentDidRender() {
|
|
63
63
|
// start custom styling area
|
|
64
|
-
if (!this.stylingAppends
|
|
64
|
+
if (!this.stylingAppends) {
|
|
65
65
|
if (this.clientStyling)
|
|
66
66
|
this.setClientStyling();
|
|
67
67
|
if (this.clientStylingUrl)
|
|
@@ -79,8 +79,9 @@ const GeneralStylingWrapper = class {
|
|
|
79
79
|
return await Promise.all(promises);
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
return (index.h("div", {
|
|
82
|
+
return (index.h("div", { class: "StyleShell" }, index.h("slot", { name: "mainContent" })));
|
|
83
83
|
}
|
|
84
|
+
get el() { return index.getElement(this); }
|
|
84
85
|
};
|
|
85
86
|
GeneralStylingWrapper.style = generalStylingWrapperCss;
|
|
86
87
|
|
|
@@ -234,12 +234,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
234
234
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
235
235
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
236
236
|
}
|
|
237
|
-
else if (memberName === 'ref') {
|
|
238
|
-
// minifier will clean this up
|
|
239
|
-
if (newValue) {
|
|
240
|
-
newValue(elm);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
237
|
else {
|
|
244
238
|
// Set property if it exists and it's not a SVG
|
|
245
239
|
const isComplex = isComplexType(newValue);
|
|
@@ -406,7 +400,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
406
400
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
407
401
|
if ((vnode = vnodes[startIdx])) {
|
|
408
402
|
elm = vnode.$elm$;
|
|
409
|
-
callNodeRefs(vnode);
|
|
410
403
|
{
|
|
411
404
|
// we're removing this element
|
|
412
405
|
// so it's possible we need to show slot fallback content now
|
|
@@ -681,12 +674,6 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
|
681
674
|
}
|
|
682
675
|
return slotNameAttr === '';
|
|
683
676
|
};
|
|
684
|
-
const callNodeRefs = (vNode) => {
|
|
685
|
-
{
|
|
686
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
687
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
677
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
691
678
|
const hostElm = hostRef.$hostElement$;
|
|
692
679
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -782,6 +769,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
782
769
|
relocateNodes.length = 0;
|
|
783
770
|
}
|
|
784
771
|
};
|
|
772
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
785
773
|
/**
|
|
786
774
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
787
775
|
* @param elm the target of the Event
|
|
@@ -1402,6 +1390,7 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1402
1390
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1403
1391
|
|
|
1404
1392
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1393
|
+
exports.getElement = getElement;
|
|
1405
1394
|
exports.h = h;
|
|
1406
1395
|
exports.promiseResolve = promiseResolve;
|
|
1407
1396
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
1
|
+
import { Component, Prop, h, Element } from '@stencil/core';
|
|
2
2
|
import { mergeTranslations } from '../../utils/locale.utils';
|
|
3
3
|
export class GeneralStylingWrapper {
|
|
4
4
|
constructor() {
|
|
@@ -18,7 +18,7 @@ export class GeneralStylingWrapper {
|
|
|
18
18
|
this.setClientStyling = () => {
|
|
19
19
|
let sheet = document.createElement('style');
|
|
20
20
|
sheet.innerHTML = this.clientStyling;
|
|
21
|
-
this.
|
|
21
|
+
this.el.prepend(sheet);
|
|
22
22
|
};
|
|
23
23
|
this.setClientStylingURL = () => {
|
|
24
24
|
let url = new URL(this.clientStylingUrl);
|
|
@@ -28,7 +28,7 @@ export class GeneralStylingWrapper {
|
|
|
28
28
|
.then((data) => {
|
|
29
29
|
cssFile.innerHTML = data;
|
|
30
30
|
setTimeout(() => {
|
|
31
|
-
this.
|
|
31
|
+
this.el.prepend(cssFile);
|
|
32
32
|
}, 1);
|
|
33
33
|
})
|
|
34
34
|
.catch((err) => {
|
|
@@ -38,7 +38,7 @@ export class GeneralStylingWrapper {
|
|
|
38
38
|
}
|
|
39
39
|
componentDidRender() {
|
|
40
40
|
// start custom styling area
|
|
41
|
-
if (!this.stylingAppends
|
|
41
|
+
if (!this.stylingAppends) {
|
|
42
42
|
if (this.clientStyling)
|
|
43
43
|
this.setClientStyling();
|
|
44
44
|
if (this.clientStylingUrl)
|
|
@@ -56,7 +56,7 @@ export class GeneralStylingWrapper {
|
|
|
56
56
|
return await Promise.all(promises);
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h("div", {
|
|
59
|
+
return (h("div", { class: "StyleShell" },
|
|
60
60
|
h("slot", { name: "mainContent" })));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "general-styling-wrapper"; }
|
|
@@ -142,4 +142,5 @@ export class GeneralStylingWrapper {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}; }
|
|
145
|
+
static get elementRef() { return "el"; }
|
|
145
146
|
}
|
|
@@ -38,7 +38,7 @@ const GeneralStylingWrapper$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
38
38
|
this.setClientStyling = () => {
|
|
39
39
|
let sheet = document.createElement('style');
|
|
40
40
|
sheet.innerHTML = this.clientStyling;
|
|
41
|
-
this.
|
|
41
|
+
this.el.prepend(sheet);
|
|
42
42
|
};
|
|
43
43
|
this.setClientStylingURL = () => {
|
|
44
44
|
let url = new URL(this.clientStylingUrl);
|
|
@@ -48,7 +48,7 @@ const GeneralStylingWrapper$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
48
48
|
.then((data) => {
|
|
49
49
|
cssFile.innerHTML = data;
|
|
50
50
|
setTimeout(() => {
|
|
51
|
-
this.
|
|
51
|
+
this.el.prepend(cssFile);
|
|
52
52
|
}, 1);
|
|
53
53
|
})
|
|
54
54
|
.catch((err) => {
|
|
@@ -58,7 +58,7 @@ const GeneralStylingWrapper$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
58
58
|
}
|
|
59
59
|
componentDidRender() {
|
|
60
60
|
// start custom styling area
|
|
61
|
-
if (!this.stylingAppends
|
|
61
|
+
if (!this.stylingAppends) {
|
|
62
62
|
if (this.clientStyling)
|
|
63
63
|
this.setClientStyling();
|
|
64
64
|
if (this.clientStylingUrl)
|
|
@@ -76,8 +76,9 @@ const GeneralStylingWrapper$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
76
76
|
return await Promise.all(promises);
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h("div", {
|
|
79
|
+
return (h("div", { class: "StyleShell" }, h("slot", { name: "mainContent" })));
|
|
80
80
|
}
|
|
81
|
+
get el() { return this; }
|
|
81
82
|
static get style() { return generalStylingWrapperCss; }
|
|
82
83
|
}, [4, "general-styling-wrapper", {
|
|
83
84
|
"clientStyling": [1, "client-styling"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-764451bb.js';
|
|
2
2
|
|
|
3
3
|
const mergeTranslations = (url, target) => {
|
|
4
4
|
return new Promise((resolve) => {
|
|
@@ -37,7 +37,7 @@ const GeneralStylingWrapper = class {
|
|
|
37
37
|
this.setClientStyling = () => {
|
|
38
38
|
let sheet = document.createElement('style');
|
|
39
39
|
sheet.innerHTML = this.clientStyling;
|
|
40
|
-
this.
|
|
40
|
+
this.el.prepend(sheet);
|
|
41
41
|
};
|
|
42
42
|
this.setClientStylingURL = () => {
|
|
43
43
|
let url = new URL(this.clientStylingUrl);
|
|
@@ -47,7 +47,7 @@ const GeneralStylingWrapper = class {
|
|
|
47
47
|
.then((data) => {
|
|
48
48
|
cssFile.innerHTML = data;
|
|
49
49
|
setTimeout(() => {
|
|
50
|
-
this.
|
|
50
|
+
this.el.prepend(cssFile);
|
|
51
51
|
}, 1);
|
|
52
52
|
})
|
|
53
53
|
.catch((err) => {
|
|
@@ -57,7 +57,7 @@ const GeneralStylingWrapper = class {
|
|
|
57
57
|
}
|
|
58
58
|
componentDidRender() {
|
|
59
59
|
// start custom styling area
|
|
60
|
-
if (!this.stylingAppends
|
|
60
|
+
if (!this.stylingAppends) {
|
|
61
61
|
if (this.clientStyling)
|
|
62
62
|
this.setClientStyling();
|
|
63
63
|
if (this.clientStylingUrl)
|
|
@@ -75,8 +75,9 @@ const GeneralStylingWrapper = class {
|
|
|
75
75
|
return await Promise.all(promises);
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
return (h("div", {
|
|
78
|
+
return (h("div", { class: "StyleShell" }, h("slot", { name: "mainContent" })));
|
|
79
79
|
}
|
|
80
|
+
get el() { return getElement(this); }
|
|
80
81
|
};
|
|
81
82
|
GeneralStylingWrapper.style = generalStylingWrapperCss;
|
|
82
83
|
|
|
@@ -212,12 +212,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
212
212
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
213
213
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
214
214
|
}
|
|
215
|
-
else if (memberName === 'ref') {
|
|
216
|
-
// minifier will clean this up
|
|
217
|
-
if (newValue) {
|
|
218
|
-
newValue(elm);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
215
|
else {
|
|
222
216
|
// Set property if it exists and it's not a SVG
|
|
223
217
|
const isComplex = isComplexType(newValue);
|
|
@@ -384,7 +378,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
384
378
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
385
379
|
if ((vnode = vnodes[startIdx])) {
|
|
386
380
|
elm = vnode.$elm$;
|
|
387
|
-
callNodeRefs(vnode);
|
|
388
381
|
{
|
|
389
382
|
// we're removing this element
|
|
390
383
|
// so it's possible we need to show slot fallback content now
|
|
@@ -659,12 +652,6 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
|
659
652
|
}
|
|
660
653
|
return slotNameAttr === '';
|
|
661
654
|
};
|
|
662
|
-
const callNodeRefs = (vNode) => {
|
|
663
|
-
{
|
|
664
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
665
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
666
|
-
}
|
|
667
|
-
};
|
|
668
655
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
669
656
|
const hostElm = hostRef.$hostElement$;
|
|
670
657
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -760,6 +747,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
760
747
|
relocateNodes.length = 0;
|
|
761
748
|
}
|
|
762
749
|
};
|
|
750
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
763
751
|
/**
|
|
764
752
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
765
753
|
* @param elm the target of the Event
|
|
@@ -1379,4 +1367,4 @@ const flush = () => {
|
|
|
1379
1367
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1380
1368
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1381
1369
|
|
|
1382
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1370
|
+
export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as n}from"./p-
|
|
1
|
+
import{p as t,b as n}from"./p-789f8087.js";(()=>{const n=import.meta.url,l={};return""!==n&&(l.resourcesUrl=new URL(".",n).href),t(l)})().then((t=>n([["p-a7ea48d0",[[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],t)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1,o=!1,s=!1;const r="undefined"!=typeof window?window:{},i=r.document||{head:{}},c={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},a=e=>Promise.resolve(e),f=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=new WeakMap,$=e=>"sc-"+e.o,d={},y=e=>"object"==(e=typeof e)||"function"===e,h=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1,i=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!y(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?p(null,l):l),r=s)};if(c(n),t){t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=p(e,null);return a.u=t,i.length>0&&(a.$=i),a.h=o,a},p=(e,t)=>({t:0,p:e,i:t,m:null,$:null,u:null,h:null}),m={},b=(e,t,n,l,o,s)=>{if(n!==l){let r=X(e,t);if(t.toLowerCase(),"class"===t){const t=e.classList,o=g(n),s=g(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else{const i=y(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}}},w=/\s/,g=e=>e?e.split(w):[],S=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.u||d,r=t.u||d;for(l in s)l in r||b(o,l,s[l],void 0,n,t.t);for(l in r)b(o,l,s[l],r[l],n,t.t)},j=(l,s,r)=>{let c,a,f,u=s.$[r],$=0;if(n||(o=!0,"slot"===u.p&&(u.t|=u.$?2:1)),1&u.t)c=u.m=i.createTextNode("");else if(c=u.m=i.createElement(2&u.t?"slot-fb":u.p),S(null,u,!1),u.$)for($=0;$<u.$.length;++$)a=j(l,u,$),a&&c.appendChild(a);return c["s-hn"]=t,3&u.t&&(c["s-sr"]=!0,c["s-cr"]=e,c["s-sn"]=u.h||"",f=l&&l.$&&l.$[r],f&&f.p===u.p&&l.m&&k(l.m,!1)),c},k=(e,n)=>{c.t|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const s=l[e];s["s-hn"]!==t&&s["s-ol"]&&(R(s).insertBefore(s,O(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),n&&k(s,n)}c.t&=-2},v=(e,t,n,l,o,s)=>{let r,i=e["s-cr"]&&e["s-cr"].parentNode||e;for(;o<=s;++o)l[o]&&(r=j(null,n,o),r&&(l[o].m=r,i.insertBefore(r,O(t))))},M=(e,t,n,o,s)=>{for(;t<=n;++t)(o=e[t])&&(l=!0,(s=o.m)["s-ol"]?s["s-ol"].remove():k(s,!0),s.remove())},C=(e,t)=>e.p===t.p&&("slot"!==e.p||e.h===t.h),O=e=>e&&e["s-ol"]||e,R=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,T=(e,t)=>{const n=t.m=e.m,l=e.$,o=t.$;"slot"===t.p||S(e,t,!1),null!==l&&null!==o?((e,t,n,l)=>{let o,s=0,r=0,i=t.length-1,c=t[0],a=t[i],f=l.length-1,u=l[0],$=l[f];for(;s<=i&&r<=f;)null==c?c=t[++s]:null==a?a=t[--i]:null==u?u=l[++r]:null==$?$=l[--f]:C(c,u)?(T(c,u),c=t[++s],u=l[++r]):C(a,$)?(T(a,$),a=t[--i],$=l[--f]):C(c,$)?("slot"!==c.p&&"slot"!==$.p||k(c.m.parentNode,!1),T(c,$),e.insertBefore(c.m,a.m.nextSibling),c=t[++s],$=l[--f]):C(a,u)?("slot"!==c.p&&"slot"!==$.p||k(a.m.parentNode,!1),T(a,u),e.insertBefore(a.m,c.m),a=t[--i],u=l[++r]):(o=j(t&&t[r],n,r),u=l[++r],o&&R(c.m).insertBefore(o,O(c.m)));s>i?v(e,null==l[f+1]?null:l[f+1].m,n,l,r,f):r>f&&M(t,s,i)})(n,l,t,o):null!==o?v(n,null,t,o,0,o.length-1):null!==l&&M(l,0,l.length-1)},N=e=>{let t,n,l,o,s,r,i=e.childNodes;for(n=0,l=i.length;n<l;n++)if(t=i[n],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<l;o++)if(r=i[o].nodeType,i[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===r&&s===i[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===r||3===r&&""!==i[o].textContent.trim()){t.hidden=!0;break}N(t)}},P=[],x=e=>{let t,n,o,s,r,i,c=0,a=e.childNodes,f=a.length;for(;c<f;c++){if(t=a[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(o=n.parentNode.childNodes,s=t["s-sn"],i=o.length-1;i>=0;i--)n=o[i],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(E(n,s)?(r=P.find((e=>e.g===n)),l=!0,n["s-sn"]=n["s-sn"]||s,r?r.S=t:P.push({S:t,g:n}),n["s-sr"]&&P.map((e=>{E(e.g,n["s-sn"])&&(r=P.find((e=>e.g===n)),r&&!e.S&&(e.S=r.S))}))):P.some((e=>e.g===n))||P.push({g:n}));1===t.nodeType&&x(t)}},E=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,L=e=>J(e).j,W=(e,t)=>{t&&!e.k&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.k=t)))},A=(e,t)=>{if(e.t|=16,!(4&e.t))return W(e,e.v),ce((()=>U(e,t)));e.t|=512},U=(e,t)=>{const n=e.M;let l;return t&&(l=V(n,"componentWillLoad")),_(l,(()=>q(e,n,t)))},q=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.C;((e,t)=>{let n=$(t),l=te.get(n);if(e=11===e.nodeType?e:i,l)if("string"==typeof l){let t,o=u.get(e=e.head||e);o||u.set(e,o=new Set),o.has(n)||(t=i.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l])})(e.j.getRootNode(),t)})(e);D(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>F(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},D=(s,r)=>{try{r=r.render(),s.t&=-17,s.t|=2,((s,r)=>{const a=s.j,f=s.C,u=s.O||p(null,null),$=(e=>e&&e.p===m)(r)?r:h(null,null,r);if(t=a.tagName,$.p=null,$.t|=4,s.O=$,$.m=u.m=a,e=a["s-cr"],n=0!=(1&f.t),l=!1,T(u,$),c.t|=1,o){let e,t,n,l,o,s;x($.m);let r=0;for(;r<P.length;r++)e=P[r],t=e.g,t["s-ol"]||(n=i.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(r=0;r<P.length;r++)if(e=P[r],t=e.g,e.S){for(l=e.S.parentNode,o=e.S.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}l&&N($.m),c.t&=-2,P.length=0})(s,r)}catch(e){Y(e,s.j)}return null},F=e=>{const t=e.j,n=e.v;V(e.M,"componentDidRender"),64&e.t||(e.t|=64,z(t),e.R(t),n||H()),e.k&&(e.k(),e.k=void 0),512&e.t&&ie((()=>A(e,!1))),e.t&=-517},H=()=>{z(i.documentElement),ie((()=>(e=>{const t=c.ce("appload",{detail:{namespace:"general-styling-wrapper"}});return e.dispatchEvent(t),t})(r)))},V=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){Y(e)}},_=(e,t)=>e&&e.then?e.then(t):t(),z=e=>e.classList.add("hydrated"),B=(e,t,n)=>{if(t.T){const l=Object.entries(t.T),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>J(this).N.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=J(e),s=o.N.get(t),r=o.t,i=o.M;n=((e,t)=>null==e||y(e)?e:1&t?e+"":e)(n,l.T[t][0]),8&r&&void 0!==s||n===s||Number.isNaN(s)&&Number.isNaN(n)||(o.N.set(t,n),i&&2==(18&r)&&A(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){c.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},G=(e,t={})=>{const n=[],l=t.exclude||[],o=r.customElements,s=i.head,a=s.querySelector("meta[charset]"),u=i.createElement("style"),d=[];let y,h=!0;Object.assign(c,t),c.l=new URL(t.resourcesUrl||"./",i.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],T:t[2],P:t[3]};s.T=t[2];const r=s.o,a=class extends HTMLElement{constructor(e){super(e),Q(e=this,s)}connectedCallback(){y&&(clearTimeout(y),y=null),h?d.push(this):c.jmp((()=>(e=>{if(0==(1&c.t)){const t=J(e),n=t.C,l=()=>{};if(!(1&t.t)){t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=i.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){W(t,t.v=n);break}}n.T&&Object.entries(n.T).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=ee(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(B(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){Y(e)}t.t&=-9,e()}if(o.style){let e=o.style;const t=$(n);if(!te.has(t)){const l=()=>{};((e,t,n)=>{let l=te.get(e);f&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,te.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.v,r=()=>A(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){c.jmp((()=>{}))}componentOnReady(){return J(this).L}};s.W=e[0],l.includes(r)||o.get(r)||(n.push(r),o.define(r,B(a,s,1)))}))})),u.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles",""),s.insertBefore(u,a?a.nextSibling:s.firstChild),h=!1,d.length?d.map((e=>e.connectedCallback())):c.jmp((()=>y=setTimeout(H,30)))},I=new WeakMap,J=e=>I.get(e),K=(e,t)=>I.set(t.M=e,t),Q=(e,t)=>{const n={t:0,j:e,C:t,N:new Map};return n.L=new Promise((e=>n.R=e)),e["s-p"]=[],e["s-rc"]=[],I.set(e,n)},X=(e,t)=>t in e,Y=(e,t)=>(0,console.error)(e,t),Z=new Map,ee=e=>{const t=e.o.replace(/-/g,"_"),n=e.W,l=Z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(Z.set(n,e),e[t])),Y)},te=new Map,ne=[],le=[],oe=(e,t)=>n=>{e.push(n),s||(s=!0,t&&4&c.t?ie(re):c.raf(re))},se=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){Y(e)}e.length=0},re=()=>{se(ne),se(le),(s=ne.length>0)&&c.raf(re)},ie=e=>a().then(e),ce=oe(le,!0);export{G as b,L as g,h,a as p,K as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,g as e}from"./p-789f8087.js";const i=class{constructor(s){t(this,s),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),s=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{s.innerHTML=t,setTimeout((()=>{this.el.prepend(s)}),1)})).catch((t=>{console.log("error ",t)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const i=(s=this.translationUrl,e=this.targetTranslations,new Promise((t=>{fetch(s).then((t=>t.json())).then((s=>{Object.keys(s).forEach((t=>{e[t]=e[t]?e[t]:{};for(let i in s[t])e[t][i]=s[t][i]})),t(!0)}))})));t.push(i)}var s,e;return await Promise.all(t)}render(){return s("div",{class:"StyleShell"},s("slot",{name:"mainContent"}))}get el(){return e(this)}};i.style=":host{display:block}";export{i as general_styling_wrapper}
|
|
@@ -16,8 +16,8 @@ export declare class GeneralStylingWrapper {
|
|
|
16
16
|
* Translation be merged to
|
|
17
17
|
*/
|
|
18
18
|
targetTranslations: Translations;
|
|
19
|
+
el: HTMLElement;
|
|
19
20
|
stylingAppends: boolean;
|
|
20
|
-
stylingContainer: HTMLElement;
|
|
21
21
|
componentDidRender(): void;
|
|
22
22
|
componentWillLoad(): Promise<any[]>;
|
|
23
23
|
setClientStyling: () => void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1,l=!1,o=!1,s=!1;const r="undefined"!=typeof window?window:{},i=r.document||{head:{}},c={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),a=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=new WeakMap,$=e=>"sc-"+e.o,d={},y=e=>"object"==(e=typeof e)||"function"===e,h=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1,i=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!y(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?p(null,l):l),r=s)};if(c(n),t){t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const f=p(e,null);return f.u=t,i.length>0&&(f.$=i),f.h=o,f},p=(e,t)=>({t:0,p:e,i:t,m:null,$:null,u:null,h:null}),m={},b=(e,t,n,l,o,s)=>{if(n!==l){let r=X(e,t);if(t.toLowerCase(),"class"===t){const t=e.classList,o=S(n),s=S(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("ref"===t)l&&l(e);else{const i=y(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}}},w=/\s/,S=e=>e?e.split(w):[],g=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.u||d,r=t.u||d;for(l in s)l in r||b(o,l,s[l],void 0,n,t.t);for(l in r)b(o,l,s[l],r[l],n,t.t)},j=(l,s,r)=>{let c,f,a,u=s.$[r],$=0;if(n||(o=!0,"slot"===u.p&&(u.t|=u.$?2:1)),1&u.t)c=u.m=i.createTextNode("");else if(c=u.m=i.createElement(2&u.t?"slot-fb":u.p),g(null,u,!1),u.$)for($=0;$<u.$.length;++$)f=j(l,u,$),f&&c.appendChild(f);return c["s-hn"]=t,3&u.t&&(c["s-sr"]=!0,c["s-cr"]=e,c["s-sn"]=u.h||"",a=l&&l.$&&l.$[r],a&&a.p===u.p&&l.m&&k(l.m,!1)),c},k=(e,n)=>{c.t|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const s=l[e];s["s-hn"]!==t&&s["s-ol"]&&(R(s).insertBefore(s,O(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),n&&k(s,n)}c.t&=-2},v=(e,t,n,l,o,s)=>{let r,i=e["s-cr"]&&e["s-cr"].parentNode||e;for(;o<=s;++o)l[o]&&(r=j(null,n,o),r&&(l[o].m=r,i.insertBefore(r,O(t))))},M=(e,t,n,o,s)=>{for(;t<=n;++t)(o=e[t])&&(s=o.m,L(o),l=!0,s["s-ol"]?s["s-ol"].remove():k(s,!0),s.remove())},C=(e,t)=>e.p===t.p&&("slot"!==e.p||e.h===t.h),O=e=>e&&e["s-ol"]||e,R=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,T=(e,t)=>{const n=t.m=e.m,l=e.$,o=t.$;"slot"===t.p||g(e,t,!1),null!==l&&null!==o?((e,t,n,l)=>{let o,s=0,r=0,i=t.length-1,c=t[0],f=t[i],a=l.length-1,u=l[0],$=l[a];for(;s<=i&&r<=a;)null==c?c=t[++s]:null==f?f=t[--i]:null==u?u=l[++r]:null==$?$=l[--a]:C(c,u)?(T(c,u),c=t[++s],u=l[++r]):C(f,$)?(T(f,$),f=t[--i],$=l[--a]):C(c,$)?("slot"!==c.p&&"slot"!==$.p||k(c.m.parentNode,!1),T(c,$),e.insertBefore(c.m,f.m.nextSibling),c=t[++s],$=l[--a]):C(f,u)?("slot"!==c.p&&"slot"!==$.p||k(f.m.parentNode,!1),T(f,u),e.insertBefore(f.m,c.m),f=t[--i],u=l[++r]):(o=j(t&&t[r],n,r),u=l[++r],o&&R(c.m).insertBefore(o,O(c.m)));s>i?v(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&M(t,s,i)})(n,l,t,o):null!==o?v(n,null,t,o,0,o.length-1):null!==l&&M(l,0,l.length-1)},N=e=>{let t,n,l,o,s,r,i=e.childNodes;for(n=0,l=i.length;n<l;n++)if(t=i[n],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<l;o++)if(r=i[o].nodeType,i[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===r&&s===i[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===r||3===r&&""!==i[o].textContent.trim()){t.hidden=!0;break}N(t)}},P=[],x=e=>{let t,n,o,s,r,i,c=0,f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(o=n.parentNode.childNodes,s=t["s-sn"],i=o.length-1;i>=0;i--)n=o[i],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(E(n,s)?(r=P.find((e=>e.S===n)),l=!0,n["s-sn"]=n["s-sn"]||s,r?r.g=t:P.push({g:t,S:n}),n["s-sr"]&&P.map((e=>{E(e.S,n["s-sn"])&&(r=P.find((e=>e.S===n)),r&&!e.g&&(e.g=r.g))}))):P.some((e=>e.S===n))||P.push({S:n}));1===t.nodeType&&x(t)}},E=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,L=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(L)},W=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},A=(e,t)=>{if(e.t|=16,!(4&e.t))return W(e,e.k),ce((()=>U(e,t)));e.t|=512},U=(e,t)=>{const n=e.v;let l;return t&&(l=V(n,"componentWillLoad")),_(l,(()=>q(e,n,t)))},q=async(e,t,n)=>{const l=e.M,o=l["s-rc"];n&&(e=>{const t=e.C;((e,t)=>{let n=$(t),l=te.get(n);if(e=11===e.nodeType?e:i,l)if("string"==typeof l){let t,o=u.get(e=e.head||e);o||u.set(e,o=new Set),o.has(n)||(t=i.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l])})(e.M.getRootNode(),t)})(e);D(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>F(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},D=(s,r)=>{try{r=r.render(),s.t&=-17,s.t|=2,((s,r)=>{const f=s.M,a=s.C,u=s.O||p(null,null),$=(e=>e&&e.p===m)(r)?r:h(null,null,r);if(t=f.tagName,$.p=null,$.t|=4,s.O=$,$.m=u.m=f,e=f["s-cr"],n=0!=(1&a.t),l=!1,T(u,$),c.t|=1,o){let e,t,n,l,o,s;x($.m);let r=0;for(;r<P.length;r++)e=P[r],t=e.S,t["s-ol"]||(n=i.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(r=0;r<P.length;r++)if(e=P[r],t=e.S,e.g){for(l=e.g.parentNode,o=e.g.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}l&&N($.m),c.t&=-2,P.length=0})(s,r)}catch(e){Y(e,s.M)}return null},F=e=>{const t=e.M,n=e.k;V(e.v,"componentDidRender"),64&e.t||(e.t|=64,z(t),e.R(t),n||H()),e.j&&(e.j(),e.j=void 0),512&e.t&&ie((()=>A(e,!1))),e.t&=-517},H=()=>{z(i.documentElement),ie((()=>(e=>{const t=c.ce("appload",{detail:{namespace:"general-styling-wrapper"}});return e.dispatchEvent(t),t})(r)))},V=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){Y(e)}},_=(e,t)=>e&&e.then?e.then(t):t(),z=e=>e.classList.add("hydrated"),B=(e,t,n)=>{if(t.T){const l=Object.entries(t.T),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>J(this).N.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=J(e),s=o.N.get(t),r=o.t,i=o.v;n=((e,t)=>null==e||y(e)?e:1&t?e+"":e)(n,l.T[t][0]),8&r&&void 0!==s||n===s||Number.isNaN(s)&&Number.isNaN(n)||(o.N.set(t,n),i&&2==(18&r)&&A(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){c.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},G=(e,t={})=>{const n=[],l=t.exclude||[],o=r.customElements,s=i.head,f=s.querySelector("meta[charset]"),u=i.createElement("style"),d=[];let y,h=!0;Object.assign(c,t),c.l=new URL(t.resourcesUrl||"./",i.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],T:t[2],P:t[3]};s.T=t[2];const r=s.o,f=class extends HTMLElement{constructor(e){super(e),Q(e=this,s)}connectedCallback(){y&&(clearTimeout(y),y=null),h?d.push(this):c.jmp((()=>(e=>{if(0==(1&c.t)){const t=J(e),n=t.C,l=()=>{};if(!(1&t.t)){t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=i.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){W(t,t.k=n);break}}n.T&&Object.entries(n.T).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=ee(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(B(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){Y(e)}t.t&=-9,e()}if(o.style){let e=o.style;const t=$(n);if(!te.has(t)){const l=()=>{};((e,t,n)=>{let l=te.get(e);a&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,te.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.k,r=()=>A(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){c.jmp((()=>{}))}componentOnReady(){return J(this).L}};s.W=e[0],l.includes(r)||o.get(r)||(n.push(r),o.define(r,B(f,s,1)))}))})),u.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles",""),s.insertBefore(u,f?f.nextSibling:s.firstChild),h=!1,d.length?d.map((e=>e.connectedCallback())):c.jmp((()=>y=setTimeout(H,30)))},I=new WeakMap,J=e=>I.get(e),K=(e,t)=>I.set(t.v=e,t),Q=(e,t)=>{const n={t:0,M:e,C:t,N:new Map};return n.L=new Promise((e=>n.R=e)),e["s-p"]=[],e["s-rc"]=[],I.set(e,n)},X=(e,t)=>t in e,Y=(e,t)=>(0,console.error)(e,t),Z=new Map,ee=e=>{const t=e.o.replace(/-/g,"_"),n=e.W,l=Z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(Z.set(n,e),e[t])),Y)},te=new Map,ne=[],le=[],oe=(e,t)=>n=>{e.push(n),s||(s=!0,t&&4&c.t?ie(re):c.raf(re))},se=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){Y(e)}e.length=0},re=()=>{se(ne),se(le),(s=ne.length>0)&&c.raf(re)},ie=e=>f().then(e),ce=oe(le,!0);export{G as b,h,f as p,K as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s}from"./p-05de0679.js";const e=class{constructor(s){t(this,s),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),s=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{s.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(s)}),1)})).catch((t=>{console.log("error ",t)}))}}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const i=(s=this.translationUrl,e=this.targetTranslations,new Promise((t=>{fetch(s).then((t=>t.json())).then((s=>{Object.keys(s).forEach((t=>{e[t]=e[t]?e[t]:{};for(let i in s[t])e[t][i]=s[t][i]})),t(!0)}))})));t.push(i)}var s,e;return await Promise.all(t)}render(){return s("div",{ref:t=>this.stylingContainer=t,class:"StyleShell"},s("slot",{name:"mainContent"}))}};e.style=":host{display:block}";export{e as general_styling_wrapper}
|