@everymatrix/lottery-bullet 0.1.24 → 1.0.70

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