jebamo 0.0.2 → 0.0.3

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 (145) hide show
  1. package/package.json +2 -2
  2. package/dist/components/index.d.ts +0 -33
  3. package/dist/components/index.js +0 -3
  4. package/dist/components/index.js.map +0 -1
  5. package/dist/components/je-alert.d.ts +0 -11
  6. package/dist/components/je-alert.js +0 -146
  7. package/dist/components/je-alert.js.map +0 -1
  8. package/dist/components/je-branch.d.ts +0 -11
  9. package/dist/components/je-branch.js +0 -37
  10. package/dist/components/je-branch.js.map +0 -1
  11. package/dist/components/je-button.d.ts +0 -11
  12. package/dist/components/je-button.js +0 -8
  13. package/dist/components/je-button.js.map +0 -1
  14. package/dist/components/je-card.d.ts +0 -11
  15. package/dist/components/je-card.js +0 -8
  16. package/dist/components/je-card.js.map +0 -1
  17. package/dist/components/je-checkbox-group.d.ts +0 -11
  18. package/dist/components/je-checkbox-group.js +0 -90
  19. package/dist/components/je-checkbox-group.js.map +0 -1
  20. package/dist/components/je-checkbox-option.d.ts +0 -11
  21. package/dist/components/je-checkbox-option.js +0 -65
  22. package/dist/components/je-checkbox-option.js.map +0 -1
  23. package/dist/components/je-checkbox.d.ts +0 -11
  24. package/dist/components/je-checkbox.js +0 -83
  25. package/dist/components/je-checkbox.js.map +0 -1
  26. package/dist/components/je-color.d.ts +0 -11
  27. package/dist/components/je-color.js +0 -8
  28. package/dist/components/je-color.js.map +0 -1
  29. package/dist/components/je-column-group.d.ts +0 -11
  30. package/dist/components/je-column-group.js +0 -46
  31. package/dist/components/je-column-group.js.map +0 -1
  32. package/dist/components/je-column.d.ts +0 -11
  33. package/dist/components/je-column.js +0 -95
  34. package/dist/components/je-column.js.map +0 -1
  35. package/dist/components/je-datepicker.d.ts +0 -11
  36. package/dist/components/je-datepicker.js +0 -3249
  37. package/dist/components/je-datepicker.js.map +0 -1
  38. package/dist/components/je-details.d.ts +0 -11
  39. package/dist/components/je-details.js +0 -49
  40. package/dist/components/je-details.js.map +0 -1
  41. package/dist/components/je-divider.d.ts +0 -11
  42. package/dist/components/je-divider.js +0 -42
  43. package/dist/components/je-divider.js.map +0 -1
  44. package/dist/components/je-drawer.d.ts +0 -11
  45. package/dist/components/je-drawer.js +0 -60
  46. package/dist/components/je-drawer.js.map +0 -1
  47. package/dist/components/je-dropzone.d.ts +0 -11
  48. package/dist/components/je-dropzone.js +0 -55
  49. package/dist/components/je-dropzone.js.map +0 -1
  50. package/dist/components/je-form.d.ts +0 -11
  51. package/dist/components/je-form.js +0 -8
  52. package/dist/components/je-form.js.map +0 -1
  53. package/dist/components/je-icon.d.ts +0 -11
  54. package/dist/components/je-icon.js +0 -8
  55. package/dist/components/je-icon.js.map +0 -1
  56. package/dist/components/je-infinite.d.ts +0 -11
  57. package/dist/components/je-infinite.js +0 -64
  58. package/dist/components/je-infinite.js.map +0 -1
  59. package/dist/components/je-input.d.ts +0 -11
  60. package/dist/components/je-input.js +0 -8
  61. package/dist/components/je-input.js.map +0 -1
  62. package/dist/components/je-link.d.ts +0 -11
  63. package/dist/components/je-link.js +0 -62
  64. package/dist/components/je-link.js.map +0 -1
  65. package/dist/components/je-loading.d.ts +0 -11
  66. package/dist/components/je-loading.js +0 -66
  67. package/dist/components/je-loading.js.map +0 -1
  68. package/dist/components/je-menu-option.d.ts +0 -11
  69. package/dist/components/je-menu-option.js +0 -37
  70. package/dist/components/je-menu-option.js.map +0 -1
  71. package/dist/components/je-menu.d.ts +0 -11
  72. package/dist/components/je-menu.js +0 -37
  73. package/dist/components/je-menu.js.map +0 -1
  74. package/dist/components/je-modal.d.ts +0 -11
  75. package/dist/components/je-modal.js +0 -104
  76. package/dist/components/je-modal.js.map +0 -1
  77. package/dist/components/je-multiselect-option.d.ts +0 -11
  78. package/dist/components/je-multiselect-option.js +0 -62
  79. package/dist/components/je-multiselect-option.js.map +0 -1
  80. package/dist/components/je-multiselect.d.ts +0 -11
  81. package/dist/components/je-multiselect.js +0 -146
  82. package/dist/components/je-multiselect.js.map +0 -1
  83. package/dist/components/je-page.d.ts +0 -11
  84. package/dist/components/je-page.js +0 -61
  85. package/dist/components/je-page.js.map +0 -1
  86. package/dist/components/je-pill.d.ts +0 -11
  87. package/dist/components/je-pill.js +0 -8
  88. package/dist/components/je-pill.js.map +0 -1
  89. package/dist/components/je-placeholder.d.ts +0 -11
  90. package/dist/components/je-placeholder.js +0 -40
  91. package/dist/components/je-placeholder.js.map +0 -1
  92. package/dist/components/je-popover.d.ts +0 -11
  93. package/dist/components/je-popover.js +0 -8
  94. package/dist/components/je-popover.js.map +0 -1
  95. package/dist/components/je-radio-group.d.ts +0 -11
  96. package/dist/components/je-radio-group.js +0 -92
  97. package/dist/components/je-radio-group.js.map +0 -1
  98. package/dist/components/je-radio.d.ts +0 -11
  99. package/dist/components/je-radio.js +0 -68
  100. package/dist/components/je-radio.js.map +0 -1
  101. package/dist/components/je-select-option.d.ts +0 -11
  102. package/dist/components/je-select-option.js +0 -56
  103. package/dist/components/je-select-option.js.map +0 -1
  104. package/dist/components/je-select.d.ts +0 -11
  105. package/dist/components/je-select.js +0 -208
  106. package/dist/components/je-select.js.map +0 -1
  107. package/dist/components/je-tab.d.ts +0 -11
  108. package/dist/components/je-tab.js +0 -37
  109. package/dist/components/je-tab.js.map +0 -1
  110. package/dist/components/je-tabs.d.ts +0 -11
  111. package/dist/components/je-tabs.js +0 -37
  112. package/dist/components/je-tabs.js.map +0 -1
  113. package/dist/components/je-textarea.d.ts +0 -11
  114. package/dist/components/je-textarea.js +0 -55
  115. package/dist/components/je-textarea.js.map +0 -1
  116. package/dist/components/je-toast.d.ts +0 -11
  117. package/dist/components/je-toast.js +0 -37
  118. package/dist/components/je-toast.js.map +0 -1
  119. package/dist/components/je-toggle.d.ts +0 -11
  120. package/dist/components/je-toggle.js +0 -57
  121. package/dist/components/je-toggle.js.map +0 -1
  122. package/dist/components/je-toolbar.d.ts +0 -11
  123. package/dist/components/je-toolbar.js +0 -37
  124. package/dist/components/je-toolbar.js.map +0 -1
  125. package/dist/components/je-tree.d.ts +0 -11
  126. package/dist/components/je-tree.js +0 -37
  127. package/dist/components/je-tree.js.map +0 -1
  128. package/dist/components/p-1f3759e7.js +0 -41
  129. package/dist/components/p-1f3759e7.js.map +0 -1
  130. package/dist/components/p-243cc91b.js +0 -50
  131. package/dist/components/p-243cc91b.js.map +0 -1
  132. package/dist/components/p-2df369c4.js +0 -265
  133. package/dist/components/p-2df369c4.js.map +0 -1
  134. package/dist/components/p-41492a72.js +0 -1514
  135. package/dist/components/p-41492a72.js.map +0 -1
  136. package/dist/components/p-4b8ae8ef.js +0 -51
  137. package/dist/components/p-4b8ae8ef.js.map +0 -1
  138. package/dist/components/p-5dee004d.js +0 -246
  139. package/dist/components/p-5dee004d.js.map +0 -1
  140. package/dist/components/p-8401b4e4.js +0 -48
  141. package/dist/components/p-8401b4e4.js.map +0 -1
  142. package/dist/components/p-94327b0d.js +0 -39
  143. package/dist/components/p-94327b0d.js.map +0 -1
  144. package/dist/components/p-aa4caa39.js +0 -76
  145. package/dist/components/p-aa4caa39.js.map +0 -1
