@lwrjs/client-modules 0.12.0-alpha.12 → 0.12.0-alpha.14
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 +175 -204
- package/build/modules/lwr/lockerSandbox/lockerSandbox.js +178 -205
- package/build/modules/lwr/preInit/preInit.js +3 -2
- package/package.json +5 -5
|
@@ -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.2 */
|
|
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.2 */
|
|
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.2 */
|
|
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.2 */
|
|
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.2 */
|
|
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.2 */
|
|
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'], [initDistortionCustomElementRegistryDefine$LWS, 'customElements'], [initDistortionCustomElementRegistryGet$LWS, 'customElements'], [initDistortionCustomElementRegistryUpgrade$LWS, 'customElements'], [initDistortionCustomElementRegistryWhenDefined$LWS, 'customElements'], [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'], [initDistortionIDBObjectStoreAdd$LWS, 'indexedDB'], [initDistortionIDBObjectStorePut$LWS, 'indexedDB'], [initDistortionLocalStorage$LWS, 'storage'], [initDistortionMessagePortPostMessage$LWS, 'postMessage'], [initDistortionNamedNodeMapSetNamedItem$LWS, 'attributes'], [initDistortionNamedNodeMapSetNamedItemNS$LWS, 'attributes'], [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'];
|
|
@@ -9887,46 +9894,60 @@ const HTMLIFrameElementBlockedProperties$LWS = ['getSVGDocument', 'srcdoc'];
|
|
|
9887
9894
|
const HTMLObjectElementBlockedProperties$LWS = ['getSVGDocument'];
|
|
9888
9895
|
const HTMLScriptElementBlockedAttributes$LWS = ['nonce'];
|
|
9889
9896
|
const HTMLScriptElementBlockedProperties$LWS = ['nonce'];
|
|
9890
|
-
const LightningWebSecurity$LWS = {
|
|
9891
|
-
__proto__: null
|
|
9892
|
-
};
|
|
9893
|
-
const distortions$LWS = {
|
|
9894
|
-
__proto__: null,
|
|
9895
|
-
documentCookie: true
|
|
9896
|
-
};
|
|
9897
|
-
ReflectDefineProperty$LWS$1(LightningWebSecurity$LWS, 'distortions', {
|
|
9898
|
-
__proto__: null,
|
|
9899
|
-
enumerable: false,
|
|
9900
|
-
configurable: false,
|
|
9901
|
-
writable: false,
|
|
9902
|
-
value: distortions$LWS
|
|
9903
|
-
});
|
|
9904
|
-
ReflectDefineProperty$LWS$1(window, '$LWS', {
|
|
9905
|
-
__proto__: null,
|
|
9906
|
-
enumerable: false,
|
|
9907
|
-
configurable: false,
|
|
9908
|
-
writable: false,
|
|
9909
|
-
value: LightningWebSecurity$LWS
|
|
9910
|
-
});
|
|
9911
|
-
ObjectFreeze$LWS$1(LightningWebSecurity$LWS);
|
|
9912
|
-
ObjectPreventExtensions$LWS(distortions$LWS);
|
|
9913
9897
|
const SVGElementBlockedAttributes$LWS = ['nonce'];
|
|
9914
9898
|
const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
9915
9899
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9916
9900
|
const WindowBlockedProperties$LWS = ['find'];
|
|
9917
9901
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9918
|
-
/*! version: 0.21.
|
|
9902
|
+
/*! version: 0.21.2 */
|
|
9919
9903
|
|
|
9920
9904
|
/*!
|
|
9921
9905
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
9922
9906
|
*/
|
|
9923
|
-
const
|
|
9907
|
+
const rootSandboxRegistry$LWS = {
|
|
9908
|
+
__proto__: null
|
|
9909
|
+
};
|
|
9910
|
+
const documentSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1([[rootDocument$LWS, rootSandboxRegistry$LWS]]));
|
|
9911
|
+
const opaqueWindowSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
9912
|
+
function getOpaqueSandboxRegistry$LWS(globalObject$LWS) {
|
|
9913
|
+
// Use the `document` as the key because a window object maintains its
|
|
9914
|
+
// identity continuity when its location changes and while the
|
|
9915
|
+
// non-configurable document property does not.
|
|
9916
|
+
let sandboxRegistry$LWS = opaqueWindowSandboxRegistryCache$LWS.get(globalObject$LWS);
|
|
9917
|
+
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
9918
|
+
if (sandboxRegistry$LWS === undefined) {
|
|
9919
|
+
sandboxRegistry$LWS = {
|
|
9920
|
+
__proto__: null
|
|
9921
|
+
};
|
|
9922
|
+
opaqueWindowSandboxRegistryCache$LWS.set(globalObject$LWS, sandboxRegistry$LWS);
|
|
9923
|
+
}
|
|
9924
|
+
return sandboxRegistry$LWS;
|
|
9925
|
+
}
|
|
9926
|
+
function getSandboxRegistry$LWS(document$LWS) {
|
|
9927
|
+
// Use the `document` as the key because a window object maintains its
|
|
9928
|
+
// identity continuity when its location changes and while the
|
|
9929
|
+
// non-configurable document property does not.
|
|
9930
|
+
let sandboxRegistry$LWS = documentSandboxRegistryCache$LWS.get(document$LWS);
|
|
9931
|
+
if (sandboxRegistry$LWS === undefined) {
|
|
9932
|
+
sandboxRegistry$LWS = {
|
|
9933
|
+
__proto__: null
|
|
9934
|
+
};
|
|
9935
|
+
documentSandboxRegistryCache$LWS.set(document$LWS, sandboxRegistry$LWS);
|
|
9936
|
+
}
|
|
9937
|
+
return sandboxRegistry$LWS;
|
|
9938
|
+
}
|
|
9939
|
+
const LightningWebSecurity$LWS = {
|
|
9940
|
+
__proto__: null
|
|
9941
|
+
};
|
|
9942
|
+
toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
9943
|
+
ObjectFreeze$LWS$1(LightningWebSecurity$LWS);
|
|
9924
9944
|
const distortionFactoriesCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
9925
9945
|
const opaqueWindowPostMessageDistortionFactoryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
9926
9946
|
// WebKit based browsers have a bug that prematurely removes distortion entries
|
|
9927
9947
|
// from the distortions weak map.
|
|
9928
9948
|
const SUPPORTS_DISTORTIONS_WEAK_MAP$LWS = !IS_WEBKIT_BROWSER$LWS;
|
|
9929
9949
|
function createDistortionEntries$LWS(record$LWS, factories$LWS) {
|
|
9950
|
+
toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
9930
9951
|
const entries$LWS = [];
|
|
9931
9952
|
for (let i$LWS = 0, {
|
|
9932
9953
|
length: length$LWS
|
|
@@ -9940,11 +9961,12 @@ function createDistortionEntries$LWS(record$LWS, factories$LWS) {
|
|
|
9940
9961
|
} = entry$LWS;
|
|
9941
9962
|
if (typeof originalValue$LWS === 'function') {
|
|
9942
9963
|
const proxyMaskedFunctionDistortion$LWS = proxyMaskFunctionDistortion$LWS(record$LWS, factory$LWS, distortedValue$LWS, originalValue$LWS);
|
|
9943
|
-
distortionFactoryToggleSwitchesCache$LWS.get(factory$LWS);
|
|
9944
9964
|
entries$LWS[entries$LWS.length] = [originalValue$LWS, proxyMaskedFunctionDistortion$LWS];
|
|
9945
9965
|
} else {
|
|
9946
9966
|
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
9947
9967
|
if (typeof originalValue$LWS === 'object' && originalValue$LWS !== null) {
|
|
9968
|
+
// TODO: we may need to make this assigned value a proxy when ENABLE_DISTORTION_TOGGLE_SWITCHES is true,
|
|
9969
|
+
// allowing us to change which value is provided for the distortion.
|
|
9948
9970
|
entries$LWS[entries$LWS.length] = entry$LWS;
|
|
9949
9971
|
}
|
|
9950
9972
|
}
|
|
@@ -10028,18 +10050,13 @@ function getOpaqueWindowPostMessageDistortionFactory$LWS(record$LWS) {
|
|
|
10028
10050
|
return opaqueWindowPostMessageDistortionFactory$LWS;
|
|
10029
10051
|
}
|
|
10030
10052
|
function proxyMaskFunctionDistortion$LWS({
|
|
10031
|
-
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
10032
10053
|
LOCKER_VERBOSE_INSTRUMENTATION_FLAG: LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS,
|
|
10033
10054
|
instrumentation: instrumentation$LWS,
|
|
10034
10055
|
key: sandboxKey$LWS
|
|
10035
10056
|
}, distortionFactory$LWS, distortionFunc$LWS, maskFunc$LWS) {
|
|
10036
10057
|
let activityName$LWS;
|
|
10037
|
-
let startActivity$LWS;
|
|
10038
10058
|
// istanbul ignore if: this is a safety precaution that is unreachable via tests
|
|
10039
10059
|
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10040
|
-
({
|
|
10041
|
-
startActivity: startActivity$LWS
|
|
10042
|
-
} = instrumentation$LWS);
|
|
10043
10060
|
const {
|
|
10044
10061
|
name: factoryName$LWS
|
|
10045
10062
|
} = distortionFactory$LWS;
|
|
@@ -10047,51 +10064,33 @@ function proxyMaskFunctionDistortion$LWS({
|
|
|
10047
10064
|
}
|
|
10048
10065
|
return maskFunction$LWS(distortionFunc$LWS, maskFunc$LWS, {
|
|
10049
10066
|
apply: function (target$LWS, thisArg$LWS, args$LWS) {
|
|
10050
|
-
|
|
10051
|
-
// istanbul ignore if: this is a safety precaution that is unreachable via tests
|
|
10052
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10053
|
-
activity$LWS = startActivity$LWS(activityName$LWS, BASIC_INSTRUMENTATION_DATA$LWS);
|
|
10054
|
-
}
|
|
10067
|
+
const activity$LWS = LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS ? instrumentation$LWS == null || instrumentation$LWS.startActivity == null ? void 0 : instrumentation$LWS.startActivity(activityName$LWS) : undefined;
|
|
10055
10068
|
try {
|
|
10056
10069
|
return ReflectApply$LWS$1(target$LWS, thisArg$LWS, args$LWS);
|
|
10057
10070
|
} catch (error) {
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
});
|
|
10064
|
-
}
|
|
10071
|
+
activity$LWS == null || activity$LWS.error({
|
|
10072
|
+
sandboxKey: sandboxKey$LWS,
|
|
10073
|
+
error
|
|
10074
|
+
});
|
|
10075
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10065
10076
|
throw error;
|
|
10066
10077
|
} finally {
|
|
10067
|
-
|
|
10068
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10069
|
-
activity$LWS.stop();
|
|
10070
|
-
}
|
|
10078
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10071
10079
|
}
|
|
10072
10080
|
},
|
|
10073
10081
|
construct: function (target$LWS, args$LWS, newTarget$LWS) {
|
|
10074
|
-
|
|
10075
|
-
// istanbul ignore if: this is a safety precaution that is unreachable via tests
|
|
10076
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10077
|
-
activity$LWS = startActivity$LWS(activityName$LWS, BASIC_INSTRUMENTATION_DATA$LWS);
|
|
10078
|
-
}
|
|
10082
|
+
const activity$LWS = LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS ? instrumentation$LWS == null || instrumentation$LWS.startActivity == null ? void 0 : instrumentation$LWS.startActivity(activityName$LWS) : undefined;
|
|
10079
10083
|
try {
|
|
10080
10084
|
return ReflectConstruct$LWS(target$LWS, args$LWS, newTarget$LWS);
|
|
10081
10085
|
} catch (error) {
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
});
|
|
10088
|
-
}
|
|
10086
|
+
activity$LWS == null || activity$LWS.error({
|
|
10087
|
+
sandboxKey: sandboxKey$LWS,
|
|
10088
|
+
error
|
|
10089
|
+
});
|
|
10090
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10089
10091
|
throw error;
|
|
10090
10092
|
} finally {
|
|
10091
|
-
|
|
10092
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10093
|
-
activity$LWS.stop();
|
|
10094
|
-
}
|
|
10093
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10095
10094
|
}
|
|
10096
10095
|
}
|
|
10097
10096
|
});
|
|
@@ -10366,6 +10365,11 @@ const SetCtor$LWS = Set;
|
|
|
10366
10365
|
const {
|
|
10367
10366
|
prototype: SetProto$LWS
|
|
10368
10367
|
} = SetCtor$LWS;
|
|
10368
|
+
const {
|
|
10369
|
+
add: SetProtoAdd$LWS,
|
|
10370
|
+
has: SetProtoHas$LWS,
|
|
10371
|
+
values: SetProtoValues$LWS
|
|
10372
|
+
} = SetProto$LWS;
|
|
10369
10373
|
ObjectLookupOwnGetter$LWS(SetProto$LWS, 'size');
|
|
10370
10374
|
const StringCtor$LWS = String;
|
|
10371
10375
|
const {
|
|
@@ -14417,66 +14421,61 @@ class VirtualEnvironment$LWS {
|
|
|
14417
14421
|
* problematic, and requires a lot more work to guarantee that objects from both sides
|
|
14418
14422
|
* can be considered equivalents (without identity discontinuity).
|
|
14419
14423
|
*/
|
|
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
|
-
];
|
|
14424
|
+
function getESGlobalKeys$LWS(remapTypedArrays$LWS = true) {
|
|
14425
|
+
const ESGlobalKeys$LWS = [
|
|
14426
|
+
// *** 19.1 Value Properties of the Global Object
|
|
14427
|
+
'globalThis', 'Infinity', 'NaN', 'undefined',
|
|
14428
|
+
// *** 19.2 Function Properties of the Global Object
|
|
14429
|
+
// 'eval', // dangerous & Reflective
|
|
14430
|
+
'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
|
|
14431
|
+
// *** 19.3 Constructor Properties of the Global Object
|
|
14432
|
+
// 'AggregateError', // Reflective
|
|
14433
|
+
// 'Array', // Reflective
|
|
14434
|
+
'BigInt', 'Boolean',
|
|
14435
|
+
// 'Date', // Remapped
|
|
14436
|
+
// 'Error', // Reflective
|
|
14437
|
+
// 'EvalError', // Reflective
|
|
14438
|
+
'FinalizationRegistry',
|
|
14439
|
+
// 'Function', // dangerous & Reflective
|
|
14440
|
+
// 'Map', // Remapped
|
|
14441
|
+
'Number',
|
|
14442
|
+
// 'Object', // Reflective
|
|
14443
|
+
// Allow blue `Promise` constructor to overwrite the Red one so that promises
|
|
14444
|
+
// created by the `Promise` constructor or APIs like `fetch` will work.
|
|
14445
|
+
// 'Promise', // Remapped
|
|
14446
|
+
// 'Proxy', // Reflective
|
|
14447
|
+
// 'RangeError', // Reflective
|
|
14448
|
+
// 'ReferenceError', // Reflective
|
|
14449
|
+
'RegExp',
|
|
14450
|
+
// 'Set', // Remapped
|
|
14451
|
+
'String', 'Symbol',
|
|
14452
|
+
// 'SyntaxError', // Reflective
|
|
14453
|
+
// 'TypeError', // Reflective
|
|
14454
|
+
// 'URIError', // Reflective
|
|
14455
|
+
// 'WeakMap', // Remapped
|
|
14456
|
+
// 'WeakSet', // Remapped
|
|
14457
|
+
'WeakRef',
|
|
14458
|
+
// *** 18.4 Other Properties of the Global Object
|
|
14459
|
+
// 'Atomics', // Remapped
|
|
14460
|
+
'JSON', 'Math', 'Reflect',
|
|
14461
|
+
// *** Annex B
|
|
14462
|
+
'escape', 'unescape'
|
|
14463
|
+
// *** ECMA-402
|
|
14464
|
+
// 'Intl', // Remapped
|
|
14465
|
+
];
|
|
14466
|
+
|
|
14467
|
+
if (remapTypedArrays$LWS === false) {
|
|
14468
|
+
ESGlobalKeys$LWS.push('ArrayBuffer', 'BigInt64Array', 'BigUint64Array', 'DataView', 'Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'SharedArrayBuffer', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array');
|
|
14469
|
+
}
|
|
14470
|
+
return ESGlobalKeys$LWS;
|
|
14471
|
+
}
|
|
14476
14472
|
// These are foundational things that should never be wrapped but are equivalent
|
|
14477
14473
|
// @TODO: Revisit this list.
|
|
14478
14474
|
const ReflectiveIntrinsicObjectNames$LWS = ['AggregateError', 'Array', 'Error', 'EvalError', 'Function', 'Object', 'Proxy', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'eval', 'globalThis'];
|
|
14479
|
-
|
|
14475
|
+
function getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(remapTypedArrays$LWS = true) {
|
|
14476
|
+
const ESGlobalKeys$LWS = getESGlobalKeys$LWS(remapTypedArrays$LWS);
|
|
14477
|
+
return toSafeArray$LWS([...ESGlobalKeys$LWS, ...ReflectiveIntrinsicObjectNames$LWS]);
|
|
14478
|
+
}
|
|
14480
14479
|
function getGlobalObjectOwnKeys$LWS(source$LWS) {
|
|
14481
14480
|
const ownKeys$LWS = ReflectOwnKeys$LWS(source$LWS);
|
|
14482
14481
|
// WKWebView incorrectly excludes the 'webkit' own property of the global
|
|
@@ -14487,8 +14486,9 @@ function getGlobalObjectOwnKeys$LWS(source$LWS) {
|
|
|
14487
14486
|
}
|
|
14488
14487
|
return ownKeys$LWS;
|
|
14489
14488
|
}
|
|
14490
|
-
function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS, source$LWS) {
|
|
14489
|
+
function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS, source$LWS, includeTypedArrays$LWS) {
|
|
14491
14490
|
const ownKeys$LWS = getGlobalObjectOwnKeys$LWS(source$LWS);
|
|
14491
|
+
const ESGlobalsAndReflectiveIntrinsicObjectNames$LWS = getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(includeTypedArrays$LWS);
|
|
14492
14492
|
for (let i$LWS = 0, {
|
|
14493
14493
|
length: length$LWS
|
|
14494
14494
|
} = ownKeys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
@@ -14511,10 +14511,11 @@ function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS,
|
|
|
14511
14511
|
}
|
|
14512
14512
|
return descs$LWS;
|
|
14513
14513
|
}
|
|
14514
|
-
function getFilteredGlobalOwnKeys$LWS(source$LWS) {
|
|
14514
|
+
function getFilteredGlobalOwnKeys$LWS(source$LWS, includeTypedArrays$LWS) {
|
|
14515
14515
|
const result$LWS = [];
|
|
14516
14516
|
let resultOffset$LWS = 0;
|
|
14517
14517
|
const ownKeys$LWS = getGlobalObjectOwnKeys$LWS(source$LWS);
|
|
14518
|
+
const ESGlobalsAndReflectiveIntrinsicObjectNames$LWS = getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(includeTypedArrays$LWS);
|
|
14518
14519
|
for (let i$LWS = 0, {
|
|
14519
14520
|
length: length$LWS
|
|
14520
14521
|
} = ownKeys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
@@ -14588,20 +14589,24 @@ function getCachedGlobalObjectReferences$LWS(globalObject$LWS) {
|
|
|
14588
14589
|
blueDocumentToRecordMap$LWS.set(document$LWS, record$LWS);
|
|
14589
14590
|
return record$LWS;
|
|
14590
14591
|
}
|
|
14591
|
-
function filterWindowKeys$LWS(keys$LWS) {
|
|
14592
|
+
function filterWindowKeys$LWS(keys$LWS, remapTypedArrays$LWS) {
|
|
14593
|
+
const excludedKeys$LWS = new SetCtor$LWS(['document', 'location', 'top', 'window']);
|
|
14594
|
+
// Crypto and typed arrays must be from the same global object
|
|
14595
|
+
if (remapTypedArrays$LWS === false) {
|
|
14596
|
+
excludedKeys$LWS.add('crypto');
|
|
14597
|
+
excludedKeys$LWS.add('Crypto');
|
|
14598
|
+
excludedKeys$LWS.add('SubtleCrypto');
|
|
14599
|
+
}
|
|
14592
14600
|
const result$LWS = [];
|
|
14593
14601
|
let resultOffset$LWS = 0;
|
|
14594
14602
|
for (let i$LWS = 0, {
|
|
14595
14603
|
length: length$LWS
|
|
14596
14604
|
} = keys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
14597
14605
|
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;
|
|
14606
|
+
if (ReflectApply$LWS(SetProtoHas$LWS, excludedKeys$LWS, [key$LWS])) {
|
|
14607
|
+
continue;
|
|
14604
14608
|
}
|
|
14609
|
+
result$LWS[resultOffset$LWS++] = key$LWS;
|
|
14605
14610
|
}
|
|
14606
14611
|
return result$LWS;
|
|
14607
14612
|
}
|
|
@@ -14632,7 +14637,7 @@ function filterWindowKeys$LWS(keys$LWS) {
|
|
|
14632
14637
|
* that will be installed (via the membrane) as global descriptors in
|
|
14633
14638
|
* the red realm.
|
|
14634
14639
|
*/
|
|
14635
|
-
function removeWindowDescriptors$LWS(unsafeDescs$LWS) {
|
|
14640
|
+
function removeWindowDescriptors$LWS(unsafeDescs$LWS, remapTypedArrays$LWS) {
|
|
14636
14641
|
// Remove unforgeable descriptors that cannot be installed.
|
|
14637
14642
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'document');
|
|
14638
14643
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'location');
|
|
@@ -14640,6 +14645,12 @@ function removeWindowDescriptors$LWS(unsafeDescs$LWS) {
|
|
|
14640
14645
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'window');
|
|
14641
14646
|
// Remove other browser specific unforgeables.
|
|
14642
14647
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'chrome');
|
|
14648
|
+
// Crypto and typed arrays must be from the same global object
|
|
14649
|
+
if (remapTypedArrays$LWS === false) {
|
|
14650
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'crypto');
|
|
14651
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'Crypto');
|
|
14652
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'SubtleCrypto');
|
|
14653
|
+
}
|
|
14643
14654
|
return unsafeDescs$LWS;
|
|
14644
14655
|
}
|
|
14645
14656
|
/**
|
|
@@ -14681,6 +14692,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14681
14692
|
instrumentation: instrumentation$LWS,
|
|
14682
14693
|
keepAlive: keepAlive$LWS = true,
|
|
14683
14694
|
liveTargetCallback: liveTargetCallback$LWS,
|
|
14695
|
+
remapTypedArrays: remapTypedArrays$LWS = true,
|
|
14684
14696
|
signSourceCallback: signSourceCallback$LWS
|
|
14685
14697
|
// eslint-disable-next-line prefer-object-spread
|
|
14686
14698
|
} = ObjectAssign$LWS({
|
|
@@ -14690,7 +14702,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14690
14702
|
const redWindow$LWS = ReflectApply$LWS(HTMLIFrameElementProtoContentWindowGetter$LWS, iframe$LWS, []);
|
|
14691
14703
|
const shouldUseDefaultGlobalOwnKeys$LWS = typeof globalObjectShape$LWS !== 'object' || globalObjectShape$LWS === null;
|
|
14692
14704
|
if (shouldUseDefaultGlobalOwnKeys$LWS && defaultGlobalOwnKeys$LWS === null) {
|
|
14693
|
-
defaultGlobalOwnKeys$LWS = filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(redWindow$LWS));
|
|
14705
|
+
defaultGlobalOwnKeys$LWS = filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(redWindow$LWS, remapTypedArrays$LWS), remapTypedArrays$LWS);
|
|
14694
14706
|
}
|
|
14695
14707
|
let blueConnector$LWS = blueCreateHooksCallbackCache$LWS.get(blueRefs$LWS.document);
|
|
14696
14708
|
if (blueConnector$LWS === undefined) {
|
|
@@ -14732,7 +14744,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14732
14744
|
// window.__proto__.__proto__.__proto__ (aka EventTarget.prototype)
|
|
14733
14745
|
env$LWS.link('__proto__', '__proto__', '__proto__');
|
|
14734
14746
|
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)),
|
|
14747
|
+
env$LWS.lazyRemapProperties(blueRefs$LWS.window, shouldUseDefaultGlobalOwnKeys$LWS ? defaultGlobalOwnKeys$LWS : filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(globalObjectShape$LWS), remapTypedArrays$LWS),
|
|
14736
14748
|
// Chromium based browsers have a bug that nulls the result of `window`
|
|
14737
14749
|
// getters in detached iframes when the property descriptor of `window.window`
|
|
14738
14750
|
// is retrieved.
|
|
@@ -14740,8 +14752,8 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14740
14752
|
keepAlive$LWS ? undefined : unforgeablePoisonedWindowKeys$LWS);
|
|
14741
14753
|
if (endowments$LWS) {
|
|
14742
14754
|
const filteredEndowments$LWS = {};
|
|
14743
|
-
assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(filteredEndowments$LWS, endowments$LWS);
|
|
14744
|
-
removeWindowDescriptors$LWS(filteredEndowments$LWS);
|
|
14755
|
+
assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(filteredEndowments$LWS, endowments$LWS, remapTypedArrays$LWS);
|
|
14756
|
+
removeWindowDescriptors$LWS(filteredEndowments$LWS, remapTypedArrays$LWS);
|
|
14745
14757
|
env$LWS.remapProperties(blueRefs$LWS.window, filteredEndowments$LWS);
|
|
14746
14758
|
}
|
|
14747
14759
|
// We intentionally skip remapping Window.prototype because there is nothing
|
|
@@ -15101,44 +15113,12 @@ function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
|
15101
15113
|
// tools from mistaking the regexp or the replacement string for an
|
|
15102
15114
|
// actual source mapping URL.
|
|
15103
15115
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
15104
|
-
sourceText$LWS = `\n//# LWS Version = "0.21.
|
|
15116
|
+
sourceText$LWS = `\n//# LWS Version = "0.21.2"\n${sourceText$LWS}`;
|
|
15105
15117
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
15106
15118
|
// Append "'use strict'" to the extracted function body so it is
|
|
15107
15119
|
// evaluated in strict mode.
|
|
15108
15120
|
`'use strict';${sourceText$LWS}` : sourceText$LWS;
|
|
15109
15121
|
}
|
|
15110
|
-
const rootSandboxRegistry$LWS = {
|
|
15111
|
-
__proto__: null
|
|
15112
|
-
};
|
|
15113
|
-
const documentSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1([[rootDocument$LWS, rootSandboxRegistry$LWS]]));
|
|
15114
|
-
const opaqueWindowSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
15115
|
-
function getOpaqueSandboxRegistry$LWS(globalObject$LWS) {
|
|
15116
|
-
// Use the `document` as the key because a window object maintains its
|
|
15117
|
-
// identity continuity when its location changes and while the
|
|
15118
|
-
// non-configurable document property does not.
|
|
15119
|
-
let sandboxRegistry$LWS = opaqueWindowSandboxRegistryCache$LWS.get(globalObject$LWS);
|
|
15120
|
-
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
15121
|
-
if (sandboxRegistry$LWS === undefined) {
|
|
15122
|
-
sandboxRegistry$LWS = {
|
|
15123
|
-
__proto__: null
|
|
15124
|
-
};
|
|
15125
|
-
opaqueWindowSandboxRegistryCache$LWS.set(globalObject$LWS, sandboxRegistry$LWS);
|
|
15126
|
-
}
|
|
15127
|
-
return sandboxRegistry$LWS;
|
|
15128
|
-
}
|
|
15129
|
-
function getSandboxRegistry$LWS(document$LWS) {
|
|
15130
|
-
// Use the `document` as the key because a window object maintains its
|
|
15131
|
-
// identity continuity when its location changes and while the
|
|
15132
|
-
// non-configurable document property does not.
|
|
15133
|
-
let sandboxRegistry$LWS = documentSandboxRegistryCache$LWS.get(document$LWS);
|
|
15134
|
-
if (sandboxRegistry$LWS === undefined) {
|
|
15135
|
-
sandboxRegistry$LWS = {
|
|
15136
|
-
__proto__: null
|
|
15137
|
-
};
|
|
15138
|
-
documentSandboxRegistryCache$LWS.set(document$LWS, sandboxRegistry$LWS);
|
|
15139
|
-
}
|
|
15140
|
-
return sandboxRegistry$LWS;
|
|
15141
|
-
}
|
|
15142
15122
|
|
|
15143
15123
|
// Flag whether the iframe should remain connected to the DOM.
|
|
15144
15124
|
const IFRAME_KEEP_ALIVE_FLAG$LWS = LOCKER_UNMINIFIED_FLAG$LWS$1 && !false;
|
|
@@ -15216,7 +15196,6 @@ function createSandboxEvaluator$LWS({
|
|
|
15216
15196
|
}
|
|
15217
15197
|
function createVirtualEnvironment$LWS(record$LWS) {
|
|
15218
15198
|
const {
|
|
15219
|
-
LOCKER_VERBOSE_INSTRUMENTATION_FLAG: verboseInstrumentation$LWS,
|
|
15220
15199
|
endowments: endowments$LWS,
|
|
15221
15200
|
globalObject: globalObject$LWS,
|
|
15222
15201
|
instrumentation: instrumentation$LWS,
|
|
@@ -15315,7 +15294,8 @@ function createVirtualEnvironment$LWS(record$LWS) {
|
|
|
15315
15294
|
// and the default endowments descriptors so they can be
|
|
15316
15295
|
// accessible from inside the sandbox.
|
|
15317
15296
|
ObjectAssign$LWS$1({}, DEFAULT_ENDOWMENTS_DESCRIPTOR_MAP$LWS, ObjectGetOwnPropertyDescriptors$LWS(endowments$LWS)) : DEFAULT_ENDOWMENTS_DESCRIPTOR_MAP$LWS,
|
|
15318
|
-
instrumentation:
|
|
15297
|
+
instrumentation: instrumentation$LWS,
|
|
15298
|
+
remapTypedArrays: key$LWS !== 'omnistudio',
|
|
15319
15299
|
keepAlive: IFRAME_KEEP_ALIVE_FLAG$LWS,
|
|
15320
15300
|
liveTargetCallback: isTargetLive$LWS,
|
|
15321
15301
|
signSourceCallback: sourceText$LWS => trusted.createScript(sourceText$LWS)
|
|
@@ -15622,7 +15602,6 @@ function internalEvaluateInSandbox$LWS(evaluateOptions$LWS) {
|
|
|
15622
15602
|
throw new LockerSecurityError$LWS(ERR_INVALID_SANDBOX_KEY$LWS);
|
|
15623
15603
|
}
|
|
15624
15604
|
const {
|
|
15625
|
-
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
15626
15605
|
LOCKER_INSTRUMENTATION_FLAG: LOCKER_INSTRUMENTATION_FLAG$LWS,
|
|
15627
15606
|
helpers: helpers$LWS,
|
|
15628
15607
|
virtualEnvironmentEvaluator: virtualEnvironmentEvaluator$LWS
|
|
@@ -15650,33 +15629,25 @@ function internalEvaluateInSandbox$LWS(evaluateOptions$LWS) {
|
|
|
15650
15629
|
}
|
|
15651
15630
|
let result$LWS;
|
|
15652
15631
|
const sourceText$LWS = toSourceText$LWS(source$LWS, sourceType$LWS);
|
|
15653
|
-
const
|
|
15654
|
-
let activity$LWS;
|
|
15655
|
-
// istanbul ignore else: this is a safety precaution that is unreachable via tests
|
|
15656
|
-
if (LOCKER_INSTRUMENTATION_FLAG$LWS) {
|
|
15657
|
-
activity$LWS = startActivity$LWS('evaluateInSandbox', BASIC_INSTRUMENTATION_DATA$LWS);
|
|
15658
|
-
}
|
|
15632
|
+
const activity$LWS = LOCKER_INSTRUMENTATION_FLAG$LWS ? instrumentation$LWS == null ? void 0 : instrumentation$LWS.startActivity('lws.evaluate') : undefined;
|
|
15659
15633
|
try {
|
|
15660
15634
|
// Protecting against errors during evaluation can guarantee the state
|
|
15661
15635
|
// of the EvalContext to avoid leaking context values
|
|
15662
15636
|
result$LWS = virtualEnvironmentEvaluator$LWS(sourceText$LWS);
|
|
15637
|
+
instrumentation$LWS == null || instrumentation$LWS.incrementCounter == null || instrumentation$LWS.incrementCounter('lws.evaluate', 1, false);
|
|
15663
15638
|
} catch (error) {
|
|
15664
|
-
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
}
|
|
15639
|
+
instrumentation$LWS == null || instrumentation$LWS.incrementCounter == null || instrumentation$LWS.incrementCounter('lws.evaluate', 1, true);
|
|
15640
|
+
activity$LWS == null || activity$LWS.error({
|
|
15641
|
+
sandboxKey: key$LWS,
|
|
15642
|
+
error
|
|
15643
|
+
});
|
|
15644
|
+
activity$LWS == null || activity$LWS.stop();
|
|
15671
15645
|
throw error;
|
|
15672
15646
|
} finally {
|
|
15673
15647
|
clearEvalContext$LWS();
|
|
15674
15648
|
clearEvalHelpers$LWS();
|
|
15675
15649
|
}
|
|
15676
|
-
|
|
15677
|
-
if (LOCKER_INSTRUMENTATION_FLAG$LWS) {
|
|
15678
|
-
activity$LWS.stop();
|
|
15679
|
-
}
|
|
15650
|
+
activity$LWS == null || activity$LWS.stop();
|
|
15680
15651
|
return result$LWS;
|
|
15681
15652
|
}
|
|
15682
15653
|
// istanbul ignore next: currently unreachable via tests, exclusively used in AMD format mode
|
|
@@ -15796,7 +15767,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15796
15767
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15797
15768
|
return secureDep$LWS;
|
|
15798
15769
|
}
|
|
15799
|
-
/*! version: 0.21.
|
|
15770
|
+
/*! version: 0.21.2 */
|
|
15800
15771
|
|
|
15801
15772
|
const loaderDefine = globalThis.LWR.define;
|
|
15802
15773
|
|