@stencil/core 4.23.0-dev.1735794112.5d29255 → 4.23.0-dev.1736139708.13ee704

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v4.23.0-dev.1735794112.5d29255 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v4.23.0-dev.1736139708.13ee704 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -18,9 +18,21 @@ var Build = {
18
18
 
19
19
  // src/client/client-host-ref.ts
20
20
  import { BUILD as BUILD2 } from "@stencil/core/internal/app-data";
21
+
22
+ // src/utils/constants.ts
23
+ var EMPTY_OBJ = {};
24
+ var SVG_NS = "http://www.w3.org/2000/svg";
25
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
26
+
27
+ // src/client/client-host-ref.ts
21
28
  var hostRefs = BUILD2.hotModuleReplacement ? window.__STENCIL_HOSTREFS__ || (window.__STENCIL_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
22
29
  var getHostRef = (ref) => hostRefs.get(ref);
23
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
30
+ var registerInstance = (lazyInstance, hostRef) => {
31
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
32
+ if (BUILD2.modernPropertyDecls && (BUILD2.state || BUILD2.prop)) {
33
+ reWireGetterSetter(lazyInstance, hostRef);
34
+ }
35
+ };
24
36
  var registerHost = (hostElement, cmpMeta) => {
25
37
  const hostRef = {
26
38
  $flags$: 0,
@@ -39,9 +51,35 @@ var registerHost = (hostElement, cmpMeta) => {
39
51
  hostElement["s-p"] = [];
40
52
  hostElement["s-rc"] = [];
41
53
  }
42
- return hostRefs.set(hostElement, hostRef);
54
+ const ref = hostRefs.set(hostElement, hostRef);
55
+ if (!BUILD2.lazyLoad && BUILD2.modernPropertyDecls && (BUILD2.state || BUILD2.prop)) {
56
+ reWireGetterSetter(hostElement, hostRef);
57
+ }
58
+ return ref;
43
59
  };
44
60
  var isMemberInElement = (elm, memberName) => memberName in elm;
61
+ var reWireGetterSetter = (instance, hostRef) => {
62
+ var _a;
63
+ const cmpMeta = hostRef.$cmpMeta$;
64
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
65
+ members.map(([memberName, [memberFlags]]) => {
66
+ if (BUILD2.state && BUILD2.prop && (memberFlags & 2048 /* Getter */) === 0 && (memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
67
+ const ogValue = instance[memberName];
68
+ const lazyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
69
+ Object.defineProperty(instance, memberName, {
70
+ get() {
71
+ return lazyDescriptor.get.call(this);
72
+ },
73
+ set(newValue) {
74
+ lazyDescriptor.set.call(this, newValue);
75
+ },
76
+ configurable: true,
77
+ enumerable: true
78
+ });
79
+ instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
80
+ }
81
+ });
82
+ };
45
83
 
46
84
  // src/client/client-load-module.ts
47
85
  import { BUILD as BUILD4 } from "@stencil/core/internal/app-data";
@@ -242,7 +280,7 @@ var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
242
280
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
243
281
 
244
282
  // src/client/index.ts
245
- import { BUILD as BUILD27, Env, NAMESPACE as NAMESPACE2 } from "@stencil/core/internal/app-data";
283
+ import { BUILD as BUILD28, Env, NAMESPACE as NAMESPACE2 } from "@stencil/core/internal/app-data";
246
284
 
247
285
  // src/runtime/asset-path.ts
248
286
  var getAssetPath = (path) => {
@@ -252,15 +290,10 @@ var getAssetPath = (path) => {
252
290
  var setAssetPath = (path) => plt.$resourcesUrl$ = path;
253
291
 
254
292
  // src/runtime/bootstrap-custom-element.ts
255
- import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
256
-
257
- // src/utils/constants.ts
258
- var EMPTY_OBJ = {};
259
- var SVG_NS = "http://www.w3.org/2000/svg";
260
- var HTML_NS = "http://www.w3.org/1999/xhtml";
293
+ import { BUILD as BUILD25 } from "@stencil/core/internal/app-data";
261
294
 
262
295
  // src/utils/helpers.ts
263
- var isDef = (v) => v != null;
296
+ var isDef = (v) => v != null && v !== void 0;
264
297
  var isComplexType = (o) => {
265
298
  o = typeof o;
266
299
  return o === "object" || o === "function";
@@ -322,19 +355,122 @@ var unwrapErr = (result) => {
322
355
  };
323
356
 
324
357
  // src/runtime/connected-callback.ts
325
- import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
358
+ import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
326
359
 
327
360
  // src/runtime/client-hydrate.ts
328
- import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
361
+ import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
329
362
 
330
363
  // src/runtime/dom-extras.ts
331
- import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
364
+ import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
365
+
366
+ // src/runtime/slot-polyfill-utils.ts
367
+ import { BUILD as BUILD7 } from "@stencil/core/internal/app-data";
368
+ var updateFallbackSlotVisibility = (elm) => {
369
+ const childNodes = elm.__childNodes || elm.childNodes;
370
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
371
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
372
+ var _a;
373
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
374
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
375
+ slotNode.hidden = true;
376
+ } else {
377
+ slotNode.hidden = false;
378
+ }
379
+ }
380
+ });
381
+ }
382
+ for (const childNode of childNodes) {
383
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
384
+ updateFallbackSlotVisibility(childNode);
385
+ }
386
+ }
387
+ };
388
+ var getSlottedChildNodes = (childNodes) => {
389
+ const result = [];
390
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
391
+ const slottedNode = childNodes[i2]["s-nr"];
392
+ if (slottedNode && slottedNode.isConnected) {
393
+ result.push(slottedNode);
394
+ }
395
+ }
396
+ return result;
397
+ };
398
+ var getHostSlotNodes = (childNodes, hostName, slotName) => {
399
+ let i2 = 0;
400
+ let slottedNodes = [];
401
+ let childNode;
402
+ for (; i2 < childNodes.length; i2++) {
403
+ childNode = childNodes[i2];
404
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
405
+ slottedNodes.push(childNode);
406
+ if (typeof slotName !== "undefined") return slottedNodes;
407
+ }
408
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
409
+ }
410
+ return slottedNodes;
411
+ };
412
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
413
+ const childNodes = [];
414
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
415
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
416
+ childNodes.push(node);
417
+ }
418
+ return childNodes;
419
+ };
420
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
421
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
422
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
423
+ return true;
424
+ }
425
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
426
+ return true;
427
+ }
428
+ return false;
429
+ }
430
+ if (nodeToRelocate["s-sn"] === slotName) {
431
+ return true;
432
+ }
433
+ return slotName === "";
434
+ };
435
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
436
+ let slottedNodeLocation;
437
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
438
+ slottedNodeLocation = newChild["s-ol"];
439
+ } else {
440
+ slottedNodeLocation = document.createTextNode("");
441
+ slottedNodeLocation["s-nr"] = newChild;
442
+ }
443
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
444
+ const parent = slotNode["s-cr"].parentNode;
445
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
446
+ if (typeof position !== "undefined") {
447
+ if (BUILD7.hydrateClientSide) {
448
+ slottedNodeLocation["s-oo"] = position;
449
+ const childNodes = parent.__childNodes || parent.childNodes;
450
+ const slotRelocateNodes = [slottedNodeLocation];
451
+ childNodes.forEach((n) => {
452
+ if (n["s-nr"]) slotRelocateNodes.push(n);
453
+ });
454
+ slotRelocateNodes.sort((a, b) => {
455
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
456
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
457
+ return 0;
458
+ });
459
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
460
+ }
461
+ } else {
462
+ appendMethod.call(parent, slottedNodeLocation);
463
+ }
464
+ newChild["s-ol"] = slottedNodeLocation;
465
+ newChild["s-sh"] = slotNode["s-hn"];
466
+ };
467
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
332
468
 
333
469
  // src/runtime/vdom/vdom-render.ts
334
- import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
470
+ import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
335
471
 
336
472
  // src/runtime/vdom/h.ts
