@everymatrix/casino-engagement-suite-progress-bar 1.35.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.
Files changed (43) hide show
  1. package/dist/casino-engagement-suite-progress-bar/casino-engagement-suite-progress-bar.esm.js +1 -0
  2. package/dist/casino-engagement-suite-progress-bar/index.esm.js +0 -0
  3. package/dist/casino-engagement-suite-progress-bar/p-0a8b4144.entry.js +1 -0
  4. package/dist/casino-engagement-suite-progress-bar/p-212ac068.js +1 -0
  5. package/dist/cjs/casino-engagement-suite-progress-bar.cjs.entry.js +71 -0
  6. package/dist/cjs/casino-engagement-suite-progress-bar.cjs.js +19 -0
  7. package/dist/cjs/index-7f32df08.js +1145 -0
  8. package/dist/cjs/index.cjs.js +2 -0
  9. package/dist/cjs/loader.cjs.js +21 -0
  10. package/dist/collection/collection-manifest.json +12 -0
  11. package/dist/collection/components/casino-engagement-suite-progress-bar/casino-engagement-suite-progress-bar.css +53 -0
  12. package/dist/collection/components/casino-engagement-suite-progress-bar/casino-engagement-suite-progress-bar.js +154 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/components/casino-engagement-suite-progress-bar.d.ts +11 -0
  15. package/dist/components/casino-engagement-suite-progress-bar.js +91 -0
  16. package/dist/components/index.d.ts +26 -0
  17. package/dist/components/index.js +1 -0
  18. package/dist/esm/casino-engagement-suite-progress-bar.entry.js +67 -0
  19. package/dist/esm/casino-engagement-suite-progress-bar.js +17 -0
  20. package/dist/esm/index-5b84ef46.js +1119 -0
  21. package/dist/esm/index.js +1 -0
  22. package/dist/esm/loader.js +17 -0
  23. package/dist/esm/polyfills/core-js.js +11 -0
  24. package/dist/esm/polyfills/css-shim.js +1 -0
  25. package/dist/esm/polyfills/dom.js +79 -0
  26. package/dist/esm/polyfills/es5-html-element.js +1 -0
  27. package/dist/esm/polyfills/index.js +34 -0
  28. package/dist/esm/polyfills/system.js +6 -0
  29. package/dist/index.cjs.js +1 -0
  30. package/dist/index.js +1 -0
  31. package/dist/stencil.config.js +22 -0
  32. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-progress-bar/.stencil/packages/casino-engagement-suite-progress-bar/stencil.config.d.ts +2 -0
  33. package/dist/types/components/casino-engagement-suite-progress-bar/casino-engagement-suite-progress-bar.d.ts +29 -0
  34. package/dist/types/components.d.ts +69 -0
  35. package/dist/types/index.d.ts +1 -0
  36. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  37. package/loader/cdn.js +3 -0
  38. package/loader/index.cjs.js +3 -0
  39. package/loader/index.d.ts +12 -0
  40. package/loader/index.es2017.js +3 -0
  41. package/loader/index.js +4 -0
  42. package/loader/package.json +10 -0
  43. package/package.json +19 -0
