lwc 2.38.1 → 2.39.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 (64) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +203 -122
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +203 -122
  4. package/dist/engine-dom/iife/es2017/engine-dom.js.map +1 -1
  5. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  6. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +154 -40
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +353 -207
  9. package/dist/engine-dom/iife/es5/engine-dom.js.map +1 -1
  10. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  11. package/dist/engine-dom/iife/es5/engine-dom_debug.js +305 -153
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +203 -122
  14. package/dist/engine-dom/umd/es2017/engine-dom.js.map +1 -1
  15. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  16. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +154 -40
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +353 -207
  19. package/dist/engine-dom/umd/es5/engine-dom.js.map +1 -1
  20. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  21. package/dist/engine-dom/umd/es5/engine-dom_debug.js +305 -153
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +168 -75
  24. package/dist/engine-server/commonjs/es2017/engine-server.js.map +1 -1
  25. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  26. package/dist/engine-server/esm/es2017/engine-server.js +168 -75
  27. package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
  28. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  29. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
  30. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  31. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
  32. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  33. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
  34. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  35. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
  36. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  37. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
  38. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  39. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
  40. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  41. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
  42. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  43. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
  44. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  45. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
  46. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  47. package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
  48. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  49. package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
  50. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  51. package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
  52. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  53. package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
  54. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  55. package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
  56. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  57. package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
  58. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  59. package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
  60. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  61. package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
  62. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  63. package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
  64. package/package.json +7 -7
@@ -318,7 +318,7 @@
318
318
  CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
319
319
  return propertyName;
320
320
  }
321
- /** version: 2.38.1 */
321
+ /** version: 2.39.0 */
322
322
 
323
323
  /**
324
324
  * Copyright (C) 2018 salesforce.com, inc.
@@ -390,7 +390,7 @@
390
390
  */
391
391
  function setFeatureFlagForTest(name, value) {
392
392
  }
393
- /** version: 2.38.1 */
393
+ /** version: 2.39.0 */
394
394
 
395
395
  /**
396
396
  * Copyright (C) 2018 salesforce.com, inc.
@@ -454,7 +454,7 @@
454
454
  }
455
455
  }
456
456
  }
457
- /** version: 2.38.1 */
457
+ /** version: 2.39.0 */
458
458
 
459
459
  /*
460
460
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2567,10 +2567,131 @@
2567
2567
  }
2568
2568
  freeze(BaseBridgeElement);
2569
2569
  seal(BaseBridgeElement.prototype);
2570
+
2571
+ /*
2572
+ * Copyright (c) 2023, salesforce.com, inc.
2573
+ * All rights reserved.
2574
+ * SPDX-License-Identifier: MIT
2575
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2576
+ */
2577
+ var supportsWeakRefs = typeof WeakRef === 'function' && typeof FinalizationRegistry === 'function';
2578
+ // In browsers that doesn't support WeakRefs, the values will still leak, but at least the keys won't
2579
+ var LegacyWeakMultiMap = /*#__PURE__*/function () {
2580
+ function LegacyWeakMultiMap() {
2581
+ _classCallCheck(this, LegacyWeakMultiMap);
2582
+ this._map = new WeakMap();
2583
+ }
2584
+ _createClass(LegacyWeakMultiMap, [{
2585
+ key: "_getValues",
2586
+ value: function _getValues(key) {
2587
+ var values = this._map.get(key);
2588
+ if (isUndefined$1(values)) {
2589
+ values = new Set();
2590
+ this._map.set(key, values);
2591
+ }
2592
+ return values;
2593
+ }
2594
+ }, {
2595
+ key: "get",
2596
+ value: function get(key) {
2597
+ return this._getValues(key);
2598
+ }
2599
+ }, {
2600
+ key: "add",
2601
+ value: function add(key, vm) {
2602
+ var set = this._getValues(key);
2603
+ set.add(vm);
2604
+ }
2605
+ }, {
2606
+ key: "delete",
2607
+ value: function _delete(key) {
2608
+ this._map.delete(key);
2609
+ }
2610
+ }]);
2611
+ return LegacyWeakMultiMap;
2612
+ }(); // This implementation relies on the WeakRef/FinalizationRegistry proposal.
2613
+ // For some background, see: https://github.com/tc39/proposal-weakrefs
2614
+ var ModernWeakMultiMap = /*#__PURE__*/function () {
2615
+ function ModernWeakMultiMap() {
2616
+ _classCallCheck(this, ModernWeakMultiMap);
2617
+ this._map = new WeakMap();
2618
+ this._registry = new FinalizationRegistry(function (weakRefs) {
2619
+ // This should be considered an optional cleanup method to remove GC'ed values from their respective arrays.
2620
+ // JS VMs are not obligated to call FinalizationRegistry callbacks.
2621
+ // Work backwards, removing stale VMs
2622
+ for (var _i13 = weakRefs.length - 1; _i13 >= 0; _i13--) {
2623
+ var vm = weakRefs[_i13].deref();
2624
+ if (isUndefined$1(vm)) {
2625
+ ArraySplice.call(weakRefs, _i13, 1); // remove
2626
+ }
2627
+ }
2628
+ });
2629
+ }
2630
+ _createClass(ModernWeakMultiMap, [{
2631
+ key: "_getWeakRefs",
2632
+ value: function _getWeakRefs(key) {
2633
+ var weakRefs = this._map.get(key);
2634
+ if (isUndefined$1(weakRefs)) {
2635
+ weakRefs = [];
2636
+ this._map.set(key, weakRefs);
2637
+ }
2638
+ return weakRefs;
2639
+ }
2640
+ }, {
2641
+ key: "get",
2642
+ value: function get(key) {
2643
+ var weakRefs = this._getWeakRefs(key);
2644
+ var result = new Set();
2645
+ var _iterator5 = _createForOfIteratorHelper(weakRefs),
2646
+ _step5;
2647
+ try {
2648
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
2649
+ var weakRef = _step5.value;
2650
+ var vm = weakRef.deref();
2651
+ if (!isUndefined$1(vm)) {
2652
+ result.add(vm);
2653
+ }
2654
+ }
2655
+ } catch (err) {
2656
+ _iterator5.e(err);
2657
+ } finally {
2658
+ _iterator5.f();
2659
+ }
2660
+ return result;
2661
+ }
2662
+ }, {
2663
+ key: "add",
2664
+ value: function add(key, value) {
2665
+ var weakRefs = this._getWeakRefs(key);
2666
+ // We could check for duplicate values here, but it doesn't seem worth it.
2667
+ // We transform the output into a Set anyway
2668
+ ArrayPush$1.call(weakRefs, new WeakRef(value));
2669
+ // It's important here not to leak the second argument, which is the "held value." The FinalizationRegistry
2670
+ // effectively creates a strong reference between the first argument (the "target") and the held value. When
2671
+ // the target is GC'ed, the callback is called, and then the held value is GC'ed.
2672
+ // Putting the key here would mean the key is not GC'ed until the value is GC'ed, which defeats the purpose
2673
+ // of the WeakMap. Whereas putting the weakRefs array here is fine, because it doesn't have a strong reference
2674
+ // to anything. See also this example:
2675
+ // https://gist.github.com/nolanlawson/79a3d36e8e6cc25c5048bb17c1795aea
2676
+ this._registry.register(value, weakRefs);
2677
+ }
2678
+ }, {
2679
+ key: "delete",
2680
+ value: function _delete(key) {
2681
+ this._map.delete(key);
2682
+ }
2683
+ }]);
2684
+ return ModernWeakMultiMap;
2685
+ }();
2686
+ var WeakMultiMap = supportsWeakRefs ? ModernWeakMultiMap : LegacyWeakMultiMap;
2570
2687
  var swappedStyleMap = new WeakMap();
