hemfixarna-web-components 1.6.3 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{hemfixarna-address_36.cjs.entry.js → hemfixarna-address_15.cjs.entry.js} +341 -1030
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-category.cjs.entry.js +28 -0
- package/dist/cjs/hemfixarna-category.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-components.cjs.js +1 -1
- package/dist/cjs/hemfixarna-components.cjs.js.map +1 -1
- package/dist/cjs/hemfixarna-doro.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-doro.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-klint.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-klint.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-kund.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-kund.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-power.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-power.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-service.cjs.entry.js +24 -0
- package/dist/cjs/hemfixarna-service.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js +26 -0
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js +24 -0
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js.map +1 -0
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js +23 -0
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js.map +1 -0
- package/dist/cjs/index-4695c475.js +258 -0
- package/dist/cjs/index-4695c475.js.map +1 -0
- package/dist/cjs/index-8054ce93.js +42 -0
- package/dist/cjs/index-8054ce93.js.map +1 -0
- package/dist/cjs/index-b83343b9.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js +2 -82
- package/dist/collection/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js +1 -20
- package/dist/collection/components/customers/hemfixarna-doro/hemfixarna-doro.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js +1 -39
- package/dist/collection/components/customers/hemfixarna-elfa/hemfixarna-elfa.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js +1 -39
- package/dist/collection/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js +1 -39
- package/dist/collection/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js +1 -20
- package/dist/collection/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js +1 -39
- package/dist/collection/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js +1 -39
- package/dist/collection/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js +1 -20
- package/dist/collection/components/customers/hemfixarna-klint/hemfixarna-klint.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js +1 -20
- package/dist/collection/components/customers/hemfixarna-kund/hemfixarna-kund.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js +1 -39
- package/dist/collection/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js +1 -38
- package/dist/collection/components/customers/hemfixarna-power/hemfixarna-power.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js +1 -38
- package/dist/collection/components/customers/hemfixarna-skanska/hemfixarna-skanska.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js +1 -38
- package/dist/collection/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js +1 -20
- package/dist/collection/components/customers/hemfixarna-string/hemfixarna-string-furniture.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js +1 -1
- package/dist/collection/components/customers/hemfixarna-superfront.tsx/hemfixarna-superfront.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js +1 -39
- package/dist/collection/components/customers/hemfixarna-tesla/hemfixarna-tesla.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js +1 -20
- package/dist/collection/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.js.map +1 -1
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js +1 -39
- package/dist/collection/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.js.map +1 -1
- package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js +1 -60
- package/dist/collection/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.js.map +1 -1
- package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js +1 -28
- package/dist/collection/components/hemfixarna-cart/hemfixarna-cart.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +27 -236
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js +75 -39
- package/dist/collection/components/hemfixarna-demo/hemfixarna-demo.js.map +1 -1
- package/dist/collection/components/hemfixarna-info/hemfixarna-info.js +2 -2
- package/dist/collection/components/hemfixarna-info/hemfixarna-info.js.map +1 -1
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js +2 -1
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +1 -1
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js +1 -26
- package/dist/collection/components/hemfixarna-order/hemfixarna-order.js.map +1 -1
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js +7 -41
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js.map +1 -1
- package/dist/collection/types/index.js +4 -0
- package/dist/collection/types/index.js.map +1 -1
- package/dist/collection/utils/api.js +18 -2
- package/dist/collection/utils/api.js.map +1 -1
- package/dist/collection/utils/creditSafe.js +2 -2
- package/dist/collection/utils/creditSafe.js.map +1 -1
- package/dist/collection/utils/enviroment.js +31 -0
- package/dist/collection/utils/enviroment.js.map +1 -0
- package/dist/collection/utils/felixApi.js +2 -1
- package/dist/collection/utils/felixApi.js.map +1 -1
- package/dist/collection/utils/felixFunctions.js +0 -1
- package/dist/collection/utils/felixFunctions.js.map +1 -1
- package/dist/esm/{hemfixarna-address_36.entry.js → hemfixarna-address_15.entry.js} +150 -818
- package/dist/esm/hemfixarna-address_15.entry.js.map +1 -0
- package/dist/esm/hemfixarna-byggmax.entry.js +22 -0
- package/dist/esm/hemfixarna-byggmax.entry.js.map +1 -0
- package/dist/esm/hemfixarna-category.entry.js +24 -0
- package/dist/esm/hemfixarna-category.entry.js.map +1 -0
- package/dist/esm/hemfixarna-components.js +3 -3
- package/dist/esm/hemfixarna-components.js.map +1 -1
- package/dist/esm/hemfixarna-doro.entry.js +22 -0
- package/dist/esm/hemfixarna-doro.entry.js.map +1 -0
- package/dist/esm/hemfixarna-elfa.entry.js +22 -0
- package/dist/esm/hemfixarna-elfa.entry.js.map +1 -0
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js +19 -0
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js.map +1 -0
- package/dist/esm/hemfixarna-flyttsmart.entry.js +19 -0
- package/dist/esm/hemfixarna-flyttsmart.entry.js.map +1 -0
- package/dist/esm/hemfixarna-forebygg.entry.js +22 -0
- package/dist/esm/hemfixarna-forebygg.entry.js.map +1 -0
- package/dist/esm/hemfixarna-hornbach.entry.js +22 -0
- package/dist/esm/hemfixarna-hornbach.entry.js.map +1 -0
- package/dist/esm/hemfixarna-kbygg.entry.js +19 -0
- package/dist/esm/hemfixarna-kbygg.entry.js.map +1 -0
- package/dist/esm/hemfixarna-klint.entry.js +19 -0
- package/dist/esm/hemfixarna-klint.entry.js.map +1 -0
- package/dist/esm/hemfixarna-kund.entry.js +19 -0
- package/dist/esm/hemfixarna-kund.entry.js.map +1 -0
- package/dist/esm/hemfixarna-norrgavel.entry.js +19 -0
- package/dist/esm/hemfixarna-norrgavel.entry.js.map +1 -0
- package/dist/esm/hemfixarna-power.entry.js +19 -0
- package/dist/esm/hemfixarna-power.entry.js.map +1 -0
- package/dist/esm/hemfixarna-service.entry.js +20 -0
- package/dist/esm/hemfixarna-service.entry.js.map +1 -0
- package/dist/esm/hemfixarna-skanska.entry.js +22 -0
- package/dist/esm/hemfixarna-skanska.entry.js.map +1 -0
- package/dist/esm/hemfixarna-sparfonster.entry.js +19 -0
- package/dist/esm/hemfixarna-sparfonster.entry.js.map +1 -0
- package/dist/esm/hemfixarna-string-furniture.entry.js +22 -0
- package/dist/esm/hemfixarna-string-furniture.entry.js.map +1 -0
- package/dist/esm/hemfixarna-superfront.entry.js +20 -0
- package/dist/esm/hemfixarna-superfront.entry.js.map +1 -0
- package/dist/esm/hemfixarna-tesla.entry.js +19 -0
- package/dist/esm/hemfixarna-tesla.entry.js.map +1 -0
- package/dist/esm/hemfixarna-traningspartner.entry.js +19 -0
- package/dist/esm/hemfixarna-traningspartner.entry.js.map +1 -0
- package/dist/esm/hemfixarna-zaptec.entry.js +19 -0
- package/dist/esm/hemfixarna-zaptec.entry.js.map +1 -0
- package/dist/esm/{index-8c417125.js → index-04bcf90e.js} +2 -2
- package/dist/esm/index-04bcf90e.js.map +1 -0
- package/dist/esm/index-113a6b21.js +256 -0
- package/dist/esm/index-113a6b21.js.map +1 -0
- package/dist/esm/index-1fbc7a74.js +42 -0
- package/dist/esm/index-1fbc7a74.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
- package/dist/hemfixarna-components/p-12dbf4e6.entry.js +2 -0
- package/dist/hemfixarna-components/p-12dbf4e6.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-1b80999e.entry.js +2 -0
- package/dist/hemfixarna-components/p-1b80999e.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-1f875c7a.entry.js +2 -0
- package/dist/hemfixarna-components/p-1f875c7a.entry.js.map +1 -0
- package/dist/hemfixarna-components/{p-852e7173.js → p-32a8152b.js} +2 -2
- package/dist/hemfixarna-components/p-32a8152b.js.map +1 -0
- package/dist/hemfixarna-components/p-3acd1346.entry.js +2 -0
- package/dist/hemfixarna-components/p-3acd1346.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-53afbc10.entry.js +2 -0
- package/dist/hemfixarna-components/p-53afbc10.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-53f0abfa.entry.js +2 -0
- package/dist/hemfixarna-components/p-53f0abfa.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-61b4597f.entry.js +2 -0
- package/dist/hemfixarna-components/p-61b4597f.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-6c1d21dd.entry.js +2 -0
- package/dist/hemfixarna-components/p-6c1d21dd.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-6f6601b8.entry.js +2 -0
- package/dist/hemfixarna-components/p-6f6601b8.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-7c122f15.entry.js +2 -0
- package/dist/hemfixarna-components/p-7c122f15.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-8356796a.entry.js +2 -0
- package/dist/hemfixarna-components/p-8356796a.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-8d509bf1.entry.js +2 -0
- package/dist/hemfixarna-components/p-8d509bf1.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-8f0a688c.entry.js +2 -0
- package/dist/hemfixarna-components/p-8f0a688c.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-9b1e6bc2.entry.js +2 -0
- package/dist/hemfixarna-components/p-9b1e6bc2.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-a3d759d9.js +2 -0
- package/dist/hemfixarna-components/p-a3d759d9.js.map +1 -0
- package/dist/hemfixarna-components/p-a9845efc.entry.js +2 -0
- package/dist/hemfixarna-components/p-a9845efc.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-ae3fc85c.entry.js +2 -0
- package/dist/hemfixarna-components/p-ae3fc85c.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-b6bc1537.entry.js +2 -0
- package/dist/hemfixarna-components/p-b6bc1537.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-cb1634e8.entry.js +2 -0
- package/dist/hemfixarna-components/p-cb1634e8.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-cfdc93e9.js +2 -0
- package/dist/hemfixarna-components/p-cfdc93e9.js.map +1 -0
- package/dist/hemfixarna-components/p-dabad8a7.entry.js +2 -0
- package/dist/hemfixarna-components/p-dabad8a7.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-dfcefa54.entry.js +2 -0
- package/dist/hemfixarna-components/p-dfcefa54.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-e0aad0ff.entry.js +2 -0
- package/dist/hemfixarna-components/p-e0aad0ff.entry.js.map +1 -0
- package/dist/hemfixarna-components/p-edac9f21.entry.js +2 -0
- package/dist/hemfixarna-components/p-edac9f21.entry.js.map +1 -0
- package/dist/types/components/customers/hemfixarna-byggmax/hemfixarna-byggmax.d.ts +1 -6
- package/dist/types/components/customers/hemfixarna-doro/hemfixarna-doro.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-elfa/hemfixarna-elfa.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-fargvaruhuset/hemfixarna-fargvaruhuset.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-flyttsmart/hemfixarna-flyttsmart.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-forebygg/hemfixarna-forebygg.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-hornbach/hemfixarna-hornbach.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-kbygg/hemfixarna-kbygg.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-klint/hemfixarna-klint.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-kund/hemfixarna-kund.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-norrgavel/hemfixarna-norrgavel.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-power/hemfixarna-power.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-skanska/hemfixarna-skanska.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-sparfonster/hemfixarna-sparfonster.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-string/hemfixarna-string-furniture.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-tesla/hemfixarna-tesla.d.ts +0 -2
- package/dist/types/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.d.ts +0 -1
- package/dist/types/components/customers/hemfixarna-zaptec/hemfixarna-zaptec.d.ts +0 -2
- package/dist/types/components/hemfixarna-breadcrumbs/hemfixarna-breadcrumbs.d.ts +0 -4
- package/dist/types/components/hemfixarna-cart/hemfixarna-cart.d.ts +0 -2
- package/dist/types/components/hemfixarna-component/hemfixarna-component.d.ts +2 -18
- package/dist/types/components/hemfixarna-demo/hemfixarna-demo.d.ts +4 -2
- package/dist/types/components/hemfixarna-order/hemfixarna-order.d.ts +0 -2
- package/dist/types/components/hemfixarna-orderrows/hemfixarna-orderrows.d.ts +1 -2
- package/dist/types/components.d.ts +2 -100
- package/dist/types/types/index.d.ts +24 -22
- package/dist/types/utils/api.d.ts +5 -1
- package/dist/types/utils/enviroment.d.ts +3 -0
- package/package.json +4 -3
- package/readme.md +22 -0
- package/dist/cjs/hemfixarna-address_36.cjs.entry.js.map +0 -1
- package/dist/esm/hemfixarna-address_36.entry.js.map +0 -1
- package/dist/esm/index-8c417125.js.map +0 -1
- package/dist/hemfixarna-components/p-852e7173.js.map +0 -1
- package/dist/hemfixarna-components/p-97461831.entry.js +0 -2
- package/dist/hemfixarna-components/p-97461831.entry.js.map +0 -1
@@ -0,0 +1,256 @@
|
|
1
|
+
import { c as getRenderingRef, f as forceUpdate } from './index-04bcf90e.js';
|
2
|
+
|
3
|
+
const appendToMap = (map, propName, value) => {
|
4
|
+
const items = map.get(propName);
|
5
|
+
if (!items) {
|
6
|
+
map.set(propName, [value]);
|
7
|
+
}
|
8
|
+
else if (!items.includes(value)) {
|
9
|
+
items.push(value);
|
10
|
+
}
|
11
|
+
};
|
12
|
+
const debounce = (fn, ms) => {
|
13
|
+
let timeoutId;
|
14
|
+
return (...args) => {
|
15
|
+
if (timeoutId) {
|
16
|
+
clearTimeout(timeoutId);
|
17
|
+
}
|
18
|
+
timeoutId = setTimeout(() => {
|
19
|
+
timeoutId = 0;
|
20
|
+
fn(...args);
|
21
|
+
}, ms);
|
22
|
+
};
|
23
|
+
};
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Check if a possible element isConnected.
|
27
|
+
* The property might not be there, so we check for it.
|
28
|
+
*
|
29
|
+
* We want it to return true if isConnected is not a property,
|
30
|
+
* otherwise we would remove these elements and would not update.
|
31
|
+
*
|
32
|
+
* Better leak in Edge than to be useless.
|
33
|
+
*/
|
34
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
35
|
+
const cleanupElements = debounce((map) => {
|
36
|
+
for (let key of map.keys()) {
|
37
|
+
map.set(key, map.get(key).filter(isConnected));
|
38
|
+
}
|
39
|
+
}, 2000);
|
40
|
+
const stencilSubscription = () => {
|
41
|
+
if (typeof getRenderingRef !== 'function') {
|
42
|
+
// If we are not in a stencil project, we do nothing.
|
43
|
+
// This function is not really exported by @stencil/core.
|
44
|
+
return {};
|
45
|
+
}
|
46
|
+
const elmsToUpdate = new Map();
|
47
|
+
return {
|
48
|
+
dispose: () => elmsToUpdate.clear(),
|
49
|
+
get: (propName) => {
|
50
|
+
const elm = getRenderingRef();
|
51
|
+
if (elm) {
|
52
|
+
appendToMap(elmsToUpdate, propName, elm);
|
53
|
+
}
|
54
|
+
},
|
55
|
+
set: (propName) => {
|
56
|
+
const elements = elmsToUpdate.get(propName);
|
57
|
+
if (elements) {
|
58
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
59
|
+
}
|
60
|
+
cleanupElements(elmsToUpdate);
|
61
|
+
},
|
62
|
+
reset: () => {
|
63
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
64
|
+
cleanupElements(elmsToUpdate);
|
65
|
+
},
|
66
|
+
};
|
67
|
+
};
|
68
|
+
|
69
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
70
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
71
|
+
const unwrappedState = unwrap(defaultState);
|
72
|
+
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
73
|
+
const handlers = {
|
74
|
+
dispose: [],
|
75
|
+
get: [],
|
76
|
+
set: [],
|
77
|
+
reset: [],
|
78
|
+
};
|
79
|
+
const reset = () => {
|
80
|
+
var _a;
|
81
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
82
|
+
// otherwise, the state won't be properly reset
|
83
|
+
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
84
|
+
handlers.reset.forEach((cb) => cb());
|
85
|
+
};
|
86
|
+
const dispose = () => {
|
87
|
+
// Call first dispose as resetting the state would
|
88
|
+
// cause less updates ;)
|
89
|
+
handlers.dispose.forEach((cb) => cb());
|
90
|
+
reset();
|
91
|
+
};
|
92
|
+
const get = (propName) => {
|
93
|
+
handlers.get.forEach((cb) => cb(propName));
|
94
|
+
return states.get(propName);
|
95
|
+
};
|
96
|
+
const set = (propName, value) => {
|
97
|
+
const oldValue = states.get(propName);
|
98
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
99
|
+
states.set(propName, value);
|
100
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
101
|
+
}
|
102
|
+
};
|
103
|
+
const state = (typeof Proxy === 'undefined'
|
104
|
+
? {}
|
105
|
+
: new Proxy(unwrappedState, {
|
106
|
+
get(_, propName) {
|
107
|
+
return get(propName);
|
108
|
+
},
|
109
|
+
ownKeys(_) {
|
110
|
+
return Array.from(states.keys());
|
111
|
+
},
|
112
|
+
getOwnPropertyDescriptor() {
|
113
|
+
return {
|
114
|
+
enumerable: true,
|
115
|
+
configurable: true,
|
116
|
+
};
|
117
|
+
},
|
118
|
+
has(_, propName) {
|
119
|
+
return states.has(propName);
|
120
|
+
},
|
121
|
+
set(_, propName, value) {
|
122
|
+
set(propName, value);
|
123
|
+
return true;
|
124
|
+
},
|
125
|
+
}));
|
126
|
+
const on = (eventName, callback) => {
|
127
|
+
handlers[eventName].push(callback);
|
128
|
+
return () => {
|
129
|
+
removeFromArray(handlers[eventName], callback);
|
130
|
+
};
|
131
|
+
};
|
132
|
+
const onChange = (propName, cb) => {
|
133
|
+
const unSet = on('set', (key, newValue) => {
|
134
|
+
if (key === propName) {
|
135
|
+
cb(newValue);
|
136
|
+
}
|
137
|
+
});
|
138
|
+
// We need to unwrap the defaultState because it might be a function.
|
139
|
+
// Otherwise we might not be sending the right reset value.
|
140
|
+
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
141
|
+
return () => {
|
142
|
+
unSet();
|
143
|
+
unReset();
|
144
|
+
};
|
145
|
+
};
|
146
|
+
const use = (...subscriptions) => {
|
147
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
148
|
+
if (subscription.set) {
|
149
|
+
unsubs.push(on('set', subscription.set));
|
150
|
+
}
|
151
|
+
if (subscription.get) {
|
152
|
+
unsubs.push(on('get', subscription.get));
|
153
|
+
}
|
154
|
+
if (subscription.reset) {
|
155
|
+
unsubs.push(on('reset', subscription.reset));
|
156
|
+
}
|
157
|
+
if (subscription.dispose) {
|
158
|
+
unsubs.push(on('dispose', subscription.dispose));
|
159
|
+
}
|
160
|
+
return unsubs;
|
161
|
+
}, []);
|
162
|
+
return () => unsubs.forEach((unsub) => unsub());
|
163
|
+
};
|
164
|
+
const forceUpdate = (key) => {
|
165
|
+
const oldValue = states.get(key);
|
166
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
167
|
+
};
|
168
|
+
return {
|
169
|
+
state,
|
170
|
+
get,
|
171
|
+
set,
|
172
|
+
on,
|
173
|
+
onChange,
|
174
|
+
use,
|
175
|
+
dispose,
|
176
|
+
reset,
|
177
|
+
forceUpdate,
|
178
|
+
};
|
179
|
+
};
|
180
|
+
const removeFromArray = (array, item) => {
|
181
|
+
const index = array.indexOf(item);
|
182
|
+
if (index >= 0) {
|
183
|
+
array[index] = array[array.length - 1];
|
184
|
+
array.length--;
|
185
|
+
}
|
186
|
+
};
|
187
|
+
|
188
|
+
const createStore = (defaultState, shouldUpdate) => {
|
189
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
190
|
+
map.use(stencilSubscription());
|
191
|
+
return map;
|
192
|
+
};
|
193
|
+
|
194
|
+
const { state, onChange, } = createStore({
|
195
|
+
step: 1,
|
196
|
+
checkoutStep: 1,
|
197
|
+
checkoutEdit: false,
|
198
|
+
selectedCategory: null,
|
199
|
+
selectedService: null,
|
200
|
+
selectedProduct: null,
|
201
|
+
cart: [],
|
202
|
+
business: 'undefined',
|
203
|
+
options: null,
|
204
|
+
rut: true,
|
205
|
+
rot: true,
|
206
|
+
green: true,
|
207
|
+
token: null,
|
208
|
+
user: null,
|
209
|
+
modal: null,
|
210
|
+
rutOptions: null,
|
211
|
+
rotOptions: null,
|
212
|
+
greenOptions: null,
|
213
|
+
customer: null,
|
214
|
+
selectedCustomerCategory: null,
|
215
|
+
parentCategory: null,
|
216
|
+
creditSafeUser: null,
|
217
|
+
checkoutInvoice: false,
|
218
|
+
maleri: false,
|
219
|
+
sources: null,
|
220
|
+
});
|
221
|
+
onChange('cart', cart => {
|
222
|
+
window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));
|
223
|
+
});
|
224
|
+
onChange('user', user => {
|
225
|
+
window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));
|
226
|
+
});
|
227
|
+
onChange('creditSafeUser', user => {
|
228
|
+
window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));
|
229
|
+
});
|
230
|
+
onChange('selectedProduct', product => {
|
231
|
+
if (!state.customer || !product)
|
232
|
+
return;
|
233
|
+
const categories = [...state.customer.categories, ...state.customer.categories.map(c => { var _a; return (_a = c.sub_categories) !== null && _a !== void 0 ? _a : []; })].flat();
|
234
|
+
const category = categories.find(c => c && c.id === product.category);
|
235
|
+
if (category) {
|
236
|
+
state.parentCategory = category;
|
237
|
+
return;
|
238
|
+
}
|
239
|
+
state.parentCategory = null;
|
240
|
+
});
|
241
|
+
onChange('selectedCustomerCategory', category => {
|
242
|
+
if (!state.customer || !category)
|
243
|
+
return;
|
244
|
+
if (category.parent) {
|
245
|
+
const parent = state.customer.categories.find(c => c.id === category.parent);
|
246
|
+
if (parent) {
|
247
|
+
state.parentCategory = parent;
|
248
|
+
return;
|
249
|
+
}
|
250
|
+
}
|
251
|
+
state.parentCategory = null;
|
252
|
+
});
|
253
|
+
|
254
|
+
export { state as s };
|
255
|
+
|
256
|
+
//# sourceMappingURL=index-113a6b21.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"index-113a6b21.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAA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gC,CAAC,MAAM,CAAC,CAAC;IACtG,IAAI,MAAM,EAAE;MACV,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC;MAC9B,OAAO;KACR;GACF;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC;;;;","names":[],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/index.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, GreenOptions, Product, RotOptions, RutOptions, Service, User, WpOptions } from '../types';\nimport { CreditSafeUser } from '../types/felixtypes';\n\ntype StateType = {\n step: number;\n selectedCategory: Category | null;\n selectedService: Service | null;\n selectedProduct: Product | null;\n cart: Array<CartItem>;\n business: Business | 'undefined';\n options: WpOptions | null;\n rut: boolean;\n rot: boolean;\n green: boolean;\n token: string | null;\n checkoutStep: number;\n checkoutEdit: boolean;\n user: User | null;\n creditSafeUser: CreditSafeUser | null;\n modal: {\n title?: string;\n text: string[];\n } | null;\n rutOptions: RutOptions | null;\n rotOptions: RotOptions | null;\n greenOptions: GreenOptions | null;\n customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: boolean;\n maleri: boolean;\n};\n\nconst {\n state,\n onChange,\n}: {\n state: StateType;\n onChange: OnChangeHandler<StateType>;\n} = createStore({\n step: 1,\n checkoutStep: 1,\n checkoutEdit: false,\n selectedCategory: null,\n selectedService: null,\n selectedProduct: null,\n cart: [],\n business: 'undefined',\n options: null,\n rut: true,\n rot: true,\n green: true,\n token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n greenOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: false,\n maleri: false,\n sources: null,\n});\n\nonChange('cart', cart => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));\n});\n\nonChange('user', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));\n});\n\nonChange('creditSafeUser', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));\n});\n\nonChange('selectedProduct', product => {\n if (!state.customer || !product) return;\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === product.category);\n if (category) {\n state.parentCategory = category;\n return;\n }\n state.parentCategory = null;\n});\n\nonChange('selectedCustomerCategory', category => {\n if (!state.customer || !category) return;\n if ((category as CustomerSubCategory).parent) {\n const parent = state.customer.categories.find(c => c.id === (category as CustomerSubCategory).parent);\n if (parent) {\n state.parentCategory = parent;\n return;\n }\n }\n state.parentCategory = null;\n});\n\nexport default state;\n"],"version":3}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
// Match slug with partner slug in wp admin
|
2
|
+
// Dont forget to add the partners url to cors for creditsafe
|
3
|
+
// https://bitbucket.org/afonso-sweden/creditsafe-lookup/src/main/api/index.ts
|
4
|
+
var Business;
|
5
|
+
(function (Business) {
|
6
|
+
Business["kund"] = "kund";
|
7
|
+
Business["byggmax"] = "byggmax";
|
8
|
+
Business["skanska"] = "skanska";
|
9
|
+
Business["string"] = "string-furniture";
|
10
|
+
Business["hornbach"] = "hornbach";
|
11
|
+
Business["forebygg"] = "forebygg";
|
12
|
+
Business["doro"] = "doro";
|
13
|
+
Business["elfa"] = "elfa";
|
14
|
+
Business["kbygg"] = "k-bygg";
|
15
|
+
Business["norrgavel"] = "norrgavel";
|
16
|
+
Business["fargvaruhuset"] = "fargvaruhuset";
|
17
|
+
Business["zaptec"] = "zaptec";
|
18
|
+
Business["tesla"] = "tesla";
|
19
|
+
Business["klint"] = "klint";
|
20
|
+
Business["flyttsmart"] = "flyttsmart";
|
21
|
+
Business["lg"] = "lg";
|
22
|
+
Business["sparfonster"] = "sparfonster";
|
23
|
+
Business["power"] = "power";
|
24
|
+
Business["traningspartner"] = "traningspartner";
|
25
|
+
Business["superfront"] = "superfront";
|
26
|
+
Business["inet"] = "inet";
|
27
|
+
})(Business || (Business = {}));
|
28
|
+
var WidgetStyle;
|
29
|
+
(function (WidgetStyle) {
|
30
|
+
WidgetStyle["standard"] = "standard";
|
31
|
+
WidgetStyle["alternative"] = "alternative";
|
32
|
+
WidgetStyle["alternative_2"] = "alternative_2";
|
33
|
+
WidgetStyle["alternative_3"] = "alternative_3";
|
34
|
+
})(WidgetStyle || (WidgetStyle = {}));
|
35
|
+
var TopCategory;
|
36
|
+
(function (TopCategory) {
|
37
|
+
TopCategory["byggmax"] = "category/bygg";
|
38
|
+
})(TopCategory || (TopCategory = {}));
|
39
|
+
|
40
|
+
export { Business as B, WidgetStyle as W };
|
41
|
+
|
42
|
+
//# sourceMappingURL=index-1fbc7a74.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"index-1fbc7a74.js","mappings":"AAAA;AACA;AACA;IAEY;AAAZ,WAAY,QAAQ;EAClB,yBAAa,CAAA;EACb,+BAAmB,CAAA;EACnB,+BAAmB,CAAA;EACnB,uCAA2B,CAAA;EAC3B,iCAAqB,CAAA;EACrB,iCAAqB,CAAA;EACrB,yBAAa,CAAA;EACb,yBAAa,CAAA;EACb,4BAAgB,CAAA;EAChB,mCAAuB,CAAA;EACvB,2CAA+B,CAAA;EAC/B,6BAAiB,CAAA;EACjB,2BAAe,CAAA;EACf,2BAAe,CAAA;EACf,qCAAyB,CAAA;EACzB,qBAAS,CAAA;EACT,uCAA2B,CAAA;EAC3B,2BAAe,CAAA;EACf,+CAAmC,CAAA;EACnC,qCAAyB,CAAA;EACzB,yBAAa,CAAA;AACf,CAAC,EAtBW,QAAQ,KAAR,QAAQ,QAsBnB;IAmMW;AAAZ,WAAY,WAAW;EACrB,oCAAqB,CAAA;EACrB,0CAA2B,CAAA;EAC3B,8CAA+B,CAAA;EAC/B,8CAA+B,CAAA;AACjC,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;EACrB,wCAAyB,CAAA;AAC3B,CAAC,EAFW,WAAW,KAAX,WAAW;;;;","names":[],"sources":["./src/types/index.ts"],"sourcesContent":["// Match slug with partner slug in wp admin\n// Dont forget to add the partners url to cors for creditsafe\n// https://bitbucket.org/afonso-sweden/creditsafe-lookup/src/main/api/index.ts\n\nexport enum Business {\n kund = 'kund',\n byggmax = 'byggmax',\n skanska = 'skanska',\n string = 'string-furniture',\n hornbach = 'hornbach',\n forebygg = 'forebygg',\n doro = 'doro',\n elfa = 'elfa',\n kbygg = 'k-bygg',\n norrgavel = 'norrgavel',\n fargvaruhuset = 'fargvaruhuset',\n zaptec = 'zaptec',\n tesla = 'tesla',\n klint = 'klint',\n flyttsmart = 'flyttsmart',\n lg = 'lg',\n sparfonster = 'sparfonster',\n power = 'power',\n traningspartner = 'traningspartner',\n superfront = 'superfront',\n inet = 'inet',\n}\n\ntype Icon = {\n url: string;\n};\n\ninterface Customer {\n ID: number;\n post_title: string;\n post_name: string;\n post_type: string;\n filter: string;\n categories: CustomerCategory[];\n logo?: Icon;\n partner_url?: string;\n at_hemfixarna: boolean;\n info_title: string;\n widget_title?: string;\n info_text: string;\n checkout_title: string;\n checkout_trust_badges: { text: string }[];\n trust_badges: { text: string }[];\n source?: Source;\n password_protected: boolean;\n}\n\ninterface CustomerCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n show_products: boolean;\n products: { fields: Product }[] | false;\n sub_categories: CustomerSubCategory[] | false;\n add_painting: boolean;\n}\n\ninterface CustomerSubCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n products: { fields: Product }[];\n parent: string;\n add_painting: boolean;\n}\n\ninterface Part {\n ID: number;\n post_author: number;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0 | 1;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: number;\n filter: string;\n price: number;\n title: string;\n}\n\ninterface Product {\n ID: number;\n post_author: string;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n price: number;\n icon?: Icon | string;\n parts?: Array<Part>;\n list: Array<{ bullet: string }>;\n terms: string;\n terms_checkout: string;\n terms_show_checkbox: boolean;\n rut: boolean;\n rot: boolean;\n green: boolean;\n hide_start_fee: boolean;\n description: string;\n category: string;\n title: string;\n invoice: string;\n invoice_price: string;\n invoice_description: string;\n}\n\ninterface Service {\n ID: 41857;\n icon?: Icon | string;\n post_author: 34419;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: 'service';\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n products: Array<Product>;\n}\n\ninterface Category {\n count: number;\n description: string;\n name: string;\n icon?: Icon | string;\n parent: 0 | 1;\n slug: string;\n taxonomy: 'service_cat';\n term_group: 0 | 1;\n term_id: number;\n term_order: string;\n term_taxonomy_id: number;\n sub_cats?: Array<Category>;\n services?: Array<Service>;\n}\n\ninterface WpOptions {\n link: { title: string; url: string };\n trust: { trust_badge: string }[];\n thank_you_image: string;\n start_fee: number;\n terms: string;\n maleri_title: string;\n maleri_text: string;\n}\ninterface CartPart {\n id: number;\n amount: number;\n price: number;\n name: string;\n}\n\ninterface CartItem {\n id: number;\n price: number;\n name: string;\n amount: number;\n parts: CartPart[];\n rut: boolean;\n rot: boolean;\n green: boolean;\n start_fee: boolean;\n terms_checkout: string;\n icon?: Icon | string;\n}\n\nexport enum WidgetStyle {\n standard = 'standard',\n alternative = 'alternative',\n alternative_2 = 'alternative_2',\n alternative_3 = 'alternative_3',\n}\n\nexport enum TopCategory {\n byggmax = 'category/bygg',\n}\n\ninterface User {\n email: string;\n phone: string;\n ssn: string;\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n town: string;\n}\n\ninterface RutOptions {\n rut_start_fee_heading: string;\n rut_start_fee_text: string;\n rut_start_fee_text_secondary: string;\n}\n\ninterface RotOptions {\n rot_start_fee_heading: string;\n rot_start_fee_text: string;\n rot_start_fee_text_secondary: string;\n}\n\ninterface GreenOptions {\n green_start_fee_heading: string;\n green_start_fee_text: string;\n green_start_fee_text_secondary: string;\n}\n\ninterface SubSource {\n 'recordId': string;\n 'So_SubSource::Sus01_Name': string;\n 'So_SubSource::_id': string;\n 'So_SubSource::_id_Source': string;\n 'modId': string;\n}\n\ninterface FieldData {\n _id: string;\n So01_Name: string;\n So457_Aktiv_ac: number;\n So40_WebSubSource: string | number;\n So39_WebSource: number;\n rec_id: number;\n}\n\ninterface Source {\n fieldData: FieldData;\n sub_sources: SubSource[];\n}\n\ninterface SourcesRespone {\n dataInfo: {\n database: string;\n layout: string;\n table: string;\n totalRecordCount: number;\n foundCount: number;\n returnedCount: number;\n };\n data: Source[];\n}\n\nexport type {\n CartItem,\n CartPart,\n Category,\n Customer,\n CustomerCategory,\n CustomerSubCategory,\n GreenOptions,\n Icon,\n Part,\n Product,\n RotOptions,\n RutOptions,\n Service,\n Source,\n SourcesRespone,\n User,\n WpOptions,\n};\n"],"version":3}
|
package/dist/esm/loader.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-04bcf90e.js';
|
2
|
+
export { s as setNonce } from './index-04bcf90e.js';
|
3
3
|
|
4
4
|
/*
|
5
5
|
Stencil Client Patch Esm v3.2.1 | MIT Licensed | https://stenciljs.com
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
13
13
|
return patchEsm().then(() => {
|
14
|
-
return bootstrapLazy([["hemfixarna-
|
14
|
+
return bootstrapLazy([["hemfixarna-address_15",[[1,"hemfixarna-demo",{"selectedSlug":[32],"selectedID":[32],"tooltipText":[32],"tree":[32],"customer":[32],"widgetStyle":[32],"buttonBg":[32],"buttonColor":[32],"partner":[32],"colorAccessibility":[32],"loggedIn":[32],"loginError":[32]}],[1,"hemfixarna-component",{"id":[1],"business":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"],"modal":[32],"showModal":[32],"product":[32],"proppedProduct":[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{"amount":[32],"hideDescription":[32]}],[0,"hemfixarna-start",{"tree":[16],"slug":[1]}],[0,"hemfixarna-breadcrumbs",{"closeModal":[16]}],[0,"hemfixarna-checkout",{"date":[32],"dateError":[32],"generalError":[32],"loading":[32],"enteredPin":[32],"selectedSubSource":[32],"partnerOrderId":[32],"showSources":[32],"sellerID":[32],"RefferalID":[32]}],[0,"hemfixarna-contact",{"vertical":[4]}],[0,"hemfixarna-invoice",{"formError":[32],"displayImages":[32],"formImages":[32],"formState":[32]}],[0,"hemfixarna-address",{"street":[32],"streetError":[32],"zip":[32],"zipError":[32],"town":[32],"townError":[32]}],[0,"hemfixarna-getuser",{"email":[32],"emailError":[32],"phone":[32],"phoneError":[32],"ssn":[32],"ssnError":[32]}],[0,"hemfixarna-orderrows",{"cart":[4]}],[0,"hemfixarna-box",{"post":[16],"category":[16],"icon":[1],"postTitle":[1,"post-title"]}],[0,"hemfixarna-info"]]],["hemfixarna-byggmax",[[1,"hemfixarna-byggmax",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-doro",[[1,"hemfixarna-doro",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-elfa",[[1,"hemfixarna-elfa",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-fargvaruhuset",[[1,"hemfixarna-fargvaruhuset",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-flyttsmart",[[1,"hemfixarna-flyttsmart",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-forebygg",[[1,"hemfixarna-forebygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-hornbach",[[1,"hemfixarna-hornbach",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kbygg",[[1,"hemfixarna-kbygg",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-klint",[[1,"hemfixarna-klint",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-kund",[[1,"hemfixarna-kund",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-norrgavel",[[1,"hemfixarna-norrgavel",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-power",[[1,"hemfixarna-power",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-skanska",[[1,"hemfixarna-skanska",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-sparfonster",[[1,"hemfixarna-sparfonster",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-string-furniture",[[1,"hemfixarna-string-furniture",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-superfront",[[1,"hemfixarna-superfront",{"id":[1],"loadFromQuery":[1,"load-from-query"],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-tesla",[[1,"hemfixarna-tesla",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-traningspartner",[[1,"hemfixarna-traningspartner",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-zaptec",[[1,"hemfixarna-zaptec",{"id":[1],"widgetStyle":[1,"widget-style"],"buttonColor":[1,"button-color"],"buttonBg":[1,"button-bg"]}]]],["hemfixarna-category",[[0,"hemfixarna-category"]]],["hemfixarna-service",[[0,"hemfixarna-service"]]]], options);
|
15
15
|
});
|
16
16
|
};
|
17
17
|
|
package/dist/esm/loader.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"file":"loader.js","mappings":"
|
1
|
+
{"file":"loader.js","mappings":";;;AAAA;AACA;AACA;AAGA,MAAM,QAAQ,GAAG,MAAM;AAiBvB,IAAI,OAAO,cAAc,EAAE,CAAC;AAC5B,CAAC;;ACnBW,MAAC,oBAAoB,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK;AACtD,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC9D,EAAE,OAAO,QAAQ,EAAE,CAAC,IAAI,CAAC,MAAM;AAE/B,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,GAAG,CAAC,CAAC;AACL;;;;","names":[],"sources":["./node_modules/@stencil/core/internal/client/patch-esm.js","@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Esm v3.2.1 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD } from '@stencil/core/internal/app-data';\nimport { CSS, plt, win, promiseResolve } from '@stencil/core';\nconst patchEsm = () => {\n // NOTE!! This fn cannot use async/await!\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n // @ts-ignore\n if (BUILD.cssVarShim && !(CSS && CSS.supports && CSS.supports('color', 'var(--c)'))) {\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-css-shim\" */ './css-shim.js').then(() => {\n if ((plt.$cssShim$ = win.__cssshim)) {\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n return plt.$cssShim$.i();\n }\n else {\n // for better minification\n return 0;\n }\n });\n }\n return promiseResolve();\n};\nexport { patchEsm };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchEsm } from '@stencil/core/internal/client/patch-esm';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = (win, options) => {\n if (typeof window === 'undefined') return Promise.resolve();\n return patchEsm().then(() => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n });\n};\n"],"version":3}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{p as
|
1
|
+
import{p as t,b as o}from"./p-32a8152b.js";export{s as setNonce}from"./p-32a8152b.js";const e=()=>{const o=import.meta.url;const e={};if(o!==""){e.resourcesUrl=new URL(".",o).href}return t(e)};e().then((t=>o([["p-a9845efc",[[1,"hemfixarna-demo",{selectedSlug:[32],selectedID:[32],tooltipText:[32],tree:[32],customer:[32],widgetStyle:[32],buttonBg:[32],buttonColor:[32],partner:[32],colorAccessibility:[32],loggedIn:[32],loginError:[32]}],[1,"hemfixarna-component",{id:[1],business:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"],modal:[32],showModal:[32],product:[32],proppedProduct:[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart"],[0,"hemfixarna-order"],[0,"hemfixarna-product",{amount:[32],hideDescription:[32]}],[0,"hemfixarna-start",{tree:[16],slug:[1]}],[0,"hemfixarna-breadcrumbs",{closeModal:[16]}],[0,"hemfixarna-checkout",{date:[32],dateError:[32],generalError:[32],loading:[32],enteredPin:[32],selectedSubSource:[32],partnerOrderId:[32],showSources:[32],sellerID:[32],RefferalID:[32]}],[0,"hemfixarna-contact",{vertical:[4]}],[0,"hemfixarna-invoice",{formError:[32],displayImages:[32],formImages:[32],formState:[32]}],[0,"hemfixarna-address",{street:[32],streetError:[32],zip:[32],zipError:[32],town:[32],townError:[32]}],[0,"hemfixarna-getuser",{email:[32],emailError:[32],phone:[32],phoneError:[32],ssn:[32],ssnError:[32]}],[0,"hemfixarna-orderrows",{cart:[4]}],[0,"hemfixarna-box",{post:[16],category:[16],icon:[1],postTitle:[1,"post-title"]}],[0,"hemfixarna-info"]]],["p-9b1e6bc2",[[1,"hemfixarna-byggmax",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-6c1d21dd",[[1,"hemfixarna-doro",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-53afbc10",[[1,"hemfixarna-elfa",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-cb1634e8",[[1,"hemfixarna-fargvaruhuset",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-b6bc1537",[[1,"hemfixarna-flyttsmart",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-53f0abfa",[[1,"hemfixarna-forebygg",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-61b4597f",[[1,"hemfixarna-hornbach",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-dfcefa54",[[1,"hemfixarna-kbygg",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-8d509bf1",[[1,"hemfixarna-klint",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-e0aad0ff",[[1,"hemfixarna-kund",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-ae3fc85c",[[1,"hemfixarna-norrgavel",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-1f875c7a",[[1,"hemfixarna-power",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-8356796a",[[1,"hemfixarna-skanska",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-8f0a688c",[[1,"hemfixarna-sparfonster",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-3acd1346",[[1,"hemfixarna-string-furniture",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-edac9f21",[[1,"hemfixarna-superfront",{id:[1],loadFromQuery:[1,"load-from-query"],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-dabad8a7",[[1,"hemfixarna-tesla",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-1b80999e",[[1,"hemfixarna-traningspartner",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-6f6601b8",[[1,"hemfixarna-zaptec",{id:[1],widgetStyle:[1,"widget-style"],buttonColor:[1,"button-color"],buttonBg:[1,"button-bg"]}]]],["p-7c122f15",[[0,"hemfixarna-category"]]],["p-12dbf4e6",[[0,"hemfixarna-service"]]]],t)));
|
2
2
|
//# sourceMappingURL=hemfixarna-components.esm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":[],"mappings":""}
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","selectedSlug","selectedID","tooltipText","tree","customer","widgetStyle","buttonBg","buttonColor","partner","colorAccessibility","loggedIn","loginError","id","business","modal","showModal","product","proppedProduct","amount","hideDescription","slug","closeModal","date","dateError","generalError","loading","enteredPin","selectedSubSource","partnerOrderId","showSources","sellerID","RefferalID","vertical","formError","displayImages","formImages","formState","street","streetError","zip","zipError","town","townError","email","emailError","phone","phoneError","ssn","ssnError","cart","post","category","icon","postTitle","loadFromQuery"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.2.1 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,GAEXC,EAAc,qCAAqC,CAACC,aAAC,KAAAC,WAAA,KAAAC,YAAA,KAAAC,KAAA,KAAAC,SAAA,KAAAC,YAAA,KAAAC,SAAA,KAAAC,YAAA,KAAAC,QAAA,KAAAC,mBAAA,KAAAC,SAAA,KAAAC,WAAA,kCAAAC,GAAA,IAAAC,SAAA,IAAAR,YAAA,mBAAAE,YAAA,mBAAAD,SAAA,gBAAAQ,MAAA,KAAAC,UAAA,KAAAC,QAAA,KAAAC,eAAA,yGAAAC,OAAA,KAAAC,gBAAA,8BAAAhB,KAAA,KAAAiB,KAAA,mCAAAC,WAAA,iCAAAC,KAAA,KAAAC,UAAA,KAAAC,aAAA,KAAAC,QAAA,KAAAC,WAAA,KAAAC,kBAAA,KAAAC,eAAA,KAAAC,YAAA,KAAAC,SAAA,KAAAC,WAAA,gCAAAC,SAAA,+BAAAC,UAAA,KAAAC,cAAA,KAAAC,WAAA,KAAAC,UAAA,gCAAAC,OAAA,KAAAC,YAAA,KAAAC,IAAA,KAAAC,SAAA,KAAAC,KAAA,KAAAC,UAAA,gCAAAC,MAAA,KAAAC,WAAA,KAAAC,MAAA,KAAAC,WAAA,KAAAC,IAAA,KAAAC,SAAA,kCAAAC,KAAA,2BAAAC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e=class{constructor(a){r(this,a)}render(){return a("div",null,a("h2",null,s.selectedService.post_title),a("div",{class:"hemfixarna_categories--wrapper"},a("div",null,a("ul",{class:"hemfixarna_categories"},s.selectedService.products.sort(((r,a)=>r.post_title<a.post_title?-1:1)).map((r=>{var s;return a("hemfixarna-box",{post:r,icon:(s=r.icon.url)!==null&&s!==void 0?s:r.icon,postTitle:r.title})})))),a("hemfixarna-info",null)))}};export{e as hemfixarna_service};
|
2
|
+
//# sourceMappingURL=p-12dbf4e6.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["HemfixarnaService","render","h","state","selectedService","post_title","class","products","sort","a","b","map","p","post","icon","_a","url","postTitle","title"],"sources":["./src/components/hemfixarna-service/hemfixarna-service.tsx"],"sourcesContent":["import { Component, h } from '@stencil/core';\nimport state from '../../store';\nimport { Icon } from '../../types';\n\n@Component({\n tag: 'hemfixarna-service',\n shadow: false,\n})\nexport class HemfixarnaService {\n render() {\n return (\n <div>\n <h2>{state.selectedService.post_title}</h2>\n <div class=\"hemfixarna_categories--wrapper\">\n <div>\n <ul class=\"hemfixarna_categories\">\n {state.selectedService.products\n .sort((a, b) => (a.post_title < b.post_title ? -1 : 1))\n .map(p => (\n <hemfixarna-box post={p} icon={(p.icon as Icon).url ?? (p.icon as string)} postTitle={p.title}></hemfixarna-box>\n ))}\n </ul>\n </div>\n <hemfixarna-info />\n </div>\n </div>\n );\n }\n}\n"],"mappings":"2EAQaA,EAAiB,M,yBAC5BC,SACE,OACEC,EAAA,WACEA,EAAA,UAAKC,EAAMC,gBAAgBC,YAC3BH,EAAA,OAAKI,MAAM,kCACTJ,EAAA,WACEA,EAAA,MAAII,MAAM,yBACPH,EAAMC,gBAAgBG,SACpBC,MAAK,CAACC,EAAGC,IAAOD,EAAEJ,WAAaK,EAAEL,YAAc,EAAI,IACnDM,KAAIC,I,MAAK,OACRV,EAAA,kBAAgBW,KAAMD,EAAGE,MAAMC,EAACH,EAAEE,KAAcE,OAAG,MAAAD,SAAA,EAAAA,EAAKH,EAAEE,KAAiBG,UAAWL,EAAEM,OAAwB,MAIxHhB,EAAA,yB"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,h as s}from"./p-32a8152b.js";import{W as i,B as n}from"./p-cfdc93e9.js";const e=class{constructor(s){t(this,s);this.id=undefined;this.widgetStyle=i.standard;this.buttonColor=undefined;this.buttonBg=undefined}render(){return s("hemfixarna-component",{widgetStyle:this.widgetStyle,buttonBg:this.buttonBg,buttonColor:this.buttonColor,id:this.id,business:n.traningspartner})}};export{e as hemfixarna_traningspartner};
|
2
|
+
//# sourceMappingURL=p-1b80999e.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["MyComponent","WidgetStyle","standard","render","h","widgetStyle","this","buttonBg","buttonColor","id","business","Business","traningspartner"],"sources":["./src/components/customers/hemfixarna-traningspartner/hemfixarna-traningspartner.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-traningspartner',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component\n widgetStyle={this.widgetStyle}\n buttonBg={this.buttonBg}\n buttonColor={this.buttonColor}\n id={this.id}\n business={Business.traningspartner}\n ></hemfixarna-component>\n );\n }\n}\n"],"mappings":"4FAOaA,EAAW,M,4DAEcC,EAAYC,S,mDAIhDC,SACE,OACEC,EAAA,wBACEC,YAAaC,KAAKD,YAClBE,SAAUD,KAAKC,SACfC,YAAaF,KAAKE,YAClBC,GAAIH,KAAKG,GACTC,SAAUC,EAASC,iB"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,h as s}from"./p-32a8152b.js";import{W as i,B as e}from"./p-cfdc93e9.js";const n=class{constructor(s){t(this,s);this.id=undefined;this.widgetStyle=i.standard;this.buttonColor=undefined;this.buttonBg=undefined}render(){return s("hemfixarna-component",{widgetStyle:this.widgetStyle,buttonBg:this.buttonBg,buttonColor:this.buttonColor,id:this.id,business:e.power})}};export{n as hemfixarna_power};
|
2
|
+
//# sourceMappingURL=p-1f875c7a.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["MyComponent","WidgetStyle","standard","render","h","widgetStyle","this","buttonBg","buttonColor","id","business","Business","power"],"sources":["./src/components/customers/hemfixarna-power/hemfixarna-power.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { Business, WidgetStyle } from '../../../types';\n\n@Component({\n tag: 'hemfixarna-power',\n shadow: true,\n})\nexport class MyComponent {\n @Prop() id?: string;\n @Prop() widgetStyle?: WidgetStyle = WidgetStyle.standard;\n @Prop() buttonColor?: string;\n @Prop() buttonBg?: string;\n\n render() {\n return (\n <hemfixarna-component widgetStyle={this.widgetStyle} buttonBg={this.buttonBg} buttonColor={this.buttonColor} id={this.id} business={Business.power}></hemfixarna-component>\n );\n }\n}\n"],"mappings":"4FAOaA,EAAW,M,4DAEcC,EAAYC,S,mDAIhDC,SACE,OACEC,EAAA,wBAAsBC,YAAaC,KAAKD,YAAaE,SAAUD,KAAKC,SAAUC,YAAaF,KAAKE,YAAaC,GAAIH,KAAKG,GAAIC,SAAUC,EAASC,O"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
const t="hemfixarna-components";let n;let e;let s=false;let o=null;let l=false;const c=t=>{const n=new URL(t,jt.t);return n.origin!==vt.location.origin?n.href:n.pathname};const i=(t,n="")=>{{return()=>{}}};const f=(t,n)=>{{return()=>{}}};const r="{visibility:hidden}.hydrated{visibility:inherit}";const u={};const a="http://www.w3.org/2000/svg";const d="http://www.w3.org/1999/xhtml";const h=t=>t!=null;const p=t=>{t=typeof t;return t==="object"||t==="function"};function y(t){var n,e,s;return(s=(e=(n=t.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&s!==void 0?s:undefined}const m=(t,n,...e)=>{let s=null;let o=null;let l=false;let c=false;const i=[];const f=n=>{for(let e=0;e<n.length;e++){s=n[e];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!p(s)){s=String(s)}if(l&&c){i[i.length-1].o+=s}else{i.push(l?$(null,s):s)}c=l}}};f(e);if(n){if(n.key){o=n.key}{const t=n.className||n.class;if(t){n.class=typeof t!=="object"?t:Object.keys(t).filter((n=>t[n])).join(" ")}}}if(typeof t==="function"){return t(n===null?{}:n,i,g)}const r=$(t,null);r.l=n;if(i.length>0){r.i=i}{r.u=o}return r};const $=(t,n)=>{const e={h:0,p:t,o:n,m:null,i:null};{e.l=null}{e.u=null}return e};const w={};const b=t=>t&&t.p===w;const g={forEach:(t,n)=>t.map(v).forEach(n),map:(t,n)=>t.map(v).map(n).map(S)};const v=t=>({vattrs:t.l,vchildren:t.i,vkey:t.u,vname:t.$,vtag:t.p,vtext:t.o});const S=t=>{if(typeof t.vtag==="function"){const n=Object.assign({},t.vattrs);if(t.vkey){n.key=t.vkey}if(t.vname){n.name=t.vname}return m(t.vtag,n,...t.vchildren||[])}const n=$(t.vtag,t.vtext);n.l=t.vattrs;n.i=t.vchildren;n.u=t.vkey;n.$=t.vname;return n};const j=(t,n)=>{if(t!=null&&!p(t)){if(n&4){return t==="false"?false:t===""||!!t}if(n&1){return String(t)}return t}return t};const k=t=>ht(t).g;const O=(t,n,e)=>{const s=jt.ce(n,e);t.dispatchEvent(s);return s};const C=new WeakMap;const M=(t,n,e)=>{let s=gt.get(t);if(Ot&&e){s=s||new CSSStyleSheet;if(typeof s==="string"){s=n}else{s.replaceSync(n)}}else{s=n}gt.set(t,s)};const x=(t,n,e,s)=>{var o;let l=E(n);const c=gt.get(l);t=t.nodeType===11?t:St;if(c){if(typeof c==="string"){t=t.head||t;let n=C.get(t);let e;if(!n){C.set(t,n=new Set)}if(!n.has(l)){{{e=St.createElement("style");e.innerHTML=c}const n=(o=jt.v)!==null&&o!==void 0?o:y(St);if(n!=null){e.setAttribute("nonce",n)}t.insertBefore(e,t.querySelector("link"))}if(n){n.add(l)}}}else if(!t.adoptedStyleSheets.includes(c)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,c]}}return l};const U=t=>{const n=t.S;const e=t.g;const s=n.h;const o=i("attachStyles",n.j);const l=x(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);if(s&10){e["s-sc"]=l;e.classList.add(l+"-h")}o()};const E=(t,n)=>"sc-"+t.j;const L=(t,n,e,s,o,l)=>{if(e!==s){let c=mt(t,n);let i=n.toLowerCase();if(n==="class"){const n=t.classList;const o=R(e);const l=R(s);n.remove(...o.filter((t=>t&&!l.includes(t))));n.add(...l.filter((t=>t&&!o.includes(t))))}else if(n==="style"){{for(const n in e){if(!s||s[n]==null){if(n.includes("-")){t.style.removeProperty(n)}else{t.style[n]=""}}}}for(const n in s){if(!e||s[n]!==e[n]){if(n.includes("-")){t.style.setProperty(n,s[n])}else{t.style[n]=s[n]}}}}else if(n==="key");else if(!c&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(mt(vt,i)){n=i.slice(2)}else{n=i[2]+n.slice(3)}if(e){jt.rel(t,n,e,false)}if(s){jt.ael(t,n,s,false)}}else{const i=p(s);if((c||i&&s!==null)&&!o){try{if(!t.tagName.includes("-")){const o=s==null?"":s;if(n==="list"){c=false}else if(e==null||t[n]!=o){t[n]=o}}else{t[n]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(n)===""){{t.removeAttribute(n)}}}else if((!c||l&4||o)&&!i){s=s===true?"":s;{t.setAttribute(n,s)}}}}};const P=/\s/;const R=t=>!t?[]:t.split(P);const N=(t,n,e,s)=>{const o=n.m.nodeType===11&&n.m.host?n.m.host:n.m;const l=t&&t.l||u;const c=n.l||u;{for(s in l){if(!(s in c)){L(o,s,l[s],undefined,e,n.h)}}}for(s in c){L(o,s,l[s],c[s],e,n.h)}};const T=(t,e,o,l)=>{const c=e.i[o];let i=0;let f;let r;if(c.o!==null){f=c.m=St.createTextNode(c.o)}else{if(!s){s=c.p==="svg"}f=c.m=St.createElementNS(s?a:d,c.p);if(s&&c.p==="foreignObject"){s=false}{N(null,c,s)}if(h(n)&&f["s-si"]!==n){f.classList.add(f["s-si"]=n)}if(c.i){for(i=0;i<c.i.length;++i){r=T(t,c,i);if(r){f.appendChild(r)}}}{if(c.p==="svg"){s=false}else if(f.tagName==="foreignObject"){s=true}}}return f};const W=(t,n,s,o,l,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===e){i=i.shadowRoot}for(;l<=c;++l){if(o[l]){f=T(null,s,l);if(f){o[l].m=f;i.insertBefore(f,n)}}}};const A=(t,n,e,s,o)=>{for(;n<=e;++n){if(s=t[n]){o=s.m;o.remove()}}};const F=(t,n,e,s)=>{let o=0;let l=0;let c=0;let i=0;let f=n.length-1;let r=n[0];let u=n[f];let a=s.length-1;let d=s[0];let h=s[a];let p;let y;while(o<=f&&l<=a){if(r==null){r=n[++o]}else if(u==null){u=n[--f]}else if(d==null){d=s[++l]}else if(h==null){h=s[--a]}else if(q(r,d)){D(r,d);r=n[++o];d=s[++l]}else if(q(u,h)){D(u,h);u=n[--f];h=s[--a]}else if(q(r,h)){D(r,h);t.insertBefore(r.m,u.m.nextSibling);r=n[++o];h=s[--a]}else if(q(u,d)){D(u,d);t.insertBefore(u.m,r.m);u=n[--f];d=s[++l]}else{c=-1;{for(i=o;i<=f;++i){if(n[i]&&n[i].u!==null&&n[i].u===d.u){c=i;break}}}if(c>=0){y=n[c];if(y.p!==d.p){p=T(n&&n[l],e,c)}else{D(y,d);n[c]=undefined;p=y.m}d=s[++l]}else{p=T(n&&n[l],e,l);d=s[++l]}if(p){{r.m.parentNode.insertBefore(p,r.m)}}}}if(o>f){W(t,s[a+1]==null?null:s[a+1].m,e,s,l,a)}else if(l>a){A(n,o,f)}};const q=(t,n)=>{if(t.p===n.p){{return t.u===n.u}}return false};const D=(t,n)=>{const e=n.m=t.m;const o=t.i;const l=n.i;const c=n.p;const i=n.o;if(i===null){{s=c==="svg"?true:c==="foreignObject"?false:s}{{N(t,n,s)}}if(o!==null&&l!==null){F(e,o,n,l)}else if(l!==null){if(t.o!==null){e.textContent=""}W(e,null,n,l,0,l.length-1)}else if(o!==null){A(o,0,o.length-1)}if(s&&c==="svg"){s=false}}else if(t.o!==i){e.data=i}};const H=(t,s)=>{const o=t.g;const l=t.k||$(null,null);const c=b(s)?s:m(null,null,s);e=o.tagName;c.p=null;c.h|=4;t.k=c;c.m=l.m=o.shadowRoot||o;{n=o["s-sc"]}D(l,c)};const I=(t,n)=>{if(n&&!t.O&&n["s-p"]){n["s-p"].push(new Promise((n=>t.O=n)))}};const V=(t,n)=>{{t.h|=16}if(t.h&4){t.h|=512;return}I(t,t.C);const e=()=>_(t,n);return Pt(e)};const _=(t,n)=>{const e=i("scheduleUpdate",t.S.j);const s=t.M;let o;if(n){{t.h|=256;if(t.U){t.U.map((([t,n])=>X(s,t,n)));t.U=null}}{o=X(s,"componentWillLoad")}}e();return Y(o,(()=>z(t,s,n)))};const z=async(t,n,e)=>{const s=t.g;const o=i("update",t.S.j);const l=s["s-rc"];if(e){U(t)}const c=i("render",t.S.j);{B(t,n)}if(l){l.map((t=>t()));s["s-rc"]=undefined}c();o();{const n=s["s-p"];const e=()=>J(t);if(n.length===0){e()}else{Promise.all(n).then(e);t.h|=4;n.length=0}}};const B=(t,n,e)=>{try{o=n;n=n.render&&n.render();{t.h&=~16}{t.h|=2}{{{H(t,n)}}}}catch(n){$t(n,t.g)}o=null;return null};const G=()=>o;const J=t=>{const n=t.S.j;const e=t.g;const s=i("postUpdate",n);const o=t.M;const l=t.C;{X(o,"componentDidRender")}if(!(t.h&64)){t.h|=64;{Z(e)}s();{t.L(e);if(!l){Q()}}}else{s()}{if(t.O){t.O();t.O=undefined}if(t.h&512){Lt((()=>V(t,false)))}t.h&=~(4|512)}};const K=t=>{{const n=ht(t);const e=n.g.isConnected;if(e&&(n.h&(2|16))===2){V(n,false)}return e}};const Q=n=>{{Z(St.documentElement)}Lt((()=>O(vt,"appload",{detail:{namespace:t}})))};const X=(t,n,e)=>{if(t&&t[n]){try{return t[n](e)}catch(t){$t(t)}}return undefined};const Y=(t,n)=>t&&t.then?t.then(n):n();const Z=t=>t.classList.add("hydrated");const tt=(t,n)=>ht(t).P.get(n);const nt=(t,n,e,s)=>{const o=ht(t);const l=o.g;const c=o.P.get(n);const i=o.h;const f=o.M;e=j(e,s.R[n][0]);const r=Number.isNaN(c)&&Number.isNaN(e);const u=e!==c&&!r;if((!(i&8)||c===undefined)&&u){o.P.set(n,e);if(f){if(s.N&&i&128){const t=s.N[n];if(t){t.map((t=>{try{f[t](e,c,n)}catch(t){$t(t,l)}}))}}if((i&(2|16))===2){V(o,false)}}}};const et=(t,n,e)=>{if(n.R){if(t.watchers){n.N=t.watchers}const s=Object.entries(n.R);const o=t.prototype;s.map((([t,[s]])=>{if(s&31||e&2&&s&32){Object.defineProperty(o,t,{get(){return tt(this,t)},set(e){nt(this,t,e,n)},configurable:true,enumerable:true})}}));if(e&1){const n=new Map;o.attributeChangedCallback=function(t,e,s){jt.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e)){s=this[e];delete this[e]}else if(o.hasOwnProperty(e)&&typeof this[e]==="number"&&this[e]==s){return}this[e]=s===null&&typeof this[e]==="boolean"?false:s}))};t.observedAttributes=s.filter((([t,n])=>n[0]&15)).map((([t,e])=>{const s=e[1]||t;n.set(s,t);return s}))}}return t};const st=async(t,n,e,s,o)=>{if((n.h&32)===0){{n.h|=32;o=bt(e);if(o.then){const t=f();o=await o;t()}if(!o.isProxied){{e.N=o.watchers}et(o,e,2);o.isProxied=true}const t=i("createInstance",e.j);{n.h|=8}try{new o(n)}catch(t){$t(t)}{n.h&=~8}{n.h|=128}t()}if(o.style){let t=o.style;const n=E(e);if(!gt.has(n)){const s=i("registerStyles",e.j);M(n,t,!!(e.h&1));s()}}}const l=n.C;const c=()=>V(n,true);if(l&&l["s-rc"]){l["s-rc"].push(c)}else{c()}};const ot=t=>{if((jt.h&1)===0){const n=ht(t);const e=n.S;const s=i("connectedCallback",e.j);if(!(n.h&1)){n.h|=1;{let e=t;while(e=e.parentNode||e.host){if(e["s-p"]){I(n,n.C=e);break}}}if(e.R){Object.entries(e.R).map((([n,[e]])=>{if(e&31&&t.hasOwnProperty(n)){const e=t[n];delete t[n];t[n]=e}}))}{st(t,n,e)}}else{ft(t,n,e.T)}s()}};const lt=t=>{if((jt.h&1)===0){const n=ht(t);const e=n.M;{if(n.W){n.W.map((t=>t()));n.W=undefined}}{X(e,"disconnectedCallback")}}};const ct=(t,n={})=>{var e;const s=i();const o=[];const l=n.exclude||[];const c=vt.customElements;const f=St.head;const u=f.querySelector("meta[charset]");const a=St.createElement("style");const d=[];let h;let p=true;Object.assign(jt,n);jt.t=new URL(n.resourcesUrl||"./",St.baseURI).href;t.map((t=>{t[1].map((n=>{const e={h:n[0],j:n[1],R:n[2],T:n[3]};{e.R=n[2]}{e.T=n[3]}{e.N={}}const s=e.j;const i=class extends HTMLElement{constructor(t){super(t);t=this;yt(t,e);if(e.h&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(h){clearTimeout(h);h=null}if(p){d.push(this)}else{jt.jmp((()=>ot(this)))}}disconnectedCallback(){jt.jmp((()=>lt(this)))}componentOnReady(){return ht(this).A}};e.F=t[0];if(!l.includes(s)&&!c.get(s)){o.push(s);c.define(s,et(i,e,1))}}))}));{a.innerHTML=o+r;a.setAttribute("data-styles","");const t=(e=jt.v)!==null&&e!==void 0?e:y(St);if(t!=null){a.setAttribute("nonce",t)}f.insertBefore(a,u?u.nextSibling:f.firstChild)}p=false;if(d.length){d.map((t=>t.connectedCallback()))}else{{jt.jmp((()=>h=setTimeout(Q,30)))}}s()};const it=(t,n)=>n;const ft=(t,n,e,s)=>{if(e){e.map((([e,s,o])=>{const l=t;const c=rt(n,o);const i=ut(e);jt.ael(l,s,c,i);(n.W=n.W||[]).push((()=>jt.rel(l,s,c,i)))}))}};const rt=(t,n)=>e=>{try{{if(t.h&256){t.M[n](e)}else{(t.U=t.U||[]).push([n,e])}}}catch(t){$t(t)}};const ut=t=>(t&2)!==0;const at=t=>jt.v=t;const dt=new WeakMap;const ht=t=>dt.get(t);const pt=(t,n)=>dt.set(n.M=t,n);const yt=(t,n)=>{const e={h:0,g:t,S:n,P:new Map};{e.A=new Promise((t=>e.L=t));t["s-p"]=[];t["s-rc"]=[]}ft(t,e,n.T);return dt.set(t,e)};const mt=(t,n)=>n in t;const $t=(t,n)=>(0,console.error)(t,n);const wt=new Map;const bt=(t,n,e)=>{const s=t.j.replace(/-/g,"_");const o=t.F;const l=wt.get(o);if(l){return l[s]}
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((t=>{{wt.set(o,t)}return t[s]}),$t)};const gt=new Map;const vt=typeof window!=="undefined"?window:{};const St=vt.document||{head:{}};const jt={h:0,t:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,s)=>t.addEventListener(n,e,s),rel:(t,n,e,s)=>t.removeEventListener(n,e,s),ce:(t,n)=>new CustomEvent(t,n)};const kt=t=>Promise.resolve(t);const Ot=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Ct=[];const Mt=[];const xt=(t,n)=>e=>{t.push(e);if(!l){l=true;if(n&&jt.h&4){Lt(Et)}else{jt.raf(Et)}}};const Ut=t=>{for(let n=0;n<t.length;n++){try{t[n](performance.now())}catch(t){$t(t)}}t.length=0};const Et=()=>{Ut(Ct);{Ut(Mt);if(l=Ct.length>0){jt.raf(Et)}}};const Lt=t=>kt().then(t);const Pt=xt(Mt,true);export{it as F,
|
3
|
-
//# sourceMappingURL=p-
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((t=>{{wt.set(o,t)}return t[s]}),$t)};const gt=new Map;const vt=typeof window!=="undefined"?window:{};const St=vt.document||{head:{}};const jt={h:0,t:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,s)=>t.addEventListener(n,e,s),rel:(t,n,e,s)=>t.removeEventListener(n,e,s),ce:(t,n)=>new CustomEvent(t,n)};const kt=t=>Promise.resolve(t);const Ot=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Ct=[];const Mt=[];const xt=(t,n)=>e=>{t.push(e);if(!l){l=true;if(n&&jt.h&4){Lt(Et)}else{jt.raf(Et)}}};const Ut=t=>{for(let n=0;n<t.length;n++){try{t[n](performance.now())}catch(t){$t(t)}}t.length=0};const Et=()=>{Ut(Ct);{Ut(Mt);if(l=Ct.length>0){jt.raf(Et)}}};const Lt=t=>kt().then(t);const Pt=xt(Mt,true);export{it as F,c as a,ct as b,G as c,K as f,k as g,m as h,kt as p,pt as r,at as s};
|
3
|
+
//# sourceMappingURL=p-32a8152b.js.map
|