@everymatrix/user-login 1.53.0 → 1.53.11

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.
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'user-login';
24
- const BUILD = /* user-login */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* user-login */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
+
35
+ // src/utils/constants.ts
36
+ var SVG_NS = "http://www.w3.org/2000/svg";
37
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
38
+
39
+ // src/client/client-host-ref.ts
34
40
  var hostRefs = /* @__PURE__ */ new WeakMap();
35
41
  var getHostRef = (ref) => hostRefs.get(ref);
36
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
42
+ var registerInstance = (lazyInstance, hostRef) => {
43
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
44
+ };
37
45
  var registerHost = (hostElement, cmpMeta) => {
38
46
  const hostRef = {
39
47
  $flags$: 0,
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
46
54
  hostElement["s-p"] = [];
47
55
  hostElement["s-rc"] = [];
48
56
  }
49
- return hostRefs.set(hostElement, hostRef);
57
+ const ref = hostRefs.set(hostElement, hostRef);
58
+ return ref;
50
59
  };
51
60
  var isMemberInElement = (elm, memberName) => memberName in elm;
52
61
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
83
92
  /* webpackExclude: /\.system\.entry\.js$/ */
84
93
  /* webpackMode: "lazy" */
85
94
  `./${bundleId}.entry.js${""}`
86
- )); }).then((importedModule) => {
87
- {
88
- cmpModules.set(bundleId, importedModule);
95
+ )); }).then(
96
+ (importedModule) => {
97
+ {
98
+ cmpModules.set(bundleId, importedModule);
99
+ }
100
+ return importedModule[exportName];
101
+ },
102
+ (e) => {
103
+ consoleError(e, hostRef.$hostElement$);
89
104
  }
90
- return importedModule[exportName];
91
- }, consoleError);
105
+ );
92
106
  };
93
107
 
94
108
  // src/client/client-style.ts
95
109
  var styles = /* @__PURE__ */ new Map();
110
+ var HYDRATED_STYLE_ID = "sty-id";
96
111
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
97
112
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
98
113
  var win = typeof window !== "undefined" ? window : {};
@@ -150,14 +165,6 @@ var flush = () => {
150
165
  };
151
166
  var nextTick = (cb) => promiseResolve().then(cb);
152
167
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
153
-
154
- // src/utils/constants.ts
155
- var EMPTY_OBJ = {};
156
- var SVG_NS = "http://www.w3.org/2000/svg";
157
- var HTML_NS = "http://www.w3.org/1999/xhtml";
158
-
159
- // src/utils/helpers.ts
160
- var isDef = (v) => v != null;
161
168
  var isComplexType = (o) => {
162
169
  o = typeof o;
163
170
  return o === "object" || o === "function";
@@ -339,7 +346,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
339
346
  }
