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