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