@everymatrix/user-login 1.53.0 → 1.53.10

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,17 +1,25 @@
1
1
  const NAMESPACE = 'user-login';
2
- 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 };
2
+ 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 };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
+
13
+ // src/utils/constants.ts
14
+ var SVG_NS = "http://www.w3.org/2000/svg";
15
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
16
+
17
+ // src/client/client-host-ref.ts
12
18
  var hostRefs = /* @__PURE__ */ new WeakMap();
13
19
  var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
20
+ var registerInstance = (lazyInstance, hostRef) => {
21
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
22
+ };
15
23
  var registerHost = (hostElement, cmpMeta) => {
16
24
  const hostRef = {
17
25
  $flags$: 0,
@@ -24,7 +32,8 @@ var registerHost = (hostElement, cmpMeta) => {
24
32
  hostElement["s-p"] = [];
25
33
  hostElement["s-rc"] = [];
26
34
  }
27
- return hostRefs.set(hostElement, hostRef);
35
+ const ref = hostRefs.set(hostElement, hostRef);
36
+ return ref;
28
37
  };
29
38
  var isMemberInElement = (elm, memberName) => memberName in elm;
30
39
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -61,16 +70,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
61
70
  /* webpackExclude: /\.system\.entry\.js$/ */
62
71
  /* webpackMode: "lazy" */
63
72
  `./${bundleId}.entry.js${""}`
64
- ).then((importedModule) => {
65
- {
66
- cmpModules.set(bundleId, importedModule);
73
+ ).then(
74
+ (importedModule) => {
75
+ {
76
+ cmpModules.set(bundleId, importedModule);
77
+ }
78
+ return importedModule[exportName];
79
+ },
80
+ (e) => {
81
+ consoleError(e, hostRef.$hostElement$);
67
82
  }
68
- return importedModule[exportName];
69
- }, consoleError);
83
+ );
70
84
  };
71
85
 
72
86
  // src/client/client-style.ts
73
87
  var styles = /* @__PURE__ */ new Map();
88
+ var HYDRATED_STYLE_ID = "sty-id";
74
89
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
75
90
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
76
91
  var win = typeof window !== "undefined" ? window : {};
@@ -128,14 +143,6 @@ var flush = () => {
128
143
  };
129
144
  var nextTick = (cb) => promiseResolve().then(cb);
130
145
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
131
-
132
- // src/utils/constants.ts
133
- var EMPTY_OBJ = {};
134
- var SVG_NS = "http://www.w3.org/2000/svg";
135
- var HTML_NS = "http://www.w3.org/1999/xhtml";
136
-
137
- // src/utils/helpers.ts
138
- var isDef = (v) => v != null;
139
146
  var isComplexType = (o) => {
140
147
  o = typeof o;
141
148
  return o === "object" || o === "function";
@@ -317,7 +324,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
317
324
  }
