@lwc/engine-core 8.12.0 → 8.12.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.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2024 Salesforce, Inc.
3
3
  */
4
- import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, seal, create, isAPIFeatureEnabled, isFunction as isFunction$1, keys, ArrayFilter, isObject, isArray as isArray$1, getOwnPropertyNames as getOwnPropertyNames$1, getOwnPropertySymbols as getOwnPropertySymbols$1, toString as toString$1, isString, ArrayIndexOf, ArrayPop, isFalse, isTrustedSignal, hasOwnProperty as hasOwnProperty$1, entries, AriaPropNameToAttrNameMap, getPropertyDescriptor, AriaAttrNameToPropNameMap, forEach, defineProperties, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, assign, assert, freeze, KEY__SYNTHETIC_MODE, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyDescriptors, htmlPropertyToAttribute, ArraySlice, ArrayMap, isTrue, KEY__SCOPED_CSS, KEY__NATIVE_ONLY_CSS, ArraySplice, flattenStylesheets, kebabCaseToCamelCase, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, StringSlice, SVG_NAMESPACE, KEY__SHADOW_STATIC, KEY__SHADOW_RESOLVER, ArraySome, isNumber, StringReplace, sanitizeHtmlContent, normalizeClass, ArraySort, ArrayFrom, htmlEscape, StringCharAt, LOWEST_API_VERSION, ArrayUnshift, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_QUERY_SELECTOR_ALL, ID_REFERENCING_ATTRIBUTES_SET, KEY__SHADOW_TOKEN, StringSplit, parseStyleText, arrayEvery, ArrayCopyWithin, ArrayFill, ArrayReverse, ArrayShift } from '@lwc/shared';
4
+ import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, seal, create, isAPIFeatureEnabled, isFunction as isFunction$1, keys, ArrayFilter, isObject, isArray as isArray$1, getOwnPropertyNames as getOwnPropertyNames$1, getOwnPropertySymbols as getOwnPropertySymbols$1, toString, isString, ArrayIndexOf, ArrayPop, isFalse, isTrustedSignal, hasOwnProperty as hasOwnProperty$1, entries, AriaPropNameToAttrNameMap, getPropertyDescriptor, AriaAttrNameToPropNameMap, forEach, REFLECTIVE_GLOBAL_PROPERTY_SET, defineProperties, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, assign, assert, freeze, KEY__SYNTHETIC_MODE, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyDescriptors, htmlPropertyToAttribute, ArraySlice, ArrayMap, isTrue, KEY__SCOPED_CSS, KEY__NATIVE_ONLY_CSS, ArraySplice, flattenStylesheets, kebabCaseToCamelCase, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, StringSlice, SVG_NAMESPACE, KEY__SHADOW_STATIC, KEY__SHADOW_RESOLVER, ArraySome, isNumber, StringReplace, sanitizeHtmlContent, normalizeClass, ArraySort, ArrayFrom, htmlEscape, StringCharAt, LOWEST_API_VERSION, ArrayUnshift, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_QUERY_SELECTOR_ALL, ID_REFERENCING_ATTRIBUTES_SET, KEY__SHADOW_TOKEN, StringSplit, parseStyleText, arrayEvery, ArrayCopyWithin, ArrayFill, ArrayReverse, ArrayShift } from '@lwc/shared';
5
5
  export { setHooks, setTrustedSignalSet } from '@lwc/shared';
6
6
  export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';
7
7
 
@@ -266,19 +266,19 @@ let mutationLogs = [];
266
266
  function toPrettyMemberNotation(parent, child) {
267
267
  if (isUndefined$1(parent)) {
268
268
  // Bare prop, just stringify the child
269
- return toString$1(child);
269
+ return toString(child);
270
270
  }
271
271
  else if (!isString(child)) {
272
272
  // Symbol/number, e.g. `obj[Symbol("foo")]` or `obj[1234]`
273
- return `${toString$1(parent)}[${toString$1(child)}]`;
273
+ return `${toString(parent)}[${toString(child)}]`;
274
274
  }
275
275
  else if (/^\w+$/.test(child)) {
276
276
  // Dot-notation-safe string, e.g. `obj.foo`
277
- return `${toString$1(parent)}.${child}`;
277
+ return `${toString(parent)}.${child}`;
278
278
  }
279
279
  else {
280
280
  // Bracket-notation-requiring string, e.g. `obj["prop with spaces"]`
281
- return `${toString$1(parent)}[${JSON.stringify(child)}]`;
281
+ return `${toString(parent)}[${JSON.stringify(child)}]`;
282
282
  }
283
283
  }
284
284
  function safelyCallGetter(target, key) {
@@ -767,7 +767,7 @@ const ariaDescriptor = (attrName) => ({
767
767
  this.removeAttribute(attrName);
768
768
  }
769
769
  else {
770
- this.setAttribute(attrName, toString$1(newValue));
770
+ this.setAttribute(attrName, toString(newValue));
771
771
  }
772
772
  }
773
773
  },
@@ -785,7 +785,7 @@ const tabIndexDescriptor = () => ({
785
785
  const num = Number(newValue);
786
786
  const normalizedValue = isFinite(num) ? String(Math.trunc(num)) : '0';
787
787
  if (normalizedValue !== currentValue) {
788
- this.setAttribute('tabindex', toString$1(newValue));
788
+ this.setAttribute('tabindex', toString(newValue));
789
789
  }
790
790
  },
791
791
  });
@@ -805,25 +805,6 @@ for (const [attrName, propName] of entries(AriaAttrNameToPropNameMap)) {
805
805
  descriptors[propName] = ariaDescriptor(attrName);
806
806
  }
807
807
 
808
- /*
809
- * Copyright (c) 2018, salesforce.com, inc.
810
- * All rights reserved.
811
- * SPDX-License-Identifier: MIT
812
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
813
- */
814
- // These properties get added to LWCElement.prototype publicProps automatically
815
- const defaultDefHTMLPropertyNames = [
816
- 'accessKey',
817
- 'dir',
818
- 'draggable',
819
- 'hidden',
820
- 'id',
821
- 'lang',
822
- 'spellcheck',
823
- 'tabIndex',
824
- 'title',
825
- ];
826
-
827
808
  /*
828
809
  * Copyright (c) 2018, salesforce.com, inc.
829
810
  * All rights reserved.
@@ -845,7 +826,7 @@ forEach.call(keys(AriaPropNameToAttrNameMap), (propName) => {
845
826
  HTMLElementOriginalDescriptors[propName] = descriptor;
846
827
  }
847
828
  });
848
- forEach.call(defaultDefHTMLPropertyNames, (propName) => {
829
+ for (const propName of REFLECTIVE_GLOBAL_PROPERTY_SET) {
849
830
  // Note: intentionally using our in-house getPropertyDescriptor instead of getOwnPropertyDescriptor here because
850
831
  // in IE11, id property is on Element.prototype instead of HTMLElement, and we suspect that more will fall into
851
832
  // this category, so, better to be sure.
@@ -853,7 +834,7 @@ forEach.call(defaultDefHTMLPropertyNames, (propName) => {
853
834
  if (!isUndefined$1(descriptor)) {
854
835
  HTMLElementOriginalDescriptors[propName] = descriptor;
855
836
  }
856
- });
837
+ }
857
838
 
858
839
  /*
859
840
  * Copyright (c) 2018, salesforce.com, inc.
@@ -1088,18 +1069,6 @@ function updateComponentValue(vm, key, newValue) {
1088
1069
  const { isArray } = Array;
1089
1070
  const { prototype: ObjectDotPrototype, getPrototypeOf, create: ObjectCreate, defineProperty: ObjectDefineProperty, isExtensible, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, preventExtensions, hasOwnProperty, } = Object;
1090
1071
  const { push: ArrayPush, concat: ArrayConcat } = Array.prototype;
1091
- const OtS = {}.toString;
1092
- function toString(obj) {
1093
- if (obj && obj.toString) {
1094
- return obj.toString();
1095
- }
1096
- else if (typeof obj === 'object') {
1097
- return OtS.call(obj);
1098
- }
1099
- else {
1100
- return obj + '';
1101
- }
1102
- }
1103
1072
  function isUndefined(obj) {
1104
1073
  return obj === undefined;
1105
1074
  }
@@ -1337,10 +1306,6 @@ class ReactiveProxyHandler extends BaseProxyHandler {
1337
1306
  return true;
1338
1307
  }
1339
1308
  setPrototypeOf(shadowTarget, prototype) {
1340
- /* istanbul ignore else */
1341
- if (process.env.NODE_ENV !== 'production') {
1342
- throw new Error(`Invalid setPrototypeOf invocation for reactive proxy ${toString(this.originalTarget)}. Prototype of reactive objects cannot be changed.`);
1343
- }
1344
1309
  }
