Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Generated by dart2js, the Dart to JavaScript compiler. | |
| 2 // The code supports the following hooks: | |
| 3 // dartPrint(message) - if this function is defined it is called | |
| 4 // instead of the Dart [print] method. | |
| 5 // dartMainRunner(main) - if this function is defined, the Dart [main] | |
| 6 // method will not be invoked directly. | |
| 7 // Instead, a closure that will invoke [main] is | |
| 8 // passed to [dartMainRunner]. | |
| 9 | |
| 10 /// Oh noes! Checked in generated code! Why? | |
| 11 /// | |
| 12 /// The test added to our bots checks to guarantee the Dromaeo test *runner* is | |
| 13 /// functioning correctly. The Dromaeo test runner, during normal operation, | |
| 14 /// combines a number of individual standalone test files | |
| 15 /// (see dom-attr-html.dart for an example of a standalone test) into iFrames | |
| 16 /// to run all together. | |
| 17 /// | |
| 18 /// For this smoke test I instead am running a dummy test | |
| 19 /// (dromaeo_noop/dromaeo_smoke.dart). So, the dummy test itself is not really | |
| 20 /// testing anything in our code; it is simply a mechanism to test the Dromaeo | |
| 21 /// test runner! Our test framework assumes that each test only consists of one | |
| 22 /// dart entry point and html file, so it doesn't compile any extra dart files | |
| 23 /// that might be used, in this case dromaeo_smoke.dart. So this is the | |
| 24 /// JavaScript version of dromaeo_smoke.dart. | |
|
Emily Fortuna
2013/01/30 01:15:56
This was the best solution I came up with, short o
vsm
2013/01/30 22:35:51
It is pretty ugly to check this in, but I don't ha
| |
| 25 | |
| 26 function Isolate() {} | |
| 27 init(); | |
| 28 | |
| 29 var $$ = {}; | |
| 30 var $ = Isolate.$isolateProperties; | |
| 31 $$.DartError = {"": "Object;", | |
| 32 get$stack: function() { | |
| 33 return this.stack; | |
| 34 }, | |
| 35 toString$0: function() { | |
| 36 var dartException = this.dartException; | |
| 37 if (!!Error.captureStackTrace || this.get$stack() == null) | |
| 38 return $.toString(dartException); | |
| 39 else | |
| 40 return $.S(dartException) + "\n" + $.S(this.get$stack()); | |
| 41 }, | |
| 42 DartError$1: function(dartException) { | |
| 43 this.dartException = dartException; | |
| 44 this.toString = $.DartError_toStringWrapper.call$0; | |
| 45 } | |
| 46 }; | |
| 47 | |
| 48 $$.StackTrace = {"": "Object;stack", | |
| 49 toString$0: function() { | |
| 50 var t1 = this.stack; | |
| 51 return !(t1 == null) ? t1 : ""; | |
| 52 } | |
| 53 }; | |
| 54 | |
| 55 $$.Closure = {"": "Object;", | |
| 56 toString$0: function() { | |
| 57 return "Closure"; | |
| 58 } | |
| 59 }; | |
| 60 | |
| 61 $$.Dynamic_ = {"": "Object;"}; | |
| 62 | |
| 63 $$.Null = {"": "Object;"}; | |
| 64 | |
| 65 $$.MetaInfo = {"": "Object;_tag>,_tags,_set>"}; | |
| 66 | |
| 67 $$.JSSyntaxRegExp = {"": "Object;_liblib1$_pattern,_isMultiLine,_isCaseSensitive ", | |
| 68 firstMatch$1: function(str) { | |
| 69 var m, matchStart, t1; | |
| 70 m = $.regExpExec(this, $.checkString(str)); | |
| 71 if (m == null) | |
| 72 return; | |
| 73 matchStart = m.index; | |
| 74 t1 = $.length($.$$index(m, 0)); | |
| 75 if (typeof t1 !== "number") | |
| 76 throw $.iae(t1); | |
| 77 return $._MatchImplementation$(this.get$pattern(), str, matchStart, matchSta rt + t1, m); | |
| 78 }, | |
| 79 hasMatch$1: function(str) { | |
| 80 return $.regExpTest(this, $.checkString(str)); | |
| 81 }, | |
| 82 allMatches$1: function(str) { | |
| 83 $.checkString(str); | |
| 84 return $._AllMatchesIterable$(this, str); | |
| 85 }, | |
| 86 get$pattern: function() { | |
| 87 return this._liblib1$_pattern; | |
| 88 }, | |
| 89 get$isMultiLine: function() { | |
| 90 return this._isMultiLine; | |
| 91 }, | |
| 92 get$isCaseSensitive: function() { | |
| 93 return this._isCaseSensitive; | |
| 94 }, | |
| 95 $isJSSyntaxRegExp: true, | |
| 96 $isRegExp: true | |
| 97 }; | |
| 98 | |
| 99 $$._MatchImplementation = {"": "Object;pattern>,str,start,end,_groups", | |
| 100 end$0: function() { | |
| 101 return this.end.call$0(); | |
| 102 }, | |
| 103 $index: function(index) { | |
| 104 return $.$$index(this._groups, index); | |
| 105 } | |
| 106 }; | |
| 107 | |
| 108 $$._AllMatchesIterable = {"": "Iterable;_re,_str", | |
| 109 get$iterator: function() { | |
| 110 return $._AllMatchesIterator$(this._re, this._str); | |
| 111 } | |
| 112 }; | |
| 113 | |
| 114 $$._AllMatchesIterator = {"": "Object;_re,_str,_liblib1$_current", | |
| 115 get$current: function() { | |
| 116 return this._liblib1$_current; | |
| 117 }, | |
| 118 moveNext$0: function() { | |
| 119 this._liblib1$_current = this._re.firstMatch$1(this._str); | |
| 120 return !(this._liblib1$_current == null); | |
| 121 } | |
| 122 }; | |
| 123 | |
| 124 $$.StringMatch = {"": "Object;start,str,pattern>", | |
| 125 get$end: function() { | |
| 126 return $.$$add(this.start, this.pattern.length); | |
| 127 }, | |
| 128 end$0: function() { | |
| 129 return this.get$end().call$0(); | |
| 130 }, | |
| 131 $index: function(g) { | |
| 132 return this.group$1(g); | |
| 133 }, | |
| 134 group$1: function(group_) { | |
| 135 if ($.$$eq(group_, 0) !== true) | |
| 136 throw $.$$throw($.RangeError$value(group_)); | |
| 137 return this.pattern; | |
| 138 } | |
| 139 }; | |
| 140 | |
| 141 $$.Collection = {"": "Iterable;", | |
| 142 removeAll$1: function(elements) { | |
| 143 $.IterableMixinWorkaround_removeAll(this, elements); | |
| 144 }, | |
| 145 removeMatching$1: function(test) { | |
| 146 $.IterableMixinWorkaround_removeMatching(this, test); | |
| 147 }, | |
| 148 clear$0: function() { | |
| 149 $.IterableMixinWorkaround_removeMatching(this, new $.Collection_clear_anon() ); | |
| 150 }, | |
| 151 $isCollection: function() { | |
| 152 return true; | |
| 153 } | |
| 154 }; | |
| 155 | |
| 156 $$.DateTime = {"": "Object;millisecondsSinceEpoch>,isUtc", | |
| 157 $eq: function(other) { | |
| 158 if (other == null) | |
| 159 return false; | |
| 160 if (!(typeof other === "object" && other !== null && !!other.$isDateTime)) | |
| 161 return false; | |
| 162 return $.$$eq(this.millisecondsSinceEpoch, other.millisecondsSinceEpoch); | |
| 163 }, | |
| 164 $lt: function(other) { | |
| 165 var t1, t3; | |
| 166 t1 = this.millisecondsSinceEpoch; | |
| 167 t3 = other.get$millisecondsSinceEpoch(); | |
| 168 if (typeof t1 !== "number") | |
| 169 return this.$$lt$bailout(1, other, t1); | |
| 170 if (typeof t3 !== "number") | |
| 171 return this.$$lt$bailout(2, null, t1, t3); | |
| 172 return t1 < t3; | |
| 173 }, | |
| 174 $$lt$bailout: function(state0, other, t1, t3) { | |
| 175 switch (state0) { | |
| 176 case 0: | |
| 177 t1 = this.millisecondsSinceEpoch; | |
| 178 case 1: | |
| 179 state0 = 0; | |
| 180 t3 = other.get$millisecondsSinceEpoch(); | |
| 181 case 2: | |
| 182 state0 = 0; | |
| 183 return $.$$lt(t1, t3); | |
| 184 } | |
| 185 }, | |
| 186 $gt: function(other) { | |
| 187 var t1, t3; | |
| 188 t1 = this.millisecondsSinceEpoch; | |
| 189 t3 = other.get$millisecondsSinceEpoch(); | |
| 190 if (typeof t1 !== "number") | |
| 191 return this.$$gt$bailout(1, other, t1); | |
| 192 if (typeof t3 !== "number") | |
| 193 return this.$$gt$bailout(2, null, t1, t3); | |
| 194 return t1 > t3; | |
| 195 }, | |
| 196 $$gt$bailout: function(state0, other, t1, t3) { | |
| 197 switch (state0) { | |
| 198 case 0: | |
| 199 t1 = this.millisecondsSinceEpoch; | |
| 200 case 1: | |
| 201 state0 = 0; | |
| 202 t3 = other.get$millisecondsSinceEpoch(); | |
| 203 case 2: | |
| 204 state0 = 0; | |
| 205 return $.$$gt(t1, t3); | |
| 206 } | |
| 207 }, | |
| 208 $ge: function(other) { | |
| 209 return $.$$ge(this.millisecondsSinceEpoch, other.get$millisecondsSinceEpoch( )); | |
| 210 }, | |
| 211 compareTo$1: function(other) { | |
| 212 return $.compareTo(this.millisecondsSinceEpoch, other.get$millisecondsSinceE poch()); | |
| 213 }, | |
| 214 get$hashCode: function() { | |
| 215 return this.millisecondsSinceEpoch; | |
| 216 }, | |
| 217 toString$0: function() { | |
| 218 var t1, t2, t3, y, m, d, h, min, sec, ms; | |
| 219 t1 = new $.DateTime_toString_fourDigits(); | |
| 220 t2 = new $.DateTime_toString_threeDigits(); | |
| 221 t3 = new $.DateTime_toString_twoDigits(); | |
| 222 y = t1.call$1(this.get$year()); | |
| 223 m = t3.call$1(this.get$month()); | |
| 224 d = t3.call$1(this.get$day()); | |
| 225 h = t3.call$1(this.get$hour()); | |
| 226 min = t3.call$1(this.get$minute()); | |
| 227 sec = t3.call$1(this.get$second()); | |
| 228 ms = t2.call$1(this.get$millisecond()); | |
| 229 if (this.isUtc === true) | |
| 230 return $.S(y) + "-" + $.S(m) + "-" + $.S(d) + " " + $.S(h) + ":" + $.S(min ) + ":" + $.S(sec) + "." + $.S(ms) + "Z"; | |
| 231 else | |
| 232 return $.S(y) + "-" + $.S(m) + "-" + $.S(d) + " " + $.S(h) + ":" + $.S(min ) + ":" + $.S(sec) + "." + $.S(ms); | |
| 233 }, | |
| 234 add$1: function(duration) { | |
| 235 var ms, t2; | |
| 236 ms = this.millisecondsSinceEpoch; | |
| 237 t2 = duration.get$inMilliseconds(); | |
| 238 if (typeof ms !== "number") | |
| 239 return this.add$1$bailout1(1, duration, ms); | |
| 240 if (typeof t2 !== "number") | |
| 241 return this.add$1$bailout1(2, null, ms, t2); | |
| 242 return $.DateTime$fromMillisecondsSinceEpoch(ms + t2, this.isUtc); | |
| 243 }, | |
| 244 add$1$bailout1: function(state0, duration, ms, t2) { | |
| 245 switch (state0) { | |
| 246 case 0: | |
| 247 ms = this.millisecondsSinceEpoch; | |
| 248 case 1: | |
| 249 state0 = 0; | |
| 250 t2 = duration.get$inMilliseconds(); | |
| 251 case 2: | |
| 252 state0 = 0; | |
| 253 return $.DateTime$fromMillisecondsSinceEpoch($.$$add(ms, t2), this.isUtc ); | |
| 254 } | |
| 255 }, | |
| 256 get$year: function() { | |
| 257 return $.Primitives_getYear(this); | |
| 258 }, | |
| 259 get$month: function() { | |
| 260 return $.Primitives_getMonth(this); | |
| 261 }, | |
| 262 get$day: function() { | |
| 263 return $.Primitives_getDay(this); | |
| 264 }, | |
| 265 get$hour: function() { | |
| 266 return $.Primitives_getHours(this); | |
| 267 }, | |
| 268 get$minute: function() { | |
| 269 return $.Primitives_getMinutes(this); | |
| 270 }, | |
| 271 get$second: function() { | |
| 272 return $.Primitives_getSeconds(this); | |
| 273 }, | |
| 274 get$millisecond: function() { | |
| 275 return $.Primitives_getMilliseconds(this); | |
| 276 }, | |
| 277 DateTime$_now$0: function() { | |
| 278 $.Primitives_lazyAsJsDate(this); | |
| 279 }, | |
| 280 DateTime$fromMillisecondsSinceEpoch$2$isUtc: function(millisecondsSinceEpoch, isUtc) { | |
| 281 if ($.$$gt($.abs(millisecondsSinceEpoch), 8640000000000000) === true) | |
| 282 throw $.$$throw($.ArgumentError$(millisecondsSinceEpoch)); | |
| 283 if (isUtc == null) | |
| 284 throw $.$$throw($.ArgumentError$(isUtc)); | |
| 285 }, | |
| 286 $isDateTime: true | |
| 287 }; | |
| 288 | |
| 289 $$.NullThrownError = {"": "Object;", | |
| 290 toString$0: function() { | |
| 291 return "Throw of null."; | |
| 292 } | |
| 293 }; | |
| 294 | |
| 295 $$.ArgumentError = {"": "Object;message>", | |
| 296 toString$0: function() { | |
| 297 var t1 = this.message; | |
| 298 if (!(t1 == null)) | |
| 299 return "Illegal argument(s): " + $.S(t1); | |
| 300 return "Illegal argument(s)"; | |
| 301 } | |
| 302 }; | |
| 303 | |
| 304 $$.RangeError = {"": "ArgumentError;message", | |
| 305 toString$0: function() { | |
| 306 return "RangeError: " + $.S(this.message); | |
| 307 } | |
| 308 }; | |
| 309 | |
| 310 $$.NoSuchMethodError = {"": "Object;_receiver,_memberName,_arguments,_namedArgum ents,_existingArgumentNames", | |
| 311 toString$0: function() { | |
| 312 var t1, t2, t3, t4, i; | |
| 313 t1 = {}; | |
| 314 t1.sb_0 = $.StringBuffer_StringBuffer(""); | |
| 315 t1.i_1 = 0; | |
| 316 t2 = this._arguments; | |
| 317 if (typeof t2 !== "string" && (typeof t2 !== "object" || t2 === null || t2.c onstructor !== Array && !t2.$isJavaScriptIndexingBehavior())) | |
| 318 return this.toString$0$bailout(1, t1, t2); | |
| 319 for (; $.$$lt(t1.i_1, t2.length) === true; t1.i_1 = $.$$add(t1.i_1, 1)) { | |
| 320 if ($.$$gt(t1.i_1, 0) === true) | |
| 321 $.add(t1.sb_0, ", "); | |
| 322 t3 = t1.sb_0; | |
| 323 t4 = t1.i_1; | |
| 324 if (t4 !== (t4 | 0)) | |
| 325 throw $.iae(t4); | |
| 326 if (t4 < 0 || t4 >= t2.length) | |
| 327 throw $.ioore(t4); | |
| 328 $.add(t3, $.Error_safeToString(t2[t4])); | |
| 329 } | |
| 330 t2 = this._namedArguments; | |
| 331 if (!(t2 == null)) | |
| 332 $.forEach(t2, new $.NoSuchMethodError_toString_anon(t1)); | |
| 333 t2 = this._existingArgumentNames; | |
| 334 if (typeof t2 !== "string" && (typeof t2 !== "object" || t2 === null || t2.c onstructor !== Array && !t2.$isJavaScriptIndexingBehavior())) | |
| 335 return this.toString$0$bailout(2, t1, t2); | |
| 336 t3 = $.toString(t1.sb_0); | |
| 337 t1.sb_0 = $.StringBuffer_StringBuffer(""); | |
| 338 for (i = 0; i < t2.length; ++i) { | |
| 339 if (i > 0) | |
| 340 $.add(t1.sb_0, ", "); | |
| 341 t4 = t1.sb_0; | |
| 342 if (i >= t2.length) | |
| 343 throw $.ioore(i); | |
| 344 $.add(t4, t2[i]); | |
| 345 } | |
| 346 t2 = $.toString(t1.sb_0); | |
| 347 t4 = this._memberName; | |
| 348 return "NoSuchMethodError: incorrect number of arguments passed to method na med '" + $.S(t4) + "'\n" + "Receiver: " + $.S($.Error_safeToString(this._receive r)) + "\n" + "Tried calling: " + $.S(t4) + "(" + $.S(t3) + ")\n" + "Found: " + $ .S(t4) + "(" + $.S(t2) + ")"; | |
| 349 }, | |
| 350 toString$0$bailout: function(state0, t1, t2) { | |
| 351 switch (state0) { | |
| 352 case 0: | |
| 353 t1 = {}; | |
| 354 t1.sb_0 = $.StringBuffer_StringBuffer(""); | |
| 355 t1.i_1 = 0; | |
| 356 t2 = this._arguments; | |
| 357 case 1: | |
| 358 state0 = 0; | |
| 359 if (!(t2 == null)) | |
| 360 for (t3 = $.getInterceptor$JSStringJSArray(t2); $.$$lt(t1.i_1, t3.get$ length(t2)) === true; t1.i_1 = $.$$add(t1.i_1, 1)) { | |
| 361 if ($.$$gt(t1.i_1, 0) === true) | |
| 362 $.add(t1.sb_0, ", "); | |
| 363 $.add(t1.sb_0, $.Error_safeToString(t3.$index(t2, t1.i_1))); | |
| 364 } | |
| 365 t2 = this._namedArguments; | |
| 366 if (!(t2 == null)) | |
| 367 $.forEach(t2, new $.NoSuchMethodError_toString_anon(t1)); | |
| 368 t2 = this._existingArgumentNames; | |
| 369 case 2: | |
| 370 var t3, t4, i; | |
| 371 state0 = 0; | |
| 372 if (t2 == null) | |
| 373 return "NoSuchMethodError : method not found: '" + $.S(this._memberNam e) + "'\n" + "Receiver: " + $.S($.Error_safeToString(this._receiver)) + "\n" + " Arguments: [" + $.S(t1.sb_0) + "]"; | |
| 374 else { | |
| 375 t3 = $.toString(t1.sb_0); | |
| 376 t1.sb_0 = $.StringBuffer_StringBuffer(""); | |
| 377 for (t4 = $.getInterceptor$JSStringJSArray(t2), i = 0; $.CONSTANT4.$lt (i, t4.get$length(t2)); ++i) { | |
| 378 if (i > 0) | |
| 379 $.add(t1.sb_0, ", "); | |
| 380 $.add(t1.sb_0, t4.$index(t2, i)); | |
| 381 } | |
| 382 t2 = $.toString(t1.sb_0); | |
| 383 t4 = this._memberName; | |
| 384 return "NoSuchMethodError: incorrect number of arguments passed to met hod named '" + $.S(t4) + "'\n" + "Receiver: " + $.S($.Error_safeToString(this._r eceiver)) + "\n" + "Tried calling: " + $.S(t4) + "(" + $.S(t3) + ")\n" + "Found: " + $.S(t4) + "(" + $.S(t2) + ")"; | |
| 385 } | |
| 386 } | |
| 387 } | |
| 388 }; | |
| 389 | |
| 390 $$.UnsupportedError = {"": "Object;message>", | |
| 391 toString$0: function() { | |
| 392 return "Unsupported operation: " + $.S(this.get$message()); | |
| 393 } | |
| 394 }; | |
| 395 | |
| 396 $$.UnimplementedError = {"": "Object;message>", | |
| 397 toString$0: function() { | |
| 398 var t1 = this.message; | |
| 399 return !(t1 == null) ? "UnimplementedError: " + $.S(t1) : "UnimplementedErro r"; | |
| 400 } | |
| 401 }; | |
| 402 | |
| 403 $$.StateError = {"": "Object;message>", | |
| 404 toString$0: function() { | |
| 405 return "Bad state: " + this.message; | |
| 406 } | |
| 407 }; | |
| 408 | |
| 409 $$.ConcurrentModificationError = {"": "Object;modifiedObject", | |
| 410 toString$0: function() { | |
| 411 var t1 = this.modifiedObject; | |
| 412 if (t1 == null) | |
| 413 return "Concurrent modification during iteration."; | |
| 414 return "Concurrent modification during iteration: " + $.S($.Error_safeToStri ng(t1)) + "."; | |
| 415 } | |
| 416 }; | |
| 417 | |
| 418 $$.StackOverflowError = {"": "Object;", | |
| 419 toString$0: function() { | |
| 420 return "Stack Overflow"; | |
| 421 } | |
| 422 }; | |
| 423 | |
| 424 $$.RuntimeError = {"": "Object;message>", | |
| 425 toString$0: function() { | |
| 426 return "RuntimeError: " + this.message; | |
| 427 } | |
| 428 }; | |
| 429 | |
| 430 $$._ExceptionImplementation = {"": "Object;message>", | |
| 431 toString$0: function() { | |
| 432 var t1 = this.message; | |
| 433 if (t1 == null) | |
| 434 return "Exception"; | |
| 435 return "Exception: " + $.S(t1); | |
| 436 } | |
| 437 }; | |
| 438 | |
| 439 $$.IllegalJSRegExpException = {"": "Object;_pattern,_errmsg", | |
| 440 toString$0: function() { | |
| 441 return "IllegalJSRegExpException: '" + $.S(this._pattern) + "' '" + this._er rmsg + "'"; | |
| 442 } | |
| 443 }; | |
| 444 | |
| 445 $$.Iterable = {"": "Object;", | |
| 446 contains$1: function(element) { | |
| 447 var t1; | |
| 448 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 449 if ($.$$eq(t1.get$current(), element) === true) | |
| 450 return true; | |
| 451 return false; | |
| 452 }, | |
| 453 get$contains: function() { | |
| 454 return new $.BoundClosure(this, "contains$1"); | |
| 455 }, | |
| 456 forEach$1: function(f) { | |
| 457 var t1; | |
| 458 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 459 f.call$1(t1.get$current()); | |
| 460 }, | |
| 461 toSet$0: function() { | |
| 462 return $.Set_Set$from(this); | |
| 463 }, | |
| 464 get$length: function() { | |
| 465 var t1, count; | |
| 466 t1 = $.iterator(this); | |
| 467 for (count = 0; t1.moveNext$0() === true;) | |
| 468 ++count; | |
| 469 return count; | |
| 470 }, | |
| 471 get$isEmpty: function() { | |
| 472 return $.iterator(this).moveNext$0() !== true; | |
| 473 } | |
| 474 }; | |
| 475 | |
| 476 $$.Object = {"": ";", | |
| 477 $eq: function(other) { | |
| 478 if (other == null) | |
| 479 return false; | |
| 480 return this === other; | |
| 481 }, | |
| 482 get$hashCode: function() { | |
| 483 return $.Primitives_objectHashCode(this); | |
| 484 }, | |
| 485 toString$0: function() { | |
| 486 return "Instance of '" + $.S($.Primitives_objectTypeName(this)) + "'"; | |
| 487 } | |
| 488 }; | |
| 489 | |
| 490 $$._StringBufferImpl = {"": "Object;_buffer,_liblib2$_length", | |
| 491 get$length: function() { | |
| 492 return this._liblib2$_length; | |
| 493 }, | |
| 494 get$isEmpty: function() { | |
| 495 return $.$$eq(this._liblib2$_length, 0); | |
| 496 }, | |
| 497 add$1: function(obj) { | |
| 498 var t1, t2, t4; | |
| 499 t1 = $.toString(obj); | |
| 500 if (!(typeof t1 === "string")) | |
| 501 throw $.$$throw($.ArgumentError$("toString() did not return a string")); | |
| 502 if ($.CONSTANT1.get$isEmpty(t1) === true) | |
| 503 return; | |
| 504 $.add(this._buffer, t1); | |
| 505 t2 = this._liblib2$_length; | |
| 506 t4 = t1.length; | |
| 507 if (typeof t2 !== "number") | |
| 508 return this.add$1$bailout0(1, t1, t2); | |
| 509 this._liblib2$_length = t2 + t4; | |
| 510 }, | |
| 511 add$1$bailout0: function(state0, t1, t2) { | |
| 512 this._liblib2$_length = $.$$add(t2, t1.length); | |
| 513 }, | |
| 514 clear$0: function() { | |
| 515 this._buffer = $.List_List(0); | |
| 516 this._liblib2$_length = 0; | |
| 517 }, | |
| 518 toString$0: function() { | |
| 519 if ($.$$eq($.length(this._buffer), 0) === true) | |
| 520 return ""; | |
| 521 if ($.$$eq($.length(this._buffer), 1) === true) | |
| 522 return $.$$index(this._buffer, 0); | |
| 523 var result = $.Strings__toJsStringArray(this._buffer).join(""); | |
| 524 $.clear(this._buffer); | |
| 525 $.add(this._buffer, result); | |
| 526 return result; | |
| 527 }, | |
| 528 _StringBufferImpl$1: function(content) { | |
| 529 this.clear$0(); | |
| 530 this.add$1(content); | |
| 531 } | |
| 532 }; | |
| 533 | |
| 534 $$._HashMapImpl = {"": "Object;_keys>,_values>,_loadLimit,_numberOfEntries,_numb erOfDeleted", | |
| 535 _probeForAdding$1: function(key) { | |
| 536 var t1, t3, hash, numberOfProbes, insertionIndex, existingKey, numberOfProbe s0; | |
| 537 if (key == null) | |
| 538 throw $.$$throw($.ArgumentError$(null)); | |
| 539 t1 = $.hashCode(key); | |
| 540 t3 = this._keys.length; | |
| 541 if (t1 !== (t1 | 0)) | |
| 542 return this._probeForAdding$1$bailout(1, key, t1); | |
| 543 hash = (t1 & t3 - 1) >>> 0; | |
| 544 for (numberOfProbes = 1, insertionIndex = -1; true; numberOfProbes = numberO fProbes0) { | |
| 545 t1 = this._keys; | |
| 546 if (hash < 0 || hash >= t1.length) | |
| 547 throw $.ioore(hash); | |
| 548 existingKey = t1[hash]; | |
| 549 if (existingKey == null) { | |
| 550 if (insertionIndex < 0) | |
| 551 return hash; | |
| 552 return insertionIndex; | |
| 553 } else if ($.$$eq(existingKey, key) === true) | |
| 554 return hash; | |
| 555 else if (insertionIndex < 0 && existingKey === $.CONSTANT3) | |
| 556 insertionIndex = hash; | |
| 557 numberOfProbes0 = numberOfProbes + 1; | |
| 558 hash = $._HashMapImpl__nextProbe(hash, numberOfProbes, this._keys.length); | |
| 559 if (hash !== (hash | 0)) | |
| 560 return this._probeForAdding$1$bailout(2, key, null, hash, numberOfProbes 0, insertionIndex); | |
| 561 } | |
| 562 }, | |
| 563 _probeForAdding$1$bailout: function(state0, key, t1, hash, numberOfProbes0, in sertionIndex) { | |
| 564 switch (state0) { | |
| 565 case 0: | |
| 566 if (key == null) | |
| 567 throw $.$$throw($.ArgumentError$(null)); | |
| 568 t1 = $.hashCode(key); | |
| 569 case 1: | |
| 570 state0 = 0; | |
| 571 hash = $.$$and(t1, this._keys.length - 1); | |
| 572 numberOfProbes = 1; | |
| 573 insertionIndex = -1; | |
| 574 case 2: | |
| 575 var numberOfProbes, existingKey; | |
| 576 L0: | |
| 577 while (true) | |
| 578 switch (state0) { | |
| 579 case 0: | |
| 580 if (!true) | |
| 581 break L0; | |
| 582 t1 = this._keys; | |
| 583 if (hash !== (hash | 0)) | |
| 584 throw $.iae(hash); | |
| 585 if (hash < 0 || hash >= t1.length) | |
| 586 throw $.ioore(hash); | |
| 587 existingKey = t1[hash]; | |
| 588 if (existingKey == null) { | |
| 589 if (insertionIndex < 0) | |
| 590 return hash; | |
| 591 return insertionIndex; | |
| 592 } else if ($.$$eq(existingKey, key) === true) | |
| 593 return hash; | |
| 594 else if (insertionIndex < 0 && existingKey === $.CONSTANT3) | |
| 595 insertionIndex = hash; | |
| 596 numberOfProbes0 = numberOfProbes + 1; | |
| 597 hash = $._HashMapImpl__nextProbe(hash, numberOfProbes, this._key s.length); | |
| 598 case 2: | |
| 599 state0 = 0; | |
| 600 numberOfProbes = numberOfProbes0; | |
| 601 } | |
| 602 } | |
| 603 }, | |
| 604 _probeForLookup$1: function(key) { | |
| 605 var t1, hash, numberOfProbes, existingKey, numberOfProbes0; | |
| 606 if (key == null) | |
| 607 throw $.$$throw($.ArgumentError$(null)); | |
| 608 t1 = $.$$and($.hashCode(key), this._keys.length - 1); | |
| 609 if (t1 !== (t1 | 0)) | |
| 610 return this._probeForLookup$1$bailout(1, key, t1); | |
| 611 for (hash = t1, numberOfProbes = 1; true; numberOfProbes = numberOfProbes0) { | |
| 612 t1 = this._keys; | |
| 613 if (hash !== (hash | 0)) | |
| 614 throw $.iae(hash); | |
| 615 if (hash < 0 || hash >= t1.length) | |
| 616 throw $.ioore(hash); | |
| 617 existingKey = t1[hash]; | |
| 618 if (existingKey == null) | |
| 619 return -1; | |
| 620 if ($.$$eq(existingKey, key) === true) | |
| 621 return hash; | |
| 622 numberOfProbes0 = numberOfProbes + 1; | |
| 623 hash = $._HashMapImpl__nextProbe(hash, numberOfProbes, this._keys.length); | |
| 624 } | |
| 625 }, | |
| 626 _probeForLookup$1$bailout: function(state0, key, t1) { | |
| 627 var hash, numberOfProbes, existingKey, numberOfProbes0; | |
| 628 for (hash = t1, numberOfProbes = 1; true; numberOfProbes = numberOfProbes0) { | |
| 629 t1 = this._keys; | |
| 630 if (hash !== (hash | 0)) | |
| 631 throw $.iae(hash); | |
| 632 if (hash < 0 || hash >= t1.length) | |
| 633 throw $.ioore(hash); | |
| 634 existingKey = t1[hash]; | |
| 635 if (existingKey == null) | |
| 636 return -1; | |
| 637 if ($.$$eq(existingKey, key) === true) | |
| 638 return hash; | |
| 639 numberOfProbes0 = numberOfProbes + 1; | |
| 640 hash = $._HashMapImpl__nextProbe(hash, numberOfProbes, this._keys.length); | |
| 641 } | |
| 642 }, | |
| 643 _ensureCapacity$0: function() { | |
| 644 var t1, capacity, t2; | |
| 645 t1 = $.$$add(this._numberOfEntries, 1); | |
| 646 if ($.$$ge(t1, this._loadLimit) === true) { | |
| 647 this._grow$1(this._keys.length * 2); | |
| 648 return; | |
| 649 } | |
| 650 capacity = this._keys.length; | |
| 651 if (typeof t1 !== "number") | |
| 652 throw $.iae(t1); | |
| 653 t2 = this._numberOfDeleted; | |
| 654 if (typeof t2 !== "number") | |
| 655 throw $.iae(t2); | |
| 656 if (t2 > capacity - t1 - t2) | |
| 657 this._grow$1(this._keys.length); | |
| 658 }, | |
| 659 _grow$1: function(newCapacity) { | |
| 660 var capacity, oldKeys, oldValues, i, key, value, newIndex, t1; | |
| 661 capacity = this._keys.length; | |
| 662 this._loadLimit = $.$$tdiv($.$$mul(newCapacity, 3), 4); | |
| 663 oldKeys = this._keys; | |
| 664 oldValues = this._values; | |
| 665 this._keys = $.List_List$fixedLength(newCapacity, null); | |
| 666 this._values = $.List_List$fixedLength(newCapacity, null); | |
| 667 for (i = 0; i < capacity; ++i) { | |
| 668 if (i >= oldKeys.length) | |
| 669 throw $.ioore(i); | |
| 670 key = oldKeys[i]; | |
| 671 if (key == null || key === $.CONSTANT3) | |
| 672 continue; | |
| 673 if (i >= oldValues.length) | |
| 674 throw $.ioore(i); | |
| 675 value = oldValues[i]; | |
| 676 newIndex = this._probeForAdding$1(key); | |
| 677 t1 = this._keys; | |
| 678 if (newIndex !== (newIndex | 0)) | |
| 679 throw $.iae(newIndex); | |
| 680 if (newIndex < 0 || newIndex >= t1.length) | |
| 681 throw $.ioore(newIndex); | |
| 682 t1[newIndex] = key; | |
| 683 t1 = this._values; | |
| 684 if (newIndex >= t1.length) | |
| 685 throw $.ioore(newIndex); | |
| 686 t1[newIndex] = value; | |
| 687 } | |
| 688 this._numberOfDeleted = 0; | |
| 689 }, | |
| 690 clear$0: function() { | |
| 691 var t1, length, t2, t3, i; | |
| 692 this._numberOfEntries = 0; | |
| 693 this._numberOfDeleted = 0; | |
| 694 t1 = this._keys; | |
| 695 length = t1.length; | |
| 696 for (t2 = this._values, t3 = t2.length, i = 0; i < length; ++i) { | |
| 697 t1[i] = null; | |
| 698 if (i >= t3) | |
| 699 throw $.ioore(i); | |
| 700 t2[i] = null; | |
| 701 } | |
| 702 }, | |
| 703 $indexSet: function(key, value) { | |
| 704 var index, t1; | |
| 705 this._ensureCapacity$0(); | |
| 706 index = this._probeForAdding$1(key); | |
| 707 t1 = this._keys; | |
| 708 if (index !== (index | 0)) | |
| 709 throw $.iae(index); | |
| 710 if (index < 0 || index >= t1.length) | |
| 711 throw $.ioore(index); | |
| 712 t1 = t1[index]; | |
| 713 if (t1 == null || t1 === $.CONSTANT3) { | |
| 714 t1 = this._numberOfEntries; | |
| 715 if (typeof t1 !== "number") | |
| 716 return this.$$indexSet$bailout(1, key, value, t1, index); | |
| 717 this._numberOfEntries = t1 + 1; | |
| 718 } | |
| 719 t1 = this._keys; | |
| 720 if (index >= t1.length) | |
| 721 throw $.ioore(index); | |
| 722 t1[index] = key; | |
| 723 t1 = this._values; | |
| 724 if (index >= t1.length) | |
| 725 throw $.ioore(index); | |
| 726 t1[index] = value; | |
| 727 }, | |
| 728 $$indexSet$bailout: function(state0, key, value, t1, index) { | |
| 729 switch (state0) { | |
| 730 case 0: | |
| 731 this._ensureCapacity$0(); | |
| 732 index = this._probeForAdding$1(key); | |
| 733 t1 = this._keys; | |
| 734 if (index !== (index | 0)) | |
| 735 throw $.iae(index); | |
| 736 if (index < 0 || index >= t1.length) | |
| 737 throw $.ioore(index); | |
| 738 t1 = t1[index]; | |
| 739 case 1: | |
| 740 if (state0 === 1 || state0 === 0 && (t1 == null || t1 === $.CONSTANT3)) | |
| 741 switch (state0) { | |
| 742 case 0: | |
| 743 t1 = this._numberOfEntries; | |
| 744 case 1: | |
| 745 state0 = 0; | |
| 746 this._numberOfEntries = $.$$add(t1, 1); | |
| 747 } | |
| 748 t1 = this._keys; | |
| 749 if (index >= t1.length) | |
| 750 throw $.ioore(index); | |
| 751 t1[index] = key; | |
| 752 t1 = this._values; | |
| 753 if (index >= t1.length) | |
| 754 throw $.ioore(index); | |
| 755 t1[index] = value; | |
| 756 } | |
| 757 }, | |
| 758 $index: function(key) { | |
| 759 var index, t1; | |
| 760 index = this._probeForLookup$1(key); | |
| 761 if (typeof index !== "number") | |
| 762 return this.$$index$bailout(1, index); | |
| 763 if (index < 0) | |
| 764 return; | |
| 765 t1 = this._values; | |
| 766 if (index !== (index | 0)) | |
| 767 throw $.iae(index); | |
| 768 if (index < 0 || index >= t1.length) | |
| 769 throw $.ioore(index); | |
| 770 return t1[index]; | |
| 771 }, | |
| 772 $$index$bailout: function(state0, index) { | |
| 773 var t1; | |
| 774 if ($.$$lt(index, 0) === true) | |
| 775 return; | |
| 776 t1 = this._values; | |
| 777 if (index !== (index | 0)) | |
| 778 throw $.iae(index); | |
| 779 if (index < 0 || index >= t1.length) | |
| 780 throw $.ioore(index); | |
| 781 return t1[index]; | |
| 782 }, | |
| 783 remove$1: function(key) { | |
| 784 var index, t1, t3, value; | |
| 785 index = this._probeForLookup$1(key); | |
| 786 if (typeof index !== "number") | |
| 787 return this.remove$1$bailout(1, index); | |
| 788 if (index >= 0) { | |
| 789 t1 = this._numberOfEntries; | |
| 790 if (typeof t1 !== "number") | |
| 791 return this.remove$1$bailout(2, index, t1); | |
| 792 this._numberOfEntries = t1 - 1; | |
| 793 t3 = this._values; | |
| 794 if (index !== (index | 0)) | |
| 795 throw $.iae(index); | |
| 796 if (index < 0 || index >= t3.length) | |
| 797 throw $.ioore(index); | |
| 798 value = t3[index]; | |
| 799 t3[index] = null; | |
| 800 t3 = this._keys; | |
| 801 if (index >= t3.length) | |
| 802 throw $.ioore(index); | |
| 803 t3[index] = $.CONSTANT3; | |
| 804 t3 = this._numberOfDeleted; | |
| 805 if (typeof t3 !== "number") | |
| 806 return this.remove$1$bailout(3, null, null, t3, value); | |
| 807 this._numberOfDeleted = t3 + 1; | |
| 808 return value; | |
| 809 } | |
| 810 return; | |
| 811 }, | |
| 812 remove$1$bailout: function(state0, index, t1, t3, value) { | |
| 813 switch (state0) { | |
| 814 case 0: | |
| 815 index = this._probeForLookup$1(key); | |
| 816 case 1: | |
| 817 state0 = 0; | |
| 818 default: | |
| 819 if (state0 === 3 || state0 === 2 || state0 === 0 && $.$$ge(index, 0) === true) | |
| 820 switch (state0) { | |
| 821 case 0: | |
| 822 t1 = this._numberOfEntries; | |
| 823 case 2: | |
| 824 state0 = 0; | |
| 825 this._numberOfEntries = $.$$sub(t1, 1); | |
| 826 t3 = this._values; | |
| 827 if (index !== (index | 0)) | |
| 828 throw $.iae(index); | |
| 829 if (index < 0 || index >= t3.length) | |
| 830 throw $.ioore(index); | |
| 831 value = t3[index]; | |
| 832 t3[index] = null; | |
| 833 t3 = this._keys; | |
| 834 if (index >= t3.length) | |
| 835 throw $.ioore(index); | |
| 836 t3[index] = $.CONSTANT3; | |
| 837 t3 = this._numberOfDeleted; | |
| 838 case 3: | |
| 839 state0 = 0; | |
| 840 this._numberOfDeleted = $.$$add(t3, 1); | |
| 841 return value; | |
| 842 } | |
| 843 return; | |
| 844 } | |
| 845 }, | |
| 846 get$isEmpty: function() { | |
| 847 return $.$$eq(this._numberOfEntries, 0); | |
| 848 }, | |
| 849 get$length: function() { | |
| 850 return this._numberOfEntries; | |
| 851 }, | |
| 852 forEach$1: function(f) { | |
| 853 var it, t1, t2, t3; | |
| 854 it = $._HashMapImplIndexIterator$(this); | |
| 855 for (; it.moveNext$0() === true;) { | |
| 856 t1 = this._keys; | |
| 857 t2 = it.get$current(); | |
| 858 if (t2 !== (t2 | 0)) | |
| 859 throw $.iae(t2); | |
| 860 if (t2 < 0 || t2 >= t1.length) | |
| 861 throw $.ioore(t2); | |
| 862 t2 = t1[t2]; | |
| 863 t1 = this._values; | |
| 864 t3 = it.get$current(); | |
| 865 if (t3 !== (t3 | 0)) | |
| 866 throw $.iae(t3); | |
| 867 if (t3 < 0 || t3 >= t1.length) | |
| 868 throw $.ioore(t3); | |
| 869 f.call$2(t2, t1[t3]); | |
| 870 } | |
| 871 }, | |
| 872 containsKey$1: function(key) { | |
| 873 return $.$$eq(this._probeForLookup$1(key), -1) !== true; | |
| 874 }, | |
| 875 toString$0: function() { | |
| 876 return $.Maps_mapToString(this); | |
| 877 }, | |
| 878 _HashMapImpl$0: function() { | |
| 879 this._numberOfEntries = 0; | |
| 880 this._numberOfDeleted = 0; | |
| 881 this._loadLimit = $._HashMapImpl__computeLoadLimit(8); | |
| 882 this._keys = $.List_List$fixedLength(8, null); | |
| 883 this._values = $.List_List$fixedLength(8, null); | |
| 884 }, | |
| 885 $isMap: true | |
| 886 }; | |
| 887 | |
| 888 $$._HashMapImplIterator = {"": "Object;", | |
| 889 moveNext$0: function() { | |
| 890 var t1, t2, length, t3, newIndex, key; | |
| 891 t1 = this._map; | |
| 892 t2 = t1._keys; | |
| 893 length = t2.length; | |
| 894 t3 = this._index; | |
| 895 if (t3 !== (t3 | 0)) | |
| 896 return this.moveNext$0$bailout1(1, length, t3, t1); | |
| 897 newIndex = t3 + 1; | |
| 898 for (; newIndex < length;) { | |
| 899 if (newIndex < 0) | |
| 900 throw $.ioore(newIndex); | |
| 901 key = t2[newIndex]; | |
| 902 if (!(key == null) && !(key === $.CONSTANT3)) { | |
| 903 this._liblib0$_current = this._computeCurrentFromIndex$3(newIndex, t2, t 1._values); | |
| 904 this._index = newIndex; | |
| 905 return true; | |
| 906 } | |
| 907 ++newIndex; | |
| 908 } | |
| 909 this._index = length; | |
| 910 this._liblib0$_current = null; | |
| 911 return false; | |
| 912 }, | |
| 913 moveNext$0$bailout1: function(state0, length, t2, t1) { | |
| 914 var newIndex, key; | |
| 915 newIndex = $.$$add(t2, 1); | |
| 916 for (; $.$$lt(newIndex, length) === true;) { | |
| 917 t2 = t1._keys; | |
| 918 if (newIndex !== (newIndex | 0)) | |
| 919 throw $.iae(newIndex); | |
| 920 if (newIndex < 0 || newIndex >= t2.length) | |
| 921 throw $.ioore(newIndex); | |
| 922 key = t2[newIndex]; | |
| 923 if (!(key == null) && !(key === $.CONSTANT3)) { | |
| 924 this._liblib0$_current = this._computeCurrentFromIndex$3(newIndex, t2, t 1._values); | |
| 925 this._index = newIndex; | |
| 926 return true; | |
| 927 } | |
| 928 ++newIndex; | |
| 929 } | |
| 930 this._index = length; | |
| 931 this._liblib0$_current = null; | |
| 932 return false; | |
| 933 }, | |
| 934 get$current: function() { | |
| 935 return this._liblib0$_current; | |
| 936 } | |
| 937 }; | |
| 938 | |
| 939 $$._HashMapImplIndexIterator = {"": "_HashMapImplIterator;_map,_index,_liblib0$_ current", | |
| 940 _computeCurrentFromIndex$3: function(index, keys, values) { | |
| 941 return index; | |
| 942 } | |
| 943 }; | |
| 944 | |
| 945 $$._DeletedKeySentinel = {"": "Object;"}; | |
| 946 | |
| 947 $$._KeyValuePair = {"": "Object;key>,value="}; | |
| 948 | |
| 949 $$._LinkedHashMapImpl = {"": "Object;_liblib0$_list,_map", | |
| 950 $indexSet: function(key, value) { | |
| 951 var t1, t3; | |
| 952 if (this._map.containsKey$1(key) === true) { | |
| 953 t1 = this._map; | |
| 954 if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1 .constructor !== Array && !t1.$isJavaScriptIndexingBehavior())) | |
| 955 return this.$$indexSet$bailout0(1, key, value, t1); | |
| 956 if (key !== (key | 0)) | |
| 957 throw $.iae(key); | |
| 958 if (key < 0 || key >= t1.length) | |
| 959 throw $.ioore(key); | |
| 960 t1[key].get$element().set$value(value); | |
| 961 } else { | |
| 962 this._liblib0$_list.addLast$1($._KeyValuePair$(key, value)); | |
| 963 t1 = this._map; | |
| 964 t3 = this._liblib0$_list.lastEntry$0(); | |
| 965 if (typeof t1 !== "object" || t1 === null || (t1.constructor !== Array || !!t1.immutable$list) && !t1.$isJavaScriptIndexingBehavior()) | |
| 966 return this.$$indexSet$bailout0(2, key, null, t1); | |
| 967 if (key !== (key | 0)) | |
| 968 throw $.iae(key); | |
| 969 if (key < 0 || key >= t1.length) | |
| 970 throw $.ioore(key); | |
| 971 t1[key] = t3; | |
| 972 } | |
| 973 }, | |
| 974 $$indexSet$bailout0: function(state0, key, value, t1) { | |
| 975 switch (state0) { | |
| 976 case 0: | |
| 977 default: | |
| 978 if (state0 === 1 || state0 === 0 && this._map.containsKey$1(key) === tru e) | |
| 979 switch (state0) { | |
| 980 case 0: | |
| 981 t1 = this._map; | |
| 982 case 1: | |
| 983 state0 = 0; | |
| 984 $.$$index(t1, key).get$element().set$value(value); | |
| 985 } | |
| 986 else | |
| 987 switch (state0) { | |
| 988 case 0: | |
| 989 this._liblib0$_list.addLast$1($._KeyValuePair$(key, value)); | |
| 990 t1 = this._map; | |
| 991 case 2: | |
| 992 state0 = 0; | |
| 993 $.$$indexSet(t1, key, this._liblib0$_list.lastEntry$0()); | |
| 994 } | |
| 995 } | |
| 996 }, | |
| 997 $index: function(key) { | |
| 998 var t1 = this._map; | |
| 999 if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1.c onstructor !== Array && !t1.$isJavaScriptIndexingBehavior())) | |
| 1000 return this.$$index$bailout0(1, key, t1); | |
| 1001 if (key !== (key | 0)) | |
| 1002 throw $.iae(key); | |
| 1003 if (key < 0 || key >= t1.length) | |
| 1004 throw $.ioore(key); | |
| 1005 t1 = t1[key]; | |
| 1006 if (t1 == null) | |
| 1007 return; | |
| 1008 return t1.get$element().get$value(); | |
| 1009 }, | |
| 1010 $$index$bailout0: function(state0, key, t1) { | |
| 1011 t1 = $.$$index(t1, key); | |
| 1012 if (t1 == null) | |
| 1013 return; | |
| 1014 return t1.get$element().get$value(); | |
| 1015 }, | |
| 1016 remove$1: function(key) { | |
| 1017 var t1 = $.remove(this._map, key); | |
| 1018 if (t1 == null) | |
| 1019 return; | |
| 1020 t1.remove$0(); | |
| 1021 return t1.get$element().get$value(); | |
| 1022 }, | |
| 1023 forEach$1: function(f) { | |
| 1024 this._liblib0$_list.forEach$1(new $._LinkedHashMapImpl_forEach_anon(f)); | |
| 1025 }, | |
| 1026 containsKey$1: function(key) { | |
| 1027 return this._map.containsKey$1(key); | |
| 1028 }, | |
| 1029 get$length: function() { | |
| 1030 return $.length(this._map); | |
| 1031 }, | |
| 1032 get$isEmpty: function() { | |
| 1033 return $.$$eq($.length(this), 0); | |
| 1034 }, | |
| 1035 clear$0: function() { | |
| 1036 $.clear(this._map); | |
| 1037 this._liblib0$_list.clear$0(); | |
| 1038 }, | |
| 1039 toString$0: function() { | |
| 1040 return $.Maps_mapToString(this); | |
| 1041 }, | |
| 1042 _LinkedHashMapImpl$0: function() { | |
| 1043 this._map = $.HashMap_HashMap(); | |
| 1044 this._liblib0$_list = $.DoubleLinkedQueue$(); | |
| 1045 }, | |
| 1046 $isMap: true | |
| 1047 }; | |
| 1048 | |
| 1049 $$.DoubleLinkedQueueEntry = {"": "Object;_previous=,_next=,_element", | |
| 1050 _link$2: function(p, n) { | |
| 1051 this._next = n; | |
| 1052 this._previous = p; | |
| 1053 p.set$_next(this); | |
| 1054 n.set$_previous(this); | |
| 1055 }, | |
| 1056 prepend$1: function(e) { | |
| 1057 $.DoubleLinkedQueueEntry$(e)._link$2(this._previous, this); | |
| 1058 }, | |
| 1059 remove$0: function() { | |
| 1060 var t1 = this._next; | |
| 1061 this._previous.set$_next(t1); | |
| 1062 t1 = this._previous; | |
| 1063 this._next.set$_previous(t1); | |
| 1064 this._next = null; | |
| 1065 this._previous = null; | |
| 1066 return this._element; | |
| 1067 }, | |
| 1068 _asNonSentinelEntry$0: function() { | |
| 1069 return this; | |
| 1070 }, | |
| 1071 previousEntry$0: function() { | |
| 1072 return this._previous._asNonSentinelEntry$0(); | |
| 1073 }, | |
| 1074 nextEntry$0: function() { | |
| 1075 return this._next._asNonSentinelEntry$0(); | |
| 1076 }, | |
| 1077 get$element: function() { | |
| 1078 return this._element; | |
| 1079 }, | |
| 1080 DoubleLinkedQueueEntry$1: function(e) { | |
| 1081 this._element = e; | |
| 1082 } | |
| 1083 }; | |
| 1084 | |
| 1085 $$._DoubleLinkedQueueEntrySentinel = {"": "DoubleLinkedQueueEntry;_previous,_nex t,_element", | |
| 1086 remove$0: function() { | |
| 1087 throw $.$$throw($.StateError$("Empty queue")); | |
| 1088 }, | |
| 1089 _asNonSentinelEntry$0: function() { | |
| 1090 return; | |
| 1091 }, | |
| 1092 get$element: function() { | |
| 1093 throw $.$$throw($.StateError$("Empty queue")); | |
| 1094 }, | |
| 1095 _DoubleLinkedQueueEntrySentinel$0: function() { | |
| 1096 this._link$2(this, this); | |
| 1097 } | |
| 1098 }; | |
| 1099 | |
| 1100 $$.DoubleLinkedQueue = {"": "Iterable;_sentinel", | |
| 1101 addLast$1: function(value) { | |
| 1102 this._sentinel.prepend$1(value); | |
| 1103 }, | |
| 1104 add$1: function(value) { | |
| 1105 this._sentinel.prepend$1(value); | |
| 1106 }, | |
| 1107 removeLast$0: function() { | |
| 1108 return this._sentinel._previous.remove$0(); | |
| 1109 }, | |
| 1110 remove$1: function(o) { | |
| 1111 var entry = this._sentinel.nextEntry$0(); | |
| 1112 for (; !(entry === this._sentinel);) { | |
| 1113 if ($.$$eq(entry.get$element(), o) === true) { | |
| 1114 entry.remove$0(); | |
| 1115 return; | |
| 1116 } | |
| 1117 entry = entry.get$_next(); | |
| 1118 } | |
| 1119 }, | |
| 1120 removeAll$1: function(elements) { | |
| 1121 $.IterableMixinWorkaround_removeAllList(this, elements); | |
| 1122 }, | |
| 1123 removeMatching$1: function(test) { | |
| 1124 var entry, next; | |
| 1125 entry = this._sentinel.nextEntry$0(); | |
| 1126 for (; !(entry === this._sentinel); entry = next) { | |
| 1127 next = entry.get$_next(); | |
| 1128 if (test.call$1(entry.get$element()) === true) | |
| 1129 entry.remove$0(); | |
| 1130 } | |
| 1131 }, | |
| 1132 lastEntry$0: function() { | |
| 1133 return this._sentinel.previousEntry$0(); | |
| 1134 }, | |
| 1135 get$isEmpty: function() { | |
| 1136 var t1 = this._sentinel; | |
| 1137 return t1._next === t1; | |
| 1138 }, | |
| 1139 clear$0: function() { | |
| 1140 var t1 = this._sentinel; | |
| 1141 t1._next = t1; | |
| 1142 t1 = this._sentinel; | |
| 1143 t1._previous = t1; | |
| 1144 }, | |
| 1145 get$iterator: function() { | |
| 1146 return $._DoubleLinkedQueueIterator$(this._sentinel); | |
| 1147 }, | |
| 1148 toString$0: function() { | |
| 1149 return $.Collections_collectionToString(this); | |
| 1150 }, | |
| 1151 DoubleLinkedQueue$0: function() { | |
| 1152 this._sentinel = $._DoubleLinkedQueueEntrySentinel$(); | |
| 1153 }, | |
| 1154 $isCollection: function() { | |
| 1155 return true; | |
| 1156 } | |
| 1157 }; | |
| 1158 | |
| 1159 $$._DoubleLinkedQueueIterator = {"": "Object;_sentinel,_currentEntry,_liblib0$_c urrent", | |
| 1160 moveNext$0: function() { | |
| 1161 var t1, t2; | |
| 1162 t1 = this._currentEntry; | |
| 1163 if (t1 == null) | |
| 1164 return false; | |
| 1165 this._currentEntry = t1.get$_next(); | |
| 1166 t1 = this._currentEntry; | |
| 1167 t2 = this._sentinel; | |
| 1168 if (t1 == null ? t2 == null : t1 === t2) { | |
| 1169 this._currentEntry = null; | |
| 1170 this._liblib0$_current = null; | |
| 1171 this._sentinel = null; | |
| 1172 return false; | |
| 1173 } | |
| 1174 this._liblib0$_current = t1.get$element(); | |
| 1175 return true; | |
| 1176 }, | |
| 1177 get$current: function() { | |
| 1178 return this._liblib0$_current; | |
| 1179 } | |
| 1180 }; | |
| 1181 | |
| 1182 $$.HashSet = {"": "Collection;_backingMap", | |
| 1183 clear$0: function() { | |
| 1184 this._backingMap.clear$0(); | |
| 1185 }, | |
| 1186 add$1: function(value) { | |
| 1187 this._backingMap.$indexSet(value, value); | |
| 1188 }, | |
| 1189 remove$1: function(value) { | |
| 1190 var t1 = this._backingMap; | |
| 1191 if (t1.containsKey$1(value) !== true) | |
| 1192 return false; | |
| 1193 t1.remove$1(value); | |
| 1194 return true; | |
| 1195 }, | |
| 1196 contains$1: function(value) { | |
| 1197 return this._backingMap.containsKey$1(value); | |
| 1198 }, | |
| 1199 get$contains: function() { | |
| 1200 return new $.BoundClosure(this, "contains$1"); | |
| 1201 }, | |
| 1202 forEach$1: function(f) { | |
| 1203 this._backingMap.forEach$1(new $.HashSet_forEach_anon(f)); | |
| 1204 }, | |
| 1205 get$isEmpty: function() { | |
| 1206 return $.isEmpty(this._backingMap); | |
| 1207 }, | |
| 1208 get$length: function() { | |
| 1209 return $.length(this._backingMap); | |
| 1210 }, | |
| 1211 get$iterator: function() { | |
| 1212 return $._HashSetIterator$(this); | |
| 1213 }, | |
| 1214 toString$0: function() { | |
| 1215 return $.Collections_collectionToString(this); | |
| 1216 }, | |
| 1217 $isSet: true, | |
| 1218 $isCollection: function() { | |
| 1219 return true; | |
| 1220 } | |
| 1221 }; | |
| 1222 | |
| 1223 $$._HashSetIterator = {"": "Object;_keysIterator", | |
| 1224 get$current: function() { | |
| 1225 var result = this._keysIterator.get$current(); | |
| 1226 if (result === $.CONSTANT3) | |
| 1227 throw $.$$throw($.StateError$("Concurrent modification.")); | |
| 1228 return result; | |
| 1229 }, | |
| 1230 moveNext$0: function() { | |
| 1231 var t1, result, t2; | |
| 1232 t1 = this._keysIterator; | |
| 1233 do { | |
| 1234 result = t1.moveNext$0(); | |
| 1235 if (result === true) | |
| 1236 t2 = t1.get$current() == null || t1.get$current() === $.CONSTANT3; | |
| 1237 else | |
| 1238 t2 = false; | |
| 1239 } while (t2); | |
| 1240 return result; | |
| 1241 } | |
| 1242 }; | |
| 1243 | |
| 1244 $$.ListIterator = {"": "Object;_list,_liblib$_length,_liblib$_position,_liblib$_ current", | |
| 1245 moveNext$0: function() { | |
| 1246 var t1, t2, t3; | |
| 1247 t1 = this._list; | |
| 1248 t2 = t1.length; | |
| 1249 t3 = this._liblib$_length; | |
| 1250 if (t2 !== t3) | |
| 1251 throw $.$$throw($.ConcurrentModificationError$(t1)); | |
| 1252 t2 = this._liblib$_position; | |
| 1253 if (t2 !== (t2 | 0)) | |
| 1254 return this.moveNext$0$bailout0(1, t2, t1, t3); | |
| 1255 ++t2; | |
| 1256 if (t2 < t3) { | |
| 1257 this._liblib$_position = t2; | |
| 1258 if (t2 < 0 || t2 >= t1.length) | |
| 1259 throw $.ioore(t2); | |
| 1260 this._liblib$_current = t1[t2]; | |
| 1261 return true; | |
| 1262 } | |
| 1263 this._liblib$_current = null; | |
| 1264 return false; | |
| 1265 }, | |
| 1266 moveNext$0$bailout0: function(state0, t2, t1, t3) { | |
| 1267 t2 = $.$$add(t2, 1); | |
| 1268 if ($.$$lt(t2, t3) === true) { | |
| 1269 this._liblib$_position = t2; | |
| 1270 if (t2 !== (t2 | 0)) | |
| 1271 throw $.iae(t2); | |
| 1272 if (t2 < 0 || t2 >= t1.length) | |
| 1273 throw $.ioore(t2); | |
| 1274 this._liblib$_current = t1[t2]; | |
| 1275 return true; | |
| 1276 } | |
| 1277 this._liblib$_current = null; | |
| 1278 return false; | |
| 1279 }, | |
| 1280 get$current: function() { | |
| 1281 return this._liblib$_current; | |
| 1282 } | |
| 1283 }; | |
| 1284 | |
| 1285 $$.ObjectInterceptor = {"": "Object;", | |
| 1286 toString$0: function(receiver) { | |
| 1287 return receiver.toString$0(); | |
| 1288 }, | |
| 1289 $eq: function(receiver, a0) { | |
| 1290 return receiver.$eq(a0); | |
| 1291 }, | |
| 1292 $indexSet: function(receiver, a0, a1) { | |
| 1293 return receiver.$indexSet(a0, a1); | |
| 1294 }, | |
| 1295 get$iterator: function(receiver) { | |
| 1296 return receiver.get$iterator(); | |
| 1297 }, | |
| 1298 charCodeAt$1: function(receiver, a0) { | |
| 1299 return receiver.charCodeAt$1(a0); | |
| 1300 }, | |
| 1301 replaceAll$2: function(receiver, a0, a1) { | |
| 1302 return receiver.replaceAll$2(a0, a1); | |
| 1303 }, | |
| 1304 removeLast$0: function(receiver) { | |
| 1305 return receiver.removeLast$0(); | |
| 1306 }, | |
| 1307 $index: function(receiver, a0) { | |
| 1308 return receiver.$index(a0); | |
| 1309 }, | |
| 1310 indexOf$2: function(receiver, a0, a1) { | |
| 1311 return receiver.indexOf$2(a0, a1); | |
| 1312 }, | |
| 1313 $ge: function(receiver, a0) { | |
| 1314 return receiver.$ge(a0); | |
| 1315 }, | |
| 1316 get$length: function(receiver) { | |
| 1317 return receiver.get$length(); | |
| 1318 }, | |
| 1319 $add: function(receiver, a0) { | |
| 1320 return receiver.$add(a0); | |
| 1321 }, | |
| 1322 ceil$0: function(receiver) { | |
| 1323 return receiver.ceil$0(); | |
| 1324 }, | |
| 1325 clear$0: function(receiver) { | |
| 1326 return receiver.clear$0(); | |
| 1327 }, | |
| 1328 set$length: function(receiver, value) { | |
| 1329 return receiver.set$length(value); | |
| 1330 }, | |
| 1331 abs$0: function(receiver) { | |
| 1332 return receiver.abs$0(); | |
| 1333 }, | |
| 1334 $mul: function(receiver, a0) { | |
| 1335 return receiver.$mul(a0); | |
| 1336 }, | |
| 1337 toSet$0: function(receiver) { | |
| 1338 return receiver.toSet$0(); | |
| 1339 }, | |
| 1340 $gt: function(receiver, a0) { | |
| 1341 return receiver.$gt(a0); | |
| 1342 }, | |
| 1343 sort$1: function(receiver, a0) { | |
| 1344 return receiver.sort$1(a0); | |
| 1345 }, | |
| 1346 get$isNegative: function(receiver) { | |
| 1347 return receiver.get$isNegative(); | |
| 1348 }, | |
| 1349 remove$1: function(receiver, a0) { | |
| 1350 return receiver.remove$1(a0); | |
| 1351 }, | |
| 1352 floor$0: function(receiver) { | |
| 1353 return receiver.floor$0(); | |
| 1354 }, | |
| 1355 removeMatching$1: function(receiver, a0) { | |
| 1356 return receiver.removeMatching$1(a0); | |
| 1357 }, | |
| 1358 endsWith$1: function(receiver, a0) { | |
| 1359 return receiver.endsWith$1(a0); | |
| 1360 }, | |
| 1361 $shr: function(receiver, a0) { | |
| 1362 return receiver.$shr(a0); | |
| 1363 }, | |
| 1364 get$contains: function(receiver) { | |
| 1365 return receiver.get$contains(); | |
| 1366 }, | |
| 1367 substring$1: function(receiver, a0) { | |
| 1368 return receiver.substring$1(a0); | |
| 1369 }, | |
| 1370 $tdiv: function(receiver, a0) { | |
| 1371 return receiver.$tdiv(a0); | |
| 1372 }, | |
| 1373 get$isEmpty: function(receiver) { | |
| 1374 return receiver.get$isEmpty(); | |
| 1375 }, | |
| 1376 allMatches$1: function(receiver, a0) { | |
| 1377 return receiver.allMatches$1(a0); | |
| 1378 }, | |
| 1379 get$isNaN: function(receiver) { | |
| 1380 return receiver.get$isNaN(); | |
| 1381 }, | |
| 1382 $sub: function(receiver, a0) { | |
| 1383 return receiver.$sub(a0); | |
| 1384 }, | |
| 1385 get$hashCode: function(receiver) { | |
| 1386 return receiver.get$hashCode(); | |
| 1387 }, | |
| 1388 $lt: function(receiver, a0) { | |
| 1389 return receiver.$lt(a0); | |
| 1390 }, | |
| 1391 compareTo$1: function(receiver, a0) { | |
| 1392 return receiver.compareTo$1(a0); | |
| 1393 }, | |
| 1394 truncate$0: function(receiver) { | |
| 1395 return receiver.truncate$0(); | |
| 1396 }, | |
| 1397 forEach$1: function(receiver, a0) { | |
| 1398 return receiver.forEach$1(a0); | |
| 1399 }, | |
| 1400 add$1: function(receiver, a0) { | |
| 1401 return receiver.add$1(a0); | |
| 1402 }, | |
| 1403 $div: function(receiver, a0) { | |
| 1404 return receiver.$div(a0); | |
| 1405 }, | |
| 1406 addLast$1: function(receiver, a0) { | |
| 1407 return receiver.addLast$1(a0); | |
| 1408 }, | |
| 1409 $and: function(receiver, a0) { | |
| 1410 return receiver.$and(a0); | |
| 1411 } | |
| 1412 }; | |
| 1413 | |
| 1414 $$.JSFunction = {"": "Object;", | |
| 1415 toString$0: function(receiver) { | |
| 1416 return "Closure"; | |
| 1417 }, | |
| 1418 $eq: function(receiver, a) { | |
| 1419 return receiver === a; | |
| 1420 } | |
| 1421 }; | |
| 1422 | |
| 1423 $$.JSBool = {"": "Object;", | |
| 1424 toString$0: function(receiver) { | |
| 1425 return String(receiver); | |
| 1426 }, | |
| 1427 get$hashCode: function(receiver) { | |
| 1428 return receiver ? 519018 : 218159; | |
| 1429 }, | |
| 1430 $isbool: true, | |
| 1431 $eq: function(receiver, a) { | |
| 1432 return receiver === a; | |
| 1433 } | |
| 1434 }; | |
| 1435 | |
| 1436 $$.JSNull = {"": "Object;", | |
| 1437 toString$0: function(receiver) { | |
| 1438 return "null"; | |
| 1439 }, | |
| 1440 get$hashCode: function(receiver) { | |
| 1441 return 0; | |
| 1442 }, | |
| 1443 $eq: function(receiver, a) { | |
| 1444 return receiver == a; | |
| 1445 } | |
| 1446 }; | |
| 1447 | |
| 1448 $$.JSArray = {"": "Object;", | |
| 1449 add$1: function(receiver, value) { | |
| 1450 $.checkGrowable(receiver, "add"); | |
| 1451 receiver.push(value); | |
| 1452 }, | |
| 1453 removeLast$0: function(receiver) { | |
| 1454 $.checkGrowable(receiver, "removeLast"); | |
| 1455 if (receiver.length === 0) | |
| 1456 throw $.$$throw($.RangeError$value(-1)); | |
| 1457 return receiver.pop(); | |
| 1458 }, | |
| 1459 remove$1: function(receiver, element) { | |
| 1460 var i; | |
| 1461 $.checkGrowable(receiver, "remove"); | |
| 1462 for (i = 0; i < receiver.length; ++i) | |
| 1463 if ($.$$eq(receiver[i], element) === true) { | |
| 1464 receiver.splice(i, 1); | |
| 1465 return; | |
| 1466 } | |
| 1467 }, | |
| 1468 removeAll$1: function(receiver, elements) { | |
| 1469 $.IterableMixinWorkaround_removeAllList(receiver, elements); | |
| 1470 }, | |
| 1471 removeMatching$1: function(receiver, test) { | |
| 1472 $.IterableMixinWorkaround_removeMatchingList(receiver, test); | |
| 1473 }, | |
| 1474 addLast$1: function(receiver, value) { | |
| 1475 $.checkGrowable(receiver, "addLast"); | |
| 1476 receiver.push(value); | |
| 1477 }, | |
| 1478 clear$0: function(receiver) { | |
| 1479 this.set$length(receiver, 0); | |
| 1480 }, | |
| 1481 forEach$1: function(receiver, f) { | |
| 1482 var t1; | |
| 1483 for (t1 = this.get$iterator(receiver); t1.moveNext$0() === true;) | |
| 1484 f.call$1(t1.get$current()); | |
| 1485 return; | |
| 1486 }, | |
| 1487 sort$1: function(receiver, compare) { | |
| 1488 $.checkMutable(receiver, "sort"); | |
| 1489 $.IterableMixinWorkaround_sortList(receiver, compare); | |
| 1490 }, | |
| 1491 indexOf$2: function(receiver, element, start) { | |
| 1492 if (!(typeof start === "number" && Math.floor(start) === start)) | |
| 1493 throw $.$$throw($.ArgumentError$(start)); | |
| 1494 return $.Arrays_indexOf(receiver, element, start, receiver.length); | |
| 1495 }, | |
| 1496 contains$1: function(receiver, other) { | |
| 1497 var t1, i; | |
| 1498 for (t1 = $.getInterceptor(other), i = 0; i < receiver.length; ++i) | |
| 1499 if (t1.$eq(other, receiver[i]) === true) | |
| 1500 return true; | |
| 1501 return false; | |
| 1502 }, | |
| 1503 get$contains: function(receiver) { | |
| 1504 return new $.BoundClosure0(this, "contains$1", receiver); | |
| 1505 }, | |
| 1506 get$isEmpty: function(receiver) { | |
| 1507 return receiver.length === 0; | |
| 1508 }, | |
| 1509 toString$0: function(receiver) { | |
| 1510 return $.Collections_collectionToString(receiver); | |
| 1511 }, | |
| 1512 toSet$0: function(receiver) { | |
| 1513 return $.Set_Set$from(receiver); | |
| 1514 }, | |
| 1515 get$iterator: function(receiver) { | |
| 1516 return $.ListIterator$(receiver); | |
| 1517 }, | |
| 1518 get$hashCode: function(receiver) { | |
| 1519 return $.Primitives_objectHashCode(receiver); | |
| 1520 }, | |
| 1521 get$length: function(receiver) { | |
| 1522 return receiver.length; | |
| 1523 }, | |
| 1524 set$length: function(receiver, newLength) { | |
| 1525 if (!(typeof newLength === "number" && Math.floor(newLength) === newLength)) | |
| 1526 throw $.$$throw($.ArgumentError$(newLength)); | |
| 1527 if (newLength < 0) | |
| 1528 throw $.$$throw($.RangeError$value(newLength)); | |
| 1529 $.checkGrowable(receiver, "set length"); | |
| 1530 receiver.length = newLength; | |
| 1531 }, | |
| 1532 $index: function(receiver, index) { | |
| 1533 if (!(typeof index === "number" && Math.floor(index) === index)) | |
| 1534 throw $.$$throw($.ArgumentError$(index)); | |
| 1535 if (index >= receiver.length || index < 0) | |
| 1536 throw $.$$throw($.RangeError$value(index)); | |
| 1537 return receiver[index]; | |
| 1538 }, | |
| 1539 $indexSet: function(receiver, index, value) { | |
| 1540 $.checkMutable(receiver, "indexed set"); | |
| 1541 if (!(typeof index === "number" && Math.floor(index) === index)) | |
| 1542 throw $.$$throw($.ArgumentError$(index)); | |
| 1543 if (index >= receiver.length || index < 0) | |
| 1544 throw $.$$throw($.RangeError$value(index)); | |
| 1545 receiver[index] = value; | |
| 1546 }, | |
| 1547 $isList: function() { | |
| 1548 return true; | |
| 1549 }, | |
| 1550 $isCollection: function() { | |
| 1551 return true; | |
| 1552 }, | |
| 1553 $eq: function(receiver, a) { | |
| 1554 return receiver === a; | |
| 1555 } | |
| 1556 }; | |
| 1557 | |
| 1558 $$.JSNumber = {"": "Object;", | |
| 1559 compareTo$1: function(receiver, b) { | |
| 1560 var bIsNegative; | |
| 1561 if (!(typeof b === "number")) | |
| 1562 throw $.$$throw($.ArgumentError$(b)); | |
| 1563 if (receiver < b) | |
| 1564 return -1; | |
| 1565 else if (receiver > b) | |
| 1566 return 1; | |
| 1567 else if (receiver === b) { | |
| 1568 if (receiver === 0) { | |
| 1569 bIsNegative = this.get$isNegative(b); | |
| 1570 if ($.$$eq(this.get$isNegative(receiver), bIsNegative) === true) | |
| 1571 return 0; | |
| 1572 if (this.get$isNegative(receiver) === true) | |
| 1573 return -1; | |
| 1574 return 1; | |
| 1575 } | |
| 1576 return 0; | |
| 1577 } else if (this.get$isNaN(receiver) === true) { | |
| 1578 if (this.get$isNaN(b) === true) | |
| 1579 return 0; | |
| 1580 return 1; | |
| 1581 } else | |
| 1582 return -1; | |
| 1583 }, | |
| 1584 get$isNegative: function(receiver) { | |
| 1585 return receiver === 0 ? 1 / receiver < 0 : receiver < 0; | |
| 1586 }, | |
| 1587 get$isNaN: function(receiver) { | |
| 1588 return isNaN(receiver); | |
| 1589 }, | |
| 1590 abs$0: function(receiver) { | |
| 1591 return Math.abs(receiver); | |
| 1592 }, | |
| 1593 ceil$0: function(receiver) { | |
| 1594 return Math.ceil(receiver); | |
| 1595 }, | |
| 1596 floor$0: function(receiver) { | |
| 1597 return Math.floor(receiver); | |
| 1598 }, | |
| 1599 truncate$0: function(receiver) { | |
| 1600 return receiver < 0 ? this.ceil$0(receiver) : this.floor$0(receiver); | |
| 1601 }, | |
| 1602 toString$0: function(receiver) { | |
| 1603 if (receiver === 0 && (1 / receiver) < 0) | |
| 1604 return "-0.0"; | |
| 1605 else | |
| 1606 return String(receiver); | |
| 1607 }, | |
| 1608 get$hashCode: function(receiver) { | |
| 1609 return receiver & 0x1FFFFFFF; | |
| 1610 }, | |
| 1611 $add: function(receiver, other) { | |
| 1612 if (!(typeof other === "number")) | |
| 1613 throw $.$$throw($.ArgumentError$(other)); | |
| 1614 return receiver + other; | |
| 1615 }, | |
| 1616 $sub: function(receiver, other) { | |
| 1617 if (!(typeof other === "number")) | |
| 1618 throw $.$$throw($.ArgumentError$(other)); | |
| 1619 return receiver - other; | |
| 1620 }, | |
| 1621 $div: function(receiver, other) { | |
| 1622 if (!(typeof other === "number")) | |
| 1623 throw $.$$throw($.ArgumentError$(other)); | |
| 1624 return receiver / other; | |
| 1625 }, | |
| 1626 $mul: function(receiver, other) { | |
| 1627 return receiver * other; | |
| 1628 }, | |
| 1629 $tdiv: function(receiver, other) { | |
| 1630 return this.truncate$0(receiver / other); | |
| 1631 }, | |
| 1632 $shr: function(receiver, other) { | |
| 1633 if (other < 0) | |
| 1634 throw $.$$throw($.ArgumentError$(other)); | |
| 1635 if (receiver > 0) { | |
| 1636 if (other > 31) | |
| 1637 return 0; | |
| 1638 return receiver >>> other; | |
| 1639 } | |
| 1640 if (other > 31) | |
| 1641 other = 31; | |
| 1642 return (receiver >> other) >>> 0; | |
| 1643 }, | |
| 1644 $and: function(receiver, other) { | |
| 1645 if (!(typeof other === "number")) | |
| 1646 throw $.$$throw($.ArgumentError$(other)); | |
| 1647 return (receiver & other) >>> 0; | |
| 1648 }, | |
| 1649 $lt: function(receiver, other) { | |
| 1650 if (!(typeof other === "number")) | |
| 1651 throw $.$$throw($.ArgumentError$(other)); | |
| 1652 return receiver < other; | |
| 1653 }, | |
| 1654 $gt: function(receiver, other) { | |
| 1655 if (!(typeof other === "number")) | |
| 1656 throw $.$$throw($.ArgumentError$(other)); | |
| 1657 return receiver > other; | |
| 1658 }, | |
| 1659 $ge: function(receiver, other) { | |
| 1660 if (!(typeof other === "number")) | |
| 1661 throw $.$$throw($.ArgumentError$(other)); | |
| 1662 return receiver >= other; | |
| 1663 }, | |
| 1664 $eq: function(receiver, a) { | |
| 1665 return receiver === a; | |
| 1666 } | |
| 1667 }; | |
| 1668 | |
| 1669 $$.JSInt = {"": "JSNumber;", | |
| 1670 $eq: function(receiver, a) { | |
| 1671 return receiver === a; | |
| 1672 } | |
| 1673 }; | |
| 1674 | |
| 1675 $$.JSDouble = {"": "JSNumber;", | |
| 1676 $eq: function(receiver, a) { | |
| 1677 return receiver === a; | |
| 1678 } | |
| 1679 }; | |
| 1680 | |
| 1681 $$.JSString = {"": "Object;", | |
| 1682 charCodeAt$1: function(receiver, index) { | |
| 1683 if (index < 0) | |
| 1684 throw $.$$throw($.RangeError$value(index)); | |
| 1685 if (index >= receiver.length) | |
| 1686 throw $.$$throw($.RangeError$value(index)); | |
| 1687 return receiver.charCodeAt(index); | |
| 1688 }, | |
| 1689 allMatches$1: function(receiver, str) { | |
| 1690 $.checkString(str); | |
| 1691 return $.allMatchesInStringUnchecked(receiver, str); | |
| 1692 }, | |
| 1693 endsWith$1: function(receiver, other) { | |
| 1694 var otherLength, t1; | |
| 1695 $.checkString(other); | |
| 1696 otherLength = other.length; | |
| 1697 t1 = receiver.length; | |
| 1698 if (otherLength > t1) | |
| 1699 return false; | |
| 1700 return other === this.substring$1(receiver, t1 - otherLength); | |
| 1701 }, | |
| 1702 replaceAll$2: function(receiver, from, to) { | |
| 1703 $.checkString(to); | |
| 1704 return $.stringReplaceAllUnchecked(receiver, from, to); | |
| 1705 }, | |
| 1706 substring$2: function(receiver, startIndex, endIndex) { | |
| 1707 var t1; | |
| 1708 $.checkNum(startIndex); | |
| 1709 if (endIndex == null) | |
| 1710 endIndex = receiver.length; | |
| 1711 $.checkNum(endIndex); | |
| 1712 t1 = $.getInterceptor$JSNumber(startIndex); | |
| 1713 if (t1.$lt(startIndex, 0) === true) | |
| 1714 throw $.$$throw($.RangeError$value(startIndex)); | |
| 1715 if (t1.$gt(startIndex, endIndex) === true) | |
| 1716 throw $.$$throw($.RangeError$value(startIndex)); | |
| 1717 if ($.$$gt(endIndex, receiver.length) === true) | |
| 1718 throw $.$$throw($.RangeError$value(endIndex)); | |
| 1719 return receiver.substring(startIndex, endIndex); | |
| 1720 }, | |
| 1721 substring$1: function($receiver, startIndex) { | |
| 1722 return this.substring$2($receiver, startIndex, null); | |
| 1723 }, | |
| 1724 indexOf$2: function(receiver, other, start) { | |
| 1725 $.checkNull(other); | |
| 1726 if (!(typeof start === "number" && Math.floor(start) === start)) | |
| 1727 throw $.$$throw($.ArgumentError$(start)); | |
| 1728 if (!(typeof other === "string")) | |
| 1729 throw $.$$throw($.ArgumentError$(other)); | |
| 1730 if (start < 0) | |
| 1731 return -1; | |
| 1732 return receiver.indexOf(other, start); | |
| 1733 }, | |
| 1734 contains$2: function(receiver, other, startIndex) { | |
| 1735 $.checkNull(other); | |
| 1736 return $.stringContainsUnchecked(receiver, other, startIndex); | |
| 1737 }, | |
| 1738 get$contains: function(receiver) { | |
| 1739 return new $.BoundClosure1(this, "contains$2", receiver); | |
| 1740 }, | |
| 1741 get$isEmpty: function(receiver) { | |
| 1742 return receiver.length === 0; | |
| 1743 }, | |
| 1744 compareTo$1: function(receiver, other) { | |
| 1745 var t1; | |
| 1746 if (!(typeof other === "string")) | |
| 1747 throw $.$$throw($.ArgumentError$(other)); | |
| 1748 if (receiver === other) | |
| 1749 t1 = 0; | |
| 1750 else | |
| 1751 t1 = receiver < other ? -1 : 1; | |
| 1752 return t1; | |
| 1753 }, | |
| 1754 toString$0: function(receiver) { | |
| 1755 return receiver; | |
| 1756 }, | |
| 1757 get$hashCode: function(receiver) { | |
| 1758 var hash, i, hash0, hash1; | |
| 1759 for (hash = 0, i = 0; i < receiver.length; ++i, hash = hash1) { | |
| 1760 hash0 = 536870911 & hash + receiver.charCodeAt(i); | |
| 1761 hash1 = 536870911 & hash0 + ((524287 & hash0) << 10 >>> 0); | |
| 1762 hash1 = hash1 ^ (hash1 >> 6); | |
| 1763 } | |
| 1764 hash0 = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); | |
| 1765 hash0 = hash0 ^ (hash0 >> 11); | |
| 1766 return 536870911 & hash0 + ((16383 & hash0) << 15 >>> 0); | |
| 1767 }, | |
| 1768 get$length: function(receiver) { | |
| 1769 return receiver.length; | |
| 1770 }, | |
| 1771 $index: function(receiver, index) { | |
| 1772 if (!(typeof index === "number" && Math.floor(index) === index)) | |
| 1773 throw $.$$throw($.ArgumentError$(index)); | |
| 1774 if (index >= receiver.length || index < 0) | |
| 1775 throw $.$$throw($.RangeError$value(index)); | |
| 1776 return receiver[index]; | |
| 1777 }, | |
| 1778 $isString: true, | |
| 1779 $eq: function(receiver, a) { | |
| 1780 return receiver === a; | |
| 1781 } | |
| 1782 }; | |
| 1783 | |
| 1784 $$.Result = {"": "Object;_sorted", | |
| 1785 get$runs: function() { | |
| 1786 return $.length(this._sorted); | |
| 1787 }, | |
| 1788 get$sum: function() { | |
| 1789 var t1 = {}; | |
| 1790 t1.result_0 = 0; | |
| 1791 $.forEach(this._sorted, new $.Result_sum_anon(t1)); | |
| 1792 return t1.result_0; | |
| 1793 }, | |
| 1794 get$mean: function() { | |
| 1795 return $.$$div(this.get$sum(), this.get$runs()); | |
| 1796 }, | |
| 1797 get$variance: function() { | |
| 1798 var t1, m; | |
| 1799 t1 = {}; | |
| 1800 m = this.get$mean(); | |
| 1801 t1.result_0 = 0; | |
| 1802 $.forEach(this._sorted, new $.Result_variance_anon(t1, m)); | |
| 1803 return $.$$div(t1.result_0, $.$$sub(this.get$runs(), 1)); | |
| 1804 }, | |
| 1805 get$deviation: function() { | |
| 1806 return $.sqrt(this.get$variance()); | |
| 1807 }, | |
| 1808 get$sem: function() { | |
| 1809 return $.$$mul($.$$div(this.get$deviation(), $.sqrt(this.get$runs())), 2.776 ); | |
| 1810 }, | |
| 1811 get$error: function() { | |
| 1812 return $.$$mul($.$$div(this.get$sem(), this.get$mean()), 100); | |
| 1813 }, | |
| 1814 toString$0: function() { | |
| 1815 return "[Result: mean = " + $.S(this.get$mean()) + "]"; | |
| 1816 } | |
| 1817 }; | |
| 1818 | |
| 1819 $$.Suite = {"": "Object;_window>,_name>,_operations>,_nTests,_nRanTests", | |
| 1820 prep$1: function(operation) { | |
| 1821 this._operations.push(operation); | |
| 1822 return this; | |
| 1823 }, | |
| 1824 test$2: function(name, test_) { | |
| 1825 var t1; | |
| 1826 this._nTests = this._nTests + 1; | |
| 1827 t1 = new $.Suite_test_anon(this, name, test_); | |
| 1828 this._operations.push(t1); | |
| 1829 return this; | |
| 1830 }, | |
| 1831 end$0: function() { | |
| 1832 this._postMessage$2("inited", $.makeLiteralMap(["nTests", this._nTests])); | |
| 1833 }, | |
| 1834 _run$0: function() { | |
| 1835 var t1 = {}; | |
| 1836 t1.currentOperation_0 = 0; | |
| 1837 t1 = new $.Suite__run_handler(t1, this); | |
| 1838 this._window.setTimeout$2(t1, 0); | |
| 1839 }, | |
| 1840 _reportTestResults$2: function(name, result) { | |
| 1841 this._nRanTests = this._nRanTests + 1; | |
| 1842 this._postMessage$2("result", $.makeLiteralMap(["testName", name, "mean", re sult.get$mean(), "error", result.get$error(), "percent", 100 * this._nRanTests / this._nTests])); | |
| 1843 }, | |
| 1844 _postMessage$2: function(command, data) { | |
| 1845 var payload = $.makeLiteralMap(["command", command]); | |
| 1846 if (!(data == null)) | |
| 1847 $.$$indexSet(payload, "data", data); | |
| 1848 this._window.get$top().postMessage$2($._JsonStringifier_stringify(payload), "*"); | |
| 1849 }, | |
| 1850 _postMessage$1: function(command) { | |
| 1851 return this._postMessage$2(command, null); | |
| 1852 }, | |
| 1853 Suite$2: function(_window, _name) { | |
| 1854 var t1 = new $.starter(this); | |
| 1855 $.add(this._window.get$on().get$message(), t1); | |
| 1856 } | |
| 1857 }; | |
| 1858 | |
| 1859 $$.Events = {"": "Object;_ptr", | |
| 1860 $index: function(type) { | |
| 1861 return $.EventListenerList$(this._ptr, type); | |
| 1862 } | |
| 1863 }; | |
| 1864 | |
| 1865 $$.EventListenerList = {"": "Object;_ptr,_type", | |
| 1866 add$2: function(listener, useCapture) { | |
| 1867 this._ptr.$$dom_addEventListener$3(this._type, listener, useCapture); | |
| 1868 return this; | |
| 1869 }, | |
| 1870 add$1: function(listener) { | |
| 1871 return this.add$2(listener, false); | |
| 1872 }, | |
| 1873 remove$2: function(listener, useCapture) { | |
| 1874 this._ptr.$$dom_removeEventListener$3(this._type, listener, useCapture); | |
| 1875 return this; | |
| 1876 }, | |
| 1877 remove$1: function(listener) { | |
| 1878 return this.remove$2(listener, false); | |
| 1879 } | |
| 1880 }; | |
| 1881 | |
| 1882 $$.WindowEvents = {"": "Events;_ptr", | |
| 1883 get$error: function() { | |
| 1884 return this.$index("error"); | |
| 1885 }, | |
| 1886 get$message: function() { | |
| 1887 return this.$index("message"); | |
| 1888 } | |
| 1889 }; | |
| 1890 | |
| 1891 $$._DOMWindowCrossFrame = {"": "Object;_liblib3$_window", | |
| 1892 get$top: function() { | |
| 1893 return $._DOMWindowCrossFrame__createSafe(this._liblib3$_window.top); | |
| 1894 }, | |
| 1895 postMessage$3: function(message, targetOrigin, messagePorts) { | |
| 1896 var t1 = this._liblib3$_window; | |
| 1897 if (messagePorts == null) | |
| 1898 t1.postMessage(message,targetOrigin); | |
| 1899 else | |
| 1900 t1.postMessage(message,targetOrigin,messagePorts); | |
| 1901 }, | |
| 1902 postMessage$2: function(message, targetOrigin) { | |
| 1903 return this.postMessage$3(message, targetOrigin, null); | |
| 1904 } | |
| 1905 }; | |
| 1906 | |
| 1907 $$.FixedSizeListIterator = {"": "Object;_array,_length,_position,_current", | |
| 1908 moveNext$0: function() { | |
| 1909 var t1, t2; | |
| 1910 t1 = this._position; | |
| 1911 if (typeof t1 !== "number") | |
| 1912 return this.moveNext$0$bailout(1, t1); | |
| 1913 ++t1; | |
| 1914 t2 = this._length; | |
| 1915 if (typeof t2 !== "number") | |
| 1916 return this.moveNext$0$bailout(2, t1, t2); | |
| 1917 if (t1 < t2) { | |
| 1918 t2 = this._array; | |
| 1919 if (typeof t2 !== "string" && (typeof t2 !== "object" || t2 === null || t2 .constructor !== Array && !t2.$isJavaScriptIndexingBehavior())) | |
| 1920 return this.moveNext$0$bailout(3, t1, t2); | |
| 1921 if (t1 !== (t1 | 0)) | |
| 1922 throw $.iae(t1); | |
| 1923 if (t1 < 0 || t1 >= t2.length) | |
| 1924 throw $.ioore(t1); | |
| 1925 this._current = t2[t1]; | |
| 1926 this._position = t1; | |
| 1927 return true; | |
| 1928 } | |
| 1929 this._current = null; | |
| 1930 this._position = t2; | |
| 1931 return false; | |
| 1932 }, | |
| 1933 moveNext$0$bailout: function(state0, t1, t2) { | |
| 1934 switch (state0) { | |
| 1935 case 0: | |
| 1936 t1 = this._position; | |
| 1937 case 1: | |
| 1938 state0 = 0; | |
| 1939 t1 = $.$$add(t1, 1); | |
| 1940 t2 = this._length; | |
| 1941 case 2: | |
| 1942 state0 = 0; | |
| 1943 case 3: | |
| 1944 if (state0 === 3 || state0 === 0 && $.$$lt(t1, t2) === true) | |
| 1945 switch (state0) { | |
| 1946 case 0: | |
| 1947 t2 = this._array; | |
| 1948 case 3: | |
| 1949 state0 = 0; | |
| 1950 this._current = $.$$index(t2, t1); | |
| 1951 this._position = t1; | |
| 1952 return true; | |
| 1953 } | |
| 1954 this._current = null; | |
| 1955 this._position = t2; | |
| 1956 return false; | |
| 1957 } | |
| 1958 }, | |
| 1959 get$current: function() { | |
| 1960 return this._current; | |
| 1961 } | |
| 1962 }; | |
| 1963 | |
| 1964 $$.JsonUnsupportedObjectError = {"": "Object;unsupportedObject,cause", | |
| 1965 toString$0: function() { | |
| 1966 if (!(this.cause == null)) | |
| 1967 return "Calling toJson method on object failed."; | |
| 1968 else | |
| 1969 return "Object toJson method returns non-serializable value."; | |
| 1970 } | |
| 1971 }; | |
| 1972 | |
| 1973 $$._JsonStringifier = {"": "Object;sb>,seen", | |
| 1974 checkCycle$1: function(object) { | |
| 1975 var t1, t2, i, t3; | |
| 1976 for (t1 = this.seen, t2 = t1.length, i = 0; i < t2; ++i) { | |
| 1977 t3 = t1[i]; | |
| 1978 if (t3 == null ? object == null : t3 === object) | |
| 1979 throw $.$$throw("Cyclic structure"); | |
| 1980 } | |
| 1981 t1.push(object); | |
| 1982 }, | |
| 1983 stringifyValue$1: function(object) { | |
| 1984 var customJson, e, t1, exception; | |
| 1985 if (this.stringifyJsonValue$1(object) !== true) { | |
| 1986 this.checkCycle$1(object); | |
| 1987 try { | |
| 1988 customJson = object.toJson$0(); | |
| 1989 if (this.stringifyJsonValue$1(customJson) !== true) | |
| 1990 throw $.$$throw($.JsonUnsupportedObjectError$(object)); | |
| 1991 t1 = this.seen; | |
| 1992 if (0 >= t1.length) | |
| 1993 throw $.ioore(0); | |
| 1994 t1.pop(); | |
| 1995 } catch (exception) { | |
| 1996 t1 = $.unwrapException(exception); | |
| 1997 e = t1; | |
| 1998 throw $.$$throw($.JsonUnsupportedObjectError$withCause(object, e)); | |
| 1999 } | |
| 2000 | |
| 2001 } | |
| 2002 }, | |
| 2003 stringifyJsonValue$1: function(object) { | |
| 2004 var t1, t2, t3, i; | |
| 2005 t1 = {}; | |
| 2006 if (typeof object === "number") { | |
| 2007 $.add(this.sb, $.CONSTANT2.toString$0(object)); | |
| 2008 return true; | |
| 2009 } else if (object === true) { | |
| 2010 $.add(this.sb, "true"); | |
| 2011 return true; | |
| 2012 } else if (object === false) { | |
| 2013 $.add(this.sb, "false"); | |
| 2014 return true; | |
| 2015 } else if (object == null) { | |
| 2016 $.add(this.sb, "null"); | |
| 2017 return true; | |
| 2018 } else if (typeof object === "string") { | |
| 2019 t1 = this.sb; | |
| 2020 t2 = $.getInterceptor$JSArray(t1); | |
| 2021 t2.add$1(t1, "\""); | |
| 2022 $._JsonStringifier_escape(t1, object); | |
| 2023 t2.add$1(t1, "\""); | |
| 2024 return true; | |
| 2025 } else if (typeof object === "object" && object !== null && (object.construc tor === Array || object.$isList())) { | |
| 2026 if (typeof object !== "object" || object === null || object.constructor != = Array && !object.$isJavaScriptIndexingBehavior()) | |
| 2027 return this.stringifyJsonValue$1$bailout(1, object); | |
| 2028 this.checkCycle$1(object); | |
| 2029 t2 = this.sb; | |
| 2030 t3 = $.getInterceptor$JSArray(t2); | |
| 2031 t3.add$1(t2, "["); | |
| 2032 if (object.length > 0) { | |
| 2033 this.stringifyValue$1(object[0]); | |
| 2034 for (i = 1; i < object.length; ++i) { | |
| 2035 t3.add$1(t2, ","); | |
| 2036 if (i >= object.length) | |
| 2037 throw $.ioore(i); | |
| 2038 this.stringifyValue$1(object[i]); | |
| 2039 } | |
| 2040 } | |
| 2041 t3.add$1(t2, "]"); | |
| 2042 t1 = this.seen; | |
| 2043 if (0 >= t1.length) | |
| 2044 throw $.ioore(0); | |
| 2045 t1.pop(); | |
| 2046 return true; | |
| 2047 } else if (typeof object === "object" && object !== null && !!object.$isMap) { | |
| 2048 this.checkCycle$1(object); | |
| 2049 t2 = this.sb; | |
| 2050 t3 = $.getInterceptor$JSArray(t2); | |
| 2051 t3.add$1(t2, "{"); | |
| 2052 t1.first_0 = true; | |
| 2053 object.forEach$1(new $._JsonStringifier_stringifyJsonValue_anon(t1, this)) ; | |
| 2054 t3.add$1(t2, "}"); | |
| 2055 t2 = this.seen; | |
| 2056 if (0 >= t2.length) | |
| 2057 throw $.ioore(0); | |
| 2058 t2.pop(); | |
| 2059 return true; | |
| 2060 } else | |
| 2061 return false; | |
| 2062 }, | |
| 2063 stringifyJsonValue$1$bailout: function(state0, object) { | |
| 2064 switch (state0) { | |
| 2065 case 0: | |
| 2066 t1 = {}; | |
| 2067 case 1: | |
| 2068 var t1, t2, t3, i; | |
| 2069 if (state0 === 0 && typeof object === "number") { | |
| 2070 $.add(this.sb, $.CONSTANT2.toString$0(object)); | |
| 2071 return true; | |
| 2072 } else | |
| 2073 switch (state0) { | |
| 2074 case 0: | |
| 2075 case 1: | |
| 2076 if (state0 === 0 && object === true) { | |
| 2077 $.add(this.sb, "true"); | |
| 2078 return true; | |
| 2079 } else | |
| 2080 switch (state0) { | |
| 2081 case 0: | |
| 2082 case 1: | |
| 2083 if (state0 === 0 && object === false) { | |
| 2084 $.add(this.sb, "false"); | |
| 2085 return true; | |
| 2086 } else | |
| 2087 switch (state0) { | |
| 2088 case 0: | |
| 2089 case 1: | |
| 2090 if (state0 === 0 && object == null) { | |
| 2091 $.add(this.sb, "null"); | |
| 2092 return true; | |
| 2093 } else | |
| 2094 switch (state0) { | |
| 2095 case 0: | |
| 2096 case 1: | |
| 2097 if (state0 === 0 && typeof object === "string") { | |
| 2098 t1 = this.sb; | |
| 2099 t2 = $.getInterceptor$JSArray(t1); | |
| 2100 t2.add$1(t1, "\""); | |
| 2101 $._JsonStringifier_escape(t1, object); | |
| 2102 t2.add$1(t1, "\""); | |
| 2103 return true; | |
| 2104 } else | |
| 2105 switch (state0) { | |
| 2106 case 0: | |
| 2107 case 1: | |
| 2108 if (state0 === 1 || state0 === 0 && typeof object === "object" && object !== null && (object.constructor === Array || obje ct.$isList())) | |
| 2109 switch (state0) { | |
| 2110 case 0: | |
| 2111 case 1: | |
| 2112 state0 = 0; | |
| 2113 this.checkCycle$1(object); | |
| 2114 t2 = this.sb; | |
| 2115 t3 = $.getInterceptor$JSArray(t2); | |
| 2116 t3.add$1(t2, "["); | |
| 2117 t1 = $.getInterceptor$JSStringJSArra y(object); | |
| 2118 if ($.$$gt(t1.get$length(object), 0) === true) { | |
| 2119 this.stringifyValue$1(t1.$index(ob ject, 0)); | |
| 2120 for (i = 1; $.CONSTANT4.$lt(i, t1. get$length(object)); ++i) { | |
| 2121 t3.add$1(t2, ","); | |
| 2122 this.stringifyValue$1(t1.$index( object, i)); | |
| 2123 } | |
| 2124 } | |
| 2125 t3.add$1(t2, "]"); | |
| 2126 t1 = this.seen; | |
| 2127 if (0 >= t1.length) | |
| 2128 throw $.ioore(0); | |
| 2129 t1.pop(); | |
| 2130 return true; | |
| 2131 } | |
| 2132 else if (typeof object === "object" && obj ect !== null && !!object.$isMap) { | |
| 2133 this.checkCycle$1(object); | |
| 2134 t2 = this.sb; | |
| 2135 t3 = $.getInterceptor$JSArray(t2); | |
| 2136 t3.add$1(t2, "{"); | |
| 2137 t1.first_0 = true; | |
| 2138 object.forEach$1(new $._JsonStringifier_ stringifyJsonValue_anon(t1, this)); | |
| 2139 t3.add$1(t2, "}"); | |
| 2140 t2 = this.seen; | |
| 2141 if (0 >= t2.length) | |
| 2142 throw $.ioore(0); | |
| 2143 t2.pop(); | |
| 2144 return true; | |
| 2145 } else | |
| 2146 return false; | |
| 2147 } | |
| 2148 } | |
| 2149 } | |
| 2150 } | |
| 2151 } | |
| 2152 } | |
| 2153 } | |
| 2154 }; | |
| 2155 | |
| 2156 $$.main_anon = {"": "Closure;", | |
| 2157 call$0: function() { | |
| 2158 } | |
| 2159 }; | |
| 2160 | |
| 2161 $$.main_anon0 = {"": "Closure;", | |
| 2162 call$0: function() { | |
| 2163 } | |
| 2164 }; | |
| 2165 | |
| 2166 $$.Maps__emitMap_anon = {"": "Closure;box_0,result_1,visiting_2", | |
| 2167 call$2: function(k, v) { | |
| 2168 var t1, t2; | |
| 2169 t1 = this.box_0; | |
| 2170 if (t1.first_0 !== true) | |
| 2171 $.add(this.result_1, ", "); | |
| 2172 t1.first_0 = false; | |
| 2173 t1 = this.result_1; | |
| 2174 t2 = this.visiting_2; | |
| 2175 $.Collections__emitObject(k, t1, t2); | |
| 2176 $.add(t1, ": "); | |
| 2177 $.Collections__emitObject(v, t1, t2); | |
| 2178 } | |
| 2179 }; | |
| 2180 | |
| 2181 $$._LinkedHashMapImpl_forEach_anon = {"": "Closure;f_0", | |
| 2182 call$1: function(entry) { | |
| 2183 this.f_0.call$2(entry.get$key(), entry.get$value()); | |
| 2184 } | |
| 2185 }; | |
| 2186 | |
| 2187 $$.Collection_clear_anon = {"": "Closure;", | |
| 2188 call$1: function(e) { | |
| 2189 return true; | |
| 2190 } | |
| 2191 }; | |
| 2192 | |
| 2193 $$.HashSet_forEach_anon = {"": "Closure;f_0", | |
| 2194 call$2: function(key, value) { | |
| 2195 this.f_0.call$1(key); | |
| 2196 } | |
| 2197 }; | |
| 2198 | |
| 2199 $$.NoSuchMethodError_toString_anon = {"": "Closure;box_0", | |
| 2200 call$2: function(key, value) { | |
| 2201 var t1 = this.box_0; | |
| 2202 if ($.$$gt(t1.i_1, 0) === true) | |
| 2203 $.add(t1.sb_0, ", "); | |
| 2204 $.add(t1.sb_0, key); | |
| 2205 $.add(t1.sb_0, ": "); | |
| 2206 $.add(t1.sb_0, $.Error_safeToString(value)); | |
| 2207 t1.i_1 = $.$$add(t1.i_1, 1); | |
| 2208 } | |
| 2209 }; | |
| 2210 | |
| 2211 $$._convertDartToNative_PrepareForStructuredClone_findSlot = {"": "Closure;value s_1,copies_2", | |
| 2212 call$1: function(value) { | |
| 2213 var t1, length, i, t2; | |
| 2214 t1 = this.values_1; | |
| 2215 if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1.c onstructor !== Array && !t1.$isJavaScriptIndexingBehavior())) | |
| 2216 return this.call$1$bailout0(1, value, t1); | |
| 2217 length = t1.length; | |
| 2218 for (i = 0; i < length; ++i) { | |
| 2219 t2 = t1[i]; | |
| 2220 if (t2 == null ? value == null : t2 === value) | |
| 2221 return i; | |
| 2222 } | |
| 2223 $.add(t1, value); | |
| 2224 $.add(this.copies_2, null); | |
| 2225 return length; | |
| 2226 }, | |
| 2227 call$1$bailout0: function(state0, value, t1, t3, length) { | |
| 2228 switch (state0) { | |
| 2229 case 0: | |
| 2230 t1 = this.values_1; | |
| 2231 case 1: | |
| 2232 state0 = 0; | |
| 2233 t3 = $.getInterceptor$JSStringJSArray(t1); | |
| 2234 length = t3.get$length(t1); | |
| 2235 case 2: | |
| 2236 var i, t2; | |
| 2237 state0 = 0; | |
| 2238 for (i = 0; $.CONSTANT4.$lt(i, length); ++i) { | |
| 2239 t2 = t3.$index(t1, i); | |
| 2240 if (t2 == null ? value == null : t2 === value) | |
| 2241 return i; | |
| 2242 } | |
| 2243 $.add(t1, value); | |
| 2244 $.add(this.copies_2, null); | |
| 2245 return length; | |
| 2246 } | |
| 2247 } | |
| 2248 }; | |
| 2249 | |
| 2250 $$._convertDartToNative_PrepareForStructuredClone_readSlot = {"": "Closure;copie s_3", | |
| 2251 call$1: function(i) { | |
| 2252 return $.$$index(this.copies_3, i); | |
| 2253 } | |
| 2254 }; | |
| 2255 | |
| 2256 $$._convertDartToNative_PrepareForStructuredClone_writeSlot = {"": "Closure;copi es_4", | |
| 2257 call$2: function(i, x) { | |
| 2258 $.$$indexSet(this.copies_4, i, x); | |
| 2259 } | |
| 2260 }; | |
| 2261 | |
| 2262 $$._convertDartToNative_PrepareForStructuredClone_cleanupSlots = {"": "Closure;" , | |
| 2263 call$0: function() { | |
| 2264 } | |
| 2265 }; | |
| 2266 | |
| 2267 $$._convertDartToNative_PrepareForStructuredClone_walk = {"": "Closure;findSlot_ 5,readSlot_6,writeSlot_7", | |
| 2268 call$1: function(e) { | |
| 2269 var t1, slot, t2, length, copy, t3, i, element, elementCopy, copy0, j, t4; | |
| 2270 t1 = {}; | |
| 2271 if (e == null) | |
| 2272 return e; | |
| 2273 if (typeof e === "boolean") | |
| 2274 return e; | |
| 2275 if (typeof e === "number") | |
| 2276 return e; | |
| 2277 if (typeof e === "string") | |
| 2278 return e; | |
| 2279 if (typeof e === "object" && e !== null && !!e.$isDateTime) | |
| 2280 throw $.$$throw($.UnimplementedError$("structured clone of DateTime")); | |
| 2281 if (typeof e === "object" && e !== null && !!e.$isRegExp) | |
| 2282 throw $.$$throw($.UnimplementedError$("structured clone of RegExp")); | |
| 2283 if (typeof e === "object" && e !== null && e.$isFile()) | |
| 2284 return e; | |
| 2285 if (typeof e === "object" && e !== null && e.$isBlob()) | |
| 2286 return e; | |
| 2287 if (typeof e === "object" && e !== null && e.$isFileList()) | |
| 2288 return e; | |
| 2289 if (typeof e === "object" && e !== null && e.$isImageData()) | |
| 2290 return e; | |
| 2291 if (typeof e === "object" && e !== null && e.$isArrayBuffer()) | |
| 2292 return e; | |
| 2293 if (typeof e === "object" && e !== null && e.$isArrayBufferView()) | |
| 2294 return e; | |
| 2295 if (typeof e === "object" && e !== null && !!e.$isMap) { | |
| 2296 slot = this.findSlot_5.call$1(e); | |
| 2297 t1.copy_0 = this.readSlot_6.call$1(slot); | |
| 2298 t2 = t1.copy_0; | |
| 2299 if (!(t2 == null)) | |
| 2300 return t2; | |
| 2301 t1.copy_0 = {}; | |
| 2302 this.writeSlot_7.call$2(slot, t1.copy_0); | |
| 2303 e.forEach$1(new $._convertDartToNative_PrepareForStructuredClone_walk_anon (t1, this)); | |
| 2304 return t1.copy_0; | |
| 2305 } | |
| 2306 if (typeof e === "object" && e !== null && (e.constructor === Array || e.$is List())) { | |
| 2307 if (typeof e !== "object" || e === null || (e.constructor !== Array || !!e .immutable$list) && !e.$isJavaScriptIndexingBehavior()) | |
| 2308 return this.call$1$bailout(1, e); | |
| 2309 length = e.length; | |
| 2310 slot = this.findSlot_5.call$1(e); | |
| 2311 t2 = this.readSlot_6; | |
| 2312 copy = t2.call$1(slot); | |
| 2313 if (!(copy == null)) { | |
| 2314 if (true === copy) { | |
| 2315 copy = new Array(length); | |
| 2316 this.writeSlot_7.call$2(slot, copy); | |
| 2317 } | |
| 2318 return copy; | |
| 2319 } | |
| 2320 t1 = e instanceof Array && !!!(e.immutable$list); | |
| 2321 t3 = this.writeSlot_7; | |
| 2322 if (t1) { | |
| 2323 t3.call$2(slot, true); | |
| 2324 for (i = 0; i < length; ++i) { | |
| 2325 if (i >= e.length) | |
| 2326 throw $.ioore(i); | |
| 2327 element = e[i]; | |
| 2328 elementCopy = this.call$1(element); | |
| 2329 if (!(elementCopy == null ? element == null : elementCopy === element) ) { | |
| 2330 copy0 = t2.call$1(slot); | |
| 2331 if (true === copy0) { | |
| 2332 copy0 = new Array(length); | |
| 2333 t3.call$2(slot, copy0); | |
| 2334 } | |
| 2335 if (typeof copy0 !== "object" || copy0 === null || (copy0.constructo r !== Array || !!copy0.immutable$list) && !copy0.$isJavaScriptIndexingBehavior() ) | |
| 2336 return this.call$1$bailout(3, e, length, $.CONSTANT0, t3, elementC opy, copy0, slot, t2, i, copy); | |
| 2337 for (t1 = e.length, t2 = copy0.length, j = 0; j < i; ++j) { | |
| 2338 if (j >= t1) | |
| 2339 throw $.ioore(j); | |
| 2340 t4 = e[j]; | |
| 2341 if (j >= t2) | |
| 2342 throw $.ioore(j); | |
| 2343 copy0[j] = t4; | |
| 2344 } | |
| 2345 if (i >= t2) | |
| 2346 throw $.ioore(i); | |
| 2347 copy0[i] = elementCopy; | |
| 2348 ++i; | |
| 2349 copy = copy0; | |
| 2350 break; | |
| 2351 } | |
| 2352 } | |
| 2353 if (copy == null) { | |
| 2354 t3.call$2(slot, e); | |
| 2355 copy = e; | |
| 2356 } | |
| 2357 } else { | |
| 2358 copy = new Array(length); | |
| 2359 t3.call$2(slot, copy); | |
| 2360 i = 0; | |
| 2361 } | |
| 2362 if (typeof copy !== "object" || copy === null || (copy.constructor !== Arr ay || !!copy.immutable$list) && !copy.$isJavaScriptIndexingBehavior()) | |
| 2363 return this.call$1$bailout(4, e, length, $.CONSTANT0, null, null, null, null, null, i, copy); | |
| 2364 for (; i < length; ++i) { | |
| 2365 if (i >= e.length) | |
| 2366 throw $.ioore(i); | |
| 2367 t1 = this.call$1(e[i]); | |
| 2368 if (i >= copy.length) | |
| 2369 throw $.ioore(i); | |
| 2370 copy[i] = t1; | |
| 2371 } | |
| 2372 return copy; | |
| 2373 } | |
| 2374 throw $.$$throw($.UnimplementedError$("structured clone of other type")); | |
| 2375 }, | |
| 2376 call$1$bailout: function(state0, e, length, t2, t3, elementCopy, copy0, slot, t4, i, copy) { | |
| 2377 switch (state0) { | |
| 2378 case 0: | |
| 2379 t1 = {}; | |
| 2380 if (e == null) | |
| 2381 return e; | |
| 2382 if (typeof e === "boolean") | |
| 2383 return e; | |
| 2384 if (typeof e === "number") | |
| 2385 return e; | |
| 2386 if (typeof e === "string") | |
| 2387 return e; | |
| 2388 if (typeof e === "object" && e !== null && !!e.$isDateTime) | |
| 2389 throw $.$$throw($.UnimplementedError$("structured clone of DateTime")) ; | |
| 2390 if (typeof e === "object" && e !== null && !!e.$isRegExp) | |
| 2391 throw $.$$throw($.UnimplementedError$("structured clone of RegExp")); | |
| 2392 if (typeof e === "object" && e !== null && e.$isFile()) | |
| 2393 return e; | |
| 2394 if (typeof e === "object" && e !== null && e.$isBlob()) | |
| 2395 return e; | |
| 2396 if (typeof e === "object" && e !== null && e.$isFileList()) | |
| 2397 return e; | |
| 2398 if (typeof e === "object" && e !== null && e.$isImageData()) | |
| 2399 return e; | |
| 2400 if (typeof e === "object" && e !== null && e.$isArrayBuffer()) | |
| 2401 return e; | |
| 2402 if (typeof e === "object" && e !== null && e.$isArrayBufferView()) | |
| 2403 return e; | |
| 2404 if (typeof e === "object" && e !== null && !!e.$isMap) { | |
| 2405 slot = this.findSlot_5.call$1(e); | |
| 2406 t1.copy_0 = this.readSlot_6.call$1(slot); | |
| 2407 t2 = t1.copy_0; | |
| 2408 if (!(t2 == null)) | |
| 2409 return t2; | |
| 2410 t1.copy_0 = {}; | |
| 2411 this.writeSlot_7.call$2(slot, t1.copy_0); | |
| 2412 e.forEach$1(new $._convertDartToNative_PrepareForStructuredClone_walk_ anon(t1, this)); | |
| 2413 return t1.copy_0; | |
| 2414 } | |
| 2415 default: | |
| 2416 var t1, element, j; | |
| 2417 if (state0 === 4 || state0 === 3 || state0 === 2 || state0 === 1 || stat e0 === 0 && typeof e === "object" && e !== null && (e.constructor === Array || e .$isList())) | |
| 2418 switch (state0) { | |
| 2419 case 0: | |
| 2420 case 1: | |
| 2421 state0 = 0; | |
| 2422 t2 = $.getInterceptor$JSStringJSArray(e); | |
| 2423 length = t2.get$length(e); | |
| 2424 case 2: | |
| 2425 state0 = 0; | |
| 2426 slot = this.findSlot_5.call$1(e); | |
| 2427 t4 = this.readSlot_6; | |
| 2428 copy = t4.call$1(slot); | |
| 2429 if (!(copy == null)) { | |
| 2430 if (true === copy) { | |
| 2431 copy = new Array(length); | |
| 2432 this.writeSlot_7.call$2(slot, copy); | |
| 2433 } | |
| 2434 return copy; | |
| 2435 } | |
| 2436 t1 = e instanceof Array && !!!(e.immutable$list); | |
| 2437 t3 = this.writeSlot_7; | |
| 2438 case 3: | |
| 2439 if (state0 === 3 || state0 === 0 && t1) | |
| 2440 switch (state0) { | |
| 2441 case 0: | |
| 2442 t3.call$2(slot, true); | |
| 2443 i = 0; | |
| 2444 case 3: | |
| 2445 L0: | |
| 2446 while (true) | |
| 2447 switch (state0) { | |
| 2448 case 0: | |
| 2449 if (!$.CONSTANT4.$lt(i, length)) | |
| 2450 break L0; | |
| 2451 element = t2.$index(e, i); | |
| 2452 elementCopy = this.call$1(element); | |
| 2453 case 3: | |
| 2454 if (state0 === 3 || state0 === 0 && !(elementCopy == null ? element == null : elementCopy === element)) | |
| 2455 switch (state0) { | |
| 2456 case 0: | |
| 2457 copy0 = t4.call$1(slot); | |
| 2458 if (true === copy0) { | |
| 2459 copy0 = new Array(length); | |
| 2460 t3.call$2(slot, copy0); | |
| 2461 } | |
| 2462 case 3: | |
| 2463 state0 = 0; | |
| 2464 for (t1 = $.getInterceptor$JSArray(copy0), j = 0; j < i; ++j) | |
| 2465 t1.$indexSet(copy0, j, t2.$index(e, j)); | |
| 2466 t1.$indexSet(copy0, i, elementCopy); | |
| 2467 ++i; | |
| 2468 copy = copy0; | |
| 2469 break L0; | |
| 2470 } | |
| 2471 ++i; | |
| 2472 } | |
| 2473 if (copy == null) { | |
| 2474 t3.call$2(slot, e); | |
| 2475 copy = e; | |
| 2476 } | |
| 2477 } | |
| 2478 else { | |
| 2479 copy = new Array(length); | |
| 2480 t3.call$2(slot, copy); | |
| 2481 i = 0; | |
| 2482 } | |
| 2483 case 4: | |
| 2484 state0 = 0; | |
| 2485 for (t1 = $.getInterceptor$JSArray(copy); $.CONSTANT4.$lt(i, lengt h); ++i) | |
| 2486 t1.$indexSet(copy, i, this.call$1(t2.$index(e, i))); | |
| 2487 return copy; | |
| 2488 } | |
| 2489 throw $.$$throw($.UnimplementedError$("structured clone of other type")) ; | |
| 2490 } | |
| 2491 } | |
| 2492 }; | |
| 2493 | |
| 2494 $$._convertDartToNative_PrepareForStructuredClone_walk_anon = {"": "Closure;box_ 0,walk_8", | |
| 2495 call$2: function(key, value) { | |
| 2496 this.box_0.copy_0[key] = this.walk_8.call$1(value); | |
| 2497 } | |
| 2498 }; | |
| 2499 | |
| 2500 $$._JsonStringifier_stringifyJsonValue_anon = {"": "Closure;box_0,this_1", | |
| 2501 call$2: function(key, value) { | |
| 2502 var t1, t2, t3; | |
| 2503 t1 = this.box_0; | |
| 2504 t2 = t1.first_0; | |
| 2505 t3 = this.this_1; | |
| 2506 if (t2 !== true) | |
| 2507 $.add(t3.get$sb(), ",\""); | |
| 2508 else | |
| 2509 $.add(t3.get$sb(), "\""); | |
| 2510 t2 = this.this_1; | |
| 2511 $._JsonStringifier_escape(t2.get$sb(), key); | |
| 2512 $.add(t2.get$sb(), "\":"); | |
| 2513 t2.stringifyValue$1(value); | |
| 2514 t1.first_0 = false; | |
| 2515 } | |
| 2516 }; | |
| 2517 | |
| 2518 $$.Suite_test_anon = {"": "Closure;this_0,name_1,test__2", | |
| 2519 call$0: function() { | |
| 2520 var runsPerSecond, i, runs, start, cur, exception, stacktrace, t1, exception 0; | |
| 2521 runsPerSecond = $.List_List(0); | |
| 2522 try { | |
| 2523 for (i = 0, t1 = this.test__2; $.$$lt(i, 5) === true; i = $.$$add(i, 1)) { | |
| 2524 runs = 0; | |
| 2525 start = $.DateTime_DateTime$now().get$millisecondsSinceEpoch(); | |
| 2526 cur = $.DateTime_DateTime$now().get$millisecondsSinceEpoch(); | |
| 2527 for (; $.$$lt($.$$sub(cur, start), 1000) === true;) { | |
| 2528 t1.call$0(); | |
| 2529 cur = $.DateTime_DateTime$now().get$millisecondsSinceEpoch(); | |
| 2530 runs = $.$$add(runs, 1); | |
| 2531 } | |
| 2532 $.add(runsPerSecond, $.$$div($.$$mul(runs, 1000), $.$$sub(cur, start))); | |
| 2533 } | |
| 2534 } catch (exception0) { | |
| 2535 t1 = $.unwrapException(exception0); | |
| 2536 exception = t1; | |
| 2537 stacktrace = $.getTraceFromException(exception0); | |
| 2538 this.this_0.get$_window().alert$1("Exception " + $.S(exception) + ": " + $ .S(stacktrace)); | |
| 2539 return; | |
| 2540 } | |
| 2541 | |
| 2542 this.this_0._reportTestResults$2(this.name_1, $.Result_Result(runsPerSecond) ); | |
| 2543 } | |
| 2544 }; | |
| 2545 | |
| 2546 $$.Result_Result_anon = {"": "Closure;", | |
| 2547 call$2: function(a, b) { | |
| 2548 return $.compareTo(a, b); | |
| 2549 } | |
| 2550 }; | |
| 2551 | |
| 2552 $$.Result_sum_anon = {"": "Closure;box_0", | |
| 2553 call$1: function(e) { | |
| 2554 var t1 = this.box_0; | |
| 2555 t1.result_0 = $.$$add(t1.result_0, e); | |
| 2556 } | |
| 2557 }; | |
| 2558 | |
| 2559 $$.Result_variance_anon = {"": "Closure;box_0,m_1", | |
| 2560 call$1: function(e) { | |
| 2561 var t1, t2, t3; | |
| 2562 t1 = this.box_0; | |
| 2563 t2 = t1.result_0; | |
| 2564 t3 = $.$$sub(e, this.m_1); | |
| 2565 $.checkNum(t3); | |
| 2566 $.checkNum(2); | |
| 2567 t1.result_0 = $.$$add(t2, Math.pow(t3, 2)); | |
| 2568 } | |
| 2569 }; | |
| 2570 | |
| 2571 $$.DateTime_toString_fourDigits = {"": "Closure;", | |
| 2572 call$1: function(n) { | |
| 2573 var t1, absN, sign; | |
| 2574 t1 = $.getInterceptor$JSNumber(n); | |
| 2575 absN = t1.abs$0(n); | |
| 2576 sign = t1.$lt(n, 0) === true ? "-" : ""; | |
| 2577 t1 = $.getInterceptor$JSNumber(absN); | |
| 2578 if (t1.$ge(absN, 1000) === true) | |
| 2579 return $.S(n); | |
| 2580 if (t1.$ge(absN, 100) === true) | |
| 2581 return sign + "0" + $.S(absN); | |
| 2582 if (t1.$ge(absN, 10) === true) | |
| 2583 return sign + "00" + $.S(absN); | |
| 2584 return sign + "000" + $.S(absN); | |
| 2585 } | |
| 2586 }; | |
| 2587 | |
| 2588 $$.DateTime_toString_threeDigits = {"": "Closure;", | |
| 2589 call$1: function(n) { | |
| 2590 var t1 = $.getInterceptor$JSNumber(n); | |
| 2591 if (t1.$ge(n, 100) === true) | |
| 2592 return $.S(n); | |
| 2593 if (t1.$ge(n, 10) === true) | |
| 2594 return "0" + $.S(n); | |
| 2595 return "00" + $.S(n); | |
| 2596 } | |
| 2597 }; | |
| 2598 | |
| 2599 $$.DateTime_toString_twoDigits = {"": "Closure;", | |
| 2600 call$1: function(n) { | |
| 2601 if ($.$$ge(n, 10) === true) | |
| 2602 return $.S(n); | |
| 2603 return "0" + $.S(n); | |
| 2604 } | |
| 2605 }; | |
| 2606 | |
| 2607 $$.starter = {"": "Closure;this_0", | |
| 2608 call$1: function(event) { | |
| 2609 var command, t1; | |
| 2610 command = event.get$data(); | |
| 2611 t1 = this.this_0; | |
| 2612 switch (command) { | |
| 2613 case "start": | |
| 2614 t1._run$0(); | |
| 2615 return; | |
| 2616 default: | |
| 2617 t1.get$_window().alert$1("[" + $.S(t1.get$_name()) + "]: unknown command " + $.S(command)); | |
| 2618 } | |
| 2619 } | |
| 2620 }; | |
| 2621 | |
| 2622 $$.invokeClosure_anon = {"": "Closure;closure_0", | |
| 2623 call$0: function() { | |
| 2624 return this.closure_0.call$0(); | |
| 2625 } | |
| 2626 }; | |
| 2627 | |
| 2628 $$.invokeClosure_anon0 = {"": "Closure;closure_1,arg1_2", | |
| 2629 call$0: function() { | |
| 2630 return this.closure_1.call$1(this.arg1_2); | |
| 2631 } | |
| 2632 }; | |
| 2633 | |
| 2634 $$.invokeClosure_anon1 = {"": "Closure;closure_3,arg1_4,arg2_5", | |
| 2635 call$0: function() { | |
| 2636 return this.closure_3.call$2(this.arg1_4, this.arg2_5); | |
| 2637 } | |
| 2638 }; | |
| 2639 | |
| 2640 $$.Suite__run_handler = {"": "Closure;box_0,this_1", | |
| 2641 call$0: function() { | |
| 2642 var t1, t2, t3; | |
| 2643 t1 = this.box_0; | |
| 2644 t2 = t1.currentOperation_0; | |
| 2645 t3 = this.this_1; | |
| 2646 if ($.$$lt(t2, $.length(t3.get$_operations())) === true) { | |
| 2647 $.$$index(t3.get$_operations(), t1.currentOperation_0).call$0(); | |
| 2648 t1.currentOperation_0 = $.$$add(t1.currentOperation_0, 1); | |
| 2649 t3.get$_window().setTimeout$2(this, 1); | |
| 2650 } else | |
| 2651 t3._postMessage$1("over"); | |
| 2652 } | |
| 2653 }; | |
| 2654 | |
| 2655 $$.convertNativeToDart_AcceptStructuredClone_findSlot = {"": "Closure;values_0,c opies_1", | |
| 2656 call$1: function(value) { | |
| 2657 var t1, length, i, t2; | |
| 2658 t1 = this.values_0; | |
| 2659 if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1.c onstructor !== Array && !t1.$isJavaScriptIndexingBehavior())) | |
| 2660 return this.call$1$bailout2(1, value, t1); | |
| 2661 length = t1.length; | |
| 2662 for (i = 0; i < length; ++i) { | |
| 2663 t2 = t1[i]; | |
| 2664 if (t2 == null ? value == null : t2 === value) | |
| 2665 return i; | |
| 2666 } | |
| 2667 $.add(t1, value); | |
| 2668 $.add(this.copies_1, null); | |
| 2669 return length; | |
| 2670 }, | |
| 2671 call$1$bailout2: function(state0, value, t1, t3, length) { | |
| 2672 switch (state0) { | |
| 2673 case 0: | |
| 2674 t1 = this.values_0; | |
| 2675 case 1: | |
| 2676 state0 = 0; | |
| 2677 t3 = $.getInterceptor$JSStringJSArray(t1); | |
| 2678 length = t3.get$length(t1); | |
| 2679 case 2: | |
| 2680 var i, t2; | |
| 2681 state0 = 0; | |
| 2682 for (i = 0; $.CONSTANT4.$lt(i, length); ++i) { | |
| 2683 t2 = t3.$index(t1, i); | |
| 2684 if (t2 == null ? value == null : t2 === value) | |
| 2685 return i; | |
| 2686 } | |
| 2687 $.add(t1, value); | |
| 2688 $.add(this.copies_1, null); | |
| 2689 return length; | |
| 2690 } | |
| 2691 } | |
| 2692 }; | |
| 2693 | |
| 2694 $$.convertNativeToDart_AcceptStructuredClone_readSlot = {"": "Closure;copies_2", | |
| 2695 call$1: function(i) { | |
| 2696 return $.$$index(this.copies_2, i); | |
| 2697 } | |
| 2698 }; | |
| 2699 | |
| 2700 $$.convertNativeToDart_AcceptStructuredClone_writeSlot = {"": "Closure;copies_3" , | |
| 2701 call$2: function(i, x) { | |
| 2702 $.$$indexSet(this.copies_3, i, x); | |
| 2703 } | |
| 2704 }; | |
| 2705 | |
| 2706 $$.convertNativeToDart_AcceptStructuredClone_walk = {"": "Closure;mustCopy_4,fin dSlot_5,readSlot_6,writeSlot_7", | |
| 2707 call$1: function(e) { | |
| 2708 var slot, copy, t1, t2, t3, length, i; | |
| 2709 if (typeof e !== "object" || e === null || (e.constructor !== Array || !!e.i mmutable$list) && !e.$isJavaScriptIndexingBehavior()) | |
| 2710 return this.call$1$bailout1(1, e); | |
| 2711 if (e instanceof Date) | |
| 2712 throw $.$$throw($.UnimplementedError$("structured clone of DateTime")); | |
| 2713 if (e instanceof RegExp) | |
| 2714 throw $.$$throw($.UnimplementedError$("structured clone of RegExp")); | |
| 2715 if (Object.getPrototypeOf(e) === Object.prototype) { | |
| 2716 slot = this.findSlot_5.call$1(e); | |
| 2717 copy = this.readSlot_6.call$1(slot); | |
| 2718 if (!(copy == null)) | |
| 2719 return copy; | |
| 2720 copy = $.makeLiteralMap([]); | |
| 2721 if (typeof copy !== "object" || copy === null || (copy.constructor !== Arr ay || !!copy.immutable$list) && !copy.$isJavaScriptIndexingBehavior()) | |
| 2722 return this.call$1$bailout1(2, e, copy, slot); | |
| 2723 this.writeSlot_7.call$2(slot, copy); | |
| 2724 for (t1 = $.CONSTANT0.get$iterator(Object.keys(e)); t1.moveNext$0() === tr ue;) { | |
| 2725 t2 = t1.get$current(); | |
| 2726 t3 = this.call$1(e[t2]); | |
| 2727 if (t2 !== (t2 | 0)) | |
| 2728 throw $.iae(t2); | |
| 2729 if (t2 < 0 || t2 >= copy.length) | |
| 2730 throw $.ioore(t2); | |
| 2731 copy[t2] = t3; | |
| 2732 } | |
| 2733 return copy; | |
| 2734 } | |
| 2735 if (e instanceof Array) { | |
| 2736 slot = this.findSlot_5.call$1(e); | |
| 2737 copy = this.readSlot_6.call$1(slot); | |
| 2738 if (!(copy == null)) | |
| 2739 return copy; | |
| 2740 length = e.length; | |
| 2741 if (this.mustCopy_4 === true) | |
| 2742 copy = new Array(length); | |
| 2743 else | |
| 2744 copy = e; | |
| 2745 if (typeof copy !== "object" || copy === null || (copy.constructor !== Arr ay || !!copy.immutable$list) && !copy.$isJavaScriptIndexingBehavior()) | |
| 2746 return this.call$1$bailout1(4, e, copy, slot, length, $.CONSTANT0); | |
| 2747 this.writeSlot_7.call$2(slot, copy); | |
| 2748 for (i = 0; i < length; ++i) { | |
| 2749 if (i >= e.length) | |
| 2750 throw $.ioore(i); | |
| 2751 t1 = this.call$1(e[i]); | |
| 2752 if (i >= copy.length) | |
| 2753 throw $.ioore(i); | |
| 2754 copy[i] = t1; | |
| 2755 } | |
| 2756 return copy; | |
| 2757 } | |
| 2758 return e; | |
| 2759 }, | |
| 2760 call$1$bailout1: function(state0, e, copy, slot, length, t1) { | |
| 2761 switch (state0) { | |
| 2762 case 0: | |
| 2763 case 1: | |
| 2764 state0 = 0; | |
| 2765 t1 = $.getInterceptor(e); | |
| 2766 if (e == null) | |
| 2767 return e; | |
| 2768 if (typeof e === "boolean") | |
| 2769 return e; | |
| 2770 if (typeof e === "number") | |
| 2771 return e; | |
| 2772 if (typeof e === "string") | |
| 2773 return e; | |
| 2774 if (e instanceof Date) | |
| 2775 throw $.$$throw($.UnimplementedError$("structured clone of DateTime")) ; | |
| 2776 if (e instanceof RegExp) | |
| 2777 throw $.$$throw($.UnimplementedError$("structured clone of RegExp")); | |
| 2778 case 2: | |
| 2779 if (state0 === 2 || state0 === 0 && Object.getPrototypeOf(e) === Object. prototype) | |
| 2780 switch (state0) { | |
| 2781 case 0: | |
| 2782 slot = this.findSlot_5.call$1(e); | |
| 2783 copy = this.readSlot_6.call$1(slot); | |
| 2784 if (!(copy == null)) | |
| 2785 return copy; | |
| 2786 copy = $.makeLiteralMap([]); | |
| 2787 case 2: | |
| 2788 state0 = 0; | |
| 2789 this.writeSlot_7.call$2(slot, copy); | |
| 2790 for (t1 = $.CONSTANT0.get$iterator(Object.keys(e)), t2 = $.getInte rceptor$JSArray(copy); t1.moveNext$0() === true;) { | |
| 2791 t3 = t1.get$current(); | |
| 2792 t2.$indexSet(copy, t3, this.call$1(e[t3])); | |
| 2793 } | |
| 2794 return copy; | |
| 2795 } | |
| 2796 default: | |
| 2797 var t2, t3, i; | |
| 2798 if (state0 === 4 || state0 === 3 || state0 === 0 && e instanceof Array) | |
| 2799 switch (state0) { | |
| 2800 case 0: | |
| 2801 slot = this.findSlot_5.call$1(e); | |
| 2802 copy = this.readSlot_6.call$1(slot); | |
| 2803 if (!(copy == null)) | |
| 2804 return copy; | |
| 2805 length = t1.get$length(e); | |
| 2806 case 3: | |
| 2807 state0 = 0; | |
| 2808 copy = this.mustCopy_4 === true ? new Array(length) : e; | |
| 2809 case 4: | |
| 2810 state0 = 0; | |
| 2811 this.writeSlot_7.call$2(slot, copy); | |
| 2812 for (t2 = $.getInterceptor$JSArray(copy), i = 0; $.CONSTANT4.$lt(i , length); ++i) | |
| 2813 t2.$indexSet(copy, i, this.call$1(t1.$index(e, i))); | |
| 2814 return copy; | |
| 2815 } | |
| 2816 return e; | |
| 2817 } | |
| 2818 } | |
| 2819 }; | |
| 2820 | |
| 2821 $$.BoundClosure = {"": "Closure;self,target", | |
| 2822 call$1: function(p0) { | |
| 2823 return this.self[this.target](p0); | |
| 2824 } | |
| 2825 }; | |
| 2826 $$.BoundClosure0 = {"": "Closure;self,target,receiver", | |
| 2827 call$1: function(p0) { | |
| 2828 return this.self[this.target](this.receiver, p0); | |
| 2829 } | |
| 2830 }; | |
| 2831 $$.BoundClosure1 = {"": "Closure;self,target,receiver", | |
| 2832 call$2: function(p0, p1) { | |
| 2833 return this.self[this.target](this.receiver, p0, p1); | |
| 2834 }, | |
| 2835 call$1: function($receiver, other) { | |
| 2836 return this.call$2($receiver, other, 0); | |
| 2837 } | |
| 2838 }; | |
| 2839 $.Result_Result = function(runsPerSecond) { | |
| 2840 $.sort(runsPerSecond, new $.Result_Result_anon()); | |
| 2841 return $.Result$_internal(runsPerSecond); | |
| 2842 }; | |
| 2843 | |
| 2844 $.Result$_internal = function(_sorted) { | |
| 2845 return new $.Result(_sorted); | |
| 2846 }; | |
| 2847 | |
| 2848 $.Suite$ = function(_window, _name) { | |
| 2849 var t1 = new $.Suite(_window, _name, $.List_List(0), 0, 0); | |
| 2850 t1.Suite$2(_window, _name); | |
| 2851 return t1; | |
| 2852 }; | |
| 2853 | |
| 2854 $.Strings__toJsStringArray = function(strings) { | |
| 2855 var length, i, string; | |
| 2856 if (typeof strings !== "object" || strings === null || (strings.constructor != = Array || !!strings.immutable$list) && !strings.$isJavaScriptIndexingBehavior() ) | |
| 2857 return $.Strings__toJsStringArray$bailout(1, strings); | |
| 2858 $.checkNull(strings); | |
| 2859 if (!strings.constructor === Array) | |
| 2860 strings = $.List_List$from(strings); | |
| 2861 length = strings.length; | |
| 2862 for (i = 0; i < length; ++i) { | |
| 2863 string = strings[i]; | |
| 2864 if (!(typeof string === "string")) | |
| 2865 throw $.$$throw($.ArgumentError$(string)); | |
| 2866 } | |
| 2867 return strings; | |
| 2868 }; | |
| 2869 | |
| 2870 $.Strings__toJsStringArray$bailout = function(state0, strings, t1, length) { | |
| 2871 switch (state0) { | |
| 2872 case 0: | |
| 2873 case 1: | |
| 2874 state0 = 0; | |
| 2875 $.checkNull(strings); | |
| 2876 if (!(!(strings == null) && strings.constructor === Array)) | |
| 2877 strings = $.List_List$from(strings); | |
| 2878 t1 = $.getInterceptor$JSStringJSArray(strings); | |
| 2879 length = t1.get$length(strings); | |
| 2880 case 2: | |
| 2881 var i, string; | |
| 2882 state0 = 0; | |
| 2883 for (i = 0; $.CONSTANT4.$lt(i, length); ++i) { | |
| 2884 string = t1.$index(strings, i); | |
| 2885 if (!(typeof string === "string")) | |
| 2886 throw $.$$throw($.ArgumentError$(string)); | |
| 2887 } | |
| 2888 return strings; | |
| 2889 } | |
| 2890 }; | |
| 2891 | |
| 2892 $.checkMutable = function(list, reason) { | |
| 2893 if (!!(list.immutable$list)) | |
| 2894 throw $.$$throw($.UnsupportedError$(reason)); | |
| 2895 }; | |
| 2896 | |
| 2897 $.checkGrowable = function(list, reason) { | |
| 2898 if (!!(list.fixed$length)) | |
| 2899 throw $.$$throw($.UnsupportedError$(reason)); | |
| 2900 }; | |
| 2901 | |
| 2902 $.S = function(value) { | |
| 2903 var t1 = $.toString(value); | |
| 2904 if (!(typeof t1 === "string")) | |
| 2905 throw $.$$throw($.ArgumentError$(value)); | |
| 2906 return t1; | |
| 2907 }; | |
| 2908 | |
| 2909 $.Primitives_objectHashCode = function(object) { | |
| 2910 var hash = object.$identityHash; | |
| 2911 if (hash == null) { | |
| 2912 hash = $.$$add($.Primitives_hashCodeSeed, 1); | |
| 2913 $.Primitives_hashCodeSeed = hash; | |
| 2914 object.$identityHash = hash; | |
| 2915 } | |
| 2916 return hash; | |
| 2917 }; | |
| 2918 | |
| 2919 $.Primitives_objectTypeName = function(object) { | |
| 2920 var name, decompiled, t1; | |
| 2921 name = $.constructorNameFallback(object); | |
| 2922 if ($.$$eq(name, "Object") === true) { | |
| 2923 decompiled = String(object.constructor).match(/^\s*function\s*(\S*)\s*\(/)[1 ]; | |
| 2924 if (typeof decompiled === "string") | |
| 2925 name = decompiled; | |
| 2926 } | |
| 2927 t1 = $.getInterceptor$JSString(name); | |
| 2928 return t1.charCodeAt$1(name, 0) === 36 ? t1.substring$1(name, 1) : name; | |
| 2929 }; | |
| 2930 | |
| 2931 $.Primitives_newFixedList = function(length) { | |
| 2932 var result = new Array(length); | |
| 2933 result.fixed$length = true; | |
| 2934 return result; | |
| 2935 }; | |
| 2936 | |
| 2937 $.Primitives_dateNow = function() { | |
| 2938 return Date.now(); | |
| 2939 }; | |
| 2940 | |
| 2941 $.Primitives__fromCharCodeApply = function(array) { | |
| 2942 var end, t1, i, result, subarray, t2; | |
| 2943 end = array.length; | |
| 2944 for (t1 = end <= 500, i = 0, result = ""; i < end; i += 500) { | |
| 2945 if (t1) | |
| 2946 subarray = array; | |
| 2947 else { | |
| 2948 t2 = i + 500; | |
| 2949 t2 = t2 < end ? t2 : end; | |
| 2950 subarray = array.slice(i, t2); | |
| 2951 } | |
| 2952 result = result + String.fromCharCode.apply(null, subarray); | |
| 2953 } | |
| 2954 return result; | |
| 2955 }; | |
| 2956 | |
| 2957 $.Primitives_stringFromCodePoints = function(codePoints) { | |
| 2958 var a, t1, t2; | |
| 2959 a = []; | |
| 2960 for (t1 = $.CONSTANT0.get$iterator(codePoints); t1.moveNext$0() === true;) { | |
| 2961 t2 = t1.get$current(); | |
| 2962 if (!(typeof t2 === "number" && Math.floor(t2) === t2)) | |
| 2963 throw $.$$throw($.ArgumentError$(t2)); | |
| 2964 if (t2 <= 65535) | |
| 2965 a.push(t2); | |
| 2966 else if (t2 <= 1114111) { | |
| 2967 a.push(55296 + ($.CONSTANT4.$shr(t2 - 65536, 10) & 1023)); | |
| 2968 a.push(56320 + (t2 & 1023)); | |
| 2969 } else | |
| 2970 throw $.$$throw($.ArgumentError$(t2)); | |
| 2971 } | |
| 2972 return $.Primitives__fromCharCodeApply(a); | |
| 2973 }; | |
| 2974 | |
| 2975 $.Primitives_stringFromCharCodes = function(charCodes) { | |
| 2976 var t1, t2; | |
| 2977 for (t1 = $.CONSTANT0.get$iterator(charCodes); t1.moveNext$0() === true;) { | |
| 2978 t2 = t1.get$current(); | |
| 2979 if (!(typeof t2 === "number" && Math.floor(t2) === t2)) | |
| 2980 throw $.$$throw($.ArgumentError$(t2)); | |
| 2981 if (t2 < 0) | |
| 2982 throw $.$$throw($.ArgumentError$(t2)); | |
| 2983 if (t2 > 65535) | |
| 2984 return $.Primitives_stringFromCodePoints(charCodes); | |
| 2985 } | |
| 2986 return $.Primitives__fromCharCodeApply(charCodes); | |
| 2987 }; | |
| 2988 | |
| 2989 $.Primitives_lazyAsJsDate = function(receiver) { | |
| 2990 if (receiver.date === (void 0)) | |
| 2991 receiver.date = new Date(receiver.millisecondsSinceEpoch); | |
| 2992 return receiver.date; | |
| 2993 }; | |
| 2994 | |
| 2995 $.Primitives_getYear = function(receiver) { | |
| 2996 return receiver.isUtc === true ? ($.Primitives_lazyAsJsDate(receiver).getUTCFu llYear() + 0) : ($.Primitives_lazyAsJsDate(receiver).getFullYear() + 0); | |
| 2997 }; | |
| 2998 | |
| 2999 $.Primitives_getMonth = function(receiver) { | |
| 3000 return receiver.isUtc === true ? $.Primitives_lazyAsJsDate(receiver).getUTCMon th() + 1 : $.Primitives_lazyAsJsDate(receiver).getMonth() + 1; | |
| 3001 }; | |
| 3002 | |
| 3003 $.Primitives_getDay = function(receiver) { | |
| 3004 return receiver.isUtc === true ? ($.Primitives_lazyAsJsDate(receiver).getUTCDa te() + 0) : ($.Primitives_lazyAsJsDate(receiver).getDate() + 0); | |
| 3005 }; | |
| 3006 | |
| 3007 $.Primitives_getHours = function(receiver) { | |
| 3008 return receiver.isUtc === true ? ($.Primitives_lazyAsJsDate(receiver).getUTCHo urs() + 0) : ($.Primitives_lazyAsJsDate(receiver).getHours() + 0); | |
| 3009 }; | |
| 3010 | |
| 3011 $.Primitives_getMinutes = function(receiver) { | |
| 3012 return receiver.isUtc === true ? ($.Primitives_lazyAsJsDate(receiver).getUTCMi nutes() + 0) : ($.Primitives_lazyAsJsDate(receiver).getMinutes() + 0); | |
| 3013 }; | |
| 3014 | |
| 3015 $.Primitives_getSeconds = function(receiver) { | |
| 3016 return receiver.isUtc === true ? ($.Primitives_lazyAsJsDate(receiver).getUTCSe conds() + 0) : ($.Primitives_lazyAsJsDate(receiver).getSeconds() + 0); | |
| 3017 }; | |
| 3018 | |
| 3019 $.Primitives_getMilliseconds = function(receiver) { | |
| 3020 return receiver.isUtc === true ? ($.Primitives_lazyAsJsDate(receiver).getUTCMi lliseconds() + 0) : ($.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0); | |
| 3021 }; | |
| 3022 | |
| 3023 $.iae = function(argument) { | |
| 3024 throw $.$$throw($.ArgumentError$(argument)); | |
| 3025 }; | |
| 3026 | |
| 3027 $.ioore = function(index) { | |
| 3028 throw $.$$throw($.RangeError$value(index)); | |
| 3029 }; | |
| 3030 | |
| 3031 $.checkNull = function(object) { | |
| 3032 if (object == null) | |
| 3033 throw $.$$throw($.ArgumentError$(null)); | |
| 3034 return object; | |
| 3035 }; | |
| 3036 | |
| 3037 $.checkNum = function(value) { | |
| 3038 if (!(typeof value === "number")) | |
| 3039 throw $.$$throw($.ArgumentError$(value)); | |
| 3040 return value; | |
| 3041 }; | |
| 3042 | |
| 3043 $.checkString = function(value) { | |
| 3044 if (!(typeof value === "string")) | |
| 3045 throw $.$$throw($.ArgumentError$(value)); | |
| 3046 return value; | |
| 3047 }; | |
| 3048 | |
| 3049 $.$$throw = function(ex) { | |
| 3050 var wrapper; | |
| 3051 if (ex == null) | |
| 3052 ex = $.CONSTANT; | |
| 3053 wrapper = $.DartError$(ex); | |
| 3054 if (!!Error.captureStackTrace) | |
| 3055 Error.captureStackTrace(wrapper, $.$$throw); | |
| 3056 else | |
| 3057 wrapper.stack = new Error().stack; | |
| 3058 return wrapper; | |
| 3059 }; | |
| 3060 | |
| 3061 $.DartError$ = function(dartException) { | |
| 3062 var t1 = new $.DartError(); | |
| 3063 t1.DartError$1(dartException); | |
| 3064 return t1; | |
| 3065 }; | |
| 3066 | |
| 3067 $.DartError_toStringWrapper = function() { | |
| 3068 return $.toString(this); | |
| 3069 }; | |
| 3070 | |
| 3071 $.unwrapException = function(ex) { | |
| 3072 var message, type, name, t1, ieErrorCode, ieFacilityNumber, t2; | |
| 3073 if ("dartException" in ex) | |
| 3074 return ex.dartException; | |
| 3075 message = ex.message; | |
| 3076 if (ex instanceof TypeError) { | |
| 3077 type = ex.type; | |
| 3078 name = ex.arguments ? ex.arguments[0] : ""; | |
| 3079 if (message.indexOf("JSNull") === -1) { | |
| 3080 t1 = $.getInterceptor(type); | |
| 3081 t1 = t1.$eq(type, "property_not_function") === true || t1.$eq(type, "calle d_non_callable") === true || t1.$eq(type, "non_object_property_call") === true | | t1.$eq(type, "non_object_property_load") === true; | |
| 3082 } else | |
| 3083 t1 = true; | |
| 3084 if (t1) | |
| 3085 return $.NoSuchMethodError$(null, name, [], $.makeLiteralMap([]), null); | |
| 3086 else if ($.$$eq(type, "undefined_method") === true) | |
| 3087 return $.NoSuchMethodError$("", name, [], $.makeLiteralMap([]), null); | |
| 3088 ieErrorCode = ex.number & 0xffff; | |
| 3089 ieFacilityNumber = ex.number>>16 & 0x1FFF; | |
| 3090 t1 = typeof message === "string"; | |
| 3091 if (t1) | |
| 3092 if ($.CONSTANT1.endsWith$1(message, "is null") === true || $.CONSTANT1.end sWith$1(message, "is undefined") === true || $.CONSTANT1.endsWith$1(message, "is null or undefined") === true || $.CONSTANT1.endsWith$1(message, "of undefined") === true || $.CONSTANT1.endsWith$1(message, "of null") === true) | |
| 3093 return $.NoSuchMethodError$(null, "<unknown>", [], $.makeLiteralMap([]), null); | |
| 3094 else { | |
| 3095 if (message.indexOf(" has no method ") === -1) | |
| 3096 if (message.indexOf(" is not a function") === -1) | |
| 3097 t2 = ieErrorCode === 438 && ieFacilityNumber === 10; | |
| 3098 else | |
| 3099 t2 = true; | |
| 3100 else | |
| 3101 t2 = true; | |
| 3102 if (t2) | |
| 3103 return $.NoSuchMethodError$("", "<unknown>", [], $.makeLiteralMap([]), null); | |
| 3104 } | |
| 3105 return $.Exception_Exception(t1 ? message : ""); | |
| 3106 } | |
| 3107 if (ex instanceof RangeError) { | |
| 3108 if (typeof message === "string" && message.indexOf("call stack") !== -1) | |
| 3109 return $.StackOverflowError$(); | |
| 3110 return $.ArgumentError$(null); | |
| 3111 } | |
| 3112 if (typeof InternalError == 'function' && ex instanceof InternalError) | |
| 3113 if (typeof message === "string" && message === "too much recursion") | |
| 3114 return $.StackOverflowError$(); | |
| 3115 return ex; | |
| 3116 }; | |
| 3117 | |
| 3118 $.getTraceFromException = function(exception) { | |
| 3119 return $.StackTrace$(exception.stack); | |
| 3120 }; | |
| 3121 | |
| 3122 $.StackTrace$ = function(stack) { | |
| 3123 return new $.StackTrace(stack); | |
| 3124 }; | |
| 3125 | |
| 3126 $.makeLiteralMap = function(keyValuePairs) { | |
| 3127 var iterator, result, t1, key; | |
| 3128 iterator = $.CONSTANT0.get$iterator(keyValuePairs); | |
| 3129 result = $.LinkedHashMap_LinkedHashMap(); | |
| 3130 for (t1 = $.getInterceptor$JSArray(result); iterator.moveNext$0() === true;) { | |
| 3131 key = iterator.get$current(); | |
| 3132 iterator.moveNext$0(); | |
| 3133 t1.$indexSet(result, key, iterator.get$current()); | |
| 3134 } | |
| 3135 return result; | |
| 3136 }; | |
| 3137 | |
| 3138 $.invokeClosure = function(closure, isolate, numberOfArguments, arg1, arg2) { | |
| 3139 var t1 = $.getInterceptor(numberOfArguments); | |
| 3140 if (t1.$eq(numberOfArguments, 0) === true) | |
| 3141 return new $.invokeClosure_anon(closure).call$0(); | |
| 3142 else if (t1.$eq(numberOfArguments, 1) === true) | |
| 3143 return new $.invokeClosure_anon0(closure, arg1).call$0(); | |
| 3144 else if (t1.$eq(numberOfArguments, 2) === true) | |
| 3145 return new $.invokeClosure_anon1(closure, arg1, arg2).call$0(); | |
| 3146 else | |
| 3147 throw $.$$throw($.Exception_Exception("Unsupported number of arguments for w rapped closure")); | |
| 3148 }; | |
| 3149 | |
| 3150 $.convertDartClosureToJS = function(closure, arity) { | |
| 3151 var $function; | |
| 3152 if (closure == null) | |
| 3153 return; | |
| 3154 $function = closure.$identity; | |
| 3155 if (!!$function) | |
| 3156 return $function; | |
| 3157 $; | |
| 3158 $function = function($0, $1) { return $.invokeClosure.call$5(closure, $, arity , $0, $1); }; | |
| 3159 closure.$identity = $function; | |
| 3160 return $function; | |
| 3161 }; | |
| 3162 | |
| 3163 $.throwCyclicInit = function(staticName) { | |
| 3164 throw $.$$throw($.RuntimeError$("Cyclic initialization for static " + $.S(stat icName))); | |
| 3165 }; | |
| 3166 | |
| 3167 $.typeNameInChrome = function(obj) { | |
| 3168 return $.typeNameInWebKitCommon(obj.constructor.name); | |
| 3169 }; | |
| 3170 | |
| 3171 $.typeNameInSafari = function(obj) { | |
| 3172 return $.typeNameInWebKitCommon($.constructorNameFallback(obj)); | |
| 3173 }; | |
| 3174 | |
| 3175 $.typeNameInWebKitCommon = function(tag) { | |
| 3176 var name = tag; | |
| 3177 if (name === "Window") | |
| 3178 return "DOMWindow"; | |
| 3179 if (name === "CanvasPixelArray") | |
| 3180 return "Uint8ClampedArray"; | |
| 3181 if (name === "WebKitMutationObserver") | |
| 3182 return "MutationObserver"; | |
| 3183 if (name === "AudioChannelMerger") | |
| 3184 return "ChannelMergerNode"; | |
| 3185 if (name === "AudioChannelSplitter") | |
| 3186 return "ChannelSplitterNode"; | |
| 3187 if (name === "AudioGainNode") | |
| 3188 return "GainNode"; | |
| 3189 if (name === "AudioPannerNode") | |
| 3190 return "PannerNode"; | |
| 3191 if (name === "JavaScriptAudioNode") | |
| 3192 return "ScriptProcessorNode"; | |
| 3193 if (name === "Oscillator") | |
| 3194 return "OscillatorNode"; | |
| 3195 if (name === "RealtimeAnalyserNode") | |
| 3196 return "AnalyserNode"; | |
| 3197 return name; | |
| 3198 }; | |
| 3199 | |
| 3200 $.typeNameInOpera = function(obj) { | |
| 3201 var name = $.constructorNameFallback(obj); | |
| 3202 if (name === "Window") | |
| 3203 return "DOMWindow"; | |
| 3204 if (name === "ApplicationCache") | |
| 3205 return "DOMApplicationCache"; | |
| 3206 return name; | |
| 3207 }; | |
| 3208 | |
| 3209 $.typeNameInFirefox = function(obj) { | |
| 3210 var name = $.constructorNameFallback(obj); | |
| 3211 if (name === "Window") | |
| 3212 return "DOMWindow"; | |
| 3213 if (name === "CSS2Properties") | |
| 3214 return "CSSStyleDeclaration"; | |
| 3215 if (name === "DataTransfer") | |
| 3216 return "Clipboard"; | |
| 3217 if (name === "DragEvent") | |
| 3218 return "MouseEvent"; | |
| 3219 if (name === "GeoGeolocation") | |
| 3220 return "Geolocation"; | |
| 3221 if (name === "MouseScrollEvent") | |
| 3222 return "WheelEvent"; | |
| 3223 if (name === "OfflineResourceList") | |
| 3224 return "DOMApplicationCache"; | |
| 3225 if (name === "WorkerMessageEvent") | |
| 3226 return "MessageEvent"; | |
| 3227 if (name === "XMLDocument") | |
| 3228 return "Document"; | |
| 3229 return name; | |
| 3230 }; | |
| 3231 | |
| 3232 $.typeNameInIE = function(obj) { | |
| 3233 var name = $.constructorNameFallback(obj); | |
| 3234 if (name === "Window") | |
| 3235 return "DOMWindow"; | |
| 3236 if (name === "Document") { | |
| 3237 if (!!obj.xmlVersion) | |
| 3238 return "Document"; | |
| 3239 return "HTMLDocument"; | |
| 3240 } | |
| 3241 if (name === "ApplicationCache") | |
| 3242 return "DOMApplicationCache"; | |
| 3243 if (name === "CanvasPixelArray") | |
| 3244 return "Uint8ClampedArray"; | |
| 3245 if (name === "DataTransfer") | |
| 3246 return "Clipboard"; | |
| 3247 if (name === "DragEvent") | |
| 3248 return "MouseEvent"; | |
| 3249 if (name === "HTMLDDElement") | |
| 3250 return "HTMLElement"; | |
| 3251 if (name === "HTMLDTElement") | |
| 3252 return "HTMLElement"; | |
| 3253 if (name === "HTMLTableDataCellElement") | |
| 3254 return "HTMLTableCellElement"; | |
| 3255 if (name === "HTMLTableHeaderCellElement") | |
| 3256 return "HTMLTableCellElement"; | |
| 3257 if (name === "HTMLPhraseElement") | |
| 3258 return "HTMLElement"; | |
| 3259 if (name === "MSStyleCSSProperties") | |
| 3260 return "CSSStyleDeclaration"; | |
| 3261 if (name === "MouseWheelEvent") | |
| 3262 return "WheelEvent"; | |
| 3263 if (name === "Position") | |
| 3264 return "Geoposition"; | |
| 3265 if (name === "Object") | |
| 3266 if (window.DataView && (obj instanceof window.DataView)) | |
| 3267 return "DataView"; | |
| 3268 return name; | |
| 3269 }; | |
| 3270 | |
| 3271 $.constructorNameFallback = function(object) { | |
| 3272 var $constructor, name, t1, string; | |
| 3273 if (object == null) | |
| 3274 return "Null"; | |
| 3275 $constructor = object.constructor; | |
| 3276 if (typeof($constructor) === "function") { | |
| 3277 name = $constructor.name; | |
| 3278 if (typeof name === "string") | |
| 3279 t1 = !(name === "") && !(name === "Object") && !(name === "Function.protot ype"); | |
| 3280 else | |
| 3281 t1 = false; | |
| 3282 if (t1) | |
| 3283 return name; | |
| 3284 } | |
| 3285 string = Object.prototype.toString.call(object); | |
| 3286 return string.substring(8, string.length - 1); | |
| 3287 }; | |
| 3288 | |
| 3289 $.alternateTag = function(object, tag) { | |
| 3290 if (!!/^HTML[A-Z].*Element$/.test(tag)) { | |
| 3291 if (Object.prototype.toString.call(object) === "[object Object]") | |
| 3292 return; | |
| 3293 return "HTMLElement"; | |
| 3294 } | |
| 3295 return; | |
| 3296 }; | |
| 3297 | |
| 3298 $.callHasOwnProperty = function($function, object, property) { | |
| 3299 return $function.call(object, property); | |
| 3300 }; | |
| 3301 | |
| 3302 $.getFunctionForTypeNameOf = function() { | |
| 3303 if (!(typeof(navigator) === "object")) | |
| 3304 return $.typeNameInChrome; | |
| 3305 var userAgent = navigator.userAgent; | |
| 3306 if (userAgent.indexOf("Chrome") !== -1 || userAgent.indexOf("DumpRenderTree") !== -1) | |
| 3307 return $.typeNameInChrome; | |
| 3308 else if (userAgent.indexOf("Firefox") !== -1) | |
| 3309 return $.typeNameInFirefox; | |
| 3310 else if (userAgent.indexOf("MSIE") !== -1) | |
| 3311 return $.typeNameInIE; | |
| 3312 else if (userAgent.indexOf("Opera") !== -1) | |
| 3313 return $.typeNameInOpera; | |
| 3314 else if (userAgent.indexOf("AppleWebKit") !== -1) | |
| 3315 return $.typeNameInSafari; | |
| 3316 else | |
| 3317 return $.constructorNameFallback; | |
| 3318 }; | |
| 3319 | |
| 3320 $.getTypeNameOf = function(obj) { | |
| 3321 if ($._getTypeNameOf == null) | |
| 3322 $._getTypeNameOf = $.getFunctionForTypeNameOf(); | |
| 3323 return $._getTypeNameOf.call$1(obj); | |
| 3324 }; | |
| 3325 | |
| 3326 $.toStringForNativeObject = function(obj) { | |
| 3327 return "Instance of " + $.getTypeNameOf(obj); | |
| 3328 }; | |
| 3329 | |
| 3330 $.hashCodeForNativeObject = function(object) { | |
| 3331 return $.Primitives_objectHashCode(object); | |
| 3332 }; | |
| 3333 | |
| 3334 $.defineProperty = function(obj, property, value) { | |
| 3335 Object.defineProperty(obj, property, {value: value, enumerable: false, writabl e: true, configurable: true}); | |
| 3336 }; | |
| 3337 | |
| 3338 $.dynamicBind = function(obj, name, methods, arguments) { | |
| 3339 var tag, hasOwnPropertyFunction, method, secondTag, proto; | |
| 3340 tag = $.getTypeNameOf(obj); | |
| 3341 hasOwnPropertyFunction = Object.prototype.hasOwnProperty; | |
| 3342 method = $.dynamicBindLookup(hasOwnPropertyFunction, tag, methods); | |
| 3343 if (method == null) { | |
| 3344 secondTag = $.alternateTag(obj, tag); | |
| 3345 if (!(secondTag == null)) | |
| 3346 method = $.dynamicBindLookup(hasOwnPropertyFunction, secondTag, methods); | |
| 3347 } | |
| 3348 if (method == null) | |
| 3349 method = $.lookupDynamicClass(hasOwnPropertyFunction, methods, $.getTypeName Of($.CONSTANT5)); | |
| 3350 proto = Object.getPrototypeOf(obj); | |
| 3351 if (method == null) | |
| 3352 method = function () {if (Object.getPrototypeOf(this) === proto) {throw new TypeError(name + " is not a function");} else {return Object.prototype[name].app ly(this, arguments);}}; | |
| 3353 if ($.callHasOwnProperty(hasOwnPropertyFunction, proto, name) !== true) | |
| 3354 $.defineProperty(proto, name, method); | |
| 3355 return method.apply(obj, arguments); | |
| 3356 }; | |
| 3357 | |
| 3358 $.dynamicBindLookup = function(hasOwnPropertyFunction, tag, methods) { | |
| 3359 var method, i, entry; | |
| 3360 method = $.lookupDynamicClass(hasOwnPropertyFunction, methods, tag); | |
| 3361 if (method == null && !($._dynamicMetadata0() == null)) | |
| 3362 for (i = 0; i < $._dynamicMetadata0().length; ++i) { | |
| 3363 entry = $._dynamicMetadata0()[i]; | |
| 3364 if ($.callHasOwnProperty(hasOwnPropertyFunction, entry.get$_set(), tag)) { | |
| 3365 method = $.lookupDynamicClass(hasOwnPropertyFunction, methods, entry.get $_tag()); | |
| 3366 if (!(method == null)) | |
| 3367 break; | |
| 3368 } | |
| 3369 } | |
| 3370 return method; | |
| 3371 }; | |
| 3372 | |
| 3373 $.lookupDynamicClass = function(hasOwnPropertyFunction, methods, className) { | |
| 3374 return $.callHasOwnProperty(hasOwnPropertyFunction, methods, className) ? meth ods[className] : null; | |
| 3375 }; | |
| 3376 | |
| 3377 $.dynamicFunction = function(name) { | |
| 3378 var f, methods, dartMethod, bind; | |
| 3379 f = Object.prototype[name]; | |
| 3380 if (!(f == null) && !!f.methods) | |
| 3381 return f.methods; | |
| 3382 methods = {}; | |
| 3383 dartMethod = Object.getPrototypeOf($.CONSTANT5)[name]; | |
| 3384 if (!(dartMethod == null)) | |
| 3385 methods["Object"] = dartMethod; | |
| 3386 bind = function() {return $.dynamicBind.call$4(this, name, methods, Array.prot otype.slice.call(arguments));}; | |
| 3387 bind.methods = methods; | |
| 3388 $.defineProperty(Object.prototype, name, bind); | |
| 3389 return methods; | |
| 3390 }; | |
| 3391 | |
| 3392 $.MetaInfo$ = function(_tag, _tags, _set) { | |
| 3393 return new $.MetaInfo(_tag, _tags, _set); | |
| 3394 }; | |
| 3395 | |
| 3396 $._dynamicMetadata0 = function() { | |
| 3397 if (typeof($dynamicMetadata) === "undefined") | |
| 3398 $._dynamicMetadata([]); | |
| 3399 return $dynamicMetadata; | |
| 3400 }; | |
| 3401 | |
| 3402 $._dynamicMetadata = function(table) { | |
| 3403 $dynamicMetadata = table; | |
| 3404 }; | |
| 3405 | |
| 3406 $.buildDynamicMetadata = function(inputTable) { | |
| 3407 var result, i, tag, tags, set, tagNames, j; | |
| 3408 result = []; | |
| 3409 for (i = 0; i < inputTable.length; ++i) { | |
| 3410 tag = inputTable[i][0]; | |
| 3411 tags = inputTable[i][1]; | |
| 3412 set = {}; | |
| 3413 tagNames = tags.split("|"); | |
| 3414 for (j = 0; j < tagNames.length; ++j) | |
| 3415 set[tagNames[j]] = true; | |
| 3416 result.push($.MetaInfo$(tag, tags, set)); | |
| 3417 } | |
| 3418 return result; | |
| 3419 }; | |
| 3420 | |
| 3421 $.dynamicSetMetadata = function(inputTable) { | |
| 3422 var t1 = $.buildDynamicMetadata(inputTable); | |
| 3423 $._dynamicMetadata(t1); | |
| 3424 }; | |
| 3425 | |
| 3426 $.regExpExec = function(regExp, str) { | |
| 3427 var result = $.regExpGetNative(regExp).exec(str); | |
| 3428 if (result == null) | |
| 3429 return; | |
| 3430 return result; | |
| 3431 }; | |
| 3432 | |
| 3433 $.regExpTest = function(regExp, str) { | |
| 3434 return $.regExpGetNative(regExp).test(str); | |
| 3435 }; | |
| 3436 | |
| 3437 $.regExpGetNative = function(regExp) { | |
| 3438 var r = regExp._re; | |
| 3439 return r == null ? regExp._re = $.regExpMakeNative(regExp, false) : r; | |
| 3440 }; | |
| 3441 | |
| 3442 $.regExpMakeNative = function(regExp, global) { | |
| 3443 var pattern, sb, e, isMultiLine, isCaseSensitive, t1, exception; | |
| 3444 pattern = regExp.get$pattern(); | |
| 3445 isMultiLine = regExp.get$isMultiLine(); | |
| 3446 isCaseSensitive = regExp.get$isCaseSensitive(); | |
| 3447 $.checkString(pattern); | |
| 3448 sb = $.StringBuffer_StringBuffer(""); | |
| 3449 if (isMultiLine === true) | |
| 3450 $.add(sb, "m"); | |
| 3451 if (isCaseSensitive !== true) | |
| 3452 $.add(sb, "i"); | |
| 3453 if (global === true) | |
| 3454 $.add(sb, "g"); | |
| 3455 try { | |
| 3456 t1 = new RegExp(pattern, $.toString(sb)); | |
| 3457 return t1; | |
| 3458 } catch (exception) { | |
| 3459 t1 = $.unwrapException(exception); | |
| 3460 e = t1; | |
| 3461 throw $.$$throw($.IllegalJSRegExpException$(pattern, String(e))); | |
| 3462 } | |
| 3463 | |
| 3464 }; | |
| 3465 | |
| 3466 $.JSSyntaxRegExp$ = function(pattern, caseSensitive, multiLine) { | |
| 3467 return new $.JSSyntaxRegExp(pattern, multiLine, caseSensitive); | |
| 3468 }; | |
| 3469 | |
| 3470 $.JSSyntaxRegExp__globalVersionOf = function(other) { | |
| 3471 var t1, t2, re; | |
| 3472 t1 = other.get$pattern(); | |
| 3473 t2 = other.get$isMultiLine(); | |
| 3474 re = $.JSSyntaxRegExp$(t1, other.get$isCaseSensitive(), t2); | |
| 3475 re._re = $.regExpMakeNative(re, true); | |
| 3476 return re; | |
| 3477 }; | |
| 3478 | |
| 3479 $._MatchImplementation$ = function(pattern, str, start, end, _groups) { | |
| 3480 return new $._MatchImplementation(pattern, str, start, end, _groups); | |
| 3481 }; | |
| 3482 | |
| 3483 $._AllMatchesIterable$ = function(_re, _str) { | |
| 3484 return new $._AllMatchesIterable(_re, _str); | |
| 3485 }; | |
| 3486 | |
| 3487 $._AllMatchesIterator$ = function(re, _str) { | |
| 3488 return new $._AllMatchesIterator($.JSSyntaxRegExp__globalVersionOf(re), _str, null); | |
| 3489 }; | |
| 3490 | |
| 3491 $.StringMatch$ = function(start, str, pattern) { | |
| 3492 return new $.StringMatch(start, str, pattern); | |
| 3493 }; | |
| 3494 | |
| 3495 $.allMatchesInStringUnchecked = function(needle, haystack) { | |
| 3496 var result, t1, length, patternLength, startIndex, position, t2, endIndex; | |
| 3497 result = $.List_List(0); | |
| 3498 t1 = $.getInterceptor$JSStringJSArray(haystack); | |
| 3499 length = t1.get$length(haystack); | |
| 3500 patternLength = needle.length; | |
| 3501 for (startIndex = 0; true;) { | |
| 3502 position = t1.indexOf$2(haystack, needle, startIndex); | |
| 3503 t2 = $.getInterceptor(position); | |
| 3504 if (t2.$eq(position, -1) === true) | |
| 3505 break; | |
| 3506 result.push($.StringMatch$(position, haystack, needle)); | |
| 3507 endIndex = t2.$add(position, patternLength); | |
| 3508 if ($.$$eq(endIndex, length) === true) | |
| 3509 break; | |
| 3510 else | |
| 3511 startIndex = t2.$eq(position, endIndex) === true ? $.$$add(startIndex, 1) : endIndex; | |
| 3512 } | |
| 3513 return result; | |
| 3514 }; | |
| 3515 | |
| 3516 $.stringContainsUnchecked = function(receiver, other, startIndex) { | |
| 3517 if (typeof other === "string") | |
| 3518 return $.$$eq($.CONSTANT1.indexOf$2(receiver, other, startIndex), -1) !== tr ue; | |
| 3519 else if (typeof other === "object" && other !== null && !!other.$isJSSyntaxReg Exp) | |
| 3520 return other.hasMatch$1($.CONSTANT1.substring$1(receiver, startIndex)); | |
| 3521 else | |
| 3522 return $.iterator($.allMatches(other, $.CONSTANT1.substring$1(receiver, star tIndex))).moveNext$0(); | |
| 3523 }; | |
| 3524 | |
| 3525 $.stringReplaceJS = function(receiver, replacer, to) { | |
| 3526 return receiver.replace(replacer, to.replace('$', '$$$$')); | |
| 3527 }; | |
| 3528 | |
| 3529 $.stringReplaceAllUnchecked = function(receiver, from, to) { | |
| 3530 var result, length, t1, i; | |
| 3531 $.checkString(to); | |
| 3532 if (from === "") | |
| 3533 if (receiver === "") | |
| 3534 return to; | |
| 3535 else { | |
| 3536 result = $.StringBuffer_StringBuffer(""); | |
| 3537 length = receiver.length; | |
| 3538 t1 = $.getInterceptor$JSArray(result); | |
| 3539 t1.add$1(result, to); | |
| 3540 for (i = 0; i < length; ++i) { | |
| 3541 if (i >= receiver.length) | |
| 3542 throw $.ioore(i); | |
| 3543 t1.add$1(result, receiver[i]); | |
| 3544 t1.add$1(result, to); | |
| 3545 } | |
| 3546 return t1.toString$0(result); | |
| 3547 } | |
| 3548 else | |
| 3549 return $.stringReplaceJS(receiver, $.regExpMakeNative($.JSSyntaxRegExp$(from .replace($.regExpMakeNative($.get$quoteRegExp(), true), "\\$&"), true, false), t rue), to); | |
| 3550 }; | |
| 3551 | |
| 3552 $.Arrays_indexOf = function(a, element, startIndex, endIndex) { | |
| 3553 var i; | |
| 3554 if (startIndex >= a.length) | |
| 3555 return -1; | |
| 3556 if (startIndex < 0) | |
| 3557 startIndex = 0; | |
| 3558 for (i = startIndex; i < endIndex; ++i) { | |
| 3559 if (i < 0 || i >= a.length) | |
| 3560 throw $.ioore(i); | |
| 3561 if ($.$$eq(a[i], element) === true) | |
| 3562 return i; | |
| 3563 } | |
| 3564 return -1; | |
| 3565 }; | |
| 3566 | |
| 3567 $.IterableMixinWorkaround_contains = function(iterable, element) { | |
| 3568 var t1, t2; | |
| 3569 for (t1 = $.iterator(iterable), t2 = $.getInterceptor(element); t1.moveNext$0( ) === true;) | |
| 3570 if (t2.$eq(element, t1.get$current()) === true) | |
| 3571 return true; | |
| 3572 return false; | |
| 3573 }; | |
| 3574 | |
| 3575 $.IterableMixinWorkaround_removeAll = function(collection, elementsToRemove) { | |
| 3576 var t1; | |
| 3577 for (t1 = $.CONSTANT0.get$iterator(elementsToRemove); t1.moveNext$0() === true ;) | |
| 3578 collection.remove$1(t1.get$current()); | |
| 3579 }; | |
| 3580 | |
| 3581 $.IterableMixinWorkaround_removeAllList = function(collection, elementsToRemove) { | |
| 3582 $.removeMatching(collection, $.contains(typeof elementsToRemove === "object" & & elementsToRemove !== null && !!elementsToRemove.$isSet ? elementsToRemove : $. toSet(elementsToRemove))); | |
| 3583 }; | |
| 3584 | |
| 3585 $.IterableMixinWorkaround_removeMatching = function(collection, test) { | |
| 3586 var elementsToRemove, t1, t2; | |
| 3587 elementsToRemove = []; | |
| 3588 for (t1 = $.iterator(collection); t1.moveNext$0() === true;) { | |
| 3589 t2 = t1.get$current(); | |
| 3590 if (test.call$1(t2) === true) | |
| 3591 elementsToRemove.push(t2); | |
| 3592 } | |
| 3593 collection.removeAll$1(elementsToRemove); | |
| 3594 }; | |
| 3595 | |
| 3596 $.IterableMixinWorkaround_removeMatchingList = function(list, test) { | |
| 3597 var retained, length, i, element, t1, t2, t3; | |
| 3598 if (typeof list !== "object" || list === null || (list.constructor !== Array | | !!list.immutable$list) && !list.$isJavaScriptIndexingBehavior()) | |
| 3599 return $.IterableMixinWorkaround_removeMatchingList$bailout(1, list, test); | |
| 3600 retained = []; | |
| 3601 length = list.length; | |
| 3602 for (i = 0; i < length; ++i) { | |
| 3603 if (i >= list.length) | |
| 3604 throw $.ioore(i); | |
| 3605 element = list[i]; | |
| 3606 if (test.call$1(element) !== true) | |
| 3607 retained.push(element); | |
| 3608 if (length !== list.length) | |
| 3609 throw $.$$throw($.ConcurrentModificationError$(list)); | |
| 3610 } | |
| 3611 t1 = retained.length; | |
| 3612 if (t1 === length) | |
| 3613 return; | |
| 3614 for (t2 = list.length, i = 0; i < t1; ++i) { | |
| 3615 t3 = retained[i]; | |
| 3616 if (i >= t2) | |
| 3617 throw $.ioore(i); | |
| 3618 list[i] = t3; | |
| 3619 } | |
| 3620 $.CONSTANT0.set$length(list, t1); | |
| 3621 }; | |
| 3622 | |
| 3623 $.IterableMixinWorkaround_removeMatchingList$bailout = function(state0, list, te st) { | |
| 3624 var retained, length, i, element, t1; | |
| 3625 retained = []; | |
| 3626 length = list.length; | |
| 3627 for (i = 0; i < length; ++i) { | |
| 3628 if (i >= list.length) | |
| 3629 throw $.ioore(i); | |
| 3630 element = list[i]; | |
| 3631 if (test.call$1(element) !== true) | |
| 3632 retained.push(element); | |
| 3633 if (length !== list.length) | |
| 3634 throw $.$$throw($.ConcurrentModificationError$(list)); | |
| 3635 } | |
| 3636 if (retained.length === length) | |
| 3637 return; | |
| 3638 for (i = 0; t1 = retained.length, i < t1; ++i) | |
| 3639 $.CONSTANT0.$indexSet(list, i, retained[i]); | |
| 3640 $.CONSTANT0.set$length(list, t1); | |
| 3641 }; | |
| 3642 | |
| 3643 $.IterableMixinWorkaround_sortList = function(l, compare) { | |
| 3644 if (compare == null) | |
| 3645 compare = $.Comparable_compare; | |
| 3646 $._Sort__doSort(l, 0, l.length - 1, compare); | |
| 3647 }; | |
| 3648 | |
| 3649 $.Collections_collectionToString = function(c) { | |
| 3650 var result = $.StringBuffer_StringBuffer(""); | |
| 3651 $.Collections__emitCollection(c, result, $.List_List(0)); | |
| 3652 return $.toString(result); | |
| 3653 }; | |
| 3654 | |
| 3655 $.Collections__emitCollection = function(c, result, visiting) { | |
| 3656 var t1, isList, t2, t3, first, t4; | |
| 3657 t1 = $.getInterceptor$JSArray(visiting); | |
| 3658 t1.add$1(visiting, c); | |
| 3659 isList = typeof c === "object" && c !== null && (c.constructor === Array || c. $isList()); | |
| 3660 t2 = isList ? "[" : "{"; | |
| 3661 t3 = $.getInterceptor$JSArray(result); | |
| 3662 t3.add$1(result, t2); | |
| 3663 for (t2 = $.iterator(c), first = true; t2.moveNext$0() === true; first = false ) { | |
| 3664 t4 = t2.get$current(); | |
| 3665 if (!first) | |
| 3666 t3.add$1(result, ", "); | |
| 3667 $.Collections__emitObject(t4, result, visiting); | |
| 3668 } | |
| 3669 t3.add$1(result, isList ? "]" : "}"); | |
| 3670 t1.removeLast$0(visiting); | |
| 3671 }; | |
| 3672 | |
| 3673 $.Collections__emitObject = function(o, result, visiting) { | |
| 3674 if (typeof o === "object" && o !== null && (o.constructor === Array || o.$isCo llection())) | |
| 3675 if ($.Collections__containsRef(visiting, o) === true) | |
| 3676 $.add(result, typeof o === "object" && o !== null && (o.constructor === Ar ray || o.$isList()) ? "[...]" : "{...}"); | |
| 3677 else | |
| 3678 $.Collections__emitCollection(o, result, visiting); | |
| 3679 else if (typeof o === "object" && o !== null && !!o.$isMap) | |
| 3680 if ($.Collections__containsRef(visiting, o) === true) | |
| 3681 $.add(result, "{...}"); | |
| 3682 else | |
| 3683 $.Maps__emitMap(o, result, visiting); | |
| 3684 else | |
| 3685 $.add(result, o); | |
| 3686 }; | |
| 3687 | |
| 3688 $.Collections__containsRef = function(c, ref) { | |
| 3689 var t1, t2; | |
| 3690 for (t1 = $.iterator(c); t1.moveNext$0() === true;) { | |
| 3691 t2 = t1.get$current(); | |
| 3692 if (t2 == null ? ref == null : t2 === ref) | |
| 3693 return true; | |
| 3694 } | |
| 3695 return false; | |
| 3696 }; | |
| 3697 | |
| 3698 $.HashMap_HashMap = function() { | |
| 3699 return $._HashMapImpl$(); | |
| 3700 }; | |
| 3701 | |
| 3702 $.LinkedHashMap_LinkedHashMap = function() { | |
| 3703 return $._LinkedHashMapImpl$(); | |
| 3704 }; | |
| 3705 | |
| 3706 $._HashMapImpl$ = function() { | |
| 3707 var t1 = new $._HashMapImpl(null, null, null, null, null); | |
| 3708 t1._HashMapImpl$0(); | |
| 3709 return t1; | |
| 3710 }; | |
| 3711 | |
| 3712 $._HashMapImpl__computeLoadLimit = function(capacity) { | |
| 3713 return $.CONSTANT4.$tdiv(capacity * 3, 4); | |
| 3714 }; | |
| 3715 | |
| 3716 $._HashMapImpl__nextProbe = function(currentProbe, numberOfProbes, length) { | |
| 3717 return $.$$and($.$$add(currentProbe, numberOfProbes), $.$$sub(length, 1)); | |
| 3718 }; | |
| 3719 | |
| 3720 $._HashMapImplIndexIterator$ = function(map) { | |
| 3721 return new $._HashMapImplIndexIterator(map, -1, null); | |
| 3722 }; | |
| 3723 | |
| 3724 $._KeyValuePair$ = function(key, value) { | |
| 3725 return new $._KeyValuePair(key, value); | |
| 3726 }; | |
| 3727 | |
| 3728 $._LinkedHashMapImpl$ = function() { | |
| 3729 var t1 = new $._LinkedHashMapImpl(null, null); | |
| 3730 t1._LinkedHashMapImpl$0(); | |
| 3731 return t1; | |
| 3732 }; | |
| 3733 | |
| 3734 $.Maps_mapToString = function(m) { | |
| 3735 var result = $.StringBuffer_StringBuffer(""); | |
| 3736 $.Maps__emitMap(m, result, $.List_List(0)); | |
| 3737 return $.toString(result); | |
| 3738 }; | |
| 3739 | |
| 3740 $.Maps__emitMap = function(m, result, visiting) { | |
| 3741 var t1, t2, t3; | |
| 3742 t1 = {}; | |
| 3743 t2 = $.getInterceptor$JSArray(visiting); | |
| 3744 t2.add$1(visiting, m); | |
| 3745 t3 = $.getInterceptor$JSArray(result); | |
| 3746 t3.add$1(result, "{"); | |
| 3747 t1.first_0 = true; | |
| 3748 $.forEach(m, new $.Maps__emitMap_anon(t1, result, visiting)); | |
| 3749 t3.add$1(result, "}"); | |
| 3750 t2.removeLast$0(visiting); | |
| 3751 }; | |
| 3752 | |
| 3753 $.DoubleLinkedQueueEntry$ = function(e) { | |
| 3754 var t1 = new $.DoubleLinkedQueueEntry(null, null, null); | |
| 3755 t1.DoubleLinkedQueueEntry$1(e); | |
| 3756 return t1; | |
| 3757 }; | |
| 3758 | |
| 3759 $._DoubleLinkedQueueEntrySentinel$ = function() { | |
| 3760 var t1 = new $._DoubleLinkedQueueEntrySentinel(null, null, null); | |
| 3761 t1.DoubleLinkedQueueEntry$1(null); | |
| 3762 t1._DoubleLinkedQueueEntrySentinel$0(); | |
| 3763 return t1; | |
| 3764 }; | |
| 3765 | |
| 3766 $.DoubleLinkedQueue$ = function() { | |
| 3767 var t1 = new $.DoubleLinkedQueue(null); | |
| 3768 t1.DoubleLinkedQueue$0(); | |
| 3769 return t1; | |
| 3770 }; | |
| 3771 | |
| 3772 $._DoubleLinkedQueueIterator$ = function(sentinel) { | |
| 3773 return new $._DoubleLinkedQueueIterator(sentinel, sentinel, null); | |
| 3774 }; | |
| 3775 | |
| 3776 $.HashSet$ = function() { | |
| 3777 return new $.HashSet($._HashMapImpl$()); | |
| 3778 }; | |
| 3779 | |
| 3780 $.HashSet_HashSet$from = function(other) { | |
| 3781 var set, t1; | |
| 3782 set = $.HashSet$(); | |
| 3783 for (t1 = $.iterator(other); t1.moveNext$0() === true;) | |
| 3784 set.add$1(t1.get$current()); | |
| 3785 return set; | |
| 3786 }; | |
| 3787 | |
| 3788 $._HashSetIterator$ = function(set) { | |
| 3789 return new $._HashSetIterator($.CONSTANT0.get$iterator(set._backingMap._keys)) ; | |
| 3790 }; | |
| 3791 | |
| 3792 $._Sort__doSort = function(a, left, right, compare) { | |
| 3793 if (right - left <= 32) | |
| 3794 $._Sort_insertionSort_(a, left, right, compare); | |
| 3795 else | |
| 3796 $._Sort__dualPivotQuicksort(a, left, right, compare); | |
| 3797 }; | |
| 3798 | |
| 3799 $._Sort_insertionSort_ = function(a, left, right, compare) { | |
| 3800 var i, el, j, t1, t2, j0; | |
| 3801 if (typeof a !== "object" || a === null || (a.constructor !== Array || !!a.imm utable$list) && !a.$isJavaScriptIndexingBehavior()) | |
| 3802 return $._Sort_insertionSort_$bailout(1, a, left, right, compare); | |
| 3803 for (i = left + 1; i <= right; ++i) { | |
| 3804 if (i < 0 || i >= a.length) | |
| 3805 throw $.ioore(i); | |
| 3806 el = a[i]; | |
| 3807 j = i; | |
| 3808 while (true) { | |
| 3809 if (j > left) { | |
| 3810 t1 = j - 1; | |
| 3811 if (t1 < 0 || t1 >= a.length) | |
| 3812 throw $.ioore(t1); | |
| 3813 t2 = $.$$gt(compare.call$2(a[t1], el), 0) === true; | |
| 3814 t1 = t2; | |
| 3815 } else | |
| 3816 t1 = false; | |
| 3817 t2 = a.length; | |
| 3818 if (!t1) | |
| 3819 break; | |
| 3820 j0 = j - 1; | |
| 3821 if (j0 < 0 || j0 >= t2) | |
| 3822 throw $.ioore(j0); | |
| 3823 t1 = a[j0]; | |
| 3824 if (j < 0 || j >= t2) | |
| 3825 throw $.ioore(j); | |
| 3826 a[j] = t1; | |
| 3827 j = j0; | |
| 3828 } | |
| 3829 if (j < 0 || j >= t2) | |
| 3830 throw $.ioore(j); | |
| 3831 a[j] = el; | |
| 3832 } | |
| 3833 }; | |
| 3834 | |
| 3835 $._Sort_insertionSort_$bailout = function(state0, a, left, right, compare) { | |
| 3836 var i, el, j, t1, t2, j0; | |
| 3837 for (i = left + 1; i <= right; ++i) { | |
| 3838 if (i < 0 || i >= a.length) | |
| 3839 throw $.ioore(i); | |
| 3840 el = a[i]; | |
| 3841 j = i; | |
| 3842 while (true) { | |
| 3843 if (j > left) { | |
| 3844 t1 = j - 1; | |
| 3845 if (t1 < 0 || t1 >= a.length) | |
| 3846 throw $.ioore(t1); | |
| 3847 t2 = $.$$gt(compare.call$2(a[t1], el), 0) === true; | |
| 3848 t1 = t2; | |
| 3849 } else | |
| 3850 t1 = false; | |
| 3851 if (!t1) | |
| 3852 break; | |
| 3853 j0 = j - 1; | |
| 3854 if (j0 < 0 || j0 >= a.length) | |
| 3855 throw $.ioore(j0); | |
| 3856 $.CONSTANT0.$indexSet(a, j, a[j0]); | |
| 3857 j = j0; | |
| 3858 } | |
| 3859 $.CONSTANT0.$indexSet(a, j, el); | |
| 3860 } | |
| 3861 }; | |
| 3862 | |
| 3863 $._Sort__dualPivotQuicksort = function(a, left, right, compare) { | |
| 3864 var sixth, index1, index5, index3, index2, index4, t1, el1, el2, el3, el4, el5 , t0, t2, less, great, k, ak, comp, t3, great0, less0, t4; | |
| 3865 if (typeof a !== "object" || a === null || (a.constructor !== Array || !!a.imm utable$list) && !a.$isJavaScriptIndexingBehavior()) | |
| 3866 return $._Sort__dualPivotQuicksort$bailout(1, a, left, right, compare); | |
| 3867 sixth = $.CONSTANT4.$tdiv(right - left + 1, 6); | |
| 3868 index1 = left + sixth; | |
| 3869 index5 = right - sixth; | |
| 3870 index3 = $.CONSTANT4.$tdiv(left + right, 2); | |
| 3871 index2 = index3 - sixth; | |
| 3872 index4 = index3 + sixth; | |
| 3873 t1 = a.length; | |
| 3874 if (index1 < 0 || index1 >= t1) | |
| 3875 throw $.ioore(index1); | |
| 3876 el1 = a[index1]; | |
| 3877 if (index2 < 0 || index2 >= t1) | |
| 3878 throw $.ioore(index2); | |
| 3879 el2 = a[index2]; | |
| 3880 if (index3 < 0 || index3 >= t1) | |
| 3881 throw $.ioore(index3); | |
| 3882 el3 = a[index3]; | |
| 3883 if (index4 < 0 || index4 >= t1) | |
| 3884 throw $.ioore(index4); | |
| 3885 el4 = a[index4]; | |
| 3886 if (index5 < 0 || index5 >= t1) | |
| 3887 throw $.ioore(index5); | |
| 3888 el5 = a[index5]; | |
| 3889 if ($.$$gt(compare.call$2(el1, el2), 0) === true) { | |
| 3890 t0 = el2; | |
| 3891 el2 = el1; | |
| 3892 el1 = t0; | |
| 3893 } | |
| 3894 if ($.$$gt(compare.call$2(el4, el5), 0) === true) { | |
| 3895 t0 = el5; | |
| 3896 el5 = el4; | |
| 3897 el4 = t0; | |
| 3898 } | |
| 3899 if ($.$$gt(compare.call$2(el1, el3), 0) === true) { | |
| 3900 t0 = el3; | |
| 3901 el3 = el1; | |
| 3902 el1 = t0; | |
| 3903 } | |
| 3904 if ($.$$gt(compare.call$2(el2, el3), 0) === true) { | |
| 3905 t0 = el3; | |
| 3906 el3 = el2; | |
| 3907 el2 = t0; | |
| 3908 } | |
| 3909 if ($.$$gt(compare.call$2(el1, el4), 0) === true) { | |
| 3910 t0 = el4; | |
| 3911 el4 = el1; | |
| 3912 el1 = t0; | |
| 3913 } | |
| 3914 if ($.$$gt(compare.call$2(el3, el4), 0) === true) { | |
| 3915 t0 = el4; | |
| 3916 el4 = el3; | |
| 3917 el3 = t0; | |
| 3918 } | |
| 3919 if ($.$$gt(compare.call$2(el2, el5), 0) === true) { | |
| 3920 t0 = el5; | |
| 3921 el5 = el2; | |
| 3922 el2 = t0; | |
| 3923 } | |
| 3924 if ($.$$gt(compare.call$2(el2, el3), 0) === true) { | |
| 3925 t0 = el3; | |
| 3926 el3 = el2; | |
| 3927 el2 = t0; | |
| 3928 } | |
| 3929 if ($.$$gt(compare.call$2(el4, el5), 0) === true) { | |
| 3930 t0 = el5; | |
| 3931 el5 = el4; | |
| 3932 el4 = t0; | |
| 3933 } | |
| 3934 t1 = a.length; | |
| 3935 if (index1 >= t1) | |
| 3936 throw $.ioore(index1); | |
| 3937 a[index1] = el1; | |
| 3938 if (index3 >= t1) | |
| 3939 throw $.ioore(index3); | |
| 3940 a[index3] = el3; | |
| 3941 if (index5 >= t1) | |
| 3942 throw $.ioore(index5); | |
| 3943 a[index5] = el5; | |
| 3944 if (left < 0 || left >= t1) | |
| 3945 throw $.ioore(left); | |
| 3946 t2 = a[left]; | |
| 3947 if (index2 >= t1) | |
| 3948 throw $.ioore(index2); | |
| 3949 a[index2] = t2; | |
| 3950 if (right < 0 || right >= t1) | |
| 3951 throw $.ioore(right); | |
| 3952 t2 = a[right]; | |
| 3953 if (index4 >= t1) | |
| 3954 throw $.ioore(index4); | |
| 3955 a[index4] = t2; | |
| 3956 less = left + 1; | |
| 3957 great = right - 1; | |
| 3958 t1 = $.$$eq(compare.call$2(el2, el4), 0) === true; | |
| 3959 if (t1) | |
| 3960 for (k = less; k <= great; ++k) { | |
| 3961 if (k >= a.length) | |
| 3962 throw $.ioore(k); | |
| 3963 ak = a[k]; | |
| 3964 comp = compare.call$2(ak, el2); | |
| 3965 t2 = $.getInterceptor(comp); | |
| 3966 if (t2.$eq(comp, 0) === true) | |
| 3967 continue; | |
| 3968 if (t2.$lt(comp, 0) === true) { | |
| 3969 if (k !== less) { | |
| 3970 t2 = a.length; | |
| 3971 if (less >= t2) | |
| 3972 throw $.ioore(less); | |
| 3973 t3 = a[less]; | |
| 3974 if (k >= t2) | |
| 3975 throw $.ioore(k); | |
| 3976 a[k] = t3; | |
| 3977 a[less] = ak; | |
| 3978 } | |
| 3979 ++less; | |
| 3980 } else | |
| 3981 for (; true;) { | |
| 3982 if (great < 0 || great >= a.length) | |
| 3983 throw $.ioore(great); | |
| 3984 comp = compare.call$2(a[great], el2); | |
| 3985 t2 = $.getInterceptor$JSNumber(comp); | |
| 3986 if (t2.$gt(comp, 0) === true) { | |
| 3987 --great; | |
| 3988 continue; | |
| 3989 } else { | |
| 3990 t2 = t2.$lt(comp, 0); | |
| 3991 great0 = great - 1; | |
| 3992 t3 = a.length; | |
| 3993 if (t2 === true) { | |
| 3994 if (less >= t3) | |
| 3995 throw $.ioore(less); | |
| 3996 t2 = a[less]; | |
| 3997 if (k >= t3) | |
| 3998 throw $.ioore(k); | |
| 3999 a[k] = t2; | |
| 4000 less0 = less + 1; | |
| 4001 if (great >= t3) | |
| 4002 throw $.ioore(great); | |
| 4003 a[less] = a[great]; | |
| 4004 a[great] = ak; | |
| 4005 great = great0; | |
| 4006 less = less0; | |
| 4007 break; | |
| 4008 } else { | |
| 4009 if (great >= t3) | |
| 4010 throw $.ioore(great); | |
| 4011 t2 = a[great]; | |
| 4012 if (k >= t3) | |
| 4013 throw $.ioore(k); | |
| 4014 a[k] = t2; | |
| 4015 a[great] = ak; | |
| 4016 great = great0; | |
| 4017 break; | |
| 4018 } | |
| 4019 } | |
| 4020 } | |
| 4021 } | |
| 4022 else | |
| 4023 for (k = less; k <= great; ++k) { | |
| 4024 if (k >= a.length) | |
| 4025 throw $.ioore(k); | |
| 4026 ak = a[k]; | |
| 4027 if ($.$$lt(compare.call$2(ak, el2), 0) === true) { | |
| 4028 if (k !== less) { | |
| 4029 t2 = a.length; | |
| 4030 if (less >= t2) | |
| 4031 throw $.ioore(less); | |
| 4032 t3 = a[less]; | |
| 4033 if (k >= t2) | |
| 4034 throw $.ioore(k); | |
| 4035 a[k] = t3; | |
| 4036 a[less] = ak; | |
| 4037 } | |
| 4038 ++less; | |
| 4039 } else if ($.$$gt(compare.call$2(ak, el4), 0) === true) | |
| 4040 for (; true;) { | |
| 4041 if (great < 0 || great >= a.length) | |
| 4042 throw $.ioore(great); | |
| 4043 if ($.$$gt(compare.call$2(a[great], el4), 0) === true) { | |
| 4044 --great; | |
| 4045 if (great < k) | |
| 4046 break; | |
| 4047 continue; | |
| 4048 } else { | |
| 4049 if (great >= a.length) | |
| 4050 throw $.ioore(great); | |
| 4051 t2 = $.$$lt(compare.call$2(a[great], el2), 0); | |
| 4052 great0 = great - 1; | |
| 4053 t3 = a.length; | |
| 4054 if (t2 === true) { | |
| 4055 if (less >= t3) | |
| 4056 throw $.ioore(less); | |
| 4057 t2 = a[less]; | |
| 4058 if (k >= t3) | |
| 4059 throw $.ioore(k); | |
| 4060 a[k] = t2; | |
| 4061 less0 = less + 1; | |
| 4062 if (great >= t3) | |
| 4063 throw $.ioore(great); | |
| 4064 a[less] = a[great]; | |
| 4065 a[great] = ak; | |
| 4066 less = less0; | |
| 4067 } else { | |
| 4068 if (great >= t3) | |
| 4069 throw $.ioore(great); | |
| 4070 t2 = a[great]; | |
| 4071 if (k >= t3) | |
| 4072 throw $.ioore(k); | |
| 4073 a[k] = t2; | |
| 4074 a[great] = ak; | |
| 4075 } | |
| 4076 great = great0; | |
| 4077 break; | |
| 4078 } | |
| 4079 } | |
| 4080 } | |
| 4081 t2 = less - 1; | |
| 4082 t3 = a.length; | |
| 4083 if (t2 >= t3) | |
| 4084 throw $.ioore(t2); | |
| 4085 t4 = a[t2]; | |
| 4086 if (left >= t3) | |
| 4087 throw $.ioore(left); | |
| 4088 a[left] = t4; | |
| 4089 a[t2] = el2; | |
| 4090 t2 = great + 1; | |
| 4091 if (t2 < 0 || t2 >= t3) | |
| 4092 throw $.ioore(t2); | |
| 4093 t4 = a[t2]; | |
| 4094 if (right >= t3) | |
| 4095 throw $.ioore(right); | |
| 4096 a[right] = t4; | |
| 4097 a[t2] = el4; | |
| 4098 $._Sort__doSort(a, left, less - 2, compare); | |
| 4099 $._Sort__doSort(a, great + 2, right, compare); | |
| 4100 if (t1) | |
| 4101 return; | |
| 4102 if (less < index1 && great > index5) { | |
| 4103 while (true) { | |
| 4104 if (less >= a.length) | |
| 4105 throw $.ioore(less); | |
| 4106 if (!($.$$eq(compare.call$2(a[less], el2), 0) === true)) | |
| 4107 break; | |
| 4108 ++less; | |
| 4109 } | |
| 4110 while (true) { | |
| 4111 if (great < 0 || great >= a.length) | |
| 4112 throw $.ioore(great); | |
| 4113 if (!($.$$eq(compare.call$2(a[great], el4), 0) === true)) | |
| 4114 break; | |
| 4115 --great; | |
| 4116 } | |
| 4117 for (k = less; k <= great; ++k) { | |
| 4118 if (k >= a.length) | |
| 4119 throw $.ioore(k); | |
| 4120 ak = a[k]; | |
| 4121 if ($.$$eq(compare.call$2(ak, el2), 0) === true) { | |
| 4122 if (k !== less) { | |
| 4123 t1 = a.length; | |
| 4124 if (less >= t1) | |
| 4125 throw $.ioore(less); | |
| 4126 t2 = a[less]; | |
| 4127 if (k >= t1) | |
| 4128 throw $.ioore(k); | |
| 4129 a[k] = t2; | |
| 4130 a[less] = ak; | |
| 4131 } | |
| 4132 ++less; | |
| 4133 } else if ($.$$eq(compare.call$2(ak, el4), 0) === true) | |
| 4134 for (; true;) { | |
| 4135 if (great < 0 || great >= a.length) | |
| 4136 throw $.ioore(great); | |
| 4137 if ($.$$eq(compare.call$2(a[great], el4), 0) === true) { | |
| 4138 --great; | |
| 4139 if (great < k) | |
| 4140 break; | |
| 4141 continue; | |
| 4142 } else { | |
| 4143 if (great >= a.length) | |
| 4144 throw $.ioore(great); | |
| 4145 t1 = $.$$lt(compare.call$2(a[great], el2), 0); | |
| 4146 great0 = great - 1; | |
| 4147 t2 = a.length; | |
| 4148 if (t1 === true) { | |
| 4149 if (less >= t2) | |
| 4150 throw $.ioore(less); | |
| 4151 t1 = a[less]; | |
| 4152 if (k >= t2) | |
| 4153 throw $.ioore(k); | |
| 4154 a[k] = t1; | |
| 4155 less0 = less + 1; | |
| 4156 if (great >= t2) | |
| 4157 throw $.ioore(great); | |
| 4158 a[less] = a[great]; | |
| 4159 a[great] = ak; | |
| 4160 less = less0; | |
| 4161 } else { | |
| 4162 if (great >= t2) | |
| 4163 throw $.ioore(great); | |
| 4164 t1 = a[great]; | |
| 4165 if (k >= t2) | |
| 4166 throw $.ioore(k); | |
| 4167 a[k] = t1; | |
| 4168 a[great] = ak; | |
| 4169 } | |
| 4170 great = great0; | |
| 4171 break; | |
| 4172 } | |
| 4173 } | |
| 4174 } | |
| 4175 $._Sort__doSort(a, less, great, compare); | |
| 4176 } else | |
| 4177 $._Sort__doSort(a, less, great, compare); | |
| 4178 }; | |
| 4179 | |
| 4180 $._Sort__dualPivotQuicksort$bailout = function(state0, a, left, right, compare) { | |
| 4181 var sixth, index1, index5, index3, index2, index4, t1, el1, el2, el3, el4, el5 , t0, less, great, k, ak, comp, t2, great0, t3, less0; | |
| 4182 sixth = $.CONSTANT4.$tdiv(right - left + 1, 6); | |
| 4183 index1 = left + sixth; | |
| 4184 index5 = right - sixth; | |
| 4185 index3 = $.CONSTANT4.$tdiv(left + right, 2); | |
| 4186 index2 = index3 - sixth; | |
| 4187 index4 = index3 + sixth; | |
| 4188 t1 = a.length; | |
| 4189 if (index1 < 0 || index1 >= t1) | |
| 4190 throw $.ioore(index1); | |
| 4191 el1 = a[index1]; | |
| 4192 if (index2 < 0 || index2 >= t1) | |
| 4193 throw $.ioore(index2); | |
| 4194 el2 = a[index2]; | |
| 4195 if (index3 < 0 || index3 >= t1) | |
| 4196 throw $.ioore(index3); | |
| 4197 el3 = a[index3]; | |
| 4198 if (index4 < 0 || index4 >= t1) | |
| 4199 throw $.ioore(index4); | |
| 4200 el4 = a[index4]; | |
| 4201 if (index5 < 0 || index5 >= t1) | |
| 4202 throw $.ioore(index5); | |
| 4203 el5 = a[index5]; | |
| 4204 if ($.$$gt(compare.call$2(el1, el2), 0) === true) { | |
| 4205 t0 = el2; | |
| 4206 el2 = el1; | |
| 4207 el1 = t0; | |
| 4208 } | |
| 4209 if ($.$$gt(compare.call$2(el4, el5), 0) === true) { | |
| 4210 t0 = el5; | |
| 4211 el5 = el4; | |
| 4212 el4 = t0; | |
| 4213 } | |
| 4214 if ($.$$gt(compare.call$2(el1, el3), 0) === true) { | |
| 4215 t0 = el3; | |
| 4216 el3 = el1; | |
| 4217 el1 = t0; | |
| 4218 } | |
| 4219 if ($.$$gt(compare.call$2(el2, el3), 0) === true) { | |
| 4220 t0 = el3; | |
| 4221 el3 = el2; | |
| 4222 el2 = t0; | |
| 4223 } | |
| 4224 if ($.$$gt(compare.call$2(el1, el4), 0) === true) { | |
| 4225 t0 = el4; | |
| 4226 el4 = el1; | |
| 4227 el1 = t0; | |
| 4228 } | |
| 4229 if ($.$$gt(compare.call$2(el3, el4), 0) === true) { | |
| 4230 t0 = el4; | |
| 4231 el4 = el3; | |
| 4232 el3 = t0; | |
| 4233 } | |
| 4234 if ($.$$gt(compare.call$2(el2, el5), 0) === true) { | |
| 4235 t0 = el5; | |
| 4236 el5 = el2; | |
| 4237 el2 = t0; | |
| 4238 } | |
| 4239 if ($.$$gt(compare.call$2(el2, el3), 0) === true) { | |
| 4240 t0 = el3; | |
| 4241 el3 = el2; | |
| 4242 el2 = t0; | |
| 4243 } | |
| 4244 if ($.$$gt(compare.call$2(el4, el5), 0) === true) { | |
| 4245 t0 = el5; | |
| 4246 el5 = el4; | |
| 4247 el4 = t0; | |
| 4248 } | |
| 4249 $.CONSTANT0.$indexSet(a, index1, el1); | |
| 4250 $.CONSTANT0.$indexSet(a, index3, el3); | |
| 4251 $.CONSTANT0.$indexSet(a, index5, el5); | |
| 4252 if (left < 0 || left >= a.length) | |
| 4253 throw $.ioore(left); | |
| 4254 $.CONSTANT0.$indexSet(a, index2, a[left]); | |
| 4255 if (right < 0 || right >= a.length) | |
| 4256 throw $.ioore(right); | |
| 4257 $.CONSTANT0.$indexSet(a, index4, a[right]); | |
| 4258 less = left + 1; | |
| 4259 great = right - 1; | |
| 4260 t1 = $.$$eq(compare.call$2(el2, el4), 0) === true; | |
| 4261 if (t1) | |
| 4262 for (k = less; k <= great; ++k) { | |
| 4263 if (k >= a.length) | |
| 4264 throw $.ioore(k); | |
| 4265 ak = a[k]; | |
| 4266 comp = compare.call$2(ak, el2); | |
| 4267 t2 = $.getInterceptor(comp); | |
| 4268 if (t2.$eq(comp, 0) === true) | |
| 4269 continue; | |
| 4270 if (t2.$lt(comp, 0) === true) { | |
| 4271 if (k !== less) { | |
| 4272 if (less >= a.length) | |
| 4273 throw $.ioore(less); | |
| 4274 $.CONSTANT0.$indexSet(a, k, a[less]); | |
| 4275 $.CONSTANT0.$indexSet(a, less, ak); | |
| 4276 } | |
| 4277 ++less; | |
| 4278 } else | |
| 4279 for (; true;) { | |
| 4280 if (great < 0 || great >= a.length) | |
| 4281 throw $.ioore(great); | |
| 4282 comp = compare.call$2(a[great], el2); | |
| 4283 t2 = $.getInterceptor$JSNumber(comp); | |
| 4284 if (t2.$gt(comp, 0) === true) { | |
| 4285 --great; | |
| 4286 continue; | |
| 4287 } else { | |
| 4288 t2 = t2.$lt(comp, 0); | |
| 4289 great0 = great - 1; | |
| 4290 t3 = a.length; | |
| 4291 if (t2 === true) { | |
| 4292 if (less >= t3) | |
| 4293 throw $.ioore(less); | |
| 4294 $.CONSTANT0.$indexSet(a, k, a[less]); | |
| 4295 less0 = less + 1; | |
| 4296 if (great >= a.length) | |
| 4297 throw $.ioore(great); | |
| 4298 $.CONSTANT0.$indexSet(a, less, a[great]); | |
| 4299 $.CONSTANT0.$indexSet(a, great, ak); | |
| 4300 great = great0; | |
| 4301 less = less0; | |
| 4302 break; | |
| 4303 } else { | |
| 4304 if (great >= t3) | |
| 4305 throw $.ioore(great); | |
| 4306 $.CONSTANT0.$indexSet(a, k, a[great]); | |
| 4307 $.CONSTANT0.$indexSet(a, great, ak); | |
| 4308 great = great0; | |
| 4309 break; | |
| 4310 } | |
| 4311 } | |
| 4312 } | |
| 4313 } | |
| 4314 else | |
| 4315 for (k = less; k <= great; ++k) { | |
| 4316 if (k >= a.length) | |
| 4317 throw $.ioore(k); | |
| 4318 ak = a[k]; | |
| 4319 if ($.$$lt(compare.call$2(ak, el2), 0) === true) { | |
| 4320 if (k !== less) { | |
| 4321 if (less >= a.length) | |
| 4322 throw $.ioore(less); | |
| 4323 $.CONSTANT0.$indexSet(a, k, a[less]); | |
| 4324 $.CONSTANT0.$indexSet(a, less, ak); | |
| 4325 } | |
| 4326 ++less; | |
| 4327 } else if ($.$$gt(compare.call$2(ak, el4), 0) === true) | |
| 4328 for (; true;) { | |
| 4329 if (great < 0 || great >= a.length) | |
| 4330 throw $.ioore(great); | |
| 4331 if ($.$$gt(compare.call$2(a[great], el4), 0) === true) { | |
| 4332 --great; | |
| 4333 if (great < k) | |
| 4334 break; | |
| 4335 continue; | |
| 4336 } else { | |
| 4337 if (great >= a.length) | |
| 4338 throw $.ioore(great); | |
| 4339 t2 = $.$$lt(compare.call$2(a[great], el2), 0); | |
| 4340 great0 = great - 1; | |
| 4341 t3 = a.length; | |
| 4342 if (t2 === true) { | |
| 4343 if (less >= t3) | |
| 4344 throw $.ioore(less); | |
| 4345 $.CONSTANT0.$indexSet(a, k, a[less]); | |
| 4346 less0 = less + 1; | |
| 4347 if (great >= a.length) | |
| 4348 throw $.ioore(great); | |
| 4349 $.CONSTANT0.$indexSet(a, less, a[great]); | |
| 4350 $.CONSTANT0.$indexSet(a, great, ak); | |
| 4351 great = great0; | |
| 4352 less = less0; | |
| 4353 } else { | |
| 4354 if (great >= t3) | |
| 4355 throw $.ioore(great); | |
| 4356 $.CONSTANT0.$indexSet(a, k, a[great]); | |
| 4357 $.CONSTANT0.$indexSet(a, great, ak); | |
| 4358 great = great0; | |
| 4359 } | |
| 4360 break; | |
| 4361 } | |
| 4362 } | |
| 4363 } | |
| 4364 t2 = less - 1; | |
| 4365 if (t2 >= a.length) | |
| 4366 throw $.ioore(t2); | |
| 4367 $.CONSTANT0.$indexSet(a, left, a[t2]); | |
| 4368 $.CONSTANT0.$indexSet(a, t2, el2); | |
| 4369 t2 = great + 1; | |
| 4370 if (t2 < 0 || t2 >= a.length) | |
| 4371 throw $.ioore(t2); | |
| 4372 $.CONSTANT0.$indexSet(a, right, a[t2]); | |
| 4373 $.CONSTANT0.$indexSet(a, t2, el4); | |
| 4374 $._Sort__doSort(a, left, less - 2, compare); | |
| 4375 $._Sort__doSort(a, great + 2, right, compare); | |
| 4376 if (t1) | |
| 4377 return; | |
| 4378 if (less < index1 && great > index5) { | |
| 4379 while (true) { | |
| 4380 if (less >= a.length) | |
| 4381 throw $.ioore(less); | |
| 4382 if (!($.$$eq(compare.call$2(a[less], el2), 0) === true)) | |
| 4383 break; | |
| 4384 ++less; | |
| 4385 } | |
| 4386 while (true) { | |
| 4387 if (great < 0 || great >= a.length) | |
| 4388 throw $.ioore(great); | |
| 4389 if (!($.$$eq(compare.call$2(a[great], el4), 0) === true)) | |
| 4390 break; | |
| 4391 --great; | |
| 4392 } | |
| 4393 for (k = less; k <= great; ++k) { | |
| 4394 if (k >= a.length) | |
| 4395 throw $.ioore(k); | |
| 4396 ak = a[k]; | |
| 4397 if ($.$$eq(compare.call$2(ak, el2), 0) === true) { | |
| 4398 if (k !== less) { | |
| 4399 if (less >= a.length) | |
| 4400 throw $.ioore(less); | |
| 4401 $.CONSTANT0.$indexSet(a, k, a[less]); | |
| 4402 $.CONSTANT0.$indexSet(a, less, ak); | |
| 4403 } | |
| 4404 ++less; | |
| 4405 } else if ($.$$eq(compare.call$2(ak, el4), 0) === true) | |
| 4406 for (; true;) { | |
| 4407 if (great < 0 || great >= a.length) | |
| 4408 throw $.ioore(great); | |
| 4409 if ($.$$eq(compare.call$2(a[great], el4), 0) === true) { | |
| 4410 --great; | |
| 4411 if (great < k) | |
| 4412 break; | |
| 4413 continue; | |
| 4414 } else { | |
| 4415 if (great >= a.length) | |
| 4416 throw $.ioore(great); | |
| 4417 t1 = $.$$lt(compare.call$2(a[great], el2), 0); | |
| 4418 great0 = great - 1; | |
| 4419 t2 = a.length; | |
| 4420 if (t1 === true) { | |
| 4421 if (less >= t2) | |
| 4422 throw $.ioore(less); | |
| 4423 $.CONSTANT0.$indexSet(a, k, a[less]); | |
| 4424 less0 = less + 1; | |
| 4425 if (great >= a.length) | |
| 4426 throw $.ioore(great); | |
| 4427 $.CONSTANT0.$indexSet(a, less, a[great]); | |
| 4428 $.CONSTANT0.$indexSet(a, great, ak); | |
| 4429 great = great0; | |
| 4430 less = less0; | |
| 4431 } else { | |
| 4432 if (great >= t2) | |
| 4433 throw $.ioore(great); | |
| 4434 $.CONSTANT0.$indexSet(a, k, a[great]); | |
| 4435 $.CONSTANT0.$indexSet(a, great, ak); | |
| 4436 great = great0; | |
| 4437 } | |
| 4438 break; | |
| 4439 } | |
| 4440 } | |
| 4441 } | |
| 4442 $._Sort__doSort(a, less, great, compare); | |
| 4443 } else | |
| 4444 $._Sort__doSort(a, less, great, compare); | |
| 4445 }; | |
| 4446 | |
| 4447 $.ListIterator$ = function(list) { | |
| 4448 return new $.ListIterator(list, list.length, -1, null); | |
| 4449 }; | |
| 4450 | |
| 4451 $.Comparable_compare = function(a, b) { | |
| 4452 return $.compareTo(a, b); | |
| 4453 }; | |
| 4454 | |
| 4455 $.DateTime_DateTime$now = function() { | |
| 4456 return $.DateTime$_now(); | |
| 4457 }; | |
| 4458 | |
| 4459 $.DateTime$fromMillisecondsSinceEpoch = function(millisecondsSinceEpoch, isUtc) { | |
| 4460 var t1 = new $.DateTime(millisecondsSinceEpoch, isUtc); | |
| 4461 t1.DateTime$fromMillisecondsSinceEpoch$2$isUtc(millisecondsSinceEpoch, isUtc); | |
| 4462 return t1; | |
| 4463 }; | |
| 4464 | |
| 4465 $.DateTime$_now = function() { | |
| 4466 var t1 = new $.DateTime($.Primitives_dateNow(), false); | |
| 4467 t1.DateTime$_now$0(); | |
| 4468 return t1; | |
| 4469 }; | |
| 4470 | |
| 4471 $.Error_safeToString = function(object) { | |
| 4472 if (typeof object === "number" && Math.floor(object) === object || typeof obje ct === "number" || typeof object === "boolean" || null == object) | |
| 4473 return $.toString(object); | |
| 4474 if (typeof object === "string") | |
| 4475 return "\"" + $.S($.replaceAll($.replaceAll($.replaceAll($.CONSTANT1.replace All$2(object, "\\", "\\\\"), "\n", "\\n"), "\r", "\\r"), "\"", "\\\"")) + "\""; | |
| 4476 return "Instance of '" + $.S($.Primitives_objectTypeName(object)) + "'"; | |
| 4477 }; | |
| 4478 | |
| 4479 $.ArgumentError$ = function(message) { | |
| 4480 return new $.ArgumentError(message); | |
| 4481 }; | |
| 4482 | |
| 4483 $.RangeError$value = function(value) { | |
| 4484 return new $.RangeError("value " + $.S(value)); | |
| 4485 }; | |
| 4486 | |
| 4487 $.NoSuchMethodError$ = function(_receiver, _memberName, _arguments, _namedArgume nts, existingArgumentNames) { | |
| 4488 return new $.NoSuchMethodError(_receiver, _memberName, _arguments, _namedArgum ents, existingArgumentNames); | |
| 4489 }; | |
| 4490 | |
| 4491 $.UnsupportedError$ = function(message) { | |
| 4492 return new $.UnsupportedError(message); | |
| 4493 }; | |
| 4494 | |
| 4495 $.UnimplementedError$ = function(message) { | |
| 4496 return new $.UnimplementedError(message); | |
| 4497 }; | |
| 4498 | |
| 4499 $.StateError$ = function(message) { | |
| 4500 return new $.StateError(message); | |
| 4501 }; | |
| 4502 | |
| 4503 $.ConcurrentModificationError$ = function(modifiedObject) { | |
| 4504 return new $.ConcurrentModificationError(modifiedObject); | |
| 4505 }; | |
| 4506 | |
| 4507 $.StackOverflowError$ = function() { | |
| 4508 return new $.StackOverflowError(); | |
| 4509 }; | |
| 4510 | |
| 4511 $.RuntimeError$ = function(message) { | |
| 4512 return new $.RuntimeError(message); | |
| 4513 }; | |
| 4514 | |
| 4515 $.Exception_Exception = function(message) { | |
| 4516 return $._ExceptionImplementation$(message); | |
| 4517 }; | |
| 4518 | |
| 4519 $._ExceptionImplementation$ = function(message) { | |
| 4520 return new $._ExceptionImplementation(message); | |
| 4521 }; | |
| 4522 | |
| 4523 $.IllegalJSRegExpException$ = function(_pattern, _errmsg) { | |
| 4524 return new $.IllegalJSRegExpException(_pattern, _errmsg); | |
| 4525 }; | |
| 4526 | |
| 4527 $.List_List = function(length) { | |
| 4528 if (!(typeof length === "number" && Math.floor(length) === length) || length < 0) | |
| 4529 throw $.$$throw($.ArgumentError$("Length must be a positive integer: " + $.S (length) + ".")); | |
| 4530 return new Array(length); | |
| 4531 }; | |
| 4532 | |
| 4533 $.List_List$fixedLength = function(length, fill) { | |
| 4534 var result, t1, i; | |
| 4535 if (!(typeof length === "number" && Math.floor(length) === length) || length < 0) | |
| 4536 throw $.$$throw($.ArgumentError$("Length must be a positive integer: " + $.S (length) + ".")); | |
| 4537 result = $.Primitives_newFixedList(length); | |
| 4538 if (typeof result !== "object" || result === null || (result.constructor !== A rray || !!result.immutable$list) && !result.$isJavaScriptIndexingBehavior()) | |
| 4539 return $.List_List$fixedLength$bailout(1, length, fill, result); | |
| 4540 if ($.$$eq(length, 0) !== true && !(fill == null)) | |
| 4541 for (t1 = result.length, i = 0; i < t1; ++i) | |
| 4542 result[i] = fill; | |
| 4543 return result; | |
| 4544 }; | |
| 4545 | |
| 4546 $.List_List$fixedLength$bailout = function(state0, length, fill, result) { | |
| 4547 var t1, i; | |
| 4548 if ($.$$eq(length, 0) !== true && !(fill == null)) | |
| 4549 for (t1 = $.getInterceptor$JSStringJSArray(result), i = 0; $.CONSTANT4.$lt(i , t1.get$length(result)); ++i) | |
| 4550 t1.$indexSet(result, i, fill); | |
| 4551 return result; | |
| 4552 }; | |
| 4553 | |
| 4554 $.List_List$from = function(other) { | |
| 4555 var list, t1; | |
| 4556 list = $.List_List(0); | |
| 4557 for (t1 = $.iterator(other); t1.moveNext$0() === true;) | |
| 4558 list.push(t1.get$current()); | |
| 4559 return list; | |
| 4560 }; | |
| 4561 | |
| 4562 $.Set_Set$from = function(other) { | |
| 4563 return $.HashSet_HashSet$from(other); | |
| 4564 }; | |
| 4565 | |
| 4566 $.String_String$fromCharCodes = function(charCodes) { | |
| 4567 if (!charCodes.constructor === Array) | |
| 4568 charCodes = $.List_List$from(charCodes); | |
| 4569 return $.Primitives_stringFromCharCodes(charCodes); | |
| 4570 }; | |
| 4571 | |
| 4572 $.StringBuffer_StringBuffer = function(content) { | |
| 4573 return $._StringBufferImpl$(content); | |
| 4574 }; | |
| 4575 | |
| 4576 $._StringBufferImpl$ = function(content) { | |
| 4577 var t1 = new $._StringBufferImpl(null, null); | |
| 4578 t1._StringBufferImpl$1(content); | |
| 4579 return t1; | |
| 4580 }; | |
| 4581 | |
| 4582 $.Events$ = function(_ptr) { | |
| 4583 return new $.Events(_ptr); | |
| 4584 }; | |
| 4585 | |
| 4586 $.EventListenerList$ = function(_ptr, _type) { | |
| 4587 return new $.EventListenerList(_ptr, _type); | |
| 4588 }; | |
| 4589 | |
| 4590 $.WindowEvents$ = function(_ptr) { | |
| 4591 return new $.WindowEvents(_ptr); | |
| 4592 }; | |
| 4593 | |
| 4594 $._convertNativeToDart_Window = function(win) { | |
| 4595 return $._DOMWindowCrossFrame__createSafe(win); | |
| 4596 }; | |
| 4597 | |
| 4598 $._DOMWindowCrossFrame$ = function(_window) { | |
| 4599 return new $._DOMWindowCrossFrame(_window); | |
| 4600 }; | |
| 4601 | |
| 4602 $._DOMWindowCrossFrame__createSafe = function(w) { | |
| 4603 var t1 = window; | |
| 4604 if (w == null ? t1 == null : w === t1) | |
| 4605 return w; | |
| 4606 else | |
| 4607 return $._DOMWindowCrossFrame$(w); | |
| 4608 }; | |
| 4609 | |
| 4610 $.FixedSizeListIterator$ = function(array) { | |
| 4611 return new $.FixedSizeListIterator(array, $.length(array), -1, null); | |
| 4612 }; | |
| 4613 | |
| 4614 $.convertNativeToDart_SerializedScriptValue = function(object) { | |
| 4615 return $.convertNativeToDart_AcceptStructuredClone(object, true); | |
| 4616 }; | |
| 4617 | |
| 4618 $._convertDartToNative_PrepareForStructuredClone = function(value) { | |
| 4619 var copies, t1, t2, t3, t4, copy; | |
| 4620 copies = []; | |
| 4621 t1 = new $._convertDartToNative_PrepareForStructuredClone_findSlot([], copies) ; | |
| 4622 t2 = new $._convertDartToNative_PrepareForStructuredClone_readSlot(copies); | |
| 4623 t3 = new $._convertDartToNative_PrepareForStructuredClone_writeSlot(copies); | |
| 4624 t4 = new $._convertDartToNative_PrepareForStructuredClone_cleanupSlots(); | |
| 4625 copy = new $._convertDartToNative_PrepareForStructuredClone_walk(t1, t2, t3).c all$1(value); | |
| 4626 t4.call$0(); | |
| 4627 return copy; | |
| 4628 }; | |
| 4629 | |
| 4630 $.convertNativeToDart_AcceptStructuredClone = function(object, mustCopy) { | |
| 4631 var copies = []; | |
| 4632 return new $.convertNativeToDart_AcceptStructuredClone_walk(mustCopy, new $.co nvertNativeToDart_AcceptStructuredClone_findSlot([], copies), new $.convertNativ eToDart_AcceptStructuredClone_readSlot(copies), new $.convertNativeToDart_Accept StructuredClone_writeSlot(copies)).call$1(object); | |
| 4633 }; | |
| 4634 | |
| 4635 $.Lists_indexOf = function(a, element, startIndex, endIndex) { | |
| 4636 var i; | |
| 4637 if (typeof a !== "string" && (typeof a !== "object" || a === null || a.constru ctor !== Array && !a.$isJavaScriptIndexingBehavior())) | |
| 4638 return $.Lists_indexOf$bailout(1, a, element, startIndex, endIndex); | |
| 4639 if (typeof startIndex !== "number") | |
| 4640 return $.Lists_indexOf$bailout(1, a, element, startIndex, endIndex); | |
| 4641 if (typeof endIndex !== "number") | |
| 4642 return $.Lists_indexOf$bailout(1, a, element, startIndex, endIndex); | |
| 4643 if (startIndex >= a.length) | |
| 4644 return -1; | |
| 4645 if (startIndex < 0) | |
| 4646 startIndex = 0; | |
| 4647 for (i = startIndex; i < endIndex; ++i) { | |
| 4648 if (i !== (i | 0)) | |
| 4649 throw $.iae(i); | |
| 4650 if (i < 0 || i >= a.length) | |
| 4651 throw $.ioore(i); | |
| 4652 if ($.$$eq(a[i], element) === true) | |
| 4653 return i; | |
| 4654 } | |
| 4655 return -1; | |
| 4656 }; | |
| 4657 | |
| 4658 $.Lists_indexOf$bailout = function(state0, a, element, startIndex, endIndex) { | |
| 4659 var t1, t2, i; | |
| 4660 t1 = $.getInterceptor$JSStringJSArray(a); | |
| 4661 t2 = $.getInterceptor$JSNumber(startIndex); | |
| 4662 if (t2.$ge(startIndex, t1.get$length(a)) === true) | |
| 4663 return -1; | |
| 4664 if (t2.$lt(startIndex, 0) === true) | |
| 4665 startIndex = 0; | |
| 4666 for (i = startIndex; t2 = $.getInterceptor$JSNumber(i), t2.$lt(i, endIndex) == = true; i = t2.$add(i, 1)) | |
| 4667 if ($.$$eq(t1.$index(a, i), element) === true) | |
| 4668 return i; | |
| 4669 return -1; | |
| 4670 }; | |
| 4671 | |
| 4672 $.JsonUnsupportedObjectError$ = function(unsupportedObject) { | |
| 4673 return new $.JsonUnsupportedObjectError(unsupportedObject, null); | |
| 4674 }; | |
| 4675 | |
| 4676 $.JsonUnsupportedObjectError$withCause = function(unsupportedObject, cause) { | |
| 4677 return new $.JsonUnsupportedObjectError(unsupportedObject, cause); | |
| 4678 }; | |
| 4679 | |
| 4680 $._JsonStringifier$ = function(sb) { | |
| 4681 return new $._JsonStringifier(sb, []); | |
| 4682 }; | |
| 4683 | |
| 4684 $._JsonStringifier_stringify = function(object) { | |
| 4685 var output = $.StringBuffer_StringBuffer(""); | |
| 4686 $._JsonStringifier$(output).stringifyValue$1(object); | |
| 4687 return $.toString(output); | |
| 4688 }; | |
| 4689 | |
| 4690 $._JsonStringifier_escape = function(sb, s) { | |
| 4691 var t1, length, charCodes, needsEscape, i, charCode, t2, t3; | |
| 4692 t1 = $.getInterceptor$JSStringJSArray(s); | |
| 4693 length = t1.get$length(s); | |
| 4694 charCodes = $.List_List(0); | |
| 4695 for (needsEscape = false, i = 0; $.CONSTANT4.$lt(i, length); ++i) { | |
| 4696 charCode = t1.charCodeAt$1(s, i); | |
| 4697 t2 = $.getInterceptor$JSNumber(charCode); | |
| 4698 if (t2.$lt(charCode, 32) === true) { | |
| 4699 charCodes.push(92); | |
| 4700 switch (charCode) { | |
| 4701 case 8: | |
| 4702 charCodes.push(98); | |
| 4703 break; | |
| 4704 case 9: | |
| 4705 charCodes.push(116); | |
| 4706 break; | |
| 4707 case 10: | |
| 4708 charCodes.push(110); | |
| 4709 break; | |
| 4710 case 12: | |
| 4711 charCodes.push(102); | |
| 4712 break; | |
| 4713 case 13: | |
| 4714 charCodes.push(114); | |
| 4715 break; | |
| 4716 default: | |
| 4717 charCodes.push(117); | |
| 4718 t3 = $.$$and(t2.$shr(charCode, 12), 15); | |
| 4719 if ($.$$lt(t3, 10) === true) { | |
| 4720 if (typeof t3 !== "number") | |
| 4721 throw $.iae(t3); | |
| 4722 t3 = 48 + t3; | |
| 4723 } else { | |
| 4724 if (typeof t3 !== "number") | |
| 4725 throw $.iae(t3); | |
| 4726 t3 = 87 + t3; | |
| 4727 } | |
| 4728 charCodes.push(t3); | |
| 4729 t3 = $.$$and(t2.$shr(charCode, 8), 15); | |
| 4730 if ($.$$lt(t3, 10) === true) { | |
| 4731 if (typeof t3 !== "number") | |
| 4732 throw $.iae(t3); | |
| 4733 t3 = 48 + t3; | |
| 4734 } else { | |
| 4735 if (typeof t3 !== "number") | |
| 4736 throw $.iae(t3); | |
| 4737 t3 = 87 + t3; | |
| 4738 } | |
| 4739 charCodes.push(t3); | |
| 4740 t3 = $.$$and(t2.$shr(charCode, 4), 15); | |
| 4741 if ($.$$lt(t3, 10) === true) { | |
| 4742 if (typeof t3 !== "number") | |
| 4743 throw $.iae(t3); | |
| 4744 t3 = 48 + t3; | |
| 4745 } else { | |
| 4746 if (typeof t3 !== "number") | |
| 4747 throw $.iae(t3); | |
| 4748 t3 = 87 + t3; | |
| 4749 } | |
| 4750 charCodes.push(t3); | |
| 4751 t2 = t2.$and(charCode, 15); | |
| 4752 if ($.$$lt(t2, 10) === true) { | |
| 4753 if (typeof t2 !== "number") | |
| 4754 throw $.iae(t2); | |
| 4755 t2 = 48 + t2; | |
| 4756 } else { | |
| 4757 if (typeof t2 !== "number") | |
| 4758 throw $.iae(t2); | |
| 4759 t2 = 87 + t2; | |
| 4760 } | |
| 4761 charCodes.push(t2); | |
| 4762 break; | |
| 4763 } | |
| 4764 needsEscape = true; | |
| 4765 } else if (t2.$eq(charCode, 34) === true || t2.$eq(charCode, 92) === true) { | |
| 4766 charCodes.push(92); | |
| 4767 charCodes.push(charCode); | |
| 4768 needsEscape = true; | |
| 4769 } else | |
| 4770 charCodes.push(charCode); | |
| 4771 } | |
| 4772 $.add(sb, needsEscape ? $.String_String$fromCharCodes(charCodes) : s); | |
| 4773 }; | |
| 4774 | |
| 4775 $.sqrt = function(x) { | |
| 4776 return Math.sqrt($.checkNum(x)); | |
| 4777 }; | |
| 4778 | |
| 4779 $.main = function() { | |
| 4780 $.Suite$(window, "dom-nothing").prep$1(new $.main_anon()).test$2("no-op", new $.main_anon0()).end$0(); | |
| 4781 }; | |
| 4782 | |
| 4783 $.typeNameInChrome.call$1 = $.typeNameInChrome; | |
| 4784 $.typeNameInChrome.$name = "typeNameInChrome"; | |
| 4785 $.$$throw.call$1 = $.$$throw; | |
| 4786 $.$$throw.$name = "$$throw"; | |
| 4787 $.Comparable_compare.call$2 = $.Comparable_compare; | |
| 4788 $.Comparable_compare.$name = "Comparable_compare"; | |
| 4789 $.typeNameInOpera.call$1 = $.typeNameInOpera; | |
| 4790 $.typeNameInOpera.$name = "typeNameInOpera"; | |
| 4791 $.DartError_toStringWrapper.call$0 = $.DartError_toStringWrapper; | |
| 4792 $.DartError_toStringWrapper.$name = "DartError_toStringWrapper"; | |
| 4793 $.typeNameInFirefox.call$1 = $.typeNameInFirefox; | |
| 4794 $.typeNameInFirefox.$name = "typeNameInFirefox"; | |
| 4795 $.typeNameInIE.call$1 = $.typeNameInIE; | |
| 4796 $.typeNameInIE.$name = "typeNameInIE"; | |
| 4797 $.typeNameInSafari.call$1 = $.typeNameInSafari; | |
| 4798 $.typeNameInSafari.$name = "typeNameInSafari"; | |
| 4799 $.dynamicBind.call$4 = $.dynamicBind; | |
| 4800 $.dynamicBind.$name = "dynamicBind"; | |
| 4801 $.constructorNameFallback.call$1 = $.constructorNameFallback; | |
| 4802 $.constructorNameFallback.$name = "constructorNameFallback"; | |
| 4803 $.invokeClosure.call$5 = $.invokeClosure; | |
| 4804 $.invokeClosure.$name = "invokeClosure"; | |
| 4805 Isolate.$finishClasses($$); | |
| 4806 $$ = {}; | |
| 4807 $.num = {builtin$cls: 'num'}; | |
| 4808 $.Match = {builtin$cls: 'Match'}; | |
| 4809 $.$int = {builtin$cls: '$int'}; | |
| 4810 $.$double = {builtin$cls: '$double'}; | |
| 4811 $.String = {builtin$cls: 'String'}; | |
| 4812 $.CONSTANT5 = new Isolate.$isolateProperties.Object(); | |
| 4813 $.CONSTANT = new Isolate.$isolateProperties.NullThrownError(); | |
| 4814 $.CONSTANT0 = new Isolate.$isolateProperties.JSArray(); | |
| 4815 $.CONSTANT2 = new Isolate.$isolateProperties.JSNumber(); | |
| 4816 $.CONSTANT4 = new Isolate.$isolateProperties.JSInt(); | |
| 4817 $.CONSTANT1 = new Isolate.$isolateProperties.JSString(); | |
| 4818 $.CONSTANT3 = new Isolate.$isolateProperties._DeletedKeySentinel(); | |
| 4819 $._HashMapImpl__DELETED_KEY = Isolate.$isolateProperties.CONSTANT3; | |
| 4820 $._HashMapImpl__INITIAL_CAPACITY = 8; | |
| 4821 $.Primitives_hashCodeSeed = 0; | |
| 4822 $.Suite__N_RUNS = 5; | |
| 4823 $.Primitives_DOLLAR_CHAR_VALUE = 36; | |
| 4824 $.JsonParser_BACKSPACE = 8; | |
| 4825 $.JsonParser_TAB = 9; | |
| 4826 $.JsonParser_NEWLINE = 10; | |
| 4827 $.JsonParser_CARRIAGE_RETURN = 13; | |
| 4828 $.JsonParser_FORM_FEED = 12; | |
| 4829 $._Sort__INSERTION_SORT_THRESHOLD = 32; | |
| 4830 $.JsonParser_QUOTE = 34; | |
| 4831 $.Result_T_DISTRIBUTION = 2.776; | |
| 4832 $.JsonParser_BACKSLASH = 92; | |
| 4833 $.DateTime__MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000; | |
| 4834 $.JsonParser_CHAR_b = 98; | |
| 4835 $.JsonParser_CHAR_f = 102; | |
| 4836 $.JsonParser_CHAR_n = 110; | |
| 4837 $._getTypeNameOf = null; | |
| 4838 $.JsonParser_CHAR_r = 114; | |
| 4839 $.JsonParser_CHAR_t = 116; | |
| 4840 $.JsonParser_CHAR_u = 117; | |
| 4841 $.toString = function(receiver) { | |
| 4842 return $.getInterceptor(receiver).toString$0(receiver); | |
| 4843 }; | |
| 4844 $.$$eq = function(receiver, a0) { | |
| 4845 return $.getInterceptor(receiver).$eq(receiver, a0); | |
| 4846 }; | |
| 4847 $.$$indexSet = function(receiver, a0, a1) { | |
| 4848 return $.getInterceptor$JSArray(receiver).$indexSet(receiver, a0, a1); | |
| 4849 }; | |
| 4850 $.iterator = function(receiver) { | |
| 4851 return $.getInterceptor$JSArray(receiver).get$iterator(receiver); | |
| 4852 }; | |
| 4853 $.$$gt = function(receiver, a0) { | |
| 4854 return $.getInterceptor$JSNumber(receiver).$gt(receiver, a0); | |
| 4855 }; | |
| 4856 $.replaceAll = function(receiver, a0, a1) { | |
| 4857 return $.getInterceptor$JSString(receiver).replaceAll$2(receiver, a0, a1); | |
| 4858 }; | |
| 4859 $.length = function(receiver) { | |
| 4860 return $.getInterceptor$JSStringJSArray(receiver).get$length(receiver); | |
| 4861 }; | |
| 4862 $.$$lt = function(receiver, a0) { | |
| 4863 return $.getInterceptor$JSNumber(receiver).$lt(receiver, a0); | |
| 4864 }; | |
| 4865 $.$$tdiv = function(receiver, a0) { | |
| 4866 return $.getInterceptor$JSNumber(receiver).$tdiv(receiver, a0); | |
| 4867 }; | |
| 4868 $.clear = function(receiver) { | |
| 4869 return $.getInterceptor$JSArray(receiver).clear$0(receiver); | |
| 4870 }; | |
| 4871 $.$$and = function(receiver, a0) { | |
| 4872 return $.getInterceptor$JSNumber(receiver).$and(receiver, a0); | |
| 4873 }; | |
| 4874 $.abs = function(receiver) { | |
| 4875 return $.getInterceptor$JSNumber(receiver).abs$0(receiver); | |
| 4876 }; | |
| 4877 $.toSet = function(receiver) { | |
| 4878 return $.getInterceptor$JSArray(receiver).toSet$0(receiver); | |
| 4879 }; | |
| 4880 $.add = function(receiver, a0) { | |
| 4881 return $.getInterceptor$JSArray(receiver).add$1(receiver, a0); | |
| 4882 }; | |
| 4883 $.sort = function(receiver, a0) { | |
| 4884 return $.getInterceptor$JSArray(receiver).sort$1(receiver, a0); | |
| 4885 }; | |
| 4886 $.contains = function(receiver) { | |
| 4887 return $.getInterceptor$JSStringJSArray(receiver).get$contains(receiver); | |
| 4888 }; | |
| 4889 $.$$mul = function(receiver, a0) { | |
| 4890 return $.getInterceptor$JSNumber(receiver).$mul(receiver, a0); | |
| 4891 }; | |
| 4892 $.addLast = function(receiver, a0) { | |
| 4893 return $.getInterceptor$JSArray(receiver).addLast$1(receiver, a0); | |
| 4894 }; | |
| 4895 $.$$sub = function(receiver, a0) { | |
| 4896 return $.getInterceptor$JSNumber(receiver).$sub(receiver, a0); | |
| 4897 }; | |
| 4898 $.allMatches = function(receiver, a0) { | |
| 4899 return $.getInterceptor$JSString(receiver).allMatches$1(receiver, a0); | |
| 4900 }; | |
| 4901 $.hashCode = function(receiver) { | |
| 4902 return $.getInterceptor(receiver).get$hashCode(receiver); | |
| 4903 }; | |
| 4904 $.$$add = function(receiver, a0) { | |
| 4905 return $.getInterceptor$JSNumber(receiver).$add(receiver, a0); | |
| 4906 }; | |
| 4907 $.compareTo = function(receiver, a0) { | |
| 4908 return $.getInterceptor$JSStringJSNumber(receiver).compareTo$1(receiver, a0); | |
| 4909 }; | |
| 4910 $.$$ge = function(receiver, a0) { | |
| 4911 return $.getInterceptor$JSNumber(receiver).$ge(receiver, a0); | |
| 4912 }; | |
| 4913 $.removeMatching = function(receiver, a0) { | |
| 4914 return $.getInterceptor$JSArray(receiver).removeMatching$1(receiver, a0); | |
| 4915 }; | |
| 4916 $.isEmpty = function(receiver) { | |
| 4917 return $.getInterceptor$JSStringJSArray(receiver).get$isEmpty(receiver); | |
| 4918 }; | |
| 4919 $.$$index = function(receiver, a0) { | |
| 4920 return $.getInterceptor$JSStringJSArray(receiver).$index(receiver, a0); | |
| 4921 }; | |
| 4922 $.removeLast = function(receiver) { | |
| 4923 return $.getInterceptor$JSArray(receiver).removeLast$0(receiver); | |
| 4924 }; | |
| 4925 $.remove = function(receiver, a0) { | |
| 4926 return $.getInterceptor$JSArray(receiver).remove$1(receiver, a0); | |
| 4927 }; | |
| 4928 $.forEach = function(receiver, a0) { | |
| 4929 return $.getInterceptor$JSArray(receiver).forEach$1(receiver, a0); | |
| 4930 }; | |
| 4931 $.$$div = function(receiver, a0) { | |
| 4932 return $.getInterceptor$JSNumber(receiver).$div(receiver, a0); | |
| 4933 }; | |
| 4934 $.getInterceptor$JSStringJSArray = function(receiver) { | |
| 4935 if (typeof receiver == "string") | |
| 4936 return $.JSString.prototype; | |
| 4937 if (receiver == null) | |
| 4938 return void 0; | |
| 4939 if (receiver.constructor == Array) | |
| 4940 return $.JSArray.prototype; | |
| 4941 return $.ObjectInterceptor.prototype; | |
| 4942 }; | |
| 4943 $.getInterceptor$JSStringJSNumber = function(receiver) { | |
| 4944 if (typeof receiver == "number") | |
| 4945 return $.JSNumber.prototype; | |
| 4946 if (typeof receiver == "string") | |
| 4947 return $.JSString.prototype; | |
| 4948 if (receiver == null) | |
| 4949 return void 0; | |
| 4950 return $.ObjectInterceptor.prototype; | |
| 4951 }; | |
| 4952 $.getInterceptor$JSString = function(receiver) { | |
| 4953 if (typeof receiver == "string") | |
| 4954 return $.JSString.prototype; | |
| 4955 if (receiver == null) | |
| 4956 return void 0; | |
| 4957 return $.ObjectInterceptor.prototype; | |
| 4958 }; | |
| 4959 $.getInterceptor$JSNumber = function(receiver) { | |
| 4960 if (typeof receiver == "number") | |
| 4961 return $.JSNumber.prototype; | |
| 4962 if (receiver == null) | |
| 4963 return void 0; | |
| 4964 return $.ObjectInterceptor.prototype; | |
| 4965 }; | |
| 4966 $.getInterceptor = function(receiver) { | |
| 4967 if (typeof receiver == "number") { | |
| 4968 if (Math.floor(receiver) == receiver) | |
| 4969 return $.JSInt.prototype; | |
| 4970 return $.JSDouble.prototype; | |
| 4971 } | |
| 4972 if (typeof receiver == "string") | |
| 4973 return $.JSString.prototype; | |
| 4974 if (receiver == null) | |
| 4975 return $.JSNull.prototype; | |
| 4976 if (typeof receiver == "function") | |
| 4977 return $.JSFunction.prototype; | |
| 4978 if (typeof receiver == "boolean") | |
| 4979 return $.JSBool.prototype; | |
| 4980 if (receiver.constructor == Array) | |
| 4981 return $.JSArray.prototype; | |
| 4982 return $.ObjectInterceptor.prototype; | |
| 4983 }; | |
| 4984 $.getInterceptor$JSArray = function(receiver) { | |
| 4985 if (receiver == null) | |
| 4986 return void 0; | |
| 4987 if (receiver.constructor == Array) | |
| 4988 return $.JSArray.prototype; | |
| 4989 return $.ObjectInterceptor.prototype; | |
| 4990 }; | |
| 4991 Isolate.$lazy($, "quoteRegExp", "quoteRegExp", "get$quoteRegExp", function() { | |
| 4992 return $.JSSyntaxRegExp$("[-[\\]{}()*+?.,\\\\^$|#\\s]", true, false); | |
| 4993 }); | |
| 4994 var $ = null; | |
| 4995 Isolate.$finishClasses($$); | |
| 4996 $$ = {}; | |
| 4997 Isolate = Isolate.$finishIsolateConstructor(Isolate); | |
| 4998 var $ = new Isolate(); | |
| 4999 $.$defineNativeClass = function(cls, desc) { | |
| 5000 var fields = desc['']; | |
| 5001 var fields_array = fields ? fields.split(',') : []; | |
| 5002 for (var i = 0; i < fields_array.length; i++) { | |
| 5003 $.$generateAccessor(fields_array[i], desc); | |
| 5004 } | |
| 5005 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 5006 for (var method in desc) { | |
| 5007 if (method) { if (hasOwnProperty.call(desc, method)) { | |
| 5008 $.dynamicFunction(method)[cls] = desc[method]; | |
| 5009 } | |
| 5010 } | |
| 5011 } | |
| 5012 }; | |
| 5013 | |
| 5014 (function(table) { | |
| 5015 for (var key in table) | |
| 5016 $.defineProperty(Object.prototype, key, table[key]); | |
| 5017 })({ | |
| 5018 $isJavaScriptIndexingBehavior: function() { | |
| 5019 return false; | |
| 5020 }, | |
| 5021 $isCollection: function() { | |
| 5022 return false; | |
| 5023 }, | |
| 5024 $isList: function() { | |
| 5025 return false; | |
| 5026 }, | |
| 5027 $isArrayBuffer: function() { | |
| 5028 return false; | |
| 5029 }, | |
| 5030 $isArrayBufferView: function() { | |
| 5031 return false; | |
| 5032 }, | |
| 5033 $isBlob: function() { | |
| 5034 return false; | |
| 5035 }, | |
| 5036 $isFile: function() { | |
| 5037 return false; | |
| 5038 }, | |
| 5039 $isFileList: function() { | |
| 5040 return false; | |
| 5041 }, | |
| 5042 $isImageData: function() { | |
| 5043 return false; | |
| 5044 }, | |
| 5045 toString$0: function() { | |
| 5046 return $.toStringForNativeObject(this); | |
| 5047 }, | |
| 5048 get$hashCode: function() { | |
| 5049 return $.hashCodeForNativeObject(this); | |
| 5050 }, | |
| 5051 $eq: function(a) { | |
| 5052 return this === a; | |
| 5053 } | |
| 5054 }); | |
| 5055 | |
| 5056 $.$defineNativeClass("ArrayBuffer", { | |
| 5057 $isArrayBuffer: function() { | |
| 5058 return true; | |
| 5059 } | |
| 5060 }); | |
| 5061 | |
| 5062 $.$defineNativeClass("ArrayBufferView", { | |
| 5063 $isArrayBufferView: function() { | |
| 5064 return true; | |
| 5065 } | |
| 5066 }); | |
| 5067 | |
| 5068 $.$defineNativeClass("Blob", { | |
| 5069 $isBlob: function() { | |
| 5070 return true; | |
| 5071 } | |
| 5072 }); | |
| 5073 | |
| 5074 $.$defineNativeClass("CompositionEvent", {"": "data>"}); | |
| 5075 | |
| 5076 $.$defineNativeClass("DOMException", {"": "message>", | |
| 5077 toString$0: function() { | |
| 5078 return this.toString(); | |
| 5079 } | |
| 5080 }); | |
| 5081 | |
| 5082 $.$defineNativeClass("ErrorEvent", {"": "message>"}); | |
| 5083 | |
| 5084 $.$defineNativeClass("EventException", {"": "message>", | |
| 5085 toString$0: function() { | |
| 5086 return this.toString(); | |
| 5087 } | |
| 5088 }); | |
| 5089 | |
| 5090 $.$defineNativeClass("EventTarget", { | |
| 5091 get$on: function() { | |
| 5092 if (Object.getPrototypeOf(this).hasOwnProperty("get$on")) { | |
| 5093 return $.Events$(this); | |
| 5094 } else | |
| 5095 return Object.prototype.get$on.call(this); | |
| 5096 }, | |
| 5097 $$dom_addEventListener$3: function(type, listener, useCapture) { | |
| 5098 if (Object.getPrototypeOf(this).hasOwnProperty("$$dom_addEventListener$3")) { | |
| 5099 return this.addEventListener(type,$.convertDartClosureToJS(listener, 1),us eCapture); | |
| 5100 } else | |
| 5101 return Object.prototype.$$dom_addEventListener$3.call(this, type, listener , useCapture); | |
| 5102 }, | |
| 5103 $$dom_removeEventListener$3: function(type, listener, useCapture) { | |
| 5104 if (Object.getPrototypeOf(this).hasOwnProperty("$$dom_removeEventListener$3" )) { | |
| 5105 return this.removeEventListener(type,$.convertDartClosureToJS(listener, 1) ,useCapture); | |
| 5106 } else | |
| 5107 return Object.prototype.$$dom_removeEventListener$3.call(this, type, liste ner, useCapture); | |
| 5108 } | |
| 5109 }); | |
| 5110 | |
| 5111 $.$defineNativeClass("File", { | |
| 5112 $isFile: function() { | |
| 5113 return true; | |
| 5114 } | |
| 5115 }); | |
| 5116 | |
| 5117 $.$defineNativeClass("FileException", {"": "message>", | |
| 5118 toString$0: function() { | |
| 5119 return this.toString(); | |
| 5120 } | |
| 5121 }); | |
| 5122 | |
| 5123 $.$defineNativeClass("Float32Array", { | |
| 5124 get$length: function() { | |
| 5125 return this.length; | |
| 5126 }, | |
| 5127 $index: function(index) { | |
| 5128 return this[index]; | |
| 5129 }, | |
| 5130 $indexSet: function(index, value) { | |
| 5131 this[index] = value; | |
| 5132 }, | |
| 5133 get$iterator: function() { | |
| 5134 return $.FixedSizeListIterator$(this); | |
| 5135 }, | |
| 5136 contains$1: function(element) { | |
| 5137 return $.IterableMixinWorkaround_contains(this, element); | |
| 5138 }, | |
| 5139 get$contains: function() { | |
| 5140 return new $.BoundClosure(this, "contains$1"); | |
| 5141 }, | |
| 5142 forEach$1: function(f) { | |
| 5143 var t1; | |
| 5144 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5145 f.call$1(t1.get$current()); | |
| 5146 return; | |
| 5147 }, | |
| 5148 toSet$0: function() { | |
| 5149 return $.Set_Set$from(this); | |
| 5150 }, | |
| 5151 get$isEmpty: function() { | |
| 5152 return $.$$eq($.length(this), 0); | |
| 5153 }, | |
| 5154 add$1: function(value) { | |
| 5155 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5156 }, | |
| 5157 addLast$1: function(value) { | |
| 5158 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5159 }, | |
| 5160 set$length: function(value) { | |
| 5161 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5162 }, | |
| 5163 clear$0: function() { | |
| 5164 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5165 }, | |
| 5166 sort$1: function(compare) { | |
| 5167 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5168 }, | |
| 5169 indexOf$2: function(element, start) { | |
| 5170 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5171 }, | |
| 5172 removeLast$0: function() { | |
| 5173 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5174 }, | |
| 5175 remove$1: function(object) { | |
| 5176 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5177 }, | |
| 5178 removeAll$1: function(elements) { | |
| 5179 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5180 }, | |
| 5181 removeMatching$1: function(test) { | |
| 5182 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5183 }, | |
| 5184 $isList: function() { | |
| 5185 return true; | |
| 5186 }, | |
| 5187 $isCollection: function() { | |
| 5188 return true; | |
| 5189 }, | |
| 5190 $isJavaScriptIndexingBehavior: function() { | |
| 5191 return true; | |
| 5192 } | |
| 5193 }); | |
| 5194 | |
| 5195 $.$defineNativeClass("Float64Array", { | |
| 5196 get$length: function() { | |
| 5197 return this.length; | |
| 5198 }, | |
| 5199 $index: function(index) { | |
| 5200 return this[index]; | |
| 5201 }, | |
| 5202 $indexSet: function(index, value) { | |
| 5203 this[index] = value; | |
| 5204 }, | |
| 5205 get$iterator: function() { | |
| 5206 return $.FixedSizeListIterator$(this); | |
| 5207 }, | |
| 5208 contains$1: function(element) { | |
| 5209 return $.IterableMixinWorkaround_contains(this, element); | |
| 5210 }, | |
| 5211 get$contains: function() { | |
| 5212 return new $.BoundClosure(this, "contains$1"); | |
| 5213 }, | |
| 5214 forEach$1: function(f) { | |
| 5215 var t1; | |
| 5216 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5217 f.call$1(t1.get$current()); | |
| 5218 return; | |
| 5219 }, | |
| 5220 toSet$0: function() { | |
| 5221 return $.Set_Set$from(this); | |
| 5222 }, | |
| 5223 get$isEmpty: function() { | |
| 5224 return $.$$eq($.length(this), 0); | |
| 5225 }, | |
| 5226 add$1: function(value) { | |
| 5227 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5228 }, | |
| 5229 addLast$1: function(value) { | |
| 5230 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5231 }, | |
| 5232 set$length: function(value) { | |
| 5233 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5234 }, | |
| 5235 clear$0: function() { | |
| 5236 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5237 }, | |
| 5238 sort$1: function(compare) { | |
| 5239 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5240 }, | |
| 5241 indexOf$2: function(element, start) { | |
| 5242 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5243 }, | |
| 5244 removeLast$0: function() { | |
| 5245 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5246 }, | |
| 5247 remove$1: function(object) { | |
| 5248 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5249 }, | |
| 5250 removeAll$1: function(elements) { | |
| 5251 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5252 }, | |
| 5253 removeMatching$1: function(test) { | |
| 5254 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5255 }, | |
| 5256 $isList: function() { | |
| 5257 return true; | |
| 5258 }, | |
| 5259 $isCollection: function() { | |
| 5260 return true; | |
| 5261 }, | |
| 5262 $isJavaScriptIndexingBehavior: function() { | |
| 5263 return true; | |
| 5264 } | |
| 5265 }); | |
| 5266 | |
| 5267 $.$defineNativeClass("XMLHttpRequestException", {"": "message>", | |
| 5268 toString$0: function() { | |
| 5269 return this.toString(); | |
| 5270 } | |
| 5271 }); | |
| 5272 | |
| 5273 $.$defineNativeClass("Int16Array", { | |
| 5274 get$length: function() { | |
| 5275 return this.length; | |
| 5276 }, | |
| 5277 $index: function(index) { | |
| 5278 return this[index]; | |
| 5279 }, | |
| 5280 $indexSet: function(index, value) { | |
| 5281 this[index] = value; | |
| 5282 }, | |
| 5283 get$iterator: function() { | |
| 5284 return $.FixedSizeListIterator$(this); | |
| 5285 }, | |
| 5286 contains$1: function(element) { | |
| 5287 return $.IterableMixinWorkaround_contains(this, element); | |
| 5288 }, | |
| 5289 get$contains: function() { | |
| 5290 return new $.BoundClosure(this, "contains$1"); | |
| 5291 }, | |
| 5292 forEach$1: function(f) { | |
| 5293 var t1; | |
| 5294 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5295 f.call$1(t1.get$current()); | |
| 5296 return; | |
| 5297 }, | |
| 5298 toSet$0: function() { | |
| 5299 return $.Set_Set$from(this); | |
| 5300 }, | |
| 5301 get$isEmpty: function() { | |
| 5302 return $.$$eq($.length(this), 0); | |
| 5303 }, | |
| 5304 add$1: function(value) { | |
| 5305 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5306 }, | |
| 5307 addLast$1: function(value) { | |
| 5308 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5309 }, | |
| 5310 set$length: function(value) { | |
| 5311 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5312 }, | |
| 5313 clear$0: function() { | |
| 5314 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5315 }, | |
| 5316 sort$1: function(compare) { | |
| 5317 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5318 }, | |
| 5319 indexOf$2: function(element, start) { | |
| 5320 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5321 }, | |
| 5322 removeLast$0: function() { | |
| 5323 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5324 }, | |
| 5325 remove$1: function(object) { | |
| 5326 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5327 }, | |
| 5328 removeAll$1: function(elements) { | |
| 5329 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5330 }, | |
| 5331 removeMatching$1: function(test) { | |
| 5332 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5333 }, | |
| 5334 $isList: function() { | |
| 5335 return true; | |
| 5336 }, | |
| 5337 $isCollection: function() { | |
| 5338 return true; | |
| 5339 }, | |
| 5340 $isJavaScriptIndexingBehavior: function() { | |
| 5341 return true; | |
| 5342 } | |
| 5343 }); | |
| 5344 | |
| 5345 $.$defineNativeClass("Int32Array", { | |
| 5346 get$length: function() { | |
| 5347 return this.length; | |
| 5348 }, | |
| 5349 $index: function(index) { | |
| 5350 return this[index]; | |
| 5351 }, | |
| 5352 $indexSet: function(index, value) { | |
| 5353 this[index] = value; | |
| 5354 }, | |
| 5355 get$iterator: function() { | |
| 5356 return $.FixedSizeListIterator$(this); | |
| 5357 }, | |
| 5358 contains$1: function(element) { | |
| 5359 return $.IterableMixinWorkaround_contains(this, element); | |
| 5360 }, | |
| 5361 get$contains: function() { | |
| 5362 return new $.BoundClosure(this, "contains$1"); | |
| 5363 }, | |
| 5364 forEach$1: function(f) { | |
| 5365 var t1; | |
| 5366 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5367 f.call$1(t1.get$current()); | |
| 5368 return; | |
| 5369 }, | |
| 5370 toSet$0: function() { | |
| 5371 return $.Set_Set$from(this); | |
| 5372 }, | |
| 5373 get$isEmpty: function() { | |
| 5374 return $.$$eq($.length(this), 0); | |
| 5375 }, | |
| 5376 add$1: function(value) { | |
| 5377 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5378 }, | |
| 5379 addLast$1: function(value) { | |
| 5380 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5381 }, | |
| 5382 set$length: function(value) { | |
| 5383 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5384 }, | |
| 5385 clear$0: function() { | |
| 5386 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5387 }, | |
| 5388 sort$1: function(compare) { | |
| 5389 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5390 }, | |
| 5391 indexOf$2: function(element, start) { | |
| 5392 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5393 }, | |
| 5394 removeLast$0: function() { | |
| 5395 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5396 }, | |
| 5397 remove$1: function(object) { | |
| 5398 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5399 }, | |
| 5400 removeAll$1: function(elements) { | |
| 5401 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5402 }, | |
| 5403 removeMatching$1: function(test) { | |
| 5404 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5405 }, | |
| 5406 $isList: function() { | |
| 5407 return true; | |
| 5408 }, | |
| 5409 $isCollection: function() { | |
| 5410 return true; | |
| 5411 }, | |
| 5412 $isJavaScriptIndexingBehavior: function() { | |
| 5413 return true; | |
| 5414 } | |
| 5415 }); | |
| 5416 | |
| 5417 $.$defineNativeClass("Int8Array", { | |
| 5418 get$length: function() { | |
| 5419 return this.length; | |
| 5420 }, | |
| 5421 $index: function(index) { | |
| 5422 return this[index]; | |
| 5423 }, | |
| 5424 $indexSet: function(index, value) { | |
| 5425 this[index] = value; | |
| 5426 }, | |
| 5427 get$iterator: function() { | |
| 5428 return $.FixedSizeListIterator$(this); | |
| 5429 }, | |
| 5430 contains$1: function(element) { | |
| 5431 return $.IterableMixinWorkaround_contains(this, element); | |
| 5432 }, | |
| 5433 get$contains: function() { | |
| 5434 return new $.BoundClosure(this, "contains$1"); | |
| 5435 }, | |
| 5436 forEach$1: function(f) { | |
| 5437 var t1; | |
| 5438 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5439 f.call$1(t1.get$current()); | |
| 5440 return; | |
| 5441 }, | |
| 5442 toSet$0: function() { | |
| 5443 return $.Set_Set$from(this); | |
| 5444 }, | |
| 5445 get$isEmpty: function() { | |
| 5446 return $.$$eq($.length(this), 0); | |
| 5447 }, | |
| 5448 add$1: function(value) { | |
| 5449 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5450 }, | |
| 5451 addLast$1: function(value) { | |
| 5452 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5453 }, | |
| 5454 set$length: function(value) { | |
| 5455 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5456 }, | |
| 5457 clear$0: function() { | |
| 5458 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5459 }, | |
| 5460 sort$1: function(compare) { | |
| 5461 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5462 }, | |
| 5463 indexOf$2: function(element, start) { | |
| 5464 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5465 }, | |
| 5466 removeLast$0: function() { | |
| 5467 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5468 }, | |
| 5469 remove$1: function(object) { | |
| 5470 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5471 }, | |
| 5472 removeAll$1: function(elements) { | |
| 5473 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5474 }, | |
| 5475 removeMatching$1: function(test) { | |
| 5476 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5477 }, | |
| 5478 $isList: function() { | |
| 5479 return true; | |
| 5480 }, | |
| 5481 $isCollection: function() { | |
| 5482 return true; | |
| 5483 }, | |
| 5484 $isJavaScriptIndexingBehavior: function() { | |
| 5485 return true; | |
| 5486 } | |
| 5487 }); | |
| 5488 | |
| 5489 $.$defineNativeClass("MediaKeyEvent", {"": "message>"}); | |
| 5490 | |
| 5491 $.$defineNativeClass("MessageEvent", { | |
| 5492 get$data: function() { | |
| 5493 return $.convertNativeToDart_SerializedScriptValue(this.data); | |
| 5494 } | |
| 5495 }); | |
| 5496 | |
| 5497 $.$defineNativeClass("PositionError", {"": "message>"}); | |
| 5498 | |
| 5499 $.$defineNativeClass("RangeException", {"": "message>", | |
| 5500 toString$0: function() { | |
| 5501 return this.toString(); | |
| 5502 } | |
| 5503 }); | |
| 5504 | |
| 5505 $.$defineNativeClass("SpeechRecognitionError", {"": "error>,message>"}); | |
| 5506 | |
| 5507 $.$defineNativeClass("SQLError", {"": "message>"}); | |
| 5508 | |
| 5509 $.$defineNativeClass("SQLException", {"": "message>"}); | |
| 5510 | |
| 5511 $.$defineNativeClass("StorageEvent", {"": "key>"}); | |
| 5512 | |
| 5513 $.$defineNativeClass("TextEvent", {"": "data>"}); | |
| 5514 | |
| 5515 $.$defineNativeClass("Uint16Array", { | |
| 5516 get$length: function() { | |
| 5517 return this.length; | |
| 5518 }, | |
| 5519 $index: function(index) { | |
| 5520 return this[index]; | |
| 5521 }, | |
| 5522 $indexSet: function(index, value) { | |
| 5523 this[index] = value; | |
| 5524 }, | |
| 5525 get$iterator: function() { | |
| 5526 return $.FixedSizeListIterator$(this); | |
| 5527 }, | |
| 5528 contains$1: function(element) { | |
| 5529 return $.IterableMixinWorkaround_contains(this, element); | |
| 5530 }, | |
| 5531 get$contains: function() { | |
| 5532 return new $.BoundClosure(this, "contains$1"); | |
| 5533 }, | |
| 5534 forEach$1: function(f) { | |
| 5535 var t1; | |
| 5536 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5537 f.call$1(t1.get$current()); | |
| 5538 return; | |
| 5539 }, | |
| 5540 toSet$0: function() { | |
| 5541 return $.Set_Set$from(this); | |
| 5542 }, | |
| 5543 get$isEmpty: function() { | |
| 5544 return $.$$eq($.length(this), 0); | |
| 5545 }, | |
| 5546 add$1: function(value) { | |
| 5547 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5548 }, | |
| 5549 addLast$1: function(value) { | |
| 5550 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5551 }, | |
| 5552 set$length: function(value) { | |
| 5553 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5554 }, | |
| 5555 clear$0: function() { | |
| 5556 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5557 }, | |
| 5558 sort$1: function(compare) { | |
| 5559 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5560 }, | |
| 5561 indexOf$2: function(element, start) { | |
| 5562 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5563 }, | |
| 5564 removeLast$0: function() { | |
| 5565 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5566 }, | |
| 5567 remove$1: function(object) { | |
| 5568 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5569 }, | |
| 5570 removeAll$1: function(elements) { | |
| 5571 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5572 }, | |
| 5573 removeMatching$1: function(test) { | |
| 5574 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5575 }, | |
| 5576 $isList: function() { | |
| 5577 return true; | |
| 5578 }, | |
| 5579 $isCollection: function() { | |
| 5580 return true; | |
| 5581 }, | |
| 5582 $isJavaScriptIndexingBehavior: function() { | |
| 5583 return true; | |
| 5584 } | |
| 5585 }); | |
| 5586 | |
| 5587 $.$defineNativeClass("Uint32Array", { | |
| 5588 get$length: function() { | |
| 5589 return this.length; | |
| 5590 }, | |
| 5591 $index: function(index) { | |
| 5592 return this[index]; | |
| 5593 }, | |
| 5594 $indexSet: function(index, value) { | |
| 5595 this[index] = value; | |
| 5596 }, | |
| 5597 get$iterator: function() { | |
| 5598 return $.FixedSizeListIterator$(this); | |
| 5599 }, | |
| 5600 contains$1: function(element) { | |
| 5601 return $.IterableMixinWorkaround_contains(this, element); | |
| 5602 }, | |
| 5603 get$contains: function() { | |
| 5604 return new $.BoundClosure(this, "contains$1"); | |
| 5605 }, | |
| 5606 forEach$1: function(f) { | |
| 5607 var t1; | |
| 5608 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5609 f.call$1(t1.get$current()); | |
| 5610 return; | |
| 5611 }, | |
| 5612 toSet$0: function() { | |
| 5613 return $.Set_Set$from(this); | |
| 5614 }, | |
| 5615 get$isEmpty: function() { | |
| 5616 return $.$$eq($.length(this), 0); | |
| 5617 }, | |
| 5618 add$1: function(value) { | |
| 5619 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5620 }, | |
| 5621 addLast$1: function(value) { | |
| 5622 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5623 }, | |
| 5624 set$length: function(value) { | |
| 5625 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5626 }, | |
| 5627 clear$0: function() { | |
| 5628 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5629 }, | |
| 5630 sort$1: function(compare) { | |
| 5631 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5632 }, | |
| 5633 indexOf$2: function(element, start) { | |
| 5634 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5635 }, | |
| 5636 removeLast$0: function() { | |
| 5637 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5638 }, | |
| 5639 remove$1: function(object) { | |
| 5640 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5641 }, | |
| 5642 removeAll$1: function(elements) { | |
| 5643 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5644 }, | |
| 5645 removeMatching$1: function(test) { | |
| 5646 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5647 }, | |
| 5648 $isList: function() { | |
| 5649 return true; | |
| 5650 }, | |
| 5651 $isCollection: function() { | |
| 5652 return true; | |
| 5653 }, | |
| 5654 $isJavaScriptIndexingBehavior: function() { | |
| 5655 return true; | |
| 5656 } | |
| 5657 }); | |
| 5658 | |
| 5659 $.$defineNativeClass("Uint8Array", { | |
| 5660 get$length: function() { | |
| 5661 if (Object.getPrototypeOf(this).hasOwnProperty("get$length")) { | |
| 5662 return this.length; | |
| 5663 } else | |
| 5664 return Object.prototype.get$length.call(this); | |
| 5665 }, | |
| 5666 $index: function(index) { | |
| 5667 if (Object.getPrototypeOf(this).hasOwnProperty("$index")) { | |
| 5668 return this[index]; | |
| 5669 } else | |
| 5670 return Object.prototype.$index.call(this, index); | |
| 5671 }, | |
| 5672 $indexSet: function(index, value) { | |
| 5673 if (Object.getPrototypeOf(this).hasOwnProperty("$indexSet")) { | |
| 5674 this[index] = value; | |
| 5675 } else | |
| 5676 return Object.prototype.$indexSet.call(this, index, value); | |
| 5677 }, | |
| 5678 get$iterator: function() { | |
| 5679 if (Object.getPrototypeOf(this).hasOwnProperty("get$iterator")) { | |
| 5680 return $.FixedSizeListIterator$(this); | |
| 5681 } else | |
| 5682 return Object.prototype.get$iterator.call(this); | |
| 5683 }, | |
| 5684 contains$1: function(element) { | |
| 5685 if (Object.getPrototypeOf(this).hasOwnProperty("contains$1")) { | |
| 5686 return $.IterableMixinWorkaround_contains(this, element); | |
| 5687 } else | |
| 5688 return Object.prototype.contains$1.call(this, element); | |
| 5689 }, | |
| 5690 get$contains: function() { | |
| 5691 return new $.BoundClosure(this, "contains$1"); | |
| 5692 }, | |
| 5693 forEach$1: function(f) { | |
| 5694 if (Object.getPrototypeOf(this).hasOwnProperty("forEach$1")) { | |
| 5695 var t1; | |
| 5696 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5697 f.call$1(t1.get$current()); | |
| 5698 return; | |
| 5699 } else | |
| 5700 return Object.prototype.forEach$1.call(this, f); | |
| 5701 }, | |
| 5702 toSet$0: function() { | |
| 5703 if (Object.getPrototypeOf(this).hasOwnProperty("toSet$0")) { | |
| 5704 return $.Set_Set$from(this); | |
| 5705 } else | |
| 5706 return Object.prototype.toSet$0.call(this); | |
| 5707 }, | |
| 5708 get$isEmpty: function() { | |
| 5709 if (Object.getPrototypeOf(this).hasOwnProperty("get$isEmpty")) { | |
| 5710 return $.$$eq($.length(this), 0); | |
| 5711 } else | |
| 5712 return Object.prototype.get$isEmpty.call(this); | |
| 5713 }, | |
| 5714 add$1: function(value) { | |
| 5715 if (Object.getPrototypeOf(this).hasOwnProperty("add$1")) { | |
| 5716 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5717 } else | |
| 5718 return Object.prototype.add$1.call(this, value); | |
| 5719 }, | |
| 5720 addLast$1: function(value) { | |
| 5721 if (Object.getPrototypeOf(this).hasOwnProperty("addLast$1")) { | |
| 5722 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5723 } else | |
| 5724 return Object.prototype.addLast$1.call(this, value); | |
| 5725 }, | |
| 5726 set$length: function(value) { | |
| 5727 if (Object.getPrototypeOf(this).hasOwnProperty("set$length")) { | |
| 5728 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5729 } else | |
| 5730 return Object.prototype.set$length.call(this, value); | |
| 5731 }, | |
| 5732 clear$0: function() { | |
| 5733 if (Object.getPrototypeOf(this).hasOwnProperty("clear$0")) { | |
| 5734 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5735 } else | |
| 5736 return Object.prototype.clear$0.call(this); | |
| 5737 }, | |
| 5738 sort$1: function(compare) { | |
| 5739 if (Object.getPrototypeOf(this).hasOwnProperty("sort$1")) { | |
| 5740 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5741 } else | |
| 5742 return Object.prototype.sort$1.call(this, compare); | |
| 5743 }, | |
| 5744 indexOf$2: function(element, start) { | |
| 5745 if (Object.getPrototypeOf(this).hasOwnProperty("indexOf$2")) { | |
| 5746 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5747 } else | |
| 5748 return Object.prototype.indexOf$2.call(this, element, start); | |
| 5749 }, | |
| 5750 removeLast$0: function() { | |
| 5751 if (Object.getPrototypeOf(this).hasOwnProperty("removeLast$0")) { | |
| 5752 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")) ; | |
| 5753 } else | |
| 5754 return Object.prototype.removeLast$0.call(this); | |
| 5755 }, | |
| 5756 remove$1: function(object) { | |
| 5757 if (Object.getPrototypeOf(this).hasOwnProperty("remove$1")) { | |
| 5758 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")) ; | |
| 5759 } else | |
| 5760 return Object.prototype.remove$1.call(this, object); | |
| 5761 }, | |
| 5762 removeAll$1: function(elements) { | |
| 5763 if (Object.getPrototypeOf(this).hasOwnProperty("removeAll$1")) { | |
| 5764 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")) ; | |
| 5765 } else | |
| 5766 return Object.prototype.removeAll$1.call(this, elements); | |
| 5767 }, | |
| 5768 removeMatching$1: function(test) { | |
| 5769 if (Object.getPrototypeOf(this).hasOwnProperty("removeMatching$1")) { | |
| 5770 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")) ; | |
| 5771 } else | |
| 5772 return Object.prototype.removeMatching$1.call(this, test); | |
| 5773 }, | |
| 5774 $isList: function() { | |
| 5775 return true; | |
| 5776 }, | |
| 5777 $isCollection: function() { | |
| 5778 return true; | |
| 5779 }, | |
| 5780 $isJavaScriptIndexingBehavior: function() { | |
| 5781 return true; | |
| 5782 } | |
| 5783 }); | |
| 5784 | |
| 5785 $.$defineNativeClass("Uint8ClampedArray", { | |
| 5786 $index: function(index) { | |
| 5787 return this[index]; | |
| 5788 }, | |
| 5789 $indexSet: function(index, value) { | |
| 5790 this[index] = value; | |
| 5791 }, | |
| 5792 get$iterator: function() { | |
| 5793 return $.FixedSizeListIterator$(this); | |
| 5794 }, | |
| 5795 contains$1: function(element) { | |
| 5796 return $.IterableMixinWorkaround_contains(this, element); | |
| 5797 }, | |
| 5798 get$contains: function() { | |
| 5799 return new $.BoundClosure(this, "contains$1"); | |
| 5800 }, | |
| 5801 forEach$1: function(f) { | |
| 5802 var t1; | |
| 5803 for (t1 = $.iterator(this); t1.moveNext$0() === true;) | |
| 5804 f.call$1(t1.get$current()); | |
| 5805 return; | |
| 5806 }, | |
| 5807 toSet$0: function() { | |
| 5808 return $.Set_Set$from(this); | |
| 5809 }, | |
| 5810 get$isEmpty: function() { | |
| 5811 return $.$$eq($.length(this), 0); | |
| 5812 }, | |
| 5813 add$1: function(value) { | |
| 5814 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5815 }, | |
| 5816 addLast$1: function(value) { | |
| 5817 throw $.$$throw($.UnsupportedError$("Cannot add to immutable List.")); | |
| 5818 }, | |
| 5819 set$length: function(value) { | |
| 5820 throw $.$$throw($.UnsupportedError$("Cannot resize immutable List.")); | |
| 5821 }, | |
| 5822 clear$0: function() { | |
| 5823 throw $.$$throw($.UnsupportedError$("Cannot clear immutable List.")); | |
| 5824 }, | |
| 5825 sort$1: function(compare) { | |
| 5826 throw $.$$throw($.UnsupportedError$("Cannot sort immutable List.")); | |
| 5827 }, | |
| 5828 indexOf$2: function(element, start) { | |
| 5829 return $.Lists_indexOf(this, element, start, $.length(this)); | |
| 5830 }, | |
| 5831 removeLast$0: function() { | |
| 5832 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5833 }, | |
| 5834 remove$1: function(object) { | |
| 5835 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5836 }, | |
| 5837 removeAll$1: function(elements) { | |
| 5838 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5839 }, | |
| 5840 removeMatching$1: function(test) { | |
| 5841 throw $.$$throw($.UnsupportedError$("Cannot remove from immutable List.")); | |
| 5842 }, | |
| 5843 $isList: function() { | |
| 5844 return true; | |
| 5845 }, | |
| 5846 $isCollection: function() { | |
| 5847 return true; | |
| 5848 }, | |
| 5849 $isJavaScriptIndexingBehavior: function() { | |
| 5850 return true; | |
| 5851 } | |
| 5852 }); | |
| 5853 | |
| 5854 $.$defineNativeClass("DOMWindow", { | |
| 5855 get$on: function() { | |
| 5856 return $.WindowEvents$(this); | |
| 5857 }, | |
| 5858 get$top: function() { | |
| 5859 return $._convertNativeToDart_Window(this.top); | |
| 5860 }, | |
| 5861 $$dom_addEventListener$3: function(type, listener, useCapture) { | |
| 5862 return this.addEventListener(type,$.convertDartClosureToJS(listener, 1),useC apture); | |
| 5863 }, | |
| 5864 alert$1: function(message) { | |
| 5865 return this.alert(message); | |
| 5866 }, | |
| 5867 postMessage$3: function(message, targetOrigin, messagePorts) { | |
| 5868 var t1, t2; | |
| 5869 t1 = $ === message; | |
| 5870 if (t1) | |
| 5871 message = null; | |
| 5872 t1 = !t1; | |
| 5873 t2 = $ === messagePorts; | |
| 5874 if (t2) | |
| 5875 messagePorts = null; | |
| 5876 if (t1 && t2) { | |
| 5877 this._postMessage_1$2($._convertDartToNative_PrepareForStructuredClone(mes sage), targetOrigin); | |
| 5878 return; | |
| 5879 } | |
| 5880 if (t1) { | |
| 5881 this._postMessage_2$3($._convertDartToNative_PrepareForStructuredClone(mes sage), targetOrigin, messagePorts); | |
| 5882 return; | |
| 5883 } | |
| 5884 throw $.$$throw($.ArgumentError$("Incorrect number or type of arguments")); | |
| 5885 }, | |
| 5886 postMessage$2: function(message, targetOrigin) { | |
| 5887 return this.postMessage$3(message, targetOrigin, $); | |
| 5888 }, | |
| 5889 _postMessage_1$2: function(message, targetOrigin) { | |
| 5890 return this.postMessage(message,targetOrigin); | |
| 5891 }, | |
| 5892 _postMessage_2$3: function(message, targetOrigin, messagePorts) { | |
| 5893 return this.postMessage(message,targetOrigin,messagePorts); | |
| 5894 }, | |
| 5895 $$dom_removeEventListener$3: function(type, listener, useCapture) { | |
| 5896 return this.removeEventListener(type,$.convertDartClosureToJS(listener, 1),u seCapture); | |
| 5897 }, | |
| 5898 setTimeout$2: function(handler, timeout) { | |
| 5899 return this.setTimeout($.convertDartClosureToJS(handler, 0),timeout); | |
| 5900 } | |
| 5901 }); | |
| 5902 | |
| 5903 $.$defineNativeClass("XPathException", {"": "message>", | |
| 5904 toString$0: function() { | |
| 5905 return this.toString(); | |
| 5906 } | |
| 5907 }); | |
| 5908 | |
| 5909 $.$defineNativeClass("SVGException", {"": "message>", | |
| 5910 toString$0: function() { | |
| 5911 return this.toString(); | |
| 5912 } | |
| 5913 }); | |
| 5914 | |
| 5915 // 32 dynamic classes. | |
| 5916 // 33 classes | |
| 5917 // 4 !leaf | |
| 5918 (function() { | |
| 5919 var v0_Uint8Array = "Uint8Array|Uint8ClampedArray"; | |
| 5920 $.dynamicSetMetadata([["Uint8Array", v0_Uint8Array], ["ArrayBufferView", [v0_U int8Array, "ArrayBufferView|Float64Array|Int16Array|Int32Array|Int8Array|DataVie w|Uint16Array|Uint32Array|Float32Array"].join("|")], ["Blob", "Blob|File"], ["Ev entTarget", "EventTarget|DOMWindow"]]); | |
| 5921 })(); | |
| 5922 | |
| 5923 | |
| 5924 // | |
| 5925 // BEGIN invoke [main]. | |
| 5926 // | |
| 5927 if (typeof document !== 'undefined' && document.readyState !== 'complete') { | |
| 5928 document.addEventListener('readystatechange', function () { | |
| 5929 if (document.readyState == 'complete') { | |
| 5930 if (typeof dartMainRunner === 'function') { | |
| 5931 dartMainRunner(function() { $.main(); }); | |
| 5932 } else { | |
| 5933 $.main(); | |
| 5934 } | |
| 5935 } | |
| 5936 }, false); | |
| 5937 } else { | |
| 5938 if (typeof dartMainRunner === 'function') { | |
| 5939 dartMainRunner(function() { $.main(); }); | |
| 5940 } else { | |
| 5941 $.main(); | |
| 5942 } | |
| 5943 } | |
| 5944 // | |
| 5945 // END invoke [main]. | |
| 5946 // | |
| 5947 | |
| 5948 function init() { | |
| 5949 Isolate.$isolateProperties = {}; | |
| 5950 function generateAccessor(field, prototype) { | |
| 5951 var len = field.length; | |
| 5952 var lastCharCode = field.charCodeAt(len - 1); | |
| 5953 var needsAccessor = (lastCharCode & 63) >= 60; | |
| 5954 if (needsAccessor) { | |
| 5955 var needsGetter = (lastCharCode & 3) > 0; | |
| 5956 var needsSetter = (lastCharCode & 2) == 0; | |
| 5957 var renaming = (lastCharCode & 64) != 0; | |
| 5958 var accessorName = field = field.substring(0, len - 1); | |
| 5959 if (renaming) { | |
| 5960 var divider = field.indexOf(":"); | |
| 5961 accessorName = field.substring(0, divider); | |
| 5962 field = field.substring(divider + 1); | |
| 5963 } | |
| 5964 if (needsGetter) { | |
| 5965 var getterString = "return this." + field + ";"; | |
| 5966 prototype["get$" + accessorName] = new Function(getterString); | |
| 5967 } | |
| 5968 if (needsSetter) { | |
| 5969 var setterString = "this." + field + " = v;"; | |
| 5970 prototype["set$" + accessorName] = new Function("v", setterString); | |
| 5971 } | |
| 5972 } | |
| 5973 return field; | |
| 5974 }; | |
| 5975 Isolate.$isolateProperties.$generateAccessor = generateAccessor; | |
| 5976 Isolate.$defineClass = function(cls, fields, prototype) { | |
| 5977 var constructor; | |
| 5978 if (typeof fields == 'function') { | |
| 5979 constructor = fields; | |
| 5980 } else { | |
| 5981 var str = "function " + cls + "("; | |
| 5982 var body = ""; | |
| 5983 for (var i = 0; i < fields.length; i++) { | |
| 5984 if (i != 0) str += ", "; | |
| 5985 var field = fields[i]; | |
| 5986 field = generateAccessor(field, prototype); | |
| 5987 str += field; | |
| 5988 body += "this." + field + " = " + field + ";\n"; | |
| 5989 } | |
| 5990 str += ") {" + body + "}\n"; | |
| 5991 str += "return " + cls + ";"; | |
| 5992 constructor = new Function(str)(); | |
| 5993 } | |
| 5994 constructor.prototype = prototype; | |
| 5995 constructor.builtin$cls = cls; | |
| 5996 return constructor; | |
| 5997 }; | |
| 5998 var supportsProto = false; | |
| 5999 var tmp = Isolate.$defineClass('c', ['f?'], {}).prototype; | |
| 6000 if (tmp.__proto__) { | |
| 6001 tmp.__proto__ = {}; | |
| 6002 if (typeof tmp.get$f !== 'undefined') supportsProto = true; | |
| 6003 } | |
| 6004 Isolate.$pendingClasses = {}; | |
| 6005 Isolate.$finishClasses = function(collectedClasses) { | |
| 6006 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 6007 for (var cls in collectedClasses) { | |
| 6008 if (hasOwnProperty.call(collectedClasses, cls)) { | |
| 6009 var desc = collectedClasses[cls]; | |
| 6010 var fields = desc[''], supr; | |
| 6011 if (typeof fields == 'string') { | |
| 6012 var s = fields.split(';'); supr = s[0]; | |
| 6013 fields = s[1] == '' ? [] : s[1].split(','); | |
| 6014 } else { | |
| 6015 supr = desc['super']; | |
| 6016 } | |
| 6017 Isolate.$isolateProperties[cls] = Isolate.$defineClass(cls, fields, desc); | |
| 6018 if (supr) Isolate.$pendingClasses[cls] = supr; | |
| 6019 } | |
| 6020 } | |
| 6021 var pendingClasses = Isolate.$pendingClasses; | |
| 6022 Isolate.$pendingClasses = {}; | |
| 6023 var finishedClasses = {}; | |
| 6024 function finishClass(cls) { | |
| 6025 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 6026 if (hasOwnProperty.call(finishedClasses, cls)) return; | |
| 6027 finishedClasses[cls] = true; | |
| 6028 var superclass = pendingClasses[cls]; | |
| 6029 if (!superclass) return; | |
| 6030 finishClass(superclass); | |
| 6031 var constructor = Isolate.$isolateProperties[cls]; | |
| 6032 var superConstructor = Isolate.$isolateProperties[superclass]; | |
| 6033 var prototype = constructor.prototype; | |
| 6034 if (supportsProto) { | |
| 6035 prototype.__proto__ = superConstructor.prototype; | |
| 6036 prototype.constructor = constructor; | |
| 6037 } else { | |
| 6038 function tmp() {}; | |
| 6039 tmp.prototype = superConstructor.prototype; | |
| 6040 var newPrototype = new tmp(); | |
| 6041 constructor.prototype = newPrototype; | |
| 6042 newPrototype.constructor = constructor; | |
| 6043 for (var member in prototype) { | |
| 6044 if (!member) continue; if (hasOwnProperty.call(prototype, membe r)) { | |
| 6045 newPrototype[member] = prototype[member]; | |
| 6046 } | |
| 6047 } | |
| 6048 } | |
| 6049 } | |
| 6050 for (var cls in pendingClasses) finishClass(cls); | |
| 6051 }; | |
| 6052 Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyValue ) { | |
| 6053 var getter = new Function("{ return $." + fieldName + ";}"); | |
| 6054 var sentinelUndefined = {}; | |
| 6055 var sentinelInProgress = {}; | |
| 6056 prototype[fieldName] = sentinelUndefined; | |
| 6057 prototype[getterName] = function() { | |
| 6058 var result = $[fieldName]; | |
| 6059 try { | |
| 6060 if (result === sentinelUndefined) { | |
| 6061 $[fieldName] = sentinelInProgress; | |
| 6062 try { | |
| 6063 result = $[fieldName] = lazyValue(); | |
| 6064 } finally { | |
| 6065 if (result === sentinelUndefined) { | |
| 6066 if ($[fieldName] === sentinelInProgress) { | |
| 6067 $[fieldName] = null; | |
| 6068 } | |
| 6069 } | |
| 6070 } | |
| 6071 } else if (result === sentinelInProgress) { | |
| 6072 $.throwCyclicInit(staticName); | |
| 6073 } | |
| 6074 return result; | |
| 6075 } finally { | |
| 6076 $[getterName] = getter; | |
| 6077 } | |
| 6078 }; | |
| 6079 }; | |
| 6080 Isolate.$finishIsolateConstructor = function(oldIsolate) { | |
| 6081 var isolateProperties = oldIsolate.$isolateProperties; | |
| 6082 var isolatePrototype = oldIsolate.prototype; | |
| 6083 var str = "{\n"; | |
| 6084 str += "var properties = Isolate.$isolateProperties;\n"; | |
| 6085 for (var staticName in isolateProperties) { | |
| 6086 if (Object.prototype.hasOwnProperty.call(isolateProperties, staticName)) { | |
| 6087 str += "this." + staticName + "= properties." + staticName + ";\n"; | |
| 6088 } | |
| 6089 } | |
| 6090 str += "}\n"; | |
| 6091 var newIsolate = new Function(str); | |
| 6092 newIsolate.prototype = isolatePrototype; | |
| 6093 isolatePrototype.constructor = newIsolate; | |
| 6094 newIsolate.$isolateProperties = isolateProperties; | |
| 6095 return newIsolate; | |
| 6096 }; | |
| 6097 } | |
| 6098 | |
| 6099 //@ sourceMappingURL=dromaeo_smoke.dart.js.map | |
| OLD | NEW |