318
325
  if (!appliedStyles.has(scopeId2)) {
319
326
  {
320
- styleElm = doc.createElement("style");
327
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
321
328
  styleElm.innerHTML = style;
322
329
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
323
330
  if (nonce != null) {
@@ -327,7 +334,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
327
334
  if (styleContainerNode.nodeName === "HEAD") {
328
335
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
329
336
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
330
- styleContainerNode.insertBefore(styleElm, referenceNode2);
337
+ styleContainerNode.insertBefore(
338
+ styleElm,
339
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
340
+ );
331
341
  } else if ("host" in styleContainerNode) {
332
342
  if (supportsConstructableStylesheets) {
333
343
  const stylesheet = new CSSStyleSheet();
@@ -377,16 +387,18 @@ var attachStyles = (hostRef) => {
377
387
  endAttachStyles();
378
388
  };
379
389
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
380
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
390
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
381
391
  if (oldValue !== newValue) {
382
392
  let isProp = isMemberInElement(elm, memberName);
383
393
  let ln = memberName.toLowerCase();
384
394
  if (memberName === "class") {
385
395
  const classList = elm.classList;
386
396
  const oldClasses = parseClassList(oldValue);
387
- const newClasses = parseClassList(newValue);
388
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
389
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
397
+ let newClasses = parseClassList(newValue);
398
+ {
399
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
400
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
401
+ }
390
402
  } else if (memberName === "key") ; else if (memberName === "ref") {
391
403
  if (newValue) {
392
404
  newValue(elm);
@@ -424,7 +436,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
424
436
  elm.setAttribute(memberName, n);
425
437
  }
426
438
  }
427
- } else {
439
+ } else if (elm[memberName] !== newValue) {
428
440
  elm[memberName] = newValue;
429
441
  }
430
442
  } catch (e) {
@@ -446,24 +458,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
446
458
  }
447
459
  };
448
460
  var parseClassListRegex = /\s/;
449
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
461
+ var parseClassList = (value) => {
462
+ if (typeof value === "object" && value && "baseVal" in value) {
463
+ value = value.baseVal;
464
+ }
465
+ if (!value || typeof value !== "string") {
466
+ return [];
467
+ }
468
+ return value.split(parseClassListRegex);
469
+ };
450
470
  var CAPTURE_EVENT_SUFFIX = "Capture";
451
471
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
452
472
 
453
473
  // src/runtime/vdom/update-element.ts
454
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
474
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
455
475
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
456
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
457
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
476
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
477
+ const newVnodeAttrs = newVnode.$attrs$ || {};
458
478
  {
459
479
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
460
480
  if (!(memberName in newVnodeAttrs)) {
461
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
481
+ setAccessor(
482
+ elm,
483
+ memberName,
484
+ oldVnodeAttrs[memberName],
485
+ void 0,
486
+ isSvgMode2,
487
+ newVnode.$flags$);
462
488
  }
463
489
  }
464
490
  }
465
491
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
466
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
492
+ setAccessor(
493
+ elm,
494
+ memberName,
495
+ oldVnodeAttrs[memberName],
496
+ newVnodeAttrs[memberName],
497
+ isSvgMode2,
498
+ newVnode.$flags$);
467
499
  }
468
500
  };
469
501
  function sortedAttrNames(attrNames) {
@@ -475,13 +507,10 @@ function sortedAttrNames(attrNames) {
475
507
  attrNames
476
508
  );
477
509
  }
478
-
479
- // src/runtime/vdom/vdom-render.ts
480
- var scopeId;
481
510
  var hostTagName;
482
511
  var useNativeShadowDom = false;
483
512
  var isSvgMode = false;
484
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
513
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
485
514
  const newVNode2 = newParentVNode.$children$[childIndex];
486
515
  let i2 = 0;
487
516
  let elm;
@@ -502,11 +531,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
502
531
  {
503
532
  updateElement(null, newVNode2, isSvgMode);
504
533
  }
505
- const rootNode = elm.getRootNode();
506
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
507
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
508
- elm.classList.add(elm["s-si"] = scopeId);
509
- }
510
534
  if (newVNode2.$children$) {
511
535
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
512
536
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -643,6 +667,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
643
667
  if (!isInitialRender) {
644
668
  return leftVNode.$key$ === rightVNode.$key$;
645
669
  }
670
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
671
+ leftVNode.$key$ = rightVNode.$key$;
672
+ }
646
673
  return true;
647
674
  }
648
675
  return false;
@@ -689,8 +716,9 @@ var nullifyVNodeRefs = (vNode) => {
689
716
  }
690
717
  };
691
718
  var insertBefore = (parent, newNode, reference) => {
692
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
693
- return inserted;
719
+ {
720
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
721
+ }
694
722
  };
695
723
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
696
724
  const hostElm = hostRef.$hostElement$;
@@ -715,9 +743,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
715
743
  rootVnode.$flags$ |= 4 /* isHost */;
716
744
  hostRef.$vnode$ = rootVnode;
717
745
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
718
- {
719
- scopeId = hostElm["s-sc"];
720
- }
721
746
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
722
747
  patch(oldVNode, rootVnode, isInitialLoad);
723
748
  };
@@ -725,7 +750,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
725
750
  // src/runtime/update-component.ts
