ses 1.14.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lockdown.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // ses@1.14.0
1
+ // ses@2.0.0
2
2
  (functors => options => {
3
3
  'use strict';
4
4
 
@@ -53,11 +53,13 @@
53
53
  ArrayBuffer: cell("ArrayBuffer"),
54
54
  Date: cell("Date"),
55
55
  FinalizationRegistry: cell("FinalizationRegistry"),
56
- Float32Array: cell("Float32Array"),
56
+ FERAL_FLOAT64_ARRAY: cell("FERAL_FLOAT64_ARRAY"),
57
+ DataView: cell("DataView"),
57
58
  JSON: cell("JSON"),
58
59
  Map: cell("Map"),
59
60
  Math: cell("Math"),
60
61
  Number: cell("Number"),
62
+ BigInt: cell("BigInt"),
61
63
  Object: cell("Object"),
62
64
  Promise: cell("Promise"),
63
65
  Proxy: cell("Proxy"),
@@ -95,11 +97,11 @@
95
97
  setPrototypeOf: cell("setPrototypeOf"),
96
98
  values: cell("values"),
97
99
  fromEntries: cell("fromEntries"),
98
- hasOwn: cell("hasOwn"),
99
100
  speciesSymbol: cell("speciesSymbol"),
100
101
  toStringTagSymbol: cell("toStringTagSymbol"),
101
102
  iteratorSymbol: cell("iteratorSymbol"),
102
103
  matchAllSymbol: cell("matchAllSymbol"),
104
+ replaceSymbol: cell("replaceSymbol"),
103
105
  unscopablesSymbol: cell("unscopablesSymbol"),
104
106
  symbolKeyFor: cell("symbolKeyFor"),
105
107
  symbolFor: cell("symbolFor"),
@@ -131,7 +133,7 @@
131
133
  iteratorPrototype: cell("iteratorPrototype"),
132
134
  typedArrayPrototype: cell("typedArrayPrototype"),
133
135
  uncurryThis: cell("uncurryThis"),
134
- objectHasOwnProperty: cell("objectHasOwnProperty"),
136
+ hasOwn: cell("hasOwn"),
135
137
  arrayFilter: cell("arrayFilter"),
136
138
  arrayForEach: cell("arrayForEach"),
137
139
  arrayIncludes: cell("arrayIncludes"),
@@ -158,16 +160,14 @@
158
160
  setForEach: cell("setForEach"),
159
161
  setHas: cell("setHas"),
160
162
  iterateSet: cell("iterateSet"),
161
- regexpTest: cell("regexpTest"),
162
163
  regexpExec: cell("regexpExec"),
164
+ regexpReplace: cell("regexpReplace"),
163
165
  matchAllRegExp: cell("matchAllRegExp"),
166
+ sealRegexp: cell("sealRegexp"),
164
167
  stringEndsWith: cell("stringEndsWith"),
165
168
  stringIncludes: cell("stringIncludes"),
166
169
  stringIndexOf: cell("stringIndexOf"),
167
170
  stringMatch: cell("stringMatch"),
168
- generatorNext: cell("generatorNext"),
169
- generatorThrow: cell("generatorThrow"),
170
- stringReplace: cell("stringReplace"),
171
171
  stringSearch: cell("stringSearch"),
172
172
  stringSlice: cell("stringSlice"),
173
173
  stringSplit: cell("stringSplit"),
@@ -181,12 +181,13 @@
181
181
  weaksetHas: cell("weaksetHas"),
182
182
  functionToString: cell("functionToString"),
183
183
  functionBind: cell("functionBind"),
184
+ generatorNext: cell("generatorNext"),
185
+ generatorThrow: cell("generatorThrow"),
184
186
  promiseAll: cell("promiseAll"),
185
187
  promiseCatch: cell("promiseCatch"),
186
188
  promiseThen: cell("promiseThen"),
187
189
  finalizationRegistryRegister: cell("finalizationRegistryRegister"),
188
190
  finalizationRegistryUnregister: cell("finalizationRegistryUnregister"),
189
- getConstructorOf: cell("getConstructorOf"),
190
191
  isPrimitive: cell("isPrimitive"),
191
192
  isError: cell("isError"),
192
193
  identity: cell("identity"),
@@ -242,10 +243,10 @@
242
243
  makeError: cell("makeError"),
243
244
  annotateError: cell("annotateError"),
244
245
  loggedErrorHandler: cell("loggedErrorHandler"),
245
- makeAssert: cell("makeAssert"),
246
246
  assert: cell("assert"),
247
247
  assertEqual: cell("assertEqual"),
248
248
  sanitizeError: cell("sanitizeError"),
249
+ makeAssert: cell("makeAssert"),
249
250
  },
250
251
  {
251
252
  isTypedArray: cell("isTypedArray"),
@@ -282,6 +283,9 @@
282
283
  {
283
284
  default: cell("default"),
284
285
  },
286
+ {
287
+ tameNaNSideChannel: cell("tameNaNSideChannel"),
288
+ },
285
289
  {
286
290
  default: cell("default"),
287
291
  },
@@ -482,11 +486,13 @@ function observeImports(map, importName, importIndex) {
482
486
  ArrayBuffer: cells[0].ArrayBuffer.set,
483
487
  Date: cells[0].Date.set,
484
488
  FinalizationRegistry: cells[0].FinalizationRegistry.set,
485
- Float32Array: cells[0].Float32Array.set,
489
+ FERAL_FLOAT64_ARRAY: cells[0].FERAL_FLOAT64_ARRAY.set,
490
+ DataView: cells[0].DataView.set,
486
491
  JSON: cells[0].JSON.set,
487
492
  Map: cells[0].Map.set,
488
493
  Math: cells[0].Math.set,
489
494
  Number: cells[0].Number.set,
495
+ BigInt: cells[0].BigInt.set,
490
496
  Object: cells[0].Object.set,
491
497
  Promise: cells[0].Promise.set,
492
498
  Proxy: cells[0].Proxy.set,
@@ -524,11 +530,11 @@ function observeImports(map, importName, importIndex) {
524
530
  setPrototypeOf: cells[0].setPrototypeOf.set,
525
531
  values: cells[0].values.set,
526
532
  fromEntries: cells[0].fromEntries.set,
527
- hasOwn: cells[0].hasOwn.set,
528
533
  speciesSymbol: cells[0].speciesSymbol.set,
529
534
  toStringTagSymbol: cells[0].toStringTagSymbol.set,
530
535
  iteratorSymbol: cells[0].iteratorSymbol.set,
531
536
  matchAllSymbol: cells[0].matchAllSymbol.set,
537
+ replaceSymbol: cells[0].replaceSymbol.set,
532
538
  unscopablesSymbol: cells[0].unscopablesSymbol.set,
533
539
  symbolKeyFor: cells[0].symbolKeyFor.set,
534
540
  symbolFor: cells[0].symbolFor.set,
@@ -560,7 +566,7 @@ function observeImports(map, importName, importIndex) {
560
566
  iteratorPrototype: cells[0].iteratorPrototype.set,
561
567
  typedArrayPrototype: cells[0].typedArrayPrototype.set,
562
568
  uncurryThis: cells[0].uncurryThis.set,
563
- objectHasOwnProperty: cells[0].objectHasOwnProperty.set,
569
+ hasOwn: cells[0].hasOwn.set,
564
570
  arrayFilter: cells[0].arrayFilter.set,
565
571
  arrayForEach: cells[0].arrayForEach.set,
566
572
  arrayIncludes: cells[0].arrayIncludes.set,
@@ -587,16 +593,14 @@ function observeImports(map, importName, importIndex) {
587
593
  setForEach: cells[0].setForEach.set,
588
594
  setHas: cells[0].setHas.set,
589
595
  iterateSet: cells[0].iterateSet.set,
590
- regexpTest: cells[0].regexpTest.set,
591
596
  regexpExec: cells[0].regexpExec.set,
597
+ regexpReplace: cells[0].regexpReplace.set,
592
598
  matchAllRegExp: cells[0].matchAllRegExp.set,
599
+ sealRegexp: cells[0].sealRegexp.set,
593
600
  stringEndsWith: cells[0].stringEndsWith.set,
594
601
  stringIncludes: cells[0].stringIncludes.set,
595
602
  stringIndexOf: cells[0].stringIndexOf.set,
596
603
  stringMatch: cells[0].stringMatch.set,
597
- generatorNext: cells[0].generatorNext.set,
598
- generatorThrow: cells[0].generatorThrow.set,
599
- stringReplace: cells[0].stringReplace.set,
600
604
  stringSearch: cells[0].stringSearch.set,
601
605
  stringSlice: cells[0].stringSlice.set,
602
606
  stringSplit: cells[0].stringSplit.set,
@@ -610,12 +614,13 @@ function observeImports(map, importName, importIndex) {
610
614
  weaksetHas: cells[0].weaksetHas.set,
611
615
  functionToString: cells[0].functionToString.set,
612
616
  functionBind: cells[0].functionBind.set,
617
+ generatorNext: cells[0].generatorNext.set,
618
+ generatorThrow: cells[0].generatorThrow.set,
613
619
  promiseAll: cells[0].promiseAll.set,
614
620
  promiseCatch: cells[0].promiseCatch.set,
615
621
  promiseThen: cells[0].promiseThen.set,
616
622
  finalizationRegistryRegister: cells[0].finalizationRegistryRegister.set,
617
623
  finalizationRegistryUnregister: cells[0].finalizationRegistryUnregister.set,
618
- getConstructorOf: cells[0].getConstructorOf.set,
619
624
  isPrimitive: cells[0].isPrimitive.set,
620
625
  isError: cells[0].isError.set,
621
626
  identity: cells[0].identity.set,
@@ -786,10 +791,10 @@ function observeImports(map, importName, importIndex) {
786
791
  makeError: cells[13].makeError.set,
787
792
  note: cells[13].annotateError.set,
788
793
  loggedErrorHandler: cells[13].loggedErrorHandler.set,
789
- makeAssert: cells[13].makeAssert.set,
790
794
  assert: cells[13].assert.set,
791
795
  assertEqual: cells[13].assertEqual.set,
792
796
  sanitizeError: cells[13].sanitizeError.set,
797
+ makeAssert: cells[13].makeAssert.set,
793
798
  },
794
799
  importMeta: {},
795
800
  });
@@ -913,7 +918,7 @@ function observeImports(map, importName, importIndex) {
913
918
  liveVar: {
914
919
  },
915
920
  onceVar: {
916
- default: cells[22].default.set,
921
+ tameNaNSideChannel: cells[22].tameNaNSideChannel.set,
917
922
  },
918
923
  importMeta: {},
919
924
  });
@@ -925,9 +930,7 @@ function observeImports(map, importName, importIndex) {
925
930
  liveVar: {
926
931
  },
927
932
  onceVar: {
928
- minEnablements: cells[23].minEnablements.set,
929
- moderateEnablements: cells[23].moderateEnablements.set,
930
- severeEnablements: cells[23].severeEnablements.set,
933
+ default: cells[23].default.set,
931
934
  },
932
935
  importMeta: {},
933
936
  });
@@ -935,12 +938,13 @@ function observeImports(map, importName, importIndex) {
935
938
  imports(entries) {
936
939
  const map = new Map(entries);
937
940
  observeImports(map, "./commons.js", 0);
938
- observeImports(map, "./enablements.js", 23);
939
941
  },
940
942
  liveVar: {
941
943
  },
942
944
  onceVar: {
943
- default: cells[24].default.set,
945
+ minEnablements: cells[24].minEnablements.set,
946
+ moderateEnablements: cells[24].moderateEnablements.set,
947
+ severeEnablements: cells[24].severeEnablements.set,
944
948
  },
945
949
  importMeta: {},
946
950
  });
@@ -948,7 +952,7 @@ function observeImports(map, importName, importIndex) {
948
952
  imports(entries) {
949
953
  const map = new Map(entries);
950
954
  observeImports(map, "./commons.js", 0);
951
- observeImports(map, "./error/assert.js", 13);
955
+ observeImports(map, "./enablements.js", 24);
952
956
  },
953
957
  liveVar: {
954
958
  },
@@ -960,24 +964,24 @@ function observeImports(map, importName, importIndex) {
960
964
  functors[26]({
961
965
  imports(entries) {
962
966
  const map = new Map(entries);
967
+ observeImports(map, "./commons.js", 0);
968
+ observeImports(map, "./error/assert.js", 13);
963
969
  },
964
970
  liveVar: {
965
971
  },
966
972
  onceVar: {
967
- makeEvalFunction: cells[26].makeEvalFunction.set,
973
+ default: cells[26].default.set,
968
974
  },
969
975
  importMeta: {},
970
976
  });
971
977
  functors[27]({
972
978
  imports(entries) {
973
979
  const map = new Map(entries);
974
- observeImports(map, "./commons.js", 0);
975
- observeImports(map, "./error/assert.js", 13);
976
980
  },
977
981
  liveVar: {
978
982
  },
979
983
  onceVar: {
980
- makeFunctionConstructor: cells[27].makeFunctionConstructor.set,
984
+ makeEvalFunction: cells[27].makeEvalFunction.set,
981
985
  },
982
986
  importMeta: {},
983
987
  });
@@ -985,17 +989,12 @@ function observeImports(map, importName, importIndex) {
985
989
  imports(entries) {
986
990
  const map = new Map(entries);
987
991
  observeImports(map, "./commons.js", 0);
988
- observeImports(map, "./make-eval-function.js", 26);
989
- observeImports(map, "./make-function-constructor.js", 27);
990
- observeImports(map, "./permits.js", 16);
992
+ observeImports(map, "./error/assert.js", 13);
991
993
  },
992
994
  liveVar: {
993
995
  },
994
996
  onceVar: {
995
- setGlobalObjectSymbolUnscopables: cells[28].setGlobalObjectSymbolUnscopables.set,
996
- setGlobalObjectConstantProperties: cells[28].setGlobalObjectConstantProperties.set,
997
- setGlobalObjectMutableProperties: cells[28].setGlobalObjectMutableProperties.set,
998
- setGlobalObjectEvaluators: cells[28].setGlobalObjectEvaluators.set,
997
+ makeFunctionConstructor: cells[28].makeFunctionConstructor.set,
999
998
  },
1000
999
  importMeta: {},
1001
1000
  });
@@ -1003,14 +1002,17 @@ function observeImports(map, importName, importIndex) {
1003
1002
  imports(entries) {
1004
1003
  const map = new Map(entries);
1005
1004
  observeImports(map, "./commons.js", 0);
1006
- observeImports(map, "./error/assert.js", 13);
1005
+ observeImports(map, "./make-eval-function.js", 27);
1006
+ observeImports(map, "./make-function-constructor.js", 28);
1007
+ observeImports(map, "./permits.js", 16);
1007
1008
  },
1008
1009
  liveVar: {
1009
1010
  },
1010
1011
  onceVar: {
1011
- alwaysThrowHandler: cells[29].alwaysThrowHandler.set,
1012
- strictScopeTerminatorHandler: cells[29].strictScopeTerminatorHandler.set,
1013
- strictScopeTerminator: cells[29].strictScopeTerminator.set,
1012
+ setGlobalObjectSymbolUnscopables: cells[29].setGlobalObjectSymbolUnscopables.set,
1013
+ setGlobalObjectConstantProperties: cells[29].setGlobalObjectConstantProperties.set,
1014
+ setGlobalObjectMutableProperties: cells[29].setGlobalObjectMutableProperties.set,
1015
+ setGlobalObjectEvaluators: cells[29].setGlobalObjectEvaluators.set,
1014
1016
  },
1015
1017
  importMeta: {},
1016
1018
  });
@@ -1018,12 +1020,14 @@ function observeImports(map, importName, importIndex) {
1018
1020
  imports(entries) {
1019
1021
  const map = new Map(entries);
1020
1022
  observeImports(map, "./commons.js", 0);
1021
- observeImports(map, "./strict-scope-terminator.js", 29);
1023
+ observeImports(map, "./error/assert.js", 13);
1022
1024
  },
1023
1025
  liveVar: {
1024
1026
  },
1025
1027
  onceVar: {
1026
- createSloppyGlobalsScopeTerminator: cells[30].createSloppyGlobalsScopeTerminator.set,
1028
+ alwaysThrowHandler: cells[30].alwaysThrowHandler.set,
1029
+ strictScopeTerminatorHandler: cells[30].strictScopeTerminatorHandler.set,
1030
+ strictScopeTerminator: cells[30].strictScopeTerminator.set,
1027
1031
  },
1028
1032
  importMeta: {},
1029
1033
  });
@@ -1031,12 +1035,12 @@ function observeImports(map, importName, importIndex) {
1031
1035
  imports(entries) {
1032
1036
  const map = new Map(entries);
1033
1037
  observeImports(map, "./commons.js", 0);
1034
- observeImports(map, "./error/assert.js", 13);
1038
+ observeImports(map, "./strict-scope-terminator.js", 30);
1035
1039
  },
1036
1040
  liveVar: {
1037
1041
  },
1038
1042
  onceVar: {
1039
- makeEvalScopeKit: cells[31].makeEvalScopeKit.set,
1043
+ createSloppyGlobalsScopeTerminator: cells[31].createSloppyGlobalsScopeTerminator.set,
1040
1044
  },
1041
1045
  importMeta: {},
1042
1046
  });
@@ -1044,11 +1048,12 @@ function observeImports(map, importName, importIndex) {
1044
1048
  imports(entries) {
1045
1049
  const map = new Map(entries);
1046
1050
  observeImports(map, "./commons.js", 0);
1051
+ observeImports(map, "./error/assert.js", 13);
1047
1052
  },
1048
1053
  liveVar: {
1049
1054
  },
1050
1055
  onceVar: {
1051
- getSourceURL: cells[32].getSourceURL.set,
1056
+ makeEvalScopeKit: cells[32].makeEvalScopeKit.set,
1052
1057
  },
1053
1058
  importMeta: {},
1054
1059
  });
@@ -1056,19 +1061,11 @@ function observeImports(map, importName, importIndex) {
1056
1061
  imports(entries) {
1057
1062
  const map = new Map(entries);
1058
1063
  observeImports(map, "./commons.js", 0);
1059
- observeImports(map, "./get-source-url.js", 32);
1060
1064
  },
1061
1065
  liveVar: {
1062
1066
  },
1063
1067
  onceVar: {
1064
- rejectHtmlComments: cells[33].rejectHtmlComments.set,
1065
- evadeHtmlCommentTest: cells[33].evadeHtmlCommentTest.set,
1066
- rejectImportExpressions: cells[33].rejectImportExpressions.set,
1067
- evadeImportExpressionTest: cells[33].evadeImportExpressionTest.set,
1068
- rejectSomeDirectEvalExpressions: cells[33].rejectSomeDirectEvalExpressions.set,
1069
- mandatoryTransforms: cells[33].mandatoryTransforms.set,
1070
- applyTransforms: cells[33].applyTransforms.set,
1071
- transforms: cells[33].transforms.set,
1068
+ getSourceURL: cells[33].getSourceURL.set,
1072
1069
  },
1073
1070
  importMeta: {},
1074
1071
  });
@@ -1076,12 +1073,19 @@ function observeImports(map, importName, importIndex) {
1076
1073
  imports(entries) {
1077
1074
  const map = new Map(entries);
1078
1075
  observeImports(map, "./commons.js", 0);
1076
+ observeImports(map, "./get-source-url.js", 33);
1079
1077
  },
1080
1078
  liveVar: {
1081
1079
  },
1082
1080
  onceVar: {
1083
- isValidIdentifierName: cells[34].isValidIdentifierName.set,
1084
- getScopeConstants: cells[34].getScopeConstants.set,
1081
+ rejectHtmlComments: cells[34].rejectHtmlComments.set,
1082
+ evadeHtmlCommentTest: cells[34].evadeHtmlCommentTest.set,
1083
+ rejectImportExpressions: cells[34].rejectImportExpressions.set,
1084
+ evadeImportExpressionTest: cells[34].evadeImportExpressionTest.set,
1085
+ rejectSomeDirectEvalExpressions: cells[34].rejectSomeDirectEvalExpressions.set,
1086
+ mandatoryTransforms: cells[34].mandatoryTransforms.set,
1087
+ applyTransforms: cells[34].applyTransforms.set,
1088
+ transforms: cells[34].transforms.set,
1085
1089
  },
1086
1090
  importMeta: {},
1087
1091
  });
@@ -1089,12 +1093,12 @@ function observeImports(map, importName, importIndex) {
1089
1093
  imports(entries) {
1090
1094
  const map = new Map(entries);
1091
1095
  observeImports(map, "./commons.js", 0);
1092
- observeImports(map, "./scope-constants.js", 34);
1093
1096
  },
1094
1097
  liveVar: {
1095
1098
  },
1096
1099
  onceVar: {
1097
- makeEvaluate: cells[35].makeEvaluate.set,
1100
+ isValidIdentifierName: cells[35].isValidIdentifierName.set,
1101
+ getScopeConstants: cells[35].getScopeConstants.set,
1098
1102
  },
1099
1103
  importMeta: {},
1100
1104
  });