2571
- var activeTemplates = new WeakMap();
2572
- var activeComponents = new WeakMap();
2573
- var activeStyles = new WeakMap();
2688
+ // The important thing here is the weak values – VMs are transient (one per component instance) and should be GC'ed,
2689
+ // so we don't want to create strong references to them.
2690
+ // The weak keys are kind of useless, because Templates, LightningElementConstructors, and StylesheetFactories are
2691
+ // never GC'ed. But maybe they will be someday, so we may as well use weak keys too.
2692
+ var activeTemplates = new WeakMultiMap();
2693
+ var activeComponents = new WeakMultiMap();
2694
+ var activeStyles = new WeakMultiMap();
2574
2695
  function getStyleOrSwappedStyle(style) {
2575
2696
  assertNotProd(); // this method should never leak to prod
2576
2697
  var visited = new Set();
@@ -2584,42 +2705,36 @@
2584
2705
  assertNotProd(); // this method should never leak to prod
2585
2706
  // tracking active component
2586
2707
  var Ctor = vm.def.ctor;
2587
- var componentVMs = activeComponents.get(Ctor);
2588
- if (isUndefined$1(componentVMs)) {
2589
- componentVMs = new Set();
2590
- activeComponents.set(Ctor, componentVMs);
2591
- }
2592
2708
  // this will allow us to keep track of the hot components
2593
- componentVMs.add(vm);
2709
+ activeComponents.add(Ctor, vm);
2594
2710
  // tracking active template
2595
2711
  var tpl = vm.cmpTemplate;
2596
2712
  if (tpl) {
2597
- var templateVMs = activeTemplates.get(tpl);
2598
- if (isUndefined$1(templateVMs)) {
2599
- templateVMs = new Set();
2600
- activeTemplates.set(tpl, templateVMs);
2601
- }
2602
2713
  // this will allow us to keep track of the templates that are
2603
2714
  // being used by a hot component
2604
- templateVMs.add(vm);
2715
+ activeTemplates.add(tpl, vm);
2605
2716
  // tracking active styles associated to template
2606
2717
  var stylesheets = tpl.stylesheets;
2607
2718
  if (!isUndefined$1(stylesheets)) {
2608
- flattenStylesheets(stylesheets).forEach(function (stylesheet) {
2609
- // this is necessary because we don't hold the list of styles
2610
- // in the vm, we only hold the selected (already swapped template)
2611
- // but the styles attached to the template might not be the actual
2612
- // active ones, but the swapped versions of those.
2613
- stylesheet = getStyleOrSwappedStyle(stylesheet);
2614
- var stylesheetVMs = activeStyles.get(stylesheet);
2615
- if (isUndefined$1(stylesheetVMs)) {
2616
- stylesheetVMs = new Set();
2617
- activeStyles.set(stylesheet, stylesheetVMs);
2719
+ var _iterator9 = _createForOfIteratorHelper(flattenStylesheets(stylesheets)),
2720
+ _step9;
2721
+ try {
2722
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
2723
+ var stylesheet = _step9.value;
2724
+ // this is necessary because we don't hold the list of styles
2725
+ // in the vm, we only hold the selected (already swapped template)
2726
+ // but the styles attached to the template might not be the actual
2727
+ // active ones, but the swapped versions of those.
2728
+ var swappedStylesheet = getStyleOrSwappedStyle(stylesheet);
2729
+ // this will allow us to keep track of the stylesheet that are
2730
+ // being used by a hot component
2731
+ activeStyles.add(swappedStylesheet, vm);
2618
2732
  }
2619
- // this will allow us to keep track of the stylesheet that are
2620
- // being used by a hot component
2621
- stylesheetVMs.add(vm);
2622
- });
2733
+ } catch (err) {
2734
+ _iterator9.e(err);
2735
+ } finally {
2736
+ _iterator9.f();
2737
+ }
2623
2738
  }
2624
2739
  }
2625
2740
  }