340
347
  if (!appliedStyles.has(scopeId2)) {
341
348
  {
342
- styleElm = doc.createElement("style");
349
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
343
350
  styleElm.innerHTML = style;
344
351
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
345
352
  if (nonce != null) {
@@ -349,7 +356,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
349
356
  if (styleContainerNode.nodeName === "HEAD") {
350
357
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
351
358
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
352
- styleContainerNode.insertBefore(styleElm, referenceNode2);
359
+ styleContainerNode.insertBefore(
360
+ styleElm,
361
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
362
+ );
353
363
  } else if ("host" in styleContainerNode) {
354
364
  if (supportsConstructableStylesheets) {
355
365
  const stylesheet = new CSSStyleSheet();
@@ -399,16 +409,18 @@ var attachStyles = (hostRef) => {
399
409
  endAttachStyles();
400
410
  };
401
411
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
402
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
412
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
403
413
  if (oldValue !== newValue) {
404
414
  let isProp = isMemberInElement(elm, memberName);
405
415
  let ln = memberName.toLowerCase();
406
416
  if (memberName === "class") {
407
417
  const classList = elm.classList;
408
418
  const oldClasses = parseClassList(oldValue);
409
- const newClasses = parseClassList(newValue);
410
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
411
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
419
+ let newClasses = parseClassList(newValue);
420
+ {
421
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
422
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
423
+ }
412
424
  } else if (memberName === "key") ; else if (memberName === "ref") {
413
425
  if (newValue) {
414
426
  newValue(elm);
@@ -446,7 +458,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
446
458
  elm.setAttribute(memberName, n);
447
459
  }
448
460
  }
449
- } else {
461
+ } else if (elm[memberName] !== newValue) {
450
462
  elm[memberName] = newValue;
451
463
  }
452
464
  } catch (e) {
@@ -468,24 +480,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
468
480
  }
469
481
  };
470
482
  var parseClassListRegex = /\s/;
471
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
483
+ var parseClassList = (value) => {
484
+ if (typeof value === "object" && value && "baseVal" in value) {
485
+ value = value.baseVal;
486
+ }
487
+ if (!value || typeof value !== "string") {
488
+ return [];
489
+ }
490
+ return value.split(parseClassListRegex);
491
+ };
472
492
  var CAPTURE_EVENT_SUFFIX = "Capture";
473
493
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
474
494
 
475
495
  // src/runtime/vdom/update-element.ts
476
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
496
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
477
497
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
478
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
479
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
498
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
499
+ const newVnodeAttrs = newVnode.$attrs$ || {};
480
500
  {
481
501
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
482
502
  if (!(memberName in newVnodeAttrs)) {
483
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
503
+ setAccessor(
504
+ elm,
505
+ memberName,
506
+ oldVnodeAttrs[memberName],
507
+ void 0,
508
+ isSvgMode2,
509
+ newVnode.$flags$);
484
510
  }
485
511
  }
486
512
  }
487
513
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
488
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
514
+ setAccessor(
515
+ elm,
516
+ memberName,
517
+ oldVnodeAttrs[memberName],
518
+ newVnodeAttrs[memberName],
519
+ isSvgMode2,
520
+ newVnode.$flags$);
489
521
  }
490
522
  };
491
523
  function sortedAttrNames(attrNames) {
@@ -497,13 +529,10 @@ function sortedAttrNames(attrNames) {
497
529
  attrNames
498
530
  );
499
531
  }
500
-
501
- // src/runtime/vdom/vdom-render.ts
502
- var scopeId;
503
532
  var hostTagName;
504
533
  var useNativeShadowDom = false;
505
534
  var isSvgMode = false;
506
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
535
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
507
536
  const newVNode2 = newParentVNode.$children$[childIndex];
508
537
  let i2 = 0;
509
538
  let elm;
@@ -524,11 +553,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
524
553
  {
525
554
  updateElement(null, newVNode2, isSvgMode);
526
555
  }
527
- const rootNode = elm.getRootNode();
528
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
529
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
530
- elm.classList.add(elm["s-si"] = scopeId);
531
- }
532
556
  if (newVNode2.$children$) {
533
557
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
534
558
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -665,6 +689,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
665
689
  if (!isInitialRender) {
666
690
  return leftVNode.$key$ === rightVNode.$key$;
667
691
  }
692
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
693
+ leftVNode.$key$ = rightVNode.$key$;
694
+ }
668
695
  return true;
669
696
  }
670
697
  return false;
@@ -711,8 +738,9 @@ var nullifyVNodeRefs = (vNode) => {
711
738
  }
712
739
  };
713
740
  var insertBefore = (parent, newNode, reference) => {
714
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
715
- return inserted;
741
+ {
742
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
743
+ }
716
744
  };
717
745
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
718
746
  const hostElm = hostRef.$hostElement$;
@@ -737,9 +765,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
737
765
  rootVnode.$flags$ |= 4 /* isHost */;
738
766
  hostRef.$vnode$ = rootVnode;
739
767
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
740
- {
741
- scopeId = hostElm["s-sc"];
742
- }
743
768
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
744
769
  patch(oldVNode, rootVnode, isInitialLoad);
745
770
  };
@@ -747,7 +772,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
747
772
  // src/runtime/update-component.ts