337
- import { BUILD as BUILD7 } from "@stencil/core/internal/app-data";
473
+ import { BUILD as BUILD8 } from "@stencil/core/internal/app-data";
338
474
  var h = (nodeName, vnodeData, ...children) => {
339
475
  let child = null;
340
476
  let key = null;
@@ -350,7 +486,7 @@ var h = (nodeName, vnodeData, ...children) => {
350
486
  } else if (child != null && typeof child !== "boolean") {
351
487
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
352
488
  child = String(child);
353
- } else if (BUILD7.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
489
+ } else if (BUILD8.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
354
490
  consoleDevError(`vNode passed as children has unexpected type.
355
491
  Make sure it's using the correct h() function.
356
492
  Empty objects can also be the cause, look for JSX comments that became objects.`);
@@ -366,28 +502,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
366
502
  };
367
503
  walk(children);
368
504
  if (vnodeData) {
369
- if (BUILD7.isDev && nodeName === "input") {
505
+ if (BUILD8.isDev && nodeName === "input") {
370
506
  validateInputProperties(vnodeData);
371
507
  }
372
- if (BUILD7.vdomKey && vnodeData.key) {
508
+ if (BUILD8.vdomKey && vnodeData.key) {
373
509
  key = vnodeData.key;
374
510
  }
375
- if (BUILD7.slotRelocation && vnodeData.name) {
511
+ if (BUILD8.slotRelocation && vnodeData.name) {
376
512
  slotName = vnodeData.name;
377
513
  }
378
- if (BUILD7.vdomClass) {
514
+ if (BUILD8.vdomClass) {
379
515
  const classData = vnodeData.className || vnodeData.class;
380
516
  if (classData) {
381
517
  vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
382
518
  }
383
519
  }
384
520
  }
385
- if (BUILD7.isDev && vNodeChildren.some(isHost)) {
521
+ if (BUILD8.isDev && vNodeChildren.some(isHost)) {
386
522
  consoleDevError(`The <Host> must be the single root component. Make sure:
387
523
  - You are NOT using hostData() and <Host> in the same component.
388
524
  - <Host> is used once, and it's the single root component of the render() function.`);
389
525
  }
390
- if (BUILD7.vdomFunctional && typeof nodeName === "function") {
526
+ if (BUILD8.vdomFunctional && typeof nodeName === "function") {
391
527
  return nodeName(
392
528
  vnodeData === null ? {} : vnodeData,
393
529
  vNodeChildren,
@@ -399,10 +535,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
399
535
  if (vNodeChildren.length > 0) {
400
536
  vnode.$children$ = vNodeChildren;
401
537
  }
402
- if (BUILD7.vdomKey) {
538
+ if (BUILD8.vdomKey) {
403
539
  vnode.$key$ = key;
404
540
  }
405
- if (BUILD7.slotRelocation) {
541
+ if (BUILD8.slotRelocation) {
406
542
  vnode.$name$ = slotName;
407
543
  }
408
544
  return vnode;
@@ -415,13 +551,13 @@ var newVNode = (tag, text) => {
415
551
  $elm$: null,
416
552
  $children$: null
417
553
  };
418
- if (BUILD7.vdomAttribute) {
554
+ if (BUILD8.vdomAttribute) {
419
555
  vnode.$attrs$ = null;
420
556
  }
421
- if (BUILD7.vdomKey) {
557
+ if (BUILD8.vdomKey) {
422
558
  vnode.$key$ = null;
423
559
  }
424
- if (BUILD7.slotRelocation) {
560
+ if (BUILD8.slotRelocation) {
425
561
  vnode.$name$ = null;
426
562
  }
427
563
  return vnode;
@@ -474,28 +610,35 @@ var validateInputProperties = (inputElm) => {
474
610
  };
475
611
 
476
612
  // src/runtime/vdom/update-element.ts
477
- import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
613
+ import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
478
614
 
479
615
  // src/runtime/vdom/set-accessor.ts
480
- import { BUILD as BUILD8 } from "@stencil/core/internal/app-data";
616
+ import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
481
617
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
482
618
  if (oldValue !== newValue) {
483
619
  let isProp = isMemberInElement(elm, memberName);
484
620
  let ln = memberName.toLowerCase();
485
- if (BUILD8.vdomClass && memberName === "class") {
621
+ if (BUILD9.vdomClass && memberName === "class") {
486
622
  const classList = elm.classList;
487
623
  const oldClasses = parseClassList(oldValue);
488
- const newClasses = parseClassList(newValue);
489
- if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
624
+ let newClasses = parseClassList(newValue);
625
+ if (elm["s-si"]) {
490
626
  newClasses.push(elm["s-si"]);
627
+ oldClasses.forEach((c) => {
628
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
629
+ });
630
+ newClasses = [...new Set(newClasses)];
631
+ classList.add(...newClasses);
632
+ delete elm["s-si"];
633
+ } else {
634
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
635
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
491
636
  }
492
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
493
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
494
- } else if (BUILD8.vdomStyle && memberName === "style") {
495
- if (BUILD8.updatable) {
637
+ } else if (BUILD9.vdomStyle && memberName === "style") {
638
+ if (BUILD9.updatable) {
496
639
  for (const prop in oldValue) {
497
640
  if (!newValue || newValue[prop] == null) {
498
- if (!BUILD8.hydrateServerSide && prop.includes("-")) {
641
+ if (!BUILD9.hydrateServerSide && prop.includes("-")) {
499
642
  elm.style.removeProperty(prop);
500
643
  } else {
501
644
  elm.style[prop] = "";
@@ -505,19 +648,19 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
505
648
  }
506
649
  for (const prop in newValue) {
507
650
  if (!oldValue || newValue[prop] !== oldValue[prop]) {
508
- if (!BUILD8.hydrateServerSide && prop.includes("-")) {
651
+ if (!BUILD9.hydrateServerSide && prop.includes("-")) {
509
652
  elm.style.setProperty(prop, newValue[prop]);
510
653
  } else {
511
654
  elm.style[prop] = newValue[prop];
512
655
  }
513
656
  }
514
657
  }
515
- } else if (BUILD8.vdomKey && memberName === "key") {
516
- } else if (BUILD8.vdomRef && memberName === "ref") {
658
+ } else if (BUILD9.vdomKey && memberName === "key") {
659
+ } else if (BUILD9.vdomRef && memberName === "ref") {
517
660
  if (newValue) {
518
661
  newValue(elm);
519
662
  }
520
- } else if (BUILD8.vdomListener && (BUILD8.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
663
+ } else if (BUILD9.vdomListener && (BUILD9.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
521
664
  if (memberName[2] === "-") {
522
665
  memberName = memberName.slice(3);
523
666
  } else if (isMemberInElement(win, ln)) {
@@ -535,7 +678,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
535
678
  plt.ael(elm, memberName, newValue, capture);
536
679
  }
537
680
  }
538
- } else if (BUILD8.vdomPropOrAttr) {
681
+ } else if (BUILD9.vdomPropOrAttr) {
539
682
  const isComplex = isComplexType(newValue);
540
683
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
541
684
  try {
@@ -557,7 +700,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
557
700
  }
558
701
  }
559
702
  let xlink = false;
560
- if (BUILD8.vdomXlink) {
703
+ if (BUILD9.vdomXlink) {
561
704
  if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
562
705
  memberName = ln;
563
706
  xlink = true;
@@ -565,7 +708,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
565
708
  }
566
709
  if (newValue == null || newValue === false) {
567
710
  if (newValue !== false || elm.getAttribute(memberName) === "") {
568
- if (BUILD8.vdomXlink && xlink) {
711
+ if (BUILD9.vdomXlink && xlink) {
569
712
  elm.removeAttributeNS(XLINK_NS, memberName);
570
713
  } else {
571
714
  elm.removeAttribute(memberName);
@@ -573,7 +716,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
573
716
  }
574
717
  } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
575
718
  newValue = newValue === true ? "" : newValue;
576
- if (BUILD8.vdomXlink && xlink) {
719
+ if (BUILD9.vdomXlink && xlink) {
577
720
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
578
721
  } else {
579
722
  elm.setAttribute(memberName, newValue);
@@ -600,7 +743,7 @@ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
600
743
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
601
744
  const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
602
745
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
603
- if (BUILD9.updatable) {
746
+ if (BUILD10.updatable) {
604
747
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
605
748
  if (!(memberName in newVnodeAttrs)) {
606
749
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
@@ -629,19 +772,16 @@ var useNativeShadowDom = false;
629
772
  var checkSlotFallbackVisibility = false;
630
773
  var checkSlotRelocate = false;
631
774
  var isSvgMode = false;
632
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
775
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
633
776
  var _a;
634
777
  const newVNode2 = newParentVNode.$children$[childIndex];
635
778
  let i2 = 0;
636
779
  let elm;
637
780
  let childNode;
638
781
  let oldVNode;
639
- if (BUILD10.slotRelocation && !useNativeShadowDom) {
782
+ if (BUILD11.slotRelocation && !useNativeShadowDom) {
640
783
  checkSlotRelocate = true;
641
784
  if (newVNode2.$tag$ === "slot") {
642
- if (scopeId) {
643
- parentElm.classList.add(scopeId + "-s");
644
- }
645
785
  newVNode2.$flags$ |= newVNode2.$children$ ? (
646
786
  // slot element has fallback content
647
787
  // still create an element that "mocks" the slot element
@@ -654,48 +794,43 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
654
794
  );
655
795
  }
656
796
  }
657
- if (BUILD10.isDev && newVNode2.$elm$) {
797
+ if (BUILD11.isDev && newVNode2.$elm$) {
658
798
  consoleDevError(
659
799
  `The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`
660
800
  );
661
801
  }
662
- if (BUILD10.vdomText && newVNode2.$text$ !== null) {
802
+ if (BUILD11.vdomText && newVNode2.$text$ !== null) {
663
803
  elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
664
- } else if (BUILD10.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
665
- elm = newVNode2.$elm$ = BUILD10.isDebug || BUILD10.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
804
+ } else if (BUILD11.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
805
+ elm = newVNode2.$elm$ = BUILD11.isDebug || BUILD11.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
666
806
  } else {
667
- if (BUILD10.svg && !isSvgMode) {
807
+ if (BUILD11.svg && !isSvgMode) {
668
808
  isSvgMode = newVNode2.$tag$ === "svg";
669
809
  }
670
- elm = newVNode2.$elm$ = BUILD10.svg ? doc.createElementNS(
810
+ elm = newVNode2.$elm$ = BUILD11.svg ? doc.createElementNS(
671
811
  isSvgMode ? SVG_NS : HTML_NS,
672
- !useNativeShadowDom && BUILD10.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
812
+ !useNativeShadowDom && BUILD11.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
673
813
  ) : doc.createElement(
674
- !useNativeShadowDom && BUILD10.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
814
+ !useNativeShadowDom && BUILD11.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
675
815
  );
676
- if (BUILD10.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
816
+ if (BUILD11.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
677
817
  isSvgMode = false;
678
818
  }
679
- if (BUILD10.vdomAttribute) {
819
+ if (BUILD11.vdomAttribute) {
680
820
  updateElement(null, newVNode2, isSvgMode);
681
821
  }
682
- const rootNode = elm.getRootNode();
683
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
684
- if (!isElementWithinShadowRoot && BUILD10.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
822
+ if (BUILD11.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
685
823
  elm.classList.add(elm["s-si"] = scopeId);
686
824
  }
687
- if (BUILD10.scoped) {
688
- updateElementScopeIds(elm, parentElm);
689
- }
690
825
  if (newVNode2.$children$) {
691
826
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
692
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
827
+ childNode = createElm(oldParentVNode, newVNode2, i2);
693
828
  if (childNode) {
694
829
  elm.appendChild(childNode);
695
830
  }
696
831
  }
697
832
  }
698
- if (BUILD10.svg) {
833
+ if (BUILD11.svg) {
699
834
  if (newVNode2.$tag$ === "svg") {
700
835
  isSvgMode = false;
701
836
  } else if (elm.tagName === "foreignObject") {
@@ -704,7 +839,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
704
839
  }
705
840
  }
706
841
  elm["s-hn"] = hostTagName;
707
- if (BUILD10.slotRelocation) {
842
+ if (BUILD11.slotRelocation) {
708
843
  if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
709
844
  elm["s-sr"] = true;
710
845
  elm["s-cr"] = contentRef;
@@ -712,12 +847,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
712
847
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
713
848
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
714
849
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
715
- if (BUILD10.experimentalSlotFixes) {
850
+ if (BUILD11.experimentalSlotFixes) {
716
851
  relocateToHostRoot(oldParentVNode.$elm$);
717
852
  } else {
718
853
  putBackInOriginalLocation(oldParentVNode.$elm$, false);
719
854
  }
720
855
  }
856
+ if (BUILD11.scoped) {
857
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
858
+ }
721
859
  }
722
860
  }
723
861
  return elm;
@@ -745,7 +883,7 @@ var relocateToHostRoot = (parentElm) => {
745
883
  var putBackInOriginalLocation = (parentElm, recursive) => {
746
884
  plt.$flags$ |= 1 /* isTmpDisconnected */;
747
885
  const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
748
- if (parentElm["s-sr"] && BUILD10.experimentalSlotFixes) {
886
+ if (parentElm["s-sr"] && BUILD11.experimentalSlotFixes) {
749
887
  let node = parentElm;
750
888
  while (node = node.nextSibling) {
751
889
  if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
@@ -756,7 +894,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
756
894
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
757
895
  const childNode = oldSlotChildNodes[i2];
758
896
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
759
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
897
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
760
898
  childNode["s-ol"].remove();
761
899
  childNode["s-ol"] = void 0;
762
900
  childNode["s-sh"] = void 0;
@@ -769,17 +907,17 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
769
907
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
770
908
  };
771
909
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
772
- let containerElm = BUILD10.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
910
+ let containerElm = BUILD11.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
773
911
  let childNode;
774
- if (BUILD10.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
912
+ if (BUILD11.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
775
913
  containerElm = containerElm.shadowRoot;
776
914
  }
777
915
  for (; startIdx <= endIdx; ++startIdx) {
778
916
  if (vnodes[startIdx]) {
779
- childNode = createElm(null, parentVNode, startIdx, parentElm);
917
+ childNode = createElm(null, parentVNode, startIdx);
780
918
  if (childNode) {
781
919
  vnodes[startIdx].$elm$ = childNode;
782
- insertBefore(containerElm, childNode, BUILD10.slotRelocation ? referenceNode(before) : before);
920
+ insertBefore(containerElm, childNode, BUILD11.slotRelocation ? referenceNode(before) : before);
783
921
  }
784
922
  }
785
923
  }
@@ -791,7 +929,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
791
929
  const elm = vnode.$elm$;
792
930
  nullifyVNodeRefs(vnode);
793
931
  if (elm) {
794
- if (BUILD10.slotRelocation) {
932
+ if (BUILD11.slotRelocation) {
795
933
  checkSlotFallbackVisibility = true;
796
934
  if (elm["s-ol"]) {
797
935
  elm["s-ol"].remove();
@@ -835,7 +973,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
835
973
  oldEndVnode = oldCh[--oldEndIdx];
836
974
  newEndVnode = newCh[--newEndIdx];
837
975
  } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
838
- if (BUILD10.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
976
+ if (BUILD11.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
839
977
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
840
978
  }
841
979
  patch(oldStartVnode, newEndVnode, isInitialRender);
@@ -843,7 +981,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
843
981
  oldStartVnode = oldCh[++oldStartIdx];
844
982
  newEndVnode = newCh[--newEndIdx];
845
983
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
846
- if (BUILD10.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
984
+ if (BUILD11.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
847
985
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
848
986
  }
849
987
  patch(oldEndVnode, newStartVnode, isInitialRender);
@@ -852,7 +990,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
852
990
  newStartVnode = newCh[++newStartIdx];
853
991
  } else {
854
992
  idxInOld = -1;
855
- if (BUILD10.vdomKey) {
993
+ if (BUILD11.vdomKey) {
856
994
  for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
857
995
  if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
858
996
  idxInOld = i2;
@@ -860,10 +998,10 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
860
998
  }
861
999
  }
862
1000
  }
863
- if (BUILD10.vdomKey && idxInOld >= 0) {
1001
+ if (BUILD11.vdomKey && idxInOld >= 0) {
864
1002
  elmToMove = oldCh[idxInOld];
865
1003
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
866
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
1004
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
867
1005
  } else {
868
1006
  patch(elmToMove, newStartVnode, isInitialRender);
869
1007
  oldCh[idxInOld] = void 0;
@@ -871,12 +1009,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
871
1009
  }
872
1010
  newStartVnode = newCh[++newStartIdx];
873
1011
  } else {
874
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
1012
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
875
1013
  newStartVnode = newCh[++newStartIdx];
876
1014
  }
877
1015
  if (node) {
878
- if (BUILD10.slotRelocation) {
879
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1016
+ if (BUILD11.slotRelocation) {
1017
+ insertBefore(
1018
+ referenceNode(oldStartVnode.$elm$).parentNode,
1019
+ node,
1020
+ referenceNode(oldStartVnode.$elm$)
1021
+ );
880
1022
  } else {
881
1023
  insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
882
1024
  }
@@ -892,35 +1034,26 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
892
1034
  newStartIdx,
893
1035
  newEndIdx
894
1036
  );
895
- } else if (BUILD10.updatable && newStartIdx > newEndIdx) {
1037
+ } else if (BUILD11.updatable && newStartIdx > newEndIdx) {
896
1038
  removeVnodes(oldCh, oldStartIdx, oldEndIdx);
897
1039
  }
898
1040
  };
899
1041
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
900
1042
  if (leftVNode.$tag$ === rightVNode.$tag$) {
901
- if (BUILD10.slotRelocation && leftVNode.$tag$ === "slot") {
902
- if (
903
- // The component gets hydrated and no VDOM has been initialized.
904
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
905
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
906
- // hydration comments to be removed
907
- leftVNode.$elm$.nodeType !== 8
908
- ) {
909
- return false;
910
- }
1043
+ if (BUILD11.slotRelocation && leftVNode.$tag$ === "slot") {
911
1044
  return leftVNode.$name$ === rightVNode.$name$;
912
1045
  }
913
- if (BUILD10.vdomKey && !isInitialRender) {
1046
+ if (BUILD11.vdomKey && !isInitialRender) {
914
1047
  return leftVNode.$key$ === rightVNode.$key$;
915
1048
  }
1049
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1050
+ leftVNode.$key$ = rightVNode.$key$;
1051
+ }
916
1052
  return true;
917
1053
  }
918
1054
  return false;
919
1055
  };
920
- var referenceNode = (node) => {
921
- return node && node["s-ol"] || node;
922
- };
923
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
1056
+ var referenceNode = (node) => node && node["s-ol"] || node;
924
1057
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
925
1058
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
926
1059
  const oldChildren = oldVNode.$children$;
@@ -928,13 +1061,13 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
928
1061
  const tag = newVNode2.$tag$;
929
1062
  const text = newVNode2.$text$;
930
1063
  let defaultHolder;
931
- if (!BUILD10.vdomText || text === null) {
932
- if (BUILD10.svg) {
1064
+ if (!BUILD11.vdomText || text === null) {
1065
+ if (BUILD11.svg) {
933
1066
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
934
1067
  }
935
- if (BUILD10.vdomAttribute || BUILD10.reflect) {
936
- if (BUILD10.slot && tag === "slot" && !useNativeShadowDom) {
937
- if (BUILD10.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
1068
+ if (BUILD11.vdomAttribute || BUILD11.reflect) {
1069
+ if (BUILD11.slot && tag === "slot" && !useNativeShadowDom) {
1070
+ if (BUILD11.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
938
1071
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
939
1072
  relocateToHostRoot(newVNode2.$elm$.parentElement);
940
1073
  }
@@ -942,55 +1075,28 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
942
1075
  updateElement(oldVNode, newVNode2, isSvgMode);
943
1076
  }
944
1077
  }
945
- if (BUILD10.updatable && oldChildren !== null && newChildren !== null) {
1078
+ if (BUILD11.updatable && oldChildren !== null && newChildren !== null) {
946
1079
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
947
1080
  } else if (newChildren !== null) {
948
- if (BUILD10.updatable && BUILD10.vdomText && oldVNode.$text$ !== null) {
1081
+ if (BUILD11.updatable && BUILD11.vdomText && oldVNode.$text$ !== null) {
949
1082
  elm.textContent = "";
950
1083
  }
951
1084
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
952
1085
  } else if (
953
1086
  // don't do this on initial render as it can cause non-hydrated content to be removed
954
- !isInitialRender && BUILD10.updatable && oldChildren !== null
1087
+ !isInitialRender && BUILD11.updatable && oldChildren !== null
955
1088
  ) {
956
1089
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
957
1090
  }
958
- if (BUILD10.svg && isSvgMode && tag === "svg") {
1091
+ if (BUILD11.svg && isSvgMode && tag === "svg") {
959
1092
  isSvgMode = false;
960
1093
  }
961
- } else if (BUILD10.vdomText && BUILD10.slotRelocation && (defaultHolder = elm["s-cr"])) {
1094
+ } else if (BUILD11.vdomText && BUILD11.slotRelocation && (defaultHolder = elm["s-cr"])) {
962
1095
  defaultHolder.parentNode.textContent = text;
963
- } else if (BUILD10.vdomText && oldVNode.$text$ !== text) {
1096
+ } else if (BUILD11.vdomText && oldVNode.$text$ !== text) {
964
1097
  elm.data = text;
965
1098
  }
966
1099
  };
967
- var updateFallbackSlotVisibility = (elm) => {
968
- const childNodes = elm.__childNodes || elm.childNodes;
969
- for (const childNode of childNodes) {
970
- if (childNode.nodeType === 1 /* ElementNode */) {
971
- if (childNode["s-sr"]) {
972
- const slotName = childNode["s-sn"];
973
- childNode.hidden = false;
974
- for (const siblingNode of childNodes) {
975
- if (siblingNode !== childNode) {
976
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
977
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
978
- childNode.hidden = true;
979
- break;
980
- }
981
- } else if (slotName === siblingNode["s-sn"]) {
982
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
983
- childNode.hidden = true;
984
- break;
985
- }
986
- }
987
- }
988
- }
989
- }
990
- updateFallbackSlotVisibility(childNode);
991
- }
992
- }
993
- };
994
1100
  var relocateNodes = [];
995
1101
  var markSlotContentForRelocation = (elm) => {
996
1102
  let node;
@@ -1003,7 +1109,7 @@ var markSlotContentForRelocation = (elm) => {
1003
1109
  const slotName = childNode["s-sn"];
1004
1110
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1005
1111
  node = hostContentNodes[j];
1006
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD10.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1112
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD11.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1007
1113
  if (isNodeLocatedInSlot(node, slotName)) {
1008
1114
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1009
1115
  checkSlotFallbackVisibility = true;
@@ -1041,60 +1147,40 @@ var markSlotContentForRelocation = (elm) => {
1041
1147
  }
1042
1148
  }
1043
1149
  };
1044
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1045
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1046
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1047
- return true;
1048
- }
1049
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1050
- return true;
1051
- }
1052
- return false;
1053
- }
1054
- if (nodeToRelocate["s-sn"] === slotName) {
1055
- return true;
1056
- }
1057
- return slotName === "";
1058
- };
1059
1150
  var nullifyVNodeRefs = (vNode) => {
1060
- if (BUILD10.vdomRef) {
1151
+ if (BUILD11.vdomRef) {
1061
1152
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1062
1153
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1063
1154
  }
1064
1155
  };
1065
1156
  var insertBefore = (parent, newNode, reference) => {
1066
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1067
- if (BUILD10.scoped) {
1068
- updateElementScopeIds(newNode, parent);
1157
+ if (BUILD11.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
1158
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1069
1159
  }
1160
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1070
1161
  return inserted;
1071
1162
  };
1072
- var findScopeIds = (element) => {
1073
- const scopeIds = [];
1074
- if (element) {
1075
- scopeIds.push(
1076
- ...element["s-scs"] || [],
1077
- element["s-si"],
1078
- element["s-sc"],
1079
- ...findScopeIds(element.parentElement)
1080
- );
1081
- }
1082
- return scopeIds;
1083
- };
1084
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1163
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1085
1164
  var _a;
1086
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1087
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1088
- if (scopeIds.size) {
1089
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1090
- if (element["s-ol"] || iterateChildNodes) {
1091
- for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1092
- updateElementScopeIds(childNode, element, true);
1165
+ let scopeId2;
1166
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
1167
+ const scopeName = slotNode["s-sn"];
1168
+ const hostName = slotNode["s-hn"];
1169
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
1170
+ if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
1171
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
1172
+ let found = false;
1173
+ while (child) {
1174
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
1175
+ found = true;
1176
+ break;
1093
1177
  }
1178
+ child = child.nextSibling;
1094
1179
  }
1180
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1095
1181
  }
1096
1182
  }
1097
- };
1183
+ }
1098
1184
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1099
1185
  var _a, _b, _c, _d, _e;
1100
1186
  const hostElm = hostRef.$hostElement$;
@@ -1102,7 +1188,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1102
1188
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1103
1189
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1104
1190
  hostTagName = hostElm.tagName;
1105
- if (BUILD10.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1191
+ if (BUILD11.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1106
1192
  throw new Error(`The <Host> must be the single root component.
1107
1193
  Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
1108
1194
 
@@ -1116,7 +1202,7 @@ render() {
1116
1202
  }
1117
1203
  `);
1118
1204
  }
1119
- if (BUILD10.reflect && cmpMeta.$attrsToReflect$) {
1205
+ if (BUILD11.reflect && cmpMeta.$attrsToReflect$) {
1120
1206
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1121
1207
  cmpMeta.$attrsToReflect$.map(
1122
1208
  ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
@@ -1132,24 +1218,24 @@ render() {
1132
1218
  rootVnode.$tag$ = null;
1133
1219
  rootVnode.$flags$ |= 4 /* isHost */;
1134
1220
  hostRef.$vnode$ = rootVnode;
1135
- rootVnode.$elm$ = oldVNode.$elm$ = BUILD10.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1136
- if (BUILD10.scoped || BUILD10.shadowDom) {
1221
+ rootVnode.$elm$ = oldVNode.$elm$ = BUILD11.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1222
+ if (BUILD11.scoped || BUILD11.shadowDom) {
1137
1223
  scopeId = hostElm["s-sc"];
1138
1224
  }
1139
1225
  useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1140
- if (BUILD10.slotRelocation) {
1226
+ if (BUILD11.slotRelocation) {
1141
1227
  contentRef = hostElm["s-cr"];
1142
1228
  checkSlotFallbackVisibility = false;
1143
1229
  }
1144
1230
  patch(oldVNode, rootVnode, isInitialLoad);
1145
- if (BUILD10.slotRelocation) {
1231
+ if (BUILD11.slotRelocation) {
1146
1232
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1147
1233
  if (checkSlotRelocate) {
1148
1234
  markSlotContentForRelocation(rootVnode.$elm$);
1149
1235
  for (const relocateData of relocateNodes) {
1150
1236
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1151
1237
  if (!nodeToRelocate["s-ol"]) {
1152
- const orgLocationNode = BUILD10.isDebug || BUILD10.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1238
+ const orgLocationNode = BUILD11.isDebug || BUILD11.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1153
1239
  orgLocationNode["s-nr"] = nodeToRelocate;
1154
1240
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1155
1241
  }
@@ -1160,7 +1246,7 @@ render() {
1160
1246
  if (slotRefNode) {
1161
1247
  const parentNodeRef = slotRefNode.parentNode;
1162
1248
  let insertBeforeNode = slotRefNode.nextSibling;
1163
- if (!BUILD10.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1249
+ if (!BUILD11.hydrateServerSide && (!BUILD11.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1164
1250
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1165
1251
  while (orgLocationNode) {
1166
1252
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1179,11 +1265,11 @@ render() {
1179
1265
  }
1180
1266
  if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1181
1267
  if (nodeToRelocate !== insertBeforeNode) {
1182
- if (!BUILD10.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1268
+ if (!BUILD11.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1183
1269
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1184
1270
  }
1185
1271
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1186
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1272
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1187
1273
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1188
1274
  }
1189
1275
  }
@@ -1205,7 +1291,7 @@ render() {
1205
1291
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
1206
1292
  relocateNodes.length = 0;
1207
1293
  }
1208
- if (BUILD10.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1294
+ if (BUILD11.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1209
1295
  const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1210
1296
  for (const childNode of children) {
1211
1297
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
@@ -1242,9 +1328,9 @@ var patchCloneNode = (HostElementPrototype) => {
1242
1328
  const orgCloneNode = HostElementPrototype.cloneNode;
1243
1329
  HostElementPrototype.cloneNode = function(deep) {
1244
1330
  const srcNode = this;
1245
- const isShadowDom = BUILD11.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1331
+ const isShadowDom = BUILD12.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1246
1332
  const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1247
- if (BUILD11.slot && !isShadowDom && deep) {
1333
+ if (BUILD12.slot && !isShadowDom && deep) {
1248
1334
  let i2 = 0;
1249
1335
  let slotted, nonStencilNode;
1250
1336
  const stencilPrivates = [
@@ -1269,7 +1355,7 @@ var patchCloneNode = (HostElementPrototype) => {
1269
1355
  slotted = childNodes[i2]["s-nr"];
1270
1356
  nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1271
1357
  if (slotted) {
1272
- if (BUILD11.appendChildSlotFix && clonedNode.__appendChild) {
1358
+ if (BUILD12.appendChildSlotFix && clonedNode.__appendChild) {
1273
1359
  clonedNode.__appendChild(slotted.cloneNode(true));
1274
1360
  } else {
1275
1361
  clonedNode.appendChild(slotted.cloneNode(true));
@@ -1287,7 +1373,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
1287
1373
  HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1288
1374
  HostElementPrototype.appendChild = function(newChild) {
1289
1375
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1290
- const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
1376
+ const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1291
1377
  if (slotNode) {
1292
1378
  addSlotRelocateNode(newChild, slotNode);
1293
1379
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1304,7 +1390,7 @@ var patchSlotRemoveChild = (ElementPrototype) => {
1304
1390
  ElementPrototype.removeChild = function(toRemove) {
1305
1391
  if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1306
1392
  const childNodes = this.__childNodes || this.childNodes;
1307
- const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
1393
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1308
1394
  if (slotNode && toRemove.isConnected) {
1309
1395
  toRemove.remove();
1310
1396
  updateFallbackSlotVisibility(this);
@@ -1323,7 +1409,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
1323
1409
  }
1324
1410
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1325
1411
  const childNodes = this.__childNodes || this.childNodes;
1326
- const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
1412
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1327
1413
  if (slotNode) {
1328
1414
  addSlotRelocateNode(newChild, slotNode, true);
1329
1415
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1541,77 +1627,12 @@ function patchHostOriginalAccessor(accessorName, node) {
1541
1627
  }
1542
1628
  if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1543
1629
  }
1544
- var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1545
- let slottedNodeLocation;
1546
- if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1547
- slottedNodeLocation = newChild["s-ol"];
1548
- } else {
1549
- slottedNodeLocation = document.createTextNode("");
1550
- slottedNodeLocation["s-nr"] = newChild;
1551
- }
1552
- if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1553
- const parent = slotNode["s-cr"].parentNode;
1554
- const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1555
- if (typeof position !== "undefined") {
1556
- if (BUILD11.hydrateClientSide) {
1557
- slottedNodeLocation["s-oo"] = position;
1558
- const childNodes = parent.__childNodes || parent.childNodes;
1559
- const slotRelocateNodes = [slottedNodeLocation];
1560
- childNodes.forEach((n) => {
1561
- if (n["s-nr"]) slotRelocateNodes.push(n);
1562
- });
1563
- slotRelocateNodes.sort((a, b) => {
1564
- if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1565
- else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1566
- return 0;
1567
- });
1568
- slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1569
- }
1570
- } else {
1571
- appendMethod.call(parent, slottedNodeLocation);
1572
- }
1573
- newChild["s-ol"] = slottedNodeLocation;
1574
- newChild["s-sh"] = slotNode["s-hn"];
1575
- };
1576
- var getSlottedChildNodes = (childNodes) => {
1577
- const result = [];
1578
- for (let i2 = 0; i2 < childNodes.length; i2++) {
1579
- const slottedNode = childNodes[i2]["s-nr"];
1580
- if (slottedNode && slottedNode.isConnected) {
1581
- result.push(slottedNode);
1582
- }
1583
- }
1584
- return result;
1585
- };
1586
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
1587
- var getHostSlotNode = (childNodes, slotName, hostName) => {
1588
- let i2 = 0;
1589
- let childNode;
1590
- for (; i2 < childNodes.length; i2++) {
1591
- childNode = childNodes[i2];
1592
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
1593
- return childNode;
1594
- }
1595
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
1596
- if (childNode) {
1597
- return childNode;
1598
- }
1599
- }
1600
- return null;
1601
- };
1602
- var getHostSlotChildNodes = (n, slotName) => {
1603
- const childNodes = [n];
1604
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
1605
- childNodes.push(n);
1606
- }
1607
- return childNodes;
1608
- };
1609
1630
 
1610
1631
  // src/runtime/profile.ts
1611
- import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
1632
+ import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
1612
1633
  var i = 0;
1613
1634
  var createTime = (fnName, tagName = "") => {
1614
- if (BUILD12.profile && performance.mark) {
1635
+ if (BUILD13.profile && performance.mark) {
1615
1636
  const key = `st:${fnName}:${tagName}:${i++}`;
1616
1637
  performance.mark(key);
1617
1638
  return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
@@ -1622,7 +1643,7 @@ var createTime = (fnName, tagName = "") => {
1622
1643
  }
1623
1644
  };
1624
1645
  var uniqueTime = (key, measureText) => {
1625
- if (BUILD12.profile && performance.mark) {
1646
+ if (BUILD13.profile && performance.mark) {
1626
1647
  if (performance.getEntriesByName(key, "mark").length === 0) {
1627
1648
  performance.mark(key);
1628
1649
  }
@@ -1680,7 +1701,7 @@ var inspect = (ref) => {
1680
1701
  };
1681
1702
  };
1682
1703
  var installDevTools = () => {
1683
- if (BUILD12.devTools) {
1704
+ if (BUILD13.devTools) {
1684
1705
  const stencil = win.stencil = win.stencil || {};
1685
1706
  const originalInspect = stencil.inspect;
1686
1707
  stencil.inspect = (ref) => {
@@ -1700,9 +1721,19 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1700
1721
  const childRenderNodes = [];
1701
1722
  const slotNodes = [];
1702
1723
  const slottedNodes = [];
1703
- const shadowRootNodes = BUILD13.shadowDom && shadowRoot ? [] : null;
1724
+ const shadowRootNodes = BUILD14.shadowDom && shadowRoot ? [] : null;
1704
1725
  const vnode = newVNode(tagName, null);
1705
1726
  vnode.$elm$ = hostElm;
1727
+ let scopeId2;
1728
+ if (BUILD14.scoped) {
1729
+ const cmpMeta = hostRef.$cmpMeta$;
1730
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1731
+ scopeId2 = hostElm["s-sc"];
1732
+ hostElm.classList.add(scopeId2 + "-h");
1733
+ } else if (hostElm["s-sc"]) {
1734
+ delete hostElm["s-sc"];
1735
+ }
1736
+ }
1706
1737
  if (!plt.$orgLocNodes$) {
1707
1738
  initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1708
1739
  }
@@ -1732,6 +1763,18 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1732
1763
  node["s-cr"] = hostElm["s-cr"];
1733
1764
  }
1734
1765
  }
1766
+ if (childRenderNode.$tag$ === "slot") {
1767
+ if (childRenderNode.$children$) {
1768
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1769
+ if (!childRenderNode.$elm$.childNodes.length) {
1770
+ childRenderNode.$children$.forEach((c) => {
1771
+ childRenderNode.$elm$.appendChild(c.$elm$);
1772
+ });
1773
+ }
1774
+ } else {
1775
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1776
+ }
1777
+ }
1735
1778
  if (orgLocationNode && orgLocationNode.isConnected) {
1736
1779
  if (shadowRoot && orgLocationNode["s-en"] === "") {
1737
1780
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
@@ -1744,8 +1787,8 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1744
1787
  plt.$orgLocNodes$.delete(orgLocationId);
1745
1788
  }
1746
1789
  const hosts = [];
1747
- let snIndex = 0;
1748
1790
  const snLen = slottedNodes.length;
1791
+ let snIndex = 0;
1749
1792
  let slotGroup;
1750
1793
  let snGroupIdx;
1751
1794
  let snGroupLen;
@@ -1767,11 +1810,10 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1767
1810
  if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1768
1811
  slottedItem.slot["s-cr"] = hostEle;
1769
1812
  } else {
1770
- const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1771
- slottedItem.slot["s-cr"] = hostChildren[0];
1813
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1772
1814
  }
1773
1815
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1774
- if (BUILD13.experimentalSlotFixes) {
1816
+ if (BUILD14.experimentalSlotFixes) {
1775
1817
  patchNextPrev(slottedItem.node);
1776
1818
  }
1777
1819
  }
@@ -1780,7 +1822,12 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1780
1822
  }
1781
1823
  }
1782
1824
  }
1783
- if (BUILD13.shadowDom && shadowRoot) {
1825
+ if (BUILD14.scoped && scopeId2 && slotNodes.length) {
1826
+ slotNodes.forEach((slot) => {
1827
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1828
+ });
1829
+ }
1830
+ if (BUILD14.shadowDom && shadowRoot) {
1784
1831
  let rnIdex = 0;
1785
1832
  const rnLen = shadowRootNodes.length;
1786
1833
  for (rnIdex; rnIdex < rnLen; rnIdex++) {
@@ -1814,15 +1861,19 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1814
1861
  $index$: childIdSplt[3],
1815
1862
  $tag$: node.tagName.toLowerCase(),
1816
1863
  $elm$: node,
1817
- // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1818
- // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1819
- $attrs$: { class: node.className }
1864
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1865
+ // won't try to reconcile them. Classes set on the node will be blown away.
1866
+ $attrs$: { class: node.className || "" }
1820
1867
  });
1821
1868
  childRenderNodes.push(childVNode);
1822
1869
  node.removeAttribute(HYDRATE_CHILD_ID);
1823
1870
  if (!parentVNode.$children$) {
1824
1871
  parentVNode.$children$ = [];
1825
1872
  }
1873
+ if (BUILD14.scoped && scopeId2) {
1874
+ node["s-si"] = scopeId2;
1875
+ childVNode.$attrs$.class += " " + scopeId2;
1876
+ }
1826
1877
  const slotName = childVNode.$elm$.getAttribute("s-sn");
1827
1878
  if (typeof slotName === "string") {
1828
1879
  if (childVNode.$tag$ === "slot-fb") {
@@ -1837,6 +1888,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1837
1888
  shadowRootNodes,
1838
1889
  slottedNodes
1839
1890
  );
1891
+ if (BUILD14.scoped && scopeId2) {
1892
+ node.classList.add(scopeId2);
1893
+ }
1840
1894
  }
1841
1895
  childVNode.$elm$["s-sn"] = slotName;
1842
1896
  childVNode.$elm$.removeAttribute("s-sn");
@@ -1844,7 +1898,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1844
1898
  if (childVNode.$index$ !== void 0) {
1845
1899
  parentVNode.$children$[childVNode.$index$] = childVNode;
1846
1900
  }
1847
- if (scopeId2) node["s-si"] = scopeId2;
1848
1901
  parentVNode = childVNode;
1849
1902
  if (shadowRootNodes && childVNode.$depth$ === "0") {
1850
1903
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -1919,8 +1972,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1919
1972
  }
1920
1973
  } else if (childVNode.$hostId$ === hostId) {
1921
1974
  if (childNodeType === SLOT_NODE_ID) {
1922
- childVNode.$tag$ = "slot";
1923
- const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
1975
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1924
1976
  addSlot(
1925
1977
  slotName,
1926
1978
  childIdSplt[2],
@@ -1933,9 +1985,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1933
1985
  slottedNodes
1934
1986
  );
1935
1987
  } else if (childNodeType === CONTENT_REF_ID) {
1936
- if (BUILD13.shadowDom && shadowRootNodes) {
1988
+ if (BUILD14.shadowDom && shadowRootNodes) {
1937
1989
  node.remove();
1938
- } else if (BUILD13.slotRelocation) {
1990
+ } else if (BUILD14.slotRelocation) {
1939
1991
  hostElm["s-cr"] = node;
1940
1992
  node["s-cn"] = true;
1941
1993
  }
@@ -1994,8 +2046,10 @@ var createSimpleVNode = (vnode) => {
1994
2046
  };
1995
2047
  function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1996
2048
  node["s-sr"] = true;
2049
+ childVNode.$name$ = slotName || null;
2050
+ childVNode.$tag$ = "slot";
1997
2051
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1998
- if (BUILD13.shadowDom && shadowRootNodes) {
2052
+ if (BUILD14.shadowDom && shadowRootNodes) {
1999
2053
  const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
2000
2054
  if (childVNode.$name$) {
2001
2055
  childVNode.$elm$.setAttribute("name", slotName);
@@ -2036,7 +2090,7 @@ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =>
2036
2090
  };
2037
2091
 
2038
2092
  // src/runtime/initialize-component.ts
2039
- import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
2093
+ import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
2040
2094
 
2041
2095
  // src/runtime/mode.ts
2042
2096
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
@@ -2044,22 +2098,22 @@ var setMode = (handler) => modeResolutionChain.push(handler);
2044
2098
  var getMode = (ref) => getHostRef(ref).$modeName$;
2045
2099
 
2046
2100
  // src/runtime/proxy-component.ts
2047
- import { BUILD as BUILD20 } from "@stencil/core/internal/app-data";
2101
+ import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
2048
2102
 
2049
2103
  // src/runtime/set-value.ts
2050
- import { BUILD as BUILD19 } from "@stencil/core/internal/app-data";
2104
+ import { BUILD as BUILD20 } from "@stencil/core/internal/app-data";
2051
2105
 
2052
2106
  // src/runtime/parse-property-value.ts
2053
- import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
2107
+ import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
2054
2108
  var parsePropertyValue = (propValue, propType) => {
2055
2109
  if (propValue != null && !isComplexType(propValue)) {
2056
- if (BUILD14.propBoolean && propType & 4 /* Boolean */) {
2110
+ if (BUILD15.propBoolean && propType & 4 /* Boolean */) {
2057
2111
  return propValue === "false" ? false : propValue === "" || !!propValue;
2058
2112
  }
2059
- if (BUILD14.propNumber && propType & 2 /* Number */) {
2113
+ if (BUILD15.propNumber && propType & 2 /* Number */) {
2060
2114
  return parseFloat(propValue);
2061
2115
  }
2062
- if (BUILD14.propString && propType & 1 /* String */) {
2116
+ if (BUILD15.propString && propType & 1 /* String */) {
2063
2117
  return String(propValue);
2064
2118
  }
2065
2119
  return propValue;
@@ -2068,21 +2122,21 @@ var parsePropertyValue = (propValue, propType) => {
2068
2122
  };
2069
2123
 
2070
2124
  // src/runtime/update-component.ts
2071
- import { BUILD as BUILD18, NAMESPACE } from "@stencil/core/internal/app-data";
2125
+ import { BUILD as BUILD19, NAMESPACE } from "@stencil/core/internal/app-data";
2072
2126
 
2073
2127
  // src/runtime/event-emitter.ts
2074
- import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
2128
+ import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
2075
2129
 
2076
2130
  // src/runtime/element.ts
2077
- import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
2078
- var getElement = (ref) => BUILD15.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2131
+ import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
2132
+ var getElement = (ref) => BUILD16.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2079
2133
 
2080
2134
  // src/runtime/event-emitter.ts
2081
2135
  var createEvent = (ref, name, flags) => {
2082
2136
  const elm = getElement(ref);
2083
2137
  return {
2084
2138
  emit: (detail) => {
2085
- if (BUILD16.isDev && !elm.isConnected) {
2139
+ if (BUILD17.isDev && !elm.isConnected) {
2086
2140
  consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
2087
2141
  }
2088
2142
  return emitEvent(elm, name, {
@@ -2101,7 +2155,7 @@ var emitEvent = (elm, name, opts) => {
2101
2155
  };
2102
2156
 
2103
2157
  // src/runtime/styles.ts
2104
- import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
2158
+ import { BUILD as BUILD18 } from "@stencil/core/internal/app-data";
2105
2159
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2106
2160
  var registerStyle = (scopeId2, cssText, allowCS) => {
2107
2161
  let style = styles.get(scopeId2);
@@ -2121,7 +2175,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2121
2175
  var _a;
2122
2176
  const scopeId2 = getScopeId(cmpMeta, mode);
2123
2177
  const style = styles.get(scopeId2);
2124
- if (!BUILD17.attachStyles) {
2178
+ if (!BUILD18.attachStyles) {
2125
2179
  return scopeId2;
2126
2180
  }
2127
2181
  styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
@@ -2134,16 +2188,16 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2134
2188
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2135
2189
  }
2136
2190
  if (!appliedStyles.has(scopeId2)) {
2137
- if (BUILD17.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2191
+ if (BUILD18.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2138
2192
  styleElm.innerHTML = style;
2139
2193
  } else {
2140
- styleElm = doc.createElement("style");
2194
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
2141
2195
  styleElm.innerHTML = style;
2142
2196
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2143
2197
  if (nonce != null) {
2144
2198
  styleElm.setAttribute("nonce", nonce);
2145
2199
  }
2146
- if ((BUILD17.hydrateServerSide || BUILD17.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2200
+ if ((BUILD18.hydrateServerSide || BUILD18.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2147
2201
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2148
2202
  }
2149
2203
  if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
@@ -2179,7 +2233,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2179
2233
  appliedStyles.add(scopeId2);
2180
2234
  }
2181
2235
  }
2182
- } else if (BUILD17.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2236
+ } else if (BUILD18.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2183
2237
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2184
2238
  }
2185
2239
  }
@@ -2191,43 +2245,40 @@ var attachStyles = (hostRef) => {
2191
2245
  const flags = cmpMeta.$flags$;
2192
2246
  const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2193
2247
  const scopeId2 = addStyle(
2194
- BUILD17.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2248
+ BUILD18.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2195
2249
  cmpMeta,
2196
2250
  hostRef.$modeName$
2197
2251
  );
2198
- if ((BUILD17.shadowDom || BUILD17.scoped) && BUILD17.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2252
+ if ((BUILD18.shadowDom || BUILD18.scoped) && BUILD18.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2199
2253
  elm["s-sc"] = scopeId2;
2200
2254
  elm.classList.add(scopeId2 + "-h");
2201
- if (BUILD17.scoped && flags & 2 /* scopedCssEncapsulation */) {
2202
- elm.classList.add(scopeId2 + "-s");
2203
- }
2204
2255
  }
2205
2256
  endAttachStyles();
2206
2257
  };
2207
- var getScopeId = (cmp, mode) => "sc-" + (BUILD17.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2258
+ var getScopeId = (cmp, mode) => "sc-" + (BUILD18.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2208
2259
 
2209
2260
  // src/runtime/update-component.ts
2210
2261
  var attachToAncestor = (hostRef, ancestorComponent) => {
2211
- if (BUILD18.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2262
+ if (BUILD19.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2212
2263
  ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2213
2264
  }
2214
2265
  };
2215
2266
  var scheduleUpdate = (hostRef, isInitialLoad) => {
2216
- if (BUILD18.taskQueue && BUILD18.updatable) {
2267
+ if (BUILD19.taskQueue && BUILD19.updatable) {
2217
2268
  hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
2218
2269
  }
2219
- if (BUILD18.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2270
+ if (BUILD19.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2220
2271
  hostRef.$flags$ |= 512 /* needsRerender */;
2221
2272
  return;
2222
2273
  }
2223
2274
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
2224
2275
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
2225
- return BUILD18.taskQueue ? writeTask(dispatch) : dispatch();
2276
+ return BUILD19.taskQueue ? writeTask(dispatch) : dispatch();
2226
2277
  };
2227
2278
  var dispatchHooks = (hostRef, isInitialLoad) => {
2228
2279
  const elm = hostRef.$hostElement$;
2229
2280
  const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
2230
- const instance = BUILD18.lazyLoad ? hostRef.$lazyInstance$ : elm;
2281
+ const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2231
2282
  if (!instance) {
2232
2283
  throw new Error(
2233
2284
  `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`
@@ -2235,7 +2286,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2235
2286
  }
2236
2287
  let maybePromise;
2237
2288
  if (isInitialLoad) {
2238
- if (BUILD18.lazyLoad && BUILD18.hostListener) {
2289
+ if (BUILD19.lazyLoad && BUILD19.hostListener) {
2239
2290
  hostRef.$flags$ |= 256 /* isListenReady */;
2240
2291
  if (hostRef.$queuedListeners$) {
2241
2292
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
@@ -2243,17 +2294,17 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2243
2294
  }
2244
2295
  }
2245
2296
  emitLifecycleEvent(elm, "componentWillLoad");
2246
- if (BUILD18.cmpWillLoad) {
2297
+ if (BUILD19.cmpWillLoad) {
2247
2298
  maybePromise = safeCall(instance, "componentWillLoad");
2248
2299
  }
2249
2300
  } else {
2250
2301
  emitLifecycleEvent(elm, "componentWillUpdate");
2251
- if (BUILD18.cmpWillUpdate) {
2302
+ if (BUILD19.cmpWillUpdate) {
2252
2303
  maybePromise = safeCall(instance, "componentWillUpdate");
2253
2304
  }
2254
2305
  }
2255
2306
  emitLifecycleEvent(elm, "componentWillRender");
2256
- if (BUILD18.cmpWillRender) {
2307
+ if (BUILD19.cmpWillRender) {
2257
2308
  maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2258
2309
  }
2259
2310
  endSchedule();
@@ -2269,23 +2320,23 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2269
2320
  const elm = hostRef.$hostElement$;
2270
2321
  const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
2271
2322
  const rc = elm["s-rc"];
2272
- if (BUILD18.style && isInitialLoad) {
2323
+ if (BUILD19.style && isInitialLoad) {
2273
2324
  attachStyles(hostRef);
2274
2325
  }
2275
2326
  const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
2276
- if (BUILD18.isDev) {
2327
+ if (BUILD19.isDev) {
2277
2328
  hostRef.$flags$ |= 1024 /* devOnRender */;
2278
2329
  }
2279
- if (BUILD18.hydrateServerSide) {
2330
+ if (BUILD19.hydrateServerSide) {
2280
2331
  await callRender(hostRef, instance, elm, isInitialLoad);
2281
2332
  } else {
2282
2333
  callRender(hostRef, instance, elm, isInitialLoad);
2283
2334
  }
2284
- if (BUILD18.isDev) {
2335
+ if (BUILD19.isDev) {
2285
2336
  hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
2286
2337
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2287
2338
  }
2288
- if (BUILD18.hydrateServerSide) {
2339
+ if (BUILD19.hydrateServerSide) {
2289
2340
  try {
2290
2341
  serverSideConnected(elm);
2291
2342
  if (isInitialLoad) {
@@ -2299,13 +2350,13 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2299
2350
  consoleError(e, elm);
2300
2351
  }
2301
2352
  }
2302
- if (BUILD18.asyncLoading && rc) {
2353
+ if (BUILD19.asyncLoading && rc) {
2303
2354
  rc.map((cb) => cb());
2304
2355
  elm["s-rc"] = void 0;
2305
2356
  }
2306
2357
  endRender();
2307
2358
  endUpdate();
2308
- if (BUILD18.asyncLoading) {
2359
+ if (BUILD19.asyncLoading) {
2309
2360
  const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
2310
2361
  const postUpdate = () => postUpdateComponent(hostRef);
2311
2362
  if (childrenPromises.length === 0) {
@@ -2321,10 +2372,10 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2321
2372
  };
2322
2373
  var renderingRef = null;
2323
2374
  var callRender = (hostRef, instance, elm, isInitialLoad) => {
2324
- const allRenderFn = BUILD18.allRenderFn ? true : false;
2325
- const lazyLoad = BUILD18.lazyLoad ? true : false;
2326
- const taskQueue = BUILD18.taskQueue ? true : false;
2327
- const updatable = BUILD18.updatable ? true : false;
2375
+ const allRenderFn = BUILD19.allRenderFn ? true : false;
2376
+ const lazyLoad = BUILD19.lazyLoad ? true : false;
2377
+ const taskQueue = BUILD19.taskQueue ? true : false;
2378
+ const updatable = BUILD19.updatable ? true : false;
2328
2379
  try {
2329
2380
  renderingRef = instance;
2330
2381
  instance = allRenderFn ? instance.render() : instance.render && instance.render();
@@ -2334,9 +2385,9 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
2334
2385
  if (updatable || lazyLoad) {
2335
2386
  hostRef.$flags$ |= 2 /* hasRendered */;
2336
2387
  }
2337
- if (BUILD18.hasRenderFn || BUILD18.reflect) {
2338
- if (BUILD18.vdomRender || BUILD18.reflect) {
2339
- if (BUILD18.hydrateServerSide) {
2388
+ if (BUILD19.hasRenderFn || BUILD19.reflect) {
2389
+ if (BUILD19.vdomRender || BUILD19.reflect) {
2390
+ if (BUILD19.hydrateServerSide) {
2340
2391
  return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
2341
2392
  } else {
2342
2393
  renderVdom(hostRef, instance, isInitialLoad);
@@ -2361,57 +2412,57 @@ var postUpdateComponent = (hostRef) => {
2361
2412
  const tagName = hostRef.$cmpMeta$.$tagName$;
2362
2413
  const elm = hostRef.$hostElement$;
2363
2414
  const endPostUpdate = createTime("postUpdate", tagName);
2364
- const instance = BUILD18.lazyLoad ? hostRef.$lazyInstance$ : elm;
2415
+ const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2365
2416
  const ancestorComponent = hostRef.$ancestorComponent$;
2366
- if (BUILD18.cmpDidRender) {
2367
- if (BUILD18.isDev) {
2417
+ if (BUILD19.cmpDidRender) {
2418
+ if (BUILD19.isDev) {
2368
2419
  hostRef.$flags$ |= 1024 /* devOnRender */;
2369
2420
  }
2370
2421
  safeCall(instance, "componentDidRender");
2371
- if (BUILD18.isDev) {
2422
+ if (BUILD19.isDev) {
2372
2423
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2373
2424
  }
2374
2425
  }
2375
2426
  emitLifecycleEvent(elm, "componentDidRender");
2376
2427
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
2377
2428
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
2378
- if (BUILD18.asyncLoading && BUILD18.cssAnnotations) {
2429
+ if (BUILD19.asyncLoading && BUILD19.cssAnnotations) {
2379
2430
  addHydratedFlag(elm);
2380
2431
  }
2381
- if (BUILD18.cmpDidLoad) {
2382
- if (BUILD18.isDev) {
2432
+ if (BUILD19.cmpDidLoad) {
2433
+ if (BUILD19.isDev) {
2383
2434
  hostRef.$flags$ |= 2048 /* devOnDidLoad */;
2384
2435
  }
2385
2436
  safeCall(instance, "componentDidLoad");
2386
- if (BUILD18.isDev) {
2437
+ if (BUILD19.isDev) {
2387
2438
  hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
2388
2439
  }
2389
2440
  }
2390
2441
  emitLifecycleEvent(elm, "componentDidLoad");
2391
2442
  endPostUpdate();
2392
- if (BUILD18.asyncLoading) {
2443
+ if (BUILD19.asyncLoading) {
2393
2444
  hostRef.$onReadyResolve$(elm);
2394
2445
  if (!ancestorComponent) {
2395
2446
  appDidLoad(tagName);
2396
2447
  }
2397
2448
  }
2398
2449
  } else {
2399
- if (BUILD18.cmpDidUpdate) {
2400
- if (BUILD18.isDev) {
2450
+ if (BUILD19.cmpDidUpdate) {
2451
+ if (BUILD19.isDev) {
2401
2452
  hostRef.$flags$ |= 1024 /* devOnRender */;
2402
2453
  }
2403
2454
  safeCall(instance, "componentDidUpdate");
2404
- if (BUILD18.isDev) {
2455
+ if (BUILD19.isDev) {
2405
2456
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2406
2457
  }
2407
2458
  }
2408
2459
  emitLifecycleEvent(elm, "componentDidUpdate");
2409
2460
  endPostUpdate();
2410
2461
  }
2411
- if (BUILD18.method && BUILD18.lazyLoad) {
2462
+ if (BUILD19.method && BUILD19.lazyLoad) {
2412
2463
  hostRef.$onInstanceResolve$(elm);
2413
2464
  }
2414
- if (BUILD18.asyncLoading) {
2465
+ if (BUILD19.asyncLoading) {
2415
2466
  if (hostRef.$onRenderResolve$) {
2416
2467
  hostRef.$onRenderResolve$();
2417
2468
  hostRef.$onRenderResolve$ = void 0;
@@ -2423,7 +2474,7 @@ var postUpdateComponent = (hostRef) => {
2423
2474
  }
2424
2475
  };
2425
2476
  var forceUpdate = (ref) => {
2426
- if (BUILD18.updatable && (Build.isBrowser || Build.isTesting)) {
2477
+ if (BUILD19.updatable && (Build.isBrowser || Build.isTesting)) {
2427
2478
  const hostRef = getHostRef(ref);
2428
2479
  const isConnected = hostRef.$hostElement$.isConnected;
2429
2480
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
@@ -2434,14 +2485,14 @@ var forceUpdate = (ref) => {
2434
2485
  return false;
2435
2486
  };
2436
2487
  var appDidLoad = (who) => {
2437
- if (BUILD18.cssAnnotations) {
2488
+ if (BUILD19.cssAnnotations) {
2438
2489
  addHydratedFlag(doc.documentElement);
2439
2490
  }
2440
- if (BUILD18.asyncQueue) {
2491
+ if (BUILD19.asyncQueue) {
2441
2492
  plt.$flags$ |= 2 /* appLoaded */;
2442
2493
  }
2443
2494
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2444
- if (BUILD18.profile && performance.measure) {
2495
+ if (BUILD19.profile && performance.measure) {
2445
2496
  performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
2446
2497
  }
2447
2498
  };
@@ -2456,7 +2507,7 @@ var safeCall = (instance, method, arg) => {
2456
2507
  return void 0;
2457
2508
  };
2458
2509
  var emitLifecycleEvent = (elm, lifecycleName) => {
2459
- if (BUILD18.lifecycleDOMEvents) {
2510
+ if (BUILD19.lifecycleDOMEvents) {
2460
2511
  emitEvent(elm, "stencil_" + lifecycleName, {
2461
2512
  bubbles: true,
2462
2513
  composed: true,
@@ -2468,7 +2519,7 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
2468
2519
  };
2469
2520
  var addHydratedFlag = (elm) => {
2470
2521
  var _a, _b;
2471
- return BUILD18.hydratedClass ? elm.classList.add((_a = BUILD18.hydratedSelectorName) != null ? _a : "hydrated") : BUILD18.hydratedAttribute ? elm.setAttribute((_b = BUILD18.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2522
+ return BUILD19.hydratedClass ? elm.classList.add((_a = BUILD19.hydratedSelectorName) != null ? _a : "hydrated") : BUILD19.hydratedAttribute ? elm.setAttribute((_b = BUILD19.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2472
2523
  };
2473
2524
  var serverSideConnected = (elm) => {
2474
2525
  const children = elm.children;
@@ -2487,21 +2538,21 @@ var serverSideConnected = (elm) => {
2487
2538
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
2488
2539
  var setValue = (ref, propName, newVal, cmpMeta) => {
2489
2540
  const hostRef = getHostRef(ref);
2490
- if (BUILD19.lazyLoad && !hostRef) {
2541
+ if (BUILD20.lazyLoad && !hostRef) {
2491
2542
  throw new Error(
2492
2543
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
2493
2544
  );
2494
2545
  }
2495
- const elm = BUILD19.lazyLoad ? hostRef.$hostElement$ : ref;
2546
+ const elm = BUILD20.lazyLoad ? hostRef.$hostElement$ : ref;
2496
2547
  const oldVal = hostRef.$instanceValues$.get(propName);
2497
2548
  const flags = hostRef.$flags$;
2498
- const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2549
+ const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : elm;
2499
2550
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
2500
2551
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
2501
2552
  const didValueChange = newVal !== oldVal && !areBothNaN;
2502
- if ((!BUILD19.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2553
+ if ((!BUILD20.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2503
2554
  hostRef.$instanceValues$.set(propName, newVal);
2504
- if (BUILD19.isDev) {
2555
+ if (BUILD20.isDev) {
2505
2556
  if (hostRef.$flags$ & 1024 /* devOnRender */) {
2506
2557
  consoleDevWarn(
2507
2558
  `The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
@@ -2524,8 +2575,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2524
2575
  );
2525
2576
  }
2526
2577
  }
2527
- if (!BUILD19.lazyLoad || instance) {
2528
- if (BUILD19.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2578
+ if (!BUILD20.lazyLoad || instance) {
2579
+ if (BUILD20.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2529
2580
  const watchMethods = cmpMeta.$watchers$[propName];
2530
2581
  if (watchMethods) {
2531
2582
  watchMethods.map((watchMethodName) => {
@@ -2537,8 +2588,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2537
2588
  });
2538
2589
  }
2539
2590
  }
2540
- if (BUILD19.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2541
- if (BUILD19.cmpShouldUpdate && instance.componentShouldUpdate) {
2591
+ if (BUILD20.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2592
+ if (BUILD20.cmpShouldUpdate && instance.componentShouldUpdate) {
2542
2593
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2543
2594
  return;
2544
2595
  }
@@ -2553,40 +2604,40 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2553
2604
  var proxyComponent = (Cstr, cmpMeta, flags) => {
2554
2605
  var _a, _b;
2555
2606
  const prototype = Cstr.prototype;
2556
- if (BUILD20.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2607
+ if (BUILD21.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2557
2608
  FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
2558
2609
  const originalFormAssociatedCallback = prototype[cbName];
2559
2610
  Object.defineProperty(prototype, cbName, {
2560
2611
  value(...args) {
2561
2612
  const hostRef = getHostRef(this);
2562
- const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : this;
2613
+ const instance = BUILD21.lazyLoad ? hostRef.$lazyInstance$ : this;
2563
2614
  if (!instance) {
2564
2615
  hostRef.$onReadyPromise$.then((asyncInstance) => {
2565
2616
  const cb = asyncInstance[cbName];
2566
2617
  typeof cb === "function" && cb.call(asyncInstance, ...args);
2567
2618
  });
2568
2619
  } else {
2569
- const cb = BUILD20.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2620
+ const cb = BUILD21.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2570
2621
  typeof cb === "function" && cb.call(instance, ...args);
2571
2622
  }
2572
2623
  }
2573
2624
  });
2574
2625
  });
2575
2626
  }
2576
- if (BUILD20.member && cmpMeta.$members$ || BUILD20.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2577
- if (BUILD20.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2627
+ if (BUILD21.member && cmpMeta.$members$ || BUILD21.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2628
+ if (BUILD21.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2578
2629
  cmpMeta.$watchers$ = Cstr.watchers;
2579
2630
  }
2580
2631
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2581
2632
  members.map(([memberName, [memberFlags]]) => {
2582
- if ((BUILD20.prop || BUILD20.state) && (memberFlags & 31 /* Prop */ || (!BUILD20.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2633
+ if ((BUILD21.prop || BUILD21.state) && (memberFlags & 31 /* Prop */ || (!BUILD21.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2583
2634
  if ((memberFlags & 2048 /* Getter */) === 0) {
2584
2635
  Object.defineProperty(prototype, memberName, {
2585
2636
  get() {
2586
2637
  return getValue(this, memberName);
2587
2638
  },
2588
2639
  set(newValue) {
2589
- if (BUILD20.isDev) {
2640
+ if (BUILD21.isDev) {
2590
2641
  const ref = getHostRef(this);
2591
2642
  if (
2592
2643
  // we are proxying the instance (not element)
@@ -2607,11 +2658,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2607
2658
  enumerable: true
2608
2659
  });
2609
2660
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2610
- if (BUILD20.lazyLoad) {
2661
+ if (BUILD21.lazyLoad) {
2611
2662
  Object.defineProperty(prototype, memberName, {
2612
2663
  get() {
2613
2664
  const ref = getHostRef(this);
2614
- const instance = BUILD20.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2665
+ const instance = BUILD21.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2615
2666
  if (!instance) return;
2616
2667
  return instance[memberName];
2617
2668
  },
@@ -2651,7 +2702,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2651
2702
  });
2652
2703
  }
2653
2704
  }
2654
- } else if (BUILD20.lazyLoad && BUILD20.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2705
+ } else if (BUILD21.lazyLoad && BUILD21.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2655
2706
  Object.defineProperty(prototype, memberName, {
2656
2707
  value(...args) {
2657
2708
  var _a2;
@@ -2664,13 +2715,13 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2664
2715
  });
2665
2716
  }
2666
2717
  });
2667
- if (BUILD20.observeAttribute && (!BUILD20.lazyLoad || flags & 1 /* isElementConstructor */)) {
2718
+ if (BUILD21.observeAttribute && (!BUILD21.lazyLoad || flags & 1 /* isElementConstructor */)) {
2668
2719
  const attrNameToPropName = /* @__PURE__ */ new Map();
2669
2720
  prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
2670
2721
  plt.jmp(() => {
2671
2722
  var _a2;
2672
2723
  const propName = attrNameToPropName.get(attrName);
2673
- if (this.hasOwnProperty(propName)) {
2724
+ if (this.hasOwnProperty(propName) && BUILD21.lazyLoad) {
2674
2725
  newValue = this[propName];
2675
2726
  delete this[propName];
2676
2727
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -2680,8 +2731,8 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2680
2731
  const hostRef = getHostRef(this);
2681
2732
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
2682
2733
  if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
2683
- const elm = BUILD20.lazyLoad ? hostRef.$hostElement$ : this;
2684
- const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : elm;
2734
+ const elm = BUILD21.lazyLoad ? hostRef.$hostElement$ : this;
2735
+ const instance = BUILD21.lazyLoad ? hostRef.$lazyInstance$ : elm;
2685
2736
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
2686
2737
  entry == null ? void 0 : entry.forEach((callbackName) => {
2687
2738
  if (instance[callbackName] != null) {
@@ -2704,7 +2755,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2704
2755
  var _a2;
2705
2756
  const attrName = m[1] || propName;
2706
2757
  attrNameToPropName.set(attrName, propName);
2707
- if (BUILD20.reflect && m[0] & 512 /* ReflectAttr */) {
2758
+ if (BUILD21.reflect && m[0] & 512 /* ReflectAttr */) {
2708
2759
  (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
2709
2760
  }
2710
2761
  return attrName;
@@ -2722,7 +2773,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2722
2773
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2723
2774
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2724
2775
  const bundleId = cmpMeta.$lazyBundleId$;
2725
- if ((BUILD21.lazyLoad || BUILD21.hydrateClientSide) && bundleId) {
2776
+ if ((BUILD22.lazyLoad || BUILD22.hydrateClientSide) && bundleId) {
2726
2777
  const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
2727
2778
  if (CstrImport && "then" in CstrImport) {
2728
2779
  const endLoad = uniqueTime(
@@ -2737,15 +2788,15 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2737
2788
  if (!Cstr) {
2738
2789
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2739
2790
  }
2740
- if (BUILD21.member && !Cstr.isProxied) {
2741
- if (BUILD21.watchCallback) {
2791
+ if (BUILD22.member && !Cstr.isProxied) {
2792
+ if (BUILD22.watchCallback) {
2742
2793
  cmpMeta.$watchers$ = Cstr.watchers;
2743
2794
  }
2744
2795
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
2745
2796
  Cstr.isProxied = true;
2746
2797
  }
2747
2798
  const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
2748
- if (BUILD21.member) {
2799
+ if (BUILD22.member) {
2749
2800
  hostRef.$flags$ |= 8 /* isConstructingInstance */;
2750
2801
  }
2751
2802
  try {
@@ -2753,10 +2804,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2753
2804
  } catch (e) {
2754
2805
  consoleError(e);
2755
2806
  }
2756
- if (BUILD21.member) {
2807
+ if (BUILD22.member) {
2757
2808
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2758
2809
  }
2759
- if (BUILD21.watchCallback) {
2810
+ if (BUILD22.watchCallback) {
2760
2811
  hostRef.$flags$ |= 128 /* isWatchReady */;
2761
2812
  }
2762
2813
  endNewInstance();
@@ -2766,24 +2817,24 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2766
2817
  const cmpTag = elm.localName;
2767
2818
  customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2768
2819
  }
2769
- if (BUILD21.style && Cstr && Cstr.style) {
2820
+ if (BUILD22.style && Cstr && Cstr.style) {
2770
2821
  let style;
2771
2822
  if (typeof Cstr.style === "string") {
2772
2823
  style = Cstr.style;
2773
- } else if (BUILD21.mode && typeof Cstr.style !== "string") {
2824
+ } else if (BUILD22.mode && typeof Cstr.style !== "string") {
2774
2825
  hostRef.$modeName$ = computeMode(elm);
2775
2826
  if (hostRef.$modeName$) {
2776
2827
  style = Cstr.style[hostRef.$modeName$];
2777
2828
  }
2778
- if (BUILD21.hydrateServerSide && hostRef.$modeName$) {
2829
+ if (BUILD22.hydrateServerSide && hostRef.$modeName$) {
2779
2830
  elm.setAttribute("s-mode", hostRef.$modeName$);
2780
2831
  }
2781
2832
  }
2782
2833
  const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
2783
2834
  if (!styles.has(scopeId2)) {
2784
2835
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2785
- if (!BUILD21.hydrateServerSide && BUILD21.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2786
- BUILD21.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2836
+ if (!BUILD22.hydrateServerSide && BUILD22.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2837
+ BUILD22.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2787
2838
  style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
2788
2839
  }
2789
2840
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
@@ -2793,14 +2844,14 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2793
2844
  }
2794
2845
  const ancestorComponent = hostRef.$ancestorComponent$;
2795
2846
  const schedule = () => scheduleUpdate(hostRef, true);
2796
- if (BUILD21.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2847
+ if (BUILD22.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2797
2848
  ancestorComponent["s-rc"].push(schedule);
2798
2849
  } else {
2799
2850
  schedule();
2800
2851
  }
2801
2852
  };
2802
2853
  var fireConnectedCallback = (instance) => {
2803
- if (BUILD21.lazyLoad && BUILD21.connectedCallback) {
2854
+ if (BUILD22.lazyLoad && BUILD22.connectedCallback) {
2804
2855
  safeCall(instance, "connectedCallback");
2805
2856
  }
2806
2857
  };
@@ -2811,41 +2862,41 @@ var connectedCallback = (elm) => {
2811
2862
  const hostRef = getHostRef(elm);
2812
2863
  const cmpMeta = hostRef.$cmpMeta$;
2813
2864
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
2814
- if (BUILD22.hostListenerTargetParent) {
2865
+ if (BUILD23.hostListenerTargetParent) {
2815
2866
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
2816
2867
  }
2817
2868
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
2818
2869
  hostRef.$flags$ |= 1 /* hasConnected */;
2819
2870
  let hostId;
2820
- if (BUILD22.hydrateClientSide) {
2871
+ if (BUILD23.hydrateClientSide) {
2821
2872
  hostId = elm.getAttribute(HYDRATE_ID);
2822
2873
  if (hostId) {
2823
- if (BUILD22.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2824
- const scopeId2 = BUILD22.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2874
+ if (BUILD23.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2875
+ const scopeId2 = BUILD23.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2825
2876
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2826
- } else if (BUILD22.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2827
- const scopeId2 = getScopeId(cmpMeta, BUILD22.mode ? elm.getAttribute("s-mode") : void 0);
2877
+ } else if (BUILD23.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2878
+ const scopeId2 = getScopeId(cmpMeta, BUILD23.mode ? elm.getAttribute("s-mode") : void 0);
2828
2879
  elm["s-sc"] = scopeId2;
2829
2880
  }
2830
2881
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2831
2882
  }
2832
2883
  }
2833
- if (BUILD22.slotRelocation && !hostId) {
2834
- if (BUILD22.hydrateServerSide || (BUILD22.slot || BUILD22.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2884
+ if (BUILD23.slotRelocation && !hostId) {
2885
+ if (BUILD23.hydrateServerSide || (BUILD23.slot || BUILD23.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2835
2886
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
2836
2887
  setContentReference(elm);
2837
2888
  }
2838
2889
  }
2839
- if (BUILD22.asyncLoading) {
2890
+ if (BUILD23.asyncLoading) {
2840
2891
  let ancestorComponent = elm;
2841
2892
  while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
2842
- if (BUILD22.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2893
+ if (BUILD23.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2843
2894
  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
2844
2895
  break;
2845
2896
  }
2846
2897
  }
2847
2898
  }
2848
- if (BUILD22.prop && !BUILD22.hydrateServerSide && cmpMeta.$members$) {
2899
+ if (BUILD23.prop && !BUILD23.hydrateServerSide && cmpMeta.$members$) {
2849
2900
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2850
2901
  if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
2851
2902
  const value = elm[memberName];
@@ -2854,7 +2905,7 @@ var connectedCallback = (elm) => {
2854
2905
  }
2855
2906
  });
2856
2907
  }
2857
- if (BUILD22.initializeNextTick) {
2908
+ if (BUILD23.initializeNextTick) {
2858
2909
  nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
2859
2910
  } else {
2860
2911
  initializeComponent(elm, hostRef, cmpMeta);
@@ -2872,32 +2923,32 @@ var connectedCallback = (elm) => {
2872
2923
  };
2873
2924
  var setContentReference = (elm) => {
2874
2925
  const contentRefElm = elm["s-cr"] = doc.createComment(
2875
- BUILD22.isDebug ? `content-ref (host=${elm.localName})` : ""
2926
+ BUILD23.isDebug ? `content-ref (host=${elm.localName})` : ""
2876
2927
  );
2877
2928
  contentRefElm["s-cn"] = true;
2878
2929
  insertBefore(elm, contentRefElm, elm.firstChild);
2879
2930
  };
2880
2931
 
2881
2932
  // src/runtime/disconnected-callback.ts
2882
- import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
2933
+ import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
2883
2934
  var disconnectInstance = (instance) => {
2884
- if (BUILD23.lazyLoad && BUILD23.disconnectedCallback) {
2935
+ if (BUILD24.lazyLoad && BUILD24.disconnectedCallback) {
2885
2936
  safeCall(instance, "disconnectedCallback");
2886
2937
  }
2887
- if (BUILD23.cmpDidUnload) {
2938
+ if (BUILD24.cmpDidUnload) {
2888
2939
  safeCall(instance, "componentDidUnload");
2889
2940
  }
2890
2941
  };
2891
2942
  var disconnectedCallback = async (elm) => {
2892
2943
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2893
2944
  const hostRef = getHostRef(elm);
2894
- if (BUILD23.hostListener) {
2945
+ if (BUILD24.hostListener) {
2895
2946
  if (hostRef.$rmListeners$) {
2896
2947
  hostRef.$rmListeners$.map((rmListener) => rmListener());
2897
2948
  hostRef.$rmListeners$ = void 0;
2898
2949
  }
2899
2950
  }
2900
- if (!BUILD23.lazyLoad) {
2951
+ if (!BUILD24.lazyLoad) {
2901
2952
  disconnectInstance(elm);
2902
2953
  } else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2903
2954
  disconnectInstance(hostRef.$lazyInstance$);
@@ -2916,36 +2967,36 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2916
2967
  $flags$: compactMeta[0],
2917
2968
  $tagName$: compactMeta[1]
2918
2969
  };
2919
- if (BUILD24.member) {
2970
+ if (BUILD25.member) {
2920
2971
  cmpMeta.$members$ = compactMeta[2];
2921
2972
  }
2922
- if (BUILD24.hostListener) {
2973
+ if (BUILD25.hostListener) {
2923
2974
  cmpMeta.$listeners$ = compactMeta[3];
2924
2975
  }
2925
- if (BUILD24.watchCallback) {
2976
+ if (BUILD25.watchCallback) {
2926
2977
  cmpMeta.$watchers$ = Cstr.$watchers$;
2927
2978
  }
2928
- if (BUILD24.reflect) {
2979
+ if (BUILD25.reflect) {
2929
2980
  cmpMeta.$attrsToReflect$ = [];
2930
2981
  }
2931
- if (BUILD24.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2982
+ if (BUILD25.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2932
2983
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2933
2984
  }
2934
- if (BUILD24.experimentalSlotFixes) {
2935
- if (BUILD24.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2985
+ if (BUILD25.experimentalSlotFixes) {
2986
+ if (BUILD25.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2936
2987
  patchPseudoShadowDom(Cstr.prototype);
2937
2988
  }
2938
2989
  } else {
2939
- if (BUILD24.slotChildNodesFix) {
2990
+ if (BUILD25.slotChildNodesFix) {
2940
2991
  patchChildSlotNodes(Cstr.prototype);
2941
2992
  }
2942
- if (BUILD24.cloneNodeFix) {
2993
+ if (BUILD25.cloneNodeFix) {
2943
2994
  patchCloneNode(Cstr.prototype);
2944
2995
  }
2945
- if (BUILD24.appendChildSlotFix) {
2996
+ if (BUILD25.appendChildSlotFix) {
2946
2997
  patchSlotAppendChild(Cstr.prototype);
2947
2998
  }
2948
- if (BUILD24.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2999
+ if (BUILD25.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2949
3000
  patchTextContent(Cstr.prototype);
2950
3001
  }
2951
3002
  }
@@ -2963,20 +3014,20 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2963
3014
  this.__hasHostListenerAttached = true;
2964
3015
  }
2965
3016
  connectedCallback(this);
2966
- if (BUILD24.connectedCallback && originalConnectedCallback) {
3017
+ if (BUILD25.connectedCallback && originalConnectedCallback) {
2967
3018
  originalConnectedCallback.call(this);
2968
3019
  }
2969
3020
  },
2970
3021
  disconnectedCallback() {
2971
3022
  disconnectedCallback(this);
2972
- if (BUILD24.disconnectedCallback && originalDisconnectedCallback) {
3023
+ if (BUILD25.disconnectedCallback && originalDisconnectedCallback) {
2973
3024
  originalDisconnectedCallback.call(this);
2974
3025
  }
2975
3026
  },
2976
3027
  __attachShadow() {
2977
3028
  if (supportsShadow) {
2978
3029
  if (!this.shadowRoot) {
2979
- if (BUILD24.shadowDelegatesFocus) {
3030
+ if (BUILD25.shadowDelegatesFocus) {
2980
3031
  this.attachShadow({
2981
3032
  mode: "open",
2982
3033
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -3000,7 +3051,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3000
3051
  return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
3001
3052
  };
3002
3053
  var forceModeUpdate = (elm) => {
3003
- if (BUILD24.style && BUILD24.mode && !BUILD24.lazyLoad) {
3054
+ if (BUILD25.style && BUILD25.mode && !BUILD25.lazyLoad) {
3004
3055
  const mode = computeMode(elm);
3005
3056
  const hostRef = getHostRef(elm);
3006
3057
  if (hostRef.$modeName$ !== mode) {
@@ -3023,7 +3074,7 @@ var forceModeUpdate = (elm) => {
3023
3074
  };
3024
3075
 
3025
3076
  // src/runtime/bootstrap-lazy.ts
3026
- import { BUILD as BUILD25 } from "@stencil/core/internal/app-data";
3077
+ import { BUILD as BUILD26 } from "@stencil/core/internal/app-data";
3027
3078
 
3028
3079
  // src/runtime/hmr-component.ts
3029
3080
  var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
@@ -3035,7 +3086,7 @@ var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
3035
3086
  // src/runtime/bootstrap-lazy.ts
3036
3087
  var bootstrapLazy = (lazyBundles, options = {}) => {
3037
3088
  var _a;
3038
- if (BUILD25.profile && performance.mark) {
3089
+ if (BUILD26.profile && performance.mark) {
3039
3090
  performance.mark("st:app:start");
3040
3091
  }
3041
3092
  installDevTools();
@@ -3051,12 +3102,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3051
3102
  let isBootstrapping = true;
3052
3103
  Object.assign(plt, options);
3053
3104
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
3054
- if (BUILD25.asyncQueue) {
3105
+ if (BUILD26.asyncQueue) {
3055
3106
  if (options.syncQueue) {
3056
3107
  plt.$flags$ |= 4 /* queueSync */;
3057
3108
  }
3058
3109
  }
3059
- if (BUILD25.hydrateClientSide) {
3110
+ if (BUILD26.hydrateClientSide) {
3060
3111
  plt.$flags$ |= 2 /* appLoaded */;
3061
3112
  }
3062
3113
  let hasSlotRelocation = false;
@@ -3072,22 +3123,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3072
3123
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
3073
3124
  hasSlotRelocation = true;
3074
3125
  }
3075
- if (BUILD25.member) {
3126
+ if (BUILD26.member) {
3076
3127
  cmpMeta.$members$ = compactMeta[2];
3077
3128
  }
3078
- if (BUILD25.hostListener) {
3129
+ if (BUILD26.hostListener) {
3079
3130
  cmpMeta.$listeners$ = compactMeta[3];
3080
3131
  }
3081
- if (BUILD25.reflect) {
3132
+ if (BUILD26.reflect) {
3082
3133
  cmpMeta.$attrsToReflect$ = [];
3083
3134
  }
3084
- if (BUILD25.watchCallback) {
3135
+ if (BUILD26.watchCallback) {
3085
3136
  cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
3086
3137
  }
3087
- if (BUILD25.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3138
+ if (BUILD26.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3088
3139
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
3089
3140
  }
3090
- const tagName = BUILD25.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
3141
+ const tagName = BUILD26.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
3091
3142
  const HostElement = class extends HTMLElement {
3092
3143
  // StencilLazyHost
3093
3144
  constructor(self) {
@@ -3095,10 +3146,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3095
3146
  this.hasRegisteredEventListeners = false;
3096
3147
  self = this;
3097
3148
  registerHost(self, cmpMeta);
3098
- if (BUILD25.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3149
+ if (BUILD26.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3099
3150
  if (supportsShadow) {
3100
3151
  if (!self.shadowRoot) {
3101
- if (BUILD25.shadowDelegatesFocus) {
3152
+ if (BUILD26.shadowDelegatesFocus) {
3102
3153
  self.attachShadow({
3103
3154
  mode: "open",
3104
3155
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -3113,7 +3164,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3113
3164
  );
3114
3165
  }
3115
3166
  }
3116
- } else if (!BUILD25.hydrateServerSide && !("shadowRoot" in self)) {
3167
+ } else if (!BUILD26.hydrateServerSide && !("shadowRoot" in self)) {
3117
3168
  self.shadowRoot = self;
3118
3169
  }
3119
3170
  }
@@ -3141,28 +3192,28 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3141
3192
  return getHostRef(this).$onReadyPromise$;
3142
3193
  }
3143
3194
  };
3144
- if (BUILD25.experimentalSlotFixes) {
3145
- if (BUILD25.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3195
+ if (BUILD26.experimentalSlotFixes) {
3196
+ if (BUILD26.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3146
3197
  patchPseudoShadowDom(HostElement.prototype);
3147
3198
  }
3148
3199
  } else {
3149
- if (BUILD25.slotChildNodesFix) {
3200
+ if (BUILD26.slotChildNodesFix) {
3150
3201
  patchChildSlotNodes(HostElement.prototype);
3151
3202
  }
3152
- if (BUILD25.cloneNodeFix) {
3203
+ if (BUILD26.cloneNodeFix) {
3153
3204
  patchCloneNode(HostElement.prototype);
3154
3205
  }
3155
- if (BUILD25.appendChildSlotFix) {
3206
+ if (BUILD26.appendChildSlotFix) {
3156
3207
  patchSlotAppendChild(HostElement.prototype);
3157
3208
  }
3158
- if (BUILD25.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3209
+ if (BUILD26.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3159
3210
  patchTextContent(HostElement.prototype);
3160
3211
  }
3161
3212
  }
3162
- if (BUILD25.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3213
+ if (BUILD26.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3163
3214
  HostElement.formAssociated = true;
3164
3215
  }
3165
- if (BUILD25.hotModuleReplacement) {
3216
+ if (BUILD26.hotModuleReplacement) {
3166
3217
  HostElement.prototype["s-hmr"] = function(hmrVersionId) {
3167
3218
  hmrStart(this, cmpMeta, hmrVersionId);
3168
3219
  };
@@ -3181,7 +3232,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3181
3232
  if (hasSlotRelocation) {
3182
3233
  dataStyles.textContent += SLOT_FB_CSS;
3183
3234
  }
3184
- if (BUILD25.invisiblePrehydration && (BUILD25.hydratedClass || BUILD25.hydratedAttribute)) {
3235
+ if (BUILD26.invisiblePrehydration && (BUILD26.hydratedClass || BUILD26.hydratedAttribute)) {
3185
3236
  dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
3186
3237
  }
3187
3238
  if (dataStyles.innerHTML.length) {
@@ -3197,7 +3248,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3197
3248
  if (deferredConnectedCallbacks.length) {
3198
3249
  deferredConnectedCallbacks.map((host) => host.connectedCallback());
3199
3250
  } else {
3200
- if (BUILD25.profile) {
3251
+ if (BUILD26.profile) {
3201
3252
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
3202
3253
  } else {
3203
3254
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
@@ -3210,10 +3261,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3210
3261
  var Fragment = (_, children) => children;
3211
3262
 
3212
3263
  // src/runtime/host-listener.ts
3213
- import { BUILD as BUILD26 } from "@stencil/core/internal/app-data";
3264
+ import { BUILD as BUILD27 } from "@stencil/core/internal/app-data";
3214
3265
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
3215
- if (BUILD26.hostListener && listeners) {
3216
- if (BUILD26.hostListenerTargetParent) {
3266
+ if (BUILD27.hostListener && listeners) {
3267
+ if (BUILD27.hostListenerTargetParent) {
3217
3268
  if (attachParentListeners) {
3218
3269
  listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
3219
3270
  } else {
@@ -3221,7 +3272,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3221
3272
  }
3222
3273
  }
3223
3274
  listeners.map(([flags, name, method]) => {
3224
- const target = BUILD26.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3275
+ const target = BUILD27.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3225
3276
  const handler = hostListenerProxy(hostRef, method);
3226
3277
  const opts = hostListenerOpts(flags);
3227
3278
  plt.ael(target, name, handler, opts);
@@ -3232,7 +3283,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3232
3283
  var hostListenerProxy = (hostRef, methodName) => (ev) => {
3233
3284
  var _a;
3234
3285
  try {
3235
- if (BUILD26.lazyLoad) {
3286
+ if (BUILD27.lazyLoad) {
3236
3287
  if (hostRef.$flags$ & 256 /* isListenReady */) {
3237
3288
  (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
3238
3289
  } else {
@@ -3246,10 +3297,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
3246
3297
  }
3247
3298
  };
3248
3299
  var getHostListenerTarget = (elm, flags) => {
3249
- if (BUILD26.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3250
- if (BUILD26.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3251
- if (BUILD26.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3252
- if (BUILD26.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3300
+ if (BUILD27.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3301
+ if (BUILD27.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3302
+ if (BUILD27.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3303
+ if (BUILD27.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3253
3304
  return elm.parentElement;
3254
3305
  return elm;
3255
3306
  };
@@ -3409,7 +3460,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
3409
3460
  }
3410
3461
  };
3411
3462
  export {
3412
- BUILD27 as BUILD,
3463
+ BUILD28 as BUILD,
3413
3464
  Build,
3414
3465
  Env,
3415
3466
  Fragment,