-
Notifications
You must be signed in to change notification settings - Fork 4
/
initSES-minified.js
336 lines (336 loc) · 72.5 KB
/
initSES-minified.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
{var Function,RegExp,StringMap,WeakMap,cajaVM,eval,ses;ses||(ses={}),(function loggerModule(){'use strict';var
apply,forward,logger,slice;function logNowhere(str){}slice=[].slice,apply=slice.apply,ses.logger?(logger=ses.logger):typeof
console!=='undefined'&&'log'in console?(forward=function(level,args){var getStack,i,len,stack;args=slice.call(args,0),apply.call(console[level],console,[''].concat(args)),getStack=ses.getStack;if(getStack)for(i=0,len=args.length;i<len;++i)stack=getStack(args[i]),stack&&console[level]('',stack)},logger={'log':function
log(var_args){forward('log',arguments)},'info':function info(var_args){forward('info',arguments)},'warn':function
warn(var_args){forward('warn',arguments)},'error':function error(var_args){forward('error',arguments)}}):(logger={'log':logNowhere,'info':logNowhere,'warn':logNowhere,'error':logNowhere});function
defaultClassify(postSeverity){var MAX_SES_SAFE=ses.severities.SAFE_SPEC_VIOLATION,consoleLevel='log',note='';return postSeverity.level>ses.severities.SAFE.level&&(consoleLevel='info',note=postSeverity.description+'('+postSeverity.level+')',postSeverity.level>ses.maxAcceptableSeverity.level?(consoleLevel='error',note+=' is not suitable for SES'):postSeverity.level>MAX_SES_SAFE.level&&(consoleLevel='warn',note+=' is not SES-safe'),note+='.'),{'consoleLevel':consoleLevel,'note':note}}logger.classify||(logger.classify=defaultClassify);function
defaultReportRepairs(reports){}logger.reportRepairs||(logger.reportRepairs=defaultReportRepairs);function
defaultReportMax(){var maxClassification;ses.maxSeverity.level>ses.severities.SAFE.level&&(maxClassification=ses.logger.classify(ses.maxSeverity),logger[maxClassification.consoleLevel]('Max Severity: '+maxClassification.note))}logger.reportMax||(logger.reportMax=defaultReportMax);function
defaultReportDiagnosis(severity,status,problemList){var classification=ses.logger.classify(severity);ses.logger[classification.consoleLevel](problemList.length+' '+status)}logger.reportDiagnosis||(logger.reportDiagnosis=defaultReportDiagnosis),ses.logger=logger})(),(function
repairES5Module(global){'use strict';var NEEDS_DUMMY_SETTER_repaired,aboutTo,apply,baseKludges,builtInForEach,builtInMapMethod,call,concat,during,errorInstanceBlacklist,errorInstanceWhitelist,getPrototypeOf,hop,is,logger,makeTamperProof,maxSev,needToTamperProof,objToString,reports,severities,slice,statuses,strictThis,supportedKludges;ses.severities={'SAFE':{'level':0,'description':'Safe'},'SAFE_SPEC_VIOLATION':{'level':1,'description':'Safe spec violation'},'UNSAFE_SPEC_VIOLATION':{'level':2,'description':'Unsafe spec violation'},'NOT_OCAP_SAFE':{'level':3,'description':'Not ocap safe'},'NOT_ISOLATED':{'level':4,'description':'Not isolated'},'NEW_SYMPTOM':{'level':5,'description':'New symptom'},'NOT_SUPPORTED':{'level':6,'description':'Not supported'}},ses.statuses={'ALL_FINE':'All fine','REPAIR_FAILED':'Repair failed','NOT_REPAIRED':'Not repaired','REPAIRED_UNSAFELY':'Repaired unsafely','REPAIRED':'Repaired','ACCIDENTALLY_REPAIRED':'Accidentally repaired','BROKEN_BY_OTHER_ATTEMPTED_REPAIRS':'Broken by other attempted repairs'},logger=ses.logger,ses.maxSeverity=ses.severities.SAFE;if(ses.maxAcceptableSeverityName){maxSev=ses.severities[ses.maxAcceptableSeverityName];if(maxSev&&typeof
maxSev.level==='number'&&maxSev.level>=ses.severities.SAFE.level&&maxSev.level<ses.severities.NOT_SUPPORTED.level);else
logger.error('Ignoring bad maxAcceptableSeverityName: '+ses.maxAcceptableSeverityName+'.'),ses.maxAcceptableSeverityName='SAFE_SPEC_VIOLATION'}else
ses.maxAcceptableSeverityName='SAFE_SPEC_VIOLATION';ses.maxAcceptableSeverity=ses.severities[ses.maxAcceptableSeverityName],ses.ok=function
ok(){return ses.maxSeverity.level<=ses.maxAcceptableSeverity.level},ses.updateMaxSeverity=function
updateMaxSeverity(severity){severity.level>ses.maxSeverity.level&&(ses.maxSeverity=severity)};function
strictForEachFn(list,callback){var i,len;for(i=0,len=list.length;i<len;++i)callback(list[i],i)}function
strictMapFn(list,callback){var result=[],i,len;for(i=0,len=list.length;i<len;++i)result.push(callback(list[i],i));return result}objToString=Object.prototype.toString,builtInMapMethod=Array.prototype.map,builtInForEach=Array.prototype.forEach,is=ses.is=Object.is||function(x,y){return x===y?x!==0||1/x===1/y:x!==x&&y!==y},ses.makeCallerHarmless=function
assumeCallerHarmless(func,path){return'Apparently fine'},ses.makeArgumentsHarmless=function
assumeArgumentsHarmless(func,path){return'Apparently fine'},makeTamperProof=function
defaultMakeTamperProof(){var gopd=Object.getOwnPropertyDescriptor,gopn=Object.getOwnPropertyNames,getProtoOf=Object.getPrototypeOf,freeze=Object.freeze,isFrozen=Object.isFrozen,defProp=Object.defineProperty;function
tamperProof(obj){var func;return obj!==Object(obj)?obj:(typeof obj==='object'&&!!gopd(obj,'constructor')&&typeof(func=obj.constructor)==='function'&&func.prototype===obj&&!isFrozen(obj)&&strictForEachFn(gopn(obj),function(name){var
desc,value;function getter(){var thisObj;return obj===this?value:this===void 0||this===null?void
0:(thisObj=Object(this),gopd(thisObj,name)?this[name]:getter.call(getProtoOf(thisObj)))}function
setter(newValue){if(obj===this)throw new TypeError('Cannot set virtually frozen property: '+name);!gopd(this,name)||(this[name]=newValue),defProp(this,name,{'value':newValue,'writable':true,'enumerable':true,'configurable':true})}desc=gopd(obj,name),desc.configurable&&'value'in
desc&&(value=desc.value,getter.prototype=null,setter.prototype=null,defProp(obj,name,{'get':getter,'set':setter,'enumerable':desc.enumerable,'configurable':false}))}),freeze(obj))}return tamperProof},needToTamperProof=[];function
rememberToTamperProof(obj){needToTamperProof.push(obj)}ses.makeDelayedTamperProof=function
makeDelayedTamperProof(){var tamperProof=makeTamperProof();return strictForEachFn(needToTamperProof,tamperProof),needToTamperProof=void
0,tamperProof};function testGlobalLeak(desc,that){return that===void 0?false:that===global?true:({}).toString.call(that)==='[object Window]'?true:desc+' leaked as: '+that}function
test_MISSING_GETOWNPROPNAMES(){return!('getOwnPropertyNames'in Object)}function
test_GLOBAL_LEAKS_FROM_GLOBAL_FUNCTION_CALLS(){var that;return global.___global_test_function___=function(){return this},that=___global_test_function___(),delete
global.___global_test_function___,testGlobalLeak('Global func \"this\"',that)}function
test_GLOBAL_LEAKS_FROM_ANON_FUNCTION_CALLS(){var that=(function(){return this})();return testGlobalLeak('Anon func \"this\"',that)}strictThis=this;function
test_GLOBAL_LEAKS_FROM_STRICT_THIS(){return testGlobalLeak('Strict \"this\"',strictThis)}function
test_GLOBAL_LEAKS_FROM_BUILTINS(){var v=({}).valueOf,that='dummy';try{that=v()}catch(err){return err
instanceof TypeError?false:'valueOf() threw: '+err}return that===void 0?false:testGlobalLeak('valueOf()',that)}function
test_GLOBAL_LEAKS_FROM_GLOBALLY_CALLED_BUILTINS(){var that;global.___global_valueOf_function___=({}).valueOf,that='dummy';try{that=___global_valueOf_function___()}catch(err){return err
instanceof TypeError?false:'valueOf() threw: '+err}finally{delete global.___global_valueOf_function___}return that===void
0?false:testGlobalLeak('Global valueOf()',that)}function test_MISSING_FREEZE_ETC(){return!('freeze'in
Object)}function test_FUNCTION_PROTOTYPE_DESCRIPTOR_LIES(){function foo(){}return Object.defineProperty(foo,'prototype',{'value':{}}),foo.prototype!==Object.getOwnPropertyDescriptor(foo,'prototype').value}function
test_MISSING_CALLEE_DESCRIPTOR(){function foo(){}return Object.getOwnPropertyNames(foo).indexOf('callee')<0?false:foo.hasOwnProperty('callee')?'Empty strict function has own callee':true}function
test_STRICT_DELETE_RETURNS_FALSE(){var deleted;if(!RegExp.hasOwnProperty('rightContext'))return false;try{deleted=delete
RegExp.rightContext}catch(err){return err instanceof TypeError?false:'Deletion failed with: '+err}return!deleted}function
test_REGEXP_CANT_BE_NEUTERED(){var deleted;if(!RegExp.hasOwnProperty('leftContext'))return false;try{deleted=delete
RegExp.leftContext}catch(err){return err instanceof TypeError?true:'Deletion failed with: '+err}return RegExp.hasOwnProperty('leftContext')?deleted?'Deletion of RegExp.leftContext did not succeed.':true:false}function
test_REGEXP_TEST_EXEC_UNSAFE(){var match;return/foo/.test('xfoox'),match=(new RegExp('(.|\r|\n)*','').exec())[0],match==='undefined'?false:match==='xfoox'?true:'regExp.exec() does not match against \"undefined\".'}function
test_MISSING_BIND(){return!('bind'in Function.prototype)}function test_BIND_CALLS_APPLY(){var
answer,applyCalled,b;if(!('bind'in Function.prototype))return false;applyCalled=false;function
foo(){return[].slice.call(arguments,0).join(',')}return foo.apply=function fakeApply(self,args){return applyCalled=true,Function.prototype.apply.call(this,self,args)},b=foo.bind(33,44),answer=b(55,66),applyCalled?true:answer==='44,55,66'?false:'Bind test returned \"'+answer+'\" instead of \"44,55,66\".'}function
test_BIND_CANT_CURRY_NEW(){var d,str;function construct(f,args){var bound=Function.prototype.bind.apply(f,[null].concat(args));return new
bound}try{d=construct(Date,[1957,4,27])}catch(err){return err instanceof TypeError?true:'Curries construction failed with: '+err}return typeof
d==='string'?true:(str=objToString.call(d),str==='[object Date]'?false:'Unexpected '+str+': '+d)}function
test_MUTABLE_DATE_PROTO(){var v;try{Date.prototype.setFullYear(1957)}catch(err){return err
instanceof TypeError?false:'Mutating Date.prototype failed with: '+err}return v=Date.prototype.getFullYear(),Date.prototype.setFullYear(NaN),v!==v&&typeof
v==='number'?false:v===1957?true:'Mutating Date.prototype did not throw'}function
test_MUTABLE_WEAKMAP_PROTO(){var v,x;if(typeof WeakMap!=='function')return false;x={};try{WeakMap.prototype.set(x,86)}catch(err){return err
instanceof TypeError?false:'Mutating WeakMap.prototype failed with: '+err}return v=WeakMap.prototype.get(x),v===86?true:'Mutating WeakMap.prototype did not throw'}function
test_NEED_TO_WRAP_FOREACH(){if(!('freeze'in Object))return false;if(Array.prototype.forEach!==builtInForEach)return false;try{return['z'].forEach(function(){Object.freeze(Array.prototype.forEach)}),false}catch(err){return err
instanceof TypeError?true:'freezing forEach failed with '+err}}function test_NEEDS_DUMMY_SETTER(){var
ChromeMajorVersionPattern,match,ver;return NEEDS_DUMMY_SETTER_repaired?false:typeof
navigator==='undefined'?false:(ChromeMajorVersionPattern=/Chrome\/(\d*)\./,match=ChromeMajorVersionPattern.exec(navigator.userAgent),match?(ver=+match[1],ver<=17):false)}NEEDS_DUMMY_SETTER_repaired=false;function
test_FORM_GETTERS_DISAPPEAR(){var desc,f;function getter(){return'gotten'}if(typeof
document==='undefined'||typeof document.createElement!=='function')return false;f=document.createElement('form');try{Object.defineProperty(f,'foo',{'get':getter,'set':void
0})}catch(err){return'defining accessor on form failed with: '+err}return desc=Object.getOwnPropertyDescriptor(f,'foo'),desc.get===getter?false:desc.get===void
0?true:'Getter became '+desc.get}function test_ACCESSORS_INHERIT_AS_OWN(){var base={},derived=Object.create(base);function
getter(){return'gotten'}return Object.defineProperty(base,'foo',{'get':getter}),!derived.hasOwnProperty('foo')&&Object.getOwnPropertyDescriptor(derived,'foo')===void
0&&Object.getOwnPropertyNames(derived).indexOf('foo')<0?false:!derived.hasOwnProperty('foo')||Object.getOwnPropertyDescriptor(derived,'foo').get!==getter||Object.getOwnPropertyNames(derived).indexOf('foo')<0?'Accessor properties partially inherit as own properties.':(Object.defineProperty(base,'bar',{'get':getter,'configurable':true}),!derived.hasOwnProperty('bar')&&Object.getOwnPropertyDescriptor(derived,'bar')===void
0&&Object.getOwnPropertyNames(derived).indexOf('bar')<0?true:'Accessor properties inherit as own even if configurable.')}function
test_SORT_LEAKS_GLOBAL(){var that='dummy';return[2,3].sort(function(x,y){return that=this,x-y}),that===void
0?false:that===global?true:'sort called comparefn with \"this\" === '+that}function
test_REPLACE_LEAKS_GLOBAL(){var that='dummy';function capture(){return that=this,'y'}return'x'.replace(/x/,capture),that===void
0?false:that===capture?true:that===global?true:'Replace called replaceValue function with \"this\" === '+that}function
test_CANT_GOPD_CALLER(){var desc=null;try{desc=Object.getOwnPropertyDescriptor(function(){},'caller')}catch(err){return err
instanceof TypeError?true:'getOwnPropertyDescriptor failed with: '+err}return desc&&typeof
desc.get==='function'&&typeof desc.set==='function'&&!desc.configurable?false:desc&&desc.value===null&&!desc.writable&&!desc.configurable?false:'getOwnPropertyDesciptor returned unexpected caller descriptor'}function
test_CANT_HASOWNPROPERTY_CALLER(){var answer=void 0;try{answer=(function(){}).hasOwnProperty('caller')}catch(err){return err
instanceof TypeError?true:'hasOwnProperty failed with: '+err}return answer?false:'strict_function.hasOwnProperty(\"caller\") was false'}function
has(base,name,baseDesc){var result=void 0,finallySkipped=true;try{result=name in
base}catch(err){return logger.error('New symptom (a): (\''+name+'\' in <'+baseDesc+'>) threw: ',err),result=false,false}finally{finallySkipped=false,result===void
0&&logger.error('New symptom (b): (\''+name+'\' in <'+baseDesc+'>) failed')}return finallySkipped&&logger.error('New symptom (e): (\''+name+'\' in <'+baseDesc+'>) inner finally skipped'),!!result}function
has2(base,name,baseDesc){var result=void 0,finallySkipped=true;try{result=has(base,name,baseDesc)}catch(err){return logger.error('New symptom (c): (\''+name+'\' in <'+baseDesc+'>) threw: ',err),result=false,false}finally{finallySkipped=false,result===void
0&&logger.error('New symptom (d): (\''+name+'\' in <'+baseDesc+'>) failed')}return finallySkipped&&logger.error('New symptom (f): (\''+name+'\' in <'+baseDesc+'>) outer finally skipped'),!!result}function
test_CANT_IN_CALLER(){var answer=void 0;try{answer=has2(function(){},'caller','strict_function')}catch(err){return err
instanceof TypeError?true:'(\"caller\" in strict_func) failed with: '+err}finally{}return answer?false:'(\"caller\" in strict_func) was false.'}function
test_CANT_IN_ARGUMENTS(){var answer=void 0;try{answer=has2(function(){},'arguments','strict_function')}catch(err){return err
instanceof TypeError?true:'(\"arguments\" in strict_func) failed with: '+err}finally{}return answer?false:'(\"arguments\" in strict_func) was false.'}function
test_STRICT_CALLER_NOT_POISONED(){var caller,testfn;if(!has2(strictMapFn,'caller','a strict function'))return false;function
foo(m){return m.caller}testfn=Function('m','f','return m([m], f)[0];');try{caller=testfn(strictMapFn,foo)}catch(err){return err
instanceof TypeError?false:'Strict \"caller\" failed with: '+err}return testfn===caller?true:'Unexpected \"caller\": '+caller}function
test_STRICT_ARGUMENTS_NOT_POISONED(){var args,testfn;if(!has2(strictMapFn,'arguments','a strict function'))return false;function
foo(m){return m.arguments}testfn=Function('m','f','return m([m], f)[0];');try{args=testfn(strictMapFn,foo)}catch(err){return err
instanceof TypeError?false:'Strict \"arguments\" failed with: '+err}return args[1]===foo?true:'Unexpected arguments: '+arguments}function
test_BUILTIN_LEAKS_CALLER(){var a,caller,testfn;if(!has2(builtInMapMethod,'caller','a builtin'))return false;function
foo(m){return m.caller}testfn=Function('a','f','return a.map(f)[0];'),a=[builtInMapMethod],a.map=builtInMapMethod;try{caller=testfn(a,foo)}catch(err){return err
instanceof TypeError?false:'Built-in \"caller\" failed with: '+err}return null===caller||void
0===caller?false:testfn===caller?true:'Unexpected \"caller\": '+caller}function
test_BUILTIN_LEAKS_ARGUMENTS(){var a,args,testfn;if(!has2(builtInMapMethod,'arguments','a builtin'))return false;function
foo(m){return m.arguments}testfn=Function('a','f','return a.map(f)[0];'),a=[builtInMapMethod],a.map=builtInMapMethod;try{args=testfn(a,foo)}catch(err){return err
instanceof TypeError?false:'Built-in \"arguments\" failed with: '+err}return!(args===void
0||args===null)}function test_BOUND_FUNCTION_LEAKS_CALLER(){var bar,caller,testfn;if(!('bind'in
Function.prototype))return false;function foo(){return bar.caller}bar=foo.bind({});if(!has2(bar,'caller','a bound function'))return false;testfn=Function('b','return b();');try{caller=testfn(bar)}catch(err){return err
instanceof TypeError?false:'Bound function \"caller\" failed with: '+err}return caller===void
0||caller===null?false:caller===testfn?true:'Unexpected \"caller\": '+caller}function
test_BOUND_FUNCTION_LEAKS_ARGUMENTS(){var args,bar,testfn;if(!('bind'in Function.prototype))return false;function
foo(){return bar.arguments}bar=foo.bind({});if(!has2(bar,'arguments','a bound function'))return false;testfn=Function('b','return b();');try{args=testfn(bar)}catch(err){return err
instanceof TypeError?false:'Bound function \"arguments\" failed with: '+err}return!(args===void
0||args===null)}function test_DELETED_BUILTINS_IN_OWN_NAMES(){var desc,names;if(!('__defineSetter__'in
Object.prototype))return false;desc=Object.getOwnPropertyDescriptor(Object.prototype,'__defineSetter__');try{try{delete
Object.prototype.__defineSetter__}catch(err1){return false}return names=Object.getOwnPropertyNames(Object.prototype),names.indexOf('__defineSetter__')===-1?false:!('__defineSetter__'in
Object.prototype)}finally{Object.defineProperty(Object.prototype,'__defineSetter__',desc)}}function
test_GETOWNPROPDESC_OF_ITS_OWN_CALLER_FAILS(){try{Object.getOwnPropertyDescriptor(Object.getOwnPropertyDescriptor,'caller')}catch(err){return err
instanceof TypeError?true:'getOwnPropertyDescriptor threw: '+err}return false}function
test_JSON_PARSE_PROTO_CONFUSION(){var x;try{x=JSON.parse('{\"__proto__\":[]}')}catch(err){return err
instanceof TypeError?false:'JSON.parse failed with: '+err}return Object.getPrototypeOf(x)!==Object.prototype?true:Array.isArray(x.__proto__)?false:'JSON.parse did not set \"__proto__\" as a regular property'}function
test_PROTO_NOT_FROZEN(){var x,y;if(!('freeze'in Object))return false;x=Object.preventExtensions({});if(x.__proto__===void
0&&!('__proto__'in x))return false;y={};try{x.__proto__=y}catch(err){return err
instanceof TypeError?false:'Mutating __proto__ failed with: '+err}return y.isPrototypeOf(x)?true:'Mutating __proto__ neither failed nor succeeded'}function
test_PROTO_REDEFINABLE(){var x,y;if(!('freeze'in Object))return false;x=Object.preventExtensions({});if(x.__proto__===void
0&&!('__proto__'in x))return false;y={};try{Object.defineProperty(x,'__proto__',{'value':y})}catch(err){return err
instanceof TypeError?false:'Defining __proto__ failed with: '+err}return y.isPrototypeOf(x)?true:'Defining __proto__ neither failed nor succeeded'}function
test_STRICT_EVAL_LEAKS_GLOBALS(){return eval('\"use strict\"; var ___global_test_variable___ = 88;'),'___global_test_variable___'in
global?(delete global.___global_test_variable___,true):false}function test_PARSEINT_STILL_PARSING_OCTAL(){var
n=parseInt('010');return n===10?false:n===8?true:'parseInt(\"010\") returned '+n}function
test_STRICT_E4X_LITERALS_ALLOWED(){var x;try{x=eval('\"use strict\";(<foo/>);')}catch(err){return err
instanceof SyntaxError?false:'E4X test failed with: '+err}return x!==void 0?true:'E4X literal expression had no value'}function
test_ASSIGN_CAN_OVERRIDE_FROZEN(){var x=Object.freeze({'foo':88}),y=Object.create(x);try{y.foo=99}catch(err){return err
instanceof TypeError?false:'Override failed with: '+err}return y.foo===99?true:y.foo===88?'Override failed silently':'Unexpected override outcome: '+y.foo}function
test_CANT_REDEFINE_NAN_TO_ITSELF(){var descNaN=Object.getOwnPropertyDescriptor(global,'NaN');try{Object.defineProperty(global,'NaN',descNaN)}catch(err){return err
instanceof TypeError?true:'defineProperty of NaN failed with: '+err}return false}errorInstanceWhitelist=['arguments','message','stack','type','fileName','lineNumber','message','stack','line','message','sourceId','sourceURL','description','message','number','message','stack','stacktrace'],errorInstanceBlacklist=['category','context','href','lineNo','msgId','source','trace','correctSourcePoint','correctWithStackTrace','getSourceLine','resetSource'];function
freshErrorInstanceWhiteMap(){var result=Object.create(null);return strictForEachFn(errorInstanceWhitelist,function(name){result[name]=true}),result}function
freshHiddenPropertyCandidates(){var result=freshErrorInstanceWhiteMap();return strictForEachFn(errorInstanceBlacklist,function(name){result[name]=true}),result}function
test_UNEXPECTED_ERROR_PROPERTIES(){var errs=[new Error('e1')],approvedNames,result;try{null.foo=3}catch(err){errs.push(err)}return result=false,approvedNames=freshErrorInstanceWhiteMap(),strictForEachFn(errs,function(err){strictForEachFn(Object.getOwnPropertyNames(err),function(name){name
in approvedNames||(result='Unexpected error instance property: '+name)})}),result}function
test_GET_OWN_PROPERTY_NAME_LIES(){var gopn=Object.getOwnPropertyNames,gopd=Object.getOwnPropertyDescriptor,suspects=[new
Error('e1')],unreported,unreportedNames;try{null.foo=3}catch(err){suspects.push(err)}return unreported=Object.create(null),strictForEachFn(suspects,function(suspect){var
candidates=freshHiddenPropertyCandidates();strictForEachFn(gopn(suspect),function(name){delete
candidates[name]}),strictForEachFn(gopn(candidates),function(name){gopd(suspect,name)||delete
candidates[name]}),strictForEachFn(gopn(candidates),function(name){unreported[name]=true})}),unreportedNames=gopn(unreported),unreportedNames.length===0?false:'Error own properties unreported by getOwnPropertyNames: '+unreportedNames.sort().join(',')}call=Function.prototype.call,apply=Function.prototype.apply,hop=Object.prototype.hasOwnProperty,slice=Array.prototype.slice,concat=Array.prototype.concat,getPrototypeOf=Object.getPrototypeOf;function
patchMissingProp(base,name,missingFunc){name in base||Object.defineProperty(base,name,{'value':missingFunc,'writable':true,'enumerable':false,'configurable':true})}function
repair_MISSING_FREEZE_ETC(){patchMissingProp(Object,'freeze',function fakeFreeze(obj){return obj}),patchMissingProp(Object,'seal',function
fakeSeal(obj){return obj}),patchMissingProp(Object,'preventExtensions',function
fakePreventExtensions(obj){return obj}),patchMissingProp(Object,'isFrozen',function
fakeIsFrozen(obj){return false}),patchMissingProp(Object,'isSealed',function fakeIsSealed(obj){return false}),patchMissingProp(Object,'isExtensible',function
fakeIsExtensible(obj){return true})}function repair_FUNCTION_PROTOTYPE_DESCRIPTOR_LIES(){var
unsafeDefProp=Object.defineProperty;function repairedDefineProperty(base,name,desc){if(typeof
base==='function'&&name==='prototype'&&'value'in desc)try{base.prototype=desc.value}catch(err){logger.warn('prototype fixup failed',err)}return unsafeDefProp(base,name,desc)}Object.defineProperty(Object,'defineProperty',{'value':repairedDefineProperty})}function
repair_MISSING_CALLEE_DESCRIPTOR(){var realGOPN=Object.getOwnPropertyNames;Object.defineProperty(Object,'getOwnPropertyNames',{'value':function
calleeFix(base){var result=realGOPN(base),i;return typeof base==='function'&&(i=result.indexOf('callee'),i>=0&&!hop.call(base,'callee')&&result.splice(i,1)),result}})}function
repair_REGEXP_CANT_BE_NEUTERED(){var UnsafeRegExp=RegExp,FakeRegExp=function RegExpWrapper(pattern,flags){switch(arguments.length){case
0:return UnsafeRegExp();case 1:return UnsafeRegExp(pattern);default:return UnsafeRegExp(pattern,flags)}};Object.defineProperty(FakeRegExp,'prototype',{'value':UnsafeRegExp.prototype}),Object.defineProperty(FakeRegExp.prototype,'constructor',{'value':FakeRegExp}),RegExp=FakeRegExp}function
repair_REGEXP_TEST_EXEC_UNSAFE(){var unsafeRegExpExec=RegExp.prototype.exec,unsafeRegExpTest=RegExp.prototype.test;Object.defineProperty(RegExp.prototype,'exec',{'value':function
fakeExec(specimen){return unsafeRegExpExec.call(this,String(specimen))}}),Object.defineProperty(RegExp.prototype,'test',{'value':function
fakeTest(specimen){return unsafeRegExpTest.call(this,String(specimen))}})}function
repair_MISSING_BIND(){var BOGUS_BOUND_PROTOTYPE={'toString':function BBPToString(){return'bogus bound prototype'}},defProp;rememberToTamperProof(BOGUS_BOUND_PROTOTYPE),BOGUS_BOUND_PROTOTYPE.toString.prototype=null,rememberToTamperProof(BOGUS_BOUND_PROTOTYPE.toString),defProp=Object.defineProperty,defProp(Function.prototype,'bind',{'value':function
fakeBind(self,var_args){var thisFunc=this,leftArgs=slice.call(arguments,1);function
funcBound(var_args){var args;if(this===Object(this)&&getPrototypeOf(this)===BOGUS_BOUND_PROTOTYPE)throw new
TypeError('Cannot emulate \"new\" on pseudo-bound function.');return args=concat.call(leftArgs,slice.call(arguments,0)),apply.call(thisFunc,self,args)}return defProp(funcBound,'prototype',{'value':BOGUS_BOUND_PROTOTYPE,'writable':false,'configurable':false}),funcBound},'writable':true,'enumerable':false,'configurable':true})}function
makeMutableProtoPatcher(constr,classString){var proto=constr.prototype,baseToString=objToString.call(proto),grandBaseToString,grandProto;if(baseToString!=='[object '+classString+']')throw new
TypeError('unexpected: '+baseToString);grandProto=getPrototypeOf(proto),grandBaseToString=objToString.call(grandProto);if(grandBaseToString==='[object '+classString+']')throw new
TypeError('malformed inheritance: '+classString);grandProto!==Object.prototype&&logger.log('unexpected inheritance: '+classString);function
mutableProtoPatcher(name){var originalMethod;if(!hop.call(proto,name))return;originalMethod=proto[name];function
replacement(var_args){var parent=getPrototypeOf(this),thisToString;if(parent!==proto){if(objToString.call(parent)!==baseToString)throw thisToString=objToString.call(this),thisToString===baseToString?new
TypeError('May not mutate internal state of a '+classString+'.prototype'):new TypeError('Unexpected: '+thisToString)};return originalMethod.apply(this,arguments)}Object.defineProperty(proto,name,{'value':replacement})}return mutableProtoPatcher}function
repair_MUTABLE_DATE_PROTO(){['setYear','setTime','setFullYear','setUTCFullYear','setMonth','setUTCMonth','setDate','setUTCDate','setHours','setUTCHours','setMinutes','setUTCMinutes','setSeconds','setUTCSeconds','setMilliseconds','setUTCMilliseconds'].forEach(makeMutableProtoPatcher(Date,'Date'))}function
repair_MUTABLE_WEAKMAP_PROTO(){['set','delete'].forEach(makeMutableProtoPatcher(WeakMap,'WeakMap'))}function
repair_NEED_TO_WRAP_FOREACH(){var forEach=Array.prototype.forEach;Object.defineProperty(Array.prototype,'forEach',{'value':function
forEachWrapper(callbackfn,opt_thisArg){return forEach.apply(this,arguments)}})}function
repair_NEEDS_DUMMY_SETTER(){var defProp=Object.defineProperty,gopd=Object.getOwnPropertyDescriptor;function
dummySetter(newValue){throw new TypeError('no setter for assigning: '+newValue)}dummySetter.prototype=null,rememberToTamperProof(dummySetter),defProp(Object,'defineProperty',{'value':function
setSetterDefProp(base,name,desc){var desc2,newDesc,oldDesc,result,testBase;if(typeof
desc.get==='function'&&desc.set===void 0){oldDesc=gopd(base,name);if(oldDesc)testBase={},defProp(testBase,name,oldDesc),defProp(testBase,name,desc),desc=gopd(testBase,name),desc.set===void
0&&(desc.set=dummySetter);else{if(objToString.call(base)==='[object HTMLFormElement]'){desc2={'get':desc.get},'enumerable'in
desc&&(desc2.enumerable=desc.enumerable),'configurable'in desc&&(desc2.configurable=desc.configurable),result=defProp(base,name,desc2),newDesc=gopd(base,name);if(newDesc.get===desc.get)return result}desc.set=dummySetter}}return defProp(base,name,desc)}}),NEEDS_DUMMY_SETTER_repaired=true}function
repair_ACCESSORS_INHERIT_AS_OWN(){var defProp=Object.defineProperty,freeze=Object.freeze,seal=Object.seal,gopn=Object.getOwnPropertyNames,gopd=Object.getOwnPropertyDescriptor,complaint='Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=637994 prohibits enumerable non-configurable accessor properties.';function
isBadAccessor(derived,name){var desc=gopd(derived,name),base,superDesc;return!desc||!('get'in
desc)?false:(base=getPrototypeOf(derived),base?(superDesc=gopd(base,name),!superDesc||!('get'in
superDesc)?false:desc.get&&!desc.configurable&&!superDesc.configurable&&desc.get===superDesc.get&&desc.set===superDesc.set&&desc.enumerable===superDesc.enumerable):false)}defProp(Object,'defineProperty',{'value':function
definePropertyWrapper(base,name,desc){var oldDesc=gopd(base,name),testBase={},fullDesc;oldDesc&&!isBadAccessor(base,name)&&defProp(testBase,name,oldDesc),defProp(testBase,name,desc),fullDesc=gopd(testBase,name);if('get'in
fullDesc&&fullDesc.enumerable&&!fullDesc.configurable)throw logger.warn(complaint),new
TypeError(complaint+' (Object: '+base+' Property: '+name+')');return defProp(base,name,fullDesc)}});function
ensureSealable(base){gopn(base).forEach(function(name){var desc=gopd(base,name);if('get'in
desc&&desc.enumerable)throw desc.configurable||logger.error('New symptom: \"'+name+'\" already non-configurable'),logger.warn(complaint),new
TypeError(complaint+' (During sealing. Object: '+base+' Property: '+name+')')})}defProp(Object,'freeze',{'value':function
freezeWrapper(base){return ensureSealable(base),freeze(base)}}),defProp(Object,'seal',{'value':function
sealWrapper(base){return ensureSealable(base),seal(base)}}),defProp(Object.prototype,'hasOwnProperty',{'value':function
hasOwnPropertyWrapper(name){return hop.call(this,name)&&!isBadAccessor(this,name)}}),defProp(Object,'getOwnPropertyDescriptor',{'value':function
getOwnPropertyDescriptorWrapper(base,name){return isBadAccessor(base,name)?void 0:gopd(base,name)}}),defProp(Object,'getOwnPropertyNames',{'value':function
getOwnPropertyNamesWrapper(base){return gopn(base).filter(function(name){return!isBadAccessor(base,name)})}})}function
repair_SORT_LEAKS_GLOBAL(){var unsafeSort=Array.prototype.sort;function sortWrapper(opt_comparefn){function
comparefnWrapper(x,y){return opt_comparefn(x,y)}return arguments.length===0?unsafeSort.call(this):unsafeSort.call(this,comparefnWrapper)}Object.defineProperty(Array.prototype,'sort',{'value':sortWrapper})}function
repair_REPLACE_LEAKS_GLOBAL(){var unsafeReplace=String.prototype.replace;function
replaceWrapper(searchValue,replaceValue){var safeReplaceValue=replaceValue;function
replaceValueWrapper(m1,m2,m3){return replaceValue(m1,m2,m3)}return typeof replaceValue==='function'&&(safeReplaceValue=replaceValueWrapper),unsafeReplace.call(this,searchValue,safeReplaceValue)}Object.defineProperty(String.prototype,'replace',{'value':replaceWrapper})}function
repair_CANT_GOPD_CALLER(){var unsafeGOPD=Object.getOwnPropertyDescriptor;function
gopdWrapper(base,name){try{return unsafeGOPD(base,name)}catch(err){if(err instanceof
TypeError&&typeof base==='function'&&(name==='caller'||name==='arguments'))return(function(message){function
fakePoison(){throw new TypeError(message)}return fakePoison.prototype=null,{'get':fakePoison,'set':fakePoison,'enumerable':false,'configurable':false}})(err.message);throw err}}Object.defineProperty(Object,'getOwnPropertyDescriptor',{'value':gopdWrapper})}function
repair_CANT_HASOWNPROPERTY_CALLER(){Object.defineProperty(Object.prototype,'hasOwnProperty',{'value':function
hopWrapper(name){return!!Object.getOwnPropertyDescriptor(this,name)}})}function
makeHarmless(magicName,func,path){var desc;function poison(){throw new TypeError('Cannot access property '+path)}poison.prototype=null,desc=Object.getOwnPropertyDescriptor(func,magicName);if(!desc&&Object.isExtensible(func)||desc.configurable){try{Object.defineProperty(func,magicName,{'get':poison,'set':poison,'configurable':false})}catch(cantPoisonErr){return'Poisoning failed with '+cantPoisonErr}return desc=Object.getOwnPropertyDescriptor(func,magicName),desc&&desc.get===poison&&desc.set===poison&&!desc.configurable?'Apparently poisoned':'Not poisoned'}if('get'in
desc||'set'in desc)return'Apparently safe';try{Object.defineProperty(func,magicName,{'value':desc.value===null?null:void
0,'writable':false,'configurable':false})}catch(cantFreezeHarmlessErr){return'Freezing harmless failed with '+cantFreezeHarmlessErr}return desc=Object.getOwnPropertyDescriptor(func,magicName),desc&&(desc.value===null||desc.value===void
0)&&!desc.writable&&!desc.configurable?'Apparently frozen harmless':'Did not freeze harmless'}function
repair_BUILTIN_LEAKS_CALLER(){ses.makeCallerHarmless=makeHarmless.bind(void 0,'caller')}function
repair_BUILTIN_LEAKS_ARGUMENTS(){ses.makeArgumentsHarmless=makeHarmless.bind(void
0,'arguments')}function repair_DELETED_BUILTINS_IN_OWN_NAMES(){var realGOPN=Object.getOwnPropertyNames,repairedHop=Object.prototype.hasOwnProperty;function
getOnlyRealOwnPropertyNames(base){return realGOPN(base).filter(function(name){return repairedHop.call(base,name)})}Object.defineProperty(Object,'getOwnPropertyNames',{'value':getOnlyRealOwnPropertyNames})}function
repair_GETOWNPROPDESC_OF_ITS_OWN_CALLER_FAILS(){var realGOPD=Object.getOwnPropertyDescriptor;function
GOPDWrapper(base,name){return realGOPD(base,name)}Object.defineProperty(Object,'getOwnPropertyDescriptor',{'value':GOPDWrapper})}function
repair_JSON_PARSE_PROTO_CONFUSION(){var unsafeParse=JSON.parse;function validate(plainJSON){var
proto;if(plainJSON!==Object(plainJSON))return;proto=getPrototypeOf(plainJSON);if(proto!==Object.prototype&&proto!==Array.prototype)throw new
TypeError('Parse resulted in invalid JSON. See http://code.google.com/p/v8/issues/detail?id=621');Object.keys(plainJSON).forEach(function(key){validate(plainJSON[key])})}Object.defineProperty(JSON,'parse',{'value':function
parseWrapper(text,opt_reviver){var result=unsafeParse(text);return validate(result),opt_reviver?unsafeParse(text,opt_reviver):result},'writable':true,'enumerable':false,'configurable':true})}function
repair_PARSEINT_STILL_PARSING_OCTAL(){var badParseInt=parseInt;function goodParseInt(n,radix){var
isHexOrOctal,isOct;return n=''+n,radix=+radix,isHexOrOctal=/^\s*[+-]?\s*0(x?)/.exec(n),isOct=isHexOrOctal?isHexOrOctal[1]!=='x':false,isOct&&(radix!==radix||0===radix)?badParseInt(n,10):badParseInt(n,radix)}parseInt=goodParseInt}function
repair_ASSIGN_CAN_OVERRIDE_FROZEN(){makeTamperProof=function simpleMakeTamperProof(){return Object.freeze}}function
repair_CANT_REDEFINE_NAN_TO_ITSELF(){var defProp=Object.defineProperty,attrs=['writable','get','set','enumerable','configurable'];defProp(Object,'defineProperty',{'value':function(base,name,desc){var
attr,i,len,oldDesc;try{return defProp(base,name,desc)}catch(err){oldDesc=Object.getOwnPropertyDescriptor(base,name);for(i=0,len=attrs.length;i<len;++i){attr=attrs[i];if(attr
in desc&&desc[attr]!==oldDesc[attr])throw err}if(!('value'in desc)||is(desc.value,oldDesc.value))return base;throw err}}})}severities=ses.severities,statuses=ses.statuses,baseKludges=[{'description':'Missing getOwnPropertyNames','test':test_MISSING_GETOWNPROPNAMES,'repair':void
0,'preSeverity':severities.NOT_SUPPORTED,'canRepair':false,'urls':[],'sections':['15.2.3.4'],'tests':['15.2.3.4-0-1']}],supportedKludges=[{'description':'Global object leaks from global function calls','test':test_GLOBAL_LEAKS_FROM_GLOBAL_FUNCTION_CALLS,'repair':void
0,'preSeverity':severities.NOT_ISOLATED,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=64250'],'sections':['10.2.1.2','10.2.1.2.6'],'tests':['10.4.3-1-8gs']},{'description':'Global object leaks from anonymous function calls','test':test_GLOBAL_LEAKS_FROM_ANON_FUNCTION_CALLS,'repair':void
0,'preSeverity':severities.NOT_ISOLATED,'canRepair':false,'urls':[],'sections':['10.4.3'],'tests':['S10.4.3_A1']},{'description':'Global leaks through strict this','test':test_GLOBAL_LEAKS_FROM_STRICT_THIS,'repair':void
0,'preSeverity':severities.NOT_ISOLATED,'canRepair':false,'urls':[],'sections':['10.4.3'],'tests':['10.4.3-1-8gs','10.4.3-1-8-s']},{'description':'Global object leaks from built-in methods','test':test_GLOBAL_LEAKS_FROM_BUILTINS,'repair':void
0,'preSeverity':severities.NOT_ISOLATED,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=51097','https://bugs.webkit.org/show_bug.cgi?id=58338','http://code.google.com/p/v8/issues/detail?id=1437','https://connect.microsoft.com/IE/feedback/details/685430/global-object-leaks-from-built-in-methods'],'sections':['15.2.4.4'],'tests':['S15.2.4.4_A14']},{'description':'Global object leaks from globally called built-in methods','test':test_GLOBAL_LEAKS_FROM_GLOBALLY_CALLED_BUILTINS,'repair':void
0,'preSeverity':severities.NOT_ISOLATED,'canRepair':false,'urls':[],'sections':['10.2.1.2','10.2.1.2.6','15.2.4.4'],'tests':['S15.2.4.4_A15']},{'description':'Object.freeze is missing','test':test_MISSING_FREEZE_ETC,'repair':repair_MISSING_FREEZE_ETC,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=55736'],'sections':['15.2.3.9'],'tests':['15.2.3.9-0-1']},{'description':'A function.prototype\'s descriptor lies','test':test_FUNCTION_PROTOTYPE_DESCRIPTOR_LIES,'repair':repair_FUNCTION_PROTOTYPE_DESCRIPTOR_LIES,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1530','http://code.google.com/p/v8/issues/detail?id=1570'],'sections':['15.2.3.3','15.2.3.6','15.3.5.2'],'tests':['S15.3.3.1_A4']},{'description':'Phantom callee on strict functions','test':test_MISSING_CALLEE_DESCRIPTOR,'repair':repair_MISSING_CALLEE_DESCRIPTOR,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':['https://bugs.webkit.org/show_bug.cgi?id=55537'],'sections':['15.2.3.4'],'tests':['S15.2.3.4_A1_T1']},{'description':'Strict delete returned false rather than throwing','test':test_STRICT_DELETE_RETURNS_FALSE,'repair':void
0,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':false,'urls':['https://connect.microsoft.com/IE/feedback/details/685432/strict-delete-sometimes-returns-false-rather-than-throwing'],'sections':['11.4.1'],'tests':['S11.4.1_A5']},{'description':'Non-deletable RegExp statics are a global communication channel','test':test_REGEXP_CANT_BE_NEUTERED,'repair':repair_REGEXP_CANT_BE_NEUTERED,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['https://bugzilla.mozilla.org/show_bug.cgi?id=591846','http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable','https://connect.microsoft.com/IE/feedback/details/685439/non-deletable-regexp-statics-are-a-global-communication-channel'],'sections':['11.4.1'],'tests':['S11.4.1_A5']},{'description':'RegExp.exec leaks match globally','test':test_REGEXP_TEST_EXEC_UNSAFE,'repair':repair_REGEXP_TEST_EXEC_UNSAFE,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1393','http://code.google.com/p/chromium/issues/detail?id=75740','https://bugzilla.mozilla.org/show_bug.cgi?id=635017','http://code.google.com/p/google-caja/issues/detail?id=528'],'sections':['15.10.6.2'],'tests':['S15.10.6.2_A12']},{'description':'Function.prototype.bind is missing','test':test_MISSING_BIND,'repair':repair_MISSING_BIND,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':['https://bugs.webkit.org/show_bug.cgi?id=26382','https://bugs.webkit.org/show_bug.cgi?id=42371'],'sections':['15.3.4.5'],'tests':['S15.3.4.5_A3']},{'description':'Function.prototype.bind calls .apply rather than [[Call]]','test':test_BIND_CALLS_APPLY,'repair':repair_MISSING_BIND,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=892','http://code.google.com/p/v8/issues/detail?id=828'],'sections':['15.3.4.5.1'],'tests':['S15.3.4.5_A4']},{'description':'Function.prototype.bind does not curry construction','test':test_BIND_CANT_CURRY_NEW,'repair':void
0,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=26382#c29'],'sections':['15.3.4.5.2'],'tests':['S15.3.4.5_A5']},{'description':'Date.prototype is a global communication channel','test':test_MUTABLE_DATE_PROTO,'repair':repair_MUTABLE_DATE_PROTO,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['http://code.google.com/p/google-caja/issues/detail?id=1362'],'sections':['15.9.5'],'tests':[]},{'description':'WeakMap.prototype is a global communication channel','test':test_MUTABLE_WEAKMAP_PROTO,'repair':repair_MUTABLE_WEAKMAP_PROTO,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['https://bugzilla.mozilla.org/show_bug.cgi?id=656828'],'sections':[],'tests':[]},{'description':'Array forEach cannot be frozen while in progress','test':test_NEED_TO_WRAP_FOREACH,'repair':repair_NEED_TO_WRAP_FOREACH,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1447'],'sections':['15.4.4.18'],'tests':['S15.4.4.18_A1','S15.4.4.18_A2']},{'description':'Workaround undiagnosed need for dummy setter','test':test_NEEDS_DUMMY_SETTER,'repair':repair_NEEDS_DUMMY_SETTER,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':[],'sections':[],'tests':[]},{'description':'Getter on HTMLFormElement disappears','test':test_FORM_GETTERS_DISAPPEAR,'repair':repair_NEEDS_DUMMY_SETTER,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':['http://code.google.com/p/chromium/issues/detail?id=94666','http://code.google.com/p/v8/issues/detail?id=1651','http://code.google.com/p/google-caja/issues/detail?id=1401'],'sections':['15.2.3.6'],'tests':['S15.2.3.6_A1']},{'description':'Accessor properties inherit as own properties','test':test_ACCESSORS_INHERIT_AS_OWN,'repair':repair_ACCESSORS_INHERIT_AS_OWN,'preSeverity':severities.UNSAFE_SPEC_VIOLATION,'canRepair':true,'urls':['https://bugzilla.mozilla.org/show_bug.cgi?id=637994'],'sections':['8.6.1','15.2.3.6'],'tests':['S15.2.3.6_A2']},{'description':'Array sort leaks global','test':test_SORT_LEAKS_GLOBAL,'repair':repair_SORT_LEAKS_GLOBAL,'preSeverity':severities.NOT_ISOLATED,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1360'],'sections':['15.4.4.11'],'tests':['S15.4.4.11_A8']},{'description':'String replace leaks global','test':test_REPLACE_LEAKS_GLOBAL,'repair':repair_REPLACE_LEAKS_GLOBAL,'preSeverity':severities.NOT_ISOLATED,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1360','https://connect.microsoft.com/IE/feedback/details/685928/bad-this-binding-for-callback-in-string-prototype-replace'],'sections':['15.5.4.11'],'tests':['S15.5.4.11_A12']},{'description':'getOwnPropertyDescriptor on strict \"caller\" throws','test':test_CANT_GOPD_CALLER,'repair':repair_CANT_GOPD_CALLER,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':true,'urls':['https://connect.microsoft.com/IE/feedback/details/685436/getownpropertydescriptor-on-strict-caller-throws'],'sections':['15.2.3.3','13.2','13.2.3'],'tests':['S13.2_A6_T1']},{'description':'strict_function.hasOwnProperty(\"caller\") throws','test':test_CANT_HASOWNPROPERTY_CALLER,'repair':repair_CANT_HASOWNPROPERTY_CALLER,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':true,'urls':['https://bugs.webkit.org/show_bug.cgi?id=63398#c3'],'sections':['15.2.4.5','13.2','13.2.3'],'tests':['S13.2_A7_T1']},{'description':'Cannot \"in\" caller on strict function','test':test_CANT_IN_CALLER,'repair':void
0,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=63398'],'sections':['11.8.7','13.2','13.2.3'],'tests':['S13.2_A8_T1']},{'description':'Cannot \"in\" arguments on strict function','test':test_CANT_IN_ARGUMENTS,'repair':void
0,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=63398'],'sections':['11.8.7','13.2','13.2.3'],'tests':['S13.2_A8_T2']},{'description':'Strict \"caller\" not poisoned','test':test_STRICT_CALLER_NOT_POISONED,'repair':void
0,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':false,'urls':[],'sections':['13.2'],'tests':['S13.2.3_A1']},{'description':'Strict \"arguments\" not poisoned','test':test_STRICT_ARGUMENTS_NOT_POISONED,'repair':void
0,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':false,'urls':[],'sections':['13.2'],'tests':['S13.2.3_A1']},{'description':'Built in functions leak \"caller\"','test':test_BUILTIN_LEAKS_CALLER,'repair':repair_BUILTIN_LEAKS_CALLER,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1643','http://code.google.com/p/v8/issues/detail?id=1548','https://bugzilla.mozilla.org/show_bug.cgi?id=591846','http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable'],'sections':[],'tests':['Sbp_A10_T1']},{'description':'Built in functions leak \"arguments\"','test':test_BUILTIN_LEAKS_ARGUMENTS,'repair':repair_BUILTIN_LEAKS_ARGUMENTS,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1643','http://code.google.com/p/v8/issues/detail?id=1548','https://bugzilla.mozilla.org/show_bug.cgi?id=591846','http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable'],'sections':[],'tests':['Sbp_A10_T2']},{'description':'Bound functions leak \"caller\"','test':test_BOUND_FUNCTION_LEAKS_CALLER,'repair':repair_MISSING_BIND,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=893','https://bugs.webkit.org/show_bug.cgi?id=63398'],'sections':['15.3.4.5'],'tests':['S13.2.3_A1','S15.3.4.5_A1']},{'description':'Bound functions leak \"arguments\"','test':test_BOUND_FUNCTION_LEAKS_ARGUMENTS,'repair':repair_MISSING_BIND,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=893','https://bugs.webkit.org/show_bug.cgi?id=63398'],'sections':['15.3.4.5'],'tests':['S13.2.3_A1','S15.3.4.5_A2']},{'description':'Deleting built-in leaves phantom behind','test':test_DELETED_BUILTINS_IN_OWN_NAMES,'repair':repair_DELETED_BUILTINS_IN_OWN_NAMES,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':true,'urls':['https://bugs.webkit.org/show_bug.cgi?id=70207'],'sections':['15.2.3.4'],'tests':[]},{'description':'getOwnPropertyDescriptor on its own \"caller\" fails','test':test_GETOWNPROPDESC_OF_ITS_OWN_CALLER_FAILS,'repair':repair_GETOWNPROPDESC_OF_ITS_OWN_CALLER_FAILS,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1769'],'sections':['13.2','15.2.3.3'],'tests':[]},{'description':'JSON.parse confused by \"__proto__\"','test':test_JSON_PARSE_PROTO_CONFUSION,'repair':repair_JSON_PARSE_PROTO_CONFUSION,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=621','http://code.google.com/p/v8/issues/detail?id=1310'],'sections':['15.12.2'],'tests':['S15.12.2_A1']},{'description':'Prototype still mutable on non-extensible object','test':test_PROTO_NOT_FROZEN,'repair':void
0,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=65832','https://bugs.webkit.org/show_bug.cgi?id=78438'],'sections':['8.6.2'],'tests':['S8.6.2_A8']},{'description':'Prototype still redefinable on non-extensible object','test':test_PROTO_REDEFINABLE,'repair':void
0,'preSeverity':severities.NOT_OCAP_SAFE,'canRepair':false,'urls':['https://bugs.webkit.org/show_bug.cgi?id=65832'],'sections':['8.6.2'],'tests':['S8.6.2_A8']},{'description':'Strict eval function leaks variable definitions','test':test_STRICT_EVAL_LEAKS_GLOBALS,'repair':void
0,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':false,'urls':['http://code.google.com/p/v8/issues/detail?id=1624'],'sections':['10.4.2.1'],'tests':['S10.4.2.1_A1']},{'description':'parseInt still parsing octal','test':test_PARSEINT_STILL_PARSING_OCTAL,'repair':repair_PARSEINT_STILL_PARSING_OCTAL,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':true,'urls':['http://code.google.com/p/v8/issues/detail?id=1645'],'sections':['15.1.2.2'],'tests':['S15.1.2.2_A5.1_T1']},{'description':'E4X literals allowed in strict code','test':test_STRICT_E4X_LITERALS_ALLOWED,'repair':void
0,'preSeverity':severities.NOT_ISOLATED,'canRepair':false,'urls':['https://bugzilla.mozilla.org/show_bug.cgi?id=695577','https://bugzilla.mozilla.org/show_bug.cgi?id=695579'],'sections':[],'tests':[]},{'description':'Assignment can override frozen inherited property','test':test_ASSIGN_CAN_OVERRIDE_FROZEN,'repair':repair_ASSIGN_CAN_OVERRIDE_FROZEN,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':false,'urls':['http://code.google.com/p/v8/issues/detail?id=1169','https://mail.mozilla.org/pipermail/es-discuss/2011-November/017997.html'],'sections':['8.12.4'],'tests':['15.2.3.6-4-405']},{'description':'Cannot redefine global NaN to itself','test':test_CANT_REDEFINE_NAN_TO_ITSELF,'repair':repair_CANT_REDEFINE_NAN_TO_ITSELF,'preSeverity':severities.SAFE_SPEC_VIOLATION,'canRepair':true,'urls':[],'sections':['8.12.9','15.1.1.1'],'tests':[]},{'description':'Error instances have unexpected properties','test':test_UNEXPECTED_ERROR_PROPERTIES,'repair':void
0,'preSeverity':severities.NEW_SYMPTOM,'canRepair':false,'urls':[],'sections':[],'tests':[]},{'description':'getOwnPropertyNames lies, hiding some own properties','test':test_GET_OWN_PROPERTY_NAME_LIES,'repair':void
0,'preSeverity':severities.NOT_ISOLATED,'canRepair':false,'urls':['https://bugzilla.mozilla.org/show_bug.cgi?id=726477'],'sections':[],'tests':[]}],aboutTo=void
0;function testRepairReport(kludges){var beforeFailures=strictMapFn(kludges,function(kludge){return aboutTo=['pre test: ',kludge.description],kludge.test()}),repairs=[],afterFailures;return strictForEachFn(kludges,function(kludge,i){var
repair;beforeFailures[i]&&(repair=kludge.repair,repair&&repairs.lastIndexOf(repair)===-1&&(aboutTo=['repair: ',kludge.description],repair(),repairs.push(repair)))}),afterFailures=strictMapFn(kludges,function(kludge){return aboutTo=['post test: ',kludge.description],kludge.test()}),Object.isFrozen&&Object.isFrozen(Array.prototype.forEach)&&repair_NEED_TO_WRAP_FOREACH(),strictMapFn(kludges,function(kludge,i){var
status=statuses.ALL_FINE,postSeverity=severities.SAFE,beforeFailure=beforeFailures[i],afterFailure=afterFailures[i];if(beforeFailure)afterFailure?kludge.repair?(postSeverity=kludge.preSeverity,status=statuses.REPAIR_FAILED):(kludge.canRepair||(postSeverity=kludge.preSeverity),status=statuses.NOT_REPAIRED):kludge.repair?kludge.canRepair?(status=statuses.REPAIRED):(postSeverity=kludge.preSeverity,status=statuses.REPAIRED_UNSAFELY):(status=statuses.ACCIDENTALLY_REPAIRED);else
if(afterFailure)(kludge.repair||!kludge.canRepair)&&(postSeverity=kludge.preSeverity),status=statuses.BROKEN_BY_OTHER_ATTEMPTED_REPAIRS;return(typeof
beforeFailure==='string'||typeof afterFailure==='string')&&(postSeverity=severities.NEW_SYMPTOM),ses.updateMaxSeverity(postSeverity),{'description':kludge.description,'preSeverity':kludge.preSeverity,'canRepair':kludge.canRepair,'urls':kludge.urls,'sections':kludge.sections,'tests':kludge.tests,'status':status,'postSeverity':postSeverity,'beforeFailure':beforeFailure,'afterFailure':afterFailure}})}try{reports=testRepairReport(baseKludges),ses.ok()&&reports.push.apply(reports,testRepairReport(supportedKludges)),logger.reportRepairs(reports)}catch(err){ses.updateMaxSeverity(ses.severities.NOT_SUPPORTED),during=aboutTo?'('+aboutTo.join('')+') ':'',logger.error('ES5 Repair '+during+'failed with: ',err)}logger.reportMax()})(this),(function
WeakMapModule(){'use strict';var HIDDEN_NAME,ab,defProp,gopn,hop,originalProps,u8s;if(typeof
ses!=='undefined'&&ses.ok&&!ses.ok())return;if(typeof WeakMap==='function')return;hop=Object.prototype.hasOwnProperty,gopn=Object.getOwnPropertyNames,defProp=Object.defineProperty,originalProps={},gopn(Object).forEach(function(name){originalProps[name]=Object[name]}),HIDDEN_NAME='ident:'+Math.random()+'___',typeof
crypto!=='undefined'&&typeof crypto.getRandomValues==='function'&&typeof ArrayBuffer==='function'&&typeof
Uint8Array==='function'&&(ab=new ArrayBuffer(25),u8s=new Uint8Array(ab),crypto.getRandomValues(u8s),HIDDEN_NAME='rand:'+Array.prototype.map.call(u8s,function(u8){return(u8%36).toString(36)}).join('')+'___'),defProp(Object,'getOwnPropertyNames',{'value':function
fakeGetOwnPropertyNames(obj){return gopn(obj).filter(function(name){return name!==HIDDEN_NAME})}}),'getPropertyNames'in
Object&&defProp(Object,'getPropertyNames',{'value':function fakeGetPropertyNames(obj){return originalProps.getPropertyNames(obj).filter(function(name){return name!==HIDDEN_NAME})}});function
getHiddenRecord(key){var gets,hiddenRecord,vals;if(key!==Object(key))throw new TypeError('Not an object: '+key);return hiddenRecord=key[HIDDEN_NAME],hiddenRecord&&hiddenRecord.key===key?hiddenRecord:originalProps.isExtensible(key)?(gets=[],vals=[],hiddenRecord={'key':key,'gets':gets,'vals':vals},defProp(key,HIDDEN_NAME,{'value':hiddenRecord,'writable':false,'enumerable':false,'configurable':false}),hiddenRecord):void
0}(function(){var oldFreeze=Object.freeze,oldPreventExtensions,oldSeal;defProp(Object,'freeze',{'value':function
identifyingFreeze(obj){return getHiddenRecord(obj),oldFreeze(obj)}}),oldSeal=Object.seal,defProp(Object,'seal',{'value':function
identifyingSeal(obj){return getHiddenRecord(obj),oldSeal(obj)}}),oldPreventExtensions=Object.preventExtensions,defProp(Object,'preventExtensions',{'value':function
identifyingPreventExtensions(obj){return getHiddenRecord(obj),oldPreventExtensions(obj)}})})();function
constFunc(func){return func.prototype=null,Object.freeze(func)}WeakMap=function(){var
keys=[],vals=[];function get___(key,opt_default){var hr=getHiddenRecord(key),i,vs;return hr?(i=hr.gets.indexOf(get___),vs=hr.vals):(i=keys.indexOf(key),vs=vals),i>=0?vs[i]:opt_default}function
has___(key){var hr=getHiddenRecord(key),i;return i=hr?hr.gets.indexOf(get___):keys.indexOf(key),i>=0}function
set___(key,value){var hr=getHiddenRecord(key),i;hr?(i=hr.gets.indexOf(get___),i>=0?(hr.vals[i]=value):(hr.gets.push(get___),hr.vals.push(value))):(i=keys.indexOf(key),i>=0?(vals[i]=value):(keys.push(key),vals.push(value)))}function
delete___(key){var hr=getHiddenRecord(key),i;return hr?(i=hr.gets.indexOf(get___),i>=0&&(hr.gets.splice(i,1),hr.vals.splice(i,1))):(i=keys.indexOf(key),i>=0&&(keys.splice(i,1),vals.splice(i,1))),true}return Object.create(WeakMap.prototype,{'get___':{'value':constFunc(get___)},'has___':{'value':constFunc(has___)},'set___':{'value':constFunc(set___)},'delete___':{'value':constFunc(delete___)}})},WeakMap.prototype=Object.create(Object.prototype,{'get':{'value':function
get(key,opt_default){return this.get___(key,opt_default)},'writable':true,'configurable':true},'has':{'value':function
has(key){return this.has___(key)},'writable':true,'configurable':true},'set':{'value':function
set(key,value){this.set___(key,value)},'writable':true,'configurable':true},'delete':{'value':function
remove(key){return this.delete___(key)},'writable':true,'configurable':true}})})(),(function(){'use strict';var
create,freeze;create=Object.create,freeze=Object.freeze;function constFunc(func){return func.prototype=null,freeze(func)}function
assertString(x){if('string'!==typeof x)throw new TypeError('Not a string: '+String(x));return x}StringMap=function
StringMap(){var objAsMap=create(null);return freeze({'get':constFunc(function(key){return objAsMap[assertString(key)+'$']}),'set':constFunc(function(key,value){objAsMap[assertString(key)+'$']=value}),'has':constFunc(function(key){return assertString(key)+'$'in
objAsMap}),'delete':constFunc(function(key){return delete objAsMap[assertString(key)+'$']})})}})(),(function
whitelistModule(){'use strict';var t;ses||(ses={}),t=true,ses.whitelist={'cajaVM':{'log':t,'tamperProof':t,'constFunc':t,'def':t,'is':t,'compileExpr':t,'compileModule':t,'compileProgram':t,'eval':t,'Function':t,'sharedImports':t,'makeImports':t,'copyToImports':t,'callWithEjector':t,'eject':t,'GuardT':{'coerce':t},'makeTableGuard':t,'Trademark':{'stamp':t},'guard':t,'passesGuard':t,'stamp':t,'makeSealerUnsealerPair':t,'makeArrayLike':{}},'WeakMap':{'prototype':{'get':t,'set':t,'has':t,'delete':t}},'StringMap':{'prototype':{}},'escape':t,'unescape':t,'Object':{'getPropertyDescriptor':t,'getPropertyNames':t,'is':t,'prototype':{'__defineGetter__':t,'__defineSetter__':t,'__lookupGetter__':t,'__lookupSetter__':t,'constructor':'*','toString':'*','toLocaleString':'*','valueOf':t,'hasOwnProperty':t,'isPrototypeOf':t,'propertyIsEnumerable':t},'getPrototypeOf':t,'getOwnPropertyDescriptor':t,'getOwnPropertyNames':t,'create':t,'defineProperty':t,'defineProperties':t,'seal':t,'freeze':t,'preventExtensions':t,'isSealed':t,'isFrozen':t,'isExtensible':t,'keys':t},'NaN':t,'Infinity':t,'undefined':t,'parseInt':t,'parseFloat':t,'isNaN':t,'isFinite':t,'decodeURI':t,'decodeURIComponent':t,'encodeURI':t,'encodeURIComponent':t,'Function':{'prototype':{'apply':t,'call':t,'bind':t,'prototype':'*','length':'*','arity':'*','name':'*'}},'Array':{'prototype':{'concat':t,'join':t,'pop':t,'push':t,'reverse':t,'shift':t,'slice':t,'sort':t,'splice':t,'unshift':t,'indexOf':t,'lastIndexOf':t,'every':t,'some':t,'forEach':t,'map':t,'filter':t,'reduce':t,'reduceRight':t,'length':'skip'},'isArray':t},'String':{'prototype':{'substr':t,'anchor':t,'big':t,'blink':t,'bold':t,'fixed':t,'fontcolor':t,'fontsize':t,'italics':t,'link':t,'small':t,'strike':t,'sub':t,'sup':t,'trimLeft':t,'trimRight':t,'valueOf':t,'charAt':t,'charCodeAt':t,'concat':t,'indexOf':t,'lastIndexOf':t,'localeCompare':t,'match':t,'replace':t,'search':t,'slice':t,'split':t,'substring':t,'toLowerCase':t,'toLocaleLowerCase':t,'toUpperCase':t,'toLocaleUpperCase':t,'trim':t,'length':'*'},'fromCharCode':t},'Boolean':{'prototype':{'valueOf':t}},'Number':{'prototype':{'valueOf':t,'toFixed':t,'toExponential':t,'toPrecision':t},'MAX_VALUE':t,'MIN_VALUE':t,'NaN':t,'NEGATIVE_INFINITY':t,'POSITIVE_INFINITY':t},'Math':{'E':t,'LN10':t,'LN2':t,'LOG2E':t,'LOG10E':t,'PI':t,'SQRT1_2':t,'SQRT2':t,'abs':t,'acos':t,'asin':t,'atan':t,'atan2':t,'ceil':t,'cos':t,'exp':t,'floor':t,'log':t,'max':t,'min':t,'pow':t,'random':t,'round':t,'sin':t,'sqrt':t,'tan':t},'Date':{'prototype':{'getYear':t,'setYear':t,'toGMTString':t,'toDateString':t,'toTimeString':t,'toLocaleString':t,'toLocaleDateString':t,'toLocaleTimeString':t,'getTime':t,'getFullYear':t,'getUTCFullYear':t,'getMonth':t,'getUTCMonth':t,'getDate':t,'getUTCDate':t,'getDay':t,'getUTCDay':t,'getHours':t,'getUTCHours':t,'getMinutes':t,'getUTCMinutes':t,'getSeconds':t,'getUTCSeconds':t,'getMilliseconds':t,'getUTCMilliseconds':t,'getTimezoneOffset':t,'setTime':t,'setFullYear':t,'setUTCFullYear':t,'setMonth':t,'setUTCMonth':t,'setDate':t,'setUTCDate':t,'setHours':t,'setUTCHours':t,'setMinutes':t,'setUTCMinutes':t,'setSeconds':t,'setUTCSeconds':t,'setMilliseconds':t,'setUTCMilliseconds':t,'toUTCString':t,'toISOString':t,'toJSON':t},'parse':t,'UTC':t,'now':t},'RegExp':{'prototype':{'exec':t,'test':t,'source':'*','global':'*','ignoreCase':'*','multiline':'*','lastIndex':'*','sticky':'*'}},'Error':{'prototype':{'name':'*','message':'*'}},'EvalError':{'prototype':t},'RangeError':{'prototype':t},'ReferenceError':{'prototype':t},'SyntaxError':{'prototype':t},'TypeError':{'prototype':t},'URIError':{'prototype':t},'JSON':{'parse':t,'stringify':t}}})(),(function
atLeastFreeVarNamesModule(){'use strict';ses||(ses={});function LIMIT_SRC(programSrc){if(/[^\u0000-\u007f]/.test(programSrc))throw new
EvalError('Non-ascii text not yet supported');if(/\\u/.test(programSrc))throw new
EvalError('Backslash-u escape encoded text not yet supported')}function SHOULD_MATCH_IDENTIFIER(){return/(\w|\$)+/g}ses.atLeastFreeVarNames=function
atLeastFreeVarNames(programSrc){var a,found,name,regexp,result;programSrc=String(programSrc),LIMIT_SRC(programSrc),regexp=SHOULD_MATCH_IDENTIFIER(),result=[],found=StringMap();while(a=regexp.exec(programSrc))name=a[0],found.has(name)||(result.push(name),found.set(name,true));return result}})(),ses.startSES=function(global,whitelist,atLeastFreeVarNames,extensions){'use strict';var
EMULATE_LEGACY_GETTERS_SETTERS,TAME_GLOBAL_EVAL,cleaning,create,defProp,dirty,freeze,getProto,gopd,gopn,hop,keys,propertyReports,sharedImports,tamperProof,whiteTable;TAME_GLOBAL_EVAL=false,EMULATE_LEGACY_GETTERS_SETTERS=true,dirty=true,hop=Object.prototype.hasOwnProperty,getProto=Object.getPrototypeOf,defProp=Object.defineProperty,gopd=Object.getOwnPropertyDescriptor,gopn=Object.getOwnPropertyNames,keys=Object.keys,freeze=Object.freeze,create=Object.create;function
constFunc(func){return func.prototype=null,freeze(func)}function fail(str){debugger;throw new
EvalError(str)}typeof WeakMap==='undefined'&&fail('No built-in WeakMaps, so WeakMap.js must be loaded first'),EMULATE_LEGACY_GETTERS_SETTERS?(function(){function
legacyDefineGetter(sprop,getter){sprop=''+sprop,hop.call(this,sprop)?defProp(this,sprop,{'get':getter}):defProp(this,sprop,{'get':getter,'set':undefined,'enumerable':true,'configurable':true})}legacyDefineGetter.prototype=null,defProp(Object.prototype,'__defineGetter__',{'value':legacyDefineGetter,'writable':false,'enumerable':false,'configurable':false});function
legacyDefineSetter(sprop,setter){sprop=''+sprop,hop.call(this,sprop)?defProp(this,sprop,{'set':setter}):defProp(this,sprop,{'get':undefined,'set':setter,'enumerable':true,'configurable':true})}legacyDefineSetter.prototype=null,defProp(Object.prototype,'__defineSetter__',{'value':legacyDefineSetter,'writable':false,'enumerable':false,'configurable':false});function
legacyLookupGetter(sprop){var base,desc;sprop=''+sprop,base=this,desc=void 0;while(base&&!(desc=gopd(base,sprop)))base=getProto(base);return desc&&desc.get}legacyLookupGetter.prototype=null,defProp(Object.prototype,'__lookupGetter__',{'value':legacyLookupGetter,'writable':false,'enumerable':false,'configurable':false});function
legacyLookupSetter(sprop){var base,desc;sprop=''+sprop,base=this,desc=void 0;while(base&&!(desc=gopd(base,sprop)))base=getProto(base);return desc&&desc.set}legacyLookupSetter.prototype=null,defProp(Object.prototype,'__lookupSetter__',{'value':legacyLookupSetter,'writable':false,'enumerable':false,'configurable':false})})():(delete
Object.prototype.__defineGetter__,delete Object.prototype.__defineSetter__,delete
Object.prototype.__lookupGetter__,delete Object.prototype.__lookupSetter__),tamperProof=ses.makeDelayedTamperProof(),sharedImports=create(null),(function
startSESPrelude(){var unsafeEval=eval,UnsafeFunction=Function,defended,defending,directivePattern,extensionsRecord,makeArrayLike,requirePattern;function
verifyStrictProgram(programSrc){try{UnsafeFunction('\"use strict\";'+programSrc)}catch(err){throw err}}function
verifyStrictExpression(exprSrc){verifyStrictProgram(exprSrc+';'),verifyStrictProgram('( '+exprSrc+'\n);')}function
makeImports(){var imports=create(null);return copyToImports(imports,sharedImports),imports}function
copyToImports(imports,from){return gopn(from).forEach(function(name){var desc=gopd(from,name);desc.enumerable=false,desc.configurable=true,defProp(imports,name,desc)}),imports}function
makeScopeObject(imports,freeNames){var scopeObject=create(null);return freeNames.forEach(function
interceptName(name){var desc=gopd(imports,name);(!desc||desc.writable!==false||desc.configurable)&&(desc={'get':function
scopedGet(){var result;if(name in imports){result=imports[name];if(typeof result==='function');return result}throw new
ReferenceError('\"'+name+'\" not in scope')},'set':function scopedSet(newValue){throw name
in imports&&(imports[name]=newValue),new TypeError('Cannot set \"'+name+'\"')},'enumerable':false}),desc.enumerable=false,defProp(scopeObject,name,desc)}),freeze(scopeObject)}function
securableWrapperSrc(exprSrc,opt_sourcePosition){return verifyStrictExpression(exprSrc),'(function() { with (this) { return function() { \"use strict\"; return ( '+exprSrc+'\n'+' );\n'+' };\n'+' }\n'+'})'}ses.securableWrapperSrc=securableWrapperSrc;function
makeCompiledExpr(wrapper,freeNames){dirty&&fail('Initial cleaning failed');function
compiledCode(imports){var scopeObject=makeScopeObject(imports,freeNames);return wrapper.call(scopeObject).call(imports)}return compiledCode.prototype=null,compiledCode}ses.makeCompiledExpr=makeCompiledExpr;function
compileExpr(exprSrc,opt_sourcePosition){var wrapperSrc=securableWrapperSrc(exprSrc,opt_sourcePosition),wrapper=unsafeEval(wrapperSrc),freeNames=atLeastFreeVarNames(exprSrc),result=makeCompiledExpr(wrapper,freeNames);return freeze(result)}directivePattern=/^['"](?:\w|\s)*['"]$/m,requirePattern=/^(?:\w*\s*(?:\w|\$|\.)*\s*=)?\s*require\s*\(\s*['"]((?:\w|\$|\.|\/)+)['"]\s*\)$/m;function
getRequirements(modSrc){var result=[],stmts=modSrc.split(';'),i=0,ilen=stmts.length,m,stmt;for(;i<ilen;++i){stmt=stmts[i].trim();if(stmt!==''){if(!directivePattern.test(stmt))break}}for(;i<ilen;++i){stmt=stmts[i].trim();if(stmt!==''){m=requirePattern.exec(stmt);if(!m)break;result.push(m[1])}}return freeze(result)}function
compileModule(modSrc,opt_sourcePosition){var exprSrc='(function() {'+modSrc+'}).call(this)',wrapperSrc=securableWrapperSrc(exprSrc,opt_sourcePosition),wrapper=unsafeEval(wrapperSrc),freeNames=atLeastFreeVarNames(exprSrc),moduleMaker=makeCompiledExpr(wrapper,freeNames);return moduleMaker.requirements=getRequirements(modSrc),freeze(moduleMaker)}function
FakeFunction(var_args){var params=[].slice.call(arguments,0),body=params.pop(),exprSrc;return body=String(body||''),params=params.join(','),exprSrc='(function('+params+'\n){'+body+'})',compileExpr(exprSrc)(sharedImports)}FakeFunction.prototype=UnsafeFunction.prototype,FakeFunction.prototype.constructor=FakeFunction,global.Function=FakeFunction;function
fakeEval(src){try{verifyStrictExpression(src)}catch(x){src='(function() {'+src+'\n}).call(this)'}return compileExpr(src)(sharedImports)}TAME_GLOBAL_EVAL&&(global.eval=fakeEval),defended=WeakMap(),defending=WeakMap();function
def(node){var defendingList=[];function recur(val){var t;if(!val)return;t=typeof
val;if(t==='number'||t==='string'||t==='boolean')return;if(defended.get(val)||defending.get(val))return;defending.set(val,true),defendingList.push(val),tamperProof(val),recur(getProto(val)),gopn(val).forEach(function(p){var
desc;if(typeof val==='function'&&(p==='caller'||p==='arguments'))return;desc=gopd(val,p),recur(desc.value),recur(desc.get),recur(desc.set)})}try{recur(node)}catch(err){throw defending=WeakMap(),err}return defendingList.forEach(function(obj){defended.set(obj,true)}),node}(function(){var
itemMap=WeakMap(),lengthMap=WeakMap(),nativeProxies;function lengthGetter(){var getter=lengthMap.get(this);return getter?getter():void
0}constFunc(lengthGetter),nativeProxies=global.Proxy&&(function(){var obj={'0':'hi'},p=global.Proxy.create({'get':function(){var
P=arguments[0];return typeof P!=='string'&&(P=arguments[1]),obj[P]}});return p[0]==='hi'})(),nativeProxies?(function(){function
ArrayLike(proto,getItem,getLength){var obj;if(typeof proto!=='object')throw new TypeError('Expected proto to be an object.');if(!(proto
instanceof ArrayLike))throw new TypeError('Expected proto to be instanceof ArrayLike.');return obj=create(proto),itemMap.set(obj,getItem),lengthMap.set(obj,getLength),obj}function
ownPropDesc(P){return P=''+P,P==='length'?{'get':lengthGetter}:typeof P==='number'||P===''+
+P?{'get':constFunc(function(){var getter=itemMap.get(this);return getter?getter(+P):void
0}),'enumerable':true,'configurable':true}:void 0}function propDesc(P){var opd=ownPropDesc(P);return opd||gopd(Object.prototype,P)}function
has(P){return P=''+P,P==='length'||typeof P==='number'||P===''+ +P||P in Object.prototype}function
hasOwn(P){return P=''+P,P==='length'||typeof P==='number'||P===''+ +P}function getPN(){var
result=getOwnPN(),objPropNames=gopn(Object.prototype);return result.push.apply(result,objPropNames),result}function
getOwnPN(){var lenGetter=lengthMap.get(this),i,len,result;if(!lenGetter)return;len=lenGetter(),result=['length'];for(i=0;i<len;++i)result.push(''+i);return result}function
del(P){return P=''+P,!(P==='length'||''+ +P===P)}ArrayLike.prototype=global.Proxy.create({'getPropertyDescriptor':propDesc,'getOwnPropertyDescriptor':ownPropDesc,'has':has,'hasOwn':hasOwn,'getPropertyNames':getPN,'getOwnPropertyNames':getOwnPN,'delete':del,'fix':function(){return}},Object.prototype),tamperProof(ArrayLike),makeArrayLike=function(){return ArrayLike}})():(function(){var
BiggestArrayLike,maxLen;function nextUInt31PowerOf2(v){return v&=2147483647,v|=v>>1,v|=v>>2,v|=v>>4,v|=v>>8,v|=v>>16,v+1}BiggestArrayLike=void
0,maxLen=0,makeArrayLike=function(length){var BAL,i,len;if(!BiggestArrayLike||length>maxLen){len=nextUInt31PowerOf2(length),BAL=function(proto,getItem,getLength){var
obj;if(typeof proto!=='object')throw new TypeError('Expected proto to be an object.');if(!(proto
instanceof BAL))throw new TypeError('Expected proto to be instanceof ArrayLike.');return obj=create(proto),itemMap.set(obj,getItem),lengthMap.set(obj,getLength),obj};for(i=0;i<len;++i)(function(j){function
get(){return itemMap.get(this)(j)}defProp(BAL.prototype,j,{'get':constFunc(get),'enumerable':true})})(i);defProp(BAL.prototype,'length',{'get':lengthGetter}),tamperProof(BAL),tamperProof(BAL.prototype),BiggestArrayLike=BAL,maxLen=len}return BiggestArrayLike}})()})(),global.cajaVM={'log':constFunc(function
log(str){typeof console!=='undefined'&&'log'in console&&console.log(str)}),'tamperProof':constFunc(tamperProof),'constFunc':constFunc(constFunc),'is':constFunc(ses.is),'compileExpr':constFunc(compileExpr),'compileModule':constFunc(compileModule),'eval':fakeEval,'Function':FakeFunction,'sharedImports':sharedImports,'makeImports':constFunc(makeImports),'copyToImports':constFunc(copyToImports),'makeArrayLike':constFunc(makeArrayLike)},extensionsRecord=extensions(),gopn(extensionsRecord).forEach(function(p){defProp(cajaVM,p,gopd(extensionsRecord,p))}),global.cajaVM.def=constFunc(def)})(),propertyReports={};function
reportProperty(severity,status,path){var group;ses.updateMaxSeverity(severity),group=propertyReports[status]||(propertyReports[status]={'severity':severity,'list':[]}),group.list.push(path)}keys(whitelist).forEach(function(name){var
desc=gopd(global,name),newDesc,permit;if(desc){permit=whitelist[name];if(permit){newDesc={'value':global[name],'writable':false,'configurable':false};try{defProp(global,name,newDesc)}catch(err){reportProperty(ses.severities.NEW_SYMPTOM,'Global '+name+' cannot be made readonly: '+err)}defProp(sharedImports,name,newDesc)}}}),TAME_GLOBAL_EVAL&&defProp(sharedImports,'eval',{'value':cajaVM.eval,'writable':false,'enumerable':false,'configurable':false}),whiteTable=WeakMap();function
register(value,permit){var oldPermit;if(value!==Object(value))return;if(typeof permit!=='object')return;oldPermit=whiteTable.get(value),oldPermit&&fail('primordial reachable through multiple paths'),whiteTable.set(value,permit),keys(permit).forEach(function(name){var
sub;permit[name]!=='skip'&&(sub=value[name],register(sub,permit[name]))})}register(sharedImports,whitelist);function
getPermit(base,name){var permit=whiteTable.get(base),result;if(permit){if(hop.call(permit,name))return permit[name]};while(true){base=getProto(base);if(base===null)return false;permit=whiteTable.get(base);if(permit&&hop.call(permit,name))return result=permit[name],result==='*'||result==='skip'?result:false}}cleaning=WeakMap();function
cleanProperty(base,name,path){var deleted,desc2,diagnostic,dummy2,err,exists,value;function
poison(){throw new TypeError('Cannot access property '+path)}if(typeof base==='function'){if(name==='caller')return diagnostic=ses.makeCallerHarmless(base,path),reportProperty(ses.severities.SAFE,diagnostic,path),true;if(name==='arguments')return diagnostic=ses.makeArgumentsHarmless(base,path),reportProperty(ses.severities.SAFE,diagnostic,path),true}deleted=void
0,err=void 0;try{deleted=delete base[name]}catch(er){err=er}exists=hop.call(base,name);if(deleted){if(!exists)return reportProperty(ses.severities.SAFE,'Deleted',path),true;reportProperty(ses.severities.SAFE_SPEC_VIOLATION,'Bounced back',path)}else
if(deleted===false)reportProperty(ses.severities.SAFE_SPEC_VIOLATION,'Strict delete returned false rather than throwing',path);else
if(err instanceof TypeError);else reportProperty(ses.severities.NEW_SYMPTOM,'Delete failed with'+err,path);try{defProp(base,name,{'get':poison,'set':poison,'enumerable':false,'configurable':false})}catch(cantPoisonErr){try{value=gopd(base,name).value,defProp(base,name,{'value':value===null?null:void
0,'writable':false,'configurable':false})}catch(cantFreezeHarmless){return reportProperty(ses.severities.NOT_ISOLATED,'Cannot be poisoned',path),false}}desc2=gopd(base,name);if(desc2.get===poison&&desc2.set===poison&&!desc2.configurable)try{dummy2=base[name]}catch(expectedErr){if(expectedErr
instanceof TypeError)return reportProperty(ses.severities.SAFE,'Successfully poisoned',path),true}else
if((desc2.value===void 0||desc2.value===null)&&!desc2.writable&&!desc2.configurable)return reportProperty(ses.severities.SAFE,'Frozen harmless',path),false;return reportProperty(ses.severities.NEW_SYMTOM,'Failed to be poisoned',path),false}function
clean(value,prefix){if(value!==Object(value))return;if(cleaning.get(value))return;cleaning.set(value,true),gopn(value).forEach(function(name){var
path=prefix+(prefix?'.':'')+name,p=getPermit(value,name),sub;p?p==='skip'?reportProperty(ses.severities.SAFE,'Skipped',path):(sub=value[name],clean(sub,path)):cleanProperty(value,name,path)})}clean(sharedImports,''),cajaVM.def(sharedImports),keys(propertyReports).sort().forEach(function(status){var
group=propertyReports[status];ses.logger.reportDiagnosis(group.severity,status,group.list)}),ses.logger.reportMax(),ses.ok()?(dirty=false,ses.logger.log('initSES succeeded.')):ses.logger.error('initSES failed.')},(function
hookupSESModule(global){'use strict';if(!ses.ok())return;try{ses.startSES(global,ses.whitelist,ses.atLeastFreeVarNames,function(){return{}})}catch(err){ses.updateMaxSeverity(ses.severities.NOT_SUPPORTED),ses.logger.error('hookupSES failed with: ',err)}})(this)}