748
773
  var attachToAncestor = (hostRef, ancestorComponent) => {
749
774
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
750
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
775
+ const index = ancestorComponent["s-p"].push(
776
+ new Promise(
777
+ (r) => hostRef.$onRenderResolve$ = () => {
778
+ ancestorComponent["s-p"].splice(index - 1, 1);
779
+ r();
780
+ }
781
+ )
782
+ );
751
783
  }
752
784
  };
753
785
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -774,7 +806,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
774
806
  let maybePromise;
775
807
  if (isInitialLoad) {
776
808
  {
777
- maybePromise = safeCall(instance, "componentWillLoad");
809
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
778
810
  }
779
811
  }
780
812
  endSchedule();
@@ -843,7 +875,7 @@ var postUpdateComponent = (hostRef) => {
843
875
  const instance = hostRef.$lazyInstance$ ;
844
876
  const ancestorComponent = hostRef.$ancestorComponent$;
845
877
  {
846
- safeCall(instance, "componentDidRender");
878
+ safeCall(instance, "componentDidRender", void 0, elm);
847
879
  }
848
880
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
849
881
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -851,7 +883,7 @@ var postUpdateComponent = (hostRef) => {
851
883
  addHydratedFlag(elm);
852
884
  }
853
885
  {
854
- safeCall(instance, "componentDidLoad");
886
+ safeCall(instance, "componentDidLoad", void 0, elm);
855
887
  }
856
888
  endPostUpdate();
857
889
  {
@@ -880,12 +912,12 @@ var appDidLoad = (who) => {
880
912
  }
881
913
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
882
914
  };
883
- var safeCall = (instance, method, arg) => {
915
+ var safeCall = (instance, method, arg, elm) => {
884
916
  if (instance && instance[method]) {
885
917
  try {
886
918
  return instance[method](arg);
887
919
  } catch (e) {
888
- consoleError(e);
920
+ consoleError(e, elm);
889
921
  }
890
922
  }
891
923
  return void 0;
@@ -944,15 +976,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
944
976
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
945
977
  members.map(([memberName, [memberFlags]]) => {
946
978
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
979
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
980
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
981
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
982
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
983
+ Object.defineProperty(prototype, memberName, {
984
+ get() {
985
+ {
986
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
987
+ return getValue(this, memberName);
988
+ }
989
+ const ref = getHostRef(this);
990
+ const instance = ref ? ref.$lazyInstance$ : prototype;
991
+ if (!instance) return;
992
+ return instance[memberName];
993
+ }
994
+ },
995
+ configurable: true,
996
+ enumerable: true
997
+ });
998
+ }
947
999
  Object.defineProperty(prototype, memberName, {
948
- get() {
949
- return getValue(this, memberName);
950
- },
951
1000
  set(newValue) {
952
- setValue(this, memberName, newValue, cmpMeta);
953
- },
954
- configurable: true,
955
- enumerable: true
1001
+ const ref = getHostRef(this);
1002
+ if (origSetter) {
1003
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1004
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1005
+ newValue = ref.$instanceValues$.get(memberName);
1006
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1007
+ ref.$instanceValues$.set(memberName, currentValue);
1008
+ }
1009
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1010
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1011
+ setValue(this, memberName, newValue, cmpMeta);
1012
+ return;
1013
+ }
1014
+ {
1015
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1016
+ setValue(this, memberName, newValue, cmpMeta);
1017
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1018
+ ref.$onReadyPromise$.then(() => {
1019
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1020
+ ref.$lazyInstance$[memberName] = newValue;
1021
+ }
1022
+ });
1023
+ }
1024
+ return;
1025
+ }
1026
+ const setterSetVal = () => {
1027
+ const currentValue = ref.$lazyInstance$[memberName];
1028
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1029
+ ref.$instanceValues$.set(memberName, currentValue);
1030
+ }
1031
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1032
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1033
+ };
1034
+ if (ref.$lazyInstance$) {
1035
+ setterSetVal();
1036
+ } else {
1037
+ ref.$onReadyPromise$.then(() => setterSetVal());
1038
+ }
1039
+ }
1040
+ }
956
1041
  });