@@ -2894,8 +3009,8 @@
2894
3009
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
2895
3010
  var content = [];
2896
3011
  var root;
2897
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
2898
- var stylesheet = stylesheets[_i13];
3012
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
3013
+ var stylesheet = stylesheets[_i14];
2899
3014
  if (isArray$1(stylesheet)) {
2900
3015
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
2901
3016
  } else {
@@ -2993,8 +3108,8 @@
2993
3108
  shadowMode = vm.shadowMode,
2994
3109
  insertStylesheet = vm.renderer.insertStylesheet;
2995
3110
  if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
2996
- for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
2997
- insertStylesheet(stylesheets[_i14]);
3111
+ for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
3112
+ insertStylesheet(stylesheets[_i15]);
2998
3113
  }
2999
3114
  } else if (vm.hydrated) {
3000
3115
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
@@ -3007,8 +3122,8 @@
3007
3122
  var root = getNearestNativeShadowComponent(vm);
3008
3123
  // null root means a global style
3009
3124
  var target = isNull(root) ? undefined : root.shadowRoot;
3010
- for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
3011
- insertStylesheet(stylesheets[_i15], target);
3125
+ for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
3126
+ insertStylesheet(stylesheets[_i16], target);
3012
3127
  }
3013
3128
  }
3014
3129
  return null;
@@ -3310,8 +3425,8 @@
3310
3425
  return;
3311
3426
  }
3312
3427
  var setCSSStyleProperty = renderer.setCSSStyleProperty;
3313
- for (var _i16 = 0; _i16 < styleDecls.length; _i16++) {
3314
- var _styleDecls$_i = _slicedToArray(styleDecls[_i16], 3),
3428
+ for (var _i17 = 0; _i17 < styleDecls.length; _i17++) {
3429
+ var _styleDecls$_i = _slicedToArray(styleDecls[_i17], 3),
3315
3430
  prop = _styleDecls$_i[0],
3316
3431
  value = _styleDecls$_i[1],
3317
3432
  important = _styleDecls$_i[2];
@@ -3521,8 +3636,9 @@
3521
3636
  }
3522
3637
  }