@@ -1102,17 +1106,12 @@ function observeImports(map, importName, importIndex) {
1102
1106
  imports(entries) {
1103
1107
  const map = new Map(entries);
1104
1108
  observeImports(map, "./commons.js", 0);
1105
- observeImports(map, "./strict-scope-terminator.js", 29);
1106
- observeImports(map, "./sloppy-globals-scope-terminator.js", 30);
1107
- observeImports(map, "./eval-scope.js", 31);
1108
- observeImports(map, "./transforms.js", 33);
1109
- observeImports(map, "./make-evaluate.js", 35);
1110
- observeImports(map, "./error/assert.js", 13);
1109
+ observeImports(map, "./scope-constants.js", 35);
1111
1110
  },
1112
1111
  liveVar: {
1113
1112
  },
1114
1113
  onceVar: {
1115
- makeSafeEvaluator: cells[36].makeSafeEvaluator.set,
1114
+ makeEvaluate: cells[36].makeEvaluate.set,
1116
1115
  },
1117
1116
  importMeta: {},
1118
1117
  });
@@ -1120,11 +1119,17 @@ function observeImports(map, importName, importIndex) {
1120
1119
  imports(entries) {
1121
1120
  const map = new Map(entries);
1122
1121
  observeImports(map, "./commons.js", 0);
1122
+ observeImports(map, "./strict-scope-terminator.js", 30);
1123
+ observeImports(map, "./sloppy-globals-scope-terminator.js", 31);
1124
+ observeImports(map, "./eval-scope.js", 32);
1125
+ observeImports(map, "./transforms.js", 34);
1126
+ observeImports(map, "./make-evaluate.js", 36);
1127
+ observeImports(map, "./error/assert.js", 13);
1123
1128
  },
1124
1129
  liveVar: {
1125
1130
  },
1126
1131
  onceVar: {
1127
- tameFunctionToString: cells[37].tameFunctionToString.set,
1132
+ makeSafeEvaluator: cells[37].makeSafeEvaluator.set,
1128
1133
  },
1129
1134
  importMeta: {},
1130
1135
  });
@@ -1136,7 +1141,7 @@ function observeImports(map, importName, importIndex) {
1136
1141
  liveVar: {
1137
1142
  },
1138
1143
  onceVar: {
1139
- tameDomains: cells[38].tameDomains.set,
1144
+ tameFunctionToString: cells[38].tameFunctionToString.set,
1140
1145
  },
1141
1146
  importMeta: {},
1142
1147
  });
@@ -1148,25 +1153,19 @@ function observeImports(map, importName, importIndex) {
1148
1153
  liveVar: {
1149
1154
  },
1150
1155
  onceVar: {
1151
- tameModuleSource: cells[39].tameModuleSource.set,
1156
+ tameDomains: cells[39].tameDomains.set,
1152
1157
  },
1153
1158
  importMeta: {},
1154
1159
  });
1155
1160
  functors[40]({
1156
1161
  imports(entries) {
1157
1162
  const map = new Map(entries);
1158
- observeImports(map, "../commons.js", 0);
1163
+ observeImports(map, "./commons.js", 0);
1159
1164
  },
1160
1165
  liveVar: {
1161
1166
  },
1162
1167
  onceVar: {
1163
- consoleLevelMethods: cells[40].consoleLevelMethods.set,
1164
- consoleOtherMethods: cells[40].consoleOtherMethods.set,
1165
- makeLoggingConsoleKit: cells[40].makeLoggingConsoleKit.set,
1166
- pumpLogToConsole: cells[40].pumpLogToConsole.set,
1167
- makeCausalConsole: cells[40].makeCausalConsole.set,
1168
- defineCausalConsoleFromLogger: cells[40].defineCausalConsoleFromLogger.set,
1169
- filterConsole: cells[40].filterConsole.set,
1168
+ tameModuleSource: cells[40].tameModuleSource.set,
1170
1169
  },
1171
1170
  importMeta: {},
1172
1171
  });
@@ -1178,7 +1177,13 @@ function observeImports(map, importName, importIndex) {
1178
1177
  liveVar: {
1179
1178
  },
1180
1179
  onceVar: {
1181
- makeRejectionHandlers: cells[41].makeRejectionHandlers.set,
1180
+ consoleLevelMethods: cells[41].consoleLevelMethods.set,
1181
+ consoleOtherMethods: cells[41].consoleOtherMethods.set,
1182
+ makeLoggingConsoleKit: cells[41].makeLoggingConsoleKit.set,
1183
+ pumpLogToConsole: cells[41].pumpLogToConsole.set,
1184
+ makeCausalConsole: cells[41].makeCausalConsole.set,
1185
+ defineCausalConsoleFromLogger: cells[41].defineCausalConsoleFromLogger.set,
1186
+ filterConsole: cells[41].filterConsole.set,
1182
1187
  },
1183
1188
  importMeta: {},
1184
1189
  });
@@ -1186,14 +1191,11 @@ function observeImports(map, importName, importIndex) {
1186
1191
  imports(entries) {
1187
1192
  const map = new Map(entries);
1188
1193
  observeImports(map, "../commons.js", 0);
1189
- observeImports(map, "./assert.js", 13);
1190
- observeImports(map, "./console.js", 40);
1191
- observeImports(map, "./unhandled-rejection.js", 41);
1192
1194
  },
1193
1195
  liveVar: {
1194
1196
  },
1195
1197
  onceVar: {
1196
- tameConsole: cells[42].tameConsole.set,
1198
+ makeRejectionHandlers: cells[42].makeRejectionHandlers.set,
1197
1199
  },
1198
1200
  importMeta: {},
1199
1201
  });
@@ -1201,13 +1203,14 @@ function observeImports(map, importName, importIndex) {
1201
1203
  imports(entries) {
1202
1204
  const map = new Map(entries);
1203
1205
  observeImports(map, "../commons.js", 0);
1206
+ observeImports(map, "./assert.js", 13);
1207
+ observeImports(map, "./console.js", 41);
1208
+ observeImports(map, "./unhandled-rejection.js", 42);
1204
1209
  },
1205
1210
  liveVar: {
1206
1211
  },
1207
1212
  onceVar: {
1208
- filterFileName: cells[43].filterFileName.set,
1209
- shortenCallSiteString: cells[43].shortenCallSiteString.set,
1210
- tameV8ErrorConstructor: cells[43].tameV8ErrorConstructor.set,
1213
+ tameConsole: cells[43].tameConsole.set,
1211
1214
  },
1212
1215
  importMeta: {},
1213
1216
  });
@@ -1215,75 +1218,73 @@ function observeImports(map, importName, importIndex) {
1215
1218
  imports(entries) {
1216
1219
  const map = new Map(entries);
1217
1220
  observeImports(map, "../commons.js", 0);
1218
- observeImports(map, "../permits.js", 16);
1219
- observeImports(map, "./tame-v8-error-constructor.js", 43);
1220
1221
  },
1221
1222
  liveVar: {
1222
1223
  },
1223
1224
  onceVar: {
1224
- default: cells[44].default.set,
1225
+ filterFileName: cells[44].filterFileName.set,
1226
+ shortenCallSiteString: cells[44].shortenCallSiteString.set,
1227
+ tameV8ErrorConstructor: cells[44].tameV8ErrorConstructor.set,
1225
1228
  },
1226
1229
  importMeta: {},
1227
1230
  });
1228
1231
  functors[45]({
1229
1232
  imports(entries) {
1230
1233
  const map = new Map(entries);
1231
- observeImports(map, "@endo/env-options", 3);
1232
- observeImports(map, "./commons.js", 0);
1233
- observeImports(map, "./error/assert.js", 13);
1234
+ observeImports(map, "../commons.js", 0);
1235
+ observeImports(map, "../permits.js", 16);
1236
+ observeImports(map, "./tame-v8-error-constructor.js", 44);
1234
1237
  },
1235
1238
  liveVar: {
1236
1239
  },
1237
1240
  onceVar: {
1238
- makeAlias: cells[45].makeAlias.set,
1239
- load: cells[45].load.set,
1240
- loadNow: cells[45].loadNow.set,
1241
+ default: cells[45].default.set,
1241
1242
  },
1242
1243
  importMeta: {},
1243
1244
  });
1244
1245
  functors[46]({
1245
1246
  imports(entries) {
1246
1247
  const map = new Map(entries);
1247
- observeImports(map, "./module-load.js", 45);
1248
+ observeImports(map, "@endo/env-options", 3);
1248
1249
  observeImports(map, "./commons.js", 0);
1249
1250
  observeImports(map, "./error/assert.js", 13);
1250
1251
  },
1251
1252
  liveVar: {
1252
1253
  },
1253
1254
  onceVar: {
1254
- deferExports: cells[46].deferExports.set,
1255
- getDeferredExports: cells[46].getDeferredExports.set,
1255
+ makeAlias: cells[46].makeAlias.set,
1256
+ load: cells[46].load.set,
1257
+ loadNow: cells[46].loadNow.set,
1256
1258
  },
1257
1259
  importMeta: {},
1258
1260
  });
1259
1261
  functors[47]({
1260
1262
  imports(entries) {
1261
1263
  const map = new Map(entries);
1264
+ observeImports(map, "./module-load.js", 46);
1262
1265
  observeImports(map, "./commons.js", 0);
1263
- observeImports(map, "./transforms.js", 33);
1264
- observeImports(map, "./make-safe-evaluator.js", 36);
1266
+ observeImports(map, "./error/assert.js", 13);
1265
1267
  },
1266
1268
  liveVar: {
1267
1269
  },
1268
1270
  onceVar: {
1269
- provideCompartmentEvaluator: cells[47].provideCompartmentEvaluator.set,
1270
- compartmentEvaluate: cells[47].compartmentEvaluate.set,
1271
+ deferExports: cells[47].deferExports.set,
1272
+ getDeferredExports: cells[47].getDeferredExports.set,
1271
1273
  },
1272
1274
  importMeta: {},
1273
1275
  });
1274
1276
  functors[48]({
1275
1277
  imports(entries) {
1276
1278
  const map = new Map(entries);
1277
- observeImports(map, "./error/assert.js", 13);
1278
- observeImports(map, "./module-proxy.js", 46);
1279
1279
  observeImports(map, "./commons.js", 0);
1280
- observeImports(map, "./compartment-evaluate.js", 47);
1280
+ observeImports(map, "./transforms.js", 34);
1281
+ observeImports(map, "./make-safe-evaluator.js", 37);
1281
1282
  },
1282
1283
  liveVar: {
1283
1284
  },
1284
1285
  onceVar: {
1285
- makeVirtualModuleInstance: cells[48].makeVirtualModuleInstance.set,
1286
- makeModuleInstance: cells[48].makeModuleInstance.set,
1286
+ provideCompartmentEvaluator: cells[48].provideCompartmentEvaluator.set,
1287
+ compartmentEvaluate: cells[48].compartmentEvaluate.set,
1287
1288
  },
1288
1289
  importMeta: {},
1289
1290
  });
@@ -1291,37 +1292,30 @@ function observeImports(map, importName, importIndex) {
1291
1292
  imports(entries) {
1292
1293
  const map = new Map(entries);
1293
1294
  observeImports(map, "./error/assert.js", 13);
1294
- observeImports(map, "./module-instance.js", 48);
1295
+ observeImports(map, "./module-proxy.js", 47);
1295
1296
  observeImports(map, "./commons.js", 0);
1297
+ observeImports(map, "./compartment-evaluate.js", 48);
1296
1298
  },
1297
1299
  liveVar: {
1298
1300
  },
1299
1301
  onceVar: {
1300
- link: cells[49].link.set,
1301
- instantiate: cells[49].instantiate.set,
1302
+ makeVirtualModuleInstance: cells[49].makeVirtualModuleInstance.set,
1303
+ makeModuleInstance: cells[49].makeModuleInstance.set,
1302
1304
  },
1303
1305
  importMeta: {},
1304
1306
  });
1305
1307
  functors[50]({
1306
1308
  imports(entries) {
1307
1309
  const map = new Map(entries);
1308
- observeImports(map, "./commons.js", 0);
1309
- observeImports(map, "./global-object.js", 28);
1310
1310
  observeImports(map, "./error/assert.js", 13);
1311
- observeImports(map, "./permits.js", 16);
1312
- observeImports(map, "./module-load.js", 45);
1313
- observeImports(map, "./module-link.js", 49);
1314
- observeImports(map, "./module-proxy.js", 46);
1315
- observeImports(map, "./compartment-evaluate.js", 47);
1316
- observeImports(map, "./make-safe-evaluator.js", 36);
1311
+ observeImports(map, "./module-instance.js", 49);
1312
+ observeImports(map, "./commons.js", 0);
1317
1313
  },
1318
1314
  liveVar: {
1319
1315
  },
1320
1316
  onceVar: {
1321
- InertCompartment: cells[50].InertCompartment.set,
1322
- CompartmentPrototype: cells[50].CompartmentPrototype.set,
1323
- compartmentOptions: cells[50].compartmentOptions.set,
1324
- makeCompartmentConstructor: cells[50].makeCompartmentConstructor.set,
1317
+ link: cells[50].link.set,
1318
+ instantiate: cells[50].instantiate.set,
1325
1319
  },
1326
1320
  importMeta: {},
1327
1321
  });
@@ -1329,12 +1323,22 @@ function observeImports(map, importName, importIndex) {
1329
1323
  imports(entries) {
1330
1324
  const map = new Map(entries);
1331
1325
  observeImports(map, "./commons.js", 0);
1332
- observeImports(map, "./compartment.js", 50);
1326
+ observeImports(map, "./global-object.js", 29);
1327
+ observeImports(map, "./error/assert.js", 13);
1328
+ observeImports(map, "./permits.js", 16);
1329
+ observeImports(map, "./module-load.js", 46);
1330
+ observeImports(map, "./module-link.js", 50);
1331
+ observeImports(map, "./module-proxy.js", 47);
1332
+ observeImports(map, "./compartment-evaluate.js", 48);
1333
+ observeImports(map, "./make-safe-evaluator.js", 37);
1333
1334
  },
1334
1335
  liveVar: {
1335
1336
  },
1336
1337
  onceVar: {
1337
- getAnonymousIntrinsics: cells[51].getAnonymousIntrinsics.set,
1338
+ InertCompartment: cells[51].InertCompartment.set,
1339
+ CompartmentPrototype: cells[51].CompartmentPrototype.set,
1340
+ compartmentOptions: cells[51].compartmentOptions.set,
1341
+ makeCompartmentConstructor: cells[51].makeCompartmentConstructor.set,
1338
1342
  },
1339
1343
  importMeta: {},
1340
1344
  });
@@ -1342,11 +1346,12 @@ function observeImports(map, importName, importIndex) {
1342
1346
  imports(entries) {
1343
1347
  const map = new Map(entries);
1344
1348
  observeImports(map, "./commons.js", 0);
1349
+ observeImports(map, "./compartment.js", 51);
1345
1350
  },
1346
1351
  liveVar: {
1347
1352
  },
1348
1353
  onceVar: {
1349
- tameHarden: cells[52].tameHarden.set,
1354
+ getAnonymousIntrinsics: cells[52].getAnonymousIntrinsics.set,
1350
1355
  },
1351
1356
  importMeta: {},
1352
1357
  });
@@ -1358,7 +1363,7 @@ function observeImports(map, importName, importIndex) {
1358
1363
  liveVar: {
1359
1364
  },
1360
1365
  onceVar: {
1361
- tameSymbolConstructor: cells[53].tameSymbolConstructor.set,
1366
+ tameHarden: cells[53].tameHarden.set,
1362
1367
  },
1363
1368
  importMeta: {},
1364
1369
  });
@@ -1370,8 +1375,7 @@ function observeImports(map, importName, importIndex) {
1370
1375
  liveVar: {
1371
1376
  },
1372
1377
  onceVar: {
1373
- tameFauxDataProperty: cells[54].tameFauxDataProperty.set,
1374
- tameFauxDataProperties: cells[54].tameFauxDataProperties.set,
1378
+ tameSymbolConstructor: cells[54].tameSymbolConstructor.set,
1375
1379
  },
1376
1380
  importMeta: {},
1377
1381
  });
@@ -1383,7 +1387,8 @@ function observeImports(map, importName, importIndex) {
1383
1387
  liveVar: {
1384
1388
  },
1385
1389
  onceVar: {
1386
- tameRegeneratorRuntime: cells[55].tameRegeneratorRuntime.set,
1390
+ tameFauxDataProperty: cells[55].tameFauxDataProperty.set,
1391
+ tameFauxDataProperties: cells[55].tameFauxDataProperties.set,
1387
1392
  },
1388
1393
  importMeta: {},
1389
1394
  });
@@ -1395,7 +1400,7 @@ function observeImports(map, importName, importIndex) {
1395
1400
  liveVar: {
1396
1401
  },
1397
1402
  onceVar: {
1398
- shimArrayBufferTransfer: cells[56].shimArrayBufferTransfer.set,
1403
+ tameRegeneratorRuntime: cells[56].tameRegeneratorRuntime.set,
1399
1404
  },
1400
1405
  importMeta: {},
1401
1406
  });
@@ -1403,17 +1408,29 @@ function observeImports(map, importName, importIndex) {
1403
1408
  imports(entries) {
1404
1409
  const map = new Map(entries);
1405
1410
  observeImports(map, "./commons.js", 0);
1406
- observeImports(map, "./error/assert.js", 13);
1407
1411
  },
1408
1412
  liveVar: {
1409
1413
  },
1410
1414
  onceVar: {
1411
- chooseReporter: cells[57].chooseReporter.set,
1412
- reportInGroup: cells[57].reportInGroup.set,
1415
+ shimArrayBufferTransfer: cells[57].shimArrayBufferTransfer.set,
1413
1416
  },
1414
1417
  importMeta: {},
1415
1418
  });