726
751
  var attachToAncestor = (hostRef, ancestorComponent) => {
727
752
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
728
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
753
+ const index = ancestorComponent["s-p"].push(
754
+ new Promise(
755
+ (r) => hostRef.$onRenderResolve$ = () => {
756
+ ancestorComponent["s-p"].splice(index - 1, 1);
757
+ r();
758
+ }
759
+ )
760
+ );
729
761
  }
730
762
  };
731
763
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -752,7 +784,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
752
784
  let maybePromise;
753
785
  if (isInitialLoad) {
754
786
  {
755
- maybePromise = safeCall(instance, "componentWillLoad");
787
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
756
788
  }
757
789
  }
758
790
  endSchedule();
@@ -821,7 +853,7 @@ var postUpdateComponent = (hostRef) => {
821
853
  const instance = hostRef.$lazyInstance$ ;
822
854
  const ancestorComponent = hostRef.$ancestorComponent$;
823
855
  {
824
- safeCall(instance, "componentDidRender");
856
+ safeCall(instance, "componentDidRender", void 0, elm);
825
857
  }
826
858
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
827
859
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -829,7 +861,7 @@ var postUpdateComponent = (hostRef) => {
829
861
  addHydratedFlag(elm);
830
862
  }
831
863
  {
832
- safeCall(instance, "componentDidLoad");
864
+ safeCall(instance, "componentDidLoad", void 0, elm);
833
865
  }
834
866
  endPostUpdate();
835
867
  {
@@ -858,12 +890,12 @@ var appDidLoad = (who) => {
858
890
  }
859
891
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
860
892
  };
861
- var safeCall = (instance, method, arg) => {
893
+ var safeCall = (instance, method, arg, elm) => {
862
894
  if (instance && instance[method]) {
863
895
  try {
864
896
  return instance[method](arg);
865
897
  } catch (e) {
866
- consoleError(e);
898
+ consoleError(e, elm);
867
899
  }
868
900
  }
869
901
  return void 0;
@@ -922,15 +954,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
922
954
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
923
955
  members.map(([memberName, [memberFlags]]) => {
924
956
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
957
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
958
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
959
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
960
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
961
+ Object.defineProperty(prototype, memberName, {
962
+ get() {
963
+ {
964
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
965
+ return getValue(this, memberName);
966
+ }
967
+ const ref = getHostRef(this);
968
+ const instance = ref ? ref.$lazyInstance$ : prototype;
969
+ if (!instance) return;
970
+ return instance[memberName];
971
+ }
972
+ },
973
+ configurable: true,
974
+ enumerable: true
975
+ });
976
+ }
925
977
  Object.defineProperty(prototype, memberName, {
926
- get() {
927
- return getValue(this, memberName);
928
- },
929
978
  set(newValue) {
930
- setValue(this, memberName, newValue, cmpMeta);
931
- },
932
- configurable: true,
933
- enumerable: true
979
+ const ref = getHostRef(this);
980
+ if (origSetter) {
981
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
982
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
983
+ newValue = ref.$instanceValues$.get(memberName);
984
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
985
+ ref.$instanceValues$.set(memberName, currentValue);
986
+ }
987
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
988
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
989
+ setValue(this, memberName, newValue, cmpMeta);
990
+ return;
991
+ }
992
+ {
993
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
994
+ setValue(this, memberName, newValue, cmpMeta);
995
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
996
+ ref.$onReadyPromise$.then(() => {
997
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
998
+ ref.$lazyInstance$[memberName] = newValue;
999
+ }
1000
+ });
1001
+ }
1002
+ return;
1003
+ }
1004
+ const setterSetVal = () => {
1005
+ const currentValue = ref.$lazyInstance$[memberName];
1006
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1007
+ ref.$instanceValues$.set(memberName, currentValue);
1008
+ }
1009
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1010
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1011
+ };
1012
+ if (ref.$lazyInstance$) {
1013
+ setterSetVal();
1014
+ } else {
1015
+ ref.$onReadyPromise$.then(() => setterSetVal());
1016
+ }
1017
+ }
1018
+ }
934
1019
  });
935
1020
  }
936
1021
  });
@@ -940,7 +1025,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
940
1025
  plt.jmp(() => {
941
1026
  var _a2;
942
1027
  const propName = attrNameToPropName.get(attrName);
943
- if (this.hasOwnProperty(propName)) {
1028
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
944
1029
  newValue = this[propName];
945
1030
  delete this[propName];
946
1031
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -960,7 +1045,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
960
1045
  }
961
1046
  return;
962
1047
  }
963
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1048
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1049
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1050
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1051
+ this[propName] = newValue;
1052
+ }
964
1053
  });
965
1054
  };
966
1055
  Cstr.observedAttributes = Array.from(
@@ -987,9 +1076,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
987
1076
  let Cstr;
988
1077
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
989
1078
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
990
- const bundleId = cmpMeta.$lazyBundleId$;
991
- if (bundleId) {
992
- const CstrImport = loadModule(cmpMeta);
1079
+ {
1080
+ const CstrImport = loadModule(cmpMeta, hostRef);
993
1081
  if (CstrImport && "then" in CstrImport) {
994
1082
  const endLoad = uniqueTime();
995
1083
  Cstr = await CstrImport;
@@ -1014,7 +1102,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1014
1102
  try {
1015
1103
  new Cstr(hostRef);
1016
1104
  } catch (e) {
1017
- consoleError(e);
1105
+ consoleError(e, elm);
1018
1106
  }
1019
1107
  {
1020
1108
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1023,10 +1111,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1023
1111
  hostRef.$flags$ |= 128 /* isWatchReady */;
1024
1112
  }
1025
1113
  endNewInstance();
1026
- } else {
1027
- Cstr = elm.constructor;
1028
- const cmpTag = elm.localName;
1029
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1030
1114
  }
1031
1115
  if (Cstr && Cstr.style) {
1032
1116
  let style;
@@ -1049,7 +1133,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1049
1133
  schedule();
1050
1134
  }
1051
1135
  };
1052
- var fireConnectedCallback = (instance) => {
1136
+ var fireConnectedCallback = (instance, elm) => {
1053
1137
  };
1054
1138
 
1055
1139
  // src/runtime/connected-callback.ts
@@ -1089,20 +1173,26 @@ var connectedCallback = (elm) => {
1089
1173
  endConnected();
1090
1174
  }
1091
1175
  };
1092
- var disconnectInstance = (instance) => {
1176
+ var disconnectInstance = (instance, elm) => {
1093
1177
  {
1094
- safeCall(instance, "disconnectedCallback");
1178
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1095
1179
  }
1096
1180
  };
1097
1181
  var disconnectedCallback = async (elm) => {
1098
1182
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1099
1183
  const hostRef = getHostRef(elm);
1100
1184
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1101
- disconnectInstance(hostRef.$lazyInstance$);
1185
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1102
1186
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1103
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1187
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1104
1188
  }
1105
1189
  }
1190
+ if (rootAppliedStyles.has(elm)) {
1191
+ rootAppliedStyles.delete(elm);
1192
+ }
1193
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1194
+ rootAppliedStyles.delete(elm.shadowRoot);
1195
+ }
1106
1196
  };
1107
1197
 
1108
1198
  // src/runtime/bootstrap-lazy.ts
@@ -1183,6 +1273,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1183
1273
  }
1184
1274
  disconnectedCallback() {
1185
1275
  plt.jmp(() => disconnectedCallback(this));
1276
+ plt.raf(() => {
1277
+ var _a3;
1278
+ const hostRef = getHostRef(this);
1279
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1280
+ delete hostRef.$vnode$.$elm$;
1281
+ }
1282
+ });
1186
1283
  }
1187
1284
  componentOnReady() {
1188
1285
  return getHostRef(this).$onReadyPromise$;
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-824bb999.js';
2
- export { s as setNonce } from './index-824bb999.js';
1
+ import { b as bootstrapLazy } from './index-a684ee07.js';
2
+ export { s as setNonce } from './index-a684ee07.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {