lwc 2.35.0 → 2.35.2

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 (39) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +61 -134
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +61 -134
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +100 -74
  5. package/dist/engine-dom/iife/es5/engine-dom.js +249 -327
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +266 -244
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +61 -134
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +100 -74
  11. package/dist/engine-dom/umd/es5/engine-dom.js +249 -327
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +266 -244
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +47 -136
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +47 -136
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +11 -42
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +11 -42
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +8 -38
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +15 -44
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +12 -40
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +11 -42
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +8 -38
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +15 -44
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +12 -40
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  34. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  35. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  36. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  37. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  39. package/package.json +7 -7
@@ -18,16 +18,16 @@ var LWC = (function (exports) {
18
18
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
19
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
20
20
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
21
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22
22
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
24
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
23
26
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
27
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
25
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
26
29
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
30
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
28
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
29
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
30
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
31
31
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
32
32
  /* proxy-compat-disable */
33
33
  /**
@@ -59,10 +59,10 @@ var LWC = (function (exports) {
59
59
  }
60
60
  var assert = /*#__PURE__*/Object.freeze({
61
61
  __proto__: null,
62
+ fail: fail,
62
63
  invariant: invariant,
63
- isTrue: isTrue$1,
64
64
  isFalse: isFalse$1,
65
- fail: fail
65
+ isTrue: isTrue$1
66
66
  });
67
67
 
68
68
  /*
@@ -212,39 +212,11 @@ var LWC = (function (exports) {
212
212
  * SPDX-License-Identifier: MIT
213
213
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
214
214
  */
215
- // Inspired from: https://mathiasbynens.be/notes/globalthis
216
- var _globalThis = /*@__PURE__*/function () {
217
- // On recent browsers, `globalThis` is already defined. In this case return it directly.
218
- if ((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === 'object') {
219
- return globalThis;
220
- }
221
- var _globalThis;
222
- try {
223
- // eslint-disable-next-line no-extend-native
224
- Object.defineProperty(Object.prototype, '__magic__', {
225
- get: function get() {
226
- return this;
227
- },
228
- configurable: true
229
- });
230
- // __magic__ is undefined in Safari 10 and IE10 and older.
231
- // @ts-ignore
232
- // eslint-disable-next-line no-undef
233
- _globalThis = __magic__;
234
- // @ts-ignore
235
- delete Object.prototype.__magic__;
236
- } catch (ex) {
237
- // In IE8, Object.defineProperty only works on DOM objects.
238
- } finally {
239
- // If the magic above fails for some reason we assume that we are in a legacy browser.
240
- // Assume `window` exists in this case.
241
- if (typeof _globalThis === 'undefined') {
242
- // @ts-ignore
243
- _globalThis = window;
244
- }
245
- }
246
- return _globalThis;
247
- }();
215
+ // See browser support for globalThis:
216
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility
217
+ /* istanbul ignore next */
218
+ // @ts-ignore
219
+ var _globalThis = (typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === 'object' ? globalThis : window;
248
220
 
249
221
  /*
250
222
  * Copyright (c) 2018, salesforce.com, inc.
@@ -355,9 +327,9 @@ var LWC = (function (exports) {
355
327
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
356
328
  */
357
329
  // Increment whenever the LWC template compiler changes
358
- var LWC_VERSION = "2.35.0";
330
+ var LWC_VERSION = "2.35.2";
359
331
  var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
360
- /** version: 2.35.0 */
332
+ /** version: 2.35.2 */
361
333
 
362
334
  /**
363
335
  * Copyright (C) 2018 salesforce.com, inc.
@@ -411,7 +383,8 @@ var LWC = (function (exports) {
411
383
  console.warn("Failed to set the value \"".concat(value, "\" for the runtime feature flag \"").concat(name, "\" because it is undefined. Available flags: ").concat(availableFlags, "."));
412
384
  return;
413
385
  }
414
- if (process.env.NODE_ENV !== 'production') {
386
+ // This may seem redundant, but `process.env.NODE_ENV === 'test-karma-lwc'` is replaced by Karma tests
387
+ if (process.env.NODE_ENV === 'test-karma-lwc' || process.env.NODE_ENV !== 'production') {
415
388
  // Allow the same flag to be set more than once outside of production to enable testing
416
389
  lwcRuntimeFlags[name] = value;
417
390
  } else {
@@ -432,11 +405,12 @@ var LWC = (function (exports) {
432
405
  * purposes. It is a no-op when invoked in production mode.
433
406
  */
434
407
  function setFeatureFlagForTest(name, value) {
435
- if (process.env.NODE_ENV !== 'production') {
408
+ // This may seem redundant, but `process.env.NODE_ENV === 'test-karma-lwc'` is replaced by Karma tests
409
+ if (process.env.NODE_ENV === 'test-karma-lwc' || process.env.NODE_ENV !== 'production') {
436
410
  setFeatureFlag(name, value);
437
411
  }
438
412
  }
439
- /** version: 2.35.0 */
413
+ /** version: 2.35.2 */
440
414
 
441
415
  /**
442
416
  * Copyright (C) 2018 salesforce.com, inc.
@@ -500,7 +474,7 @@ var LWC = (function (exports) {
500
474
  }
501
475
  }
502
476
  }
503
- /** version: 2.35.0 */
477
+ /** version: 2.35.2 */
504
478
 
505
479
  /*
506
480
  * Copyright (c) 2018, salesforce.com, inc.
@@ -521,8 +495,7 @@ var LWC = (function (exports) {
521
495
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
522
496
  */
523
497
  // Only used in LWC's Karma tests
524
- // @ts-ignore
525
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
498
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
526
499
  window.addEventListener('test-dummy-flag', function () {
527
500
  var hasFlag = false;
528
501
  if (lwcRuntimeFlags.DUMMY_TEST_FLAG) {
@@ -546,8 +519,7 @@ var LWC = (function (exports) {
546
519
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
547
520
  */
548
521
  // Only used in LWC's Karma tests
549
- // @ts-ignore
550
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
522
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
551
523
  window.addEventListener('test-dummy-flag', function () {
552
524
  var hasFlag = false;
553
525
  if (lwcRuntimeFlags.DUMMY_TEST_FLAG) {
@@ -588,23 +560,15 @@ var LWC = (function (exports) {
588
560
  attachDispatcher: function attachDispatcher(dispatcher) {
589
561
  enabled$1 = true;
590
562
  currentDispatcher$1 = dispatcher;
591
- var _iterator = _createForOfIteratorHelper(onReportingEnabledCallbacks),
592
- _step;
593
- try {
594
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
595
- var callback = _step.value;
596
- try {
597
- callback();
598
- } catch (err) {
599
- // This should never happen. But if it does, we don't want one callback to cause another to fail
600
- // eslint-disable-next-line no-console
601
- console.error('Could not invoke callback', err);
602
- }
563
+ for (var _i3 = 0, _onReportingEnabledCa = onReportingEnabledCallbacks; _i3 < _onReportingEnabledCa.length; _i3++) {
564
+ var callback = _onReportingEnabledCa[_i3];
565
+ try {
566
+ callback();
567
+ } catch (err) {
568
+ // This should never happen. But if it does, we don't want one callback to cause another to fail
569
+ // eslint-disable-next-line no-console
570
+ console.error('Could not invoke callback', err);
603
571
  }
604
- } catch (err) {
605
- _iterator.e(err);
606
- } finally {
607
- _iterator.f();
608
572
  }
609
573
  onReportingEnabledCallbacks.length = 0; // clear the array
610
574
  },
@@ -695,8 +659,8 @@ var LWC = (function (exports) {
695
659
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
696
660
  */
697
661
  var alreadyLoggedMessages = new Set();
698
- // @ts-ignore
699
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
662
+ // Only used in LWC's Karma tests
663
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
700
664
  // @ts-ignore
701
665
  window.__lwcResetAlreadyLoggedMessages = function () {
702
666
  alreadyLoggedMessages.clear();
@@ -758,8 +722,8 @@ var LWC = (function (exports) {
758
722
  if (!isUndefined$1(reactiveRecord)) {
759
723
  var reactiveObservers = reactiveRecord[key];
760
724
  if (!isUndefined$1(reactiveObservers)) {
761
- for (var _i3 = 0, len = reactiveObservers.length; _i3 < len; _i3 += 1) {
762
- var ro = reactiveObservers[_i3];
725
+ for (var _i4 = 0, len = reactiveObservers.length; _i4 < len; _i4 += 1) {
726
+ var ro = reactiveObservers[_i4];
763
727
  ro.notify();
764
728
  }
765
729
  }
@@ -818,9 +782,9 @@ var LWC = (function (exports) {
818
782
  var listeners = this.listeners;
819
783
  var len = listeners.length;
820
784
  if (len > 0) {
821
- for (var _i4 = 0; _i4 < len; _i4 += 1) {
822
- var set = listeners[_i4];
823
- var pos = ArrayIndexOf.call(listeners[_i4], this);
785
+ for (var _i5 = 0; _i5 < len; _i5 += 1) {
786
+ var set = listeners[_i5];
787
+ var pos = ArrayIndexOf.call(listeners[_i5], this);
824
788
  ArraySplice.call(set, pos, 1);
825
789
  }
826
790
  listeners.length = 0;
@@ -877,8 +841,8 @@ var LWC = (function (exports) {
877
841
  }
878
842
  var callbacks = nextTickCallbackQueue;
879
843
  nextTickCallbackQueue = []; // reset to a new queue
880
- for (var _i5 = 0, len = callbacks.length; _i5 < len; _i5 += 1) {
881
- callbacks[_i5]();
844
+ for (var _i6 = 0, len = callbacks.length; _i6 < len; _i6 += 1) {
845
+ callbacks[_i6]();
882
846
  }
883
847
  }
884
848
  function addCallbackToNextTick(callback) {
@@ -905,11 +869,11 @@ var LWC = (function (exports) {
905
869
  function parseStyleText(cssText) {
906
870
  var styleMap = {};
907
871
  var declarations = cssText.split(DECLARATION_DELIMITER);
908
- var _iterator2 = _createForOfIteratorHelper(declarations),
909
- _step2;
872
+ var _iterator = _createForOfIteratorHelper(declarations),
873
+ _step;
910
874
  try {
911
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
912
- var declaration = _step2.value;
875
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
876
+ var declaration = _step.value;
913
877
  if (declaration) {
914
878
  var _declaration$split = declaration.split(PROPERTY_DELIMITER),
915
879
  _declaration$split2 = _slicedToArray(_declaration$split, 2),
@@ -921,17 +885,17 @@ var LWC = (function (exports) {
921
885
  }
922
886
  }
923
887
  } catch (err) {
924
- _iterator2.e(err);
888
+ _iterator.e(err);
925
889
  } finally {
926
- _iterator2.f();
890
+ _iterator.f();
927
891
  }
928
892
  return styleMap;
929
893
  }
930
894
  // Make a shallow copy of an object but omit the given key
931
895
  function cloneAndOmitKey(object, keyToOmit) {
932
896
  var result = {};
933
- for (var _i6 = 0, _Object$keys = Object.keys(object); _i6 < _Object$keys.length; _i6++) {
934
- var key = _Object$keys[_i6];
897
+ for (var _i7 = 0, _Object$keys = Object.keys(object); _i7 < _Object$keys.length; _i7++) {
898
+ var key = _Object$keys[_i7];
935
899
  if (key !== keyToOmit) {
936
900
  result[key] = object[key];
937
901
  }
@@ -940,11 +904,11 @@ var LWC = (function (exports) {
940
904
  }
941
905
  function flattenStylesheets(stylesheets) {
942
906
  var list = [];
943
- var _iterator3 = _createForOfIteratorHelper(stylesheets),
944
- _step3;
907
+ var _iterator2 = _createForOfIteratorHelper(stylesheets),
908
+ _step2;
945
909
  try {
946
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
947
- var stylesheet = _step3.value;
910
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
911
+ var stylesheet = _step2.value;
948
912
  if (!Array.isArray(stylesheet)) {
949
913
  list.push(stylesheet);
950
914
  } else {
@@ -952,9 +916,9 @@ var LWC = (function (exports) {
952
916
  }
953
917
  }
954
918
  } catch (err) {
955
- _iterator3.e(err);
919
+ _iterator2.e(err);
956
920
  } finally {
957
- _iterator3.f();
921
+ _iterator2.f();
958
922
  }
959
923
  return list;
960
924
  }
@@ -972,6 +936,14 @@ var LWC = (function (exports) {
972
936
  refVNodes[ref] = vnode;
973
937
  }
974
938
  }
939
+ // Throw an error if we're running in prod mode. Ensures code is truly removed from prod mode.
940
+ function assertNotProd() {
941
+ /* istanbul ignore if */
942
+ if (process.env.NODE_ENV === 'production') {
943
+ // this method should never leak to prod
944
+ throw new ReferenceError();
945
+ }
946
+ }
975
947
 
976
948
  /*
977
949
  * Copyright (c) 2020, salesforce.com, inc.
@@ -1167,27 +1139,18 @@ var LWC = (function (exports) {
1167
1139
  }
1168
1140
  var isDomMutationAllowed = false;
1169
1141
  function unlockDomMutation() {
1170
- if (process.env.NODE_ENV === 'production') {
1171
- // this method should never leak to prod
1172
- throw new ReferenceError();
1173
- }
1142
+ assertNotProd(); // this method should never leak to prod
1174
1143
  isDomMutationAllowed = true;
1175
1144
  }
1176
1145
  function lockDomMutation() {
1177
- if (process.env.NODE_ENV === 'production') {
1178
- // this method should never leak to prod
1179
- throw new ReferenceError();
1180
- }
1146
+ assertNotProd(); // this method should never leak to prod
1181
1147
  isDomMutationAllowed = false;
1182
1148
  }
1183
1149
  function logMissingPortalError(name, type) {
1184
1150
  return logError("The `".concat(name, "` ").concat(type, " is available only on elements that use the `lwc:dom=\"manual\"` directive."));
1185
1151
  }
1186
1152
  function patchElementWithRestrictions(elm, options) {
1187
- if (process.env.NODE_ENV === 'production') {
1188
- // this method should never leak to prod
1189
- throw new ReferenceError();
1190
- }
1153
+ assertNotProd(); // this method should never leak to prod
1191
1154
  var originalOuterHTMLDescriptor = getPropertyDescriptor(elm, 'outerHTML');
1192
1155
  var descriptors = {
1193
1156
  outerHTML: generateAccessorDescriptor({
@@ -1271,10 +1234,7 @@ var LWC = (function (exports) {
1271
1234
  defineProperties(elm, descriptors);
1272
1235
  }
1273
1236
  function getShadowRootRestrictionsDescriptors(sr) {
1274
- if (process.env.NODE_ENV === 'production') {
1275
- // this method should never leak to prod
1276
- throw new ReferenceError();
1277
- }
1237
+ assertNotProd(); // this method should never leak to prod
1278
1238
  // Disallowing properties in dev mode only to avoid people doing the wrong
1279
1239
  // thing when using the real shadow root, because if that's the case,
1280
1240
  // the component will not work when running with synthetic shadow.
@@ -1315,10 +1275,7 @@ var LWC = (function (exports) {
1315
1275
  // Custom Elements Restrictions:
1316
1276
  // -----------------------------
1317
1277
  function getCustomElementRestrictionsDescriptors(elm) {
1318
- if (process.env.NODE_ENV === 'production') {
1319
- // this method should never leak to prod
1320
- throw new ReferenceError();
1321
- }
1278
+ assertNotProd(); // this method should never leak to prod
1322
1279
  var originalAddEventListener = elm.addEventListener;
1323
1280
  var originalInnerHTMLDescriptor = getPropertyDescriptor(elm, 'innerHTML');
1324
1281
  var originalOuterHTMLDescriptor = getPropertyDescriptor(elm, 'outerHTML');
@@ -1363,10 +1320,7 @@ var LWC = (function (exports) {
1363
1320
  };
1364
1321
  }
1365
1322
  function getComponentRestrictionsDescriptors() {
1366
- if (process.env.NODE_ENV === 'production') {
1367
- // this method should never leak to prod
1368
- throw new ReferenceError();
1369
- }
1323
+ assertNotProd(); // this method should never leak to prod
1370
1324
  return {
1371
1325
  tagName: generateAccessorDescriptor({
1372
1326
  get: function get() {
@@ -1379,10 +1333,7 @@ var LWC = (function (exports) {
1379
1333
  }
1380
1334
 
1381
1335
  function getLightningElementPrototypeRestrictionsDescriptors(proto) {
1382
- if (process.env.NODE_ENV === 'production') {
1383
- // this method should never leak to prod
1384
- throw new ReferenceError();
1385
- }
1336
+ assertNotProd(); // this method should never leak to prod
1386
1337
  var originalDispatchEvent = proto.dispatchEvent;
1387
1338
  var descriptors = {
1388
1339
  dispatchEvent: generateDataDescriptor({
@@ -2209,7 +2160,6 @@ var LWC = (function (exports) {
2209
2160
  }
2210
2161
  };
2211
2162
  }
2212
- var EMPTY_REFS = freeze(create(null));
2213
2163
  var refsCache = new WeakMap();
2214
2164
  /**
2215
2165
  * This class is the base class for any LWC element.
@@ -2425,7 +2375,6 @@ var LWC = (function (exports) {
2425
2375
  warnIfInvokedDuringConstruction(vm, 'refs');
2426
2376
  }
2427
2377
  var refVNodes = vm.refVNodes,
2428
- hasRefVNodes = vm.hasRefVNodes,
2429
2378
  cmpTemplate = vm.cmpTemplate;
2430
2379
  // If the `cmpTemplate` is null, that means that the template has not been rendered yet. Most likely this occurs
2431
2380
  // if `this.refs` is called during the `connectedCallback` phase. The DOM elements have not been rendered yet,
@@ -2438,15 +2387,9 @@ var LWC = (function (exports) {
2438
2387
  // were introduced, we return undefined if the template has no refs defined
2439
2388
  // anywhere. This fixes components that may want to add an expando called `refs`
2440
2389
  // and are checking if it exists with `if (this.refs)` before adding it.
2441
- // Note it is not sufficient to just check if `refVNodes` is null or empty,
2442
- // because a template may have `lwc:ref` defined within a falsy `if:true` block.
2443
- if (!hasRefVNodes) {
2444
- return;
2445
- }
2446
- // For templates that are using `lwc:ref`, if there are no refs currently available
2447
- // (e.g. refs inside of a falsy `if:true` block), we return an empty object.
2390
+ // Note we use a null refVNodes to indicate that the template has no refs defined.
2448
2391
  if (isNull(refVNodes)) {
2449
- return EMPTY_REFS;
2392
+ return;
2450
2393
  }
2451
2394
  // The refNodes can be cached based on the refVNodes, since the refVNodes
2452
2395
  // are recreated from scratch every time the template is rendered.
@@ -2454,17 +2397,17 @@ var LWC = (function (exports) {
2454
2397
  var refs = refsCache.get(refVNodes);
2455
2398
  if (isUndefined$1(refs)) {
2456
2399
  refs = create(null);
2457
- var _iterator4 = _createForOfIteratorHelper(keys(refVNodes)),
2458
- _step4;
2400
+ var _iterator3 = _createForOfIteratorHelper(keys(refVNodes)),
2401
+ _step3;
2459
2402
  try {
2460
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
2461
- var key = _step4.value;
2403
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
2404
+ var key = _step3.value;
2462
2405
  refs[key] = refVNodes[key].elm;
2463
2406
  }
2464
2407
  } catch (err) {
2465
- _iterator4.e(err);
2408
+ _iterator3.e(err);
2466
2409
  } finally {
2467
- _iterator4.f();
2410
+ _iterator3.f();
2468
2411
  }
2469
2412
  freeze(refs);
2470
2413
  refsCache.set(refVNodes, refs);
@@ -2546,7 +2489,7 @@ var LWC = (function (exports) {
2546
2489
  var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
2547
2490
  // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2548
2491
  var _loop = function _loop() {
2549
- var queryMethod = _queryMethods[_i7];
2492
+ var queryMethod = _queryMethods[_i8];
2550
2493
  queryAndChildGetterDescriptors[queryMethod] = {
2551
2494
  value: function value(arg) {
2552
2495
  var vm = getAssociatedVM(this);
@@ -2562,7 +2505,7 @@ var LWC = (function (exports) {
2562
2505
  writable: true
2563
2506
  };
2564
2507
  };
2565
- for (var _i7 = 0, _queryMethods = queryMethods; _i7 < _queryMethods.length; _i7++) {
2508
+ for (var _i8 = 0, _queryMethods = queryMethods; _i8 < _queryMethods.length; _i8++) {
2566
2509
  _loop();
2567
2510
  }
2568
2511
  defineProperties(LightningElement.prototype, queryAndChildGetterDescriptors);
@@ -2841,49 +2784,50 @@ var LWC = (function (exports) {
2841
2784
  }
2842
2785
  var wiredConnecting = context.wiredConnecting = [];
2843
2786
  var wiredDisconnecting = context.wiredDisconnecting = [];
2844
- for (var fieldNameOrMethod in wire) {
2787
+ var _loop2 = function _loop2() {
2845
2788
  var descriptor = wire[fieldNameOrMethod];
2846
2789
  var wireDef = WireMetaMap.get(descriptor);
2847
2790
  if (process.env.NODE_ENV !== 'production') {
2848
2791
  assert.invariant(wireDef, "Internal Error: invalid wire definition found.");
2849
2792
  }
2850
2793
  if (!isUndefined$1(wireDef)) {
2851
- (function () {
2852
- var _createConnector = createConnector(vm, fieldNameOrMethod, wireDef),
2853
- connector = _createConnector.connector,
2854
- computeConfigAndUpdate = _createConnector.computeConfigAndUpdate,
2855
- resetConfigWatcher = _createConnector.resetConfigWatcher;
2856
- var hasDynamicParams = wireDef.dynamic.length > 0;
2857
- ArrayPush$1.call(wiredConnecting, function () {
2858
- connector.connect();
2859
- if (!lwcRuntimeFlags.ENABLE_WIRE_SYNC_EMIT) {
2860
- if (hasDynamicParams) {
2861
- Promise.resolve().then(computeConfigAndUpdate);
2862
- return;
2863
- }
2794
+ var _createConnector = createConnector(vm, fieldNameOrMethod, wireDef),
2795
+ connector = _createConnector.connector,
2796
+ computeConfigAndUpdate = _createConnector.computeConfigAndUpdate,
2797
+ resetConfigWatcher = _createConnector.resetConfigWatcher;
2798
+ var hasDynamicParams = wireDef.dynamic.length > 0;
2799
+ ArrayPush$1.call(wiredConnecting, function () {
2800
+ connector.connect();
2801
+ if (!lwcRuntimeFlags.ENABLE_WIRE_SYNC_EMIT) {
2802
+ if (hasDynamicParams) {
2803
+ Promise.resolve().then(computeConfigAndUpdate);
2804
+ return;
2864
2805
  }
2865
- computeConfigAndUpdate();
2866
- });
2867
- ArrayPush$1.call(wiredDisconnecting, function () {
2868
- connector.disconnect();
2869
- resetConfigWatcher();
2870
- });
2871
- })();
2806
+ }
2807
+ computeConfigAndUpdate();
2808
+ });
2809
+ ArrayPush$1.call(wiredDisconnecting, function () {
2810
+ connector.disconnect();
2811
+ resetConfigWatcher();
2812
+ });
2872
2813
  }
2814
+ };
2815
+ for (var fieldNameOrMethod in wire) {
2816
+ _loop2();
2873
2817
  }
2874
2818
  }
2875
2819
  function connectWireAdapters(vm) {
2876
2820
  var wiredConnecting = vm.context.wiredConnecting;
2877
- for (var _i8 = 0, len = wiredConnecting.length; _i8 < len; _i8 += 1) {
2878
- wiredConnecting[_i8]();
2821
+ for (var _i9 = 0, len = wiredConnecting.length; _i9 < len; _i9 += 1) {
2822
+ wiredConnecting[_i9]();
2879
2823
  }
2880
2824
  }
2881
2825
  function disconnectWireAdapters(vm) {
2882
2826
  var wiredDisconnecting = vm.context.wiredDisconnecting;
2883
2827
  runWithBoundaryProtection(vm, vm, noop, function () {
2884
2828
  // job
2885
- for (var _i9 = 0, len = wiredDisconnecting.length; _i9 < len; _i9 += 1) {
2886
- wiredDisconnecting[_i9]();
2829
+ for (var _i10 = 0, len = wiredDisconnecting.length; _i10 < len; _i10 += 1) {
2830
+ wiredDisconnecting[_i10]();
2887
2831
  }
2888
2832
  }, noop);
2889
2833
  }
@@ -3217,8 +3161,8 @@ var LWC = (function (exports) {
3217
3161
  }
3218
3162
  }
3219
3163
  if (!isUndefined$1(fields)) {
3220
- for (var _i10 = 0, n = fields.length; _i10 < n; _i10++) {
3221
- var _fieldName2 = fields[_i10];
3164
+ for (var _i11 = 0, n = fields.length; _i11 < n; _i11++) {
3165
+ var _fieldName2 = fields[_i11];
3222
3166
  descriptor = getOwnPropertyDescriptor$1(proto, _fieldName2);
3223
3167
  if (process.env.NODE_ENV !== 'production') {
3224
3168
  validateObservedField(Ctor, _fieldName2, descriptor);
@@ -3266,8 +3210,8 @@ var LWC = (function (exports) {
3266
3210
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3267
3211
  */
3268
3212
  var warned = false;
3269
- // @ts-ignore
3270
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
3213
+ // Only used in LWC's Karma tests
3214
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
3271
3215
  // @ts-ignore
3272
3216
  window.__lwcResetWarnedOnVersionMismatch = function () {
3273
3217
  warned = false;
@@ -3440,8 +3384,8 @@ var LWC = (function (exports) {
3440
3384
  superObservedAttributes = _SuperClass$observedA === void 0 ? [] : _SuperClass$observedA;
3441
3385
  var descriptors = create(null);
3442
3386
  // expose getters and setters for each public props on the new Element Bridge
3443
- for (var _i11 = 0, len = props.length; _i11 < len; _i11 += 1) {
3444
- var _propName = props[_i11];
3387
+ for (var _i12 = 0, len = props.length; _i12 < len; _i12 += 1) {
3388
+ var _propName = props[_i12];
3445
3389
  attributeToPropMap[htmlPropertyToAttribute(_propName)] = _propName;
3446
3390
  descriptors[_propName] = {
3447
3391
  get: createGetter(_propName),
@@ -3451,8 +3395,8 @@ var LWC = (function (exports) {
3451
3395
  };
3452
3396
  }
3453
3397
  // expose public methods as props on the new Element Bridge
3454
- for (var _i12 = 0, _len = methods.length; _i12 < _len; _i12 += 1) {
3455
- var methodName = methods[_i12];
3398
+ for (var _i13 = 0, _len = methods.length; _i13 < _len; _i13 += 1) {
3399
+ var methodName = methods[_i13];
3456
3400
  descriptors[methodName] = {
3457
3401
  value: createMethodCaller(methodName),
3458
3402
  writable: true,
@@ -3566,10 +3510,7 @@ var LWC = (function (exports) {
3566
3510
  return canRefreshAllInstances;
3567
3511
  }
3568
3512
  function getTemplateOrSwappedTemplate(tpl) {
3569
- if (process.env.NODE_ENV === 'production') {
3570
- // this method should never leak to prod
3571
- throw new ReferenceError();
3572
- }
3513
+ assertNotProd(); // this method should never leak to prod
3573
3514
  var visited = new Set();
3574
3515
  while (swappedTemplateMap.has(tpl) && !visited.has(tpl)) {
3575
3516
  visited.add(tpl);
@@ -3578,10 +3519,7 @@ var LWC = (function (exports) {
3578
3519
  return tpl;
3579
3520
  }
3580
3521
  function getComponentOrSwappedComponent(Ctor) {
3581
- if (process.env.NODE_ENV === 'production') {
3582
- // this method should never leak to prod
3583
- throw new ReferenceError();
3584
- }
3522
+ assertNotProd(); // this method should never leak to prod
3585
3523
  var visited = new Set();
3586
3524
  while (swappedComponentMap.has(Ctor) && !visited.has(Ctor)) {
3587
3525
  visited.add(Ctor);
@@ -3590,10 +3528,7 @@ var LWC = (function (exports) {
3590
3528
  return Ctor;
3591
3529
  }
3592
3530
  function getStyleOrSwappedStyle(style) {
3593
- if (process.env.NODE_ENV === 'production') {
3594
- // this method should never leak to prod
3595
- throw new ReferenceError();
3596
- }
3531
+ assertNotProd(); // this method should never leak to prod
3597
3532
  var visited = new Set();
3598
3533
  while (swappedStyleMap.has(style) && !visited.has(style)) {
3599
3534
  visited.add(style);
@@ -3602,10 +3537,7 @@ var LWC = (function (exports) {
3602
3537
  return style;
3603
3538
  }
3604
3539
  function setActiveVM(vm) {
3605
- if (process.env.NODE_ENV === 'production') {
3606
- // this method should never leak to prod
3607
- throw new ReferenceError();
3608
- }
3540
+ assertNotProd(); // this method should never leak to prod
3609
3541
  // tracking active component
3610
3542
  var Ctor = vm.def.ctor;
3611
3543
  var componentVMs = activeComponents.get(Ctor);
@@ -3648,10 +3580,7 @@ var LWC = (function (exports) {
3648
3580
  }
3649
3581
  }
3650
3582
  function removeActiveVM(vm) {
3651
- if (process.env.NODE_ENV === 'production') {
3652
- // this method should never leak to prod
3653
- throw new ReferenceError();
3654
- }
3583
+ assertNotProd(); // this method should never leak to prod
3655
3584
  // tracking inactive component
3656
3585
  var Ctor = vm.def.ctor;
3657
3586
  var list = activeComponents.get(Ctor);
@@ -3996,8 +3925,8 @@ var LWC = (function (exports) {
3996
3925
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3997
3926
  var content = [];
3998
3927
  var root;
3999
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
4000
- var stylesheet = stylesheets[_i13];
3928
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
3929
+ var stylesheet = stylesheets[_i14];
4001
3930
  if (isArray$1(stylesheet)) {
4002
3931
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
4003
3932
  } else {
@@ -4105,8 +4034,8 @@ var LWC = (function (exports) {
4105
4034
  shadowMode = vm.shadowMode,
4106
4035
  insertStylesheet = vm.renderer.insertStylesheet;
4107
4036
  if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
4108
- for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
4109
- insertStylesheet(stylesheets[_i14]);
4037
+ for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
4038
+ insertStylesheet(stylesheets[_i15]);
4110
4039
  }
4111
4040
  } else if (vm.hydrated) {
4112
4041
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
@@ -4119,8 +4048,8 @@ var LWC = (function (exports) {
4119
4048
  var root = getNearestNativeShadowComponent(vm);
4120
4049
  // null root means a global style
4121
4050
  var target = isNull(root) ? undefined : root.shadowRoot;
4122
- for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
4123
- insertStylesheet(stylesheets[_i15], target);
4051
+ for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
4052
+ insertStylesheet(stylesheets[_i16], target);
4124
4053
  }
4125
4054
  }
4126
4055
  return null;
@@ -4434,8 +4363,8 @@ var LWC = (function (exports) {
4434
4363
  return;
4435
4364
  }
4436
4365
  var setCSSStyleProperty = renderer.setCSSStyleProperty;
4437
- for (var _i16 = 0; _i16 < styleDecls.length; _i16++) {
4438
- var _styleDecls$_i = _slicedToArray(styleDecls[_i16], 3),
4366
+ for (var _i17 = 0; _i17 < styleDecls.length; _i17++) {
4367
+ var _styleDecls$_i = _slicedToArray(styleDecls[_i17], 3),
4439
4368
  prop = _styleDecls$_i[0],
4440
4369
  value = _styleDecls$_i[1],
4441
4370
  important = _styleDecls$_i[2];
@@ -4917,8 +4846,8 @@ var LWC = (function (exports) {
4917
4846
  // If no VFragment is found in children, we don't need to traverse anything or mark the children dynamic and can return early.
4918
4847
  var nodeStack = [];
4919
4848
  var fragmentFound = false;
4920
- for (var _i17 = children.length - 1; _i17 > -1; _i17 -= 1) {
4921
- var child = children[_i17];
4849
+ for (var _i18 = children.length - 1; _i18 > -1; _i18 -= 1) {
4850
+ var child = children[_i18];
4922
4851
  ArrayPush$1.call(nodeStack, child);
4923
4852
  fragmentFound = fragmentFound || !!(child && isVFragment(child));
4924
4853
  }
@@ -4930,8 +4859,8 @@ var LWC = (function (exports) {
4930
4859
  if (!isNull(currentNode) && isVFragment(currentNode)) {
4931
4860
  var fChildren = currentNode.children;
4932
4861
  // Ignore the start and end text node delimiters
4933
- for (var _i18 = fChildren.length - 2; _i18 > 0; _i18 -= 1) {
4934
- ArrayPush$1.call(nodeStack, fChildren[_i18]);
4862
+ for (var _i19 = fChildren.length - 2; _i19 > 0; _i19 -= 1) {
4863
+ ArrayPush$1.call(nodeStack, fChildren[_i19]);
4935
4864
  }
4936
4865
  } else {
4937
4866
  ArrayPush$1.call(flattenedChildren, currentNode);
@@ -4970,8 +4899,8 @@ var LWC = (function (exports) {
4970
4899
  var oldSlotsMapping = vm.cmpSlots.slotAssignments;
4971
4900
  var cmpSlotsMapping = create(null);
4972
4901
  // Collect all slots into cmpSlotsMapping
4973
- for (var _i19 = 0, len = children.length; _i19 < len; _i19 += 1) {
4974
- var vnode = children[_i19];
4902
+ for (var _i20 = 0, len = children.length; _i20 < len; _i20 += 1) {
4903
+ var vnode = children[_i20];
4975
4904
  if (isNull(vnode)) {
4976
4905
  continue;
4977
4906
  }
@@ -4996,8 +4925,8 @@ var LWC = (function (exports) {
4996
4925
  markComponentAsDirty(vm);
4997
4926
  return;
4998
4927
  }
4999
- for (var _i20 = 0, _len2 = oldKeys.length; _i20 < _len2; _i20 += 1) {
5000
- var key = oldKeys[_i20];
4928
+ for (var _i21 = 0, _len2 = oldKeys.length; _i21 < _len2; _i21 += 1) {
4929
+ var key = oldKeys[_i21];
5001
4930
  if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
5002
4931
  markComponentAsDirty(vm);
5003
4932
  return;
@@ -5120,11 +5049,11 @@ var LWC = (function (exports) {
5120
5049
  if (oldStartIdx > oldEndIdx) {
5121
5050
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
5122
5051
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
5123
- var _i21 = newEndIdx;
5052
+ var _i22 = newEndIdx;
5124
5053
  var n;
5125
5054
  do {
5126
- n = newCh[++_i21];
5127
- } while (!isVNode(n) && _i21 < newChEnd);
5055
+ n = newCh[++_i22];
5056
+ } while (!isVNode(n) && _i22 < newChEnd);
5128
5057
  before = isVNode(n) ? n.elm : null;
5129
5058
  mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
5130
5059
  } else {
@@ -5149,9 +5078,9 @@ var LWC = (function (exports) {
5149
5078
  // if the old list is not empty, the new list MUST have the same
5150
5079
  // amount of nodes, that's why we call this static children
5151
5080
  var anchor = null;
5152
- for (var _i22 = c2Length - 1; _i22 >= 0; _i22 -= 1) {
5153
- var n1 = c1[_i22];
5154
- var n2 = c2[_i22];
5081
+ for (var _i23 = c2Length - 1; _i23 >= 0; _i23 -= 1) {
5082
+ var n1 = c1[_i23];
5083
+ var n2 = c2[_i23];
5155
5084
  if (n2 !== n1) {
5156
5085
  if (isVNode(n1)) {
5157
5086
  if (isVNode(n2)) {
@@ -5276,8 +5205,8 @@ var LWC = (function (exports) {
5276
5205
  if (!isUndefined$1(slotset) && !isUndefined$1(slotset.slotAssignments) && !isUndefined$1(slotset.slotAssignments[slotName]) && slotset.slotAssignments[slotName].length !== 0) {
5277
5206
  var newChildren = [];
5278
5207
  var slotAssignments = slotset.slotAssignments[slotName];
5279
- for (var _i23 = 0; _i23 < slotAssignments.length; _i23++) {
5280
- var vnode = slotAssignments[_i23];
5208
+ for (var _i24 = 0; _i24 < slotAssignments.length; _i24++) {
5209
+ var vnode = slotAssignments[_i24];
5281
5210
  if (!isNull(vnode)) {
5282
5211
  var assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
5283
5212
  // The only sniff test for a scoped <slot> element is the presence of `slotData`
@@ -5746,10 +5675,7 @@ var LWC = (function (exports) {
5746
5675
  vmBeingRendered = vm;
5747
5676
  }
5748
5677
  function validateSlots(vm, html) {
5749
- if (process.env.NODE_ENV === 'production') {
5750
- // this method should never leak to prod
5751
- throw new ReferenceError();
5752
- }
5678
+ assertNotProd(); // this method should never leak to prod
5753
5679
  var cmpSlots = vm.cmpSlots;
5754
5680
  var _html$slots = html.slots,
5755
5681
  slots = _html$slots === void 0 ? EmptyArray : _html$slots;
@@ -5802,23 +5728,23 @@ var LWC = (function (exports) {
5802
5728
  var classAttrToken = hasScopedStyles && hasStyleToken ? " class=\"".concat(stylesheetToken, "\"") : '';
5803
5729
  var attrToken = hasStyleToken && isSyntheticShadow ? ' ' + stylesheetToken : '';
5804
5730
  var htmlFragment = '';
5805
- for (var _i24 = 0, n = keys.length; _i24 < n; _i24++) {
5806
- switch (keys[_i24]) {
5731
+ for (var _i25 = 0, n = keys.length; _i25 < n; _i25++) {
5732
+ switch (keys[_i25]) {
5807
5733
  case 0:
5808
5734
  // styleToken in existing class attr
5809
- htmlFragment += strings[_i24] + classToken;
5735
+ htmlFragment += strings[_i25] + classToken;
5810
5736
  break;
5811
5737
  case 1:
5812
5738
  // styleToken for added class attr
5813
- htmlFragment += strings[_i24] + classAttrToken;
5739
+ htmlFragment += strings[_i25] + classAttrToken;
5814
5740
  break;
5815
5741
  case 2:
5816
5742
  // styleToken as attr
5817
- htmlFragment += strings[_i24] + attrToken;
5743
+ htmlFragment += strings[_i25] + attrToken;
5818
5744
  break;
5819
5745
  case 3:
5820
5746
  // ${1}${2}
5821
- htmlFragment += strings[_i24] + classAttrToken + attrToken;
5747
+ htmlFragment += strings[_i25] + classAttrToken + attrToken;
5822
5748
  break;
5823
5749
  }
5824
5750
  }
@@ -5898,9 +5824,7 @@ var LWC = (function (exports) {
5898
5824
  setActiveVM(vm);
5899
5825
  }
5900
5826
  // reset the refs; they will be set during the tmpl() instantiation
5901
- var hasRefVNodes = Boolean(html.hasRefs);
5902
- vm.hasRefVNodes = hasRefVNodes;
5903
- vm.refVNodes = hasRefVNodes ? create(null) : null;
5827
+ vm.refVNodes = html.hasRefs ? create(null) : null;
5904
5828
  // right before producing the vnodes, we clear up all internal references
5905
5829
  // to custom elements from the template.
5906
5830
  vm.velements = [];
@@ -5925,8 +5849,8 @@ var LWC = (function (exports) {
5925
5849
  }
5926
5850
  function computeHasScopedStylesInStylesheets(stylesheets) {
5927
5851
  if (hasStyles(stylesheets)) {
5928
- for (var _i25 = 0; _i25 < stylesheets.length; _i25++) {
5929
- if (isTrue(stylesheets[_i25][KEY__SCOPED_CSS])) {
5852
+ for (var _i26 = 0; _i26 < stylesheets.length; _i26++) {
5853
+ if (isTrue(stylesheets[_i26][KEY__SCOPED_CSS])) {
5930
5854
  return true;
5931
5855
  }
5932
5856
  }
@@ -6092,7 +6016,7 @@ var LWC = (function (exports) {
6092
6016
  var cmpEventListenerMap = new WeakMap();
6093
6017
  function getWrappedComponentsListener(vm, listener) {
6094
6018
  if (!isFunction$1(listener)) {
6095
- throw new TypeError(); // avoiding problems with non-valid listeners
6019
+ throw new TypeError('Expected an EventListener but received ' + _typeof(listener)); // avoiding problems with non-valid listeners
6096
6020
  }
6097
6021
 
6098
6022
  var wrappedListener = cmpEventListenerMap.get(listener);
@@ -6122,8 +6046,8 @@ var LWC = (function (exports) {
6122
6046
  if (process.env.NODE_ENV !== 'production') {
6123
6047
  assert.isTrue(isObject(service), "Invalid service declaration, ".concat(service, ": service must be an object"));
6124
6048
  }
6125
- for (var _i26 = 0; _i26 < hooks.length; ++_i26) {
6126
- var hookName = hooks[_i26];
6049
+ for (var _i27 = 0; _i27 < hooks.length; ++_i27) {
6050
+ var hookName = hooks[_i27];
6127
6051
  if (hookName in service) {
6128
6052
  var l = Services[hookName];
6129
6053
  if (isUndefined$1(l)) {
@@ -6140,8 +6064,8 @@ var LWC = (function (exports) {
6140
6064
  var component = vm.component,
6141
6065
  def = vm.def,
6142
6066
  context = vm.context;
6143
- for (var _i27 = 0, len = cbs.length; _i27 < len; ++_i27) {
6144
- cbs[_i27].call(undefined, component, {}, def, context);
6067
+ for (var _i28 = 0, len = cbs.length; _i28 < len; ++_i28) {
6068
+ cbs[_i28].call(undefined, component, {}, def, context);
6145
6069
  }
6146
6070
  }
6147
6071
 
@@ -6235,7 +6159,6 @@ var LWC = (function (exports) {
6235
6159
  mode: mode,
6236
6160
  owner: owner,
6237
6161
  refVNodes: null,
6238
- hasRefVNodes: false,
6239
6162
  children: EmptyArray,
6240
6163
  aChildren: EmptyArray,
6241
6164
  velements: EmptyArray,
@@ -6296,8 +6219,8 @@ var LWC = (function (exports) {
6296
6219
  var valid = true;
6297
6220
  var validate = function validate(arrayOrStylesheet) {
6298
6221
  if (isArray$1(arrayOrStylesheet)) {
6299
- for (var _i28 = 0; _i28 < arrayOrStylesheet.length; _i28++) {
6300
- validate(arrayOrStylesheet[_i28]);
6222
+ for (var _i29 = 0; _i29 < arrayOrStylesheet.length; _i29++) {
6223
+ validate(arrayOrStylesheet[_i29]);
6301
6224
  }
6302
6225
  } else if (!isFunction$1(arrayOrStylesheet)) {
6303
6226
  // function assumed to be a stylesheet factory
@@ -6450,17 +6373,17 @@ var LWC = (function (exports) {
6450
6373
  return a.idx - b.idx;
6451
6374
  });
6452
6375
  rehydrateQueue = []; // reset to a new queue
6453
- for (var _i29 = 0, len = vms.length; _i29 < len; _i29 += 1) {
6454
- var vm = vms[_i29];
6376
+ for (var _i30 = 0, len = vms.length; _i30 < len; _i30 += 1) {
6377
+ var vm = vms[_i30];
6455
6378
  try {
6456
6379
  rehydrate(vm);
6457
6380
  } catch (error) {
6458
- if (_i29 + 1 < len) {
6381
+ if (_i30 + 1 < len) {
6459
6382
  // pieces of the queue are still pending to be rehydrated, those should have priority
6460
6383
  if (rehydrateQueue.length === 0) {
6461
6384
  addCallbackToNextTick(flushRehydrationQueue);
6462
6385
  }
6463
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i29 + 1));
6386
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i30 + 1));
6464
6387
  }
6465
6388
  // we need to end the measure before throwing.
6466
6389
  logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
@@ -6529,8 +6452,8 @@ var LWC = (function (exports) {
6529
6452
  var vCustomElementCollection = vm.velements;
6530
6453
  // Reporting disconnection for every child in inverse order since they are
6531
6454
  // inserted in reserved order.
6532
- for (var _i30 = vCustomElementCollection.length - 1; _i30 >= 0; _i30 -= 1) {
6533
- var elm = vCustomElementCollection[_i30].elm;
6455
+ for (var _i31 = vCustomElementCollection.length - 1; _i31 >= 0; _i31 -= 1) {
6456
+ var elm = vCustomElementCollection[_i31].elm;
6534
6457
  // There are two cases where the element could be undefined:
6535
6458
  // * when there is an error during the construction phase, and an error
6536
6459
  // boundary picks it, there is a possibility that the VCustomElement
@@ -6561,8 +6484,8 @@ var LWC = (function (exports) {
6561
6484
  * defined on its shadow.
6562
6485
  */
6563
6486
  function recursivelyDisconnectChildren(vnodes) {
6564
- for (var _i31 = 0, len = vnodes.length; _i31 < len; _i31 += 1) {
6565
- var vnode = vnodes[_i31];
6487
+ for (var _i32 = 0, len = vnodes.length; _i32 < len; _i32 += 1) {
6488
+ var vnode = vnodes[_i32];
6566
6489
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
6567
6490
  switch (vnode.type) {
6568
6491
  case 2 /* VNodeType.Element */:
@@ -6586,8 +6509,8 @@ var LWC = (function (exports) {
6586
6509
  var children = vm.children,
6587
6510
  renderRoot = vm.renderRoot,
6588
6511
  remove = vm.renderer.remove;
6589
- for (var _i32 = 0, len = children.length; _i32 < len; _i32++) {
6590
- var child = children[_i32];
6512
+ for (var _i33 = 0, len = children.length; _i33 < len; _i33++) {
6513
+ var child = children[_i33];
6591
6514
  if (!isNull(child) && !isUndefined$1(child.elm)) {
6592
6515
  remove(child.elm, renderRoot);
6593
6516
  }
@@ -6709,17 +6632,17 @@ var LWC = (function (exports) {
6709
6632
  // if our id is null or empty, nobody can reference us
6710
6633
  return;
6711
6634
  }
6712
- var _iterator5 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
6713
- _step5;
6635
+ var _iterator4 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
6636
+ _step4;
6714
6637
  try {
6715
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
6716
- var idRefAttrName = _step5.value;
6638
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
6639
+ var idRefAttrName = _step4.value;
6717
6640
  // Query all global elements with this attribute. The attribute selector syntax `~=` is for values
6718
6641
  // that reference multiple IDs, separated by whitespace.
6719
6642
  var query = "[".concat(idRefAttrName, "~=\"").concat(CSS.escape(attrValue), "\"]");
6720
6643
  var sourceElements = querySelectorAll.call(document, query);
6721
- for (var _i33 = 0; _i33 < sourceElements.length; _i33++) {
6722
- var sourceElement = sourceElements[_i33];
6644
+ for (var _i34 = 0; _i34 < sourceElements.length; _i34++) {
6645
+ var sourceElement = sourceElements[_i34];
6723
6646
  var sourceRoot = sourceElement.getRootNode();
6724
6647
  if (sourceRoot !== root) {
6725
6648
  reportViolation(sourceElement, elm, idRefAttrName);
@@ -6728,18 +6651,18 @@ var LWC = (function (exports) {
6728
6651
  }
6729
6652
  }
6730
6653
  } catch (err) {
6731
- _iterator5.e(err);
6654
+ _iterator4.e(err);
6732
6655
  } finally {
6733
- _iterator5.f();
6656
+ _iterator4.f();
6734
6657
  }
6735
6658
  } else {
6736
6659
  // elm is the source, find the target
6737
6660
  var ids = parseIdRefAttributeValue(attrValue);
6738
- var _iterator6 = _createForOfIteratorHelper(ids),
6739
- _step6;
6661
+ var _iterator5 = _createForOfIteratorHelper(ids),
6662
+ _step5;
6740
6663
  try {
6741
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
6742
- var id = _step6.value;
6664
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
6665
+ var id = _step5.value;
6743
6666
  var target = getElementById.call(document, id);
6744
6667
  if (!isNull(target)) {
6745
6668
  var targetRoot = target.getRootNode();
@@ -6750,9 +6673,9 @@ var LWC = (function (exports) {
6750
6673
  }
6751
6674
  }
6752
6675
  } catch (err) {
6753
- _iterator6.e(err);
6676
+ _iterator5.e(err);
6754
6677
  } finally {
6755
- _iterator6.f();
6678
+ _iterator5.f();
6756
6679
  }
6757
6680
  }
6758
6681
  }
@@ -7054,8 +6977,8 @@ var LWC = (function (exports) {
7054
6977
  var nextNode = node;
7055
6978
  var anchor = null;
7056
6979
  var renderer = owner.renderer;
7057
- for (var _i34 = 0; _i34 < children.length; _i34++) {
7058
- var childVnode = children[_i34];
6980
+ for (var _i35 = 0; _i35 < children.length; _i35++) {
6981
+ var childVnode = children[_i35];
7059
6982
  if (!isNull(childVnode)) {
7060
6983
  if (nextNode) {
7061
6984
  nextNode = hydrateNode(nextNode, childVnode, renderer);
@@ -7133,8 +7056,8 @@ var LWC = (function (exports) {
7133
7056
  var nodesAreCompatible = true;
7134
7057
  // Validate attributes, though we could always recovery from those by running the update mods.
7135
7058
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
7136
- for (var _i35 = 0, _Object$entries = Object.entries(attrs); _i35 < _Object$entries.length; _i35++) {
7137
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i35], 2),
7059
+ for (var _i36 = 0, _Object$entries = Object.entries(attrs); _i36 < _Object$entries.length; _i36++) {
7060
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i36], 2),
7138
7061
  attrName = _Object$entries$_i[0],
7139
7062
  attrValue = _Object$entries$_i[1];
7140
7063
  var owner = vnode.owner;
@@ -7235,8 +7158,8 @@ var LWC = (function (exports) {
7235
7158
  var parsedVnodeStyle = parseStyleText(elmStyle);
7236
7159
  var expectedStyle = [];
7237
7160
  // styleMap is used when style is set to static value.
7238
- for (var _i36 = 0, n = styleDecls.length; _i36 < n; _i36++) {
7239
- var _styleDecls$_i2 = _slicedToArray(styleDecls[_i36], 3),
7161
+ for (var _i37 = 0, n = styleDecls.length; _i37 < n; _i37++) {
7162
+ var _styleDecls$_i2 = _slicedToArray(styleDecls[_i37], 3),
7240
7163
  prop = _styleDecls$_i2[0],
7241
7164
  value = _styleDecls$_i2[1],
7242
7165
  important = _styleDecls$_i2[2];
@@ -7353,11 +7276,11 @@ var LWC = (function (exports) {
7353
7276
  function warnOnArrayMutation(stylesheets) {
7354
7277
  // We can't handle users calling Array.prototype.slice.call(tmpl.stylesheets), but
7355
7278
  // we can at least warn when they use the most common mutation methods.
7356
- var _iterator7 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
7357
- _step7;
7279
+ var _iterator6 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
7280
+ _step6;
7358
7281
  try {
7359
- var _loop2 = function _loop2() {
7360
- var prop = _step7.value;
7282
+ var _loop3 = function _loop3() {
7283
+ var prop = _step6.value;
7361
7284
  var originalArrayMethod = getOriginalArrayMethod(prop);
7362
7285
  stylesheets[prop] = function arrayMutationWarningWrapper() {
7363
7286
  logError("Mutating the \"stylesheets\" array on a template function " + "is deprecated and may be removed in a future version of LWC.");
@@ -7365,24 +7288,24 @@ var LWC = (function (exports) {
7365
7288
  return originalArrayMethod.apply(this, arguments);
7366
7289
  };
7367
7290
  };
7368
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
7369
- _loop2();
7291
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
7292
+ _loop3();
7370
7293
  }
7371
7294
  } catch (err) {
7372
- _iterator7.e(err);
7295
+ _iterator6.e(err);
7373
7296
  } finally {
7374
- _iterator7.f();
7297
+ _iterator6.f();
7375
7298
  }
7376
7299
  }
7377
7300
  // Warn if the user tries to mutate a stylesheet factory function, e.g.:
7378
7301
  // `stylesheet.$scoped$ = true`
7379
7302
  function warnOnStylesheetFunctionMutation(stylesheet) {
7380
7303
  // We could warn on other properties, but in practice only certain expandos are meaningful to LWC at runtime
7381
- var _iterator8 = _createForOfIteratorHelper(STYLESHEET_FUNCTION_EXPANDOS),
7382
- _step8;
7304
+ var _iterator7 = _createForOfIteratorHelper(STYLESHEET_FUNCTION_EXPANDOS),
7305
+ _step7;
7383
7306
  try {
7384
- var _loop3 = function _loop3() {
7385
- var prop = _step8.value;
7307
+ var _loop4 = function _loop4() {
7308
+ var prop = _step7.value;
7386
7309
  var value = stylesheet[prop];
7387
7310
  defineProperty(stylesheet, prop, {
7388
7311
  enumerable: true,
@@ -7396,13 +7319,13 @@ var LWC = (function (exports) {
7396
7319
  }
7397
7320
  });
7398
7321
  };
7399
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
7400
- _loop3();
7322
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
7323
+ _loop4();
7401
7324
  }
7402
7325
  } catch (err) {
7403
- _iterator8.e(err);
7326
+ _iterator7.e(err);
7404
7327
  } finally {
7405
- _iterator8.f();
7328
+ _iterator7.f();
7406
7329
  }
7407
7330
  }
7408
7331
  // Warn on either array or stylesheet (function) mutation, in a deeply-nested array
@@ -7424,8 +7347,8 @@ var LWC = (function (exports) {
7424
7347
  // Deep-traverse an array (of arrays) of stylesheet factory functions, and call the callback for every array/function
7425
7348
  function traverseStylesheets(stylesheets, callback) {
7426
7349
  callback(stylesheets);
7427
- for (var _i37 = 0; _i37 < stylesheets.length; _i37++) {
7428
- var stylesheet = stylesheets[_i37];
7350
+ for (var _i38 = 0; _i38 < stylesheets.length; _i38++) {
7351
+ var stylesheet = stylesheets[_i38];
7429
7352
  if (isArray$1(stylesheet)) {
7430
7353
  traverseStylesheets(stylesheet, callback);
7431
7354
  } else {
@@ -7471,11 +7394,11 @@ var LWC = (function (exports) {
7471
7394
  if (!isUndefined$1(tmpl.stylesheets)) {
7472
7395
  warnOnStylesheetsMutation(tmpl.stylesheets);
7473
7396
  }
7474
- var _iterator9 = _createForOfIteratorHelper(TEMPLATE_PROPS),
7475
- _step9;
7397
+ var _iterator8 = _createForOfIteratorHelper(TEMPLATE_PROPS),
7398
+ _step8;
7476
7399
  try {
7477
- var _loop4 = function _loop4() {
7478
- var prop = _step9.value;
7400
+ var _loop5 = function _loop5() {
7401
+ var prop = _step8.value;
7479
7402
  var value = tmpl[prop];
7480
7403
  defineProperty(tmpl, prop, {
7481
7404
  enumerable: true,
@@ -7491,13 +7414,13 @@ var LWC = (function (exports) {
7491
7414
  }
7492
7415
  });
7493
7416
  };
7494
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
7495
- _loop4();
7417
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
7418
+ _loop5();
7496
7419
  }
7497
7420
  } catch (err) {
7498
- _iterator9.e(err);
7421
+ _iterator8.e(err);
7499
7422
  } finally {
7500
- _iterator9.f();
7423
+ _iterator8.f();
7501
7424
  }
7502
7425
  var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
7503
7426
  defineProperty(tmpl, 'stylesheetTokens', {
@@ -7538,7 +7461,7 @@ var LWC = (function (exports) {
7538
7461
  }
7539
7462
  return ctor;
7540
7463
  }
7541
- /* version: 2.35.0 */
7464
+ /* version: 2.35.2 */
7542
7465
 
7543
7466
  /*
7544
7467
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7642,8 +7565,7 @@ var LWC = (function (exports) {
7642
7565
  // Test utilities
7643
7566
  //
7644
7567
  // Only used in LWC's Karma tests
7645
- // @ts-ignore
7646
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
7568
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
7647
7569
  // @ts-ignore
7648
7570
  window.__lwcResetGlobalStylesheets = function () {
7649
7571
  stylesheetCache.clear();
@@ -7815,7 +7737,7 @@ var LWC = (function (exports) {
7815
7737
  var cachedConstructors = new Map();
7816
7738
  var elementsUpgradedOutsideLWC = new WeakSet();
7817
7739
  var elementBeingUpgradedByLWC = false;
7818
- // Creates a constructor that is intended to be used as a vanilla custom element, except that the upgradeCallback is
7740
+ // Creates a constructor that is intended to be used directly as a custom element, except that the upgradeCallback is
7819
7741
  // passed in to the constructor so LWC can reuse the same custom element constructor for multiple components.
7820
7742
  // Another benefit is that only LWC can create components that actually do anything – if you do
7821
7743
  // `customElements.define('x-foo')`, then you don't have access to the upgradeCallback, so it's a dummy custom element.
@@ -7864,7 +7786,7 @@ var LWC = (function (exports) {
7864
7786
  }
7865
7787
  return UpgradableConstructor;
7866
7788
  };
7867
- var createCustomElementVanilla = function createCustomElementVanilla(tagName, upgradeCallback, connectedCallback, disconnectedCallback) {
7789
+ var createCustomElementUsingUpgradableConstructor = function createCustomElementUsingUpgradableConstructor(tagName, upgradeCallback, connectedCallback, disconnectedCallback) {
7868
7790
  // use global custom elements registry
7869
7791
  var UpgradableConstructor = cachedConstructors.get(tagName);
7870
7792
  if (isUndefined$1(UpgradableConstructor)) {
@@ -7891,7 +7813,7 @@ var LWC = (function (exports) {
7891
7813
  */
7892
7814
  /**
7893
7815
  * Create a scoped registry, i.e. a function that can create custom elements whose tag names
7894
- * do not conflict with vanilla custom elements having the same tag name.
7816
+ * do not conflict with third-party custom elements having the same tag name.
7895
7817
  */
7896
7818
  function createScopedRegistry() {
7897
7819
  if (!hasCustomElements) {
@@ -8222,17 +8144,17 @@ var LWC = (function (exports) {
8222
8144
  function flushPendingWhenDefinedCallbacks(tagName, ctor) {
8223
8145
  var resolvers = pendingWhenDefinedCallbacks.get(tagName);
8224
8146
  if (!isUndefined$1(resolvers)) {
8225
- var _iterator10 = _createForOfIteratorHelper(resolvers),
8226
- _step10;
8147
+ var _iterator9 = _createForOfIteratorHelper(resolvers),
8148
+ _step9;
8227
8149
  try {
8228
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
8229
- var resolver = _step10.value;
8150
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
8151
+ var resolver = _step9.value;
8230
8152
  resolver(ctor);
8231
8153
  }
8232
8154
  } catch (err) {
8233
- _iterator10.e(err);
8155
+ _iterator9.e(err);
8234
8156
  } finally {
8235
- _iterator10.f();
8157
+ _iterator9.f();
8236
8158
  }
8237
8159
  }
8238
8160
  pendingWhenDefinedCallbacks.delete(tagName);
@@ -8282,11 +8204,11 @@ var LWC = (function (exports) {
8282
8204
  var awaiting = awaitingUpgrade.get(tagName);
8283
8205
  if (!isUndefined$1(awaiting)) {
8284
8206
  awaitingUpgrade.delete(tagName);
8285
- var _iterator11 = _createForOfIteratorHelper(awaiting),
8286
- _step11;
8207
+ var _iterator10 = _createForOfIteratorHelper(awaiting),
8208
+ _step10;
8287
8209
  try {
8288
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
8289
- var element = _step11.value;
8210
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
8211
+ var element = _step10.value;
8290
8212
  var registeredDefinition = pendingRegistryForElement.get(element);
8291
8213
  // At this point, registeredDefinition should never be undefined because awaitingUpgrade
8292
8214
  // is only populated when we haven't run internalUpgrade yet, and we only populate
@@ -8298,9 +8220,9 @@ var LWC = (function (exports) {
8298
8220
  }
8299
8221
  }
8300
8222
  } catch (err) {
8301
- _iterator11.e(err);
8223
+ _iterator10.e(err);
8302
8224
  } finally {
8303
- _iterator11.f();
8225
+ _iterator10.f();
8304
8226
  }
8305
8227
  }
8306
8228
  // If anyone called customElements.whenDefined() and is still waiting for a promise resolution, resolve now
@@ -8497,10 +8419,10 @@ var LWC = (function (exports) {
8497
8419
  * We have three modes for creating custom elements:
8498
8420
  *
8499
8421
  * 1. Compat (legacy) browser support (e.g. IE11). Totally custom, doesn't rely on native browser APIs.
8500
- * 2. "Vanilla" custom elements registry. This system actually still allows us to have two LWC components with the
8501
- * same tag name, via a simple trick: every custom element constructor we define in the registry is basically
8502
- * the same. It's essentially a dummy `class extends HTMLElement` that accepts an `upgradeCallback` in its
8503
- * constructor, which allows us to have completely customized functionality for different components.
8422
+ * 2. "Upgradable constructor" custom element. This allows us to have two LWC components with the same tag name,
8423
+ * via a trick: every custom element constructor we define in the registry is basically the same. It's essentially
8424
+ * a dummy `class extends HTMLElement` that accepts an `upgradeCallback` in its constructor ("upgradable
8425
+ * constructor"), which allows us to have completely customized functionality for different components.
8504
8426
  * 3. "Scoped" (or "pivot") custom elements. This relies on a sophisticated system that emulates the "scoped custom
8505
8427
  * elements registry" proposal, with support for avoiding conflicts in tag names both between LWC components and
8506
8428
  * between LWC components and third-party elements. This uses a similar trick to #2, but is much more complex
@@ -8511,8 +8433,8 @@ var LWC = (function (exports) {
8511
8433
  if (lwcRuntimeFlags.ENABLE_SCOPED_CUSTOM_ELEMENT_REGISTRY) {
8512
8434
  createCustomElement = createCustomElementScoped;
8513
8435
  } else {
8514
- // use global custom elements registry (vanilla)
8515
- createCustomElement = createCustomElementVanilla;
8436
+ // use the global registry, with an upgradable constructor for the defined custom element
8437
+ createCustomElement = createCustomElementUsingUpgradableConstructor;
8516
8438
  }
8517
8439
  } else {
8518
8440
  // no registry available here
@@ -8566,10 +8488,10 @@ var LWC = (function (exports) {
8566
8488
  }
8567
8489
  var assert = /*#__PURE__*/Object.freeze({
8568
8490
  __proto__: null,
8491
+ fail: fail,
8569
8492
  invariant: invariant,
8570
- isTrue: isTrue$1,
8571
8493
  isFalse: isFalse$1,
8572
- fail: fail
8494
+ isTrue: isTrue$1
8573
8495
  });
8574
8496
  function isUndefined(obj) {
8575
8497
  return obj === undefined;
@@ -8577,7 +8499,7 @@ var LWC = (function (exports) {
8577
8499
  function isNull(obj) {
8578
8500
  return obj === null;
8579
8501
  }
8580
- /** version: 2.35.0 */
8502
+ /** version: 2.35.2 */
8581
8503
 
8582
8504
  /*
8583
8505
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8636,17 +8558,17 @@ var LWC = (function (exports) {
8636
8558
  exports.createFragment = function (html) {
8637
8559
  var wrapperTags = topLevelWrappingMap[getTagName(html)];
8638
8560
  if (!isUndefined(wrapperTags)) {
8639
- var _iterator12 = _createForOfIteratorHelper(wrapperTags),
8640
- _step12;
8561
+ var _iterator11 = _createForOfIteratorHelper(wrapperTags),
8562
+ _step11;
8641
8563
  try {
8642
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
8643
- var wrapperTag = _step12.value;
8564
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
8565
+ var wrapperTag = _step11.value;
8644
8566
  html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
8645
8567
  }
8646
8568
  } catch (err) {
8647
- _iterator12.e(err);
8569
+ _iterator11.e(err);
8648
8570
  } finally {
8649
- _iterator12.f();
8571
+ _iterator11.f();
8650
8572
  }
8651
8573
  }
8652
8574
  // For IE11, the document title must not be undefined, but it can be an empty string
@@ -8655,7 +8577,7 @@ var LWC = (function (exports) {
8655
8577
  doc.body.innerHTML = html;
8656
8578
  var content = doc.body;
8657
8579
  if (!isUndefined(wrapperTags)) {
8658
- for (var _i38 = 0; _i38 < wrapperTags.length; _i38++) {
8580
+ for (var _i39 = 0; _i39 < wrapperTags.length; _i39++) {
8659
8581
  content = content.firstChild;
8660
8582
  }
8661
8583
  }
@@ -8848,8 +8770,8 @@ var LWC = (function (exports) {
8848
8770
  tagName: element.tagName.toLowerCase(),
8849
8771
  hydrated: true
8850
8772
  });
8851
- for (var _i39 = 0, _Object$entries2 = Object.entries(props); _i39 < _Object$entries2.length; _i39++) {
8852
- var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i39], 2),
8773
+ for (var _i40 = 0, _Object$entries2 = Object.entries(props); _i40 < _Object$entries2.length; _i40++) {
8774
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i40], 2),
8853
8775
  key = _Object$entries2$_i[0],
8854
8776
  value = _Object$entries2$_i[1];
8855
8777
  element[key] = value;
@@ -9143,7 +9065,7 @@ var LWC = (function (exports) {
9143
9065
  });
9144
9066
  freeze(LightningElement);
9145
9067
  seal(LightningElement.prototype);
9146
- /* version: 2.35.0 */
9068
+ /* version: 2.35.2 */
9147
9069
 
9148
9070
  exports.LightningElement = LightningElement;
9149
9071
  exports.__unstable__ProfilerControl = profilerControl;