@@ -0,0 +1,1119 @@
1
+ const NAMESPACE = 'casino-engagement-suite-progress-bar';
2
+
3
+ let scopeId;
4
+ let hostTagName;
5
+ let isSvgMode = false;
6
+ let queuePending = false;
7
+ const win = typeof window !== 'undefined' ? window : {};
8
+ const doc = win.document || { head: {} };
9
+ const plt = {
10
+ $flags$: 0,
11
+ $resourcesUrl$: '',
12
+ jmp: (h) => h(),
13
+ raf: (h) => requestAnimationFrame(h),
14
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
15
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
16
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
17
+ };
18
+ const promiseResolve = (v) => Promise.resolve(v);
19
+ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
20
+ try {
21
+ new CSSStyleSheet();
22
+ return typeof new CSSStyleSheet().replace === 'function';
23
+ }
24
+ catch (e) { }
25
+ return false;
26
+ })()
27
+ ;
28
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
29
+ const createTime = (fnName, tagName = '') => {
30
+ {
31
+ return () => {
32
+ return;
33
+ };
34
+ }
35
+ };
36
+ const uniqueTime = (key, measureText) => {
37
+ {
38
+ return () => {
39
+ return;
40
+ };
41
+ }
42
+ };
43
+ const rootAppliedStyles = new WeakMap();
44
+ const registerStyle = (scopeId, cssText, allowCS) => {
45
+ let style = styles.get(scopeId);
46
+ if (supportsConstructibleStylesheets && allowCS) {
47
+ style = (style || new CSSStyleSheet());
48
+ style.replace(cssText);
49
+ }
50
+ else {
51
+ style = cssText;
52
+ }
53
+ styles.set(scopeId, style);
54
+ };
55
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
56
+ let scopeId = getScopeId(cmpMeta);
57
+ let style = styles.get(scopeId);
58
+ // if an element is NOT connected then getRootNode() will return the wrong root node
59
+ // so the fallback is to always use the document for the root node in those cases
60
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
61
+ if (style) {
62
+ if (typeof style === 'string') {
63
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
64
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
65
+ let styleElm;
66
+ if (!appliedStyles) {
67
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
68
+ }
69
+ if (!appliedStyles.has(scopeId)) {
70
+ {
71
+ {
72
+ styleElm = doc.createElement('style');
73
+ styleElm.innerHTML = style;
74
+ }
75
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
76
+ }
77
+ if (appliedStyles) {
78
+ appliedStyles.add(scopeId);
79
+ }
80
+ }
81
+ }
82
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
83
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
84
+ }
85
+ }
86
+ return scopeId;
87
+ };
88
+ const attachStyles = (hostRef) => {
89
+ const cmpMeta = hostRef.$cmpMeta$;
90
+ const elm = hostRef.$hostElement$;
91
+ const flags = cmpMeta.$flags$;
92
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
93
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
94
+ if (flags & 10 /* needsScopedEncapsulation */) {
95
+ // only required when we're NOT using native shadow dom (slot)
96
+ // or this browser doesn't support native shadow dom
97
+ // and this host element was NOT created with SSR
98
+ // let's pick out the inner content for slot projection
99
+ // create a node to represent where the original
100
+ // content was first placed, which is useful later on
101
+ // DOM WRITE!!
102
+ elm['s-sc'] = scopeId;
103
+ elm.classList.add(scopeId + '-h');
104
+ }
105
+ endAttachStyles();
106
+ };
107
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
108
+ /**
109
+ * Default style mode id
110
+ */
111
+ /**
112
+ * Reusable empty obj/array
113
+ * Don't add values to these!!
114
+ */
115
+ const EMPTY_OBJ = {};
116
+ const isDef = (v) => v != null;
117
+ const isComplexType = (o) => {
118
+ // https://jsperf.com/typeof-fn-object/5
119
+ o = typeof o;
120
+ return o === 'object' || o === 'function';
121
+ };
122
+ /**
123
+ * Production h() function based on Preact by
124
+ * Jason Miller (@developit)
125
+ * Licensed under the MIT License
126
+ * https://github.com/developit/preact/blob/master/LICENSE
127
+ *
128
+ * Modified for Stencil's compiler and vdom
129
+ */
130
+ // const stack: any[] = [];
131
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
132
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
133
+ const h = (nodeName, vnodeData, ...children) => {
134
+ let child = null;
135
+ let simple = false;
136
+ let lastSimple = false;
137
+ let vNodeChildren = [];
138
+ const walk = (c) => {
139
+ for (let i = 0; i < c.length; i++) {
140
+ child = c[i];
141
+ if (Array.isArray(child)) {
142
+ walk(child);
143
+ }
144
+ else if (child != null && typeof child !== 'boolean') {
145
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
146
+ child = String(child);
147
+ }
148
+ if (simple && lastSimple) {
149
+ // If the previous child was simple (string), we merge both
150
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
151
+ }
152
+ else {
153
+ // Append a new vNode, if it's text, we create a text vNode
154
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
155
+ }
156
+ lastSimple = simple;
157
+ }
158
+ }
159
+ };
160
+ walk(children);
161
+ if (vnodeData) {
162
+ {
163
+ const classData = vnodeData.className || vnodeData.class;
164
+ if (classData) {
165
+ vnodeData.class =
166
+ typeof classData !== 'object'
167
+ ? classData
168
+ : Object.keys(classData)
169
+ .filter((k) => classData[k])
170
+ .join(' ');
171
+ }
172
+ }
173
+ }
174
+ const vnode = newVNode(nodeName, null);
175
+ vnode.$attrs$ = vnodeData;
176
+ if (vNodeChildren.length > 0) {
177
+ vnode.$children$ = vNodeChildren;
178
+ }
179
+ return vnode;
180
+ };
181
+ const newVNode = (tag, text) => {
182
+ const vnode = {
183
+ $flags$: 0,
184
+ $tag$: tag,
185
+ $text$: text,
186
+ $elm$: null,
187
+ $children$: null,
188
+ };
189
+ {
190
+ vnode.$attrs$ = null;
191
+ }
192
+ return vnode;
193
+ };
194
+ const Host = {};
195
+ const isHost = (node) => node && node.$tag$ === Host;
196
+ /**
197
+ * Production setAccessor() function based on Preact by
198
+ * Jason Miller (@developit)
199
+ * Licensed under the MIT License
200
+ * https://github.com/developit/preact/blob/master/LICENSE
201
+ *
202
+ * Modified for Stencil's compiler and vdom
203
+ */
204
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
205
+ if (oldValue !== newValue) {
206
+ let isProp = isMemberInElement(elm, memberName);
207
+ memberName.toLowerCase();
208
+ if (memberName === 'class') {
209
+ const classList = elm.classList;
210
+ const oldClasses = parseClassList(oldValue);
211
+ const newClasses = parseClassList(newValue);
212
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
213
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
214
+ }
215
+ else if (memberName === 'style') {
216
+ // update style attribute, css properties and values
217
+ {
218
+ for (const prop in oldValue) {
219
+ if (!newValue || newValue[prop] == null) {
220
+ if (prop.includes('-')) {
221
+ elm.style.removeProperty(prop);
222
+ }
223
+ else {
224
+ elm.style[prop] = '';
225
+ }
226
+ }
227
+ }
228
+ }
229
+ for (const prop in newValue) {
230
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
231
+ if (prop.includes('-')) {
232
+ elm.style.setProperty(prop, newValue[prop]);
233
+ }
234
+ else {
235
+ elm.style[prop] = newValue[prop];
236
+ }
237
+ }
238
+ }
239
+ }
240
+ else {
241
+ // Set property if it exists and it's not a SVG
242
+ const isComplex = isComplexType(newValue);
243
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
244
+ try {
245
+ if (!elm.tagName.includes('-')) {
246
+ let n = newValue == null ? '' : newValue;
247
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
248
+ if (memberName === 'list') {
249
+ isProp = false;
250
+ }
251
+ else if (oldValue == null || elm[memberName] != n) {
252
+ elm[memberName] = n;
253
+ }
254
+ }
255
+ else {
256
+ elm[memberName] = newValue;
257
+ }
258
+ }
259
+ catch (e) { }
260
+ }
261
+ if (newValue == null || newValue === false) {
262
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
263
+ {
264
+ elm.removeAttribute(memberName);
265
+ }
266
+ }
267
+ }
268
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
269
+ newValue = newValue === true ? '' : newValue;
270
+ {
271
+ elm.setAttribute(memberName, newValue);
272
+ }
273
+ }
274
+ }
275
+ }
276
+ };
277
+ const parseClassListRegex = /\s/;
278
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
279
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
280
+ // if the element passed in is a shadow root, which is a document fragment
281
+ // then we want to be adding attrs/props to the shadow root's "host" element
282
+ // if it's not a shadow root, then we add attrs/props to the same element
283
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
284
+ ? newVnode.$elm$.host
285
+ : newVnode.$elm$;
286
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
287
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
288
+ {
289
+ // remove attributes no longer present on the vnode by setting them to undefined
290
+ for (memberName in oldVnodeAttrs) {
291
+ if (!(memberName in newVnodeAttrs)) {
292
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
293
+ }
294
+ }
295
+ }
296
+ // add new & update changed attributes
297
+ for (memberName in newVnodeAttrs) {
298
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
299
+ }
300
+ };
301
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
302
+ // tslint:disable-next-line: prefer-const
303
+ let newVNode = newParentVNode.$children$[childIndex];
304
+ let i = 0;
305
+ let elm;
306
+ let childNode;
307
+ if (newVNode.$text$ !== null) {
308
+ // create text node
309
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
310
+ }
311
+ else {
312
+ // create element
313
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
314
+ // add css classes, attrs, props, listeners, etc.
315
+ {
316
+ updateElement(null, newVNode, isSvgMode);
317
+ }
318
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
319
+ // if there is a scopeId and this is the initial render
320
+ // then let's add the scopeId as a css class
321
+ elm.classList.add((elm['s-si'] = scopeId));
322
+ }
323
+ if (newVNode.$children$) {
324
+ for (i = 0; i < newVNode.$children$.length; ++i) {
325
+ // create the node
326
+ childNode = createElm(oldParentVNode, newVNode, i);
327
+ // return node could have been null
328
+ if (childNode) {
329
+ // append our new node
330
+ elm.appendChild(childNode);
331
+ }
332
+ }
333
+ }
334
+ }
335
+ return elm;
336
+ };
337
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
338
+ let containerElm = (parentElm);
339
+ let childNode;
340
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
341
+ containerElm = containerElm.shadowRoot;
342
+ }
343
+ for (; startIdx <= endIdx; ++startIdx) {
344
+ if (vnodes[startIdx]) {
345
+ childNode = createElm(null, parentVNode, startIdx);
346
+ if (childNode) {
347
+ vnodes[startIdx].$elm$ = childNode;
348
+ containerElm.insertBefore(childNode, before);
349
+ }
350
+ }
351
+ }
352
+ };
353
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
354
+ for (; startIdx <= endIdx; ++startIdx) {
355
+ if ((vnode = vnodes[startIdx])) {
356
+ elm = vnode.$elm$;
357
+ // remove the vnode's element from the dom
358
+ elm.remove();
359
+ }
360
+ }
361
+ };
362
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
363
+ let oldStartIdx = 0;
364
+ let newStartIdx = 0;
365
+ let oldEndIdx = oldCh.length - 1;
366
+ let oldStartVnode = oldCh[0];
367
+ let oldEndVnode = oldCh[oldEndIdx];
368
+ let newEndIdx = newCh.length - 1;
369
+ let newStartVnode = newCh[0];
370
+ let newEndVnode = newCh[newEndIdx];
371
+ let node;
372
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
373
+ if (oldStartVnode == null) {
374
+ // Vnode might have been moved left
375
+ oldStartVnode = oldCh[++oldStartIdx];
376
+ }
377
+ else if (oldEndVnode == null) {
378
+ oldEndVnode = oldCh[--oldEndIdx];
379
+ }
380
+ else if (newStartVnode == null) {
381
+ newStartVnode = newCh[++newStartIdx];
382
+ }
383
+ else if (newEndVnode == null) {
384
+ newEndVnode = newCh[--newEndIdx];
385
+ }
386
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
387
+ patch(oldStartVnode, newStartVnode);
388
+ oldStartVnode = oldCh[++oldStartIdx];
389
+ newStartVnode = newCh[++newStartIdx];
390
+ }
391
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
392
+ patch(oldEndVnode, newEndVnode);
393
+ oldEndVnode = oldCh[--oldEndIdx];
394
+ newEndVnode = newCh[--newEndIdx];
395
+ }
396
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
397
+ patch(oldStartVnode, newEndVnode);
398
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
399
+ oldStartVnode = oldCh[++oldStartIdx];
400
+ newEndVnode = newCh[--newEndIdx];
401
+ }
402
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
403
+ patch(oldEndVnode, newStartVnode);
404
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
405
+ oldEndVnode = oldCh[--oldEndIdx];
406
+ newStartVnode = newCh[++newStartIdx];
407
+ }
408
+ else {
409
+ {
410
+ // new element
411
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
412
+ newStartVnode = newCh[++newStartIdx];
413
+ }
414
+ if (node) {
415
+ {
416
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
417
+ }
418
+ }
419
+ }
420
+ }
421
+ if (oldStartIdx > oldEndIdx) {
422
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
423
+ }
424
+ else if (newStartIdx > newEndIdx) {
425
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
426
+ }
427
+ };
428
+ const isSameVnode = (vnode1, vnode2) => {
429
+ // compare if two vnode to see if they're "technically" the same
430
+ // need to have the same element tag, and same key to be the same
431
+ if (vnode1.$tag$ === vnode2.$tag$) {
432
+ return true;
433
+ }
434
+ return false;
435
+ };
436
+ const patch = (oldVNode, newVNode) => {
437
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
438
+ const oldChildren = oldVNode.$children$;
439
+ const newChildren = newVNode.$children$;
440
+ const tag = newVNode.$tag$;
441
+ const text = newVNode.$text$;
442
+ if (text === null) {
443
+ // element node
444
+ {
445
+ if (tag === 'slot')
446
+ ;
447
+ else {
448
+ // either this is the first render of an element OR it's an update
449
+ // AND we already know it's possible it could have changed
450
+ // this updates the element's css classes, attrs, props, listeners, etc.
451
+ updateElement(oldVNode, newVNode, isSvgMode);
452
+ }
453
+ }
454
+ if (oldChildren !== null && newChildren !== null) {
455
+ // looks like there's child vnodes for both the old and new vnodes
456
+ updateChildren(elm, oldChildren, newVNode, newChildren);
457
+ }
458
+ else if (newChildren !== null) {
459
+ // no old child vnodes, but there are new child vnodes to add
460
+ if (oldVNode.$text$ !== null) {
461
+ // the old vnode was text, so be sure to clear it out
462
+ elm.textContent = '';
463
+ }
464
+ // add the new vnode children
465
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
466
+ }
467
+ else if (oldChildren !== null) {
468
+ // no new child vnodes, but there are old child vnodes to remove
469
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
470
+ }
471
+ }
472
+ else if (oldVNode.$text$ !== text) {
473
+ // update the text content for the text only vnode
474
+ // and also only if the text is different than before
475
+ elm.data = text;
476
+ }
477
+ };
478
+ const renderVdom = (hostRef, renderFnResults) => {
479
+ const hostElm = hostRef.$hostElement$;
480
+ const cmpMeta = hostRef.$cmpMeta$;
481
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
482
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
483
+ hostTagName = hostElm.tagName;
484
+ if (cmpMeta.$attrsToReflect$) {
485
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
486
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
487
+ }
488
+ rootVnode.$tag$ = null;
489
+ rootVnode.$flags$ |= 4 /* isHost */;
490
+ hostRef.$vnode$ = rootVnode;
491
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
492
+ {
493
+ scopeId = hostElm['s-sc'];
494
+ }
495
+ // synchronous patch
496
+ patch(oldVNode, rootVnode);
497
+ };
498
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
499
+ /**
500
+ * Helper function to create & dispatch a custom Event on a provided target
501
+ * @param elm the target of the Event
502
+ * @param name the name to give the custom Event
503
+ * @param opts options for configuring a custom Event
504
+ * @returns the custom Event
505
+ */
506
+ const emitEvent = (elm, name, opts) => {
507
+ const ev = plt.ce(name, opts);
508
+ elm.dispatchEvent(ev);
509
+ return ev;
510
+ };
511
+ const attachToAncestor = (hostRef, ancestorComponent) => {
512
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
513
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
514
+ }
515
+ };
516
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
517
+ {
518
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
519
+ }
520
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
521
+ hostRef.$flags$ |= 512 /* needsRerender */;
522
+ return;
523
+ }
524
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
525
+ // there is no ancestor component or the ancestor component
526
+ // has already fired off its lifecycle update then
527
+ // fire off the initial update
528
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
529
+ return writeTask(dispatch) ;
530
+ };
531
+ const dispatchHooks = (hostRef, isInitialLoad) => {
532
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
533
+ const instance = hostRef.$lazyInstance$ ;
534
+ let promise;
535
+ endSchedule();
536
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
537
+ };
538
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
539
+ // updateComponent
540
+ const elm = hostRef.$hostElement$;
541
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
542
+ const rc = elm['s-rc'];
543
+ if (isInitialLoad) {
544
+ // DOM WRITE!
545
+ attachStyles(hostRef);
546
+ }
547
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
548
+ {
549
+ callRender(hostRef, instance);
550
+ }
551
+ if (rc) {
552
+ // ok, so turns out there are some child host elements
553
+ // waiting on this parent element to load
554
+ // let's fire off all update callbacks waiting
555
+ rc.map((cb) => cb());
556
+ elm['s-rc'] = undefined;
557
+ }
558
+ endRender();
559
+ endUpdate();
560
+ {
561
+ const childrenPromises = elm['s-p'];
562
+ const postUpdate = () => postUpdateComponent(hostRef);
563
+ if (childrenPromises.length === 0) {
564
+ postUpdate();
565
+ }
566
+ else {
567
+ Promise.all(childrenPromises).then(postUpdate);
568
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
569
+ childrenPromises.length = 0;
570
+ }
571
+ }
572
+ };
573
+ const callRender = (hostRef, instance, elm) => {
574
+ try {
575
+ instance = instance.render() ;
576
+ {
577
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
578
+ }
579
+ {
580
+ hostRef.$flags$ |= 2 /* hasRendered */;
581
+ }
582
+ {
583
+ {
584
+ // looks like we've got child nodes to render into this host element
585
+ // or we need to update the css class/attrs on the host element
586
+ // DOM WRITE!
587
+ {
588
+ renderVdom(hostRef, instance);
589
+ }
590
+ }
591
+ }
592
+ }
593
+ catch (e) {
594
+ consoleError(e, hostRef.$hostElement$);
595
+ }
596
+ return null;
597
+ };
598
+ const postUpdateComponent = (hostRef) => {
599
+ const tagName = hostRef.$cmpMeta$.$tagName$;
600
+ const elm = hostRef.$hostElement$;
601
+ const endPostUpdate = createTime('postUpdate', tagName);
602
+ const instance = hostRef.$lazyInstance$ ;
603
+ const ancestorComponent = hostRef.$ancestorComponent$;
604
+ {
605
+ safeCall(instance, 'componentDidRender');
606
+ }
607
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
608
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
609
+ {
610
+ // DOM WRITE!
611
+ addHydratedFlag(elm);
612
+ }
613
+ endPostUpdate();
614
+ {
615
+ hostRef.$onReadyResolve$(elm);
616
+ if (!ancestorComponent) {
617
+ appDidLoad();
618
+ }
619
+ }
620
+ }
621
+ else {
622
+ endPostUpdate();
623
+ }
624
+ // load events fire from bottom to top
625
+ // the deepest elements load first then bubbles up
626
+ {
627
+ if (hostRef.$onRenderResolve$) {
628
+ hostRef.$onRenderResolve$();
629
+ hostRef.$onRenderResolve$ = undefined;
630
+ }
631
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
632
+ nextTick(() => scheduleUpdate(hostRef, false));
633
+ }
634
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
635
+ }
636
+ // ( •_•)
637
+ // ( •_•)>⌐■-■
638
+ // (⌐■_■)
639
+ };
640
+ const appDidLoad = (who) => {
641
+ // on appload
642
+ // we have finish the first big initial render
643
+ {
644
+ addHydratedFlag(doc.documentElement);
645
+ }
646
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
647
+ };
648
+ const safeCall = (instance, method, arg) => {
649
+ if (instance && instance[method]) {
650
+ try {
651
+ return instance[method](arg);
652
+ }
653
+ catch (e) {
654
+ consoleError(e);
655
+ }
656
+ }
657
+ return undefined;
658
+ };
659
+ const then = (promise, thenFn) => {
660
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
661
+ };
662
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
663
+ ;
664
+ /**
665
+ * Parse a new property value for a given property type.
666
+ *
667
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
668
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
669
+ * 1. `any`, the type given to `propValue` in the function signature
670
+ * 2. the type stored from `propType`.
671
+ *
672
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
673
+ *
674
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
675
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
676
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
677
+ * ```tsx
678
+ * <my-cmp prop-val={0}></my-cmp>
679
+ * ```
680
+ *
681
+ * HTML prop values on the other hand, will always a string
682
+ *
683
+ * @param propValue the new value to coerce to some type
684
+ * @param propType the type of the prop, expressed as a binary number
685
+ * @returns the parsed/coerced value
686
+ */
687
+ const parsePropertyValue = (propValue, propType) => {
688
+ // ensure this value is of the correct prop type
689
+ if (propValue != null && !isComplexType(propValue)) {
690
+ if (propType & 4 /* Boolean */) {
691
+ // per the HTML spec, any string value means it is a boolean true value
692
+ // but we'll cheat here and say that the string "false" is the boolean false
693
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
694
+ }
695
+ if (propType & 2 /* Number */) {
696
+ // force it to be a number
697
+ return parseFloat(propValue);
698
+ }
699
+ if (propType & 1 /* String */) {
700
+ // could have been passed as a number or boolean
701
+ // but we still want it as a string
702
+ return String(propValue);
703
+ }
704
+ // redundant return here for better minification
705
+ return propValue;
706
+ }
707
+ // not sure exactly what type we want
708
+ // so no need to change to a different type
709
+ return propValue;
710
+ };
711
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
712
+ const setValue = (ref, propName, newVal, cmpMeta) => {
713
+ // check our new property value against our internal value
714
+ const hostRef = getHostRef(ref);
715
+ const oldVal = hostRef.$instanceValues$.get(propName);
716
+ const flags = hostRef.$flags$;
717
+ const instance = hostRef.$lazyInstance$ ;
718
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
719
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
720
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
721
+ const didValueChange = newVal !== oldVal && !areBothNaN;
722
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
723
+ // gadzooks! the property's value has changed!!
724
+ // set our new value!
725
+ hostRef.$instanceValues$.set(propName, newVal);
726
+ if (instance) {
727
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
728
+ // looks like this value actually changed, so we've got work to do!
729
+ // but only if we've already rendered, otherwise just chill out
730
+ // queue that we need to do an update, but don't worry about queuing
731
+ // up millions cuz this function ensures it only runs once
732
+ scheduleUpdate(hostRef, false);
733
+ }
734
+ }
735
+ }
736
+ };
737
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
738
+ if (cmpMeta.$members$) {
739
+ // It's better to have a const than two Object.entries()
740
+ const members = Object.entries(cmpMeta.$members$);
741
+ const prototype = Cstr.prototype;
742
+ members.map(([memberName, [memberFlags]]) => {
743
+ if ((memberFlags & 31 /* Prop */ ||
744
+ ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
745
+ // proxyComponent - prop
746
+ Object.defineProperty(prototype, memberName, {
747
+ get() {
748
+ // proxyComponent, get value
749
+ return getValue(this, memberName);
750
+ },
751
+ set(newValue) {
752
+ // proxyComponent, set value
753
+ setValue(this, memberName, newValue, cmpMeta);
754
+ },
755
+ configurable: true,
756
+ enumerable: true,
757
+ });
758
+ }
759
+ });
760
+ if ((flags & 1 /* isElementConstructor */)) {
761
+ const attrNameToPropName = new Map();
762
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
763
+ plt.jmp(() => {
764
+ const propName = attrNameToPropName.get(attrName);
765
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
766
+ // in the case where an attribute was set inline.
767
+ // ```html
768
+ // <my-component some-attribute="some-value"></my-component>
769
+ // ```
770
+ //
771
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
772
+ // programmatically changes it before it has been upgraded as shown below:
773
+ //
774
+ // ```html
775
+ // <!-- this component has _not_ been upgraded yet -->
776
+ // <my-component id="test" some-attribute="some-value"></my-component>
777
+ // <script>
778
+ // // grab non-upgraded component
779
+ // el = document.querySelector("#test");
780
+ // el.someAttribute = "another-value";
781
+ // // upgrade component
782
+ // customElements.define('my-component', MyComponent);
783
+ // </script>
784
+ // ```
785
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
786
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
787
+ // to the value that was set inline i.e. "some-value" from above example. When
788
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
789
+ //
790
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
791
+ // by connectedCallback as this attributeChangedCallback will not fire.
792
+ //
793
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
794
+ //
795
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
796
+ // properties here given that this goes against best practices outlined here
797
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
798
+ if (this.hasOwnProperty(propName)) {
799
+ newValue = this[propName];
800
+ delete this[propName];
801
+ }
802
+ else if (prototype.hasOwnProperty(propName) &&
803
+ typeof this[propName] === 'number' &&
804
+ this[propName] == newValue) {
805
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
806
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
807
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
808
+ return;
809
+ }
810
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
811
+ });
812
+ };
813
+ // create an array of attributes to observe
814
+ // and also create a map of html attribute name to js property name
815
+ Cstr.observedAttributes = members
816
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
817
+ .map(([propName, m]) => {
818
+ const attrName = m[1] || propName;
819
+ attrNameToPropName.set(attrName, propName);
820
+ if (m[0] & 512 /* ReflectAttr */) {
821
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
822
+ }
823
+ return attrName;
824
+ });
825
+ }
826
+ }
827
+ return Cstr;
828
+ };
829
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
830
+ // initializeComponent
831
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
832
+ {
833
+ // we haven't initialized this element yet
834
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
835
+ // lazy loaded components
836
+ // request the component's implementation to be
837
+ // wired up with the host element
838
+ Cstr = loadModule(cmpMeta);
839
+ if (Cstr.then) {
840
+ // Await creates a micro-task avoid if possible
841
+ const endLoad = uniqueTime();
842
+ Cstr = await Cstr;
843
+ endLoad();
844
+ }
845
+ if (!Cstr.isProxied) {
846
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
847
+ Cstr.isProxied = true;
848
+ }
849
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
850
+ // ok, time to construct the instance
851
+ // but let's keep track of when we start and stop
852
+ // so that the getters/setters don't incorrectly step on data
853
+ {
854
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
855
+ }
856
+ // construct the lazy-loaded component implementation
857
+ // passing the hostRef is very important during
858
+ // construction in order to directly wire together the
859
+ // host element and the lazy-loaded instance
860
+ try {
861
+ new Cstr(hostRef);
862
+ }
863
+ catch (e) {
864
+ consoleError(e);
865
+ }
866
+ {
867
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
868
+ }
869
+ endNewInstance();
870
+ }
871
+ if (Cstr.style) {
872
+ // this component has styles but we haven't registered them yet
873
+ let style = Cstr.style;
874
+ const scopeId = getScopeId(cmpMeta);
875
+ if (!styles.has(scopeId)) {
876
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
877
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
878
+ endRegisterStyles();
879
+ }
880
+ }
881
+ }
882
+ // we've successfully created a lazy instance
883
+ const ancestorComponent = hostRef.$ancestorComponent$;
884
+ const schedule = () => scheduleUpdate(hostRef, true);
885
+ if (ancestorComponent && ancestorComponent['s-rc']) {
886
+ // this is the initial load and this component it has an ancestor component
887
+ // but the ancestor component has NOT fired its will update lifecycle yet
888
+ // so let's just cool our jets and wait for the ancestor to continue first
889
+ // this will get fired off when the ancestor component
890
+ // finally gets around to rendering its lazy self
891
+ // fire off the initial update
892
+ ancestorComponent['s-rc'].push(schedule);
893
+ }
894
+ else {
895
+ schedule();
896
+ }
897
+ };
898
+ const connectedCallback = (elm) => {
899
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
900
+ const hostRef = getHostRef(elm);
901
+ const cmpMeta = hostRef.$cmpMeta$;
902
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
903
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
904
+ // first time this component has connected
905
+ hostRef.$flags$ |= 1 /* hasConnected */;
906
+ {
907
+ // find the first ancestor component (if there is one) and register
908
+ // this component as one of the actively loading child components for its ancestor
909
+ let ancestorComponent = elm;
910
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
911
+ // climb up the ancestors looking for the first
912
+ // component that hasn't finished its lifecycle update yet
913
+ if (ancestorComponent['s-p']) {
914
+ // we found this components first ancestor component
915
+ // keep a reference to this component's ancestor component
916
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
917
+ break;
918
+ }
919
+ }
920
+ }
921
+ // Lazy properties
922
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
923
+ if (cmpMeta.$members$) {
924
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
925
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
926
+ const value = elm[memberName];
927
+ delete elm[memberName];
928
+ elm[memberName] = value;
929
+ }
930
+ });
931
+ }
932
+ {
933
+ initializeComponent(elm, hostRef, cmpMeta);
934
+ }
935
+ }
936
+ endConnected();
937
+ }
938
+ };
939
+ const disconnectedCallback = (elm) => {
940
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
941
+ getHostRef(elm);
942
+ }
943
+ };
944
+ const bootstrapLazy = (lazyBundles, options = {}) => {
945
+ const endBootstrap = createTime();
946
+ const cmpTags = [];
947
+ const exclude = options.exclude || [];
948
+ const customElements = win.customElements;
949
+ const head = doc.head;
950
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
951
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
952
+ const deferredConnectedCallbacks = [];
953
+ let appLoadFallback;
954
+ let isBootstrapping = true;
955
+ Object.assign(plt, options);
956
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
957
+ lazyBundles.map((lazyBundle) => {
958
+ lazyBundle[1].map((compactMeta) => {
959
+ const cmpMeta = {
960
+ $flags$: compactMeta[0],
961
+ $tagName$: compactMeta[1],
962
+ $members$: compactMeta[2],
963
+ $listeners$: compactMeta[3],
964
+ };
965
+ {
966
+ cmpMeta.$members$ = compactMeta[2];
967
+ }
968
+ {
969
+ cmpMeta.$attrsToReflect$ = [];
970
+ }
971
+ const tagName = cmpMeta.$tagName$;
972
+ const HostElement = class extends HTMLElement {
973
+ // StencilLazyHost
974
+ constructor(self) {
975
+ // @ts-ignore
976
+ super(self);
977
+ self = this;
978
+ registerHost(self, cmpMeta);
979
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
980
+ // this component is using shadow dom
981
+ // and this browser supports shadow dom
982
+ // add the read-only property "shadowRoot" to the host element
983
+ // adding the shadow root build conditionals to minimize runtime
984
+ {
985
+ {
986
+ self.attachShadow({ mode: 'open' });
987
+ }
988
+ }
989
+ }
990
+ }
991
+ connectedCallback() {
992
+ if (appLoadFallback) {
993
+ clearTimeout(appLoadFallback);
994
+ appLoadFallback = null;
995
+ }
996
+ if (isBootstrapping) {
997
+ // connectedCallback will be processed once all components have been registered
998
+ deferredConnectedCallbacks.push(this);
999
+ }
1000
+ else {
1001
+ plt.jmp(() => connectedCallback(this));
1002
+ }
1003
+ }
1004
+ disconnectedCallback() {
1005
+ plt.jmp(() => disconnectedCallback(this));
1006
+ }
1007
+ componentOnReady() {
1008
+ return getHostRef(this).$onReadyPromise$;
1009
+ }
1010
+ };
1011
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1012
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1013
+ cmpTags.push(tagName);
1014
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1015
+ }
1016
+ });
1017
+ });
1018
+ {
1019
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1020
+ visibilityStyle.setAttribute('data-styles', '');
1021
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1022
+ }
1023
+ // Process deferred connectedCallbacks now all components have been registered
1024
+ isBootstrapping = false;
1025
+ if (deferredConnectedCallbacks.length) {
1026
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1027
+ }
1028
+ else {
1029
+ {
1030
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1031
+ }
1032
+ }
1033
+ // Fallback appLoad event
1034
+ endBootstrap();
1035
+ };
1036
+ const hostRefs = new WeakMap();
1037
+ const getHostRef = (ref) => hostRefs.get(ref);
1038
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1039
+ const registerHost = (elm, cmpMeta) => {
1040
+ const hostRef = {
1041
+ $flags$: 0,
1042
+ $hostElement$: elm,
1043
+ $cmpMeta$: cmpMeta,
1044
+ $instanceValues$: new Map(),
1045
+ };
1046
+ {
1047
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1048
+ elm['s-p'] = [];
1049
+ elm['s-rc'] = [];
1050
+ }
1051
+ return hostRefs.set(elm, hostRef);
1052
+ };
1053
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1054
+ const consoleError = (e, el) => (0, console.error)(e, el);
1055
+ const cmpModules = /*@__PURE__*/ new Map();
1056
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1057
+ // loadModuleImport
1058
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1059
+ const bundleId = cmpMeta.$lazyBundleId$;
1060
+ const module = cmpModules.get(bundleId) ;
1061
+ if (module) {
1062
+ return module[exportName];
1063
+ }
1064
+ return import(
1065
+ /* webpackInclude: /\.entry\.js$/ */
1066
+ /* webpackExclude: /\.system\.entry\.js$/ */
1067
+ /* webpackMode: "lazy" */
1068
+ `./${bundleId}.entry.js${''}`).then((importedModule) => {
1069
+ {
1070
+ cmpModules.set(bundleId, importedModule);
1071
+ }
1072
+ return importedModule[exportName];
1073
+ }, consoleError);
1074
+ };
1075
+ const styles = new Map();
1076
+ const queueDomReads = [];
1077
+ const queueDomWrites = [];
1078
+ const queueTask = (queue, write) => (cb) => {
1079
+ queue.push(cb);
1080
+ if (!queuePending) {
1081
+ queuePending = true;
1082
+ if (write && plt.$flags$ & 4 /* queueSync */) {
1083
+ nextTick(flush);
1084
+ }
1085
+ else {
1086
+ plt.raf(flush);
1087
+ }
1088
+ }
1089
+ };
1090
+ const consume = (queue) => {
1091
+ for (let i = 0; i < queue.length; i++) {
1092
+ try {
1093
+ queue[i](performance.now());
1094
+ }
1095
+ catch (e) {
1096
+ consoleError(e);
1097
+ }
1098
+ }
1099
+ queue.length = 0;
1100
+ };
1101
+ const flush = () => {
1102
+ // always force a bunch of medium callbacks to run, but still have
1103
+ // a throttle on how many can run in a certain time
1104
+ // DOM READS!!!
1105
+ consume(queueDomReads);
1106
+ // DOM WRITES!!!
1107
+ {
1108
+ consume(queueDomWrites);
1109
+ if ((queuePending = queueDomReads.length > 0)) {
1110
+ // still more to do yet, but we've run out of time
1111
+ // let's let this thing cool off and try again in the next tick
1112
+ plt.raf(flush);
1113
+ }
1114
+ }
1115
+ };
1116
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1117
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1118
+
1119
+ export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };