@lwc/engine-core 2.29.0 → 2.30.1

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.
@@ -9,16 +9,14 @@ import { seal, create, isUndefined as isUndefined$1, isFunction as isFunction$1,
9
9
  * SPDX-License-Identifier: MIT
10
10
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
11
11
  */
12
+ // Only used in LWC's Karma tests
12
13
  // @ts-ignore
13
-
14
14
  if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
15
15
  window.addEventListener('test-dummy-flag', () => {
16
16
  let hasFlag = false;
17
-
18
17
  if (lwcRuntimeFlags.DUMMY_TEST_FLAG) {
19
18
  hasFlag = true;
20
19
  }
21
-
22
20
  window.dispatchEvent(new CustomEvent('has-dummy-flag', {
23
21
  detail: {
24
22
  package: '@lwc/engine-core',
@@ -1881,39 +1879,31 @@ function api$1() {
1881
1879
  if (process.env.NODE_ENV !== 'production') {
1882
1880
  assert.fail(`@api decorator can only be used as a decorator function.`);
1883
1881
  }
1884
-
1885
1882
  throw new Error();
1886
1883
  }
1887
1884
  function createPublicPropertyDescriptor(key) {
1888
1885
  return {
1889
1886
  get() {
1890
1887
  const vm = getAssociatedVM(this);
1891
-
1892
1888
  if (isBeingConstructed(vm)) {
1893
1889
  if (process.env.NODE_ENV !== 'production') {
1894
1890
  logError(`Can’t read the value of property \`${toString$1(key)}\` from the constructor because the owner component hasn’t set the value yet. Instead, use the constructor to set a default value for the property.`, vm);
1895
1891
  }
1896
-
1897
1892
  return;
1898
1893
  }
1899
-
1900
1894
  componentValueObserved(vm, key);
1901
1895
  return vm.cmpProps[key];
1902
1896
  },
1903
-
1904
1897
  set(newValue) {
1905
1898
  const vm = getAssociatedVM(this);
1906
-
1907
1899
  if (process.env.NODE_ENV !== 'production') {
1908
1900
  const vmBeingRendered = getVMBeingRendered();
1909
1901
  assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
1910
1902
  assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
1911
1903
  }
1912
-
1913
1904
  vm.cmpProps[key] = newValue;
1914
1905
  componentValueMutated(vm, key);
1915
1906
  },
1916
-
1917
1907
  enumerable: true,
1918
1908
  configurable: true
1919
1909
  };
@@ -1925,46 +1915,37 @@ function createPublicAccessorDescriptor(key, descriptor) {
1925
1915
  enumerable,
1926
1916
  configurable
1927
1917
  } = descriptor;
1928
-
1929
1918
  if (!isFunction$1(get)) {
1930
1919
  if (process.env.NODE_ENV !== 'production') {
1931
1920
  assert.invariant(isFunction$1(get), `Invalid compiler output for public accessor ${toString$1(key)} decorated with @api`);
1932
1921
  }
1933
-
1934
1922
  throw new Error();
1935
1923
  }
1936
-
1937
1924
  return {
1938
1925
  get() {
1939
1926
  if (process.env.NODE_ENV !== 'production') {
1940
1927
  // Assert that the this value is an actual Component with an associated VM.
1941
1928
  getAssociatedVM(this);
1942
1929
  }
1943
-
1944
1930
  return get.call(this);
1945
1931
  },
1946
-
1947
1932
  set(newValue) {
1948
1933
  const vm = getAssociatedVM(this);
1949
-
1950
1934
  if (process.env.NODE_ENV !== 'production') {
1951
1935
  const vmBeingRendered = getVMBeingRendered();
1952
1936
  assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
1953
1937
  assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
1954
1938
  }
1955
-
1956
1939
  if (set) {
1957
1940
  if (lwcRuntimeFlags.ENABLE_REACTIVE_SETTER) {
1958
1941
  let ro = vm.oar[key];
1959
-
1960
1942
  if (isUndefined$1(ro)) {
1961
1943
  ro = vm.oar[key] = createAccessorReactiveObserver(vm, set);
1962
- } // every time we invoke this setter from outside (through this wrapper setter)
1944
+ }
1945
+ // every time we invoke this setter from outside (through this wrapper setter)
1963
1946
  // we should reset the value and then debounce just in case there is a pending
1964
1947
  // invocation the next tick that is not longer relevant since the value is changing
1965
1948
  // from outside.
1966
-
1967
-
1968
1949
  ro.reset(newValue);
1969
1950
  ro.observe(() => {
1970
1951
  set.call(this, newValue);
@@ -1976,7 +1957,6 @@ function createPublicAccessorDescriptor(key, descriptor) {
1976
1957
  assert.fail(`Invalid attempt to set a new value for property ${toString$1(key)} of ${vm} that does not has a setter decorated with @api.`);
1977
1958
  }
1978
1959
  },
1979
-
1980
1960
  enumerable,
1981
1961
  configurable
1982
1962
  };
@@ -2941,11 +2921,9 @@ function getComponentDef(Ctor) {
2941
2921
  * SPDX-License-Identifier: MIT
2942
2922
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2943
2923
  */
2944
-
2945
2924
  function makeHostToken(token) {
2946
2925
  return `${token}-host`;
2947
2926
  }
2948
-
2949
2927
  function createInlineStyleVNode(content) {
2950
2928
  return api.h('style', {
2951
2929
  key: 'style',
@@ -2954,7 +2932,6 @@ function createInlineStyleVNode(content) {
2954
2932
  }
2955
2933
  }, [api.t(content)]);
2956
2934
  }
2957
-
2958
2935
  function updateStylesheetToken(vm, template) {
2959
2936
  const {
2960
2937
  elm,
@@ -2971,112 +2948,81 @@ function updateStylesheetToken(vm, template) {
2971
2948
  stylesheets: newStylesheets,
2972
2949
  stylesheetToken: newStylesheetToken
2973
2950
  } = template;
2974
- const isSyntheticShadow = renderMode === 1
2975
- /* RenderMode.Shadow */
2976
- && shadowMode === 1
2977
- /* ShadowMode.Synthetic */
2978
- ;
2951
+ const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
2979
2952
  const {
2980
2953
  hasScopedStyles
2981
2954
  } = context;
2982
2955
  let newToken;
2983
2956
  let newHasTokenInClass;
2984
- let newHasTokenInAttribute; // Reset the styling token applied to the host element.
2985
-
2957
+ let newHasTokenInAttribute;
2958
+ // Reset the styling token applied to the host element.
2986
2959
  const {
2987
2960
  stylesheetToken: oldToken,
2988
2961
  hasTokenInClass: oldHasTokenInClass,
2989
2962
  hasTokenInAttribute: oldHasTokenInAttribute
2990
2963
  } = context;
2991
-
2992
2964
  if (!isUndefined$1(oldToken)) {
2993
2965
  if (oldHasTokenInClass) {
2994
2966
  getClassList(elm).remove(makeHostToken(oldToken));
2995
2967
  }
2996
-
2997
2968
  if (oldHasTokenInAttribute) {
2998
2969
  removeAttribute(elm, makeHostToken(oldToken));
2999
2970
  }
3000
- } // Apply the new template styling token to the host element, if the new template has any
2971
+ }
2972
+ // Apply the new template styling token to the host element, if the new template has any
3001
2973
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
3002
-
3003
-
3004
2974
  if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
3005
2975
  newToken = newStylesheetToken;
3006
- } // Set the new styling token on the host element
3007
-
3008
-
2976
+ }
2977
+ // Set the new styling token on the host element
3009
2978
  if (!isUndefined$1(newToken)) {
3010
2979
  if (hasScopedStyles) {
3011
2980
  getClassList(elm).add(makeHostToken(newToken));
3012
2981
  newHasTokenInClass = true;
3013
2982
  }
3014
-
3015
2983
  if (isSyntheticShadow) {
3016
2984
  setAttribute(elm, makeHostToken(newToken), '');
3017
2985
  newHasTokenInAttribute = true;
3018
2986
  }
3019
- } // Update the styling tokens present on the context object.
3020
-
3021
-
2987
+ }
2988
+ // Update the styling tokens present on the context object.
3022
2989
  context.stylesheetToken = newToken;
3023
2990
  context.hasTokenInClass = newHasTokenInClass;
3024
2991
  context.hasTokenInAttribute = newHasTokenInAttribute;
3025
2992
  }
3026
-
3027
2993
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3028
2994
  const content = [];
3029
2995
  let root;
3030
-
3031
2996
  for (let i = 0; i < stylesheets.length; i++) {
3032
2997
  let stylesheet = stylesheets[i];
3033
-
3034
2998
  if (isArray$1(stylesheet)) {
3035
2999
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
3036
3000
  } else {
3037
3001
  if (process.env.NODE_ENV !== 'production') {
3038
3002
  // Check for compiler version mismatch in dev mode only
3039
- checkVersionMismatch(stylesheet, 'stylesheet'); // in dev-mode, we support hot swapping of stylesheet, which means that
3003
+ checkVersionMismatch(stylesheet, 'stylesheet');
3004
+ // in dev-mode, we support hot swapping of stylesheet, which means that
3040
3005
  // the component instance might be attempting to use an old version of
3041
3006
  // the stylesheet, while internally, we have a replacement for it.
3042
-
3043
3007
  stylesheet = getStyleOrSwappedStyle(stylesheet);
3044
3008
  }
3045
-
3046
3009
  const isScopedCss = stylesheet[KEY__SCOPED_CSS];
3047
-
3048
3010
  if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS) {
3049
- if (!isScopedCss && vm.renderMode === 0
3050
- /* RenderMode.Light */
3051
- ) {
3011
+ if (!isScopedCss && vm.renderMode === 0 /* RenderMode.Light */) {
3052
3012
  logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
3053
3013
  continue;
3054
3014
  }
3055
- } // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
3056
-
3057
-
3058
- const scopeToken = isScopedCss || vm.shadowMode === 1
3059
- /* ShadowMode.Synthetic */
3060
- && vm.renderMode === 1
3061
- /* RenderMode.Shadow */
3062
- ? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
3015
+ }
3016
+ // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
3017
+ const scopeToken = isScopedCss || vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */ ? stylesheetToken : undefined;
3018
+ // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
3063
3019
  // native shadow DOM. Synthetic shadow DOM never uses `:host`.
3064
-
3065
- const useActualHostSelector = vm.renderMode === 0
3066
- /* RenderMode.Light */
3067
- ? !isScopedCss : vm.shadowMode === 0
3068
- /* ShadowMode.Native */
3069
- ; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
3020
+ const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */ ? !isScopedCss : vm.shadowMode === 0 /* ShadowMode.Native */;
3021
+ // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
3070
3022
  // we use an attribute selector on the host to simulate :dir().
3071
-
3072
3023
  let useNativeDirPseudoclass;
3073
-
3074
- if (vm.renderMode === 1
3075
- /* RenderMode.Shadow */
3076
- ) {
3077
- useNativeDirPseudoclass = vm.shadowMode === 0
3078
- /* ShadowMode.Native */
3079
- ;
3024
+ if (vm.renderMode === 1 /* RenderMode.Shadow */) {
3025
+ useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
3080
3026
  } else {
3081
3027
  // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
3082
3028
  // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
@@ -3084,48 +3030,36 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3084
3030
  // Only calculate the root once as necessary
3085
3031
  root = getNearestShadowComponent(vm);
3086
3032
  }
3087
-
3088
- useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
3089
- /* ShadowMode.Native */
3090
- ;
3033
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
3091
3034
  }
3092
3035
 
3093
3036
  ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
3094
3037
  }
3095
3038
  }
3096
-
3097
3039
  return content;
3098
3040
  }
3099
-
3100
3041
  function getStylesheetsContent(vm, template) {
3101
3042
  const {
3102
3043
  stylesheets,
3103
3044
  stylesheetToken
3104
3045
  } = template;
3105
3046
  let content = [];
3106
-
3107
3047
  if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
3108
3048
  content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
3109
3049
  }
3110
-
3111
3050
  return content;
3112
- } // It might be worth caching this to avoid doing the lookup repeatedly, but
3051
+ }
3052
+ // It might be worth caching this to avoid doing the lookup repeatedly, but
3113
3053
  // perf testing has not shown it to be a huge improvement yet:
3114
3054
  // https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
3115
-
3116
3055
  function getNearestShadowComponent(vm) {
3117
3056
  let owner = vm;
3118
-
3119
3057
  while (!isNull(owner)) {
3120
- if (owner.renderMode === 1
3121
- /* RenderMode.Shadow */
3122
- ) {
3058
+ if (owner.renderMode === 1 /* RenderMode.Shadow */) {
3123
3059
  return owner;
3124
3060
  }
3125
-
3126
3061
  owner = owner.owner;
3127
3062
  }
3128
-
3129
3063
  return owner;
3130
3064
  }
3131
3065
  /**
@@ -3133,8 +3067,6 @@ function getNearestShadowComponent(vm) {
3133
3067
  * this returns the unique token for that scoped stylesheet. Otherwise
3134
3068
  * it returns null.
3135
3069
  */
3136
-
3137
-
3138
3070
  function getScopeTokenClass(owner) {
3139
3071
  const {
3140
3072
  cmpTemplate,
@@ -3148,7 +3080,6 @@ function getScopeTokenClass(owner) {
3148
3080
  *
3149
3081
  * A host style token is applied to the component if scoped styles are used.
3150
3082
  */
3151
-
3152
3083
  function getStylesheetTokenHost(vnode) {
3153
3084
  const {
3154
3085
  template
@@ -3158,21 +3089,15 @@ function getStylesheetTokenHost(vnode) {
3158
3089
  } = template;
3159
3090
  return !isUndefined$1(stylesheetToken) && computeHasScopedStyles(template) ? makeHostToken(stylesheetToken) : null;
3160
3091
  }
3161
-
3162
3092
  function getNearestNativeShadowComponent(vm) {
3163
3093
  const owner = getNearestShadowComponent(vm);
3164
-
3165
- if (!isNull(owner) && owner.shadowMode === 1
3166
- /* ShadowMode.Synthetic */
3167
- ) {
3094
+ if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
3168
3095
  // Synthetic-within-native is impossible. So if the nearest shadow component is
3169
3096
  // synthetic, we know we won't find a native component if we go any further.
3170
3097
  return null;
3171
3098
  }
3172
-
3173
3099
  return owner;
3174
3100
  }
3175
-
3176
3101
  function createStylesheet(vm, stylesheets) {
3177
3102
  const {
3178
3103
  renderMode,
@@ -3181,12 +3106,7 @@ function createStylesheet(vm, stylesheets) {
3181
3106
  insertStylesheet
3182
3107
  }
3183
3108
  } = vm;
3184
-
3185
- if (renderMode === 1
3186
- /* RenderMode.Shadow */
3187
- && shadowMode === 1
3188
- /* ShadowMode.Synthetic */
3189
- ) {
3109
+ if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
3190
3110
  for (let i = 0; i < stylesheets.length; i++) {
3191
3111
  insertStylesheet(stylesheets[i]);
3192
3112
  }
@@ -3198,15 +3118,13 @@ function createStylesheet(vm, stylesheets) {
3198
3118
  return ArrayMap.call(stylesheets, createInlineStyleVNode);
3199
3119
  } else {
3200
3120
  // native shadow or light DOM, DOM renderer
3201
- const root = getNearestNativeShadowComponent(vm); // null root means a global style
3202
-
3121
+ const root = getNearestNativeShadowComponent(vm);
3122
+ // null root means a global style
3203
3123
  const target = isNull(root) ? undefined : root.shadowRoot;
3204
-
3205
3124
  for (let i = 0; i < stylesheets.length; i++) {
3206
3125
  insertStylesheet(stylesheets[i], target);
3207
3126
  }
3208
3127
  }
3209
-
3210
3128
  return null;
3211
3129
  }
3212
3130
 
@@ -3492,14 +3410,11 @@ function patchChildren(c1, c2, parent, renderer) {
3492
3410
  updateStaticChildren(c1, c2, parent, renderer);
3493
3411
  }
3494
3412
  }
3495
-
3496
3413
  function patch(n1, n2, parent, renderer) {
3497
3414
  var _a, _b;
3498
-
3499
3415
  if (n1 === n2) {
3500
3416
  return;
3501
3417
  }
3502
-
3503
3418
  if (process.env.NODE_ENV !== 'production') {
3504
3419
  if (!isSameVnode(n1, n2)) {
3505
3420
  throw new Error('Expected these VNodes to be the same: ' + JSON.stringify({
@@ -3511,103 +3426,63 @@ function patch(n1, n2, parent, renderer) {
3511
3426
  }));
3512
3427
  }
3513
3428
  }
3514
-
3515
3429
  switch (n2.type) {
3516
- case 0
3517
- /* VNodeType.Text */
3518
- :
3430
+ case 0 /* VNodeType.Text */:
3519
3431
  // VText has no special capability, fallback to the owner's renderer
3520
3432
  patchText(n1, n2, renderer);
3521
3433
  break;
3522
-
3523
- case 1
3524
- /* VNodeType.Comment */
3525
- :
3434
+ case 1 /* VNodeType.Comment */:
3526
3435
  // VComment has no special capability, fallback to the owner's renderer
3527
3436
  patchComment(n1, n2, renderer);
3528
3437
  break;
3529
-
3530
- case 4
3531
- /* VNodeType.Static */
3532
- :
3438
+ case 4 /* VNodeType.Static */:
3533
3439
  n2.elm = n1.elm;
3534
3440
  break;
3535
-
3536
- case 5
3537
- /* VNodeType.Fragment */
3538
- :
3441
+ case 5 /* VNodeType.Fragment */:
3539
3442
  patchFragment(n1, n2, parent, renderer);
3540
3443
  break;
3541
-
3542
- case 2
3543
- /* VNodeType.Element */
3544
- :
3444
+ case 2 /* VNodeType.Element */:
3545
3445
  patchElement(n1, n2, (_a = n2.data.renderer) !== null && _a !== void 0 ? _a : renderer);
3546
3446
  break;
3547
-
3548
- case 3
3549
- /* VNodeType.CustomElement */
3550
- :
3447
+ case 3 /* VNodeType.CustomElement */:
3551
3448
  patchCustomElement(n1, n2, parent, (_b = n2.data.renderer) !== null && _b !== void 0 ? _b : renderer);
3552
3449
  break;
3553
3450
  }
3554
3451
  }
3555
-
3556
3452
  function mount(node, parent, renderer, anchor) {
3557
3453
  var _a, _b;
3558
-
3559
3454
  switch (node.type) {
3560
- case 0
3561
- /* VNodeType.Text */
3562
- :
3455
+ case 0 /* VNodeType.Text */:
3563
3456
  // VText has no special capability, fallback to the owner's renderer
3564
3457
  mountText(node, parent, anchor, renderer);
3565
3458
  break;
3566
-
3567
- case 1
3568
- /* VNodeType.Comment */
3569
- :
3459
+ case 1 /* VNodeType.Comment */:
3570
3460
  // VComment has no special capability, fallback to the owner's renderer
3571
3461
  mountComment(node, parent, anchor, renderer);
3572
3462
  break;
3573
-
3574
- case 4
3575
- /* VNodeType.Static */
3576
- :
3463
+ case 4 /* VNodeType.Static */:
3577
3464
  // VStatic cannot have a custom renderer associated to them, using owner's renderer
3578
3465
  mountStatic(node, parent, anchor, renderer);
3579
3466
  break;
3580
-
3581
- case 5
3582
- /* VNodeType.Fragment */
3583
- :
3467
+ case 5 /* VNodeType.Fragment */:
3584
3468
  mountFragment(node, parent, anchor, renderer);
3585
3469
  break;
3586
-
3587
- case 2
3588
- /* VNodeType.Element */
3589
- :
3470
+ case 2 /* VNodeType.Element */:
3590
3471
  // If the vnode data has a renderer override use it, else fallback to owner's renderer
3591
3472
  mountElement(node, parent, anchor, (_a = node.data.renderer) !== null && _a !== void 0 ? _a : renderer);
3592
3473
  break;
3593
-
3594
- case 3
3595
- /* VNodeType.CustomElement */
3596
- :
3474
+ case 3 /* VNodeType.CustomElement */:
3597
3475
  // If the vnode data has a renderer override use it, else fallback to owner's renderer
3598
3476
  mountCustomElement(node, parent, anchor, (_b = node.data.renderer) !== null && _b !== void 0 ? _b : renderer);
3599
3477
  break;
3600
3478
  }
3601
3479
  }
3602
-
3603
3480
  function patchText(n1, n2, renderer) {
3604
3481
  n2.elm = n1.elm;
3605
-
3606
3482
  if (n2.text !== n1.text) {
3607
3483
  updateTextContent(n2, renderer);
3608
3484
  }
3609
3485
  }
3610
-
3611
3486
  function mountText(vnode, parent, anchor, renderer) {
3612
3487
  const {
3613
3488
  owner
@@ -3619,16 +3494,14 @@ function mountText(vnode, parent, anchor, renderer) {
3619
3494
  linkNodeToShadow(textNode, owner, renderer);
3620
3495
  insertNode(textNode, parent, anchor, renderer);
3621
3496
  }
3622
-
3623
3497
  function patchComment(n1, n2, renderer) {
3624
- n2.elm = n1.elm; // FIXME: Comment nodes should be static, we shouldn't need to diff them together. However
3498
+ n2.elm = n1.elm;
3499
+ // FIXME: Comment nodes should be static, we shouldn't need to diff them together. However
3625
3500
  // it is the case today.
3626
-
3627
3501
  if (n2.text !== n1.text) {
3628
3502
  updateTextContent(n2, renderer);
3629
3503
  }
3630
3504
  }
3631
-
3632
3505
  function mountComment(vnode, parent, anchor, renderer) {
3633
3506
  const {
3634
3507
  owner
@@ -3640,32 +3513,27 @@ function mountComment(vnode, parent, anchor, renderer) {
3640
3513
  linkNodeToShadow(commentNode, owner, renderer);
3641
3514
  insertNode(commentNode, parent, anchor, renderer);
3642
3515
  }
3643
-
3644
3516
  function mountFragment(vnode, parent, anchor, renderer) {
3645
3517
  const {
3646
3518
  children
3647
3519
  } = vnode;
3648
- mountVNodes(children, parent, renderer, anchor); // children of a fragment will always have at least the two delimiters.
3649
-
3520
+ mountVNodes(children, parent, renderer, anchor);
3521
+ // children of a fragment will always have at least the two delimiters.
3650
3522
  vnode.elm = children[children.length - 1].elm;
3651
3523
  }
3652
-
3653
3524
  function patchFragment(n1, n2, parent, renderer) {
3654
3525
  const {
3655
3526
  children,
3656
3527
  stable
3657
3528
  } = n2;
3658
-
3659
3529
  if (stable) {
3660
3530
  updateStaticChildren(n1.children, children, parent, renderer);
3661
3531
  } else {
3662
3532
  updateDynamicChildren(n1.children, children, parent, renderer);
3663
- } // Note: not reusing n1.elm, because during patching, it may be patched with another text node.
3664
-
3665
-
3533
+ }
3534
+ // Note: not reusing n1.elm, because during patching, it may be patched with another text node.
3666
3535
  n2.elm = children[children.length - 1].elm;
3667
3536
  }
3668
-
3669
3537
  function mountElement(vnode, parent, anchor, renderer) {
3670
3538
  const {
3671
3539
  sel,
@@ -3687,13 +3555,11 @@ function mountElement(vnode, parent, anchor, renderer) {
3687
3555
  insertNode(elm, parent, anchor, renderer);
3688
3556
  mountVNodes(vnode.children, elm, renderer, null);
3689
3557
  }
3690
-
3691
3558
  function patchElement(n1, n2, renderer) {
3692
3559
  const elm = n2.elm = n1.elm;
3693
3560
  patchElementPropsAndAttrs$1(n1, n2, renderer);
3694
3561
  patchChildren(n1.children, n2.children, elm, renderer);
3695
3562
  }
3696
-
3697
3563
  function mountStatic(vnode, parent, anchor, renderer) {
3698
3564
  const {
3699
3565
  owner
@@ -3704,26 +3570,19 @@ function mountStatic(vnode, parent, anchor, renderer) {
3704
3570
  } = renderer;
3705
3571
  const elm = vnode.elm = cloneNode(vnode.fragment, true);
3706
3572
  linkNodeToShadow(elm, owner, renderer);
3707
- applyElementRestrictions(elm, vnode); // Marks this node as Static to propagate the shadow resolver. must happen after elm is assigned to the proper shadow
3708
-
3573
+ applyElementRestrictions(elm, vnode);
3574
+ // Marks this node as Static to propagate the shadow resolver. must happen after elm is assigned to the proper shadow
3709
3575
  const {
3710
3576
  renderMode,
3711
3577
  shadowMode
3712
3578
  } = owner;
3713
-
3714
3579
  if (isSyntheticShadowDefined) {
3715
- if (shadowMode === 1
3716
- /* ShadowMode.Synthetic */
3717
- || renderMode === 0
3718
- /* RenderMode.Light */
3719
- ) {
3580
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3720
3581
  elm[KEY__SHADOW_STATIC] = true;
3721
3582
  }
3722
3583
  }
3723
-
3724
3584
  insertNode(elm, parent, anchor, renderer);
3725
3585
  }
3726
-
3727
3586
  function mountCustomElement(vnode, parent, anchor, renderer) {
3728
3587
  const {
3729
3588
  sel,
@@ -3738,55 +3597,44 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
3738
3597
  * mechanism that only passes that argument if the constructor is known to be
3739
3598
  * an upgradable custom element.
3740
3599
  */
3741
-
3742
3600
  let vm;
3743
-
3744
3601
  const upgradeCallback = elm => {
3745
3602
  // the custom element from the registry is expecting an upgrade callback
3746
3603
  vm = createViewModelHook(elm, vnode, renderer);
3747
3604
  };
3748
-
3749
3605
  const connectedCallback = elm => {
3750
3606
  if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
3751
3607
  connectRootElement(elm);
3752
3608
  }
3753
3609
  };
3754
-
3755
3610
  const disconnectedCallback = elm => {
3756
3611
  if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
3757
3612
  disconnectRootElement(elm);
3758
3613
  }
3759
- }; // Should never get a tag with upper case letter at this point; the compiler
3614
+ };
3615
+ // Should never get a tag with upper case letter at this point; the compiler
3760
3616
  // should produce only tags with lowercase letters. However, the Java
3761
3617
  // compiler may generate tagnames with uppercase letters so - for backwards
3762
3618
  // compatibility, we lower case the tagname here.
3763
-
3764
-
3765
3619
  const normalizedTagname = sel.toLowerCase();
3766
3620
  const elm = createCustomElement(normalizedTagname, upgradeCallback, connectedCallback, disconnectedCallback);
3767
3621
  vnode.elm = elm;
3768
3622
  vnode.vm = vm;
3769
3623
  linkNodeToShadow(elm, owner, renderer);
3770
3624
  applyStyleScoping(elm, owner, renderer);
3771
-
3772
3625
  if (vm) {
3773
3626
  allocateChildren(vnode, vm);
3774
3627
  }
3775
-
3776
3628
  patchElementPropsAndAttrs$1(null, vnode, renderer);
3777
3629
  insertNode(elm, parent, anchor, renderer);
3778
-
3779
3630
  if (vm) {
3780
3631
  if (process.env.IS_BROWSER) {
3781
3632
  if (!lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
3782
3633
  if (process.env.NODE_ENV !== 'production') {
3783
3634
  // With synthetic lifecycle callbacks, it's possible for elements to be removed without the engine
3784
3635
  // noticing it (e.g. `appendChild` the same host element twice). This test ensures we don't regress.
3785
- assert.isTrue(vm.state === 0
3786
- /* VMState.created */
3787
- , `${vm} cannot be recycled.`);
3636
+ assert.isTrue(vm.state === 0 /* VMState.created */, `${vm} cannot be recycled.`);
3788
3637
  }
3789
-
3790
3638
  runConnectedCallback(vm);
3791
3639
  }
3792
3640
  } else {
@@ -3795,14 +3643,11 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
3795
3643
  runConnectedCallback(vm);
3796
3644
  }
3797
3645
  }
3798
-
3799
3646
  mountVNodes(vnode.children, elm, renderer, null);
3800
-
3801
3647
  if (vm) {
3802
3648
  appendVM(vm);
3803
3649
  }
3804
3650
  }
3805
-
3806
3651
  function patchCustomElement(n1, n2, parent, renderer) {
3807
3652
  if (n1.ctor !== n2.ctor) {
3808
3653
  // If the constructor, unmount the current component and mount a new one using the new
@@ -3815,17 +3660,14 @@ function patchCustomElement(n1, n2, parent, renderer) {
3815
3660
  const elm = n2.elm = n1.elm;
3816
3661
  const vm = n2.vm = n1.vm;
3817
3662
  patchElementPropsAndAttrs$1(n1, n2, renderer);
3818
-
3819
3663
  if (!isUndefined$1(vm)) {
3820
3664
  // in fallback mode, the allocation will always set children to
3821
3665
  // empty and delegate the real allocation to the slot elements
3822
3666
  allocateChildren(n2, vm);
3823
- } // in fallback mode, the children will be always empty, so, nothing
3667
+ }
3668
+ // in fallback mode, the children will be always empty, so, nothing
3824
3669
  // will happen, but in native, it does allocate the light dom
3825
-
3826
-
3827
3670
  patchChildren(n1.children, n2.children, elm, renderer);
3828
-
3829
3671
  if (!isUndefined$1(vm)) {
3830
3672
  // this will probably update the shadowRoot, but only if the vm is in a dirty state
3831
3673
  // this is important to preserve the top to bottom synchronous rendering phase.
@@ -3833,29 +3675,24 @@ function patchCustomElement(n1, n2, parent, renderer) {
3833
3675
  }
3834
3676
  }
3835
3677
  }
3836
-
3837
3678
  function mountVNodes(vnodes, parent, renderer, anchor, start = 0, end = vnodes.length) {
3838
3679
  for (; start < end; ++start) {
3839
3680
  const vnode = vnodes[start];
3840
-
3841
3681
  if (isVNode(vnode)) {
3842
3682
  mount(vnode, parent, renderer, anchor);
3843
3683
  }
3844
3684
  }
3845
3685
  }
3846
-
3847
3686
  function unmount(vnode, parent, renderer, doRemove = false) {
3848
3687
  const {
3849
3688
  type,
3850
3689
  elm,
3851
3690
  sel
3852
- } = vnode; // When unmounting a VNode subtree not all the elements have to removed from the DOM. The
3691
+ } = vnode;
3692
+ // When unmounting a VNode subtree not all the elements have to removed from the DOM. The
3853
3693
  // subtree root, is the only element worth unmounting from the subtree.
3854
-
3855
3694
  if (doRemove) {
3856
- if (type === 5
3857
- /* VNodeType.Fragment */
3858
- ) {
3695
+ if (type === 5 /* VNodeType.Fragment */) {
3859
3696
  unmountVNodes(vnode.children, parent, renderer, doRemove);
3860
3697
  } else {
3861
3698
  // The vnode might or might not have a data.renderer associated to it
@@ -3863,51 +3700,39 @@ function unmount(vnode, parent, renderer, doRemove = false) {
3863
3700
  removeNode(elm, parent, renderer);
3864
3701
  }
3865
3702
  }
3866
-
3867
3703
  switch (type) {
3868
- case 2
3869
- /* VNodeType.Element */
3870
- :
3704
+ case 2 /* VNodeType.Element */:
3871
3705
  {
3872
3706
  // Slot content is removed to trigger slotchange event when removing slot.
3873
3707
  // Only required for synthetic shadow.
3874
- const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1
3875
- /* ShadowMode.Synthetic */
3876
- ;
3708
+ const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1 /* ShadowMode.Synthetic */;
3877
3709
  unmountVNodes(vnode.children, elm, renderer, shouldRemoveChildren);
3878
3710
  break;
3879
3711
  }
3880
-
3881
- case 3
3882
- /* VNodeType.CustomElement */
3883
- :
3712
+ case 3 /* VNodeType.CustomElement */:
3884
3713
  {
3885
3714
  const {
3886
3715
  vm
3887
- } = vnode; // No need to unmount the children here, `removeVM` will take care of removing the
3716
+ } = vnode;
3717
+ // No need to unmount the children here, `removeVM` will take care of removing the
3888
3718
  // children.
3889
-
3890
3719
  if (!isUndefined$1(vm)) {
3891
3720
  removeVM(vm);
3892
3721
  }
3893
3722
  }
3894
3723
  }
3895
3724
  }
3896
-
3897
3725
  function unmountVNodes(vnodes, parent, renderer, doRemove = false, start = 0, end = vnodes.length) {
3898
3726
  for (; start < end; ++start) {
3899
3727
  const ch = vnodes[start];
3900
-
3901
3728
  if (isVNode(ch)) {
3902
3729
  unmount(ch, parent, renderer, doRemove);
3903
3730
  }
3904
3731
  }
3905
3732
  }
3906
-
3907
3733
  function isVNode(vnode) {
3908
3734
  return vnode != null;
3909
3735
  }
3910
-
3911
3736
  function linkNodeToShadow(elm, owner, renderer) {
3912
3737
  const {
3913
3738
  renderRoot,
@@ -3916,19 +3741,14 @@ function linkNodeToShadow(elm, owner, renderer) {
3916
3741
  } = owner;
3917
3742
  const {
3918
3743
  isSyntheticShadowDefined
3919
- } = renderer; // TODO [#1164]: this should eventually be done by the polyfill directly
3920
-
3744
+ } = renderer;
3745
+ // TODO [#1164]: this should eventually be done by the polyfill directly
3921
3746
  if (isSyntheticShadowDefined) {
3922
- if (shadowMode === 1
3923
- /* ShadowMode.Synthetic */
3924
- || renderMode === 0
3925
- /* RenderMode.Light */
3926
- ) {
3747
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3927
3748
  elm[KEY__SHADOW_RESOLVER] = renderRoot[KEY__SHADOW_RESOLVER];
3928
3749
  }
3929
3750
  }
3930
3751
  }
3931
-
3932
3752
  function updateTextContent(vnode, renderer) {
3933
3753
  const {
3934
3754
  elm,
@@ -3937,120 +3757,87 @@ function updateTextContent(vnode, renderer) {
3937
3757
  const {
3938
3758
  setText
3939
3759
  } = renderer;
3940
-
3941
3760
  if (process.env.NODE_ENV !== 'production') {
3942
3761
  unlockDomMutation();
3943
3762
  }
3944
-
3945
3763
  setText(elm, text);
3946
-
3947
3764
  if (process.env.NODE_ENV !== 'production') {
3948
3765
  lockDomMutation();
3949
3766
  }
3950
3767
  }
3951
-
3952
3768
  function insertNode(node, parent, anchor, renderer) {
3953
3769
  if (process.env.NODE_ENV !== 'production') {
3954
3770
  unlockDomMutation();
3955
3771
  }
3956
-
3957
3772
  renderer.insert(node, parent, anchor);
3958
-
3959
3773
  if (process.env.NODE_ENV !== 'production') {
3960
3774
  lockDomMutation();
3961
3775
  }
3962
3776
  }
3963
-
3964
3777
  function removeNode(node, parent, renderer) {
3965
3778
  if (process.env.NODE_ENV !== 'production') {
3966
3779
  unlockDomMutation();
3967
3780
  }
3968
-
3969
3781
  renderer.remove(node, parent);
3970
-
3971
3782
  if (process.env.NODE_ENV !== 'production') {
3972
3783
  lockDomMutation();
3973
3784
  }
3974
3785
  }
3975
-
3976
3786
  function patchElementPropsAndAttrs$1(oldVnode, vnode, renderer) {
3977
3787
  if (isNull(oldVnode)) {
3978
3788
  applyEventListeners(vnode, renderer);
3979
3789
  applyStaticClassAttribute(vnode, renderer);
3980
3790
  applyStaticStyleAttribute(vnode, renderer);
3981
- } // Attrs need to be applied to element before props IE11 will wipe out value on radio inputs if
3791
+ }
3792
+ // Attrs need to be applied to element before props IE11 will wipe out value on radio inputs if
3982
3793
  // value is set before type=radio.
3983
-
3984
-
3985
3794
  patchClassAttribute(oldVnode, vnode, renderer);
3986
3795
  patchStyleAttribute(oldVnode, vnode, renderer);
3987
3796
  patchAttributes(oldVnode, vnode, renderer);
3988
3797
  patchProps(oldVnode, vnode, renderer);
3989
3798
  }
3990
-
3991
3799
  function applyStyleScoping(elm, owner, renderer) {
3992
3800
  // Set the class name for `*.scoped.css` style scoping.
3993
3801
  const scopeToken = getScopeTokenClass(owner);
3994
-
3995
3802
  if (!isNull(scopeToken)) {
3996
3803
  const {
3997
3804
  getClassList
3998
- } = renderer; // TODO [#2762]: this dot notation with add is probably problematic
3805
+ } = renderer;
3806
+ // TODO [#2762]: this dot notation with add is probably problematic
3999
3807
  // probably we should have a renderer api for just the add operation
4000
-
4001
3808
  getClassList(elm).add(scopeToken);
4002
- } // Set property element for synthetic shadow DOM style scoping.
4003
-
4004
-
3809
+ }
3810
+ // Set property element for synthetic shadow DOM style scoping.
4005
3811
  const {
4006
3812
  stylesheetToken: syntheticToken
4007
3813
  } = owner.context;
4008
-
4009
- if (owner.shadowMode === 1
4010
- /* ShadowMode.Synthetic */
4011
- && !isUndefined$1(syntheticToken)) {
3814
+ if (owner.shadowMode === 1 /* ShadowMode.Synthetic */ && !isUndefined$1(syntheticToken)) {
4012
3815
  elm.$shadowToken$ = syntheticToken;
4013
3816
  }
4014
3817
  }
4015
-
4016
3818
  function applyDomManual(elm, vnode) {
4017
3819
  var _a;
4018
-
4019
3820
  const {
4020
3821
  owner,
4021
3822
  data: {
4022
3823
  context
4023
3824
  }
4024
3825
  } = vnode;
4025
-
4026
- if (owner.shadowMode === 1
4027
- /* ShadowMode.Synthetic */
4028
- && ((_a = context === null || context === void 0 ? void 0 : context.lwc) === null || _a === void 0 ? void 0 : _a.dom) === "manual"
4029
- /* LwcDomMode.Manual */
4030
- ) {
3826
+ if (owner.shadowMode === 1 /* ShadowMode.Synthetic */ && ((_a = context === null || context === void 0 ? void 0 : context.lwc) === null || _a === void 0 ? void 0 : _a.dom) === "manual" /* LwcDomMode.Manual */) {
4031
3827
  elm.$domManual$ = true;
4032
3828
  }
4033
3829
  }
4034
-
4035
3830
  function applyElementRestrictions(elm, vnode) {
4036
3831
  var _a, _b;
4037
-
4038
3832
  if (process.env.NODE_ENV !== 'production') {
4039
- const isPortal = vnode.type === 2
4040
- /* VNodeType.Element */
4041
- && ((_b = (_a = vnode.data.context) === null || _a === void 0 ? void 0 : _a.lwc) === null || _b === void 0 ? void 0 : _b.dom) === "manual"
4042
- /* LwcDomMode.Manual */
4043
- ;
4044
- const isLight = vnode.owner.renderMode === 0
4045
- /* RenderMode.Light */
4046
- ;
3833
+ const isPortal = vnode.type === 2 /* VNodeType.Element */ && ((_b = (_a = vnode.data.context) === null || _a === void 0 ? void 0 : _a.lwc) === null || _b === void 0 ? void 0 : _b.dom) === "manual" /* LwcDomMode.Manual */;
3834
+ const isLight = vnode.owner.renderMode === 0 /* RenderMode.Light */;
4047
3835
  patchElementWithRestrictions(elm, {
4048
3836
  isPortal,
4049
3837
  isLight
4050
3838
  });
4051
3839
  }
4052
3840
  }
4053
-
4054
3841
  function allocateChildren(vnode, vm) {
4055
3842
  // A component with slots will re-render because:
4056
3843
  // 1- There is a change of the internal state.
@@ -4068,41 +3855,31 @@ function allocateChildren(vnode, vm) {
4068
3855
  renderMode,
4069
3856
  shadowMode
4070
3857
  } = vm;
4071
-
4072
3858
  if (process.env.NODE_ENV !== 'production') {
4073
3859
  // If any of the children being allocated is a scoped slot fragment, make sure the receiving
4074
3860
  // component is a light DOM component. This is mainly to validate light dom parent running
4075
3861
  // in native shadow mode.
4076
- if (renderMode !== 0
4077
- /* RenderMode.Light */
4078
- && ArraySome.call(children, child => !isNull(child) && isVScopedSlotFragment(child))) {
3862
+ if (renderMode !== 0 /* RenderMode.Light */ && ArraySome.call(children, child => !isNull(child) && isVScopedSlotFragment(child))) {
4079
3863
  logError(`Invalid usage of 'lwc:slot-data' on ${getComponentTag(vm)} tag. Scoped slot content can only be passed to a light dom child.`);
4080
3864
  }
4081
3865
  }
4082
-
4083
- if (shadowMode === 1
4084
- /* ShadowMode.Synthetic */
4085
- || renderMode === 0
4086
- /* RenderMode.Light */
4087
- ) {
3866
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
4088
3867
  // slow path
4089
- allocateInSlot(vm, children, vnode.owner); // save the allocated children in case this vnode is reused.
4090
-
4091
- vnode.aChildren = children; // every child vnode is now allocated, and the host should receive none directly, it receives them via the shadow!
4092
-
3868
+ allocateInSlot(vm, children, vnode.owner);
3869
+ // save the allocated children in case this vnode is reused.
3870
+ vnode.aChildren = children;
3871
+ // every child vnode is now allocated, and the host should receive none directly, it receives them via the shadow!
4093
3872
  vnode.children = EmptyArray;
4094
3873
  }
4095
3874
  }
4096
-
4097
3875
  function createViewModelHook(elm, vnode, renderer) {
4098
- let vm = getAssociatedVMIfPresent(elm); // There is a possibility that a custom element is registered under tagName, in which case, the
3876
+ let vm = getAssociatedVMIfPresent(elm);
3877
+ // There is a possibility that a custom element is registered under tagName, in which case, the
4099
3878
  // initialization is already carry on, and there is nothing else to do here since this hook is
4100
3879
  // called right after invoking `document.createElement`.
4101
-
4102
3880
  if (!isUndefined$1(vm)) {
4103
3881
  return vm;
4104
3882
  }
4105
-
4106
3883
  const {
4107
3884
  sel,
4108
3885
  mode,
@@ -4114,48 +3891,37 @@ function createViewModelHook(elm, vnode, renderer) {
4114
3891
  owner,
4115
3892
  tagName: sel
4116
3893
  });
4117
-
4118
3894
  if (process.env.NODE_ENV !== 'production') {
4119
3895
  assert.isTrue(isArray$1(vnode.children), `Invalid vnode for a custom element, it must have children defined.`);
4120
3896
  }
4121
-
4122
3897
  return vm;
4123
3898
  }
4124
3899
  /**
4125
3900
  * Collects all slots into a SlotSet, traversing through VFragment Nodes
4126
3901
  */
4127
-
4128
-
4129
3902
  function collectSlots(vm, children, cmpSlotsMapping) {
4130
3903
  var _a, _b;
4131
-
4132
3904
  for (let i = 0, len = children.length; i < len; i += 1) {
4133
3905
  const vnode = children[i];
4134
-
4135
3906
  if (isNull(vnode)) {
4136
3907
  continue;
4137
- } // Dive further iff the content is wrapped in a VFragment
4138
-
4139
-
3908
+ }
3909
+ // Dive further iff the content is wrapped in a VFragment
4140
3910
  if (isVFragment(vnode)) {
4141
3911
  // Remove the text delimiter nodes to avoid overriding default slot content
4142
3912
  collectSlots(vm, vnode.children.slice(1, -1), cmpSlotsMapping);
4143
3913
  continue;
4144
3914
  }
4145
-
4146
3915
  let slotName = '';
4147
-
4148
3916
  if (isVBaseElement(vnode)) {
4149
3917
  slotName = (_b = (_a = vnode.data.attrs) === null || _a === void 0 ? void 0 : _a.slot) !== null && _b !== void 0 ? _b : '';
4150
3918
  } else if (isVScopedSlotFragment(vnode)) {
4151
3919
  slotName = vnode.slotName;
4152
3920
  }
4153
-
4154
3921
  const vnodes = cmpSlotsMapping[slotName] = cmpSlotsMapping[slotName] || [];
4155
3922
  ArrayPush$1.call(vnodes, vnode);
4156
3923
  }
4157
3924
  }
4158
-
4159
3925
  function allocateInSlot(vm, children, owner) {
4160
3926
  const {
4161
3927
  cmpSlots: {
@@ -4168,28 +3934,22 @@ function allocateInSlot(vm, children, owner) {
4168
3934
  owner,
4169
3935
  slotAssignments: cmpSlotsMapping
4170
3936
  };
4171
-
4172
3937
  if (isFalse(vm.isDirty)) {
4173
3938
  // We need to determine if the old allocation is really different from the new one
4174
3939
  // and mark the vm as dirty
4175
3940
  const oldKeys = keys(oldSlotsMapping);
4176
-
4177
3941
  if (oldKeys.length !== keys(cmpSlotsMapping).length) {
4178
3942
  markComponentAsDirty(vm);
4179
3943
  return;
4180
3944
  }
4181
-
4182
3945
  for (let i = 0, len = oldKeys.length; i < len; i += 1) {
4183
3946
  const key = oldKeys[i];
4184
-
4185
3947
  if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
4186
3948
  markComponentAsDirty(vm);
4187
3949
  return;
4188
3950
  }
4189
-
4190
3951
  const oldVNodes = oldSlotsMapping[key];
4191
3952
  const vnodes = cmpSlotsMapping[key];
4192
-
4193
3953
  for (let j = 0, a = cmpSlotsMapping[key].length; j < a; j += 1) {
4194
3954
  if (oldVNodes[j] !== vnodes[j]) {
4195
3955
  markComponentAsDirty(vm);
@@ -4198,40 +3958,33 @@ function allocateInSlot(vm, children, owner) {
4198
3958
  }
4199
3959
  }
4200
3960
  }
4201
- } // Using a WeakMap instead of a WeakSet because this one works in IE11 :(
4202
-
4203
-
4204
- const FromIteration = new WeakMap(); // dynamic children means it was generated by an iteration
3961
+ }
3962
+ // Using a WeakMap instead of a WeakSet because this one works in IE11 :(
3963
+ const FromIteration = new WeakMap();
3964
+ // dynamic children means it was generated by an iteration
4205
3965
  // in a template, and will require a more complex diffing algo.
4206
-
4207
3966
  function markAsDynamicChildren(children) {
4208
3967
  FromIteration.set(children, 1);
4209
3968
  }
4210
-
4211
3969
  function hasDynamicChildren(children) {
4212
3970
  return FromIteration.has(children);
4213
3971
  }
4214
-
4215
3972
  function createKeyToOldIdx(children, beginIdx, endIdx) {
4216
- const map = {}; // TODO [#1637]: simplify this by assuming that all vnodes has keys
4217
-
3973
+ const map = {};
3974
+ // TODO [#1637]: simplify this by assuming that all vnodes has keys
4218
3975
  for (let j = beginIdx; j <= endIdx; ++j) {
4219
3976
  const ch = children[j];
4220
-
4221
3977
  if (isVNode(ch)) {
4222
3978
  const {
4223
3979
  key
4224
3980
  } = ch;
4225
-
4226
3981
  if (key !== undefined) {
4227
3982
  map[key] = j;
4228
3983
  }
4229
3984
  }
4230
3985
  }
4231
-
4232
3986
  return map;
4233
3987
  }
4234
-
4235
3988
  function updateDynamicChildren(oldCh, newCh, parent, renderer) {
4236
3989
  let oldStartIdx = 0;
4237
3990
  let newStartIdx = 0;
@@ -4247,7 +4000,6 @@ function updateDynamicChildren(oldCh, newCh, parent, renderer) {
4247
4000
  let elmToMove;
4248
4001
  let before;
4249
4002
  let clonedOldCh = false;
4250
-
4251
4003
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
4252
4004
  if (!isVNode(oldStartVnode)) {
4253
4005
  oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left
@@ -4281,54 +4033,46 @@ function updateDynamicChildren(oldCh, newCh, parent, renderer) {
4281
4033
  if (oldKeyToIdx === undefined) {
4282
4034
  oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
4283
4035
  }
4284
-
4285
4036
  idxInOld = oldKeyToIdx[newStartVnode.key];
4286
-
4287
4037
  if (isUndefined$1(idxInOld)) {
4288
4038
  // New element
4289
4039
  mount(newStartVnode, parent, renderer, oldStartVnode.elm);
4290
4040
  newStartVnode = newCh[++newStartIdx];
4291
4041
  } else {
4292
4042
  elmToMove = oldCh[idxInOld];
4293
-
4294
4043
  if (isVNode(elmToMove)) {
4295
4044
  if (elmToMove.sel !== newStartVnode.sel) {
4296
4045
  // New element
4297
4046
  mount(newStartVnode, parent, renderer, oldStartVnode.elm);
4298
4047
  } else {
4299
- patch(elmToMove, newStartVnode, parent, renderer); // Delete the old child, but copy the array since it is read-only.
4048
+ patch(elmToMove, newStartVnode, parent, renderer);
4049
+ // Delete the old child, but copy the array since it is read-only.
4300
4050
  // The `oldCh` will be GC'ed after `updateDynamicChildren` is complete,
4301
4051
  // so we only care about the `oldCh` object inside this function.
4302
4052
  // To avoid cloning over and over again, we check `clonedOldCh`
4303
4053
  // and only clone once.
4304
-
4305
4054
  if (!clonedOldCh) {
4306
4055
  clonedOldCh = true;
4307
4056
  oldCh = [...oldCh];
4308
- } // We've already cloned at least once, so it's no longer read-only
4309
-
4310
-
4057
+ }
4058
+ // We've already cloned at least once, so it's no longer read-only
4311
4059
  oldCh[idxInOld] = undefined;
4312
4060
  insertNode(elmToMove.elm, parent, oldStartVnode.elm, renderer);
4313
4061
  }
4314
4062
  }
4315
-
4316
4063
  newStartVnode = newCh[++newStartIdx];
4317
4064
  }
4318
4065
  }
4319
4066
  }
4320
-
4321
4067
  if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {
4322
4068
  if (oldStartIdx > oldEndIdx) {
4323
4069
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
4324
4070
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
4325
4071
  let i = newEndIdx;
4326
4072
  let n;
4327
-
4328
4073
  do {
4329
4074
  n = newCh[++i];
4330
4075
  } while (!isVNode(n) && i < newChEnd);
4331
-
4332
4076
  before = isVNode(n) ? n.elm : null;
4333
4077
  mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
4334
4078
  } else {
@@ -4336,32 +4080,26 @@ function updateDynamicChildren(oldCh, newCh, parent, renderer) {
4336
4080
  }
4337
4081
  }
4338
4082
  }
4339
-
4340
4083
  function updateStaticChildren(c1, c2, parent, renderer) {
4341
4084
  const c1Length = c1.length;
4342
4085
  const c2Length = c2.length;
4343
-
4344
4086
  if (c1Length === 0) {
4345
4087
  // the old list is empty, we can directly insert anything new
4346
4088
  mountVNodes(c2, parent, renderer, null);
4347
4089
  return;
4348
4090
  }
4349
-
4350
4091
  if (c2Length === 0) {
4351
4092
  // the old list is nonempty and the new list is empty so we can directly remove all old nodes
4352
4093
  // this is the case in which the dynamic children of an if-directive should be removed
4353
4094
  unmountVNodes(c1, parent, renderer, true);
4354
4095
  return;
4355
- } // if the old list is not empty, the new list MUST have the same
4096
+ }
4097
+ // if the old list is not empty, the new list MUST have the same
4356
4098
  // amount of nodes, that's why we call this static children
4357
-
4358
-
4359
4099
  let anchor = null;
4360
-
4361
4100
  for (let i = c2Length - 1; i >= 0; i -= 1) {
4362
4101
  const n1 = c1[i];
4363
4102
  const n2 = c2[i];
4364
-
4365
4103
  if (n2 !== n1) {
4366
4104
  if (isVNode(n1)) {
4367
4105
  if (isVNode(n2)) {
@@ -5351,42 +5089,30 @@ function invokeServiceHook(vm, cbs) {
5351
5089
  */
5352
5090
  let idx = 0;
5353
5091
  /** The internal slot used to associate different objects the engine manipulates with the VM */
5354
-
5355
5092
  const ViewModelReflection = new WeakMap();
5356
-
5357
5093
  function callHook(cmp, fn, args = []) {
5358
5094
  return fn.apply(cmp, args);
5359
5095
  }
5360
-
5361
5096
  function setHook(cmp, prop, newValue) {
5362
5097
  cmp[prop] = newValue;
5363
5098
  }
5364
-
5365
5099
  function getHook(cmp, prop) {
5366
5100
  return cmp[prop];
5367
5101
  }
5368
-
5369
5102
  function rerenderVM(vm) {
5370
5103
  rehydrate(vm);
5371
5104
  }
5372
5105
  function connectRootElement(elm) {
5373
5106
  const vm = getAssociatedVM(elm);
5374
- logGlobalOperationStart(7
5375
- /* OperationId.GlobalHydrate */
5376
- , vm); // Usually means moving the element from one place to another, which is observable via
5107
+ logGlobalOperationStart(7 /* OperationId.GlobalHydrate */, vm);
5108
+ // Usually means moving the element from one place to another, which is observable via
5377
5109
  // life-cycle hooks.
5378
-
5379
- if (vm.state === 1
5380
- /* VMState.connected */
5381
- ) {
5110
+ if (vm.state === 1 /* VMState.connected */) {
5382
5111
  disconnectRootElement(elm);
5383
5112
  }
5384
-
5385
5113
  runConnectedCallback(vm);
5386
5114
  rehydrate(vm);
5387
- logGlobalOperationEnd(7
5388
- /* OperationId.GlobalHydrate */
5389
- , vm);
5115
+ logGlobalOperationEnd(7 /* OperationId.GlobalHydrate */, vm);
5390
5116
  }
5391
5117
  function disconnectRootElement(elm) {
5392
5118
  const vm = getAssociatedVM(elm);
@@ -5394,65 +5120,48 @@ function disconnectRootElement(elm) {
5394
5120
  }
5395
5121
  function appendVM(vm) {
5396
5122
  rehydrate(vm);
5397
- } // just in case the component comes back, with this we guarantee re-rendering it
5123
+ }
5124
+ // just in case the component comes back, with this we guarantee re-rendering it
5398
5125
  // while preventing any attempt to rehydration until after reinsertion.
5399
-
5400
5126
  function resetComponentStateWhenRemoved(vm) {
5401
5127
  const {
5402
5128
  state
5403
5129
  } = vm;
5404
-
5405
- if (state !== 2
5406
- /* VMState.disconnected */
5407
- ) {
5130
+ if (state !== 2 /* VMState.disconnected */) {
5408
5131
  const {
5409
5132
  oar,
5410
5133
  tro
5411
- } = vm; // Making sure that any observing record will not trigger the rehydrated on this vm
5412
-
5413
- tro.reset(); // Making sure that any observing accessor record will not trigger the setter to be reinvoked
5414
-
5134
+ } = vm;
5135
+ // Making sure that any observing record will not trigger the rehydrated on this vm
5136
+ tro.reset();
5137
+ // Making sure that any observing accessor record will not trigger the setter to be reinvoked
5415
5138
  for (const key in oar) {
5416
5139
  oar[key].reset();
5417
5140
  }
5418
-
5419
- runDisconnectedCallback(vm); // Spec: https://dom.spec.whatwg.org/#concept-node-remove (step 14-15)
5420
-
5141
+ runDisconnectedCallback(vm);
5142
+ // Spec: https://dom.spec.whatwg.org/#concept-node-remove (step 14-15)
5421
5143
  runChildNodesDisconnectedCallback(vm);
5422
5144
  runLightChildNodesDisconnectedCallback(vm);
5423
5145
  }
5424
-
5425
5146
  if (process.env.NODE_ENV !== 'production') {
5426
5147
  removeActiveVM(vm);
5427
5148
  }
5428
- } // this method is triggered by the diffing algo only when a vnode from the
5149
+ }
5150
+ // this method is triggered by the diffing algo only when a vnode from the
5429
5151
  // old vnode.children is removed from the DOM.
5430
-
5431
-
5432
5152
  function removeVM(vm) {
5433
5153
  if (process.env.NODE_ENV !== 'production') {
5434
- assert.isTrue(vm.state === 1
5435
- /* VMState.connected */
5436
- || vm.state === 2
5437
- /* VMState.disconnected */
5438
- , `${vm} must have been connected.`);
5154
+ assert.isTrue(vm.state === 1 /* VMState.connected */ || vm.state === 2 /* VMState.disconnected */, `${vm} must have been connected.`);
5439
5155
  }
5440
-
5441
5156
  resetComponentStateWhenRemoved(vm);
5442
5157
  }
5443
-
5444
5158
  function getNearestShadowAncestor(vm) {
5445
5159
  let ancestor = vm.owner;
5446
-
5447
- while (!isNull(ancestor) && ancestor.renderMode === 0
5448
- /* RenderMode.Light */
5449
- ) {
5160
+ while (!isNull(ancestor) && ancestor.renderMode === 0 /* RenderMode.Light */) {
5450
5161
  ancestor = ancestor.owner;
5451
5162
  }
5452
-
5453
5163
  return ancestor;
5454
5164
  }
5455
-
5456
5165
  function createVM(elm, ctor, renderer, options) {
5457
5166
  const {
5458
5167
  mode,
@@ -5465,9 +5174,7 @@ function createVM(elm, ctor, renderer, options) {
5465
5174
  elm,
5466
5175
  def,
5467
5176
  idx: idx++,
5468
- state: 0
5469
- /* VMState.created */
5470
- ,
5177
+ state: 0 /* VMState.created */,
5471
5178
  isScheduled: false,
5472
5179
  isDirty: true,
5473
5180
  tagName,
@@ -5509,31 +5216,27 @@ function createVM(elm, ctor, renderer, options) {
5509
5216
  getHook,
5510
5217
  renderer
5511
5218
  };
5219
+ if (process.env.NODE_ENV !== 'production') {
5220
+ vm.debugInfo = create(null);
5221
+ }
5512
5222
  vm.shadowMode = computeShadowMode(vm, renderer);
5513
5223
  vm.tro = getTemplateReactiveObserver(vm);
5514
-
5515
5224
  if (process.env.NODE_ENV !== 'production') {
5516
5225
  vm.toString = () => {
5517
5226
  return `[object:vm ${def.name} (${vm.idx})]`;
5518
5227
  };
5519
-
5520
5228
  if (lwcRuntimeFlags.ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST) {
5521
- vm.shadowMode = 0
5522
- /* ShadowMode.Native */
5523
- ;
5229
+ vm.shadowMode = 0 /* ShadowMode.Native */;
5524
5230
  }
5525
- } // Create component instance associated to the vm and the element.
5526
-
5527
-
5528
- invokeComponentConstructor(vm, def.ctor); // Initializing the wire decorator per instance only when really needed
5529
-
5231
+ }
5232
+ // Create component instance associated to the vm and the element.
5233
+ invokeComponentConstructor(vm, def.ctor);
5234
+ // Initializing the wire decorator per instance only when really needed
5530
5235
  if (hasWireAdapters(vm)) {
5531
5236
  installWireAdapters(vm);
5532
5237
  }
5533
-
5534
5238
  return vm;
5535
5239
  }
5536
-
5537
5240
  function computeShadowMode(vm, renderer) {
5538
5241
  const {
5539
5242
  def
@@ -5543,136 +5246,98 @@ function computeShadowMode(vm, renderer) {
5543
5246
  isNativeShadowDefined
5544
5247
  } = renderer;
5545
5248
  let shadowMode;
5546
-
5547
5249
  if (isSyntheticShadowDefined) {
5548
- if (def.renderMode === 0
5549
- /* RenderMode.Light */
5550
- ) {
5250
+ if (def.renderMode === 0 /* RenderMode.Light */) {
5551
5251
  // ShadowMode.Native implies "not synthetic shadow" which is consistent with how
5552
5252
  // everything defaults to native when the synthetic shadow polyfill is unavailable.
5553
- shadowMode = 0
5554
- /* ShadowMode.Native */
5555
- ;
5253
+ shadowMode = 0 /* ShadowMode.Native */;
5556
5254
  } else if (isNativeShadowDefined) {
5557
5255
  // Not combined with above condition because @lwc/features only supports identifiers in
5558
5256
  // the if-condition.
5559
5257
  if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5560
- if (def.shadowSupportMode === "any"
5561
- /* ShadowSupportMode.Any */
5562
- ) {
5563
- shadowMode = 0
5564
- /* ShadowMode.Native */
5565
- ;
5258
+ if (def.shadowSupportMode === "any" /* ShadowSupportMode.Any */) {
5259
+ shadowMode = 0 /* ShadowMode.Native */;
5566
5260
  } else {
5567
5261
  const shadowAncestor = getNearestShadowAncestor(vm);
5568
-
5569
- if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
5570
- /* ShadowMode.Native */
5571
- ) {
5262
+ if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0 /* ShadowMode.Native */) {
5572
5263
  // Transitive support for native Shadow DOM. A component in native mode
5573
5264
  // transitively opts all of its descendants into native.
5574
- shadowMode = 0
5575
- /* ShadowMode.Native */
5576
- ;
5265
+ shadowMode = 0 /* ShadowMode.Native */;
5577
5266
  } else {
5578
5267
  // Synthetic if neither this component nor any of its ancestors are configured
5579
5268
  // to be native.
5580
- shadowMode = 1
5581
- /* ShadowMode.Synthetic */
5582
- ;
5269
+ shadowMode = 1 /* ShadowMode.Synthetic */;
5583
5270
  }
5584
5271
  }
5585
5272
  } else {
5586
- shadowMode = 1
5587
- /* ShadowMode.Synthetic */
5588
- ;
5273
+ shadowMode = 1 /* ShadowMode.Synthetic */;
5589
5274
  }
5590
5275
  } else {
5591
5276
  // Synthetic if there is no native Shadow DOM support.
5592
- shadowMode = 1
5593
- /* ShadowMode.Synthetic */
5594
- ;
5277
+ shadowMode = 1 /* ShadowMode.Synthetic */;
5595
5278
  }
5596
5279
  } else {
5597
5280
  // Native if the synthetic shadow polyfill is unavailable.
5598
- shadowMode = 0
5599
- /* ShadowMode.Native */
5600
- ;
5281
+ shadowMode = 0 /* ShadowMode.Native */;
5601
5282
  }
5602
5283
 
5603
5284
  return shadowMode;
5604
5285
  }
5605
-
5606
5286
  function assertIsVM(obj) {
5607
5287
  if (isNull(obj) || !isObject(obj) || !('renderRoot' in obj)) {
5608
5288
  throw new TypeError(`${obj} is not a VM.`);
5609
5289
  }
5610
5290
  }
5611
-
5612
5291
  function associateVM(obj, vm) {
5613
5292
  ViewModelReflection.set(obj, vm);
5614
5293
  }
5615
5294
  function getAssociatedVM(obj) {
5616
5295
  const vm = ViewModelReflection.get(obj);
5617
-
5618
5296
  if (process.env.NODE_ENV !== 'production') {
5619
5297
  assertIsVM(vm);
5620
5298
  }
5621
-
5622
5299
  return vm;
5623
5300
  }
5624
5301
  function getAssociatedVMIfPresent(obj) {
5625
5302
  const maybeVm = ViewModelReflection.get(obj);
5626
-
5627
5303
  if (process.env.NODE_ENV !== 'production') {
5628
5304
  if (!isUndefined$1(maybeVm)) {
5629
5305
  assertIsVM(maybeVm);
5630
5306
  }
5631
5307
  }
5632
-
5633
5308
  return maybeVm;
5634
5309
  }
5635
-
5636
5310
  function rehydrate(vm) {
5637
5311
  if (isTrue(vm.isDirty)) {
5638
5312
  const children = renderComponent(vm);
5639
5313
  patchShadowRoot(vm, children);
5640
5314
  }
5641
5315
  }
5642
-
5643
5316
  function patchShadowRoot(vm, newCh) {
5644
5317
  const {
5645
5318
  renderRoot,
5646
5319
  children: oldCh,
5647
5320
  renderer
5648
- } = vm; // caching the new children collection
5649
-
5321
+ } = vm;
5322
+ // caching the new children collection
5650
5323
  vm.children = newCh;
5651
-
5652
5324
  if (newCh.length > 0 || oldCh.length > 0) {
5653
5325
  // patch function mutates vnodes by adding the element reference,
5654
5326
  // however, if patching fails it contains partial changes.
5655
5327
  if (oldCh !== newCh) {
5656
5328
  runWithBoundaryProtection(vm, vm, () => {
5657
5329
  // pre
5658
- logOperationStart(2
5659
- /* OperationId.Patch */
5660
- , vm);
5330
+ logOperationStart(2 /* OperationId.Patch */, vm);
5661
5331
  }, () => {
5662
5332
  // job
5663
5333
  patchChildren(oldCh, newCh, renderRoot, renderer);
5664
5334
  }, () => {
5665
5335
  // post
5666
- logOperationEnd(2
5667
- /* OperationId.Patch */
5668
- , vm);
5336
+ logOperationEnd(2 /* OperationId.Patch */, vm);
5669
5337
  });
5670
5338
  }
5671
5339
  }
5672
-
5673
- if (vm.state === 1
5674
- /* VMState.connected */
5675
- ) {
5340
+ if (vm.state === 1 /* VMState.connected */) {
5676
5341
  // If the element is connected, that means connectedCallback was already issued, and
5677
5342
  // any successive rendering should finish with the call to renderedCallback, otherwise
5678
5343
  // the connectedCallback will take care of calling it in the right order at the end of
@@ -5680,53 +5345,37 @@ function patchShadowRoot(vm, newCh) {
5680
5345
  runRenderedCallback(vm);
5681
5346
  }
5682
5347
  }
5683
-
5684
5348
  function runRenderedCallback(vm) {
5685
5349
  const {
5686
5350
  def: {
5687
5351
  renderedCallback
5688
5352
  }
5689
5353
  } = vm;
5690
-
5691
5354
  if (!process.env.IS_BROWSER) {
5692
5355
  return;
5693
5356
  }
5694
-
5695
5357
  const {
5696
5358
  rendered
5697
5359
  } = Services;
5698
-
5699
5360
  if (rendered) {
5700
5361
  invokeServiceHook(vm, rendered);
5701
5362
  }
5702
-
5703
5363
  if (!isUndefined$1(renderedCallback)) {
5704
- logOperationStart(4
5705
- /* OperationId.RenderedCallback */
5706
- , vm);
5364
+ logOperationStart(4 /* OperationId.RenderedCallback */, vm);
5707
5365
  invokeComponentCallback(vm, renderedCallback);
5708
- logOperationEnd(4
5709
- /* OperationId.RenderedCallback */
5710
- , vm);
5366
+ logOperationEnd(4 /* OperationId.RenderedCallback */, vm);
5711
5367
  }
5712
5368
  }
5713
5369
  let rehydrateQueue = [];
5714
-
5715
5370
  function flushRehydrationQueue() {
5716
- logGlobalOperationStart(8
5717
- /* OperationId.GlobalRehydrate */
5718
- );
5719
-
5371
+ logGlobalOperationStart(8 /* OperationId.GlobalRehydrate */);
5720
5372
  if (process.env.NODE_ENV !== 'production') {
5721
5373
  assert.invariant(rehydrateQueue.length, `If rehydrateQueue was scheduled, it is because there must be at least one VM on this pending queue instead of ${rehydrateQueue}.`);
5722
5374
  }
5723
-
5724
5375
  const vms = rehydrateQueue.sort((a, b) => a.idx - b.idx);
5725
5376
  rehydrateQueue = []; // reset to a new queue
5726
-
5727
5377
  for (let i = 0, len = vms.length; i < len; i += 1) {
5728
5378
  const vm = vms[i];
5729
-
5730
5379
  try {
5731
5380
  rehydrate(vm);
5732
5381
  } catch (error) {
@@ -5735,78 +5384,54 @@ function flushRehydrationQueue() {
5735
5384
  if (rehydrateQueue.length === 0) {
5736
5385
  addCallbackToNextTick(flushRehydrationQueue);
5737
5386
  }
5738
-
5739
5387
  ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, i + 1));
5740
- } // we need to end the measure before throwing.
5741
-
5742
-
5743
- logGlobalOperationEnd(8
5744
- /* OperationId.GlobalRehydrate */
5745
- ); // re-throwing the original error will break the current tick, but since the next tick is
5388
+ }
5389
+ // we need to end the measure before throwing.
5390
+ logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
5391
+ // re-throwing the original error will break the current tick, but since the next tick is
5746
5392
  // already scheduled, it should continue patching the rest.
5747
-
5748
5393
  throw error; // eslint-disable-line no-unsafe-finally
5749
5394
  }
5750
5395
  }
5751
5396
 
5752
- logGlobalOperationEnd(8
5753
- /* OperationId.GlobalRehydrate */
5754
- );
5397
+ logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
5755
5398
  }
5756
5399
 
5757
5400
  function runConnectedCallback(vm) {
5758
5401
  const {
5759
5402
  state
5760
5403
  } = vm;
5761
-
5762
- if (state === 1
5763
- /* VMState.connected */
5764
- ) {
5404
+ if (state === 1 /* VMState.connected */) {
5765
5405
  return; // nothing to do since it was already connected
5766
5406
  }
5767
5407
 
5768
- vm.state = 1
5769
- /* VMState.connected */
5770
- ; // reporting connection
5771
-
5408
+ vm.state = 1 /* VMState.connected */;
5409
+ // reporting connection
5772
5410
  const {
5773
5411
  connected
5774
5412
  } = Services;
5775
-
5776
5413
  if (connected) {
5777
5414
  invokeServiceHook(vm, connected);
5778
5415
  }
5779
-
5780
5416
  if (hasWireAdapters(vm)) {
5781
5417
  connectWireAdapters(vm);
5782
5418
  }
5783
-
5784
5419
  const {
5785
5420
  connectedCallback
5786
5421
  } = vm.def;
5787
-
5788
5422
  if (!isUndefined$1(connectedCallback)) {
5789
- logOperationStart(3
5790
- /* OperationId.ConnectedCallback */
5791
- , vm);
5423
+ logOperationStart(3 /* OperationId.ConnectedCallback */, vm);
5792
5424
  invokeComponentCallback(vm, connectedCallback);
5793
- logOperationEnd(3
5794
- /* OperationId.ConnectedCallback */
5795
- , vm);
5425
+ logOperationEnd(3 /* OperationId.ConnectedCallback */, vm);
5796
5426
  }
5797
5427
  }
5798
-
5799
5428
  function hasWireAdapters(vm) {
5800
5429
  return getOwnPropertyNames$1(vm.def.wire).length > 0;
5801
5430
  }
5802
-
5803
5431
  function runDisconnectedCallback(vm) {
5804
5432
  if (process.env.NODE_ENV !== 'production') {
5805
- assert.isTrue(vm.state !== 2
5806
- /* VMState.disconnected */
5807
- , `${vm} must be inserted.`);
5433
+ assert.isTrue(vm.state !== 2 /* VMState.disconnected */, `${vm} must be inserted.`);
5808
5434
  }
5809
-
5810
5435
  if (isFalse(vm.isDirty)) {
5811
5436
  // this guarantees that if the component is reused/reinserted,
5812
5437
  // it will be re-rendered because we are disconnecting the reactivity
@@ -5814,67 +5439,54 @@ function runDisconnectedCallback(vm) {
5814
5439
  // of disconnected components.
5815
5440
  vm.isDirty = true;
5816
5441
  }
5817
-
5818
- vm.state = 2
5819
- /* VMState.disconnected */
5820
- ; // reporting disconnection
5821
-
5442
+ vm.state = 2 /* VMState.disconnected */;
5443
+ // reporting disconnection
5822
5444
  const {
5823
5445
  disconnected
5824
5446
  } = Services;
5825
-
5826
5447
  if (disconnected) {
5827
5448
  invokeServiceHook(vm, disconnected);
5828
5449
  }
5829
-
5830
5450
  if (hasWireAdapters(vm)) {
5831
5451
  disconnectWireAdapters(vm);
5832
5452
  }
5833
-
5834
5453
  const {
5835
5454
  disconnectedCallback
5836
5455
  } = vm.def;
5837
-
5838
5456
  if (!isUndefined$1(disconnectedCallback)) {
5839
- logOperationStart(5
5840
- /* OperationId.DisconnectedCallback */
5841
- , vm);
5457
+ logOperationStart(5 /* OperationId.DisconnectedCallback */, vm);
5842
5458
  invokeComponentCallback(vm, disconnectedCallback);
5843
- logOperationEnd(5
5844
- /* OperationId.DisconnectedCallback */
5845
- , vm);
5459
+ logOperationEnd(5 /* OperationId.DisconnectedCallback */, vm);
5846
5460
  }
5847
5461
  }
5848
-
5849
5462
  function runChildNodesDisconnectedCallback(vm) {
5850
5463
  const {
5851
5464
  velements: vCustomElementCollection
5852
- } = vm; // Reporting disconnection for every child in inverse order since they are
5465
+ } = vm;
5466
+ // Reporting disconnection for every child in inverse order since they are
5853
5467
  // inserted in reserved order.
5854
-
5855
5468
  for (let i = vCustomElementCollection.length - 1; i >= 0; i -= 1) {
5856
5469
  const {
5857
5470
  elm
5858
- } = vCustomElementCollection[i]; // There are two cases where the element could be undefined:
5471
+ } = vCustomElementCollection[i];
5472
+ // There are two cases where the element could be undefined:
5859
5473
  // * when there is an error during the construction phase, and an error
5860
5474
  // boundary picks it, there is a possibility that the VCustomElement
5861
5475
  // is not properly initialized, and therefore is should be ignored.
5862
5476
  // * when slotted custom element is not used by the element where it is
5863
5477
  // slotted into it, as a result, the custom element was never
5864
5478
  // initialized.
5865
-
5866
5479
  if (!isUndefined$1(elm)) {
5867
- const childVM = getAssociatedVMIfPresent(elm); // The VM associated with the element might be associated undefined
5480
+ const childVM = getAssociatedVMIfPresent(elm);
5481
+ // The VM associated with the element might be associated undefined
5868
5482
  // in the case where the VM failed in the middle of its creation,
5869
5483
  // eg: constructor throwing before invoking super().
5870
-
5871
5484
  if (!isUndefined$1(childVM)) {
5872
5485
  resetComponentStateWhenRemoved(childVM);
5873
5486
  }
5874
5487
  }
5875
5488
  }
5876
5489
  }
5877
-
5878
5490
  function runLightChildNodesDisconnectedCallback(vm) {
5879
5491
  const {
5880
5492
  aChildren: adoptedChildren
@@ -5888,23 +5500,15 @@ function runLightChildNodesDisconnectedCallback(vm) {
5888
5500
  * custom element itself will trigger the removal of anything slotted or anything
5889
5501
  * defined on its shadow.
5890
5502
  */
5891
-
5892
-
5893
5503
  function recursivelyDisconnectChildren(vnodes) {
5894
5504
  for (let i = 0, len = vnodes.length; i < len; i += 1) {
5895
5505
  const vnode = vnodes[i];
5896
-
5897
5506
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
5898
5507
  switch (vnode.type) {
5899
- case 2
5900
- /* VNodeType.Element */
5901
- :
5508
+ case 2 /* VNodeType.Element */:
5902
5509
  recursivelyDisconnectChildren(vnode.children);
5903
5510
  break;
5904
-
5905
- case 3
5906
- /* VNodeType.CustomElement */
5907
- :
5511
+ case 3 /* VNodeType.CustomElement */:
5908
5512
  {
5909
5513
  const vm = getAssociatedVM(vnode.elm);
5910
5514
  resetComponentStateWhenRemoved(vm);
@@ -5913,12 +5517,11 @@ function recursivelyDisconnectChildren(vnodes) {
5913
5517
  }
5914
5518
  }
5915
5519
  }
5916
- } // This is a super optimized mechanism to remove the content of the root node (shadow root
5520
+ }
5521
+ // This is a super optimized mechanism to remove the content of the root node (shadow root
5917
5522
  // for shadow DOM components and the root element itself for light DOM) without having to go
5918
5523
  // into snabbdom. Especially useful when the reset is a consequence of an error, in which case the
5919
5524
  // children VNodes might not be representing the current state of the DOM.
5920
-
5921
-
5922
5525
  function resetComponentRoot(vm) {
5923
5526
  const {
5924
5527
  children,
@@ -5927,15 +5530,12 @@ function resetComponentRoot(vm) {
5927
5530
  remove
5928
5531
  }
5929
5532
  } = vm;
5930
-
5931
5533
  for (let i = 0, len = children.length; i < len; i++) {
5932
5534
  const child = children[i];
5933
-
5934
5535
  if (!isNull(child) && !isUndefined$1(child.elm)) {
5935
5536
  remove(child.elm, renderRoot);
5936
5537
  }
5937
5538
  }
5938
-
5939
5539
  vm.children = EmptyArray;
5940
5540
  runChildNodesDisconnectedCallback(vm);
5941
5541
  vm.velements = EmptyArray;
@@ -5944,58 +5544,43 @@ function scheduleRehydration(vm) {
5944
5544
  if (!process.env.IS_BROWSER || isTrue(vm.isScheduled)) {
5945
5545
  return;
5946
5546
  }
5947
-
5948
5547
  vm.isScheduled = true;
5949
-
5950
5548
  if (rehydrateQueue.length === 0) {
5951
5549
  addCallbackToNextTick(flushRehydrationQueue);
5952
5550
  }
5953
-
5954
5551
  ArrayPush$1.call(rehydrateQueue, vm);
5955
5552
  }
5956
-
5957
5553
  function getErrorBoundaryVM(vm) {
5958
5554
  let currentVm = vm;
5959
-
5960
5555
  while (!isNull(currentVm)) {
5961
5556
  if (!isUndefined$1(currentVm.def.errorCallback)) {
5962
5557
  return currentVm;
5963
5558
  }
5964
-
5965
5559
  currentVm = currentVm.owner;
5966
5560
  }
5967
5561
  }
5968
-
5969
5562
  function runWithBoundaryProtection(vm, owner, pre, job, post) {
5970
5563
  let error;
5971
5564
  pre();
5972
-
5973
5565
  try {
5974
5566
  job();
5975
5567
  } catch (e) {
5976
5568
  error = Object(e);
5977
5569
  } finally {
5978
5570
  post();
5979
-
5980
5571
  if (!isUndefined$1(error)) {
5981
5572
  addErrorComponentStack(vm, error);
5982
5573
  const errorBoundaryVm = isNull(owner) ? undefined : getErrorBoundaryVM(owner);
5983
-
5984
5574
  if (isUndefined$1(errorBoundaryVm)) {
5985
5575
  throw error; // eslint-disable-line no-unsafe-finally
5986
5576
  }
5987
5577
 
5988
5578
  resetComponentRoot(vm); // remove offenders
5989
-
5990
- logOperationStart(6
5991
- /* OperationId.ErrorCallback */
5992
- , vm); // error boundaries must have an ErrorCallback
5993
-
5579
+ logOperationStart(6 /* OperationId.ErrorCallback */, vm);
5580
+ // error boundaries must have an ErrorCallback
5994
5581
  const errorCallback = errorBoundaryVm.def.errorCallback;
5995
5582
  invokeComponentCallback(errorBoundaryVm, errorCallback, [error, error.wcStack]);
5996
- logOperationEnd(6
5997
- /* OperationId.ErrorCallback */
5998
- , vm);
5583
+ logOperationEnd(6 /* OperationId.ErrorCallback */, vm);
5999
5584
  }
6000
5585
  }
6001
5586
  }
@@ -6009,7 +5594,6 @@ function forceRehydration(vm) {
6009
5594
  // content of the shadowRoot, this way we can guarantee that all children
6010
5595
  // elements will be throw away, and new instances will be created.
6011
5596
  vm.cmpTemplate = () => [];
6012
-
6013
5597
  if (isFalse(vm.isDirty)) {
6014
5598
  // forcing the vm to rehydrate in the next tick
6015
5599
  markComponentAsDirty(vm);
@@ -6025,6 +5609,7 @@ function forceRehydration(vm) {
6025
5609
  */
6026
5610
  const DeprecatedWiredElementHost = '$$DeprecatedWiredElementHostKey$$';
6027
5611
  const DeprecatedWiredParamsMeta = '$$DeprecatedWiredParamsMetaKey$$';
5612
+ const WIRE_DEBUG_ENTRY = '@wire';
6028
5613
  const WireMetaMap = new Map();
6029
5614
  class WireContextRegistrationEvent extends CustomEvent {
6030
5615
  constructor(adapterToken, {
@@ -6044,15 +5629,12 @@ class WireContextRegistrationEvent extends CustomEvent {
6044
5629
  }
6045
5630
  });
6046
5631
  }
6047
-
6048
5632
  }
6049
-
6050
5633
  function createFieldDataCallback(vm, name) {
6051
5634
  return value => {
6052
5635
  updateComponentValue(vm, name, value);
6053
5636
  };
6054
5637
  }
6055
-
6056
5638
  function createMethodDataCallback(vm, method) {
6057
5639
  return value => {
6058
5640
  // dispatching new value into the wired method
@@ -6062,45 +5644,40 @@ function createMethodDataCallback(vm, method) {
6062
5644
  }, noop);
6063
5645
  };
6064
5646
  }
6065
-
6066
5647
  function createConfigWatcher(component, configCallback, callbackWhenConfigIsReady) {
6067
- let hasPendingConfig = false; // creating the reactive observer for reactive params when needed
6068
-
5648
+ let hasPendingConfig = false;
5649
+ // creating the reactive observer for reactive params when needed
6069
5650
  const ro = createReactiveObserver(() => {
6070
5651
  if (hasPendingConfig === false) {
6071
- hasPendingConfig = true; // collect new config in the micro-task
6072
-
5652
+ hasPendingConfig = true;
5653
+ // collect new config in the micro-task
6073
5654
  Promise.resolve().then(() => {
6074
- hasPendingConfig = false; // resetting current reactive params
6075
-
6076
- ro.reset(); // dispatching a new config due to a change in the configuration
6077
-
5655
+ hasPendingConfig = false;
5656
+ // resetting current reactive params
5657
+ ro.reset();
5658
+ // dispatching a new config due to a change in the configuration
6078
5659
  computeConfigAndUpdate();
6079
5660
  });
6080
5661
  }
6081
5662
  });
6082
-
6083
5663
  const computeConfigAndUpdate = () => {
6084
5664
  let config;
6085
- ro.observe(() => config = configCallback(component)); // eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
5665
+ ro.observe(() => config = configCallback(component));
5666
+ // eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
6086
5667
  // TODO: dev-mode validation of config based on the adapter.configSchema
6087
5668
  // @ts-ignore it is assigned in the observe() callback
6088
-
6089
5669
  callbackWhenConfigIsReady(config);
6090
5670
  };
6091
-
6092
5671
  return {
6093
5672
  computeConfigAndUpdate,
6094
5673
  ro
6095
5674
  };
6096
5675
  }
6097
-
6098
5676
  function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
6099
5677
  const {
6100
5678
  adapter
6101
5679
  } = wireDef;
6102
5680
  const adapterContextToken = getAdapterToken(adapter);
6103
-
6104
5681
  if (isUndefined$1(adapterContextToken)) {
6105
5682
  return; // no provider found, nothing to be done
6106
5683
  }
@@ -6114,8 +5691,8 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
6114
5691
  renderer: {
6115
5692
  dispatchEvent
6116
5693
  }
6117
- } = vm; // waiting for the component to be connected to formally request the context via the token
6118
-
5694
+ } = vm;
5695
+ // waiting for the component to be connected to formally request the context via the token
6119
5696
  ArrayPush$1.call(wiredConnecting, () => {
6120
5697
  // This event is responsible for connecting the host element with another
6121
5698
  // element in the composed path that is providing contextual data. The provider
@@ -6128,18 +5705,15 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
6128
5705
  // TODO: dev-mode validation of config based on the adapter.contextSchema
6129
5706
  callbackWhenContextIsReady(newContext);
6130
5707
  },
6131
-
6132
5708
  setDisconnectedCallback(disconnectCallback) {
6133
5709
  // adds this callback into the disconnect bucket so it gets disconnected from parent
6134
5710
  // the the element hosting the wire is disconnected
6135
5711
  ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
6136
5712
  }
6137
-
6138
5713
  });
6139
5714
  dispatchEvent(elm, contextRegistrationEvent);
6140
5715
  });
6141
5716
  }
6142
-
6143
5717
  function createConnector(vm, name, wireDef) {
6144
5718
  const {
6145
5719
  method,
@@ -6147,10 +5721,27 @@ function createConnector(vm, name, wireDef) {
6147
5721
  configCallback,
6148
5722
  dynamic
6149
5723
  } = wireDef;
6150
- const dataCallback = isUndefined$1(method) ? createFieldDataCallback(vm, name) : createMethodDataCallback(vm, method);
5724
+ let debugInfo;
5725
+ if (process.env.NODE_ENV !== 'production') {
5726
+ const wiredPropOrMethod = isUndefined$1(method) ? name : method.name;
5727
+ debugInfo = create(null);
5728
+ debugInfo.wasDataProvisionedForConfig = false;
5729
+ vm.debugInfo[WIRE_DEBUG_ENTRY][wiredPropOrMethod] = debugInfo;
5730
+ }
5731
+ const fieldOrMethodCallback = isUndefined$1(method) ? createFieldDataCallback(vm, name) : createMethodDataCallback(vm, method);
5732
+ const dataCallback = value => {
5733
+ if (process.env.NODE_ENV !== 'production') {
5734
+ debugInfo.data = value;
5735
+ // Note: most of the time, the data provided is for the current config, but there may be
5736
+ // some conditions in which it does not, ex:
5737
+ // race conditions in a poor network while the adapter does not cancel a previous request.
5738
+ debugInfo.wasDataProvisionedForConfig = true;
5739
+ }
5740
+ fieldOrMethodCallback(value);
5741
+ };
6151
5742
  let context;
6152
- let connector; // Workaround to pass the component element associated to this wire adapter instance.
6153
-
5743
+ let connector;
5744
+ // Workaround to pass the component element associated to this wire adapter instance.
6154
5745
  defineProperty(dataCallback, DeprecatedWiredElementHost, {
6155
5746
  value: vm.elm
6156
5747
  });
@@ -6161,41 +5752,41 @@ function createConnector(vm, name, wireDef) {
6161
5752
  // job
6162
5753
  connector = new adapter(dataCallback);
6163
5754
  }, noop);
6164
-
6165
5755
  const updateConnectorConfig = config => {
6166
5756
  // every time the config is recomputed due to tracking,
6167
5757
  // this callback will be invoked with the new computed config
6168
5758
  runWithBoundaryProtection(vm, vm, noop, () => {
6169
5759
  // job
5760
+ if (process.env.NODE_ENV !== 'production') {
5761
+ debugInfo.config = config;
5762
+ debugInfo.context = context;
5763
+ debugInfo.wasDataProvisionedForConfig = false;
5764
+ }
6170
5765
  connector.update(config, context);
6171
5766
  }, noop);
6172
- }; // Computes the current wire config and calls the update method on the wire adapter.
5767
+ };
5768
+ // Computes the current wire config and calls the update method on the wire adapter.
6173
5769
  // If it has params, we will need to observe changes in the next tick.
6174
-
6175
-
6176
5770
  const {
6177
5771
  computeConfigAndUpdate,
6178
5772
  ro
6179
- } = createConfigWatcher(vm.component, configCallback, updateConnectorConfig); // if the adapter needs contextualization, we need to watch for new context and push it alongside the config
6180
-
5773
+ } = createConfigWatcher(vm.component, configCallback, updateConnectorConfig);
5774
+ // if the adapter needs contextualization, we need to watch for new context and push it alongside the config
6181
5775
  if (!isUndefined$1(adapter.contextSchema)) {
6182
5776
  createContextWatcher(vm, wireDef, newContext => {
6183
5777
  // every time the context is pushed into this component,
6184
5778
  // this callback will be invoked with the new computed context
6185
5779
  if (context !== newContext) {
6186
- context = newContext; // Note: when new context arrives, the config will be recomputed and pushed along side the new
5780
+ context = newContext;
5781
+ // Note: when new context arrives, the config will be recomputed and pushed along side the new
6187
5782
  // context, this is to preserve the identity characteristics, config should not have identity
6188
5783
  // (ever), while context can have identity
6189
-
6190
- if (vm.state === 1
6191
- /* VMState.connected */
6192
- ) {
5784
+ if (vm.state === 1 /* VMState.connected */) {
6193
5785
  computeConfigAndUpdate();
6194
5786
  }
6195
5787
  }
6196
5788
  });
6197
5789
  }
6198
-
6199
5790
  return {
6200
5791
  // @ts-ignore the boundary protection executes sync, connector is always defined
6201
5792
  connector,
@@ -6203,7 +5794,6 @@ function createConnector(vm, name, wireDef) {
6203
5794
  resetConfigWatcher: () => ro.reset()
6204
5795
  };
6205
5796
  }
6206
-
6207
5797
  const AdapterToTokenMap = new Map();
6208
5798
  function getAdapterToken(adapter) {
6209
5799
  return AdapterToTokenMap.get(adapter);
@@ -6216,7 +5806,6 @@ function storeWiredMethodMeta(descriptor, adapter, configCallback, dynamic) {
6216
5806
  if (adapter.adapter) {
6217
5807
  adapter = adapter.adapter;
6218
5808
  }
6219
-
6220
5809
  const method = descriptor.value;
6221
5810
  const def = {
6222
5811
  adapter,
@@ -6231,7 +5820,6 @@ function storeWiredFieldMeta(descriptor, adapter, configCallback, dynamic) {
6231
5820
  if (adapter.adapter) {
6232
5821
  adapter = adapter.adapter;
6233
5822
  }
6234
-
6235
5823
  const def = {
6236
5824
  adapter,
6237
5825
  configCallback,
@@ -6246,17 +5834,17 @@ function installWireAdapters(vm) {
6246
5834
  wire
6247
5835
  }
6248
5836
  } = vm;
5837
+ if (process.env.NODE_ENV !== 'production') {
5838
+ vm.debugInfo[WIRE_DEBUG_ENTRY] = create(null);
5839
+ }
6249
5840
  const wiredConnecting = context.wiredConnecting = [];
6250
5841
  const wiredDisconnecting = context.wiredDisconnecting = [];
6251
-
6252
5842
  for (const fieldNameOrMethod in wire) {
6253
5843
  const descriptor = wire[fieldNameOrMethod];
6254
5844
  const wireDef = WireMetaMap.get(descriptor);
6255
-
6256
5845
  if (process.env.NODE_ENV !== 'production') {
6257
5846
  assert.invariant(wireDef, `Internal Error: invalid wire definition found.`);
6258
5847
  }
6259
-
6260
5848
  if (!isUndefined$1(wireDef)) {
6261
5849
  const {
6262
5850
  connector,
@@ -6266,14 +5854,12 @@ function installWireAdapters(vm) {
6266
5854
  const hasDynamicParams = wireDef.dynamic.length > 0;
6267
5855
  ArrayPush$1.call(wiredConnecting, () => {
6268
5856
  connector.connect();
6269
-
6270
5857
  if (!lwcRuntimeFlags.ENABLE_WIRE_SYNC_EMIT) {
6271
5858
  if (hasDynamicParams) {
6272
5859
  Promise.resolve().then(computeConfigAndUpdate);
6273
5860
  return;
6274
5861
  }
6275
5862
  }
6276
-
6277
5863
  computeConfigAndUpdate();
6278
5864
  });
6279
5865
  ArrayPush$1.call(wiredDisconnecting, () => {
@@ -6287,7 +5873,6 @@ function connectWireAdapters(vm) {
6287
5873
  const {
6288
5874
  wiredConnecting
6289
5875
  } = vm.context;
6290
-
6291
5876
  for (let i = 0, len = wiredConnecting.length; i < len; i += 1) {
6292
5877
  wiredConnecting[i]();
6293
5878
  }
@@ -6903,4 +6488,4 @@ function getComponentConstructor(elm) {
6903
6488
  }
6904
6489
 
6905
6490
  export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, connectRootElement, createContextProvider, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
6906
- /* version: 2.29.0 */
6491
+ /* version: 2.30.1 */