957
1042
  }
958
1043
  });
@@ -962,7 +1047,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
962
1047
  plt.jmp(() => {
963
1048
  var _a2;
964
1049
  const propName = attrNameToPropName.get(attrName);
965
- if (this.hasOwnProperty(propName)) {
1050
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
966
1051
  newValue = this[propName];
967
1052
  delete this[propName];
968
1053
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -982,7 +1067,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
982
1067
  }
983
1068
  return;
984
1069
  }
985
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1070
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1071
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1072
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1073
+ this[propName] = newValue;
1074
+ }
986
1075
  });
987
1076
  };
988
1077
  Cstr.observedAttributes = Array.from(
@@ -1009,9 +1098,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1009
1098
  let Cstr;
1010
1099
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1011
1100
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1012
- const bundleId = cmpMeta.$lazyBundleId$;
1013
- if (bundleId) {
1014
- const CstrImport = loadModule(cmpMeta);
1101
+ {
1102
+ const CstrImport = loadModule(cmpMeta, hostRef);
1015
1103
  if (CstrImport && "then" in CstrImport) {
1016
1104
  const endLoad = uniqueTime();
1017
1105
  Cstr = await CstrImport;
@@ -1036,7 +1124,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1036
1124
  try {
1037
1125
  new Cstr(hostRef);
1038
1126
  } catch (e) {
1039
- consoleError(e);
1127
+ consoleError(e, elm);
1040
1128
  }
1041
1129
  {
1042
1130
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1045,10 +1133,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1045
1133
  hostRef.$flags$ |= 128 /* isWatchReady */;
1046
1134
  }
1047
1135
  endNewInstance();
1048
- } else {
1049
- Cstr = elm.constructor;
1050
- const cmpTag = elm.localName;
1051
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1052
1136
  }
1053
1137
  if (Cstr && Cstr.style) {
1054
1138
  let style;
@@ -1071,7 +1155,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1071
1155
  schedule();
1072
1156
  }
1073
1157
  };
1074
- var fireConnectedCallback = (instance) => {
1158
+ var fireConnectedCallback = (instance, elm) => {
1075
1159
  };
1076
1160
 
1077
1161
  // src/runtime/connected-callback.ts
@@ -1111,20 +1195,26 @@ var connectedCallback = (elm) => {
1111
1195
  endConnected();
1112
1196
  }
1113
1197
  };
1114
- var disconnectInstance = (instance) => {
1198
+ var disconnectInstance = (instance, elm) => {
1115
1199
  {
1116
- safeCall(instance, "disconnectedCallback");
1200
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1117
1201
  }
1118
1202
  };
1119
1203
  var disconnectedCallback = async (elm) => {
1120
1204
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1121
1205
  const hostRef = getHostRef(elm);
1122
1206
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1123
- disconnectInstance(hostRef.$lazyInstance$);
1207
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1124
1208
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1125
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1209
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1126
1210
  }
1127
1211
  }
1212
+ if (rootAppliedStyles.has(elm)) {
1213
+ rootAppliedStyles.delete(elm);
1214
+ }
1215
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1216
+ rootAppliedStyles.delete(elm.shadowRoot);
1217
+ }
1128
1218
  };
1129
1219
 
1130
1220
  // src/runtime/bootstrap-lazy.ts
@@ -1205,6 +1295,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1205
1295
  }
1206
1296
  disconnectedCallback() {
1207
1297
  plt.jmp(() => disconnectedCallback(this));
1298
+ plt.raf(() => {
1299
+ var _a3;
1300
+ const hostRef = getHostRef(this);
1301
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1302
+ delete hostRef.$vnode$.$elm$;
1303
+ }
1304
+ });
1208
1305
  }
1209
1306
  componentOnReady() {
1210
1307
  return getHostRef(this).$onReadyPromise$;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-ce110273.js');
5
+ const index = require('./index-ec5acfb2.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {