@lwc/engine-core 2.18.0 → 2.20.0

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.
@@ -1434,7 +1434,7 @@ const LightningElement = function () {
1434
1434
  // Linking elm, shadow root and component with the VM.
1435
1435
  associateVM(component, vm);
1436
1436
  associateVM(elm, vm);
1437
- if (vm.renderMode === 1 /* Shadow */) {
1437
+ if (vm.renderMode === 1 /* RenderMode.Shadow */) {
1438
1438
  vm.renderRoot = doAttachShadow(vm);
1439
1439
  }
1440
1440
  else {
@@ -1450,7 +1450,7 @@ const LightningElement = function () {
1450
1450
  function doAttachShadow(vm) {
1451
1451
  const { elm, mode, shadowMode, def: { ctor }, renderer: { attachShadow }, } = vm;
1452
1452
  const shadowRoot = attachShadow(elm, {
1453
- [KEY__SYNTHETIC_MODE]: shadowMode === 1 /* Synthetic */,
1453
+ [KEY__SYNTHETIC_MODE]: shadowMode === 1 /* ShadowMode.Synthetic */,
1454
1454
  delegatesFocus: Boolean(ctor.delegatesFocus),
1455
1455
  mode,
1456
1456
  });
@@ -1573,7 +1573,7 @@ LightningElement.prototype = {
1573
1573
  get template() {
1574
1574
  const vm = getAssociatedVM(this);
1575
1575
  if (process.env.NODE_ENV !== 'production') {
1576
- if (vm.renderMode === 0 /* Light */) {
1576
+ if (vm.renderMode === 0 /* RenderMode.Light */) {
1577
1577
  logError('`this.template` returns null for light DOM components. Since there is no shadow, the rendered content can be accessed via `this` itself. e.g. instead of `this.template.querySelector`, use `this.querySelector`.');
1578
1578
  }
1579
1579
  }
@@ -1945,13 +1945,13 @@ function internalWireFieldDecorator(key) {
1945
1945
  */
1946
1946
  function getClassDescriptorType(descriptor) {
1947
1947
  if (isFunction$1(descriptor.value)) {
1948
- return "method" /* Method */;
1948
+ return "method" /* DescriptorType.Method */;
1949
1949
  }
1950
1950
  else if (isFunction$1(descriptor.set) || isFunction$1(descriptor.get)) {
1951
- return "accessor" /* Accessor */;
1951
+ return "accessor" /* DescriptorType.Accessor */;
1952
1952
  }
1953
1953
  else {
1954
- return "field" /* Field */;
1954
+ return "field" /* DescriptorType.Field */;
1955
1955
  }
1956
1956
  }
1957
1957
  function validateObservedField(Ctor, fieldName, descriptor) {
@@ -1960,7 +1960,7 @@ function validateObservedField(Ctor, fieldName, descriptor) {
1960
1960
  const message = `Invalid observed ${fieldName} field. Found a duplicate ${type} with the same name.`;
1961
1961
  // [W-9927596] Ideally we always throw an error when detecting duplicate observed field.
1962
1962
  // This branch is only here for backward compatibility reasons.
1963
- if (type === "accessor" /* Accessor */) {
1963
+ if (type === "accessor" /* DescriptorType.Accessor */) {
1964
1964
  logError(message);
1965
1965
  }
1966
1966
  else {
@@ -1991,7 +1991,7 @@ function validateFieldDecoratedWithApi(Ctor, fieldName, descriptor) {
1991
1991
  const message = `Invalid @api ${fieldName} field. Found a duplicate ${type} with the same name.`;
1992
1992
  // [W-9927596] Ideally we always throw an error when detecting duplicate public properties.
1993
1993
  // This branch is only here for backward compatibility reasons.
1994
- if (type === "accessor" /* Accessor */) {
1994
+ if (type === "accessor" /* DescriptorType.Accessor */) {
1995
1995
  logError(message);
1996
1996
  }
1997
1997
  else {
@@ -2713,8 +2713,8 @@ function createComponentDef(Ctor) {
2713
2713
  // assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
2714
2714
  assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
2715
2715
  if (!isUndefined$1(ctorShadowSupportMode)) {
2716
- assert.invariant(ctorShadowSupportMode === "any" /* Any */ ||
2717
- ctorShadowSupportMode === "reset" /* Default */, `Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
2716
+ assert.invariant(ctorShadowSupportMode === "any" /* ShadowSupportMode.Any */ ||
2717
+ ctorShadowSupportMode === "reset" /* ShadowSupportMode.Default */, `Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
2718
2718
  }
2719
2719
  if (!isUndefined$1(ctorRenderMode)) {
2720
2720
  assert.invariant(ctorRenderMode === 'light' || ctorRenderMode === 'shadow', `Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
@@ -2742,7 +2742,7 @@ function createComponentDef(Ctor) {
2742
2742
  }
2743
2743
  let renderMode = superDef.renderMode;
2744
2744
  if (!isUndefined$1(ctorRenderMode)) {
2745
- renderMode = ctorRenderMode === 'light' ? 0 /* Light */ : 1 /* Shadow */;
2745
+ renderMode = ctorRenderMode === 'light' ? 0 /* RenderMode.Light */ : 1 /* RenderMode.Shadow */;
2746
2746
  }
2747
2747
  const template = getComponentRegisteredTemplate(Ctor) || superDef.template;
2748
2748
  const name = Ctor.name || superDef.name;
@@ -2835,8 +2835,8 @@ const lightingElementDef = {
2835
2835
  props: lightningBasedDescriptors,
2836
2836
  propsConfig: EmptyObject,
2837
2837
  methods: EmptyObject,
2838
- renderMode: 1 /* Shadow */,
2839
- shadowSupportMode: "reset" /* Default */,
2838
+ renderMode: 1 /* RenderMode.Shadow */,
2839
+ shadowSupportMode: "reset" /* ShadowSupportMode.Default */,
2840
2840
  wire: EmptyObject,
2841
2841
  bridge: BaseBridgeElement,
2842
2842
  template: defaultEmptyTemplate,
@@ -2858,7 +2858,7 @@ function getComponentDef(Ctor) {
2858
2858
  // avoid leaking the reference to the public props descriptors
2859
2859
  publicProps[key] = {
2860
2860
  config: propsConfig[key] || 0,
2861
- type: "any" /* any */,
2861
+ type: "any" /* PropDefType.any */,
2862
2862
  attr: htmlPropertyToAttribute(key),
2863
2863
  };
2864
2864
  }
@@ -2915,7 +2915,7 @@ function getUpgradableConstructor(tagName, renderer) {
2915
2915
  */
2916
2916
  function isVBaseElement(vnode) {
2917
2917
  const { type } = vnode;
2918
- return type === 2 /* Element */ || type === 3 /* CustomElement */;
2918
+ return type === 2 /* VNodeType.Element */ || type === 3 /* VNodeType.CustomElement */;
2919
2919
  }
2920
2920
  function isSameVnode(vnode1, vnode2) {
2921
2921
  return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
@@ -3171,21 +3171,21 @@ function patch(n1, n2, renderer) {
3171
3171
  }
3172
3172
  }
3173
3173
  switch (n2.type) {
3174
- case 0 /* Text */:
3174
+ case 0 /* VNodeType.Text */:
3175
3175
  // VText has no special capability, fallback to the owner's renderer
3176
3176
  patchText(n1, n2, renderer);
3177
3177
  break;
3178
- case 1 /* Comment */:
3178
+ case 1 /* VNodeType.Comment */:
3179
3179
  // VComment has no special capability, fallback to the owner's renderer
3180
3180
  patchComment(n1, n2, renderer);
3181
3181
  break;
3182
- case 4 /* Static */:
3182
+ case 4 /* VNodeType.Static */:
3183
3183
  n2.elm = n1.elm;
3184
3184
  break;
3185
- case 2 /* Element */:
3185
+ case 2 /* VNodeType.Element */:
3186
3186
  patchElement(n1, n2, (_a = n2.data.renderer) !== null && _a !== void 0 ? _a : renderer);
3187
3187
  break;
3188
- case 3 /* CustomElement */:
3188
+ case 3 /* VNodeType.CustomElement */:
3189
3189
  patchCustomElement(n1, n2, (_b = n2.data.renderer) !== null && _b !== void 0 ? _b : renderer);
3190
3190
  break;
3191
3191
  }
@@ -3193,23 +3193,23 @@ function patch(n1, n2, renderer) {
3193
3193
  function mount(node, parent, renderer, anchor) {
3194
3194
  var _a, _b;
3195
3195
  switch (node.type) {
3196
- case 0 /* Text */:
3196
+ case 0 /* VNodeType.Text */:
3197
3197
  // VText has no special capability, fallback to the owner's renderer
3198
3198
  mountText(node, parent, anchor, renderer);
3199
3199
  break;
3200
- case 1 /* Comment */:
3200
+ case 1 /* VNodeType.Comment */:
3201
3201
  // VComment has no special capability, fallback to the owner's renderer
3202
3202
  mountComment(node, parent, anchor, renderer);
3203
3203
  break;
3204
- case 4 /* Static */:
3204
+ case 4 /* VNodeType.Static */:
3205
3205
  // VStatic cannot have a custom renderer associated to them, using owner's renderer
3206
3206
  mountStatic(node, parent, anchor, renderer);
3207
3207
  break;
3208
- case 2 /* Element */:
3208
+ case 2 /* VNodeType.Element */:
3209
3209
  // If the vnode data has a renderer override use it, else fallback to owner's renderer
3210
3210
  mountElement(node, parent, anchor, (_a = node.data.renderer) !== null && _a !== void 0 ? _a : renderer);
3211
3211
  break;
3212
- case 3 /* CustomElement */:
3212
+ case 3 /* VNodeType.CustomElement */:
3213
3213
  // If the vnode data has a renderer override use it, else fallback to owner's renderer
3214
3214
  mountCustomElement(node, parent, anchor, (_b = node.data.renderer) !== null && _b !== void 0 ? _b : renderer);
3215
3215
  break;
@@ -3268,12 +3268,12 @@ function mountStatic(vnode, parent, anchor, renderer) {
3268
3268
  // Marks this node as Static to propagate the shadow resolver. must happen after elm is assigned to the proper shadow
3269
3269
  const { renderMode, shadowMode } = owner;
3270
3270
  if (isSyntheticShadowDefined) {
3271
- if (shadowMode === 1 /* Synthetic */ || renderMode === 0 /* Light */) {
3271
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3272
3272
  elm[KEY__SHADOW_STATIC] = true;
3273
3273
  }
3274
3274
  }
3275
3275
  if (process.env.NODE_ENV !== 'production') {
3276
- const isLight = renderMode === 0 /* Light */;
3276
+ const isLight = renderMode === 0 /* RenderMode.Light */;
3277
3277
  patchElementWithRestrictions(elm, { isPortal: false, isLight });
3278
3278
  }
3279
3279
  insertNode(elm, parent, anchor, renderer);
@@ -3305,7 +3305,7 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
3305
3305
  insertNode(elm, parent, anchor, renderer);
3306
3306
  if (vm) {
3307
3307
  if (process.env.NODE_ENV !== 'production') {
3308
- assert.isTrue(vm.state === 0 /* created */, `${vm} cannot be recycled.`);
3308
+ assert.isTrue(vm.state === 0 /* VMState.created */, `${vm} cannot be recycled.`);
3309
3309
  }
3310
3310
  runConnectedCallback(vm);
3311
3311
  }
@@ -3350,14 +3350,14 @@ function unmount(vnode, parent, renderer, doRemove = false) {
3350
3350
  removeNode(elm, parent, renderer);
3351
3351
  }
3352
3352
  switch (type) {
3353
- case 2 /* Element */: {
3353
+ case 2 /* VNodeType.Element */: {
3354
3354
  // Slot content is removed to trigger slotchange event when removing slot.
3355
3355
  // Only required for synthetic shadow.
3356
- const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1 /* Synthetic */;
3356
+ const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1 /* ShadowMode.Synthetic */;
3357
3357
  unmountVNodes(vnode.children, elm, renderer, shouldRemoveChildren);
3358
3358
  break;
3359
3359
  }
3360
- case 3 /* CustomElement */: {
3360
+ case 3 /* VNodeType.CustomElement */: {
3361
3361
  const { vm } = vnode;
3362
3362
  // No need to unmount the children here, `removeVM` will take care of removing the
3363
3363
  // children.
@@ -3400,7 +3400,7 @@ function linkNodeToShadow(elm, owner, renderer) {
3400
3400
  const { isSyntheticShadowDefined } = renderer;
3401
3401
  // TODO [#1164]: this should eventually be done by the polyfill directly
3402
3402
  if (isSyntheticShadowDefined) {
3403
- if (shadowMode === 1 /* Synthetic */ || renderMode === 0 /* Light */) {
3403
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3404
3404
  elm[KEY__SHADOW_RESOLVER] = renderRoot[KEY__SHADOW_RESOLVER];
3405
3405
  }
3406
3406
  }
@@ -3450,12 +3450,12 @@ function patchElementPropsAndAttrs$1(oldVnode, vnode, renderer) {
3450
3450
  function fallbackElmHook(elm, vnode, renderer) {
3451
3451
  const { owner } = vnode;
3452
3452
  setScopeTokenClassIfNecessary(elm, owner, renderer);
3453
- if (owner.shadowMode === 1 /* Synthetic */) {
3453
+ if (owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
3454
3454
  const { data: { context }, } = vnode;
3455
3455
  const { stylesheetToken } = owner.context;
3456
3456
  if (!isUndefined$1(context) &&
3457
3457
  !isUndefined$1(context.lwc) &&
3458
- context.lwc.dom === "manual" /* Manual */) {
3458
+ context.lwc.dom === "manual" /* LwcDomMode.Manual */) {
3459
3459
  // this element will now accept any manual content inserted into it
3460
3460
  observeElementChildNodes(elm);
3461
3461
  }
@@ -3469,8 +3469,8 @@ function fallbackElmHook(elm, vnode, renderer) {
3469
3469
  const { data: { context }, } = vnode;
3470
3470
  const isPortal = !isUndefined$1(context) &&
3471
3471
  !isUndefined$1(context.lwc) &&
3472
- context.lwc.dom === "manual" /* Manual */;
3473
- const isLight = owner.renderMode === 0 /* Light */;
3472
+ context.lwc.dom === "manual" /* LwcDomMode.Manual */;
3473
+ const isLight = owner.renderMode === 0 /* RenderMode.Light */;
3474
3474
  patchElementWithRestrictions(elm, { isPortal, isLight });
3475
3475
  }
3476
3476
  }
@@ -3488,7 +3488,7 @@ function allocateChildren(vnode, vm) {
3488
3488
  const children = vnode.aChildren || vnode.children;
3489
3489
  vm.aChildren = children;
3490
3490
  const { renderMode, shadowMode } = vm;
3491
- if (shadowMode === 1 /* Synthetic */ || renderMode === 0 /* Light */) {
3491
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3492
3492
  // slow path
3493
3493
  allocateInSlot(vm, children);
3494
3494
  // save the allocated children in case this vnode is reused.
@@ -3507,7 +3507,7 @@ function createViewModelHook(elm, vnode, renderer) {
3507
3507
  }
3508
3508
  const { sel, mode, ctor, owner } = vnode;
3509
3509
  setScopeTokenClassIfNecessary(elm, owner, renderer);
3510
- if (owner.shadowMode === 1 /* Synthetic */) {
3510
+ if (owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
3511
3511
  const { stylesheetToken } = owner.context;
3512
3512
  // when running in synthetic shadow mode, we need to set the shadowToken value
3513
3513
  // into each element from the template, so they can be styled accordingly.
@@ -3749,7 +3749,7 @@ function addVNodeToChildLWC(vnode) {
3749
3749
  // [st]atic node
3750
3750
  function st(fragment, key) {
3751
3751
  return {
3752
- type: 4 /* Static */,
3752
+ type: 4 /* VNodeType.Static */,
3753
3753
  sel: undefined,
3754
3754
  key,
3755
3755
  elm: undefined,
@@ -3783,7 +3783,7 @@ function h(sel, data, children = EmptyArray) {
3783
3783
  let elm;
3784
3784
  const { key } = data;
3785
3785
  return {
3786
- type: 2 /* Element */,
3786
+ type: 2 /* VNodeType.Element */,
3787
3787
  sel,
3788
3788
  data,
3789
3789
  children,
@@ -3820,11 +3820,11 @@ function s(slotName, data, children, slotset) {
3820
3820
  }
3821
3821
  const vmBeingRendered = getVMBeingRendered();
3822
3822
  const { renderMode, shadowMode } = vmBeingRendered;
3823
- if (renderMode === 0 /* Light */) {
3823
+ if (renderMode === 0 /* RenderMode.Light */) {
3824
3824
  sc(children);
3825
3825
  return children;
3826
3826
  }
3827
- if (shadowMode === 1 /* Synthetic */) {
3827
+ if (shadowMode === 1 /* ShadowMode.Synthetic */) {
3828
3828
  // TODO [#1276]: compiler should give us some sort of indicator when a vnodes collection is dynamic
3829
3829
  sc(children);
3830
3830
  }
@@ -3858,7 +3858,7 @@ function c(sel, Ctor, data, children = EmptyArray) {
3858
3858
  const { key } = data;
3859
3859
  let elm, aChildren, vm;
3860
3860
  const vnode = {
3861
- type: 3 /* CustomElement */,
3861
+ type: 3 /* VNodeType.CustomElement */,
3862
3862
  sel,
3863
3863
  data,
3864
3864
  children,
@@ -3966,7 +3966,7 @@ function f(items) {
3966
3966
  function t(text) {
3967
3967
  let sel, key, elm;
3968
3968
  return {
3969
- type: 0 /* Text */,
3969
+ type: 0 /* VNodeType.Text */,
3970
3970
  sel,
3971
3971
  text,
3972
3972
  elm,
@@ -3978,7 +3978,7 @@ function t(text) {
3978
3978
  function co(text) {
3979
3979
  let sel, key, elm;
3980
3980
  return {
3981
- type: 1 /* Comment */,
3981
+ type: 1 /* VNodeType.Comment */,
3982
3982
  sel,
3983
3983
  text,
3984
3984
  elm,
@@ -4027,7 +4027,7 @@ function gid(id) {
4027
4027
  return null;
4028
4028
  }
4029
4029
  const { idx, shadowMode } = vmBeingRendered;
4030
- if (shadowMode === 1 /* Synthetic */) {
4030
+ if (shadowMode === 1 /* ShadowMode.Synthetic */) {
4031
4031
  return StringReplace.call(id, /\S+/g, (id) => `${id}-${idx}`);
4032
4032
  }
4033
4033
  return id;
@@ -4049,7 +4049,7 @@ function fid(url) {
4049
4049
  }
4050
4050
  const { idx, shadowMode } = vmBeingRendered;
4051
4051
  // Apply transformation only for fragment-only-urls, and only in shadow DOM
4052
- if (shadowMode === 1 /* Synthetic */ && /^#/.test(url)) {
4052
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ && /^#/.test(url)) {
4053
4053
  return `${url}-${idx}`;
4054
4054
  }
4055
4055
  return url;
@@ -4172,7 +4172,7 @@ function createInlineStyleVNode(content) {
4172
4172
  function updateStylesheetToken(vm, template) {
4173
4173
  const { elm, context, renderMode, shadowMode, renderer: { getClassList, removeAttribute, setAttribute }, } = vm;
4174
4174
  const { stylesheets: newStylesheets, stylesheetToken: newStylesheetToken } = template;
4175
- const isSyntheticShadow = renderMode === 1 /* Shadow */ && shadowMode === 1 /* Synthetic */;
4175
+ const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
4176
4176
  const { hasScopedStyles } = context;
4177
4177
  let newToken;
4178
4178
  let newHasTokenInClass;
@@ -4228,19 +4228,19 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
4228
4228
  const isScopedCss = stylesheet[KEY__SCOPED_CSS];
4229
4229
  // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
4230
4230
  const scopeToken = isScopedCss ||
4231
- (vm.shadowMode === 1 /* Synthetic */ && vm.renderMode === 1 /* Shadow */)
4231
+ (vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */)
4232
4232
  ? stylesheetToken
4233
4233
  : undefined;
4234
4234
  // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
4235
4235
  // native shadow DOM. Synthetic shadow DOM never uses `:host`.
4236
- const useActualHostSelector = vm.renderMode === 0 /* Light */
4236
+ const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */
4237
4237
  ? !isScopedCss
4238
- : vm.shadowMode === 0 /* Native */;
4238
+ : vm.shadowMode === 0 /* ShadowMode.Native */;
4239
4239
  // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
4240
4240
  // we use an attribute selector on the host to simulate :dir().
4241
4241
  let useNativeDirPseudoclass;
4242
- if (vm.renderMode === 1 /* Shadow */) {
4243
- useNativeDirPseudoclass = vm.shadowMode === 0 /* Native */;
4242
+ if (vm.renderMode === 1 /* RenderMode.Shadow */) {
4243
+ useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
4244
4244
  }
4245
4245
  else {
4246
4246
  // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
@@ -4249,7 +4249,7 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
4249
4249
  // Only calculate the root once as necessary
4250
4250
  root = getNearestShadowComponent(vm);
4251
4251
  }
4252
- useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* Native */;
4252
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
4253
4253
  }
4254
4254
  ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
4255
4255
  }
@@ -4270,7 +4270,7 @@ function getStylesheetsContent(vm, template) {
4270
4270
  function getNearestShadowComponent(vm) {
4271
4271
  let owner = vm;
4272
4272
  while (!isNull(owner)) {
4273
- if (owner.renderMode === 1 /* Shadow */) {
4273
+ if (owner.renderMode === 1 /* RenderMode.Shadow */) {
4274
4274
  return owner;
4275
4275
  }
4276
4276
  owner = owner.owner;
@@ -4279,7 +4279,7 @@ function getNearestShadowComponent(vm) {
4279
4279
  }
4280
4280
  function getNearestNativeShadowComponent(vm) {
4281
4281
  const owner = getNearestShadowComponent(vm);
4282
- if (!isNull(owner) && owner.shadowMode === 1 /* Synthetic */) {
4282
+ if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
4283
4283
  // Synthetic-within-native is impossible. So if the nearest shadow component is
4284
4284
  // synthetic, we know we won't find a native component if we go any further.
4285
4285
  return null;
@@ -4288,7 +4288,7 @@ function getNearestNativeShadowComponent(vm) {
4288
4288
  }
4289
4289
  function createStylesheet(vm, stylesheets) {
4290
4290
  const { renderMode, shadowMode, renderer: { ssr, insertStylesheet }, } = vm;
4291
- if (renderMode === 1 /* Shadow */ && shadowMode === 1 /* Synthetic */) {
4291
+ if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
4292
4292
  for (let i = 0; i < stylesheets.length; i++) {
4293
4293
  insertStylesheet(stylesheets[i]);
4294
4294
  }
@@ -4391,7 +4391,7 @@ function logOperationStart(opId, vm) {
4391
4391
  start(markName);
4392
4392
  }
4393
4393
  if (isProfilerEnabled) {
4394
- currentDispatcher(opId, 0 /* Start */, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
4394
+ currentDispatcher(opId, 0 /* Phase.Start */, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
4395
4395
  }
4396
4396
  }
4397
4397
  function logOperationEnd(opId, vm) {
@@ -4401,7 +4401,7 @@ function logOperationEnd(opId, vm) {
4401
4401
  end(measureName, markName);
4402
4402
  }
4403
4403
  if (isProfilerEnabled) {
4404
- currentDispatcher(opId, 1 /* Stop */, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
4404
+ currentDispatcher(opId, 1 /* Phase.Stop */, vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
4405
4405
  }
4406
4406
  }
4407
4407
  function logGlobalOperationStart(opId, vm) {
@@ -4411,7 +4411,7 @@ function logGlobalOperationStart(opId, vm) {
4411
4411
  start(markName);
4412
4412
  }
4413
4413
  if (isProfilerEnabled) {
4414
- currentDispatcher(opId, 0 /* Start */, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
4414
+ currentDispatcher(opId, 0 /* Phase.Start */, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
4415
4415
  }
4416
4416
  }
4417
4417
  function logGlobalOperationEnd(opId, vm) {
@@ -4421,7 +4421,7 @@ function logGlobalOperationEnd(opId, vm) {
4421
4421
  end(opName, markName);
4422
4422
  }
4423
4423
  if (isProfilerEnabled) {
4424
- currentDispatcher(opId, 1 /* Stop */, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
4424
+ currentDispatcher(opId, 1 /* Phase.Stop */, vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
4425
4425
  }
4426
4426
  }
4427
4427
 
@@ -4447,11 +4447,11 @@ function validateSlots(vm, html) {
4447
4447
  const { cmpSlots } = vm;
4448
4448
  const { slots = EmptyArray } = html;
4449
4449
  for (const slotName in cmpSlots) {
4450
- // eslint-disable-next-line lwc-internal/no-production-assert
4450
+ // eslint-disable-next-line @lwc/lwc-internal/no-production-assert
4451
4451
  assert.isTrue(isArray$1(cmpSlots[slotName]), `Slots can only be set to an array, instead received ${toString$1(cmpSlots[slotName])} for slot "${slotName}" in ${vm}.`);
4452
4452
  if (slotName !== '' && ArrayIndexOf.call(slots, slotName) === -1) {
4453
4453
  // TODO [#1297]: this should never really happen because the compiler should always validate
4454
- // eslint-disable-next-line lwc-internal/no-production-assert
4454
+ // eslint-disable-next-line @lwc/lwc-internal/no-production-assert
4455
4455
  logError(`Ignoring unknown provided slot name "${slotName}" in ${vm}. Check for a typo on the slot attribute.`, vm);
4456
4456
  }
4457
4457
  }
@@ -4459,7 +4459,7 @@ function validateSlots(vm, html) {
4459
4459
  function validateLightDomTemplate(template, vm) {
4460
4460
  if (template === defaultEmptyTemplate)
4461
4461
  return;
4462
- if (vm.renderMode === 0 /* Light */) {
4462
+ if (vm.renderMode === 0 /* RenderMode.Light */) {
4463
4463
  assert.isTrue(template.renderMode === 'light', `Light DOM components can't render shadow DOM templates. Add an 'lwc:render-mode="light"' directive to the root template tag of ${getComponentTag(vm)}.`);
4464
4464
  }
4465
4465
  else {
@@ -4472,13 +4472,13 @@ function buildParseFragmentFn(createFragmentFn) {
4472
4472
  return function () {
4473
4473
  const { context: { hasScopedStyles, stylesheetToken }, shadowMode, renderer, } = getVMBeingRendered();
4474
4474
  const hasStyleToken = !isUndefined$1(stylesheetToken);
4475
- const isSyntheticShadow = shadowMode === 1 /* Synthetic */;
4475
+ const isSyntheticShadow = shadowMode === 1 /* ShadowMode.Synthetic */;
4476
4476
  let cacheKey = 0;
4477
4477
  if (hasStyleToken && hasScopedStyles) {
4478
- cacheKey |= 1 /* HAS_SCOPED_STYLE */;
4478
+ cacheKey |= 1 /* FragmentCache.HAS_SCOPED_STYLE */;
4479
4479
  }
4480
4480
  if (hasStyleToken && isSyntheticShadow) {
4481
- cacheKey |= 2 /* SHADOW_MODE_SYNTHETIC */;
4481
+ cacheKey |= 2 /* FragmentCache.SHADOW_MODE_SYNTHETIC */;
4482
4482
  }
4483
4483
  if (!isUndefined$1(cache[cacheKey])) {
4484
4484
  return cache[cacheKey];
@@ -4533,7 +4533,7 @@ function evaluateTemplate(vm, html) {
4533
4533
  runWithBoundaryProtection(vm, vm.owner, () => {
4534
4534
  // pre
4535
4535
  vmBeingRendered = vm;
4536
- logOperationStart(1 /* Render */, vm);
4536
+ logOperationStart(1 /* OperationId.Render */, vm);
4537
4537
  }, () => {
4538
4538
  // job
4539
4539
  const { component, context, cmpSlots, cmpTemplate, tro } = vm;
@@ -4591,7 +4591,7 @@ function evaluateTemplate(vm, html) {
4591
4591
  // post
4592
4592
  isUpdatingTemplate = isUpdatingTemplateInception;
4593
4593
  vmBeingRendered = vmOfTemplateBeingUpdatedInception;
4594
- logOperationEnd(1 /* Render */, vm);
4594
+ logOperationEnd(1 /* OperationId.Render */, vm);
4595
4595
  });
4596
4596
  if (process.env.NODE_ENV !== 'production') {
4597
4597
  assert.invariant(isArray$1(vnodes), `Compiler should produce html functions that always return an array.`);
@@ -4630,7 +4630,7 @@ function invokeComponentCallback(vm, fn, args) {
4630
4630
  function invokeComponentConstructor(vm, Ctor) {
4631
4631
  const vmBeingConstructedInception = vmBeingConstructed;
4632
4632
  let error;
4633
- logOperationStart(0 /* Constructor */, vm);
4633
+ logOperationStart(0 /* OperationId.Constructor */, vm);
4634
4634
  vmBeingConstructed = vm;
4635
4635
  /**
4636
4636
  * Constructors don't need to be wrapped with a boundary because for root elements
@@ -4652,7 +4652,7 @@ function invokeComponentConstructor(vm, Ctor) {
4652
4652
  error = Object(e);
4653
4653
  }
4654
4654
  finally {
4655
- logOperationEnd(0 /* Constructor */, vm);
4655
+ logOperationEnd(0 /* OperationId.Constructor */, vm);
4656
4656
  vmBeingConstructed = vmBeingConstructedInception;
4657
4657
  if (!isUndefined$1(error)) {
4658
4658
  addErrorComponentStack(vm, error);
@@ -4833,12 +4833,12 @@ function rerenderVM(vm) {
4833
4833
  function connectRootElement(elm) {
4834
4834
  const vm = getAssociatedVM(elm);
4835
4835
  logGlobalOperationStart(7
4836
- /* GlobalHydrate */
4836
+ /* OperationId.GlobalHydrate */
4837
4837
  , vm); // Usually means moving the element from one place to another, which is observable via
4838
4838
  // life-cycle hooks.
4839
4839
 
4840
4840
  if (vm.state === 1
4841
- /* connected */
4841
+ /* VMState.connected */
4842
4842
  ) {
4843
4843
  disconnectRootElement(elm);
4844
4844
  }
@@ -4846,7 +4846,7 @@ function connectRootElement(elm) {
4846
4846
  runConnectedCallback(vm);
4847
4847
  rehydrate(vm);
4848
4848
  logGlobalOperationEnd(7
4849
- /* GlobalHydrate */
4849
+ /* OperationId.GlobalHydrate */
4850
4850
  , vm);
4851
4851
  }
4852
4852
  function disconnectRootElement(elm) {
@@ -4864,7 +4864,7 @@ function resetComponentStateWhenRemoved(vm) {
4864
4864
  } = vm;
4865
4865
 
4866
4866
  if (state !== 2
4867
- /* disconnected */
4867
+ /* VMState.disconnected */
4868
4868
  ) {
4869
4869
  const {
4870
4870
  oar,
@@ -4893,9 +4893,9 @@ function resetComponentStateWhenRemoved(vm) {
4893
4893
  function removeVM(vm) {
4894
4894
  if (process.env.NODE_ENV !== 'production') {
4895
4895
  assert.isTrue(vm.state === 1
4896
- /* connected */
4896
+ /* VMState.connected */
4897
4897
  || vm.state === 2
4898
- /* disconnected */
4898
+ /* VMState.disconnected */
4899
4899
  , `${vm} must have been connected.`);
4900
4900
  }
4901
4901
 
@@ -4906,7 +4906,7 @@ function getNearestShadowAncestor(vm) {
4906
4906
  let ancestor = vm.owner;
4907
4907
 
4908
4908
  while (!isNull(ancestor) && ancestor.renderMode === 0
4909
- /* Light */
4909
+ /* RenderMode.Light */
4910
4910
  ) {
4911
4911
  ancestor = ancestor.owner;
4912
4912
  }
@@ -4927,7 +4927,7 @@ function createVM(elm, ctor, renderer, options) {
4927
4927
  def,
4928
4928
  idx: idx++,
4929
4929
  state: 0
4930
- /* created */
4930
+ /* VMState.created */
4931
4931
  ,
4932
4932
  isScheduled: false,
4933
4933
  isDirty: true,
@@ -4976,7 +4976,7 @@ function createVM(elm, ctor, renderer, options) {
4976
4976
 
4977
4977
  if (runtimeFlags.ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST) {
4978
4978
  vm.shadowMode = 0
4979
- /* Native */
4979
+ /* ShadowMode.Native */
4980
4980
  ;
4981
4981
  }
4982
4982
  } // Create component instance associated to the vm and the element.
@@ -5003,57 +5003,57 @@ function computeShadowMode(vm, renderer) {
5003
5003
 
5004
5004
  if (isSyntheticShadowDefined) {
5005
5005
  if (def.renderMode === 0
5006
- /* Light */
5006
+ /* RenderMode.Light */
5007
5007
  ) {
5008
5008
  // ShadowMode.Native implies "not synthetic shadow" which is consistent with how
5009
5009
  // everything defaults to native when the synthetic shadow polyfill is unavailable.
5010
5010
  shadowMode = 0
5011
- /* Native */
5011
+ /* ShadowMode.Native */
5012
5012
  ;
5013
5013
  } else if (isNativeShadowDefined) {
5014
5014
  // Not combined with above condition because @lwc/features only supports identifiers in
5015
5015
  // the if-condition.
5016
5016
  if (runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5017
5017
  if (def.shadowSupportMode === "any"
5018
- /* Any */
5018
+ /* ShadowSupportMode.Any */
5019
5019
  ) {
5020
5020
  shadowMode = 0
5021
- /* Native */
5021
+ /* ShadowMode.Native */
5022
5022
  ;
5023
5023
  } else {
5024
5024
  const shadowAncestor = getNearestShadowAncestor(vm);
5025
5025
 
5026
5026
  if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
5027
- /* Native */
5027
+ /* ShadowMode.Native */
5028
5028
  ) {
5029
5029
  // Transitive support for native Shadow DOM. A component in native mode
5030
5030
  // transitively opts all of its descendants into native.
5031
5031
  shadowMode = 0
5032
- /* Native */
5032
+ /* ShadowMode.Native */
5033
5033
  ;
5034
5034
  } else {
5035
5035
  // Synthetic if neither this component nor any of its ancestors are configured
5036
5036
  // to be native.
5037
5037
  shadowMode = 1
5038
- /* Synthetic */
5038
+ /* ShadowMode.Synthetic */
5039
5039
  ;
5040
5040
  }
5041
5041
  }
5042
5042
  } else {
5043
5043
  shadowMode = 1
5044
- /* Synthetic */
5044
+ /* ShadowMode.Synthetic */
5045
5045
  ;
5046
5046
  }
5047
5047
  } else {
5048
5048
  // Synthetic if there is no native Shadow DOM support.
5049
5049
  shadowMode = 1
5050
- /* Synthetic */
5050
+ /* ShadowMode.Synthetic */
5051
5051
  ;
5052
5052
  }
5053
5053
  } else {
5054
5054
  // Native if the synthetic shadow polyfill is unavailable.
5055
5055
  shadowMode = 0
5056
- /* Native */
5056
+ /* ShadowMode.Native */
5057
5057
  ;
5058
5058
  }
5059
5059
 
@@ -5113,7 +5113,7 @@ function patchShadowRoot(vm, newCh) {
5113
5113
  runWithBoundaryProtection(vm, vm, () => {
5114
5114
  // pre
5115
5115
  logOperationStart(2
5116
- /* Patch */
5116
+ /* OperationId.Patch */
5117
5117
  , vm);
5118
5118
  }, () => {
5119
5119
  // job
@@ -5121,14 +5121,14 @@ function patchShadowRoot(vm, newCh) {
5121
5121
  }, () => {
5122
5122
  // post
5123
5123
  logOperationEnd(2
5124
- /* Patch */
5124
+ /* OperationId.Patch */
5125
5125
  , vm);
5126
5126
  });
5127
5127
  }
5128
5128
  }
5129
5129
 
5130
5130
  if (vm.state === 1
5131
- /* connected */
5131
+ /* VMState.connected */
5132
5132
  ) {
5133
5133
  // If the element is connected, that means connectedCallback was already issued, and
5134
5134
  // any successive rendering should finish with the call to renderedCallback, otherwise
@@ -5162,11 +5162,11 @@ function runRenderedCallback(vm) {
5162
5162
 
5163
5163
  if (!isUndefined$1(renderedCallback)) {
5164
5164
  logOperationStart(4
5165
- /* RenderedCallback */
5165
+ /* OperationId.RenderedCallback */
5166
5166
  , vm);
5167
5167
  invokeComponentCallback(vm, renderedCallback);
5168
5168
  logOperationEnd(4
5169
- /* RenderedCallback */
5169
+ /* OperationId.RenderedCallback */
5170
5170
  , vm);
5171
5171
  }
5172
5172
  }
@@ -5174,7 +5174,7 @@ let rehydrateQueue = [];
5174
5174
 
5175
5175
  function flushRehydrationQueue() {
5176
5176
  logGlobalOperationStart(8
5177
- /* GlobalRehydrate */
5177
+ /* OperationId.GlobalRehydrate */
5178
5178
  );
5179
5179
 
5180
5180
  if (process.env.NODE_ENV !== 'production') {
@@ -5201,7 +5201,7 @@ function flushRehydrationQueue() {
5201
5201
 
5202
5202
 
5203
5203
  logGlobalOperationEnd(8
5204
- /* GlobalRehydrate */
5204
+ /* OperationId.GlobalRehydrate */
5205
5205
  ); // re-throwing the original error will break the current tick, but since the next tick is
5206
5206
  // already scheduled, it should continue patching the rest.
5207
5207
 
@@ -5210,7 +5210,7 @@ function flushRehydrationQueue() {
5210
5210
  }
5211
5211
 
5212
5212
  logGlobalOperationEnd(8
5213
- /* GlobalRehydrate */
5213
+ /* OperationId.GlobalRehydrate */
5214
5214
  );
5215
5215
  }
5216
5216
 
@@ -5220,13 +5220,13 @@ function runConnectedCallback(vm) {
5220
5220
  } = vm;
5221
5221
 
5222
5222
  if (state === 1
5223
- /* connected */
5223
+ /* VMState.connected */
5224
5224
  ) {
5225
5225
  return; // nothing to do since it was already connected
5226
5226
  }
5227
5227
 
5228
5228
  vm.state = 1
5229
- /* connected */
5229
+ /* VMState.connected */
5230
5230
  ; // reporting connection
5231
5231
 
5232
5232
  const {
@@ -5247,11 +5247,11 @@ function runConnectedCallback(vm) {
5247
5247
 
5248
5248
  if (!isUndefined$1(connectedCallback)) {
5249
5249
  logOperationStart(3
5250
- /* ConnectedCallback */
5250
+ /* OperationId.ConnectedCallback */
5251
5251
  , vm);
5252
5252
  invokeComponentCallback(vm, connectedCallback);
5253
5253
  logOperationEnd(3
5254
- /* ConnectedCallback */
5254
+ /* OperationId.ConnectedCallback */
5255
5255
  , vm);
5256
5256
  }
5257
5257
  }
@@ -5263,7 +5263,7 @@ function hasWireAdapters(vm) {
5263
5263
  function runDisconnectedCallback(vm) {
5264
5264
  if (process.env.NODE_ENV !== 'production') {
5265
5265
  assert.isTrue(vm.state !== 2
5266
- /* disconnected */
5266
+ /* VMState.disconnected */
5267
5267
  , `${vm} must be inserted.`);
5268
5268
  }
5269
5269
 
@@ -5276,7 +5276,7 @@ function runDisconnectedCallback(vm) {
5276
5276
  }
5277
5277
 
5278
5278
  vm.state = 2
5279
- /* disconnected */
5279
+ /* VMState.disconnected */
5280
5280
  ; // reporting disconnection
5281
5281
 
5282
5282
  const {
@@ -5297,11 +5297,11 @@ function runDisconnectedCallback(vm) {
5297
5297
 
5298
5298
  if (!isUndefined$1(disconnectedCallback)) {
5299
5299
  logOperationStart(5
5300
- /* DisconnectedCallback */
5300
+ /* OperationId.DisconnectedCallback */
5301
5301
  , vm);
5302
5302
  invokeComponentCallback(vm, disconnectedCallback);
5303
5303
  logOperationEnd(5
5304
- /* DisconnectedCallback */
5304
+ /* OperationId.DisconnectedCallback */
5305
5305
  , vm);
5306
5306
  }
5307
5307
  }
@@ -5357,13 +5357,13 @@ function recursivelyDisconnectChildren(vnodes) {
5357
5357
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
5358
5358
  switch (vnode.type) {
5359
5359
  case 2
5360
- /* Element */
5360
+ /* VNodeType.Element */
5361
5361
  :
5362
5362
  recursivelyDisconnectChildren(vnode.children);
5363
5363
  break;
5364
5364
 
5365
5365
  case 3
5366
- /* CustomElement */
5366
+ /* VNodeType.CustomElement */
5367
5367
  :
5368
5368
  {
5369
5369
  const vm = getAssociatedVM(vnode.elm);
@@ -5454,13 +5454,13 @@ function runWithBoundaryProtection(vm, owner, pre, job, post) {
5454
5454
  resetComponentRoot(vm); // remove offenders
5455
5455
 
5456
5456
  logOperationStart(6
5457
- /* ErrorCallback */
5457
+ /* OperationId.ErrorCallback */
5458
5458
  , vm); // error boundaries must have an ErrorCallback
5459
5459
 
5460
5460
  const errorCallback = errorBoundaryVm.def.errorCallback;
5461
5461
  invokeComponentCallback(errorBoundaryVm, errorCallback, [error, error.wcStack]);
5462
5462
  logOperationEnd(6
5463
- /* ErrorCallback */
5463
+ /* OperationId.ErrorCallback */
5464
5464
  , vm);
5465
5465
  }
5466
5466
  }
@@ -5555,7 +5555,7 @@ function createConfigWatcher(component, configCallback, callbackWhenConfigIsRead
5555
5555
 
5556
5556
  const computeConfigAndUpdate = () => {
5557
5557
  let config;
5558
- ro.observe(() => config = configCallback(component)); // eslint-disable-next-line lwc-internal/no-invalid-todo
5558
+ ro.observe(() => config = configCallback(component)); // eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
5559
5559
  // TODO: dev-mode validation of config based on the adapter.configSchema
5560
5560
  // @ts-ignore it is assigned in the observe() callback
5561
5561
 
@@ -5597,7 +5597,7 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
5597
5597
  // guarantee that the linkage can be forged.
5598
5598
  const contextRegistrationEvent = new WireContextRegistrationEvent(adapterContextToken, {
5599
5599
  setNewContext(newContext) {
5600
- // eslint-disable-next-line lwc-internal/no-invalid-todo
5600
+ // eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
5601
5601
  // TODO: dev-mode validation of config based on the adapter.contextSchema
5602
5602
  callbackWhenContextIsReady(newContext);
5603
5603
  },
@@ -5661,7 +5661,7 @@ function createConnector(vm, name, wireDef) {
5661
5661
  // (ever), while context can have identity
5662
5662
 
5663
5663
  if (vm.state === 1
5664
- /* connected */
5664
+ /* VMState.connected */
5665
5665
  ) {
5666
5666
  computeConfigAndUpdate();
5667
5667
  }
@@ -5865,22 +5865,22 @@ function hydrateNode(node, vnode, renderer) {
5865
5865
  var _a, _b;
5866
5866
  let hydratedNode;
5867
5867
  switch (vnode.type) {
5868
- case 0 /* Text */:
5868
+ case 0 /* VNodeType.Text */:
5869
5869
  // VText has no special capability, fallback to the owner's renderer
5870
5870
  hydratedNode = hydrateText(node, vnode, renderer);
5871
5871
  break;
5872
- case 1 /* Comment */:
5872
+ case 1 /* VNodeType.Comment */:
5873
5873
  // VComment has no special capability, fallback to the owner's renderer
5874
5874
  hydratedNode = hydrateComment(node, vnode, renderer);
5875
5875
  break;
5876
- case 4 /* Static */:
5876
+ case 4 /* VNodeType.Static */:
5877
5877
  // VStatic are cacheable and cannot have custom renderer associated to them
5878
5878
  hydratedNode = hydrateStaticElement(node, vnode, renderer);
5879
5879
  break;
5880
- case 2 /* Element */:
5880
+ case 2 /* VNodeType.Element */:
5881
5881
  hydratedNode = hydrateElement(node, vnode, (_a = vnode.data.renderer) !== null && _a !== void 0 ? _a : renderer);
5882
5882
  break;
5883
- case 3 /* CustomElement */:
5883
+ case 3 /* VNodeType.CustomElement */:
5884
5884
  hydratedNode = hydrateCustomElement(node, vnode, (_b = vnode.data.renderer) !== null && _b !== void 0 ? _b : renderer);
5885
5885
  break;
5886
5886
  }
@@ -5888,7 +5888,7 @@ function hydrateNode(node, vnode, renderer) {
5888
5888
  }
5889
5889
  function hydrateText(node, vnode, renderer) {
5890
5890
  var _a;
5891
- if (!hasCorrectNodeType(vnode, node, 3 /* TEXT */, renderer)) {
5891
+ if (!hasCorrectNodeType(vnode, node, 3 /* EnvNodeTypes.TEXT */, renderer)) {
5892
5892
  return handleMismatch(node, vnode, renderer);
5893
5893
  }
5894
5894
  if (process.env.NODE_ENV !== 'production') {
@@ -5905,7 +5905,7 @@ function hydrateText(node, vnode, renderer) {
5905
5905
  }
5906
5906
  function hydrateComment(node, vnode, renderer) {
5907
5907
  var _a;
5908
- if (!hasCorrectNodeType(vnode, node, 8 /* COMMENT */, renderer)) {
5908
+ if (!hasCorrectNodeType(vnode, node, 8 /* EnvNodeTypes.COMMENT */, renderer)) {
5909
5909
  return handleMismatch(node, vnode, renderer);
5910
5910
  }
5911
5911
  if (process.env.NODE_ENV !== 'production') {
@@ -5928,14 +5928,14 @@ function hydrateStaticElement(elm, vnode, renderer) {
5928
5928
  return elm;
5929
5929
  }
5930
5930
  function hydrateElement(elm, vnode, renderer) {
5931
- if (!hasCorrectNodeType(vnode, elm, 1 /* ELEMENT */, renderer) ||
5931
+ if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
5932
5932
  !isMatchingElement(vnode, elm, renderer)) {
5933
5933
  return handleMismatch(elm, vnode, renderer);
5934
5934
  }
5935
5935
  vnode.elm = elm;
5936
5936
  const { owner } = vnode;
5937
5937
  const { context } = vnode.data;
5938
- const isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual" /* Manual */);
5938
+ const isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual" /* LwcDomMode.Manual */);
5939
5939
  if (isDomManual) {
5940
5940
  // it may be that this element has lwc:inner-html, we need to diff and in case are the same,
5941
5941
  // remove the innerHTML from props so it reuses the existing dom elements.
@@ -5961,7 +5961,7 @@ function hydrateElement(elm, vnode, renderer) {
5961
5961
  return elm;
5962
5962
  }
5963
5963
  function hydrateCustomElement(elm, vnode, renderer) {
5964
- if (!hasCorrectNodeType(vnode, elm, 1 /* ELEMENT */, renderer) ||
5964
+ if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
5965
5965
  !isMatchingElement(vnode, elm, renderer)) {
5966
5966
  return handleMismatch(elm, vnode, renderer);
5967
5967
  }
@@ -5978,10 +5978,10 @@ function hydrateCustomElement(elm, vnode, renderer) {
5978
5978
  patchElementPropsAndAttrs(vnode, renderer);
5979
5979
  // Insert hook section:
5980
5980
  if (process.env.NODE_ENV !== 'production') {
5981
- assert.isTrue(vm.state === 0 /* created */, `${vm} cannot be recycled.`);
5981
+ assert.isTrue(vm.state === 0 /* VMState.created */, `${vm} cannot be recycled.`);
5982
5982
  }
5983
5983
  runConnectedCallback(vm);
5984
- if (vm.renderMode !== 0 /* Light */) {
5984
+ if (vm.renderMode !== 0 /* RenderMode.Light */) {
5985
5985
  const { getFirstChild } = renderer;
5986
5986
  // VM is not rendering in Light DOM, we can proceed and hydrate the slotted content.
5987
5987
  // Note: for Light DOM, this is handled while hydrating the VM
@@ -6164,19 +6164,19 @@ function validateStyleAttr(vnode, elm, renderer) {
6164
6164
  }
6165
6165
  function areCompatibleNodes(client, ssr, vnode, renderer) {
6166
6166
  const { getProperty, getAttribute } = renderer;
6167
- if (getProperty(client, 'nodeType') === 3 /* TEXT */) {
6168
- if (!hasCorrectNodeType(vnode, ssr, 3 /* TEXT */, renderer)) {
6167
+ if (getProperty(client, 'nodeType') === 3 /* EnvNodeTypes.TEXT */) {
6168
+ if (!hasCorrectNodeType(vnode, ssr, 3 /* EnvNodeTypes.TEXT */, renderer)) {
6169
6169
  return false;
6170
6170
  }
6171
6171
  return getProperty(client, 'nodeValue') === getProperty(ssr, 'nodeValue');
6172
6172
  }
6173
- if (getProperty(client, 'nodeType') === 8 /* COMMENT */) {
6174
- if (!hasCorrectNodeType(vnode, ssr, 8 /* COMMENT */, renderer)) {
6173
+ if (getProperty(client, 'nodeType') === 8 /* EnvNodeTypes.COMMENT */) {
6174
+ if (!hasCorrectNodeType(vnode, ssr, 8 /* EnvNodeTypes.COMMENT */, renderer)) {
6175
6175
  return false;
6176
6176
  }
6177
6177
  return getProperty(client, 'nodeValue') === getProperty(ssr, 'nodeValue');
6178
6178
  }
6179
- if (!hasCorrectNodeType(vnode, ssr, 1 /* ELEMENT */, renderer)) {
6179
+ if (!hasCorrectNodeType(vnode, ssr, 1 /* EnvNodeTypes.ELEMENT */, renderer)) {
6180
6180
  return false;
6181
6181
  }
6182
6182
  let isCompatibleElements = true;
@@ -6332,4 +6332,4 @@ function getComponentConstructor(elm) {
6332
6332
  }
6333
6333
 
6334
6334
  export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, connectRootElement, createContextProvider, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, getUpgradableConstructor, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
6335
- /* version: 2.18.0 */
6335
+ /* version: 2.20.0 */