@lwrjs/client-modules 0.12.0-alpha.12 → 0.12.0-alpha.13
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/build/bundle/prod/lwr/lockerDefine/lockerDefine.js +1 -1
- package/build/bundle/prod/lwr/servicesESM/servicesESM.js +1 -1
- package/build/modules/lwr/environment/environment.js +6 -6
- package/build/modules/lwr/lockerDefine/lockerDefine.js +130 -92
- package/build/modules/lwr/lockerSandbox/lockerSandbox.js +130 -92
- package/build/modules/lwr/preInit/preInit.js +3 -2
- package/package.json +5 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=[];let o;const
|
|
1
|
+
const e=[];let o;const n=globalThis.LWR;function t(){return n}n.define||n.env?globalThis.LWR=Object.freeze({define:n.define,env:n.env}):delete globalThis.LWR;const a={addLoaderPlugin:()=>{console.warn("API is not supported in ESM format")},handleStaleModule:function(n){e.push(n),o||(o=new WebSocket(`ws://${location.host}`),o.addEventListener("message",(async({data:o})=>{const n=JSON.parse(o);if("moduleUpdate"===n.eventType){const{oldHash:o,newHash:t,module:{specifier:a}}=n.payload;for(let n=0;n<e.length;n++){if(null!==(0,e[n])({name:a,oldHash:o,newHash:t}))break}}})))},appMetadata:function(){const{appId:e,bootstrapModule:o,rootComponent:n,rootComponents:a}=t();return{appId:e,bootstrapModule:o,rootComponent:n,rootComponents:a}}(),serverData:t().serverData||{}};export{a as services};
|
|
2
2
|
//# sourceMappingURL=servicesESM.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
export const isServer =
|
|
1
|
+
const environment = globalThis?.LWR?.env || {};
|
|
2
|
+
export const isServer = environment && (environment.SSR === 'true' || environment.SSR === true);
|
|
3
3
|
// The baseBath from the config or set from the request (e.g. /shop)
|
|
4
|
-
export const basePath =
|
|
4
|
+
export const basePath = environment && environment.basePath;
|
|
5
5
|
// The locale set from the request or the defaultLocale from the config (e.g. en-US)
|
|
6
|
-
export const locale =
|
|
6
|
+
export const locale = environment && environment.locale;
|
|
7
7
|
// Root base path for static assets (e.g. /shop/mobify/bundle/1234/site)
|
|
8
|
-
export const assetBasePath =
|
|
8
|
+
export const assetBasePath = environment && environment.assetBasePath;
|
|
9
9
|
// Base path for UI routing (e.g. /shop/en-US)
|
|
10
|
-
export const uiBasePath =
|
|
10
|
+
export const uiBasePath = environment && environment.uiBasePath;
|
|
@@ -699,24 +699,24 @@ const {
|
|
|
699
699
|
delete: SetProtoDelete$LWS,
|
|
700
700
|
entries: SetProtoEntries$LWS,
|
|
701
701
|
forEach: SetProtoForEach$LWS,
|
|
702
|
-
has: SetProtoHas$LWS,
|
|
702
|
+
has: SetProtoHas$LWS$1,
|
|
703
703
|
keys: SetProtoKeys$LWS,
|
|
704
704
|
[SymbolIterator$LWS$1]: SetProtoSymbolIterator$LWS,
|
|
705
705
|
[SymbolToStringTag$LWS$1]: SetProtoSymbolToStringTag$LWS
|
|
706
706
|
} = SetProto$LWS$1;
|
|
707
707
|
const {
|
|
708
|
-
add: SetProtoAdd$LWS,
|
|
709
|
-
values: SetProtoValues$LWS
|
|
708
|
+
add: SetProtoAdd$LWS$1,
|
|
709
|
+
values: SetProtoValues$LWS$1
|
|
710
710
|
} = SetProto$LWS$1;
|
|
711
711
|
const SetProtoSizeGetter$LWS = ObjectLookupOwnGetter$LWS$1(SetProto$LWS$1, 'size');
|
|
712
712
|
function toSafeSet$LWS(set$LWS) {
|
|
713
713
|
ReflectSetPrototypeOf$LWS$1(set$LWS, null);
|
|
714
|
-
set$LWS.add = SetProtoAdd$LWS;
|
|
714
|
+
set$LWS.add = SetProtoAdd$LWS$1;
|
|
715
715
|
set$LWS.clear = SetProtoClear$LWS;
|
|
716
716
|
set$LWS.delete = SetProtoDelete$LWS;
|
|
717
717
|
set$LWS.entries = SetProtoEntries$LWS;
|
|
718
718
|
set$LWS.forEach = SetProtoForEach$LWS;
|
|
719
|
-
set$LWS.has = SetProtoHas$LWS;
|
|
719
|
+
set$LWS.has = SetProtoHas$LWS$1;
|
|
720
720
|
set$LWS.keys = SetProtoKeys$LWS;
|
|
721
721
|
ReflectDefineProperty$LWS$1(set$LWS, 'size', {
|
|
722
722
|
__proto__: null,
|
|
@@ -725,7 +725,7 @@ function toSafeSet$LWS(set$LWS) {
|
|
|
725
725
|
get: SetProtoSizeGetter$LWS,
|
|
726
726
|
set: undefined
|
|
727
727
|
});
|
|
728
|
-
set$LWS.values = SetProtoValues$LWS;
|
|
728
|
+
set$LWS.values = SetProtoValues$LWS$1;
|
|
729
729
|
set$LWS[SymbolIterator$LWS$1] = SetProtoSymbolIterator$LWS;
|
|
730
730
|
set$LWS[SymbolToStringTag$LWS$1] = SetProtoSymbolToStringTag$LWS;
|
|
731
731
|
ReflectSetPrototypeOf$LWS$1(set$LWS, SetProto$LWS$1);
|
|
@@ -1073,7 +1073,7 @@ function cloneSet$LWS(set$LWS, queue$LWS) {
|
|
|
1073
1073
|
// Step 26.2.1: Let copiedList be a new empty List.
|
|
1074
1074
|
const clone$LWS = new SetCtor$LWS$1();
|
|
1075
1075
|
// Step 26.2.2: For each entry of value.[[SetData]]...
|
|
1076
|
-
const valuesIterable$LWS = ReflectApply$LWS$1(SetProtoValues$LWS, set$LWS, []);
|
|
1076
|
+
const valuesIterable$LWS = ReflectApply$LWS$1(SetProtoValues$LWS$1, set$LWS, []);
|
|
1077
1077
|
// Step 26.2.3: For each entry of copiedList:
|
|
1078
1078
|
let {
|
|
1079
1079
|
length: queueOffset$LWS
|
|
@@ -1089,7 +1089,7 @@ function cloneSet$LWS(set$LWS, queue$LWS) {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
// Step 26.2.3.1: Let serializedEntry be ? StructuredSerializeInternal(entry, forStorage, memory).
|
|
1091
1091
|
queue$LWS[queueOffset$LWS++] = [subCloneValue$LWS => {
|
|
1092
|
-
ReflectApply$LWS$1(SetProtoAdd$LWS, clone$LWS, [subCloneValue$LWS]);
|
|
1092
|
+
ReflectApply$LWS$1(SetProtoAdd$LWS$1, clone$LWS, [subCloneValue$LWS]);
|
|
1093
1093
|
}, subValue$LWS];
|
|
1094
1094
|
}
|
|
1095
1095
|
return clone$LWS;
|
|
@@ -1453,7 +1453,7 @@ const {
|
|
|
1453
1453
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1454
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1455
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.21.
|
|
1456
|
+
/*! version: 0.21.1 */
|
|
1457
1457
|
|
|
1458
1458
|
/*!
|
|
1459
1459
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2112,7 @@ const {
|
|
|
2112
2112
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2113
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2114
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.21.
|
|
2115
|
+
/*! version: 0.21.1 */
|
|
2116
2116
|
|
|
2117
2117
|
/*!
|
|
2118
2118
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2171,7 +2171,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2171
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2172
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2173
|
}
|
|
2174
|
-
/*! version: 0.21.
|
|
2174
|
+
/*! version: 0.21.1 */
|
|
2175
2175
|
|
|
2176
2176
|
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
|
|
2177
2177
|
|
|
@@ -3857,7 +3857,7 @@ try {
|
|
|
3857
3857
|
// swallow
|
|
3858
3858
|
}
|
|
3859
3859
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.21.
|
|
3860
|
+
/*! version: 0.21.1 */
|
|
3861
3861
|
|
|
3862
3862
|
/*!
|
|
3863
3863
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4106,7 +4106,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4106
|
}
|
|
4107
4107
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4108
|
}
|
|
4109
|
-
/*! version: 0.21.
|
|
4109
|
+
/*! version: 0.21.1 */
|
|
4110
4110
|
|
|
4111
4111
|
/*!
|
|
4112
4112
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4304,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4304
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
|
-
/*! version: 0.21.
|
|
4307
|
+
/*! version: 0.21.1 */
|
|
4308
4308
|
|
|
4309
4309
|
/*!
|
|
4310
4310
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -5887,7 +5887,7 @@ function initDistortionDocumentExecCommand$LWS({
|
|
|
5887
5887
|
if (length$LWS >= 1) {
|
|
5888
5888
|
const command$LWS = toString$LWS(args$LWS[0]);
|
|
5889
5889
|
const loweredCommand$LWS = ReflectApply$LWS$1(StringProtoToLowerCase$LWS, command$LWS, []);
|
|
5890
|
-
if (
|
|
5890
|
+
if (loweredCommand$LWS === 'selectall' && this === rootDocument$LWS) {
|
|
5891
5891
|
throwLockerSecurityError$LWS(command$LWS, this);
|
|
5892
5892
|
}
|
|
5893
5893
|
if (length$LWS > 2) {
|
|
@@ -6241,6 +6241,13 @@ function initDistortionElementGetInnerHTML$LWS({
|
|
|
6241
6241
|
const clonedOptions$LWS = shallowCloneOptions$LWS(options$LWS);
|
|
6242
6242
|
clonedOptions$LWS.includeShadowRoots = false;
|
|
6243
6243
|
args$LWS[0] = clonedOptions$LWS;
|
|
6244
|
+
} else {
|
|
6245
|
+
// If there was an argument, but it wasn't "object like",
|
|
6246
|
+
// it is considered invalid, so override it.
|
|
6247
|
+
args$LWS[0] = {
|
|
6248
|
+
__proto__: null,
|
|
6249
|
+
includeShadowRoots: false
|
|
6250
|
+
};
|
|
6244
6251
|
}
|
|
6245
6252
|
} else {
|
|
6246
6253
|
args$LWS[0] = {
|
|
@@ -9873,7 +9880,7 @@ initDistortionElementAfter$LWS, initDistortionElementAppend$LWS, initDistortionE
|
|
|
9873
9880
|
// initDistortionNodeAppendChild,
|
|
9874
9881
|
initDistortionNodeInsertBefore$LWS]);
|
|
9875
9882
|
const externalKeyedDistortionFactoryInitializers$LWS = internalKeyedDistortionFactoryInitializers$LWS;
|
|
9876
|
-
toSafeMap$LWS$1(new MapCtor$LWS$1([[initDistortionDocumentCookieGetter$LWS, 'documentCookie'], [initDistortionDocumentCookieSetter$LWS, 'documentCookie']]));
|
|
9883
|
+
toSafeMap$LWS$1(new MapCtor$LWS$1([[initDistortionCacheStorageDelete$LWS, 'caches'], [initDistortionCacheStorageHas$LWS, 'caches'], [initDistortionCacheStorageKeys$LWS, 'caches'], [initDistortionCacheStorageMatch$LWS, 'caches'], [initDistortionCacheStorageOpen$LWS, 'caches'], [initDistortionCookieStoreDelete$LWS, 'cookieStore'], [initDistortionCookieStoreGet$LWS, 'cookieStore'], [initDistortionCookieStoreGetAll$LWS, 'cookieStore'], [initDistortionCookieStoreOnChange$LWS, 'cookieStore'], [initDistortionCookieStoreSet$LWS, 'cookieStore'], [initDistortionCSSStyleRuleStyleGetter$LWS, 'style'], [initDistortionDocumentCookieGetter$LWS, 'documentCookie'], [initDistortionDocumentCookieSetter$LWS, 'documentCookie'], [initDistortionDocumentDomainSetter$LWS, 'documentDomain'], [initDistortionDocumentExecCommand$LWS, 'documentExecCommand'], [initDistortionElementAfter$LWS, 'element'], [initDistortionElementAppend$LWS, 'element'], [initDistortionElementAttributesGetter$LWS, 'attributes'], [initDistortionElementBefore$LWS, 'element'], [initDistortionElementGetInnerHTML$LWS, 'innerHTML'], [initDistortionElementInnerHTMLSetter$LWS, 'innerHTML'], [initDistortionElementInsertAdjacentElement$LWS, 'element'], [initDistortionElementInsertAdjacentHTML$LWS, 'element'], [initDistortionElementOuterHTMLSetter$LWS, 'element'], [initDistortionElementPrepend$LWS, 'element'], [initDistortionElementRemove$LWS, 'element'], [initDistortionElementReplaceChildren$LWS, 'element'], [initDistortionElementReplaceWith$LWS, 'element'], [initDistortionElementSetAttribute$LWS, 'attributes'], [initDistortionElementSetAttributeNode$LWS, 'attributes'], [initDistortionElementSetAttributeNodeNS$LWS, 'attributes'], [initDistortionElementSetAttributeNS$LWS, 'attributes'], [initDistortionElementSetHTML$LWS, 'element'], [initDistortionElementToggleAttribute$LWS, 'attributes'], [initDistortionLocalStorage$LWS, 'storage'], [initDistortionMessagePortPostMessage$LWS, 'postMessage'], [initDistortionNavigatorSendBeacon$LWS, 'navigatorSendBeacon'], [initDistortionNodeInsertBefore$LWS, 'node'], [initDistortionNodeRemoveChild$LWS, 'node'], [initDistortionNodeReplaceChild$LWS, 'node'], [initDistortionNodeTextContentGetter$LWS, 'node'], [initDistortionNodeTextContentSetter$LWS, 'node'], [initDistortionNodeValueSetter$LWS, 'node'], [initDistortionPerformanceMark$LWS, 'performance'], [initDistortionPerformanceMarkCtor$LWS, 'performance'], [initDistortionPerformanceMeasure$LWS, 'performance'], [initDistortionRangeCreateContextualFragment$LWS, 'range'], [initDistortionRangeDeleteContents$LWS, 'range'], [initDistortionRangeExtractContents$LWS, 'range'], [initDistortionRangeInsertNode$LWS, 'range'], [initDistortionRangeSelectNode$LWS, 'range'], [initDistortionRangeSelectNodeContents$LWS, 'range'], [initDistortionRangeSetEnd$LWS, 'range'], [initDistortionRangeSetEndAfter$LWS, 'range'], [initDistortionRangeSetEndBefore$LWS, 'range'], [initDistortionRangeSetStart$LWS, 'range'], [initDistortionRangeSetStartAfter$LWS, 'range'], [initDistortionRangeSetStartBefore$LWS, 'range'], [initDistortionRangeSurroundContents$LWS, 'range'], [initDistortionSelectionCollapse$LWS, 'selection'], [initDistortionSelectionExtend$LWS, 'selection'], [initDistortionSelectionSelectAllChildren$LWS, 'selection'], [initDistortionSelectionSetBaseAndExtent$LWS, 'selection'], [initDistortionSelectionSetPosition$LWS, 'selection'], [initDistortionSessionStorage$LWS, 'storage'], [initDistortionShadowRootInnerHTMLSetter$LWS, 'innerHTML'], [initDistortionStorage$LWS, 'storage'], [initDistortionStorageClear$LWS, 'storage'], [initDistortionStorageGetItem$LWS, 'storage'], [initDistortionStorageKey$LWS, 'storage'], [initDistortionStorageLength$LWS, 'storage'], [initDistortionStorageRemoveItem$LWS, 'storage'], [initDistortionStorageSetItem$LWS, 'storage'], [initDistortionWindowPostMessage$LWS, 'postMessage'], [initDistortionWindowSetInterval$LWS, 'setInterval'], [initDistortionWindowSetTimeout$LWS, 'setTimeout']]));
|
|
9877
9884
|
const DocumentBlockedProperties$LWS = ['createProcessingInstruction', 'exitFullscreen', 'fullscreen', 'fullscreenElement', 'fullscreenEnabled', 'mozCancelFullScreen', 'mozFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'onfullscreenchange', 'onfullscreenerror', 'onmozfullscreenchange', 'onmozfullscreenerror', 'onrejectionhandled', 'onunhandledrejection', 'releaseCapture', 'releaseEvents', 'webkitFullScreenKeyboardInputAllowed', 'write', 'writeln'];
|
|
9878
9885
|
const ElementBlockedProperties$LWS = ['mozRequestFullScreen', 'onfullscreenchange', 'onfullscreenerror', 'requestFullscreen', 'webkitRequestFullScreen', 'webkitRequestFullscreen'];
|
|
9879
9886
|
const EventBlockedProperties$LWS = ['originalTarget', 'explicitOriginalTarget'];
|
|
@@ -9892,7 +9899,24 @@ const LightningWebSecurity$LWS = {
|
|
|
9892
9899
|
};
|
|
9893
9900
|
const distortions$LWS = {
|
|
9894
9901
|
__proto__: null,
|
|
9895
|
-
|
|
9902
|
+
attributes: true,
|
|
9903
|
+
caches: true,
|
|
9904
|
+
cookieStore: true,
|
|
9905
|
+
documentCookie: true,
|
|
9906
|
+
documentDomain: true,
|
|
9907
|
+
documentExecCommand: true,
|
|
9908
|
+
element: true,
|
|
9909
|
+
innerHTML: true,
|
|
9910
|
+
navigatorSendBeacon: true,
|
|
9911
|
+
node: true,
|
|
9912
|
+
performance: true,
|
|
9913
|
+
postMessage: true,
|
|
9914
|
+
range: true,
|
|
9915
|
+
selection: true,
|
|
9916
|
+
setInterval: true,
|
|
9917
|
+
setTimeout: true,
|
|
9918
|
+
storage: true,
|
|
9919
|
+
style: true
|
|
9896
9920
|
};
|
|
9897
9921
|
ReflectDefineProperty$LWS$1(LightningWebSecurity$LWS, 'distortions', {
|
|
9898
9922
|
__proto__: null,
|
|
@@ -9915,7 +9939,7 @@ const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
|
9915
9939
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9916
9940
|
const WindowBlockedProperties$LWS = ['find'];
|
|
9917
9941
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9918
|
-
/*! version: 0.21.
|
|
9942
|
+
/*! version: 0.21.1 */
|
|
9919
9943
|
|
|
9920
9944
|
/*!
|
|
9921
9945
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -10366,6 +10390,11 @@ const SetCtor$LWS = Set;
|
|
|
10366
10390
|
const {
|
|
10367
10391
|
prototype: SetProto$LWS
|
|
10368
10392
|
} = SetCtor$LWS;
|
|
10393
|
+
const {
|
|
10394
|
+
add: SetProtoAdd$LWS,
|
|
10395
|
+
has: SetProtoHas$LWS,
|
|
10396
|
+
values: SetProtoValues$LWS
|
|
10397
|
+
} = SetProto$LWS;
|
|
10369
10398
|
ObjectLookupOwnGetter$LWS(SetProto$LWS, 'size');
|
|
10370
10399
|
const StringCtor$LWS = String;
|
|
10371
10400
|
const {
|
|
@@ -14417,66 +14446,61 @@ class VirtualEnvironment$LWS {
|
|
|
14417
14446
|
* problematic, and requires a lot more work to guarantee that objects from both sides
|
|
14418
14447
|
* can be considered equivalents (without identity discontinuity).
|
|
14419
14448
|
*/
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
//
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
//
|
|
14428
|
-
// '
|
|
14429
|
-
// '
|
|
14430
|
-
'BigInt',
|
|
14431
|
-
// '
|
|
14432
|
-
// '
|
|
14433
|
-
'
|
|
14434
|
-
|
|
14435
|
-
// '
|
|
14436
|
-
// '
|
|
14437
|
-
|
|
14438
|
-
'
|
|
14439
|
-
//
|
|
14440
|
-
//
|
|
14441
|
-
// '
|
|
14442
|
-
// '
|
|
14443
|
-
// '
|
|
14444
|
-
// '
|
|
14445
|
-
|
|
14446
|
-
'
|
|
14447
|
-
|
|
14448
|
-
//
|
|
14449
|
-
//
|
|
14450
|
-
// '
|
|
14451
|
-
// '
|
|
14452
|
-
// '
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
// '
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
//
|
|
14460
|
-
// '
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
// *** 18.4 Other Properties of the Global Object
|
|
14469
|
-
// 'Atomics', // Remapped
|
|
14470
|
-
'JSON', 'Math', 'Reflect',
|
|
14471
|
-
// *** Annex B
|
|
14472
|
-
'escape', 'unescape'
|
|
14473
|
-
// *** ECMA-402
|
|
14474
|
-
// 'Intl', // Remapped
|
|
14475
|
-
];
|
|
14449
|
+
function getESGlobalKeys$LWS(remapTypedArrays$LWS = true) {
|
|
14450
|
+
const ESGlobalKeys$LWS = [
|
|
14451
|
+
// *** 19.1 Value Properties of the Global Object
|
|
14452
|
+
'globalThis', 'Infinity', 'NaN', 'undefined',
|
|
14453
|
+
// *** 19.2 Function Properties of the Global Object
|
|
14454
|
+
// 'eval', // dangerous & Reflective
|
|
14455
|
+
'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
|
|
14456
|
+
// *** 19.3 Constructor Properties of the Global Object
|
|
14457
|
+
// 'AggregateError', // Reflective
|
|
14458
|
+
// 'Array', // Reflective
|
|
14459
|
+
'BigInt', 'Boolean',
|
|
14460
|
+
// 'Date', // Remapped
|
|
14461
|
+
// 'Error', // Reflective
|
|
14462
|
+
// 'EvalError', // Reflective
|
|
14463
|
+
'FinalizationRegistry',
|
|
14464
|
+
// 'Function', // dangerous & Reflective
|
|
14465
|
+
// 'Map', // Remapped
|
|
14466
|
+
'Number',
|
|
14467
|
+
// 'Object', // Reflective
|
|
14468
|
+
// Allow blue `Promise` constructor to overwrite the Red one so that promises
|
|
14469
|
+
// created by the `Promise` constructor or APIs like `fetch` will work.
|
|
14470
|
+
// 'Promise', // Remapped
|
|
14471
|
+
// 'Proxy', // Reflective
|
|
14472
|
+
// 'RangeError', // Reflective
|
|
14473
|
+
// 'ReferenceError', // Reflective
|
|
14474
|
+
'RegExp',
|
|
14475
|
+
// 'Set', // Remapped
|
|
14476
|
+
'String', 'Symbol',
|
|
14477
|
+
// 'SyntaxError', // Reflective
|
|
14478
|
+
// 'TypeError', // Reflective
|
|
14479
|
+
// 'URIError', // Reflective
|
|
14480
|
+
// 'WeakMap', // Remapped
|
|
14481
|
+
// 'WeakSet', // Remapped
|
|
14482
|
+
'WeakRef',
|
|
14483
|
+
// *** 18.4 Other Properties of the Global Object
|
|
14484
|
+
// 'Atomics', // Remapped
|
|
14485
|
+
'JSON', 'Math', 'Reflect',
|
|
14486
|
+
// *** Annex B
|
|
14487
|
+
'escape', 'unescape'
|
|
14488
|
+
// *** ECMA-402
|
|
14489
|
+
// 'Intl', // Remapped
|
|
14490
|
+
];
|
|
14491
|
+
|
|
14492
|
+
if (remapTypedArrays$LWS === false) {
|
|
14493
|
+
ESGlobalKeys$LWS.push('ArrayBuffer', 'BigInt64Array', 'BigUint64Array', 'DataView', 'Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'SharedArrayBuffer', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array');
|
|
14494
|
+
}
|
|
14495
|
+
return ESGlobalKeys$LWS;
|
|
14496
|
+
}
|
|
14476
14497
|
// These are foundational things that should never be wrapped but are equivalent
|
|
14477
14498
|
// @TODO: Revisit this list.
|
|
14478
14499
|
const ReflectiveIntrinsicObjectNames$LWS = ['AggregateError', 'Array', 'Error', 'EvalError', 'Function', 'Object', 'Proxy', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'eval', 'globalThis'];
|
|
14479
|
-
|
|
14500
|
+
function getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(remapTypedArrays$LWS = true) {
|
|
14501
|
+
const ESGlobalKeys$LWS = getESGlobalKeys$LWS(remapTypedArrays$LWS);
|
|
14502
|
+
return toSafeArray$LWS([...ESGlobalKeys$LWS, ...ReflectiveIntrinsicObjectNames$LWS]);
|
|
14503
|
+
}
|
|
14480
14504
|
function getGlobalObjectOwnKeys$LWS(source$LWS) {
|
|
14481
14505
|
const ownKeys$LWS = ReflectOwnKeys$LWS(source$LWS);
|
|
14482
14506
|
// WKWebView incorrectly excludes the 'webkit' own property of the global
|
|
@@ -14487,8 +14511,9 @@ function getGlobalObjectOwnKeys$LWS(source$LWS) {
|
|
|
14487
14511
|
}
|
|
14488
14512
|
return ownKeys$LWS;
|
|
14489
14513
|
}
|
|
14490
|
-
function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS, source$LWS) {
|
|
14514
|
+
function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS, source$LWS, includeTypedArrays$LWS) {
|
|
14491
14515
|
const ownKeys$LWS = getGlobalObjectOwnKeys$LWS(source$LWS);
|
|
14516
|
+
const ESGlobalsAndReflectiveIntrinsicObjectNames$LWS = getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(includeTypedArrays$LWS);
|
|
14492
14517
|
for (let i$LWS = 0, {
|
|
14493
14518
|
length: length$LWS
|
|
14494
14519
|
} = ownKeys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
@@ -14511,10 +14536,11 @@ function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS,
|
|
|
14511
14536
|
}
|
|
14512
14537
|
return descs$LWS;
|
|
14513
14538
|
}
|
|
14514
|
-
function getFilteredGlobalOwnKeys$LWS(source$LWS) {
|
|
14539
|
+
function getFilteredGlobalOwnKeys$LWS(source$LWS, includeTypedArrays$LWS) {
|
|
14515
14540
|
const result$LWS = [];
|
|
14516
14541
|
let resultOffset$LWS = 0;
|
|
14517
14542
|
const ownKeys$LWS = getGlobalObjectOwnKeys$LWS(source$LWS);
|
|
14543
|
+
const ESGlobalsAndReflectiveIntrinsicObjectNames$LWS = getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(includeTypedArrays$LWS);
|
|
14518
14544
|
for (let i$LWS = 0, {
|
|
14519
14545
|
length: length$LWS
|
|
14520
14546
|
} = ownKeys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
@@ -14588,20 +14614,24 @@ function getCachedGlobalObjectReferences$LWS(globalObject$LWS) {
|
|
|
14588
14614
|
blueDocumentToRecordMap$LWS.set(document$LWS, record$LWS);
|
|
14589
14615
|
return record$LWS;
|
|
14590
14616
|
}
|
|
14591
|
-
function filterWindowKeys$LWS(keys$LWS) {
|
|
14617
|
+
function filterWindowKeys$LWS(keys$LWS, remapTypedArrays$LWS) {
|
|
14618
|
+
const excludedKeys$LWS = new SetCtor$LWS(['document', 'location', 'top', 'window']);
|
|
14619
|
+
// Crypto and typed arrays must be from the same global object
|
|
14620
|
+
if (remapTypedArrays$LWS === false) {
|
|
14621
|
+
excludedKeys$LWS.add('crypto');
|
|
14622
|
+
excludedKeys$LWS.add('Crypto');
|
|
14623
|
+
excludedKeys$LWS.add('SubtleCrypto');
|
|
14624
|
+
}
|
|
14592
14625
|
const result$LWS = [];
|
|
14593
14626
|
let resultOffset$LWS = 0;
|
|
14594
14627
|
for (let i$LWS = 0, {
|
|
14595
14628
|
length: length$LWS
|
|
14596
14629
|
} = keys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
14597
14630
|
const key$LWS = keys$LWS[i$LWS];
|
|
14598
|
-
if (
|
|
14599
|
-
|
|
14600
|
-
key$LWS !== 'document' && key$LWS !== 'location ' && key$LWS !== 'top' && key$LWS !== 'window' &&
|
|
14601
|
-
// Remove other browser specific unforgeables.
|
|
14602
|
-
key$LWS !== 'chrome') {
|
|
14603
|
-
result$LWS[resultOffset$LWS++] = key$LWS;
|
|
14631
|
+
if (ReflectApply$LWS(SetProtoHas$LWS, excludedKeys$LWS, [key$LWS])) {
|
|
14632
|
+
continue;
|
|
14604
14633
|
}
|
|
14634
|
+
result$LWS[resultOffset$LWS++] = key$LWS;
|
|
14605
14635
|
}
|
|
14606
14636
|
return result$LWS;
|
|
14607
14637
|
}
|
|
@@ -14632,7 +14662,7 @@ function filterWindowKeys$LWS(keys$LWS) {
|
|
|
14632
14662
|
* that will be installed (via the membrane) as global descriptors in
|
|
14633
14663
|
* the red realm.
|
|
14634
14664
|
*/
|
|
14635
|
-
function removeWindowDescriptors$LWS(unsafeDescs$LWS) {
|
|
14665
|
+
function removeWindowDescriptors$LWS(unsafeDescs$LWS, remapTypedArrays$LWS) {
|
|
14636
14666
|
// Remove unforgeable descriptors that cannot be installed.
|
|
14637
14667
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'document');
|
|
14638
14668
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'location');
|
|
@@ -14640,6 +14670,12 @@ function removeWindowDescriptors$LWS(unsafeDescs$LWS) {
|
|
|
14640
14670
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'window');
|
|
14641
14671
|
// Remove other browser specific unforgeables.
|
|
14642
14672
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'chrome');
|
|
14673
|
+
// Crypto and typed arrays must be from the same global object
|
|
14674
|
+
if (remapTypedArrays$LWS === false) {
|
|
14675
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'crypto');
|
|
14676
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'Crypto');
|
|
14677
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'SubtleCrypto');
|
|
14678
|
+
}
|
|
14643
14679
|
return unsafeDescs$LWS;
|
|
14644
14680
|
}
|
|
14645
14681
|
/**
|
|
@@ -14681,6 +14717,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14681
14717
|
instrumentation: instrumentation$LWS,
|
|
14682
14718
|
keepAlive: keepAlive$LWS = true,
|
|
14683
14719
|
liveTargetCallback: liveTargetCallback$LWS,
|
|
14720
|
+
remapTypedArrays: remapTypedArrays$LWS = true,
|
|
14684
14721
|
signSourceCallback: signSourceCallback$LWS
|
|
14685
14722
|
// eslint-disable-next-line prefer-object-spread
|
|
14686
14723
|
} = ObjectAssign$LWS({
|
|
@@ -14690,7 +14727,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14690
14727
|
const redWindow$LWS = ReflectApply$LWS(HTMLIFrameElementProtoContentWindowGetter$LWS, iframe$LWS, []);
|
|
14691
14728
|
const shouldUseDefaultGlobalOwnKeys$LWS = typeof globalObjectShape$LWS !== 'object' || globalObjectShape$LWS === null;
|
|
14692
14729
|
if (shouldUseDefaultGlobalOwnKeys$LWS && defaultGlobalOwnKeys$LWS === null) {
|
|
14693
|
-
defaultGlobalOwnKeys$LWS = filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(redWindow$LWS));
|
|
14730
|
+
defaultGlobalOwnKeys$LWS = filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(redWindow$LWS, remapTypedArrays$LWS), remapTypedArrays$LWS);
|
|
14694
14731
|
}
|
|
14695
14732
|
let blueConnector$LWS = blueCreateHooksCallbackCache$LWS.get(blueRefs$LWS.document);
|
|
14696
14733
|
if (blueConnector$LWS === undefined) {
|
|
@@ -14732,7 +14769,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14732
14769
|
// window.__proto__.__proto__.__proto__ (aka EventTarget.prototype)
|
|
14733
14770
|
env$LWS.link('__proto__', '__proto__', '__proto__');
|
|
14734
14771
|
env$LWS.remapProto(blueRefs$LWS.document, blueRefs$LWS.DocumentProto);
|
|
14735
|
-
env$LWS.lazyRemapProperties(blueRefs$LWS.window, shouldUseDefaultGlobalOwnKeys$LWS ? defaultGlobalOwnKeys$LWS : filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(globalObjectShape$LWS)),
|
|
14772
|
+
env$LWS.lazyRemapProperties(blueRefs$LWS.window, shouldUseDefaultGlobalOwnKeys$LWS ? defaultGlobalOwnKeys$LWS : filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(globalObjectShape$LWS), remapTypedArrays$LWS),
|
|
14736
14773
|
// Chromium based browsers have a bug that nulls the result of `window`
|
|
14737
14774
|
// getters in detached iframes when the property descriptor of `window.window`
|
|
14738
14775
|
// is retrieved.
|
|
@@ -14740,8 +14777,8 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14740
14777
|
keepAlive$LWS ? undefined : unforgeablePoisonedWindowKeys$LWS);
|
|
14741
14778
|
if (endowments$LWS) {
|
|
14742
14779
|
const filteredEndowments$LWS = {};
|
|
14743
|
-
assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(filteredEndowments$LWS, endowments$LWS);
|
|
14744
|
-
removeWindowDescriptors$LWS(filteredEndowments$LWS);
|
|
14780
|
+
assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(filteredEndowments$LWS, endowments$LWS, remapTypedArrays$LWS);
|
|
14781
|
+
removeWindowDescriptors$LWS(filteredEndowments$LWS, remapTypedArrays$LWS);
|
|
14745
14782
|
env$LWS.remapProperties(blueRefs$LWS.window, filteredEndowments$LWS);
|
|
14746
14783
|
}
|
|
14747
14784
|
// We intentionally skip remapping Window.prototype because there is nothing
|
|
@@ -15101,7 +15138,7 @@ function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
|
15101
15138
|
// tools from mistaking the regexp or the replacement string for an
|
|
15102
15139
|
// actual source mapping URL.
|
|
15103
15140
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
15104
|
-
sourceText$LWS = `\n//# LWS Version = "0.21.
|
|
15141
|
+
sourceText$LWS = `\n//# LWS Version = "0.21.1"\n${sourceText$LWS}`;
|
|
15105
15142
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
15106
15143
|
// Append "'use strict'" to the extracted function body so it is
|
|
15107
15144
|
// evaluated in strict mode.
|
|
@@ -15316,6 +15353,7 @@ function createVirtualEnvironment$LWS(record$LWS) {
|
|
|
15316
15353
|
// accessible from inside the sandbox.
|
|
15317
15354
|
ObjectAssign$LWS$1({}, DEFAULT_ENDOWMENTS_DESCRIPTOR_MAP$LWS, ObjectGetOwnPropertyDescriptors$LWS(endowments$LWS)) : DEFAULT_ENDOWMENTS_DESCRIPTOR_MAP$LWS,
|
|
15318
15355
|
instrumentation: verboseInstrumentation$LWS ? instrumentation$LWS : undefined,
|
|
15356
|
+
remapTypedArrays: key$LWS !== 'omnistudio',
|
|
15319
15357
|
keepAlive: IFRAME_KEEP_ALIVE_FLAG$LWS,
|
|
15320
15358
|
liveTargetCallback: isTargetLive$LWS,
|
|
15321
15359
|
signSourceCallback: sourceText$LWS => trusted.createScript(sourceText$LWS)
|
|
@@ -15654,7 +15692,7 @@ function internalEvaluateInSandbox$LWS(evaluateOptions$LWS) {
|
|
|
15654
15692
|
let activity$LWS;
|
|
15655
15693
|
// istanbul ignore else: this is a safety precaution that is unreachable via tests
|
|
15656
15694
|
if (LOCKER_INSTRUMENTATION_FLAG$LWS) {
|
|
15657
|
-
activity$LWS = startActivity$LWS('
|
|
15695
|
+
activity$LWS = startActivity$LWS('lws.evaluate', BASIC_INSTRUMENTATION_DATA$LWS);
|
|
15658
15696
|
}
|
|
15659
15697
|
try {
|
|
15660
15698
|
// Protecting against errors during evaluation can guarantee the state
|
|
@@ -15796,7 +15834,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15796
15834
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15797
15835
|
return secureDep$LWS;
|
|
15798
15836
|
}
|
|
15799
|
-
/*! version: 0.21.
|
|
15837
|
+
/*! version: 0.21.1 */
|
|
15800
15838
|
|
|
15801
15839
|
const loaderDefine = globalThis.LWR.define;
|
|
15802
15840
|
|