| 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 function Isolate() {} |
| 10 init(); |
| 11 |
| 12 var $ = Isolate.$isolateProperties; |
| 13 var $$ = {}; |
| 14 |
| 15 // Classes |
| 16 $$.ListIterable = {"": "IterableBase;", |
| 17 get$iterator: function(_) { |
| 18 return $.ListIterator$(this); |
| 19 }, |
| 20 forEach$1: function(_, action) { |
| 21 var $length, i; |
| 22 $length = this.get$length(this); |
| 23 if (typeof $length !== "number") |
| 24 return this.forEach$1$bailout1(1, action, $length); |
| 25 for (i = 0; i < $length; ++i) { |
| 26 action.call$1(this.elementAt$1(this, i)); |
| 27 if ($length !== this.get$length(this)) |
| 28 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 29 } |
| 30 }, |
| 31 forEach$1$bailout1: function(state0, action, $length) { |
| 32 var t1, i; |
| 33 for (t1 = $.getInterceptor($length), i = 0; $.JSNumber_methods.$lt(i, $lengt
h); ++i) { |
| 34 action.call$1(this.elementAt$1(this, i)); |
| 35 if (t1.$eq($length, this.get$length(this)) !== true) |
| 36 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 37 } |
| 38 }, |
| 39 get$isEmpty: function(_) { |
| 40 return $.$eq(this.get$length(this), 0); |
| 41 }, |
| 42 skip$1: function(_, count) { |
| 43 return $.SubListIterable$(this, count, null); |
| 44 }, |
| 45 toList$1$growable: function(_, growable) { |
| 46 var result, i, t1; |
| 47 if (growable === true) { |
| 48 result = $.List_List($); |
| 49 $.JSArray_methods.set$length(result, this.get$length(this)); |
| 50 } else |
| 51 result = $.List_List(this.get$length(this)); |
| 52 for (i = 0; $.JSNumber_methods.$lt(i, this.get$length(this)); ++i) { |
| 53 t1 = this.elementAt$1(this, i); |
| 54 if (i >= result.length) |
| 55 throw $.ioore(i); |
| 56 result[i] = t1; |
| 57 } |
| 58 return result; |
| 59 }, |
| 60 toList$0: function($receiver) { |
| 61 return this.toList$1$growable($receiver, true); |
| 62 }, |
| 63 $asIterable: function() { |
| 64 return null; |
| 65 } |
| 66 }; |
| 67 |
| 68 $$.SubListIterable = {"": "ListIterable;_iterable,_start,_endOrLength", |
| 69 get$_endIndex: function() { |
| 70 var $length, t1; |
| 71 $length = $.get$length$asx(this._iterable); |
| 72 t1 = this._endOrLength; |
| 73 if (t1 == null || $.JSNull_methods.$gt(t1, $length)) |
| 74 return $length; |
| 75 return t1; |
| 76 }, |
| 77 get$_startIndex: function() { |
| 78 var $length, t1; |
| 79 $length = $.get$length$asx(this._iterable); |
| 80 t1 = this._start; |
| 81 if ($.JSNumber_methods.$gt(t1, $length)) |
| 82 return $length; |
| 83 return t1; |
| 84 }, |
| 85 get$length: function(_) { |
| 86 var $length, t1, t2; |
| 87 $length = $.get$length$asx(this._iterable); |
| 88 if (typeof $length !== "number") |
| 89 return this.get$length$bailout2(1, $length); |
| 90 t1 = this._start; |
| 91 if (t1 >= $length) |
| 92 return 0; |
| 93 t2 = this._endOrLength; |
| 94 if (t2 == null || $.JSNull_methods.$ge(t2, $length)) |
| 95 return $length - t1; |
| 96 return $.JSNull_methods.$sub(t2, t1); |
| 97 }, |
| 98 get$length$bailout2: function(state0, $length) { |
| 99 var t1, t2; |
| 100 t1 = this._start; |
| 101 if ($.JSNumber_methods.$ge(t1, $length)) |
| 102 return 0; |
| 103 t2 = this._endOrLength; |
| 104 if (t2 == null || $.JSNull_methods.$ge(t2, $length)) |
| 105 return $.$sub$n($length, t1); |
| 106 return $.JSNull_methods.$sub(t2, t1); |
| 107 }, |
| 108 elementAt$1: function(_, index) { |
| 109 var t1, realIndex; |
| 110 if (typeof index !== "number") |
| 111 return this.elementAt$1$bailout2(1, index); |
| 112 t1 = this.get$_startIndex(); |
| 113 if (typeof t1 !== "number") |
| 114 return this.elementAt$1$bailout2(2, index, t1); |
| 115 realIndex = t1 + index; |
| 116 if (!(index < 0)) { |
| 117 t1 = this.get$_endIndex(); |
| 118 if (typeof t1 !== "number") |
| 119 return this.elementAt$1$bailout2(3, index, t1, realIndex); |
| 120 t1 = realIndex >= t1; |
| 121 } else |
| 122 t1 = true; |
| 123 if (t1) |
| 124 throw $.wrapException($.RangeError$range(index, 0, this.get$length(this)))
; |
| 125 return $.elementAt$1$ax(this._iterable, realIndex); |
| 126 }, |
| 127 elementAt$1$bailout2: function(state0, index, t1, realIndex) { |
| 128 switch (state0) { |
| 129 case 0: |
| 130 case 1: |
| 131 state0 = 0; |
| 132 t1 = this.get$_startIndex(); |
| 133 case 2: |
| 134 state0 = 0; |
| 135 realIndex = $.$add$ns(t1, index); |
| 136 case 3: |
| 137 if (state0 === 3 || state0 === 0 && !$.$lt$n(index, 0)) |
| 138 switch (state0) { |
| 139 case 0: |
| 140 t1 = this.get$_endIndex(); |
| 141 case 3: |
| 142 state0 = 0; |
| 143 t1 = $.$ge$n(realIndex, t1); |
| 144 } |
| 145 else |
| 146 t1 = true; |
| 147 if (t1) |
| 148 throw $.wrapException($.RangeError$range(index, 0, this.get$length(thi
s))); |
| 149 return $.elementAt$1$ax(this._iterable, realIndex); |
| 150 } |
| 151 }, |
| 152 skip$1: function(_, count) { |
| 153 if (count < 0) |
| 154 throw $.wrapException($.ArgumentError$(count)); |
| 155 return $.SubListIterable$(this._iterable, this._start + count, this._endOrLe
ngth); |
| 156 }, |
| 157 $asIterable: function() { |
| 158 return null; |
| 159 } |
| 160 }; |
| 161 |
| 162 $$.ListIterator = {"": "Object;_iterable,_liblib$_length,_index,_liblib$_current
", |
| 163 get$current: function() { |
| 164 return this._liblib$_current; |
| 165 }, |
| 166 moveNext$0: function() { |
| 167 var t1, t2, t3; |
| 168 t1 = this._liblib$_length; |
| 169 t2 = this._iterable; |
| 170 if ($.$eq(t1, $.get$length$asx(t2)) !== true) |
| 171 throw $.wrapException($.ConcurrentModificationError$(t2)); |
| 172 t3 = this._index; |
| 173 if (t3 === t1) { |
| 174 this._liblib$_current = null; |
| 175 return false; |
| 176 } |
| 177 this._liblib$_current = $.elementAt$1$ax(t2, t3); |
| 178 this._index = this._index + 1; |
| 179 return true; |
| 180 } |
| 181 }; |
| 182 |
| 183 $$.MappedIterable = {"": "IterableBase;_iterable,_f", |
| 184 _f$1: function(arg0) { |
| 185 return this._f.call$1(arg0); |
| 186 }, |
| 187 get$iterator: function(_) { |
| 188 var t1 = this._iterable; |
| 189 return $.MappedIterator$(t1.get$iterator(t1), this._f); |
| 190 }, |
| 191 get$length: function(_) { |
| 192 var t1 = this._iterable; |
| 193 return t1.get$length(t1); |
| 194 }, |
| 195 get$isEmpty: function(_) { |
| 196 var t1 = this._iterable; |
| 197 return t1.get$isEmpty(t1); |
| 198 }, |
| 199 elementAt$1: function(_, index) { |
| 200 var t1 = this._iterable; |
| 201 return this._f$1(t1.elementAt$1(t1, index)); |
| 202 }, |
| 203 $asIterable: function() { |
| 204 return function (S, T) { return [T]; }; |
| 205 } |
| 206 }; |
| 207 |
| 208 $$.MappedIterator = {"": "Iterator;_liblib$_current,_iterator,_f", |
| 209 _f$1: function(arg0) { |
| 210 return this._f.call$1(arg0); |
| 211 }, |
| 212 moveNext$0: function() { |
| 213 var t1 = this._iterator; |
| 214 if (t1.moveNext$0() === true) { |
| 215 this._liblib$_current = this._f$1(t1.get$current()); |
| 216 return true; |
| 217 } |
| 218 this._liblib$_current = null; |
| 219 return false; |
| 220 }, |
| 221 get$current: function() { |
| 222 return this._liblib$_current; |
| 223 } |
| 224 }; |
| 225 |
| 226 $$.WhereIterable = {"": "IterableBase;_iterable,_f", |
| 227 get$iterator: function(_) { |
| 228 var t1 = this._iterable; |
| 229 return $.WhereIterator$(t1.get$iterator(t1), this._f); |
| 230 }, |
| 231 $asIterable: function() { |
| 232 return null; |
| 233 } |
| 234 }; |
| 235 |
| 236 $$.WhereIterator = {"": "Iterator;_iterator,_f", |
| 237 _f$1: function(arg0) { |
| 238 return this._f.call$1(arg0); |
| 239 }, |
| 240 moveNext$0: function() { |
| 241 for (var t1 = this._iterator; t1.moveNext$0() === true;) |
| 242 if (this._f$1(t1.get$current()) === true) |
| 243 return true; |
| 244 return false; |
| 245 }, |
| 246 get$current: function() { |
| 247 return this._iterator.get$current(); |
| 248 } |
| 249 }; |
| 250 |
| 251 $$.SkipIterable = {"": "IterableBase;_iterable,_skipCount", |
| 252 skip$1: function(_, n) { |
| 253 if (typeof n !== "number" || Math.floor(n) !== n || n < 0) |
| 254 throw $.wrapException($.ArgumentError$(n)); |
| 255 return $.SkipIterable$(this._iterable, $.$add$ns(this._skipCount, n)); |
| 256 }, |
| 257 get$iterator: function(_) { |
| 258 return $.SkipIterator$($.get$iterator$ax(this._iterable), this._skipCount); |
| 259 }, |
| 260 SkipIterable$2: function(_iterable, _skipCount) { |
| 261 var t1 = this._skipCount; |
| 262 if (typeof t1 !== "number" || Math.floor(t1) !== t1 || $.$lt$n(t1, 0)) |
| 263 throw $.wrapException($.ArgumentError$(t1)); |
| 264 }, |
| 265 $asIterable: function() { |
| 266 return null; |
| 267 } |
| 268 }; |
| 269 |
| 270 $$.SkipIterator = {"": "Iterator;_iterator,_skipCount", |
| 271 moveNext$0: function() { |
| 272 var t1, i, t2; |
| 273 t1 = this._iterator; |
| 274 i = 0; |
| 275 while (true) { |
| 276 t2 = this._skipCount; |
| 277 if (typeof t2 !== "number") |
| 278 return this.moveNext$0$bailout1(1, t1, i, t2); |
| 279 if (!(i < t2)) |
| 280 break; |
| 281 t1.moveNext$0(); |
| 282 ++i; |
| 283 } |
| 284 this._skipCount = 0; |
| 285 return t1.moveNext$0(); |
| 286 }, |
| 287 moveNext$0$bailout1: function(state0, t1, i, t2) { |
| 288 switch (state0) { |
| 289 case 0: |
| 290 t1 = this._iterator; |
| 291 i = 0; |
| 292 case 1: |
| 293 L0: |
| 294 while (true) |
| 295 switch (state0) { |
| 296 case 0: |
| 297 t2 = this._skipCount; |
| 298 case 1: |
| 299 state0 = 0; |
| 300 if (!$.JSNumber_methods.$lt(i, t2)) |
| 301 break L0; |
| 302 t1.moveNext$0(); |
| 303 ++i; |
| 304 } |
| 305 this._skipCount = 0; |
| 306 return t1.moveNext$0(); |
| 307 } |
| 308 }, |
| 309 get$current: function() { |
| 310 return this._iterator.get$current(); |
| 311 }, |
| 312 SkipIterator$2: function(_iterator, _skipCount) { |
| 313 } |
| 314 }; |
| 315 |
| 316 $$.ToString__emitPair_anon = {"": "Closure;box_0,result_1,visiting_2", |
| 317 call$2: function(k, v) { |
| 318 var t1, t2; |
| 319 t1 = this.box_0; |
| 320 if (!t1.first_0) |
| 321 this.result_1.write$1(", "); |
| 322 t1.first_0 = false; |
| 323 t1 = this.result_1; |
| 324 t2 = this.visiting_2; |
| 325 $.ToString__emitObject(k, t1, t2); |
| 326 t1.write$1(": "); |
| 327 $.ToString__emitObject(v, t1, t2); |
| 328 } |
| 329 }; |
| 330 |
| 331 $$.HashMap_values_anon = {"": "Closure;this_0", |
| 332 call$1: function(each) { |
| 333 return $.$index$asx(this.this_0, each); |
| 334 } |
| 335 }; |
| 336 |
| 337 $$.HashMap_addAll_anon = {"": "Closure;this_0", |
| 338 call$2: function(key, value) { |
| 339 $.$indexSet$ax(this.this_0, key, value); |
| 340 } |
| 341 }; |
| 342 |
| 343 $$.HashMapKeyIterable = {"": "IterableBase;_map", |
| 344 get$length: function(_) { |
| 345 return this._map._liblib0$_length; |
| 346 }, |
| 347 get$isEmpty: function(_) { |
| 348 return this._map._liblib0$_length === 0; |
| 349 }, |
| 350 get$iterator: function(_) { |
| 351 var t1 = this._map; |
| 352 return $.HashMapKeyIterator$(t1, t1._computeKeys$0()); |
| 353 }, |
| 354 forEach$1: function(_, f) { |
| 355 var t1, keys, $length, i; |
| 356 t1 = this._map; |
| 357 keys = t1._computeKeys$0(); |
| 358 for ($length = keys.length, i = 0; i < $length; ++i) { |
| 359 f.call$1(keys[i]); |
| 360 if (keys !== t1._keys) |
| 361 throw $.wrapException($.ConcurrentModificationError$(t1)); |
| 362 } |
| 363 }, |
| 364 $asIterable: function() { |
| 365 return null; |
| 366 } |
| 367 }; |
| 368 |
| 369 $$.HashMapKeyIterator = {"": "Object;_map,_keys,_offset,_liblib0$_current", |
| 370 get$current: function() { |
| 371 return this._liblib0$_current; |
| 372 }, |
| 373 moveNext$0: function() { |
| 374 var keys, offset, t1; |
| 375 keys = this._keys; |
| 376 offset = this._offset; |
| 377 t1 = this._map; |
| 378 if (keys !== t1._keys) |
| 379 throw $.wrapException($.ConcurrentModificationError$(t1)); |
| 380 else if (offset >= keys.length) { |
| 381 this._liblib0$_current = null; |
| 382 return false; |
| 383 } else { |
| 384 this._liblib0$_current = keys[offset]; |
| 385 this._offset = offset + 1; |
| 386 return true; |
| 387 } |
| 388 } |
| 389 }; |
| 390 |
| 391 $$.LinkedHashMap_values_anon = {"": "Closure;this_0", |
| 392 call$1: function(each) { |
| 393 return $.$index$asx(this.this_0, each); |
| 394 } |
| 395 }; |
| 396 |
| 397 $$.LinkedHashMap_addAll_anon = {"": "Closure;this_0", |
| 398 call$2: function(key, value) { |
| 399 $.$indexSet$ax(this.this_0, key, value); |
| 400 } |
| 401 }; |
| 402 |
| 403 $$.LinkedHashMapCell = {"": "Object;_key<,_value@,_next@,_previous@"}; |
| 404 |
| 405 $$.LinkedHashMapKeyIterable = {"": "IterableBase;_map", |
| 406 get$length: function(_) { |
| 407 return this._map._liblib0$_length; |
| 408 }, |
| 409 get$isEmpty: function(_) { |
| 410 return this._map._liblib0$_length === 0; |
| 411 }, |
| 412 get$iterator: function(_) { |
| 413 var t1 = this._map; |
| 414 return $.LinkedHashMapKeyIterator$(t1, t1._modifications); |
| 415 }, |
| 416 forEach$1: function(_, f) { |
| 417 var t1, cell, modifications; |
| 418 t1 = this._map; |
| 419 cell = t1._first; |
| 420 modifications = t1._modifications; |
| 421 for (; cell != null;) { |
| 422 f.call$1(cell.get$_key()); |
| 423 if (modifications !== t1._modifications) |
| 424 throw $.wrapException($.ConcurrentModificationError$(t1)); |
| 425 cell = cell.get$_next(); |
| 426 } |
| 427 }, |
| 428 $asIterable: function() { |
| 429 return null; |
| 430 } |
| 431 }; |
| 432 |
| 433 $$.LinkedHashMapKeyIterator = {"": "Object;_map,_modifications,_cell,_liblib0$_c
urrent", |
| 434 get$current: function() { |
| 435 return this._liblib0$_current; |
| 436 }, |
| 437 moveNext$0: function() { |
| 438 var t1 = this._map; |
| 439 if (this._modifications !== t1._modifications) |
| 440 throw $.wrapException($.ConcurrentModificationError$(t1)); |
| 441 else { |
| 442 t1 = this._cell; |
| 443 if (t1 == null) { |
| 444 this._liblib0$_current = null; |
| 445 return false; |
| 446 } else { |
| 447 this._liblib0$_current = t1.get$_key(); |
| 448 this._cell = this._cell.get$_next(); |
| 449 return true; |
| 450 } |
| 451 } |
| 452 }, |
| 453 LinkedHashMapKeyIterator$2: function(_map, _modifications) { |
| 454 this._cell = this._map._first; |
| 455 } |
| 456 }; |
| 457 |
| 458 $$.LinkedHashSetCell = {"": "Object;_element<,_next@,_previous@"}; |
| 459 |
| 460 $$.LinkedHashSetIterator = {"": "Object;_set,_modifications,_cell,_liblib0$_curr
ent", |
| 461 get$current: function() { |
| 462 return this._liblib0$_current; |
| 463 }, |
| 464 moveNext$0: function() { |
| 465 var t1 = this._set; |
| 466 if (this._modifications !== t1._modifications) |
| 467 throw $.wrapException($.ConcurrentModificationError$(t1)); |
| 468 else { |
| 469 t1 = this._cell; |
| 470 if (t1 == null) { |
| 471 this._liblib0$_current = null; |
| 472 return false; |
| 473 } else { |
| 474 this._liblib0$_current = t1.get$_element(); |
| 475 this._cell = this._cell.get$_next(); |
| 476 return true; |
| 477 } |
| 478 } |
| 479 }, |
| 480 LinkedHashSetIterator$2: function(_set, _modifications) { |
| 481 this._cell = this._set._first; |
| 482 } |
| 483 }; |
| 484 |
| 485 $$.Function__toMangledNames_anon = {"": "Closure;result_0", |
| 486 call$2: function(symbol, value) { |
| 487 var t1 = this.result_0; |
| 488 t1.$indexSet(t1, symbol.get$_name(), value); |
| 489 } |
| 490 }; |
| 491 |
| 492 $$.NoSuchMethodError_toString_anon = {"": "Closure;box_0", |
| 493 call$2: function(key, value) { |
| 494 var t1 = this.box_0; |
| 495 if ($.$gt$n(t1.i_1, 0)) |
| 496 t1.sb_0.write$1(", "); |
| 497 t1.sb_0.write$1(key); |
| 498 t1.sb_0.write$1(": "); |
| 499 t1.sb_0.write$1($.Error_safeToString(value)); |
| 500 t1.i_1 = $.$add$ns(t1.i_1, 1); |
| 501 } |
| 502 }; |
| 503 |
| 504 $$.Interceptor = {"": "Object;", |
| 505 $eq: function(receiver, other) { |
| 506 return receiver === other; |
| 507 }, |
| 508 get$hashCode: function(receiver) { |
| 509 return $.Primitives_objectHashCode(receiver); |
| 510 }, |
| 511 toString$0: function(receiver) { |
| 512 return "Instance of '" + $.S($.Primitives_objectTypeName(receiver)) + "'"; |
| 513 } |
| 514 }; |
| 515 |
| 516 $$.JSFunction = {"": "Interceptor;", |
| 517 toString$0: function(receiver) { |
| 518 return "Closure"; |
| 519 } |
| 520 }; |
| 521 |
| 522 $$.JSBool = {"": "Interceptor;", |
| 523 toString$0: function(receiver) { |
| 524 return String(receiver); |
| 525 }, |
| 526 get$hashCode: function(receiver) { |
| 527 return receiver ? 519018 : 218159; |
| 528 }, |
| 529 $isbool: true |
| 530 }; |
| 531 |
| 532 $$.JSNull = {"": "Interceptor;", |
| 533 $eq: function(receiver, other) { |
| 534 return null == other; |
| 535 }, |
| 536 toString$0: function(receiver) { |
| 537 return "null"; |
| 538 }, |
| 539 get$hashCode: function(receiver) { |
| 540 return 0; |
| 541 } |
| 542 }; |
| 543 |
| 544 $$.CloseToken = {"": "Object;", $isCloseToken: true}; |
| 545 |
| 546 $$.JsIsolateSink = {"": "EventSink;_isClosed,_port<", |
| 547 add$1: function(_, message) { |
| 548 $.send$1$x(this._port, message); |
| 549 }, |
| 550 $eq: function(_, other) { |
| 551 if (other == null) |
| 552 return false; |
| 553 return typeof other === "object" && other !== null && !!$.getInterceptor(oth
er).$isIsolateSink && $.$eq(this._port, other.get$_port()) === true; |
| 554 }, |
| 555 get$hashCode: function(_) { |
| 556 return $.$add$ns($.get$hashCode$(this._port), 499); |
| 557 }, |
| 558 $isJsIsolateSink: true, |
| 559 $asIsolateSink: null, |
| 560 $isIsolateSink: true |
| 561 }; |
| 562 |
| 563 $$._Manager = {"": "Object;nextIsolateId@,currentManagerId,nextManagerId,current
Context<,rootContext,topEventLoop<,fromCommandLine,isWorker<,supportsWorkers,iso
lates,mainManager,managers", |
| 564 get$useWorkers: function() { |
| 565 return this.supportsWorkers; |
| 566 }, |
| 567 get$needSerialization: function() { |
| 568 return this.get$useWorkers(); |
| 569 }, |
| 570 _nativeDetectEnvironment$0: function() { |
| 571 var t1, t2; |
| 572 t1 = $.get$globalWindow() == null; |
| 573 this.isWorker = t1 && $.get$globalPostMessageDefined() === true; |
| 574 if (this.isWorker !== true) |
| 575 t2 = $.get$globalWorker() != null && $.get$IsolateNatives_thisScript() !=
null; |
| 576 else |
| 577 t2 = true; |
| 578 this.supportsWorkers = t2; |
| 579 this.fromCommandLine = t1 && this.isWorker !== true; |
| 580 }, |
| 581 _nativeInitWorkerMessageHandler$0: function() { |
| 582 var $function = function (e) { $.IsolateNatives__processWorkerMessage.call$2
(this.mainManager, e); }; |
| 583 $.get$globalThis().onmessage = $function; |
| 584 $.get$globalThis().dartPrint = function (object) {}; |
| 585 }, |
| 586 maybeCloseWorker$0: function() { |
| 587 if (this.isWorker === true) { |
| 588 var t1 = this.isolates; |
| 589 t1 = t1.get$isEmpty(t1) && this.topEventLoop.activeTimerCount === 0; |
| 590 } else |
| 591 t1 = false; |
| 592 if (t1) { |
| 593 t1 = this.mainManager; |
| 594 t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "clo
se"]))); |
| 595 } |
| 596 }, |
| 597 _Manager$0: function() { |
| 598 this._nativeDetectEnvironment$0(); |
| 599 this.topEventLoop = $._EventLoop$(); |
| 600 this.isolates = $.Map_Map(); |
| 601 this.managers = $.Map_Map(); |
| 602 if (this.isWorker === true) { |
| 603 this.mainManager = $._MainManagerStub$(); |
| 604 this._nativeInitWorkerMessageHandler$0(); |
| 605 } |
| 606 } |
| 607 }; |
| 608 |
| 609 $$._IsolateContext = {"": "Object;id*,ports,isolateStatics", |
| 610 eval$1: function(code) { |
| 611 var old, result; |
| 612 old = $globalState.currentContext; |
| 613 $globalState.currentContext = this; |
| 614 $ = this.isolateStatics; |
| 615 result = null; |
| 616 try { |
| 617 result = code.call$0(); |
| 618 } finally { |
| 619 $globalState.currentContext = old; |
| 620 if (old != null) |
| 621 old._setGlobals$0(); |
| 622 } |
| 623 return result; |
| 624 }, |
| 625 _setGlobals$0: function() { |
| 626 $ = this.isolateStatics; |
| 627 }, |
| 628 lookup$1: function(portId) { |
| 629 var t1 = this.ports; |
| 630 return t1.$index(t1, portId); |
| 631 }, |
| 632 register$2: function(_, portId, port) { |
| 633 var t1; |
| 634 if (this.ports.containsKey$1(portId) === true) |
| 635 throw $.wrapException($._ExceptionImplementation$("Registry: ports must be
registered only once.")); |
| 636 t1 = this.ports; |
| 637 t1.$indexSet(t1, portId, port); |
| 638 t1 = $globalState.isolates; |
| 639 t1.$indexSet(t1, this.id, this); |
| 640 }, |
| 641 unregister$1: function(portId) { |
| 642 var t1 = this.ports; |
| 643 t1.remove$1(t1, portId); |
| 644 t1 = this.ports; |
| 645 if (t1.get$isEmpty(t1)) { |
| 646 t1 = $globalState.isolates; |
| 647 t1.remove$1(t1, this.id); |
| 648 } |
| 649 }, |
| 650 _IsolateContext$0: function() { |
| 651 var t1, t2; |
| 652 t1 = $._globalState(); |
| 653 t2 = t1.get$nextIsolateId(); |
| 654 t1.set$nextIsolateId(t2 + 1); |
| 655 this.id = t2; |
| 656 this.ports = $.Map_Map(); |
| 657 this.isolateStatics = new Isolate(); |
| 658 } |
| 659 }; |
| 660 |
| 661 $$._EventLoop = {"": "Object;events,activeTimerCount", |
| 662 enqueue$3: function(isolate, fn, msg) { |
| 663 this.events.addLast$1($._IsolateEvent$(isolate, fn, msg)); |
| 664 }, |
| 665 dequeue$0: function() { |
| 666 var t1 = this.events; |
| 667 if (t1.get$isEmpty(t1)) |
| 668 return; |
| 669 return t1.removeFirst$0(); |
| 670 }, |
| 671 checkOpenReceivePortsFromCommandLine$0: function() { |
| 672 if ($globalState.rootContext != null) |
| 673 if ($globalState.isolates.containsKey$1($globalState.rootContext.id) === t
rue) |
| 674 if ($globalState.fromCommandLine === true) { |
| 675 var t1 = $globalState.rootContext.ports; |
| 676 t1 = t1.get$isEmpty(t1); |
| 677 } else |
| 678 t1 = false; |
| 679 else |
| 680 t1 = false; |
| 681 else |
| 682 t1 = false; |
| 683 if (t1) |
| 684 throw $.wrapException($._ExceptionImplementation$("Program exited with ope
n ReceivePorts.")); |
| 685 }, |
| 686 runIteration$0: function() { |
| 687 var $event = this.dequeue$0(); |
| 688 if ($event == null) { |
| 689 this.checkOpenReceivePortsFromCommandLine$0(); |
| 690 $globalState.maybeCloseWorker$0(); |
| 691 return false; |
| 692 } |
| 693 $event.process$0(); |
| 694 return true; |
| 695 }, |
| 696 _runHelper$0: function() { |
| 697 if ($.get$globalWindow() != null) |
| 698 new $._EventLoop__runHelper_next(this).call$0(); |
| 699 else |
| 700 for (; this.runIteration$0();) |
| 701 ; |
| 702 }, |
| 703 run$0: function() { |
| 704 var e, trace, exception, t1; |
| 705 if ($globalState.isWorker !== true) |
| 706 this._runHelper$0(); |
| 707 else |
| 708 try { |
| 709 this._runHelper$0(); |
| 710 } catch (exception) { |
| 711 t1 = $.unwrapException(exception); |
| 712 e = t1; |
| 713 trace = $.getTraceFromException(exception); |
| 714 t1 = $globalState.mainManager; |
| 715 t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "e
rror", "msg", $.S(e) + "\n" + $.S(trace)]))); |
| 716 } |
| 717 |
| 718 } |
| 719 }; |
| 720 |
| 721 $$._EventLoop__runHelper_next = {"": "Closure;this_0", |
| 722 call$0: function() { |
| 723 if (!this.this_0.runIteration$0()) |
| 724 return; |
| 725 $.Timer_run(this); |
| 726 } |
| 727 }; |
| 728 |
| 729 $$._IsolateEvent = {"": "Object;isolate,fn,message", |
| 730 process$0: function() { |
| 731 this.isolate.eval$1(this.fn); |
| 732 } |
| 733 }; |
| 734 |
| 735 $$._MainManagerStub = {"": "Object;", |
| 736 get$id: function(_) { |
| 737 return 0; |
| 738 }, |
| 739 set$id: function(_, i) { |
| 740 throw $.wrapException($.UnimplementedError$(null)); |
| 741 }, |
| 742 postMessage$1: function(_, msg) { |
| 743 $.get$globalThis().postMessage(msg); |
| 744 }, |
| 745 terminate$0: function(_) { |
| 746 } |
| 747 }; |
| 748 |
| 749 $$.IsolateNatives__processWorkerMessage_anon = {"": "Closure;entryPoint_0,replyT
o_1", |
| 750 call$0: function() { |
| 751 var t1, t2; |
| 752 t1 = this.entryPoint_0; |
| 753 t2 = this.replyTo_1; |
| 754 $.lazyPort = $.ReceivePortImpl$(); |
| 755 $.send$2$x(t2, "spawned", $._Isolate_port().toSendPort$0()); |
| 756 t1.call$0(); |
| 757 } |
| 758 }; |
| 759 |
| 760 $$._BaseSendPort = {"": "Object;_isolateId<", |
| 761 _checkReplyTo$1: function(replyTo) { |
| 762 if (replyTo != null && (typeof replyTo !== "object" || replyTo === null || !
$.getInterceptor(replyTo).$is_NativeJsSendPort) && (typeof replyTo !== "object"
|| replyTo === null || !$.getInterceptor(replyTo).$is_WorkerSendPort) && true) |
| 763 throw $.wrapException($._ExceptionImplementation$("SendPort.send: Illegal
replyTo port type")); |
| 764 }, |
| 765 call$1: function(message) { |
| 766 var completer, port; |
| 767 completer = $._CompleterImpl$(); |
| 768 port = $.ReceivePortImpl$(); |
| 769 this.send$2(this, message, port.toSendPort$0()); |
| 770 port.receive$1(new $._BaseSendPort_call_anon(completer, port)); |
| 771 return completer.future; |
| 772 }, |
| 773 $isSendPort: true |
| 774 }; |
| 775 |
| 776 $$._BaseSendPort_call_anon = {"": "Closure;completer_0,port_1", |
| 777 call$2: function(value, ignoreReplyTo) { |
| 778 var t1 = this.port_1; |
| 779 t1.close$0(t1); |
| 780 t1 = this.completer_0; |
| 781 if (typeof value === "object" && value !== null && !!$.getInterceptor(value)
.$isException) |
| 782 t1.completeError$1(value); |
| 783 else |
| 784 t1.complete$1(t1, value); |
| 785 } |
| 786 }; |
| 787 |
| 788 $$._NativeJsSendPort = {"": "_BaseSendPort;_receivePort<,_isolateId", |
| 789 send$2: function(_, message, replyTo) { |
| 790 $._waitForPendingPorts([message, replyTo], new $._NativeJsSendPort_send_anon
(this, message, replyTo)); |
| 791 }, |
| 792 send$1: function($receiver, message) { |
| 793 return this.send$2($receiver, message, null); |
| 794 }, |
| 795 $eq: function(_, other) { |
| 796 if (other == null) |
| 797 return false; |
| 798 return typeof other === "object" && other !== null && !!$.getInterceptor(oth
er).$is_NativeJsSendPort && $.$eq(this._receivePort, other._receivePort) === tru
e; |
| 799 }, |
| 800 get$hashCode: function(_) { |
| 801 return this._receivePort.get$_id(); |
| 802 }, |
| 803 $is_NativeJsSendPort: true, |
| 804 $isSendPort: true |
| 805 }; |
| 806 |
| 807 $$._NativeJsSendPort_send_anon = {"": "Closure;this_1,message_2,replyTo_3", |
| 808 call$0: function() { |
| 809 var t1, t2, t3, t4, isolate, shouldSerialize, msg; |
| 810 t1 = {}; |
| 811 t2 = this.this_1; |
| 812 t3 = this.replyTo_3; |
| 813 t2._checkReplyTo$1(t3); |
| 814 t4 = $globalState.isolates; |
| 815 isolate = t4.$index(t4, t2.get$_isolateId()); |
| 816 if (isolate == null) |
| 817 return; |
| 818 if (t2.get$_receivePort().get$_callback() == null) |
| 819 return; |
| 820 shouldSerialize = $globalState.currentContext != null && $.$eq($.get$id$x($g
lobalState.currentContext), t2.get$_isolateId()) !== true; |
| 821 msg = this.message_2; |
| 822 t1.msg_0 = msg; |
| 823 t1.reply_1 = t3; |
| 824 if (shouldSerialize) { |
| 825 t1.msg_0 = $._serializeMessage(t1.msg_0); |
| 826 t1.reply_1 = $._serializeMessage(t1.reply_1); |
| 827 } |
| 828 $globalState.topEventLoop.enqueue$3(isolate, new $._NativeJsSendPort_send__a
non(t1, t2, shouldSerialize), "receive " + $.S(msg)); |
| 829 } |
| 830 }; |
| 831 |
| 832 $$._NativeJsSendPort_send__anon = {"": "Closure;box_0,this_4,shouldSerialize_5", |
| 833 call$0: function() { |
| 834 var t1, t2; |
| 835 t1 = this.this_4; |
| 836 if (t1.get$_receivePort().get$_callback() != null) { |
| 837 if (this.shouldSerialize_5) { |
| 838 t2 = this.box_0; |
| 839 t2.msg_0 = $._deserializeMessage(t2.msg_0); |
| 840 t2.reply_1 = $._deserializeMessage(t2.reply_1); |
| 841 } |
| 842 t1 = t1.get$_receivePort(); |
| 843 t2 = this.box_0; |
| 844 t1._callback$2(t2.msg_0, t2.reply_1); |
| 845 } |
| 846 } |
| 847 }; |
| 848 |
| 849 $$._WorkerSendPort = {"": "_BaseSendPort;_workerId<,_receivePortId,_isolateId", |
| 850 send$2: function(_, message, replyTo) { |
| 851 $._waitForPendingPorts([message, replyTo], new $._WorkerSendPort_send_anon(t
his, message, replyTo)); |
| 852 }, |
| 853 send$1: function($receiver, message) { |
| 854 return this.send$2($receiver, message, null); |
| 855 }, |
| 856 $eq: function(_, other) { |
| 857 var t1; |
| 858 if (other == null) |
| 859 return false; |
| 860 if (typeof other === "object" && other !== null && !!$.getInterceptor(other)
.$is_WorkerSendPort) |
| 861 t1 = $.$eq(this._workerId, other._workerId) === true && $.$eq(this._isolat
eId, other._isolateId) === true && $.$eq(this._receivePortId, other._receivePort
Id) === true; |
| 862 else |
| 863 t1 = false; |
| 864 return t1; |
| 865 }, |
| 866 get$hashCode: function(_) { |
| 867 var t1, t2, t3; |
| 868 t1 = $.$shl$n(this._workerId, 16); |
| 869 t2 = $.$shl$n(this._isolateId, 8); |
| 870 t3 = this._receivePortId; |
| 871 if (typeof t3 !== "number") |
| 872 throw $.iae(t3); |
| 873 return (t1 ^ t2 ^ t3) >>> 0; |
| 874 }, |
| 875 $is_WorkerSendPort: true, |
| 876 $isSendPort: true |
| 877 }; |
| 878 |
| 879 $$._WorkerSendPort_send_anon = {"": "Closure;this_0,message_1,replyTo_2", |
| 880 call$0: function() { |
| 881 var t1, t2, workerMessage, manager; |
| 882 t1 = this.this_0; |
| 883 t2 = this.replyTo_2; |
| 884 t1._checkReplyTo$1(t2); |
| 885 workerMessage = $._serializeMessage($.makeLiteralMap(["command", "message",
"port", t1, "msg", this.message_1, "replyTo", t2])); |
| 886 if ($globalState.isWorker === true) { |
| 887 t1 = $globalState.mainManager; |
| 888 t1.postMessage$1(t1, workerMessage); |
| 889 } else { |
| 890 t2 = $globalState.managers; |
| 891 manager = t2.$index(t2, t1.get$_workerId()); |
| 892 if (manager != null) |
| 893 $.postMessage$1$x(manager, workerMessage); |
| 894 } |
| 895 } |
| 896 }; |
| 897 |
| 898 $$.ReceivePortImpl = {"": "Object;_id<,_callback<", |
| 899 _callback$2: function(arg0, arg1) { |
| 900 return this._callback.call$2(arg0, arg1); |
| 901 }, |
| 902 receive$1: function(onMessage) { |
| 903 this._callback = onMessage; |
| 904 }, |
| 905 close$0: function(_) { |
| 906 this._callback = null; |
| 907 $globalState.currentContext.unregister$1(this._id); |
| 908 }, |
| 909 toSendPort$0: function() { |
| 910 return $._NativeJsSendPort$(this, $.get$id$x($globalState.currentContext)); |
| 911 }, |
| 912 ReceivePortImpl$0: function() { |
| 913 $.register$2$x($._globalState().get$currentContext(), this._id, this); |
| 914 } |
| 915 }; |
| 916 |
| 917 $$._waitForPendingPorts_anon = {"": "Closure;callback_0", |
| 918 call$1: function(_) { |
| 919 return this.callback_0.call$0(); |
| 920 } |
| 921 }; |
| 922 |
| 923 $$._PendingSendPortFinder = {"": "_MessageTraverser;ports,_visited", |
| 924 visitPrimitive$1: function(x) { |
| 925 }, |
| 926 visitList$1: function(list) { |
| 927 var t1 = this._visited; |
| 928 if (t1.$index(t1, list) != null) |
| 929 return; |
| 930 t1 = this._visited; |
| 931 t1.$indexSet(t1, list, true); |
| 932 $.forEach$1$ax(list, new $._PendingSendPortFinder_visitList_anon(this)); |
| 933 }, |
| 934 visitMap$1: function(map) { |
| 935 var t1 = this._visited; |
| 936 if (t1.$index(t1, map) != null) |
| 937 return; |
| 938 t1 = this._visited; |
| 939 t1.$indexSet(t1, map, true); |
| 940 $.forEach$1$ax(map.get$values(map), new $._PendingSendPortFinder_visitMap_an
on(this)); |
| 941 }, |
| 942 visitSendPort$1: function(port) { |
| 943 if (false) |
| 944 this.ports.push(port.get$_futurePort()); |
| 945 }, |
| 946 visitIsolateSink$1: function(sink) { |
| 947 var t1 = sink._port; |
| 948 if (false) |
| 949 this.ports.push(t1.get$_futurePort()); |
| 950 }, |
| 951 visitCloseToken$1: function(token) { |
| 952 }, |
| 953 _PendingSendPortFinder$0: function() { |
| 954 this._visited = $._JsVisitedMap$(); |
| 955 } |
| 956 }; |
| 957 |
| 958 $$._PendingSendPortFinder_visitList_anon = {"": "Closure;this_0", |
| 959 call$1: function(e) { |
| 960 return this.this_0._dispatch$1(e); |
| 961 } |
| 962 }; |
| 963 |
| 964 $$._PendingSendPortFinder_visitMap_anon = {"": "Closure;this_0", |
| 965 call$1: function(e) { |
| 966 return this.this_0._dispatch$1(e); |
| 967 } |
| 968 }; |
| 969 |
| 970 $$._JsSerializer = {"": "_Serializer;_nextFreeRefId,_visited", |
| 971 visitSendPort$1: function(x) { |
| 972 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_NativeJ
sSendPort) |
| 973 return ["sendport", $globalState.currentManagerId, x._isolateId, x._receiv
ePort.get$_id()]; |
| 974 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_WorkerS
endPort) |
| 975 return ["sendport", x._workerId, x._isolateId, x._receivePortId]; |
| 976 throw $.wrapException("Illegal underlying port " + $.S(x)); |
| 977 }, |
| 978 visitIsolateSink$1: function(sink) { |
| 979 var isClosed = sink._isClosed; |
| 980 return ["isolateSink", this.visitSendPort$1(sink._port), isClosed]; |
| 981 }, |
| 982 visitCloseToken$1: function(token) { |
| 983 return ["closeToken"]; |
| 984 }, |
| 985 _JsSerializer$0: function() { |
| 986 this._visited = $._JsVisitedMap$(); |
| 987 } |
| 988 }; |
| 989 |
| 990 $$._JsCopier = {"": "_Copier;_visited", |
| 991 visitSendPort$1: function(x) { |
| 992 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_NativeJ
sSendPort) |
| 993 return $._NativeJsSendPort$(x._receivePort, x._isolateId); |
| 994 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_WorkerS
endPort) |
| 995 return $._WorkerSendPort$(x._workerId, x._isolateId, x._receivePortId); |
| 996 throw $.wrapException("Illegal underlying port " + $.S(this.get$p())); |
| 997 }, |
| 998 visitIsolateSink$1: function(sink) { |
| 999 var isClosed, result; |
| 1000 isClosed = sink._isClosed; |
| 1001 result = $.JsIsolateSink$fromPort(this.visitSendPort$1(sink._port)); |
| 1002 result._isClosed = isClosed; |
| 1003 return result; |
| 1004 }, |
| 1005 visitCloseToken$1: function(token) { |
| 1006 return token; |
| 1007 }, |
| 1008 _JsCopier$0: function() { |
| 1009 this._visited = $._JsVisitedMap$(); |
| 1010 } |
| 1011 }; |
| 1012 |
| 1013 $$._JsDeserializer = {"": "_Deserializer;_deserialized", |
| 1014 deserializeSendPort$1: function(list) { |
| 1015 var t1, managerId, isolateId, receivePortId, isolate, receivePort; |
| 1016 t1 = $.getInterceptor$asx(list); |
| 1017 managerId = t1.$index(list, 1); |
| 1018 isolateId = t1.$index(list, 2); |
| 1019 receivePortId = t1.$index(list, 3); |
| 1020 if ($.$eq(managerId, $globalState.currentManagerId) === true) { |
| 1021 t1 = $globalState.isolates; |
| 1022 isolate = t1.$index(t1, isolateId); |
| 1023 if (isolate == null) |
| 1024 return; |
| 1025 receivePort = isolate.lookup$1(receivePortId); |
| 1026 if (receivePort == null) |
| 1027 return; |
| 1028 return $._NativeJsSendPort$(receivePort, isolateId); |
| 1029 } else |
| 1030 return $._WorkerSendPort$(managerId, isolateId, receivePortId); |
| 1031 }, |
| 1032 deserializeIsolateSink$1: function(list) { |
| 1033 var t1, port, isClosed, result; |
| 1034 t1 = $.getInterceptor$asx(list); |
| 1035 port = this.deserializeSendPort$1(t1.$index(list, 1)); |
| 1036 isClosed = t1.$index(list, 2); |
| 1037 result = $.JsIsolateSink$fromPort(port); |
| 1038 result._isClosed = isClosed; |
| 1039 return result; |
| 1040 }, |
| 1041 deserializeCloseToken$1: function(list) { |
| 1042 return $.C_CloseToken; |
| 1043 } |
| 1044 }; |
| 1045 |
| 1046 $$._JsVisitedMap = {"": "Object;tagged", |
| 1047 $index: function(_, object) { |
| 1048 return object.__MessageTraverser__attached_info__; |
| 1049 }, |
| 1050 $indexSet: function(_, object, info) { |
| 1051 $.add$1$ax(this.tagged, object); |
| 1052 object.__MessageTraverser__attached_info__ = info; |
| 1053 }, |
| 1054 reset$0: function(_) { |
| 1055 this.tagged = $.List_List($); |
| 1056 }, |
| 1057 cleanup$0: function() { |
| 1058 var $length, i; |
| 1059 for ($length = $.get$length$asx(this.tagged), i = 0; i < $length; ++i) |
| 1060 $.$index$asx(this.tagged, i).__MessageTraverser__attached_info__ = null; |
| 1061 this.tagged = null; |
| 1062 } |
| 1063 }; |
| 1064 |
| 1065 $$._MessageTraverserVisitedMap = {"": "Object;", |
| 1066 $index: function(_, object) { |
| 1067 return; |
| 1068 }, |
| 1069 $indexSet: function(_, object, info) { |
| 1070 }, |
| 1071 reset$0: function(_) { |
| 1072 }, |
| 1073 cleanup$0: function() { |
| 1074 } |
| 1075 }; |
| 1076 |
| 1077 $$._MessageTraverser = {"": "Object;", |
| 1078 traverse$1: function(x) { |
| 1079 var result, t1; |
| 1080 t1 = x; |
| 1081 if (t1 == null || typeof t1 === "string" || typeof t1 === "number" || typeof
t1 === "boolean") |
| 1082 return this.visitPrimitive$1(x); |
| 1083 t1 = this._visited; |
| 1084 t1.reset$0(t1); |
| 1085 result = null; |
| 1086 try { |
| 1087 result = this._dispatch$1(x); |
| 1088 } finally { |
| 1089 this._visited.cleanup$0(); |
| 1090 } |
| 1091 return result; |
| 1092 }, |
| 1093 _dispatch$1: function(x) { |
| 1094 if (x == null || typeof x === "string" || typeof x === "number" || typeof x
=== "boolean") |
| 1095 return this.visitPrimitive$1(x); |
| 1096 if (typeof x === "object" && x !== null && (x.constructor === Array || $.get
Interceptor(x).$isList())) |
| 1097 return this.visitList$1(x); |
| 1098 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isMap) |
| 1099 return this.visitMap$1(x); |
| 1100 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isSendPort
) |
| 1101 return this.visitSendPort$1(x); |
| 1102 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isJsIsolat
eSink) |
| 1103 return this.visitIsolateSink$1(x); |
| 1104 if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isCloseTok
en) |
| 1105 return this.visitCloseToken$1(x); |
| 1106 $.throwExpression("Message serialization: Illegal value " + $.S(x) + " passe
d"); |
| 1107 return; |
| 1108 } |
| 1109 }; |
| 1110 |
| 1111 $$._Copier = {"": "_MessageTraverser;", |
| 1112 visitPrimitive$1: function(x) { |
| 1113 return x; |
| 1114 }, |
| 1115 visitList$1: function(list) { |
| 1116 var t1, copy, len, i; |
| 1117 if (typeof list !== "string" && (typeof list !== "object" || list === null |
| list.constructor !== Array && !$.getInterceptor(list).$isJavaScriptIndexingBeh
avior())) |
| 1118 return this.visitList$1$bailout1(1, list); |
| 1119 t1 = this._visited; |
| 1120 copy = t1.$index(t1, list); |
| 1121 if (copy != null) |
| 1122 return copy; |
| 1123 len = list.length; |
| 1124 copy = $.List_List(len); |
| 1125 t1 = this._visited; |
| 1126 t1.$indexSet(t1, list, copy); |
| 1127 for (i = 0; i < len; ++i) { |
| 1128 if (i >= list.length) |
| 1129 throw $.ioore(i); |
| 1130 copy[i] = this._dispatch$1(list[i]); |
| 1131 } |
| 1132 return copy; |
| 1133 }, |
| 1134 visitList$1$bailout1: function(state0, list) { |
| 1135 var t1, copy, len, t2, i, t3; |
| 1136 t1 = this._visited; |
| 1137 copy = t1.$index(t1, list); |
| 1138 if (copy != null) |
| 1139 return copy; |
| 1140 t1 = $.getInterceptor$asx(list); |
| 1141 len = t1.get$length(list); |
| 1142 copy = $.List_List(len); |
| 1143 t2 = this._visited; |
| 1144 t2.$indexSet(t2, list, copy); |
| 1145 for (t2 = copy.length, i = 0; $.JSNumber_methods.$lt(i, len); ++i) { |
| 1146 t3 = this._dispatch$1(t1.$index(list, i)); |
| 1147 if (i >= t2) |
| 1148 throw $.ioore(i); |
| 1149 copy[i] = t3; |
| 1150 } |
| 1151 return copy; |
| 1152 }, |
| 1153 visitMap$1: function(map) { |
| 1154 var t1, t2; |
| 1155 t1 = {}; |
| 1156 t2 = this._visited; |
| 1157 t1.copy_0 = t2.$index(t2, map); |
| 1158 t2 = t1.copy_0; |
| 1159 if (t2 != null) |
| 1160 return t2; |
| 1161 t1.copy_0 = $.HashMap$(); |
| 1162 t2 = this._visited; |
| 1163 t2.$indexSet(t2, map, t1.copy_0); |
| 1164 map.forEach$1(map, new $._Copier_visitMap_anon(t1, this)); |
| 1165 return t1.copy_0; |
| 1166 } |
| 1167 }; |
| 1168 |
| 1169 $$._Copier_visitMap_anon = {"": "Closure;box_0,this_1", |
| 1170 call$2: function(key, val) { |
| 1171 var t1, t2; |
| 1172 t1 = this.box_0.copy_0; |
| 1173 t2 = this.this_1; |
| 1174 $.$indexSet$ax(t1, t2._dispatch$1(key), t2._dispatch$1(val)); |
| 1175 } |
| 1176 }; |
| 1177 |
| 1178 $$._Serializer = {"": "_MessageTraverser;", |
| 1179 visitPrimitive$1: function(x) { |
| 1180 return x; |
| 1181 }, |
| 1182 visitList$1: function(list) { |
| 1183 var t1, copyId, id; |
| 1184 t1 = this._visited; |
| 1185 copyId = t1.$index(t1, list); |
| 1186 if (copyId != null) |
| 1187 return ["ref", copyId]; |
| 1188 id = this._nextFreeRefId; |
| 1189 this._nextFreeRefId = id + 1; |
| 1190 t1 = this._visited; |
| 1191 t1.$indexSet(t1, list, id); |
| 1192 return ["list", id, this._serializeList$1(list)]; |
| 1193 }, |
| 1194 visitMap$1: function(map) { |
| 1195 var t1, copyId, id; |
| 1196 t1 = this._visited; |
| 1197 copyId = t1.$index(t1, map); |
| 1198 if (copyId != null) |
| 1199 return ["ref", copyId]; |
| 1200 id = this._nextFreeRefId; |
| 1201 this._nextFreeRefId = id + 1; |
| 1202 t1 = this._visited; |
| 1203 t1.$indexSet(t1, map, id); |
| 1204 return ["map", id, this._serializeList$1($.toList$0$ax(map.get$keys())), thi
s._serializeList$1($.toList$0$ax(map.get$values(map)))]; |
| 1205 }, |
| 1206 _serializeList$1: function(list) { |
| 1207 var len, result, i; |
| 1208 if (typeof list !== "string" && (typeof list !== "object" || list === null |
| list.constructor !== Array && !$.getInterceptor(list).$isJavaScriptIndexingBeh
avior())) |
| 1209 return this._serializeList$1$bailout(1, list); |
| 1210 len = list.length; |
| 1211 result = $.List_List(len); |
| 1212 for (i = 0; i < len; ++i) { |
| 1213 if (i >= list.length) |
| 1214 throw $.ioore(i); |
| 1215 result[i] = this._dispatch$1(list[i]); |
| 1216 } |
| 1217 return result; |
| 1218 }, |
| 1219 _serializeList$1$bailout: function(state0, list) { |
| 1220 var t1, len, result, t2, i, t3; |
| 1221 t1 = $.getInterceptor$asx(list); |
| 1222 len = t1.get$length(list); |
| 1223 result = $.List_List(len); |
| 1224 for (t2 = result.length, i = 0; $.JSNumber_methods.$lt(i, len); ++i) { |
| 1225 t3 = this._dispatch$1(t1.$index(list, i)); |
| 1226 if (i >= t2) |
| 1227 throw $.ioore(i); |
| 1228 result[i] = t3; |
| 1229 } |
| 1230 return result; |
| 1231 } |
| 1232 }; |
| 1233 |
| 1234 $$._Deserializer = {"": "Object;", |
| 1235 deserialize$1: function(x) { |
| 1236 if (x == null || typeof x === "string" || typeof x === "number" || typeof x
=== "boolean") |
| 1237 return x; |
| 1238 this._deserialized = $.HashMap$(); |
| 1239 return this._deserializeHelper$1(x); |
| 1240 }, |
| 1241 _deserializeHelper$1: function(x) { |
| 1242 var t1, id; |
| 1243 t1 = $.getInterceptor(x); |
| 1244 if (x == null || typeof x === "string" || typeof x === "number" || typeof x
=== "boolean") |
| 1245 return x; |
| 1246 switch (t1.$index(x, 0)) { |
| 1247 case "ref": |
| 1248 id = t1.$index(x, 1); |
| 1249 t1 = this._deserialized; |
| 1250 return t1.$index(t1, id); |
| 1251 case "list": |
| 1252 return this._deserializeList$1(x); |
| 1253 case "map": |
| 1254 return this._deserializeMap$1(x); |
| 1255 case "sendport": |
| 1256 return this.deserializeSendPort$1(x); |
| 1257 case "isolateSink": |
| 1258 return this.deserializeIsolateSink$1(x); |
| 1259 case "closeToken": |
| 1260 return this.deserializeCloseToken$1(x); |
| 1261 default: |
| 1262 $.throwExpression("Unexpected serialized object"); |
| 1263 return; |
| 1264 } |
| 1265 }, |
| 1266 _deserializeList$1: function(x) { |
| 1267 var t1, id, dartList, t2, len, i; |
| 1268 t1 = $.getInterceptor$asx(x); |
| 1269 id = t1.$index(x, 1); |
| 1270 dartList = t1.$index(x, 2); |
| 1271 if (typeof dartList !== "object" || dartList === null || (dartList.construct
or !== Array || !!dartList.immutable$list) && !$.getInterceptor(dartList).$isJav
aScriptIndexingBehavior()) |
| 1272 return this._deserializeList$1$bailout(1, dartList, id); |
| 1273 t2 = this._deserialized; |
| 1274 t2.$indexSet(t2, id, dartList); |
| 1275 len = dartList.length; |
| 1276 for (i = 0; i < len; ++i) { |
| 1277 if (i >= dartList.length) |
| 1278 throw $.ioore(i); |
| 1279 t1 = this._deserializeHelper$1(dartList[i]); |
| 1280 if (i >= dartList.length) |
| 1281 throw $.ioore(i); |
| 1282 dartList[i] = t1; |
| 1283 } |
| 1284 return dartList; |
| 1285 }, |
| 1286 _deserializeList$1$bailout: function(state0, dartList, id) { |
| 1287 var t2, len, i; |
| 1288 t2 = this._deserialized; |
| 1289 t2.$indexSet(t2, id, dartList); |
| 1290 t2 = $.getInterceptor$asx(dartList); |
| 1291 len = t2.get$length(dartList); |
| 1292 for (i = 0; $.JSNumber_methods.$lt(i, len); ++i) |
| 1293 t2.$indexSet(dartList, i, this._deserializeHelper$1(t2.$index(dartList, i)
)); |
| 1294 return dartList; |
| 1295 }, |
| 1296 _deserializeMap$1: function(x) { |
| 1297 var result, t1, id, t2, keys, values, len, i, key; |
| 1298 result = $.HashMap$(); |
| 1299 t1 = $.getInterceptor$asx(x); |
| 1300 id = t1.$index(x, 1); |
| 1301 t2 = this._deserialized; |
| 1302 t2.$indexSet(t2, id, result); |
| 1303 keys = t1.$index(x, 2); |
| 1304 if (typeof keys !== "string" && (typeof keys !== "object" || keys === null |
| keys.constructor !== Array && !$.getInterceptor(keys).$isJavaScriptIndexingBeh
avior())) |
| 1305 return this._deserializeMap$1$bailout(1, x, result, keys, t1); |
| 1306 values = t1.$index(x, 3); |
| 1307 if (typeof values !== "string" && (typeof values !== "object" || values ===
null || values.constructor !== Array && !$.getInterceptor(values).$isJavaScriptI
ndexingBehavior())) |
| 1308 return this._deserializeMap$1$bailout(2, 0, result, keys, 0, values); |
| 1309 len = keys.length; |
| 1310 for (i = 0; i < len; ++i) { |
| 1311 if (i >= keys.length) |
| 1312 throw $.ioore(i); |
| 1313 key = this._deserializeHelper$1(keys[i]); |
| 1314 if (i >= values.length) |
| 1315 throw $.ioore(i); |
| 1316 result.$indexSet(result, key, this._deserializeHelper$1(values[i])); |
| 1317 } |
| 1318 return result; |
| 1319 }, |
| 1320 _deserializeMap$1$bailout: function(state0, x, result, keys, t1, values) { |
| 1321 switch (state0) { |
| 1322 case 0: |
| 1323 result = $.HashMap$(); |
| 1324 t1 = $.getInterceptor$asx(x); |
| 1325 id = t1.$index(x, 1); |
| 1326 t2 = this._deserialized; |
| 1327 t2.$indexSet(t2, id, result); |
| 1328 keys = t1.$index(x, 2); |
| 1329 case 1: |
| 1330 state0 = 0; |
| 1331 values = t1.$index(x, 3); |
| 1332 case 2: |
| 1333 var id, t2, t3, len, i; |
| 1334 state0 = 0; |
| 1335 t3 = $.getInterceptor$asx(keys); |
| 1336 len = t3.get$length(keys); |
| 1337 for (t1 = $.getInterceptor$asx(values), i = 0; $.JSNumber_methods.$lt(i,
len); ++i) |
| 1338 result.$indexSet(result, this._deserializeHelper$1(t3.$index(keys, i))
, this._deserializeHelper$1(t1.$index(values, i))); |
| 1339 return result; |
| 1340 } |
| 1341 } |
| 1342 }; |
| 1343 |
| 1344 $$.TimerImpl = {"": "Object;_once,_inEventLoop,_handle?", |
| 1345 cancel$0: function() { |
| 1346 if ($.get$globalThis().setTimeout != null) { |
| 1347 if (this._inEventLoop) |
| 1348 throw $.wrapException($.UnsupportedError$("Timer in event loop cannot be
canceled.")); |
| 1349 if (this._handle == null) |
| 1350 return; |
| 1351 var t1 = $globalState.topEventLoop; |
| 1352 t1.activeTimerCount = t1.activeTimerCount - 1; |
| 1353 if (this._once) |
| 1354 $.get$globalThis().clearTimeout(this._handle); |
| 1355 else |
| 1356 $.get$globalThis().clearInterval(this._handle); |
| 1357 this._handle = null; |
| 1358 } else |
| 1359 throw $.wrapException($.UnsupportedError$("Canceling a timer.")); |
| 1360 }, |
| 1361 TimerImpl$2: function(milliseconds, callback) { |
| 1362 var t1; |
| 1363 if (milliseconds === 0) |
| 1364 t1 = $.hasTimer() !== true || $._globalState().get$isWorker() === true; |
| 1365 else |
| 1366 t1 = false; |
| 1367 if (t1) { |
| 1368 $._globalState().get$topEventLoop().enqueue$3($._globalState().get$current
Context(), callback, "timer"); |
| 1369 this._inEventLoop = true; |
| 1370 } else if ($.hasTimer() === true) { |
| 1371 t1 = $._globalState().get$topEventLoop(); |
| 1372 t1.activeTimerCount = t1.activeTimerCount + 1; |
| 1373 t1 = new $.internalCallback(this, callback); |
| 1374 this._handle = $.get$globalThis().setTimeout($.convertDartClosureToJS(t1,
0), milliseconds); |
| 1375 } else |
| 1376 throw $.wrapException($.UnsupportedError$("Timer greater than 0.")); |
| 1377 }, |
| 1378 TimerImpl$periodic$2: function(milliseconds, callback) { |
| 1379 var t1; |
| 1380 if ($.hasTimer() === true) { |
| 1381 t1 = $._globalState().get$topEventLoop(); |
| 1382 t1.activeTimerCount = t1.activeTimerCount + 1; |
| 1383 this._handle = $.get$globalThis().setInterval($.convertDartClosureToJS(new
$.anon(this, callback), 0), milliseconds); |
| 1384 } else |
| 1385 throw $.wrapException($.UnsupportedError$("Periodic timer.")); |
| 1386 } |
| 1387 }; |
| 1388 |
| 1389 $$.internalCallback = {"": "Closure;this_0,callback_1", |
| 1390 call$0: function() { |
| 1391 this.callback_1.call$0(); |
| 1392 this.this_0.set$_handle(null); |
| 1393 var t1 = $globalState.topEventLoop; |
| 1394 t1.activeTimerCount = t1.activeTimerCount - 1; |
| 1395 } |
| 1396 }; |
| 1397 |
| 1398 $$.anon = {"": "Closure;this_0,callback_1", |
| 1399 call$0: function() { |
| 1400 this.callback_1.call$1(this.this_0); |
| 1401 } |
| 1402 }; |
| 1403 |
| 1404 $$.JSArray = {"": "Interceptor;", |
| 1405 add$1: function(receiver, value) { |
| 1406 if (!!receiver.fixed$length) |
| 1407 $.throwExpression($.UnsupportedError$("add")); |
| 1408 receiver.push(value); |
| 1409 }, |
| 1410 removeLast$0: function(receiver) { |
| 1411 if (!!receiver.fixed$length) |
| 1412 $.throwExpression($.UnsupportedError$("removeLast")); |
| 1413 if (receiver.length === 0) |
| 1414 throw $.wrapException($.RangeError$value(-1)); |
| 1415 return receiver.pop(); |
| 1416 }, |
| 1417 remove$1: function(receiver, element) { |
| 1418 var i; |
| 1419 if (!!receiver.fixed$length) |
| 1420 $.throwExpression($.UnsupportedError$("remove")); |
| 1421 for (i = 0; i < receiver.length; ++i) { |
| 1422 if (i >= receiver.length || false) |
| 1423 $.throwExpression($.RangeError$value(i)); |
| 1424 if ($.$eq(receiver[i], element) === true) { |
| 1425 receiver.splice(i, 1); |
| 1426 return; |
| 1427 } |
| 1428 } |
| 1429 }, |
| 1430 addAll$1: function(receiver, collection) { |
| 1431 var t1, t2; |
| 1432 for (t1 = $.get$iterator$ax(collection); t1.moveNext$0() === true;) { |
| 1433 t2 = t1.get$current(); |
| 1434 if (!!receiver.fixed$length) |
| 1435 $.throwExpression($.UnsupportedError$("add")); |
| 1436 receiver.push(t2); |
| 1437 } |
| 1438 }, |
| 1439 forEach$1: function(receiver, f) { |
| 1440 var t1; |
| 1441 for (t1 = this.get$iterator(receiver); t1.moveNext$0();) |
| 1442 f.call$1(t1.get$current()); |
| 1443 return; |
| 1444 }, |
| 1445 join$1: function(receiver, separator) { |
| 1446 var t1, list, i, t2; |
| 1447 t1 = receiver.length; |
| 1448 list = $.List_List(t1); |
| 1449 for (i = 0; i < receiver.length; ++i) { |
| 1450 if (i >= receiver.length || false) |
| 1451 $.throwExpression($.RangeError$value(i)); |
| 1452 t2 = $.S(receiver[i]); |
| 1453 if (i >= t1) |
| 1454 throw $.ioore(i); |
| 1455 list[i] = t2; |
| 1456 } |
| 1457 return list.join(separator); |
| 1458 }, |
| 1459 skip$1: function(receiver, n) { |
| 1460 return $.SubListIterable$(receiver, n, null); |
| 1461 }, |
| 1462 fold$2: function(receiver, initialValue, combine) { |
| 1463 var t1; |
| 1464 for (t1 = this.get$iterator(receiver); t1.moveNext$0();) |
| 1465 initialValue = combine.call$2(initialValue, t1.get$current()); |
| 1466 return initialValue; |
| 1467 }, |
| 1468 elementAt$1: function(receiver, index) { |
| 1469 var t1; |
| 1470 if (typeof index !== "number" || Math.floor(index) !== index) |
| 1471 $.throwExpression($.ArgumentError$(index)); |
| 1472 t1 = $.getInterceptor$n(index); |
| 1473 if (t1.$ge(index, receiver.length) || t1.$lt(index, 0)) |
| 1474 $.throwExpression($.RangeError$value(index)); |
| 1475 return receiver[index]; |
| 1476 }, |
| 1477 sublist$2: function(receiver, start, end) { |
| 1478 if (typeof end !== "number") |
| 1479 return this.sublist$2$bailout(1, start, end, receiver); |
| 1480 if (start == null) |
| 1481 $.throwExpression($.ArgumentError$(null)); |
| 1482 if (typeof start !== "number" || Math.floor(start) !== start) |
| 1483 throw $.wrapException($.ArgumentError$(start)); |
| 1484 if (start < 0 || start > receiver.length) |
| 1485 throw $.wrapException($.RangeError$range(start, 0, receiver.length)); |
| 1486 if (typeof end !== "number" || Math.floor(end) !== end) |
| 1487 throw $.wrapException($.ArgumentError$(end)); |
| 1488 if (end < start || end > receiver.length) |
| 1489 throw $.wrapException($.RangeError$range(end, start, receiver.length)); |
| 1490 if (start === end) |
| 1491 return []; |
| 1492 return receiver.slice(start, end); |
| 1493 }, |
| 1494 sublist$2$bailout: function(state0, start, end, receiver) { |
| 1495 if (start == null) |
| 1496 $.throwExpression($.ArgumentError$(null)); |
| 1497 if (typeof start !== "number" || Math.floor(start) !== start) |
| 1498 throw $.wrapException($.ArgumentError$(start)); |
| 1499 if (start < 0 || start > receiver.length) |
| 1500 throw $.wrapException($.RangeError$range(start, 0, receiver.length)); |
| 1501 if (end == null) |
| 1502 end = receiver.length; |
| 1503 else { |
| 1504 if (typeof end !== "number" || Math.floor(end) !== end) |
| 1505 throw $.wrapException($.ArgumentError$(end)); |
| 1506 if (end < start || end > receiver.length) |
| 1507 throw $.wrapException($.RangeError$range(end, start, receiver.length)); |
| 1508 } |
| 1509 if (start === end) |
| 1510 return []; |
| 1511 return receiver.slice(start, end); |
| 1512 }, |
| 1513 sublist$1: function($receiver, start) { |
| 1514 return this.sublist$2($receiver, start, null); |
| 1515 }, |
| 1516 get$first: function(receiver) { |
| 1517 if (receiver.length > 0) |
| 1518 return receiver[0]; |
| 1519 throw $.wrapException($.StateError$("No elements")); |
| 1520 }, |
| 1521 get$last: function(receiver) { |
| 1522 var t1 = receiver.length; |
| 1523 if (t1 > 0) |
| 1524 return receiver[t1 - 1]; |
| 1525 throw $.wrapException($.StateError$("No elements")); |
| 1526 }, |
| 1527 setRange$4: function(receiver, start, end, iterable, skipCount) { |
| 1528 if (!!receiver.immutable$list) |
| 1529 $.throwExpression($.UnsupportedError$("set range")); |
| 1530 $.IterableMixinWorkaround_setRangeList(receiver, start, end, iterable, skipC
ount); |
| 1531 }, |
| 1532 get$isEmpty: function(receiver) { |
| 1533 return receiver.length === 0; |
| 1534 }, |
| 1535 toString$0: function(receiver) { |
| 1536 var result = $.StringBuffer$(""); |
| 1537 $.ToString__emitValue(receiver, result, $.List_List($)); |
| 1538 return result.toString$0(result); |
| 1539 }, |
| 1540 toList$1$growable: function(receiver, growable) { |
| 1541 return $.List_List$from(receiver, growable); |
| 1542 }, |
| 1543 toList$0: function($receiver) { |
| 1544 return this.toList$1$growable($receiver, true); |
| 1545 }, |
| 1546 get$iterator: function(receiver) { |
| 1547 return $.ListIterator$(receiver); |
| 1548 }, |
| 1549 get$hashCode: function(receiver) { |
| 1550 return $.Primitives_objectHashCode(receiver); |
| 1551 }, |
| 1552 get$length: function(receiver) { |
| 1553 return receiver.length; |
| 1554 }, |
| 1555 set$length: function(receiver, newLength) { |
| 1556 if (typeof newLength !== "number" || Math.floor(newLength) !== newLength) |
| 1557 throw $.wrapException($.ArgumentError$(newLength)); |
| 1558 if (newLength < 0) |
| 1559 throw $.wrapException($.RangeError$value(newLength)); |
| 1560 $.checkGrowable(receiver, "set length"); |
| 1561 receiver.length = newLength; |
| 1562 }, |
| 1563 $index: function(receiver, index) { |
| 1564 if (typeof index !== "number" || Math.floor(index) !== index) |
| 1565 throw $.wrapException($.ArgumentError$(index)); |
| 1566 if (index >= receiver.length || index < 0) |
| 1567 throw $.wrapException($.RangeError$value(index)); |
| 1568 return receiver[index]; |
| 1569 }, |
| 1570 $indexSet: function(receiver, index, value) { |
| 1571 if (!!receiver.immutable$list) |
| 1572 $.throwExpression($.UnsupportedError$("indexed set")); |
| 1573 if (typeof index !== "number" || Math.floor(index) !== index) |
| 1574 throw $.wrapException($.ArgumentError$(index)); |
| 1575 if (index >= receiver.length || index < 0) |
| 1576 throw $.wrapException($.RangeError$value(index)); |
| 1577 receiver[index] = value; |
| 1578 }, |
| 1579 $asList: function() { |
| 1580 return null; |
| 1581 }, |
| 1582 $asIterable: function() { |
| 1583 return null; |
| 1584 }, |
| 1585 $isList: function() { |
| 1586 return true; |
| 1587 }, |
| 1588 $isIterable: function() { |
| 1589 return true; |
| 1590 } |
| 1591 }; |
| 1592 |
| 1593 $$.JSMutableArray = {"": "JSArray;", |
| 1594 $asList: function() { |
| 1595 return function () { return [null]; }; |
| 1596 }, |
| 1597 $asIterable: function() { |
| 1598 return function () { return [null]; }; |
| 1599 } |
| 1600 }; |
| 1601 |
| 1602 $$.JSFixedArray = {"": "JSMutableArray;"}; |
| 1603 |
| 1604 $$.JSExtendableArray = {"": "JSMutableArray;"}; |
| 1605 |
| 1606 $$.Primitives_applyFunction_anon = {"": "Closure;namedArguments_0,buffer_1,argum
ents_2", |
| 1607 call$1: function($name) { |
| 1608 var t1, t2; |
| 1609 this.buffer_1.write$1("$" + $.S($name)); |
| 1610 t1 = this.arguments_2; |
| 1611 t2 = this.namedArguments_0; |
| 1612 t1.push(t2.$index(t2, $name)); |
| 1613 } |
| 1614 }; |
| 1615 |
| 1616 $$.DartError = {"": "Object;", |
| 1617 get$stack: function() { |
| 1618 return this.stack; |
| 1619 }, |
| 1620 toString$0: function(_) { |
| 1621 var dartException = this.dartException; |
| 1622 if (!!Error.captureStackTrace || this.get$stack() == null) |
| 1623 return $.toString$0(dartException); |
| 1624 else |
| 1625 return $.S(dartException) + "\n" + $.S(this.get$stack()); |
| 1626 }, |
| 1627 DartError$1: function(dartException) { |
| 1628 this.dartException = dartException; |
| 1629 this.toString = $.DartError_toStringWrapper.call$0; |
| 1630 } |
| 1631 }; |
| 1632 |
| 1633 $$._StackTrace = {"": "Object;_stack", |
| 1634 toString$0: function(_) { |
| 1635 var t1 = this._stack; |
| 1636 return t1 != null ? t1 : ""; |
| 1637 } |
| 1638 }; |
| 1639 |
| 1640 $$.invokeClosure_anon = {"": "Closure;closure_0", |
| 1641 call$0: function() { |
| 1642 return this.closure_0.call$0(); |
| 1643 } |
| 1644 }; |
| 1645 |
| 1646 $$.invokeClosure_anon0 = {"": "Closure;closure_1,arg1_2", |
| 1647 call$0: function() { |
| 1648 return this.closure_1.call$1(this.arg1_2); |
| 1649 } |
| 1650 }; |
| 1651 |
| 1652 $$.invokeClosure_anon1 = {"": "Closure;closure_3,arg1_4,arg2_5", |
| 1653 call$0: function() { |
| 1654 return this.closure_3.call$2(this.arg1_4, this.arg2_5); |
| 1655 } |
| 1656 }; |
| 1657 |
| 1658 $$.Closure = {"": "Object;", |
| 1659 toString$0: function(_) { |
| 1660 return "Closure"; |
| 1661 } |
| 1662 }; |
| 1663 |
| 1664 $$.Null = {"": "Object;"}; |
| 1665 |
| 1666 $$.JSNumber = {"": "Interceptor;", |
| 1667 get$isNaN: function(receiver) { |
| 1668 return isNaN(receiver); |
| 1669 }, |
| 1670 get$isInfinite: function(receiver) { |
| 1671 return receiver == Infinity || receiver == -Infinity; |
| 1672 }, |
| 1673 remainder$1: function(receiver, b) { |
| 1674 return receiver % b; |
| 1675 }, |
| 1676 abs$0: function(receiver) { |
| 1677 return Math.abs(receiver); |
| 1678 }, |
| 1679 toInt$0: function(receiver) { |
| 1680 var truncated; |
| 1681 if (this.get$isNaN(receiver)) |
| 1682 throw $.wrapException($.UnsupportedError$("NaN")); |
| 1683 if (this.get$isInfinite(receiver)) |
| 1684 throw $.wrapException($.UnsupportedError$("Infinity")); |
| 1685 truncated = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); |
| 1686 return truncated == -0.0 ? 0 : truncated; |
| 1687 }, |
| 1688 truncate$0: function(receiver) { |
| 1689 var truncated; |
| 1690 if (this.get$isNaN(receiver)) |
| 1691 $.throwExpression($.UnsupportedError$("NaN")); |
| 1692 if (this.get$isInfinite(receiver)) |
| 1693 $.throwExpression($.UnsupportedError$("Infinity")); |
| 1694 truncated = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); |
| 1695 return truncated == -0.0 ? 0 : truncated; |
| 1696 }, |
| 1697 ceil$0: function(receiver) { |
| 1698 return this.toInt$0(Math.ceil(receiver)); |
| 1699 }, |
| 1700 floor$0: function(receiver) { |
| 1701 return this.toInt$0(Math.floor(receiver)); |
| 1702 }, |
| 1703 round$0: function(receiver) { |
| 1704 return this.toInt$0(this.roundToDouble$0(receiver)); |
| 1705 }, |
| 1706 roundToDouble$0: function(receiver) { |
| 1707 if (receiver < 0) |
| 1708 return -Math.round(-receiver); |
| 1709 else |
| 1710 return Math.round(receiver); |
| 1711 }, |
| 1712 toString$0: function(receiver) { |
| 1713 if (receiver === 0 && 1 / receiver < 0) |
| 1714 return "-0.0"; |
| 1715 else |
| 1716 return "" + receiver; |
| 1717 }, |
| 1718 get$hashCode: function(receiver) { |
| 1719 return receiver & 0x1FFFFFFF; |
| 1720 }, |
| 1721 $add: function(receiver, other) { |
| 1722 if (typeof other !== "number") |
| 1723 throw $.wrapException($.ArgumentError$(other)); |
| 1724 return receiver + other; |
| 1725 }, |
| 1726 $sub: function(receiver, other) { |
| 1727 if (typeof other !== "number") |
| 1728 throw $.wrapException($.ArgumentError$(other)); |
| 1729 return receiver - other; |
| 1730 }, |
| 1731 $div: function(receiver, other) { |
| 1732 if (typeof other !== "number") |
| 1733 throw $.wrapException($.ArgumentError$(other)); |
| 1734 return receiver / other; |
| 1735 }, |
| 1736 $mul: function(receiver, other) { |
| 1737 return receiver * other; |
| 1738 }, |
| 1739 $tdiv: function(receiver, other) { |
| 1740 return this.truncate$0(receiver / other); |
| 1741 }, |
| 1742 $shl: function(receiver, other) { |
| 1743 if (other < 0) |
| 1744 throw $.wrapException($.ArgumentError$(other)); |
| 1745 if (other > 31) |
| 1746 return 0; |
| 1747 return receiver << other >>> 0; |
| 1748 }, |
| 1749 $and: function(receiver, other) { |
| 1750 return (receiver & other) >>> 0; |
| 1751 }, |
| 1752 $lt: function(receiver, other) { |
| 1753 if (typeof other !== "number") |
| 1754 throw $.wrapException($.ArgumentError$(other)); |
| 1755 return receiver < other; |
| 1756 }, |
| 1757 $gt: function(receiver, other) { |
| 1758 if (typeof other !== "number") |
| 1759 throw $.wrapException($.ArgumentError$(other)); |
| 1760 return receiver > other; |
| 1761 }, |
| 1762 $le: function(receiver, other) { |
| 1763 if (typeof other !== "number") |
| 1764 throw $.wrapException($.ArgumentError$(other)); |
| 1765 return receiver <= other; |
| 1766 }, |
| 1767 $ge: function(receiver, other) { |
| 1768 if (typeof other !== "number") |
| 1769 throw $.wrapException($.ArgumentError$(other)); |
| 1770 return receiver >= other; |
| 1771 }, |
| 1772 $isnum: true |
| 1773 }; |
| 1774 |
| 1775 $$.JSInt = {"": "JSNumber;", $isint: true, $isnum: true}; |
| 1776 |
| 1777 $$.JSDouble = {"": "JSNumber;", $isdouble: true, $isnum: true}; |
| 1778 |
| 1779 $$.JSString = {"": "Interceptor;", |
| 1780 codeUnitAt$1: function(receiver, index) { |
| 1781 if (index < 0) |
| 1782 throw $.wrapException($.RangeError$value(index)); |
| 1783 if (index >= receiver.length) |
| 1784 throw $.wrapException($.RangeError$value(index)); |
| 1785 return receiver.charCodeAt(index); |
| 1786 }, |
| 1787 allMatches$1: function(receiver, str) { |
| 1788 return $.allMatchesInStringUnchecked(receiver, str); |
| 1789 }, |
| 1790 $add: function(receiver, other) { |
| 1791 if (typeof other !== "string") |
| 1792 throw $.wrapException($.ArgumentError$(other)); |
| 1793 return receiver + other; |
| 1794 }, |
| 1795 endsWith$1: function(receiver, other) { |
| 1796 var otherLength, t1; |
| 1797 otherLength = other.length; |
| 1798 t1 = receiver.length; |
| 1799 if (otherLength > t1) |
| 1800 return false; |
| 1801 return other === this.substring$1(receiver, t1 - otherLength); |
| 1802 }, |
| 1803 replaceAll$2: function(receiver, from, to) { |
| 1804 return $.stringReplaceAllUnchecked(receiver, from, to); |
| 1805 }, |
| 1806 split$1: function(receiver, pattern) { |
| 1807 return receiver.split(pattern); |
| 1808 }, |
| 1809 substring$2: function(receiver, startIndex, endIndex) { |
| 1810 if (endIndex == null) |
| 1811 endIndex = receiver.length; |
| 1812 if (typeof endIndex !== "number") |
| 1813 $.throwExpression($.ArgumentError$(endIndex)); |
| 1814 if (startIndex < 0) |
| 1815 throw $.wrapException($.RangeError$value(startIndex)); |
| 1816 if ($.JSNumber_methods.$gt(startIndex, endIndex)) |
| 1817 throw $.wrapException($.RangeError$value(startIndex)); |
| 1818 if ($.$gt$n(endIndex, receiver.length)) |
| 1819 throw $.wrapException($.RangeError$value(endIndex)); |
| 1820 return receiver.substring(startIndex, endIndex); |
| 1821 }, |
| 1822 substring$1: function($receiver, startIndex) { |
| 1823 return this.substring$2($receiver, startIndex, null); |
| 1824 }, |
| 1825 trim$0: function(receiver) { |
| 1826 return receiver.trim(); |
| 1827 }, |
| 1828 indexOf$2: function(receiver, other, start) { |
| 1829 if (other == null) |
| 1830 $.throwExpression($.ArgumentError$(null)); |
| 1831 if (typeof start !== "number" || Math.floor(start) !== start) |
| 1832 throw $.wrapException($.ArgumentError$(start)); |
| 1833 if (typeof other !== "string") |
| 1834 throw $.wrapException($.ArgumentError$(other)); |
| 1835 if (start < 0) |
| 1836 return -1; |
| 1837 return receiver.indexOf(other, start); |
| 1838 }, |
| 1839 contains$2: function(receiver, other, startIndex) { |
| 1840 if (other == null) |
| 1841 $.throwExpression($.ArgumentError$(null)); |
| 1842 return $.stringContainsUnchecked(receiver, other, startIndex); |
| 1843 }, |
| 1844 get$isEmpty: function(receiver) { |
| 1845 return receiver.length === 0; |
| 1846 }, |
| 1847 toString$0: function(receiver) { |
| 1848 return receiver; |
| 1849 }, |
| 1850 get$hashCode: function(receiver) { |
| 1851 var hash, i; |
| 1852 for (hash = 0, i = 0; i < receiver.length; ++i) { |
| 1853 hash = 536870911 & hash + receiver.charCodeAt(i); |
| 1854 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); |
| 1855 hash ^= hash >> 6; |
| 1856 } |
| 1857 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); |
| 1858 hash ^= hash >> 11; |
| 1859 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); |
| 1860 }, |
| 1861 get$length: function(receiver) { |
| 1862 return receiver.length; |
| 1863 }, |
| 1864 $index: function(receiver, index) { |
| 1865 if (typeof index !== "number" || Math.floor(index) !== index) |
| 1866 throw $.wrapException($.ArgumentError$(index)); |
| 1867 if (index >= receiver.length || index < 0) |
| 1868 throw $.wrapException($.RangeError$value(index)); |
| 1869 return receiver[index]; |
| 1870 }, |
| 1871 $isString: true |
| 1872 }; |
| 1873 |
| 1874 $$._convertJsonToDart_anon = {"": "Closure;", |
| 1875 call$2: function(key, value) { |
| 1876 return value; |
| 1877 } |
| 1878 }; |
| 1879 |
| 1880 $$._convertJsonToDart_walk = {"": "Closure;revive_0", |
| 1881 call$1: function(e) { |
| 1882 var list, t1, i, keys, map, key, proto; |
| 1883 if (e == null || typeof e != "object") |
| 1884 return e; |
| 1885 if (Object.getPrototypeOf(e) === Array.prototype) { |
| 1886 list = e; |
| 1887 for (t1 = this.revive_0, i = 0; i < list.length; ++i) |
| 1888 list[i] = t1.call$2(i, this.call$1(list[i])); |
| 1889 return list; |
| 1890 } |
| 1891 keys = Object.keys(e); |
| 1892 map = $.makeLiteralMap([]); |
| 1893 for (t1 = this.revive_0, i = 0; i < keys.length; ++i) { |
| 1894 key = keys[i]; |
| 1895 map.$indexSet(map, key, t1.call$2(key, this.call$1(e[key]))); |
| 1896 } |
| 1897 proto = e.__proto__; |
| 1898 if (typeof proto !== "undefined" && proto !== Object.prototype) |
| 1899 map.$indexSet(map, "__proto__", t1.call$2("__proto__", this.call$1(proto))
); |
| 1900 return map; |
| 1901 } |
| 1902 }; |
| 1903 |
| 1904 $$.StringMatch = {"": "Object;start,str,pattern", |
| 1905 $index: function(_, g) { |
| 1906 if ($.$eq(g, 0) !== true) |
| 1907 $.throwExpression($.RangeError$value(g)); |
| 1908 return this.pattern; |
| 1909 } |
| 1910 }; |
| 1911 |
| 1912 $$._CompleterImpl = {"": "Object;future,_isComplete", |
| 1913 complete$1: function(_, value) { |
| 1914 if (this._isComplete) |
| 1915 throw $.wrapException($.StateError$("Future already completed")); |
| 1916 this._isComplete = true; |
| 1917 this.future._setValue$1(value); |
| 1918 }, |
| 1919 completeError$2: function(error, stackTrace) { |
| 1920 if (this._isComplete) |
| 1921 throw $.wrapException($.StateError$("Future already completed")); |
| 1922 this._isComplete = true; |
| 1923 if (stackTrace != null) |
| 1924 $._attachStackTrace(error, stackTrace); |
| 1925 this.future._setError$1(error); |
| 1926 }, |
| 1927 completeError$1: function(error) { |
| 1928 return this.completeError$2(error, null); |
| 1929 } |
| 1930 }; |
| 1931 |
| 1932 $$._FutureListenerWrapper = {"": "Object;future,_nextListener@", |
| 1933 _sendValue$1: function(value) { |
| 1934 this.future._setValue$1(value); |
| 1935 }, |
| 1936 _sendError$1: function(error) { |
| 1937 this.future._setError$1(error); |
| 1938 } |
| 1939 }; |
| 1940 |
| 1941 $$._FutureImpl = {"": "Object;_state@,_resultOrListeners<", |
| 1942 get$_isComplete: function() { |
| 1943 return this._state !== 0; |
| 1944 }, |
| 1945 get$_hasValue: function() { |
| 1946 return this._state === 1; |
| 1947 }, |
| 1948 get$_hasError: function() { |
| 1949 return (this._state & 2) !== 0; |
| 1950 }, |
| 1951 get$_hasUnhandledError: function() { |
| 1952 return (this._state & 4) !== 0; |
| 1953 }, |
| 1954 then$2$onError: function(f, onError) { |
| 1955 var t1; |
| 1956 if (!this.get$_isComplete()) { |
| 1957 if (onError == null) { |
| 1958 t1 = $._ThenFuture$(f); |
| 1959 t1._subscribeTo$1(this); |
| 1960 return t1; |
| 1961 } |
| 1962 t1 = $._SubscribeFuture$(f, onError); |
| 1963 t1._subscribeTo$1(this); |
| 1964 return t1; |
| 1965 } |
| 1966 if (this.get$_hasError()) { |
| 1967 if (onError != null) |
| 1968 return this._handleError$2(onError, null); |
| 1969 return $._FutureWrapper$(this); |
| 1970 } else |
| 1971 return this._handleValue$1(f); |
| 1972 }, |
| 1973 then$1: function(f) { |
| 1974 return this.then$2$onError(f, null); |
| 1975 }, |
| 1976 catchError$2$test: function(f, test) { |
| 1977 var t1; |
| 1978 if (this.get$_hasValue()) |
| 1979 return $._FutureWrapper$(this); |
| 1980 if (!this.get$_isComplete()) { |
| 1981 t1 = $._CatchErrorFuture$(f, test); |
| 1982 t1._subscribeTo$1(this); |
| 1983 return t1; |
| 1984 } else |
| 1985 return this._handleError$2(f, test); |
| 1986 }, |
| 1987 catchError$1: function(f) { |
| 1988 return this.catchError$2$test(f, null); |
| 1989 }, |
| 1990 _handleValue$1: function(onValue) { |
| 1991 var thenFuture = $._ThenFuture$(onValue); |
| 1992 $.Timer_run(new $._FutureImpl__handleValue_anon(thenFuture, this._resultOrLi
steners)); |
| 1993 return thenFuture; |
| 1994 }, |
| 1995 _handleError$2: function(onError, test) { |
| 1996 var error, errorFuture; |
| 1997 this._state = (this._state & 4294967291) >>> 0; |
| 1998 error = this._resultOrListeners; |
| 1999 errorFuture = $._CatchErrorFuture$(onError, test); |
| 2000 $.Timer_run(new $._FutureImpl__handleError_anon(error, errorFuture)); |
| 2001 return errorFuture; |
| 2002 }, |
| 2003 _setValue$1: function(value) { |
| 2004 var listeners, listeners0; |
| 2005 if (this.get$_isComplete()) |
| 2006 throw $.wrapException($.StateError$("Future already completed")); |
| 2007 listeners = this._removeListeners$0(); |
| 2008 this._state = 1; |
| 2009 this._resultOrListeners = value; |
| 2010 for (; listeners != null; listeners = listeners0) { |
| 2011 listeners0 = listeners.get$_nextListener(); |
| 2012 listeners.set$_nextListener(null); |
| 2013 listeners._sendValue$1(value); |
| 2014 } |
| 2015 }, |
| 2016 get$_setValue: function() { |
| 2017 return new $.BoundClosure$1(this, "_setValue$1"); |
| 2018 }, |
| 2019 _setError$1: function(error) { |
| 2020 var listeners, listeners0; |
| 2021 if (this.get$_isComplete()) |
| 2022 throw $.wrapException($.StateError$("Future already completed")); |
| 2023 listeners = this._removeListeners$0(); |
| 2024 this._state = 2; |
| 2025 this._resultOrListeners = error; |
| 2026 if (listeners == null) { |
| 2027 this._scheduleUnhandledError$0(); |
| 2028 return; |
| 2029 } |
| 2030 do { |
| 2031 listeners0 = listeners.get$_nextListener(); |
| 2032 listeners.set$_nextListener(null); |
| 2033 listeners._sendError$1(error); |
| 2034 if (listeners0 != null) { |
| 2035 listeners = listeners0; |
| 2036 continue; |
| 2037 } else |
| 2038 break; |
| 2039 } while (true); |
| 2040 }, |
| 2041 get$_setError: function() { |
| 2042 return new $.BoundClosure$1(this, "_setError$1"); |
| 2043 }, |
| 2044 _scheduleUnhandledError$0: function() { |
| 2045 this._state = (this._state | 4) >>> 0; |
| 2046 $.Timer_run(new $._FutureImpl__scheduleUnhandledError_anon(this)); |
| 2047 }, |
| 2048 _addListener$1: function(listener) { |
| 2049 listener._nextListener = this._resultOrListeners; |
| 2050 this._resultOrListeners = listener; |
| 2051 }, |
| 2052 _removeListeners$0: function() { |
| 2053 var current, prev, next; |
| 2054 current = this._resultOrListeners; |
| 2055 this._resultOrListeners = null; |
| 2056 for (prev = null; current != null; prev = current, current = next) { |
| 2057 next = current.get$_nextListener(); |
| 2058 current.set$_nextListener(prev); |
| 2059 } |
| 2060 return prev; |
| 2061 }, |
| 2062 _chain$1: function(future) { |
| 2063 var t1; |
| 2064 if (!this.get$_isComplete()) { |
| 2065 t1 = future._asListener$0(); |
| 2066 t1._nextListener = this._resultOrListeners; |
| 2067 this._resultOrListeners = t1; |
| 2068 } else if (this.get$_hasValue()) |
| 2069 future._setValue$1(this._resultOrListeners); |
| 2070 else { |
| 2071 this._state = (this._state & 4294967291) >>> 0; |
| 2072 future._setError$1(this._resultOrListeners); |
| 2073 } |
| 2074 }, |
| 2075 _setOrChainValue$1: function(result) { |
| 2076 if (typeof result === "object" && result !== null && !!$.getInterceptor(resu
lt).$isFuture) |
| 2077 if (!!$.getInterceptor(result).$is_FutureImpl) { |
| 2078 result._chain$1(this); |
| 2079 return; |
| 2080 } else { |
| 2081 result.then$2$onError(this.get$_setValue(), this.get$_setError()); |
| 2082 return; |
| 2083 } |
| 2084 else |
| 2085 this._setValue$1(result); |
| 2086 }, |
| 2087 _asListener$0: function() { |
| 2088 return $._FutureListenerWrapper$(this); |
| 2089 }, |
| 2090 _FutureImpl$immediate$1: function(value) { |
| 2091 this._state = 1; |
| 2092 this._resultOrListeners = value; |
| 2093 }, |
| 2094 $is_FutureImpl: true, |
| 2095 $isFuture: true |
| 2096 }; |
| 2097 |
| 2098 $$._FutureImpl__FutureImpl$wait_handleError = {"": "Closure;box_0", |
| 2099 call$1: function(error) { |
| 2100 var t1 = this.box_0; |
| 2101 if (t1.values_1 != null) { |
| 2102 t1.values_1 = null; |
| 2103 t1.completer_0.completeError$1(error); |
| 2104 } |
| 2105 } |
| 2106 }; |
| 2107 |
| 2108 $$._FutureImpl__FutureImpl$wait_anon = {"": "Closure;box_0,pos_1", |
| 2109 call$1: function(value) { |
| 2110 var t1, t2; |
| 2111 t1 = this.box_0; |
| 2112 t2 = t1.values_1; |
| 2113 if (t2 == null) |
| 2114 return; |
| 2115 $.$indexSet$ax(t2, this.pos_1, value); |
| 2116 t1.remaining_2 = $.$sub$n(t1.remaining_2, 1); |
| 2117 if ($.$eq(t1.remaining_2, 0)) { |
| 2118 t2 = t1.completer_0; |
| 2119 t2.complete$1(t2, t1.values_1); |
| 2120 } |
| 2121 } |
| 2122 }; |
| 2123 |
| 2124 $$._FutureImpl__handleValue_anon = {"": "Closure;thenFuture_0,value_1", |
| 2125 call$0: function() { |
| 2126 this.thenFuture_0._sendValue$1(this.value_1); |
| 2127 } |
| 2128 }; |
| 2129 |
| 2130 $$._FutureImpl__handleError_anon = {"": "Closure;error_0,errorFuture_1", |
| 2131 call$0: function() { |
| 2132 this.errorFuture_1._sendError$1(this.error_0); |
| 2133 } |
| 2134 }; |
| 2135 |
| 2136 $$._FutureImpl__scheduleUnhandledError_anon = {"": "Closure;this_0", |
| 2137 call$0: function() { |
| 2138 var t1, error, trace; |
| 2139 t1 = this.this_0; |
| 2140 if (t1.get$_hasUnhandledError()) { |
| 2141 t1.set$_state((t1.get$_state() & 4294967291) >>> 0); |
| 2142 error = t1.get$_resultOrListeners(); |
| 2143 $.Primitives_printString("Uncaught Error: " + $.S(error)); |
| 2144 trace = $.getAttachedStackTrace(error); |
| 2145 if (trace != null) |
| 2146 $.Primitives_printString("Stack Trace:\n" + $.S(trace) + "\n"); |
| 2147 throw $.wrapException(error); |
| 2148 } |
| 2149 } |
| 2150 }; |
| 2151 |
| 2152 $$._TransformFuture = {"": "_FutureImpl;_nextListener@", |
| 2153 _subscribeTo$1: function(future) { |
| 2154 future._addListener$1(this); |
| 2155 }, |
| 2156 $as_FutureImpl: function (S, T) { return [T]; }, |
| 2157 $asFuture: function (S, T) { return [T]; } |
| 2158 }; |
| 2159 |
| 2160 $$._ThenFuture = {"": "_TransformFuture;_onValue,_nextListener,_state,_resultOrL
isteners", |
| 2161 _onValue$1: function(arg0) { |
| 2162 return this._onValue.call$1(arg0); |
| 2163 }, |
| 2164 _sendValue$1: function(value) { |
| 2165 var result, e, s, exception, t1; |
| 2166 result = null; |
| 2167 try { |
| 2168 result = this._onValue$1(value); |
| 2169 } catch (exception) { |
| 2170 t1 = $.unwrapException(exception); |
| 2171 e = t1; |
| 2172 s = $.getTraceFromException(exception); |
| 2173 this._setError$1($._asyncError(e, s)); |
| 2174 return; |
| 2175 } |
| 2176 |
| 2177 this._setOrChainValue$1(result); |
| 2178 }, |
| 2179 _sendError$1: function(error) { |
| 2180 this._setError$1(error); |
| 2181 }, |
| 2182 $as_FutureImpl: function (S, T) { return [T]; }, |
| 2183 $asFuture: function (S, T) { return [T]; } |
| 2184 }; |
| 2185 |
| 2186 $$._CatchErrorFuture = {"": "_TransformFuture;_test,_onError,_nextListener,_stat
e,_resultOrListeners", |
| 2187 _test$1: function(arg0) { |
| 2188 return this._test.call$1(arg0); |
| 2189 }, |
| 2190 _onError$1: function(arg0) { |
| 2191 return this._onError.call$1(arg0); |
| 2192 }, |
| 2193 _sendValue$1: function(value) { |
| 2194 this._setValue$1(value); |
| 2195 }, |
| 2196 _sendError$1: function(error) { |
| 2197 var matchesTest, e, s, result, e0, s0, exception, t1; |
| 2198 if (this._test != null) { |
| 2199 matchesTest = null; |
| 2200 try { |
| 2201 matchesTest = this._test$1(error); |
| 2202 } catch (exception) { |
| 2203 t1 = $.unwrapException(exception); |
| 2204 e = t1; |
| 2205 s = $.getTraceFromException(exception); |
| 2206 this._setError$1($._asyncError(e, s)); |
| 2207 return; |
| 2208 } |
| 2209 |
| 2210 if (matchesTest !== true) { |
| 2211 this._setError$1(error); |
| 2212 return; |
| 2213 } |
| 2214 } |
| 2215 result = null; |
| 2216 try { |
| 2217 result = this._onError$1(error); |
| 2218 } catch (exception) { |
| 2219 t1 = $.unwrapException(exception); |
| 2220 e0 = t1; |
| 2221 s0 = $.getTraceFromException(exception); |
| 2222 this._setError$1($._asyncError(e0, s0)); |
| 2223 return; |
| 2224 } |
| 2225 |
| 2226 this._setOrChainValue$1(result); |
| 2227 }, |
| 2228 $as_FutureImpl: null, |
| 2229 $asFuture: null |
| 2230 }; |
| 2231 |
| 2232 $$._SubscribeFuture = {"": "_ThenFuture;_onError,_onValue,_nextListener,_state,_
resultOrListeners", |
| 2233 _onError$1: function(arg0) { |
| 2234 return this._onError.call$1(arg0); |
| 2235 }, |
| 2236 _sendError$1: function(error) { |
| 2237 var result, e, s, exception, t1; |
| 2238 result = null; |
| 2239 try { |
| 2240 result = this._onError$1(error); |
| 2241 } catch (exception) { |
| 2242 t1 = $.unwrapException(exception); |
| 2243 e = t1; |
| 2244 s = $.getTraceFromException(exception); |
| 2245 this._setError$1($._asyncError(e, s)); |
| 2246 return; |
| 2247 } |
| 2248 |
| 2249 this._setOrChainValue$1(result); |
| 2250 }, |
| 2251 $as_FutureImpl: function (S, T) { return [T]; }, |
| 2252 $asFuture: function (S, T) { return [T]; } |
| 2253 }; |
| 2254 |
| 2255 $$._FutureWrapper = {"": "Object;_future", |
| 2256 then$2$onError: function($function, onError) { |
| 2257 return this._future.then$2$onError($function, onError); |
| 2258 }, |
| 2259 then$1: function($function) { |
| 2260 return this.then$2$onError($function, null); |
| 2261 }, |
| 2262 catchError$2$test: function($function, test) { |
| 2263 return this._future.catchError$2$test($function, test); |
| 2264 }, |
| 2265 catchError$1: function($function) { |
| 2266 return this.catchError$2$test($function, null); |
| 2267 }, |
| 2268 $isFuture: true |
| 2269 }; |
| 2270 |
| 2271 $$.Stream = {"": "Object;", |
| 2272 get$length: function(_) { |
| 2273 var t1, future, t2, t3; |
| 2274 t1 = {}; |
| 2275 future = $._FutureImpl$(); |
| 2276 t1.count_0 = 0; |
| 2277 t2 = new $.Stream_length_anon(t1); |
| 2278 t3 = future.get$_setError(); |
| 2279 this.listen$4$cancelOnError$onDone$onError(t2, true, new $.Stream_length_ano
n0(t1, future), t3); |
| 2280 return future; |
| 2281 }, |
| 2282 get$isEmpty: function(_) { |
| 2283 var t1, future, t2, t3; |
| 2284 t1 = {}; |
| 2285 future = $._FutureImpl$(); |
| 2286 t1.subscription_0 = null; |
| 2287 t2 = new $.Stream_isEmpty_anon(t1, future); |
| 2288 t3 = future.get$_setError(); |
| 2289 t1.subscription_0 = this.listen$4$cancelOnError$onDone$onError(t2, true, new
$.Stream_isEmpty_anon0(future), t3); |
| 2290 return future; |
| 2291 }, |
| 2292 skip$1: function(_, count) { |
| 2293 return $._SkipStream$(this, count); |
| 2294 } |
| 2295 }; |
| 2296 |
| 2297 $$.Stream_length_anon = {"": "Closure;box_0", |
| 2298 call$1: function(_) { |
| 2299 var t1 = this.box_0; |
| 2300 t1.count_0 = $.$add$ns(t1.count_0, 1); |
| 2301 } |
| 2302 }; |
| 2303 |
| 2304 $$.Stream_length_anon0 = {"": "Closure;box_0,future_1", |
| 2305 call$0: function() { |
| 2306 this.future_1._setValue$1(this.box_0.count_0); |
| 2307 } |
| 2308 }; |
| 2309 |
| 2310 $$.Stream_isEmpty_anon = {"": "Closure;box_0,future_1", |
| 2311 call$1: function(_) { |
| 2312 this.box_0.subscription_0.cancel$0(); |
| 2313 this.future_1._setValue$1(false); |
| 2314 } |
| 2315 }; |
| 2316 |
| 2317 $$.Stream_isEmpty_anon0 = {"": "Closure;future_2", |
| 2318 call$0: function() { |
| 2319 this.future_2._setValue$1(true); |
| 2320 } |
| 2321 }; |
| 2322 |
| 2323 $$.StreamSubscription = {"": "Object;"}; |
| 2324 |
| 2325 $$.EventSink = {"": "Object;"}; |
| 2326 |
| 2327 $$._throwDelayed_anon = {"": "Closure;error_0,stackTrace_1", |
| 2328 call$0: function() { |
| 2329 var t1, t2, trace, t3; |
| 2330 t1 = this.stackTrace_1; |
| 2331 if (t1 != null) |
| 2332 $.Primitives_printString($.JSNull_methods.toString$0(t1)); |
| 2333 t2 = this.error_0; |
| 2334 trace = $.getAttachedStackTrace(t2); |
| 2335 t3 = $.getInterceptor(trace); |
| 2336 if (trace != null && t3.$eq(trace, t1) !== true) |
| 2337 $.Primitives_printString(t3.toString$0(trace)); |
| 2338 throw $.wrapException(t2); |
| 2339 } |
| 2340 }; |
| 2341 |
| 2342 $$._ForwardingStream = {"": "Stream;", |
| 2343 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone,
onError) { |
| 2344 if (onData == null) |
| 2345 onData = $._nullDataHandler; |
| 2346 if (onError == null) |
| 2347 onError = $._nullErrorHandler; |
| 2348 if (onDone == null) |
| 2349 onDone = $._nullDoneHandler; |
| 2350 return $._ForwardingStreamSubscription$(this, onData, onError, onDone, true
=== cancelOnError); |
| 2351 }, |
| 2352 listen$3$onDone$onError: function(onData, onDone, onError) { |
| 2353 return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onEr
ror); |
| 2354 }, |
| 2355 _handleData$2: function(data, sink) { |
| 2356 sink._sendData$1(data); |
| 2357 }, |
| 2358 _handleError$2: function(error, sink) { |
| 2359 sink._sendError$1(error); |
| 2360 }, |
| 2361 _handleDone$1: function(sink) { |
| 2362 sink._sendDone$0(); |
| 2363 } |
| 2364 }; |
| 2365 |
| 2366 $$._BaseStreamSubscription = {"": "Object;", |
| 2367 _onData$1: function(arg0) { |
| 2368 return this._onData.call$1(arg0); |
| 2369 }, |
| 2370 _onError$1: function(arg0) { |
| 2371 return this._onError.call$1(arg0); |
| 2372 }, |
| 2373 _onDone$0: function() { |
| 2374 return this._onDone.call$0(); |
| 2375 }, |
| 2376 _BaseStreamSubscription$3: function(_onData, _onError, _onDone) { |
| 2377 if (this._onData == null) |
| 2378 this._onData = $._nullDataHandler; |
| 2379 if (this._onError == null) |
| 2380 this._onError = $._nullErrorHandler; |
| 2381 if (this._onDone == null) |
| 2382 this._onDone = $._nullDoneHandler; |
| 2383 } |
| 2384 }; |
| 2385 |
| 2386 $$._ForwardingStreamSubscription = {"": "_BaseStreamSubscription;_stream,_cancel
OnError,_subscription,_onData,_onError,_onDone", |
| 2387 cancel$0: function() { |
| 2388 var t1 = this._subscription; |
| 2389 if (t1 != null) { |
| 2390 t1.cancel$0(); |
| 2391 this._subscription = null; |
| 2392 } |
| 2393 }, |
| 2394 _sendData$1: function(data) { |
| 2395 this._onData$1(data); |
| 2396 }, |
| 2397 _sendError$1: function(error) { |
| 2398 this._onError$1(error); |
| 2399 if (this._cancelOnError) { |
| 2400 this._subscription.cancel$0(); |
| 2401 this._subscription = null; |
| 2402 } |
| 2403 }, |
| 2404 _sendDone$0: function() { |
| 2405 var t1 = this._subscription; |
| 2406 if (t1 != null) { |
| 2407 t1.cancel$0(); |
| 2408 this._subscription = null; |
| 2409 } |
| 2410 this._onDone$0(); |
| 2411 }, |
| 2412 _handleData$1: function(data) { |
| 2413 this._stream._handleData$2(data, this); |
| 2414 }, |
| 2415 get$_handleData: function() { |
| 2416 return new $.BoundClosure$1(this, "_handleData$1"); |
| 2417 }, |
| 2418 _handleError$1: function(error) { |
| 2419 this._stream._handleError$2(error, this); |
| 2420 }, |
| 2421 get$_handleError: function() { |
| 2422 return new $.BoundClosure$1(this, "_handleError$1"); |
| 2423 }, |
| 2424 _handleDone$0: function() { |
| 2425 this._subscription = null; |
| 2426 this._stream._handleDone$1(this); |
| 2427 }, |
| 2428 get$_handleDone: function() { |
| 2429 return new $.BoundClosure$0(this, "_handleDone$0"); |
| 2430 }, |
| 2431 _ForwardingStreamSubscription$5: function(_stream, onData, onError, onDone, _c
ancelOnError) { |
| 2432 var t1, t2; |
| 2433 t1 = this.get$_handleData(); |
| 2434 t2 = this.get$_handleError(); |
| 2435 this._subscription = this._stream._source.listen$3$onDone$onError(t1, this.g
et$_handleDone(), t2); |
| 2436 } |
| 2437 }; |
| 2438 |
| 2439 $$._SkipStream = {"": "_ForwardingStream;_remaining,_source", |
| 2440 _handleData$2: function(inputEvent, sink) { |
| 2441 var t1 = this._remaining; |
| 2442 if (t1 > 0) { |
| 2443 this._remaining = t1 - 1; |
| 2444 return; |
| 2445 } |
| 2446 return sink._sendData$1(inputEvent); |
| 2447 }, |
| 2448 _SkipStream$2: function(source, count) { |
| 2449 if (typeof count !== "number" || Math.floor(count) !== count || count < 0) |
| 2450 throw $.wrapException($.ArgumentError$(count)); |
| 2451 } |
| 2452 }; |
| 2453 |
| 2454 $$.Timer_run_anon = {"": "Closure;", |
| 2455 call$0: function() { |
| 2456 var runCallbacks, i, callback, newCallbacks, exception; |
| 2457 runCallbacks = $.get$Timer__runCallbacks(); |
| 2458 $.Timer__runCallbacks = []; |
| 2459 for (i = 0; $.$lt$n(i, $.get$length$asx(runCallbacks)); i = $.$add$ns(i, 1))
{ |
| 2460 callback = $.$index$asx(runCallbacks, i); |
| 2461 try { |
| 2462 callback.call$0(); |
| 2463 } catch (exception) { |
| 2464 $.unwrapException(exception); |
| 2465 newCallbacks = $.get$Timer__runCallbacks(); |
| 2466 $.Timer__runCallbacks = []; |
| 2467 i = $.$add$ns(i, 1); |
| 2468 $.addAll$1$ax($.get$Timer__runCallbacks(), $.sublist$1$ax(runCallbacks,
i)); |
| 2469 $.addAll$1$ax($.get$Timer__runCallbacks(), newCallbacks); |
| 2470 throw exception; |
| 2471 } |
| 2472 |
| 2473 } |
| 2474 } |
| 2475 }; |
| 2476 |
| 2477 $$.HashMap = {"": "Object;_liblib0$_length,_strings,_nums,_rest,_keys", |
| 2478 get$length: function(_) { |
| 2479 return this._liblib0$_length; |
| 2480 }, |
| 2481 get$isEmpty: function(_) { |
| 2482 return this._liblib0$_length === 0; |
| 2483 }, |
| 2484 get$keys: function() { |
| 2485 return $.HashMapKeyIterable$(this); |
| 2486 }, |
| 2487 get$values: function(_) { |
| 2488 var t1 = this.get$keys(); |
| 2489 return t1.map$1(t1, new $.HashMap_values_anon(this)); |
| 2490 }, |
| 2491 containsKey$1: function(key) { |
| 2492 var strings, nums, rest; |
| 2493 if (typeof key === "string" && key !== "__proto__") { |
| 2494 strings = this._strings; |
| 2495 return strings == null ? false : strings[key] != null; |
| 2496 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 2497 nums = this._nums; |
| 2498 return nums == null ? false : nums[key] != null; |
| 2499 } else { |
| 2500 rest = this._rest; |
| 2501 if (rest == null) |
| 2502 return false; |
| 2503 return $.HashMap__findBucketIndex(rest[$.get$hashCode$(key) & 0x3ffffff],
key) >= 0; |
| 2504 } |
| 2505 }, |
| 2506 addAll$1: function(_, other) { |
| 2507 $.forEach$1$ax(other, new $.HashMap_addAll_anon(this)); |
| 2508 }, |
| 2509 $index: function(_, key) { |
| 2510 var strings, t1, entry, nums, rest, bucket, index; |
| 2511 if (typeof key === "string" && key !== "__proto__") { |
| 2512 strings = this._strings; |
| 2513 if (strings == null) |
| 2514 t1 = null; |
| 2515 else { |
| 2516 entry = strings[key]; |
| 2517 t1 = entry === strings ? null : entry; |
| 2518 } |
| 2519 return t1; |
| 2520 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 2521 nums = this._nums; |
| 2522 if (nums == null) |
| 2523 t1 = null; |
| 2524 else { |
| 2525 entry = nums[key]; |
| 2526 t1 = entry === nums ? null : entry; |
| 2527 } |
| 2528 return t1; |
| 2529 } else { |
| 2530 rest = this._rest; |
| 2531 if (rest == null) |
| 2532 return; |
| 2533 bucket = rest[$.get$hashCode$(key) & 0x3ffffff]; |
| 2534 index = $.HashMap__findBucketIndex(bucket, key); |
| 2535 return index < 0 ? null : bucket[index + 1]; |
| 2536 } |
| 2537 }, |
| 2538 $indexSet: function(_, key, value) { |
| 2539 var strings, table, nums, rest, hash, bucket, index; |
| 2540 if (typeof key === "string" && key !== "__proto__") { |
| 2541 strings = this._strings; |
| 2542 if (strings == null) { |
| 2543 table = Object.create(null); |
| 2544 if (table == null) |
| 2545 ; |
| 2546 table["<non-identifier-key>"] = table; |
| 2547 delete table["<non-identifier-key>"]; |
| 2548 this._strings = table; |
| 2549 strings = table; |
| 2550 } |
| 2551 if (strings[key] == null) { |
| 2552 this._liblib0$_length = this._liblib0$_length + 1; |
| 2553 this._keys = null; |
| 2554 } |
| 2555 if (value == null) |
| 2556 value = strings; |
| 2557 strings[key] = value; |
| 2558 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 2559 nums = this._nums; |
| 2560 if (nums == null) { |
| 2561 table = Object.create(null); |
| 2562 if (table == null) |
| 2563 ; |
| 2564 table["<non-identifier-key>"] = table; |
| 2565 delete table["<non-identifier-key>"]; |
| 2566 this._nums = table; |
| 2567 nums = table; |
| 2568 } |
| 2569 if (nums[key] == null) { |
| 2570 this._liblib0$_length = this._liblib0$_length + 1; |
| 2571 this._keys = null; |
| 2572 } |
| 2573 if (value == null) |
| 2574 value = nums; |
| 2575 nums[key] = value; |
| 2576 } else { |
| 2577 rest = this._rest; |
| 2578 if (rest == null) { |
| 2579 table = Object.create(null); |
| 2580 if (table == null) |
| 2581 ; |
| 2582 table["<non-identifier-key>"] = table; |
| 2583 delete table["<non-identifier-key>"]; |
| 2584 this._rest = table; |
| 2585 rest = table; |
| 2586 } |
| 2587 hash = $.get$hashCode$(key) & 0x3ffffff; |
| 2588 bucket = rest[hash]; |
| 2589 if (bucket == null) { |
| 2590 value = [key, value]; |
| 2591 if (value == null) |
| 2592 value = rest; |
| 2593 rest[hash] = value; |
| 2594 this._liblib0$_length = this._liblib0$_length + 1; |
| 2595 this._keys = null; |
| 2596 } else { |
| 2597 index = $.HashMap__findBucketIndex(bucket, key); |
| 2598 if (index >= 0) |
| 2599 bucket[index + 1] = value; |
| 2600 else { |
| 2601 bucket.push(key, value); |
| 2602 this._liblib0$_length = this._liblib0$_length + 1; |
| 2603 this._keys = null; |
| 2604 } |
| 2605 } |
| 2606 } |
| 2607 }, |
| 2608 remove$1: function(_, key) { |
| 2609 var rest, bucket, index; |
| 2610 if (typeof key === "string" && key !== "__proto__") |
| 2611 return this._removeHashTableEntry$2(this._strings, key); |
| 2612 else if (typeof key === "number" && (key & 0x3ffffff) === key) |
| 2613 return this._removeHashTableEntry$2(this._nums, key); |
| 2614 else { |
| 2615 rest = this._rest; |
| 2616 if (rest == null) |
| 2617 return; |
| 2618 bucket = rest[$.get$hashCode$(key) & 0x3ffffff]; |
| 2619 index = $.HashMap__findBucketIndex(bucket, key); |
| 2620 if (index < 0) |
| 2621 return; |
| 2622 this._liblib0$_length = this._liblib0$_length - 1; |
| 2623 this._keys = null; |
| 2624 return bucket.splice(index, 2)[1]; |
| 2625 } |
| 2626 }, |
| 2627 forEach$1: function(_, action) { |
| 2628 var keys, $length, i, key; |
| 2629 keys = this._computeKeys$0(); |
| 2630 for ($length = $.get$length$asx(keys), i = 0; i < $length; ++i) { |
| 2631 key = keys[i]; |
| 2632 action.call$2(key, this.$index(this, key)); |
| 2633 if (keys !== this._keys) |
| 2634 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 2635 } |
| 2636 }, |
| 2637 toString$0: function(_) { |
| 2638 var result = $.StringBuffer$(""); |
| 2639 $.ToString__emitPair(this, result, $.List_List($)); |
| 2640 return result.toString$0(result); |
| 2641 }, |
| 2642 _computeKeys$0: function() { |
| 2643 var t1, result, strings, names, entries, index, i, nums, rest, bucket, $leng
th, i0; |
| 2644 t1 = this._keys; |
| 2645 if (t1 != null) |
| 2646 return t1; |
| 2647 result = $.List_List(this._liblib0$_length); |
| 2648 strings = this._strings; |
| 2649 if (strings != null) { |
| 2650 names = Object.getOwnPropertyNames(strings); |
| 2651 entries = names.length; |
| 2652 for (index = 0, i = 0; i < entries; ++i) { |
| 2653 result[index] = names[i]; |
| 2654 ++index; |
| 2655 } |
| 2656 } else |
| 2657 index = 0; |
| 2658 nums = this._nums; |
| 2659 if (nums != null) { |
| 2660 names = Object.getOwnPropertyNames(nums); |
| 2661 entries = names.length; |
| 2662 for (i = 0; i < entries; ++i) { |
| 2663 result[index] = +names[i]; |
| 2664 ++index; |
| 2665 } |
| 2666 } |
| 2667 rest = this._rest; |
| 2668 if (rest != null) { |
| 2669 names = Object.getOwnPropertyNames(rest); |
| 2670 entries = names.length; |
| 2671 for (i = 0; i < entries; ++i) { |
| 2672 bucket = rest[names[i]]; |
| 2673 $length = bucket.length; |
| 2674 for (i0 = 0; i0 < $length; i0 += 2) { |
| 2675 result[index] = bucket[i0]; |
| 2676 ++index; |
| 2677 } |
| 2678 } |
| 2679 } |
| 2680 this._keys = result; |
| 2681 return result; |
| 2682 }, |
| 2683 _removeHashTableEntry$2: function(table, key) { |
| 2684 var entry, value; |
| 2685 if (table != null && table[key] != null) { |
| 2686 entry = table[key]; |
| 2687 value = entry === table ? null : entry; |
| 2688 delete table[key]; |
| 2689 this._liblib0$_length = this._liblib0$_length - 1; |
| 2690 this._keys = null; |
| 2691 return value; |
| 2692 } else |
| 2693 return; |
| 2694 }, |
| 2695 $isMap: true |
| 2696 }; |
| 2697 |
| 2698 $$._HashSetBase = {"": "IterableBase;", |
| 2699 toString$0: function(_) { |
| 2700 var result = $.StringBuffer$(""); |
| 2701 $.ToString__emitValue(this, result, $.List_List($)); |
| 2702 return result.toString$0(result); |
| 2703 }, |
| 2704 $asIterable: function() { |
| 2705 return null; |
| 2706 }, |
| 2707 $isIterable: function() { |
| 2708 return true; |
| 2709 } |
| 2710 }; |
| 2711 |
| 2712 $$.IterableBase = {"": "Object;", |
| 2713 map$1: function(_, f) { |
| 2714 return $.MappedIterable$(this, f); |
| 2715 }, |
| 2716 forEach$1: function(_, f) { |
| 2717 var t1; |
| 2718 for (t1 = this.get$iterator(this); t1.moveNext$0() === true;) |
| 2719 f.call$1(t1.get$current()); |
| 2720 }, |
| 2721 join$1: function(_, separator) { |
| 2722 var iterator, buffer; |
| 2723 if (typeof separator !== "string") |
| 2724 return this.join$1$bailout(1, separator); |
| 2725 iterator = this.get$iterator(this); |
| 2726 if (iterator.moveNext$0() !== true) |
| 2727 return ""; |
| 2728 buffer = $.StringBuffer$(""); |
| 2729 if (separator === "") |
| 2730 do |
| 2731 buffer.write$1($.S(iterator.get$current())); |
| 2732 while (iterator.moveNext$0() === true); |
| 2733 else { |
| 2734 buffer.write$1($.S(iterator.get$current())); |
| 2735 for (; iterator.moveNext$0() === true;) { |
| 2736 buffer.write$1(separator); |
| 2737 buffer.write$1($.S(iterator.get$current())); |
| 2738 } |
| 2739 } |
| 2740 return buffer.toString$0(buffer); |
| 2741 }, |
| 2742 join$1$bailout: function(state0, separator) { |
| 2743 var iterator, buffer; |
| 2744 iterator = this.get$iterator(this); |
| 2745 if (iterator.moveNext$0() !== true) |
| 2746 return ""; |
| 2747 buffer = $.StringBuffer$(""); |
| 2748 if (separator == null || $.$eq(separator, "") === true) |
| 2749 do |
| 2750 buffer.write$1($.S(iterator.get$current())); |
| 2751 while (iterator.moveNext$0() === true); |
| 2752 else { |
| 2753 buffer.write$1($.S(iterator.get$current())); |
| 2754 for (; iterator.moveNext$0() === true;) { |
| 2755 buffer.write$1(separator); |
| 2756 buffer.write$1($.S(iterator.get$current())); |
| 2757 } |
| 2758 } |
| 2759 return buffer.toString$0(buffer); |
| 2760 }, |
| 2761 toList$1$growable: function(_, growable) { |
| 2762 return $.List_List$from(this, growable); |
| 2763 }, |
| 2764 toList$0: function($receiver) { |
| 2765 return this.toList$1$growable($receiver, true); |
| 2766 }, |
| 2767 get$length: function(_) { |
| 2768 var it, count; |
| 2769 it = this.get$iterator(this); |
| 2770 for (count = 0; it.moveNext$0() === true;) |
| 2771 ++count; |
| 2772 return count; |
| 2773 }, |
| 2774 get$isEmpty: function(_) { |
| 2775 return this.get$iterator(this).moveNext$0() !== true; |
| 2776 }, |
| 2777 skip$1: function(_, n) { |
| 2778 return $.SkipIterable$(this, n); |
| 2779 }, |
| 2780 elementAt$1: function(_, index) { |
| 2781 var t1, remaining, t2; |
| 2782 if (typeof index !== "number") |
| 2783 return this.elementAt$1$bailout(1, index); |
| 2784 if (typeof index !== "number" || Math.floor(index) !== index || index < 0) |
| 2785 throw $.wrapException($.RangeError$value(index)); |
| 2786 for (t1 = this.get$iterator(this), remaining = index; t1.moveNext$0() === tr
ue;) { |
| 2787 t2 = t1.get$current(); |
| 2788 if (remaining === 0) |
| 2789 return t2; |
| 2790 --remaining; |
| 2791 } |
| 2792 throw $.wrapException($.RangeError$value(index)); |
| 2793 }, |
| 2794 elementAt$1$bailout: function(state0, index) { |
| 2795 var t1, remaining, t2, t3; |
| 2796 if (typeof index !== "number" || Math.floor(index) !== index || index < 0) |
| 2797 throw $.wrapException($.RangeError$value(index)); |
| 2798 for (t1 = this.get$iterator(this), remaining = index; t1.moveNext$0() === tr
ue;) { |
| 2799 t2 = t1.get$current(); |
| 2800 t3 = $.getInterceptor(remaining); |
| 2801 if (t3.$eq(remaining, 0)) |
| 2802 return t2; |
| 2803 remaining = t3.$sub(remaining, 1); |
| 2804 } |
| 2805 throw $.wrapException($.RangeError$value(index)); |
| 2806 }, |
| 2807 $isIterable: function() { |
| 2808 return true; |
| 2809 }, |
| 2810 $asIterable: function() { |
| 2811 return null; |
| 2812 } |
| 2813 }; |
| 2814 |
| 2815 $$.LinkedHashMap = {"": "Object;_liblib0$_length,_strings,_nums,_rest,_first,_la
st,_modifications", |
| 2816 addAll$1: function(_, other) { |
| 2817 $.forEach$1$ax(other, new $.LinkedHashMap_addAll_anon(this)); |
| 2818 }, |
| 2819 $index: function(_, key) { |
| 2820 var strings, cell, nums, rest, bucket, index; |
| 2821 if (typeof key === "string" && key !== "__proto__") { |
| 2822 strings = this._strings; |
| 2823 if (strings == null) |
| 2824 return; |
| 2825 cell = strings[key]; |
| 2826 return cell == null ? null : cell.get$_value(); |
| 2827 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 2828 nums = this._nums; |
| 2829 if (nums == null) |
| 2830 return; |
| 2831 cell = nums[key]; |
| 2832 return cell == null ? null : cell.get$_value(); |
| 2833 } else { |
| 2834 rest = this._rest; |
| 2835 if (rest == null) |
| 2836 return; |
| 2837 bucket = rest[$.get$hashCode$(key) & 0x3ffffff]; |
| 2838 index = $.LinkedHashMap__findBucketIndex(bucket, key); |
| 2839 if (index < 0) |
| 2840 return; |
| 2841 return bucket[index].get$_value(); |
| 2842 } |
| 2843 }, |
| 2844 $indexSet: function(_, key, value) { |
| 2845 var strings, table, nums, rest, hash, bucket, index; |
| 2846 if (typeof key === "string" && key !== "__proto__") { |
| 2847 strings = this._strings; |
| 2848 if (strings == null) { |
| 2849 table = Object.create(null); |
| 2850 table["<non-identifier-key>"] = table; |
| 2851 delete table["<non-identifier-key>"]; |
| 2852 this._strings = table; |
| 2853 strings = table; |
| 2854 } |
| 2855 this._addHashTableEntry$3(strings, key, value); |
| 2856 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 2857 nums = this._nums; |
| 2858 if (nums == null) { |
| 2859 table = Object.create(null); |
| 2860 table["<non-identifier-key>"] = table; |
| 2861 delete table["<non-identifier-key>"]; |
| 2862 this._nums = table; |
| 2863 nums = table; |
| 2864 } |
| 2865 this._addHashTableEntry$3(nums, key, value); |
| 2866 } else { |
| 2867 rest = this._rest; |
| 2868 if (rest == null) { |
| 2869 table = Object.create(null); |
| 2870 table["<non-identifier-key>"] = table; |
| 2871 delete table["<non-identifier-key>"]; |
| 2872 this._rest = table; |
| 2873 rest = table; |
| 2874 } |
| 2875 hash = $.get$hashCode$(key) & 0x3ffffff; |
| 2876 bucket = rest[hash]; |
| 2877 if (bucket == null) |
| 2878 rest[hash] = [this._newLinkedCell$2(key, value)]; |
| 2879 else { |
| 2880 index = $.LinkedHashMap__findBucketIndex(bucket, key); |
| 2881 if (index >= 0) |
| 2882 bucket[index].set$_value(value); |
| 2883 else |
| 2884 bucket.push(this._newLinkedCell$2(key, value)); |
| 2885 } |
| 2886 } |
| 2887 }, |
| 2888 forEach$1: function(_, action) { |
| 2889 var cell, modifications; |
| 2890 cell = this._first; |
| 2891 modifications = this._modifications; |
| 2892 for (; cell != null;) { |
| 2893 action.call$2(cell.get$_key(), cell.get$_value()); |
| 2894 if (modifications !== this._modifications) |
| 2895 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 2896 cell = cell.get$_next(); |
| 2897 } |
| 2898 }, |
| 2899 get$keys: function() { |
| 2900 return $.LinkedHashMapKeyIterable$(this); |
| 2901 }, |
| 2902 get$values: function(_) { |
| 2903 var t1 = this.get$keys(); |
| 2904 return t1.map$1(t1, new $.LinkedHashMap_values_anon(this)); |
| 2905 }, |
| 2906 get$length: function(_) { |
| 2907 return this._liblib0$_length; |
| 2908 }, |
| 2909 get$isEmpty: function(_) { |
| 2910 return this._liblib0$_length === 0; |
| 2911 }, |
| 2912 toString$0: function(_) { |
| 2913 var result = $.StringBuffer$(""); |
| 2914 $.ToString__emitPair(this, result, $.List_List($)); |
| 2915 return result.toString$0(result); |
| 2916 }, |
| 2917 _addHashTableEntry$3: function(table, key, value) { |
| 2918 var cell = table[key]; |
| 2919 if (cell == null) |
| 2920 table[key] = this._newLinkedCell$2(key, value); |
| 2921 else |
| 2922 cell.set$_value(value); |
| 2923 }, |
| 2924 _newLinkedCell$2: function(key, value) { |
| 2925 var cell, last; |
| 2926 cell = $.LinkedHashMapCell$(key, value); |
| 2927 if (this._first == null) { |
| 2928 this._last = cell; |
| 2929 this._first = cell; |
| 2930 } else { |
| 2931 last = this._last; |
| 2932 cell._previous = last; |
| 2933 last._next = cell; |
| 2934 this._last = cell; |
| 2935 } |
| 2936 this._liblib0$_length = this._liblib0$_length + 1; |
| 2937 this._modifications = this._modifications + 1 & 67108863; |
| 2938 return cell; |
| 2939 }, |
| 2940 $isMap: true |
| 2941 }; |
| 2942 |
| 2943 $$.LinkedHashSet = {"": "_HashSetBase;_liblib0$_length,_strings,_nums,_rest,_fir
st,_last,_modifications", |
| 2944 get$iterator: function(_) { |
| 2945 return $.LinkedHashSetIterator$(this, this._modifications); |
| 2946 }, |
| 2947 get$length: function(_) { |
| 2948 return this._liblib0$_length; |
| 2949 }, |
| 2950 get$isEmpty: function(_) { |
| 2951 return this._liblib0$_length === 0; |
| 2952 }, |
| 2953 contains$1: function(_, object) { |
| 2954 var strings, nums, rest; |
| 2955 if (object !== "__proto__") { |
| 2956 strings = this._strings; |
| 2957 if (strings == null) |
| 2958 return false; |
| 2959 return strings[object] != null; |
| 2960 } else if (false) { |
| 2961 nums = this._nums; |
| 2962 if (nums == null) |
| 2963 return false; |
| 2964 return nums[object] != null; |
| 2965 } else { |
| 2966 rest = this._rest; |
| 2967 if (rest == null) |
| 2968 return false; |
| 2969 return $.LinkedHashSet__findBucketIndex(rest[$.JSString_methods.get$hashCo
de(object) & 0x3ffffff], object) >= 0; |
| 2970 } |
| 2971 }, |
| 2972 forEach$1: function(_, action) { |
| 2973 var cell, modifications; |
| 2974 cell = this._first; |
| 2975 modifications = this._modifications; |
| 2976 for (; cell != null;) { |
| 2977 action.call$1(cell.get$_element()); |
| 2978 if (modifications !== this._modifications) |
| 2979 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 2980 cell = cell.get$_next(); |
| 2981 } |
| 2982 }, |
| 2983 add$1: function(_, element) { |
| 2984 var strings, table, nums, rest, hash, bucket; |
| 2985 if (typeof element === "string" && element !== "__proto__") { |
| 2986 strings = this._strings; |
| 2987 if (strings == null) { |
| 2988 table = Object.create(null); |
| 2989 table["<non-identifier-key>"] = table; |
| 2990 delete table["<non-identifier-key>"]; |
| 2991 this._strings = table; |
| 2992 strings = table; |
| 2993 } |
| 2994 this._addHashTableEntry$2(strings, element); |
| 2995 } else if (typeof element === "number" && (element & 0x3ffffff) === element)
{ |
| 2996 nums = this._nums; |
| 2997 if (nums == null) { |
| 2998 table = Object.create(null); |
| 2999 table["<non-identifier-key>"] = table; |
| 3000 delete table["<non-identifier-key>"]; |
| 3001 this._nums = table; |
| 3002 nums = table; |
| 3003 } |
| 3004 this._addHashTableEntry$2(nums, element); |
| 3005 } else { |
| 3006 rest = this._rest; |
| 3007 if (rest == null) { |
| 3008 table = Object.create(null); |
| 3009 table["<non-identifier-key>"] = table; |
| 3010 delete table["<non-identifier-key>"]; |
| 3011 this._rest = table; |
| 3012 rest = table; |
| 3013 } |
| 3014 hash = $.get$hashCode$(element) & 0x3ffffff; |
| 3015 bucket = rest[hash]; |
| 3016 if (bucket == null) |
| 3017 rest[hash] = [this._newLinkedCell$1(element)]; |
| 3018 else { |
| 3019 if ($.LinkedHashSet__findBucketIndex(bucket, element) >= 0) |
| 3020 return; |
| 3021 bucket.push(this._newLinkedCell$1(element)); |
| 3022 } |
| 3023 } |
| 3024 }, |
| 3025 addAll$1: function(_, objects) { |
| 3026 var t1; |
| 3027 for (t1 = $.get$iterator$ax(objects); t1.moveNext$0() === true;) |
| 3028 this.add$1(this, t1.get$current()); |
| 3029 }, |
| 3030 remove$1: function(_, object) { |
| 3031 var rest, bucket, index; |
| 3032 if (object !== "__proto__") |
| 3033 return this._removeHashTableEntry$2(this._strings, object); |
| 3034 else if (false) |
| 3035 return this._removeHashTableEntry$2(this._nums, object); |
| 3036 else { |
| 3037 rest = this._rest; |
| 3038 if (rest == null) |
| 3039 return false; |
| 3040 bucket = rest[$.JSString_methods.get$hashCode(object) & 0x3ffffff]; |
| 3041 index = $.LinkedHashSet__findBucketIndex(bucket, object); |
| 3042 if (index < 0) |
| 3043 return false; |
| 3044 this._unlinkCell$1(bucket.splice(index, 1)[0]); |
| 3045 return true; |
| 3046 } |
| 3047 }, |
| 3048 _addHashTableEntry$2: function(table, element) { |
| 3049 if (table[element] != null) |
| 3050 return; |
| 3051 table[element] = this._newLinkedCell$1(element); |
| 3052 }, |
| 3053 _removeHashTableEntry$2: function(table, element) { |
| 3054 var cell; |
| 3055 if (table == null) |
| 3056 return false; |
| 3057 cell = table[element]; |
| 3058 if (cell == null) |
| 3059 return false; |
| 3060 this._unlinkCell$1(cell); |
| 3061 delete table[element]; |
| 3062 return true; |
| 3063 }, |
| 3064 _newLinkedCell$1: function(element) { |
| 3065 var cell, last; |
| 3066 cell = $.LinkedHashSetCell$(element); |
| 3067 if (this._first == null) { |
| 3068 this._last = cell; |
| 3069 this._first = cell; |
| 3070 } else { |
| 3071 last = this._last; |
| 3072 cell._previous = last; |
| 3073 last.set$_next(cell); |
| 3074 this._last = cell; |
| 3075 } |
| 3076 this._liblib0$_length = this._liblib0$_length + 1; |
| 3077 this._modifications = this._modifications + 1 & 67108863; |
| 3078 return cell; |
| 3079 }, |
| 3080 _unlinkCell$1: function(cell) { |
| 3081 var previous, next; |
| 3082 previous = cell.get$_previous(); |
| 3083 next = cell.get$_next(); |
| 3084 if (previous == null) |
| 3085 this._first = next; |
| 3086 else |
| 3087 previous.set$_next(next); |
| 3088 if (next == null) |
| 3089 this._last = previous; |
| 3090 else |
| 3091 next.set$_previous(previous); |
| 3092 this._liblib0$_length = this._liblib0$_length - 1; |
| 3093 this._modifications = this._modifications + 1 & 67108863; |
| 3094 }, |
| 3095 $asIterable: function() { |
| 3096 return null; |
| 3097 } |
| 3098 }; |
| 3099 |
| 3100 $$.ListBase = {"": "Object;", |
| 3101 get$iterator: function(_) { |
| 3102 return $.ListIterator$(this); |
| 3103 }, |
| 3104 elementAt$1: function(_, index) { |
| 3105 return this.$index(this, index); |
| 3106 }, |
| 3107 forEach$1: function(_, action) { |
| 3108 var $length, i; |
| 3109 $length = this.get$length(this); |
| 3110 if (typeof $length !== "number") |
| 3111 return this.forEach$1$bailout(1, action, $length); |
| 3112 for (i = 0; i < $length; ++i) { |
| 3113 action.call$1(this.$index(this, i)); |
| 3114 if ($length !== this.get$length(this)) |
| 3115 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 3116 } |
| 3117 }, |
| 3118 forEach$1$bailout: function(state0, action, $length) { |
| 3119 var t1, i; |
| 3120 for (t1 = $.getInterceptor($length), i = 0; $.JSNumber_methods.$lt(i, $lengt
h); ++i) { |
| 3121 action.call$1(this.$index(this, i)); |
| 3122 if (t1.$eq($length, this.get$length(this)) !== true) |
| 3123 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 3124 } |
| 3125 }, |
| 3126 get$isEmpty: function(_) { |
| 3127 return $.$eq(this.get$length(this), 0); |
| 3128 }, |
| 3129 where$1: function(_, test) { |
| 3130 return $.WhereIterable$(this, test); |
| 3131 }, |
| 3132 skip$1: function(_, count) { |
| 3133 return $.SubListIterable$(this, count, null); |
| 3134 }, |
| 3135 toList$1$growable: function(_, growable) { |
| 3136 var result, i, t1; |
| 3137 if (growable === true) { |
| 3138 result = $.List_List($); |
| 3139 $.JSArray_methods.set$length(result, this.get$length(this)); |
| 3140 } else |
| 3141 result = $.List_List(this.get$length(this)); |
| 3142 for (i = 0; $.JSNumber_methods.$lt(i, this.get$length(this)); ++i) { |
| 3143 t1 = this.$index(this, i); |
| 3144 if (i >= result.length) |
| 3145 throw $.ioore(i); |
| 3146 result[i] = t1; |
| 3147 } |
| 3148 return result; |
| 3149 }, |
| 3150 toList$0: function($receiver) { |
| 3151 return this.toList$1$growable($receiver, true); |
| 3152 }, |
| 3153 add$1: function(_, element) { |
| 3154 var t1 = this.get$length(this); |
| 3155 if (typeof t1 !== "number") |
| 3156 return this.add$1$bailout(1, element, t1); |
| 3157 this.set$length(this, t1 + 1); |
| 3158 this.$indexSet(this, t1, element); |
| 3159 }, |
| 3160 add$1$bailout: function(state0, element, t1) { |
| 3161 this.set$length(this, $.$add$ns(t1, 1)); |
| 3162 this.$indexSet(this, t1, element); |
| 3163 }, |
| 3164 addAll$1: function(_, iterable) { |
| 3165 var t1, t2, t3; |
| 3166 for (t1 = $.get$iterator$ax(iterable); t1.moveNext$0() === true;) { |
| 3167 t2 = t1.get$current(); |
| 3168 t3 = this.get$length(this); |
| 3169 this.set$length(this, $.$add$ns(t3, 1)); |
| 3170 this.$indexSet(this, t3, t2); |
| 3171 } |
| 3172 }, |
| 3173 clear$0: function(_) { |
| 3174 this.set$length(this, 0); |
| 3175 }, |
| 3176 removeLast$0: function(_) { |
| 3177 var result; |
| 3178 if ($.$eq(this.get$length(this), 0) === true) |
| 3179 throw $.wrapException($.StateError$("No elements")); |
| 3180 result = this.$index(this, $.$sub$n(this.get$length(this), 1)); |
| 3181 this.set$length(this, $.$sub$n(this.get$length(this), 1)); |
| 3182 return result; |
| 3183 }, |
| 3184 sublist$2: function(_, start, end) { |
| 3185 var t1, $length, result, i; |
| 3186 if (typeof start !== "number") |
| 3187 return this.sublist$2$bailout(1, start, end); |
| 3188 if (end == null) |
| 3189 end = this.get$length(this); |
| 3190 if (start < 0 || $.JSNumber_methods.$gt(start, this.get$length(this))) |
| 3191 $.throwExpression($.RangeError$range(start, 0, this.get$length(this))); |
| 3192 t1 = $.getInterceptor$n(end); |
| 3193 if (t1.$lt(end, start) || t1.$gt(end, this.get$length(this))) |
| 3194 $.throwExpression($.RangeError$range(end, start, this.get$length(this))); |
| 3195 $length = t1.$sub(end, start); |
| 3196 if (typeof $length !== "number") |
| 3197 return this.sublist$2$bailout(2, start, 0, $.JSNumber_methods, $length); |
| 3198 result = $.List_List($); |
| 3199 $.JSArray_methods.set$length(result, $length); |
| 3200 for (i = 0; i < $length; ++i) { |
| 3201 t1 = this.$index(this, start + i); |
| 3202 if (i >= result.length) |
| 3203 throw $.ioore(i); |
| 3204 result[i] = t1; |
| 3205 } |
| 3206 return result; |
| 3207 }, |
| 3208 sublist$2$bailout: function(state0, start, end, t1, $length) { |
| 3209 switch (state0) { |
| 3210 case 0: |
| 3211 case 1: |
| 3212 state0 = 0; |
| 3213 if (end == null) |
| 3214 end = this.get$length(this); |
| 3215 t1 = $.getInterceptor$n(start); |
| 3216 if (t1.$lt(start, 0) || t1.$gt(start, this.get$length(this))) |
| 3217 $.throwExpression($.RangeError$range(start, 0, this.get$length(this)))
; |
| 3218 t2 = $.getInterceptor$n(end); |
| 3219 if (t2.$lt(end, start) || t2.$gt(end, this.get$length(this))) |
| 3220 $.throwExpression($.RangeError$range(end, start, this.get$length(this)
)); |
| 3221 $length = t2.$sub(end, start); |
| 3222 case 2: |
| 3223 var t2, result, i; |
| 3224 state0 = 0; |
| 3225 result = $.List_List($); |
| 3226 $.JSArray_methods.set$length(result, $length); |
| 3227 for (i = 0; $.JSNumber_methods.$lt(i, $length); ++i) { |
| 3228 t2 = this.$index(this, t1.$add(start, i)); |
| 3229 if (i >= result.length) |
| 3230 throw $.ioore(i); |
| 3231 result[i] = t2; |
| 3232 } |
| 3233 return result; |
| 3234 } |
| 3235 }, |
| 3236 sublist$1: function($receiver, start) { |
| 3237 return this.sublist$2($receiver, start, null); |
| 3238 }, |
| 3239 toString$0: function(_) { |
| 3240 var result = $.StringBuffer$(""); |
| 3241 $.ToString__emitValue(this, result, $.List_List($)); |
| 3242 return result.toString$0(result); |
| 3243 }, |
| 3244 $isList: function() { |
| 3245 return true; |
| 3246 }, |
| 3247 $asList: function() { |
| 3248 return null; |
| 3249 }, |
| 3250 $isIterable: function() { |
| 3251 return true; |
| 3252 }, |
| 3253 $asIterable: function() { |
| 3254 return null; |
| 3255 } |
| 3256 }; |
| 3257 |
| 3258 $$.ListQueue = {"": "IterableBase;_table,_head,_tail,_modificationCount", |
| 3259 get$iterator: function(_) { |
| 3260 return $._ListQueueIterator$(this); |
| 3261 }, |
| 3262 forEach$1: function(_, action) { |
| 3263 var modificationCount, i, t1; |
| 3264 modificationCount = this._modificationCount; |
| 3265 for (i = this._head; i !== this._tail; i = (i + 1 & this._table.length - 1)
>>> 0) { |
| 3266 t1 = this._table; |
| 3267 if (i < 0 || i >= t1.length) |
| 3268 throw $.ioore(i); |
| 3269 action.call$1(t1[i]); |
| 3270 if (modificationCount !== this._modificationCount) |
| 3271 $.throwExpression($.ConcurrentModificationError$(this)); |
| 3272 } |
| 3273 }, |
| 3274 get$isEmpty: function(_) { |
| 3275 return this._head === this._tail; |
| 3276 }, |
| 3277 get$length: function(_) { |
| 3278 return $.$and$n($.$sub$n(this._tail, this._head), this._table.length - 1); |
| 3279 }, |
| 3280 elementAt$1: function(_, index) { |
| 3281 var t1, t2, t3; |
| 3282 t1 = $.getInterceptor$n(index); |
| 3283 if (t1.$lt(index, 0) || t1.$gt(index, this.get$length(this))) |
| 3284 throw $.wrapException($.RangeError$range(index, 0, this.get$length(this)))
; |
| 3285 t1 = this._table; |
| 3286 t2 = this._head; |
| 3287 if (typeof index !== "number") |
| 3288 throw $.iae(index); |
| 3289 t3 = t1.length; |
| 3290 t2 = (t2 + index & t3 - 1) >>> 0; |
| 3291 if (t2 < 0 || t2 >= t3) |
| 3292 throw $.ioore(t2); |
| 3293 return t1[t2]; |
| 3294 }, |
| 3295 toList$1$growable: function(_, growable) { |
| 3296 var list; |
| 3297 if (growable === true) { |
| 3298 list = $.List_List($); |
| 3299 $.JSArray_methods.set$length(list, this.get$length(this)); |
| 3300 } else |
| 3301 list = $.List_List(this.get$length(this)); |
| 3302 this._writeToList$1(list); |
| 3303 return list; |
| 3304 }, |
| 3305 toList$0: function($receiver) { |
| 3306 return this.toList$1$growable($receiver, true); |
| 3307 }, |
| 3308 add$1: function(_, element) { |
| 3309 this._add$1(element); |
| 3310 }, |
| 3311 addAll$1: function(_, elements) { |
| 3312 var addCount, $length, t1, t2, t3, endSpace, preSpace; |
| 3313 if (typeof elements === "object" && elements !== null && (elements.construct
or === Array || $.getInterceptor(elements).$isList())) { |
| 3314 addCount = $.get$length$asx(elements); |
| 3315 $length = this.get$length(this); |
| 3316 if (typeof addCount !== "number") |
| 3317 throw $.iae(addCount); |
| 3318 t1 = $length + addCount; |
| 3319 t2 = this._table; |
| 3320 t3 = t2.length; |
| 3321 if (t1 >= t3) { |
| 3322 this._preGrow$1(t1); |
| 3323 $.JSArray_methods.setRange$4(this._table, $length, t1, elements, 0); |
| 3324 this._tail = $.$add$ns(this._tail, addCount); |
| 3325 } else { |
| 3326 t1 = this._tail; |
| 3327 if (typeof t1 !== "number") |
| 3328 throw $.iae(t1); |
| 3329 endSpace = t3 - t1; |
| 3330 if (addCount < endSpace) { |
| 3331 $.JSArray_methods.setRange$4(t2, t1, t1 + addCount, elements, 0); |
| 3332 this._tail = $.$add$ns(this._tail, addCount); |
| 3333 } else { |
| 3334 preSpace = addCount - endSpace; |
| 3335 $.JSArray_methods.setRange$4(t2, t1, t1 + endSpace, elements, 0); |
| 3336 $.JSArray_methods.setRange$4(this._table, 0, preSpace, elements, endSp
ace); |
| 3337 this._tail = preSpace; |
| 3338 } |
| 3339 } |
| 3340 this._modificationCount = this._modificationCount + 1; |
| 3341 } else |
| 3342 for (t1 = $.get$iterator$ax(elements); t1.moveNext$0() === true;) |
| 3343 this._add$1(t1.get$current()); |
| 3344 }, |
| 3345 toString$0: function(_) { |
| 3346 var result = $.StringBuffer$(""); |
| 3347 $.ToString__emitValue(this, result, $.List_List($)); |
| 3348 return result.toString$0(result); |
| 3349 }, |
| 3350 addLast$1: function(element) { |
| 3351 this._add$1(element); |
| 3352 }, |
| 3353 removeFirst$0: function() { |
| 3354 var t1, t2, t3, result; |
| 3355 if (this._head === this._tail) |
| 3356 throw $.wrapException($.StateError$("No elements")); |
| 3357 this._modificationCount = this._modificationCount + 1; |
| 3358 t1 = this._table; |
| 3359 t2 = this._head; |
| 3360 t3 = t1.length; |
| 3361 if (t2 < 0 || t2 >= t3) |
| 3362 throw $.ioore(t2); |
| 3363 result = t1[t2]; |
| 3364 this._head = (t2 + 1 & t3 - 1) >>> 0; |
| 3365 return result; |
| 3366 }, |
| 3367 removeLast$0: function(_) { |
| 3368 var t1, t2; |
| 3369 if (this._head === this._tail) |
| 3370 throw $.wrapException($.StateError$("No elements")); |
| 3371 this._modificationCount = this._modificationCount + 1; |
| 3372 this._tail = $.$and$n($.$sub$n(this._tail, 1), this._table.length - 1); |
| 3373 t1 = this._table; |
| 3374 t2 = this._tail; |
| 3375 if (t2 !== (t2 | 0)) |
| 3376 throw $.iae(t2); |
| 3377 if (t2 < 0 || t2 >= t1.length) |
| 3378 throw $.ioore(t2); |
| 3379 return t1[t2]; |
| 3380 }, |
| 3381 _checkModification$1: function(expectedModificationCount) { |
| 3382 if (typeof expectedModificationCount !== "number") |
| 3383 return this._checkModification$1$bailout(1, expectedModificationCount); |
| 3384 if (expectedModificationCount !== this._modificationCount) |
| 3385 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 3386 }, |
| 3387 _checkModification$1$bailout: function(state0, expectedModificationCount) { |
| 3388 if ($.$eq(expectedModificationCount, this._modificationCount) !== true) |
| 3389 throw $.wrapException($.ConcurrentModificationError$(this)); |
| 3390 }, |
| 3391 _add$1: function(element) { |
| 3392 var t1, t2; |
| 3393 t1 = this._table; |
| 3394 t2 = this._tail; |
| 3395 if (t2 !== (t2 | 0)) |
| 3396 throw $.iae(t2); |
| 3397 if (t2 < 0 || t2 >= t1.length) |
| 3398 throw $.ioore(t2); |
| 3399 t1[t2] = element; |
| 3400 this._tail = $.$and$n(t2 + 1, this._table.length - 1); |
| 3401 if (this._head === this._tail) |
| 3402 this._grow$0(); |
| 3403 this._modificationCount = this._modificationCount + 1; |
| 3404 }, |
| 3405 _grow$0: function() { |
| 3406 var newTable, t1, t2, split; |
| 3407 newTable = $.List_List(this._table.length * 2); |
| 3408 t1 = this._table; |
| 3409 t2 = this._head; |
| 3410 split = t1.length - t2; |
| 3411 $.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); |
| 3412 $.JSArray_methods.setRange$4(newTable, split, split + this._head, this._tabl
e, 0); |
| 3413 this._head = 0; |
| 3414 this._tail = this._table.length; |
| 3415 this._table = newTable; |
| 3416 }, |
| 3417 _writeToList$1: function(target) { |
| 3418 var t1, t2, $length, firstPartSize; |
| 3419 t1 = $.JSInt_methods.$le(this._head, this._tail); |
| 3420 t2 = this._head; |
| 3421 if (t1) { |
| 3422 $length = $.$sub$n(this._tail, t2); |
| 3423 $.JSArray_methods.setRange$4(target, 0, $length, this._table, this._head); |
| 3424 return $length; |
| 3425 } else { |
| 3426 t1 = this._table; |
| 3427 firstPartSize = t1.length - t2; |
| 3428 $.JSArray_methods.setRange$4(target, 0, firstPartSize, t1, t2); |
| 3429 t2 = this._tail; |
| 3430 if (typeof t2 !== "number") |
| 3431 throw $.iae(t2); |
| 3432 $.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + t2, th
is._table, 0); |
| 3433 return $.$add$ns(this._tail, firstPartSize); |
| 3434 } |
| 3435 }, |
| 3436 _preGrow$1: function(newElementCount) { |
| 3437 var newTable = $.List_List($.ListQueue__nextPowerOf2(newElementCount)); |
| 3438 this._tail = this._writeToList$1(newTable); |
| 3439 this._table = newTable; |
| 3440 this._head = 0; |
| 3441 }, |
| 3442 ListQueue$1: function(initialCapacity) { |
| 3443 if (initialCapacity == null || $.JSNull_methods.$lt(initialCapacity, 8)) |
| 3444 initialCapacity = 8; |
| 3445 else if (!$.ListQueue__isPowerOf2(initialCapacity)) |
| 3446 initialCapacity = $.ListQueue__nextPowerOf2(initialCapacity); |
| 3447 this._table = $.List_List(initialCapacity); |
| 3448 }, |
| 3449 $asIterable: function() { |
| 3450 return null; |
| 3451 }, |
| 3452 $isIterable: function() { |
| 3453 return true; |
| 3454 } |
| 3455 }; |
| 3456 |
| 3457 $$._ListQueueIterator = {"": "Object;_queue,_end,_modificationCount,_liblib0$_po
sition,_liblib0$_current", |
| 3458 get$current: function() { |
| 3459 return this._liblib0$_current; |
| 3460 }, |
| 3461 moveNext$0: function() { |
| 3462 var t1, t2, t3; |
| 3463 t1 = this._queue; |
| 3464 t1._checkModification$1(this._modificationCount); |
| 3465 t2 = this._liblib0$_position; |
| 3466 if (t2 === this._end) { |
| 3467 this._liblib0$_current = null; |
| 3468 return false; |
| 3469 } |
| 3470 t3 = t1._table; |
| 3471 if (t2 < 0 || t2 >= t3.length) |
| 3472 throw $.ioore(t2); |
| 3473 this._liblib0$_current = t3[t2]; |
| 3474 this._liblib0$_position = (this._liblib0$_position + 1 & t1._table.length -
1) >>> 0; |
| 3475 return true; |
| 3476 } |
| 3477 }; |
| 3478 |
| 3479 $$.Duration = {"": "Object;_duration<", |
| 3480 $add: function(_, other) { |
| 3481 return $.Duration$(0, 0, this._duration + other.get$_duration(), 0, 0, 0); |
| 3482 }, |
| 3483 $sub: function(_, other) { |
| 3484 return $.Duration$(0, 0, this._duration - other.get$_duration(), 0, 0, 0); |
| 3485 }, |
| 3486 $mul: function(_, factor) { |
| 3487 return $.Duration$(0, 0, this._duration * factor, 0, 0, 0); |
| 3488 }, |
| 3489 $tdiv: function(_, quotient) { |
| 3490 if (quotient === 0) |
| 3491 throw $.wrapException($.IntegerDivisionByZeroException$()); |
| 3492 return $.Duration$(0, 0, $.JSNumber_methods.$tdiv(this._duration, quotient),
0, 0, 0); |
| 3493 }, |
| 3494 $lt: function(_, other) { |
| 3495 return this._duration < other.get$_duration(); |
| 3496 }, |
| 3497 $gt: function(_, other) { |
| 3498 return this._duration > other.get$_duration(); |
| 3499 }, |
| 3500 $ge: function(_, other) { |
| 3501 return this._duration >= other.get$_duration(); |
| 3502 }, |
| 3503 get$inHours: function() { |
| 3504 return $.JSNumber_methods.$tdiv(this._duration, 3600000000); |
| 3505 }, |
| 3506 get$inMinutes: function() { |
| 3507 return $.JSNumber_methods.$tdiv(this._duration, 60000000); |
| 3508 }, |
| 3509 get$inSeconds: function() { |
| 3510 return $.JSNumber_methods.$tdiv(this._duration, 1000000); |
| 3511 }, |
| 3512 get$inMilliseconds: function() { |
| 3513 return $.JSNumber_methods.$tdiv(this._duration, 1000); |
| 3514 }, |
| 3515 get$inMicroseconds: function() { |
| 3516 return this._duration; |
| 3517 }, |
| 3518 $eq: function(_, other) { |
| 3519 if (other == null) |
| 3520 return false; |
| 3521 if (typeof other !== "object" || other === null || !$.getInterceptor(other).
$isDuration) |
| 3522 return false; |
| 3523 return this._duration === other._duration; |
| 3524 }, |
| 3525 get$hashCode: function(_) { |
| 3526 return $.JSNumber_methods.get$hashCode(this._duration); |
| 3527 }, |
| 3528 toString$0: function(_) { |
| 3529 var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs; |
| 3530 t1 = new $.Duration_toString_sixDigits(); |
| 3531 t2 = new $.Duration_toString_twoDigits(); |
| 3532 if (this.get$inMicroseconds() < 0) |
| 3533 return "-" + $.S($.Duration$(0, 0, -this.get$inMicroseconds(), 0, 0, 0)); |
| 3534 twoDigitMinutes = t2.call$1($.JSNumber_methods.remainder$1(this.get$inMinute
s(), 60)); |
| 3535 twoDigitSeconds = t2.call$1($.JSNumber_methods.remainder$1(this.get$inSecond
s(), 60)); |
| 3536 sixDigitUs = t1.call$1($.JSNumber_methods.remainder$1(this.get$inMicrosecond
s(), 1000000)); |
| 3537 return $.S(this.get$inHours()) + ":" + $.S(twoDigitMinutes) + ":" + $.S(twoD
igitSeconds) + "." + $.S(sixDigitUs); |
| 3538 }, |
| 3539 $isDuration: true |
| 3540 }; |
| 3541 |
| 3542 $$.Duration_toString_sixDigits = {"": "Closure;", |
| 3543 call$1: function(n) { |
| 3544 var t1 = $.getInterceptor$n(n); |
| 3545 if (t1.$ge(n, 100000)) |
| 3546 return $.S(n); |
| 3547 if (t1.$ge(n, 10000)) |
| 3548 return "0" + $.S(n); |
| 3549 if (t1.$ge(n, 1000)) |
| 3550 return "00" + $.S(n); |
| 3551 if (t1.$ge(n, 100)) |
| 3552 return "000" + $.S(n); |
| 3553 if (t1.$gt(n, 10)) |
| 3554 return "0000" + $.S(n); |
| 3555 return "00000" + $.S(n); |
| 3556 } |
| 3557 }; |
| 3558 |
| 3559 $$.Duration_toString_twoDigits = {"": "Closure;", |
| 3560 call$1: function(n) { |
| 3561 if ($.$ge$n(n, 10)) |
| 3562 return $.S(n); |
| 3563 return "0" + $.S(n); |
| 3564 } |
| 3565 }; |
| 3566 |
| 3567 $$.NullThrownError = {"": "Object;", |
| 3568 toString$0: function(_) { |
| 3569 return "Throw of null."; |
| 3570 } |
| 3571 }; |
| 3572 |
| 3573 $$.ArgumentError = {"": "Object;message", |
| 3574 toString$0: function(_) { |
| 3575 var t1 = this.message; |
| 3576 if (t1 != null) |
| 3577 return "Illegal argument(s): " + $.S(t1); |
| 3578 return "Illegal argument(s)"; |
| 3579 } |
| 3580 }; |
| 3581 |
| 3582 $$.RangeError = {"": "ArgumentError;message", |
| 3583 toString$0: function(_) { |
| 3584 return "RangeError: " + $.S(this.message); |
| 3585 } |
| 3586 }; |
| 3587 |
| 3588 $$.NoSuchMethodError = {"": "Object;_receiver,_memberName,_arguments,_namedArgum
ents,_existingArgumentNames", |
| 3589 toString$0: function(_) { |
| 3590 var t1, t2, t3, t4, actualParameters, i, formalParameters; |
| 3591 t1 = {}; |
| 3592 t1.sb_0 = $.StringBuffer$(""); |
| 3593 t1.i_1 = 0; |
| 3594 t2 = this._arguments; |
| 3595 for (; $.$lt$n(t1.i_1, t2.length); t1.i_1 = $.$add$ns(t1.i_1, 1)) { |
| 3596 if ($.$gt$n(t1.i_1, 0)) |
| 3597 t1.sb_0.write$1(", "); |
| 3598 t3 = t1.sb_0; |
| 3599 t4 = t1.i_1; |
| 3600 if (t4 !== (t4 | 0)) |
| 3601 throw $.iae(t4); |
| 3602 if (t4 < 0 || t4 >= t2.length) |
| 3603 throw $.ioore(t4); |
| 3604 t3.write$1($.Error_safeToString(t2[t4])); |
| 3605 } |
| 3606 t2 = this._namedArguments; |
| 3607 t2.forEach$1(t2, new $.NoSuchMethodError_toString_anon(t1)); |
| 3608 t2 = this._existingArgumentNames; |
| 3609 if (t2 == null) |
| 3610 return "NoSuchMethodError : method not found: '" + $.S(this._memberName) +
"'\nReceiver: " + $.S($.Error_safeToString(this._receiver)) + "\nArguments: ["
+ $.S(t1.sb_0) + "]"; |
| 3611 else { |
| 3612 t3 = t1.sb_0; |
| 3613 actualParameters = t3.toString$0(t3); |
| 3614 t1.sb_0 = $.StringBuffer$(""); |
| 3615 for (i = 0; $.JSNumber_methods.$lt(i, $.JSNull_methods.get$length(t2)); ++
i) { |
| 3616 if (i > 0) |
| 3617 t1.sb_0.write$1(", "); |
| 3618 t1.sb_0.write$1($.JSNull_methods.$index(t2, i)); |
| 3619 } |
| 3620 t1 = t1.sb_0; |
| 3621 formalParameters = t1.toString$0(t1); |
| 3622 t1 = this._memberName; |
| 3623 return "NoSuchMethodError: incorrect number of arguments passed to method
named '" + $.S(t1) + "'\nReceiver: " + $.S($.Error_safeToString(this._receiver))
+ "\nTried calling: " + $.S(t1) + "(" + actualParameters + ")\nFound: " + $.S(t
1) + "(" + formalParameters + ")"; |
| 3624 } |
| 3625 } |
| 3626 }; |
| 3627 |
| 3628 $$.UnsupportedError = {"": "Object;message", |
| 3629 toString$0: function(_) { |
| 3630 return "Unsupported operation: " + this.message; |
| 3631 } |
| 3632 }; |
| 3633 |
| 3634 $$.UnimplementedError = {"": "Object;message", |
| 3635 toString$0: function(_) { |
| 3636 var t1 = this.message; |
| 3637 return t1 != null ? "UnimplementedError: " + $.S(t1) : "UnimplementedError"; |
| 3638 } |
| 3639 }; |
| 3640 |
| 3641 $$.StateError = {"": "Object;message", |
| 3642 toString$0: function(_) { |
| 3643 return "Bad state: " + this.message; |
| 3644 } |
| 3645 }; |
| 3646 |
| 3647 $$.ConcurrentModificationError = {"": "Object;modifiedObject", |
| 3648 toString$0: function(_) { |
| 3649 var t1 = this.modifiedObject; |
| 3650 if (t1 == null) |
| 3651 return "Concurrent modification during iteration."; |
| 3652 return "Concurrent modification during iteration: " + $.S($.Error_safeToStri
ng(t1)) + "."; |
| 3653 } |
| 3654 }; |
| 3655 |
| 3656 $$.StackOverflowError = {"": "Object;", |
| 3657 toString$0: function(_) { |
| 3658 return "Stack Overflow"; |
| 3659 } |
| 3660 }; |
| 3661 |
| 3662 $$.RuntimeError = {"": "Object;message", |
| 3663 toString$0: function(_) { |
| 3664 return "RuntimeError: " + this.message; |
| 3665 } |
| 3666 }; |
| 3667 |
| 3668 $$._ExceptionImplementation = {"": "Object;message", |
| 3669 toString$0: function(_) { |
| 3670 var t1 = this.message; |
| 3671 if (t1 == null) |
| 3672 return "Exception"; |
| 3673 return "Exception: " + $.S(t1); |
| 3674 }, |
| 3675 $isException: true |
| 3676 }; |
| 3677 |
| 3678 $$.FormatException = {"": "Object;message", |
| 3679 toString$0: function(_) { |
| 3680 return "FormatException: " + this.message; |
| 3681 }, |
| 3682 $isException: true |
| 3683 }; |
| 3684 |
| 3685 $$.IntegerDivisionByZeroException = {"": "Object;", |
| 3686 toString$0: function(_) { |
| 3687 return "IntegerDivisionByZeroException"; |
| 3688 }, |
| 3689 $isException: true |
| 3690 }; |
| 3691 |
| 3692 $$.Expando = {"": "Object;name>", |
| 3693 toString$0: function(_) { |
| 3694 return "Expando:" + this.name; |
| 3695 }, |
| 3696 $index: function(_, object) { |
| 3697 var values = $.Primitives_getProperty(object, "expando$values"); |
| 3698 return values == null ? null : $.Primitives_getProperty(values, this._getKey
$0()); |
| 3699 }, |
| 3700 $indexSet: function(_, object, value) { |
| 3701 var values = $.Primitives_getProperty(object, "expando$values"); |
| 3702 if (values == null) { |
| 3703 values = $.Object$(); |
| 3704 $.Primitives_setProperty(object, "expando$values", values); |
| 3705 } |
| 3706 $.Primitives_setProperty(values, this._getKey$0(), value); |
| 3707 }, |
| 3708 _getKey$0: function() { |
| 3709 var key, t1; |
| 3710 key = $.Primitives_getProperty(this, "expando$key"); |
| 3711 if (key == null) { |
| 3712 t1 = $.Expando__keyCount; |
| 3713 $.Expando__keyCount = $.$add$ns(t1, 1); |
| 3714 key = "expando$key$" + $.S(t1); |
| 3715 $.Primitives_setProperty(this, "expando$key", key); |
| 3716 } |
| 3717 return key; |
| 3718 } |
| 3719 }; |
| 3720 |
| 3721 $$.Iterator = {"": "Object;"}; |
| 3722 |
| 3723 $$.Object = {"": ";", |
| 3724 $eq: function(_, other) { |
| 3725 return this === other; |
| 3726 }, |
| 3727 get$hashCode: function(_) { |
| 3728 return $.Primitives_objectHashCode(this); |
| 3729 }, |
| 3730 toString$0: function(_) { |
| 3731 return "Instance of '" + $.S($.Primitives_objectTypeName(this)) + "'"; |
| 3732 } |
| 3733 }; |
| 3734 |
| 3735 $$.StringBuffer = {"": "Object;_contents", |
| 3736 get$length: function(_) { |
| 3737 return this._contents.length; |
| 3738 }, |
| 3739 get$isEmpty: function(_) { |
| 3740 return this.get$length(this) === 0; |
| 3741 }, |
| 3742 write$1: function(obj) { |
| 3743 if (typeof obj !== "string") |
| 3744 return this.write$1$bailout(1, obj); |
| 3745 this._contents = this._contents + obj; |
| 3746 }, |
| 3747 write$1$bailout: function(state0, obj) { |
| 3748 var str = typeof obj === "string" ? obj : $.S(obj); |
| 3749 this._contents = this._contents + str; |
| 3750 }, |
| 3751 writeAll$2: function(objects, separator) { |
| 3752 var iterator, str; |
| 3753 if (typeof separator !== "string") |
| 3754 return this.writeAll$2$bailout(1, objects, separator); |
| 3755 iterator = $.get$iterator$ax(objects); |
| 3756 if (iterator.moveNext$0() !== true) |
| 3757 return; |
| 3758 if ($.JSString_methods.get$isEmpty(separator)) |
| 3759 do { |
| 3760 str = iterator.get$current(); |
| 3761 str = typeof str === "string" ? str : $.S(str); |
| 3762 this._contents = this._contents + str; |
| 3763 } while (iterator.moveNext$0() === true); |
| 3764 else { |
| 3765 str = iterator.get$current(); |
| 3766 str = typeof str === "string" ? str : $.S(str); |
| 3767 this._contents = this._contents + str; |
| 3768 for (; iterator.moveNext$0() === true;) { |
| 3769 this._contents = this._contents + separator; |
| 3770 str = iterator.get$current(); |
| 3771 str = typeof str === "string" ? str : $.S(str); |
| 3772 this._contents = this._contents + str; |
| 3773 } |
| 3774 } |
| 3775 }, |
| 3776 writeAll$2$bailout: function(state0, objects, separator) { |
| 3777 var iterator, str, t1; |
| 3778 iterator = $.get$iterator$ax(objects); |
| 3779 if (iterator.moveNext$0() !== true) |
| 3780 return; |
| 3781 if ($.get$isEmpty$asx(separator) === true) |
| 3782 do { |
| 3783 str = iterator.get$current(); |
| 3784 str = typeof str === "string" ? str : $.S(str); |
| 3785 this._contents = this._contents + str; |
| 3786 } while (iterator.moveNext$0() === true); |
| 3787 else { |
| 3788 str = iterator.get$current(); |
| 3789 str = typeof str === "string" ? str : $.S(str); |
| 3790 this._contents = this._contents + str; |
| 3791 for (t1 = typeof separator === "string"; iterator.moveNext$0() === true;)
{ |
| 3792 str = t1 ? separator : $.S(separator); |
| 3793 this._contents = this._contents + str; |
| 3794 str = iterator.get$current(); |
| 3795 str = typeof str === "string" ? str : $.S(str); |
| 3796 this._contents = this._contents + str; |
| 3797 } |
| 3798 } |
| 3799 }, |
| 3800 toString$0: function(_) { |
| 3801 return this._contents; |
| 3802 }, |
| 3803 StringBuffer$1: function($content) { |
| 3804 this._contents = $content; |
| 3805 } |
| 3806 }; |
| 3807 |
| 3808 $$._ChildrenElementList = {"": "ListBase;_liblib1$_element,_childElements", |
| 3809 toList$1$growable: function(_, growable) { |
| 3810 var t1, output, len, t2, i, t3; |
| 3811 t1 = this._childElements; |
| 3812 if (growable === true) { |
| 3813 output = []; |
| 3814 $.JSArray_methods.set$length(output, $.get$length$asx(t1)); |
| 3815 } else |
| 3816 output = $.List_List($.get$length$asx(t1)); |
| 3817 for (t1 = this._childElements, len = $.get$length$asx(t1), t2 = $.getInterce
ptor$asx(t1), i = 0; i < len; ++i) { |
| 3818 t3 = t2.$index(t1, i); |
| 3819 if (i >= output.length) |
| 3820 throw $.ioore(i); |
| 3821 output[i] = t3; |
| 3822 } |
| 3823 return output; |
| 3824 }, |
| 3825 toList$0: function($receiver) { |
| 3826 return this.toList$1$growable($receiver, true); |
| 3827 }, |
| 3828 forEach$1: function(_, f) { |
| 3829 var t1; |
| 3830 for (t1 = $.get$iterator$ax(this._childElements); t1.moveNext$0();) |
| 3831 f.call$1(t1.get$current()); |
| 3832 }, |
| 3833 get$isEmpty: function(_) { |
| 3834 return this._liblib1$_element.firstElementChild == null; |
| 3835 }, |
| 3836 skip$1: function(_, n) { |
| 3837 return $.skip$1$ax(this._childElements, n); |
| 3838 }, |
| 3839 elementAt$1: function(_, index) { |
| 3840 return $.$index$asx(this._childElements, index); |
| 3841 }, |
| 3842 get$length: function(_) { |
| 3843 return $.get$length$asx(this._childElements); |
| 3844 }, |
| 3845 $index: function(_, index) { |
| 3846 return $.$index$asx(this._childElements, index); |
| 3847 }, |
| 3848 $indexSet: function(_, index, value) { |
| 3849 this._liblib1$_element.replaceChild(value, $.$index$asx(this._childElements,
index)); |
| 3850 }, |
| 3851 set$length: function(_, newLength) { |
| 3852 throw $.wrapException($.UnsupportedError$("")); |
| 3853 }, |
| 3854 add$1: function(_, value) { |
| 3855 this._liblib1$_element.appendChild(value); |
| 3856 return value; |
| 3857 }, |
| 3858 get$iterator: function(_) { |
| 3859 return $.JSArray_methods.get$iterator(this.toList$0(this)); |
| 3860 }, |
| 3861 addAll$1: function(_, iterable) { |
| 3862 var t1, t2; |
| 3863 if (typeof iterable === "object" && iterable !== null && !!$.getInterceptor(
iterable).$is_ChildNodeListLazy) |
| 3864 iterable = $.List_List$from(iterable, true); |
| 3865 for (t1 = $.get$iterator$ax(iterable), t2 = this._liblib1$_element; t1.moveN
ext$0() === true;) |
| 3866 t2.appendChild(t1.get$current()); |
| 3867 }, |
| 3868 sublist$2: function(_, start, end) { |
| 3869 if (end == null) |
| 3870 end = this.get$length(this); |
| 3871 return $._FrozenElementList$_wrap($.Lists_getRange(this, start, end, [])); |
| 3872 }, |
| 3873 sublist$1: function($receiver, start) { |
| 3874 return this.sublist$2($receiver, start, null); |
| 3875 }, |
| 3876 clear$0: function(_) { |
| 3877 this._liblib1$_element.textContent = ""; |
| 3878 }, |
| 3879 removeLast$0: function(_) { |
| 3880 var result = this.get$last(this); |
| 3881 if (result != null) |
| 3882 this._liblib1$_element.removeChild(result); |
| 3883 return result; |
| 3884 }, |
| 3885 get$last: function(_) { |
| 3886 var result = this._liblib1$_element.lastElementChild; |
| 3887 if (result == null) |
| 3888 throw $.wrapException($.StateError$("No elements")); |
| 3889 return result; |
| 3890 }, |
| 3891 toString$0: function(_) { |
| 3892 var buffer = $.StringBuffer$("["); |
| 3893 buffer.writeAll$2(this, ", "); |
| 3894 buffer.write$1("]"); |
| 3895 return buffer.toString$0(buffer); |
| 3896 }, |
| 3897 $asList: function() { |
| 3898 return function () { return [$.Element]; }; |
| 3899 }, |
| 3900 $asIterable: function() { |
| 3901 return function () { return [$.Element]; }; |
| 3902 } |
| 3903 }; |
| 3904 |
| 3905 $$._FrozenElementList = {"": "ListBase;_nodeList", |
| 3906 get$length: function(_) { |
| 3907 return $.get$length$asx(this._nodeList); |
| 3908 }, |
| 3909 $index: function(_, index) { |
| 3910 var t1 = this._nodeList; |
| 3911 if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1.c
onstructor !== Array && !$.getInterceptor(t1).$isJavaScriptIndexingBehavior())) |
| 3912 return this.$$index$bailout(1, index, t1); |
| 3913 if (index !== (index | 0)) |
| 3914 throw $.iae(index); |
| 3915 if (index < 0 || index >= t1.length) |
| 3916 throw $.ioore(index); |
| 3917 return t1[index]; |
| 3918 }, |
| 3919 $$index$bailout: function(state0, index, t1) { |
| 3920 return $.$index$asx(t1, index); |
| 3921 }, |
| 3922 $indexSet: function(_, index, value) { |
| 3923 throw $.wrapException($.UnsupportedError$("")); |
| 3924 }, |
| 3925 set$length: function(_, newLength) { |
| 3926 $.set$length$asx(this._nodeList, newLength); |
| 3927 }, |
| 3928 add$1: function(_, value) { |
| 3929 throw $.wrapException($.UnsupportedError$("")); |
| 3930 }, |
| 3931 addAll$1: function(_, iterable) { |
| 3932 throw $.wrapException($.UnsupportedError$("")); |
| 3933 }, |
| 3934 sublist$2: function(_, start, end) { |
| 3935 return $._FrozenElementList$_wrap($.sublist$2$ax(this._nodeList, start, end)
); |
| 3936 }, |
| 3937 sublist$1: function($receiver, start) { |
| 3938 return this.sublist$2($receiver, start, null); |
| 3939 }, |
| 3940 clear$0: function(_) { |
| 3941 throw $.wrapException($.UnsupportedError$("")); |
| 3942 }, |
| 3943 removeLast$0: function(_) { |
| 3944 throw $.wrapException($.UnsupportedError$("")); |
| 3945 }, |
| 3946 toString$0: function(_) { |
| 3947 var buffer = $.StringBuffer$("["); |
| 3948 buffer.writeAll$2(this, ", "); |
| 3949 buffer.write$1("]"); |
| 3950 return buffer.toString$0(buffer); |
| 3951 }, |
| 3952 $asList: function() { |
| 3953 return function () { return [null]; }; |
| 3954 }, |
| 3955 $asIterable: function() { |
| 3956 return function () { return [null]; }; |
| 3957 } |
| 3958 }; |
| 3959 |
| 3960 $$._ElementCssClassSet = {"": "CssClassSet;_liblib1$_element", |
| 3961 readClasses$0: function() { |
| 3962 var s, t1, trimmed; |
| 3963 s = $.LinkedHashSet$(); |
| 3964 for (t1 = $.JSArray_methods.get$iterator($.split$1$s(this._liblib1$_element.
className, " ")); t1.moveNext$0();) { |
| 3965 trimmed = $.trim$0$s(t1.get$current()); |
| 3966 if (!$.JSString_methods.get$isEmpty(trimmed)) |
| 3967 s.add$1(s, trimmed); |
| 3968 } |
| 3969 return s; |
| 3970 }, |
| 3971 writeClasses$1: function(s) { |
| 3972 $.List_List$from(s, true); |
| 3973 this._liblib1$_element.className = s.join$1(s, " "); |
| 3974 } |
| 3975 }; |
| 3976 |
| 3977 $$.HttpRequest_getString_anon = {"": "Closure;", |
| 3978 call$1: function(xhr) { |
| 3979 return $.get$responseText$x(xhr); |
| 3980 } |
| 3981 }; |
| 3982 |
| 3983 $$.HttpRequest_request_anon = {"": "Closure;completer_0,xhr_1", |
| 3984 call$1: function(e) { |
| 3985 var t1, t2, t3; |
| 3986 t1 = this.xhr_1; |
| 3987 if (!($.$ge$n(t1.status, 200) && $.$lt$n(t1.status, 300))) { |
| 3988 t2 = t1.status; |
| 3989 t2 = t2 === 0 || t2 === 304; |
| 3990 } else |
| 3991 t2 = true; |
| 3992 t3 = this.completer_0; |
| 3993 if (t2) |
| 3994 t3.complete$1(t3, t1); |
| 3995 else |
| 3996 t3.completeError$1(e); |
| 3997 } |
| 3998 }; |
| 3999 |
| 4000 $$.HttpRequest_request_anon0 = {"": "Closure;completer_2", |
| 4001 call$1: function(e) { |
| 4002 this.completer_2.completeError$1(e); |
| 4003 } |
| 4004 }; |
| 4005 |
| 4006 $$._ChildNodeListLazy = {"": "ListBase;_this", |
| 4007 get$last: function(_) { |
| 4008 var result = this._this.lastChild; |
| 4009 if (result == null) |
| 4010 throw $.wrapException($.StateError$("No elements")); |
| 4011 return result; |
| 4012 }, |
| 4013 add$1: function(_, value) { |
| 4014 this._this.appendChild(value); |
| 4015 }, |
| 4016 addAll$1: function(_, iterable) { |
| 4017 var t1, len, i, t2; |
| 4018 if (typeof iterable === "object" && iterable !== null && !!$.getInterceptor(
iterable).$is_ChildNodeListLazy) { |
| 4019 t1 = this._this; |
| 4020 if (iterable._this !== t1) { |
| 4021 len = iterable.get$length(iterable); |
| 4022 if (typeof len !== "number") |
| 4023 return this.addAll$1$bailout1(1, iterable, len, t1); |
| 4024 i = 0; |
| 4025 for (; i < len; ++i) |
| 4026 t1.appendChild(iterable.$index(iterable, 0)); |
| 4027 } |
| 4028 return; |
| 4029 } |
| 4030 for (t1 = $.get$iterator$ax(iterable), t2 = this._this; t1.moveNext$0() ===
true;) |
| 4031 t2.appendChild(t1.get$current()); |
| 4032 }, |
| 4033 addAll$1$bailout1: function(state0, iterable, len, t1) { |
| 4034 switch (state0) { |
| 4035 case 0: |
| 4036 case 1: |
| 4037 var i, t2; |
| 4038 if (state0 === 1 || state0 === 0 && typeof iterable === "object" && iter
able !== null && !!$.getInterceptor(iterable).$is_ChildNodeListLazy) |
| 4039 switch (state0) { |
| 4040 case 0: |
| 4041 t1 = this._this; |
| 4042 case 1: |
| 4043 if (state0 === 1 || state0 === 0 && iterable._this !== t1) |
| 4044 switch (state0) { |
| 4045 case 0: |
| 4046 len = iterable.get$length(iterable); |
| 4047 case 1: |
| 4048 state0 = 0; |
| 4049 i = 0; |
| 4050 for (; $.JSNumber_methods.$lt(i, len); ++i) |
| 4051 t1.appendChild(iterable.$index(iterable, 0)); |
| 4052 } |
| 4053 return; |
| 4054 } |
| 4055 for (t1 = $.get$iterator$ax(iterable), t2 = this._this; t1.moveNext$0()
=== true;) |
| 4056 t2.appendChild(t1.get$current()); |
| 4057 } |
| 4058 }, |
| 4059 removeLast$0: function(_) { |
| 4060 var result = this.get$last(this); |
| 4061 if (result != null) |
| 4062 this._this.removeChild(result); |
| 4063 return result; |
| 4064 }, |
| 4065 clear$0: function(_) { |
| 4066 this._this.textContent = ""; |
| 4067 }, |
| 4068 $indexSet: function(_, index, value) { |
| 4069 var t1, t2; |
| 4070 t1 = this._this; |
| 4071 t2 = t1.childNodes; |
| 4072 if (typeof t2 !== "string" && (typeof t2 !== "object" || t2 === null || t2.c
onstructor !== Array && !$.getInterceptor(t2).$isJavaScriptIndexingBehavior())) |
| 4073 return this.$$indexSet$bailout(1, t1, value, t2, index); |
| 4074 if (index !== (index | 0)) |
| 4075 throw $.iae(index); |
| 4076 if (index < 0 || index >= t2.length) |
| 4077 throw $.ioore(index); |
| 4078 t1.replaceChild(value, t2[index]); |
| 4079 }, |
| 4080 $$indexSet$bailout: function(state0, t1, value, t2, index) { |
| 4081 t1.replaceChild(value, $.$index$asx(t2, index)); |
| 4082 }, |
| 4083 get$iterator: function(_) { |
| 4084 return $.get$iterator$ax(this._this.childNodes); |
| 4085 }, |
| 4086 toList$1$growable: function(_, growable) { |
| 4087 return $.List_List$from(this, growable); |
| 4088 }, |
| 4089 toList$0: function($receiver) { |
| 4090 return this.toList$1$growable($receiver, true); |
| 4091 }, |
| 4092 get$isEmpty: function(_) { |
| 4093 return $.$eq(this.get$length(this), 0); |
| 4094 }, |
| 4095 sublist$2: function(_, start, end) { |
| 4096 if (end == null) |
| 4097 $.$eq(end, this.get$length(this)); |
| 4098 return $.Lists_getRange(this, start, end, []); |
| 4099 }, |
| 4100 sublist$1: function($receiver, start) { |
| 4101 return this.sublist$2($receiver, start, null); |
| 4102 }, |
| 4103 toString$0: function(_) { |
| 4104 var buffer = $.StringBuffer$("["); |
| 4105 buffer.writeAll$2(this, ", "); |
| 4106 buffer.write$1("]"); |
| 4107 return buffer.toString$0(buffer); |
| 4108 }, |
| 4109 get$length: function(_) { |
| 4110 return $.get$length$asx(this._this.childNodes); |
| 4111 }, |
| 4112 set$length: function(_, value) { |
| 4113 throw $.wrapException($.UnsupportedError$("Cannot set length on immutable Li
st.")); |
| 4114 }, |
| 4115 $index: function(_, index) { |
| 4116 var t1 = this._this.childNodes; |
| 4117 if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1.c
onstructor !== Array && !$.getInterceptor(t1).$isJavaScriptIndexingBehavior())) |
| 4118 return this.$$index$bailout(1, index, t1); |
| 4119 if (index !== (index | 0)) |
| 4120 throw $.iae(index); |
| 4121 if (index < 0 || index >= t1.length) |
| 4122 throw $.ioore(index); |
| 4123 return t1[index]; |
| 4124 }, |
| 4125 $$index$bailout: function(state0, index, t1) { |
| 4126 return $.$index$asx(t1, index); |
| 4127 }, |
| 4128 $is_ChildNodeListLazy: true, |
| 4129 $asList: function() { |
| 4130 return function () { return [$.Node]; }; |
| 4131 }, |
| 4132 $asIterable: function() { |
| 4133 return function () { return [$.Node]; }; |
| 4134 } |
| 4135 }; |
| 4136 |
| 4137 $$._AttributeMap = {"": "Object;", |
| 4138 forEach$1: function(_, f) { |
| 4139 var t1, t2; |
| 4140 for (t1 = $.JSArray_methods.get$iterator(this.get$keys()); t1.moveNext$0();)
{ |
| 4141 t2 = t1.get$current(); |
| 4142 f.call$2(t2, this.$index(this, t2)); |
| 4143 } |
| 4144 }, |
| 4145 get$keys: function() { |
| 4146 var attributes, keys, t1, len, i; |
| 4147 attributes = this._liblib1$_element.attributes; |
| 4148 keys = $.List_List($); |
| 4149 for (t1 = $.getInterceptor$asx(attributes), len = t1.get$length(attributes),
i = 0; i < len; ++i) |
| 4150 if (this._matches$1(t1.$index(attributes, i))) |
| 4151 keys.push(t1.$index(attributes, i).localName); |
| 4152 return keys; |
| 4153 }, |
| 4154 get$values: function(_) { |
| 4155 var attributes, values, t1, len, i; |
| 4156 attributes = this._liblib1$_element.attributes; |
| 4157 values = $.List_List($); |
| 4158 for (t1 = $.getInterceptor$asx(attributes), len = t1.get$length(attributes),
i = 0; i < len; ++i) |
| 4159 if (this._matches$1(t1.$index(attributes, i))) |
| 4160 values.push($.get$value$x(t1.$index(attributes, i))); |
| 4161 return values; |
| 4162 }, |
| 4163 get$isEmpty: function(_) { |
| 4164 return this.get$length(this) === 0; |
| 4165 }, |
| 4166 $isMap: true, |
| 4167 $asMap: function () { return [$.String, $.String]; } |
| 4168 }; |
| 4169 |
| 4170 $$._ElementAttributeMap = {"": "_AttributeMap;_liblib1$_element", |
| 4171 $index: function(_, key) { |
| 4172 return this._liblib1$_element.getAttribute(key); |
| 4173 }, |
| 4174 $indexSet: function(_, key, value) { |
| 4175 this._liblib1$_element.setAttribute(key, value); |
| 4176 }, |
| 4177 get$length: function(_) { |
| 4178 return this.get$keys().length; |
| 4179 }, |
| 4180 _matches$1: function(node) { |
| 4181 return node.namespaceURI == null; |
| 4182 } |
| 4183 }; |
| 4184 |
| 4185 $$.CssClassSet = {"": "Object;", |
| 4186 toString$0: function(_) { |
| 4187 var t1 = this.readClasses$0(); |
| 4188 return t1.join$1(t1, " "); |
| 4189 }, |
| 4190 toggle$1: function(value) { |
| 4191 var s, result; |
| 4192 s = this.readClasses$0(); |
| 4193 if (s.contains$1(s, value) === true) { |
| 4194 s.remove$1(s, value); |
| 4195 result = false; |
| 4196 } else { |
| 4197 s.add$1(s, value); |
| 4198 result = true; |
| 4199 } |
| 4200 this.writeClasses$1(s); |
| 4201 return result; |
| 4202 }, |
| 4203 get$iterator: function(_) { |
| 4204 var t1 = this.readClasses$0(); |
| 4205 return t1.get$iterator(t1); |
| 4206 }, |
| 4207 forEach$1: function(_, f) { |
| 4208 var t1 = this.readClasses$0(); |
| 4209 t1.forEach$1(t1, f); |
| 4210 }, |
| 4211 get$isEmpty: function(_) { |
| 4212 var t1 = this.readClasses$0(); |
| 4213 return t1.get$isEmpty(t1); |
| 4214 }, |
| 4215 get$length: function(_) { |
| 4216 var t1 = this.readClasses$0(); |
| 4217 return t1.get$length(t1); |
| 4218 }, |
| 4219 add$1: function(_, value) { |
| 4220 var t1, s; |
| 4221 t1 = new $.CssClassSet_add_anon(value); |
| 4222 s = this.readClasses$0(); |
| 4223 t1.call$1(s); |
| 4224 this.writeClasses$1(s); |
| 4225 }, |
| 4226 addAll$1: function(_, iterable) { |
| 4227 var t1, s; |
| 4228 t1 = new $.CssClassSet_addAll_anon(iterable); |
| 4229 s = this.readClasses$0(); |
| 4230 t1.call$1(s); |
| 4231 this.writeClasses$1(s); |
| 4232 }, |
| 4233 toList$1$growable: function(_, growable) { |
| 4234 var t1 = this.readClasses$0(); |
| 4235 return t1.toList$1$growable(t1, growable); |
| 4236 }, |
| 4237 toList$0: function($receiver) { |
| 4238 return this.toList$1$growable($receiver, true); |
| 4239 }, |
| 4240 skip$1: function(_, n) { |
| 4241 var t1 = this.readClasses$0(); |
| 4242 return t1.skip$1(t1, n); |
| 4243 }, |
| 4244 elementAt$1: function(_, index) { |
| 4245 var t1 = this.readClasses$0(); |
| 4246 return t1.elementAt$1(t1, index); |
| 4247 }, |
| 4248 $isIterable: function() { |
| 4249 return true; |
| 4250 }, |
| 4251 $asIterable: function() { |
| 4252 return function () { return [$.String]; }; |
| 4253 } |
| 4254 }; |
| 4255 |
| 4256 $$.CssClassSet_add_anon = {"": "Closure;value_0", |
| 4257 call$1: function(s) { |
| 4258 return $.add$1$ax(s, this.value_0); |
| 4259 } |
| 4260 }; |
| 4261 |
| 4262 $$.CssClassSet_addAll_anon = {"": "Closure;iterable_0", |
| 4263 call$1: function(s) { |
| 4264 return $.addAll$1$ax(s, this.iterable_0); |
| 4265 } |
| 4266 }; |
| 4267 |
| 4268 $$._EventStream = {"": "Stream;_target,_eventType,_useCapture", |
| 4269 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone,
onError) { |
| 4270 return $._EventStreamSubscription$(this._target, this._eventType, onData, th
is._useCapture); |
| 4271 }, |
| 4272 listen$1: function(onData) { |
| 4273 return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); |
| 4274 }, |
| 4275 listen$3$onDone$onError: function(onData, onDone, onError) { |
| 4276 return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onEr
ror); |
| 4277 } |
| 4278 }; |
| 4279 |
| 4280 $$._EventStreamSubscription = {"": "StreamSubscription;_pauseCount,_target,_even
tType,_liblib1$_onData,_useCapture", |
| 4281 cancel$0: function() { |
| 4282 if (this.get$_canceled()) |
| 4283 return; |
| 4284 var t1 = this._liblib1$_onData; |
| 4285 if (t1 != null) |
| 4286 $.$$dom_removeEventListener$3$x(this._target, this._eventType, t1, this._u
seCapture); |
| 4287 this._target = null; |
| 4288 this._liblib1$_onData = null; |
| 4289 }, |
| 4290 get$_canceled: function() { |
| 4291 return this._target == null; |
| 4292 }, |
| 4293 get$_paused: function() { |
| 4294 return this._pauseCount > 0; |
| 4295 }, |
| 4296 _tryResume$0: function() { |
| 4297 if (this._liblib1$_onData != null && !this.get$_paused()) |
| 4298 $.$$dom_addEventListener$3$x(this._target, this._eventType, this._liblib1$
_onData, this._useCapture); |
| 4299 }, |
| 4300 _EventStreamSubscription$4: function(_target, _eventType, _onData, _useCapture
) { |
| 4301 this._tryResume$0(); |
| 4302 } |
| 4303 }; |
| 4304 |
| 4305 $$.EventStreamProvider = {"": "Object;_eventType", |
| 4306 forTarget$2$useCapture: function(e, useCapture) { |
| 4307 return $._EventStream$(e, this._eventType, useCapture); |
| 4308 }, |
| 4309 forTarget$1: function(e) { |
| 4310 return this.forTarget$2$useCapture(e, false); |
| 4311 } |
| 4312 }; |
| 4313 |
| 4314 $$.FixedSizeListIterator = {"": "Object;_array,_length,_position,_current", |
| 4315 moveNext$0: function() { |
| 4316 var t1, nextPosition; |
| 4317 t1 = this._position; |
| 4318 if (typeof t1 !== "number") |
| 4319 return this.moveNext$0$bailout(1, t1); |
| 4320 nextPosition = t1 + 1; |
| 4321 t1 = this._length; |
| 4322 if (nextPosition < t1) { |
| 4323 this._current = $.$index$asx(this._array, nextPosition); |
| 4324 this._position = nextPosition; |
| 4325 return true; |
| 4326 } |
| 4327 this._current = null; |
| 4328 this._position = t1; |
| 4329 return false; |
| 4330 }, |
| 4331 moveNext$0$bailout: function(state0, t1) { |
| 4332 var nextPosition = $.$add$ns(t1, 1); |
| 4333 t1 = this._length; |
| 4334 if ($.$lt$n(nextPosition, t1)) { |
| 4335 this._current = $.$index$asx(this._array, nextPosition); |
| 4336 this._position = nextPosition; |
| 4337 return true; |
| 4338 } |
| 4339 this._current = null; |
| 4340 this._position = t1; |
| 4341 return false; |
| 4342 }, |
| 4343 get$current: function() { |
| 4344 return this._current; |
| 4345 } |
| 4346 }; |
| 4347 |
| 4348 $$.convertDartToNative_Dictionary_anon = {"": "Closure;object_0", |
| 4349 call$2: function(key, value) { |
| 4350 this.object_0[key] = value; |
| 4351 } |
| 4352 }; |
| 4353 |
| 4354 $$.FilteredElementList = {"": "ListBase;_node,_childNodes", |
| 4355 get$_filtered: function() { |
| 4356 var t1 = this._childNodes; |
| 4357 return $.List_List$from(t1.where$1(t1, new $.FilteredElementList__filtered_a
non()), true); |
| 4358 }, |
| 4359 forEach$1: function(_, f) { |
| 4360 $.JSArray_methods.forEach$1(this.get$_filtered(), f); |
| 4361 }, |
| 4362 $indexSet: function(_, index, value) { |
| 4363 var t1 = this.get$_filtered(); |
| 4364 if (index !== (index | 0)) |
| 4365 throw $.iae(index); |
| 4366 if (index < 0 || index >= t1.length) |
| 4367 throw $.ioore(index); |
| 4368 $.replaceWith$1$x(t1[index], value); |
| 4369 }, |
| 4370 set$length: function(_, newLength) { |
| 4371 var len; |
| 4372 if (typeof newLength !== "number") |
| 4373 return this.set$length$bailout(1, newLength); |
| 4374 len = this.get$length(this); |
| 4375 if (newLength >= len) |
| 4376 return; |
| 4377 else if (newLength < 0) |
| 4378 throw $.wrapException($.ArgumentError$("Invalid list length")); |
| 4379 this.removeRange$2(this, newLength, len); |
| 4380 }, |
| 4381 set$length$bailout: function(state0, newLength) { |
| 4382 var len, t1; |
| 4383 len = this.get$length(this); |
| 4384 t1 = $.getInterceptor$n(newLength); |
| 4385 if (t1.$ge(newLength, len)) |
| 4386 return; |
| 4387 else if (t1.$lt(newLength, 0)) |
| 4388 throw $.wrapException($.ArgumentError$("Invalid list length")); |
| 4389 this.removeRange$2(this, newLength, len); |
| 4390 }, |
| 4391 add$1: function(_, value) { |
| 4392 var t1 = this._childNodes; |
| 4393 t1.add$1(t1, value); |
| 4394 }, |
| 4395 addAll$1: function(_, iterable) { |
| 4396 var t1, t2; |
| 4397 for (t1 = $.get$iterator$ax(iterable), t2 = this._childNodes; t1.moveNext$0(
) === true;) |
| 4398 t2.add$1(t2, t1.get$current()); |
| 4399 }, |
| 4400 removeRange$2: function(_, start, end) { |
| 4401 $.JSArray_methods.forEach$1($.JSArray_methods.sublist$2(this.get$_filtered()
, start, end), new $.FilteredElementList_removeRange_anon()); |
| 4402 }, |
| 4403 clear$0: function(_) { |
| 4404 var t1 = this._childNodes; |
| 4405 t1.clear$0(t1); |
| 4406 }, |
| 4407 removeLast$0: function(_) { |
| 4408 var result = this.get$last(this); |
| 4409 if (result != null) |
| 4410 $.remove$0$ax(result); |
| 4411 return result; |
| 4412 }, |
| 4413 toList$1$growable: function(_, growable) { |
| 4414 return $.List_List$from(this, growable); |
| 4415 }, |
| 4416 toList$0: function($receiver) { |
| 4417 return this.toList$1$growable($receiver, true); |
| 4418 }, |
| 4419 elementAt$1: function(_, index) { |
| 4420 var t1 = this.get$_filtered(); |
| 4421 if (index !== (index | 0)) |
| 4422 throw $.iae(index); |
| 4423 if (index < 0 || index >= t1.length) |
| 4424 throw $.ioore(index); |
| 4425 return t1[index]; |
| 4426 }, |
| 4427 get$isEmpty: function(_) { |
| 4428 return $.JSArray_methods.get$isEmpty(this.get$_filtered()); |
| 4429 }, |
| 4430 get$length: function(_) { |
| 4431 return this.get$_filtered().length; |
| 4432 }, |
| 4433 $index: function(_, index) { |
| 4434 var t1 = this.get$_filtered(); |
| 4435 if (index !== (index | 0)) |
| 4436 throw $.iae(index); |
| 4437 if (index < 0 || index >= t1.length) |
| 4438 throw $.ioore(index); |
| 4439 return t1[index]; |
| 4440 }, |
| 4441 get$iterator: function(_) { |
| 4442 return $.JSArray_methods.get$iterator(this.get$_filtered()); |
| 4443 }, |
| 4444 sublist$2: function(_, start, end) { |
| 4445 return $.JSArray_methods.sublist$2(this.get$_filtered(), start, end); |
| 4446 }, |
| 4447 sublist$1: function($receiver, start) { |
| 4448 return this.sublist$2($receiver, start, null); |
| 4449 }, |
| 4450 skip$1: function(_, n) { |
| 4451 return this.get$IterableMixinWorkaround().skipList$2(this, n); |
| 4452 }, |
| 4453 get$last: function(_) { |
| 4454 return $.JSArray_methods.get$last(this.get$_filtered()); |
| 4455 }, |
| 4456 $asList: function() { |
| 4457 return function () { return [$.Element]; }; |
| 4458 }, |
| 4459 $asIterable: function() { |
| 4460 return function () { return [$.Element]; }; |
| 4461 } |
| 4462 }; |
| 4463 |
| 4464 $$.FilteredElementList__filtered_anon = {"": "Closure;", |
| 4465 call$1: function(n) { |
| 4466 return typeof n === "object" && n !== null && $.getInterceptor(n).$isElement
(); |
| 4467 } |
| 4468 }; |
| 4469 |
| 4470 $$.FilteredElementList_removeRange_anon = {"": "Closure;", |
| 4471 call$1: function(el) { |
| 4472 return $.remove$0$ax(el); |
| 4473 } |
| 4474 }; |
| 4475 |
| 4476 $$._AttributeClassSet = {"": "CssClassSet;_liblib2$_element", |
| 4477 readClasses$0: function() { |
| 4478 var t1, classname, s, trimmed; |
| 4479 t1 = $.get$attributes$x(this._liblib2$_element); |
| 4480 classname = t1.$index(t1, "class"); |
| 4481 s = $.LinkedHashSet$(); |
| 4482 if (classname == null) |
| 4483 return s; |
| 4484 for (t1 = $.JSArray_methods.get$iterator($.split$1$s(classname, " ")); t1.mo
veNext$0();) { |
| 4485 trimmed = $.trim$0$s(t1.get$current()); |
| 4486 if (!$.JSString_methods.get$isEmpty(trimmed)) |
| 4487 s.add$1(s, trimmed); |
| 4488 } |
| 4489 return s; |
| 4490 }, |
| 4491 writeClasses$1: function(s) { |
| 4492 var t1 = $.get$attributes$x(this._liblib2$_element); |
| 4493 t1.$indexSet(t1, "class", s.join$1(s, " ")); |
| 4494 } |
| 4495 }; |
| 4496 |
| 4497 $$.BarGraph = {"": "Object;_canvas,_model,_elements,scaleHeight", |
| 4498 addSample$1: function(segments) { |
| 4499 if (segments.length !== this._elements.length) |
| 4500 throw $.wrapException($.RuntimeError$("invalid sample size for graph")); |
| 4501 this._model.addSample$1(segments); |
| 4502 }, |
| 4503 drawBarGraph$0: function() { |
| 4504 var t1, context, t2, x, i, y; |
| 4505 t1 = this._canvas; |
| 4506 $.Primitives_printString("drawBarGraph: _canvas=" + $.S(t1)); |
| 4507 context = $.get$context2D$x(t1); |
| 4508 context.beginPath(); |
| 4509 context.strokeStyle = "black"; |
| 4510 t2 = $.getInterceptor$x(t1); |
| 4511 context.strokeRect(48, 1, $.$add$ns($.$sub$n($.$sub$n(t2.get$width(t1), 50),
150), 2), $.$sub$n(t2.get$height(t1), 2), 1); |
| 4512 x = $.$sub$n(t2.get$width(t1), 130); |
| 4513 if (typeof x !== "number") |
| 4514 return this.drawBarGraph$0$bailout(1, context, x); |
| 4515 context.font = "14px sans-serif"; |
| 4516 for (t1 = this._elements, i = t1.length - 1, t2 = x + 30, y = 20; i >= 0; --
i) { |
| 4517 if (i >= t1.length) |
| 4518 throw $.ioore(i); |
| 4519 context.fillStyle = $.get$color$x(t1[i]); |
| 4520 context.fillRect(x, y, 20, 20); |
| 4521 context.fillStyle = "black"; |
| 4522 if (i >= t1.length) |
| 4523 throw $.ioore(i); |
| 4524 context.fillText($.get$name$x(t1[i]), t2, y + 15); |
| 4525 y += 30; |
| 4526 } |
| 4527 }, |
| 4528 drawBarGraph$0$bailout: function(state0, context, x) { |
| 4529 var t1, i, t2, y; |
| 4530 context.font = "14px sans-serif"; |
| 4531 for (t1 = this._elements, i = t1.length - 1, t2 = $.getInterceptor$ns(x), y
= 20; i >= 0; --i) { |
| 4532 if (i >= t1.length) |
| 4533 throw $.ioore(i); |
| 4534 context.fillStyle = $.get$color$x(t1[i]); |
| 4535 context.fillRect(x, y, 20, 20); |
| 4536 context.fillStyle = "black"; |
| 4537 if (i >= t1.length) |
| 4538 throw $.ioore(i); |
| 4539 context.fillText($.get$name$x(t1[i]), t2.$add(x, 30), y + 15); |
| 4540 y += 30; |
| 4541 } |
| 4542 }, |
| 4543 drawGraph$1: function(model) { |
| 4544 var graphHeight, t1, height, scale; |
| 4545 graphHeight = model.get$maxTotal(); |
| 4546 t1 = this._canvas; |
| 4547 t1.clientWidth; |
| 4548 height = t1.clientHeight; |
| 4549 t1 = $.getInterceptor$n(graphHeight); |
| 4550 if (t1.$ge(graphHeight, this.scaleHeight)) { |
| 4551 this.scaleHeight = t1.$mul(graphHeight, 1.2); |
| 4552 this.scaleHeight = $.JSNumber_methods.ceil$0($.$div$n(this.scaleHeight, 10
0)) * 100; |
| 4553 } |
| 4554 scale = $.$div$n(height, this.scaleHeight); |
| 4555 this.drawValues$2(this.scaleHeight, scale); |
| 4556 this.drawChart$2(this.scaleHeight, scale); |
| 4557 }, |
| 4558 get$drawGraph: function() { |
| 4559 return new $.BoundClosure$1(this, "drawGraph$1"); |
| 4560 }, |
| 4561 drawChart$2: function(maxHeight, scale) { |
| 4562 var t1, dividerHeight, t3, context, height, scaledY, t2, scaledY0, i; |
| 4563 t1 = $.getInterceptor$n(maxHeight); |
| 4564 dividerHeight = t1.$tdiv(maxHeight, 5); |
| 4565 if (typeof dividerHeight !== "number") |
| 4566 return this.drawChart$2$bailout(1, maxHeight, scale, t1, dividerHeight); |
| 4567 t3 = this._canvas; |
| 4568 context = $.get$context2D$x(t3); |
| 4569 context.beginPath(); |
| 4570 height = t1.toInt$0(maxHeight); |
| 4571 scaledY = dividerHeight * scale; |
| 4572 context.clearRect(0, 0, 48, maxHeight); |
| 4573 for (t1 = $.getInterceptor$x(t3), t2 = $.JSNumber_methods.$tdiv(dividerHeigh
t, 100) * 100, scaledY0 = scaledY, i = 1; i < 5; ++i) { |
| 4574 height -= t2; |
| 4575 context.font = "14px sans-serif"; |
| 4576 context.fillStyle = "black"; |
| 4577 context.textAlign = "right"; |
| 4578 context.textBaseline = "middle"; |
| 4579 context.fillText($.JSNumber_methods.toString$0(height), 40, scaledY0); |
| 4580 context.moveTo(48, scaledY0); |
| 4581 context.strokeStyle = "grey"; |
| 4582 context.lineWidth = 0.5; |
| 4583 context.lineTo($.$sub$n(t1.get$width(t3), 150), scaledY0); |
| 4584 context.stroke(); |
| 4585 scaledY0 += scaledY; |
| 4586 } |
| 4587 }, |
| 4588 drawChart$2$bailout: function(state0, maxHeight, scale, t1, dividerHeight) { |
| 4589 var t3, context, height, scaledY, t2, i, t4; |
| 4590 t3 = this._canvas; |
| 4591 context = $.get$context2D$x(t3); |
| 4592 context.beginPath(); |
| 4593 height = t1.toInt$0(maxHeight); |
| 4594 t1 = $.getInterceptor$n(dividerHeight); |
| 4595 scaledY = t1.$mul(dividerHeight, scale); |
| 4596 context.clearRect(0, 0, 48, maxHeight); |
| 4597 for (t2 = $.getInterceptor$x(t3), i = 1; i < 5; ++i) { |
| 4598 t4 = $.$mul$n(t1.$tdiv(dividerHeight, 100), 100); |
| 4599 if (typeof t4 !== "number") |
| 4600 throw $.iae(t4); |
| 4601 height -= t4; |
| 4602 context.font = "14px sans-serif"; |
| 4603 context.fillStyle = "black"; |
| 4604 context.textAlign = "right"; |
| 4605 context.textBaseline = "middle"; |
| 4606 context.fillText($.JSNumber_methods.toString$0(height), 40, scaledY); |
| 4607 context.moveTo(48, scaledY); |
| 4608 context.strokeStyle = "grey"; |
| 4609 context.lineWidth = 0.5; |
| 4610 context.lineTo($.$sub$n(t2.get$width(t3), 150), scaledY); |
| 4611 context.stroke(); |
| 4612 scaledY = $.$add$ns(scaledY, t1.$mul(dividerHeight, scale)); |
| 4613 } |
| 4614 }, |
| 4615 drawValues$2: function(maxHeight, scale) { |
| 4616 var t1, iterator, w, t2, x, s, blankHeight, y, i, h, t3; |
| 4617 if (typeof maxHeight !== "number") |
| 4618 return this.drawValues$2$bailout(1, maxHeight, scale); |
| 4619 t1 = this._model; |
| 4620 iterator = t1.get$iterator(t1); |
| 4621 t1 = this._canvas; |
| 4622 w = $.$sub$n($.$sub$n($.$sub$n($.get$width$x(t1), 50), 150), 2); |
| 4623 t2 = $.JSNumber_methods.ceil$0(maxHeight * scale); |
| 4624 $.get$context2D$x(t1).clearRect(52, 2, w, t2 - 4); |
| 4625 for (t1 = this._elements, x = 52; iterator.moveNext$0();) { |
| 4626 s = iterator.get$current(); |
| 4627 t2 = $.getInterceptor(s); |
| 4628 if (s != null) { |
| 4629 blankHeight = $.$sub$n(this.scaleHeight, t2.total$0(s)); |
| 4630 this.drawVerticalSegment$6(x, 2, 5, blankHeight, "white", scale); |
| 4631 if (typeof blankHeight !== "number") |
| 4632 throw $.iae(blankHeight); |
| 4633 y = 2 + blankHeight; |
| 4634 i = $.$sub$n(t2.get$length(s), 1); |
| 4635 if (i !== (i | 0)) |
| 4636 return this.drawValues$2$bailout(2, maxHeight, scale, t2, t1, iterator
, x, y, i, s); |
| 4637 for (; i >= 0; --i) { |
| 4638 h = t2.$index(s, i); |
| 4639 if (i >= t1.length) |
| 4640 throw $.ioore(i); |
| 4641 this.drawVerticalSegment$6(x, y, 5, h, $.get$color$x(t1[i]), scale); |
| 4642 t3 = t2.$index(s, i); |
| 4643 if (typeof t3 !== "number") |
| 4644 throw $.iae(t3); |
| 4645 y += t3; |
| 4646 } |
| 4647 } else |
| 4648 this.drawVerticalSegment$6(x, 2, 5, maxHeight, "white", scale); |
| 4649 x += 5; |
| 4650 } |
| 4651 }, |
| 4652 drawValues$2$bailout: function(state0, maxHeight, scale, t2, t1, iterator, x,
y, i, s) { |
| 4653 switch (state0) { |
| 4654 case 0: |
| 4655 case 1: |
| 4656 state0 = 0; |
| 4657 t1 = this._model; |
| 4658 iterator = t1.get$iterator(t1); |
| 4659 t1 = this._canvas; |
| 4660 w = $.$sub$n($.$sub$n($.$sub$n($.get$width$x(t1), 50), 150), 2); |
| 4661 t2 = $.ceil$0$n($.$mul$n(maxHeight, scale)); |
| 4662 $.get$context2D$x(t1).clearRect(52, 2, w, t2 - 4); |
| 4663 t1 = this._elements; |
| 4664 x = 52; |
| 4665 case 2: |
| 4666 var w, blankHeight, h, t3; |
| 4667 L0: |
| 4668 while (true) |
| 4669 switch (state0) { |
| 4670 case 0: |
| 4671 if (!iterator.moveNext$0()) |
| 4672 break L0; |
| 4673 s = iterator.get$current(); |
| 4674 t2 = $.getInterceptor(s); |
| 4675 case 2: |
| 4676 if (state0 === 2 || state0 === 0 && s != null) |
| 4677 switch (state0) { |
| 4678 case 0: |
| 4679 blankHeight = $.$sub$n(this.scaleHeight, t2.total$0(s)); |
| 4680 this.drawVerticalSegment$6(x, 2, 5, blankHeight, "white",
scale); |
| 4681 if (typeof blankHeight !== "number") |
| 4682 throw $.iae(blankHeight); |
| 4683 y = 2 + blankHeight; |
| 4684 i = $.$sub$n(t2.get$length(s), 1); |
| 4685 case 2: |
| 4686 state0 = 0; |
| 4687 for (; $.$ge$n(i, 0); --i) { |
| 4688 h = t2.$index(s, i); |
| 4689 if (i !== (i | 0)) |
| 4690 throw $.iae(i); |
| 4691 if (i < 0 || i >= t1.length) |
| 4692 throw $.ioore(i); |
| 4693 this.drawVerticalSegment$6(x, y, 5, h, $.get$color$x(t1[
i]), scale); |
| 4694 t3 = t2.$index(s, i); |
| 4695 if (typeof t3 !== "number") |
| 4696 throw $.iae(t3); |
| 4697 y += t3; |
| 4698 } |
| 4699 } |
| 4700 else |
| 4701 this.drawVerticalSegment$6(x, 2, 5, maxHeight, "white", scale)
; |
| 4702 x += 5; |
| 4703 } |
| 4704 } |
| 4705 }, |
| 4706 drawVerticalSegment$6: function(x, y, w, h, color, scale) { |
| 4707 var t1, context, max; |
| 4708 if (typeof h !== "number") |
| 4709 return this.drawVerticalSegment$6$bailout(1, x, y, w, h, color, scale); |
| 4710 t1 = this._canvas; |
| 4711 context = $.get$context2D$x(t1); |
| 4712 y = $.JSNumber_methods.floor$0(y * scale); |
| 4713 h = $.JSNumber_methods.ceil$0(h * scale); |
| 4714 context.beginPath(); |
| 4715 context.lineWidth = w; |
| 4716 context.fillStyle = color; |
| 4717 context.strokeStyle = color; |
| 4718 if (x < 2) |
| 4719 x = 2; |
| 4720 if (y < 2) |
| 4721 y = 2; |
| 4722 t1 = $.get$height$x(t1); |
| 4723 if (typeof t1 !== "number") |
| 4724 return this.drawVerticalSegment$6$bailout(2, x, y, 0, h, 0, 0, context, t1
); |
| 4725 max = t1 - 2; |
| 4726 if (y + h > max) |
| 4727 h = max - y; |
| 4728 context.moveTo(x, y); |
| 4729 context.lineTo(x, y + h); |
| 4730 context.stroke(); |
| 4731 }, |
| 4732 drawVerticalSegment$6$bailout: function(state0, x, y, w, h, color, scale, cont
ext, t1) { |
| 4733 switch (state0) { |
| 4734 case 0: |
| 4735 case 1: |
| 4736 state0 = 0; |
| 4737 t1 = this._canvas; |
| 4738 context = $.get$context2D$x(t1); |
| 4739 y = $.JSNumber_methods.floor$0(y * scale); |
| 4740 h = $.ceil$0$n($.$mul$n(h, scale)); |
| 4741 context.beginPath(); |
| 4742 context.lineWidth = w; |
| 4743 context.fillStyle = color; |
| 4744 context.strokeStyle = color; |
| 4745 if (x < 2) |
| 4746 x = 2; |
| 4747 if (y < 2) |
| 4748 y = 2; |
| 4749 t1 = $.get$height$x(t1); |
| 4750 case 2: |
| 4751 var max; |
| 4752 state0 = 0; |
| 4753 max = $.$sub$n(t1, 2); |
| 4754 if ($.JSNumber_methods.$gt(y + h, max)) |
| 4755 h = $.$sub$n(max, y); |
| 4756 context.moveTo(x, y); |
| 4757 if (typeof h !== "number") |
| 4758 throw $.iae(h); |
| 4759 context.lineTo(x, y + h); |
| 4760 context.stroke(); |
| 4761 } |
| 4762 }, |
| 4763 BarGraph$2: function(_canvas, _elements) { |
| 4764 this._model = $.GraphModel$($.$tdiv$n($.$sub$n($.$sub$n($.get$width$x(this._
canvas), 50), 150), 5)); |
| 4765 this._model.addListener$2(this.get$drawGraph(), null); |
| 4766 this.drawBarGraph$0(); |
| 4767 } |
| 4768 }; |
| 4769 |
| 4770 $$.GraphModel = {"": "ObservableModel;_samples,_maxSize,_listeners", |
| 4771 addSample$1: function(segments) { |
| 4772 var t1 = this._samples; |
| 4773 if ($.JSInt_methods.$ge(t1.length, this._maxSize)) |
| 4774 $.JSArray_methods.remove$1(t1, $.JSArray_methods.get$first(t1)); |
| 4775 t1.push($.Sample$(segments)); |
| 4776 this.notifySuccess$0(); |
| 4777 }, |
| 4778 get$iterator: function(_) { |
| 4779 return $.JSArray_methods.get$iterator(this._samples); |
| 4780 }, |
| 4781 $index: function(_, i) { |
| 4782 var t1 = this._samples; |
| 4783 if (i !== (i | 0)) |
| 4784 throw $.iae(i); |
| 4785 if (i < 0 || i >= t1.length) |
| 4786 throw $.ioore(i); |
| 4787 return t1[i]; |
| 4788 }, |
| 4789 get$maxTotal: function() { |
| 4790 var t1 = {}; |
| 4791 t1.max_0 = 1; |
| 4792 $.JSArray_methods.forEach$1(this._samples, new $.GraphModel_maxTotal_anon(t1
)); |
| 4793 return t1.max_0; |
| 4794 } |
| 4795 }; |
| 4796 |
| 4797 $$.GraphModel_maxTotal_anon = {"": "Closure;box_0", |
| 4798 call$1: function(s) { |
| 4799 var t1, t2, t3, max; |
| 4800 t1 = $.getInterceptor$x(s); |
| 4801 t2 = t1.total$0(s); |
| 4802 t3 = this.box_0; |
| 4803 max = $.$gt$n(t2, t3.max_0) ? t1.total$0(s) : t3.max_0; |
| 4804 t3.max_0 = max; |
| 4805 return max; |
| 4806 } |
| 4807 }; |
| 4808 |
| 4809 $$.Element0 = {"": "Object;name>,color>"}; |
| 4810 |
| 4811 $$.Sample = {"": "Object;_segments", |
| 4812 get$length: function(_) { |
| 4813 return this._segments.length; |
| 4814 }, |
| 4815 $index: function(_, i) { |
| 4816 var t1 = this._segments; |
| 4817 if (i !== (i | 0)) |
| 4818 throw $.iae(i); |
| 4819 if (i < 0 || i >= t1.length) |
| 4820 throw $.ioore(i); |
| 4821 return t1[i]; |
| 4822 }, |
| 4823 get$iterator: function(_) { |
| 4824 return $.JSArray_methods.get$iterator(this._segments); |
| 4825 }, |
| 4826 total$0: function(_) { |
| 4827 return $.JSArray_methods.fold$2(this._segments, 0, new $.Sample_total_anon()
); |
| 4828 } |
| 4829 }; |
| 4830 |
| 4831 $$.Sample_total_anon = {"": "Closure;", |
| 4832 call$2: function(prev, element) { |
| 4833 return $.$add$ns(prev, element); |
| 4834 } |
| 4835 }; |
| 4836 |
| 4837 $$.IsolateList = {"": "Object;_isolateTable", |
| 4838 updateList$1: function(model) { |
| 4839 var iterator, t1, t2, t3, isolate, t4, isolateId, t5, detailsCell, basicData
, details, stacktraceCell, stacktrace; |
| 4840 iterator = $.get$iterator$ax(model); |
| 4841 for (t1 = this._isolateTable, t2 = $.getInterceptor$x(t1); iterator.moveNext
$0() === true;) { |
| 4842 t3 = {}; |
| 4843 isolate = iterator.get$current(); |
| 4844 t4 = $.getInterceptor$x(isolate); |
| 4845 isolateId = "isolate-" + $.S(t4.get$port(isolate)); |
| 4846 t3.isolateRow_0 = t1.querySelector("#" + isolateId); |
| 4847 t5 = t3.isolateRow_0; |
| 4848 if (t5 != null) |
| 4849 this.updateIsolateDetails$2(isolate, t5); |
| 4850 else { |
| 4851 t3.isolateRow_0 = document.createElement("tr"); |
| 4852 $.set$$$dom_className$x(t3.isolateRow_0, "isolate_row"); |
| 4853 $.set$id$x(t3.isolateRow_0, isolateId); |
| 4854 t5 = t2.get$children(t1); |
| 4855 t5.add$1(t5, t3.isolateRow_0); |
| 4856 detailsCell = document.createElement("td"); |
| 4857 t5 = $.getInterceptor$x(detailsCell); |
| 4858 detailsCell.className = "isolate_details_column"; |
| 4859 $.add$1$ax($.get$children$x(t3.isolateRow_0), detailsCell); |
| 4860 basicData = document.createElement("div"); |
| 4861 basicData.textContent = $.JSString_methods.replaceAll$2($.replaceAll$2$s
(t4.get$name(isolate), "$", ": "), "-", " "); |
| 4862 t4 = t5.get$children(detailsCell); |
| 4863 t4.add$1(t4, basicData); |
| 4864 details = document.createElement("div"); |
| 4865 t4 = $.get$classes$x(details); |
| 4866 t4.addAll$1(t4, ["isolate_details", "hidden"]); |
| 4867 t5 = t5.get$children(detailsCell); |
| 4868 t5.add$1(t5, details); |
| 4869 stacktraceCell = document.createElement("td"); |
| 4870 t5 = $.getInterceptor$x(stacktraceCell); |
| 4871 t4 = t5.get$classes(stacktraceCell); |
| 4872 t4.addAll$1(t4, ["isolate_stacktrace_column", "hidden"]); |
| 4873 $.add$1$ax($.get$children$x(t3.isolateRow_0), stacktraceCell); |
| 4874 stacktrace = document.createElement("div"); |
| 4875 t4 = $.get$classes$x(stacktrace); |
| 4876 t4.addAll$1(t4, ["stack_trace", "hidden"]); |
| 4877 t5 = t5.get$children(stacktraceCell); |
| 4878 t5.add$1(t5, stacktrace); |
| 4879 $.get$onClick$x(t3.isolateRow_0).listen$1(new $.IsolateList_updateList_a
non(t3, this)); |
| 4880 this.updateIsolateDetails$2(isolate, t3.isolateRow_0); |
| 4881 } |
| 4882 } |
| 4883 }, |
| 4884 setStacktrace$2: function(element, json) { |
| 4885 var t1, t2, response, title, t3, stackIterator, i, frame, $frameElement, tex
t, noStack; |
| 4886 t1 = $.getInterceptor$x(element); |
| 4887 t2 = t1.get$children(element); |
| 4888 t2.clear$0(t2); |
| 4889 response = $.parse(json, null); |
| 4890 t2 = $.getInterceptor$asx(response); |
| 4891 t1.set$id(element, t2.$index(response, "handle")); |
| 4892 title = document.createElement("div"); |
| 4893 title.className = "stack_trace_title"; |
| 4894 title.textContent = "Stack Trace"; |
| 4895 t3 = t1.get$children(element); |
| 4896 t3.add$1(t3, title); |
| 4897 if ($.$gt$n($.get$length$asx(t2.$index(response, "stacktrace")), 0)) { |
| 4898 stackIterator = $.get$iterator$ax(t2.$index(response, "stacktrace")); |
| 4899 for (i = 0; stackIterator.moveNext$0() === true;) { |
| 4900 ++i; |
| 4901 frame = stackIterator.get$current(); |
| 4902 $frameElement = document.createElement("div"); |
| 4903 t2 = $.getInterceptor$asx(frame); |
| 4904 text = "" + i + ": " + $.S(t2.$index(frame, "url")) + ":" + $.S(t2.$inde
x(frame, "line")) + ": " + $.S(t2.$index(frame, "function")); |
| 4905 $frameElement.textContent = $.$index$asx(t2.$index(frame, "code"), "opti
mized") === true ? text + " (optimized)" : text; |
| 4906 $frameElement.className = "stack_frame"; |
| 4907 t2 = t1.get$children(element); |
| 4908 t2.add$1(t2, $frameElement); |
| 4909 } |
| 4910 } else { |
| 4911 noStack = document.createElement("div"); |
| 4912 noStack.className = "empty_stack_frame"; |
| 4913 noStack.textContent = "<no stack>"; |
| 4914 t1 = t1.get$children(element); |
| 4915 t1.add$1(t1, noStack); |
| 4916 } |
| 4917 }, |
| 4918 findOrAddChild$2: function($parent, className) { |
| 4919 var child, t1; |
| 4920 child = $parent.querySelector("." + className); |
| 4921 if (child == null) { |
| 4922 child = document.createElement("div"); |
| 4923 child.className = className; |
| 4924 t1 = $.get$children$x($parent); |
| 4925 t1.add$1(t1, child); |
| 4926 } |
| 4927 return child; |
| 4928 }, |
| 4929 updateIsolateDetails$2: function(isolate, row) { |
| 4930 var details, stackTrace; |
| 4931 details = row.querySelector(".isolate_details"); |
| 4932 this.findOrAddChild$2(details, "new_space").textContent = "New space: " + $.
S(isolate.get$newSpace().used) + "K"; |
| 4933 this.findOrAddChild$2(details, "old_space").textContent = "Old space: " + $.
S(isolate.get$oldSpace().used) + "K"; |
| 4934 this.findOrAddChild$2(details, "stack_limit").textContent = "Stack limit: "
+ $.S($.JSDouble_methods.round$0($.abs$0$n(isolate.get$stackLimit()) / 1000000))
+ "M"; |
| 4935 stackTrace = this.findOrAddChild$2(row, "isolate_stacktrace_column"); |
| 4936 $.HttpRequest_getString("/isolate/" + $.S(isolate.get$handle()) + "/stacktra
ce", null, null).then$1(new $.IsolateList_updateIsolateDetails_anon(this, stackT
race)); |
| 4937 } |
| 4938 }; |
| 4939 |
| 4940 $$.IsolateList_updateList_anon = {"": "Closure;box_0,this_1", |
| 4941 call$1: function(e) { |
| 4942 var t1, t2, t3, t4; |
| 4943 t1 = this.box_0.isolateRow_0; |
| 4944 t2 = $.getInterceptor$x(t1); |
| 4945 t3 = t2.query$1(t1, ".isolate_details"); |
| 4946 t4 = $.getInterceptor$x(t3); |
| 4947 t4.get$classes(t3).toggle$1("visible"); |
| 4948 t4.get$classes(t3).toggle$1("hidden"); |
| 4949 t1 = t2.query$1(t1, ".isolate_stacktrace_column"); |
| 4950 t2 = $.getInterceptor$x(t1); |
| 4951 t2.get$classes(t1).toggle$1("visible"); |
| 4952 t2.get$classes(t1).toggle$1("hidden"); |
| 4953 return; |
| 4954 } |
| 4955 }; |
| 4956 |
| 4957 $$.IsolateList_updateIsolateDetails_anon = {"": "Closure;this_0,stackTrace_1", |
| 4958 call$1: function(response) { |
| 4959 return this.this_0.setStacktrace$2(this.stackTrace_1, response); |
| 4960 } |
| 4961 }; |
| 4962 |
| 4963 $$.ObservableModel = {"": "Object;", |
| 4964 addListener$2: function(onUpdate, onFailure) { |
| 4965 this._listeners.push($.ModelListener$(onUpdate, onFailure)); |
| 4966 }, |
| 4967 removeListener$1: function(onUpdate) { |
| 4968 var t1, iterator; |
| 4969 t1 = this._listeners; |
| 4970 iterator = $.JSArray_methods.get$iterator(t1); |
| 4971 for (; iterator.moveNext$0();) |
| 4972 if (iterator.get$current().get$_onUpdate() === onUpdate) { |
| 4973 $.JSArray_methods.remove$1(t1, iterator.get$current()); |
| 4974 return; |
| 4975 } |
| 4976 }, |
| 4977 notifySuccess$0: function() { |
| 4978 $.JSArray_methods.forEach$1(this._listeners, new $.ObservableModel_notifySuc
cess_anon(this)); |
| 4979 }, |
| 4980 notifyFailure$0: function() { |
| 4981 $.JSArray_methods.forEach$1(this._listeners, new $.ObservableModel_notifyFai
lure_anon()); |
| 4982 } |
| 4983 }; |
| 4984 |
| 4985 $$.ObservableModel_notifySuccess_anon = {"": "Closure;this_0", |
| 4986 call$1: function(listener) { |
| 4987 return listener.changed$1(this.this_0); |
| 4988 } |
| 4989 }; |
| 4990 |
| 4991 $$.ObservableModel_notifyFailure_anon = {"": "Closure;", |
| 4992 call$1: function(listener) { |
| 4993 return listener.failed$0(); |
| 4994 } |
| 4995 }; |
| 4996 |
| 4997 $$.ModelListener = {"": "Object;_onUpdate<,_onFailure", |
| 4998 _onUpdate$1: function(arg0) { |
| 4999 return this._onUpdate.call$1(arg0); |
| 5000 }, |
| 5001 changed$1: function(model) { |
| 5002 return $.Primitives_applyFunction(this._onUpdate, [model], $.Function__toMan
gledNames(null)); |
| 5003 }, |
| 5004 failed$0: function() { |
| 5005 return $.Primitives_applyFunction(this._onFailure, [], $.Function__toMangled
Names(null)); |
| 5006 } |
| 5007 }; |
| 5008 |
| 5009 $$.IsolateListModel = {"": "ObservableModel;_isolates,_listeners", |
| 5010 update$0: function() { |
| 5011 $.HttpRequest_getString("/isolates", null, null).then$2$onError(new $.Isolat
eListModel_update_anon(this), new $.IsolateListModel_update_anon0(this)); |
| 5012 }, |
| 5013 _onUpdate$1: function(isolateMap) { |
| 5014 var list, i; |
| 5015 this._isolates = []; |
| 5016 list = $.$index$asx(isolateMap, "isolates"); |
| 5017 if (typeof list !== "string" && (typeof list !== "object" || list === null |
| list.constructor !== Array && !$.getInterceptor(list).$isJavaScriptIndexingBeh
avior())) |
| 5018 return this._onUpdate$1$bailout(1, list); |
| 5019 for (i = 0; i < list.length; ++i) |
| 5020 this._isolates.push($.Isolate$(list[i])); |
| 5021 this.notifySuccess$0(); |
| 5022 }, |
| 5023 _onUpdate$1$bailout: function(state0, list) { |
| 5024 var t1, i; |
| 5025 for (t1 = $.getInterceptor$asx(list), i = 0; $.JSNumber_methods.$lt(i, t1.ge
t$length(list)); ++i) |
| 5026 this._isolates.push($.Isolate$(t1.$index(list, i))); |
| 5027 this.notifySuccess$0(); |
| 5028 }, |
| 5029 get$_onUpdate: function() { |
| 5030 return new $.BoundClosure$1(this, "_onUpdate$1"); |
| 5031 }, |
| 5032 toString$0: function(_) { |
| 5033 return $.JSArray_methods.join$1(this._isolates, ", "); |
| 5034 }, |
| 5035 forEach$1: function(_, f) { |
| 5036 return $.JSArray_methods.forEach$1(this._isolates, f); |
| 5037 }, |
| 5038 isEmpty$0: function(_) { |
| 5039 return $.JSArray_methods.get$isEmpty(this._isolates); |
| 5040 }, |
| 5041 get$isEmpty: function(receiver) { |
| 5042 return new $.BoundClosure$i0(this, "isEmpty$0", receiver); |
| 5043 }, |
| 5044 get$iterator: function(_) { |
| 5045 return $.JSArray_methods.get$iterator(this._isolates); |
| 5046 }, |
| 5047 get$length: function(_) { |
| 5048 return this._isolates.length; |
| 5049 }, |
| 5050 $index: function(_, index) { |
| 5051 var t1 = this._isolates; |
| 5052 if (index !== (index | 0)) |
| 5053 throw $.iae(index); |
| 5054 if (index < 0 || index >= t1.length) |
| 5055 throw $.ioore(index); |
| 5056 return t1[index]; |
| 5057 } |
| 5058 }; |
| 5059 |
| 5060 $$.IsolateListModel_update_anon = {"": "Closure;this_0", |
| 5061 call$1: function(response) { |
| 5062 return this.this_0._onUpdate$1($.parse(response, null)); |
| 5063 } |
| 5064 }; |
| 5065 |
| 5066 $$.IsolateListModel_update_anon0 = {"": "Closure;this_1", |
| 5067 call$1: function(e) { |
| 5068 return this.this_1.notifyFailure$0(); |
| 5069 } |
| 5070 }; |
| 5071 |
| 5072 $$.Isolate = {"": "Object;handle<,name>,port>,startTime,stackLimit<,newSpace<,ol
dSpace<", |
| 5073 toString$0: function(_) { |
| 5074 return $.S(this.name) + ": " + $.S($.$add$ns(this.newSpace.used, this.oldSpa
ce.used)) + "K"; |
| 5075 } |
| 5076 }; |
| 5077 |
| 5078 $$.Space = {"": "Object;used,capacity", |
| 5079 toString$0: function(_) { |
| 5080 return "used: " + $.S(this.used) + " capacity: " + $.S(this.capacity); |
| 5081 } |
| 5082 }; |
| 5083 |
| 5084 $$.main_anon = {"": "Closure;", |
| 5085 call$1: function(timer) { |
| 5086 return $._isolates.update$0(); |
| 5087 } |
| 5088 }; |
| 5089 |
| 5090 $$.onUpdateStatus_anon = {"": "Closure;box_0", |
| 5091 call$1: function(element) { |
| 5092 var t1 = this.box_0; |
| 5093 t1.oldSpace_0 = $.$add$ns(t1.oldSpace_0, element.get$oldSpace().used); |
| 5094 t1.newSpace_1 = $.$add$ns(t1.newSpace_1, element.get$newSpace().used); |
| 5095 } |
| 5096 }; |
| 5097 |
| 5098 // Native classes |
| 5099 $$._WorkerStub = {"": "Interceptor;", |
| 5100 get$id: function(receiver) { |
| 5101 return receiver.id; |
| 5102 }, |
| 5103 set$id: function(receiver, i) { |
| 5104 receiver.id = i; |
| 5105 }, |
| 5106 set$onmessage: function(receiver, f) { |
| 5107 receiver.onmessage = f; |
| 5108 }, |
| 5109 postMessage$1: function(receiver, msg) { |
| 5110 receiver.postMessage(msg); |
| 5111 }, |
| 5112 terminate$0: function(receiver) { |
| 5113 receiver.terminate(); |
| 5114 } |
| 5115 }; |
| 5116 |
| 5117 $$._HTMLElement = {"": "Element;"}; |
| 5118 |
| 5119 $$.AnchorElement = {"": "Element;name=,port=", |
| 5120 toString$0: function(receiver) { |
| 5121 return receiver.toString(); |
| 5122 } |
| 5123 }; |
| 5124 |
| 5125 $$.AnimationEvent = {"": "Event;"}; |
| 5126 |
| 5127 $$.AreaElement = {"": "Element;port="}; |
| 5128 |
| 5129 $$.ArrayBuffer = {"": "Interceptor;"}; |
| 5130 |
| 5131 $$.ArrayBufferView = {"": "Interceptor;"}; |
| 5132 |
| 5133 $$.Attr = {"": "Node;"}; |
| 5134 |
| 5135 $$.AudioElement = {"": "MediaElement;"}; |
| 5136 |
| 5137 $$.AutocompleteErrorEvent = {"": "Event;"}; |
| 5138 |
| 5139 $$.BRElement = {"": "Element;"}; |
| 5140 |
| 5141 $$.BaseElement = {"": "Element;"}; |
| 5142 |
| 5143 $$.BeforeLoadEvent = {"": "Event;"}; |
| 5144 |
| 5145 $$.Blob = {"": "Interceptor;"}; |
| 5146 |
| 5147 $$.BodyElement = {"": "Element;"}; |
| 5148 |
| 5149 $$.ButtonElement = {"": "Element;name=,value="}; |
| 5150 |
| 5151 $$.CDataSection = {"": "Text;"}; |
| 5152 |
| 5153 $$.CanvasElement = {"": "Element;height=,width=", |
| 5154 get$context2D: function(receiver) { |
| 5155 return receiver.getContext("2d"); |
| 5156 } |
| 5157 }; |
| 5158 |
| 5159 $$.CanvasGradient = {"": "Interceptor;"}; |
| 5160 |
| 5161 $$.CanvasPattern = {"": "Interceptor;"}; |
| 5162 |
| 5163 $$.CanvasRenderingContext = {"": "Interceptor;"}; |
| 5164 |
| 5165 $$.CanvasRenderingContext2D = {"": "CanvasRenderingContext;"}; |
| 5166 |
| 5167 $$.CharacterData = {"": "Node;length="}; |
| 5168 |
| 5169 $$.CloseEvent = {"": "Event;"}; |
| 5170 |
| 5171 $$.Comment = {"": "CharacterData;"}; |
| 5172 |
| 5173 $$.CompositionEvent = {"": "UIEvent;"}; |
| 5174 |
| 5175 $$.ContentElement = {"": "Element;"}; |
| 5176 |
| 5177 $$.CssFontFaceLoadEvent = {"": "Event;"}; |
| 5178 |
| 5179 $$.CssStyleDeclaration = {"": "Interceptor;length=", |
| 5180 getPropertyValue$1: function(receiver, propertyName) { |
| 5181 var propValue = receiver.getPropertyValue(propertyName); |
| 5182 return propValue != null ? propValue : ""; |
| 5183 }, |
| 5184 get$color: function(receiver) { |
| 5185 return this.getPropertyValue$1(receiver, "color"); |
| 5186 } |
| 5187 }; |
| 5188 |
| 5189 $$.CustomElementConstructor = {"": "Interceptor;"}; |
| 5190 |
| 5191 $$.CustomEvent = {"": "Event;"}; |
| 5192 |
| 5193 $$.DListElement = {"": "Element;"}; |
| 5194 |
| 5195 $$.DataListElement = {"": "Element;"}; |
| 5196 |
| 5197 $$.DetailsElement = {"": "Element;"}; |
| 5198 |
| 5199 $$.DeviceMotionEvent = {"": "Event;"}; |
| 5200 |
| 5201 $$.DeviceOrientationEvent = {"": "Event;"}; |
| 5202 |
| 5203 $$.DialogElement = {"": "Element;"}; |
| 5204 |
| 5205 $$.DivElement = {"": "Element;"}; |
| 5206 |
| 5207 $$.Document = {"": "Node;", |
| 5208 query$1: function(receiver, selectors) { |
| 5209 return receiver.querySelector(selectors); |
| 5210 }, |
| 5211 register$2: function(receiver, $name, options) { |
| 5212 var t1 = $ === options; |
| 5213 if (t1) |
| 5214 options = null; |
| 5215 if (!t1) |
| 5216 return receiver.webkitRegister($name, $.convertDartToNative_Dictionary(opt
ions)); |
| 5217 return receiver.webkitRegister($name); |
| 5218 }, |
| 5219 get$onClick: function(receiver) { |
| 5220 return $.EventStreamProvider_click.forTarget$1(receiver); |
| 5221 } |
| 5222 }; |
| 5223 |
| 5224 $$.DocumentFragment = {"": "Node;", |
| 5225 get$children: function(receiver) { |
| 5226 if (receiver._children == null) |
| 5227 receiver._children = $.FilteredElementList$(receiver); |
| 5228 return receiver._children; |
| 5229 }, |
| 5230 query$1: function(receiver, selectors) { |
| 5231 return receiver.querySelector(selectors); |
| 5232 } |
| 5233 }; |
| 5234 |
| 5235 $$.DocumentType = {"": "Node;"}; |
| 5236 |
| 5237 $$.DomError = {"": "Interceptor;name="}; |
| 5238 |
| 5239 $$.DomException = {"": "Interceptor;", |
| 5240 get$name: function(receiver) { |
| 5241 var errorName = receiver.name; |
| 5242 if ($.Device_isWebKit() === true && errorName === "SECURITY_ERR") |
| 5243 return "SecurityError"; |
| 5244 if ($.Device_isWebKit() === true && errorName === "SYNTAX_ERR") |
| 5245 return "SyntaxError"; |
| 5246 return errorName; |
| 5247 }, |
| 5248 toString$0: function(receiver) { |
| 5249 return receiver.toString(); |
| 5250 } |
| 5251 }; |
| 5252 |
| 5253 $$.Element = {"": "Node;$$dom_children:children=,id%,$$dom_className:className}"
, |
| 5254 get$attributes: function(receiver) { |
| 5255 return $._ElementAttributeMap$(receiver); |
| 5256 }, |
| 5257 get$children: function(receiver) { |
| 5258 return $._ChildrenElementList$_wrap(receiver); |
| 5259 }, |
| 5260 get$classes: function(receiver) { |
| 5261 return $._ElementCssClassSet$(receiver); |
| 5262 }, |
| 5263 query$1: function(receiver, selectors) { |
| 5264 return receiver.querySelector(selectors); |
| 5265 }, |
| 5266 get$onClick: function(receiver) { |
| 5267 return $.EventStreamProvider_click.forTarget$1(receiver); |
| 5268 }, |
| 5269 $isElement: function() { |
| 5270 return true; |
| 5271 }, |
| 5272 $asElement: function() { |
| 5273 return null; |
| 5274 } |
| 5275 }; |
| 5276 |
| 5277 $$.EmbedElement = {"": "Element;height=,name=,width="}; |
| 5278 |
| 5279 $$.EntityReference = {"": "Node;"}; |
| 5280 |
| 5281 $$.ErrorEvent = {"": "Event;"}; |
| 5282 |
| 5283 $$.Event = {"": "Interceptor;"}; |
| 5284 |
| 5285 $$.EventException = {"": "Interceptor;name=", |
| 5286 toString$0: function(receiver) { |
| 5287 return receiver.toString(); |
| 5288 } |
| 5289 }; |
| 5290 |
| 5291 $$.EventTarget = {"": "Interceptor;", |
| 5292 $$dom_addEventListener$3: function(receiver, type, listener, useCapture) { |
| 5293 return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1)
, useCapture); |
| 5294 }, |
| 5295 $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) { |
| 5296 return receiver.removeEventListener(type, $.convertDartClosureToJS(listener,
1), useCapture); |
| 5297 } |
| 5298 }; |
| 5299 |
| 5300 $$.FieldSetElement = {"": "Element;name="}; |
| 5301 |
| 5302 $$.File = {"": "Blob;name="}; |
| 5303 |
| 5304 $$.FileError = {"": "Interceptor;"}; |
| 5305 |
| 5306 $$.FileException = {"": "Interceptor;name=", |
| 5307 toString$0: function(receiver) { |
| 5308 return receiver.toString(); |
| 5309 } |
| 5310 }; |
| 5311 |
| 5312 $$.FocusEvent = {"": "UIEvent;"}; |
| 5313 |
| 5314 $$.FormElement = {"": "Element;length=,name="}; |
| 5315 |
| 5316 $$.HRElement = {"": "Element;"}; |
| 5317 |
| 5318 $$.HashChangeEvent = {"": "Event;"}; |
| 5319 |
| 5320 $$.HeadElement = {"": "Element;"}; |
| 5321 |
| 5322 $$.HeadingElement = {"": "Element;"}; |
| 5323 |
| 5324 $$.HtmlCollection = {"": "Interceptor;", |
| 5325 get$length: function(receiver) { |
| 5326 return receiver.length; |
| 5327 }, |
| 5328 $index: function(receiver, index) { |
| 5329 return receiver[index]; |
| 5330 }, |
| 5331 $indexSet: function(receiver, index, value) { |
| 5332 throw $.wrapException($.UnsupportedError$("Cannot assign element of immutabl
e List.")); |
| 5333 }, |
| 5334 get$iterator: function(receiver) { |
| 5335 return $.FixedSizeListIterator$(receiver); |
| 5336 }, |
| 5337 forEach$1: function(receiver, f) { |
| 5338 var t1; |
| 5339 for (t1 = this.get$iterator(receiver); t1.moveNext$0();) |
| 5340 f.call$1(t1.get$current()); |
| 5341 return; |
| 5342 }, |
| 5343 toList$1$growable: function(receiver, growable) { |
| 5344 return $.List_List$from(receiver, growable); |
| 5345 }, |
| 5346 toList$0: function($receiver) { |
| 5347 return this.toList$1$growable($receiver, true); |
| 5348 }, |
| 5349 get$isEmpty: function(receiver) { |
| 5350 return this.get$length(receiver) === 0; |
| 5351 }, |
| 5352 skip$1: function(receiver, n) { |
| 5353 return $.SubListIterable$(receiver, n, null); |
| 5354 }, |
| 5355 elementAt$1: function(receiver, index) { |
| 5356 return receiver[index]; |
| 5357 }, |
| 5358 add$1: function(receiver, value) { |
| 5359 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5360 }, |
| 5361 addAll$1: function(receiver, iterable) { |
| 5362 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5363 }, |
| 5364 set$length: function(receiver, value) { |
| 5365 throw $.wrapException($.UnsupportedError$("Cannot resize immutable List.")); |
| 5366 }, |
| 5367 removeLast$0: function(receiver) { |
| 5368 throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List
.")); |
| 5369 }, |
| 5370 sublist$2: function(receiver, start, end) { |
| 5371 if (end == null) |
| 5372 end = this.get$length(receiver); |
| 5373 return $.Lists_getRange(receiver, start, end, []); |
| 5374 }, |
| 5375 sublist$1: function($receiver, start) { |
| 5376 return this.sublist$2($receiver, start, null); |
| 5377 }, |
| 5378 toString$0: function(receiver) { |
| 5379 var buffer = $.StringBuffer$("["); |
| 5380 buffer.writeAll$2(receiver, ", "); |
| 5381 buffer.write$1("]"); |
| 5382 return buffer.toString$0(buffer); |
| 5383 }, |
| 5384 $isList: function() { |
| 5385 return true; |
| 5386 }, |
| 5387 $asList: function() { |
| 5388 return function () { return [$.Node]; }; |
| 5389 }, |
| 5390 $isIterable: function() { |
| 5391 return true; |
| 5392 }, |
| 5393 $asIterable: function() { |
| 5394 return function () { return [$.Node]; }; |
| 5395 }, |
| 5396 $isJavaScriptIndexingBehavior: function() { |
| 5397 return true; |
| 5398 }, |
| 5399 $asJavaScriptIndexingBehavior: function() { |
| 5400 return null; |
| 5401 } |
| 5402 }; |
| 5403 |
| 5404 $$.HtmlDocument = {"": "Document;"}; |
| 5405 |
| 5406 $$.HtmlElement = {"": "Element;"}; |
| 5407 |
| 5408 $$.HtmlFormControlsCollection = {"": "HtmlCollection;"}; |
| 5409 |
| 5410 $$.HtmlOptionsCollection = {"": "HtmlCollection;"}; |
| 5411 |
| 5412 $$.HttpRequest = {"": "EventTarget;responseText=", |
| 5413 $$dom_addEventListener$3: function(receiver, type, listener, useCapture) { |
| 5414 return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1)
, useCapture); |
| 5415 }, |
| 5416 open$5$async$password$user: function(receiver, method, url, async, password, u
ser) { |
| 5417 return receiver.open(method, url, async, user, password); |
| 5418 }, |
| 5419 open$3$async: function($receiver, method, url, async) { |
| 5420 return $receiver.open(method, url, async); |
| 5421 }, |
| 5422 $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) { |
| 5423 return receiver.removeEventListener(type, $.convertDartClosureToJS(listener,
1), useCapture); |
| 5424 }, |
| 5425 send$1: function(receiver, data) { |
| 5426 return receiver.send(data); |
| 5427 }, |
| 5428 get$onError: function(receiver) { |
| 5429 return $.EventStreamProvider_error.forTarget$1(receiver); |
| 5430 }, |
| 5431 get$onLoad: function(receiver) { |
| 5432 return $.EventStreamProvider_load.forTarget$1(receiver); |
| 5433 }, |
| 5434 get$onProgress: function(receiver) { |
| 5435 return $.EventStreamProvider_progress.forTarget$1(receiver); |
| 5436 } |
| 5437 }; |
| 5438 |
| 5439 $$.HttpRequestException = {"": "Interceptor;name=", |
| 5440 toString$0: function(receiver) { |
| 5441 return receiver.toString(); |
| 5442 } |
| 5443 }; |
| 5444 |
| 5445 $$.HttpRequestProgressEvent = {"": "ProgressEvent;"}; |
| 5446 |
| 5447 $$.HttpRequestUpload = {"": "EventTarget;", |
| 5448 $$dom_addEventListener$3: function(receiver, type, listener, useCapture) { |
| 5449 return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1)
, useCapture); |
| 5450 }, |
| 5451 $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) { |
| 5452 return receiver.removeEventListener(type, $.convertDartClosureToJS(listener,
1), useCapture); |
| 5453 } |
| 5454 }; |
| 5455 |
| 5456 $$.IFrameElement = {"": "Element;height=,name=,width="}; |
| 5457 |
| 5458 $$.ImageElement = {"": "Element;height=,width="}; |
| 5459 |
| 5460 $$.InputElement = {"": "Element;height=,name=,value=,width=", |
| 5461 $isElement: function() { |
| 5462 return true; |
| 5463 }, |
| 5464 $asElement: function() { |
| 5465 return null; |
| 5466 } |
| 5467 }; |
| 5468 |
| 5469 $$.KeyboardEvent = {"": "UIEvent;"}; |
| 5470 |
| 5471 $$.KeygenElement = {"": "Element;name="}; |
| 5472 |
| 5473 $$.LIElement = {"": "Element;value="}; |
| 5474 |
| 5475 $$.LabelElement = {"": "Element;"}; |
| 5476 |
| 5477 $$.LegendElement = {"": "Element;"}; |
| 5478 |
| 5479 $$.LinkElement = {"": "Element;"}; |
| 5480 |
| 5481 $$.MapElement = {"": "Element;name="}; |
| 5482 |
| 5483 $$.MediaElement = {"": "Element;"}; |
| 5484 |
| 5485 $$.MediaError = {"": "Interceptor;"}; |
| 5486 |
| 5487 $$.MediaKeyError = {"": "Interceptor;"}; |
| 5488 |
| 5489 $$.MediaKeyEvent = {"": "Event;"}; |
| 5490 |
| 5491 $$.MediaStreamEvent = {"": "Event;"}; |
| 5492 |
| 5493 $$.MediaStreamTrackEvent = {"": "Event;"}; |
| 5494 |
| 5495 $$.MenuElement = {"": "Element;"}; |
| 5496 |
| 5497 $$.MessageEvent = {"": "Event;"}; |
| 5498 |
| 5499 $$.MetaElement = {"": "Element;name="}; |
| 5500 |
| 5501 $$.MeterElement = {"": "Element;value="}; |
| 5502 |
| 5503 $$.ModElement = {"": "Element;"}; |
| 5504 |
| 5505 $$.MouseEvent = {"": "UIEvent;"}; |
| 5506 |
| 5507 $$.MutationEvent = {"": "Event;"}; |
| 5508 |
| 5509 $$.Navigator = {"": "Interceptor;"}; |
| 5510 |
| 5511 $$.NavigatorUserMediaError = {"": "Interceptor;"}; |
| 5512 |
| 5513 $$.Node = {"": "EventTarget;text:textContent}", |
| 5514 get$nodes: function(receiver) { |
| 5515 return $._ChildNodeListLazy$(receiver); |
| 5516 }, |
| 5517 remove$0: function(receiver) { |
| 5518 var t1 = receiver.parentNode; |
| 5519 if (t1 != null) |
| 5520 t1.removeChild(receiver); |
| 5521 }, |
| 5522 replaceWith$1: function(receiver, otherNode) { |
| 5523 var $parent, exception; |
| 5524 try { |
| 5525 $parent = receiver.parentNode; |
| 5526 $.$$dom_replaceChild$2$x($parent, otherNode, receiver); |
| 5527 } catch (exception) { |
| 5528 $.unwrapException(exception); |
| 5529 } |
| 5530 |
| 5531 return receiver; |
| 5532 }, |
| 5533 toString$0: function(receiver) { |
| 5534 var t1 = receiver.localName; |
| 5535 if (t1 == null) { |
| 5536 t1 = receiver.nodeValue; |
| 5537 if (t1 == null) |
| 5538 t1 = $.Object.prototype.toString$0.call(receiver, receiver); |
| 5539 } |
| 5540 return t1; |
| 5541 }, |
| 5542 $$dom_addEventListener$3: function(receiver, type, listener, useCapture) { |
| 5543 return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1)
, useCapture); |
| 5544 }, |
| 5545 $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) { |
| 5546 return receiver.removeEventListener(type, $.convertDartClosureToJS(listener,
1), useCapture); |
| 5547 }, |
| 5548 $$dom_replaceChild$2: function(receiver, newChild, oldChild) { |
| 5549 return receiver.replaceChild(newChild, oldChild); |
| 5550 } |
| 5551 }; |
| 5552 |
| 5553 $$.NodeList = {"": "Interceptor;", |
| 5554 get$length: function(receiver) { |
| 5555 return receiver.length; |
| 5556 }, |
| 5557 $index: function(receiver, index) { |
| 5558 return receiver[index]; |
| 5559 }, |
| 5560 $indexSet: function(receiver, index, value) { |
| 5561 throw $.wrapException($.UnsupportedError$("Cannot assign element of immutabl
e List.")); |
| 5562 }, |
| 5563 get$iterator: function(receiver) { |
| 5564 return $.FixedSizeListIterator$(receiver); |
| 5565 }, |
| 5566 forEach$1: function(receiver, f) { |
| 5567 var t1; |
| 5568 for (t1 = this.get$iterator(receiver); t1.moveNext$0();) |
| 5569 f.call$1(t1.get$current()); |
| 5570 return; |
| 5571 }, |
| 5572 toList$1$growable: function(receiver, growable) { |
| 5573 return $.List_List$from(receiver, growable); |
| 5574 }, |
| 5575 toList$0: function($receiver) { |
| 5576 return this.toList$1$growable($receiver, true); |
| 5577 }, |
| 5578 get$isEmpty: function(receiver) { |
| 5579 return this.get$length(receiver) === 0; |
| 5580 }, |
| 5581 skip$1: function(receiver, n) { |
| 5582 return $.SubListIterable$(receiver, n, null); |
| 5583 }, |
| 5584 elementAt$1: function(receiver, index) { |
| 5585 return receiver[index]; |
| 5586 }, |
| 5587 add$1: function(receiver, value) { |
| 5588 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5589 }, |
| 5590 addAll$1: function(receiver, iterable) { |
| 5591 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5592 }, |
| 5593 set$length: function(receiver, value) { |
| 5594 throw $.wrapException($.UnsupportedError$("Cannot resize immutable List.")); |
| 5595 }, |
| 5596 removeLast$0: function(receiver) { |
| 5597 throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List
.")); |
| 5598 }, |
| 5599 sublist$2: function(receiver, start, end) { |
| 5600 if (end == null) |
| 5601 end = this.get$length(receiver); |
| 5602 return $.Lists_getRange(receiver, start, end, []); |
| 5603 }, |
| 5604 sublist$1: function($receiver, start) { |
| 5605 return this.sublist$2($receiver, start, null); |
| 5606 }, |
| 5607 toString$0: function(receiver) { |
| 5608 var buffer = $.StringBuffer$("["); |
| 5609 buffer.writeAll$2(receiver, ", "); |
| 5610 buffer.write$1("]"); |
| 5611 return buffer.toString$0(buffer); |
| 5612 }, |
| 5613 $isList: function() { |
| 5614 return true; |
| 5615 }, |
| 5616 $asList: function() { |
| 5617 return function () { return [$.Node]; }; |
| 5618 }, |
| 5619 $isIterable: function() { |
| 5620 return true; |
| 5621 }, |
| 5622 $asIterable: function() { |
| 5623 return function () { return [$.Node]; }; |
| 5624 }, |
| 5625 $isJavaScriptIndexingBehavior: function() { |
| 5626 return true; |
| 5627 }, |
| 5628 $asJavaScriptIndexingBehavior: function() { |
| 5629 return null; |
| 5630 } |
| 5631 }; |
| 5632 |
| 5633 $$.Notation = {"": "Node;"}; |
| 5634 |
| 5635 $$.OListElement = {"": "Element;"}; |
| 5636 |
| 5637 $$.ObjectElement = {"": "Element;height=,name=,width="}; |
| 5638 |
| 5639 $$.OptGroupElement = {"": "Element;"}; |
| 5640 |
| 5641 $$.OptionElement = {"": "Element;value="}; |
| 5642 |
| 5643 $$.OutputElement = {"": "Element;name=,value="}; |
| 5644 |
| 5645 $$.OverflowEvent = {"": "Event;"}; |
| 5646 |
| 5647 $$.PageTransitionEvent = {"": "Event;"}; |
| 5648 |
| 5649 $$.ParagraphElement = {"": "Element;"}; |
| 5650 |
| 5651 $$.ParamElement = {"": "Element;name=,value="}; |
| 5652 |
| 5653 $$.PopStateEvent = {"": "Event;"}; |
| 5654 |
| 5655 $$.PositionError = {"": "Interceptor;"}; |
| 5656 |
| 5657 $$.PreElement = {"": "Element;"}; |
| 5658 |
| 5659 $$.ProcessingInstruction = {"": "Node;"}; |
| 5660 |
| 5661 $$.ProgressElement = {"": "Element;value="}; |
| 5662 |
| 5663 $$.ProgressEvent = {"": "Event;", |
| 5664 total$0: function($receiver) { |
| 5665 return this.total.call$0(); |
| 5666 } |
| 5667 }; |
| 5668 |
| 5669 $$.QuoteElement = {"": "Element;"}; |
| 5670 |
| 5671 $$.RadioNodeList = {"": "NodeList;"}; |
| 5672 |
| 5673 $$.RangeException = {"": "Interceptor;name=", |
| 5674 toString$0: function(receiver) { |
| 5675 return receiver.toString(); |
| 5676 } |
| 5677 }; |
| 5678 |
| 5679 $$.RtcDataChannelEvent = {"": "Event;"}; |
| 5680 |
| 5681 $$.RtcDtmfToneChangeEvent = {"": "Event;"}; |
| 5682 |
| 5683 $$.RtcIceCandidateEvent = {"": "Event;"}; |
| 5684 |
| 5685 $$.ScriptElement = {"": "Element;"}; |
| 5686 |
| 5687 $$.SecurityPolicyViolationEvent = {"": "Event;"}; |
| 5688 |
| 5689 $$.SelectElement = {"": "Element;length%,name=,value="}; |
| 5690 |
| 5691 $$.ShadowElement = {"": "Element;"}; |
| 5692 |
| 5693 $$.ShadowRoot = {"": "DocumentFragment;"}; |
| 5694 |
| 5695 $$.SourceElement = {"": "Element;"}; |
| 5696 |
| 5697 $$.SpanElement = {"": "Element;"}; |
| 5698 |
| 5699 $$.SpeechInputEvent = {"": "Event;"}; |
| 5700 |
| 5701 $$.SpeechRecognitionError = {"": "Event;"}; |
| 5702 |
| 5703 $$.SpeechRecognitionEvent = {"": "Event;"}; |
| 5704 |
| 5705 $$.StorageEvent = {"": "Event;"}; |
| 5706 |
| 5707 $$.StyleElement = {"": "Element;"}; |
| 5708 |
| 5709 $$.TableCaptionElement = {"": "Element;"}; |
| 5710 |
| 5711 $$.TableCellElement = {"": "Element;"}; |
| 5712 |
| 5713 $$.TableColElement = {"": "Element;"}; |
| 5714 |
| 5715 $$.TableElement = {"": "Element;"}; |
| 5716 |
| 5717 $$.TableRowElement = {"": "Element;"}; |
| 5718 |
| 5719 $$.TableSectionElement = {"": "Element;"}; |
| 5720 |
| 5721 $$.TemplateElement = {"": "Element;"}; |
| 5722 |
| 5723 $$.Text = {"": "CharacterData;"}; |
| 5724 |
| 5725 $$.TextAreaElement = {"": "Element;name=,value="}; |
| 5726 |
| 5727 $$.TextEvent = {"": "UIEvent;"}; |
| 5728 |
| 5729 $$.TitleElement = {"": "Element;"}; |
| 5730 |
| 5731 $$.TouchEvent = {"": "UIEvent;"}; |
| 5732 |
| 5733 $$.TrackElement = {"": "Element;"}; |
| 5734 |
| 5735 $$.TrackEvent = {"": "Event;"}; |
| 5736 |
| 5737 $$.TransitionEvent = {"": "Event;"}; |
| 5738 |
| 5739 $$.UIEvent = {"": "Event;"}; |
| 5740 |
| 5741 $$.UListElement = {"": "Element;"}; |
| 5742 |
| 5743 $$.Uint8Array = {"": "ArrayBufferView;", |
| 5744 get$length: function(receiver) { |
| 5745 return receiver.length; |
| 5746 }, |
| 5747 $index: function(receiver, index) { |
| 5748 return receiver[index]; |
| 5749 }, |
| 5750 $indexSet: function(receiver, index, value) { |
| 5751 receiver[index] = value; |
| 5752 }, |
| 5753 get$iterator: function(receiver) { |
| 5754 return $.FixedSizeListIterator$(receiver); |
| 5755 }, |
| 5756 forEach$1: function(receiver, f) { |
| 5757 var t1; |
| 5758 for (t1 = this.get$iterator(receiver); t1.moveNext$0();) |
| 5759 f.call$1(t1.get$current()); |
| 5760 return; |
| 5761 }, |
| 5762 toList$1$growable: function(receiver, growable) { |
| 5763 return $.List_List$from(receiver, growable); |
| 5764 }, |
| 5765 toList$0: function($receiver) { |
| 5766 return this.toList$1$growable($receiver, true); |
| 5767 }, |
| 5768 get$isEmpty: function(receiver) { |
| 5769 return this.get$length(receiver) === 0; |
| 5770 }, |
| 5771 skip$1: function(receiver, n) { |
| 5772 return $.SubListIterable$(receiver, n, null); |
| 5773 }, |
| 5774 elementAt$1: function(receiver, index) { |
| 5775 return this.$index(receiver, index); |
| 5776 }, |
| 5777 add$1: function(receiver, value) { |
| 5778 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5779 }, |
| 5780 addAll$1: function(receiver, iterable) { |
| 5781 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5782 }, |
| 5783 set$length: function(receiver, value) { |
| 5784 throw $.wrapException($.UnsupportedError$("Cannot resize immutable List.")); |
| 5785 }, |
| 5786 removeLast$0: function(receiver) { |
| 5787 throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List
.")); |
| 5788 }, |
| 5789 sublist$2: function(receiver, start, end) { |
| 5790 if (end == null) |
| 5791 end = this.get$length(receiver); |
| 5792 return $.Lists_getRange(receiver, start, end, []); |
| 5793 }, |
| 5794 sublist$1: function($receiver, start) { |
| 5795 return this.sublist$2($receiver, start, null); |
| 5796 }, |
| 5797 toString$0: function(receiver) { |
| 5798 var buffer = $.StringBuffer$("["); |
| 5799 buffer.writeAll$2(receiver, ", "); |
| 5800 buffer.write$1("]"); |
| 5801 return buffer.toString$0(buffer); |
| 5802 }, |
| 5803 $isList: function() { |
| 5804 return true; |
| 5805 }, |
| 5806 $asList: function() { |
| 5807 return function () { return [$.$int]; }; |
| 5808 }, |
| 5809 $isIterable: function() { |
| 5810 return true; |
| 5811 }, |
| 5812 $asIterable: function() { |
| 5813 return function () { return [$.$int]; }; |
| 5814 }, |
| 5815 $isJavaScriptIndexingBehavior: function() { |
| 5816 return true; |
| 5817 }, |
| 5818 $asJavaScriptIndexingBehavior: function() { |
| 5819 return null; |
| 5820 } |
| 5821 }; |
| 5822 |
| 5823 $$.Uint8ClampedArray = {"": "Uint8Array;", |
| 5824 $index: function(receiver, index) { |
| 5825 return receiver[index]; |
| 5826 }, |
| 5827 $indexSet: function(receiver, index, value) { |
| 5828 receiver[index] = value; |
| 5829 }, |
| 5830 get$iterator: function(receiver) { |
| 5831 return $.FixedSizeListIterator$(receiver); |
| 5832 }, |
| 5833 forEach$1: function(receiver, f) { |
| 5834 var t1; |
| 5835 for (t1 = this.get$iterator(receiver); t1.moveNext$0();) |
| 5836 f.call$1(t1.get$current()); |
| 5837 return; |
| 5838 }, |
| 5839 toList$1$growable: function(receiver, growable) { |
| 5840 return $.List_List$from(receiver, growable); |
| 5841 }, |
| 5842 toList$0: function($receiver) { |
| 5843 return this.toList$1$growable($receiver, true); |
| 5844 }, |
| 5845 get$isEmpty: function(receiver) { |
| 5846 return this.get$length(receiver) === 0; |
| 5847 }, |
| 5848 skip$1: function(receiver, n) { |
| 5849 return $.SubListIterable$(receiver, n, null); |
| 5850 }, |
| 5851 elementAt$1: function(receiver, index) { |
| 5852 return receiver[index]; |
| 5853 }, |
| 5854 add$1: function(receiver, value) { |
| 5855 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5856 }, |
| 5857 addAll$1: function(receiver, iterable) { |
| 5858 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5859 }, |
| 5860 set$length: function(receiver, value) { |
| 5861 throw $.wrapException($.UnsupportedError$("Cannot resize immutable List.")); |
| 5862 }, |
| 5863 removeLast$0: function(receiver) { |
| 5864 throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List
.")); |
| 5865 }, |
| 5866 sublist$2: function(receiver, start, end) { |
| 5867 if (end == null) |
| 5868 end = this.get$length(receiver); |
| 5869 return $.Lists_getRange(receiver, start, end, []); |
| 5870 }, |
| 5871 sublist$1: function($receiver, start) { |
| 5872 return this.sublist$2($receiver, start, null); |
| 5873 }, |
| 5874 toString$0: function(receiver) { |
| 5875 var buffer = $.StringBuffer$("["); |
| 5876 buffer.writeAll$2(receiver, ", "); |
| 5877 buffer.write$1("]"); |
| 5878 return buffer.toString$0(buffer); |
| 5879 }, |
| 5880 $isList: function() { |
| 5881 return true; |
| 5882 }, |
| 5883 $asList: function() { |
| 5884 return function () { return [$.$int]; }; |
| 5885 }, |
| 5886 $isIterable: function() { |
| 5887 return true; |
| 5888 }, |
| 5889 $asIterable: function() { |
| 5890 return function () { return [$.$int]; }; |
| 5891 }, |
| 5892 $isJavaScriptIndexingBehavior: function() { |
| 5893 return true; |
| 5894 }, |
| 5895 $asJavaScriptIndexingBehavior: function() { |
| 5896 return null; |
| 5897 } |
| 5898 }; |
| 5899 |
| 5900 $$.UnknownElement = {"": "Element;"}; |
| 5901 |
| 5902 $$.VideoElement = {"": "MediaElement;height=,width="}; |
| 5903 |
| 5904 $$.WheelEvent = {"": "MouseEvent;"}; |
| 5905 |
| 5906 $$.Window = {"": "EventTarget;name=,navigator=", |
| 5907 $$dom_addEventListener$3: function(receiver, type, listener, useCapture) { |
| 5908 return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1)
, useCapture); |
| 5909 }, |
| 5910 $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) { |
| 5911 return receiver.removeEventListener(type, $.convertDartClosureToJS(listener,
1), useCapture); |
| 5912 }, |
| 5913 get$onClick: function(receiver) { |
| 5914 return $.EventStreamProvider_click.forTarget$1(receiver); |
| 5915 } |
| 5916 }; |
| 5917 |
| 5918 $$.XPathException = {"": "Interceptor;name=", |
| 5919 toString$0: function(receiver) { |
| 5920 return receiver.toString(); |
| 5921 } |
| 5922 }; |
| 5923 |
| 5924 $$._NamedNodeMap = {"": "Interceptor;", |
| 5925 get$length: function(receiver) { |
| 5926 return receiver.length; |
| 5927 }, |
| 5928 $index: function(receiver, index) { |
| 5929 return receiver[index]; |
| 5930 }, |
| 5931 $indexSet: function(receiver, index, value) { |
| 5932 throw $.wrapException($.UnsupportedError$("Cannot assign element of immutabl
e List.")); |
| 5933 }, |
| 5934 get$iterator: function(receiver) { |
| 5935 return $.FixedSizeListIterator$(receiver); |
| 5936 }, |
| 5937 forEach$1: function(receiver, f) { |
| 5938 var t1; |
| 5939 for (t1 = this.get$iterator(receiver); t1.moveNext$0();) |
| 5940 f.call$1(t1.get$current()); |
| 5941 return; |
| 5942 }, |
| 5943 toList$1$growable: function(receiver, growable) { |
| 5944 return $.List_List$from(receiver, growable); |
| 5945 }, |
| 5946 toList$0: function($receiver) { |
| 5947 return this.toList$1$growable($receiver, true); |
| 5948 }, |
| 5949 get$isEmpty: function(receiver) { |
| 5950 return this.get$length(receiver) === 0; |
| 5951 }, |
| 5952 skip$1: function(receiver, n) { |
| 5953 return $.SubListIterable$(receiver, n, null); |
| 5954 }, |
| 5955 elementAt$1: function(receiver, index) { |
| 5956 return receiver[index]; |
| 5957 }, |
| 5958 add$1: function(receiver, value) { |
| 5959 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5960 }, |
| 5961 addAll$1: function(receiver, iterable) { |
| 5962 throw $.wrapException($.UnsupportedError$("Cannot add to immutable List.")); |
| 5963 }, |
| 5964 set$length: function(receiver, value) { |
| 5965 throw $.wrapException($.UnsupportedError$("Cannot resize immutable List.")); |
| 5966 }, |
| 5967 removeLast$0: function(receiver) { |
| 5968 throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List
.")); |
| 5969 }, |
| 5970 sublist$2: function(receiver, start, end) { |
| 5971 if (end == null) |
| 5972 end = this.get$length(receiver); |
| 5973 return $.Lists_getRange(receiver, start, end, []); |
| 5974 }, |
| 5975 sublist$1: function($receiver, start) { |
| 5976 return this.sublist$2($receiver, start, null); |
| 5977 }, |
| 5978 toString$0: function(receiver) { |
| 5979 var buffer = $.StringBuffer$("["); |
| 5980 buffer.writeAll$2(receiver, ", "); |
| 5981 buffer.write$1("]"); |
| 5982 return buffer.toString$0(buffer); |
| 5983 }, |
| 5984 $isList: function() { |
| 5985 return true; |
| 5986 }, |
| 5987 $asList: function() { |
| 5988 return function () { return [$.Node]; }; |
| 5989 }, |
| 5990 $isIterable: function() { |
| 5991 return true; |
| 5992 }, |
| 5993 $asIterable: function() { |
| 5994 return function () { return [$.Node]; }; |
| 5995 }, |
| 5996 $isJavaScriptIndexingBehavior: function() { |
| 5997 return true; |
| 5998 }, |
| 5999 $asJavaScriptIndexingBehavior: function() { |
| 6000 return null; |
| 6001 } |
| 6002 }; |
| 6003 |
| 6004 $$._WebKitTransitionEvent = {"": "Event;"}; |
| 6005 |
| 6006 $$.VersionChangeEvent = {"": "Event;"}; |
| 6007 |
| 6008 $$.AElement = {"": "StyledElement;"}; |
| 6009 |
| 6010 $$.AltGlyphElement = {"": "TextPositioningElement;"}; |
| 6011 |
| 6012 $$.AnimateElement = {"": "AnimationElement;"}; |
| 6013 |
| 6014 $$.AnimateMotionElement = {"": "AnimationElement;"}; |
| 6015 |
| 6016 $$.AnimateTransformElement = {"": "AnimationElement;"}; |
| 6017 |
| 6018 $$.AnimatedLength = {"": "Interceptor;"}; |
| 6019 |
| 6020 $$.AnimatedNumberList = {"": "Interceptor;"}; |
| 6021 |
| 6022 $$.AnimationElement = {"": "SvgElement;"}; |
| 6023 |
| 6024 $$.CircleElement = {"": "StyledElement;"}; |
| 6025 |
| 6026 $$.ClipPathElement = {"": "StyledElement;"}; |
| 6027 |
| 6028 $$.DefsElement = {"": "StyledElement;"}; |
| 6029 |
| 6030 $$.DescElement = {"": "StyledElement;"}; |
| 6031 |
| 6032 $$.EllipseElement = {"": "StyledElement;"}; |
| 6033 |
| 6034 $$.FEBlendElement = {"": "StyledElement;height=,width="}; |
| 6035 |
| 6036 $$.FEColorMatrixElement = {"": "StyledElement;height=,width="}; |
| 6037 |
| 6038 $$.FEComponentTransferElement = {"": "StyledElement;height=,width="}; |
| 6039 |
| 6040 $$.FECompositeElement = {"": "StyledElement;height=,width="}; |
| 6041 |
| 6042 $$.FEConvolveMatrixElement = {"": "StyledElement;height=,width="}; |
| 6043 |
| 6044 $$.FEDiffuseLightingElement = {"": "StyledElement;height=,width="}; |
| 6045 |
| 6046 $$.FEDisplacementMapElement = {"": "StyledElement;height=,width="}; |
| 6047 |
| 6048 $$.FEDistantLightElement = {"": "SvgElement;"}; |
| 6049 |
| 6050 $$.FEFloodElement = {"": "StyledElement;height=,width="}; |
| 6051 |
| 6052 $$.FEFuncAElement = {"": "_SVGComponentTransferFunctionElement;"}; |
| 6053 |
| 6054 $$.FEFuncBElement = {"": "_SVGComponentTransferFunctionElement;"}; |
| 6055 |
| 6056 $$.FEFuncGElement = {"": "_SVGComponentTransferFunctionElement;"}; |
| 6057 |
| 6058 $$.FEFuncRElement = {"": "_SVGComponentTransferFunctionElement;"}; |
| 6059 |
| 6060 $$.FEGaussianBlurElement = {"": "StyledElement;height=,width="}; |
| 6061 |
| 6062 $$.FEImageElement = {"": "StyledElement;height=,width="}; |
| 6063 |
| 6064 $$.FEMergeElement = {"": "StyledElement;height=,width="}; |
| 6065 |
| 6066 $$.FEMergeNodeElement = {"": "SvgElement;"}; |
| 6067 |
| 6068 $$.FEMorphologyElement = {"": "StyledElement;height=,width="}; |
| 6069 |
| 6070 $$.FEOffsetElement = {"": "StyledElement;height=,width="}; |
| 6071 |
| 6072 $$.FEPointLightElement = {"": "SvgElement;"}; |
| 6073 |
| 6074 $$.FESpecularLightingElement = {"": "StyledElement;height=,width="}; |
| 6075 |
| 6076 $$.FESpotLightElement = {"": "SvgElement;"}; |
| 6077 |
| 6078 $$.FETileElement = {"": "StyledElement;height=,width="}; |
| 6079 |
| 6080 $$.FETurbulenceElement = {"": "StyledElement;height=,width="}; |
| 6081 |
| 6082 $$.FilterElement = {"": "StyledElement;height=,width="}; |
| 6083 |
| 6084 $$.ForeignObjectElement = {"": "StyledElement;height=,width="}; |
| 6085 |
| 6086 $$.GElement = {"": "StyledElement;"}; |
| 6087 |
| 6088 $$.ImageElement0 = {"": "StyledElement;height=,width="}; |
| 6089 |
| 6090 $$.LineElement = {"": "StyledElement;"}; |
| 6091 |
| 6092 $$.LinearGradientElement = {"": "_GradientElement;"}; |
| 6093 |
| 6094 $$.MarkerElement = {"": "StyledElement;"}; |
| 6095 |
| 6096 $$.MaskElement = {"": "StyledElement;height=,width="}; |
| 6097 |
| 6098 $$.MetadataElement = {"": "SvgElement;"}; |
| 6099 |
| 6100 $$.PathElement = {"": "StyledElement;"}; |
| 6101 |
| 6102 $$.PatternElement = {"": "StyledElement;height=,width="}; |
| 6103 |
| 6104 $$.PolygonElement = {"": "StyledElement;"}; |
| 6105 |
| 6106 $$.PolylineElement = {"": "StyledElement;"}; |
| 6107 |
| 6108 $$.RadialGradientElement = {"": "_GradientElement;"}; |
| 6109 |
| 6110 $$.RectElement = {"": "StyledElement;height=,width="}; |
| 6111 |
| 6112 $$.ScriptElement0 = {"": "SvgElement;"}; |
| 6113 |
| 6114 $$.SetElement = {"": "AnimationElement;"}; |
| 6115 |
| 6116 $$.StopElement = {"": "StyledElement;"}; |
| 6117 |
| 6118 $$.StyleElement0 = {"": "SvgElement;"}; |
| 6119 |
| 6120 $$.StyledElement = {"": "SvgElement;"}; |
| 6121 |
| 6122 $$.SvgDocument = {"": "Document;"}; |
| 6123 |
| 6124 $$.SvgElement = {"": "Element;", |
| 6125 get$classes: function(receiver) { |
| 6126 if (receiver._cssClassSet == null) |
| 6127 receiver._cssClassSet = $._AttributeClassSet$(receiver); |
| 6128 return receiver._cssClassSet; |
| 6129 }, |
| 6130 get$children: function(receiver) { |
| 6131 return $.FilteredElementList$(receiver); |
| 6132 }, |
| 6133 get$$$dom_children: function(receiver) { |
| 6134 throw $.wrapException($.UnsupportedError$("Cannot get dom_children on SVG.")
); |
| 6135 }, |
| 6136 get$id: function(receiver) { |
| 6137 return receiver.id; |
| 6138 }, |
| 6139 set$id: function(receiver, value) { |
| 6140 receiver.id = value; |
| 6141 } |
| 6142 }; |
| 6143 |
| 6144 $$.SvgException = {"": "Interceptor;name=", |
| 6145 toString$0: function(receiver) { |
| 6146 return receiver.toString(); |
| 6147 } |
| 6148 }; |
| 6149 |
| 6150 $$.SvgSvgElement = {"": "StyledElement;height=,width="}; |
| 6151 |
| 6152 $$.SwitchElement = {"": "StyledElement;"}; |
| 6153 |
| 6154 $$.SymbolElement = {"": "StyledElement;"}; |
| 6155 |
| 6156 $$.TSpanElement = {"": "TextPositioningElement;"}; |
| 6157 |
| 6158 $$.TextContentElement = {"": "StyledElement;"}; |
| 6159 |
| 6160 $$.TextElement = {"": "TextPositioningElement;"}; |
| 6161 |
| 6162 $$.TextPathElement = {"": "TextContentElement;"}; |
| 6163 |
| 6164 $$.TextPositioningElement = {"": "TextContentElement;"}; |
| 6165 |
| 6166 $$.TitleElement0 = {"": "StyledElement;"}; |
| 6167 |
| 6168 $$.UseElement = {"": "StyledElement;height=,width="}; |
| 6169 |
| 6170 $$.ViewElement = {"": "SvgElement;"}; |
| 6171 |
| 6172 $$.ZoomEvent = {"": "UIEvent;"}; |
| 6173 |
| 6174 $$._GradientElement = {"": "StyledElement;"}; |
| 6175 |
| 6176 $$._SVGComponentTransferFunctionElement = {"": "SvgElement;"}; |
| 6177 |
| 6178 $$.AudioProcessingEvent = {"": "Event;"}; |
| 6179 |
| 6180 $$.OfflineAudioCompletionEvent = {"": "Event;"}; |
| 6181 |
| 6182 $$.ContextEvent = {"": "Event;"}; |
| 6183 |
| 6184 $$.SqlError = {"": "Interceptor;"}; |
| 6185 |
| 6186 $$.SqlException = {"": "Interceptor;"}; |
| 6187 |
| 6188 $$.Closure = {"": "Object;", |
| 6189 toString$0: function(_) { |
| 6190 return "Closure"; |
| 6191 } |
| 6192 }; |
| 6193 |
| 6194 // Bound closures |
| 6195 $$.BoundClosure$1 = {"": "Closure;self,target", |
| 6196 call$1: function(p0) { |
| 6197 return this.self[this.target](p0); |
| 6198 } |
| 6199 }; |
| 6200 |
| 6201 $$.BoundClosure$0 = {"": "Closure;self,target", |
| 6202 call$0: function() { |
| 6203 return this.self[this.target](); |
| 6204 } |
| 6205 }; |
| 6206 |
| 6207 $$.BoundClosure$i0 = {"": "Closure;self,target,receiver", |
| 6208 call$0: function() { |
| 6209 return this.self[this.target](this.receiver); |
| 6210 } |
| 6211 }; |
| 6212 |
| 6213 Isolate.$finishClasses($$, $, null); |
| 6214 $$ = null; |
| 6215 |
| 6216 $.Arrays_copy = function(src, srcStart, dst, dstStart, count) { |
| 6217 var i, j, t1, t2, t3; |
| 6218 if (typeof src !== "string" && (typeof src !== "object" || src === null || src
.constructor !== Array && !$.getInterceptor(src).$isJavaScriptIndexingBehavior()
)) |
| 6219 return $.Arrays_copy$bailout(1, src, srcStart, dst, dstStart, count); |
| 6220 if (typeof dst !== "object" || dst === null || (dst.constructor !== Array || !
!dst.immutable$list) && !$.getInterceptor(dst).$isJavaScriptIndexingBehavior()) |
| 6221 return $.Arrays_copy$bailout(1, src, srcStart, dst, dstStart, count); |
| 6222 if (typeof dstStart !== "number") |
| 6223 return $.Arrays_copy$bailout(1, src, srcStart, dst, dstStart, count); |
| 6224 if (srcStart < dstStart) |
| 6225 for (i = srcStart + count - 1, j = dstStart + count - 1, t1 = src.length, t2
= dst.length; i >= srcStart; --i, --j) { |
| 6226 if (i !== (i | 0)) |
| 6227 throw $.iae(i); |
| 6228 if (i < 0 || i >= t1) |
| 6229 throw $.ioore(i); |
| 6230 t3 = src[i]; |
| 6231 if (j !== (j | 0)) |
| 6232 throw $.iae(j); |
| 6233 if (j < 0 || j >= t2) |
| 6234 throw $.ioore(j); |
| 6235 dst[j] = t3; |
| 6236 } |
| 6237 else |
| 6238 for (t1 = src.length, t2 = dst.length, j = dstStart, i = srcStart; i < srcSt
art + count; ++i, ++j) { |
| 6239 if (i !== (i | 0)) |
| 6240 throw $.iae(i); |
| 6241 if (i < 0 || i >= t1) |
| 6242 throw $.ioore(i); |
| 6243 t3 = src[i]; |
| 6244 if (j !== (j | 0)) |
| 6245 throw $.iae(j); |
| 6246 if (j < 0 || j >= t2) |
| 6247 throw $.ioore(j); |
| 6248 dst[j] = t3; |
| 6249 } |
| 6250 }; |
| 6251 |
| 6252 $.Arrays_copy$bailout = function(state0, src, srcStart, dst, dstStart, count) { |
| 6253 var i, j, t1; |
| 6254 if ($.JSNumber_methods.$lt(srcStart, dstStart)) |
| 6255 for (i = srcStart + count - 1, j = $.$sub$n($.$add$ns(dstStart, count), 1),
t1 = $.getInterceptor$asx(src); i >= srcStart; --i, j = $.$sub$n(j, 1)) |
| 6256 $.JSArray_methods.$indexSet(dst, j, t1.$index(src, i)); |
| 6257 else |
| 6258 for (t1 = $.getInterceptor$asx(src), j = dstStart, i = srcStart; i < srcStar
t + count; ++i, j = $.$add$ns(j, 1)) |
| 6259 $.JSArray_methods.$indexSet(dst, j, t1.$index(src, i)); |
| 6260 }; |
| 6261 |
| 6262 $.SubListIterable$ = function(_iterable, _start, _endOrLength) { |
| 6263 return new $.SubListIterable(_iterable, _start, _endOrLength); |
| 6264 }; |
| 6265 |
| 6266 $.ListIterator$ = function(iterable) { |
| 6267 return new $.ListIterator(iterable, $.get$length$asx(iterable), 0, null); |
| 6268 }; |
| 6269 |
| 6270 $.MappedIterable$ = function(_iterable, _f) { |
| 6271 return new $.MappedIterable(_iterable, _f); |
| 6272 }; |
| 6273 |
| 6274 $.MappedIterator$ = function(_iterator, _f) { |
| 6275 return new $.MappedIterator(null, _iterator, _f); |
| 6276 }; |
| 6277 |
| 6278 $.WhereIterable$ = function(_iterable, _f) { |
| 6279 return new $.WhereIterable(_iterable, _f); |
| 6280 }; |
| 6281 |
| 6282 $.WhereIterator$ = function(_iterator, _f) { |
| 6283 return new $.WhereIterator(_iterator, _f); |
| 6284 }; |
| 6285 |
| 6286 $.SkipIterable$ = function(_iterable, _skipCount) { |
| 6287 var t1 = new $.SkipIterable(_iterable, _skipCount); |
| 6288 t1.SkipIterable$2(_iterable, _skipCount); |
| 6289 return t1; |
| 6290 }; |
| 6291 |
| 6292 $.SkipIterator$ = function(_iterator, _skipCount) { |
| 6293 var t1 = new $.SkipIterator(_iterator, _skipCount); |
| 6294 t1.SkipIterator$2(_iterator, _skipCount); |
| 6295 return t1; |
| 6296 }; |
| 6297 |
| 6298 $.IterableMixinWorkaround__rangeCheck = function(list, start, end) { |
| 6299 var t1 = $.getInterceptor$n(start); |
| 6300 if (t1.$lt(start, 0) || t1.$gt(start, list.length)) |
| 6301 throw $.wrapException($.RangeError$range(start, 0, list.length)); |
| 6302 t1 = $.getInterceptor$n(end); |
| 6303 if (t1.$lt(end, start) || t1.$gt(end, list.length)) |
| 6304 throw $.wrapException($.RangeError$range(end, start, list.length)); |
| 6305 }; |
| 6306 |
| 6307 $.IterableMixinWorkaround_setRangeList = function(list, start, end, from, skipCo
unt) { |
| 6308 var $length, otherStart, otherList; |
| 6309 $.IterableMixinWorkaround__rangeCheck(list, start, end); |
| 6310 $length = $.$sub$n(end, start); |
| 6311 if ($.$eq($length, 0)) |
| 6312 return; |
| 6313 if (skipCount < 0) |
| 6314 throw $.wrapException($.ArgumentError$(skipCount)); |
| 6315 if (typeof from === "object" && from !== null && (from.constructor === Array |
| $.getInterceptor(from).$isList())) { |
| 6316 otherStart = skipCount; |
| 6317 otherList = from; |
| 6318 } else { |
| 6319 otherList = $.toList$1$growable$ax($.skip$1$ax(from, skipCount), false); |
| 6320 otherStart = 0; |
| 6321 } |
| 6322 if (typeof $length !== "number") |
| 6323 throw $.iae($length); |
| 6324 if ($.JSNumber_methods.$gt(otherStart + $length, $.get$length$asx(otherList))) |
| 6325 throw $.wrapException($.StateError$("Not enough elements")); |
| 6326 $.Arrays_copy(otherList, otherStart, list, start, $length); |
| 6327 }; |
| 6328 |
| 6329 $.ToString__emitValue = function(i, result, visiting) { |
| 6330 var t1, isList, t2, first, t3; |
| 6331 t1 = $.getInterceptor$ax(visiting); |
| 6332 t1.add$1(visiting, i); |
| 6333 isList = typeof i === "object" && i !== null && (i.constructor === Array || $.
getInterceptor(i).$isList()); |
| 6334 result.write$1(isList ? "[" : "{"); |
| 6335 for (t2 = $.get$iterator$ax(i), first = true; t2.moveNext$0() === true; first
= false) { |
| 6336 t3 = t2.get$current(); |
| 6337 if (!first) |
| 6338 result.write$1(", "); |
| 6339 $.ToString__emitObject(t3, result, visiting); |
| 6340 } |
| 6341 result.write$1(isList ? "]" : "}"); |
| 6342 t1.removeLast$0(visiting); |
| 6343 }; |
| 6344 |
| 6345 $.ToString__emitObject = function(o, result, visiting) { |
| 6346 if (typeof o === "object" && o !== null && (o.constructor === Array || $.getIn
terceptor(o).$isIterable())) |
| 6347 if ($.ToString__containsRef(visiting, o)) |
| 6348 result.write$1(typeof o === "object" && o !== null && (o.constructor === A
rray || $.getInterceptor(o).$isList()) ? "[...]" : "{...}"); |
| 6349 else |
| 6350 $.ToString__emitValue(o, result, visiting); |
| 6351 else if (typeof o === "object" && o !== null && !!$.getInterceptor(o).$isMap) |
| 6352 if ($.ToString__containsRef(visiting, o)) |
| 6353 result.write$1("{...}"); |
| 6354 else |
| 6355 $.ToString__emitPair(o, result, visiting); |
| 6356 else |
| 6357 result.write$1(o); |
| 6358 }; |
| 6359 |
| 6360 $.ToString__containsRef = function(i, ref) { |
| 6361 var t1; |
| 6362 for (t1 = $.get$iterator$ax(i); t1.moveNext$0() === true;) |
| 6363 if (t1.get$current() === ref) |
| 6364 return true; |
| 6365 return false; |
| 6366 }; |
| 6367 |
| 6368 $.ToString__emitPair = function(m, result, visiting) { |
| 6369 var t1, t2; |
| 6370 t1 = {}; |
| 6371 t2 = $.getInterceptor$ax(visiting); |
| 6372 t2.add$1(visiting, m); |
| 6373 result.write$1("{"); |
| 6374 t1.first_0 = true; |
| 6375 m.forEach$1(m, new $.ToString__emitPair_anon(t1, result, visiting)); |
| 6376 result.write$1("}"); |
| 6377 t2.removeLast$0(visiting); |
| 6378 }; |
| 6379 |
| 6380 $.HashMap__findBucketIndex = function(bucket, key) { |
| 6381 var $length, i; |
| 6382 if (bucket == null) |
| 6383 return -1; |
| 6384 $length = bucket.length; |
| 6385 for (i = 0; i < $length; i += 2) |
| 6386 if ($.$eq(bucket[i], key) === true) |
| 6387 return i; |
| 6388 return -1; |
| 6389 }; |
| 6390 |
| 6391 $.HashMapKeyIterable$ = function(_map) { |
| 6392 return new $.HashMapKeyIterable(_map); |
| 6393 }; |
| 6394 |
| 6395 $.HashMapKeyIterator$ = function(_map, _keys) { |
| 6396 return new $.HashMapKeyIterator(_map, _keys, 0, null); |
| 6397 }; |
| 6398 |
| 6399 $.LinkedHashMap__findBucketIndex = function(bucket, key) { |
| 6400 var $length, i; |
| 6401 if (bucket == null) |
| 6402 return -1; |
| 6403 $length = bucket.length; |
| 6404 for (i = 0; i < $length; ++i) |
| 6405 if ($.$eq(bucket[i].get$_key(), key) === true) |
| 6406 return i; |
| 6407 return -1; |
| 6408 }; |
| 6409 |
| 6410 $.LinkedHashMapCell$ = function(_key, _value) { |
| 6411 return new $.LinkedHashMapCell(_key, _value, null, null); |
| 6412 }; |
| 6413 |
| 6414 $.LinkedHashMapKeyIterable$ = function(_map) { |
| 6415 return new $.LinkedHashMapKeyIterable(_map); |
| 6416 }; |
| 6417 |
| 6418 $.LinkedHashMapKeyIterator$ = function(_map, _modifications) { |
| 6419 var t1 = new $.LinkedHashMapKeyIterator(_map, _modifications, null, null); |
| 6420 t1.LinkedHashMapKeyIterator$2(_map, _modifications); |
| 6421 return t1; |
| 6422 }; |
| 6423 |
| 6424 $.LinkedHashSet__findBucketIndex = function(bucket, element) { |
| 6425 var $length, i; |
| 6426 if (bucket == null) |
| 6427 return -1; |
| 6428 $length = bucket.length; |
| 6429 for (i = 0; i < $length; ++i) |
| 6430 if ($.$eq(bucket[i].get$_element(), element) === true) |
| 6431 return i; |
| 6432 return -1; |
| 6433 }; |
| 6434 |
| 6435 $.LinkedHashSetCell$ = function(_element) { |
| 6436 return new $.LinkedHashSetCell(_element, null, null); |
| 6437 }; |
| 6438 |
| 6439 $.LinkedHashSetIterator$ = function(_set, _modifications) { |
| 6440 var t1 = new $.LinkedHashSetIterator(_set, _modifications, null, null); |
| 6441 t1.LinkedHashSetIterator$2(_set, _modifications); |
| 6442 return t1; |
| 6443 }; |
| 6444 |
| 6445 $.Function__toMangledNames = function(namedArguments) { |
| 6446 var result; |
| 6447 if (namedArguments == null) |
| 6448 return; |
| 6449 result = $.makeLiteralMap([]); |
| 6450 $.JSNull_methods.forEach$1(namedArguments, new $.Function__toMangledNames_anon
(result)); |
| 6451 return result; |
| 6452 }; |
| 6453 |
| 6454 $.getDispatchProperty = function(object) { |
| 6455 return object[$.dispatchPropertyName]; |
| 6456 }; |
| 6457 |
| 6458 $.setDispatchProperty = function(object, value) { |
| 6459 object[$.dispatchPropertyName] = value; |
| 6460 }; |
| 6461 |
| 6462 $.getNativeInterceptor = function(object) { |
| 6463 var record, proto, objectProto; |
| 6464 record = $.getDispatchProperty(object); |
| 6465 if (record != null) { |
| 6466 proto = record.p; |
| 6467 if (false === proto) |
| 6468 return record.i; |
| 6469 if (true === proto) |
| 6470 return object; |
| 6471 objectProto = Object.getPrototypeOf(object); |
| 6472 if (proto === objectProto) |
| 6473 return record.i; |
| 6474 if (record.e === objectProto) |
| 6475 return proto(object, record); |
| 6476 } |
| 6477 record = $.lookupDispatchRecord(object); |
| 6478 $.setDispatchProperty(Object.getPrototypeOf(object), record); |
| 6479 return $.getNativeInterceptor(object); |
| 6480 }; |
| 6481 |
| 6482 $.JsIsolateSink$fromPort = function(_port) { |
| 6483 return new $.JsIsolateSink(false, _port); |
| 6484 }; |
| 6485 |
| 6486 $._callInIsolate = function(isolate, $function) { |
| 6487 var result = isolate.eval$1($function); |
| 6488 $globalState.topEventLoop.run$0(); |
| 6489 return result; |
| 6490 }; |
| 6491 |
| 6492 $._currentIsolate = function() { |
| 6493 return $globalState.currentContext; |
| 6494 }; |
| 6495 |
| 6496 $.startRootIsolate = function(entry) { |
| 6497 var t1, rootContext; |
| 6498 t1 = $._Manager$(); |
| 6499 $._globalState0(t1); |
| 6500 if ($globalState.isWorker === true) |
| 6501 return; |
| 6502 rootContext = $._IsolateContext$(); |
| 6503 $globalState.rootContext = rootContext; |
| 6504 $globalState.currentContext = rootContext; |
| 6505 rootContext.eval$1(entry); |
| 6506 $globalState.topEventLoop.run$0(); |
| 6507 }; |
| 6508 |
| 6509 $._globalState = function() { |
| 6510 return $globalState; |
| 6511 }; |
| 6512 |
| 6513 $._globalState0 = function(val) { |
| 6514 $globalState = val; |
| 6515 }; |
| 6516 |
| 6517 $._Manager$ = function() { |
| 6518 var t1 = new $._Manager(0, 0, 1, null, null, null, null, null, null, null, nul
l, null); |
| 6519 t1._Manager$0(); |
| 6520 return t1; |
| 6521 }; |
| 6522 |
| 6523 $._IsolateContext$ = function() { |
| 6524 var t1 = new $._IsolateContext(null, null, null); |
| 6525 t1._IsolateContext$0(); |
| 6526 return t1; |
| 6527 }; |
| 6528 |
| 6529 $._EventLoop$ = function() { |
| 6530 return new $._EventLoop($.Queue_Queue(), 0); |
| 6531 }; |
| 6532 |
| 6533 $._IsolateEvent$ = function(isolate, fn, message) { |
| 6534 return new $._IsolateEvent(isolate, fn, message); |
| 6535 }; |
| 6536 |
| 6537 $._MainManagerStub$ = function() { |
| 6538 return new $._MainManagerStub(); |
| 6539 }; |
| 6540 |
| 6541 $.IsolateNatives_computeThisScript = function() { |
| 6542 var currentScript, stack, matches; |
| 6543 currentScript = $.$currentScript; |
| 6544 if (currentScript != null) |
| 6545 return String(currentScript.src); |
| 6546 stack = new Error().stack; |
| 6547 if (stack == null) |
| 6548 stack = (function() {try { throw new Error() } catch(e) { return e.stack }})
(); |
| 6549 matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m"))
; |
| 6550 if (matches != null) |
| 6551 return matches[1]; |
| 6552 matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m")); |
| 6553 if (matches != null) |
| 6554 return matches[1]; |
| 6555 throw $.wrapException($.UnsupportedError$("Cannot extract URI from \"" + $.S(s
tack) + "\"")); |
| 6556 }; |
| 6557 |
| 6558 $.IsolateNatives_computeGlobalThis = function() { |
| 6559 return function() { return this; }(); |
| 6560 }; |
| 6561 |
| 6562 $.IsolateNatives__processWorkerMessage = function(sender, e) { |
| 6563 var msg, t1, entryPoint, replyTo, context, t2; |
| 6564 msg = $._deserializeMessage(e.data); |
| 6565 t1 = $.getInterceptor$asx(msg); |
| 6566 switch (t1.$index(msg, "command")) { |
| 6567 case "start": |
| 6568 $globalState.currentManagerId = t1.$index(msg, "id"); |
| 6569 entryPoint = $[t1.$index(msg, "functionName")]; |
| 6570 replyTo = $._deserializeMessage(t1.$index(msg, "replyTo")); |
| 6571 context = $._IsolateContext$(); |
| 6572 $globalState.topEventLoop.enqueue$3(context, new $.IsolateNatives__process
WorkerMessage_anon(entryPoint, replyTo), "worker-start"); |
| 6573 $globalState.currentContext = context; |
| 6574 $globalState.topEventLoop.run$0(); |
| 6575 break; |
| 6576 case "spawn-worker": |
| 6577 $.IsolateNatives__spawnWorker(t1.$index(msg, "functionName"), t1.$index(ms
g, "uri"), t1.$index(msg, "replyPort")); |
| 6578 break; |
| 6579 case "message": |
| 6580 if (t1.$index(msg, "port") != null) |
| 6581 $.send$2$x(t1.$index(msg, "port"), t1.$index(msg, "msg"), t1.$index(msg,
"replyTo")); |
| 6582 $globalState.topEventLoop.run$0(); |
| 6583 break; |
| 6584 case "close": |
| 6585 $.IsolateNatives__log("Closing Worker"); |
| 6586 t1 = $globalState.managers; |
| 6587 t2 = $.getInterceptor$x(sender); |
| 6588 t1.remove$1(t1, t2.get$id(sender)); |
| 6589 t2.terminate$0(sender); |
| 6590 $globalState.topEventLoop.run$0(); |
| 6591 break; |
| 6592 case "log": |
| 6593 $.IsolateNatives__log(t1.$index(msg, "msg")); |
| 6594 break; |
| 6595 case "print": |
| 6596 if ($globalState.isWorker === true) { |
| 6597 t1 = $globalState.mainManager; |
| 6598 t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "p
rint", "msg", msg]))); |
| 6599 } else |
| 6600 $.Primitives_printString($.toString$0(t1.$index(msg, "msg"))); |
| 6601 break; |
| 6602 case "error": |
| 6603 throw $.wrapException(t1.$index(msg, "msg")); |
| 6604 } |
| 6605 }; |
| 6606 |
| 6607 $.IsolateNatives__log = function(msg) { |
| 6608 var trace, t1, exception; |
| 6609 if ($globalState.isWorker === true) { |
| 6610 t1 = $globalState.mainManager; |
| 6611 t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "log",
"msg", msg]))); |
| 6612 } else |
| 6613 try { |
| 6614 $.get$globalThis().console.log(msg); |
| 6615 } catch (exception) { |
| 6616 $.unwrapException(exception); |
| 6617 trace = $.getTraceFromException(exception); |
| 6618 throw $.wrapException($._ExceptionImplementation$(trace)); |
| 6619 } |
| 6620 |
| 6621 }; |
| 6622 |
| 6623 $.IsolateNatives__spawnWorker = function(functionName, uri, replyPort) { |
| 6624 var worker, t1, t2, workerId; |
| 6625 if (functionName == null) |
| 6626 functionName = "main"; |
| 6627 if (uri == null) |
| 6628 uri = $.get$IsolateNatives_thisScript(); |
| 6629 worker = new Worker(uri); |
| 6630 t1 = $.getInterceptor$x(worker); |
| 6631 t1.set$onmessage(worker, function(e) { $.IsolateNatives__processWorkerMessage.
call$2(worker, e); }); |
| 6632 t2 = $globalState; |
| 6633 workerId = t2.nextManagerId; |
| 6634 t2.nextManagerId = workerId + 1; |
| 6635 t1.set$id(worker, workerId); |
| 6636 t2 = $globalState.managers; |
| 6637 t2.$indexSet(t2, workerId, worker); |
| 6638 t1.postMessage$1(worker, $._serializeMessage($.makeLiteralMap(["command", "sta
rt", "id", workerId, "replyTo", $._serializeMessage(replyPort), "functionName",
functionName]))); |
| 6639 }; |
| 6640 |
| 6641 $._NativeJsSendPort$ = function(_receivePort, isolateId) { |
| 6642 return new $._NativeJsSendPort(_receivePort, isolateId); |
| 6643 }; |
| 6644 |
| 6645 $._WorkerSendPort$ = function(_workerId, isolateId, _receivePortId) { |
| 6646 return new $._WorkerSendPort(_workerId, _receivePortId, isolateId); |
| 6647 }; |
| 6648 |
| 6649 $.ReceivePortImpl$ = function() { |
| 6650 var t1 = $.ReceivePortImpl__nextFreeId; |
| 6651 $.ReceivePortImpl__nextFreeId = $.$add$ns(t1, 1); |
| 6652 t1 = new $.ReceivePortImpl(t1, null); |
| 6653 t1.ReceivePortImpl$0(); |
| 6654 return t1; |
| 6655 }; |
| 6656 |
| 6657 $._waitForPendingPorts = function(message, callback) { |
| 6658 var finder = $._PendingSendPortFinder$(); |
| 6659 finder.traverse$1(message); |
| 6660 $._FutureImpl__FutureImpl$wait(finder.ports).then$1(new $._waitForPendingPorts
_anon(callback)); |
| 6661 }; |
| 6662 |
| 6663 $._PendingSendPortFinder$ = function() { |
| 6664 var t1 = new $._PendingSendPortFinder([], $._MessageTraverserVisitedMap$()); |
| 6665 t1._PendingSendPortFinder$0(); |
| 6666 return t1; |
| 6667 }; |
| 6668 |
| 6669 $._serializeMessage = function(message) { |
| 6670 if ($globalState.get$needSerialization() === true) |
| 6671 return $._JsSerializer$().traverse$1(message); |
| 6672 else |
| 6673 return $._JsCopier$().traverse$1(message); |
| 6674 }; |
| 6675 |
| 6676 $._deserializeMessage = function(message) { |
| 6677 if ($globalState.get$needSerialization() === true) |
| 6678 return $._JsDeserializer$().deserialize$1(message); |
| 6679 else |
| 6680 return message; |
| 6681 }; |
| 6682 |
| 6683 $._JsSerializer$ = function() { |
| 6684 var t1 = new $._JsSerializer(0, $._MessageTraverserVisitedMap$()); |
| 6685 t1._JsSerializer$0(); |
| 6686 return t1; |
| 6687 }; |
| 6688 |
| 6689 $._JsCopier$ = function() { |
| 6690 var t1 = new $._JsCopier($._MessageTraverserVisitedMap$()); |
| 6691 t1._JsCopier$0(); |
| 6692 return t1; |
| 6693 }; |
| 6694 |
| 6695 $._JsDeserializer$ = function() { |
| 6696 return new $._JsDeserializer(null); |
| 6697 }; |
| 6698 |
| 6699 $._JsVisitedMap$ = function() { |
| 6700 return new $._JsVisitedMap(null); |
| 6701 }; |
| 6702 |
| 6703 $._MessageTraverserVisitedMap$ = function() { |
| 6704 return new $._MessageTraverserVisitedMap(); |
| 6705 }; |
| 6706 |
| 6707 $.TimerImpl$ = function(milliseconds, callback) { |
| 6708 var t1 = new $.TimerImpl(true, false, null); |
| 6709 t1.TimerImpl$2(milliseconds, callback); |
| 6710 return t1; |
| 6711 }; |
| 6712 |
| 6713 $.TimerImpl$periodic = function(milliseconds, callback) { |
| 6714 var t1 = new $.TimerImpl(false, false, null); |
| 6715 t1.TimerImpl$periodic$2(milliseconds, callback); |
| 6716 return t1; |
| 6717 }; |
| 6718 |
| 6719 $.hasTimer = function() { |
| 6720 return $.get$globalThis().setTimeout != null; |
| 6721 }; |
| 6722 |
| 6723 $.checkGrowable = function(list, reason) { |
| 6724 if (!!list.fixed$length) |
| 6725 throw $.wrapException($.UnsupportedError$(reason)); |
| 6726 }; |
| 6727 |
| 6728 $.S = function(value) { |
| 6729 var res; |
| 6730 if (typeof value === "string") |
| 6731 return value; |
| 6732 if (typeof value === "number") { |
| 6733 if (value !== 0) |
| 6734 return "" + value; |
| 6735 } else if (true === value) |
| 6736 return "true"; |
| 6737 else if (false === value) |
| 6738 return "false"; |
| 6739 else if (value == null) |
| 6740 return "null"; |
| 6741 res = $.toString$0(value); |
| 6742 if (typeof res !== "string") |
| 6743 throw $.wrapException($.ArgumentError$(value)); |
| 6744 return res; |
| 6745 }; |
| 6746 |
| 6747 $.Primitives_objectHashCode = function(object) { |
| 6748 var hash = object.$identityHash; |
| 6749 if (hash == null) { |
| 6750 hash = $.$add$ns($.Primitives_hashCodeSeed, 1); |
| 6751 $.Primitives_hashCodeSeed = hash; |
| 6752 object.$identityHash = hash; |
| 6753 } |
| 6754 return hash; |
| 6755 }; |
| 6756 |
| 6757 $.Primitives_printString = function(string) { |
| 6758 if (typeof dartPrint == "function") { |
| 6759 dartPrint(string); |
| 6760 return; |
| 6761 } |
| 6762 if (typeof window == "object") { |
| 6763 if (typeof console == "object") |
| 6764 console.log(string); |
| 6765 return; |
| 6766 } |
| 6767 if (typeof print == "function") { |
| 6768 print(string); |
| 6769 return; |
| 6770 } |
| 6771 throw "Unable to print message: " + String(string); |
| 6772 }; |
| 6773 |
| 6774 $.Primitives_objectTypeName = function(object) { |
| 6775 var $name, decompiled, t1; |
| 6776 $name = $.constructorNameFallback(object); |
| 6777 if ($.$eq($name, "Object") === true) { |
| 6778 decompiled = String(object.constructor).match(/^\s*function\s*(\S*)\s*\(/)[1
]; |
| 6779 if (typeof decompiled === "string") |
| 6780 $name = decompiled; |
| 6781 } |
| 6782 t1 = $.getInterceptor$s($name); |
| 6783 return t1.codeUnitAt$1($name, 0) === 36 ? t1.substring$1($name, 1) : $name; |
| 6784 }; |
| 6785 |
| 6786 $.Primitives_getProperty = function(object, key) { |
| 6787 if (object == null || typeof object === "boolean" || typeof object === "number
" || typeof object === "string") |
| 6788 throw $.wrapException($.ArgumentError$(object)); |
| 6789 return object[key]; |
| 6790 }; |
| 6791 |
| 6792 $.Primitives_setProperty = function(object, key, value) { |
| 6793 if (object == null || typeof object === "boolean" || typeof object === "number
" || typeof object === "string") |
| 6794 throw $.wrapException($.ArgumentError$(object)); |
| 6795 object[key] = value; |
| 6796 }; |
| 6797 |
| 6798 $.Primitives_applyFunction = function($function, positionalArguments, namedArgum
ents) { |
| 6799 var buffer, $arguments, argumentCount, listOfNamedArguments, selectorName, jsF
unction; |
| 6800 buffer = $.StringBuffer$(""); |
| 6801 $arguments = []; |
| 6802 argumentCount = 0 + positionalArguments.length; |
| 6803 $.JSArray_methods.addAll$1($arguments, positionalArguments); |
| 6804 if (namedArguments != null && !namedArguments.get$isEmpty(namedArguments)) { |
| 6805 listOfNamedArguments = $.List_List$from(namedArguments.get$keys(), true); |
| 6806 argumentCount += namedArguments.get$length(namedArguments); |
| 6807 listOfNamedArguments.sort(); |
| 6808 $.forEach$1$ax(listOfNamedArguments, new $.Primitives_applyFunction_anon(nam
edArguments, buffer, $arguments)); |
| 6809 } |
| 6810 selectorName = "call$" + $.S(argumentCount) + $.S(buffer); |
| 6811 jsFunction = $function[selectorName]; |
| 6812 if (jsFunction == null) |
| 6813 throw $.wrapException($.NoSuchMethodError$($function, selectorName, $argumen
ts, $.makeLiteralMap([]), null)); |
| 6814 return jsFunction.apply($function, $arguments); |
| 6815 }; |
| 6816 |
| 6817 $.iae = function(argument) { |
| 6818 throw $.wrapException($.ArgumentError$(argument)); |
| 6819 }; |
| 6820 |
| 6821 $.ioore = function(index) { |
| 6822 throw $.wrapException($.RangeError$value(index)); |
| 6823 }; |
| 6824 |
| 6825 $.wrapException = function(ex) { |
| 6826 var wrapper; |
| 6827 if (ex == null) |
| 6828 ex = $.C_NullThrownError; |
| 6829 wrapper = $.DartError$(ex); |
| 6830 if (!!Error.captureStackTrace) |
| 6831 Error.captureStackTrace(wrapper, $.wrapException); |
| 6832 else |
| 6833 wrapper.stack = new Error().stack; |
| 6834 return wrapper; |
| 6835 }; |
| 6836 |
| 6837 $.throwExpression = function(ex) { |
| 6838 throw $.wrapException(ex); |
| 6839 }; |
| 6840 |
| 6841 $.DartError$ = function(dartException) { |
| 6842 var t1 = new $.DartError(); |
| 6843 t1.DartError$1(dartException); |
| 6844 return t1; |
| 6845 }; |
| 6846 |
| 6847 $.DartError_toStringWrapper = function() { |
| 6848 return $.toString$0(this); |
| 6849 }; |
| 6850 |
| 6851 $.unwrapException = function(ex) { |
| 6852 var message, type, $name, t1, ieErrorCode, ieFacilityNumber, t2; |
| 6853 if ("dartException" in ex) |
| 6854 return ex.dartException; |
| 6855 message = ex.message; |
| 6856 if (ex instanceof TypeError) { |
| 6857 type = ex.type; |
| 6858 $name = ex.arguments ? ex.arguments[0] : ""; |
| 6859 if (message.indexOf("JSNull") === -1) { |
| 6860 t1 = $.getInterceptor(type); |
| 6861 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; |
| 6862 } else |
| 6863 t1 = true; |
| 6864 if (t1) |
| 6865 return $.NoSuchMethodError$(null, $name, [], $.makeLiteralMap([]), null); |
| 6866 else if ($.$eq(type, "undefined_method") === true) |
| 6867 return $.NoSuchMethodError$("", $name, [], $.makeLiteralMap([]), null); |
| 6868 ieErrorCode = ex.number & 0xffff; |
| 6869 ieFacilityNumber = ex.number >> 16 & 0x1FFF; |
| 6870 t1 = typeof message === "string"; |
| 6871 if (t1) |
| 6872 if (message === "null has no properties" || message === "'null' is not an
object" || message === "'undefined' is not an object" || $.JSString_methods.ends
With$1(message, "is null") || $.JSString_methods.endsWith$1(message, "is undefin
ed") || $.JSString_methods.endsWith$1(message, "is null or undefined") || $.JSSt
ring_methods.endsWith$1(message, "of undefined") || $.JSString_methods.endsWith$
1(message, "of null")) |
| 6873 return $.NoSuchMethodError$(null, "<unknown>", [], $.makeLiteralMap([]),
null); |
| 6874 else { |
| 6875 if (message.indexOf(" has no method ") === -1) |
| 6876 if (message.indexOf(" is not a function") === -1) |
| 6877 t2 = ieErrorCode === 438 && ieFacilityNumber === 10; |
| 6878 else |
| 6879 t2 = true; |
| 6880 else |
| 6881 t2 = true; |
| 6882 if (t2) |
| 6883 return $.NoSuchMethodError$("", "<unknown>", [], $.makeLiteralMap([]),
null); |
| 6884 } |
| 6885 t1 = t1 ? message : ""; |
| 6886 return $._ExceptionImplementation$(t1); |
| 6887 } |
| 6888 if (ex instanceof RangeError) { |
| 6889 if (typeof message === "string" && message.indexOf("call stack") !== -1) |
| 6890 return $.StackOverflowError$(); |
| 6891 return $.ArgumentError$(null); |
| 6892 } |
| 6893 if (typeof InternalError == "function" && ex instanceof InternalError) |
| 6894 if (typeof message === "string" && message === "too much recursion") |
| 6895 return $.StackOverflowError$(); |
| 6896 return ex; |
| 6897 }; |
| 6898 |
| 6899 $.getTraceFromException = function(exception) { |
| 6900 return $._StackTrace$(exception.stack); |
| 6901 }; |
| 6902 |
| 6903 $._StackTrace$ = function(_stack) { |
| 6904 return new $._StackTrace(_stack); |
| 6905 }; |
| 6906 |
| 6907 $.makeLiteralMap = function(keyValuePairs) { |
| 6908 var iterator, result, key; |
| 6909 iterator = $.JSArray_methods.get$iterator(keyValuePairs); |
| 6910 result = $.LinkedHashMap$(); |
| 6911 for (; iterator.moveNext$0();) { |
| 6912 key = iterator.get$current(); |
| 6913 iterator.moveNext$0(); |
| 6914 result.$indexSet(result, key, iterator.get$current()); |
| 6915 } |
| 6916 return result; |
| 6917 }; |
| 6918 |
| 6919 $.invokeClosure = function(closure, isolate, numberOfArguments, arg1, arg2) { |
| 6920 var t1 = $.getInterceptor(numberOfArguments); |
| 6921 if (t1.$eq(numberOfArguments, 0) === true) |
| 6922 return $._callInIsolate(isolate, new $.invokeClosure_anon(closure)); |
| 6923 else if (t1.$eq(numberOfArguments, 1) === true) |
| 6924 return $._callInIsolate(isolate, new $.invokeClosure_anon0(closure, arg1)); |
| 6925 else if (t1.$eq(numberOfArguments, 2) === true) |
| 6926 return $._callInIsolate(isolate, new $.invokeClosure_anon1(closure, arg1, ar
g2)); |
| 6927 else |
| 6928 throw $.wrapException($._ExceptionImplementation$("Unsupported number of arg
uments for wrapped closure")); |
| 6929 }; |
| 6930 |
| 6931 $.convertDartClosureToJS = function(closure, arity) { |
| 6932 var $function; |
| 6933 if (closure == null) |
| 6934 return; |
| 6935 $function = closure.$identity; |
| 6936 if (!!$function) |
| 6937 return $function; |
| 6938 $function = (function ($2, $3) { return function($0, $1) { return $3(closure,
$2, arity, $0, $1) }})($._currentIsolate(), $.invokeClosure.call$5); |
| 6939 closure.$identity = $function; |
| 6940 return $function; |
| 6941 }; |
| 6942 |
| 6943 $.throwCyclicInit = function(staticName) { |
| 6944 throw $.wrapException($.RuntimeError$("Cyclic initialization for static " + $.
S(staticName))); |
| 6945 }; |
| 6946 |
| 6947 $._convertJsonToDart = function(json, reviver) { |
| 6948 var revive = reviver == null ? new $._convertJsonToDart_anon() : reviver; |
| 6949 return revive.call$2("", new $._convertJsonToDart_walk(revive).call$1(json)); |
| 6950 }; |
| 6951 |
| 6952 $.typeNameInChrome = function(obj) { |
| 6953 return $.typeNameInWebKitCommon(obj.constructor.name); |
| 6954 }; |
| 6955 |
| 6956 $.typeNameInSafari = function(obj) { |
| 6957 return $.typeNameInWebKitCommon($.constructorNameFallback(obj)); |
| 6958 }; |
| 6959 |
| 6960 $.typeNameInWebKitCommon = function(tag) { |
| 6961 var $name = tag; |
| 6962 if ($name === "Window") |
| 6963 return "DOMWindow"; |
| 6964 if ($name === "CanvasPixelArray") |
| 6965 return "Uint8ClampedArray"; |
| 6966 if ($name === "WebKitMutationObserver") |
| 6967 return "MutationObserver"; |
| 6968 if ($name === "AudioChannelMerger") |
| 6969 return "ChannelMergerNode"; |
| 6970 if ($name === "AudioChannelSplitter") |
| 6971 return "ChannelSplitterNode"; |
| 6972 if ($name === "AudioGainNode") |
| 6973 return "GainNode"; |
| 6974 if ($name === "AudioPannerNode") |
| 6975 return "PannerNode"; |
| 6976 if ($name === "JavaScriptAudioNode") |
| 6977 return "ScriptProcessorNode"; |
| 6978 if ($name === "Oscillator") |
| 6979 return "OscillatorNode"; |
| 6980 if ($name === "RealtimeAnalyserNode") |
| 6981 return "AnalyserNode"; |
| 6982 if ($name === "IDBVersionChangeRequest") |
| 6983 return "IDBOpenDBRequest"; |
| 6984 return $name; |
| 6985 }; |
| 6986 |
| 6987 $.typeNameInOpera = function(obj) { |
| 6988 var $name = $.constructorNameFallback(obj); |
| 6989 if ($name === "Window") |
| 6990 return "DOMWindow"; |
| 6991 if ($name === "ApplicationCache") |
| 6992 return "DOMApplicationCache"; |
| 6993 return $name; |
| 6994 }; |
| 6995 |
| 6996 $.typeNameInFirefox = function(obj) { |
| 6997 var $name = $.constructorNameFallback(obj); |
| 6998 if ($name === "Window") |
| 6999 return "DOMWindow"; |
| 7000 if ($name === "BeforeUnloadEvent") |
| 7001 return "Event"; |
| 7002 if ($name === "CSS2Properties") |
| 7003 return "CSSStyleDeclaration"; |
| 7004 if ($name === "DataTransfer") |
| 7005 return "Clipboard"; |
| 7006 if ($name === "DragEvent") |
| 7007 return "MouseEvent"; |
| 7008 if ($name === "GeoGeolocation") |
| 7009 return "Geolocation"; |
| 7010 if ($name === "MouseScrollEvent") |
| 7011 return "WheelEvent"; |
| 7012 if ($name === "OfflineResourceList") |
| 7013 return "DOMApplicationCache"; |
| 7014 if ($name === "WorkerMessageEvent") |
| 7015 return "MessageEvent"; |
| 7016 if ($name === "XMLDocument") |
| 7017 return "Document"; |
| 7018 return $name; |
| 7019 }; |
| 7020 |
| 7021 $.typeNameInIE = function(obj) { |
| 7022 var $name = $.constructorNameFallback(obj); |
| 7023 if ($name === "Window") |
| 7024 return "DOMWindow"; |
| 7025 if ($name === "Document") { |
| 7026 if (!!obj.xmlVersion) |
| 7027 return "Document"; |
| 7028 return "HTMLDocument"; |
| 7029 } |
| 7030 if ($name === "ApplicationCache") |
| 7031 return "DOMApplicationCache"; |
| 7032 if ($name === "BeforeUnloadEvent") |
| 7033 return "Event"; |
| 7034 if ($name === "CanvasPixelArray") |
| 7035 return "Uint8ClampedArray"; |
| 7036 if ($name === "DataTransfer") |
| 7037 return "Clipboard"; |
| 7038 if ($name === "DragEvent") |
| 7039 return "MouseEvent"; |
| 7040 if ($name === "HTMLDDElement") |
| 7041 return "HTMLElement"; |
| 7042 if ($name === "HTMLDTElement") |
| 7043 return "HTMLElement"; |
| 7044 if ($name === "HTMLTableDataCellElement") |
| 7045 return "HTMLTableCellElement"; |
| 7046 if ($name === "HTMLTableHeaderCellElement") |
| 7047 return "HTMLTableCellElement"; |
| 7048 if ($name === "HTMLPhraseElement") |
| 7049 return "HTMLElement"; |
| 7050 if ($name === "MSStyleCSSProperties") |
| 7051 return "CSSStyleDeclaration"; |
| 7052 if ($name === "MouseWheelEvent") |
| 7053 return "WheelEvent"; |
| 7054 if ($name === "Position") |
| 7055 return "Geoposition"; |
| 7056 if ($name === "Object") |
| 7057 if (window.DataView && obj instanceof window.DataView) |
| 7058 return "DataView"; |
| 7059 return $name; |
| 7060 }; |
| 7061 |
| 7062 $.constructorNameFallback = function(object) { |
| 7063 var $constructor, $name, t1, string; |
| 7064 if (object == null) |
| 7065 return "Null"; |
| 7066 $constructor = object.constructor; |
| 7067 if (typeof $constructor === "function") { |
| 7068 $name = $constructor.name; |
| 7069 if (typeof $name === "string") |
| 7070 t1 = $name !== "" && $name !== "Object" && $name !== "Function.prototype"; |
| 7071 else |
| 7072 t1 = false; |
| 7073 if (t1) |
| 7074 return $name; |
| 7075 } |
| 7076 string = Object.prototype.toString.call(object); |
| 7077 return string.substring(8, string.length - 1); |
| 7078 }; |
| 7079 |
| 7080 $.alternateTag = function(object, tag) { |
| 7081 if (!!/^HTML[A-Z].*Element$/.test(tag)) { |
| 7082 if (Object.prototype.toString.call(object) === "[object Object]") |
| 7083 return; |
| 7084 return "HTMLElement"; |
| 7085 } |
| 7086 return; |
| 7087 }; |
| 7088 |
| 7089 $.getFunctionForTypeNameOf = function() { |
| 7090 if (typeof navigator !== "object") |
| 7091 return $.typeNameInChrome; |
| 7092 var userAgent = navigator.userAgent; |
| 7093 if (userAgent.indexOf("Chrome") !== -1 || userAgent.indexOf("DumpRenderTree")
!== -1) |
| 7094 return $.typeNameInChrome; |
| 7095 else if (userAgent.indexOf("Firefox") !== -1) |
| 7096 return $.typeNameInFirefox; |
| 7097 else if (userAgent.indexOf("MSIE") !== -1) |
| 7098 return $.typeNameInIE; |
| 7099 else if (userAgent.indexOf("Opera") !== -1) |
| 7100 return $.typeNameInOpera; |
| 7101 else if (userAgent.indexOf("AppleWebKit") !== -1) |
| 7102 return $.typeNameInSafari; |
| 7103 else |
| 7104 return $.constructorNameFallback; |
| 7105 }; |
| 7106 |
| 7107 $.toStringForNativeObject = function(obj) { |
| 7108 if ($._getTypeNameOf == null) |
| 7109 $._getTypeNameOf = $.getFunctionForTypeNameOf(); |
| 7110 return "Instance of " + $._getTypeNameOf.call$1(obj); |
| 7111 }; |
| 7112 |
| 7113 $.hashCodeForNativeObject = function(object) { |
| 7114 return $.Primitives_objectHashCode(object); |
| 7115 }; |
| 7116 |
| 7117 $.defineProperty = function(obj, property, value) { |
| 7118 Object.defineProperty(obj, property, {value: value, enumerable: false, writabl
e: true, configurable: true}); |
| 7119 }; |
| 7120 |
| 7121 $.defineNativeMethods = function(tags, interceptorClass) { |
| 7122 $.defineNativeMethodsCommon(tags, interceptorClass, true); |
| 7123 }; |
| 7124 |
| 7125 $.defineNativeMethodsNonleaf = function(tags, interceptorClass) { |
| 7126 $.defineNativeMethodsCommon(tags, interceptorClass, false); |
| 7127 }; |
| 7128 |
| 7129 $.defineNativeMethodsCommon = function(tags, interceptorClass, isLeaf) { |
| 7130 var methods, tagsList, i, tag; |
| 7131 methods = interceptorClass.prototype; |
| 7132 if ($.interceptorsByTag == null) |
| 7133 $.interceptorsByTag = {}; |
| 7134 if ($.leafTags == null) |
| 7135 $.leafTags = {}; |
| 7136 tagsList = tags.split("|"); |
| 7137 for (i = 0; i < tagsList.length; ++i) { |
| 7138 tag = tagsList[i]; |
| 7139 $.interceptorsByTag[tag] = methods; |
| 7140 $.leafTags[tag] = isLeaf; |
| 7141 } |
| 7142 }; |
| 7143 |
| 7144 $.defineNativeMethodsFinish = function() { |
| 7145 }; |
| 7146 |
| 7147 $.lookupDispatchRecord = function(obj) { |
| 7148 var hasOwnPropertyFunction, tag, map, interceptor, secondTag; |
| 7149 hasOwnPropertyFunction = Object.prototype.hasOwnProperty; |
| 7150 if ($._getTypeNameOf == null) |
| 7151 $._getTypeNameOf = $.getFunctionForTypeNameOf(); |
| 7152 tag = $._getTypeNameOf.call$1(obj); |
| 7153 map = $.interceptorsByTag; |
| 7154 interceptor = hasOwnPropertyFunction.call(map, tag) ? map[tag] : null; |
| 7155 if (interceptor == null) { |
| 7156 secondTag = $.alternateTag(obj, tag); |
| 7157 if (secondTag != null) { |
| 7158 map = $.interceptorsByTag; |
| 7159 interceptor = hasOwnPropertyFunction.call(map, secondTag) ? map[secondTag]
: null; |
| 7160 } |
| 7161 } |
| 7162 if (interceptor == null) |
| 7163 interceptor = {__what: "interceptor not found", __tag: tag}; |
| 7164 if (true === $.leafTags[tag]) |
| 7165 return {i: interceptor, p: false, e: null}; |
| 7166 else |
| 7167 return {i: interceptor, p: Object.getPrototypeOf(obj), e: null}; |
| 7168 }; |
| 7169 |
| 7170 $.StringMatch$ = function(start, str, pattern) { |
| 7171 return new $.StringMatch(start, str, pattern); |
| 7172 }; |
| 7173 |
| 7174 $.allMatchesInStringUnchecked = function(needle, haystack) { |
| 7175 var result, $length, patternLength, startIndex, position, endIndex; |
| 7176 result = $.List_List($); |
| 7177 $length = haystack.length; |
| 7178 patternLength = needle.length; |
| 7179 for (startIndex = 0; true;) { |
| 7180 position = $.JSString_methods.indexOf$2(haystack, needle, startIndex); |
| 7181 if (position === -1) |
| 7182 break; |
| 7183 result.push($.StringMatch$(position, haystack, needle)); |
| 7184 endIndex = position + patternLength; |
| 7185 if (endIndex === $length) |
| 7186 break; |
| 7187 else |
| 7188 startIndex = position === endIndex ? startIndex + 1 : endIndex; |
| 7189 } |
| 7190 return result; |
| 7191 }; |
| 7192 |
| 7193 $.stringContainsUnchecked = function(receiver, other, startIndex) { |
| 7194 if (typeof other === "string") |
| 7195 return $.JSString_methods.indexOf$2(receiver, other, startIndex) !== -1; |
| 7196 else if (typeof other === "object" && other !== null && !!$.getInterceptor(oth
er).$isJSSyntaxRegExp) |
| 7197 return other.hasMatch$1($.JSString_methods.substring$1(receiver, startIndex)
); |
| 7198 else |
| 7199 return $.get$iterator$ax($.allMatches$1$s(other, $.JSString_methods.substrin
g$1(receiver, startIndex))).moveNext$0(); |
| 7200 }; |
| 7201 |
| 7202 $.stringReplaceAllUnchecked = function(receiver, from, to) { |
| 7203 var result, $length, i; |
| 7204 if (from === "") |
| 7205 if (receiver === "") |
| 7206 return to; |
| 7207 else { |
| 7208 result = $.StringBuffer$(""); |
| 7209 $length = receiver.length; |
| 7210 result.write$1(to); |
| 7211 for (i = 0; i < $length; ++i) { |
| 7212 result.write$1(receiver[i]); |
| 7213 result.write$1(to); |
| 7214 } |
| 7215 return result.toString$0(result); |
| 7216 } |
| 7217 else |
| 7218 return receiver.replace(new RegExp(from.replace(new RegExp("[-[\\]{}()*+?.,\
\\\^$|#\\s]", 'g'), "\\$&"), 'g'), to.replace("$", "$$$$")); |
| 7219 }; |
| 7220 |
| 7221 $._attachStackTrace = function(o, st) { |
| 7222 if (o == null || typeof o === "boolean" || typeof o === "number" || typeof o =
== "string") |
| 7223 return; |
| 7224 $.$indexSet$ax($.get$_stackTraceExpando(), o, st); |
| 7225 }; |
| 7226 |
| 7227 $.getAttachedStackTrace = function(o) { |
| 7228 if (o == null || typeof o === "boolean" || typeof o === "number" || typeof o =
== "string") |
| 7229 return; |
| 7230 return $.$index$asx($.get$_stackTraceExpando(), o); |
| 7231 }; |
| 7232 |
| 7233 $._asyncRunCallback = function() { |
| 7234 var callbacks, i, callback, remainingCallbacks, newCallbacks, exception; |
| 7235 for (; $.get$isEmpty$asx($.get$_asyncCallbacks()) !== true;) { |
| 7236 callbacks = $.get$_asyncCallbacks(); |
| 7237 $._asyncCallbacks = []; |
| 7238 for (i = 0; $.$lt$n(i, $.get$length$asx(callbacks)); i = $.$add$ns(i, 1)) { |
| 7239 callback = $.$index$asx(callbacks, i); |
| 7240 $.$indexSet$ax(callbacks, i, null); |
| 7241 try { |
| 7242 callback.call$0(); |
| 7243 } catch (exception) { |
| 7244 $.unwrapException(exception); |
| 7245 i = $.$add$ns(i, 1); |
| 7246 remainingCallbacks = $.sublist$1$ax(callbacks, i); |
| 7247 newCallbacks = $.get$_asyncCallbacks(); |
| 7248 $._asyncCallbacks = []; |
| 7249 $.addAll$1$ax($.get$_asyncCallbacks(), remainingCallbacks); |
| 7250 $.addAll$1$ax($.get$_asyncCallbacks(), newCallbacks); |
| 7251 $.Timer_run($._asyncRunCallback); |
| 7252 throw exception; |
| 7253 } |
| 7254 |
| 7255 } |
| 7256 } |
| 7257 $._callbacksAreEnqueued = false; |
| 7258 }; |
| 7259 |
| 7260 $._CompleterImpl$ = function() { |
| 7261 return new $._CompleterImpl($._FutureImpl$(), false); |
| 7262 }; |
| 7263 |
| 7264 $._FutureListenerWrapper$ = function(future) { |
| 7265 return new $._FutureListenerWrapper(future, null); |
| 7266 }; |
| 7267 |
| 7268 $._FutureImpl$ = function() { |
| 7269 return new $._FutureImpl(0, null); |
| 7270 }; |
| 7271 |
| 7272 $._FutureImpl$immediate = function(value) { |
| 7273 var t1 = new $._FutureImpl(0, null); |
| 7274 t1._FutureImpl$immediate$1(value); |
| 7275 return t1; |
| 7276 }; |
| 7277 |
| 7278 $._FutureImpl__FutureImpl$wait = function(futures) { |
| 7279 var t1, t2, t3, t4, pos; |
| 7280 t1 = {}; |
| 7281 t1.completer_0 = null; |
| 7282 t1.values_1 = null; |
| 7283 t2 = new $._FutureImpl__FutureImpl$wait_handleError(t1); |
| 7284 t1.remaining_2 = 0; |
| 7285 for (t3 = $.JSArray_methods.get$iterator(futures); t3.moveNext$0();) { |
| 7286 t4 = t3.get$current(); |
| 7287 pos = t1.remaining_2; |
| 7288 t1.remaining_2 = $.$add$ns(pos, 1); |
| 7289 t4.catchError$1(t2).then$1(new $._FutureImpl__FutureImpl$wait_anon(t1, pos))
; |
| 7290 } |
| 7291 if ($.$eq(t1.remaining_2, 0)) |
| 7292 return $._FutureImpl$immediate($.List_empty); |
| 7293 t1.values_1 = $.List_List(t1.remaining_2); |
| 7294 t1.completer_0 = $._CompleterImpl$(); |
| 7295 return t1.completer_0.future; |
| 7296 }; |
| 7297 |
| 7298 $._ThenFuture$ = function(_onValue) { |
| 7299 return new $._ThenFuture(_onValue, null, 0, null); |
| 7300 }; |
| 7301 |
| 7302 $._CatchErrorFuture$ = function(_onError, _test) { |
| 7303 return new $._CatchErrorFuture(_test, _onError, null, 0, null); |
| 7304 }; |
| 7305 |
| 7306 $._SubscribeFuture$ = function(onValue, _onError) { |
| 7307 return new $._SubscribeFuture(_onError, onValue, null, 0, null); |
| 7308 }; |
| 7309 |
| 7310 $._FutureWrapper$ = function(_future) { |
| 7311 return new $._FutureWrapper(_future); |
| 7312 }; |
| 7313 |
| 7314 $._throwDelayed = function(error, stackTrace) { |
| 7315 var t1 = new $._throwDelayed_anon(error, stackTrace); |
| 7316 $.add$1$ax($.get$_asyncCallbacks(), t1); |
| 7317 if ($._callbacksAreEnqueued !== true) { |
| 7318 $.Timer_run($._asyncRunCallback); |
| 7319 $._callbacksAreEnqueued = true; |
| 7320 } |
| 7321 }; |
| 7322 |
| 7323 $._nullDataHandler = function(value) { |
| 7324 }; |
| 7325 |
| 7326 $._nullErrorHandler = function(error) { |
| 7327 $._throwDelayed(error, null); |
| 7328 }; |
| 7329 |
| 7330 $._nullDoneHandler = function() { |
| 7331 }; |
| 7332 |
| 7333 $._asyncError = function(error, stackTrace) { |
| 7334 if (stackTrace == null) |
| 7335 return error; |
| 7336 if ($.getAttachedStackTrace(error) != null) |
| 7337 return error; |
| 7338 $._attachStackTrace(error, stackTrace); |
| 7339 return error; |
| 7340 }; |
| 7341 |
| 7342 $._ForwardingStreamSubscription$ = function(_stream, onData, onError, onDone, _c
ancelOnError) { |
| 7343 var t1 = new $._ForwardingStreamSubscription(_stream, _cancelOnError, null, on
Data, onError, onDone); |
| 7344 t1._BaseStreamSubscription$3(onData, onError, onDone); |
| 7345 t1._ForwardingStreamSubscription$5(_stream, onData, onError, onDone, _cancelOn
Error); |
| 7346 return t1; |
| 7347 }; |
| 7348 |
| 7349 $._SkipStream$ = function(source, count) { |
| 7350 var t1 = new $._SkipStream(count, source); |
| 7351 t1._SkipStream$2(source, count); |
| 7352 return t1; |
| 7353 }; |
| 7354 |
| 7355 $.Timer_run = function(callback) { |
| 7356 var t1, milliseconds; |
| 7357 $.add$1$ax($.get$Timer__runCallbacks(), callback); |
| 7358 if ($.$eq($.get$length$asx($.get$Timer__runCallbacks()), 1) === true) { |
| 7359 t1 = new $.Timer_run_anon(); |
| 7360 milliseconds = $.Duration_0.get$inMilliseconds(); |
| 7361 if (milliseconds < 0) |
| 7362 milliseconds = 0; |
| 7363 $.TimerImpl$(milliseconds, t1); |
| 7364 } |
| 7365 }; |
| 7366 |
| 7367 $.HashMap$ = function() { |
| 7368 return new $.HashMap(0, null, null, null, null); |
| 7369 }; |
| 7370 |
| 7371 $.LinkedHashMap$ = function() { |
| 7372 return new $.LinkedHashMap(0, null, null, null, null, null, 0); |
| 7373 }; |
| 7374 |
| 7375 $.LinkedHashSet$ = function() { |
| 7376 return new $.LinkedHashSet(0, null, null, null, null, null, 0); |
| 7377 }; |
| 7378 |
| 7379 $.Queue_Queue = function() { |
| 7380 return $.ListQueue$(null); |
| 7381 }; |
| 7382 |
| 7383 $.ListQueue$ = function(initialCapacity) { |
| 7384 var t1 = new $.ListQueue(null, 0, 0, 0); |
| 7385 t1.ListQueue$1(initialCapacity); |
| 7386 return t1; |
| 7387 }; |
| 7388 |
| 7389 $.ListQueue__isPowerOf2 = function(number) { |
| 7390 return $.JSNull_methods.$and(number, $.JSNull_methods.$sub(number, 1)) === 0; |
| 7391 }; |
| 7392 |
| 7393 $.ListQueue__nextPowerOf2 = function(number) { |
| 7394 var nextNumber; |
| 7395 number = $.$shl$n(number, 2) - 1; |
| 7396 for (; true; number = nextNumber) { |
| 7397 nextNumber = (number & number - 1) >>> 0; |
| 7398 if (nextNumber === 0) |
| 7399 return number; |
| 7400 } |
| 7401 }; |
| 7402 |
| 7403 $._ListQueueIterator$ = function(queue) { |
| 7404 return new $._ListQueueIterator(queue, queue._tail, queue._modificationCount,
queue._head, null); |
| 7405 }; |
| 7406 |
| 7407 $.Duration$ = function(days, hours, microseconds, milliseconds, minutes, seconds
) { |
| 7408 if (typeof microseconds !== "number") |
| 7409 throw $.iae(microseconds); |
| 7410 return new $.Duration(days * 86400000000 + hours * 3600000000 + minutes * 6000
0000 + seconds * 1000000 + milliseconds * 1000 + microseconds); |
| 7411 }; |
| 7412 |
| 7413 $.Error_safeToString = function(object) { |
| 7414 if (typeof object === "number" && Math.floor(object) === object || typeof obje
ct === "number" || typeof object === "boolean" || null == object) |
| 7415 return $.toString$0(object); |
| 7416 if (typeof object === "string") |
| 7417 return "\"" + $.JSString_methods.replaceAll$2($.JSString_methods.replaceAll$
2($.JSString_methods.replaceAll$2($.JSString_methods.replaceAll$2(object, "\\",
"\\\\"), "\n", "\\n"), "\r", "\\r"), "\"", "\\\"") + "\""; |
| 7418 return "Instance of '" + $.S($.Primitives_objectTypeName(object)) + "'"; |
| 7419 }; |
| 7420 |
| 7421 $.ArgumentError$ = function(message) { |
| 7422 return new $.ArgumentError(message); |
| 7423 }; |
| 7424 |
| 7425 $.RangeError$value = function(value) { |
| 7426 return new $.RangeError("value " + $.S(value)); |
| 7427 }; |
| 7428 |
| 7429 $.RangeError$range = function(value, start, end) { |
| 7430 return new $.RangeError("value " + $.S(value) + " not in range " + $.S(start)
+ ".." + $.S(end)); |
| 7431 }; |
| 7432 |
| 7433 $.NoSuchMethodError$ = function(_receiver, _memberName, _arguments, _namedArgume
nts, existingArgumentNames) { |
| 7434 return new $.NoSuchMethodError(_receiver, _memberName, _arguments, _namedArgum
ents, existingArgumentNames); |
| 7435 }; |
| 7436 |
| 7437 $.UnsupportedError$ = function(message) { |
| 7438 return new $.UnsupportedError(message); |
| 7439 }; |
| 7440 |
| 7441 $.UnimplementedError$ = function(message) { |
| 7442 return new $.UnimplementedError(message); |
| 7443 }; |
| 7444 |
| 7445 $.StateError$ = function(message) { |
| 7446 return new $.StateError(message); |
| 7447 }; |
| 7448 |
| 7449 $.ConcurrentModificationError$ = function(modifiedObject) { |
| 7450 return new $.ConcurrentModificationError(modifiedObject); |
| 7451 }; |
| 7452 |
| 7453 $.StackOverflowError$ = function() { |
| 7454 return new $.StackOverflowError(); |
| 7455 }; |
| 7456 |
| 7457 $.RuntimeError$ = function(message) { |
| 7458 return new $.RuntimeError(message); |
| 7459 }; |
| 7460 |
| 7461 $._ExceptionImplementation$ = function(message) { |
| 7462 return new $._ExceptionImplementation(message); |
| 7463 }; |
| 7464 |
| 7465 $.FormatException$ = function(message) { |
| 7466 return new $.FormatException(message); |
| 7467 }; |
| 7468 |
| 7469 $.IntegerDivisionByZeroException$ = function() { |
| 7470 return new $.IntegerDivisionByZeroException(); |
| 7471 }; |
| 7472 |
| 7473 $.Expando$ = function($name) { |
| 7474 return new $.Expando($name); |
| 7475 }; |
| 7476 |
| 7477 $.List_List = function($length) { |
| 7478 var t1, result; |
| 7479 t1 = $ === $length; |
| 7480 if (t1) |
| 7481 $length = null; |
| 7482 if (t1) |
| 7483 return new Array(0); |
| 7484 if (typeof $length !== "number" || Math.floor($length) !== $length || $length
< 0) |
| 7485 throw $.wrapException($.ArgumentError$("Length must be a positive integer: "
+ $.S($length) + ".")); |
| 7486 result = new Array($length); |
| 7487 result.fixed$length = true; |
| 7488 return result; |
| 7489 }; |
| 7490 |
| 7491 $.List_List$from = function(other, growable) { |
| 7492 var list, t1, $length, fixedList, i; |
| 7493 list = $.List_List($); |
| 7494 for (t1 = $.get$iterator$ax(other); t1.moveNext$0() === true;) |
| 7495 list.push(t1.get$current()); |
| 7496 if (growable === true) |
| 7497 return list; |
| 7498 $length = list.length; |
| 7499 fixedList = $.List_List($length); |
| 7500 for (t1 = list.length, i = 0; i < $length; ++i) { |
| 7501 if (i >= t1) |
| 7502 throw $.ioore(i); |
| 7503 fixedList[i] = list[i]; |
| 7504 } |
| 7505 return fixedList; |
| 7506 }; |
| 7507 |
| 7508 $.Map_Map = function() { |
| 7509 return $.HashMap$(); |
| 7510 }; |
| 7511 |
| 7512 $.Object$ = function() { |
| 7513 return new $.Object(); |
| 7514 }; |
| 7515 |
| 7516 $.StringBuffer$ = function($content) { |
| 7517 var t1 = new $.StringBuffer(""); |
| 7518 t1.StringBuffer$1($content); |
| 7519 return t1; |
| 7520 }; |
| 7521 |
| 7522 $.window = function() { |
| 7523 return window; |
| 7524 }; |
| 7525 |
| 7526 $._ChildrenElementList$_wrap = function(element) { |
| 7527 return new $._ChildrenElementList(element, $.get$$$dom_children$x(element)); |
| 7528 }; |
| 7529 |
| 7530 $._FrozenElementList$_wrap = function(_nodeList) { |
| 7531 return new $._FrozenElementList(_nodeList); |
| 7532 }; |
| 7533 |
| 7534 $._ElementCssClassSet$ = function(_element) { |
| 7535 return new $._ElementCssClassSet(_element); |
| 7536 }; |
| 7537 |
| 7538 $.HttpRequest_getString = function(url, onProgress, withCredentials) { |
| 7539 return $.HttpRequest_request(url, null, onProgress, null, null, withCredential
s).then$1(new $.HttpRequest_getString_anon()); |
| 7540 }; |
| 7541 |
| 7542 $.HttpRequest_request = function(url, method, onProgress, responseType, sendData
, withCredentials) { |
| 7543 var completer, xhr, t1; |
| 7544 completer = $._CompleterImpl$(); |
| 7545 xhr = new XMLHttpRequest(); |
| 7546 if (method == null) |
| 7547 method = "GET"; |
| 7548 t1 = $.getInterceptor$x(xhr); |
| 7549 t1.open$3$async(xhr, method, url, true); |
| 7550 if (withCredentials != null) |
| 7551 xhr.withCredentials = withCredentials; |
| 7552 if (responseType != null) |
| 7553 xhr.responseType = responseType; |
| 7554 if (onProgress != null) |
| 7555 t1.get$onProgress(xhr).listen$1(onProgress); |
| 7556 t1.get$onLoad(xhr).listen$1(new $.HttpRequest_request_anon(completer, xhr)); |
| 7557 t1.get$onError(xhr).listen$1(new $.HttpRequest_request_anon0(completer)); |
| 7558 if (sendData != null) |
| 7559 xhr.send(sendData); |
| 7560 else |
| 7561 xhr.send(); |
| 7562 return completer.future; |
| 7563 }; |
| 7564 |
| 7565 $._ChildNodeListLazy$ = function(_this) { |
| 7566 return new $._ChildNodeListLazy(_this); |
| 7567 }; |
| 7568 |
| 7569 $._ElementAttributeMap$ = function(element) { |
| 7570 return new $._ElementAttributeMap(element); |
| 7571 }; |
| 7572 |
| 7573 $._EventStream$ = function(_target, _eventType, _useCapture) { |
| 7574 return new $._EventStream(_target, _eventType, _useCapture); |
| 7575 }; |
| 7576 |
| 7577 $._EventStreamSubscription$ = function(_target, _eventType, _onData, _useCapture
) { |
| 7578 var t1 = new $._EventStreamSubscription(0, _target, _eventType, _onData, _useC
apture); |
| 7579 t1._EventStreamSubscription$4(_target, _eventType, _onData, _useCapture); |
| 7580 return t1; |
| 7581 }; |
| 7582 |
| 7583 $.FixedSizeListIterator$ = function(array) { |
| 7584 return new $.FixedSizeListIterator(array, $.get$length$asx(array), -1, null); |
| 7585 }; |
| 7586 |
| 7587 $.convertDartToNative_Dictionary = function(dict) { |
| 7588 var object; |
| 7589 if (dict == null) |
| 7590 return; |
| 7591 object = {}; |
| 7592 dict.forEach$1(dict, new $.convertDartToNative_Dictionary_anon(object)); |
| 7593 return object; |
| 7594 }; |
| 7595 |
| 7596 $.Device_userAgent = function() { |
| 7597 return $.get$navigator$x($.window()).userAgent; |
| 7598 }; |
| 7599 |
| 7600 $.Device_isOpera = function() { |
| 7601 if ($.Device__isOpera == null) |
| 7602 $.Device__isOpera = $.contains$2$asx($.Device_userAgent(), "Opera", 0); |
| 7603 return $.Device__isOpera; |
| 7604 }; |
| 7605 |
| 7606 $.Device_isWebKit = function() { |
| 7607 if ($.Device__isWebKit == null) |
| 7608 $.Device__isWebKit = $.Device_isOpera() !== true && $.contains$2$asx($.Devic
e_userAgent(), "WebKit", 0) === true; |
| 7609 return $.Device__isWebKit; |
| 7610 }; |
| 7611 |
| 7612 $.FilteredElementList$ = function(node) { |
| 7613 return new $.FilteredElementList(node, $.get$nodes$x(node)); |
| 7614 }; |
| 7615 |
| 7616 $.Lists_getRange = function(a, start, end, accumulator) { |
| 7617 var i; |
| 7618 if (typeof a !== "string" && (typeof a !== "object" || a === null || a.constru
ctor !== Array && !$.getInterceptor(a).$isJavaScriptIndexingBehavior())) |
| 7619 return $.Lists_getRange$bailout(1, a, start, end, accumulator); |
| 7620 if (typeof start !== "number") |
| 7621 return $.Lists_getRange$bailout(1, a, start, end, accumulator); |
| 7622 if (typeof end !== "number") |
| 7623 return $.Lists_getRange$bailout(1, a, start, end, accumulator); |
| 7624 if (start < 0) |
| 7625 throw $.wrapException($.RangeError$value(start)); |
| 7626 if (end < start) |
| 7627 throw $.wrapException($.RangeError$value(end)); |
| 7628 if (end > a.length) |
| 7629 throw $.wrapException($.RangeError$value(end)); |
| 7630 for (i = start; i < end; ++i) { |
| 7631 if (i !== (i | 0)) |
| 7632 throw $.iae(i); |
| 7633 if (i < 0 || i >= a.length) |
| 7634 throw $.ioore(i); |
| 7635 accumulator.push(a[i]); |
| 7636 } |
| 7637 return accumulator; |
| 7638 }; |
| 7639 |
| 7640 $.Lists_getRange$bailout = function(state0, a, start, end, accumulator) { |
| 7641 var t1, t2, i; |
| 7642 if ($.$lt$n(start, 0)) |
| 7643 throw $.wrapException($.RangeError$value(start)); |
| 7644 t1 = $.getInterceptor$n(end); |
| 7645 if (t1.$lt(end, start)) |
| 7646 throw $.wrapException($.RangeError$value(end)); |
| 7647 t2 = $.getInterceptor$asx(a); |
| 7648 if (t1.$gt(end, t2.get$length(a))) |
| 7649 throw $.wrapException($.RangeError$value(end)); |
| 7650 for (i = start; t1 = $.getInterceptor$n(i), t1.$lt(i, end); i = t1.$add(i, 1)) |
| 7651 accumulator.push(t2.$index(a, i)); |
| 7652 return accumulator; |
| 7653 }; |
| 7654 |
| 7655 $.ReceivePort_ReceivePort = function() { |
| 7656 return $.ReceivePortImpl$(); |
| 7657 }; |
| 7658 |
| 7659 $._Isolate_port = function() { |
| 7660 if ($.lazyPort == null) |
| 7661 $.lazyPort = $.ReceivePort_ReceivePort(); |
| 7662 return $.lazyPort; |
| 7663 }; |
| 7664 |
| 7665 $.parse = function(json, reviver) { |
| 7666 var parsed, e, t1, exception; |
| 7667 t1 = json; |
| 7668 if (typeof t1 !== "string") |
| 7669 throw $.wrapException($.ArgumentError$(json)); |
| 7670 parsed = null; |
| 7671 try { |
| 7672 parsed = JSON.parse(json); |
| 7673 } catch (exception) { |
| 7674 t1 = $.unwrapException(exception); |
| 7675 e = t1; |
| 7676 throw $.wrapException($.FormatException$(String(e))); |
| 7677 } |
| 7678 |
| 7679 return $._convertJsonToDart(parsed, reviver); |
| 7680 }; |
| 7681 |
| 7682 $._AttributeClassSet$ = function(_element) { |
| 7683 return new $._AttributeClassSet(_element); |
| 7684 }; |
| 7685 |
| 7686 $.BarGraph$ = function(_canvas, _elements) { |
| 7687 var t1 = new $.BarGraph(_canvas, null, _elements, 0); |
| 7688 t1.BarGraph$2(_canvas, _elements); |
| 7689 return t1; |
| 7690 }; |
| 7691 |
| 7692 $.GraphModel$ = function(_maxSize) { |
| 7693 return new $.GraphModel($.List_List($), _maxSize, []); |
| 7694 }; |
| 7695 |
| 7696 $.Element$ = function($name, color) { |
| 7697 return new $.Element0($name, color); |
| 7698 }; |
| 7699 |
| 7700 $.Sample$ = function(_segments) { |
| 7701 return new $.Sample(_segments); |
| 7702 }; |
| 7703 |
| 7704 $.IsolateList$ = function(_isolateTable) { |
| 7705 return new $.IsolateList(_isolateTable); |
| 7706 }; |
| 7707 |
| 7708 $.ModelListener$ = function(_onUpdate, _onFailure) { |
| 7709 return new $.ModelListener(_onUpdate, _onFailure); |
| 7710 }; |
| 7711 |
| 7712 $.IsolateListModel$ = function() { |
| 7713 return new $.IsolateListModel([], []); |
| 7714 }; |
| 7715 |
| 7716 $.Isolate$ = function(raw) { |
| 7717 var t1 = $.getInterceptor$asx(raw); |
| 7718 return new $.Isolate(t1.$index(raw, "handle"), t1.$index(raw, "name"), t1.$ind
ex(raw, "port"), t1.$index(raw, "starttime"), t1.$index(raw, "stacklimit"), $.Sp
ace$(t1.$index(raw, "newspace")), $.Space$(t1.$index(raw, "oldspace"))); |
| 7719 }; |
| 7720 |
| 7721 $.Space$ = function(raw) { |
| 7722 var t1 = $.getInterceptor$asx(raw); |
| 7723 return new $.Space(t1.$index(raw, "used"), t1.$index(raw, "capacity")); |
| 7724 }; |
| 7725 |
| 7726 $.main = function() { |
| 7727 var t1, milliseconds; |
| 7728 document.querySelector("#dashboard"); |
| 7729 $._graph = $.BarGraph$(document.querySelector("#graph"), [$.Element$("Old Spac
e", "#97FFFF"), $.Element$("New Space", "#00EE76")]); |
| 7730 $._isolateList = $.IsolateList$(document.querySelector("#isolateList")); |
| 7731 $._statusText = document.querySelector("#statusText"); |
| 7732 $._isolates = $.IsolateListModel$(); |
| 7733 $._isolates.addListener$2($.onUpdateStatus, $.onRequestFailed); |
| 7734 $._isolates.update$0(); |
| 7735 t1 = new $.main_anon(); |
| 7736 milliseconds = $.Duration_3000000.get$inMilliseconds(); |
| 7737 if (milliseconds < 0) |
| 7738 milliseconds = 0; |
| 7739 $._updater = $.TimerImpl$periodic(milliseconds, t1); |
| 7740 }; |
| 7741 |
| 7742 $.onUpdateStatus = function(model) { |
| 7743 var t1 = {}; |
| 7744 t1.oldSpace_0 = 0; |
| 7745 t1.newSpace_1 = 0; |
| 7746 $.forEach$1$ax(model, new $.onUpdateStatus_anon(t1)); |
| 7747 $._graph.addSample$1([t1.oldSpace_0, t1.newSpace_1]); |
| 7748 $._isolateList.updateList$1(model); |
| 7749 $.set$text$x($._statusText, "Running ..."); |
| 7750 }; |
| 7751 |
| 7752 $.onRequestFailed = function() { |
| 7753 $._updater.cancel$0(); |
| 7754 $._isolates.removeListener$1($.onUpdateStatus); |
| 7755 $.set$text$x($._statusText, "Server closed"); |
| 7756 }; |
| 7757 |
| 7758 $.IsolateNatives__processWorkerMessage.call$2 = $.IsolateNatives__processWorkerM
essage; |
| 7759 $.IsolateNatives__processWorkerMessage.$name = "IsolateNatives__processWorkerMes
sage"; |
| 7760 $.wrapException.call$1 = $.wrapException; |
| 7761 $.wrapException.$name = "wrapException"; |
| 7762 $.DartError_toStringWrapper.call$0 = $.DartError_toStringWrapper; |
| 7763 $.DartError_toStringWrapper.$name = "DartError_toStringWrapper"; |
| 7764 $.invokeClosure.call$5 = $.invokeClosure; |
| 7765 $.invokeClosure.$name = "invokeClosure"; |
| 7766 $.typeNameInChrome.call$1 = $.typeNameInChrome; |
| 7767 $.typeNameInChrome.$name = "typeNameInChrome"; |
| 7768 $.typeNameInSafari.call$1 = $.typeNameInSafari; |
| 7769 $.typeNameInSafari.$name = "typeNameInSafari"; |
| 7770 $.typeNameInOpera.call$1 = $.typeNameInOpera; |
| 7771 $.typeNameInOpera.$name = "typeNameInOpera"; |
| 7772 $.typeNameInFirefox.call$1 = $.typeNameInFirefox; |
| 7773 $.typeNameInFirefox.$name = "typeNameInFirefox"; |
| 7774 $.typeNameInIE.call$1 = $.typeNameInIE; |
| 7775 $.typeNameInIE.$name = "typeNameInIE"; |
| 7776 $.constructorNameFallback.call$1 = $.constructorNameFallback; |
| 7777 $.constructorNameFallback.$name = "constructorNameFallback"; |
| 7778 $._asyncRunCallback.call$0 = $._asyncRunCallback; |
| 7779 $._asyncRunCallback.$name = "_asyncRunCallback"; |
| 7780 $._nullDataHandler.call$1 = $._nullDataHandler; |
| 7781 $._nullDataHandler.$name = "_nullDataHandler"; |
| 7782 $._nullErrorHandler.call$1 = $._nullErrorHandler; |
| 7783 $._nullErrorHandler.$name = "_nullErrorHandler"; |
| 7784 $._nullDoneHandler.call$0 = $._nullDoneHandler; |
| 7785 $._nullDoneHandler.$name = "_nullDoneHandler"; |
| 7786 $.onUpdateStatus.call$1 = $.onUpdateStatus; |
| 7787 $.onUpdateStatus.$name = "onUpdateStatus"; |
| 7788 $.onRequestFailed.call$0 = $.onRequestFailed; |
| 7789 $.onRequestFailed.$name = "onRequestFailed"; |
| 7790 $.String = {builtin$cls: "String"}; |
| 7791 $.ReceivePort = {builtin$cls: "ReceivePort"}; |
| 7792 $.$int = {builtin$cls: "int"}; |
| 7793 $.bool = {builtin$cls: "bool"}; |
| 7794 $._ManagerStub = {builtin$cls: "_ManagerStub"}; |
| 7795 $.List = {builtin$cls: "List"}; |
| 7796 $.num = {builtin$cls: "num"}; |
| 7797 $.Match = {builtin$cls: "Match"}; |
| 7798 $.C_NullThrownError = new $.NullThrownError(); |
| 7799 Isolate.makeConstantList = function(list) { |
| 7800 list.immutable$list = true; |
| 7801 list.fixed$length = true; |
| 7802 return list; |
| 7803 }; |
| 7804 $.List_empty = Isolate.makeConstantList([]); |
| 7805 $.JSDouble_methods = $.JSDouble.prototype; |
| 7806 $.EventStreamProvider_click = new $.EventStreamProvider("click"); |
| 7807 $.JSNull_methods = $.JSNull.prototype; |
| 7808 $.JSNumber_methods = $.JSNumber.prototype; |
| 7809 $.JSString_methods = $.JSString.prototype; |
| 7810 $.EventStreamProvider_progress = new $.EventStreamProvider("progress"); |
| 7811 $.JSArray_methods = $.JSArray.prototype; |
| 7812 $.EventStreamProvider_error = new $.EventStreamProvider("error"); |
| 7813 $.C_CloseToken = new $.CloseToken(); |
| 7814 $.EventStreamProvider_load = new $.EventStreamProvider("load"); |
| 7815 $.JSInt_methods = $.JSInt.prototype; |
| 7816 $.Duration_0 = new $.Duration(0); |
| 7817 $.Duration_3000000 = new $.Duration(3000000); |
| 7818 $.Expando__keyCount = 0; |
| 7819 $.dispatchPropertyName = "_zzyzx"; |
| 7820 $.lazyPort = null; |
| 7821 $.ReceivePortImpl__nextFreeId = 1; |
| 7822 $.Primitives_hashCodeSeed = 0; |
| 7823 $._getTypeNameOf = null; |
| 7824 $.interceptorsByTag = null; |
| 7825 $.leafTags = null; |
| 7826 $._callbacksAreEnqueued = false; |
| 7827 $.Device__isOpera = null; |
| 7828 $.Device__isWebKit = null; |
| 7829 $._graph = null; |
| 7830 $._isolateList = null; |
| 7831 $._statusText = null; |
| 7832 $._isolates = null; |
| 7833 $._updater = null; |
| 7834 $.$$dom_addEventListener$3$x = function(receiver, a0, a1, a2) { |
| 7835 return $.getInterceptor$x(receiver).$$dom_addEventListener$3(receiver, a0, a1,
a2); |
| 7836 }; |
| 7837 $.$$dom_removeEventListener$3$x = function(receiver, a0, a1, a2) { |
| 7838 return $.getInterceptor$x(receiver).$$dom_removeEventListener$3(receiver, a0,
a1, a2); |
| 7839 }; |
| 7840 $.$$dom_replaceChild$2$x = function(receiver, a0, a1) { |
| 7841 return $.getInterceptor$x(receiver).$$dom_replaceChild$2(receiver, a0, a1); |
| 7842 }; |
| 7843 $.$add$ns = function(receiver, a0) { |
| 7844 if (typeof receiver == "number" && typeof a0 == "number") |
| 7845 return receiver + a0; |
| 7846 return $.getInterceptor$ns(receiver).$add(receiver, a0); |
| 7847 }; |
| 7848 $.$and$n = function(receiver, a0) { |
| 7849 if (typeof receiver == "number" && typeof a0 == "number") |
| 7850 return (receiver & a0) >>> 0; |
| 7851 return $.getInterceptor$n(receiver).$and(receiver, a0); |
| 7852 }; |
| 7853 $.$div$n = function(receiver, a0) { |
| 7854 if (typeof receiver == "number" && typeof a0 == "number") |
| 7855 return receiver / a0; |
| 7856 return $.getInterceptor$n(receiver).$div(receiver, a0); |
| 7857 }; |
| 7858 $.$eq = function(receiver, a0) { |
| 7859 if (receiver == null) |
| 7860 return a0 == null; |
| 7861 if (typeof receiver != "object") |
| 7862 return a0 != null && receiver === a0; |
| 7863 return $.getInterceptor(receiver).$eq(receiver, a0); |
| 7864 }; |
| 7865 $.$ge$n = function(receiver, a0) { |
| 7866 if (typeof receiver == "number" && typeof a0 == "number") |
| 7867 return receiver >= a0; |
| 7868 return $.getInterceptor$n(receiver).$ge(receiver, a0); |
| 7869 }; |
| 7870 $.$gt$n = function(receiver, a0) { |
| 7871 if (typeof receiver == "number" && typeof a0 == "number") |
| 7872 return receiver > a0; |
| 7873 return $.getInterceptor$n(receiver).$gt(receiver, a0); |
| 7874 }; |
| 7875 $.$index$asx = function(receiver, a0) { |
| 7876 if (receiver.constructor == Array || typeof receiver == "string") |
| 7877 if (a0 >>> 0 === a0 && a0 < receiver.length) |
| 7878 return receiver[a0]; |
| 7879 return $.getInterceptor$asx(receiver).$index(receiver, a0); |
| 7880 }; |
| 7881 $.$indexSet$ax = function(receiver, a0, a1) { |
| 7882 if (receiver.constructor == Array && !receiver.immutable$list && a0 >>> 0 ===
a0 && a0 < receiver.length) |
| 7883 return receiver[a0] = a1; |
| 7884 return $.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); |
| 7885 }; |
| 7886 $.$lt$n = function(receiver, a0) { |
| 7887 if (typeof receiver == "number" && typeof a0 == "number") |
| 7888 return receiver < a0; |
| 7889 return $.getInterceptor$n(receiver).$lt(receiver, a0); |
| 7890 }; |
| 7891 $.$mul$n = function(receiver, a0) { |
| 7892 if (typeof receiver == "number" && typeof a0 == "number") |
| 7893 return receiver * a0; |
| 7894 return $.getInterceptor$n(receiver).$mul(receiver, a0); |
| 7895 }; |
| 7896 $.$shl$n = function(receiver, a0) { |
| 7897 return $.getInterceptor$n(receiver).$shl(receiver, a0); |
| 7898 }; |
| 7899 $.$sub$n = function(receiver, a0) { |
| 7900 if (typeof receiver == "number" && typeof a0 == "number") |
| 7901 return receiver - a0; |
| 7902 return $.getInterceptor$n(receiver).$sub(receiver, a0); |
| 7903 }; |
| 7904 $.$tdiv$n = function(receiver, a0) { |
| 7905 return $.getInterceptor$n(receiver).$tdiv(receiver, a0); |
| 7906 }; |
| 7907 $.abs$0$n = function(receiver) { |
| 7908 return $.getInterceptor$n(receiver).abs$0(receiver); |
| 7909 }; |
| 7910 $.add$1$ax = function(receiver, a0) { |
| 7911 return $.getInterceptor$ax(receiver).add$1(receiver, a0); |
| 7912 }; |
| 7913 $.addAll$1$ax = function(receiver, a0) { |
| 7914 return $.getInterceptor$ax(receiver).addAll$1(receiver, a0); |
| 7915 }; |
| 7916 $.allMatches$1$s = function(receiver, a0) { |
| 7917 return $.getInterceptor$s(receiver).allMatches$1(receiver, a0); |
| 7918 }; |
| 7919 $.ceil$0$n = function(receiver) { |
| 7920 return $.getInterceptor$n(receiver).ceil$0(receiver); |
| 7921 }; |
| 7922 $.contains$2$asx = function(receiver, a0, a1) { |
| 7923 return $.getInterceptor$asx(receiver).contains$2(receiver, a0, a1); |
| 7924 }; |
| 7925 $.elementAt$1$ax = function(receiver, a0) { |
| 7926 return $.getInterceptor$ax(receiver).elementAt$1(receiver, a0); |
| 7927 }; |
| 7928 $.forEach$1$ax = function(receiver, a0) { |
| 7929 return $.getInterceptor$ax(receiver).forEach$1(receiver, a0); |
| 7930 }; |
| 7931 $.get$$$dom_children$x = function(receiver) { |
| 7932 return $.getInterceptor$x(receiver).get$$$dom_children(receiver); |
| 7933 }; |
| 7934 $.get$attributes$x = function(receiver) { |
| 7935 return $.getInterceptor$x(receiver).get$attributes(receiver); |
| 7936 }; |
| 7937 $.get$children$x = function(receiver) { |
| 7938 return $.getInterceptor$x(receiver).get$children(receiver); |
| 7939 }; |
| 7940 $.get$classes$x = function(receiver) { |
| 7941 return $.getInterceptor$x(receiver).get$classes(receiver); |
| 7942 }; |
| 7943 $.get$color$x = function(receiver) { |
| 7944 return $.getInterceptor$x(receiver).get$color(receiver); |
| 7945 }; |
| 7946 $.get$context2D$x = function(receiver) { |
| 7947 return $.getInterceptor$x(receiver).get$context2D(receiver); |
| 7948 }; |
| 7949 $.get$hashCode$ = function(receiver) { |
| 7950 return $.getInterceptor(receiver).get$hashCode(receiver); |
| 7951 }; |
| 7952 $.get$height$x = function(receiver) { |
| 7953 return $.getInterceptor$x(receiver).get$height(receiver); |
| 7954 }; |
| 7955 $.get$id$x = function(receiver) { |
| 7956 return $.getInterceptor$x(receiver).get$id(receiver); |
| 7957 }; |
| 7958 $.get$isEmpty$asx = function(receiver) { |
| 7959 return $.getInterceptor$asx(receiver).get$isEmpty(receiver); |
| 7960 }; |
| 7961 $.get$iterator$ax = function(receiver) { |
| 7962 return $.getInterceptor$ax(receiver).get$iterator(receiver); |
| 7963 }; |
| 7964 $.get$length$asx = function(receiver) { |
| 7965 return $.getInterceptor$asx(receiver).get$length(receiver); |
| 7966 }; |
| 7967 $.get$name$x = function(receiver) { |
| 7968 return $.getInterceptor$x(receiver).get$name(receiver); |
| 7969 }; |
| 7970 $.get$navigator$x = function(receiver) { |
| 7971 return $.getInterceptor$x(receiver).get$navigator(receiver); |
| 7972 }; |
| 7973 $.get$nodes$x = function(receiver) { |
| 7974 return $.getInterceptor$x(receiver).get$nodes(receiver); |
| 7975 }; |
| 7976 $.get$onClick$x = function(receiver) { |
| 7977 return $.getInterceptor$x(receiver).get$onClick(receiver); |
| 7978 }; |
| 7979 $.get$responseText$x = function(receiver) { |
| 7980 return $.getInterceptor$x(receiver).get$responseText(receiver); |
| 7981 }; |
| 7982 $.get$value$x = function(receiver) { |
| 7983 return $.getInterceptor$x(receiver).get$value(receiver); |
| 7984 }; |
| 7985 $.get$width$x = function(receiver) { |
| 7986 return $.getInterceptor$x(receiver).get$width(receiver); |
| 7987 }; |
| 7988 $.postMessage$1$x = function(receiver, a0) { |
| 7989 return $.getInterceptor$x(receiver).postMessage$1(receiver, a0); |
| 7990 }; |
| 7991 $.register$2$x = function(receiver, a0, a1) { |
| 7992 return $.getInterceptor$x(receiver).register$2(receiver, a0, a1); |
| 7993 }; |
| 7994 $.remove$0$ax = function(receiver) { |
| 7995 return $.getInterceptor$ax(receiver).remove$0(receiver); |
| 7996 }; |
| 7997 $.replaceAll$2$s = function(receiver, a0, a1) { |
| 7998 return $.getInterceptor$s(receiver).replaceAll$2(receiver, a0, a1); |
| 7999 }; |
| 8000 $.replaceWith$1$x = function(receiver, a0) { |
| 8001 return $.getInterceptor$x(receiver).replaceWith$1(receiver, a0); |
| 8002 }; |
| 8003 $.send$1$x = function(receiver, a0) { |
| 8004 return $.getInterceptor$x(receiver).send$1(receiver, a0); |
| 8005 }; |
| 8006 $.send$2$x = function(receiver, a0, a1) { |
| 8007 return $.getInterceptor$x(receiver).send$2(receiver, a0, a1); |
| 8008 }; |
| 8009 $.set$$$dom_className$x = function(receiver, value) { |
| 8010 return $.getInterceptor$x(receiver).set$$$dom_className(receiver, value); |
| 8011 }; |
| 8012 $.set$id$x = function(receiver, value) { |
| 8013 return $.getInterceptor$x(receiver).set$id(receiver, value); |
| 8014 }; |
| 8015 $.set$length$asx = function(receiver, value) { |
| 8016 return $.getInterceptor$asx(receiver).set$length(receiver, value); |
| 8017 }; |
| 8018 $.set$text$x = function(receiver, value) { |
| 8019 return $.getInterceptor$x(receiver).set$text(receiver, value); |
| 8020 }; |
| 8021 $.skip$1$ax = function(receiver, a0) { |
| 8022 return $.getInterceptor$ax(receiver).skip$1(receiver, a0); |
| 8023 }; |
| 8024 $.split$1$s = function(receiver, a0) { |
| 8025 return $.getInterceptor$s(receiver).split$1(receiver, a0); |
| 8026 }; |
| 8027 $.sublist$1$ax = function(receiver, a0) { |
| 8028 return $.getInterceptor$ax(receiver).sublist$1(receiver, a0); |
| 8029 }; |
| 8030 $.sublist$2$ax = function(receiver, a0, a1) { |
| 8031 return $.getInterceptor$ax(receiver).sublist$2(receiver, a0, a1); |
| 8032 }; |
| 8033 $.toList$0$ax = function(receiver) { |
| 8034 return $.getInterceptor$ax(receiver).toList$0(receiver); |
| 8035 }; |
| 8036 $.toList$1$growable$ax = function(receiver, a0) { |
| 8037 return $.getInterceptor$ax(receiver).toList$1$growable(receiver, a0); |
| 8038 }; |
| 8039 $.toString$0 = function(receiver) { |
| 8040 return $.getInterceptor(receiver).toString$0(receiver); |
| 8041 }; |
| 8042 $.trim$0$s = function(receiver) { |
| 8043 return $.getInterceptor$s(receiver).trim$0(receiver); |
| 8044 }; |
| 8045 $.getInterceptor = function(receiver) { |
| 8046 if (typeof receiver == "number") { |
| 8047 if (Math.floor(receiver) == receiver) |
| 8048 return $.JSInt.prototype; |
| 8049 return $.JSDouble.prototype; |
| 8050 } |
| 8051 if (typeof receiver == "string") |
| 8052 return $.JSString.prototype; |
| 8053 if (receiver == null) |
| 8054 return $.JSNull.prototype; |
| 8055 if (typeof receiver == "function") |
| 8056 return $.JSFunction.prototype; |
| 8057 if (typeof receiver == "boolean") |
| 8058 return $.JSBool.prototype; |
| 8059 if (receiver.constructor == Array) |
| 8060 return $.JSArray.prototype; |
| 8061 if (typeof receiver != "object") |
| 8062 return receiver; |
| 8063 if (receiver instanceof $.Object) |
| 8064 return receiver; |
| 8065 if (Object.getPrototypeOf(receiver) === Object.prototype) |
| 8066 return $.Interceptor.prototype; |
| 8067 return $.getNativeInterceptor(receiver); |
| 8068 }; |
| 8069 $.getInterceptor$asx = function(receiver) { |
| 8070 if (typeof receiver == "string") |
| 8071 return $.JSString.prototype; |
| 8072 if (receiver == null) |
| 8073 return receiver; |
| 8074 if (receiver.constructor == Array) |
| 8075 return $.JSArray.prototype; |
| 8076 if (typeof receiver != "object") |
| 8077 return receiver; |
| 8078 if (receiver instanceof $.Object) |
| 8079 return receiver; |
| 8080 if (Object.getPrototypeOf(receiver) === Object.prototype) |
| 8081 return $.Interceptor.prototype; |
| 8082 return $.getNativeInterceptor(receiver); |
| 8083 }; |
| 8084 $.getInterceptor$ax = function(receiver) { |
| 8085 if (receiver == null) |
| 8086 return receiver; |
| 8087 if (receiver.constructor == Array) |
| 8088 return $.JSArray.prototype; |
| 8089 if (typeof receiver != "object") |
| 8090 return receiver; |
| 8091 if (receiver instanceof $.Object) |
| 8092 return receiver; |
| 8093 if (Object.getPrototypeOf(receiver) === Object.prototype) |
| 8094 return $.Interceptor.prototype; |
| 8095 return $.getNativeInterceptor(receiver); |
| 8096 }; |
| 8097 $.getInterceptor$n = function(receiver) { |
| 8098 if (typeof receiver == "number") |
| 8099 return $.JSNumber.prototype; |
| 8100 if (receiver == null) |
| 8101 return receiver; |
| 8102 return receiver; |
| 8103 }; |
| 8104 $.getInterceptor$ns = function(receiver) { |
| 8105 if (typeof receiver == "number") |
| 8106 return $.JSNumber.prototype; |
| 8107 if (typeof receiver == "string") |
| 8108 return $.JSString.prototype; |
| 8109 if (receiver == null) |
| 8110 return receiver; |
| 8111 return receiver; |
| 8112 }; |
| 8113 $.getInterceptor$s = function(receiver) { |
| 8114 if (typeof receiver == "string") |
| 8115 return $.JSString.prototype; |
| 8116 if (receiver == null) |
| 8117 return receiver; |
| 8118 return receiver; |
| 8119 }; |
| 8120 $.getInterceptor$x = function(receiver) { |
| 8121 if (receiver == null) |
| 8122 return receiver; |
| 8123 if (typeof receiver != "object") |
| 8124 return receiver; |
| 8125 if (receiver instanceof $.Object) |
| 8126 return receiver; |
| 8127 if (Object.getPrototypeOf(receiver) === Object.prototype) |
| 8128 return $.Interceptor.prototype; |
| 8129 return $.getNativeInterceptor(receiver); |
| 8130 }; |
| 8131 Isolate.$lazy($, "globalThis", "globalThis", "get$globalThis", function() { |
| 8132 return $.IsolateNatives_computeGlobalThis(); |
| 8133 }); |
| 8134 Isolate.$lazy($, "globalWindow", "globalWindow", "get$globalWindow", function()
{ |
| 8135 return $.get$globalThis().window; |
| 8136 }); |
| 8137 Isolate.$lazy($, "globalWorker", "globalWorker", "get$globalWorker", function()
{ |
| 8138 return $.get$globalThis().Worker; |
| 8139 }); |
| 8140 Isolate.$lazy($, "globalPostMessageDefined", "globalPostMessageDefined", "get$gl
obalPostMessageDefined", function() { |
| 8141 return $.get$globalThis().postMessage !== void 0; |
| 8142 }); |
| 8143 Isolate.$lazy($, "thisScript", "IsolateNatives_thisScript", "get$IsolateNatives_
thisScript", function() { |
| 8144 return $.IsolateNatives_computeThisScript(); |
| 8145 }); |
| 8146 Isolate.$lazy($, "_stackTraceExpando", "_stackTraceExpando", "get$_stackTraceExp
ando", function() { |
| 8147 return $.Expando$("asynchronous error"); |
| 8148 }); |
| 8149 Isolate.$lazy($, "_asyncCallbacks", "_asyncCallbacks", "get$_asyncCallbacks", fu
nction() { |
| 8150 return []; |
| 8151 }); |
| 8152 Isolate.$lazy($, "_runCallbacks", "Timer__runCallbacks", "get$Timer__runCallback
s", function() { |
| 8153 return []; |
| 8154 }); |
| 8155 // Native classes |
| 8156 (function(table) { |
| 8157 for (var key in table) |
| 8158 $.defineProperty(Object.prototype, key, table[key]); |
| 8159 })({ |
| 8160 $isJavaScriptIndexingBehavior: function() { |
| 8161 return false; |
| 8162 }, |
| 8163 $asJavaScriptIndexingBehavior: function() { |
| 8164 return null; |
| 8165 }, |
| 8166 $isIterable: function() { |
| 8167 return false; |
| 8168 }, |
| 8169 $asIterable: function() { |
| 8170 return null; |
| 8171 }, |
| 8172 $isList: function() { |
| 8173 return false; |
| 8174 }, |
| 8175 $asList: function() { |
| 8176 return null; |
| 8177 }, |
| 8178 $isElement: function() { |
| 8179 return false; |
| 8180 }, |
| 8181 $asElement: function() { |
| 8182 return null; |
| 8183 } |
| 8184 }); |
| 8185 |
| 8186 $.defineNativeMethods("Worker", $._WorkerStub); |
| 8187 |
| 8188 $.defineNativeMethodsNonleaf("HTMLElement", $._HTMLElement); |
| 8189 |
| 8190 $.defineNativeMethods("HTMLAnchorElement", $.AnchorElement); |
| 8191 |
| 8192 $.defineNativeMethods("WebKitAnimationEvent", $.AnimationEvent); |
| 8193 |
| 8194 $.defineNativeMethods("HTMLAreaElement", $.AreaElement); |
| 8195 |
| 8196 $.defineNativeMethods("ArrayBuffer", $.ArrayBuffer); |
| 8197 |
| 8198 $.defineNativeMethodsNonleaf("ArrayBufferView", $.ArrayBufferView); |
| 8199 |
| 8200 $.defineNativeMethods("Attr", $.Attr); |
| 8201 |
| 8202 $.defineNativeMethods("HTMLAudioElement", $.AudioElement); |
| 8203 |
| 8204 $.defineNativeMethods("AutocompleteErrorEvent", $.AutocompleteErrorEvent); |
| 8205 |
| 8206 $.defineNativeMethods("HTMLBRElement", $.BRElement); |
| 8207 |
| 8208 $.defineNativeMethods("HTMLBaseElement", $.BaseElement); |
| 8209 |
| 8210 $.defineNativeMethods("BeforeLoadEvent", $.BeforeLoadEvent); |
| 8211 |
| 8212 $.defineNativeMethodsNonleaf("Blob", $.Blob); |
| 8213 |
| 8214 $.defineNativeMethods("HTMLBodyElement", $.BodyElement); |
| 8215 |
| 8216 $.defineNativeMethods("HTMLButtonElement", $.ButtonElement); |
| 8217 |
| 8218 $.defineNativeMethods("CDATASection", $.CDataSection); |
| 8219 |
| 8220 $.defineNativeMethods("HTMLCanvasElement", $.CanvasElement); |
| 8221 |
| 8222 $.defineNativeMethods("CanvasGradient", $.CanvasGradient); |
| 8223 |
| 8224 $.defineNativeMethods("CanvasPattern", $.CanvasPattern); |
| 8225 |
| 8226 $.defineNativeMethodsNonleaf("CanvasRenderingContext", $.CanvasRenderingContext)
; |
| 8227 |
| 8228 $.defineNativeMethods("CanvasRenderingContext2D", $.CanvasRenderingContext2D); |
| 8229 |
| 8230 $.defineNativeMethodsNonleaf("CharacterData", $.CharacterData); |
| 8231 |
| 8232 $.defineNativeMethods("CloseEvent", $.CloseEvent); |
| 8233 |
| 8234 $.defineNativeMethods("Comment", $.Comment); |
| 8235 |
| 8236 $.defineNativeMethods("CompositionEvent", $.CompositionEvent); |
| 8237 |
| 8238 $.defineNativeMethods("HTMLContentElement", $.ContentElement); |
| 8239 |
| 8240 $.defineNativeMethods("CSSFontFaceLoadEvent", $.CssFontFaceLoadEvent); |
| 8241 |
| 8242 $.defineNativeMethods("CSSStyleDeclaration", $.CssStyleDeclaration); |
| 8243 |
| 8244 $.defineNativeMethods("CustomElementConstructor", $.CustomElementConstructor); |
| 8245 |
| 8246 $.defineNativeMethods("CustomEvent", $.CustomEvent); |
| 8247 |
| 8248 $.defineNativeMethods("HTMLDListElement", $.DListElement); |
| 8249 |
| 8250 $.defineNativeMethods("HTMLDataListElement", $.DataListElement); |
| 8251 |
| 8252 $.defineNativeMethods("HTMLDetailsElement", $.DetailsElement); |
| 8253 |
| 8254 $.defineNativeMethods("DeviceMotionEvent", $.DeviceMotionEvent); |
| 8255 |
| 8256 $.defineNativeMethods("DeviceOrientationEvent", $.DeviceOrientationEvent); |
| 8257 |
| 8258 $.defineNativeMethods("HTMLDialogElement", $.DialogElement); |
| 8259 |
| 8260 $.defineNativeMethods("HTMLDivElement", $.DivElement); |
| 8261 |
| 8262 $.defineNativeMethodsNonleaf("Document", $.Document); |
| 8263 |
| 8264 $.defineNativeMethodsNonleaf("DocumentFragment", $.DocumentFragment); |
| 8265 |
| 8266 $.defineNativeMethods("DocumentType", $.DocumentType); |
| 8267 |
| 8268 $.defineNativeMethods("DOMError", $.DomError); |
| 8269 |
| 8270 $.defineNativeMethods("DOMException", $.DomException); |
| 8271 |
| 8272 $.defineNativeMethodsNonleaf("Element", $.Element); |
| 8273 |
| 8274 $.defineNativeMethods("HTMLEmbedElement", $.EmbedElement); |
| 8275 |
| 8276 $.defineNativeMethods("EntityReference", $.EntityReference); |
| 8277 |
| 8278 $.defineNativeMethods("ErrorEvent", $.ErrorEvent); |
| 8279 |
| 8280 $.defineNativeMethodsNonleaf("Event", $.Event); |
| 8281 |
| 8282 $.defineNativeMethods("EventException", $.EventException); |
| 8283 |
| 8284 $.defineNativeMethodsNonleaf("EventTarget", $.EventTarget); |
| 8285 |
| 8286 $.defineNativeMethods("HTMLFieldSetElement", $.FieldSetElement); |
| 8287 |
| 8288 $.defineNativeMethods("File", $.File); |
| 8289 |
| 8290 $.defineNativeMethods("FileError", $.FileError); |
| 8291 |
| 8292 $.defineNativeMethods("FileException", $.FileException); |
| 8293 |
| 8294 $.defineNativeMethods("FocusEvent", $.FocusEvent); |
| 8295 |
| 8296 $.defineNativeMethods("HTMLFormElement", $.FormElement); |
| 8297 |
| 8298 $.defineNativeMethods("HTMLHRElement", $.HRElement); |
| 8299 |
| 8300 $.defineNativeMethods("HashChangeEvent", $.HashChangeEvent); |
| 8301 |
| 8302 $.defineNativeMethods("HTMLHeadElement", $.HeadElement); |
| 8303 |
| 8304 $.defineNativeMethods("HTMLHeadingElement", $.HeadingElement); |
| 8305 |
| 8306 $.defineNativeMethodsNonleaf("HTMLCollection", $.HtmlCollection); |
| 8307 |
| 8308 $.defineNativeMethods("HTMLDocument", $.HtmlDocument); |
| 8309 |
| 8310 $.defineNativeMethods("HTMLHtmlElement", $.HtmlElement); |
| 8311 |
| 8312 $.defineNativeMethods("HTMLFormControlsCollection", $.HtmlFormControlsCollection
); |
| 8313 |
| 8314 $.defineNativeMethods("HTMLOptionsCollection", $.HtmlOptionsCollection); |
| 8315 |
| 8316 $.defineNativeMethods("XMLHttpRequest", $.HttpRequest); |
| 8317 |
| 8318 $.defineNativeMethods("XMLHttpRequestException", $.HttpRequestException); |
| 8319 |
| 8320 $.defineNativeMethods("XMLHttpRequestProgressEvent", $.HttpRequestProgressEvent)
; |
| 8321 |
| 8322 $.defineNativeMethods("XMLHttpRequestUpload", $.HttpRequestUpload); |
| 8323 |
| 8324 $.defineNativeMethods("HTMLIFrameElement", $.IFrameElement); |
| 8325 |
| 8326 $.defineNativeMethods("HTMLImageElement", $.ImageElement); |
| 8327 |
| 8328 $.defineNativeMethods("HTMLInputElement", $.InputElement); |
| 8329 |
| 8330 $.defineNativeMethods("KeyboardEvent", $.KeyboardEvent); |
| 8331 |
| 8332 $.defineNativeMethods("HTMLKeygenElement", $.KeygenElement); |
| 8333 |
| 8334 $.defineNativeMethods("HTMLLIElement", $.LIElement); |
| 8335 |
| 8336 $.defineNativeMethods("HTMLLabelElement", $.LabelElement); |
| 8337 |
| 8338 $.defineNativeMethods("HTMLLegendElement", $.LegendElement); |
| 8339 |
| 8340 $.defineNativeMethods("HTMLLinkElement", $.LinkElement); |
| 8341 |
| 8342 $.defineNativeMethods("HTMLMapElement", $.MapElement); |
| 8343 |
| 8344 $.defineNativeMethodsNonleaf("HTMLMediaElement", $.MediaElement); |
| 8345 |
| 8346 $.defineNativeMethods("MediaError", $.MediaError); |
| 8347 |
| 8348 $.defineNativeMethods("MediaKeyError", $.MediaKeyError); |
| 8349 |
| 8350 $.defineNativeMethods("MediaKeyEvent", $.MediaKeyEvent); |
| 8351 |
| 8352 $.defineNativeMethods("MediaStreamEvent", $.MediaStreamEvent); |
| 8353 |
| 8354 $.defineNativeMethods("MediaStreamTrackEvent", $.MediaStreamTrackEvent); |
| 8355 |
| 8356 $.defineNativeMethods("HTMLMenuElement", $.MenuElement); |
| 8357 |
| 8358 $.defineNativeMethods("MessageEvent", $.MessageEvent); |
| 8359 |
| 8360 $.defineNativeMethods("HTMLMetaElement", $.MetaElement); |
| 8361 |
| 8362 $.defineNativeMethods("HTMLMeterElement", $.MeterElement); |
| 8363 |
| 8364 $.defineNativeMethods("HTMLModElement", $.ModElement); |
| 8365 |
| 8366 $.defineNativeMethodsNonleaf("MouseEvent", $.MouseEvent); |
| 8367 |
| 8368 $.defineNativeMethods("MutationEvent", $.MutationEvent); |
| 8369 |
| 8370 $.defineNativeMethods("Navigator", $.Navigator); |
| 8371 |
| 8372 $.defineNativeMethods("NavigatorUserMediaError", $.NavigatorUserMediaError); |
| 8373 |
| 8374 $.defineNativeMethodsNonleaf("Node", $.Node); |
| 8375 |
| 8376 $.defineNativeMethodsNonleaf("NodeList", $.NodeList); |
| 8377 |
| 8378 $.defineNativeMethods("Notation", $.Notation); |
| 8379 |
| 8380 $.defineNativeMethods("HTMLOListElement", $.OListElement); |
| 8381 |
| 8382 $.defineNativeMethods("HTMLObjectElement", $.ObjectElement); |
| 8383 |
| 8384 $.defineNativeMethods("HTMLOptGroupElement", $.OptGroupElement); |
| 8385 |
| 8386 $.defineNativeMethods("HTMLOptionElement", $.OptionElement); |
| 8387 |
| 8388 $.defineNativeMethods("HTMLOutputElement", $.OutputElement); |
| 8389 |
| 8390 $.defineNativeMethods("OverflowEvent", $.OverflowEvent); |
| 8391 |
| 8392 $.defineNativeMethods("PageTransitionEvent", $.PageTransitionEvent); |
| 8393 |
| 8394 $.defineNativeMethods("HTMLParagraphElement", $.ParagraphElement); |
| 8395 |
| 8396 $.defineNativeMethods("HTMLParamElement", $.ParamElement); |
| 8397 |
| 8398 $.defineNativeMethods("PopStateEvent", $.PopStateEvent); |
| 8399 |
| 8400 $.defineNativeMethods("PositionError", $.PositionError); |
| 8401 |
| 8402 $.defineNativeMethods("HTMLPreElement", $.PreElement); |
| 8403 |
| 8404 $.defineNativeMethods("ProcessingInstruction", $.ProcessingInstruction); |
| 8405 |
| 8406 $.defineNativeMethods("HTMLProgressElement", $.ProgressElement); |
| 8407 |
| 8408 $.defineNativeMethodsNonleaf("ProgressEvent", $.ProgressEvent); |
| 8409 |
| 8410 $.defineNativeMethods("HTMLQuoteElement", $.QuoteElement); |
| 8411 |
| 8412 $.defineNativeMethods("RadioNodeList", $.RadioNodeList); |
| 8413 |
| 8414 $.defineNativeMethods("RangeException", $.RangeException); |
| 8415 |
| 8416 $.defineNativeMethods("RTCDataChannelEvent", $.RtcDataChannelEvent); |
| 8417 |
| 8418 $.defineNativeMethods("RTCDTMFToneChangeEvent", $.RtcDtmfToneChangeEvent); |
| 8419 |
| 8420 $.defineNativeMethods("RTCIceCandidateEvent", $.RtcIceCandidateEvent); |
| 8421 |
| 8422 $.defineNativeMethods("HTMLScriptElement", $.ScriptElement); |
| 8423 |
| 8424 $.defineNativeMethods("SecurityPolicyViolationEvent", $.SecurityPolicyViolationE
vent); |
| 8425 |
| 8426 $.defineNativeMethods("HTMLSelectElement", $.SelectElement); |
| 8427 |
| 8428 $.defineNativeMethods("HTMLShadowElement", $.ShadowElement); |
| 8429 |
| 8430 $.defineNativeMethods("ShadowRoot", $.ShadowRoot); |
| 8431 |
| 8432 $.defineNativeMethods("HTMLSourceElement", $.SourceElement); |
| 8433 |
| 8434 $.defineNativeMethods("HTMLSpanElement", $.SpanElement); |
| 8435 |
| 8436 $.defineNativeMethods("SpeechInputEvent", $.SpeechInputEvent); |
| 8437 |
| 8438 $.defineNativeMethods("SpeechRecognitionError", $.SpeechRecognitionError); |
| 8439 |
| 8440 $.defineNativeMethods("SpeechRecognitionEvent", $.SpeechRecognitionEvent); |
| 8441 |
| 8442 $.defineNativeMethods("StorageEvent", $.StorageEvent); |
| 8443 |
| 8444 $.defineNativeMethods("HTMLStyleElement", $.StyleElement); |
| 8445 |
| 8446 $.defineNativeMethods("HTMLTableCaptionElement", $.TableCaptionElement); |
| 8447 |
| 8448 $.defineNativeMethods("HTMLTableCellElement", $.TableCellElement); |
| 8449 |
| 8450 $.defineNativeMethods("HTMLTableColElement", $.TableColElement); |
| 8451 |
| 8452 $.defineNativeMethods("HTMLTableElement", $.TableElement); |
| 8453 |
| 8454 $.defineNativeMethods("HTMLTableRowElement", $.TableRowElement); |
| 8455 |
| 8456 $.defineNativeMethods("HTMLTableSectionElement", $.TableSectionElement); |
| 8457 |
| 8458 $.defineNativeMethods("HTMLTemplateElement", $.TemplateElement); |
| 8459 |
| 8460 $.defineNativeMethodsNonleaf("Text", $.Text); |
| 8461 |
| 8462 $.defineNativeMethods("HTMLTextAreaElement", $.TextAreaElement); |
| 8463 |
| 8464 $.defineNativeMethods("TextEvent", $.TextEvent); |
| 8465 |
| 8466 $.defineNativeMethods("HTMLTitleElement", $.TitleElement); |
| 8467 |
| 8468 $.defineNativeMethods("TouchEvent", $.TouchEvent); |
| 8469 |
| 8470 $.defineNativeMethods("HTMLTrackElement", $.TrackElement); |
| 8471 |
| 8472 $.defineNativeMethods("TrackEvent", $.TrackEvent); |
| 8473 |
| 8474 $.defineNativeMethods("TransitionEvent", $.TransitionEvent); |
| 8475 |
| 8476 $.defineNativeMethodsNonleaf("UIEvent", $.UIEvent); |
| 8477 |
| 8478 $.defineNativeMethods("HTMLUListElement", $.UListElement); |
| 8479 |
| 8480 $.defineNativeMethodsNonleaf("Uint8Array", $.Uint8Array); |
| 8481 |
| 8482 $.defineNativeMethods("Uint8ClampedArray", $.Uint8ClampedArray); |
| 8483 |
| 8484 $.defineNativeMethods("HTMLUnknownElement", $.UnknownElement); |
| 8485 |
| 8486 $.defineNativeMethods("HTMLVideoElement", $.VideoElement); |
| 8487 |
| 8488 $.defineNativeMethods("WheelEvent", $.WheelEvent); |
| 8489 |
| 8490 $.defineNativeMethods("DOMWindow", $.Window); |
| 8491 |
| 8492 $.defineNativeMethods("XPathException", $.XPathException); |
| 8493 |
| 8494 $.defineNativeMethods("NamedNodeMap", $._NamedNodeMap); |
| 8495 |
| 8496 $.defineNativeMethods("WebKitTransitionEvent", $._WebKitTransitionEvent); |
| 8497 |
| 8498 $.defineNativeMethods("IDBVersionChangeEvent", $.VersionChangeEvent); |
| 8499 |
| 8500 $.defineNativeMethods("SVGAElement", $.AElement); |
| 8501 |
| 8502 $.defineNativeMethods("SVGAltGlyphElement", $.AltGlyphElement); |
| 8503 |
| 8504 $.defineNativeMethods("SVGAnimateElement", $.AnimateElement); |
| 8505 |
| 8506 $.defineNativeMethods("SVGAnimateMotionElement", $.AnimateMotionElement); |
| 8507 |
| 8508 $.defineNativeMethods("SVGAnimateTransformElement", $.AnimateTransformElement); |
| 8509 |
| 8510 $.defineNativeMethods("SVGAnimatedLength", $.AnimatedLength); |
| 8511 |
| 8512 $.defineNativeMethods("SVGAnimatedNumberList", $.AnimatedNumberList); |
| 8513 |
| 8514 $.defineNativeMethodsNonleaf("SVGAnimationElement", $.AnimationElement); |
| 8515 |
| 8516 $.defineNativeMethods("SVGCircleElement", $.CircleElement); |
| 8517 |
| 8518 $.defineNativeMethods("SVGClipPathElement", $.ClipPathElement); |
| 8519 |
| 8520 $.defineNativeMethods("SVGDefsElement", $.DefsElement); |
| 8521 |
| 8522 $.defineNativeMethods("SVGDescElement", $.DescElement); |
| 8523 |
| 8524 $.defineNativeMethods("SVGEllipseElement", $.EllipseElement); |
| 8525 |
| 8526 $.defineNativeMethods("SVGFEBlendElement", $.FEBlendElement); |
| 8527 |
| 8528 $.defineNativeMethods("SVGFEColorMatrixElement", $.FEColorMatrixElement); |
| 8529 |
| 8530 $.defineNativeMethods("SVGFEComponentTransferElement", $.FEComponentTransferElem
ent); |
| 8531 |
| 8532 $.defineNativeMethods("SVGFECompositeElement", $.FECompositeElement); |
| 8533 |
| 8534 $.defineNativeMethods("SVGFEConvolveMatrixElement", $.FEConvolveMatrixElement); |
| 8535 |
| 8536 $.defineNativeMethods("SVGFEDiffuseLightingElement", $.FEDiffuseLightingElement)
; |
| 8537 |
| 8538 $.defineNativeMethods("SVGFEDisplacementMapElement", $.FEDisplacementMapElement)
; |
| 8539 |
| 8540 $.defineNativeMethods("SVGFEDistantLightElement", $.FEDistantLightElement); |
| 8541 |
| 8542 $.defineNativeMethods("SVGFEFloodElement", $.FEFloodElement); |
| 8543 |
| 8544 $.defineNativeMethods("SVGFEFuncAElement", $.FEFuncAElement); |
| 8545 |
| 8546 $.defineNativeMethods("SVGFEFuncBElement", $.FEFuncBElement); |
| 8547 |
| 8548 $.defineNativeMethods("SVGFEFuncGElement", $.FEFuncGElement); |
| 8549 |
| 8550 $.defineNativeMethods("SVGFEFuncRElement", $.FEFuncRElement); |
| 8551 |
| 8552 $.defineNativeMethods("SVGFEGaussianBlurElement", $.FEGaussianBlurElement); |
| 8553 |
| 8554 $.defineNativeMethods("SVGFEImageElement", $.FEImageElement); |
| 8555 |
| 8556 $.defineNativeMethods("SVGFEMergeElement", $.FEMergeElement); |
| 8557 |
| 8558 $.defineNativeMethods("SVGFEMergeNodeElement", $.FEMergeNodeElement); |
| 8559 |
| 8560 $.defineNativeMethods("SVGFEMorphologyElement", $.FEMorphologyElement); |
| 8561 |
| 8562 $.defineNativeMethods("SVGFEOffsetElement", $.FEOffsetElement); |
| 8563 |
| 8564 $.defineNativeMethods("SVGFEPointLightElement", $.FEPointLightElement); |
| 8565 |
| 8566 $.defineNativeMethods("SVGFESpecularLightingElement", $.FESpecularLightingElemen
t); |
| 8567 |
| 8568 $.defineNativeMethods("SVGFESpotLightElement", $.FESpotLightElement); |
| 8569 |
| 8570 $.defineNativeMethods("SVGFETileElement", $.FETileElement); |
| 8571 |
| 8572 $.defineNativeMethods("SVGFETurbulenceElement", $.FETurbulenceElement); |
| 8573 |
| 8574 $.defineNativeMethods("SVGFilterElement", $.FilterElement); |
| 8575 |
| 8576 $.defineNativeMethods("SVGForeignObjectElement", $.ForeignObjectElement); |
| 8577 |
| 8578 $.defineNativeMethods("SVGGElement", $.GElement); |
| 8579 |
| 8580 $.defineNativeMethods("SVGImageElement", $.ImageElement0); |
| 8581 |
| 8582 $.defineNativeMethods("SVGLineElement", $.LineElement); |
| 8583 |
| 8584 $.defineNativeMethods("SVGLinearGradientElement", $.LinearGradientElement); |
| 8585 |
| 8586 $.defineNativeMethods("SVGMarkerElement", $.MarkerElement); |
| 8587 |
| 8588 $.defineNativeMethods("SVGMaskElement", $.MaskElement); |
| 8589 |
| 8590 $.defineNativeMethods("SVGMetadataElement", $.MetadataElement); |
| 8591 |
| 8592 $.defineNativeMethods("SVGPathElement", $.PathElement); |
| 8593 |
| 8594 $.defineNativeMethods("SVGPatternElement", $.PatternElement); |
| 8595 |
| 8596 $.defineNativeMethods("SVGPolygonElement", $.PolygonElement); |
| 8597 |
| 8598 $.defineNativeMethods("SVGPolylineElement", $.PolylineElement); |
| 8599 |
| 8600 $.defineNativeMethods("SVGRadialGradientElement", $.RadialGradientElement); |
| 8601 |
| 8602 $.defineNativeMethods("SVGRectElement", $.RectElement); |
| 8603 |
| 8604 $.defineNativeMethods("SVGScriptElement", $.ScriptElement0); |
| 8605 |
| 8606 $.defineNativeMethods("SVGSetElement", $.SetElement); |
| 8607 |
| 8608 $.defineNativeMethods("SVGStopElement", $.StopElement); |
| 8609 |
| 8610 $.defineNativeMethods("SVGStyleElement", $.StyleElement0); |
| 8611 |
| 8612 $.defineNativeMethodsNonleaf("SVGStyledElement", $.StyledElement); |
| 8613 |
| 8614 $.defineNativeMethods("SVGDocument", $.SvgDocument); |
| 8615 |
| 8616 $.defineNativeMethodsNonleaf("SVGElement", $.SvgElement); |
| 8617 |
| 8618 $.defineNativeMethods("SVGException", $.SvgException); |
| 8619 |
| 8620 $.defineNativeMethods("SVGSVGElement", $.SvgSvgElement); |
| 8621 |
| 8622 $.defineNativeMethods("SVGSwitchElement", $.SwitchElement); |
| 8623 |
| 8624 $.defineNativeMethods("SVGSymbolElement", $.SymbolElement); |
| 8625 |
| 8626 $.defineNativeMethods("SVGTSpanElement", $.TSpanElement); |
| 8627 |
| 8628 $.defineNativeMethodsNonleaf("SVGTextContentElement", $.TextContentElement); |
| 8629 |
| 8630 $.defineNativeMethods("SVGTextElement", $.TextElement); |
| 8631 |
| 8632 $.defineNativeMethods("SVGTextPathElement", $.TextPathElement); |
| 8633 |
| 8634 $.defineNativeMethodsNonleaf("SVGTextPositioningElement", $.TextPositioningEleme
nt); |
| 8635 |
| 8636 $.defineNativeMethods("SVGTitleElement", $.TitleElement0); |
| 8637 |
| 8638 $.defineNativeMethods("SVGUseElement", $.UseElement); |
| 8639 |
| 8640 $.defineNativeMethods("SVGViewElement", $.ViewElement); |
| 8641 |
| 8642 $.defineNativeMethods("SVGZoomEvent", $.ZoomEvent); |
| 8643 |
| 8644 $.defineNativeMethodsNonleaf("SVGGradientElement", $._GradientElement); |
| 8645 |
| 8646 $.defineNativeMethodsNonleaf("SVGComponentTransferFunctionElement", $._SVGCompon
entTransferFunctionElement); |
| 8647 |
| 8648 $.defineNativeMethods("AudioProcessingEvent", $.AudioProcessingEvent); |
| 8649 |
| 8650 $.defineNativeMethods("OfflineAudioCompletionEvent", $.OfflineAudioCompletionEve
nt); |
| 8651 |
| 8652 $.defineNativeMethods("WebGLContextEvent", $.ContextEvent); |
| 8653 |
| 8654 $.defineNativeMethods("SQLError", $.SqlError); |
| 8655 |
| 8656 $.defineNativeMethods("SQLException", $.SqlException); |
| 8657 |
| 8658 |
| 8659 var $ = null; |
| 8660 Isolate = Isolate.$finishIsolateConstructor(Isolate); |
| 8661 var $ = new Isolate(); |
| 8662 $.main.call$0 = $.main; |
| 8663 // BEGIN invoke [main]. |
| 8664 if (typeof document !== "undefined" && document.readyState !== "complete") { |
| 8665 document.addEventListener("readystatechange", function () { |
| 8666 if (document.readyState == "complete") { |
| 8667 if (typeof dartMainRunner === "function") { |
| 8668 dartMainRunner(function() { $.startRootIsolate($.main); }); |
| 8669 } else { |
| 8670 $.startRootIsolate($.main); |
| 8671 } |
| 8672 } |
| 8673 }, false); |
| 8674 } else { |
| 8675 if (typeof dartMainRunner === "function") { |
| 8676 dartMainRunner(function() { $.startRootIsolate($.main); }); |
| 8677 } else { |
| 8678 $.startRootIsolate($.main); |
| 8679 } |
| 8680 } |
| 8681 // END invoke [main]. |
| 8682 function init() { |
| 8683 Isolate.$isolateProperties = {}; |
| 8684 function generateAccessor(field, prototype) { |
| 8685 var len = field.length; |
| 8686 var code = field.charCodeAt(len - 1); |
| 8687 code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? c
ode - 117 : code >= 37 && code <= 43 ? code - 27 : 0; |
| 8688 if (code) { |
| 8689 var getterCode = code & 3; |
| 8690 var setterCode = code >> 2; |
| 8691 var accessorName = field = field.substring(0, len - 1); |
| 8692 var divider = field.indexOf(":"); |
| 8693 if (divider > 0) { |
| 8694 accessorName = field.substring(0, divider); |
| 8695 field = field.substring(divider + 1); |
| 8696 } |
| 8697 if (getterCode) { |
| 8698 var args = getterCode & 2 ? "receiver" : ""; |
| 8699 var receiver = getterCode & 1 ? "this" : "receiver"; |
| 8700 var body = "return " + receiver + "." + field; |
| 8701 prototype["get$" + accessorName] = new Function(args, body); |
| 8702 } |
| 8703 if (setterCode) { |
| 8704 var args = setterCode & 2 ? "receiver, value" : "value"; |
| 8705 var receiver = setterCode & 1 ? "this" : "receiver"; |
| 8706 var body = receiver + "." + field + " = value"; |
| 8707 prototype["set$" + accessorName] = new Function(args, body); |
| 8708 } |
| 8709 } |
| 8710 return field; |
| 8711 } |
| 8712 Isolate.$isolateProperties.$generateAccessor = generateAccessor; |
| 8713 function defineClass(cls, fields, prototype) { |
| 8714 var constructor; |
| 8715 if (typeof fields == "function") { |
| 8716 constructor = fields; |
| 8717 } else { |
| 8718 var str = "function " + cls + "("; |
| 8719 var body = ""; |
| 8720 for (var i = 0; i < fields.length; i++) { |
| 8721 if (i != 0) |
| 8722 str += ", "; |
| 8723 var field = fields[i]; |
| 8724 field = generateAccessor(field, prototype); |
| 8725 str += field; |
| 8726 body += "this." + field + " = " + field + ";\n"; |
| 8727 } |
| 8728 str += ") {" + body + "}\nreturn " + cls; |
| 8729 constructor = new Function(str)(); |
| 8730 } |
| 8731 constructor.prototype = prototype; |
| 8732 constructor.builtin$cls = cls; |
| 8733 return constructor; |
| 8734 } |
| 8735 var supportsProto = false; |
| 8736 var tmp = defineClass("c", ["f?"], {}).prototype; |
| 8737 if (tmp.__proto__) { |
| 8738 tmp.__proto__ = {}; |
| 8739 if (typeof tmp.get$f != "undefined") |
| 8740 supportsProto = true; |
| 8741 } |
| 8742 Isolate.$finishClasses = function(collectedClasses, isolateProperties, existin
gIsolateProperties) { |
| 8743 var pendingClasses = {}; |
| 8744 var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 8745 for (var cls in collectedClasses) { |
| 8746 if (hasOwnProperty.call(collectedClasses, cls)) { |
| 8747 var desc = collectedClasses[cls]; |
| 8748 var fields = desc[""], supr; |
| 8749 if (typeof fields == "string") { |
| 8750 var s = fields.split(";"); |
| 8751 supr = s[0]; |
| 8752 fields = s[1] == "" ? [] : s[1].split(","); |
| 8753 } else { |
| 8754 supr = desc.super; |
| 8755 } |
| 8756 isolateProperties[cls] = defineClass(cls, fields, desc); |
| 8757 if (supr) |
| 8758 pendingClasses[cls] = supr; |
| 8759 } |
| 8760 } |
| 8761 var finishedClasses = {}; |
| 8762 function finishClass(cls) { |
| 8763 var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 8764 if (hasOwnProperty.call(finishedClasses, cls)) |
| 8765 return; |
| 8766 finishedClasses[cls] = true; |
| 8767 var superclass = pendingClasses[cls]; |
| 8768 if (!superclass || typeof superclass != "string") |
| 8769 return; |
| 8770 finishClass(superclass); |
| 8771 var constructor = isolateProperties[cls]; |
| 8772 var superConstructor = isolateProperties[superclass]; |
| 8773 if (!superConstructor) |
| 8774 superConstructor = existingIsolateProperties[superclass]; |
| 8775 var prototype = constructor.prototype; |
| 8776 if (supportsProto) { |
| 8777 prototype.__proto__ = superConstructor.prototype; |
| 8778 prototype.constructor = constructor; |
| 8779 } else { |
| 8780 function tmp() { |
| 8781 } |
| 8782 tmp.prototype = superConstructor.prototype; |
| 8783 var newPrototype = new tmp(); |
| 8784 constructor.prototype = newPrototype; |
| 8785 newPrototype.constructor = constructor; |
| 8786 for (var member in prototype) { |
| 8787 if (!member) |
| 8788 continue; |
| 8789 if (hasOwnProperty.call(prototype, member)) { |
| 8790 newPrototype[member] = prototype[member]; |
| 8791 } |
| 8792 } |
| 8793 } |
| 8794 } |
| 8795 for (var cls in pendingClasses) |
| 8796 finishClass(cls); |
| 8797 }; |
| 8798 Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyVal
ue) { |
| 8799 var getter = new Function("{ return $." + fieldName + ";}"); |
| 8800 var sentinelUndefined = {}; |
| 8801 var sentinelInProgress = {}; |
| 8802 prototype[fieldName] = sentinelUndefined; |
| 8803 prototype[getterName] = function() { |
| 8804 var result = $[fieldName]; |
| 8805 try { |
| 8806 if (result === sentinelUndefined) { |
| 8807 $[fieldName] = sentinelInProgress; |
| 8808 try { |
| 8809 result = $[fieldName] = lazyValue(); |
| 8810 } finally { |
| 8811 if (result === sentinelUndefined) { |
| 8812 if ($[fieldName] === sentinelInProgress) { |
| 8813 $[fieldName] = null; |
| 8814 } |
| 8815 } |
| 8816 } |
| 8817 } else { |
| 8818 if (result === sentinelInProgress) |
| 8819 $.throwCyclicInit(staticName); |
| 8820 } |
| 8821 return result; |
| 8822 } finally { |
| 8823 $[getterName] = getter; |
| 8824 } |
| 8825 }; |
| 8826 }; |
| 8827 Isolate.$finishIsolateConstructor = function(oldIsolate) { |
| 8828 var isolateProperties = oldIsolate.$isolateProperties; |
| 8829 isolateProperties.$currentScript = typeof document == "object" ? document.cu
rrentScript || document.scripts[document.scripts.length - 1] : null; |
| 8830 var isolatePrototype = oldIsolate.prototype; |
| 8831 var str = "{\n"; |
| 8832 str += "var properties = Isolate.$isolateProperties;\n"; |
| 8833 var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 8834 for (var staticName in isolateProperties) { |
| 8835 if (hasOwnProperty.call(isolateProperties, staticName)) { |
| 8836 str += "this." + staticName + "= properties." + staticName + ";\n"; |
| 8837 } |
| 8838 } |
| 8839 str += "}\n"; |
| 8840 var newIsolate = new Function(str); |
| 8841 newIsolate.prototype = isolatePrototype; |
| 8842 isolatePrototype.constructor = newIsolate; |
| 8843 newIsolate.$isolateProperties = isolateProperties; |
| 8844 newIsolate.$finishClasses = oldIsolate.$finishClasses; |
| 8845 return newIsolate; |
| 8846 }; |
| 8847 } |
| 8848 //@ sourceMappingURL=vmstats.dart.js.map |
| OLD | NEW |