1345
1310
  preventExtensions(shadowTarget) {
1346
1311
  if (isExtensible(shadowTarget)) {
@@ -1404,147 +1369,31 @@ class ReadOnlyHandler extends BaseProxyHandler {
1404
1369
  if (!isUndefined(wrappedSetter)) {
1405
1370
  return wrappedSetter;
1406
1371
  }
1407
- const handler = this;
1408
1372
  const set = function (v) {
1409
- /* istanbul ignore else */
1410
- if (process.env.NODE_ENV !== 'production') {
1411
- const { originalTarget } = handler;
1412
- throw new Error(`Invalid mutation: Cannot invoke a setter on "${originalTarget}". "${originalTarget}" is read-only.`);
1413
- }
1414
1373
  };
1415
1374
  setterMap.set(originalSet, set);
1416
1375
  return set;
1417
1376
  }
1418
1377
  set(shadowTarget, key, value) {
1419
- /* istanbul ignore else */
1420
- if (process.env.NODE_ENV !== 'production') {
1421
- const { originalTarget } = this;
1422
- const msg = isArray(originalTarget)
1423
- ? `Invalid mutation: Cannot mutate array at index ${key.toString()}. Array is read-only.`
1424
- : `Invalid mutation: Cannot set "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`;
1425
- throw new Error(msg);
1426
- }
1427
1378
  /* istanbul ignore next */
1428
1379
  return false;
1429
1380
  }
1430
1381
  deleteProperty(shadowTarget, key) {
1431
- /* istanbul ignore else */
1432
- if (process.env.NODE_ENV !== 'production') {
1433
- const { originalTarget } = this;
1434
- throw new Error(`Invalid mutation: Cannot delete "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`);
1435
- }
1436
1382
  /* istanbul ignore next */
1437
1383
  return false;
1438
1384
  }
1439
1385
  setPrototypeOf(shadowTarget, prototype) {
1440
- /* istanbul ignore else */
1441
- if (process.env.NODE_ENV !== 'production') {
1442
- const { originalTarget } = this;
1443
- throw new Error(`Invalid prototype mutation: Cannot set prototype on "${originalTarget}". "${originalTarget}" prototype is read-only.`);
1444
- }
1445
1386
  }
1446
1387
  preventExtensions(shadowTarget) {
1447
- /* istanbul ignore else */
1448
- if (process.env.NODE_ENV !== 'production') {
1449
- const { originalTarget } = this;
1450
- throw new Error(`Invalid mutation: Cannot preventExtensions on ${originalTarget}". "${originalTarget} is read-only.`);
1451
- }
1452
1388
  /* istanbul ignore next */
1453
1389
  return false;
1454
1390
  }
1455
1391
  defineProperty(shadowTarget, key, descriptor) {
1456
- /* istanbul ignore else */
1457
- if (process.env.NODE_ENV !== 'production') {
1458
- const { originalTarget } = this;
1459
- throw new Error(`Invalid mutation: Cannot defineProperty "${key.toString()}" on "${originalTarget}". "${originalTarget}" is read-only.`);
1460
- }
1461
1392
  /* istanbul ignore next */
1462
1393
  return false;
1463
1394
  }
1464
1395
  }
1465
1396
 
1466
- function extract(objectOrArray) {
1467
- if (isArray(objectOrArray)) {
1468
- return objectOrArray.map((item) => {
1469
- const original = unwrap$1(item);
1470
- if (original !== item) {
1471
- return extract(original);
1472
- }
1473
- return item;
1474
- });
1475
- }
1476
- const obj = ObjectCreate(getPrototypeOf(objectOrArray));
1477
- const names = getOwnPropertyNames(objectOrArray);
1478
- return ArrayConcat.call(names, getOwnPropertySymbols(objectOrArray)).reduce((seed, key) => {
1479
- const item = objectOrArray[key];
1480
- const original = unwrap$1(item);
1481
- if (original !== item) {
1482
- seed[key] = extract(original);
1483
- }
1484
- else {
1485
- seed[key] = item;
1486
- }
1487
- return seed;
1488
- }, obj);
1489
- }
1490
- const formatter = {
1491
- header: (plainOrProxy) => {
1492
- const originalTarget = unwrap$1(plainOrProxy);
1493
- // if originalTarget is falsy or not unwrappable, exit
1494
- if (!originalTarget || originalTarget === plainOrProxy) {
1495
- return null;
1496
- }
1497
- const obj = extract(plainOrProxy);
1498
- return ['object', { object: obj }];
1499
- },
1500
- hasBody: () => {
1501
- return false;
1502
- },
1503
- body: () => {
1504
- return null;
1505
- },
1506
- };
1507
- // Inspired from paulmillr/es6-shim
1508
- // https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L176-L185
1509
- /* istanbul ignore next */
1510
- function getGlobal() {
1511
- // the only reliable means to get the global object is `Function('return this')()`
1512
- // However, this causes CSP violations in Chrome apps.
1513
- if (typeof globalThis !== 'undefined') {
1514
- return globalThis;
1515
- }
1516
- if (typeof self !== 'undefined') {
1517
- return self;
1518
- }
1519
- if (typeof window !== 'undefined') {
1520
- return window;
1521
- }
1522
- if (typeof global !== 'undefined') {
1523
- return global;
1524
- }
1525
- // Gracefully degrade if not able to locate the global object
1526
- return {};
1527
- }
1528
- function init() {
1529
- /* istanbul ignore if */
1530
- if (process.env.NODE_ENV === 'production') {
1531
- // this method should never leak to prod
1532
- throw new ReferenceError();
1533
- }
1534
- const global = getGlobal();
1535
- // Custom Formatter for Dev Tools. To enable this, open Chrome Dev Tools
1536
- // - Go to Settings,
1537
- // - Under console, select "Enable custom formatters"
1538
- // For more information, https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview
1539
- const devtoolsFormatters = global.devtoolsFormatters || [];
1540
- ArrayPush.call(devtoolsFormatters, formatter);
1541
- global.devtoolsFormatters = devtoolsFormatters;
1542
- }
1543
-
1544
- /* istanbul ignore else */
1545
- if (process.env.NODE_ENV !== 'production') {
1546
- init();
1547
- }
1548
1397
  function defaultValueIsObservable(value) {
1549
1398
  // intentionally checking for null
1550
1399
  if (value === null) {
@@ -2551,7 +2400,7 @@ function createPublicPropertyDescriptor(key) {
2551
2400
  const vm = getAssociatedVM(this);
2552
2401
  if (isBeingConstructed(vm)) {
2553
2402
  if (process.env.NODE_ENV !== 'production') {
2554
- logError(`Can’t read the value of property \`${toString$1(key)}\` from the constructor because the owner component hasn’t set the value yet. Instead, use the constructor to set a default value for the property.`, vm);
2403
+ logError(`Can’t read the value of property \`${toString(key)}\` from the constructor because the owner component hasn’t set the value yet. Instead, use the constructor to set a default value for the property.`, vm);
2555
2404
  }
2556
2405
  return;
2557
2406
  }
@@ -2564,10 +2413,10 @@ function createPublicPropertyDescriptor(key) {
2564
2413
  if (process.env.NODE_ENV !== 'production') {
2565
2414
  const vmBeingRendered = getVMBeingRendered();
2566
2415
  if (isInvokingRender) {
2567
- logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2416
+ logError(`render() method has side effects on the state of property "${toString(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2568
2417
  }
2569
2418
  if (isUpdatingTemplate) {
2570
- logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2419
+ logError(`Updating the template has side effects on the state of property "${toString(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2571
2420
  }
2572
2421
  }
2573
2422
  vm.cmpProps[key] = newValue;
@@ -2579,7 +2428,7 @@ function createPublicPropertyDescriptor(key) {
2579
2428
  }
2580
2429
  function createPublicAccessorDescriptor(key, descriptor) {
2581
2430
  const { get, set, enumerable, configurable } = descriptor;
2582
- assert.invariant(isFunction$1(get), `Invalid public accessor ${toString$1(key)} decorated with @api. The property is missing a getter.`);
2431
+ assert.invariant(isFunction$1(get), `Invalid public accessor ${toString(key)} decorated with @api. The property is missing a getter.`);
2583
2432
  return {
2584
2433
  get() {
2585
2434
  if (process.env.NODE_ENV !== 'production') {
@@ -2593,17 +2442,17 @@ function createPublicAccessorDescriptor(key, descriptor) {
2593
2442
  if (process.env.NODE_ENV !== 'production') {
2594
2443
  const vmBeingRendered = getVMBeingRendered();
2595
2444
  if (isInvokingRender) {
2596
- logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2445
+ logError(`render() method has side effects on the state of property "${toString(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2597
2446
  }
2598
2447
  if (isUpdatingTemplate) {
2599
- logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2448
+ logError(`Updating the template has side effects on the state of property "${toString(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2600
2449
  }
2601
2450
  }
2602
2451
  if (set) {
2603
2452
  set.call(this, newValue);
2604
2453
  }
2605
2454
  else if (process.env.NODE_ENV !== 'production') {
2606
- logError(`Invalid attempt to set a new value for property "${toString$1(key)}" that does not has a setter decorated with @api.`, vm);
2455
+ logError(`Invalid attempt to set a new value for property "${toString(key)}" that does not has a setter decorated with @api.`, vm);
2607
2456
  }
2608
2457
  },
2609
2458
  enumerable,
@@ -2641,10 +2490,10 @@ function internalTrackDecorator(key) {
2641
2490
  if (process.env.NODE_ENV !== 'production') {
2642
2491
  const vmBeingRendered = getVMBeingRendered();
2643
2492
  if (isInvokingRender) {
2644
- logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2493
+ logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString(key)}`);
2645
2494
  }
2646
2495
  if (isUpdatingTemplate) {
2647
- logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2496
+ logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString(key)}`);
2648
2497
  }
2649
2498
  }
2650
2499
  const reactiveOrAnyValue = getReactiveProxy(newValue);
@@ -5518,7 +5367,7 @@ function ti(value) {
5518
5367
  if (process.env.NODE_ENV !== 'production') {
5519
5368
  const vmBeingRendered = getVMBeingRendered();
5520
5369
  if (shouldNormalize) {
5521
- logError(`Invalid tabindex value \`${toString$1(value)}\` in template for ${vmBeingRendered}. This attribute must be set to 0 or -1.`, vmBeingRendered);
5370
+ logError(`Invalid tabindex value \`${toString(value)}\` in template for ${vmBeingRendered}. This attribute must be set to 0 or -1.`, vmBeingRendered);
5522
5371
  }
5523
5372
  }
5524
5373
  return shouldNormalize ? 0 : value;
@@ -5679,16 +5528,16 @@ function i(iterable, factory) {
5679
5528
  const vmBeingRendered = getVMBeingRendered();
5680
5529
  if (isUndefined$1(iterable) || isNull(iterable)) {
5681
5530
  if (process.env.NODE_ENV !== 'production') {
5682
- logError(`Invalid template iteration for value \`${toString$1(iterable)}\` in ${vmBeingRendered}. It must be an array-like object.`, vmBeingRendered);
5531
+ logError(`Invalid template iteration for value \`${toString(iterable)}\` in ${vmBeingRendered}. It must be an array-like object.`, vmBeingRendered);
5683
5532
  }
5684
5533
  return list;
5685
5534
  }
5686
5535
  if (process.env.NODE_ENV !== 'production') {
5687
- assert.isFalse(isUndefined$1(iterable[SymbolIterator]), `Invalid template iteration for value \`${toString$1(iterable)}\` in ${vmBeingRendered}. It must be an array-like object.`);
5536
+ assert.isFalse(isUndefined$1(iterable[SymbolIterator]), `Invalid template iteration for value \`${toString(iterable)}\` in ${vmBeingRendered}. It must be an array-like object.`);
5688
5537
  }
5689
5538
  const iterator = iterable[SymbolIterator]();
5690
5539
  if (process.env.NODE_ENV !== 'production') {
5691
- assert.isTrue(iterator && isFunction$1(iterator.next), `Invalid iterator function for "${toString$1(iterable)}" in ${vmBeingRendered}.`);
5540
+ assert.isTrue(iterator && isFunction$1(iterator.next), `Invalid iterator function for "${toString(iterable)}" in ${vmBeingRendered}.`);
5692
5541
  }
5693
5542
  let next = iterator.next();
5694
5543
  let j = 0;
@@ -5870,7 +5719,7 @@ function ddc(sel, Ctor, data, children = EmptyArray) {
5870
5719
  return null;
5871
5720
  }
5872
5721
  if (!isComponentConstructor(Ctor)) {
5873
- throw new Error(`Invalid LWC Constructor ${toString$1(Ctor)} for custom element <${sel}>.`);
5722
+ throw new Error(`Invalid LWC Constructor ${toString(Ctor)} for custom element <${sel}>.`);
5874
5723
  }
5875
5724
  return c(sel, Ctor, data, children);
5876
5725
  }
@@ -5891,13 +5740,13 @@ function dc(Ctor, data, children = EmptyArray) {
5891
5740
  return null;
5892
5741
  }
5893
5742
  if (!isComponentConstructor(Ctor)) {
5894
- throw new Error(`Invalid constructor: "${toString$1(Ctor)}" is not a LightningElement constructor.`);
5743
+ throw new Error(`Invalid constructor: "${toString(Ctor)}" is not a LightningElement constructor.`);
5895
5744
  }
5896
5745
  // Look up the dynamic component's name at runtime once the constructor is available.
5897
5746
  // This information is only known at runtime and is stored as part of registerComponent.
5898
5747
  const sel = getComponentRegisteredName(Ctor);
5899
5748
  if (isUndefined$1(sel) || sel === '') {
5900
- throw new Error(`Invalid LWC constructor ${toString$1(Ctor)} does not have a registered name`);
5749
+ throw new Error(`Invalid LWC constructor ${toString(Ctor)} does not have a registered name`);
5901
5750
  }
5902
5751
  return c(sel, Ctor, data, children);
5903
5752
  }
@@ -6264,7 +6113,7 @@ function validateSlots(vm) {
6264
6113
  assertNotProd(); // this method should never leak to prod
6265
6114
  const { cmpSlots } = vm;
6266
6115
  for (const slotName in cmpSlots.slotAssignments) {
6267
- assert.isTrue(isArray$1(cmpSlots.slotAssignments[slotName]), `Slots can only be set to an array, instead received ${toString$1(cmpSlots.slotAssignments[slotName])} for slot "${slotName}" in ${vm}.`);
6116
+ assert.isTrue(isArray$1(cmpSlots.slotAssignments[slotName]), `Slots can only be set to an array, instead received ${toString(cmpSlots.slotAssignments[slotName])} for slot "${slotName}" in ${vm}.`);
6268
6117
  }
6269
6118
  }
6270
6119
  function checkHasMatchingRenderMode(template, vm) {
@@ -6503,7 +6352,7 @@ function evaluateTemplate(vm, html) {
6503
6352
  if (html !== cmpTemplate) {
6504
6353
  // Check that the template was built by the compiler.
6505
6354
  if (!isTemplateRegistered(html)) {
6506
- throw new TypeError(`Invalid template returned by the render() method on ${vm.tagName}. It must return an imported template (e.g.: \`import html from "./${vm.def.name}.html"\`), instead, it has returned: ${toString$1(html)}.`);
6355
+ throw new TypeError(`Invalid template returned by the render() method on ${vm.tagName}. It must return an imported template (e.g.: \`import html from "./${vm.def.name}.html"\`), instead, it has returned: ${toString(html)}.`);
6507
6356
  }
6508
6357
  checkHasMatchingRenderMode(html, vm);
6509
6358
  // Perf opt: do not reset the shadow root during the first rendering (there is
@@ -8517,6 +8366,6 @@ function readonly(obj) {
8517
8366
  return getReadOnlyProxy(obj);
8518
8367
  }
8519
8368
 
8520
- export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
8521
- /** version: 8.12.0 */
8369
+ export { BaseBridgeElement, LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
8370
+ /** version: 8.12.2 */
8522
8371
  //# sourceMappingURL=index.js.map