@teipublisher/pb-components 1.30.3 → 1.32.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/CHANGELOG.md +40 -0
- package/css/leaflet/MarkerCluster.Default.css +60 -0
- package/css/leaflet/MarkerCluster.css +14 -0
- package/dist/demo/demos.json +3 -0
- package/dist/demo/pb-custom-form.html +61 -0
- package/dist/demo/pb-leaflet-map.html +9 -7
- package/dist/demo/pb-leaflet-map2.html +2 -2
- package/dist/demo/pb-leaflet-map3.html +15 -22
- package/dist/es-global-bridge-6abe3a88.js +5 -0
- package/dist/pb-components-bundle.js +126 -92
- package/dist/pb-elements.json +204 -2
- package/dist/pb-leaflet-map.js +4 -8
- package/lib/leaflet-src.js +14062 -0
- package/lib/leaflet.markercluster-src.js +2718 -0
- package/package.json +2 -1
- package/pb-elements.json +204 -2
- package/src/pb-components.js +1 -0
- package/src/pb-custom-form.js +49 -7
- package/src/pb-geolocation.js +48 -11
- package/src/pb-leaflet-map.js +79 -38
- package/src/pb-split-list.js +188 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
## [1.32.1](https://github.com/eeditiones/tei-publisher-components/compare/v1.32.0...v1.32.1) (2022-01-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **pb-geolocation:** allow a desired zoom level to be passed in via pb-geolocation event ([e0054f8](https://github.com/eeditiones/tei-publisher-components/commit/e0054f89d9f08d1e1b5ee5dd712f0eb354225e1e))
|
|
7
|
+
* **pb-split-list:** allow categories to wrap around if screen is too small ([53fb84d](https://github.com/eeditiones/tei-publisher-components/commit/53fb84dc7087fb85665ec250c0e6c6ec2f343a87))
|
|
8
|
+
|
|
9
|
+
# [1.32.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.31.0...v1.32.0) (2022-01-25)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **pb-split-list:** add items to light DOM instead of shadow DOM, so they can be styled ([6dd2267](https://github.com/eeditiones/tei-publisher-components/commit/6dd22675c898b1a7cf641ee653e21def9c23e818))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **pb-leaflet-map:** Support clustering of markers to improve performance of maps with many markers ([4d73e38](https://github.com/eeditiones/tei-publisher-components/commit/4d73e3898fc235d402e28420e18819c5146b1673))
|
|
20
|
+
|
|
21
|
+
# [1.31.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.30.4...v1.31.0) (2022-01-24)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **pb-leaflet-map:** if there's only one location marked, show it on the map using the defined zoom level and not the whole world ([88ca01d](https://github.com/eeditiones/tei-publisher-components/commit/88ca01d24ce9ea1e756f9707eed0d1e74ae14ffc))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **pb-custom-form:** add auto-submit feature: selected form elements will automatically submit the form when changed ([b34385a](https://github.com/eeditiones/tei-publisher-components/commit/b34385a768281964c8f571ebc96d6712276fe7c9))
|
|
32
|
+
* **pb-split-list:** new component to display lists organized into categories (e.g. letter of the alphabet, topic, country ...) ([0060931](https://github.com/eeditiones/tei-publisher-components/commit/00609317946f6f2750d9c504d9775f5191835868))
|
|
33
|
+
|
|
34
|
+
## [1.30.4](https://github.com/eeditiones/tei-publisher-components/compare/v1.30.3...v1.30.4) (2022-01-19)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* **pb-leaflet-map:** fix zoom if there's just one location; automatically emit pb-geolocation event ([7259290](https://github.com/eeditiones/tei-publisher-components/commit/72592902db5fda2ddbdae58e8e152e2cc2508205))
|
|
40
|
+
|
|
1
41
|
## [1.30.3](https://github.com/eeditiones/tei-publisher-components/compare/v1.30.2...v1.30.3) (2021-12-19)
|
|
2
42
|
|
|
3
43
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.marker-cluster-small {
|
|
2
|
+
background-color: rgba(181, 226, 140, 0.6);
|
|
3
|
+
}
|
|
4
|
+
.marker-cluster-small div {
|
|
5
|
+
background-color: rgba(110, 204, 57, 0.6);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.marker-cluster-medium {
|
|
9
|
+
background-color: rgba(241, 211, 87, 0.6);
|
|
10
|
+
}
|
|
11
|
+
.marker-cluster-medium div {
|
|
12
|
+
background-color: rgba(240, 194, 12, 0.6);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.marker-cluster-large {
|
|
16
|
+
background-color: rgba(253, 156, 115, 0.6);
|
|
17
|
+
}
|
|
18
|
+
.marker-cluster-large div {
|
|
19
|
+
background-color: rgba(241, 128, 23, 0.6);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* IE 6-8 fallback colors */
|
|
23
|
+
.leaflet-oldie .marker-cluster-small {
|
|
24
|
+
background-color: rgb(181, 226, 140);
|
|
25
|
+
}
|
|
26
|
+
.leaflet-oldie .marker-cluster-small div {
|
|
27
|
+
background-color: rgb(110, 204, 57);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.leaflet-oldie .marker-cluster-medium {
|
|
31
|
+
background-color: rgb(241, 211, 87);
|
|
32
|
+
}
|
|
33
|
+
.leaflet-oldie .marker-cluster-medium div {
|
|
34
|
+
background-color: rgb(240, 194, 12);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.leaflet-oldie .marker-cluster-large {
|
|
38
|
+
background-color: rgb(253, 156, 115);
|
|
39
|
+
}
|
|
40
|
+
.leaflet-oldie .marker-cluster-large div {
|
|
41
|
+
background-color: rgb(241, 128, 23);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.marker-cluster {
|
|
45
|
+
background-clip: padding-box;
|
|
46
|
+
border-radius: 20px;
|
|
47
|
+
}
|
|
48
|
+
.marker-cluster div {
|
|
49
|
+
width: 30px;
|
|
50
|
+
height: 30px;
|
|
51
|
+
margin-left: 5px;
|
|
52
|
+
margin-top: 5px;
|
|
53
|
+
|
|
54
|
+
text-align: center;
|
|
55
|
+
border-radius: 15px;
|
|
56
|
+
font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
57
|
+
}
|
|
58
|
+
.marker-cluster span {
|
|
59
|
+
line-height: 30px;
|
|
60
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
|
|
2
|
+
-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
3
|
+
-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
4
|
+
-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
5
|
+
transition: transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.leaflet-cluster-spider-leg {
|
|
9
|
+
/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
|
|
10
|
+
-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
|
|
11
|
+
-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
|
|
12
|
+
-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
|
|
13
|
+
transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
|
|
14
|
+
}
|
package/dist/demo/demos.json
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="utf-8"/>
|
|
4
|
+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"/>
|
|
5
|
+
|
|
6
|
+
<title>pb-split-list Demo</title>
|
|
7
|
+
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.4.3/webcomponents-loader.js"></script><script type="module" src="../pb-components-bundle.js"></script>
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<pb-demo-snippet>
|
|
12
|
+
<template>
|
|
13
|
+
<style>
|
|
14
|
+
fieldset {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
border: 0;
|
|
18
|
+
}
|
|
19
|
+
fieldset * {
|
|
20
|
+
margin-right: 20px;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
<pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
|
|
24
|
+
<pb-custom-form auto-submit="paper-input,paper-icon-button,input,select,paper-dropdown-menu">
|
|
25
|
+
<paper-input name="search" label="Search">
|
|
26
|
+
<paper-icon-button icon="search" slot="suffix"></paper-icon-button>
|
|
27
|
+
</paper-input>
|
|
28
|
+
<fieldset>
|
|
29
|
+
<label>
|
|
30
|
+
<input type="radio" name="view" value="correspondents"> Korrespondenten
|
|
31
|
+
</label>
|
|
32
|
+
<label>
|
|
33
|
+
<input type="radio" name="view" value="mentions"> Korrespondenten und erwähnte Personen
|
|
34
|
+
</label>
|
|
35
|
+
</fieldset>
|
|
36
|
+
<fieldset>
|
|
37
|
+
<select name="type">
|
|
38
|
+
<option value="one">One</option>
|
|
39
|
+
<option value="two">Two</option>
|
|
40
|
+
</select>
|
|
41
|
+
<paper-dropdown-menu id="sort" label="Sort" name="sort">
|
|
42
|
+
<paper-listbox slot="dropdown-content" class="dropdown-content" attr-for-selected="value">
|
|
43
|
+
<paper-item value="author">Author</paper-item>
|
|
44
|
+
<paper-item value="title">Title</paper-item>
|
|
45
|
+
</paper-listbox>
|
|
46
|
+
</paper-dropdown-menu>
|
|
47
|
+
</fieldset>
|
|
48
|
+
</pb-custom-form>
|
|
49
|
+
<pre id="output"></pre>
|
|
50
|
+
</pb-page>
|
|
51
|
+
<script>
|
|
52
|
+
window.addEventListener('WebComponentsReady', () => {
|
|
53
|
+
pbEvents.subscribe('pb-submit', null, (ev) => {
|
|
54
|
+
document.getElementById('output').innerText = JSON.stringify(ev.detail.params);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
58
|
+
</template>
|
|
59
|
+
</pb-demo-snippet>
|
|
60
|
+
</body>
|
|
61
|
+
</html>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</pb-geolocation>
|
|
40
40
|
</li>
|
|
41
41
|
</ul>
|
|
42
|
-
<pb-leaflet-map id="map" zoom="11">
|
|
42
|
+
<pb-leaflet-map id="map" zoom="11" fit-markers>
|
|
43
43
|
<pb-map-layer show base label="HikeBike Map" url="https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}" max-zoom="19"
|
|
44
44
|
access-token="pk.eyJ1Ijoid29sZmdhbmdtbSIsImEiOiJjam1kMjVpMnUwNm9wM3JwMzdsNGhhcnZ0In0.v65crewF-dkNsPF3o1Q4uw"
|
|
45
45
|
attribution='© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>'></pb-map-layer>
|
|
@@ -52,12 +52,14 @@
|
|
|
52
52
|
* Not necessary if the pb-geolocation appear inside a component
|
|
53
53
|
* which does itself send the `pb-update` event, e.g. `pb-view`.
|
|
54
54
|
*/
|
|
55
|
-
document.addEventListener('WebComponentsReady', () => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
document.addEventListener('WebComponentsReady', () => {
|
|
56
|
+
pbEvents.subscribe('pb-ready', null, function() {
|
|
57
|
+
document.dispatchEvent(new CustomEvent('pb-update', {
|
|
58
|
+
detail: {
|
|
59
|
+
root: document.getElementById('locations')
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
});
|
|
61
63
|
});
|
|
62
64
|
</script>
|
|
63
65
|
</template>
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
dolore magna aliquyam erat, sed diam voluptua <pb-geolocation event="click" longitude="8.1499728" latitude="47.9011491">Titisee</pb-geolocation>. At vero eos et accusam et justo duo dolores et ea rebum.
|
|
39
39
|
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
|
|
40
40
|
<pb-leaflet-map id="map" zoom="11" toggle>
|
|
41
|
-
<pb-map-layer show base label="
|
|
42
|
-
attribution='© <a href="https://www.openstreetmap.org/copyright"
|
|
41
|
+
<pb-map-layer show base label="OpenTopo Map" url="https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png" max-zoom="19"
|
|
42
|
+
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'></pb-map-layer>
|
|
43
43
|
</pb-leaflet-map>
|
|
44
44
|
</main>
|
|
45
45
|
</pb-page>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<main>
|
|
27
27
|
<ul id="locations">
|
|
28
28
|
<li>
|
|
29
|
-
<pb-geolocation event="click" longitude="8.1499728" latitude="47.9011491">
|
|
29
|
+
<pb-geolocation event="click" longitude="8.1499728" latitude="47.9011491" auto>
|
|
30
30
|
Titisee
|
|
31
31
|
<template slot="popup">
|
|
32
32
|
<p>Der <b>Titisee</b> ist ein <a href="https://de.wikipedia.org/wiki/See" title="See">See</a> im südlichen <a href="https://de.wikipedia.org/wiki/Schwarzwald" title="Schwarzwald">Schwarzwald</a> in <a href="https://de.wikipedia.org/wiki/Baden-W%C3%BCrttemberg" title="Baden-Württemberg">Baden-Württemberg</a>.</p>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</pb-geolocation>
|
|
36
36
|
</li>
|
|
37
37
|
<li>
|
|
38
|
-
<pb-geolocation event="click" longitude="8.035903639726621" latitude="47.860249912035364">
|
|
38
|
+
<pb-geolocation event="click" longitude="8.035903639726621" latitude="47.860249912035364" auto>
|
|
39
39
|
Feldberg
|
|
40
40
|
<template slot="popup">
|
|
41
41
|
<p>Der <b>Feldberg</b> ist mit <span style="border-width:0px; padding:0px; margin:0px;">1493 <abbr title="Meter über Normalhöhennull">m ü. NHN</abbr></span></sup> der höchste Berg in <a href="https://de.wikipedia.org/wiki/Baden-W%C3%BCrttemberg" title="Baden-Württemberg">Baden-Württemberg</a>.</p>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</pb-geolocation>
|
|
45
45
|
</li>
|
|
46
46
|
<li>
|
|
47
|
-
<pb-geolocation event="click" longitude="8.125068739930907" latitude="47.97215106146882">
|
|
47
|
+
<pb-geolocation event="click" longitude="8.125068739930907" latitude="47.97215106146882" auto>
|
|
48
48
|
Thurner
|
|
49
49
|
<template slot="popup">
|
|
50
50
|
<p>Der <b>Thurner</b> ist eine Passhöhe und ein <a href="https://de.wikipedia.org/wiki/Weiler" title="Weiler">Weiler</a> im Südosten der Gemeinde <a href="https://de.wikipedia.org/wiki/St._M%C3%A4rgen" title="St. Märgen">St. Märgen</a>, Ortsteil dieser Gemeinde im <a href="https://de.wikipedia.org/wiki/Landkreis_Breisgau-Hochschwarzwald" title="Landkreis Breisgau-Hochschwarzwald">Landkreis Breisgau-Hochschwarzwald</a> in <a href="https://de.wikipedia.org/wiki/Baden-W%C3%BCrttemberg" title="Baden-Württemberg">Baden-Württemberg</a> (<a href="https://de.wikipedia.org/wiki/Deutschland" title="Deutschland">Deutschland</a>) auf einer kleinen Hochebene, auf die Straßensteigen aus den Talsystemen von <a href="https://de.wikipedia.org/wiki/Zartenbach" class="mw-redirect" title="Zartenbach">Zartenbach</a> im Süden, <a href="https://de.wikipedia.org/wiki/Wagensteigbach" title="Wagensteigbach">Wagensteigbach</a> im Nordosten, <a href="https://de.wikipedia.org/wiki/Wilde_Gutach" title="Wilde Gutach">Wilder Gutach</a> im Norden, <a href="https://de.wikipedia.org/wiki/Urach_(Hammerbach)" title="Urach (Hammerbach)">Urach</a> im Osten und <a href="https://de.wikipedia.org/wiki/Wutach" title="Wutach">Wutach</a> im Südosten führen.</p>
|
|
@@ -52,14 +52,21 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
</pb-geolocation>
|
|
54
54
|
</li>
|
|
55
|
+
<li>
|
|
56
|
+
<pb-geolocation event="click" longitude="15.4315432" latitude="50.8143245" auto>
|
|
57
|
+
Szklarska Poręba
|
|
58
|
+
<template slot="popup">
|
|
59
|
+
<p>Szklarska Poręba [ˈʂklarska pɔˈrɛmba] (German: Schreiberhau) is a town in Jelenia Góra County, Lower Silesian Voivodeship, in south-western Poland. The town has a population of around 6,500. It is a popular ski resort.</p>
|
|
60
|
+
<p>Source: <a href="https://en.wikipedia.org/wiki/Szklarska_Por%C4%99ba">Wikipedia</a></p>
|
|
61
|
+
</template>
|
|
62
|
+
</pb-geolocation>
|
|
63
|
+
</li>
|
|
55
64
|
</ul>
|
|
56
|
-
<pb-leaflet-map id="map" zoom="14"
|
|
57
|
-
<pb-map-layer show base label="
|
|
58
|
-
attribution='© <a href="https://www.openstreetmap.org/copyright"&
|
|
65
|
+
<pb-leaflet-map id="map" zoom="14" fit-markers>
|
|
66
|
+
<pb-map-layer show base label="OpenTopo Map" url="https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png" max-zoom="19"
|
|
67
|
+
attribution='Map data: © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'></pb-map-layer>
|
|
59
68
|
<pb-map-layer base label="ESRI World Imagery" url="https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
|
|
60
69
|
attribution='Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'></pb-map-layer>
|
|
61
|
-
<pb-map-layer show label="Hillshading" url="https://tiles.wmflabs.org/hillshading/{z}/{x}/{y}.png" max-zoom="15"
|
|
62
|
-
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'></pb-map-layer>
|
|
63
70
|
<pb-map-layer show label="Ski Slopes" url="https://tile.waymarkedtrails.org/slopes/{z}/{x}/{y}.png"
|
|
64
71
|
attribution='Map data: © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors | Map style: © <a href="https://waymarkedtrails.org">waymarkedtrails.org</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
|
65
72
|
max-zoom="18"></pb-map-layer>
|
|
@@ -70,20 +77,6 @@
|
|
|
70
77
|
</pb-leaflet-map>
|
|
71
78
|
</main>
|
|
72
79
|
</pb-page>
|
|
73
|
-
<script type="text/javascript">
|
|
74
|
-
/**
|
|
75
|
-
* Manually initialize map markers once components are ready.
|
|
76
|
-
* Not necessary if the pb-geolocation appear inside a component
|
|
77
|
-
* which does itself send the `pb-update` event, e.g. `pb-view`.
|
|
78
|
-
*/
|
|
79
|
-
document.addEventListener('WebComponentsReady', () => {
|
|
80
|
-
document.dispatchEvent(new CustomEvent('pb-update', {
|
|
81
|
-
detail: {
|
|
82
|
-
root: document.getElementById('locations')
|
|
83
|
-
}
|
|
84
|
-
}));
|
|
85
|
-
});
|
|
86
|
-
</script>
|
|
87
80
|
</template>
|
|
88
81
|
</pb-demo-snippet>
|
|
89
82
|
</body>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018 The Pennsylvania State University
|
|
3
|
+
* @license Apache-2.0, see License.md for full text.
|
|
4
|
+
*/
|
|
5
|
+
class o{constructor(){this.load=(o,i,e=!1)=>{let l=window.ESGlobalBridge.imports&&window.ESGlobalBridge.imports[o];if(!(!e&&window.ESGlobalBridge.webpack&&window.ESGlobalBridge.webpack[o])&&!l)return new Promise((e,l)=>{const d=document.createElement("script");d.src=i,d.setAttribute("data-name",o),window.ESGlobalBridge.imports[o]=i,d.onload=()=>{e(window.ESGlobalBridge.imports[o]),window.ESGlobalBridge.imports[o]=!0,setTimeout(()=>{const e=new CustomEvent(`es-bridge-${o}-loaded`,{bubbles:!0,cancelable:!0,detail:{name:o,location:i}});document.dispatchEvent(e)},100)},d.onerror=()=>{l(new Error(`Failed to load ${o} script with location ${i}.`)),delete window.ESGlobalBridge.imports[o],window.ESGlobalBridge.imports[o]=!1},document.documentElement.appendChild(d)})}}}window.ESGlobalBridge=window.ESGlobalBridge||{},window.ESGlobalBridge.imports=window.ESGlobalBridge.imports||{},window.ESGlobalBridge.requestAvailability=()=>(window.ESGlobalBridge.instance||(window.ESGlobalBridge.instance=new o),window.ESGlobalBridge);window.ESGlobalBridge.requestAvailability();
|