1416
1419
  functors[58]({
1420
+ imports(entries) {
1421
+ const map = new Map(entries);
1422
+ observeImports(map, "./commons.js", 0);
1423
+ observeImports(map, "./error/assert.js", 13);
1424
+ },
1425
+ liveVar: {
1426
+ },
1427
+ onceVar: {
1428
+ chooseReporter: cells[58].chooseReporter.set,
1429
+ reportInGroup: cells[58].reportInGroup.set,
1430
+ },
1431
+ importMeta: {},
1432
+ });
1433
+ functors[59]({
1417
1434
  imports(entries) {
1418
1435
  const map = new Map(entries);
1419
1436
  observeImports(map, "@endo/env-options", 3);
@@ -1425,40 +1442,41 @@ function observeImports(map, importName, importIndex) {
1425
1442
  observeImports(map, "./tame-function-constructors.js", 19);
1426
1443
  observeImports(map, "./tame-date-constructor.js", 20);
1427
1444
  observeImports(map, "./tame-math-object.js", 21);
1428
- observeImports(map, "./tame-regexp-constructor.js", 22);
1429
- observeImports(map, "./enable-property-overrides.js", 24);
1430
- observeImports(map, "./tame-locale-methods.js", 25);
1431
- observeImports(map, "./global-object.js", 28);
1432
- observeImports(map, "./make-safe-evaluator.js", 36);
1445
+ observeImports(map, "./tame-nan-sidechannel.js", 22);
1446
+ observeImports(map, "./tame-regexp-constructor.js", 23);
1447
+ observeImports(map, "./enable-property-overrides.js", 25);
1448
+ observeImports(map, "./tame-locale-methods.js", 26);
1449
+ observeImports(map, "./global-object.js", 29);
1450
+ observeImports(map, "./make-safe-evaluator.js", 37);
1433
1451
  observeImports(map, "./permits.js", 16);
1434
- observeImports(map, "./tame-function-tostring.js", 37);
1435
- observeImports(map, "./tame-domains.js", 38);
1436
- observeImports(map, "./tame-module-source.js", 39);
1437
- observeImports(map, "./error/tame-console.js", 42);
1438
- observeImports(map, "./error/tame-error-constructor.js", 44);
1452
+ observeImports(map, "./tame-function-tostring.js", 38);
1453
+ observeImports(map, "./tame-domains.js", 39);
1454
+ observeImports(map, "./tame-module-source.js", 40);
1455
+ observeImports(map, "./error/tame-console.js", 43);
1456
+ observeImports(map, "./error/tame-error-constructor.js", 45);
1439
1457
  observeImports(map, "./error/assert.js", 13);
1440
- observeImports(map, "./get-anonymous-intrinsics.js", 51);
1441
- observeImports(map, "./compartment.js", 50);
1442
- observeImports(map, "./tame-harden.js", 52);
1443
- observeImports(map, "./tame-symbol-constructor.js", 53);
1444
- observeImports(map, "./tame-faux-data-properties.js", 54);
1445
- observeImports(map, "./tame-regenerator-runtime.js", 55);
1446
- observeImports(map, "./shim-arraybuffer-transfer.js", 56);
1447
- observeImports(map, "./reporting.js", 57);
1458
+ observeImports(map, "./get-anonymous-intrinsics.js", 52);
1459
+ observeImports(map, "./compartment.js", 51);
1460
+ observeImports(map, "./tame-harden.js", 53);
1461
+ observeImports(map, "./tame-symbol-constructor.js", 54);
1462
+ observeImports(map, "./tame-faux-data-properties.js", 55);
1463
+ observeImports(map, "./tame-regenerator-runtime.js", 56);
1464
+ observeImports(map, "./shim-arraybuffer-transfer.js", 57);
1465
+ observeImports(map, "./reporting.js", 58);
1448
1466
  },
1449
1467
  liveVar: {
1450
1468
  },
1451
1469
  onceVar: {
1452
- repairIntrinsics: cells[58].repairIntrinsics.set,
1470
+ repairIntrinsics: cells[59].repairIntrinsics.set,
1453
1471
  },
1454
1472
  importMeta: {},
1455
1473
  });
1456
- functors[59]({
1474
+ functors[60]({
1457
1475
  imports(entries) {
1458
1476
  const map = new Map(entries);
1459
1477
  observeImports(map, "./assert-sloppy-mode.js", 1);
1460
1478
  observeImports(map, "./commons.js", 0);
1461
- observeImports(map, "./lockdown.js", 58);
1479
+ observeImports(map, "./lockdown.js", 59);
1462
1480
  },
1463
1481
  liveVar: {
1464
1482
  },
@@ -1466,14 +1484,14 @@ function observeImports(map, importName, importIndex) {
1466
1484
  },
1467
1485
  importMeta: {},
1468
1486
  });
1469
- functors[60]({
1487
+ functors[61]({
1470
1488
  imports(entries) {
1471
1489
  const map = new Map(entries);
1472
1490
  observeImports(map, "./commons.js", 0);
1473
- observeImports(map, "./compartment.js", 50);
1474
- observeImports(map, "./tame-function-tostring.js", 37);
1491
+ observeImports(map, "./compartment.js", 51);
1492
+ observeImports(map, "./tame-function-tostring.js", 38);
1475
1493
  observeImports(map, "./intrinsics.js", 17);
1476
- observeImports(map, "./reporting.js", 57);
1494
+ observeImports(map, "./reporting.js", 58);
1477
1495
  },
1478
1496
  liveVar: {
1479
1497
  },
@@ -1481,7 +1499,7 @@ function observeImports(map, importName, importIndex) {
1481
1499
  },
1482
1500
  importMeta: {},
1483
1501
  });
1484
- functors[61]({
1502
+ functors[62]({
1485
1503
  imports(entries) {
1486
1504
  const map = new Map(entries);
1487
1505
  observeImports(map, "./commons.js", 0);
@@ -1493,11 +1511,11 @@ function observeImports(map, importName, importIndex) {
1493
1511
  },
1494
1512
  importMeta: {},
1495
1513
  });
1496
- functors[62]({
1514
+ functors[63]({
1497
1515
  imports(entries) {
1498
1516
  const map = new Map(entries);
1499
1517
  observeImports(map, "./commons.js", 0);
1500
- observeImports(map, "./error/console.js", 40);
1518
+ observeImports(map, "./error/console.js", 41);
1501
1519
  observeImports(map, "./error/assert.js", 13);
1502
1520
  },
1503
1521
  liveVar: {
@@ -1506,13 +1524,13 @@ function observeImports(map, importName, importIndex) {
1506
1524
  },
1507
1525
  importMeta: {},
1508
1526
  });
1509
- functors[63]({
1527
+ functors[64]({
1510
1528
  imports(entries) {
1511
1529
  const map = new Map(entries);
1512
- observeImports(map, "./src/lockdown-shim.js", 59);
1513
- observeImports(map, "./src/compartment-shim.js", 60);
1514
- observeImports(map, "./src/assert-shim.js", 61);
1515
- observeImports(map, "./src/console-shim.js", 62);
1530
+ observeImports(map, "./src/lockdown-shim.js", 60);
1531
+ observeImports(map, "./src/compartment-shim.js", 61);
1532
+ observeImports(map, "./src/assert-shim.js", 62);
1533
+ observeImports(map, "./src/console-shim.js", 63);
1516
1534
  },
1517
1535
  liveVar: {
1518
1536
  },
@@ -1552,11 +1570,14 @@ const universalThis = globalThis;$h͏_once.universalThis(universalThis);
1552
1570
  ArrayBuffer,
1553
1571
  Date,
1554
1572
  FinalizationRegistry,
1555
- Float32Array,
1573
+ // Renamed to FERAL_* because it enables the NaN side-channel
1574
+ Float64Array: FERAL_FLOAT64_ARRAY,
1575
+ DataView,
1556
1576
  JSON,
1557
1577
  Map,
1558
1578
  Math,
1559
1579
  Number,
1580
+ BigInt,
1560
1581
  Object,
1561
1582
  Promise,
1562
1583
  Proxy,
@@ -1568,7 +1589,7 @@ const universalThis = globalThis;$h͏_once.universalThis(universalThis);
1568
1589
  Uint8Array,
1569
1590
  WeakMap,
1570
1591
  WeakSet,
1571
- } = globalThis;$h͏_once.Array(Array);$h͏_once.ArrayBuffer(ArrayBuffer);$h͏_once.Date(Date);$h͏_once.FinalizationRegistry(FinalizationRegistry);$h͏_once.Float32Array(Float32Array);$h͏_once.JSON(JSON);$h͏_once.Map(Map);$h͏_once.Math(Math);$h͏_once.Number(Number);$h͏_once.Object(Object);$h͏_once.Promise(Promise);$h͏_once.Proxy(Proxy);$h͏_once.Reflect(Reflect);$h͏_once.FERAL_REG_EXP(FERAL_REG_EXP);$h͏_once.Set(Set);$h͏_once.String(String);$h͏_once.Symbol(Symbol);$h͏_once.Uint8Array(Uint8Array);$h͏_once.WeakMap(WeakMap);$h͏_once.WeakSet(WeakSet);
1592
+ } = globalThis;$h͏_once.Array(Array);$h͏_once.ArrayBuffer(ArrayBuffer);$h͏_once.Date(Date);$h͏_once.FinalizationRegistry(FinalizationRegistry);$h͏_once.FERAL_FLOAT64_ARRAY(FERAL_FLOAT64_ARRAY);$h͏_once.DataView(DataView);$h͏_once.JSON(JSON);$h͏_once.Map(Map);$h͏_once.Math(Math);$h͏_once.Number(Number);$h͏_once.BigInt(BigInt);$h͏_once.Object(Object);$h͏_once.Promise(Promise);$h͏_once.Proxy(Proxy);$h͏_once.Reflect(Reflect);$h͏_once.FERAL_REG_EXP(FERAL_REG_EXP);$h͏_once.Set(Set);$h͏_once.String(String);$h͏_once.Symbol(Symbol);$h͏_once.Uint8Array(Uint8Array);$h͏_once.WeakMap(WeakMap);$h͏_once.WeakSet(WeakSet);
1572
1593
 
1573
1594
  const {
1574
1595
  // The feral Error constructor is safe for internal use, but must not be
@@ -1603,18 +1624,18 @@ const universalThis = globalThis;$h͏_once.universalThis(universalThis);
1603
1624
  setPrototypeOf,
1604
1625
  values,
1605
1626
  fromEntries,
1606
- hasOwn,
1607
- } = Object;$h͏_once.assign(assign);$h͏_once.create(create);$h͏_once.defineProperties(defineProperties);$h͏_once.entries(entries);$h͏_once.freeze(freeze);$h͏_once.getOwnPropertyDescriptor(getOwnPropertyDescriptor);$h͏_once.getOwnPropertyDescriptors(getOwnPropertyDescriptors);$h͏_once.getOwnPropertyNames(getOwnPropertyNames);$h͏_once.getPrototypeOf(getPrototypeOf);$h͏_once.is(is);$h͏_once.isFrozen(isFrozen);$h͏_once.isSealed(isSealed);$h͏_once.isExtensible(isExtensible);$h͏_once.keys(keys);$h͏_once.objectPrototype(objectPrototype);$h͏_once.seal(seal);$h͏_once.preventExtensions(preventExtensions);$h͏_once.setPrototypeOf(setPrototypeOf);$h͏_once.values(values);$h͏_once.fromEntries(fromEntries);$h͏_once.hasOwn(hasOwn);
1627
+ } = Object;$h͏_once.assign(assign);$h͏_once.create(create);$h͏_once.defineProperties(defineProperties);$h͏_once.entries(entries);$h͏_once.freeze(freeze);$h͏_once.getOwnPropertyDescriptor(getOwnPropertyDescriptor);$h͏_once.getOwnPropertyDescriptors(getOwnPropertyDescriptors);$h͏_once.getOwnPropertyNames(getOwnPropertyNames);$h͏_once.getPrototypeOf(getPrototypeOf);$h͏_once.is(is);$h͏_once.isFrozen(isFrozen);$h͏_once.isSealed(isSealed);$h͏_once.isExtensible(isExtensible);$h͏_once.keys(keys);$h͏_once.objectPrototype(objectPrototype);$h͏_once.seal(seal);$h͏_once.preventExtensions(preventExtensions);$h͏_once.setPrototypeOf(setPrototypeOf);$h͏_once.values(values);$h͏_once.fromEntries(fromEntries);
1608
1628
 
1609
1629
  const {
1610
1630
  species: speciesSymbol,
1611
1631
  toStringTag: toStringTagSymbol,
1612
1632
  iterator: iteratorSymbol,
1613
1633
  matchAll: matchAllSymbol,
1634
+ replace: replaceSymbol,
1614
1635
  unscopables: unscopablesSymbol,
1615
1636
  keyFor: symbolKeyFor,
1616
1637
  for: symbolFor,
1617
- } = Symbol;$h͏_once.speciesSymbol(speciesSymbol);$h͏_once.toStringTagSymbol(toStringTagSymbol);$h͏_once.iteratorSymbol(iteratorSymbol);$h͏_once.matchAllSymbol(matchAllSymbol);$h͏_once.unscopablesSymbol(unscopablesSymbol);$h͏_once.symbolKeyFor(symbolKeyFor);$h͏_once.symbolFor(symbolFor);
1638
+ } = Symbol;$h͏_once.speciesSymbol(speciesSymbol);$h͏_once.toStringTagSymbol(toStringTagSymbol);$h͏_once.iteratorSymbol(iteratorSymbol);$h͏_once.matchAllSymbol(matchAllSymbol);$h͏_once.replaceSymbol(replaceSymbol);$h͏_once.unscopablesSymbol(unscopablesSymbol);$h͏_once.symbolKeyFor(symbolKeyFor);$h͏_once.symbolFor(symbolFor);
1618
1639
 
1619
1640
  const { isInteger } = Number;$h͏_once.isInteger(isInteger);
1620
1641
 
@@ -1693,12 +1714,29 @@ const { bind } = functionPrototype;
1693
1714
  */
1694
1715
  const uncurryThis = bind.bind(bind.call); // eslint-disable-line @endo/no-polymorphic-call
1695
1716
 
1696
- /**
1697
- * @deprecated Use `hasOwn` instead
1698
- */$h͏_once.uncurryThis(uncurryThis);
1699
- const objectHasOwnProperty = hasOwn;
1717
+ // See https://github.com/endojs/endo/issues/2930
1718
+ $h͏_once.uncurryThis(uncurryThis);if(!('hasOwn'in Object)){
1719
+ const ObjectPrototypeHasOwnProperty = objectPrototype.hasOwnProperty;
1720
+ const hasOwnShim = (obj, key) => {
1721
+ if (obj === undefined || obj === null) {
1722
+ // We need to add this extra test because of differences in
1723
+ // the order in which `hasOwn` vs `hasOwnProperty` validates
1724
+ // arguments.
1725
+ throw TypeError('Cannot convert undefined or null to object');
1726
+ }
1727
+ return apply(ObjectPrototypeHasOwnProperty, obj, [key]);
1728
+ };
1729
+ defineProperty(Object, 'hasOwn', {
1730
+ value: hasOwnShim,
1731
+ writable: true,
1732
+ enumerable: false,
1733
+ configurable: true,
1734
+ });
1735
+ }
1736
+
1737
+ const { hasOwn } = Object;
1700
1738
  //
1701
- $h͏_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h͏_once.arrayFilter(arrayFilter);
1739
+ $h͏_once.hasOwn(hasOwn);const arrayFilter=uncurryThis(arrayPrototype.filter);$h͏_once.arrayFilter(arrayFilter);
1702
1740
  const arrayForEach = uncurryThis(arrayPrototype.forEach);$h͏_once.arrayForEach(arrayForEach);
1703
1741
  const arrayIncludes = uncurryThis(arrayPrototype.includes);$h͏_once.arrayIncludes(arrayIncludes);
1704
1742
  const arrayJoin = uncurryThis(arrayPrototype.join);
@@ -1737,32 +1775,53 @@ $h͏_once.iterateMap(iterateMap);const setAdd=uncurryThis(setPrototype.add);$h͏
1737
1775
  const setHas = uncurryThis(setPrototype.has);$h͏_once.setHas(setHas);
1738
1776
  const iterateSet = uncurryThis(setPrototype[iteratorSymbol]);
1739
1777
  //
1740
- $h͏_once.iterateSet(iterateSet);const regexpTest=uncurryThis(regexpPrototype.test);$h͏_once.regexpTest(regexpTest);
1741
- const regexpExec = uncurryThis(regexpPrototype.exec);$h͏_once.regexpExec(regexpExec);
1742
- const matchAllRegExp = uncurryThis(regexpPrototype[matchAllSymbol]);
1743
- //
1744
- $h͏_once.matchAllRegExp(matchAllRegExp);const stringEndsWith=uncurryThis(stringPrototype.endsWith);$h͏_once.stringEndsWith(stringEndsWith);
1745
- const stringIncludes = uncurryThis(stringPrototype.includes);$h͏_once.stringIncludes(stringIncludes);
1746
- const stringIndexOf = uncurryThis(stringPrototype.indexOf);$h͏_once.stringIndexOf(stringIndexOf);
1747
- const stringMatch = uncurryThis(stringPrototype.match);$h͏_once.stringMatch(stringMatch);
1748
- const generatorNext = uncurryThis(generatorPrototype.next);$h͏_once.generatorNext(generatorNext);
1749
- const generatorThrow = uncurryThis(generatorPrototype.throw);
1750
-
1778
+ /**
1779
+ * `regexpExec` is provided in exclusion of `regexpTest`, which would be
1780
+ * vulnerable to RegExp.prototype poisoning.
1781
+ */$h͏_once.iterateSet(iterateSet);
1782
+ const regexpExec = uncurryThis(regexpPrototype.exec);
1751
1783
  /**
1752
1784
  * @type { &
1753
- * ((thisArg: string, searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string) &
1754
- * ((thisArg: string, searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string) => string)
1785
+ * ((thisArg: RegExp, string: string, replaceValue: string) => string) &
1786
+ * ((thisArg: RegExp, string: string, replacer: (substring: string, ...args: any[]) => string) => string)
1755
1787
  * }
1756
- */$h͏_once.generatorThrow(generatorThrow);
1757
- const stringReplace = /** @type {any} */ (
1758
- uncurryThis(stringPrototype.replace)
1759
- );$h͏_once.stringReplace(stringReplace);
1760
- const stringSearch = uncurryThis(stringPrototype.search);$h͏_once.stringSearch(stringSearch);
1761
- const stringSlice = uncurryThis(stringPrototype.slice);$h͏_once.stringSlice(stringSlice);
1762
- const stringSplit =
1763
- /** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */ (
1764
- uncurryThis(stringPrototype.split)
1765
- );$h͏_once.stringSplit(stringSplit);
1788
+ */$h͏_once.regexpExec(regexpExec);
1789
+ const regexpReplace = /** @type {any} */ (
1790
+ uncurryThis(regexpPrototype[replaceSymbol])
1791
+ );$h͏_once.regexpReplace(regexpReplace);
1792
+ const matchAllRegExp = uncurryThis(regexpPrototype[matchAllSymbol]);$h͏_once.matchAllRegExp(matchAllRegExp);
1793
+ const { _regexpConstructor, ...regexpDescriptors } =
1794
+ getOwnPropertyDescriptors(regexpPrototype);
1795
+ arrayForEach(ownKeys(regexpDescriptors), key => {
1796
+ const desc = regexpDescriptors[/** @type {any} */ (key)];
1797
+ desc.configurable = false;
1798
+ if (desc.writable) desc.writable = false;
1799
+ });
1800
+ /**
1801
+ * Protect a RegExp instance against RegExp.prototype poisoning ("exec",
1802
+ * "flags", Symbol.replace, etc.).
1803
+ * @type {<T extends RegExp>(regexp: T) => T}
1804
+ */
1805
+ const sealRegexp = regexp =>
1806
+ seal(defineProperties(regexp, regexpDescriptors));
1807
+ //
1808
+ $h͏_once.sealRegexp(sealRegexp);const stringEndsWith=uncurryThis(stringPrototype.endsWith);$h͏_once.stringEndsWith(stringEndsWith);
1809
+ const stringIncludes = uncurryThis(stringPrototype.includes);$h͏_once.stringIncludes(stringIncludes);
1810
+ const stringIndexOf = uncurryThis(stringPrototype.indexOf);$h͏_once.stringIndexOf(stringIndexOf);
1811
+ const stringMatch = uncurryThis(stringPrototype.match);
1812
+ // `stringReplace` is intentionally omitted because it would be vulnerable to
1813
+ // RegExp.prototype poisoning; use `regexpReplace(re, str, replacer)` instead
1814
+ // (and `sealRegexp` on its regular expressions).
1815
+ $h͏_once.stringMatch(stringMatch);const stringSearch=uncurryThis(stringPrototype.search);$h͏_once.stringSearch(stringSearch);
1816
+ const stringSlice = uncurryThis(stringPrototype.slice);
1817
+ /**
1818
+ * `stringSplit` should only be used with a string separator; regular
1819
+ * expressions are vulnerable to RegExp.prototype poisoning.
1820
+ * @type {(thisArg: string, separator: string, limit?: number) => string[]}
1821
+ */$h͏_once.stringSlice(stringSlice);
1822
+ const stringSplit = /** @type {any} */ (
1823
+ uncurryThis(stringPrototype.split)
1824
+ );$h͏_once.stringSplit(stringSplit);
1766
1825
  const stringStartsWith = uncurryThis(stringPrototype.startsWith);$h͏_once.stringStartsWith(stringStartsWith);
1767
1826
  const iterateString = uncurryThis(stringPrototype[iteratorSymbol]);
1768
1827
  //
@@ -1778,7 +1837,10 @@ $h͏_once.weakmapSet(weakmapSet);const weaksetAdd=uncurryThis(weaksetPrototype.a
1778
1837
  $h͏_once.weaksetHas(weaksetHas);const functionToString=uncurryThis(functionPrototype.toString);$h͏_once.functionToString(functionToString);
1779
1838
  const functionBind = uncurryThis(bind);
1780
1839
  //
1781
- $h͏_once.functionBind(functionBind);const{all}=Promise;
1840
+ $h͏_once.functionBind(functionBind);const generatorNext=uncurryThis(generatorPrototype.next);$h͏_once.generatorNext(generatorNext);
1841
+ const generatorThrow = uncurryThis(generatorPrototype.throw);
1842
+ //
1843
+ $h͏_once.generatorThrow(generatorThrow);const{all}=Promise;
1782
1844
  const promiseAll = promises => apply(all, Promise, [promises]);$h͏_once.promiseAll(promiseAll);
1783
1845
  const promiseCatch = uncurryThis(promisePrototype.catch);
1784
1846
  /** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */$h͏_once.promiseCatch(promiseCatch);
@@ -1792,15 +1854,6 @@ $h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
1792
1854
  FinalizationRegistry &&
1793
1855
  uncurryThis(FinalizationRegistry.prototype.unregister);
1794
1856
 
1795
- /**
1796
- * getConstructorOf()
1797
- * Return the constructor from an instance.
1798
- *
1799
- * @param {Function} fn
1800
- */$h͏_once.finalizationRegistryUnregister(finalizationRegistryUnregister);
1801
- const getConstructorOf = fn =>
1802
- reflectGet(getPrototypeOf(fn), 'constructor');
1803
-
1804
1857
  /**
1805
1858
  * TODO Consolidate with `isPrimitive` that's currently in `@endo/pass-style`.
1806
1859
  * Layering constraints make this tricky, which is why we haven't yet figured
@@ -1813,7 +1866,7 @@ $h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
1813
1866
  * | bigint
1814
1867
  * | string
1815
1868
  * | symbol)}
1816
- */$h͏_once.getConstructorOf(getConstructorOf);
1869
+ */$h͏_once.finalizationRegistryUnregister(finalizationRegistryUnregister);
1817
1870
  const isPrimitive = val =>
1818
1871
  !val || (typeof val !== 'object' && typeof val !== 'function');
1819
1872
 
@@ -1853,13 +1906,40 @@ $h͏_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION=Function;$h͏_once.FERAL_F
1853
1906
  };
1854
1907
 
1855
1908
  // ////////////////// FERAL_STACK_GETTER FERAL_STACK_SETTER ////////////////////
1856
- $h͏_once.noEvalEvaluate(noEvalEvaluate);
1857
- const er1StackDesc = getOwnPropertyDescriptor(Error('er1'), 'stack');
1858
- const er2StackDesc = getOwnPropertyDescriptor(TypeError('er2'), 'stack');
1909
+
1910
+ // The error repair mechanism is very similar to code in
1911
+ // pass-style/src/error.js and these implementations should be kept in sync.
1912
+
1913
+ /**
1914
+ * We gratuitiously construct a TypeError instance using syntax in order to
1915
+ * obviate the possibility that code that ran before SES (for which we are
1916
+ * irreducable vulnerable) may have replaced the global TypeError constructor.
1917
+ * We treat the nature of this error instance as the source of truth for the
1918
+ * nature of runtime constructed errors on the platform, particularly whether
1919
+ * such errors will have an own "stack" property with getters and setters.
1920
+ * At time of writing (2025) we know of no comparable mechanism for obtaining a
1921
+ * host-generated base Error instance, but we corroborate the nature of the
1922
+ * global Error constructor's instances and refuse to initialize SES in an
1923
+ * environment where the syntactic TypeError and global Error produce
1924
+ * inconsistent "stack" properties.
1925
+ * @returns {TypeError}
1926
+ */$h͏_once.noEvalEvaluate(noEvalEvaluate);
1927
+ const makeTypeError = () => {
1928
+ try {
1929
+ // @ts-expect-error deliberate TypeError
1930
+ null.null;
1931
+ throw TypeError('obligatory'); // To convince the type flow inferrence.
1932
+ } catch (error) {
1933
+ return error;
1934
+ }
1935
+ };
1936
+
1937
+ const errorStackDesc = getOwnPropertyDescriptor(Error('obligatory'), 'stack');
1938
+ const typeErrorStackDesc = getOwnPropertyDescriptor(makeTypeError(), 'stack');
1859
1939
 
1860
1940
  let feralStackGetter;
1861
1941
  let feralStackSetter;
1862
- if (er1StackDesc && er2StackDesc && er1StackDesc.get) {
1942
+ if (typeErrorStackDesc && typeErrorStackDesc.get) {
1863
1943
  // We should only encounter this case on v8 because of its problematic
1864
1944
  // error own stack accessor behavior.
1865
1945
  // Note that FF/SpiderMonkey, Moddable/XS, and the error stack proposal
@@ -1870,16 +1950,17 @@ if (er1StackDesc && er2StackDesc && er1StackDesc.get) {
1870
1950
  // accessor property, but within the same realm, all these accessor
1871
1951
  // properties have the same getter and have the same setter.
1872
1952
  // This is therefore the case that we repair.
1873
- typeof er1StackDesc.get === 'function' &&
1874
- er1StackDesc.get === er2StackDesc.get &&
1875
- typeof er1StackDesc.set === 'function' &&
1876
- er1StackDesc.set === er2StackDesc.set
1953
+ errorStackDesc &&
1954
+ typeof typeErrorStackDesc.get === 'function' &&
1955
+ typeErrorStackDesc.get === errorStackDesc.get &&
1956
+ typeof typeErrorStackDesc.set === 'function' &&
1957
+ typeErrorStackDesc.set === errorStackDesc.set
1877
1958
  ) {
1878
1959
  // Otherwise, we have own stack accessor properties that are outside
1879
1960
  // our expectations, that therefore need to be understood better
1880
1961
  // before we know how to repair them.
1881
- feralStackGetter = freeze(er1StackDesc.get);
1882
- feralStackSetter = freeze(er1StackDesc.set);
1962
+ feralStackGetter = freeze(typeErrorStackDesc.get);
1963
+ feralStackSetter = freeze(typeErrorStackDesc.set);
1883
1964
  } else {
1884
1965
  // See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNEXPECTED_ERROR_OWN_STACK_ACCESSOR.md
1885
1966
  throw TypeError(
@@ -2428,11 +2509,11 @@ const arrayBufferMethods = {
2428
2509
  ...(optTransferBufferToImmutable
2429
2510
  ? {
2430
2511
  /**
2431
- * Transfer the contents to a new Immutable ArrayBuffer
2512
+ * Transfer the contents to a new immutable ArrayBuffer
2432
2513
  *
2433
2514
  * @this {ArrayBuffer} buffer The original buffer.
2434
2515
  * @param {number} [newLength] The start index.
2435
- * @returns {ArrayBuffer} The sliced immutable ArrayBuffer.
2516
+ * @returns {ArrayBuffer} The new immutable ArrayBuffer.
2436
2517
  */
2437
2518
  transferToImmutable(newLength = undefined) {
2438
2519
  return optTransferBufferToImmutable(this, newLength);
@@ -2505,12 +2586,12 @@ defineProperties(
2505
2586
 
2506
2587
 
2507
2588
 
2508
- /** @import {StringablePayload} from '../../types.js' */
2589
+ /** @import {Stringable} from '../../types.js' */
2509
2590
 
2510
2591
  /**
2511
2592
  * Joins English terms with commas and an optional conjunction.
2512
2593
  *
2513
- * @param {(string | StringablePayload)[]} terms
2594
+ * @param {(string | Stringable)[]} terms
2514
2595
  * @param {"and" | "or"} conjunction
2515
2596
  */
2516
2597
  const enJoin = (terms, conjunction) => {
@@ -2681,7 +2762,7 @@ freeze(bestEffortStringify);
2681
2762
  // === 8. ses ./src/error/types.js ===
2682
2763
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
2683
2764
 
2684
- /** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */
2765
+ /** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, Stringable} from '../../types.js' */
2685
2766
 
2686
2767
  /**
2687
2768
  * @typedef {object} VirtualConsole
@@ -3246,7 +3327,8 @@ freeze(makeNoteLogArgsArrayKit);
3246
3327
  })()
3247
3328
  ,
3248
3329
  // === 13. ses ./src/error/assert.js ===
3249
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,defineProperty,globalThis,is,isError,regexpTest,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,AggregateError,getOwnPropertyDescriptors,ownKeys,create,objectPrototype,hasOwn,an,bestEffortStringify,makeNoteLogArgsArrayKit;$h͏_imports([["../commons.js", [["RangeError",[$h͏_a => (RangeError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["regexpTest",[$h͏_a => (regexpTest = $h͏_a)]],["stringIndexOf",[$h͏_a => (stringIndexOf = $h͏_a)]],["stringReplace",[$h͏_a => (stringReplace = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]],["stringStartsWith",[$h͏_a => (stringStartsWith = $h͏_a)]],["weakmapDelete",[$h͏_a => (weakmapDelete = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas",[$h͏_a => (weakmapHas = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["AggregateError",[$h͏_a => (AggregateError = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]]]],["./stringify-utils.js", [["an",[$h͏_a => (an = $h͏_a)]],["bestEffortStringify",[$h͏_a => (bestEffortStringify = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []],["./note-log-args.js", [["makeNoteLogArgsArrayKit",[$h͏_a => (makeNoteLogArgsArrayKit = $h͏_a)]]]]]);
3330
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,defineProperty,globalThis,is,isError,regexpExec,regexpReplace,sealRegexp,stringIndexOf,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,AggregateError,getOwnPropertyDescriptors,ownKeys,create,objectPrototype,hasOwn,an,bestEffortStringify,makeNoteLogArgsArrayKit;$h͏_imports([["../commons.js", [["RangeError",[$h͏_a => (RangeError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["regexpReplace",[$h͏_a => (regexpReplace = $h͏_a)]],["sealRegexp",[$h͏_a => (sealRegexp = $h͏_a)]],["stringIndexOf",[$h͏_a => (stringIndexOf = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]],["stringStartsWith",[$h͏_a => (stringStartsWith = $h͏_a)]],["weakmapDelete",[$h͏_a => (weakmapDelete = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas",[$h͏_a => (weakmapHas = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["AggregateError",[$h͏_a => (AggregateError = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]]]],["./stringify-utils.js", [["an",[$h͏_a => (an = $h͏_a)]],["bestEffortStringify",[$h͏_a => (bestEffortStringify = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []],["./note-log-args.js", [["makeNoteLogArgsArrayKit",[$h͏_a => (makeNoteLogArgsArrayKit = $h͏_a)]]]]]);
3331
+
3250
3332
 
3251
3333
 
3252
3334
 
@@ -3295,24 +3377,28 @@ freeze(makeNoteLogArgsArrayKit);
3295
3377
 
3296
3378
 
3297
3379
  /**
3298
- * @import {BaseAssert, Assert, AssertionFunctions, AssertionUtilities, StringablePayload, DetailsToken, MakeAssert} from '../../types.js'
3299
- * @import {LogArgs, NoteCallback, LoggedErrorHandler} from "./internal-types.js";
3380
+ * @import {BaseAssert, Assert, AssertionFunctions, AssertionUtilities, DeprecatedAssertionUtilities, Stringable, DetailsToken, MakeAssert} from '../../types.js';
3381
+ * @import {LogArgs, NoteCallback, LoggedErrorHandler} from './internal-types.js';
3300
3382
  */
3301
3383
 
3302
- // For our internal debugging purposes, uncomment
3384
+ // For internal debugging purposes, uncomment
3303
3385
  // const internalDebugConsole = console;
3304
3386
 
3305
3387
  // /////////////////////////////////////////////////////////////////////////////
3306
3388
 
3307
- /** @type {WeakMap<StringablePayload, any>} */
3389
+ /**
3390
+ * Maps the result of a `quote` or `bare` call back to its input value.
3391
+ *
3392
+ * @type {WeakMap<Stringable, any>}
3393
+ */
3308
3394
  const declassifiers = new WeakMap();
3309
3395
 
3310
3396
  /** @type {AssertionUtilities['quote']} */
3311
- const quote = (payload, spaces = undefined) => {
3397
+ const quote = (value, spaces = undefined) => {
3312
3398
  const result = freeze({
3313
- toString: freeze(() => bestEffortStringify(payload, spaces)),
3399
+ toString: freeze(() => bestEffortStringify(value, spaces)),
3314
3400
  });
3315
- weakmapSet(declassifiers, result, payload);
3401
+ weakmapSet(declassifiers, result, value);
3316
3402
  return result;
3317
3403
  };$h͏_once.quote(quote);
3318
3404
  freeze(quote);
@@ -3322,14 +3408,14 @@ const canBeBare = freeze(/^[\w:-]( ?[\w:-])*$/);
3322
3408
  /**
3323
3409
  * @type {AssertionUtilities['bare']}
3324
3410
  */
3325
- const bare = (payload, spaces = undefined) => {
3326
- if (typeof payload !== 'string' || !regexpTest(canBeBare, payload)) {
3327
- return quote(payload, spaces);
3411
+ const bare = (text, spaces = undefined) => {
3412
+ if (typeof text !== 'string' || !regexpExec(canBeBare, text)) {
3413
+ return quote(text, spaces);
3328
3414
  }
3329
3415
  const result = freeze({
3330
- toString: freeze(() => payload),
3416
+ toString: freeze(() => text),
3331
3417
  });
3332
- weakmapSet(declassifiers, result, payload);
3418
+ weakmapSet(declassifiers, result, text);
3333
3419
  return result;
3334
3420
  };$h͏_once.bare(bare);
3335
3421
  freeze(bare);
@@ -3337,24 +3423,28 @@ freeze(bare);
3337
3423
  // /////////////////////////////////////////////////////////////////////////////
3338
3424
 
3339
3425
  /**
3340
- * @typedef {object} HiddenDetails
3426
+ * @typedef {{ template: TemplateStringsArray | string[], args: any[] }} DetailsParts
3341
3427
  *
3342
- * Captures the arguments passed to the `details` template string tag.
3428
+ * The contents of a `details` template literal tag: literal strings (always at
3429
+ * least one) and arbitrary substitution values from in between them.
3343
3430
  *
3344
- * @property {TemplateStringsArray | string[]} template
3345
- * @property {any[]} args
3431
+ * Unquoted substitution values are sensitive (and are redacted in error
3432
+ * `message` strings), so a DetailsPart must not leak outside of this file.
3346
3433
  */
3347
3434
 
3348
3435
  /**
3349
- * @type {WeakMap<DetailsToken, HiddenDetails>}
3436
+ * Maps the result of a `details` tagged template literal back to a record of
3437
+ * that template literal's contents.
3350
3438
  *
3351
- * Maps from a details token which a `details` template literal returned
3352
- * to a record of the contents of that template literal expression.
3439
+ * @type {WeakMap<DetailsToken, DetailsParts>}
3353
3440
  */
3354
3441
  const hiddenDetailsMap = new WeakMap();
3355
3442
 
3356
3443
  /**
3357
- * @param {HiddenDetails} hiddenDetails
3444
+ * Construct an error message string from `details` template literal contents,
3445
+ * replacing unquoted substitution values with redactions.
3446
+ *
3447
+ * @param {DetailsParts} hiddenDetails
3358
3448
  * @returns {string}
3359
3449
  */
3360
3450
  const getMessageString = ({ template, args }) => {
@@ -3375,16 +3465,14 @@ const getMessageString = ({ template, args }) => {
3375
3465
  };
3376
3466
 
3377
3467
  /**
3378
- * Give detailsTokens a toString behavior. To minimize the overhead of
3379
- * creating new detailsTokens, we do this with an
3380
- * inherited `this` sensitive `toString` method, even though we normally
3381
- * avoid `this` sensitivity. To protect the method from inappropriate
3382
- * `this` application, it does something interesting only for objects
3383
- * registered in `redactedDetails`, which should be exactly the detailsTokens.
3468
+ * Define `toString` behavior for DetailsToken. To minimize the overhead of
3469
+ * creating new instances, we do this with an inherited `this`-sensitive method,
3470
+ * even though we normally avoid such sensitivity. To protect the method from
3471
+ * inappropriate application, it verifies that `this` is registered in
3472
+ * `redactedDetails` before doing interesting work.
3384
3473
  *
3385
- * The printing behavior must not reveal anything redacted, so we just use
3386
- * the same `getMessageString` we use to construct the redacted message
3387
- * string for a thrown assertion error.
3474
+ * The behavior must not reveal anything redacted, so we use `getMessageString`
3475
+ * to return the same value as the message for a thrown assertion-failure error.
3388
3476
  */
3389
3477
  const DetailsTokenProto = freeze({
3390
3478
  toString() {
@@ -3404,16 +3492,15 @@ freeze(DetailsTokenProto.toString);
3404
3492
  * given to `lockdown`, then `unredactedDetails` is used instead.
3405
3493
  *
3406
3494
  * There are some unconditional uses of `redactedDetails` in this module. All
3407
- * of them should be uses where the template literal has no redacted
3408
- * substitution values. In those cases, the two are equivalent.
3495
+ * of them should be uses where the template literal has no redacted (unquoted)
3496
+ * substitution values. In those cases, `redactedDetails` is equivalent to
3497
+ * `unredactedDetails`.
3409
3498
  *
3410
3499
  * @type {AssertionUtilities['details']}
3411
3500
  */
3412
3501
  const redactedDetails = (template, ...args) => {
3413
- // Keep in mind that the vast majority of calls to `details` creates
3414
- // a details token that is never used, so this path must remain as fast as
3415
- // possible. Hence we store what we've got with little processing, postponing
3416
- // all the work to happen only if needed, for example, if an assertion fails.
3502
+ // In case the result of this call is never used, perform as little processing
3503
+ // as possible here to keep things fast.
3417
3504
  const detailsToken = freeze({ __proto__: DetailsTokenProto });
3418
3505
  weakmapSet(hiddenDetailsMap, detailsToken, { template, args });
3419
3506
  return /** @type {DetailsToken} */ (/** @type {unknown} */ (detailsToken));
@@ -3443,8 +3530,15 @@ const unredactedDetails = (template, ...args) => {
3443
3530
  freeze(unredactedDetails);
3444
3531
 
3445
3532
 
3533
+ const leadingSpacePattern = sealRegexp(/^ /);
3534
+ const trailingSpacePattern = sealRegexp(/ $/);
3535
+
3446
3536
  /**
3447
- * @param {HiddenDetails} hiddenDetails
3537
+ * Get arguments suitable for a console logger function (e.g., `console.error`)
3538
+ * from `details` template literal contents, unquoting quoted substitution
3539
+ * values.
3540
+ *
3541
+ * @param {DetailsParts} hiddenDetails
3448
3542
  * @returns {LogArgs}
3449
3543
  */
3450
3544
  const getLogArgs = ({ template, args }) => {
@@ -3454,14 +3548,22 @@ const getLogArgs = ({ template, args }) => {
3454
3548
  if (weakmapHas(declassifiers, arg)) {
3455
3549
  arg = weakmapGet(declassifiers, arg);
3456
3550
  }
3457
- // Remove the extra spaces (since console.error puts them
3458
- // between each cause).
3459
- const priorWithoutSpace = stringReplace(arrayPop(logArgs) || '', / $/, '');
3460
- if (priorWithoutSpace !== '') {
3461
- arrayPush(logArgs, priorWithoutSpace);
3551
+ // Remove substitution-adjacent spaces from template fixed-string parts
3552
+ // (since console logging inserts its own argument-separating spaces).
3553
+ const prevLiteralPart = regexpReplace(
3554
+ trailingSpacePattern,
3555
+ arrayPop(logArgs) || '',
3556
+ '',
3557
+ );
3558
+ if (prevLiteralPart !== '') {
3559
+ arrayPush(logArgs, prevLiteralPart);
3462
3560
  }
3463
- const nextWithoutSpace = stringReplace(template[i + 1], /^ /, '');
3464
- arrayPush(logArgs, arg, nextWithoutSpace);
3561
+ const nextLiteralPart = regexpReplace(
3562
+ leadingSpacePattern,
3563
+ template[i + 1],
3564
+ '',
3565
+ );
3566
+ arrayPush(logArgs, arg, nextLiteralPart);
3465
3567
  }
3466
3568
  if (logArgs[logArgs.length - 1] === '') {
3467
3569
  arrayPop(logArgs);
@@ -3470,11 +3572,11 @@ const getLogArgs = ({ template, args }) => {
3470
3572
  };
3471
3573
 
3472
3574
  /**
3473
- * @type {WeakMap<Error, LogArgs>}
3575
+ * Maps from an error object to arguments suitable for a privileged console
3576
+ * logger function such as `console.error`, including values that may be
3577
+ * redacted in the error's `message`.
3474
3578
  *
3475
- * Maps from an error object to the log args that are a more informative
3476
- * alternative message for that error. When logging the error, these
3477
- * log args should be preferred to `error.message`.
3579
+ * @type {WeakMap<Error, LogArgs>}
3478
3580
  */
3479
3581
  const hiddenMessageLogArgs = new WeakMap();
3480
3582
 
@@ -3545,27 +3647,24 @@ const tagError = (err, optErrorName = err.name) => {
3545
3647
  for (const name of restNames) {
3546
3648
  delete error[name];
3547
3649
  }
3548
- const droppedNote = create(objectPrototype, restDescs);
3650
+ const dropped = create(objectPrototype, restDescs);
3651
+ const droppedDetails = redactedDetails`originally with properties ${quote(dropped)}`;
3549
3652
  // eslint-disable-next-line no-use-before-define
3550
- note(
3551
- error,
3552
- redactedDetails`originally with properties ${quote(droppedNote)}`,
3553
- );
3653
+ note(error, droppedDetails);
3554
3654
  }
3555
3655
  for (const name of ownKeys(error)) {
3556
- // @ts-expect-error TS still confused by symbols as property names
3656
+ // @ts-expect-error TypeScript is still confused by symbols as property keys
3557
3657
  const desc = descs[name];
3558
3658
  if (desc && hasOwn(desc, 'get')) {
3559
- defineProperty(error, name, {
3560
- value: error[name] // invoke the getter to convert to data property
3561
- });
3659
+ const value = error[name]; // invokes the getter
3660
+ defineProperty(error, name, { value });
3562
3661
  }
3563
3662
  }
3564
3663
  freeze(error);
3565
3664
  };
3566
3665
 
3567
3666
  /**
3568
- * @type {AssertionUtilities['error']}
3667
+ * @type {AssertionUtilities['makeError']}
3569
3668
  */$h͏_once.sanitizeError(sanitizeError);
3570
3669
  const makeError = (
3571
3670
  optDetails = redactedDetails`Assert failed`,
@@ -3577,9 +3676,9 @@ const makeError = (
3577
3676
  sanitize = true,
3578
3677
  } = {},
3579
3678
  ) => {
3679
+ // Promote string-valued `optDetails` into a minimal DetailsParts
3680
+ // consisting of that string as the sole literal part with no substitutions.
3580
3681
  if (typeof optDetails === 'string') {
3581
- // If it is a string, use it as the literal part of the template so
3582
- // it doesn't get quoted.
3583
3682
  optDetails = redactedDetails([optDetails]);
3584
3683
  }
3585
3684
  const hiddenDetails = weakmapGet(hiddenDetailsMap, optDetails);
@@ -3595,13 +3694,11 @@ const makeError = (
3595
3694
  ) {
3596
3695
  error = AggregateError(errors || [], messageString, opts);
3597
3696
  } else {
3598
- error = /** @type {ErrorConstructor} */ (errConstructor)(
3599
- messageString,
3600
- opts,
3601
- );
3697
+ const ErrorCtor = /** @type {ErrorConstructor} */ (errConstructor);
3698
+ error = ErrorCtor(messageString, opts);
3699
+ // Since we need to tolerate `errors` on an AggregateError, we may as well
3700
+ // tolerate it on all errors.
3602
3701
  if (errors !== undefined) {
3603
- // Since we need to tolerate `errors` on an AggregateError, may as
3604
- // well tolerate it on all errors.
3605
3702
  defineProperty(error, 'errors', {
3606
3703
  value: errors,
3607
3704
  writable: true,
@@ -3624,11 +3721,10 @@ freeze(makeError);
3624
3721
 
3625
3722
  // /////////////////////////////////////////////////////////////////////////////
3626
3723
 
3627
- const { addLogArgs, takeLogArgsArray } = makeNoteLogArgsArrayKit();
3724
+ const { addLogArgs: addNoteLogArgs, takeLogArgsArray: takeAllNoteLogArgs } =
3725
+ makeNoteLogArgsArrayKit();
3628
3726
 
3629
3727
  /**
3630
- * @type {WeakMap<Error, NoteCallback[]>}
3631
- *
3632
3728
  * An augmented console will normally only take the hidden noteArgs array once,
3633
3729
  * when it logs the error being annotated. Once that happens, further
3634
3730
  * annotations of that error should go to the console immediately. We arrange
@@ -3637,14 +3733,16 @@ const { addLogArgs, takeLogArgsArray } = makeNoteLogArgsArrayKit();
3637
3733
  * callback per error, but that depends on console behavior which we should not
3638
3734
  * assume. We make this an array of callbacks so multiple registrations
3639
3735
  * are independent.
3736
+ *
3737
+ * @type {WeakMap<Error, NoteCallback[]>}
3640
3738
  */
3641
- const hiddenNoteCallbackArrays = new WeakMap();
3739
+ const hiddenNoteCallbacks = new WeakMap();
3642
3740
 
3643
3741
  /** @type {AssertionUtilities['note']} */
3644
3742
  const note = (error, detailsNote) => {
3743
+ // Promote string-valued `detailsNote` into a minimal DetailsParts consisting
3744
+ // of that string as the sole literal part with no substitutions.
3645
3745
  if (typeof detailsNote === 'string') {
3646
- // If it is a string, use it as the literal part of the template so
3647
- // it doesn't get quoted.
3648
3746
  detailsNote = redactedDetails([detailsNote]);
3649
3747
  }
3650
3748
  const hiddenDetails = weakmapGet(hiddenDetailsMap, detailsNote);
@@ -3652,13 +3750,13 @@ const note = (error, detailsNote) => {
3652
3750
  throw TypeError(`unrecognized details ${quote(detailsNote)}`);
3653
3751
  }
3654
3752
  const logArgs = getLogArgs(hiddenDetails);
3655
- const callbacks = weakmapGet(hiddenNoteCallbackArrays, error);
3753
+ const callbacks = weakmapGet(hiddenNoteCallbacks, error);
3656
3754
  if (callbacks !== undefined) {
3657
3755
  for (const callback of callbacks) {
3658
3756
  callback(error, logArgs);
3659
3757
  }
3660
3758
  } else {
3661
- addLogArgs(error, logArgs);
3759
+ addNoteLogArgs(error, logArgs);
3662
3760
  }
3663
3761
  };$h͏_once.note(note);
3664
3762
  freeze(note);
@@ -3692,21 +3790,21 @@ const loggedErrorHandler = {
3692
3790
  },
3693
3791
  getMessageLogArgs: error => weakmapGet(hiddenMessageLogArgs, error),
3694
3792
  takeMessageLogArgs: error => {
3695
- const result = weakmapGet(hiddenMessageLogArgs, error);
3793
+ const logArgs = weakmapGet(hiddenMessageLogArgs, error);
3696
3794
  weakmapDelete(hiddenMessageLogArgs, error);
3697
- return result;
3795
+ return logArgs;
3698
3796
  },
3699
3797
  takeNoteLogArgsArray: (error, callback) => {
3700
- const result = takeLogArgsArray(error);
3798
+ const logArgsArray = takeAllNoteLogArgs(error);
3701
3799
  if (callback !== undefined) {
3702
- const callbacks = weakmapGet(hiddenNoteCallbackArrays, error);
3800
+ const callbacks = weakmapGet(hiddenNoteCallbacks, error);
3703
3801
  if (callbacks) {
3704
3802
  arrayPush(callbacks, callback);
3705
3803
  } else {
3706
- weakmapSet(hiddenNoteCallbackArrays, error, [callback]);
3804
+ weakmapSet(hiddenNoteCallbacks, error, [callback]);
3707
3805
  }
3708
3806
  }
3709
- return result || [];
3807
+ return logArgsArray || [];
3710
3808
  },
3711
3809
  };$h͏_once.loggedErrorHandler(loggedErrorHandler);
3712
3810
  freeze(loggedErrorHandler);
@@ -3717,7 +3815,7 @@ freeze(loggedErrorHandler);
3717
3815
  /**
3718
3816
  * @type {MakeAssert}
3719
3817
  */
3720
- const makeAssert = (optRaise = undefined, unredacted = false) => {
3818
+ const makeAssert = (optRaise = undefined, unredacted = false) => {
3721
3819
  const details = unredacted ? unredactedDetails : redactedDetails;
3722
3820
  const assertFailedDetails = details`Check failed`;
3723
3821
 
@@ -3729,7 +3827,6 @@ const makeAssert = (optRaise = undefined, unredacted = false) => {
3729
3827
  ) => {
3730
3828
  const reason = makeError(optDetails, errConstructor, options);
3731
3829
  if (optRaise !== undefined) {
3732
- // @ts-ignore returns `never` doesn't mean it isn't callable
3733
3830
  optRaise(reason);
3734
3831
  }
3735
3832
  throw reason;
@@ -3739,18 +3836,16 @@ const makeAssert = (optRaise = undefined, unredacted = false) => {
3739
3836
  /** @type {AssertionUtilities['Fail']} */
3740
3837
  const Fail = (template, ...args) => fail(details(template, ...args));
3741
3838
 
3742
- // Don't freeze or export `baseAssert` until we add methods.
3743
- // TODO If I change this from a `function` function to an arrow
3744
- // function, I seem to get type errors from TypeScript. Why?
3839
+ // Don't freeze or export `assert` until we add methods.
3745
3840
  /** @type {BaseAssert} */
3746
- function baseAssert(
3747
- flag,
3841
+ const assert = (
3842
+ condition,
3748
3843
  optDetails = undefined,
3749
3844
  errConstructor = undefined,
3750
3845
  options = undefined,
3751
- ) {
3752
- flag || fail(optDetails, errConstructor, options);
3753
- }
3846
+ ) => {
3847
+ condition || fail(optDetails, errConstructor, options);
3848
+ };
3754
3849
 
3755
3850
  /** @type {AssertionFunctions['equal']} */
3756
3851
  const equal = (
@@ -3792,26 +3887,37 @@ const makeAssert = (optRaise = undefined, unredacted = false) => {
3792
3887
  const assertString = (specimen, optDetails = undefined) =>
3793
3888
  assertTypeof(specimen, 'string', optDetails);
3794
3889
 
3795
- // Note that "assert === baseAssert"
3796
- /** @type {Assert} */
3797
- const assert = assign(baseAssert, {
3798
- error: makeError,
3799
- fail,
3890
+ /** @type {Pick<AssertionFunctions, keyof AssertionFunctions>} */
3891
+ const assertionFunctions = {
3800
3892
  equal,
3801
3893
  typeof: assertTypeof,
3802
3894
  string: assertString,
3895
+ fail,
3896
+ };
3897
+
3898
+ /** @type {AssertionUtilities} */
3899
+ const assertionUtilities = {
3900
+ makeError,
3803
3901
  note,
3804
3902
  details,
3805
3903
  Fail,
3806
3904
  quote,
3807
3905
  bare,
3808
- makeAssert,
3906
+ };
3907
+
3908
+ /** @type {DeprecatedAssertionUtilities} */
3909
+ const deprecated = { error: makeError, makeAssert };
3910
+
3911
+ /** @type {Assert} */
3912
+ const finishedAssert = assign(assert, {
3913
+ ...assertionFunctions,
3914
+ ...assertionUtilities,
3915
+ ...deprecated,
3809
3916
  });
3810
- return freeze(assert);
3917
+ return freeze(finishedAssert);
3811
3918
  };$h͏_once.makeAssert(makeAssert);
3812
3919
  freeze(makeAssert);
3813
3920
 
3814
-
3815
3921
  /** @type {Assert} */
3816
3922
  const assert = makeAssert();$h͏_once.assert(assert);
3817
3923
 
@@ -4235,10 +4341,7 @@ const freezeTypedArray = array => {
4235
4341
  Boolean: 'Boolean',
4236
4342
  DataView: 'DataView',
4237
4343
  EvalError: 'EvalError',
4238
- // https://github.com/tc39/proposal-float16array
4239
- Float16Array: 'Float16Array',
4240
- Float32Array: 'Float32Array',
4241
- Float64Array: 'Float64Array',
4344
+
4242
4345
  Int8Array: 'Int8Array',
4243
4346
  Int16Array: 'Int16Array',
4244
4347
  Int32Array: 'Int32Array',
@@ -4320,6 +4423,18 @@ const freezeTypedArray = array => {
4320
4423
 
4321
4424
  Math: '%InitialMath%',
4322
4425
 
4426
+ // We move these from universalPropertyNames because the NaN side channel
4427
+ // means that they are not quite harmless.
4428
+ // We move them to initialGlobalPropertyNames so that they'll still be
4429
+ // included in the primordials, repaired, and hardened. Thus, they
4430
+ // can be endowed into compartments without hazard beyond the
4431
+ // NaN side channel.
4432
+ //
4433
+ // // https://github.com/tc39/proposal-float16array
4434
+ Float16Array: 'Float16Array',
4435
+ Float32Array: 'Float32Array',
4436
+ Float64Array: 'Float64Array',
4437
+
4323
4438
  // ESNext
4324
4439
 
4325
4440
  // From Error-stack proposal
@@ -4683,6 +4798,11 @@ const CommonMath = {
4683
4798
  seal: fn,
4684
4799
  setPrototypeOf: fn,
4685
4800
  values: fn,
4801
+ 'RegisteredSymbol(harden)': {
4802
+ ...fn,
4803
+ // Installed with hardenTaming: 'unsafe'
4804
+ isFake: 'boolean',
4805
+ },
4686
4806
  // https://github.com/tc39/proposal-accessible-object-hasownproperty
4687
4807
  hasOwn: fn,
4688
4808
  // https://github.com/tc39/proposal-array-grouping
@@ -6743,7 +6863,113 @@ function sampleGlobals(globalObject, newPropertyNames) {
6743
6863
  }$h͏_once.default( tameMathObject);
6744
6864
  })()
6745
6865
  ,
6746
- // === 22. ses ./src/tame-regexp-constructor.js ===
6866
+ // === 22. ses ./src/tame-nan-sidechannel.js ===
6867
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Object,DataView,Reflect,Number;$h͏_imports([["./commons.js", [["Object",[$h͏_a => (Object = $h͏_a)]],["DataView",[$h͏_a => (DataView = $h͏_a)]],["Reflect",[$h͏_a => (Reflect = $h͏_a)]],["Number",[$h͏_a => (Number = $h͏_a)]]]]]);
6868
+
6869
+ const { is, defineProperty, entries } = Object;
6870
+ const { apply } = Reflect;
6871
+
6872
+ const { prototype: dataViewPrototype } = DataView;
6873
+
6874
+ /**
6875
+ * These `FERAL*` methods open up the NaN side-channel on some platforms,
6876
+ * like v8. Thus, we need to encapsulate them and replace them with wrappers
6877
+ * that canonicaize NaNs.
6878
+ */
6879
+ const {
6880
+ setFloat16: FERAL_SET_FLOAT16,
6881
+ setFloat32: FERAL_SET_FLOAT32,
6882
+ setFloat64: FERAL_SET_FLOAT64,
6883
+
6884
+ setUint16,
6885
+ setUint32,
6886
+ setBigUint64,
6887
+ } = dataViewPrototype;
6888
+
6889
+ // See https://webidl.spec.whatwg.org/#js-unrestricted-double which implies
6890
+ // that this is the canonical NaN for web standards.
6891
+ // Casual googling stongly suggests that this is also the cosmWasm
6892
+ // canonical NaN. But I have not yet found an authoritative page stating this.
6893
+ const canonicalNaN = 0x7ff8000000000000n;
6894
+
6895
+ // Use method shorthand syntax to be this-sensitive but now be constructable
6896
+ // nor have a `prototype` property.
6897
+ const methods = {
6898
+ /**
6899
+ * @param {number} byteOffset
6900
+ * @param {number} value
6901
+ * @param {boolean} [littleEndian]
6902
+ */
6903
+ setFloat16(byteOffset, value, littleEndian = undefined) {
6904
+ if (is(value, NaN)) {
6905
+ return apply(setUint16, this, [
6906
+ byteOffset,
6907
+ Number(canonicalNaN),
6908
+ littleEndian,
6909
+ ]);
6910
+ } else {
6911
+ return apply(FERAL_SET_FLOAT16, this, [byteOffset, value, littleEndian]);
6912
+ }
6913
+ },
6914
+ /**
6915
+ * @param {number} byteOffset
6916
+ * @param {number} value
6917
+ * @param {boolean} [littleEndian]
6918
+ */
6919
+ setFloat32(byteOffset, value, littleEndian = undefined) {
6920
+ if (is(value, NaN)) {
6921
+ return apply(setUint32, this, [
6922
+ byteOffset,
6923
+ Number(canonicalNaN),
6924
+ littleEndian,
6925
+ ]);
6926
+ } else {
6927
+ return apply(FERAL_SET_FLOAT32, this, [byteOffset, value, littleEndian]);
6928
+ }
6929
+ },
6930
+ /**
6931
+ * @param {number} byteOffset
6932
+ * @param {number} value
6933
+ * @param {boolean} [littleEndian]
6934
+ */
6935
+ setFloat64(byteOffset, value, littleEndian = undefined) {
6936
+ if (is(value, NaN)) {
6937
+ return apply(setBigUint64, this, [
6938
+ byteOffset,
6939
+ canonicalNaN,
6940
+ littleEndian,
6941
+ ]);
6942
+ } else {
6943
+ return apply(FERAL_SET_FLOAT64, this, [byteOffset, value, littleEndian]);
6944
+ }
6945
+ },
6946
+ };
6947
+
6948
+ /**
6949
+ * Replaces the dangerous `setFloat*` methods on `DataView.prototype`
6950
+ * with safe wrappers that first canonicalize NaNs before calling the
6951
+ * original hidden methods.
6952
+ * By itself, this does not make us safe against the NaN side channel.
6953
+ * Separately, we do not include the `Float*Array` constructors on the
6954
+ * list of universal safe globals. Thus, constructed compartments do not
6955
+ * get these by default.
6956
+ *
6957
+ * These replacement `setFloat*` methods canonicalize NaN, but they
6958
+ * do not canonicalize `-0` to `0`. If callers wish to do so, they should do
6959
+ * it themselves before calling these
6960
+ */
6961
+ const tameNaNSideChannel = () => {
6962
+ for (const [name, method] of entries(methods)) {
6963
+ defineProperty(dataViewPrototype, name, {
6964
+ // Since we're redefining properties that already exist, by omitting the
6965
+ // other descriptor attributes here, they are unchanged.
6966
+ value: method,
6967
+ });
6968
+ }
6969
+ };$h͏_once.tameNaNSideChannel(tameNaNSideChannel);
6970
+ })()
6971
+ ,
6972
+ // === 23. ses ./src/tame-regexp-constructor.js ===
6747
6973
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,TypeError,construct,defineProperties,getOwnPropertyDescriptor,speciesSymbol;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["construct",[$h͏_a => (construct = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["speciesSymbol",[$h͏_a => (speciesSymbol = $h͏_a)]]]]]);
6748
6974
 
6749
6975
 
@@ -6811,7 +7037,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
6811
7037
  }$h͏_once.default( tameRegExpConstructor);
6812
7038
  })()
6813
7039
  ,
6814
- // === 23. ses ./src/enablements.js ===
7040
+ // === 24. ses ./src/enablements.js ===
6815
7041
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let toStringTagSymbol,iteratorSymbol;$h͏_imports([["./commons.js", [["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["iteratorSymbol",[$h͏_a => (iteratorSymbol = $h͏_a)]]]]]);
6816
7042
 
6817
7043
  /**
@@ -6892,6 +7118,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
6892
7118
  '%ErrorPrototype%': {
6893
7119
  name: true // set by "precond", "ava", "node-fetch"
6894
7120
  },
7121
+
6895
7122
  '%IteratorPrototype%': {
6896
7123
  toString: true,
6897
7124
  // https://github.com/tc39/proposal-iterator-helpers
@@ -6905,35 +7132,42 @@ function sampleGlobals(globalObject, newPropertyNames) {
6905
7132
  * Moderate enablements are usually good enough for legacy compat.
6906
7133
  */$h͏_once.minEnablements(minEnablements);
6907
7134
  const moderateEnablements = {
7135
+ ...minEnablements,
7136
+
6908
7137
  '%ObjectPrototype%': {
6909
- toString: true,
7138
+ ...minEnablements['%ObjectPrototype%'],
6910
7139
  valueOf: true,
6911
7140
  },
6912
7141
 
6913
- '%ArrayPrototype%': {
6914
- toString: true,
6915
- push: true, // set by "Google Analytics"
6916
- concat: true, // set by mobx generated code (old TS compiler?)
6917
- [iteratorSymbol]: true // set by mobx generated code (old TS compiler?)
6918
- },
6919
-
6920
7142
  // Function.prototype has no 'prototype' property to enable.
6921
7143
  // Function instances have their own 'name' and 'length' properties
6922
7144
  // which are configurable and non-writable. Thus, they are already
6923
7145
  // non-assignable anyway.
6924
7146
  '%FunctionPrototype%': {
7147
+ ...minEnablements['%FunctionPrototype%'],
6925
7148
  constructor: true, // set by "regenerator-runtime"
6926
- bind: true, // set by "underscore", "express"
6927
- toString: true // set by "rollup"
7149
+ bind: true // set by "underscore", "express"
6928
7150
  },
6929
7151
 
6930
7152
  '%ErrorPrototype%': {
7153
+ ...minEnablements['%ErrorPrototype%'],
6931
7154
  constructor: true, // set by "fast-json-patch", "node-fetch"
6932
7155
  message: true,
6933
- name: true, // set by "precond", "ava", "node-fetch", "node 14"
6934
7156
  toString: true // set by "bluebird"
6935
7157
  },
6936
7158
 
7159
+ '%IteratorPrototype%': {
7160
+ ...minEnablements['%IteratorPrototype%'],
7161
+ [iteratorSymbol]: true // is sometimes used in custom iterators and generators implementations eg. @rive-app/canvas
7162
+ },
7163
+
7164
+ '%ArrayPrototype%': {
7165
+ toString: true,
7166
+ push: true, // set by "Google Analytics"
7167
+ concat: true, // set by mobx generated code (old TS compiler?)
7168
+ [iteratorSymbol]: true // set by mobx generated code (old TS compiler?)
7169
+ },
7170
+
6937
7171
  '%TypeErrorPrototype%': {
6938
7172
  constructor: true, // set by "readable-stream"
6939
7173
  message: true, // set by "tape"
@@ -6982,14 +7216,6 @@ function sampleGlobals(globalObject, newPropertyNames) {
6982
7216
  name: true,
6983
7217
  toString: true,
6984
7218
  },
6985
-
6986
- '%IteratorPrototype%': {
6987
- toString: true,
6988
- // https://github.com/tc39/proposal-iterator-helpers
6989
- constructor: true,
6990
- // https://github.com/tc39/proposal-iterator-helpers
6991
- [toStringTagSymbol]: true,
6992
- },
6993
7219
  };
6994
7220
 
6995
7221
  /**
@@ -7058,7 +7284,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
7058
7284
  };$h͏_once.severeEnablements(severeEnablements);
7059
7285
  })()
7060
7286
  ,
7061
- // === 24. ses ./src/enable-property-overrides.js ===
7287
+ // === 25. ses ./src/enable-property-overrides.js ===
7062
7288
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,isPrimitive,hasOwn,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h͏_imports([["./commons.js", [["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]]]],["./enablements.js", [["minEnablements",[$h͏_a => (minEnablements = $h͏_a)]],["moderateEnablements",[$h͏_a => (moderateEnablements = $h͏_a)]],["severeEnablements",[$h͏_a => (severeEnablements = $h͏_a)]]]]]);
7063
7289
 
7064
7290
 
@@ -7272,7 +7498,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
7272
7498
  }$h͏_once.default( enablePropertyOverrides);
7273
7499
  })()
7274
7500
  ,
7275
- // === 25. ses ./src/tame-locale-methods.js ===
7501
+ // === 26. ses ./src/tame-locale-methods.js ===
7276
7502
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Number,String,TypeError,defineProperty,getOwnPropertyNames,isPrimitive,regexpExec,assert;$h͏_imports([["./commons.js", [["Number",[$h͏_a => (Number = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
7277
7503
 
7278
7504
 
@@ -7353,7 +7579,7 @@ const numberToString = tamedMethods.toString;
7353
7579
  }$h͏_once.default( tameLocaleMethods);
7354
7580
  })()
7355
7581
  ,
7356
- // === 26. ses ./src/make-eval-function.js ===
7582
+ // === 27. ses ./src/make-eval-function.js ===
7357
7583
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/**
7358
7584
  * makeEvalFunction()
7359
7585
  * A safe version of the native eval function which relies on
@@ -7384,7 +7610,7 @@ const numberToString = tamedMethods.toString;
7384
7610
  };$h͏_once.makeEvalFunction(makeEvalFunction);
7385
7611
  })()
7386
7612
  ,
7387
- // === 27. ses ./src/make-function-constructor.js ===
7613
+ // === 28. ses ./src/make-function-constructor.js ===
7388
7614
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,arrayJoin,arrayPop,defineProperties,getPrototypeOf,assert;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
7389
7615
 
7390
7616
 
@@ -7466,7 +7692,7 @@ const { Fail } = assert;
7466
7692
  };$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
7467
7693
  })()
7468
7694
  ,
7469
- // === 28. ses ./src/global-object.js ===
7695
+ // === 29. ses ./src/global-object.js ===
7470
7696
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,assign,create,defineProperty,entries,freeze,hasOwn,unscopablesSymbol,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h͏_imports([["./commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["unscopablesSymbol",[$h͏_a => (unscopablesSymbol = $h͏_a)]]]],["./make-eval-function.js", [["makeEvalFunction",[$h͏_a => (makeEvalFunction = $h͏_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor",[$h͏_a => (makeFunctionConstructor = $h͏_a)]]]],["./permits.js", [["constantProperties",[$h͏_a => (constantProperties = $h͏_a)]],["universalPropertyNames",[$h͏_a => (universalPropertyNames = $h͏_a)]]]]]);
7471
7697
 
7472
7698
 
@@ -7644,7 +7870,7 @@ const { Fail } = assert;
7644
7870
  };$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
7645
7871
  })()
7646
7872
  ,
7647
- // === 29. ses ./src/strict-scope-terminator.js ===
7873
+ // === 30. ses ./src/strict-scope-terminator.js ===
7648
7874
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Proxy,String,TypeError,ReferenceError,create,freeze,getOwnPropertyDescriptors,assert;$h͏_imports([["./commons.js", [["Proxy",[$h͏_a => (Proxy = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["ReferenceError",[$h͏_a => (ReferenceError = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
7649
7875
 
7650
7876
 
@@ -7746,7 +7972,7 @@ const scopeProxyHandlerProperties = {
7746
7972
  );$h͏_once.strictScopeTerminator(strictScopeTerminator);
7747
7973
  })()
7748
7974
  ,
7749
- // === 30. ses ./src/sloppy-globals-scope-terminator.js ===
7975
+ // === 31. ses ./src/sloppy-globals-scope-terminator.js ===
7750
7976
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Proxy,create,freeze,getOwnPropertyDescriptors,reflectSet,strictScopeTerminatorHandler,alwaysThrowHandler;$h͏_imports([["./commons.js", [["Proxy",[$h͏_a => (Proxy = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["reflectSet",[$h͏_a => (reflectSet = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminatorHandler",[$h͏_a => (strictScopeTerminatorHandler = $h͏_a)]],["alwaysThrowHandler",[$h͏_a => (alwaysThrowHandler = $h͏_a)]]]]]);
7751
7977
 
7752
7978
 
@@ -7810,7 +8036,7 @@ const objTarget = freeze({ __proto__: null });
7810
8036
  freeze(createSloppyGlobalsScopeTerminator);
7811
8037
  })()
7812
8038
  ,
7813
- // === 31. ses ./src/eval-scope.js ===
8039
+ // === 32. ses ./src/eval-scope.js ===
7814
8040
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_EVAL,create,defineProperties,freeze,assert;$h͏_imports([["./commons.js", [["FERAL_EVAL",[$h͏_a => (FERAL_EVAL = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
7815
8041
 
7816
8042
 
@@ -7902,7 +8128,7 @@ const { Fail } = assert;
7902
8128
  };$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
7903
8129
  })()
7904
8130
  ,
7905
- // === 32. ses ./src/get-source-url.js ===
8131
+ // === 33. ses ./src/get-source-url.js ===
7906
8132
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,regexpExec,stringSlice;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]]]]]);
7907
8133
 
7908
8134
  // Captures a key and value of the form #key=value or @key=value
@@ -7955,8 +8181,9 @@ const sourceMetaEntriesRegExp = new FERAL_REG_EXP(
7955
8181
  };$h͏_once.getSourceURL(getSourceURL);
7956
8182
  })()
7957
8183
  ,
7958
- // === 33. ses ./src/transforms.js ===
7959
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,freeze,getSourceURL;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["SyntaxError",[$h͏_a => (SyntaxError = $h͏_a)]],["stringReplace",[$h͏_a => (stringReplace = $h͏_a)]],["stringSearch",[$h͏_a => (stringSearch = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]]]],["./get-source-url.js", [["getSourceURL",[$h͏_a => (getSourceURL = $h͏_a)]]]]]);
8184
+ // === 34. ses ./src/transforms.js ===
8185
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_REG_EXP,SyntaxError,regexpReplace,sealRegexp,stringSearch,stringSlice,stringSplit,freeze,getSourceURL;$h͏_imports([["./commons.js", [["FERAL_REG_EXP",[$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["SyntaxError",[$h͏_a => (SyntaxError = $h͏_a)]],["regexpReplace",[$h͏_a => (regexpReplace = $h͏_a)]],["sealRegexp",[$h͏_a => (sealRegexp = $h͏_a)]],["stringSearch",[$h͏_a => (stringSearch = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]]]],["./get-source-url.js", [["getSourceURL",[$h͏_a => (getSourceURL = $h͏_a)]]]]]);
8186
+
7960
8187
 
7961
8188
 
7962
8189
 
@@ -7993,7 +8220,9 @@ function getLineNumber(src, pattern) {
7993
8220
 
7994
8221
  // /////////////////////////////////////////////////////////////////////////////
7995
8222
 
7996
- const htmlCommentPattern = new FERAL_REG_EXP(`(?:${'<'}!--|--${'>'})`, 'g');
8223
+ const htmlCommentPattern = sealRegexp(
8224
+ new FERAL_REG_EXP(`(?:${'<'}!--|--${'>'})`, 'g'),
8225
+ );
7997
8226
 
7998
8227
  /**
7999
8228
  * Conservatively reject the source text if it may contain text that some
@@ -8058,14 +8287,13 @@ const htmlCommentPattern = new FERAL_REG_EXP(`(?:${'<'}!--|--${'>'})`, 'g');
8058
8287
  */$h͏_once.rejectHtmlComments(rejectHtmlComments);
8059
8288
  const evadeHtmlCommentTest = src => {
8060
8289
  const replaceFn = match => (match[0] === '<' ? '< ! --' : '-- >');
8061
- return stringReplace(src, htmlCommentPattern, replaceFn);
8290
+ return regexpReplace(htmlCommentPattern, src, replaceFn);
8062
8291
  };
8063
8292
 
8064
8293
  // /////////////////////////////////////////////////////////////////////////////
8065
8294
  $h͏_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
8066
- const importPattern = new FERAL_REG_EXP(
8067
- '(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
8068
- 'g',
8295
+ const importPattern = sealRegexp(
8296
+ new FERAL_REG_EXP('(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))', 'g'),
8069
8297
  );
8070
8298
 
8071
8299
  /**
@@ -8128,7 +8356,7 @@ const importPattern = new FERAL_REG_EXP(
8128
8356
  */$h͏_once.rejectImportExpressions(rejectImportExpressions);
8129
8357
  const evadeImportExpressionTest = src => {
8130
8358
  const replaceFn = (_, p1, p2) => `${p1}__import__${p2}`;
8131
- return stringReplace(src, importPattern, replaceFn);
8359
+ return regexpReplace(importPattern, src, replaceFn);
8132
8360
  };
8133
8361
 
8134
8362
  // /////////////////////////////////////////////////////////////////////////////
@@ -8225,8 +8453,10 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
8225
8453
  });$h͏_once.transforms(transforms);
8226
8454
  })()
8227
8455
  ,
8228
- // === 34. ses ./src/scope-constants.js ===
8229
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,hasOwn,regexpTest;$h͏_imports([["./commons.js", [["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes",[$h͏_a => (arrayIncludes = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["regexpTest",[$h͏_a => (regexpTest = $h͏_a)]]]]]);
8456
+ // === 35. ses ./src/scope-constants.js ===
8457
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,hasOwn,regexpExec,Set,setHas;$h͏_imports([["./commons.js", [["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes",[$h͏_a => (arrayIncludes = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["Set",[$h͏_a => (Set = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]]]]]);
8458
+
8459
+
8230
8460
 
8231
8461
 
8232
8462
 
@@ -8236,11 +8466,12 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
8236
8466
 
8237
8467
 
8238
8468
  /**
8239
- * keywords
8240
- * In JavaScript you cannot use these reserved words as variables.
8241
- * See 11.6.1 Identifier Names
8469
+ * reservedNames
8470
+ * In JavaScript you cannot use reserved words as variable names (except for
8471
+ * "eval", which is specially reserved to prevent shadowing).
8472
+ * https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#sec-identifier-names
8242
8473
  */
8243
- const keywords = [
8474
+ const reservedNames = new Set([
8244
8475
  // 11.6.2.1 Keywords
8245
8476
  'await',
8246
8477
  'break',
@@ -8301,7 +8532,10 @@ const keywords = [
8301
8532
 
8302
8533
  'this',
8303
8534
  'arguments',
8304
- ];
8535
+
8536
+ // Reserved by us
8537
+ 'eval',
8538
+ ]);
8305
8539
 
8306
8540
  /**
8307
8541
  * identifierPattern
@@ -8317,24 +8551,12 @@ const identifierPattern = /^[a-zA-Z_$][\w$]*$/;
8317
8551
 
8318
8552
  /**
8319
8553
  * isValidIdentifierName()
8320
- * What variable names might it bring into scope? These include all
8321
- * property names which can be variable names, including the names
8322
- * of inherited properties. It excludes symbols and names which are
8323
- * keywords. We drop symbols safely. Currently, this shim refuses
8324
- * service if any of the names are keywords or keyword-like. This is
8325
- * safe and only prevent performance optimization.
8554
+ * Is a value allowed as an arbitrary identifier name?
8326
8555
  *
8327
8556
  * @param {string} name
8328
8557
  */
8329
- const isValidIdentifierName = name => {
8330
- // Ensure we have a valid identifier. We use regexpTest rather than
8331
- // /../.test() to guard against the case where RegExp has been poisoned.
8332
- return (
8333
- name !== 'eval' &&
8334
- !arrayIncludes(keywords, name) &&
8335
- regexpTest(identifierPattern, name)
8336
- );
8337
- };
8558
+ const isValidIdentifierName = name =>
8559
+ !setHas(reservedNames, name) && !!regexpExec(identifierPattern, name);
8338
8560
 
8339
8561
  /*
8340
8562
  * isImmutableDataProperty
@@ -8365,12 +8587,12 @@ function isImmutableDataProperty(obj, name) {
8365
8587
 
8366
8588
  /**
8367
8589
  * getScopeConstants()
8368
- * What variable names might it bring into scope? These include all
8590
+ * What variable names might be brought into scope? These include all
8369
8591
  * property names which can be variable names, including the names
8370
8592
  * of inherited properties. It excludes symbols and names which are
8371
8593
  * keywords. We drop symbols safely. Currently, this shim refuses
8372
8594
  * service if any of the names are keywords or keyword-like. This is
8373
- * safe and only prevent performance optimization.
8595
+ * safe and only affects performance optimization.
8374
8596
  *
8375
8597
  * @param {object} globalObject
8376
8598
  * @param {object} moduleLexicals
@@ -8408,7 +8630,7 @@ function isImmutableDataProperty(obj, name) {
8408
8630
  };$h͏_once.getScopeConstants(getScopeConstants);
8409
8631
  })()
8410
8632
  ,
8411
- // === 35. ses ./src/make-evaluate.js ===
8633
+ // === 36. ses ./src/make-evaluate.js ===
8412
8634
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,arrayJoin,apply,getScopeConstants;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]]]],["./scope-constants.js", [["getScopeConstants",[$h͏_a => (getScopeConstants = $h͏_a)]]]]]);
8413
8635
 
8414
8636
 
@@ -8521,7 +8743,7 @@ function buildOptimizer(constants, name) {
8521
8743
  };$h͏_once.makeEvaluate(makeEvaluate);
8522
8744
  })()
8523
8745
  ,
8524
- // === 36. ses ./src/make-safe-evaluator.js ===
8746
+ // === 37. ses ./src/make-safe-evaluator.js ===
8525
8747
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let apply,arrayFlatMap,freeze,identity,strictScopeTerminator,createSloppyGlobalsScopeTerminator,makeEvalScopeKit,applyTransforms,mandatoryTransforms,makeEvaluate,assert;$h͏_imports([["./commons.js", [["apply",[$h͏_a => (apply = $h͏_a)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["identity",[$h͏_a => (identity = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminator",[$h͏_a => (strictScopeTerminator = $h͏_a)]]]],["./sloppy-globals-scope-terminator.js", [["createSloppyGlobalsScopeTerminator",[$h͏_a => (createSloppyGlobalsScopeTerminator = $h͏_a)]]]],["./eval-scope.js", [["makeEvalScopeKit",[$h͏_a => (makeEvalScopeKit = $h͏_a)]]]],["./transforms.js", [["applyTransforms",[$h͏_a => (applyTransforms = $h͏_a)]],["mandatoryTransforms",[$h͏_a => (mandatoryTransforms = $h͏_a)]]]],["./make-evaluate.js", [["makeEvaluate",[$h͏_a => (makeEvaluate = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
8526
8748
 
8527
8749
 
@@ -8636,7 +8858,7 @@ const { Fail } = assert;
8636
8858
  };$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
8637
8859
  })()
8638
8860
  ,
8639
- // === 37. ses ./src/tame-function-tostring.js ===
8861
+ // === 38. ses ./src/tame-function-tostring.js ===
8640
8862
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let WeakSet,defineProperty,freeze,functionPrototype,functionToString,stringEndsWith,weaksetAdd,weaksetHas;$h͏_imports([["./commons.js", [["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["functionPrototype",[$h͏_a => (functionPrototype = $h͏_a)]],["functionToString",[$h͏_a => (functionToString = $h͏_a)]],["stringEndsWith",[$h͏_a => (stringEndsWith = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]]]]]);
8641
8863
 
8642
8864
 
@@ -8689,7 +8911,7 @@ let markVirtualizedNativeFunction;
8689
8911
  };$h͏_once.tameFunctionToString(tameFunctionToString);
8690
8912
  })()
8691
8913
  ,
8692
- // === 38. ses ./src/tame-domains.js ===
8914
+ // === 39. ses ./src/tame-domains.js ===
8693
8915
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,globalThis,getOwnPropertyDescriptor,defineProperty;$h͏_imports([["./commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]]]]]);Object.defineProperty(tameDomains,'name',{value:"tameDomains"});$h͏_once.tameDomains(tameDomains);
8694
8916
 
8695
8917
 
@@ -8733,7 +8955,7 @@ let markVirtualizedNativeFunction;
8733
8955
  }
8734
8956
  })()
8735
8957
  ,
8736
- // === 39. ses ./src/tame-module-source.js ===
8958
+ // === 40. ses ./src/tame-module-source.js ===
8737
8959
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let functionPrototype,getPrototypeOf,globalThis,objectPrototype,setPrototypeOf;$h͏_imports([["./commons.js", [["functionPrototype",[$h͏_a => (functionPrototype = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]],["setPrototypeOf",[$h͏_a => (setPrototypeOf = $h͏_a)]]]]]);
8738
8960
 
8739
8961
 
@@ -8787,7 +9009,7 @@ let markVirtualizedNativeFunction;
8787
9009
  };$h͏_once.tameModuleSource(tameModuleSource);
8788
9010
  })()
8789
9011
  ,
8790
- // === 40. ses ./src/error/console.js ===
9012
+ // === 41. ses ./src/error/console.js ===
8791
9013
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let WeakSet,arrayFilter,arrayFlatMap,arrayMap,arrayPop,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,stringIncludes,stringSplit,weaksetAdd,weaksetHas;$h͏_imports([["../commons.js", [["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["stringEndsWith",[$h͏_a => (stringEndsWith = $h͏_a)]],["stringIncludes",[$h͏_a => (stringIncludes = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]]]]]);
8792
9014
 
8793
9015
 
@@ -9331,7 +9553,7 @@ freeze(defineCausalConsoleFromLogger);
9331
9553
  freeze(filterConsole);
9332
9554
  })()
9333
9555
  ,
9334
- // === 41. ses ./src/error/unhandled-rejection.js ===
9556
+ // === 42. ses ./src/error/unhandled-rejection.js ===
9335
9557
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FinalizationRegistry,Map,mapGet,mapDelete,WeakMap,mapSet,finalizationRegistryRegister,weakmapSet,weakmapGet,mapEntries,mapHas;$h͏_imports([["../commons.js", [["FinalizationRegistry",[$h͏_a => (FinalizationRegistry = $h͏_a)]],["Map",[$h͏_a => (Map = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapDelete",[$h͏_a => (mapDelete = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["finalizationRegistryRegister",[$h͏_a => (finalizationRegistryRegister = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["mapEntries",[$h͏_a => (mapEntries = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]]]]]);
9336
9558
 
9337
9559
 
@@ -9456,7 +9678,7 @@ freeze(filterConsole);
9456
9678
  };$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
9457
9679
  })()
9458
9680
  ,
9459
- // === 42. ses ./src/error/tame-console.js ===
9681
+ // === 43. ses ./src/error/tame-console.js ===
9460
9682
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,apply,defineProperty,freeze,globalThis,defaultHandler,makeCausalConsole,makeRejectionHandlers;$h͏_imports([["../commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./assert.js", [["loggedErrorHandler",[$h͏_a => (defaultHandler = $h͏_a)]]]],["./console.js", [["makeCausalConsole",[$h͏_a => (makeCausalConsole = $h͏_a)]]]],["./unhandled-rejection.js", [["makeRejectionHandlers",[$h͏_a => (makeRejectionHandlers = $h͏_a)]]]]]);
9461
9683
 
9462
9684
 
@@ -9656,9 +9878,8 @@ const wrapLogger = (logger, thisArg) =>
9656
9878
  };$h͏_once.tameConsole(tameConsole);
9657
9879
  })()
9658
9880
  ,
9659
- // === 43. ses ./src/error/tame-v8-error-constructor.js ===
9660
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,TypeError;$h͏_imports([["../commons.js", [["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arraySlice",[$h͏_a => (arraySlice = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["reflectSet",[$h͏_a => (reflectSet = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["regexpTest",[$h͏_a => (regexpTest = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]]]]]);
9661
-
9881
+ // === 44. ses ./src/error/tame-v8-error-constructor.js ===
9882
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,TypeError;$h͏_imports([["../commons.js", [["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arraySlice",[$h͏_a => (arraySlice = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["reflectSet",[$h͏_a => (reflectSet = $h͏_a)]],["regexpExec",[$h͏_a => (regexpExec = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]]]]]);
9662
9883
 
9663
9884
 
9664
9885
 
@@ -9761,12 +9982,12 @@ const FILENAME_CENSORS = [
9761
9982
  // Exported only so it can be unit tested.
9762
9983
  // TODO Move so that it applies not just to v8.
9763
9984
  const filterFileName = fileName => {
9764
- if (!fileName) {
9765
- // Stack frames with no fileName should appear in concise stack traces.
9766
- return true;
9985
+ if (fileName === null) {
9986
+ // Seems to suppress builtins like `Array.every (<anonymous>)`
9987
+ return false;
9767
9988
  }
9768
9989
  for (const filter of FILENAME_CENSORS) {
9769
- if (regexpTest(filter, fileName)) {
9990
+ if (regexpExec(filter, fileName)) {
9770
9991
  return false;
9771
9992
  }
9772
9993
  }
@@ -9777,9 +9998,9 @@ const FILENAME_CENSORS = [
9777
9998
  // likely url-path prefix, ending in a `/.../` should get dropped.
9778
9999
  // Anything to the left of the likely path text is kept.
9779
10000
  // Everything to the right of `/.../` is kept. Thus
9780
- // `'Object.bar (/vat-v1/.../eventual-send/test/deep-send.test.js:13:21)'`
10001
+ // `'Object.bar (/vat-v1/.../errors/test/deep-send.test.js:13:21)'`
9781
10002
  // simplifies to
9782
- // `'Object.bar (eventual-send/test/deep-send.test.js:13:21)'`.
10003
+ // `'Object.bar (errors/test/deep-send.test.js:13:21)'`.
9783
10004
  //
9784
10005
  // See thread starting at
9785
10006
  // https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
@@ -9789,9 +10010,9 @@ $h͏_once.filterFileName(filterFileName);const CALLSITE_ELLIPSIS_PATTERN1=/^((?:
9789
10010
  // likely url-path prefix consisting of `.../` should get dropped.
9790
10011
  // Anything to the left of the likely path text is kept.
9791
10012
  // Everything to the right of `.../` is kept. Thus
9792
- // `'Object.bar (.../eventual-send/test/deep-send.test.js:13:21)'`
10013
+ // `'Object.bar (.../errors/test/deep-send.test.js:13:21)'`
9793
10014
  // simplifies to
9794
- // `'Object.bar (eventual-send/test/deep-send.test.js:13:21)'`.
10015
+ // `'Object.bar (errors/test/deep-send.test.js:13:21)'`.
9795
10016
  //
9796
10017
  // See thread starting at
9797
10018
  // https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
@@ -9802,9 +10023,9 @@ const CALLSITE_ELLIPSIS_PATTERN2 = /^((?:.*[( ])?)\.\.\.\/(.+)$/;
9802
10023
  // dropped.
9803
10024
  // Anything to the left of the likely path prefix text is kept. `package/` and
9804
10025
  // everything to its right is kept. Thus
9805
- // `'Object.bar (/Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/eventual-send/test/deep-send.test.js:13:21)'`
10026
+ // `'Object.bar (/Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/errors/test/deep-send.test.js:13:21)'`
9806
10027
  // simplifies to
9807
- // `'Object.bar (packages/eventual-send/test/deep-send.test.js:13:21)'`.
10028
+ // `'Object.bar (packages/errors/test/deep-send.test.js:13:21)'`.
9808
10029
  // Note that `/packages/` is a convention for monorepos encouraged by
9809
10030
  // lerna.
9810
10031
  const CALLSITE_PACKAGES_PATTERN = /^((?:.*[( ])?)[:/\w_-]*\/(packages\/.+)$/;
@@ -9814,7 +10035,7 @@ const CALLSITE_PACKAGES_PATTERN = /^((?:.*[( ])?)[:/\w_-]*\/(packages\/.+)$/;
9814
10035
  // dropped.
9815
10036
  // Anything to the left of the likely path prefix text is kept. Everything to
9816
10037
  // the right of `file://` is kept. Thus
9817
- // `'Object.bar (file:///Users/markmiller/src/ongithub/endojs/endo/packages/eventual-send/test/deep-send.test.js:13:21)'` is unchanged but
10038
+ // `'Object.bar (file:///Users/markmiller/src/ongithub/endojs/endo/packages/errors/test/deep-send.test.js:13:21)'` is unchanged but
9818
10039
  // `'Object.bar (file://test/deep-send.test.js:13:21)'`
9819
10040
 
9820
10041
  // simplifies to
@@ -9880,6 +10101,10 @@ const CALLSITE_PATTERNS = [
9880
10101
  // const callSiteFilter = _callSite => true;
9881
10102
  const callSiteFilter = callSite => {
9882
10103
  if (omitFrames) {
10104
+ // eslint-disable-next-line @endo/no-polymorphic-call
10105
+ if (callSite.getFunctionName()?.startsWith('__HIDE_')) {
10106
+ return false;
10107
+ }
9883
10108
  // eslint-disable-next-line @endo/no-polymorphic-call
9884
10109
  return filterFileName(callSite.getFileName());
9885
10110
  }
@@ -10045,7 +10270,7 @@ const CALLSITE_PATTERNS = [
10045
10270
  };$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
10046
10271
  })()
10047
10272
  ,
10048
- // === 44. ses ./src/error/tame-error-constructor.js ===
10273
+ // === 45. ses ./src/error/tame-error-constructor.js ===
10049
10274
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_ERROR,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,defineProperty,getOwnPropertyDescriptors,NativeErrors,tameV8ErrorConstructor;$h͏_imports([["../commons.js", [["FERAL_ERROR",[$h͏_a => (FERAL_ERROR = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["construct",[$h͏_a => (construct = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["setPrototypeOf",[$h͏_a => (setPrototypeOf = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["../permits.js", [["NativeErrors",[$h͏_a => (NativeErrors = $h͏_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor",[$h͏_a => (tameV8ErrorConstructor = $h͏_a)]]]]]);
10050
10275
 
10051
10276
 
@@ -10332,7 +10557,7 @@ let initialGetStackString = tamedMethods.getStackString;
10332
10557
  }$h͏_once.default( tameErrorConstructor);
10333
10558
  })()
10334
10559
  ,
10335
- // === 45. ses ./src/module-load.js ===
10560
+ // === 46. ses ./src/module-load.js ===
10336
10561
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getenv,Map,Set,TypeError,arrayJoin,arrayMap,arrayPush,arraySome,create,freeze,generatorNext,generatorThrow,getOwnPropertyNames,isArray,isPrimitive,mapGet,mapHas,mapSet,promiseThen,setAdd,values,weakmapGet,weakmapHas,makeError,annotateError,q,b,X;$h͏_imports([["@endo/env-options", [["getEnvironmentOption",[$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["Map",[$h͏_a => (Map = $h͏_a)]],["Set",[$h͏_a => (Set = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["arraySome",[$h͏_a => (arraySome = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["generatorNext",[$h͏_a => (generatorNext = $h͏_a)]],["generatorThrow",[$h͏_a => (generatorThrow = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["promiseThen",[$h͏_a => (promiseThen = $h͏_a)]],["setAdd",[$h͏_a => (setAdd = $h͏_a)]],["values",[$h͏_a => (values = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas",[$h͏_a => (weakmapHas = $h͏_a)]]]],["./error/assert.js", [["makeError",[$h͏_a => (makeError = $h͏_a)]],["annotateError",[$h͏_a => (annotateError = $h͏_a)]],["q",[$h͏_a => (q = $h͏_a)]],["b",[$h͏_a => (b = $h͏_a)]],["X",[$h͏_a => (X = $h͏_a)]]]]]);
10337
10562
 
10338
10563
 
@@ -10845,7 +11070,7 @@ const memoizedLoadWithErrorAnnotation = (
10845
11070
  /**
10846
11071
  * If `aggregateErrors` is `false`, the `errors` property of the fulfilled object
10847
11072
  * will always be empty.
10848
- * @param {{errors?: Error[], noAggregateErrors?: boolean}} [options]
11073
+ * @param {{errors?: Error[], noAggregateErrors?: boolean | undefined}} [options]
10849
11074
  */
10850
11075
  const asyncJobQueue = ({ errors = [], noAggregateErrors = false } = {}) => {
10851
11076
  /** @type {Set<Promise<undefined>>} */
@@ -10887,7 +11112,7 @@ const asyncJobQueue = ({ errors = [], noAggregateErrors = false } = {}) => {
10887
11112
  /**
10888
11113
  * If `aggregateErrors` is `false`, the `errors` property of the returned object
10889
11114
  * will always be empty.
10890
- * @param {{errors?: Error[], noAggregateErrors?: boolean}} [options]
11115
+ * @param {{errors?: Error[], noAggregateErrors?: boolean | undefined}} [options]
10891
11116
  */
10892
11117
  const syncJobQueue = ({ errors = [], noAggregateErrors = false } = {}) => {
10893
11118
  let current = [];
@@ -10960,7 +11185,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
10960
11185
  * @param {WeakMap<object, object>} moduleAliases
10961
11186
  * @param {Compartment} compartment
10962
11187
  * @param {string} moduleSpecifier - The module specifier to load.
10963
- * @param {{ noAggregateErrors?: boolean}} options
11188
+ * @param {{ noAggregateErrors?: boolean | undefined}} options
10964
11189
  */
10965
11190
  const load = async (
10966
11191
  compartmentPrivateFields,
@@ -11011,7 +11236,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
11011
11236
  * @param {WeakMap<object, object>} moduleAliases
11012
11237
  * @param {Compartment} compartment
11013
11238
  * @param {string} moduleSpecifier - The module specifier to load.
11014
- * @param {{ noAggregateErrors?: boolean}} options
11239
+ * @param {{ noAggregateErrors?: boolean | undefined}} options
11015
11240
  */$h͏_once.load(load);
11016
11241
 
11017
11242
  const loadNow = (
@@ -11054,7 +11279,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
11054
11279
  };$h͏_once.loadNow(loadNow);
11055
11280
  })()
11056
11281
  ,
11057
- // === 46. ses ./src/module-proxy.js ===
11282
+ // === 47. ses ./src/module-proxy.js ===
11058
11283
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,toStringTagSymbol,weakmapSet,assert;$h͏_imports([["./module-load.js", [["makeAlias",[$h͏_a => (makeAlias = $h͏_a)]]]],["./commons.js", [["Proxy",[$h͏_a => (Proxy = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["reflectGet",[$h͏_a => (reflectGet = $h͏_a)]],["reflectGetOwnPropertyDescriptor",[$h͏_a => (reflectGetOwnPropertyDescriptor = $h͏_a)]],["reflectHas",[$h͏_a => (reflectHas = $h͏_a)]],["reflectIsExtensible",[$h͏_a => (reflectIsExtensible = $h͏_a)]],["reflectPreventExtensions",[$h͏_a => (reflectPreventExtensions = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
11059
11284
 
11060
11285
 
@@ -11257,7 +11482,7 @@ const { quote: q } = assert;
11257
11482
  };$h͏_once.getDeferredExports(getDeferredExports);
11258
11483
  })()
11259
11484
  ,
11260
- // === 47. ses ./src/compartment-evaluate.js ===
11485
+ // === 48. ses ./src/compartment-evaluate.js ===
11261
11486
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let TypeError,arrayPush,create,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h͏_imports([["./commons.js", [["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["./transforms.js", [["evadeHtmlCommentTest",[$h͏_a => (evadeHtmlCommentTest = $h͏_a)]],["evadeImportExpressionTest",[$h͏_a => (evadeImportExpressionTest = $h͏_a)]],["rejectSomeDirectEvalExpressions",[$h͏_a => (rejectSomeDirectEvalExpressions = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator",[$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
11262
11487
 
11263
11488
 
@@ -11353,7 +11578,7 @@ const { quote: q } = assert;
11353
11578
  };$h͏_once.compartmentEvaluate(compartmentEvaluate);
11354
11579
  })()
11355
11580
  ,
11356
- // === 48. ses ./src/module-instance.js ===
11581
+ // === 49. ses ./src/module-instance.js ===
11357
11582
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,reflectHas,assign,compartmentEvaluate;$h͏_imports([["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports",[$h͏_a => (getDeferredExports = $h͏_a)]]]],["./commons.js", [["ReferenceError",[$h͏_a => (ReferenceError = $h͏_a)]],["SyntaxError",[$h͏_a => (SyntaxError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]],["arrayIncludes",[$h͏_a => (arrayIncludes = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["arraySome",[$h͏_a => (arraySome = $h͏_a)]],["arraySort",[$h͏_a => (arraySort = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["keys",[$h͏_a => (keys = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["reflectHas",[$h͏_a => (reflectHas = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate",[$h͏_a => (compartmentEvaluate = $h͏_a)]]]]]);
11358
11583
 
11359
11584
 
@@ -11710,6 +11935,25 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
11710
11935
  };
11711
11936
  notifiers['*'] = notifyStar;
11712
11937
 
11938
+ const wireUpExportNotifier = (exportName, notify) => {
11939
+ if (!notifiers[exportName] && notify !== false) {
11940
+ notifiers[exportName] = notify;
11941
+
11942
+ // exported live binding state
11943
+ let value;
11944
+ const update = newValue => (value = newValue);
11945
+ notify(update);
11946
+ exportsProps[exportName] = {
11947
+ get() {
11948
+ return value;
11949
+ },
11950
+ set: undefined,
11951
+ enumerable: true,
11952
+ configurable: false,
11953
+ };
11954
+ }
11955
+ };
11956
+
11713
11957
  // Per the calling convention for the moduleFunctor generated from
11714
11958
  // an ESM, the `imports` function gets called once up front
11715
11959
  // to populate or arrange the population of imports and reexports.
@@ -11763,30 +12007,15 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
11763
12007
  }
11764
12008
  }
11765
12009
  if (reexportMap[specifier]) {
11766
- // Make named reexports candidates too.
12010
+ // Set up reexport notifiers instantly so they are available in cycles.
11767
12011
  for (const [localName, exportedName] of reexportMap[specifier]) {
11768
- candidateAll[exportedName] = importNotifiers[localName];
12012
+ wireUpExportNotifier(exportedName, importNotifiers[localName]);
11769
12013
  }
11770
12014
  }
11771
12015
  }
11772
12016
 
11773
12017
  for (const [exportName, notify] of entries(candidateAll)) {
11774
- if (!notifiers[exportName] && notify !== false) {
11775
- notifiers[exportName] = notify;
11776
-
11777
- // exported live binding state
11778
- let value;
11779
- const update = newValue => (value = newValue);
11780
- notify(update);
11781
- exportsProps[exportName] = {
11782
- get() {
11783
- return value;
11784
- },
11785
- set: undefined,
11786
- enumerable: true,
11787
- configurable: false,
11788
- };
11789
- }
12018
+ wireUpExportNotifier(exportName, notify);
11790
12019
  }
11791
12020
 
11792
12021
  // Sort the module exports namespace as per spec.
@@ -11853,7 +12082,7 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
11853
12082
  };$h͏_once.makeModuleInstance(makeModuleInstance);
11854
12083
  })()
11855
12084
  ,
11856
- // === 49. ses ./src/module-link.js ===
12085
+ // === 50. ses ./src/module-link.js ===
11857
12086
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let assert,makeModuleInstance,makeVirtualModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isPrimitive,mapGet,mapHas,mapSet,weakmapGet;$h͏_imports([["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]],["./module-instance.js", [["makeModuleInstance",[$h͏_a => (makeModuleInstance = $h͏_a)]],["makeVirtualModuleInstance",[$h͏_a => (makeVirtualModuleInstance = $h͏_a)]]]],["./commons.js", [["Map",[$h͏_a => (Map = $h͏_a)]],["ReferenceError",[$h͏_a => (ReferenceError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["isPrimitive",[$h͏_a => (isPrimitive = $h͏_a)]],["mapGet",[$h͏_a => (mapGet = $h͏_a)]],["mapHas",[$h͏_a => (mapHas = $h͏_a)]],["mapSet",[$h͏_a => (mapSet = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]]]]]);
11858
12087
 
11859
12088
 
@@ -12015,7 +12244,7 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
12015
12244
  };$h͏_once.instantiate(instantiate);
12016
12245
  })()
12017
12246
  ,
12018
- // === 50. ses ./src/compartment.js ===
12247
+ // === 51. ses ./src/compartment.js ===
12019
12248
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Map,TypeError,WeakMap,arrayFlatMap,assign,defineProperties,identity,promiseThen,toStringTagSymbol,weakmapGet,weakmapSet,setGlobalObjectSymbolUnscopables,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,assert,assertEqual,q,sharedGlobalPropertyNames,load,loadNow,link,getDeferredExports,compartmentEvaluate,makeSafeEvaluator;$h͏_imports([["./commons.js", [["Map",[$h͏_a => (Map = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["identity",[$h͏_a => (identity = $h͏_a)]],["promiseThen",[$h͏_a => (promiseThen = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectSymbolUnscopables",[$h͏_a => (setGlobalObjectSymbolUnscopables = $h͏_a)]],["setGlobalObjectConstantProperties",[$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties",[$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators",[$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]],["assertEqual",[$h͏_a => (assertEqual = $h͏_a)]],["q",[$h͏_a => (q = $h͏_a)]]]],["./permits.js", [["sharedGlobalPropertyNames",[$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]]]],["./module-load.js", [["load",[$h͏_a => (load = $h͏_a)]],["loadNow",[$h͏_a => (loadNow = $h͏_a)]]]],["./module-link.js", [["link",[$h͏_a => (link = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports",[$h͏_a => (getDeferredExports = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate",[$h͏_a => (compartmentEvaluate = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator",[$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
12020
12249
 
12021
12250
 
@@ -12495,8 +12724,8 @@ defineProperties(InertCompartment, {
12495
12724
  };$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
12496
12725
  })()
12497
12726
  ,
12498
- // === 51. ses ./src/get-anonymous-intrinsics.js ===
12499
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,assign,AsyncGeneratorFunctionInstance,ArrayBuffer,InertCompartment;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["Float32Array",[$h͏_a => (Float32Array = $h͏_a)]],["Map",[$h͏_a => (Map = $h͏_a)]],["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["iterateArray",[$h͏_a => (iterateArray = $h͏_a)]],["iterateMap",[$h͏_a => (iterateMap = $h͏_a)]],["iterateSet",[$h͏_a => (iterateSet = $h͏_a)]],["iterateString",[$h͏_a => (iterateString = $h͏_a)]],["matchAllRegExp",[$h͏_a => (matchAllRegExp = $h͏_a)]],["matchAllSymbol",[$h͏_a => (matchAllSymbol = $h͏_a)]],["regexpPrototype",[$h͏_a => (regexpPrototype = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["AsyncGeneratorFunctionInstance",[$h͏_a => (AsyncGeneratorFunctionInstance = $h͏_a)]],["ArrayBuffer",[$h͏_a => (ArrayBuffer = $h͏_a)]]]],["./compartment.js", [["InertCompartment",[$h͏_a => (InertCompartment = $h͏_a)]]]]]);
12727
+ // === 52. ses ./src/get-anonymous-intrinsics.js ===
12728
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,FERAL_FLOAT64_ARRAY,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,assign,AsyncGeneratorFunctionInstance,ArrayBuffer,InertCompartment;$h͏_imports([["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_FLOAT64_ARRAY",[$h͏_a => (FERAL_FLOAT64_ARRAY = $h͏_a)]],["Map",[$h͏_a => (Map = $h͏_a)]],["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["iterateArray",[$h͏_a => (iterateArray = $h͏_a)]],["iterateMap",[$h͏_a => (iterateMap = $h͏_a)]],["iterateSet",[$h͏_a => (iterateSet = $h͏_a)]],["iterateString",[$h͏_a => (iterateString = $h͏_a)]],["matchAllRegExp",[$h͏_a => (matchAllRegExp = $h͏_a)]],["matchAllSymbol",[$h͏_a => (matchAllSymbol = $h͏_a)]],["regexpPrototype",[$h͏_a => (regexpPrototype = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["AsyncGeneratorFunctionInstance",[$h͏_a => (AsyncGeneratorFunctionInstance = $h͏_a)]],["ArrayBuffer",[$h͏_a => (ArrayBuffer = $h͏_a)]]]],["./compartment.js", [["InertCompartment",[$h͏_a => (InertCompartment = $h͏_a)]]]]]);
12500
12729
 
12501
12730
 
12502
12731
 
@@ -12570,7 +12799,7 @@ function makeArguments() {
12570
12799
 
12571
12800
  // 22.2.1 The %TypedArray% Intrinsic Object
12572
12801
 
12573
- const TypedArray = getPrototypeOf(Float32Array);
12802
+ const TypedArray = getPrototypeOf(FERAL_FLOAT64_ARRAY);
12574
12803
 
12575
12804
  // 23.1.5.2 The %MapIteratorPrototype% Object
12576
12805
 
@@ -12666,7 +12895,6 @@ function makeArguments() {
12666
12895
  }
12667
12896
 
12668
12897
  const ab = new ArrayBuffer(0);
12669
- // @ts-expect-error TODO How do I add sliceToImmutable to ArrayBuffer type?
12670
12898
  // eslint-disable-next-line @endo/no-polymorphic-call
12671
12899
  const iab = ab.sliceToImmutable();
12672
12900
  const iabProto = getPrototypeOf(iab);
@@ -12679,7 +12907,7 @@ function makeArguments() {
12679
12907
  };$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
12680
12908
  })()
12681
12909
  ,
12682
- // === 52. ses ./src/tame-harden.js ===
12910
+ // === 53. ses ./src/tame-harden.js ===
12683
12911
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let freeze;$h͏_imports([["./commons.js", [["freeze",[$h͏_a => (freeze = $h͏_a)]]]]]);
12684
12912
 
12685
12913
 
@@ -12711,7 +12939,7 @@ function makeArguments() {
12711
12939
  freeze(tameHarden);
12712
12940
  })()
12713
12941
  ,
12714
- // === 53. ses ./src/tame-symbol-constructor.js ===
12942
+ // === 54. ses ./src/tame-symbol-constructor.js ===
12715
12943
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Symbol,entries,fromEntries,getOwnPropertyDescriptors,defineProperties,arrayMap,functionBind;$h͏_imports([["./commons.js", [["Symbol",[$h͏_a => (Symbol = $h͏_a)]],["entries",[$h͏_a => (entries = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["functionBind",[$h͏_a => (functionBind = $h͏_a)]]]]]);
12716
12944
 
12717
12945
 
@@ -12778,7 +13006,7 @@ freeze(tameHarden);
12778
13006
  };$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
12779
13007
  })()
12780
13008
  ,
12781
- // === 54. ses ./src/tame-faux-data-properties.js ===
13009
+ // === 55. ses ./src/tame-faux-data-properties.js ===
12782
13010
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getOwnPropertyDescriptor,apply,defineProperty,toStringTagSymbol;$h͏_imports([["./commons.js", [["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
12783
13011
 
12784
13012
 
@@ -12991,7 +13219,7 @@ const throws = thunk => {
12991
13219
  };$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
12992
13220
  })()
12993
13221
  ,
12994
- // === 55. ses ./src/tame-regenerator-runtime.js ===
13222
+ // === 56. ses ./src/tame-regenerator-runtime.js ===
12995
13223
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let defineProperty,iteratorPrototype,iteratorSymbol,hasOwn;$h͏_imports([["./commons.js", [["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["iteratorPrototype",[$h͏_a => (iteratorPrototype = $h͏_a)]],["iteratorSymbol",[$h͏_a => (iteratorSymbol = $h͏_a)]],["hasOwn",[$h͏_a => (hasOwn = $h͏_a)]]]]]);
12996
13224
 
12997
13225
 
@@ -13023,7 +13251,7 @@ const throws = thunk => {
13023
13251
  };$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
13024
13252
  })()
13025
13253
  ,
13026
- // === 56. ses ./src/shim-arraybuffer-transfer.js ===
13254
+ // === 57. ses ./src/shim-arraybuffer-transfer.js ===
13027
13255
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let ArrayBuffer,arrayBufferPrototype,arrayBufferSlice,arrayBufferGetByteLength,Uint8Array,typedArraySet,globalThis,TypeError,defineProperty;$h͏_imports([["./commons.js", [["ArrayBuffer",[$h͏_a => (ArrayBuffer = $h͏_a)]],["arrayBufferPrototype",[$h͏_a => (arrayBufferPrototype = $h͏_a)]],["arrayBufferSlice",[$h͏_a => (arrayBufferSlice = $h͏_a)]],["arrayBufferGetByteLength",[$h͏_a => (arrayBufferGetByteLength = $h͏_a)]],["Uint8Array",[$h͏_a => (Uint8Array = $h͏_a)]],["typedArraySet",[$h͏_a => (typedArraySet = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]]]]]);
13028
13256
 
13029
13257
 
@@ -13111,17 +13339,49 @@ const throws = thunk => {
13111
13339
  };$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
13112
13340
  })()
13113
13341
  ,
13114
- // === 57. ses ./src/reporting.js ===
13115
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let functionBind,globalThis,assert;$h͏_imports([["./commons.js", [["functionBind",[$h͏_a => (functionBind = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
13342
+ // === 58. ses ./src/reporting.js ===
13343
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,assert;$h͏_imports([["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
13116
13344
 
13117
13345
 
13118
13346
  /**
13119
13347
  * @import {Reporter, GroupReporter} from './reporting-types.js'
13120
13348
  */
13121
13349
 
13350
+ /* eslint-disable @endo/no-polymorphic-call */
13351
+ /**
13352
+ * To address https://github.com/endojs/endo/issues/2908,
13353
+ * the `consoleReporter` uses the current `console` rather
13354
+ * than the original one.
13355
+ *
13356
+ * @type {GroupReporter}
13357
+ */
13358
+ const consoleReporter = {
13359
+ warn(...args) {
13360
+ globalThis.console.warn(...args);
13361
+ },
13362
+ error(...args) {
13363
+ globalThis.console.error(...args);
13364
+ },
13365
+ ...(globalThis.console?.groupCollapsed
13366
+ ? {
13367
+ groupCollapsed(...args) {
13368
+ globalThis.console.groupCollapsed(...args);
13369
+ },
13370
+ }
13371
+ : undefined),
13372
+ ...(globalThis.console?.groupEnd
13373
+ ? {
13374
+ groupEnd() {
13375
+ globalThis.console.groupEnd();
13376
+ },
13377
+ }
13378
+ : undefined),
13379
+ };
13380
+ /* eslint-enable @endo/no-polymorphic-call */
13381
+
13122
13382
  /**
13123
13383
  * Creates a suitable reporter for internal errors and warnings out of the
13124
- * Node.js console.error to ensure all messages to go stderr, including the
13384
+ * Node.js console.error to ensure all messages go to stderr, including the
13125
13385
  * group label.
13126
13386
  * Accounts for the extra space introduced by console.error as a delimiter
13127
13387
  * between the indent and subsequent arguments.
@@ -13165,18 +13425,22 @@ const mute = () => {};
13165
13425
  if (reporting === 'none') {
13166
13426
  return makeReportPrinter(mute);
13167
13427
  }
13168
- if (
13169
- reporting === 'console' ||
13170
- globalThis.window === globalThis ||
13171
- globalThis.importScripts !== undefined
13172
- ) {
13173
- return console;
13174
- }
13175
13428
  if (globalThis.console !== undefined) {
13429
+ if (
13430
+ reporting === 'console' || // asks for console explicitly
13431
+ globalThis.window === globalThis || // likely on browser
13432
+ globalThis.importScripts !== undefined // likely on worker
13433
+ ) {
13434
+ // reporter just delegates directly to the current console
13435
+ return consoleReporter;
13436
+ }
13437
+ assert(reporting === 'platform');
13176
13438
  // On Node.js, we send all feedback to stderr, regardless of purported level.
13177
- const console = globalThis.console;
13178
- const error = functionBind(console.error, console);
13179
- return makeReportPrinter(error);
13439
+ // This uses `consoleReporter.error` instead of `console.error` because we
13440
+ // want the constructed reporter to use the `console.error` of the current
13441
+ // `console`, not the `console` that was installed when the reporter
13442
+ // was created.
13443
+ return makeReportPrinter(consoleReporter.error);
13180
13444
  }
13181
13445
  if (globalThis.print !== undefined) {
13182
13446
  return makeReportPrinter(globalThis.print);
@@ -13219,8 +13483,10 @@ const mute = () => {};
13219
13483
  };$h͏_once.reportInGroup(reportInGroup);
13220
13484
  })()
13221
13485
  ,
13222
- // === 58. ses ./src/lockdown.js ===
13223
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,removeUnpermittedIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer,reportInGroup,chooseReporter;$h͏_imports([["@endo/env-options", [["getEnvironmentOption",[$h͏_a => (getenv = $h͏_a)]]]],["@endo/immutable-arraybuffer/shim.js", []],["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_EVAL",[$h͏_a => (FERAL_EVAL = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["noEvalEvaluate",[$h͏_a => (noEvalEvaluate = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./make-hardener.js", [["makeHardener",[$h͏_a => (makeHardener = $h͏_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector",[$h͏_a => (makeIntrinsicsCollector = $h͏_a)]]]],["./permits-intrinsics.js", [["default",[$h͏_a => (removeUnpermittedIntrinsics = $h͏_a)]]]],["./tame-function-constructors.js", [["default",[$h͏_a => (tameFunctionConstructors = $h͏_a)]]]],["./tame-date-constructor.js", [["default",[$h͏_a => (tameDateConstructor = $h͏_a)]]]],["./tame-math-object.js", [["default",[$h͏_a => (tameMathObject = $h͏_a)]]]],["./tame-regexp-constructor.js", [["default",[$h͏_a => (tameRegExpConstructor = $h͏_a)]]]],["./enable-property-overrides.js", [["default",[$h͏_a => (enablePropertyOverrides = $h͏_a)]]]],["./tame-locale-methods.js", [["default",[$h͏_a => (tameLocaleMethods = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties",[$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties",[$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators",[$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator",[$h͏_a => (makeSafeEvaluator = $h͏_a)]]]],["./permits.js", [["initialGlobalPropertyNames",[$h͏_a => (initialGlobalPropertyNames = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString",[$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./tame-domains.js", [["tameDomains",[$h͏_a => (tameDomains = $h͏_a)]]]],["./tame-module-source.js", [["tameModuleSource",[$h͏_a => (tameModuleSource = $h͏_a)]]]],["./error/tame-console.js", [["tameConsole",[$h͏_a => (tameConsole = $h͏_a)]]]],["./error/tame-error-constructor.js", [["default",[$h͏_a => (tameErrorConstructor = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]],["makeAssert",[$h͏_a => (makeAssert = $h͏_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics",[$h͏_a => (getAnonymousIntrinsics = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor",[$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-harden.js", [["tameHarden",[$h͏_a => (tameHarden = $h͏_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor",[$h͏_a => (tameSymbolConstructor = $h͏_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties",[$h͏_a => (tameFauxDataProperties = $h͏_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime",[$h͏_a => (tameRegeneratorRuntime = $h͏_a)]]]],["./shim-arraybuffer-transfer.js", [["shimArrayBufferTransfer",[$h͏_a => (shimArrayBufferTransfer = $h͏_a)]]]],["./reporting.js", [["reportInGroup",[$h͏_a => (reportInGroup = $h͏_a)]],["chooseReporter",[$h͏_a => (chooseReporter = $h͏_a)]]]]]);
13486
+ // === 59. ses ./src/lockdown.js ===
13487
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,symbolFor,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,removeUnpermittedIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameNaNSideChannel,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer,reportInGroup,chooseReporter;$h͏_imports([["@endo/env-options", [["getEnvironmentOption",[$h͏_a => (getenv = $h͏_a)]]]],["@endo/immutable-arraybuffer/shim.js", []],["./commons.js", [["FERAL_FUNCTION",[$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_EVAL",[$h͏_a => (FERAL_EVAL = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["arrayFilter",[$h͏_a => (arrayFilter = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["stringSplit",[$h͏_a => (stringSplit = $h͏_a)]],["symbolFor",[$h͏_a => (symbolFor = $h͏_a)]],["noEvalEvaluate",[$h͏_a => (noEvalEvaluate = $h͏_a)]],["getOwnPropertyNames",[$h͏_a => (getOwnPropertyNames = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./make-hardener.js", [["makeHardener",[$h͏_a => (makeHardener = $h͏_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector",[$h͏_a => (makeIntrinsicsCollector = $h͏_a)]]]],["./permits-intrinsics.js", [["default",[$h͏_a => (removeUnpermittedIntrinsics = $h͏_a)]]]],["./tame-function-constructors.js", [["default",[$h͏_a => (tameFunctionConstructors = $h͏_a)]]]],["./tame-date-constructor.js", [["default",[$h͏_a => (tameDateConstructor = $h͏_a)]]]],["./tame-math-object.js", [["default",[$h͏_a => (tameMathObject = $h͏_a)]]]],["./tame-nan-sidechannel.js", [["tameNaNSideChannel",[$h͏_a => (tameNaNSideChannel = $h͏_a)]]]],["./tame-regexp-constructor.js", [["default",[$h͏_a => (tameRegExpConstructor = $h͏_a)]]]],["./enable-property-overrides.js", [["default",[$h͏_a => (enablePropertyOverrides = $h͏_a)]]]],["./tame-locale-methods.js", [["default",[$h͏_a => (tameLocaleMethods = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties",[$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties",[$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators",[$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator",[$h͏_a => (makeSafeEvaluator = $h͏_a)]]]],["./permits.js", [["initialGlobalPropertyNames",[$h͏_a => (initialGlobalPropertyNames = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString",[$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./tame-domains.js", [["tameDomains",[$h͏_a => (tameDomains = $h͏_a)]]]],["./tame-module-source.js", [["tameModuleSource",[$h͏_a => (tameModuleSource = $h͏_a)]]]],["./error/tame-console.js", [["tameConsole",[$h͏_a => (tameConsole = $h͏_a)]]]],["./error/tame-error-constructor.js", [["default",[$h͏_a => (tameErrorConstructor = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]],["makeAssert",[$h͏_a => (makeAssert = $h͏_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics",[$h͏_a => (getAnonymousIntrinsics = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor",[$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-harden.js", [["tameHarden",[$h͏_a => (tameHarden = $h͏_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor",[$h͏_a => (tameSymbolConstructor = $h͏_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties",[$h͏_a => (tameFauxDataProperties = $h͏_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime",[$h͏_a => (tameRegeneratorRuntime = $h͏_a)]]]],["./shim-arraybuffer-transfer.js", [["shimArrayBufferTransfer",[$h͏_a => (shimArrayBufferTransfer = $h͏_a)]]]],["./reporting.js", [["reportInGroup",[$h͏_a => (reportInGroup = $h͏_a)]],["chooseReporter",[$h͏_a => (chooseReporter = $h͏_a)]]]]]);
13488
+
13489
+
13224
13490
 
13225
13491
 
13226
13492
 
@@ -13574,6 +13840,7 @@ const probeHostEvaluators = () => {
13574
13840
  addIntrinsics(tameDateConstructor());
13575
13841
  addIntrinsics(tameErrorConstructor(errorTaming, stackFiltering));
13576
13842
  addIntrinsics(tameMathObject());
13843
+ tameNaNSideChannel();
13577
13844
  addIntrinsics(tameRegExpConstructor(regExpTaming));
13578
13845
  addIntrinsics(tameSymbolConstructor());
13579
13846
  addIntrinsics(shimArrayBufferTransfer());
@@ -13585,6 +13852,30 @@ const probeHostEvaluators = () => {
13585
13852
 
13586
13853
  const intrinsics = finalIntrinsics();
13587
13854
 
13855
+ // Install Object[@harden] or abort.
13856
+ const symbolForHarden = symbolFor('harden');
13857
+ const priorHarden = intrinsics.Object[symbolForHarden];
13858
+ if (priorHarden) {
13859
+ // By convention, if a module like @endo/harden gets used before lockdown,
13860
+ // it will install itself as a non-configurable, non-writable property over
13861
+ // Object[@harden] so that versions of SES predating the introduction of
13862
+ // Object[@harden] will fail to lockdown because they cannot remove an
13863
+ // unknown intrinsic.
13864
+ // All newer versions explicitly check for Object[@harden] (here).
13865
+ // The @endo/harden implementation additionally captures a stack trace
13866
+ // where harden was first used to assist developers in tracking down the
13867
+ // hardened module that was initialized before lockdown.
13868
+ if (priorHarden.lockdownError) {
13869
+ throw priorHarden.lockdownError;
13870
+ }
13871
+ // And in the event a library installs Object[@harden] without leaving a
13872
+ // hint, we fall back to a generic lockdown error.
13873
+ throw new TypeError(
13874
+ 'Cannot lockdown (repairIntrinsics) if a prior harden implementation has been used and installed. Check for libraries using @endo/harden before lockdown.',
13875
+ );
13876
+ }
13877
+ intrinsics.Object[symbolForHarden] = tamedHarden;
13878
+
13588
13879
  const hostIntrinsics = { __proto__: null };
13589
13880
 
13590
13881
  // The Node.js Buffer is a derived class of Uint8Array, and as such is often
@@ -13626,19 +13917,16 @@ const probeHostEvaluators = () => {
13626
13917
  );
13627
13918
  }
13628
13919
 
13920
+ // The default `assert` installed by `assert-shim.js` does not redact errors,
13921
+ // leaving `lockdown` or `repairIntrinsics` with the obligation to replace it
13922
+ // with a redacting version, unless the caller opts-out with errorTaming set
13923
+ // to `unsafe` or `unsafe-debug`.
13924
+ // The inverse was true through version 1.13.0, except the configuration
13925
+ // was disregarded and the redacting `assert` left in place if lexical
13926
+ // `assert` differed from `globalThis.assert`.
13629
13927
  // @ts-ignore assert is absent on globalThis type def.
13630
- if (
13631
- (errorTaming === 'unsafe' || errorTaming === 'unsafe-debug') &&
13632
- globalThis.assert === assert
13633
- ) {
13634
- // If errorTaming is 'unsafe' or 'unsafe-debug' we replace the
13635
- // global assert with
13636
- // one whose `details` template literal tag does not redact
13637
- // unmarked substitution values. IOW, it blabs information that
13638
- // was supposed to be secret from callers, as an aid to debugging
13639
- // at a further cost in safety.
13640
- // @ts-ignore assert is absent on globalThis type def.
13641
- globalThis.assert = makeAssert(undefined, true);
13928
+ if (errorTaming !== 'unsafe' && errorTaming !== 'unsafe-debug') {
13929
+ globalThis.assert = makeAssert();
13642
13930
  }
13643
13931
 
13644
13932
  // Replace *Locale* methods with their non-locale equivalents
@@ -13780,7 +14068,7 @@ const probeHostEvaluators = () => {
13780
14068
  };$h͏_once.repairIntrinsics(repairIntrinsics);
13781
14069
  })()
13782
14070
  ,
13783
- // === 59. ses ./src/lockdown-shim.js ===
14071
+ // === 60. ses ./src/lockdown-shim.js ===
13784
14072
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,repairIntrinsics;$h͏_imports([["./assert-sloppy-mode.js", []],["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./lockdown.js", [["repairIntrinsics",[$h͏_a => (repairIntrinsics = $h͏_a)]]]]]);
13785
14073
 
13786
14074
 
@@ -13820,7 +14108,7 @@ globalThis.repairIntrinsics = options => {
13820
14108
  };
13821
14109
  })()
13822
14110
  ,
13823
- // === 60. ses ./src/compartment-shim.js ===
14111
+ // === 61. ses ./src/compartment-shim.js ===
13824
14112
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics,chooseReporter;$h͏_imports([["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor",[$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString",[$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./intrinsics.js", [["getGlobalIntrinsics",[$h͏_a => (getGlobalIntrinsics = $h͏_a)]]]],["./reporting.js", [["chooseReporter",[$h͏_a => (chooseReporter = $h͏_a)]]]]]);
13825
14113
 
13826
14114
 
@@ -13845,14 +14133,14 @@ globalThis.Compartment = makeCompartmentConstructor(
13845
14133
  );
13846
14134
  })()
13847
14135
  ,
13848
- // === 61. ses ./src/assert-shim.js ===
13849
- ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,assert;$h͏_imports([["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
14136
+ // === 62. ses ./src/assert-shim.js ===
14137
+ ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let globalThis,makeAssert;$h͏_imports([["./commons.js", [["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["makeAssert",[$h͏_a => (makeAssert = $h͏_a)]]]]]);
13850
14138
 
13851
14139
 
13852
- globalThis.assert = assert;
14140
+ globalThis.assert = makeAssert(undefined, true);
13853
14141
  })()
13854
14142
  ,
13855
- // === 62. ses ./src/console-shim.js ===
14143
+ // === 63. ses ./src/console-shim.js ===
13856
14144
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let symbolFor,globalThis,defineCausalConsoleFromLogger,loggedErrorHandler;$h͏_imports([["./commons.js", [["symbolFor",[$h͏_a => (symbolFor = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/console.js", [["defineCausalConsoleFromLogger",[$h͏_a => (defineCausalConsoleFromLogger = $h͏_a)]]]],["./error/assert.js", [["loggedErrorHandler",[$h͏_a => (loggedErrorHandler = $h͏_a)]]]]]);
13857
14145
 
13858
14146
 
@@ -13905,7 +14193,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA] =
13905
14193
  makeCausalConsoleFromLoggerForSesAva;
13906
14194
  })()
13907
14195
  ,
13908
- // === 63. ses ./index.js ===
14196
+ // === 64. ses ./index.js ===
13909
14197
  ({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []],["./src/console-shim.js", []]]);
13910
14198
  })()
13911
14199
  ,