@@ -1,1514 +0,0 @@
1
- const NAMESPACE = 'jebamo';
2
- const BUILD = /* jebamo */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
-
4
- /*
5
- Stencil Client Platform v4.21.0 | MIT Licensed | https://stenciljs.com
6
- */
7
- var __defProp = Object.defineProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var hostRefs = /* @__PURE__ */ new WeakMap();
13
- var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerHost = (hostElement, cmpMeta) => {
15
- const hostRef = {
16
- $flags$: 0,
17
- $hostElement$: hostElement,
18
- $cmpMeta$: cmpMeta,
19
- $instanceValues$: /* @__PURE__ */ new Map()
20
- };
21
- {
22
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
23
- hostElement["s-p"] = [];
24
- hostElement["s-rc"] = [];
25
- }
26
- return hostRefs.set(hostElement, hostRef);
27
- };
28
- var isMemberInElement = (elm, memberName) => memberName in elm;
29
- var consoleError = (e, el) => (0, console.error)(e, el);
30
-
31
- // src/client/client-style.ts
32
- var styles = /* @__PURE__ */ new Map();
33
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
34
- var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
35
- "formAssociatedCallback",
36
- "formResetCallback",
37
- "formDisabledCallback",
38
- "formStateRestoreCallback"
39
- ];
40
- var win = typeof window !== "undefined" ? window : {};
41
- var doc = win.document || { head: {} };
42
- var H = win.HTMLElement || class {
43
- };
44
- var plt = {
45
- $flags$: 0,
46
- $resourcesUrl$: "",
47
- jmp: (h2) => h2(),
48
- raf: (h2) => requestAnimationFrame(h2),
49
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
50
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
51
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
52
- };
53
- var supportsListenerOptions = /* @__PURE__ */ (() => {
54
- let supportsListenerOptions2 = false;
55
- try {
56
- doc.addEventListener(
57
- "e",
58
- null,
59
- Object.defineProperty({}, "passive", {
60
- get() {
61
- supportsListenerOptions2 = true;
62
- }
63
- })
64
- );
65
- } catch (e) {
66
- }
67
- return supportsListenerOptions2;
68
- })();
69
- var promiseResolve = (v) => Promise.resolve(v);
70
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
71
- try {
72
- new CSSStyleSheet();
73
- return typeof new CSSStyleSheet().replaceSync === "function";
74
- } catch (e) {
75
- }
76
- return false;
77
- })() ;
78
- var queuePending = false;
79
- var queueDomReads = [];
80
- var queueDomWrites = [];
81
- var queueTask = (queue, write) => (cb) => {
82
- queue.push(cb);
83
- if (!queuePending) {
84
- queuePending = true;
85
- if (write && plt.$flags$ & 4 /* queueSync */) {
86
- nextTick(flush);
87
- } else {
88
- plt.raf(flush);
89
- }
90
- }
91
- };
92
- var consume = (queue) => {
93
- for (let i2 = 0; i2 < queue.length; i2++) {
94
- try {
95
- queue[i2](performance.now());
96
- } catch (e) {
97
- consoleError(e);
98
- }
99
- }
100
- queue.length = 0;
101
- };
102
- var flush = () => {
103
- consume(queueDomReads);
104
- {
105
- consume(queueDomWrites);
106
- if (queuePending = queueDomReads.length > 0) {
107
- plt.raf(flush);
108
- }
109
- }
110
- };
111
- var nextTick = (cb) => promiseResolve().then(cb);
112
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
113
-
114
- // src/runtime/asset-path.ts
115
- var getAssetPath = (path) => {
116
- const assetUrl = new URL(path, plt.$resourcesUrl$);
117
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
118
- };
119
- var setAssetPath = (path) => plt.$resourcesUrl$ = path;
120
-
121
- // src/utils/constants.ts
122
- var EMPTY_OBJ = {};
123
- var SVG_NS = "http://www.w3.org/2000/svg";
124
- var HTML_NS = "http://www.w3.org/1999/xhtml";
125
-
126
- // src/utils/helpers.ts
127
- var isDef = (v) => v != null;
128
- var isComplexType = (o) => {
129
- o = typeof o;
130
- return o === "object" || o === "function";
131
- };
132
-
133
- // src/utils/query-nonce-meta-tag-content.ts
134
- function queryNonceMetaTagContent(doc2) {
135
- var _a, _b, _c;
136
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
137
- }
138
-
139
- // src/utils/result.ts
140
- var result_exports = {};
141
- __export(result_exports, {
142
- err: () => err,
143
- map: () => map,
144
- ok: () => ok,
145
- unwrap: () => unwrap,
146
- unwrapErr: () => unwrapErr
147
- });
148
- var ok = (value) => ({
149
- isOk: true,
150
- isErr: false,
151
- value
152
- });
153
- var err = (value) => ({
154
- isOk: false,
155
- isErr: true,
156
- value
157
- });
158
- function map(result, fn) {
159
- if (result.isOk) {
160
- const val = fn(result.value);
161
- if (val instanceof Promise) {
162
- return val.then((newVal) => ok(newVal));
163
- } else {
164
- return ok(val);
165
- }
166
- }
167
- if (result.isErr) {
168
- const value = result.value;
169
- return err(value);
170
- }
171
- throw "should never get here";
172
- }
173
- var unwrap = (result) => {
174
- if (result.isOk) {
175
- return result.value;
176
- } else {
177
- throw result.value;
178
- }
179
- };
180
- var unwrapErr = (result) => {
181
- if (result.isErr) {
182
- return result.value;
183
- } else {
184
- throw result.value;
185
- }
186
- };
187
- var createTime = (fnName, tagName = "") => {
188
- {
189
- return () => {
190
- return;
191
- };
192
- }
193
- };
194
- var h = (nodeName, vnodeData, ...children) => {
195
- let child = null;
196
- let key = null;
197
- let slotName = null;
198
- let simple = false;
199
- let lastSimple = false;
200
- const vNodeChildren = [];
201
- const walk = (c) => {
202
- for (let i2 = 0; i2 < c.length; i2++) {
203
- child = c[i2];
204
- if (Array.isArray(child)) {
205
- walk(child);
206
- } else if (child != null && typeof child !== "boolean") {
207
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
208
- child = String(child);
209
- }
210
- if (simple && lastSimple) {
211
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
212
- } else {
213
- vNodeChildren.push(simple ? newVNode(null, child) : child);
214
- }
215
- lastSimple = simple;
216
- }
217
- }
218
- };
219
- walk(children);
220
- if (vnodeData) {
221
- if (vnodeData.key) {
222
- key = vnodeData.key;
223
- }
224
- if (vnodeData.name) {
225
- slotName = vnodeData.name;
226
- }
227
- {
228
- const classData = vnodeData.className || vnodeData.class;
229
- if (classData) {
230
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
231
- }
232
- }
233
- }
234
- const vnode = newVNode(nodeName, null);
235
- vnode.$attrs$ = vnodeData;
236
- if (vNodeChildren.length > 0) {
237
- vnode.$children$ = vNodeChildren;
238
- }
239
- {
240
- vnode.$key$ = key;
241
- }
242
- {
243
- vnode.$name$ = slotName;
244
- }
245
- return vnode;
246
- };
247
- var newVNode = (tag, text) => {
248
- const vnode = {
249
- $flags$: 0,
250
- $tag$: tag,
251
- $text$: text,
252
- $elm$: null,
253
- $children$: null
254
- };
255
- {
256
- vnode.$attrs$ = null;
257
- }
258
- {
259
- vnode.$key$ = null;
260
- }
261
- {
262
- vnode.$name$ = null;
263
- }
264
- return vnode;
265
- };
266
- var Host = {};
267
- var isHost = (node) => node && node.$tag$ === Host;
268
- var parsePropertyValue = (propValue, propType) => {
269
- if (propValue != null && !isComplexType(propValue)) {
270
- if (propType & 4 /* Boolean */) {
271
- return propValue === "false" ? false : propValue === "" || !!propValue;
272
- }
273
- if (propType & 2 /* Number */) {
274
- return parseFloat(propValue);
275
- }
276
- if (propType & 1 /* String */) {
277
- return String(propValue);
278
- }
279
- return propValue;
280
- }
281
- return propValue;
282
- };
283
- var getElement = (ref) => ref;
284
-
285
- // src/runtime/event-emitter.ts
286
- var createEvent = (ref, name, flags) => {
287
- const elm = getElement(ref);
288
- return {
289
- emit: (detail) => {
290
- return emitEvent(elm, name, {
291
- bubbles: !!(flags & 4 /* Bubbles */),
292
- composed: !!(flags & 2 /* Composed */),
293
- cancelable: !!(flags & 1 /* Cancellable */),
294
- detail
295
- });
296
- }
297
- };
298
- };
299
- var emitEvent = (elm, name, opts) => {
300
- const ev = plt.ce(name, opts);
301
- elm.dispatchEvent(ev);
302
- return ev;
303
- };
304
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
305
- var registerStyle = (scopeId2, cssText, allowCS) => {
306
- let style = styles.get(scopeId2);
307
- if (supportsConstructableStylesheets && allowCS) {
308
- style = style || new CSSStyleSheet();
309
- if (typeof style === "string") {
310
- style = cssText;
311
- } else {
312
- style.replaceSync(cssText);
313
- }
314
- } else {
315
- style = cssText;
316
- }
317
- styles.set(scopeId2, style);
318
- };
319
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
320
- var _a;
321
- const scopeId2 = getScopeId(cmpMeta);
322
- const style = styles.get(scopeId2);
323
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
324
- if (style) {
325
- if (typeof style === "string") {
326
- styleContainerNode = styleContainerNode.head || styleContainerNode;
327
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
328
- let styleElm;
329
- if (!appliedStyles) {
330
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
331
- }
332
- if (!appliedStyles.has(scopeId2)) {
333
- {
334
- styleElm = doc.createElement("style");
335
- styleElm.innerHTML = style;
336
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
337
- if (nonce != null) {
338
- styleElm.setAttribute("nonce", nonce);
339
- }
340
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
341
- if (styleContainerNode.nodeName === "HEAD") {
342
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
343
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
344
- styleContainerNode.insertBefore(styleElm, referenceNode2);
345
- } else if ("host" in styleContainerNode) {
346
- styleContainerNode.prepend(styleElm);
347
- } else {
348
- styleContainerNode.append(styleElm);
349
- }
350
- }
351
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
352
- styleContainerNode.insertBefore(styleElm, null);
353
- }
354
- }
355
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
356
- styleElm.innerHTML += SLOT_FB_CSS;
357
- }
358
- if (appliedStyles) {
359
- appliedStyles.add(scopeId2);
360
- }
361
- }
362
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
363
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
364
- }
365
- }
366
- return scopeId2;
367
- };
368
- var attachStyles = (hostRef) => {
369
- const cmpMeta = hostRef.$cmpMeta$;
370
- const elm = hostRef.$hostElement$;
371
- const flags = cmpMeta.$flags$;
372
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
373
- const scopeId2 = addStyle(
374
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
375
- cmpMeta);
376
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
377
- elm["s-sc"] = scopeId2;
378
- elm.classList.add(scopeId2 + "-h");
379
- if (flags & 2 /* scopedCssEncapsulation */) {
380
- elm.classList.add(scopeId2 + "-s");
381
- }
382
- }
383
- endAttachStyles();
384
- };
385
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
386
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
387
- if (oldValue !== newValue) {
388
- let isProp = isMemberInElement(elm, memberName);
389
- let ln = memberName.toLowerCase();
390
- if (memberName === "class") {
391
- const classList = elm.classList;
392
- const oldClasses = parseClassList(oldValue);
393
- const newClasses = parseClassList(newValue);
394
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
395
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
396
- } else if (memberName === "style") {
397
- {
398
- for (const prop in oldValue) {
399
- if (!newValue || newValue[prop] == null) {
400
- if (prop.includes("-")) {
401
- elm.style.removeProperty(prop);
402
- } else {
403
- elm.style[prop] = "";
404
- }
405
- }
406
- }
407
- }
408
- for (const prop in newValue) {
409
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
410
- if (prop.includes("-")) {
411
- elm.style.setProperty(prop, newValue[prop]);
412
- } else {
413
- elm.style[prop] = newValue[prop];
414
- }
415
- }
416
- }
417
- } else if (memberName === "key") ; else if (memberName === "ref") {
418
- if (newValue) {
419
- newValue(elm);
420
- }
421
- } else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
422
- if (memberName[2] === "-") {
423
- memberName = memberName.slice(3);
424
- } else if (isMemberInElement(win, ln)) {
425
- memberName = ln.slice(2);
426
- } else {
427
- memberName = ln[2] + memberName.slice(3);
428
- }
429
- if (oldValue || newValue) {
430
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
431
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
432
- if (oldValue) {
433
- plt.rel(elm, memberName, oldValue, capture);
434
- }
435
- if (newValue) {
436
- plt.ael(elm, memberName, newValue, capture);
437
- }
438
- }
439
- } else {
440
- const isComplex = isComplexType(newValue);
441
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
442
- try {
443
- if (!elm.tagName.includes("-")) {
444
- const n = newValue == null ? "" : newValue;
445
- if (memberName === "list") {
446
- isProp = false;
447
- } else if (oldValue == null || elm[memberName] != n) {
448
- if (typeof elm.__lookupSetter__(memberName) === "function") {
449
- elm[memberName] = n;
450
- } else {
451
- elm.setAttribute(memberName, n);
452
- }
453
- }
454
- } else {
455
- elm[memberName] = newValue;
456
- }
457
- } catch (e) {
458
- }
459
- }
460
- if (newValue == null || newValue === false) {
461
- if (newValue !== false || elm.getAttribute(memberName) === "") {
462
- {
463
- elm.removeAttribute(memberName);
464
- }
465
- }
466
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
467
- newValue = newValue === true ? "" : newValue;
468
- {
469
- elm.setAttribute(memberName, newValue);
470
- }
471
- }
472
- }
473
- }
474
- };
475
- var parseClassListRegex = /\s/;
476
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
477
- var CAPTURE_EVENT_SUFFIX = "Capture";
478
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
479
-
480
- // src/runtime/vdom/update-element.ts
481
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
482
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
483
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
484
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
485
- {
486
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
487
- if (!(memberName in newVnodeAttrs)) {
488
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
489
- }
490
- }
491
- }
492
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
493
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
494
- }
495
- };
496
- function sortedAttrNames(attrNames) {
497
- return attrNames.includes("ref") ? (
498
- // we need to sort these to ensure that `'ref'` is the last attr
499
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
500
- ) : (
501
- // no need to sort, return the original array
502
- attrNames
503
- );
504
- }
505
-
506
- // src/runtime/vdom/vdom-render.ts
507
- var scopeId;
508
- var contentRef;
509
- var hostTagName;
510
- var useNativeShadowDom = false;
511
- var checkSlotFallbackVisibility = false;
512
- var checkSlotRelocate = false;
513
- var isSvgMode = false;
514
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
515
- var _a;
516
- const newVNode2 = newParentVNode.$children$[childIndex];
517
- let i2 = 0;
518
- let elm;
519
- let childNode;
520
- let oldVNode;
521
- if (!useNativeShadowDom) {
522
- checkSlotRelocate = true;
523
- if (newVNode2.$tag$ === "slot") {
524
- if (scopeId) {
525
- parentElm.classList.add(scopeId + "-s");
526
- }
527
- newVNode2.$flags$ |= newVNode2.$children$ ? (
528
- // slot element has fallback content
529
- // still create an element that "mocks" the slot element
530
- 2 /* isSlotFallback */
531
- ) : (
532
- // slot element does not have fallback content
533
- // create an html comment we'll use to always reference
534
- // where actual slot content should sit next to
535
- 1 /* isSlotReference */
536
- );
537
- }
538
- }
539
- if (newVNode2.$text$ !== null) {
540
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
541
- } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
542
- elm = newVNode2.$elm$ = doc.createTextNode("");
543
- } else {
544
- if (!isSvgMode) {
545
- isSvgMode = newVNode2.$tag$ === "svg";
546
- }
547
- elm = newVNode2.$elm$ = doc.createElementNS(
548
- isSvgMode ? SVG_NS : HTML_NS,
549
- !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
550
- ) ;
551
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
552
- isSvgMode = false;
553
- }
554
- {
555
- updateElement(null, newVNode2, isSvgMode);
556
- }
557
- const rootNode = elm.getRootNode();
558
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
559
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
560
- elm.classList.add(elm["s-si"] = scopeId);
561
- }
562
- {
563
- updateElementScopeIds(elm, parentElm);
564
- }
565
- if (newVNode2.$children$) {
566
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
567
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
568
- if (childNode) {
569
- elm.appendChild(childNode);
570
- }
571
- }
572
- }
573
- {
574
- if (newVNode2.$tag$ === "svg") {
575
- isSvgMode = false;
576
- } else if (elm.tagName === "foreignObject") {
577
- isSvgMode = true;
578
- }
579
- }
580
- }
581
- elm["s-hn"] = hostTagName;
582
- {
583
- if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
584
- elm["s-sr"] = true;
585
- elm["s-cr"] = contentRef;
586
- elm["s-sn"] = newVNode2.$name$ || "";
587
- elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
588
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
589
- if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
590
- {
591
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
592
- }
593
- }
594
- }
595
- }
596
- return elm;
597
- };
598
- var putBackInOriginalLocation = (parentElm, recursive) => {
599
- plt.$flags$ |= 1 /* isTmpDisconnected */;
600
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
601
- if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
602
- let node = parentElm;
603
- while (node = node.nextSibling) {
604
- if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
605
- oldSlotChildNodes.push(node);
606
- }
607
- }
608
- }
609
- for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
610
- const childNode = oldSlotChildNodes[i2];
611
- if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
612
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
613
- childNode["s-ol"].remove();
614
- childNode["s-ol"] = void 0;
615
- childNode["s-sh"] = void 0;
616
- checkSlotRelocate = true;
617
- }
618
- if (recursive) {
619
- putBackInOriginalLocation(childNode, recursive);
620
- }
621
- }
622
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
623
- };
624
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
625
- let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
626
- let childNode;
627
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
628
- containerElm = containerElm.shadowRoot;
629
- }
630
- for (; startIdx <= endIdx; ++startIdx) {
631
- if (vnodes[startIdx]) {
632
- childNode = createElm(null, parentVNode, startIdx, parentElm);
633
- if (childNode) {
634
- vnodes[startIdx].$elm$ = childNode;
635
- insertBefore(containerElm, childNode, referenceNode(before) );
636
- }
637
- }
638
- }
639
- };
640
- var removeVnodes = (vnodes, startIdx, endIdx) => {
641
- for (let index = startIdx; index <= endIdx; ++index) {
642
- const vnode = vnodes[index];
643
- if (vnode) {
644
- const elm = vnode.$elm$;
645
- nullifyVNodeRefs(vnode);
646
- if (elm) {
647
- {
648
- checkSlotFallbackVisibility = true;
649
- if (elm["s-ol"]) {
650
- elm["s-ol"].remove();
651
- } else {
652
- putBackInOriginalLocation(elm, true);
653
- }
654
- }
655
- elm.remove();
656
- }
657
- }
658
- }
659
- };
660
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
661
- let oldStartIdx = 0;
662
- let newStartIdx = 0;
663
- let idxInOld = 0;
664
- let i2 = 0;
665
- let oldEndIdx = oldCh.length - 1;
666
- let oldStartVnode = oldCh[0];
667
- let oldEndVnode = oldCh[oldEndIdx];
668
- let newEndIdx = newCh.length - 1;
669
- let newStartVnode = newCh[0];
670
- let newEndVnode = newCh[newEndIdx];
671
- let node;
672
- let elmToMove;
673
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
674
- if (oldStartVnode == null) {
675
- oldStartVnode = oldCh[++oldStartIdx];
676
- } else if (oldEndVnode == null) {
677
- oldEndVnode = oldCh[--oldEndIdx];
678
- } else if (newStartVnode == null) {
679
- newStartVnode = newCh[++newStartIdx];
680
- } else if (newEndVnode == null) {
681
- newEndVnode = newCh[--newEndIdx];
682
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
683
- patch(oldStartVnode, newStartVnode, isInitialRender);
684
- oldStartVnode = oldCh[++oldStartIdx];
685
- newStartVnode = newCh[++newStartIdx];
686
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
687
- patch(oldEndVnode, newEndVnode, isInitialRender);
688
- oldEndVnode = oldCh[--oldEndIdx];
689
- newEndVnode = newCh[--newEndIdx];
690
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
691
- if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
692
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
693
- }
694
- patch(oldStartVnode, newEndVnode, isInitialRender);
695
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
696
- oldStartVnode = oldCh[++oldStartIdx];
697
- newEndVnode = newCh[--newEndIdx];
698
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
699
- if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
700
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
701
- }
702
- patch(oldEndVnode, newStartVnode, isInitialRender);
703
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
704
- oldEndVnode = oldCh[--oldEndIdx];
705
- newStartVnode = newCh[++newStartIdx];
706
- } else {
707
- idxInOld = -1;
708
- {
709
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
710
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
711
- idxInOld = i2;
712
- break;
713
- }
714
- }
715
- }
716
- if (idxInOld >= 0) {
717
- elmToMove = oldCh[idxInOld];
718
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
719
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
720
- } else {
721
- patch(elmToMove, newStartVnode, isInitialRender);
722
- oldCh[idxInOld] = void 0;
723
- node = elmToMove.$elm$;
724
- }
725
- newStartVnode = newCh[++newStartIdx];
726
- } else {
727
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
728
- newStartVnode = newCh[++newStartIdx];
729
- }
730
- if (node) {
731
- {
732
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
733
- }
734
- }
735
- }
736
- }
737
- if (oldStartIdx > oldEndIdx) {
738
- addVnodes(
739
- parentElm,
740
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
741
- newVNode2,
742
- newCh,
743
- newStartIdx,
744
- newEndIdx
745
- );
746
- } else if (newStartIdx > newEndIdx) {
747
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
748
- }
749
- };
750
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
751
- if (leftVNode.$tag$ === rightVNode.$tag$) {
752
- if (leftVNode.$tag$ === "slot") {
753
- if (
754
- // The component gets hydrated and no VDOM has been initialized.
755
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
756
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
757
- // hydration comments to be removed
758
- leftVNode.$elm$.nodeType !== 8
759
- ) {
760
- return false;
761
- }
762
- return leftVNode.$name$ === rightVNode.$name$;
763
- }
764
- if (!isInitialRender) {
765
- return leftVNode.$key$ === rightVNode.$key$;
766
- }
767
- return true;
768
- }
769
- return false;
770
- };
771
- var referenceNode = (node) => {
772
- return node && node["s-ol"] || node;
773
- };
774
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
775
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
776
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
777
- const oldChildren = oldVNode.$children$;
778
- const newChildren = newVNode2.$children$;
779
- const tag = newVNode2.$tag$;
780
- const text = newVNode2.$text$;
781
- let defaultHolder;
782
- if (text === null) {
783
- {
784
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
785
- }
786
- {
787
- if (tag === "slot" && !useNativeShadowDom) ; else {
788
- updateElement(oldVNode, newVNode2, isSvgMode);
789
- }
790
- }
791
- if (oldChildren !== null && newChildren !== null) {
792
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
793
- } else if (newChildren !== null) {
794
- if (oldVNode.$text$ !== null) {
795
- elm.textContent = "";
796
- }
797
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
798
- } else if (
799
- // don't do this on initial render as it can cause non-hydrated content to be removed
800
- !isInitialRender && BUILD.updatable && oldChildren !== null
801
- ) {
802
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
803
- }
804
- if (isSvgMode && tag === "svg") {
805
- isSvgMode = false;
806
- }
807
- } else if ((defaultHolder = elm["s-cr"])) {
808
- defaultHolder.parentNode.textContent = text;
809
- } else if (oldVNode.$text$ !== text) {
810
- elm.data = text;
811
- }
812
- };
813
- var updateFallbackSlotVisibility = (elm) => {
814
- const childNodes = elm.childNodes;
815
- for (const childNode of childNodes) {
816
- if (childNode.nodeType === 1 /* ElementNode */) {
817
- if (childNode["s-sr"]) {
818
- const slotName = childNode["s-sn"];
819
- childNode.hidden = false;
820
- for (const siblingNode of childNodes) {
821
- if (siblingNode !== childNode) {
822
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
823
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
824
- childNode.hidden = true;
825
- break;
826
- }
827
- } else {
828
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
829
- childNode.hidden = true;
830
- break;
831
- }
832
- }
833
- }
834
- }
835
- }
836
- updateFallbackSlotVisibility(childNode);
837
- }
838
- }
839
- };
840
- var relocateNodes = [];
841
- var markSlotContentForRelocation = (elm) => {
842
- let node;
843
- let hostContentNodes;
844
- let j;
845
- for (const childNode of elm.childNodes) {
846
- if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
847
- hostContentNodes = node.parentNode.childNodes;
848
- const slotName = childNode["s-sn"];
849
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
850
- node = hostContentNodes[j];
851
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD.experimentalSlotFixes )) {
852
- if (isNodeLocatedInSlot(node, slotName)) {
853
- let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
854
- checkSlotFallbackVisibility = true;
855
- node["s-sn"] = node["s-sn"] || slotName;
856
- if (relocateNodeData) {
857
- relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
858
- relocateNodeData.$slotRefNode$ = childNode;
859
- } else {
860
- node["s-sh"] = childNode["s-hn"];
861
- relocateNodes.push({
862
- $slotRefNode$: childNode,
863
- $nodeToRelocate$: node
864
- });
865
- }
866
- if (node["s-sr"]) {
867
- relocateNodes.map((relocateNode) => {
868
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
869
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
870
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
871
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
872
- }
873
- }
874
- });
875
- }
876
- } else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
877
- relocateNodes.push({
878
- $nodeToRelocate$: node
879
- });
880
- }
881
- }
882
- }
883
- }
884
- if (childNode.nodeType === 1 /* ElementNode */) {
885
- markSlotContentForRelocation(childNode);
886
- }
887
- }
888
- };
889
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
890
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
891
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
892
- return true;
893
- }
894
- if (nodeToRelocate.getAttribute("slot") === slotName) {
895
- return true;
896
- }
897
- return false;
898
- }
899
- if (nodeToRelocate["s-sn"] === slotName) {
900
- return true;
901
- }
902
- return slotName === "";
903
- };
904
- var nullifyVNodeRefs = (vNode) => {
905
- {
906
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
907
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
908
- }
909
- };
910
- var insertBefore = (parent, newNode, reference) => {
911
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
912
- {
913
- updateElementScopeIds(newNode, parent);
914
- }
915
- return inserted;
916
- };
917
- var findScopeIds = (element) => {
918
- const scopeIds = [];
919
- if (element) {
920
- scopeIds.push(
921
- ...element["s-scs"] || [],
922
- element["s-si"],
923
- element["s-sc"],
924
- ...findScopeIds(element.parentElement)
925
- );
926
- }
927
- return scopeIds;
928
- };
929
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
930
- var _a;
931
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
932
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
933
- if (scopeIds.size) {
934
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
935
- if (element["s-ol"] || iterateChildNodes) {
936
- for (const childNode of Array.from(element.childNodes)) {
937
- updateElementScopeIds(childNode, element, true);
938
- }
939
- }
940
- }
941
- }
942
- };
943
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
944
- var _a, _b, _c, _d;
945
- const hostElm = hostRef.$hostElement$;
946
- const cmpMeta = hostRef.$cmpMeta$;
947
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
948
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
949
- hostTagName = hostElm.tagName;
950
- if (cmpMeta.$attrsToReflect$) {
951
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
952
- cmpMeta.$attrsToReflect$.map(
953
- ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
954
- );
955
- }
956
- if (isInitialLoad && rootVnode.$attrs$) {
957
- for (const key of Object.keys(rootVnode.$attrs$)) {
958
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
959
- rootVnode.$attrs$[key] = hostElm[key];
960
- }
961
- }
962
- }
963
- rootVnode.$tag$ = null;
964
- rootVnode.$flags$ |= 4 /* isHost */;
965
- hostRef.$vnode$ = rootVnode;
966
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
967
- {
968
- scopeId = hostElm["s-sc"];
969
- }
970
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
971
- {
972
- contentRef = hostElm["s-cr"];
973
- checkSlotFallbackVisibility = false;
974
- }
975
- patch(oldVNode, rootVnode, isInitialLoad);
976
- {
977
- plt.$flags$ |= 1 /* isTmpDisconnected */;
978
- if (checkSlotRelocate) {
979
- markSlotContentForRelocation(rootVnode.$elm$);
980
- for (const relocateData of relocateNodes) {
981
- const nodeToRelocate = relocateData.$nodeToRelocate$;
982
- if (!nodeToRelocate["s-ol"]) {
983
- const orgLocationNode = doc.createTextNode("");
984
- orgLocationNode["s-nr"] = nodeToRelocate;
985
- insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
986
- }
987
- }
988
- for (const relocateData of relocateNodes) {
989
- const nodeToRelocate = relocateData.$nodeToRelocate$;
990
- const slotRefNode = relocateData.$slotRefNode$;
991
- if (slotRefNode) {
992
- const parentNodeRef = slotRefNode.parentNode;
993
- let insertBeforeNode = slotRefNode.nextSibling;
994
- {
995
- let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
996
- while (orgLocationNode) {
997
- let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
998
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
999
- refNode = refNode.nextSibling;
1000
- while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1001
- refNode = refNode == null ? void 0 : refNode.nextSibling;
1002
- }
1003
- if (!refNode || !refNode["s-nr"]) {
1004
- insertBeforeNode = refNode;
1005
- break;
1006
- }
1007
- }
1008
- orgLocationNode = orgLocationNode.previousSibling;
1009
- }
1010
- }
1011
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1012
- if (nodeToRelocate !== insertBeforeNode) {
1013
- if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1014
- nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1015
- }
1016
- insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1017
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1018
- nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1019
- }
1020
- }
1021
- }
1022
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1023
- } else {
1024
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1025
- if (isInitialLoad) {
1026
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1027
- }
1028
- nodeToRelocate.hidden = true;
1029
- }
1030
- }
1031
- }
1032
- }
1033
- if (checkSlotFallbackVisibility) {
1034
- updateFallbackSlotVisibility(rootVnode.$elm$);
1035
- }
1036
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1037
- relocateNodes.length = 0;
1038
- }
1039
- contentRef = void 0;
1040
- };
1041
-
1042
- // src/runtime/update-component.ts
1043
- var attachToAncestor = (hostRef, ancestorComponent) => {
1044
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1045
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1046
- }
1047
- };
1048
- var scheduleUpdate = (hostRef, isInitialLoad) => {
1049
- {
1050
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1051
- }
1052
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1053
- hostRef.$flags$ |= 512 /* needsRerender */;
1054
- return;
1055
- }
1056
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1057
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1058
- return writeTask(dispatch) ;
1059
- };
1060
- var dispatchHooks = (hostRef, isInitialLoad) => {
1061
- const elm = hostRef.$hostElement$;
1062
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1063
- const instance = elm;
1064
- if (!instance) {
1065
- throw new Error(
1066
- `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
1067
- );
1068
- }
1069
- let maybePromise;
1070
- if (isInitialLoad) {
1071
- {
1072
- maybePromise = safeCall(instance, "componentWillLoad");
1073
- }
1074
- }
1075
- endSchedule();
1076
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1077
- };
1078
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
1079
- console.error(err2);
1080
- fn();
1081
- }) : fn();
1082
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1083
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
1084
- var _a;
1085
- const elm = hostRef.$hostElement$;
1086
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1087
- const rc = elm["s-rc"];
1088
- if (isInitialLoad) {
1089
- attachStyles(hostRef);
1090
- }
1091
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1092
- {
1093
- callRender(hostRef, instance, elm, isInitialLoad);
1094
- }
1095
- if (rc) {
1096
- rc.map((cb) => cb());
1097
- elm["s-rc"] = void 0;
1098
- }
1099
- endRender();
1100
- endUpdate();
1101
- {
1102
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1103
- const postUpdate = () => postUpdateComponent(hostRef);
1104
- if (childrenPromises.length === 0) {
1105
- postUpdate();
1106
- } else {
1107
- Promise.all(childrenPromises).then(postUpdate);
1108
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1109
- childrenPromises.length = 0;
1110
- }
1111
- }
1112
- };
1113
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
1114
- try {
1115
- instance = instance.render() ;
1116
- {
1117
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1118
- }
1119
- {
1120
- hostRef.$flags$ |= 2 /* hasRendered */;
1121
- }
1122
- {
1123
- {
1124
- {
1125
- renderVdom(hostRef, instance, isInitialLoad);
1126
- }
1127
- }
1128
- }
1129
- } catch (e) {
1130
- consoleError(e, hostRef.$hostElement$);
1131
- }
1132
- return null;
1133
- };
1134
- var postUpdateComponent = (hostRef) => {
1135
- const tagName = hostRef.$cmpMeta$.$tagName$;
1136
- const elm = hostRef.$hostElement$;
1137
- const endPostUpdate = createTime("postUpdate", tagName);
1138
- const instance = elm;
1139
- const ancestorComponent = hostRef.$ancestorComponent$;
1140
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1141
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1142
- {
1143
- addHydratedFlag(elm);
1144
- }
1145
- {
1146
- safeCall(instance, "componentDidLoad");
1147
- }
1148
- endPostUpdate();
1149
- {
1150
- hostRef.$onReadyResolve$(elm);
1151
- if (!ancestorComponent) {
1152
- appDidLoad();
1153
- }
1154
- }
1155
- } else {
1156
- endPostUpdate();
1157
- }
1158
- {
1159
- if (hostRef.$onRenderResolve$) {
1160
- hostRef.$onRenderResolve$();
1161
- hostRef.$onRenderResolve$ = void 0;
1162
- }
1163
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1164
- nextTick(() => scheduleUpdate(hostRef, false));
1165
- }
1166
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1167
- }
1168
- };
1169
- var forceUpdate = (ref) => {
1170
- {
1171
- const hostRef = getHostRef(ref);
1172
- const isConnected = hostRef.$hostElement$.isConnected;
1173
- if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1174
- scheduleUpdate(hostRef, false);
1175
- }
1176
- return isConnected;
1177
- }
1178
- };
1179
- var appDidLoad = (who) => {
1180
- {
1181
- addHydratedFlag(doc.documentElement);
1182
- }
1183
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1184
- };
1185
- var safeCall = (instance, method, arg) => {
1186
- if (instance && instance[method]) {
1187
- try {
1188
- return instance[method](arg);
1189
- } catch (e) {
1190
- consoleError(e);
1191
- }
1192
- }
1193
- return void 0;
1194
- };
1195
- var addHydratedFlag = (elm) => {
1196
- var _a;
1197
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1198
- };
1199
-
1200
- // src/runtime/set-value.ts
1201
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1202
- var setValue = (ref, propName, newVal, cmpMeta) => {
1203
- const hostRef = getHostRef(ref);
1204
- const elm = ref;
1205
- const oldVal = hostRef.$instanceValues$.get(propName);
1206
- const flags = hostRef.$flags$;
1207
- const instance = elm;
1208
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1209
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1210
- const didValueChange = newVal !== oldVal && !areBothNaN;
1211
- if (didValueChange) {
1212
- hostRef.$instanceValues$.set(propName, newVal);
1213
- {
1214
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1215
- const watchMethods = cmpMeta.$watchers$[propName];
1216
- if (watchMethods) {
1217
- watchMethods.map((watchMethodName) => {
1218
- try {
1219
- instance[watchMethodName](newVal, oldVal, propName);
1220
- } catch (e) {
1221
- consoleError(e, elm);
1222
- }
1223
- });
1224
- }
1225
- }
1226
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1227
- scheduleUpdate(hostRef, false);
1228
- }
1229
- }
1230
- }
1231
- };
1232
-
1233
- // src/runtime/proxy-component.ts
1234
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1235
- var _a, _b;
1236
- const prototype = Cstr.prototype;
1237
- if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
1238
- FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
1239
- (cbName) => Object.defineProperty(prototype, cbName, {
1240
- value(...args) {
1241
- const hostRef = getHostRef(this);
1242
- const elm = this;
1243
- const instance = elm;
1244
- if (!instance) {
1245
- hostRef.$onReadyPromise$.then((instance2) => {
1246
- const cb = instance2[cbName];
1247
- typeof cb === "function" && cb.call(instance2, ...args);
1248
- });
1249
- } else {
1250
- const cb = instance[cbName];
1251
- typeof cb === "function" && cb.call(instance, ...args);
1252
- }
1253
- }
1254
- })
1255
- );
1256
- }
1257
- if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1258
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1259
- cmpMeta.$watchers$ = Cstr.watchers;
1260
- }
1261
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1262
- members.map(([memberName, [memberFlags]]) => {
1263
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
1264
- Object.defineProperty(prototype, memberName, {
1265
- get() {
1266
- return getValue(this, memberName);
1267
- },
1268
- set(newValue) {
1269
- setValue(this, memberName, newValue, cmpMeta);
1270
- },
1271
- configurable: true,
1272
- enumerable: true
1273
- });
1274
- }
1275
- });
1276
- {
1277
- const attrNameToPropName = /* @__PURE__ */ new Map();
1278
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1279
- plt.jmp(() => {
1280
- var _a2;
1281
- const propName = attrNameToPropName.get(attrName);
1282
- if (this.hasOwnProperty(propName)) {
1283
- newValue = this[propName];
1284
- delete this[propName];
1285
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1286
- this[propName] == newValue) {
1287
- return;
1288
- } else if (propName == null) {
1289
- const hostRef = getHostRef(this);
1290
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1291
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1292
- const elm = this;
1293
- const instance = elm;
1294
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1295
- entry == null ? void 0 : entry.forEach((callbackName) => {
1296
- if (instance[callbackName] != null) {
1297
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1298
- }
1299
- });
1300
- }
1301
- return;
1302
- }
1303
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1304
- });
1305
- };
1306
- Cstr.observedAttributes = Array.from(
1307
- /* @__PURE__ */ new Set([
1308
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1309
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
1310
- var _a2;
1311
- const attrName = m[1] || propName;
1312
- attrNameToPropName.set(attrName, propName);
1313
- if (m[0] & 512 /* ReflectAttr */) {
1314
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1315
- }
1316
- return attrName;
1317
- })
1318
- ])
1319
- );
1320
- }
1321
- }
1322
- return Cstr;
1323
- };
1324
-
1325
- // src/runtime/initialize-component.ts
1326
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1327
- let Cstr;
1328
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1329
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1330
- {
1331
- Cstr = elm.constructor;
1332
- const cmpTag = elm.localName;
1333
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1334
- }
1335
- if (Cstr && Cstr.style) {
1336
- let style;
1337
- if (typeof Cstr.style === "string") {
1338
- style = Cstr.style;
1339
- }
1340
- const scopeId2 = getScopeId(cmpMeta);
1341
- if (!styles.has(scopeId2)) {
1342
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1343
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1344
- endRegisterStyles();
1345
- }
1346
- }
1347
- }
1348
- const ancestorComponent = hostRef.$ancestorComponent$;
1349
- const schedule = () => scheduleUpdate(hostRef, true);
1350
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1351
- ancestorComponent["s-rc"].push(schedule);
1352
- } else {
1353
- schedule();
1354
- }
1355
- };
1356
- var fireConnectedCallback = (instance) => {
1357
- };
1358
-
1359
- // src/runtime/connected-callback.ts
1360
- var connectedCallback = (elm) => {
1361
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1362
- const hostRef = getHostRef(elm);
1363
- const cmpMeta = hostRef.$cmpMeta$;
1364
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1365
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1366
- hostRef.$flags$ |= 1 /* hasConnected */;
1367
- {
1368
- if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1369
- cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
1370
- setContentReference(elm);
1371
- }
1372
- }
1373
- {
1374
- let ancestorComponent = elm;
1375
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1376
- if (ancestorComponent["s-p"]) {
1377
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1378
- break;
1379
- }
1380
- }
1381
- }
1382
- if (cmpMeta.$members$) {
1383
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1384
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1385
- const value = elm[memberName];
1386
- delete elm[memberName];
1387
- elm[memberName] = value;
1388
- }
1389
- });
1390
- }
1391
- {
1392
- initializeComponent(elm, hostRef, cmpMeta);
1393
- }
1394
- } else {
1395
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1396
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1397
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1398
- }
1399
- }
1400
- endConnected();
1401
- }
1402
- };
1403
- var setContentReference = (elm) => {
1404
- const contentRefElm = elm["s-cr"] = doc.createComment(
1405
- ""
1406
- );
1407
- contentRefElm["s-cn"] = true;
1408
- insertBefore(elm, contentRefElm, elm.firstChild);
1409
- };
1410
- var disconnectedCallback = async (elm) => {
1411
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1412
- const hostRef = getHostRef(elm);
1413
- {
1414
- if (hostRef.$rmListeners$) {
1415
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1416
- hostRef.$rmListeners$ = void 0;
1417
- }
1418
- }
1419
- }
1420
- };
1421
- var proxyCustomElement = (Cstr, compactMeta) => {
1422
- const cmpMeta = {
1423
- $flags$: compactMeta[0],
1424
- $tagName$: compactMeta[1]
1425
- };
1426
- {
1427
- cmpMeta.$members$ = compactMeta[2];
1428
- }
1429
- {
1430
- cmpMeta.$listeners$ = compactMeta[3];
1431
- }
1432
- {
1433
- cmpMeta.$watchers$ = Cstr.$watchers$;
1434
- }
1435
- {
1436
- cmpMeta.$attrsToReflect$ = [];
1437
- }
1438
- const originalConnectedCallback = Cstr.prototype.connectedCallback;
1439
- Object.assign(Cstr.prototype, {
1440
- __registerHost() {
1441
- registerHost(this, cmpMeta);
1442
- },
1443
- connectedCallback() {
1444
- const hostRef = getHostRef(this);
1445
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1446
- connectedCallback(this);
1447
- if (originalConnectedCallback) {
1448
- originalConnectedCallback.call(this);
1449
- }
1450
- },
1451
- disconnectedCallback() {
1452
- disconnectedCallback(this);
1453
- },
1454
- __attachShadow() {
1455
- {
1456
- if (!this.shadowRoot) {
1457
- {
1458
- this.attachShadow({
1459
- mode: "open",
1460
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
1461
- });
1462
- }
1463
- } else {
1464
- if (this.shadowRoot.mode !== "open") {
1465
- throw new Error(
1466
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
1467
- );
1468
- }
1469
- }
1470
- }
1471
- }
1472
- });
1473
- Cstr.is = cmpMeta.$tagName$;
1474
- return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
1475
- };
1476
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1477
- if (listeners) {
1478
- listeners.map(([flags, name, method]) => {
1479
- const target = getHostListenerTarget(elm, flags) ;
1480
- const handler = hostListenerProxy(hostRef, method);
1481
- const opts = hostListenerOpts(flags);
1482
- plt.ael(target, name, handler, opts);
1483
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1484
- });
1485
- }
1486
- };
1487
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
1488
- try {
1489
- {
1490
- hostRef.$hostElement$[methodName](ev);
1491
- }
1492
- } catch (e) {
1493
- consoleError(e);
1494
- }
1495
- };
1496
- var getHostListenerTarget = (elm, flags) => {
1497
- if (flags & 8 /* TargetWindow */) return win;
1498
- if (flags & 16 /* TargetBody */) return doc.body;
1499
- return elm;
1500
- };
1501
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
1502
- passive: (flags & 1 /* Passive */) !== 0,
1503
- capture: (flags & 2 /* Capture */) !== 0
1504
- } : (flags & 2 /* Capture */) !== 0;
1505
-
1506
- // src/runtime/nonce.ts
1507
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1508
-
1509
- // src/runtime/platform-options.ts
1510
- var setPlatformOptions = (opts) => Object.assign(plt, opts);
1511
-
1512
- export { H, setNonce as a, setPlatformOptions as b, createEvent as c, Host as d, forceUpdate as f, getAssetPath as g, h, proxyCustomElement as p, setAssetPath as s };
1513
-
1514
- //# sourceMappingURL=p-41492a72.js.map