@lwrjs/client-modules 0.6.0-alpha.15 → 0.6.0-alpha.16

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.
@@ -155,6 +155,15 @@ function toSafeDescriptorMap$LWS‍(descriptorMap$LWS‍) {
155
155
  return descriptorMap$LWS‍;
156
156
  }
157
157
 
158
+ const consoleRef$LWS‍ = console;
159
+ const {
160
+ warn: consoleWarnRef$LWS‍
161
+ } = consoleRef$LWS‍;
162
+
163
+ function consoleWarn$LWS‍(...args$LWS‍) {
164
+ ReflectApply$LWS‍(consoleWarnRef$LWS‍, consoleRef$LWS‍, args$LWS‍);
165
+ }
166
+
158
167
  const ZERO_WIDTH_JOINER$LWS‍ = '\u200D';
159
168
  const LOCKER_IDENTIFIER_MARKER$LWS‍ = `$LWS${ZERO_WIDTH_JOINER$LWS‍}`;
160
169
  const SANDBOX_EVAL_CONTEXT_NAME$LWS‍ = '$lockerEvalContext$';
@@ -213,9 +222,18 @@ function ObjectLookupOwnValue$LWS‍(object$LWS‍, key$LWS‍) {
213
222
  const ProxyCtor$LWS‍ = Proxy;
214
223
  const ProxyRevocable$LWS‍ = Proxy.revocable;
215
224
 
225
+ function createRevokedProxy$LWS‍(object$LWS‍) {
226
+ // @ts-ignore: TS doesn't like null as a ProxyHandler.
227
+ const revocable$LWS‍ = ProxyRevocable$LWS‍(object$LWS‍, {
228
+ __proto__: null
229
+ });
230
+ revocable$LWS‍.revoke();
231
+ return revocable$LWS‍.proxy;
232
+ }
233
+
216
234
  function maskDistortion$LWS‍(distortedFunc$LWS‍, rawFunc$LWS‍) {
217
235
  const proxy$LWS‍ = new ProxyCtor$LWS‍(rawFunc$LWS‍, ObjectFreeze$LWS‍({
218
- apply(target$LWS‍, thisArg$LWS‍, args$LWS‍) {
236
+ apply(_target$LWS‍, thisArg$LWS‍, args$LWS‍) {
219
237
  if (thisArg$LWS‍ === proxy$LWS‍) {
220
238
  thisArg$LWS‍ = distortedFunc$LWS‍;
221
239
  }
@@ -223,7 +241,7 @@ function maskDistortion$LWS‍(distortedFunc$LWS‍, rawFunc$LWS‍) {
223
241
  return ReflectApply$LWS‍(distortedFunc$LWS‍, thisArg$LWS‍, args$LWS‍);
224
242
  },
225
243
 
226
- construct(target$LWS‍, args$LWS‍, newTarget$LWS‍) {
244
+ construct(_target$LWS‍, args$LWS‍, newTarget$LWS‍) {
227
245
  if (newTarget$LWS‍ === proxy$LWS‍) {
228
246
  newTarget$LWS‍ = distortedFunc$LWS‍;
229
247
  }
@@ -235,15 +253,6 @@ function maskDistortion$LWS‍(distortedFunc$LWS‍, rawFunc$LWS‍) {
235
253
  return proxy$LWS‍;
236
254
  }
237
255
 
238
- function createRevokedProxy$LWS‍(object$LWS‍) {
239
- // @ts-ignore: TS doesn't like null as a ProxyHandler.
240
- const revocable$LWS‍ = ProxyRevocable$LWS‍(object$LWS‍, {
241
- __proto__: null
242
- });
243
- revocable$LWS‍.revoke();
244
- return revocable$LWS‍.proxy;
245
- }
246
-
247
256
  class LockerSecurityError$LWS‍ extends Error {
248
257
  constructor(message$LWS‍) {
249
258
  super(`Lightning Web Security: ${message$LWS‍}`);
@@ -274,6 +283,16 @@ function isLiveObject$LWS‍(object$LWS‍) {
274
283
  return ObjectHasOwnProperty$LWS‍(object$LWS‍, LIVE_OBJECT_SYMBOL$LWS‍);
275
284
  }
276
285
 
286
+ function liveObjectFromGetter$LWS‍(originalGetter$LWS‍, target$LWS‍) {
287
+ const object$LWS‍ = ReflectApply$LWS‍(originalGetter$LWS‍, target$LWS‍, []);
288
+
289
+ if (isLiveObject$LWS‍(object$LWS‍)) {
290
+ return object$LWS‍;
291
+ }
292
+
293
+ return markLiveObject$LWS‍(object$LWS‍);
294
+ }
295
+
277
296
  const {
278
297
  clear: MapProtoClear$LWS‍,
279
298
  entries: MapProtoEntries$LWS‍,
@@ -317,7 +336,6 @@ const {
317
336
  replace: StringProtoReplace$LWS‍,
318
337
  slice: StringProtoSlice$LWS‍,
319
338
  split: StringProtoSplit$LWS‍,
320
- substring: StringProtoSubstring$LWS‍,
321
339
  startsWith: StringProtoStartsWith$LWS‍,
322
340
  toLowerCase: StringProtoToLowerCase$LWS‍,
323
341
  toUpperCase: StringProtoToUpperCase$LWS‍
@@ -347,10 +365,6 @@ function StringSplit$LWS‍(str$LWS‍, ...args$LWS‍) {
347
365
  return ReflectApply$LWS‍(StringProtoSplit$LWS‍, str$LWS‍, args$LWS‍);
348
366
  }
349
367
 
350
- function StringSubstring$LWS‍(str$LWS‍, ...args$LWS‍) {
351
- return ReflectApply$LWS‍(StringProtoSubstring$LWS‍, str$LWS‍, args$LWS‍);
352
- }
353
-
354
368
  function StringStartsWith$LWS‍(str$LWS‍, ...args$LWS‍) {
355
369
  return ReflectApply$LWS‍(StringProtoStartsWith$LWS‍, str$LWS‍, args$LWS‍);
356
370
  }
@@ -428,7 +442,7 @@ function WeakMapGet$LWS‍(weakMap$LWS‍, key$LWS‍) {
428
442
  function WeakMapSet$LWS‍(weakMap$LWS‍, key$LWS‍, value$LWS‍) {
429
443
  return ReflectApply$LWS‍(WeakMapProtoSet$LWS‍, weakMap$LWS‍, [key$LWS‍, value$LWS‍]);
430
444
  }
431
- /*! version: 0.15.5 */
445
+ /*! version: 0.15.6 */
432
446
 
433
447
  /*!
434
448
  * Copyright (C) 2019 salesforce.com, inc.
@@ -1089,7 +1103,7 @@ function XhrStatusGetter$LWS‍(xhr$LWS‍) {
1089
1103
  function XhrWithCredentialsSetter$LWS‍(xhr$LWS‍, bool$LWS‍) {
1090
1104
  ReflectApply$LWS‍(XhrProtoWithCredentialsSetter$LWS‍, xhr$LWS‍, [bool$LWS‍]);
1091
1105
  }
1092
- /*! version: 0.15.5 */
1106
+ /*! version: 0.15.6 */
1093
1107
 
1094
1108
  /*!
1095
1109
  * Copyright (C) 2019 salesforce.com, inc.
@@ -1127,7 +1141,7 @@ function sanitizeURLForElement$LWS‍(url$LWS‍) {
1127
1141
  function sanitizeURLString$LWS‍(urlString$LWS‍) {
1128
1142
  return urlString$LWS‍ === '' ? urlString$LWS‍ : StringReplace$LWS‍(urlString$LWS‍, REMOVE_URL_CHARS_REGEXP$LWS‍, '');
1129
1143
  }
1130
- /*! version: 0.15.5 */
1144
+ /*! version: 0.15.6 */
1131
1145
 
1132
1146
  /*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */
1133
1147
 
@@ -2823,7 +2837,7 @@ function allowCustomTagHook$LWS‍(node$LWS‍, data$LWS‍, _config$LWS‍) {
2823
2837
  allowedTags$LWS‍[tagName$LWS‍] = true;
2824
2838
  }
2825
2839
  }
2826
- /*! version: 0.15.5 */
2840
+ /*! version: 0.15.6 */
2827
2841
 
2828
2842
  /*!
2829
2843
  * Copyright (C) 2019 salesforce.com, inc.
@@ -3236,6 +3250,9 @@ function distortionAuraUtilGlobalEval$LWS‍(globalObject$LWS‍, options$LWS‍
3236
3250
  return [originalGlobalEval$LWS‍, globalEval$LWS‍];
3237
3251
  }
3238
3252
 
3253
+ const CHAR_CODE_EQUALS$LWS‍ = 61;
3254
+ const COOKIE_DELIMITER$LWS‍ = '; ';
3255
+
3239
3256
  function prefixCookieName$LWS‍(detailsOrName$LWS‍, key$LWS‍) {
3240
3257
  if (isObjectLike$LWS‍(detailsOrName$LWS‍)) {
3241
3258
  const clonedDetails$LWS‍ = shallowCloneOptions$LWS‍(detailsOrName$LWS‍);
@@ -3247,6 +3264,45 @@ function prefixCookieName$LWS‍(detailsOrName$LWS‍, key$LWS‍) {
3247
3264
 
3248
3265
  return detailsOrName$LWS‍;
3249
3266
  }
3267
+
3268
+ var CookieSameSite$LWS‍;
3269
+
3270
+ (function (CookieSameSite$LWS‍) {
3271
+ CookieSameSite$LWS‍[CookieSameSite$LWS‍["strict"] = 0] = "strict";
3272
+ CookieSameSite$LWS‍[CookieSameSite$LWS‍["lax"] = 1] = "lax";
3273
+ CookieSameSite$LWS‍[CookieSameSite$LWS‍["none"] = 2] = "none";
3274
+ })(CookieSameSite$LWS‍ || (CookieSameSite$LWS‍ = {}));
3275
+
3276
+ function unprefixCookieName$LWS‍(name$LWS‍, key$LWS‍) {
3277
+ const rootKey$LWS‍ = nsCookieRootKey$LWS‍(key$LWS‍); // First check that this cookie belongs to this sandbox,
3278
+ // if not then return null.
3279
+
3280
+ if (!StringStartsWith$LWS‍(name$LWS‍, rootKey$LWS‍)) {
3281
+ return null;
3282
+ } // If this cookie belongs to this sandbox, remove the prefix key
3283
+
3284
+
3285
+ const {
3286
+ length: rootKeyLength$LWS‍
3287
+ } = rootKey$LWS‍;
3288
+ const rootKeySubstringLength$LWS‍ = StringCharCodeAt$LWS‍(name$LWS‍, rootKeyLength$LWS‍) === CHAR_CODE_EQUALS$LWS‍ ? rootKeyLength$LWS‍ + 1 : rootKeyLength$LWS‍;
3289
+ return StringSlice$LWS‍(name$LWS‍, rootKeySubstringLength$LWS‍);
3290
+ }
3291
+
3292
+ function normalizeCookieListItem$LWS‍(cookie$LWS‍, key$LWS‍) {
3293
+ if (cookie$LWS‍) {
3294
+ const unprefixedCookieName$LWS‍ = unprefixCookieName$LWS‍(cookie$LWS‍.name, key$LWS‍); // If unprefixCookieName() returns null, that means this cookie
3295
+ // doesn't belong to the provided sandbox (based on the key)
3296
+
3297
+ if (unprefixedCookieName$LWS‍ === null) {
3298
+ return null;
3299
+ }
3300
+
3301
+ cookie$LWS‍.name = unprefixedCookieName$LWS‍;
3302
+ }
3303
+
3304
+ return cookie$LWS‍;
3305
+ }
3250
3306
  /* istanbul ignore next: only available in secure context */
3251
3307
 
3252
3308
 
@@ -3304,7 +3360,7 @@ function distortionCookieStoreGet$LWS‍(globalObject$LWS‍, options$LWS‍) {
3304
3360
  args$LWS‍[0] = prefixCookieName$LWS‍(detailsOrName$LWS‍, key$LWS‍);
3305
3361
  }
3306
3362
 
3307
- return ReflectApply$LWS‍(originalGet$LWS‍, this, args$LWS‍);
3363
+ return PromiseThen$LWS‍(ReflectApply$LWS‍(originalGet$LWS‍, this, args$LWS‍), result$LWS‍ => normalizeCookieListItem$LWS‍(result$LWS‍, key$LWS‍));
3308
3364
  };
3309
3365
 
3310
3366
  return [originalGet$LWS‍, get$LWS‍];
@@ -3333,25 +3389,22 @@ function distortionCookieStoreGetAll$LWS‍(globalObject$LWS‍, options$LWS‍)
3333
3389
 
3334
3390
  if (detailsOrName$LWS‍ !== null && detailsOrName$LWS‍ !== undefined) {
3335
3391
  args$LWS‍[0] = prefixCookieName$LWS‍(args$LWS‍[0], key$LWS‍);
3336
- return ReflectApply$LWS‍(originalGetAll$LWS‍, this, args$LWS‍);
3337
3392
  }
3338
3393
 
3339
3394
  return PromiseThen$LWS‍(ReflectApply$LWS‍(originalGetAll$LWS‍, this, args$LWS‍), result$LWS‍ => {
3340
- const cookiesAll$LWS‍ = result$LWS‍;
3341
- const cookiesSandbox$LWS‍ = [];
3395
+ const sandboxedCookies$LWS‍ = [];
3342
3396
 
3343
3397
  for (let i$LWS‍ = 0, {
3344
3398
  length: length$LWS‍
3345
- } = cookiesAll$LWS‍; i$LWS‍ < length$LWS‍; i$LWS‍ += 1) {
3346
- const cookie$LWS‍ = cookiesAll$LWS‍[i$LWS‍];
3347
- const rootKey$LWS‍ = nsCookieRootKey$LWS‍(key$LWS‍);
3399
+ } = result$LWS‍; i$LWS‍ < length$LWS‍; i$LWS‍ += 1) {
3400
+ const cookie$LWS‍ = normalizeCookieListItem$LWS‍(result$LWS‍[i$LWS‍], key$LWS‍);
3348
3401
 
3349
- if (StringStartsWith$LWS‍(cookie$LWS‍.name, rootKey$LWS‍)) {
3350
- ArrayPush$LWS‍(cookiesSandbox$LWS‍, cookie$LWS‍);
3402
+ if (cookie$LWS‍) {
3403
+ ArrayPush$LWS‍(sandboxedCookies$LWS‍, cookie$LWS‍);
3351
3404
  }
3352
3405
  }
3353
3406
 
3354
- return cookiesSandbox$LWS‍;
3407
+ return sandboxedCookies$LWS‍;
3355
3408
  });
3356
3409
  };
3357
3410
 
@@ -3456,8 +3509,6 @@ function distortionCustomElementRegistryGet$LWS‍(globalObject$LWS‍, options$
3456
3509
 
3457
3510
  return [originalGet$LWS‍, get$LWS‍];
3458
3511
  }
3459
-
3460
- const CHAR_CODE_EQUALS$LWS‍ = 61;
3461
3512
  /**
3462
3513
  * Factory patched cookie getter. Must be invoked with namespace argument.
3463
3514
  * Will return a patched cookie getter bound to the namespace.
@@ -3465,6 +3516,7 @@ const CHAR_CODE_EQUALS$LWS‍ = 61;
3465
3516
  * @returns Distortion: string
3466
3517
  */
3467
3518
 
3519
+
3468
3520
  function distortionDocumentCookieGetter$LWS‍(globalObject$LWS‍, options$LWS‍) {
3469
3521
  const {
3470
3522
  Document: Document$LWS‍
@@ -3475,29 +3527,21 @@ function distortionDocumentCookieGetter$LWS‍(globalObject$LWS‍, options$LWS
3475
3527
  const originalCookieGetter$LWS‍ = ObjectLookupOwnGetter$LWS‍(Document$LWS‍.prototype, 'cookie');
3476
3528
 
3477
3529
  function get$LWS‍() {
3478
- const cookieStr$LWS‍ = DocumentCookieGetter$LWS‍(this);
3479
- const cookies$LWS‍ = StringSplit$LWS‍(cookieStr$LWS‍, '; ');
3480
- const rootKey$LWS‍ = nsCookieRootKey$LWS‍(key$LWS‍);
3481
- const {
3482
- length: rootKeyLength$LWS‍
3483
- } = rootKey$LWS‍;
3484
- const nsCookies$LWS‍ = [];
3530
+ const documentCookieValue$LWS‍ = DocumentCookieGetter$LWS‍(this);
3531
+ const cookies$LWS‍ = StringSplit$LWS‍(documentCookieValue$LWS‍, COOKIE_DELIMITER$LWS‍);
3532
+ const sandboxedCookies$LWS‍ = [];
3485
3533
 
3486
3534
  for (let i$LWS‍ = 0, {
3487
3535
  length: length$LWS‍
3488
3536
  } = cookies$LWS‍; i$LWS‍ < length$LWS‍; i$LWS‍ += 1) {
3489
- const cookie$LWS‍ = cookies$LWS‍[i$LWS‍];
3537
+ const cookie$LWS‍ = unprefixCookieName$LWS‍(cookies$LWS‍[i$LWS‍], key$LWS‍);
3490
3538
 
3491
- if (StringStartsWith$LWS‍(cookie$LWS‍, rootKey$LWS‍)) {
3492
- if (StringCharCodeAt$LWS‍(cookie$LWS‍, rootKeyLength$LWS‍) !== CHAR_CODE_EQUALS$LWS‍) {
3493
- ArrayPush$LWS‍(nsCookies$LWS‍, StringSubstring$LWS‍(cookie$LWS‍, rootKeyLength$LWS‍));
3494
- } else if (StringCharCodeAt$LWS‍(cookie$LWS‍, rootKeyLength$LWS‍) === CHAR_CODE_EQUALS$LWS‍) {
3495
- ArrayPush$LWS‍(nsCookies$LWS‍, StringSubstring$LWS‍(cookie$LWS‍, rootKeyLength$LWS‍ + 1));
3496
- }
3539
+ if (cookie$LWS‍) {
3540
+ ArrayPush$LWS‍(sandboxedCookies$LWS‍, cookie$LWS‍);
3497
3541
  }
3498
3542
  }
3499
3543
 
3500
- return ArrayJoin$LWS‍(nsCookies$LWS‍, '; ');
3544
+ return ArrayJoin$LWS‍(sandboxedCookies$LWS‍, COOKIE_DELIMITER$LWS‍);
3501
3545
  }
3502
3546
 
3503
3547
  return [originalCookieGetter$LWS‍, get$LWS‍];
@@ -3520,17 +3564,17 @@ function distortionDocumentCookieSetter$LWS‍(globalObject$LWS‍, options$LWS
3520
3564
  const originalCookieSetter$LWS‍ = ObjectLookupOwnSetter$LWS‍(Document$LWS‍.prototype, 'cookie');
3521
3565
 
3522
3566
  function set$LWS‍(value$LWS‍) {
3523
- const cookieEntries$LWS‍ = StringSplit$LWS‍(value$LWS‍, '; ');
3567
+ const cookieEntries$LWS‍ = StringSplit$LWS‍(value$LWS‍, COOKIE_DELIMITER$LWS‍);
3524
3568
  let {
3525
3569
  0: newCookieEntry$LWS‍
3526
3570
  } = cookieEntries$LWS‍;
3527
3571
 
3528
- if (StringStartsWith$LWS‍(newCookieEntry$LWS‍, '=')) {
3529
- newCookieEntry$LWS‍ = StringSubstring$LWS‍(newCookieEntry$LWS‍, 1);
3572
+ if (StringCharCodeAt$LWS‍(newCookieEntry$LWS‍, 0) === CHAR_CODE_EQUALS$LWS‍) {
3573
+ newCookieEntry$LWS‍ = StringSlice$LWS‍(newCookieEntry$LWS‍, 1);
3530
3574
  }
3531
3575
 
3532
3576
  cookieEntries$LWS‍[0] = nsCookieKey$LWS‍(newCookieEntry$LWS‍, key$LWS‍);
3533
- DocumentCookieSetter$LWS‍(this, ArrayJoin$LWS‍(cookieEntries$LWS‍, '; '));
3577
+ DocumentCookieSetter$LWS‍(this, ArrayJoin$LWS‍(cookieEntries$LWS‍, COOKIE_DELIMITER$LWS‍));
3534
3578
  }
3535
3579
 
3536
3580
  return [originalCookieSetter$LWS‍, set$LWS‍];
@@ -4482,13 +4526,7 @@ function distortionHTMLElementDatasetGetter$LWS‍(globalObject$LWS‍) {
4482
4526
  const originalDatasetGetter$LWS‍ = ObjectLookupOwnGetter$LWS‍(HTMLElement$LWS‍.prototype, 'dataset');
4483
4527
 
4484
4528
  function dataset$LWS‍() {
4485
- const domStringMap$LWS‍ = ReflectApply$LWS‍(originalDatasetGetter$LWS‍, this, []);
4486
-
4487
- if (isLiveObject$LWS‍(domStringMap$LWS‍)) {
4488
- return domStringMap$LWS‍;
4489
- }
4490
-
4491
- return markLiveObject$LWS‍(domStringMap$LWS‍);
4529
+ return liveObjectFromGetter$LWS‍(originalDatasetGetter$LWS‍, this);
4492
4530
  }
4493
4531
 
4494
4532
  return [originalDatasetGetter$LWS‍, dataset$LWS‍];
@@ -4566,13 +4604,7 @@ function distortionHTMLElementStyleGetter$LWS‍(globalObject$LWS‍) {
4566
4604
  const originalStyleGetter$LWS‍ = ObjectLookupOwnGetter$LWS‍(HTMLElement$LWS‍.prototype, 'style');
4567
4605
 
4568
4606
  function style$LWS‍() {
4569
- const styleObject$LWS‍ = ReflectApply$LWS‍(originalStyleGetter$LWS‍, this, []);
4570
-
4571
- if (isLiveObject$LWS‍(styleObject$LWS‍)) {
4572
- return styleObject$LWS‍;
4573
- }
4574
-
4575
- return markLiveObject$LWS‍(styleObject$LWS‍);
4607
+ return liveObjectFromGetter$LWS‍(originalStyleGetter$LWS‍, this);
4576
4608
  }
4577
4609
 
4578
4610
  return [originalStyleGetter$LWS‍, style$LWS‍];
@@ -4681,10 +4713,9 @@ function distortionHTMLLinkElementRelSetter$LWS‍(globalObject$LWS‍) {
4681
4713
  if (isValidRelValue$LWS‍(string$LWS‍)) {
4682
4714
  ReflectApply$LWS‍(originalRelSetter$LWS‍, this, [string$LWS‍]);
4683
4715
  return;
4684
- } // eslint-disable-next-line no-console
4685
-
4716
+ }
4686
4717
 
4687
- console.warn(WARN_MESSAGE$LWS‍);
4718
+ consoleWarn$LWS‍(WARN_MESSAGE$LWS‍);
4688
4719
  }
4689
4720
 
4690
4721
  registerElementSetDistortion$LWS‍(HTMLLinkElement$LWS‍, {
@@ -4708,12 +4739,9 @@ function distortionHTMLLinkElementRelListSetter$LWS‍(globalObject$LWS‍) {
4708
4739
  if (isValidRelValue$LWS‍(string$LWS‍)) {
4709
4740
  ReflectApply$LWS‍(originalRelListSetter$LWS‍, this, [string$LWS‍]);
4710
4741
  return;
4711
- } // TODO: Figure out Locker Next error/warning system.
4712
- // https://git.soma.salesforce.com/lockerservice/lockerservice-core/issues/942
4713
- // eslint-disable-next-line no-console
4714
-
4742
+ }
4715
4743
 
4716
- console.warn(WARN_MESSAGE$LWS‍);
4744
+ consoleWarn$LWS‍(WARN_MESSAGE$LWS‍);
4717
4745
  }
4718
4746
 
4719
4747
  return [originalRelListSetter$LWS‍, relList$LWS‍];
@@ -5364,6 +5392,19 @@ function distortionStorage$LWS‍(globalObject$LWS‍) {
5364
5392
  const distortionLocalStorage$LWS‍ = createDistortionStorageFactory$LWS‍('localStorage');
5365
5393
  const distortionSessionStorage$LWS‍ = createDistortionStorageFactory$LWS‍('sessionStorage');
5366
5394
 
5395
+ function distortionSVGElementDatasetGetter$LWS‍(globalObject$LWS‍) {
5396
+ const {
5397
+ SVGElement: SVGElement$LWS‍
5398
+ } = globalObject$LWS‍;
5399
+ const originalDatasetGetter$LWS‍ = ObjectLookupOwnGetter$LWS‍(SVGElement$LWS‍.prototype, 'dataset');
5400
+
5401
+ function dataset$LWS‍() {
5402
+ return liveObjectFromGetter$LWS‍(originalDatasetGetter$LWS‍, this);
5403
+ }
5404
+
5405
+ return [originalDatasetGetter$LWS‍, dataset$LWS‍];
5406
+ }
5407
+
5367
5408
  function distortionSVGScriptElementHrefAttribute$LWS‍(globalObject$LWS‍, options$LWS‍) {
5368
5409
  const {
5369
5410
  SVGScriptElement: SVGScriptElement$LWS‍
@@ -6021,7 +6062,8 @@ distortionRangeCreateContextualFragment$LWS‍, // ServiceWorkerContainer
6021
6062
  distortionServiceWorkerContainer$LWS‍, // ShadowRoot
6022
6063
  distortionShadowRootInnerHTMLSetter$LWS‍, distortionShadowRootModeGetter$LWS‍, // SharedWorker
6023
6064
  distortionSharedWorkerCtor$LWS‍, distortionSharedWorkerProto$LWS‍, // Storage
6024
- distortionStorageLength$LWS‍, distortionStorageGetItem$LWS‍, distortionStorageSetItem$LWS‍, distortionStorageKey$LWS‍, distortionStorageRemoveItem$LWS‍, distortionStorageClear$LWS‍, distortionStorage$LWS‍, // SVGUseElement
6065
+ distortionStorageLength$LWS‍, distortionStorageGetItem$LWS‍, distortionStorageSetItem$LWS‍, distortionStorageKey$LWS‍, distortionStorageRemoveItem$LWS‍, distortionStorageClear$LWS‍, distortionStorage$LWS‍, // SVGElement
6066
+ distortionSVGElementDatasetGetter$LWS‍, // SVGUseElement
6025
6067
  distortionSVGUseElementHrefAttribute$LWS‍, distortionSVGUseElementXlinkHrefAttribute$LWS‍, // URL
6026
6068
  distortionURLCreateObjectURL$LWS‍, // Window
6027
6069
  distortionWindowFetch$LWS‍, distortionWindowFramesGetter$LWS‍, distortionWindowLengthGetter$LWS‍, distortionWindowOpen$LWS‍, distortionWindowOpenerGetter$LWS‍, distortionWindowParentGetter$LWS‍, distortionWindowPostMessage$LWS‍, // Worker
@@ -6172,7 +6214,7 @@ function createExternalDistortionEntries$LWS‍(globalObject$LWS‍, key$LWS‍,
6172
6214
  ReflectApply$LWS‍(ArrayProtoPush$LWS‍, entries$LWS‍, makeElementDistortionsForSandboxKey$LWS‍(key$LWS‍));
6173
6215
  return entries$LWS‍;
6174
6216
  } // @TODO: [Issue #373] Abstract common code in sandbox and distortion packages
6175
- /*! version: 0.15.5 */
6217
+ /*! version: 0.15.6 */
6176
6218
 
6177
6219
  /*!
6178
6220
  * Copyright (C) 2021 salesforce.com, inc.
@@ -6265,7 +6307,7 @@ class DefaultInstrumentation$LWS‍ {
6265
6307
 
6266
6308
 
6267
6309
  const defaultInstrumentation$LWS‍ = new DefaultInstrumentation$LWS‍();
6268
- /*! version: 0.15.5 */
6310
+ /*! version: 0.15.6 */
6269
6311
 
6270
6312
  /**
6271
6313
  * This file contains an exportable (portable) function `init` used to initialize
@@ -6305,10 +6347,10 @@ function createMembraneMarshall() {
6305
6347
  // this package we perform a small runtime check to determine whether our
6306
6348
  // code is minified or in DEBUG_MODE.
6307
6349
  // https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.debug_mode_enable
6308
- // eslint-disable-next-line @typescript-eslint/naming-convention
6309
- const DEBUG_MODE = function DEBUG_MODE() {}.name === 'DEBUG_MODE';
6310
-
6311
- const LOCKER_LIVE_MARKER_SYMBOL = Symbol.for('@@lockerLiveValue');
6350
+ const DEBUG_MODE = `${() =>
6351
+ /**/
6352
+ 1}`.includes('*');
6353
+ const LOCKER_LIVE_VALUE_MARKER_SYMBOL = Symbol.for('@@lockerLiveValue');
6312
6354
  const {
6313
6355
  toStringTag: TO_STRING_TAG_SYMBOL
6314
6356
  } = Symbol;
@@ -6317,18 +6359,23 @@ function createMembraneMarshall() {
6317
6359
  const {
6318
6360
  isArray: isArrayOrNotOrThrowForRevoked
6319
6361
  } = Array;
6362
+ const {
6363
+ isView: ArrayBufferIsView
6364
+ } = ArrayBuffer;
6365
+ const ObjectCtor = Object;
6320
6366
  const {
6321
6367
  defineProperties: ObjectDefineProperties,
6322
6368
  freeze: ObjectFreeze,
6323
6369
  getOwnPropertyDescriptors: ObjectGetOwnPropertyDescriptors,
6324
6370
  isFrozen: ObjectIsFrozen,
6325
6371
  isSealed: ObjectIsSealed,
6372
+ prototype: ObjectProto,
6326
6373
  seal: ObjectSeal
6327
- } = Object;
6374
+ } = ObjectCtor;
6328
6375
  const {
6329
6376
  hasOwnProperty: ObjectProtoHasOwnProperty,
6330
6377
  toString: ObjectProtoToString
6331
- } = Object.prototype;
6378
+ } = ObjectProto;
6332
6379
  const {
6333
6380
  revocable: ProxyRevocable
6334
6381
  } = Proxy;
@@ -6407,6 +6454,7 @@ function createMembraneMarshall() {
6407
6454
  let foreignCallableGetTargetIntegrityTraits;
6408
6455
  let foreignCallableGetUnbrandedTag;
6409
6456
  let foreignCallableHasOwnProperty;
6457
+ let foreignCallableIsLiveTarget;
6410
6458
  let foreignCallableWarn;
6411
6459
  let selectedTarget;
6412
6460
 
@@ -6493,7 +6541,7 @@ function createMembraneMarshall() {
6493
6541
  //
6494
6542
  // istanbul ignore next
6495
6543
  shadowTarget = // eslint-disable-next-line func-names
6496
- targetTraits & 8
6544
+ targetTraits & 4
6497
6545
  /* IsArrowFunction */
6498
6546
  ? () => {} : function () {};
6499
6547
 
@@ -6615,7 +6663,7 @@ function createMembraneMarshall() {
6615
6663
  try {
6616
6664
  // Detect arrow functions.
6617
6665
  if (!('prototype' in target)) {
6618
- targetTraits |= 8
6666
+ targetTraits |= 4
6619
6667
  /* IsArrowFunction */
6620
6668
  ;
6621
6669
  }
@@ -6639,7 +6687,7 @@ function createMembraneMarshall() {
6639
6687
  /* IsArray */
6640
6688
  ;
6641
6689
  } else if (!targetIsFunction) {
6642
- targetTraits |= 4
6690
+ targetTraits |= 8
6643
6691
  /* IsObject */
6644
6692
  ;
6645
6693
  }
@@ -6759,6 +6807,19 @@ function createMembraneMarshall() {
6759
6807
  }
6760
6808
 
6761
6809
  return undefined;
6810
+ }
6811
+
6812
+ function getOwnForeignDescriptor(foreignTargetPointer, shadowTarget, key) {
6813
+ let safeDesc;
6814
+ foreignCallableGetOwnPropertyDescriptor(foreignTargetPointer, key, (configurable, enumerable, writable, valuePointer, getPointer, setPointer) => {
6815
+ safeDesc = createDescriptorFromMeta(configurable, enumerable, writable, valuePointer, getPointer, setPointer);
6816
+
6817
+ if (safeDesc.configurable === false) {
6818
+ // Update the descriptor to non-configurable on the shadow.
6819
+ ReflectDefineProperty(shadowTarget, key, safeDesc);
6820
+ }
6821
+ });
6822
+ return safeDesc;
6762
6823
  } // This wrapping mechanism provides the means to add instrumentation
6763
6824
  // to the callable functions used to coordinate work between the sides
6764
6825
  // of the membrane.
@@ -6787,6 +6848,37 @@ function createMembraneMarshall() {
6787
6848
  return fn;
6788
6849
  }
6789
6850
 
6851
+ function isLiveTarget(target) {
6852
+ if (target === ObjectProto) {
6853
+ return false;
6854
+ }
6855
+
6856
+ if (typeof target === 'object') {
6857
+ if ( // We only check for typed arrays here since arrays are
6858
+ // marked as live in the BoundaryProxyHandler constructor.
6859
+ ArrayBufferIsView(target)) {
6860
+ return true;
6861
+ }
6862
+
6863
+ const {
6864
+ constructor
6865
+ } = target;
6866
+
6867
+ if (constructor === ObjectCtor) {
6868
+ // If the constructor, own or inherited, points to `Object`
6869
+ // then `value` is not likely a prototype object.
6870
+ return true;
6871
+ }
6872
+
6873
+ if (ReflectGetPrototypeOf(target) === null) {
6874
+ // Ensure `value` is not an `Object.prototype` from an iframe.
6875
+ return typeof constructor !== 'function' || constructor.prototype !== target;
6876
+ }
6877
+ }
6878
+
6879
+ return ReflectApply(ObjectProtoHasOwnProperty, target, [LOCKER_LIVE_VALUE_MARKER_SYMBOL]);
6880
+ }
6881
+
6790
6882
  function lockShadowTarget(shadowTarget, foreignTargetPointer) {
6791
6883
  // set prototype after to avoid
6792
6884
  copyForeignDescriptorsToShadowTarget(foreignTargetPointer, shadowTarget); // setting up __proto__ of the shadowTarget
@@ -6797,19 +6889,6 @@ function createMembraneMarshall() {
6797
6889
  ReflectPreventExtensions(shadowTarget);
6798
6890
  }
6799
6891
 
6800
- function getOwnForeignDescriptor(foreignTargetPointer, shadowTarget, key) {
6801
- let safeDesc;
6802
- foreignCallableGetOwnPropertyDescriptor(foreignTargetPointer, key, (configurable, enumerable, writable, valuePointer, getPointer, setPointer) => {
6803
- safeDesc = createDescriptorFromMeta(configurable, enumerable, writable, valuePointer, getPointer, setPointer);
6804
-
6805
- if (safeDesc.configurable === false) {
6806
- // Update the descriptor to non-configurable on the shadow.
6807
- ReflectDefineProperty(shadowTarget, key, safeDesc);
6808
- }
6809
- });
6810
- return safeDesc;
6811
- }
6812
-
6813
6892
  function pushErrorAcrossBoundary(e) {
6814
6893
  const foreignErrorPointer = getTransferableValue(e);
6815
6894
 
@@ -6925,11 +7004,15 @@ function createMembraneMarshall() {
6925
7004
  }
6926
7005
 
6927
7006
  if (!trapMutations) {
6928
- // Future optimization: Hoping proxies with frozen handlers can be faster.
6929
- // If local mutations are not trapped, then freezing the
6930
- // handler is ok because it is not expecting to change in
6931
- // the future.
7007
+ // Future optimization: Hoping proxies with frozen handlers
7008
+ // can be faster. If local mutations are not trapped, then
7009
+ // freezing the handler is ok because it is not expecting to
7010
+ // change in the future.
6932
7011
  ObjectFreeze(this);
7012
+ } else if (foreignTargetTraits & 1
7013
+ /* IsArray */
7014
+ ) {
7015
+ this.makeProxyLive();
6933
7016
  }
6934
7017
  } // internal utilities
6935
7018
 
@@ -6937,8 +7020,8 @@ function createMembraneMarshall() {
6937
7020
  makeProxyLive() {
6938
7021
  // Replace pending traps with live traps that can work with the
6939
7022
  // target without taking snapshots.
6940
- this.deleteProperty = BoundaryProxyHandler.passthruDeletePropertyTrap;
6941
7023
  this.defineProperty = BoundaryProxyHandler.passthruDefinePropertyTrap;
7024
+ this.deleteProperty = BoundaryProxyHandler.passthruDeletePropertyTrap;
6942
7025
  this.get = BoundaryProxyHandler.hybridGetTrap;
6943
7026
  this.has = BoundaryProxyHandler.hybridHasTrap;
6944
7027
  this.preventExtensions = BoundaryProxyHandler.passthruPreventExtensionsTrap;
@@ -7016,7 +7099,7 @@ function createMembraneMarshall() {
7016
7099
  }
7017
7100
 
7018
7101
  makeProxyUnambiguous(shadowTarget) {
7019
- if (foreignCallableHasOwnProperty(this.foreignTargetPointer, LOCKER_LIVE_MARKER_SYMBOL)) {
7102
+ if (foreignCallableIsLiveTarget(this.foreignTargetPointer)) {
7020
7103
  this.makeProxyLive();
7021
7104
  } else {
7022
7105
  this.makeProxyStatic(shadowTarget);
@@ -7617,7 +7700,17 @@ function createMembraneMarshall() {
7617
7700
  } catch (e) {
7618
7701
  throw pushErrorAcrossBoundary(e);
7619
7702
  }
7620
- }, 'callableHasOwnProperty', INBOUND_INSTRUMENTATION_LABEL), // callableWarn
7703
+ }, 'callableHasOwnProperty', INBOUND_INSTRUMENTATION_LABEL), // callableIsLiveTarget
7704
+ instrumentCallableWrapper(targetPointer => {
7705
+ targetPointer();
7706
+ const target = getSelectedTarget();
7707
+
7708
+ try {
7709
+ return isLiveTarget(target);
7710
+ } catch (e) {
7711
+ throw pushErrorAcrossBoundary(e);
7712
+ }
7713
+ }, 'callableIsLiveTarget', INBOUND_INSTRUMENTATION_LABEL), // callableWarn
7621
7714
  instrumentCallableWrapper((...args) => {
7622
7715
  for (let i = 0, len = args.length; i < len; i += 1) {
7623
7716
  args[i] = getLocalValue(args[i]);
@@ -7655,7 +7748,8 @@ function createMembraneMarshall() {
7655
7748
  21: callableGetTargetIntegrityTraits,
7656
7749
  22: callableGetUnbrandedTag,
7657
7750
  23: callableHasOwnProperty,
7658
- 24: callableWarn
7751
+ 24: callableIsLiveTarget,
7752
+ 25: callableWarn
7659
7753
  } = hooks;
7660
7754
  foreignCallablePushTarget = callablePushTarget; // traps utilities
7661
7755
 
@@ -7676,6 +7770,7 @@ function createMembraneMarshall() {
7676
7770
  foreignCallableGetTargetIntegrityTraits = foreignErrorControl(instrumentCallableWrapper(callableGetTargetIntegrityTraits, 'callableGetTargetIntegrityTraits', OUTBOUND_INSTRUMENTATION_LABEL));
7677
7771
  foreignCallableGetUnbrandedTag = foreignErrorControl(instrumentCallableWrapper(callableGetUnbrandedTag, 'callableGetUnbrandedTag', OUTBOUND_INSTRUMENTATION_LABEL));
7678
7772
  foreignCallableHasOwnProperty = foreignErrorControl(instrumentCallableWrapper(callableHasOwnProperty, 'callableHasOwnProperty', OUTBOUND_INSTRUMENTATION_LABEL));
7773
+ foreignCallableIsLiveTarget = foreignErrorControl(instrumentCallableWrapper(callableIsLiveTarget, 'callableIsLiveTarget', OUTBOUND_INSTRUMENTATION_LABEL));
7679
7774
  foreignCallableWarn = foreignErrorControl(instrumentCallableWrapper(callableWarn, 'callableWarn', OUTBOUND_INSTRUMENTATION_LABEL));
7680
7775
  };
7681
7776
  };
@@ -7707,9 +7802,9 @@ const marshallSourceTextInStrictMode = `
7707
7802
  // runtime check to determine whether our code is minified or in
7708
7803
  // DEBUG_MODE.
7709
7804
  // https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.debug_mode_enable
7710
- // eslint-disable-next-line @typescript-eslint/naming-convention
7711
- const DEBUG_MODE = function DEBUG_MODE() {}.name === 'DEBUG_MODE';
7712
-
7805
+ const DEBUG_MODE = `${() =>
7806
+ /**/
7807
+ 1}`.includes('*');
7713
7808
  const ZERO_WIDTH_JOINER = '\u200D';
7714
7809
  const LOCKER_IDENTIFIER_MARKER = `$LWS${ZERO_WIDTH_JOINER}`;
7715
7810
  const {
@@ -7869,7 +7964,9 @@ class VirtualEnvironment {
7869
7964
  let supportFlags = SupportFlagsEnum.None;
7870
7965
  const supportKeys = support ? ObjectKeys(support) : [];
7871
7966
 
7872
- for (let i = 0, len = supportKeys.length; i < len; i += 1) {
7967
+ for (let i = 0, {
7968
+ length
7969
+ } = supportKeys; i < length; i += 1) {
7873
7970
  const enumKey = capitalizeFirstChar(supportKeys[i]);
7874
7971
  supportFlags |= SupportFlagsEnum[enumKey];
7875
7972
  }
@@ -7961,7 +8058,9 @@ class VirtualEnvironment {
7961
8058
  let bluePointer = this.blueGlobalThisPointer;
7962
8059
  let redPointer = this.redGlobalThisPointer;
7963
8060
 
7964
- for (let i = 0, len = keys.length; i < len; i += 1) {
8061
+ for (let i = 0, {
8062
+ length
8063
+ } = keys; i < length; i += 1) {
7965
8064
  const key = keys[i];
7966
8065
  bluePointer = this.blueCallableGetPropertyValuePointer(bluePointer, key);
7967
8066
  redPointer = this.redCallableGetPropertyValuePointer(redPointer, key);
@@ -7972,12 +8071,14 @@ class VirtualEnvironment {
7972
8071
  }
7973
8072
 
7974
8073
  remap(target, unsafeBlueDescMap) {
7975
- const keys = ReflectOwnKeys$1(unsafeBlueDescMap);
8074
+ const ownKeys = ReflectOwnKeys$1(unsafeBlueDescMap);
7976
8075
  const targetPointer = this.blueGetTransferableValue(target); // prettier-ignore
7977
8076
 
7978
- for (let i = 0, len = keys.length; i < len; i += 1) {
7979
- const key = keys[i];
7980
- const unsafeBlueDesc = unsafeBlueDescMap[key]; // Avoid poisoning by only installing own properties from unsafeBlueDescMap.
8077
+ for (let i = 0, {
8078
+ length
8079
+ } = ownKeys; i < length; i += 1) {
8080
+ const ownKey = ownKeys[i];
8081
+ const unsafeBlueDesc = unsafeBlueDescMap[ownKey]; // Avoid poisoning by only installing own properties from unsafeBlueDescMap.
7981
8082
  // We don't use a toSafeDescriptor() style helper since that mutates
7982
8083
  // the unsafeBlueDesc.
7983
8084
  // eslint-disable-next-line prefer-object-spread
@@ -7986,7 +8087,7 @@ class VirtualEnvironment {
7986
8087
  __proto__: null
7987
8088
  }, unsafeBlueDesc); // Install descriptor into the red side.
7988
8089
 
7989
- this.redCallableDefineProperty(targetPointer, key, 'configurable' in safeBlueDesc ? !!safeBlueDesc.configurable : UNDEFINED_SYMBOL, 'enumerable' in safeBlueDesc ? !!safeBlueDesc.enumerable : UNDEFINED_SYMBOL, 'writable' in safeBlueDesc ? !!safeBlueDesc.writable : UNDEFINED_SYMBOL, 'value' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.value) : UNDEFINED_SYMBOL, 'get' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.get) : UNDEFINED_SYMBOL, 'set' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.set) : UNDEFINED_SYMBOL);
8090
+ this.redCallableDefineProperty(targetPointer, ownKey, 'configurable' in safeBlueDesc ? !!safeBlueDesc.configurable : UNDEFINED_SYMBOL, 'enumerable' in safeBlueDesc ? !!safeBlueDesc.enumerable : UNDEFINED_SYMBOL, 'writable' in safeBlueDesc ? !!safeBlueDesc.writable : UNDEFINED_SYMBOL, 'value' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.value) : UNDEFINED_SYMBOL, 'get' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.get) : UNDEFINED_SYMBOL, 'set' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.set) : UNDEFINED_SYMBOL);
7990
8091
  }
7991
8092
  }
7992
8093
 
@@ -8036,8 +8137,8 @@ const ESGlobalKeys = [// *** 19.1 Value Properties of the Global Object
8036
8137
  'BigInt', // 'BigInt64Array', // Remapped
8037
8138
  // 'BigUint64Array', // Remapped
8038
8139
  'Boolean', // 'DataView', // Remapped
8039
- // 'Date', // Unstable & Remapped
8040
- // 'Error', // Unstable & Reflective
8140
+ // 'Date', // Remapped
8141
+ // 'Error', // Reflective
8041
8142
  // 'EvalError', // Reflective
8042
8143
  'FinalizationRegistry', // 'Float32Array', // Remapped
8043
8144
  // 'Float64Array', // Remapped
@@ -8050,7 +8151,7 @@ const ESGlobalKeys = [// *** 19.1 Value Properties of the Global Object
8050
8151
  // Allow Blue `Promise` constructor to overwrite the Red one so that promises
8051
8152
  // created by the `Promise` constructor or APIs like `fetch` will work.
8052
8153
  // 'Promise', // Remapped
8053
- // 'Proxy', // Unstable & Reflective
8154
+ // 'Proxy', // Reflective
8054
8155
  // 'RangeError', // Reflective
8055
8156
  // 'ReferenceError', // Reflective
8056
8157
  'RegExp', // 'Set', // Remapped
@@ -8068,7 +8169,7 @@ const ESGlobalKeys = [// *** 19.1 Value Properties of the Global Object
8068
8169
  // 'Atomics', // Remapped
8069
8170
  'JSON', 'Math', 'Reflect', // *** Annex B
8070
8171
  'escape', 'unescape' // *** ECMA-402
8071
- // 'Intl', // Unstable & Remapped
8172
+ // 'Intl', // Remapped
8072
8173
  ]; // These are foundational things that should never be wrapped but are equivalent
8073
8174
  // TODO: revisit this list.
8074
8175
 
@@ -8076,19 +8177,19 @@ const ReflectiveIntrinsicObjectNames = ['AggregateError', 'Array', 'Error', 'Eva
8076
8177
  const ESGlobalsAndReflectiveInstrinsicObjectNames = [...ESGlobalKeys, ...ReflectiveIntrinsicObjectNames];
8077
8178
 
8078
8179
  function assignFilteredGlobalObjectShapeDescriptors(descriptorMap, source) {
8079
- const keys = ReflectOwnKeys(source);
8180
+ const ownKeys = ReflectOwnKeys(source);
8080
8181
 
8081
- for (let i = 0, len = keys.length; i < len; i += 1) {
8082
- // forcing to string here because of TypeScript's PropertyDescriptorMap
8083
- // definition, which doesn't support symbols as entries.
8084
- const key = keys[i]; // avoid overriding ECMAScript global names that correspond
8182
+ for (let i = 0, {
8183
+ length
8184
+ } = ownKeys; i < length; i += 1) {
8185
+ const ownKey = ownKeys[i]; // Avoid overriding ECMAScript global names that correspond
8085
8186
  // to global intrinsics. This guarantee that those entries
8086
8187
  // will be ignored if present in the endowments object.
8087
8188
  // TODO: what if the intent is to polyfill one of those
8088
8189
  // intrinsics?
8089
8190
 
8090
- if (!ReflectApply$2(ArrayProtoIncludes, ESGlobalsAndReflectiveInstrinsicObjectNames, [key])) {
8091
- const unsafeDesc = ReflectGetOwnPropertyDescriptor(source, key); // Safari 14.0.x (macOS) and 14.2 (iOS) have a bug where 'showModalDialog'
8191
+ if (!ReflectApply$2(ArrayProtoIncludes, ESGlobalsAndReflectiveInstrinsicObjectNames, [ownKey])) {
8192
+ const unsafeDesc = ReflectGetOwnPropertyDescriptor(source, ownKey); // Safari 14.0.x (macOS) and 14.2 (iOS) have a bug where 'showModalDialog'
8092
8193
  // is returned in the list of own keys produces by ReflectOwnKeys(iframeWindow),
8093
8194
  // however 'showModalDialog' is not an own property and produces
8094
8195
  // undefined at ReflectGetOwnPropertyDescriptor(window, key);
@@ -8100,7 +8201,7 @@ function assignFilteredGlobalObjectShapeDescriptors(descriptorMap, source) {
8100
8201
  // ignore the entry and continue.
8101
8202
 
8102
8203
  if (unsafeDesc) {
8103
- descriptorMap[key] = unsafeDesc;
8204
+ descriptorMap[ownKey] = unsafeDesc;
8104
8205
  }
8105
8206
  }
8106
8207
  }
@@ -8111,7 +8212,9 @@ function assignFilteredGlobalObjectShapeDescriptors(descriptorMap, source) {
8111
8212
  function getResolvedShapeDescriptors(...sources) {
8112
8213
  const unsafeDescMap = {};
8113
8214
 
8114
- for (let i = 0, len = sources.length; i < len; i += 1) {
8215
+ for (let i = 0, {
8216
+ length
8217
+ } = sources; i < length; i += 1) {
8115
8218
  const source = sources[i];
8116
8219
 
8117
8220
  if (source) {
@@ -8123,8 +8226,10 @@ function getResolvedShapeDescriptors(...sources) {
8123
8226
  }
8124
8227
 
8125
8228
  function linkIntrinsics(env, globalObjectVirtualizationTarget) {
8126
- // remapping intrinsics that are realm's agnostic
8127
- for (let i = 0, len = ReflectiveIntrinsicObjectNames.length; i < len; i += 1) {
8229
+ // remapping intrinsics that are realm agnostic
8230
+ for (let i = 0, {
8231
+ length
8232
+ } = ReflectiveIntrinsicObjectNames; i < length; i += 1) {
8128
8233
  const globalName = ReflectiveIntrinsicObjectNames[i];
8129
8234
  const reflectiveValue = globalObjectVirtualizationTarget[globalName];
8130
8235
 
@@ -8295,7 +8400,6 @@ function linkUnforgeables(env, blueGlobalThis) {
8295
8400
  }
8296
8401
 
8297
8402
  const IFRAME_SANDBOX_ATTRIBUTE_VALUE = 'allow-same-origin allow-scripts';
8298
- const emptyArray = [];
8299
8403
  const {
8300
8404
  close: DocumentProtoClose,
8301
8405
  createElement: DocumentProtoCreateElement,
@@ -8310,42 +8414,26 @@ const {
8310
8414
  } = Node.prototype;
8311
8415
  const {
8312
8416
  assign: ObjectAssign
8313
- } = Object;
8417
+ } = Object; // eslint-disable-next-line @typescript-eslint/naming-convention
8418
+
8314
8419
  const {
8315
- // eslint-disable-next-line @typescript-eslint/naming-convention
8316
- __lookupGetter__: ObjectProto__lookupGetter__,
8317
- hasOwnProperty: ObjectProtoHasOwnProperty
8420
+ __lookupGetter__: ObjectProto__lookupGetter__
8318
8421
  } = Object.prototype;
8319
8422
  const {
8320
8423
  apply: ReflectApply
8321
8424
  } = Reflect;
8322
-
8323
- function ObjectLookupOwnGetter(obj, key) {
8324
- // Since this function is only used internally, and would not otherwise be
8325
- // reachable by user code, istanbul can ignore test coverage for the
8326
- // following condition.
8327
- // istanbul ignore next
8328
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
8329
- if (obj === null || obj === undefined || !ReflectApply(ObjectProtoHasOwnProperty, obj, [key])) {
8330
- return undefined;
8331
- } // eslint-disable-next-line @typescript-eslint/no-use-before-define
8332
-
8333
-
8334
- return ReflectApply(ObjectProto__lookupGetter__, obj, [key]);
8335
- }
8336
-
8337
- const DocumentProtoBodyGetter = ObjectLookupOwnGetter(Document.prototype, 'body');
8338
- const HTMLElementProtoStyleGetter = ObjectLookupOwnGetter(HTMLElement.prototype, 'style');
8339
- const HTMLIFrameElementProtoContentWindowGetter = ObjectLookupOwnGetter(HTMLIFrameElement.prototype, 'contentWindow');
8340
- const NodeProtoIsConnectedGetter = ObjectLookupOwnGetter(Node.prototype, 'isConnected');
8341
- const NodeProtoLastChildGetter = ObjectLookupOwnGetter(Node.prototype, 'lastChild');
8425
+ const DocumentProtoBodyGetter = ReflectApply(ObjectProto__lookupGetter__, Document.prototype, ['body']);
8426
+ const HTMLElementProtoStyleGetter = ReflectApply(ObjectProto__lookupGetter__, HTMLElement.prototype, ['style']);
8427
+ const HTMLIFrameElementProtoContentWindowGetter = ReflectApply(ObjectProto__lookupGetter__, HTMLIFrameElement.prototype, ['contentWindow']);
8428
+ const NodeProtoIsConnectedGetter = ReflectApply(ObjectProto__lookupGetter__, Node.prototype, ['isConnected']);
8429
+ const NodeProtoLastChildGetter = ReflectApply(ObjectProto__lookupGetter__, Node.prototype, ['lastChild']);
8342
8430
 
8343
8431
  function DocumentBody(doc) {
8344
- return ReflectApply(DocumentProtoBodyGetter, doc, emptyArray);
8432
+ return ReflectApply(DocumentProtoBodyGetter, doc, []);
8345
8433
  }
8346
8434
 
8347
8435
  function DocumentClose(doc) {
8348
- return ReflectApply(DocumentProtoClose, doc, emptyArray);
8436
+ return ReflectApply(DocumentProtoClose, doc, []);
8349
8437
  }
8350
8438
 
8351
8439
  function DocumentCreateElement(doc, tagName) {
@@ -8353,7 +8441,7 @@ function DocumentCreateElement(doc, tagName) {
8353
8441
  }
8354
8442
 
8355
8443
  function DocumentOpen(doc) {
8356
- return ReflectApply(DocumentProtoOpen, doc, emptyArray);
8444
+ return ReflectApply(DocumentProtoOpen, doc, []);
8357
8445
  }
8358
8446
 
8359
8447
  function ElementSetAttribute(el, name, value) {
@@ -8361,15 +8449,15 @@ function ElementSetAttribute(el, name, value) {
8361
8449
  }
8362
8450
 
8363
8451
  function ElementRemove(element) {
8364
- return ReflectApply(ElementProtoRemove, element, emptyArray);
8452
+ return ReflectApply(ElementProtoRemove, element, []);
8365
8453
  }
8366
8454
 
8367
8455
  function HTMLElementStyleGetter(el) {
8368
- return ReflectApply(HTMLElementProtoStyleGetter, el, emptyArray);
8456
+ return ReflectApply(HTMLElementProtoStyleGetter, el, []);
8369
8457
  }
8370
8458
 
8371
8459
  function HTMLIFrameElementContentWindowGetter(iframe) {
8372
- return ReflectApply(HTMLIFrameElementProtoContentWindowGetter, iframe, emptyArray);
8460
+ return ReflectApply(HTMLIFrameElementProtoContentWindowGetter, iframe, []);
8373
8461
  }
8374
8462
 
8375
8463
  function NodeAppendChild(parent, child) {
@@ -8382,11 +8470,11 @@ function NodeAppendChild(parent, child) {
8382
8470
 
8383
8471
 
8384
8472
  function NodeLastChild(node) {
8385
- return ReflectApply(NodeProtoLastChildGetter, node, emptyArray);
8473
+ return ReflectApply(NodeProtoLastChildGetter, node, []);
8386
8474
  }
8387
8475
 
8388
8476
  function NodeIsConnected(node) {
8389
- return ReflectApply(NodeProtoIsConnectedGetter, node, emptyArray);
8477
+ return ReflectApply(NodeProtoIsConnectedGetter, node, []);
8390
8478
  }
8391
8479
 
8392
8480
  function createDetachableIframe() {
@@ -8977,12 +9065,13 @@ function evaluateInSandbox$LWS‍(key$LWS‍, source$LWS‍, context$LWS‍, end
8977
9065
  // this package we perform a small runtime check to determine whether our
8978
9066
  // code is minified or in DEBUG_MODE.
8979
9067
  // https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.debug_mode_enable
8980
- // eslint-disable-next-line @typescript-eslint/naming-convention
8981
9068
 
8982
9069
 
8983
- const DEBUG_MODE = function DEBUG_MODE() {}.name === 'DEBUG_MODE';
9070
+ const DEBUG_MODE$LWS‍ = `${() =>
9071
+ /**/
9072
+ 1}`.includes('*');
8984
9073
 
8985
- if (DEBUG_MODE) {
9074
+ if (DEBUG_MODE$LWS‍) {
8986
9075
  const headerCSSText$LWS‍ = 'display: inline-block; margin-bottom: 3px; margin-left: -3px; word-break: break-all; word-wrap: wrap;';
8987
9076
  const bodyItemStyleObject$LWS‍ = {
8988
9077
  style: 'margin-left:11px; margin-bottom: 3px;'
@@ -9176,7 +9265,7 @@ if (DEBUG_MODE) {
9176
9265
 
9177
9266
  });
9178
9267
  }
9179
- /*! version: 0.15.5 */
9268
+ /*! version: 0.15.6 */
9180
9269
 
9181
9270
  const loaderDefine = globalThis.LWR.define;
9182
9271
  /**