3523
3638
  function patchCustomElement(n1, n2, parent, renderer) {
3639
+ // TODO [#3331]: This if branch should be removed in 246 with lwc:dynamic
3524
3640
  if (n1.ctor !== n2.ctor) {
3525
- // If the constructor, unmount the current component and mount a new one using the new
3641
+ // If the constructor differs, unmount the current component and mount a new one using the new
3526
3642
  // constructor.
3527
3643
  var anchor = renderer.nextSibling(n1.elm);
3528
3644
  unmount(n1, parent, renderer, true);
@@ -3734,8 +3850,8 @@
3734
3850
  // If no VFragment is found in children, we don't need to traverse anything or mark the children dynamic and can return early.
3735
3851
  var nodeStack = [];
3736
3852
  var fragmentFound = false;
3737
- for (var _i17 = children.length - 1; _i17 > -1; _i17 -= 1) {
3738
- var child = children[_i17];
3853
+ for (var _i18 = children.length - 1; _i18 > -1; _i18 -= 1) {
3854
+ var child = children[_i18];
3739
3855
  ArrayPush$1.call(nodeStack, child);
3740
3856
  fragmentFound = fragmentFound || !!(child && isVFragment(child));
3741
3857
  }
@@ -3747,8 +3863,8 @@
3747
3863
  if (!isNull(currentNode) && isVFragment(currentNode)) {
3748
3864
  var fChildren = currentNode.children;
3749
3865
  // Ignore the start and end text node delimiters
3750
- for (var _i18 = fChildren.length - 2; _i18 > 0; _i18 -= 1) {
3751
- ArrayPush$1.call(nodeStack, fChildren[_i18]);
3866
+ for (var _i19 = fChildren.length - 2; _i19 > 0; _i19 -= 1) {
3867
+ ArrayPush$1.call(nodeStack, fChildren[_i19]);
3752
3868
  }
3753
3869
  } else {
3754
3870
  ArrayPush$1.call(flattenedChildren, currentNode);
@@ -3784,8 +3900,8 @@
3784
3900
  var oldSlotsMapping = vm.cmpSlots.slotAssignments;
3785
3901
  var cmpSlotsMapping = create(null);
3786
3902
  // Collect all slots into cmpSlotsMapping
3787
- for (var _i19 = 0, len = children.length; _i19 < len; _i19 += 1) {
3788
- var vnode = children[_i19];
3903
+ for (var _i20 = 0, len = children.length; _i20 < len; _i20 += 1) {
3904
+ var vnode = children[_i20];
3789
3905
  if (isNull(vnode)) {
3790
3906
  continue;
3791
3907
  }
@@ -3815,8 +3931,8 @@
3815
3931
  markComponentAsDirty(vm);
3816
3932
  return;
3817
3933
  }
3818
- for (var _i20 = 0, _len2 = oldKeys.length; _i20 < _len2; _i20 += 1) {
3819
- var key = oldKeys[_i20];
3934
+ for (var _i21 = 0, _len2 = oldKeys.length; _i21 < _len2; _i21 += 1) {
3935
+ var key = oldKeys[_i21];
3820
3936
  if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
3821
3937
  markComponentAsDirty(vm);
3822
3938
  return;
@@ -3939,11 +4055,11 @@
3939
4055
  if (oldStartIdx > oldEndIdx) {
3940
4056
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
3941
4057
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
3942
- var _i21 = newEndIdx;
4058
+ var _i22 = newEndIdx;
3943
4059
  var n;
3944
4060
  do {
3945
- n = newCh[++_i21];
3946
- } while (!isVNode(n) && _i21 < newChEnd);
4061
+ n = newCh[++_i22];
4062
+ } while (!isVNode(n) && _i22 < newChEnd);
3947
4063
  before = isVNode(n) ? n.elm : null;
3948
4064
  mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
3949
4065
  } else {
@@ -3968,15 +4084,22 @@
3968
4084
  // if the old list is not empty, the new list MUST have the same
3969
4085
  // amount of nodes, that's why we call this static children
3970
4086
  var anchor = null;
3971
- for (var _i22 = c2Length - 1; _i22 >= 0; _i22 -= 1) {
3972
- var n1 = c1[_i22];
3973
- var n2 = c2[_i22];
4087
+ for (var _i23 = c2Length - 1; _i23 >= 0; _i23 -= 1) {
4088
+ var n1 = c1[_i23];
4089
+ var n2 = c2[_i23];
3974
4090
  if (n2 !== n1) {
3975
4091
  if (isVNode(n1)) {
3976
4092
  if (isVNode(n2)) {
3977
- // both vnodes are equivalent, and we just need to patch them
3978
- patch(n1, n2, parent, renderer);
3979
- anchor = n2.elm;
4093
+ if (isSameVnode(n1, n2)) {
4094
+ // both vnodes are equivalent, and we just need to patch them
4095
+ patch(n1, n2, parent, renderer);
4096
+ anchor = n2.elm;
4097
+ } else {
4098
+ // removing the old vnode since the new one is different
4099
+ unmount(n1, parent, renderer, true);
4100
+ mount(n2, parent, renderer, anchor);
4101
+ anchor = n2.elm;
4102
+ }
3980
4103
  } else {
3981
4104
  // removing the old vnode since the new one is null
3982
4105
  unmount(n1, parent, renderer, true);
@@ -4067,8 +4190,8 @@
4067
4190
  if (!isUndefined$1(slotset) && !isUndefined$1(slotset.slotAssignments) && !isUndefined$1(slotset.slotAssignments[slotName]) && slotset.slotAssignments[slotName].length !== 0) {
4068
4191
  var newChildren = [];
4069
4192
  var slotAssignments = slotset.slotAssignments[slotName];
4070
- for (var _i23 = 0; _i23 < slotAssignments.length; _i23++) {
4071
- var vnode = slotAssignments[_i23];
4193
+ for (var _i24 = 0; _i24 < slotAssignments.length; _i24++) {
4194
+ var vnode = slotAssignments[_i24];
4072
4195
  if (!isNull(vnode)) {
4073
4196
  var assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
4074
4197
  // The only sniff test for a scoped <slot> element is the presence of `slotData`
@@ -4272,12 +4395,14 @@
4272
4395
  return url;
4273
4396
  }
4274
4397
  /**
4275
- * create a dynamic component via `<x-foo lwc:dynamic={Ctor}>`
4398
+ * [ddc] - create a (deprecated) dynamic component via `<x-foo lwc:dynamic={Ctor}>`
4399
+ *
4400
+ * TODO [#3331]: remove usage of lwc:dynamic in 246
4276
4401
  */
4277
- function dc(sel, Ctor, data) {
4402
+ function ddc(sel, Ctor, data) {
4278
4403
  var children = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : EmptyArray;
4279
4404
  // null or undefined values should produce a null value in the VNodes
4280
- if (Ctor == null) {
4405
+ if (isNull(Ctor) || isUndefined$1(Ctor)) {
4281
4406
  return null;
4282
4407
  }
4283
4408
  if (!isComponentConstructor(Ctor)) {
@@ -4285,6 +4410,27 @@
4285
4410
  }
4286
4411
  return c(sel, Ctor, data, children);
4287
4412
  }
4413
+ /**
4414
+ * [dc] - create a dynamic component via `<lwc:component lwc:is={Ctor}>`
4415
+ */
4416
+ function dc(Ctor, data) {
4417
+ var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EmptyArray;
4418
+ // Null or undefined values should produce a null value in the VNodes.
4419
+ // This is the only value at compile time as the constructor will not be known.
4420
+ if (isNull(Ctor) || isUndefined$1(Ctor)) {
4421
+ return null;
4422
+ }
4423
+ if (!isComponentConstructor(Ctor)) {
4424
+ throw new Error("Invalid constructor ".concat(toString$1(Ctor), " is not a LightningElement constructor."));
4425
+ }
4426
+ // Look up the dynamic component's name at runtime once the constructor is available.
4427
+ // This information is only known at runtime and is stored as part of registerComponent.
4428
+ var sel = getComponentRegisteredName(Ctor);
4429
+ if (isUndefined$1(sel) || sel === '') {
4430
+ throw new Error("Invalid LWC constructor ".concat(toString$1(Ctor), " does not have a registered name"));
4431
+ }
4432
+ return c(sel, Ctor, data, children);
4433
+ }
4288
4434
  /**
4289
4435
  * slow children collection marking mechanism. this API allows the compiler to signal
4290
4436
  * to the engine that a particular collection of children must be diffed using the slow
@@ -4343,7 +4489,8 @@
4343
4489
  gid: gid,
4344
4490
  fid: fid,
4345
4491
  shc: shc,
4346
- ssf: ssf
4492
+ ssf: ssf,
4493
+ ddc: ddc
4347
4494
  });
4348
4495
  /** Indicates if operations should be logged by the profiler. */
4349
4496
  var isProfilerEnabled = false;
@@ -4456,23 +4603,23 @@
4456
4603
  var classAttrToken = hasScopedStyles && hasStyleToken ? " class=\"".concat(stylesheetToken, "\"") : '';
4457
4604
  var attrToken = hasStyleToken && isSyntheticShadow ? ' ' + stylesheetToken : '';
4458
4605
  var htmlFragment = '';
4459
- for (var _i24 = 0, n = keys.length; _i24 < n; _i24++) {
4460
- switch (keys[_i24]) {
4606
+ for (var _i25 = 0, n = keys.length; _i25 < n; _i25++) {
4607
+ switch (keys[_i25]) {
4461
4608
  case 0:
4462
4609
  // styleToken in existing class attr
4463
- htmlFragment += strings[_i24] + classToken;
4610
+ htmlFragment += strings[_i25] + classToken;
4464
4611
  break;
4465
4612
  case 1:
4466
4613
  // styleToken for added class attr
4467
- htmlFragment += strings[_i24] + classAttrToken;
4614
+ htmlFragment += strings[_i25] + classAttrToken;
4468
4615
  break;
4469
4616
  case 2:
4470
4617
  // styleToken as attr
4471
- htmlFragment += strings[_i24] + attrToken;
4618
+ htmlFragment += strings[_i25] + attrToken;
4472
4619
  break;
4473
4620
  case 3:
4474
4621
  // ${1}${2}
4475
- htmlFragment += strings[_i24] + classAttrToken + attrToken;
4622
+ htmlFragment += strings[_i25] + classAttrToken + attrToken;
4476
4623
  break;
4477
4624
  }
4478
4625
  }
@@ -4560,8 +4707,8 @@
4560
4707
  }
4561
4708
  function computeHasScopedStylesInStylesheets(stylesheets) {
4562
4709
  if (hasStyles(stylesheets)) {
4563
- for (var _i25 = 0; _i25 < stylesheets.length; _i25++) {
4564
- if (isTrue(stylesheets[_i25][KEY__SCOPED_CSS])) {
4710
+ for (var _i26 = 0; _i26 < stylesheets.length; _i26++) {
4711
+ if (isTrue(stylesheets[_i26][KEY__SCOPED_CSS])) {
4565
4712
  return true;
4566
4713
  }
4567
4714
  }
@@ -4659,24 +4806,29 @@
4659
4806
  * SPDX-License-Identifier: MIT
4660
4807
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4661
4808
  */
4662
- var signedTemplateMap = new Map();
4809
+ var registeredComponentMap = new Map();
4663
4810
  /**
4664
4811
  * INTERNAL: This function can only be invoked by compiled code. The compiler
4665
4812
  * will prevent this function from being imported by userland code.
4666
4813
  */
4667
4814
  function registerComponent(
4668
4815
  // We typically expect a LightningElementConstructor, but technically you can call this with anything
4669
- Ctor, _ref3) {
4670
- var tmpl = _ref3.tmpl;
4816
+ Ctor, metadata) {
4671
4817
  if (isFunction$1(Ctor)) {
4672
- signedTemplateMap.set(Ctor, tmpl);
4818
+ // TODO [#3331]: add validation to check the value of metadata.sel is not an empty string.
4819
+ registeredComponentMap.set(Ctor, metadata);
4673
4820
  }
4674
4821
  // chaining this method as a way to wrap existing assignment of component constructor easily,
4675
4822
  // without too much transformation
4676
4823
  return Ctor;
4677
4824
  }
4678
4825
  function getComponentRegisteredTemplate(Ctor) {
4679
- return signedTemplateMap.get(Ctor);
4826
+ var _a;
4827
+ return (_a = registeredComponentMap.get(Ctor)) === null || _a === void 0 ? void 0 : _a.tmpl;
4828
+ }
4829
+ function getComponentRegisteredName(Ctor) {
4830
+ var _a;
4831
+ return (_a = registeredComponentMap.get(Ctor)) === null || _a === void 0 ? void 0 : _a.sel;
4680
4832
  }
4681
4833
  function getTemplateReactiveObserver(vm) {
4682
4834
  return createReactiveObserver(function () {
@@ -4727,8 +4879,8 @@
4727
4879
  * subject to change or being removed.
4728
4880
  */
4729
4881
  function register(service) {
4730
- for (var _i26 = 0; _i26 < hooks.length; ++_i26) {
4731
- var hookName = hooks[_i26];
4882
+ for (var _i27 = 0; _i27 < hooks.length; ++_i27) {
4883
+ var hookName = hooks[_i27];
4732
4884
  if (hookName in service) {
4733
4885
  var l = Services[hookName];
4734
4886
  if (isUndefined$1(l)) {
@@ -4742,8 +4894,8 @@
4742
4894
  var component = vm.component,
4743
4895
  def = vm.def,
4744
4896
  context = vm.context;
4745
- for (var _i27 = 0, len = cbs.length; _i27 < len; ++_i27) {
4746
- cbs[_i27].call(undefined, component, {}, def, context);
4897
+ for (var _i28 = 0, len = cbs.length; _i28 < len; ++_i28) {
4898
+ cbs[_i28].call(undefined, component, {}, def, context);
4747
4899
  }
4748
4900
  }
4749
4901
 
@@ -4880,8 +5032,8 @@
4880
5032
  var valid = true;
4881
5033
  var validate = function validate(arrayOrStylesheet) {
4882
5034
  if (isArray$1(arrayOrStylesheet)) {
4883
- for (var _i28 = 0; _i28 < arrayOrStylesheet.length; _i28++) {
4884
- validate(arrayOrStylesheet[_i28]);
5035
+ for (var _i29 = 0; _i29 < arrayOrStylesheet.length; _i29++) {
5036
+ validate(arrayOrStylesheet[_i29]);
4885
5037
  }
4886
5038
  } else if (!isFunction$1(arrayOrStylesheet)) {
4887
5039
  // function assumed to be a stylesheet factory
@@ -5014,17 +5166,17 @@
5014
5166
  return a.idx - b.idx;
5015
5167
  });
5016
5168
  rehydrateQueue = []; // reset to a new queue
5017
- for (var _i29 = 0, len = vms.length; _i29 < len; _i29 += 1) {
5018
- var vm = vms[_i29];
5169
+ for (var _i30 = 0, len = vms.length; _i30 < len; _i30 += 1) {
5170
+ var vm = vms[_i30];
5019
5171
  try {
5020
5172
  rehydrate(vm);
5021
5173
  } catch (error) {
5022
- if (_i29 + 1 < len) {
5174
+ if (_i30 + 1 < len) {
5023
5175
  // pieces of the queue are still pending to be rehydrated, those should have priority
5024
5176
  if (rehydrateQueue.length === 0) {
5025
5177
  addCallbackToNextTick(flushRehydrationQueue);
5026
5178
  }
5027
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i29 + 1));
5179
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i30 + 1));
5028
5180
  }
5029
5181
  // we need to end the measure before throwing.
5030
5182
  logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
@@ -5090,8 +5242,8 @@
5090
5242
  var vCustomElementCollection = vm.velements;
5091
5243
  // Reporting disconnection for every child in inverse order since they are
5092
5244
  // inserted in reserved order.
5093
- for (var _i30 = vCustomElementCollection.length - 1; _i30 >= 0; _i30 -= 1) {
5094
- var elm = vCustomElementCollection[_i30].elm;
5245
+ for (var _i31 = vCustomElementCollection.length - 1; _i31 >= 0; _i31 -= 1) {
5246
+ var elm = vCustomElementCollection[_i31].elm;
5095
5247
  // There are two cases where the element could be undefined:
5096
5248
  // * when there is an error during the construction phase, and an error
5097
5249
  // boundary picks it, there is a possibility that the VCustomElement
@@ -5122,8 +5274,8 @@
5122
5274
  * defined on its shadow.
5123
5275
  */
5124
5276
  function recursivelyDisconnectChildren(vnodes) {
5125
- for (var _i31 = 0, len = vnodes.length; _i31 < len; _i31 += 1) {
5126
- var vnode = vnodes[_i31];
5277
+ for (var _i32 = 0, len = vnodes.length; _i32 < len; _i32 += 1) {
5278
+ var vnode = vnodes[_i32];
5127
5279
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
5128
5280
  switch (vnode.type) {
5129
5281
  case 2 /* VNodeType.Element */:
@@ -5156,8 +5308,8 @@
5156
5308
  function recursivelyRemoveChildren(vnodes, vm) {
5157
5309
  var renderRoot = vm.renderRoot,
5158
5310
  remove = vm.renderer.remove;
5159
- for (var _i32 = 0, len = vnodes.length; _i32 < len; _i32 += 1) {
5160
- var vnode = vnodes[_i32];
5311
+ for (var _i33 = 0, len = vnodes.length; _i33 < len; _i33 += 1) {
5312
+ var vnode = vnodes[_i33];
5161
5313
  if (!isNull(vnode)) {
5162
5314
  // VFragments are special; their .elm property does not point to the root element since they have no single root.
5163
5315
  if (isVFragment(vnode)) {
@@ -5266,17 +5418,17 @@
5266
5418
  // if our id is null or empty, nobody can reference us
5267
5419
  return;
5268
5420
  }
5269
- var _iterator5 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
5270
- _step5;
5421
+ var _iterator10 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
5422
+ _step10;
5271
5423
  try {
5272
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
5273
- var idRefAttrName = _step5.value;
5424
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
5425
+ var idRefAttrName = _step10.value;
5274
5426
  // Query all global elements with this attribute. The attribute selector syntax `~=` is for values
5275
5427
  // that reference multiple IDs, separated by whitespace.
5276
5428
  var query = "[".concat(idRefAttrName, "~=\"").concat(CSS.escape(attrValue), "\"]");
5277
5429
  var sourceElements = querySelectorAll.call(document, query);
5278
- for (var _i33 = 0; _i33 < sourceElements.length; _i33++) {
5279
- var sourceElement = sourceElements[_i33];
5430
+ for (var _i34 = 0; _i34 < sourceElements.length; _i34++) {
5431
+ var sourceElement = sourceElements[_i34];
5280
5432
  var sourceRoot = sourceElement.getRootNode();
5281
5433
  if (sourceRoot !== root) {
5282
5434
  reportViolation$1(sourceElement, elm, idRefAttrName);
@@ -5285,18 +5437,18 @@
5285
5437
  }
5286
5438
  }
5287
5439
  } catch (err) {
5288
- _iterator5.e(err);
5440
+ _iterator10.e(err);
5289
5441
  } finally {
5290
- _iterator5.f();
5442
+ _iterator10.f();
5291
5443
  }
5292
5444
  } else {
5293
5445
  // elm is the source, find the target
5294
5446
  var ids = parseIdRefAttributeValue(attrValue);
5295
- var _iterator6 = _createForOfIteratorHelper(ids),
5296
- _step6;
5447
+ var _iterator11 = _createForOfIteratorHelper(ids),
5448
+ _step11;
5297
5449
  try {
5298
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
5299
- var id = _step6.value;
5450
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
5451
+ var id = _step11.value;
5300
5452
  var target = getElementById.call(document, id);
5301
5453
  if (!isNull(target)) {
5302
5454
  var targetRoot = target.getRootNode();
@@ -5307,9 +5459,9 @@
5307
5459
  }
5308
5460
  }
5309
5461
  } catch (err) {
5310
- _iterator6.e(err);
5462
+ _iterator11.e(err);
5311
5463
  } finally {
5312
- _iterator6.f();
5464
+ _iterator11.f();
5313
5465
  }
5314
5466
  }
5315
5467
  }
@@ -5434,11 +5586,11 @@
5434
5586
  function enableDetection() {
5435
5587
  var _Element = Element,
5436
5588
  prototype = _Element.prototype;
5437
- var _iterator7 = _createForOfIteratorHelper(NON_STANDARD_ARIA_PROPS),
5438
- _step7;
5589
+ var _iterator12 = _createForOfIteratorHelper(NON_STANDARD_ARIA_PROPS),
5590
+ _step12;
5439
5591
  try {
5440
5592
  var _loop3 = function _loop3() {
5441
- var prop = _step7.value;
5593
+ var prop = _step12.value;
5442
5594
  var descriptor = getOwnPropertyDescriptor$1(prototype, prop);
5443
5595
  // The descriptor should exist because the @lwc/aria-reflection polyfill has run by now.
5444
5596
  // This happens automatically because of the ordering of imports.
@@ -5459,13 +5611,13 @@
5459
5611
  enumerable: true
5460
5612
  });
5461
5613
  };
5462
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
5614
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
5463
5615
  _loop3();
5464
5616
  }
5465
5617
  } catch (err) {
5466
- _iterator7.e(err);
5618
+ _iterator12.e(err);
5467
5619
  } finally {
5468
- _iterator7.f();
5620
+ _iterator12.f();
5469
5621
  }
5470
5622
  }
5471
5623
  // No point in running this code if we're not in a browser, or if the global polyfill is not loaded
@@ -5627,8 +5779,8 @@
5627
5779
  var nextNode = node;
5628
5780
  var anchor = null;
5629
5781
  var renderer = owner.renderer;
5630
- for (var _i34 = 0; _i34 < children.length; _i34++) {
5631
- var childVnode = children[_i34];
5782
+ for (var _i35 = 0; _i35 < children.length; _i35++) {
5783
+ var childVnode = children[_i35];
5632
5784
  if (!isNull(childVnode)) {
5633
5785
  if (nextNode) {
5634
5786
  nextNode = hydrateNode(nextNode, childVnode, renderer);
@@ -5702,8 +5854,8 @@
5702
5854
  var nodesAreCompatible = true;
5703
5855
  // Validate attributes, though we could always recovery from those by running the update mods.
5704
5856
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
5705
- for (var _i35 = 0, _Object$entries = Object.entries(attrs); _i35 < _Object$entries.length; _i35++) {
5706
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i35], 2),
5857
+ for (var _i36 = 0, _Object$entries = Object.entries(attrs); _i36 < _Object$entries.length; _i36++) {
5858
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i36], 2),
5707
5859
  attrName = _Object$entries$_i[0],
5708
5860
  attrValue = _Object$entries$_i[1];
5709
5861
  vnode.owner;
@@ -5790,8 +5942,8 @@
5790
5942
  var parsedVnodeStyle = parseStyleText(elmStyle);
5791
5943
  var expectedStyle = [];
5792
5944
  // styleMap is used when style is set to static value.
5793
- for (var _i36 = 0, n = styleDecls.length; _i36 < n; _i36++) {
5794
- var _styleDecls$_i2 = _slicedToArray(styleDecls[_i36], 3),
5945
+ for (var _i37 = 0, n = styleDecls.length; _i37 < n; _i37++) {
5946
+ var _styleDecls$_i2 = _slicedToArray(styleDecls[_i37], 3),
5795
5947
  prop = _styleDecls$_i2[0],
5796
5948
  value = _styleDecls$_i2[1],
5797
5949
  important = _styleDecls$_i2[2];
@@ -5910,11 +6062,11 @@
5910
6062
  function warnOnArrayMutation(stylesheets) {
5911
6063
  // We can't handle users calling Array.prototype.slice.call(tmpl.stylesheets), but
5912
6064
  // we can at least warn when they use the most common mutation methods.
5913
- var _iterator8 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
5914
- _step8;
6065
+ var _iterator13 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
6066
+ _step13;
5915
6067
  try {
5916
6068
  var _loop4 = function _loop4() {
5917
- var prop = _step8.value;
6069
+ var prop = _step13.value;
5918
6070
  var originalArrayMethod = getOriginalArrayMethod(prop);
5919
6071
  stylesheets[prop] = function arrayMutationWarningWrapper() {
5920
6072
  reportTemplateViolation('stylesheets');
@@ -5922,23 +6074,23 @@
5922
6074
  return originalArrayMethod.apply(this, arguments);
5923
6075
  };
5924
6076
  };
5925
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
6077
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
5926
6078
  _loop4();
5927
6079
  }
5928
6080
  } catch (err) {
5929
- _iterator8.e(err);
6081
+ _iterator13.e(err);
5930
6082
  } finally {
5931
- _iterator8.f();
6083
+ _iterator13.f();
5932
6084
  }
5933
6085
  }
5934
6086
  // Warn if the user tries to mutate a stylesheet factory function, e.g.:
5935
6087
  // `stylesheet.$scoped$ = true`
5936
6088
  function warnOnStylesheetFunctionMutation(stylesheet) {
5937
- var _iterator9 = _createForOfIteratorHelper(STYLESHEET_PROPS),
5938
- _step9;
6089
+ var _iterator14 = _createForOfIteratorHelper(STYLESHEET_PROPS),
6090
+ _step14;
5939
6091
  try {
5940
6092
  var _loop5 = function _loop5() {
5941
- var prop = _step9.value;
6093
+ var prop = _step14.value;
5942
6094
  var value = stylesheet[prop];
5943
6095
  defineProperty(stylesheet, prop, {
5944
6096
  enumerable: true,
@@ -5952,13 +6104,13 @@
5952
6104
  }
5953
6105
  });
5954
6106
  };
5955
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
6107
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
5956
6108
  _loop5();
5957
6109
  }
5958
6110
  } catch (err) {
5959
- _iterator9.e(err);
6111
+ _iterator14.e(err);
5960
6112
  } finally {
5961
- _iterator9.f();
6113
+ _iterator14.f();
5962
6114
  }
5963
6115
  }
5964
6116
  // Warn on either array or stylesheet (function) mutation, in a deeply-nested array
@@ -5980,8 +6132,8 @@
5980
6132
  // Deep-traverse an array (of arrays) of stylesheet factory functions, and call the callback for every array/function
5981
6133
  function traverseStylesheets(stylesheets, callback) {
5982
6134
  callback(stylesheets);
5983
- for (var _i37 = 0; _i37 < stylesheets.length; _i37++) {
5984
- var stylesheet = stylesheets[_i37];
6135
+ for (var _i38 = 0; _i38 < stylesheets.length; _i38++) {
6136
+ var stylesheet = stylesheets[_i38];
5985
6137
  if (isArray$1(stylesheet)) {
5986
6138
  traverseStylesheets(stylesheet, callback);
5987
6139
  } else {
@@ -5993,11 +6145,11 @@
5993
6145
  if (!isUndefined$1(tmpl.stylesheets)) {
5994
6146
  trackStylesheetsMutation(tmpl.stylesheets);
5995
6147
  }
5996
- var _iterator10 = _createForOfIteratorHelper(TEMPLATE_PROPS),
5997
- _step10;
6148
+ var _iterator15 = _createForOfIteratorHelper(TEMPLATE_PROPS),
6149
+ _step15;
5998
6150
  try {
5999
6151
  var _loop6 = function _loop6() {
6000
- var prop = _step10.value;
6152
+ var prop = _step15.value;
6001
6153
  var value = tmpl[prop];
6002
6154
  defineProperty(tmpl, prop, {
6003
6155
  enumerable: true,
@@ -6013,13 +6165,13 @@
6013
6165
  }
6014
6166
  });
6015
6167
  };
6016
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
6168
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
6017
6169
  _loop6();
6018
6170
  }
6019
6171
  } catch (err) {
6020
- _iterator10.e(err);
6172
+ _iterator15.e(err);
6021
6173
  } finally {
6022
- _iterator10.f();
6174
+ _iterator15.f();
6023
6175
  }
6024
6176
  var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
6025
6177
  defineProperty(tmpl, 'stylesheetTokens', {
@@ -6458,7 +6610,7 @@
6458
6610
  function isNull(obj) {
6459
6611
  return obj === null;
6460
6612
  }
6461
- /** version: 2.38.1 */
6613
+ /** version: 2.39.0 */
6462
6614
 
6463
6615
  /*
6464
6616
  * Copyright (c) 2023, salesforce.com, inc.
@@ -6469,10 +6621,10 @@
6469
6621
  var WireContextSubscriptionEvent = /*#__PURE__*/function (_CustomEvent) {
6470
6622
  _inherits(WireContextSubscriptionEvent, _CustomEvent);
6471
6623
  var _super6 = _createSuper(WireContextSubscriptionEvent);
6472
- function WireContextSubscriptionEvent(adapterToken, _ref6) {
6624
+ function WireContextSubscriptionEvent(adapterToken, _ref5) {
6473
6625
  var _this3;
6474
- var setNewContext = _ref6.setNewContext,
6475
- setDisconnectedCallback = _ref6.setDisconnectedCallback;
6626
+ var setNewContext = _ref5.setNewContext,
6627
+ setDisconnectedCallback = _ref5.setDisconnectedCallback;
6476
6628
  _classCallCheck(this, WireContextSubscriptionEvent);
6477
6629
  _this3 = _super6.call(this, adapterToken, {
6478
6630
  bubbles: true,
@@ -6556,17 +6708,17 @@
6556
6708
  exports.createFragment = function (html) {
6557
6709
  var wrapperTags = topLevelWrappingMap[getTagName(html)];
6558
6710
  if (!isUndefined(wrapperTags)) {
6559
- var _iterator11 = _createForOfIteratorHelper(wrapperTags),
6560
- _step11;
6711
+ var _iterator16 = _createForOfIteratorHelper(wrapperTags),
6712
+ _step16;
6561
6713
  try {
6562
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
6563
- var wrapperTag = _step11.value;
6714
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
6715
+ var wrapperTag = _step16.value;
6564
6716
  html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
6565
6717
  }
6566
6718
  } catch (err) {
6567
- _iterator11.e(err);
6719
+ _iterator16.e(err);
6568
6720
  } finally {
6569
- _iterator11.f();
6721
+ _iterator16.f();
6570
6722
  }
6571
6723
  }
6572
6724
  // For IE11, the document title must not be undefined, but it can be an empty string
@@ -6575,7 +6727,7 @@
6575
6727
  doc.body.innerHTML = html;
6576
6728
  var content = doc.body;
6577
6729
  if (!isUndefined(wrapperTags)) {
6578
- for (var _i38 = 0; _i38 < wrapperTags.length; _i38++) {
6730
+ for (var _i39 = 0; _i39 < wrapperTags.length; _i39++) {
6579
6731
  content = content.firstChild;
6580
6732
  }
6581
6733
  }
@@ -6774,8 +6926,8 @@
6774
6926
  tagName: element.tagName.toLowerCase(),
6775
6927
  hydrated: true
6776
6928
  });
6777
- for (var _i39 = 0, _Object$entries2 = Object.entries(props); _i39 < _Object$entries2.length; _i39++) {
6778
- var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i39], 2),
6929
+ for (var _i40 = 0, _Object$entries2 = Object.entries(props); _i40 < _Object$entries2.length; _i40++) {
6930
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i40], 2),
6779
6931
  key = _Object$entries2$_i[0],
6780
6932
  value = _Object$entries2$_i[1];
6781
6933
  element[key] = value;
@@ -7093,7 +7245,7 @@
7093
7245
  });
7094
7246
  });
7095
7247
  }
7096
- /* version: 2.38.1 */
7248
+ /* version: 2.39.0 */
7097
7249
 
7098
7250
  exports.LightningElement = LightningElement;
7099
7251
  exports.__unstable__ProfilerControl = profilerControl;