lwc 2.29.0 → 2.30.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.
Files changed (37) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +319 -683
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +319 -683
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +201 -624
  5. package/dist/engine-dom/iife/es5/engine-dom.js +1138 -2843
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +892 -2428
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +319 -683
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +201 -624
  11. package/dist/engine-dom/umd/es5/engine-dom.js +1138 -2843
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +892 -2428
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +204 -584
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +204 -584
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +99 -323
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +99 -323
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +98 -316
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +483 -1220
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +470 -1187
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +99 -323
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +98 -316
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +483 -1220
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +470 -1187
  26. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  27. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  28. package/dist/wire-service/iife/es2017/wire-service.min.js +1 -1
  29. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  30. package/dist/wire-service/iife/es5/wire-service.js +13 -68
  31. package/dist/wire-service/iife/es5/wire-service_debug.js +13 -68
  32. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  33. package/dist/wire-service/umd/es2017/wire-service.min.js +1 -1
  34. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  35. package/dist/wire-service/umd/es5/wire-service.js +13 -68
  36. package/dist/wire-service/umd/es5/wire-service_debug.js +13 -68
  37. package/package.json +7 -7
@@ -291,7 +291,7 @@ var LWC = (function (exports) {
291
291
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
292
292
  return attributeName;
293
293
  }
294
- /** version: 2.29.0 */
294
+ /** version: 2.30.0 */
295
295
 
296
296
  /**
297
297
  * Copyright (C) 2018 salesforce.com, inc.
@@ -373,7 +373,7 @@ var LWC = (function (exports) {
373
373
  patch$1(propName);
374
374
  }
375
375
  }
376
- /** version: 2.29.0 */
376
+ /** version: 2.30.0 */
377
377
 
378
378
  /**
379
379
  * Copyright (C) 2018 salesforce.com, inc.
@@ -1702,30 +1702,23 @@ var LWC = (function (exports) {
1702
1702
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1703
1703
  */
1704
1704
  function api$1() {
1705
-
1706
1705
  throw new Error();
1707
1706
  }
1708
1707
  function createPublicPropertyDescriptor(key) {
1709
1708
  return {
1710
1709
  get() {
1711
1710
  const vm = getAssociatedVM(this);
1712
-
1713
1711
  if (isBeingConstructed(vm)) {
1714
-
1715
1712
  return;
1716
1713
  }
1717
-
1718
1714
  componentValueObserved(vm, key);
1719
1715
  return vm.cmpProps[key];
1720
1716
  },
1721
-
1722
1717
  set(newValue) {
1723
1718
  const vm = getAssociatedVM(this);
1724
-
1725
1719
  vm.cmpProps[key] = newValue;
1726
1720
  componentValueMutated(vm, key);
1727
1721
  },
1728
-
1729
1722
  enumerable: true,
1730
1723
  configurable: true
1731
1724
  };
@@ -1737,33 +1730,25 @@ var LWC = (function (exports) {
1737
1730
  enumerable,
1738
1731
  configurable
1739
1732
  } = descriptor;
1740
-
1741
1733
  if (!isFunction$1(get)) {
1742
-
1743
1734
  throw new Error();
1744
1735
  }
1745
-
1746
1736
  return {
1747
1737
  get() {
1748
-
1749
1738
  return get.call(this);
1750
1739
  },
1751
-
1752
1740
  set(newValue) {
1753
1741
  const vm = getAssociatedVM(this);
1754
-
1755
1742
  if (set) {
1756
1743
  if (lwcRuntimeFlags.ENABLE_REACTIVE_SETTER) {
1757
1744
  let ro = vm.oar[key];
1758
-
1759
1745
  if (isUndefined$1(ro)) {
1760
1746
  ro = vm.oar[key] = createAccessorReactiveObserver(vm, set);
1761
- } // every time we invoke this setter from outside (through this wrapper setter)
1747
+ }
1748
+ // every time we invoke this setter from outside (through this wrapper setter)
1762
1749
  // we should reset the value and then debounce just in case there is a pending
1763
1750
  // invocation the next tick that is not longer relevant since the value is changing
1764
1751
  // from outside.
1765
-
1766
-
1767
1752
  ro.reset(newValue);
1768
1753
  ro.observe(() => {
1769
1754
  set.call(this, newValue);
@@ -1773,7 +1758,6 @@ var LWC = (function (exports) {
1773
1758
  }
1774
1759
  }
1775
1760
  },
1776
-
1777
1761
  enumerable,
1778
1762
  configurable
1779
1763
  };
@@ -2361,11 +2345,9 @@ var LWC = (function (exports) {
2361
2345
  * SPDX-License-Identifier: MIT
2362
2346
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2363
2347
  */
2364
-
2365
2348
  function makeHostToken(token) {
2366
2349
  return `${token}-host`;
2367
2350
  }
2368
-
2369
2351
  function createInlineStyleVNode(content) {
2370
2352
  return api.h('style', {
2371
2353
  key: 'style',
@@ -2374,7 +2356,6 @@ var LWC = (function (exports) {
2374
2356
  }
2375
2357
  }, [api.t(content)]);
2376
2358
  }
2377
-
2378
2359
  function updateStylesheetToken(vm, template) {
2379
2360
  const {
2380
2361
  elm,
@@ -2391,104 +2372,73 @@ var LWC = (function (exports) {
2391
2372
  stylesheets: newStylesheets,
2392
2373
  stylesheetToken: newStylesheetToken
2393
2374
  } = template;
2394
- const isSyntheticShadow = renderMode === 1
2395
- /* RenderMode.Shadow */
2396
- && shadowMode === 1
2397
- /* ShadowMode.Synthetic */
2398
- ;
2375
+ const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
2399
2376
  const {
2400
2377
  hasScopedStyles
2401
2378
  } = context;
2402
2379
  let newToken;
2403
2380
  let newHasTokenInClass;
2404
- let newHasTokenInAttribute; // Reset the styling token applied to the host element.
2405
-
2381
+ let newHasTokenInAttribute;
2382
+ // Reset the styling token applied to the host element.
2406
2383
  const {
2407
2384
  stylesheetToken: oldToken,
2408
2385
  hasTokenInClass: oldHasTokenInClass,
2409
2386
  hasTokenInAttribute: oldHasTokenInAttribute
2410
2387
  } = context;
2411
-
2412
2388
  if (!isUndefined$1(oldToken)) {
2413
2389
  if (oldHasTokenInClass) {
2414
2390
  getClassList(elm).remove(makeHostToken(oldToken));
2415
2391
  }
2416
-
2417
2392
  if (oldHasTokenInAttribute) {
2418
2393
  removeAttribute(elm, makeHostToken(oldToken));
2419
2394
  }
2420
- } // Apply the new template styling token to the host element, if the new template has any
2395
+ }
2396
+ // Apply the new template styling token to the host element, if the new template has any
2421
2397
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
2422
-
2423
-
2424
2398
  if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
2425
2399
  newToken = newStylesheetToken;
2426
- } // Set the new styling token on the host element
2427
-
2428
-
2400
+ }
2401
+ // Set the new styling token on the host element
2429
2402
  if (!isUndefined$1(newToken)) {
2430
2403
  if (hasScopedStyles) {
2431
2404
  getClassList(elm).add(makeHostToken(newToken));
2432
2405
  newHasTokenInClass = true;
2433
2406
  }
2434
-
2435
2407
  if (isSyntheticShadow) {
2436
2408
  setAttribute(elm, makeHostToken(newToken), '');
2437
2409
  newHasTokenInAttribute = true;
2438
2410
  }
2439
- } // Update the styling tokens present on the context object.
2440
-
2441
-
2411
+ }
2412
+ // Update the styling tokens present on the context object.
2442
2413
  context.stylesheetToken = newToken;
2443
2414
  context.hasTokenInClass = newHasTokenInClass;
2444
2415
  context.hasTokenInAttribute = newHasTokenInAttribute;
2445
2416
  }
2446
-
2447
2417
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
2448
2418
  const content = [];
2449
2419
  let root;
2450
-
2451
2420
  for (let i = 0; i < stylesheets.length; i++) {
2452
2421
  let stylesheet = stylesheets[i];
2453
-
2454
2422
  if (isArray$1(stylesheet)) {
2455
2423
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
2456
2424
  } else {
2457
-
2458
2425
  const isScopedCss = stylesheet[KEY__SCOPED_CSS];
2459
-
2460
2426
  if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS) {
2461
- if (!isScopedCss && vm.renderMode === 0
2462
- /* RenderMode.Light */
2463
- ) {
2427
+ if (!isScopedCss && vm.renderMode === 0 /* RenderMode.Light */) {
2464
2428
  logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
2465
2429
  continue;
2466
2430
  }
2467
- } // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
2468
-
2469
-
2470
- const scopeToken = isScopedCss || vm.shadowMode === 1
2471
- /* ShadowMode.Synthetic */
2472
- && vm.renderMode === 1
2473
- /* RenderMode.Shadow */
2474
- ? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
2431
+ }
2432
+ // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
2433
+ const scopeToken = isScopedCss || vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */ ? stylesheetToken : undefined;
2434
+ // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
2475
2435
  // native shadow DOM. Synthetic shadow DOM never uses `:host`.
2476
-
2477
- const useActualHostSelector = vm.renderMode === 0
2478
- /* RenderMode.Light */
2479
- ? !isScopedCss : vm.shadowMode === 0
2480
- /* ShadowMode.Native */
2481
- ; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
2436
+ const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */ ? !isScopedCss : vm.shadowMode === 0 /* ShadowMode.Native */;
2437
+ // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
2482
2438
  // we use an attribute selector on the host to simulate :dir().
2483
-
2484
2439
  let useNativeDirPseudoclass;
2485
-
2486
- if (vm.renderMode === 1
2487
- /* RenderMode.Shadow */
2488
- ) {
2489
- useNativeDirPseudoclass = vm.shadowMode === 0
2490
- /* ShadowMode.Native */
2491
- ;
2440
+ if (vm.renderMode === 1 /* RenderMode.Shadow */) {
2441
+ useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
2492
2442
  } else {
2493
2443
  // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
2494
2444
  // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
@@ -2496,48 +2446,36 @@ var LWC = (function (exports) {
2496
2446
  // Only calculate the root once as necessary
2497
2447
  root = getNearestShadowComponent(vm);
2498
2448
  }
2499
-
2500
- useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
2501
- /* ShadowMode.Native */
2502
- ;
2449
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
2503
2450
  }
2504
2451
 
2505
2452
  ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
2506
2453
  }
2507
2454
  }
2508
-
2509
2455
  return content;
2510
2456
  }
2511
-
2512
2457
  function getStylesheetsContent(vm, template) {
2513
2458
  const {
2514
2459
  stylesheets,
2515
2460
  stylesheetToken
2516
2461
  } = template;
2517
2462
  let content = [];
2518
-
2519
2463
  if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
2520
2464
  content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
2521
2465
  }
2522
-
2523
2466
  return content;
2524
- } // It might be worth caching this to avoid doing the lookup repeatedly, but
2467
+ }
2468
+ // It might be worth caching this to avoid doing the lookup repeatedly, but
2525
2469
  // perf testing has not shown it to be a huge improvement yet:
2526
2470
  // https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
2527
-
2528
2471
  function getNearestShadowComponent(vm) {
2529
2472
  let owner = vm;
2530
-
2531
2473
  while (!isNull(owner)) {
2532
- if (owner.renderMode === 1
2533
- /* RenderMode.Shadow */
2534
- ) {
2474
+ if (owner.renderMode === 1 /* RenderMode.Shadow */) {
2535
2475
  return owner;
2536
2476
  }
2537
-
2538
2477
  owner = owner.owner;
2539
2478
  }
2540
-
2541
2479
  return owner;
2542
2480
  }
2543
2481
  /**
@@ -2545,8 +2483,6 @@ var LWC = (function (exports) {
2545
2483
  * this returns the unique token for that scoped stylesheet. Otherwise
2546
2484
  * it returns null.
2547
2485
  */
2548
-
2549
-
2550
2486
  function getScopeTokenClass(owner) {
2551
2487
  const {
2552
2488
  cmpTemplate,
@@ -2560,7 +2496,6 @@ var LWC = (function (exports) {
2560
2496
  *
2561
2497
  * A host style token is applied to the component if scoped styles are used.
2562
2498
  */
2563
-
2564
2499
  function getStylesheetTokenHost(vnode) {
2565
2500
  const {
2566
2501
  template
@@ -2570,21 +2505,15 @@ var LWC = (function (exports) {
2570
2505
  } = template;
2571
2506
  return !isUndefined$1(stylesheetToken) && computeHasScopedStyles(template) ? makeHostToken(stylesheetToken) : null;
2572
2507
  }
2573
-
2574
2508
  function getNearestNativeShadowComponent(vm) {
2575
2509
  const owner = getNearestShadowComponent(vm);
2576
-
2577
- if (!isNull(owner) && owner.shadowMode === 1
2578
- /* ShadowMode.Synthetic */
2579
- ) {
2510
+ if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
2580
2511
  // Synthetic-within-native is impossible. So if the nearest shadow component is
2581
2512
  // synthetic, we know we won't find a native component if we go any further.
2582
2513
  return null;
2583
2514
  }
2584
-
2585
2515
  return owner;
2586
2516
  }
2587
-
2588
2517
  function createStylesheet(vm, stylesheets) {
2589
2518
  const {
2590
2519
  renderMode,
@@ -2593,12 +2522,7 @@ var LWC = (function (exports) {
2593
2522
  insertStylesheet
2594
2523
  }
2595
2524
  } = vm;
2596
-
2597
- if (renderMode === 1
2598
- /* RenderMode.Shadow */
2599
- && shadowMode === 1
2600
- /* ShadowMode.Synthetic */
2601
- ) {
2525
+ if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
2602
2526
  for (let i = 0; i < stylesheets.length; i++) {
2603
2527
  insertStylesheet(stylesheets[i]);
2604
2528
  }
@@ -2610,15 +2534,13 @@ var LWC = (function (exports) {
2610
2534
  return ArrayMap.call(stylesheets, createInlineStyleVNode);
2611
2535
  } else {
2612
2536
  // native shadow or light DOM, DOM renderer
2613
- const root = getNearestNativeShadowComponent(vm); // null root means a global style
2614
-
2537
+ const root = getNearestNativeShadowComponent(vm);
2538
+ // null root means a global style
2615
2539
  const target = isNull(root) ? undefined : root.shadowRoot;
2616
-
2617
2540
  for (let i = 0; i < stylesheets.length; i++) {
2618
2541
  insertStylesheet(stylesheets[i], target);
2619
2542
  }
2620
2543
  }
2621
-
2622
2544
  return null;
2623
2545
  }
2624
2546
 
@@ -2892,110 +2814,68 @@ var LWC = (function (exports) {
2892
2814
  updateStaticChildren(c1, c2, parent, renderer);
2893
2815
  }
2894
2816
  }
2895
-
2896
2817
  function patch(n1, n2, parent, renderer) {
2897
2818
  var _a, _b;
2898
-
2899
2819
  if (n1 === n2) {
2900
2820
  return;
2901
2821
  }
2902
-
2903
2822
  switch (n2.type) {
2904
- case 0
2905
- /* VNodeType.Text */
2906
- :
2823
+ case 0 /* VNodeType.Text */:
2907
2824
  // VText has no special capability, fallback to the owner's renderer
2908
2825
  patchText(n1, n2, renderer);
2909
2826
  break;
2910
-
2911
- case 1
2912
- /* VNodeType.Comment */
2913
- :
2827
+ case 1 /* VNodeType.Comment */:
2914
2828
  // VComment has no special capability, fallback to the owner's renderer
2915
2829
  patchComment(n1, n2, renderer);
2916
2830
  break;
2917
-
2918
- case 4
2919
- /* VNodeType.Static */
2920
- :
2831
+ case 4 /* VNodeType.Static */:
2921
2832
  n2.elm = n1.elm;
2922
2833
  break;
2923
-
2924
- case 5
2925
- /* VNodeType.Fragment */
2926
- :
2834
+ case 5 /* VNodeType.Fragment */:
2927
2835
  patchFragment(n1, n2, parent, renderer);
2928
2836
  break;
2929
-
2930
- case 2
2931
- /* VNodeType.Element */
2932
- :
2837
+ case 2 /* VNodeType.Element */:
2933
2838
  patchElement(n1, n2, (_a = n2.data.renderer) !== null && _a !== void 0 ? _a : renderer);
2934
2839
  break;
2935
-
2936
- case 3
2937
- /* VNodeType.CustomElement */
2938
- :
2840
+ case 3 /* VNodeType.CustomElement */:
2939
2841
  patchCustomElement(n1, n2, parent, (_b = n2.data.renderer) !== null && _b !== void 0 ? _b : renderer);
2940
2842
  break;
2941
2843
  }
2942
2844
  }
2943
-
2944
2845
  function mount(node, parent, renderer, anchor) {
2945
2846
  var _a, _b;
2946
-
2947
2847
  switch (node.type) {
2948
- case 0
2949
- /* VNodeType.Text */
2950
- :
2848
+ case 0 /* VNodeType.Text */:
2951
2849
  // VText has no special capability, fallback to the owner's renderer
2952
2850
  mountText(node, parent, anchor, renderer);
2953
2851
  break;
2954
-
2955
- case 1
2956
- /* VNodeType.Comment */
2957
- :
2852
+ case 1 /* VNodeType.Comment */:
2958
2853
  // VComment has no special capability, fallback to the owner's renderer
2959
2854
  mountComment(node, parent, anchor, renderer);
2960
2855
  break;
2961
-
2962
- case 4
2963
- /* VNodeType.Static */
2964
- :
2856
+ case 4 /* VNodeType.Static */:
2965
2857
  // VStatic cannot have a custom renderer associated to them, using owner's renderer
2966
2858
  mountStatic(node, parent, anchor, renderer);
2967
2859
  break;
2968
-
2969
- case 5
2970
- /* VNodeType.Fragment */
2971
- :
2860
+ case 5 /* VNodeType.Fragment */:
2972
2861
  mountFragment(node, parent, anchor, renderer);
2973
2862
  break;
2974
-
2975
- case 2
2976
- /* VNodeType.Element */
2977
- :
2863
+ case 2 /* VNodeType.Element */:
2978
2864
  // If the vnode data has a renderer override use it, else fallback to owner's renderer
2979
2865
  mountElement(node, parent, anchor, (_a = node.data.renderer) !== null && _a !== void 0 ? _a : renderer);
2980
2866
  break;
2981
-
2982
- case 3
2983
- /* VNodeType.CustomElement */
2984
- :
2867
+ case 3 /* VNodeType.CustomElement */:
2985
2868
  // If the vnode data has a renderer override use it, else fallback to owner's renderer
2986
2869
  mountCustomElement(node, parent, anchor, (_b = node.data.renderer) !== null && _b !== void 0 ? _b : renderer);
2987
2870
  break;
2988
2871
  }
2989
2872
  }
2990
-
2991
2873
  function patchText(n1, n2, renderer) {
2992
2874
  n2.elm = n1.elm;
2993
-
2994
2875
  if (n2.text !== n1.text) {
2995
2876
  updateTextContent(n2, renderer);
2996
2877
  }
2997
2878
  }
2998
-
2999
2879
  function mountText(vnode, parent, anchor, renderer) {
3000
2880
  const {
3001
2881
  owner
@@ -3007,16 +2887,14 @@ var LWC = (function (exports) {
3007
2887
  linkNodeToShadow(textNode, owner, renderer);
3008
2888
  insertNode(textNode, parent, anchor, renderer);
3009
2889
  }
3010
-
3011
2890
  function patchComment(n1, n2, renderer) {
3012
- n2.elm = n1.elm; // FIXME: Comment nodes should be static, we shouldn't need to diff them together. However
2891
+ n2.elm = n1.elm;
2892
+ // FIXME: Comment nodes should be static, we shouldn't need to diff them together. However
3013
2893
  // it is the case today.
3014
-
3015
2894
  if (n2.text !== n1.text) {
3016
2895
  updateTextContent(n2, renderer);
3017
2896
  }
3018
2897
  }
3019
-
3020
2898
  function mountComment(vnode, parent, anchor, renderer) {
3021
2899
  const {
3022
2900
  owner
@@ -3028,32 +2906,27 @@ var LWC = (function (exports) {
3028
2906
  linkNodeToShadow(commentNode, owner, renderer);
3029
2907
  insertNode(commentNode, parent, anchor, renderer);
3030
2908
  }
3031
-
3032
2909
  function mountFragment(vnode, parent, anchor, renderer) {
3033
2910
  const {
3034
2911
  children
3035
2912
  } = vnode;
3036
- mountVNodes(children, parent, renderer, anchor); // children of a fragment will always have at least the two delimiters.
3037
-
2913
+ mountVNodes(children, parent, renderer, anchor);
2914
+ // children of a fragment will always have at least the two delimiters.
3038
2915
  vnode.elm = children[children.length - 1].elm;
3039
2916
  }
3040
-
3041
2917
  function patchFragment(n1, n2, parent, renderer) {
3042
2918
  const {
3043
2919
  children,
3044
2920
  stable
3045
2921
  } = n2;
3046
-
3047
2922
  if (stable) {
3048
2923
  updateStaticChildren(n1.children, children, parent, renderer);
3049
2924
  } else {
3050
2925
  updateDynamicChildren(n1.children, children, parent, renderer);
3051
- } // Note: not reusing n1.elm, because during patching, it may be patched with another text node.
3052
-
3053
-
2926
+ }
2927
+ // Note: not reusing n1.elm, because during patching, it may be patched with another text node.
3054
2928
  n2.elm = children[children.length - 1].elm;
3055
2929
  }
3056
-
3057
2930
  function mountElement(vnode, parent, anchor, renderer) {
3058
2931
  const {
3059
2932
  sel,
@@ -3074,13 +2947,11 @@ var LWC = (function (exports) {
3074
2947
  insertNode(elm, parent, anchor, renderer);
3075
2948
  mountVNodes(vnode.children, elm, renderer, null);
3076
2949
  }
3077
-
3078
2950
  function patchElement(n1, n2, renderer) {
3079
2951
  const elm = n2.elm = n1.elm;
3080
2952
  patchElementPropsAndAttrs$1(n1, n2, renderer);
3081
2953
  patchChildren(n1.children, n2.children, elm, renderer);
3082
2954
  }
3083
-
3084
2955
  function mountStatic(vnode, parent, anchor, renderer) {
3085
2956
  const {
3086
2957
  owner
@@ -3091,25 +2962,18 @@ var LWC = (function (exports) {
3091
2962
  } = renderer;
3092
2963
  const elm = vnode.elm = cloneNode(vnode.fragment, true);
3093
2964
  linkNodeToShadow(elm, owner, renderer);
3094
-
2965
+ // Marks this node as Static to propagate the shadow resolver. must happen after elm is assigned to the proper shadow
3095
2966
  const {
3096
2967
  renderMode,
3097
2968
  shadowMode
3098
2969
  } = owner;
3099
-
3100
2970
  if (isSyntheticShadowDefined) {
3101
- if (shadowMode === 1
3102
- /* ShadowMode.Synthetic */
3103
- || renderMode === 0
3104
- /* RenderMode.Light */
3105
- ) {
2971
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3106
2972
  elm[KEY__SHADOW_STATIC] = true;
3107
2973
  }
3108
2974
  }
3109
-
3110
2975
  insertNode(elm, parent, anchor, renderer);
3111
2976
  }
3112
-
3113
2977
  function mountCustomElement(vnode, parent, anchor, renderer) {
3114
2978
  const {
3115
2979
  sel,
@@ -3124,60 +2988,48 @@ var LWC = (function (exports) {
3124
2988
  * mechanism that only passes that argument if the constructor is known to be
3125
2989
  * an upgradable custom element.
3126
2990
  */
3127
-
3128
2991
  let vm;
3129
-
3130
2992
  const upgradeCallback = elm => {
3131
2993
  // the custom element from the registry is expecting an upgrade callback
3132
2994
  vm = createViewModelHook(elm, vnode, renderer);
3133
2995
  };
3134
-
3135
2996
  const connectedCallback = elm => {
3136
2997
  if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
3137
2998
  connectRootElement(elm);
3138
2999
  }
3139
3000
  };
3140
-
3141
3001
  const disconnectedCallback = elm => {
3142
3002
  if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
3143
3003
  disconnectRootElement(elm);
3144
3004
  }
3145
- }; // Should never get a tag with upper case letter at this point; the compiler
3005
+ };
3006
+ // Should never get a tag with upper case letter at this point; the compiler
3146
3007
  // should produce only tags with lowercase letters. However, the Java
3147
3008
  // compiler may generate tagnames with uppercase letters so - for backwards
3148
3009
  // compatibility, we lower case the tagname here.
3149
-
3150
-
3151
3010
  const normalizedTagname = sel.toLowerCase();
3152
3011
  const elm = createCustomElement(normalizedTagname, upgradeCallback, connectedCallback, disconnectedCallback);
3153
3012
  vnode.elm = elm;
3154
3013
  vnode.vm = vm;
3155
3014
  linkNodeToShadow(elm, owner, renderer);
3156
3015
  applyStyleScoping(elm, owner, renderer);
3157
-
3158
3016
  if (vm) {
3159
3017
  allocateChildren(vnode, vm);
3160
3018
  }
3161
-
3162
3019
  patchElementPropsAndAttrs$1(null, vnode, renderer);
3163
3020
  insertNode(elm, parent, anchor, renderer);
3164
-
3165
3021
  if (vm) {
3166
3022
  {
3167
3023
  if (!lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
3168
-
3169
3024
  runConnectedCallback(vm);
3170
3025
  }
3171
3026
  }
3172
3027
  }
3173
-
3174
3028
  mountVNodes(vnode.children, elm, renderer, null);
3175
-
3176
3029
  if (vm) {
3177
3030
  appendVM(vm);
3178
3031
  }
3179
3032
  }
3180
-
3181
3033
  function patchCustomElement(n1, n2, parent, renderer) {
3182
3034
  if (n1.ctor !== n2.ctor) {
3183
3035
  // If the constructor, unmount the current component and mount a new one using the new
@@ -3190,17 +3042,14 @@ var LWC = (function (exports) {
3190
3042
  const elm = n2.elm = n1.elm;
3191
3043
  const vm = n2.vm = n1.vm;
3192
3044
  patchElementPropsAndAttrs$1(n1, n2, renderer);
3193
-
3194
3045
  if (!isUndefined$1(vm)) {
3195
3046
  // in fallback mode, the allocation will always set children to
3196
3047
  // empty and delegate the real allocation to the slot elements
3197
3048
  allocateChildren(n2, vm);
3198
- } // in fallback mode, the children will be always empty, so, nothing
3049
+ }
3050
+ // in fallback mode, the children will be always empty, so, nothing
3199
3051
  // will happen, but in native, it does allocate the light dom
3200
-
3201
-
3202
3052
  patchChildren(n1.children, n2.children, elm, renderer);
3203
-
3204
3053
  if (!isUndefined$1(vm)) {
3205
3054
  // this will probably update the shadowRoot, but only if the vm is in a dirty state
3206
3055
  // this is important to preserve the top to bottom synchronous rendering phase.
@@ -3208,29 +3057,24 @@ var LWC = (function (exports) {
3208
3057
  }
3209
3058
  }
3210
3059
  }
3211
-
3212
3060
  function mountVNodes(vnodes, parent, renderer, anchor, start = 0, end = vnodes.length) {
3213
3061
  for (; start < end; ++start) {
3214
3062
  const vnode = vnodes[start];
3215
-
3216
3063
  if (isVNode(vnode)) {
3217
3064
  mount(vnode, parent, renderer, anchor);
3218
3065
  }
3219
3066
  }
3220
3067
  }
3221
-
3222
3068
  function unmount(vnode, parent, renderer, doRemove = false) {
3223
3069
  const {
3224
3070
  type,
3225
3071
  elm,
3226
3072
  sel
3227
- } = vnode; // When unmounting a VNode subtree not all the elements have to removed from the DOM. The
3073
+ } = vnode;
3074
+ // When unmounting a VNode subtree not all the elements have to removed from the DOM. The
3228
3075
  // subtree root, is the only element worth unmounting from the subtree.
3229
-
3230
3076
  if (doRemove) {
3231
- if (type === 5
3232
- /* VNodeType.Fragment */
3233
- ) {
3077
+ if (type === 5 /* VNodeType.Fragment */) {
3234
3078
  unmountVNodes(vnode.children, parent, renderer, doRemove);
3235
3079
  } else {
3236
3080
  // The vnode might or might not have a data.renderer associated to it
@@ -3238,51 +3082,39 @@ var LWC = (function (exports) {
3238
3082
  removeNode(elm, parent, renderer);
3239
3083
  }
3240
3084
  }
3241
-
3242
3085
  switch (type) {
3243
- case 2
3244
- /* VNodeType.Element */
3245
- :
3086
+ case 2 /* VNodeType.Element */:
3246
3087
  {
3247
3088
  // Slot content is removed to trigger slotchange event when removing slot.
3248
3089
  // Only required for synthetic shadow.
3249
- const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1
3250
- /* ShadowMode.Synthetic */
3251
- ;
3090
+ const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1 /* ShadowMode.Synthetic */;
3252
3091
  unmountVNodes(vnode.children, elm, renderer, shouldRemoveChildren);
3253
3092
  break;
3254
3093
  }
3255
-
3256
- case 3
3257
- /* VNodeType.CustomElement */
3258
- :
3094
+ case 3 /* VNodeType.CustomElement */:
3259
3095
  {
3260
3096
  const {
3261
3097
  vm
3262
- } = vnode; // No need to unmount the children here, `removeVM` will take care of removing the
3098
+ } = vnode;
3099
+ // No need to unmount the children here, `removeVM` will take care of removing the
3263
3100
  // children.
3264
-
3265
3101
  if (!isUndefined$1(vm)) {
3266
3102
  removeVM(vm);
3267
3103
  }
3268
3104
  }
3269
3105
  }
3270
3106
  }
3271
-
3272
3107
  function unmountVNodes(vnodes, parent, renderer, doRemove = false, start = 0, end = vnodes.length) {
3273
3108
  for (; start < end; ++start) {
3274
3109
  const ch = vnodes[start];
3275
-
3276
3110
  if (isVNode(ch)) {
3277
3111
  unmount(ch, parent, renderer, doRemove);
3278
3112
  }
3279
3113
  }
3280
3114
  }
3281
-
3282
3115
  function isVNode(vnode) {
3283
3116
  return vnode != null;
3284
3117
  }
3285
-
3286
3118
  function linkNodeToShadow(elm, owner, renderer) {
3287
3119
  const {
3288
3120
  renderRoot,
@@ -3291,19 +3123,14 @@ var LWC = (function (exports) {
3291
3123
  } = owner;
3292
3124
  const {
3293
3125
  isSyntheticShadowDefined
3294
- } = renderer; // TODO [#1164]: this should eventually be done by the polyfill directly
3295
-
3126
+ } = renderer;
3127
+ // TODO [#1164]: this should eventually be done by the polyfill directly
3296
3128
  if (isSyntheticShadowDefined) {
3297
- if (shadowMode === 1
3298
- /* ShadowMode.Synthetic */
3299
- || renderMode === 0
3300
- /* RenderMode.Light */
3301
- ) {
3129
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3302
3130
  elm[KEY__SHADOW_RESOLVER] = renderRoot[KEY__SHADOW_RESOLVER];
3303
3131
  }
3304
3132
  }
3305
3133
  }
3306
-
3307
3134
  function updateTextContent(vnode, renderer) {
3308
3135
  const {
3309
3136
  elm,
@@ -3312,79 +3139,58 @@ var LWC = (function (exports) {
3312
3139
  const {
3313
3140
  setText
3314
3141
  } = renderer;
3315
-
3316
3142
  setText(elm, text);
3317
3143
  }
3318
-
3319
3144
  function insertNode(node, parent, anchor, renderer) {
3320
-
3321
3145
  renderer.insert(node, parent, anchor);
3322
3146
  }
3323
-
3324
3147
  function removeNode(node, parent, renderer) {
3325
-
3326
3148
  renderer.remove(node, parent);
3327
3149
  }
3328
-
3329
3150
  function patchElementPropsAndAttrs$1(oldVnode, vnode, renderer) {
3330
3151
  if (isNull(oldVnode)) {
3331
3152
  applyEventListeners(vnode, renderer);
3332
3153
  applyStaticClassAttribute(vnode, renderer);
3333
3154
  applyStaticStyleAttribute(vnode, renderer);
3334
- } // Attrs need to be applied to element before props IE11 will wipe out value on radio inputs if
3155
+ }
3156
+ // Attrs need to be applied to element before props IE11 will wipe out value on radio inputs if
3335
3157
  // value is set before type=radio.
3336
-
3337
-
3338
3158
  patchClassAttribute(oldVnode, vnode, renderer);
3339
3159
  patchStyleAttribute(oldVnode, vnode, renderer);
3340
3160
  patchAttributes(oldVnode, vnode, renderer);
3341
3161
  patchProps(oldVnode, vnode, renderer);
3342
3162
  }
3343
-
3344
3163
  function applyStyleScoping(elm, owner, renderer) {
3345
3164
  // Set the class name for `*.scoped.css` style scoping.
3346
3165
  const scopeToken = getScopeTokenClass(owner);
3347
-
3348
3166
  if (!isNull(scopeToken)) {
3349
3167
  const {
3350
3168
  getClassList
3351
- } = renderer; // TODO [#2762]: this dot notation with add is probably problematic
3169
+ } = renderer;
3170
+ // TODO [#2762]: this dot notation with add is probably problematic
3352
3171
  // probably we should have a renderer api for just the add operation
3353
-
3354
3172
  getClassList(elm).add(scopeToken);
3355
- } // Set property element for synthetic shadow DOM style scoping.
3356
-
3357
-
3173
+ }
3174
+ // Set property element for synthetic shadow DOM style scoping.
3358
3175
  const {
3359
3176
  stylesheetToken: syntheticToken
3360
3177
  } = owner.context;
3361
-
3362
- if (owner.shadowMode === 1
3363
- /* ShadowMode.Synthetic */
3364
- && !isUndefined$1(syntheticToken)) {
3178
+ if (owner.shadowMode === 1 /* ShadowMode.Synthetic */ && !isUndefined$1(syntheticToken)) {
3365
3179
  elm.$shadowToken$ = syntheticToken;
3366
3180
  }
3367
3181
  }
3368
-
3369
3182
  function applyDomManual(elm, vnode) {
3370
3183
  var _a;
3371
-
3372
3184
  const {
3373
3185
  owner,
3374
3186
  data: {
3375
3187
  context
3376
3188
  }
3377
3189
  } = vnode;
3378
-
3379
- if (owner.shadowMode === 1
3380
- /* ShadowMode.Synthetic */
3381
- && ((_a = context === null || context === void 0 ? void 0 : context.lwc) === null || _a === void 0 ? void 0 : _a.dom) === "manual"
3382
- /* LwcDomMode.Manual */
3383
- ) {
3190
+ 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 */) {
3384
3191
  elm.$domManual$ = true;
3385
3192
  }
3386
3193
  }
3387
-
3388
3194
  function allocateChildren(vnode, vm) {
3389
3195
  // A component with slots will re-render because:
3390
3196
  // 1- There is a change of the internal state.
@@ -3402,30 +3208,23 @@ var LWC = (function (exports) {
3402
3208
  renderMode,
3403
3209
  shadowMode
3404
3210
  } = vm;
3405
-
3406
- if (shadowMode === 1
3407
- /* ShadowMode.Synthetic */
3408
- || renderMode === 0
3409
- /* RenderMode.Light */
3410
- ) {
3211
+ if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
3411
3212
  // slow path
3412
- allocateInSlot(vm, children, vnode.owner); // save the allocated children in case this vnode is reused.
3413
-
3414
- vnode.aChildren = children; // every child vnode is now allocated, and the host should receive none directly, it receives them via the shadow!
3415
-
3213
+ allocateInSlot(vm, children, vnode.owner);
3214
+ // save the allocated children in case this vnode is reused.
3215
+ vnode.aChildren = children;
3216
+ // every child vnode is now allocated, and the host should receive none directly, it receives them via the shadow!
3416
3217
  vnode.children = EmptyArray;
3417
3218
  }
3418
3219
  }
3419
-
3420
3220
  function createViewModelHook(elm, vnode, renderer) {
3421
- let vm = getAssociatedVMIfPresent(elm); // There is a possibility that a custom element is registered under tagName, in which case, the
3221
+ let vm = getAssociatedVMIfPresent(elm);
3222
+ // There is a possibility that a custom element is registered under tagName, in which case, the
3422
3223
  // initialization is already carry on, and there is nothing else to do here since this hook is
3423
3224
  // called right after invoking `document.createElement`.
3424
-
3425
3225
  if (!isUndefined$1(vm)) {
3426
3226
  return vm;
3427
3227
  }
3428
-
3429
3228
  const {
3430
3229
  sel,
3431
3230
  mode,
@@ -3437,44 +3236,34 @@ var LWC = (function (exports) {
3437
3236
  owner,
3438
3237
  tagName: sel
3439
3238
  });
3440
-
3441
3239
  return vm;
3442
3240
  }
3443
3241
  /**
3444
3242
  * Collects all slots into a SlotSet, traversing through VFragment Nodes
3445
3243
  */
3446
-
3447
-
3448
3244
  function collectSlots(vm, children, cmpSlotsMapping) {
3449
3245
  var _a, _b;
3450
-
3451
3246
  for (let i = 0, len = children.length; i < len; i += 1) {
3452
3247
  const vnode = children[i];
3453
-
3454
3248
  if (isNull(vnode)) {
3455
3249
  continue;
3456
- } // Dive further iff the content is wrapped in a VFragment
3457
-
3458
-
3250
+ }
3251
+ // Dive further iff the content is wrapped in a VFragment
3459
3252
  if (isVFragment(vnode)) {
3460
3253
  // Remove the text delimiter nodes to avoid overriding default slot content
3461
3254
  collectSlots(vm, vnode.children.slice(1, -1), cmpSlotsMapping);
3462
3255
  continue;
3463
3256
  }
3464
-
3465
3257
  let slotName = '';
3466
-
3467
3258
  if (isVBaseElement(vnode)) {
3468
3259
  slotName = (_b = (_a = vnode.data.attrs) === null || _a === void 0 ? void 0 : _a.slot) !== null && _b !== void 0 ? _b : '';
3469
3260
  } else if (isVScopedSlotFragment(vnode)) {
3470
3261
  slotName = vnode.slotName;
3471
3262
  }
3472
-
3473
3263
  const vnodes = cmpSlotsMapping[slotName] = cmpSlotsMapping[slotName] || [];
3474
3264
  ArrayPush$1.call(vnodes, vnode);
3475
3265
  }
3476
3266
  }
3477
-
3478
3267
  function allocateInSlot(vm, children, owner) {
3479
3268
  const {
3480
3269
  cmpSlots: {
@@ -3487,28 +3276,22 @@ var LWC = (function (exports) {
3487
3276
  owner,
3488
3277
  slotAssignments: cmpSlotsMapping
3489
3278
  };
3490
-
3491
3279
  if (isFalse(vm.isDirty)) {
3492
3280
  // We need to determine if the old allocation is really different from the new one
3493
3281
  // and mark the vm as dirty
3494
3282
  const oldKeys = keys(oldSlotsMapping);
3495
-
3496
3283
  if (oldKeys.length !== keys(cmpSlotsMapping).length) {
3497
3284
  markComponentAsDirty(vm);
3498
3285
  return;
3499
3286
  }
3500
-
3501
3287
  for (let i = 0, len = oldKeys.length; i < len; i += 1) {
3502
3288
  const key = oldKeys[i];
3503
-
3504
3289
  if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
3505
3290
  markComponentAsDirty(vm);
3506
3291
  return;
3507
3292
  }
3508
-
3509
3293
  const oldVNodes = oldSlotsMapping[key];
3510
3294
  const vnodes = cmpSlotsMapping[key];
3511
-
3512
3295
  for (let j = 0, a = cmpSlotsMapping[key].length; j < a; j += 1) {
3513
3296
  if (oldVNodes[j] !== vnodes[j]) {
3514
3297
  markComponentAsDirty(vm);
@@ -3517,40 +3300,33 @@ var LWC = (function (exports) {
3517
3300
  }
3518
3301
  }
3519
3302
  }
3520
- } // Using a WeakMap instead of a WeakSet because this one works in IE11 :(
3521
-
3522
-
3523
- const FromIteration = new WeakMap(); // dynamic children means it was generated by an iteration
3303
+ }
3304
+ // Using a WeakMap instead of a WeakSet because this one works in IE11 :(
3305
+ const FromIteration = new WeakMap();
3306
+ // dynamic children means it was generated by an iteration
3524
3307
  // in a template, and will require a more complex diffing algo.
3525
-
3526
3308
  function markAsDynamicChildren(children) {
3527
3309
  FromIteration.set(children, 1);
3528
3310
  }
3529
-
3530
3311
  function hasDynamicChildren(children) {
3531
3312
  return FromIteration.has(children);
3532
3313
  }
3533
-
3534
3314
  function createKeyToOldIdx(children, beginIdx, endIdx) {
3535
- const map = {}; // TODO [#1637]: simplify this by assuming that all vnodes has keys
3536
-
3315
+ const map = {};
3316
+ // TODO [#1637]: simplify this by assuming that all vnodes has keys
3537
3317
  for (let j = beginIdx; j <= endIdx; ++j) {
3538
3318
  const ch = children[j];
3539
-
3540
3319
  if (isVNode(ch)) {
3541
3320
  const {
3542
3321
  key
3543
3322
  } = ch;
3544
-
3545
3323
  if (key !== undefined) {
3546
3324
  map[key] = j;
3547
3325
  }
3548
3326
  }
3549
3327
  }
3550
-
3551
3328
  return map;
3552
3329
  }
3553
-
3554
3330
  function updateDynamicChildren(oldCh, newCh, parent, renderer) {
3555
3331
  let oldStartIdx = 0;
3556
3332
  let newStartIdx = 0;
@@ -3566,7 +3342,6 @@ var LWC = (function (exports) {
3566
3342
  let elmToMove;
3567
3343
  let before;
3568
3344
  let clonedOldCh = false;
3569
-
3570
3345
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
3571
3346
  if (!isVNode(oldStartVnode)) {
3572
3347
  oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left
@@ -3600,54 +3375,46 @@ var LWC = (function (exports) {
3600
3375
  if (oldKeyToIdx === undefined) {
3601
3376
  oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
3602
3377
  }
3603
-
3604
3378
  idxInOld = oldKeyToIdx[newStartVnode.key];
3605
-
3606
3379
  if (isUndefined$1(idxInOld)) {
3607
3380
  // New element
3608
3381
  mount(newStartVnode, parent, renderer, oldStartVnode.elm);
3609
3382
  newStartVnode = newCh[++newStartIdx];
3610
3383
  } else {
3611
3384
  elmToMove = oldCh[idxInOld];
3612
-
3613
3385
  if (isVNode(elmToMove)) {
3614
3386
  if (elmToMove.sel !== newStartVnode.sel) {
3615
3387
  // New element
3616
3388
  mount(newStartVnode, parent, renderer, oldStartVnode.elm);
3617
3389
  } else {
3618
- patch(elmToMove, newStartVnode, parent, renderer); // Delete the old child, but copy the array since it is read-only.
3390
+ patch(elmToMove, newStartVnode, parent, renderer);
3391
+ // Delete the old child, but copy the array since it is read-only.
3619
3392
  // The `oldCh` will be GC'ed after `updateDynamicChildren` is complete,
3620
3393
  // so we only care about the `oldCh` object inside this function.
3621
3394
  // To avoid cloning over and over again, we check `clonedOldCh`
3622
3395
  // and only clone once.
3623
-
3624
3396
  if (!clonedOldCh) {
3625
3397
  clonedOldCh = true;
3626
3398
  oldCh = [...oldCh];
3627
- } // We've already cloned at least once, so it's no longer read-only
3628
-
3629
-
3399
+ }
3400
+ // We've already cloned at least once, so it's no longer read-only
3630
3401
  oldCh[idxInOld] = undefined;
3631
3402
  insertNode(elmToMove.elm, parent, oldStartVnode.elm, renderer);
3632
3403
  }
3633
3404
  }
3634
-
3635
3405
  newStartVnode = newCh[++newStartIdx];
3636
3406
  }
3637
3407
  }
3638
3408
  }
3639
-
3640
3409
  if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {
3641
3410
  if (oldStartIdx > oldEndIdx) {
3642
3411
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
3643
3412
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
3644
3413
  let i = newEndIdx;
3645
3414
  let n;
3646
-
3647
3415
  do {
3648
3416
  n = newCh[++i];
3649
3417
  } while (!isVNode(n) && i < newChEnd);
3650
-
3651
3418
  before = isVNode(n) ? n.elm : null;
3652
3419
  mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
3653
3420
  } else {
@@ -3655,32 +3422,26 @@ var LWC = (function (exports) {
3655
3422
  }
3656
3423
  }
3657
3424
  }
3658
-
3659
3425
  function updateStaticChildren(c1, c2, parent, renderer) {
3660
3426
  const c1Length = c1.length;
3661
3427
  const c2Length = c2.length;
3662
-
3663
3428
  if (c1Length === 0) {
3664
3429
  // the old list is empty, we can directly insert anything new
3665
3430
  mountVNodes(c2, parent, renderer, null);
3666
3431
  return;
3667
3432
  }
3668
-
3669
3433
  if (c2Length === 0) {
3670
3434
  // the old list is nonempty and the new list is empty so we can directly remove all old nodes
3671
3435
  // this is the case in which the dynamic children of an if-directive should be removed
3672
3436
  unmountVNodes(c1, parent, renderer, true);
3673
3437
  return;
3674
- } // if the old list is not empty, the new list MUST have the same
3438
+ }
3439
+ // if the old list is not empty, the new list MUST have the same
3675
3440
  // amount of nodes, that's why we call this static children
3676
-
3677
-
3678
3441
  let anchor = null;
3679
-
3680
3442
  for (let i = c2Length - 1; i >= 0; i -= 1) {
3681
3443
  const n1 = c1[i];
3682
3444
  const n2 = c2[i];
3683
-
3684
3445
  if (n2 !== n1) {
3685
3446
  if (isVNode(n1)) {
3686
3447
  if (isVNode(n2)) {
@@ -4422,42 +4183,30 @@ var LWC = (function (exports) {
4422
4183
  */
4423
4184
  let idx = 0;
4424
4185
  /** The internal slot used to associate different objects the engine manipulates with the VM */
4425
-
4426
4186
  const ViewModelReflection = new WeakMap();
4427
-
4428
4187
  function callHook(cmp, fn, args = []) {
4429
4188
  return fn.apply(cmp, args);
4430
4189
  }
4431
-
4432
4190
  function setHook(cmp, prop, newValue) {
4433
4191
  cmp[prop] = newValue;
4434
4192
  }
4435
-
4436
4193
  function getHook(cmp, prop) {
4437
4194
  return cmp[prop];
4438
4195
  }
4439
-
4440
4196
  function rerenderVM(vm) {
4441
4197
  rehydrate(vm);
4442
4198
  }
4443
4199
  function connectRootElement(elm) {
4444
4200
  const vm = getAssociatedVM(elm);
4445
- logGlobalOperationStart(7
4446
- /* OperationId.GlobalHydrate */
4447
- , vm); // Usually means moving the element from one place to another, which is observable via
4201
+ logGlobalOperationStart(7 /* OperationId.GlobalHydrate */, vm);
4202
+ // Usually means moving the element from one place to another, which is observable via
4448
4203
  // life-cycle hooks.
4449
-
4450
- if (vm.state === 1
4451
- /* VMState.connected */
4452
- ) {
4204
+ if (vm.state === 1 /* VMState.connected */) {
4453
4205
  disconnectRootElement(elm);
4454
4206
  }
4455
-
4456
4207
  runConnectedCallback(vm);
4457
4208
  rehydrate(vm);
4458
- logGlobalOperationEnd(7
4459
- /* OperationId.GlobalHydrate */
4460
- , vm);
4209
+ logGlobalOperationEnd(7 /* OperationId.GlobalHydrate */, vm);
4461
4210
  }
4462
4211
  function disconnectRootElement(elm) {
4463
4212
  const vm = getAssociatedVM(elm);
@@ -4465,54 +4214,42 @@ var LWC = (function (exports) {
4465
4214
  }
4466
4215
  function appendVM(vm) {
4467
4216
  rehydrate(vm);
4468
- } // just in case the component comes back, with this we guarantee re-rendering it
4217
+ }
4218
+ // just in case the component comes back, with this we guarantee re-rendering it
4469
4219
  // while preventing any attempt to rehydration until after reinsertion.
4470
-
4471
4220
  function resetComponentStateWhenRemoved(vm) {
4472
4221
  const {
4473
4222
  state
4474
4223
  } = vm;
4475
-
4476
- if (state !== 2
4477
- /* VMState.disconnected */
4478
- ) {
4224
+ if (state !== 2 /* VMState.disconnected */) {
4479
4225
  const {
4480
4226
  oar,
4481
4227
  tro
4482
- } = vm; // Making sure that any observing record will not trigger the rehydrated on this vm
4483
-
4484
- tro.reset(); // Making sure that any observing accessor record will not trigger the setter to be reinvoked
4485
-
4228
+ } = vm;
4229
+ // Making sure that any observing record will not trigger the rehydrated on this vm
4230
+ tro.reset();
4231
+ // Making sure that any observing accessor record will not trigger the setter to be reinvoked
4486
4232
  for (const key in oar) {
4487
4233
  oar[key].reset();
4488
4234
  }
4489
-
4490
- runDisconnectedCallback(vm); // Spec: https://dom.spec.whatwg.org/#concept-node-remove (step 14-15)
4491
-
4235
+ runDisconnectedCallback(vm);
4236
+ // Spec: https://dom.spec.whatwg.org/#concept-node-remove (step 14-15)
4492
4237
  runChildNodesDisconnectedCallback(vm);
4493
4238
  runLightChildNodesDisconnectedCallback(vm);
4494
4239
  }
4495
- } // this method is triggered by the diffing algo only when a vnode from the
4240
+ }
4241
+ // this method is triggered by the diffing algo only when a vnode from the
4496
4242
  // old vnode.children is removed from the DOM.
4497
-
4498
-
4499
4243
  function removeVM(vm) {
4500
-
4501
4244
  resetComponentStateWhenRemoved(vm);
4502
4245
  }
4503
-
4504
4246
  function getNearestShadowAncestor(vm) {
4505
4247
  let ancestor = vm.owner;
4506
-
4507
- while (!isNull(ancestor) && ancestor.renderMode === 0
4508
- /* RenderMode.Light */
4509
- ) {
4248
+ while (!isNull(ancestor) && ancestor.renderMode === 0 /* RenderMode.Light */) {
4510
4249
  ancestor = ancestor.owner;
4511
4250
  }
4512
-
4513
4251
  return ancestor;
4514
4252
  }
4515
-
4516
4253
  function createVM(elm, ctor, renderer, options) {
4517
4254
  const {
4518
4255
  mode,
@@ -4525,9 +4262,7 @@ var LWC = (function (exports) {
4525
4262
  elm,
4526
4263
  def,
4527
4264
  idx: idx++,
4528
- state: 0
4529
- /* VMState.created */
4530
- ,
4265
+ state: 0 /* VMState.created */,
4531
4266
  isScheduled: false,
4532
4267
  isDirty: true,
4533
4268
  tagName,
@@ -4571,17 +4306,14 @@ var LWC = (function (exports) {
4571
4306
  };
4572
4307
  vm.shadowMode = computeShadowMode(vm, renderer);
4573
4308
  vm.tro = getTemplateReactiveObserver(vm);
4574
-
4575
-
4576
- invokeComponentConstructor(vm, def.ctor); // Initializing the wire decorator per instance only when really needed
4577
-
4309
+ // Create component instance associated to the vm and the element.
4310
+ invokeComponentConstructor(vm, def.ctor);
4311
+ // Initializing the wire decorator per instance only when really needed
4578
4312
  if (hasWireAdapters(vm)) {
4579
4313
  installWireAdapters(vm);
4580
4314
  }
4581
-
4582
4315
  return vm;
4583
4316
  }
4584
-
4585
4317
  function computeShadowMode(vm, renderer) {
4586
4318
  const {
4587
4319
  def
@@ -4591,120 +4323,85 @@ var LWC = (function (exports) {
4591
4323
  isNativeShadowDefined
4592
4324
  } = renderer;
4593
4325
  let shadowMode;
4594
-
4595
4326
  if (isSyntheticShadowDefined) {
4596
- if (def.renderMode === 0
4597
- /* RenderMode.Light */
4598
- ) {
4327
+ if (def.renderMode === 0 /* RenderMode.Light */) {
4599
4328
  // ShadowMode.Native implies "not synthetic shadow" which is consistent with how
4600
4329
  // everything defaults to native when the synthetic shadow polyfill is unavailable.
4601
- shadowMode = 0
4602
- /* ShadowMode.Native */
4603
- ;
4330
+ shadowMode = 0 /* ShadowMode.Native */;
4604
4331
  } else if (isNativeShadowDefined) {
4605
4332
  // Not combined with above condition because @lwc/features only supports identifiers in
4606
4333
  // the if-condition.
4607
4334
  if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE) {
4608
- if (def.shadowSupportMode === "any"
4609
- /* ShadowSupportMode.Any */
4610
- ) {
4611
- shadowMode = 0
4612
- /* ShadowMode.Native */
4613
- ;
4335
+ if (def.shadowSupportMode === "any" /* ShadowSupportMode.Any */) {
4336
+ shadowMode = 0 /* ShadowMode.Native */;
4614
4337
  } else {
4615
4338
  const shadowAncestor = getNearestShadowAncestor(vm);
4616
-
4617
- if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
4618
- /* ShadowMode.Native */
4619
- ) {
4339
+ if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0 /* ShadowMode.Native */) {
4620
4340
  // Transitive support for native Shadow DOM. A component in native mode
4621
4341
  // transitively opts all of its descendants into native.
4622
- shadowMode = 0
4623
- /* ShadowMode.Native */
4624
- ;
4342
+ shadowMode = 0 /* ShadowMode.Native */;
4625
4343
  } else {
4626
4344
  // Synthetic if neither this component nor any of its ancestors are configured
4627
4345
  // to be native.
4628
- shadowMode = 1
4629
- /* ShadowMode.Synthetic */
4630
- ;
4346
+ shadowMode = 1 /* ShadowMode.Synthetic */;
4631
4347
  }
4632
4348
  }
4633
4349
  } else {
4634
- shadowMode = 1
4635
- /* ShadowMode.Synthetic */
4636
- ;
4350
+ shadowMode = 1 /* ShadowMode.Synthetic */;
4637
4351
  }
4638
4352
  } else {
4639
4353
  // Synthetic if there is no native Shadow DOM support.
4640
- shadowMode = 1
4641
- /* ShadowMode.Synthetic */
4642
- ;
4354
+ shadowMode = 1 /* ShadowMode.Synthetic */;
4643
4355
  }
4644
4356
  } else {
4645
4357
  // Native if the synthetic shadow polyfill is unavailable.
4646
- shadowMode = 0
4647
- /* ShadowMode.Native */
4648
- ;
4358
+ shadowMode = 0 /* ShadowMode.Native */;
4649
4359
  }
4650
4360
 
4651
4361
  return shadowMode;
4652
4362
  }
4653
-
4654
4363
  function associateVM(obj, vm) {
4655
4364
  ViewModelReflection.set(obj, vm);
4656
4365
  }
4657
4366
  function getAssociatedVM(obj) {
4658
4367
  const vm = ViewModelReflection.get(obj);
4659
-
4660
4368
  return vm;
4661
4369
  }
4662
4370
  function getAssociatedVMIfPresent(obj) {
4663
4371
  const maybeVm = ViewModelReflection.get(obj);
4664
-
4665
4372
  return maybeVm;
4666
4373
  }
4667
-
4668
4374
  function rehydrate(vm) {
4669
4375
  if (isTrue(vm.isDirty)) {
4670
4376
  const children = renderComponent(vm);
4671
4377
  patchShadowRoot(vm, children);
4672
4378
  }
4673
4379
  }
4674
-
4675
4380
  function patchShadowRoot(vm, newCh) {
4676
4381
  const {
4677
4382
  renderRoot,
4678
4383
  children: oldCh,
4679
4384
  renderer
4680
- } = vm; // caching the new children collection
4681
-
4385
+ } = vm;
4386
+ // caching the new children collection
4682
4387
  vm.children = newCh;
4683
-
4684
4388
  if (newCh.length > 0 || oldCh.length > 0) {
4685
4389
  // patch function mutates vnodes by adding the element reference,
4686
4390
  // however, if patching fails it contains partial changes.
4687
4391
  if (oldCh !== newCh) {
4688
4392
  runWithBoundaryProtection(vm, vm, () => {
4689
4393
  // pre
4690
- logOperationStart(2
4691
- /* OperationId.Patch */
4692
- , vm);
4394
+ logOperationStart(2 /* OperationId.Patch */, vm);
4693
4395
  }, () => {
4694
4396
  // job
4695
4397
  patchChildren(oldCh, newCh, renderRoot, renderer);
4696
4398
  }, () => {
4697
4399
  // post
4698
- logOperationEnd(2
4699
- /* OperationId.Patch */
4700
- , vm);
4400
+ logOperationEnd(2 /* OperationId.Patch */, vm);
4701
4401
  });
4702
4402
  }
4703
4403
  }
4704
-
4705
- if (vm.state === 1
4706
- /* VMState.connected */
4707
- ) {
4404
+ if (vm.state === 1 /* VMState.connected */) {
4708
4405
  // If the element is connected, that means connectedCallback was already issued, and
4709
4406
  // any successive rendering should finish with the call to renderedCallback, otherwise
4710
4407
  // the connectedCallback will take care of calling it in the right order at the end of
@@ -4712,45 +4409,31 @@ var LWC = (function (exports) {
4712
4409
  runRenderedCallback(vm);
4713
4410
  }
4714
4411
  }
4715
-
4716
4412
  function runRenderedCallback(vm) {
4717
4413
  const {
4718
4414
  def: {
4719
4415
  renderedCallback
4720
4416
  }
4721
4417
  } = vm;
4722
-
4723
4418
  const {
4724
4419
  rendered
4725
4420
  } = Services;
4726
-
4727
4421
  if (rendered) {
4728
4422
  invokeServiceHook(vm, rendered);
4729
4423
  }
4730
-
4731
4424
  if (!isUndefined$1(renderedCallback)) {
4732
- logOperationStart(4
4733
- /* OperationId.RenderedCallback */
4734
- , vm);
4425
+ logOperationStart(4 /* OperationId.RenderedCallback */, vm);
4735
4426
  invokeComponentCallback(vm, renderedCallback);
4736
- logOperationEnd(4
4737
- /* OperationId.RenderedCallback */
4738
- , vm);
4427
+ logOperationEnd(4 /* OperationId.RenderedCallback */, vm);
4739
4428
  }
4740
4429
  }
4741
4430
  let rehydrateQueue = [];
4742
-
4743
4431
  function flushRehydrationQueue() {
4744
- logGlobalOperationStart(8
4745
- /* OperationId.GlobalRehydrate */
4746
- );
4747
-
4432
+ logGlobalOperationStart(8 /* OperationId.GlobalRehydrate */);
4748
4433
  const vms = rehydrateQueue.sort((a, b) => a.idx - b.idx);
4749
4434
  rehydrateQueue = []; // reset to a new queue
4750
-
4751
4435
  for (let i = 0, len = vms.length; i < len; i += 1) {
4752
4436
  const vm = vms[i];
4753
-
4754
4437
  try {
4755
4438
  rehydrate(vm);
4756
4439
  } catch (error) {
@@ -4759,73 +4442,51 @@ var LWC = (function (exports) {
4759
4442
  if (rehydrateQueue.length === 0) {
4760
4443
  addCallbackToNextTick(flushRehydrationQueue);
4761
4444
  }
4762
-
4763
4445
  ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, i + 1));
4764
- } // we need to end the measure before throwing.
4765
-
4766
-
4767
- logGlobalOperationEnd(8
4768
- /* OperationId.GlobalRehydrate */
4769
- ); // re-throwing the original error will break the current tick, but since the next tick is
4446
+ }
4447
+ // we need to end the measure before throwing.
4448
+ logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
4449
+ // re-throwing the original error will break the current tick, but since the next tick is
4770
4450
  // already scheduled, it should continue patching the rest.
4771
-
4772
4451
  throw error; // eslint-disable-line no-unsafe-finally
4773
4452
  }
4774
4453
  }
4775
4454
 
4776
- logGlobalOperationEnd(8
4777
- /* OperationId.GlobalRehydrate */
4778
- );
4455
+ logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
4779
4456
  }
4780
4457
 
4781
4458
  function runConnectedCallback(vm) {
4782
4459
  const {
4783
4460
  state
4784
4461
  } = vm;
4785
-
4786
- if (state === 1
4787
- /* VMState.connected */
4788
- ) {
4462
+ if (state === 1 /* VMState.connected */) {
4789
4463
  return; // nothing to do since it was already connected
4790
4464
  }
4791
4465
 
4792
- vm.state = 1
4793
- /* VMState.connected */
4794
- ; // reporting connection
4795
-
4466
+ vm.state = 1 /* VMState.connected */;
4467
+ // reporting connection
4796
4468
  const {
4797
4469
  connected
4798
4470
  } = Services;
4799
-
4800
4471
  if (connected) {
4801
4472
  invokeServiceHook(vm, connected);
4802
4473
  }
4803
-
4804
4474
  if (hasWireAdapters(vm)) {
4805
4475
  connectWireAdapters(vm);
4806
4476
  }
4807
-
4808
4477
  const {
4809
4478
  connectedCallback
4810
4479
  } = vm.def;
4811
-
4812
4480
  if (!isUndefined$1(connectedCallback)) {
4813
- logOperationStart(3
4814
- /* OperationId.ConnectedCallback */
4815
- , vm);
4481
+ logOperationStart(3 /* OperationId.ConnectedCallback */, vm);
4816
4482
  invokeComponentCallback(vm, connectedCallback);
4817
- logOperationEnd(3
4818
- /* OperationId.ConnectedCallback */
4819
- , vm);
4483
+ logOperationEnd(3 /* OperationId.ConnectedCallback */, vm);
4820
4484
  }
4821
4485
  }
4822
-
4823
4486
  function hasWireAdapters(vm) {
4824
4487
  return getOwnPropertyNames$1(vm.def.wire).length > 0;
4825
4488
  }
4826
-
4827
4489
  function runDisconnectedCallback(vm) {
4828
-
4829
4490
  if (isFalse(vm.isDirty)) {
4830
4491
  // this guarantees that if the component is reused/reinserted,
4831
4492
  // it will be re-rendered because we are disconnecting the reactivity
@@ -4833,67 +4494,54 @@ var LWC = (function (exports) {
4833
4494
  // of disconnected components.
4834
4495
  vm.isDirty = true;
4835
4496
  }
4836
-
4837
- vm.state = 2
4838
- /* VMState.disconnected */
4839
- ; // reporting disconnection
4840
-
4497
+ vm.state = 2 /* VMState.disconnected */;
4498
+ // reporting disconnection
4841
4499
  const {
4842
4500
  disconnected
4843
4501
  } = Services;
4844
-
4845
4502
  if (disconnected) {
4846
4503
  invokeServiceHook(vm, disconnected);
4847
4504
  }
4848
-
4849
4505
  if (hasWireAdapters(vm)) {
4850
4506
  disconnectWireAdapters(vm);
4851
4507
  }
4852
-
4853
4508
  const {
4854
4509
  disconnectedCallback
4855
4510
  } = vm.def;
4856
-
4857
4511
  if (!isUndefined$1(disconnectedCallback)) {
4858
- logOperationStart(5
4859
- /* OperationId.DisconnectedCallback */
4860
- , vm);
4512
+ logOperationStart(5 /* OperationId.DisconnectedCallback */, vm);
4861
4513
  invokeComponentCallback(vm, disconnectedCallback);
4862
- logOperationEnd(5
4863
- /* OperationId.DisconnectedCallback */
4864
- , vm);
4514
+ logOperationEnd(5 /* OperationId.DisconnectedCallback */, vm);
4865
4515
  }
4866
4516
  }
4867
-
4868
4517
  function runChildNodesDisconnectedCallback(vm) {
4869
4518
  const {
4870
4519
  velements: vCustomElementCollection
4871
- } = vm; // Reporting disconnection for every child in inverse order since they are
4520
+ } = vm;
4521
+ // Reporting disconnection for every child in inverse order since they are
4872
4522
  // inserted in reserved order.
4873
-
4874
4523
  for (let i = vCustomElementCollection.length - 1; i >= 0; i -= 1) {
4875
4524
  const {
4876
4525
  elm
4877
- } = vCustomElementCollection[i]; // There are two cases where the element could be undefined:
4526
+ } = vCustomElementCollection[i];
4527
+ // There are two cases where the element could be undefined:
4878
4528
  // * when there is an error during the construction phase, and an error
4879
4529
  // boundary picks it, there is a possibility that the VCustomElement
4880
4530
  // is not properly initialized, and therefore is should be ignored.
4881
4531
  // * when slotted custom element is not used by the element where it is
4882
4532
  // slotted into it, as a result, the custom element was never
4883
4533
  // initialized.
4884
-
4885
4534
  if (!isUndefined$1(elm)) {
4886
- const childVM = getAssociatedVMIfPresent(elm); // The VM associated with the element might be associated undefined
4535
+ const childVM = getAssociatedVMIfPresent(elm);
4536
+ // The VM associated with the element might be associated undefined
4887
4537
  // in the case where the VM failed in the middle of its creation,
4888
4538
  // eg: constructor throwing before invoking super().
4889
-
4890
4539
  if (!isUndefined$1(childVM)) {
4891
4540
  resetComponentStateWhenRemoved(childVM);
4892
4541
  }
4893
4542
  }
4894
4543
  }
4895
4544
  }
4896
-
4897
4545
  function runLightChildNodesDisconnectedCallback(vm) {
4898
4546
  const {
4899
4547
  aChildren: adoptedChildren
@@ -4907,23 +4555,15 @@ var LWC = (function (exports) {
4907
4555
  * custom element itself will trigger the removal of anything slotted or anything
4908
4556
  * defined on its shadow.
4909
4557
  */
4910
-
4911
-
4912
4558
  function recursivelyDisconnectChildren(vnodes) {
4913
4559
  for (let i = 0, len = vnodes.length; i < len; i += 1) {
4914
4560
  const vnode = vnodes[i];
4915
-
4916
4561
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
4917
4562
  switch (vnode.type) {
4918
- case 2
4919
- /* VNodeType.Element */
4920
- :
4563
+ case 2 /* VNodeType.Element */:
4921
4564
  recursivelyDisconnectChildren(vnode.children);
4922
4565
  break;
4923
-
4924
- case 3
4925
- /* VNodeType.CustomElement */
4926
- :
4566
+ case 3 /* VNodeType.CustomElement */:
4927
4567
  {
4928
4568
  const vm = getAssociatedVM(vnode.elm);
4929
4569
  resetComponentStateWhenRemoved(vm);
@@ -4932,12 +4572,11 @@ var LWC = (function (exports) {
4932
4572
  }
4933
4573
  }
4934
4574
  }
4935
- } // This is a super optimized mechanism to remove the content of the root node (shadow root
4575
+ }
4576
+ // This is a super optimized mechanism to remove the content of the root node (shadow root
4936
4577
  // for shadow DOM components and the root element itself for light DOM) without having to go
4937
4578
  // into snabbdom. Especially useful when the reset is a consequence of an error, in which case the
4938
4579
  // children VNodes might not be representing the current state of the DOM.
4939
-
4940
-
4941
4580
  function resetComponentRoot(vm) {
4942
4581
  const {
4943
4582
  children,
@@ -4946,15 +4585,12 @@ var LWC = (function (exports) {
4946
4585
  remove
4947
4586
  }
4948
4587
  } = vm;
4949
-
4950
4588
  for (let i = 0, len = children.length; i < len; i++) {
4951
4589
  const child = children[i];
4952
-
4953
4590
  if (!isNull(child) && !isUndefined$1(child.elm)) {
4954
4591
  remove(child.elm, renderRoot);
4955
4592
  }
4956
4593
  }
4957
-
4958
4594
  vm.children = EmptyArray;
4959
4595
  runChildNodesDisconnectedCallback(vm);
4960
4596
  vm.velements = EmptyArray;
@@ -4963,58 +4599,43 @@ var LWC = (function (exports) {
4963
4599
  if (isTrue(vm.isScheduled)) {
4964
4600
  return;
4965
4601
  }
4966
-
4967
4602
  vm.isScheduled = true;
4968
-
4969
4603
  if (rehydrateQueue.length === 0) {
4970
4604
  addCallbackToNextTick(flushRehydrationQueue);
4971
4605
  }
4972
-
4973
4606
  ArrayPush$1.call(rehydrateQueue, vm);
4974
4607
  }
4975
-
4976
4608
  function getErrorBoundaryVM(vm) {
4977
4609
  let currentVm = vm;
4978
-
4979
4610
  while (!isNull(currentVm)) {
4980
4611
  if (!isUndefined$1(currentVm.def.errorCallback)) {
4981
4612
  return currentVm;
4982
4613
  }
4983
-
4984
4614
  currentVm = currentVm.owner;
4985
4615
  }
4986
4616
  }
4987
-
4988
4617
  function runWithBoundaryProtection(vm, owner, pre, job, post) {
4989
4618
  let error;
4990
4619
  pre();
4991
-
4992
4620
  try {
4993
4621
  job();
4994
4622
  } catch (e) {
4995
4623
  error = Object(e);
4996
4624
  } finally {
4997
4625
  post();
4998
-
4999
4626
  if (!isUndefined$1(error)) {
5000
4627
  addErrorComponentStack(vm, error);
5001
4628
  const errorBoundaryVm = isNull(owner) ? undefined : getErrorBoundaryVM(owner);
5002
-
5003
4629
  if (isUndefined$1(errorBoundaryVm)) {
5004
4630
  throw error; // eslint-disable-line no-unsafe-finally
5005
4631
  }
5006
4632
 
5007
4633
  resetComponentRoot(vm); // remove offenders
5008
-
5009
- logOperationStart(6
5010
- /* OperationId.ErrorCallback */
5011
- , vm); // error boundaries must have an ErrorCallback
5012
-
4634
+ logOperationStart(6 /* OperationId.ErrorCallback */, vm);
4635
+ // error boundaries must have an ErrorCallback
5013
4636
  const errorCallback = errorBoundaryVm.def.errorCallback;
5014
4637
  invokeComponentCallback(errorBoundaryVm, errorCallback, [error, error.wcStack]);
5015
- logOperationEnd(6
5016
- /* OperationId.ErrorCallback */
5017
- , vm);
4638
+ logOperationEnd(6 /* OperationId.ErrorCallback */, vm);
5018
4639
  }
5019
4640
  }
5020
4641
  }
@@ -5027,6 +4648,7 @@ var LWC = (function (exports) {
5027
4648
  */
5028
4649
  const DeprecatedWiredElementHost = '$$DeprecatedWiredElementHostKey$$';
5029
4650
  const DeprecatedWiredParamsMeta = '$$DeprecatedWiredParamsMetaKey$$';
4651
+ const WIRE_DEBUG_ENTRY = '@wire';
5030
4652
  const WireMetaMap = new Map();
5031
4653
  class WireContextRegistrationEvent extends CustomEvent {
5032
4654
  constructor(adapterToken, {
@@ -5046,15 +4668,12 @@ var LWC = (function (exports) {
5046
4668
  }
5047
4669
  });
5048
4670
  }
5049
-
5050
4671
  }
5051
-
5052
4672
  function createFieldDataCallback(vm, name) {
5053
4673
  return value => {
5054
4674
  updateComponentValue(vm, name, value);
5055
4675
  };
5056
4676
  }
5057
-
5058
4677
  function createMethodDataCallback(vm, method) {
5059
4678
  return value => {
5060
4679
  // dispatching new value into the wired method
@@ -5064,45 +4683,40 @@ var LWC = (function (exports) {
5064
4683
  }, noop);
5065
4684
  };
5066
4685
  }
5067
-
5068
4686
  function createConfigWatcher(component, configCallback, callbackWhenConfigIsReady) {
5069
- let hasPendingConfig = false; // creating the reactive observer for reactive params when needed
5070
-
4687
+ let hasPendingConfig = false;
4688
+ // creating the reactive observer for reactive params when needed
5071
4689
  const ro = createReactiveObserver(() => {
5072
4690
  if (hasPendingConfig === false) {
5073
- hasPendingConfig = true; // collect new config in the micro-task
5074
-
4691
+ hasPendingConfig = true;
4692
+ // collect new config in the micro-task
5075
4693
  Promise.resolve().then(() => {
5076
- hasPendingConfig = false; // resetting current reactive params
5077
-
5078
- ro.reset(); // dispatching a new config due to a change in the configuration
5079
-
4694
+ hasPendingConfig = false;
4695
+ // resetting current reactive params
4696
+ ro.reset();
4697
+ // dispatching a new config due to a change in the configuration
5080
4698
  computeConfigAndUpdate();
5081
4699
  });
5082
4700
  }
5083
4701
  });
5084
-
5085
4702
  const computeConfigAndUpdate = () => {
5086
4703
  let config;
5087
- ro.observe(() => config = configCallback(component)); // eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
4704
+ ro.observe(() => config = configCallback(component));
4705
+ // eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
5088
4706
  // TODO: dev-mode validation of config based on the adapter.configSchema
5089
4707
  // @ts-ignore it is assigned in the observe() callback
5090
-
5091
4708
  callbackWhenConfigIsReady(config);
5092
4709
  };
5093
-
5094
4710
  return {
5095
4711
  computeConfigAndUpdate,
5096
4712
  ro
5097
4713
  };
5098
4714
  }
5099
-
5100
4715
  function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
5101
4716
  const {
5102
4717
  adapter
5103
4718
  } = wireDef;
5104
4719
  const adapterContextToken = getAdapterToken(adapter);
5105
-
5106
4720
  if (isUndefined$1(adapterContextToken)) {
5107
4721
  return; // no provider found, nothing to be done
5108
4722
  }
@@ -5116,8 +4730,8 @@ var LWC = (function (exports) {
5116
4730
  renderer: {
5117
4731
  dispatchEvent
5118
4732
  }
5119
- } = vm; // waiting for the component to be connected to formally request the context via the token
5120
-
4733
+ } = vm;
4734
+ // waiting for the component to be connected to formally request the context via the token
5121
4735
  ArrayPush$1.call(wiredConnecting, () => {
5122
4736
  // This event is responsible for connecting the host element with another
5123
4737
  // element in the composed path that is providing contextual data. The provider
@@ -5130,18 +4744,15 @@ var LWC = (function (exports) {
5130
4744
  // TODO: dev-mode validation of config based on the adapter.contextSchema
5131
4745
  callbackWhenContextIsReady(newContext);
5132
4746
  },
5133
-
5134
4747
  setDisconnectedCallback(disconnectCallback) {
5135
4748
  // adds this callback into the disconnect bucket so it gets disconnected from parent
5136
4749
  // the the element hosting the wire is disconnected
5137
4750
  ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
5138
4751
  }
5139
-
5140
4752
  });
5141
4753
  dispatchEvent(elm, contextRegistrationEvent);
5142
4754
  });
5143
4755
  }
5144
-
5145
4756
  function createConnector(vm, name, wireDef) {
5146
4757
  const {
5147
4758
  method,
@@ -5149,10 +4760,14 @@ var LWC = (function (exports) {
5149
4760
  configCallback,
5150
4761
  dynamic
5151
4762
  } = wireDef;
5152
- const dataCallback = isUndefined$1(method) ? createFieldDataCallback(vm, name) : createMethodDataCallback(vm, method);
4763
+ let debugInfo;
4764
+ const fieldOrMethodCallback = isUndefined$1(method) ? createFieldDataCallback(vm, name) : createMethodDataCallback(vm, method);
4765
+ const dataCallback = value => {
4766
+ fieldOrMethodCallback(value);
4767
+ };
5153
4768
  let context;
5154
- let connector; // Workaround to pass the component element associated to this wire adapter instance.
5155
-
4769
+ let connector;
4770
+ // Workaround to pass the component element associated to this wire adapter instance.
5156
4771
  defineProperty(dataCallback, DeprecatedWiredElementHost, {
5157
4772
  value: vm.elm
5158
4773
  });
@@ -5163,41 +4778,37 @@ var LWC = (function (exports) {
5163
4778
  // job
5164
4779
  connector = new adapter(dataCallback);
5165
4780
  }, noop);
5166
-
5167
4781
  const updateConnectorConfig = config => {
5168
4782
  // every time the config is recomputed due to tracking,
5169
4783
  // this callback will be invoked with the new computed config
5170
4784
  runWithBoundaryProtection(vm, vm, noop, () => {
5171
4785
  // job
4786
+ if ("production" !== 'production') ;
5172
4787
  connector.update(config, context);
5173
4788
  }, noop);
5174
- }; // Computes the current wire config and calls the update method on the wire adapter.
4789
+ };
4790
+ // Computes the current wire config and calls the update method on the wire adapter.
5175
4791
  // If it has params, we will need to observe changes in the next tick.
5176
-
5177
-
5178
4792
  const {
5179
4793
  computeConfigAndUpdate,
5180
4794
  ro
5181
- } = createConfigWatcher(vm.component, configCallback, updateConnectorConfig); // if the adapter needs contextualization, we need to watch for new context and push it alongside the config
5182
-
4795
+ } = createConfigWatcher(vm.component, configCallback, updateConnectorConfig);
4796
+ // if the adapter needs contextualization, we need to watch for new context and push it alongside the config
5183
4797
  if (!isUndefined$1(adapter.contextSchema)) {
5184
4798
  createContextWatcher(vm, wireDef, newContext => {
5185
4799
  // every time the context is pushed into this component,
5186
4800
  // this callback will be invoked with the new computed context
5187
4801
  if (context !== newContext) {
5188
- context = newContext; // Note: when new context arrives, the config will be recomputed and pushed along side the new
4802
+ context = newContext;
4803
+ // Note: when new context arrives, the config will be recomputed and pushed along side the new
5189
4804
  // context, this is to preserve the identity characteristics, config should not have identity
5190
4805
  // (ever), while context can have identity
5191
-
5192
- if (vm.state === 1
5193
- /* VMState.connected */
5194
- ) {
4806
+ if (vm.state === 1 /* VMState.connected */) {
5195
4807
  computeConfigAndUpdate();
5196
4808
  }
5197
4809
  }
5198
4810
  });
5199
4811
  }
5200
-
5201
4812
  return {
5202
4813
  // @ts-ignore the boundary protection executes sync, connector is always defined
5203
4814
  connector,
@@ -5205,7 +4816,6 @@ var LWC = (function (exports) {
5205
4816
  resetConfigWatcher: () => ro.reset()
5206
4817
  };
5207
4818
  }
5208
-
5209
4819
  const AdapterToTokenMap = new Map();
5210
4820
  function getAdapterToken(adapter) {
5211
4821
  return AdapterToTokenMap.get(adapter);
@@ -5218,7 +4828,6 @@ var LWC = (function (exports) {
5218
4828
  if (adapter.adapter) {
5219
4829
  adapter = adapter.adapter;
5220
4830
  }
5221
-
5222
4831
  const method = descriptor.value;
5223
4832
  const def = {
5224
4833
  adapter,
@@ -5233,7 +4842,6 @@ var LWC = (function (exports) {
5233
4842
  if (adapter.adapter) {
5234
4843
  adapter = adapter.adapter;
5235
4844
  }
5236
-
5237
4845
  const def = {
5238
4846
  adapter,
5239
4847
  configCallback,
@@ -5248,13 +4856,12 @@ var LWC = (function (exports) {
5248
4856
  wire
5249
4857
  }
5250
4858
  } = vm;
4859
+ vm.debugInfo[WIRE_DEBUG_ENTRY] = create(null);
5251
4860
  const wiredConnecting = context.wiredConnecting = [];
5252
4861
  const wiredDisconnecting = context.wiredDisconnecting = [];
5253
-
5254
4862
  for (const fieldNameOrMethod in wire) {
5255
4863
  const descriptor = wire[fieldNameOrMethod];
5256
4864
  const wireDef = WireMetaMap.get(descriptor);
5257
-
5258
4865
  if (!isUndefined$1(wireDef)) {
5259
4866
  const {
5260
4867
  connector,
@@ -5264,14 +4871,12 @@ var LWC = (function (exports) {
5264
4871
  const hasDynamicParams = wireDef.dynamic.length > 0;
5265
4872
  ArrayPush$1.call(wiredConnecting, () => {
5266
4873
  connector.connect();
5267
-
5268
4874
  if (!lwcRuntimeFlags.ENABLE_WIRE_SYNC_EMIT) {
5269
4875
  if (hasDynamicParams) {
5270
4876
  Promise.resolve().then(computeConfigAndUpdate);
5271
4877
  return;
5272
4878
  }
5273
4879
  }
5274
-
5275
4880
  computeConfigAndUpdate();
5276
4881
  });
5277
4882
  ArrayPush$1.call(wiredDisconnecting, () => {
@@ -5285,7 +4890,6 @@ var LWC = (function (exports) {
5285
4890
  const {
5286
4891
  wiredConnecting
5287
4892
  } = vm.context;
5288
-
5289
4893
  for (let i = 0, len = wiredConnecting.length; i < len; i += 1) {
5290
4894
  wiredConnecting[i]();
5291
4895
  }
@@ -5733,7 +5337,6 @@ var LWC = (function (exports) {
5733
5337
  }
5734
5338
  return ctor;
5735
5339
  }
5736
- /* version: 2.29.0 */
5737
5340
 
5738
5341
  /*
5739
5342
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6423,10 +6026,10 @@ var LWC = (function (exports) {
6423
6026
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6424
6027
  */
6425
6028
  let createScopedConstructor;
6426
- let CachedHTMLElement; // We only call `createScopedRegistry()` if the browser supports custom elements and
6029
+ let CachedHTMLElement;
6030
+ // We only call `createScopedRegistry()` if the browser supports custom elements and
6427
6031
  // ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY is enabled, because we don't want to patch eagerly if the flag is disabled
6428
6032
  // or we're in a legacy browser.
6429
-
6430
6033
  if (lwcRuntimeFlags.ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY) {
6431
6034
  if (hasCustomElements) {
6432
6035
  // If ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY is true, then we eagerly initialize the scoped registry.
@@ -6440,7 +6043,8 @@ var LWC = (function (exports) {
6440
6043
  // 4. `customElements.define('x-foo', Ctor)` // throws error because class is bound to stale HTMLElement
6441
6044
  //
6442
6045
  // To reduce the risk of this, it's safer to patch the registry eagerly.
6443
- createScopedConstructor = createScopedRegistry(); // It's important to cache window.HTMLElement here. Otherwise, someone else could overwrite window.HTMLElement (e.g.
6046
+ createScopedConstructor = createScopedRegistry();
6047
+ // It's important to cache window.HTMLElement here. Otherwise, someone else could overwrite window.HTMLElement (e.g.
6444
6048
  // another copy of the engine, or another scoping implementation) and we would get "Illegal constructor" errors
6445
6049
  // because the HTMLElement prototypes are mixed up.
6446
6050
  //
@@ -6448,14 +6052,12 @@ var LWC = (function (exports) {
6448
6052
  // with that version of HTMLElement. So if you load two copies of the scoping implementation in the same environment,
6449
6053
  // the second one may accidentally grab window.HTMLElement from the first (when doing `class extends HTMLElement`).
6450
6054
  // Caching avoids this problem.
6451
-
6452
6055
  CachedHTMLElement = window.HTMLElement;
6453
6056
  }
6454
- } // Creates a constructor that is intended to be used as the UserConstructor in a scoped (pivots) registry.
6057
+ }
6058
+ // Creates a constructor that is intended to be used as the UserConstructor in a scoped (pivots) registry.
6455
6059
  // In this case, the upgradeCallback only needs to be defined once because we create these on-demand,
6456
6060
  // multiple times per tag name.
6457
-
6458
-
6459
6061
  const createUserConstructor = (upgradeCallback, connectedCallback, disconnectedCallback, HTMLElementToExtend) => {
6460
6062
  // TODO [#2972]: this class should expose observedAttributes as necessary
6461
6063
  return class UserConstructor extends HTMLElementToExtend {
@@ -6463,24 +6065,19 @@ var LWC = (function (exports) {
6463
6065
  super();
6464
6066
  upgradeCallback(this);
6465
6067
  }
6466
-
6467
6068
  connectedCallback() {
6468
6069
  connectedCallback(this);
6469
6070
  }
6470
-
6471
6071
  disconnectedCallback() {
6472
6072
  disconnectedCallback(this);
6473
6073
  }
6474
-
6475
6074
  };
6476
6075
  };
6477
-
6478
6076
  function createCustomElementScoped(tagName, upgradeCallback, connectedCallback, disconnectedCallback) {
6479
6077
  if (isUndefined$1(createScopedConstructor) || isUndefined$1(CachedHTMLElement)) {
6480
6078
  // This error should be impossible to hit
6481
6079
  throw new Error('The flag ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY must be set to true to use this feature');
6482
6080
  }
6483
-
6484
6081
  const UserConstructor = createUserConstructor(upgradeCallback, connectedCallback, disconnectedCallback, CachedHTMLElement);
6485
6082
  const ScopedConstructor = createScopedConstructor(tagName, UserConstructor);
6486
6083
  return new ScopedConstructor(UserConstructor);
@@ -6505,9 +6102,7 @@ var LWC = (function (exports) {
6505
6102
  * between LWC components and third-party elements. This uses a similar trick to #2, but is much more complex
6506
6103
  * because it must patch the global `customElements` and `HTMLElement` objects.
6507
6104
  */
6508
-
6509
6105
  let createCustomElement;
6510
-
6511
6106
  if (hasCustomElements) {
6512
6107
  if (lwcRuntimeFlags.ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY) {
6513
6108
  createCustomElement = createCustomElementScoped;
@@ -6580,7 +6175,7 @@ var LWC = (function (exports) {
6580
6175
  function isNull(obj) {
6581
6176
  return obj === null;
6582
6177
  }
6583
- /** version: 2.29.0 */
6178
+ /** version: 2.30.0 */
6584
6179
 
6585
6180
  /*
6586
6181
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6964,20 +6559,16 @@ var LWC = (function (exports) {
6964
6559
  * SPDX-License-Identifier: MIT
6965
6560
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6966
6561
  */
6562
+ // TODO [#2472]: Remove this workaround when appropriate.
6967
6563
  // eslint-disable-next-line @lwc/lwc-internal/no-global-node
6968
-
6969
6564
  const _Node$1 = Node;
6970
6565
  const ConnectingSlot = new WeakMap();
6971
6566
  const DisconnectingSlot = new WeakMap();
6972
-
6973
6567
  function callNodeSlot(node, slot) {
6974
-
6975
6568
  const fn = slot.get(node);
6976
-
6977
6569
  if (!isUndefined$1(fn)) {
6978
6570
  fn(node);
6979
6571
  }
6980
-
6981
6572
  return node; // for convenience
6982
6573
  }
6983
6574
 
@@ -6995,24 +6586,20 @@ var LWC = (function (exports) {
6995
6586
  const appendedNode = appendChild.call(this, newChild);
6996
6587
  return callNodeSlot(appendedNode, ConnectingSlot);
6997
6588
  },
6998
-
6999
6589
  insertBefore(newChild, referenceNode) {
7000
6590
  const insertedNode = insertBefore.call(this, newChild, referenceNode);
7001
6591
  return callNodeSlot(insertedNode, ConnectingSlot);
7002
6592
  },
7003
-
7004
6593
  removeChild(oldChild) {
7005
6594
  const removedNode = removeChild.call(this, oldChild);
7006
6595
  return callNodeSlot(removedNode, DisconnectingSlot);
7007
6596
  },
7008
-
7009
6597
  replaceChild(newChild, oldChild) {
7010
6598
  const replacedNode = replaceChild.call(this, newChild, oldChild);
7011
6599
  callNodeSlot(replacedNode, DisconnectingSlot);
7012
6600
  callNodeSlot(newChild, ConnectingSlot);
7013
6601
  return replacedNode;
7014
6602
  }
7015
-
7016
6603
  });
7017
6604
  }
7018
6605
  /**
@@ -7026,59 +6613,49 @@ var LWC = (function (exports) {
7026
6613
  * const el = createElement('x-foo', { is: FooCtor });
7027
6614
  * ```
7028
6615
  */
7029
-
7030
-
7031
6616
  function createElement(sel, options) {
7032
6617
  if (!isObject(options) || isNull(options)) {
7033
6618
  throw new TypeError(`"createElement" function expects an object as second parameter but received "${toString$1(options)}".`);
7034
6619
  }
7035
-
7036
6620
  const Ctor = options.is;
7037
-
7038
6621
  if (!isFunction$1(Ctor)) {
7039
6622
  throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
7040
6623
  }
7041
-
7042
6624
  const {
7043
6625
  createCustomElement
7044
- } = renderer; // tagName must be all lowercase, unfortunately, we have legacy code that is
6626
+ } = renderer;
6627
+ // tagName must be all lowercase, unfortunately, we have legacy code that is
7045
6628
  // passing `sel` as a camel-case, which makes them invalid custom elements name
7046
6629
  // the following line guarantees that this does not leaks beyond this point.
7047
-
7048
- const tagName = StringToLowerCase.call(sel); // the custom element from the registry is expecting an upgrade callback
7049
-
6630
+ const tagName = StringToLowerCase.call(sel);
6631
+ // the custom element from the registry is expecting an upgrade callback
7050
6632
  /**
7051
6633
  * Note: if the upgradable constructor does not expect, or throw when we new it
7052
6634
  * with a callback as the first argument, we could implement a more advanced
7053
6635
  * mechanism that only passes that argument if the constructor is known to be
7054
6636
  * an upgradable custom element.
7055
6637
  */
7056
-
7057
6638
  const upgradeCallback = elm => {
7058
6639
  createVM(elm, Ctor, renderer, {
7059
6640
  tagName,
7060
6641
  mode: options.mode !== 'closed' ? 'open' : 'closed',
7061
6642
  owner: null
7062
6643
  });
7063
-
7064
6644
  if (!lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
7065
6645
  ConnectingSlot.set(elm, connectRootElement);
7066
6646
  DisconnectingSlot.set(elm, disconnectRootElement);
7067
6647
  }
7068
6648
  };
7069
-
7070
6649
  const connectedCallback = elm => {
7071
6650
  if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
7072
6651
  connectRootElement(elm);
7073
6652
  }
7074
6653
  };
7075
-
7076
6654
  const disconnectedCallback = elm => {
7077
6655
  if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
7078
6656
  disconnectRootElement(elm);
7079
6657
  }
7080
6658
  };
7081
-
7082
6659
  const element = createCustomElement(tagName, upgradeCallback, connectedCallback, disconnectedCallback);
7083
6660
  return element;
7084
6661
  }
@@ -7151,7 +6728,7 @@ var LWC = (function (exports) {
7151
6728
  });
7152
6729
  freeze(LightningElement);
7153
6730
  seal(LightningElement.prototype);
7154
- /* version: 2.29.0 */
6731
+ /* version: 2.30.0 */
7155
6732
 
7156
6733
  exports.LightningElement = LightningElement;
7157
6734
  exports.__unstable__ProfilerControl = profilerControl;