OLD | NEW |
(Empty) | |
| 1 // Generated by dart2js, the Dart to JavaScript compiler version: 1.9.0-edge.440
28. |
| 2 // The code supports the following hooks: |
| 3 // dartPrint(message): |
| 4 // if this function is defined it is called instead of the Dart [print] |
| 5 // method. |
| 6 // |
| 7 // dartMainRunner(main, args): |
| 8 // if this function is defined, the Dart [main] method will not be invoked |
| 9 // directly. Instead, a closure that will invoke [main], and its arguments |
| 10 // [args] is passed to [dartMainRunner]. |
| 11 (function($) { |
| 12 function map(x) { |
| 13 x = Object.create(null); |
| 14 x.x = 0; |
| 15 delete x.x; |
| 16 return x; |
| 17 } |
| 18 var A = map(); |
| 19 var B = map(); |
| 20 var C = map(); |
| 21 var D = map(); |
| 22 var E = map(); |
| 23 var F = map(); |
| 24 var G = map(); |
| 25 var H = map(); |
| 26 var J = map(); |
| 27 var K = map(); |
| 28 var L = map(); |
| 29 var M = map(); |
| 30 var N = map(); |
| 31 var O = map(); |
| 32 var P = map(); |
| 33 var Q = map(); |
| 34 var R = map(); |
| 35 var S = map(); |
| 36 var T = map(); |
| 37 var U = map(); |
| 38 var V = map(); |
| 39 var W = map(); |
| 40 var X = map(); |
| 41 var Y = map(); |
| 42 var Z = map(); |
| 43 function Isolate() {} |
| 44 init(); |
| 45 |
| 46 $ = Isolate.$isolateProperties; |
| 47 $.functionThatReturnsNull = function() { |
| 48 }; |
| 49 ; |
| 50 function parseReflectionData(reflectionData) { |
| 51 "use strict"; |
| 52 function generateAccessor(fieldDescriptor, accessors, cls) { |
| 53 var fieldInformation = fieldDescriptor.split("-"); |
| 54 var field = fieldInformation[0]; |
| 55 var len = field.length; |
| 56 var code = field.charCodeAt(len - 1); |
| 57 var reflectable; |
| 58 if (fieldInformation.length > 1) |
| 59 reflectable = true; |
| 60 else |
| 61 reflectable = false; |
| 62 code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? c
ode - 117 : code >= 37 && code <= 43 ? code - 27 : 0; |
| 63 if (code) { |
| 64 var getterCode = code & 3; |
| 65 var setterCode = code >> 2; |
| 66 var accessorName = field = field.substring(0, len - 1); |
| 67 var divider = field.indexOf(":"); |
| 68 if (divider > 0) { |
| 69 accessorName = field.substring(0, divider); |
| 70 field = field.substring(divider + 1); |
| 71 } |
| 72 if (getterCode) { |
| 73 var args = getterCode & 2 ? "receiver" : ""; |
| 74 var receiver = getterCode & 1 ? "this" : "receiver"; |
| 75 var body = "return " + receiver + "." + field; |
| 76 var property = cls + ".prototype.get$" + accessorName + "="; |
| 77 var fn = "function(" + args + "){" + body + "}"; |
| 78 if (reflectable) |
| 79 accessors.push(property + "$reflectable(" + fn + ");\n"); |
| 80 else |
| 81 accessors.push(property + fn + ";\n"); |
| 82 } |
| 83 if (setterCode) { |
| 84 var args = setterCode & 2 ? "receiver, value" : "value"; |
| 85 var receiver = setterCode & 1 ? "this" : "receiver"; |
| 86 var body = receiver + "." + field + " = value"; |
| 87 var property = cls + ".prototype.set$" + accessorName + "="; |
| 88 var fn = "function(" + args + "){" + body + "}"; |
| 89 if (reflectable) |
| 90 accessors.push(property + "$reflectable(" + fn + ");\n"); |
| 91 else |
| 92 accessors.push(property + fn + ";\n"); |
| 93 } |
| 94 } |
| 95 return field; |
| 96 } |
| 97 function defineClass(name, fields) { |
| 98 var accessors = []; |
| 99 var str = "function " + name + "("; |
| 100 var body = ""; |
| 101 var fieldNames = ""; |
| 102 for (var i = 0; i < fields.length; i++) { |
| 103 if (i != 0) |
| 104 str += ", "; |
| 105 var field = generateAccessor(fields[i], accessors, name); |
| 106 fieldNames += "'" + field + "',"; |
| 107 var parameter = "parameter_" + field; |
| 108 str += parameter; |
| 109 body += "this." + field + " = " + parameter + ";\n"; |
| 110 } |
| 111 str += ") {\n" + body + "}\n"; |
| 112 str += name + ".builtin$cls=\"" + name + "\";\n"; |
| 113 str += "$desc=$collectedClasses." + name + ";\n"; |
| 114 str += "if($desc instanceof Array) $desc = \$desc[1];\n"; |
| 115 str += name + ".prototype = $desc;\n"; |
| 116 if (typeof defineClass.name != "string") |
| 117 str += name + ".name=\"" + name + "\";\n"; |
| 118 str += name + "." + "$__fields__" + "=[" + fieldNames + "];\n"; |
| 119 str += accessors.join(""); |
| 120 return str; |
| 121 } |
| 122 init.createNewIsolate = function() { |
| 123 return new Isolate(); |
| 124 }; |
| 125 init.classIdExtractor = function(o) { |
| 126 return o.constructor.name; |
| 127 }; |
| 128 init.classFieldsExtractor = function(o) { |
| 129 var fieldNames = o.constructor.$__fields__; |
| 130 if (!fieldNames) |
| 131 return []; |
| 132 var result = []; |
| 133 result.length = fieldNames.length; |
| 134 for (var i = 0; i < fieldNames.length; i++) |
| 135 result[i] = o[fieldNames[i]]; |
| 136 return result; |
| 137 }; |
| 138 init.instanceFromClassId = function(name) { |
| 139 return new init.allClasses[name](); |
| 140 }; |
| 141 init.initializeEmptyInstance = function(name, o, fields) { |
| 142 init.allClasses[name].apply(o, fields); |
| 143 return o; |
| 144 }; |
| 145 var inheritFrom = function() { |
| 146 function tmp() { |
| 147 } |
| 148 return function(constructor, superConstructor) { |
| 149 if (superConstructor == null) { |
| 150 var prototype = constructor.prototype; |
| 151 prototype.constructor = constructor; |
| 152 prototype.$isObject = constructor; |
| 153 return prototype; |
| 154 } |
| 155 tmp.prototype = superConstructor.prototype; |
| 156 var object = new tmp(); |
| 157 var properties = constructor.prototype; |
| 158 var members = Object.keys(properties); |
| 159 for (var i = 0; i < members.length; i++) { |
| 160 var member = members[i]; |
| 161 object[member] = properties[member]; |
| 162 } |
| 163 object["$is" + constructor.name] = constructor; |
| 164 object.constructor = constructor; |
| 165 constructor.prototype = object; |
| 166 return object; |
| 167 }; |
| 168 }(); |
| 169 function finishClasses(processedClasses) { |
| 170 var allClasses = init.allClasses; |
| 171 processedClasses.combinedConstructorFunction += "return [\n" + processedClas
ses.constructorsList.join(",\n ") + "\n]"; |
| 172 var constructors = new Function("$collectedClasses", processedClasses.combin
edConstructorFunction)(processedClasses.collected); |
| 173 processedClasses.combinedConstructorFunction = null; |
| 174 for (var i = 0; i < constructors.length; i++) { |
| 175 var constructor = constructors[i]; |
| 176 var cls = constructor.name; |
| 177 var desc = processedClasses.collected[cls]; |
| 178 var globalObject = $; |
| 179 if (desc instanceof Array) { |
| 180 globalObject = desc[0] || $; |
| 181 desc = desc[1]; |
| 182 } |
| 183 allClasses[cls] = constructor; |
| 184 globalObject[cls] = constructor; |
| 185 } |
| 186 constructors = null; |
| 187 var finishedClasses = init.finishedClasses; |
| 188 function finishClass(cls) { |
| 189 if (finishedClasses[cls]) |
| 190 return; |
| 191 finishedClasses[cls] = true; |
| 192 var superclass = processedClasses.pending[cls]; |
| 193 if (superclass && superclass.indexOf("+") > 0) { |
| 194 var s = superclass.split("+"); |
| 195 superclass = s[0]; |
| 196 var mixinClass = s[1]; |
| 197 finishClass(mixinClass); |
| 198 var mixin = allClasses[mixinClass]; |
| 199 var mixinPrototype = mixin.prototype; |
| 200 var clsPrototype = allClasses[cls].prototype; |
| 201 var properties = Object.keys(mixinPrototype); |
| 202 for (var i = 0; i < properties.length; i++) { |
| 203 var d = properties[i]; |
| 204 if (!hasOwnProperty.call(clsPrototype, d)) |
| 205 clsPrototype[d] = mixinPrototype[d]; |
| 206 } |
| 207 } |
| 208 if (!superclass || typeof superclass != "string") { |
| 209 inheritFrom(allClasses[cls], null); |
| 210 return; |
| 211 } |
| 212 finishClass(superclass); |
| 213 var superConstructor = allClasses[superclass]; |
| 214 if (!superConstructor) |
| 215 superConstructor = existingIsolateProperties[superclass]; |
| 216 var constructor = allClasses[cls]; |
| 217 var prototype = inheritFrom(constructor, superConstructor); |
| 218 if (Object.prototype.hasOwnProperty.call(prototype, "%")) { |
| 219 var nativeSpec = prototype["%"].split(";"); |
| 220 if (nativeSpec[0]) { |
| 221 var tags = nativeSpec[0].split("|"); |
| 222 for (var i = 0; i < tags.length; i++) { |
| 223 init.interceptorsByTag[tags[i]] = constructor; |
| 224 init.leafTags[tags[i]] = true; |
| 225 } |
| 226 } |
| 227 if (nativeSpec[1]) { |
| 228 tags = nativeSpec[1].split("|"); |
| 229 if (nativeSpec[2]) { |
| 230 var subclasses = nativeSpec[2].split("|"); |
| 231 for (var i = 0; i < subclasses.length; i++) { |
| 232 var subclass = allClasses[subclasses[i]]; |
| 233 subclass.$nativeSuperclassTag = tags[0]; |
| 234 } |
| 235 } |
| 236 for (i = 0; i < tags.length; i++) { |
| 237 init.interceptorsByTag[tags[i]] = constructor; |
| 238 init.leafTags[tags[i]] = false; |
| 239 } |
| 240 } |
| 241 } |
| 242 } |
| 243 var properties = Object.keys(processedClasses.pending); |
| 244 for (var i = 0; i < properties.length; i++) |
| 245 finishClass(properties[i]); |
| 246 } |
| 247 function processClassData(cls, descriptor, processedClasses) { |
| 248 var newDesc = {}; |
| 249 var previousProperty; |
| 250 var properties = Object.keys(descriptor); |
| 251 for (var i = 0; i < properties.length; i++) { |
| 252 var property = properties[i]; |
| 253 var firstChar = property.substring(0, 1); |
| 254 if (property === "static") |
| 255 processStatics(init.statics[cls] = descriptor[property], processedClasse
s); |
| 256 else if (firstChar === "+") { |
| 257 mangledNames[previousProperty] = property.substring(1); |
| 258 var flag = descriptor[property]; |
| 259 if (flag > 0) |
| 260 descriptor[previousProperty].$reflectable = flag; |
| 261 } else if (firstChar === "*") { |
| 262 newDesc[previousProperty].$defaultValues = descriptor[property]; |
| 263 var optionalMethods = newDesc.$methodsWithOptionalArguments; |
| 264 if (!optionalMethods) |
| 265 newDesc.$methodsWithOptionalArguments = optionalMethods = {}; |
| 266 optionalMethods[property] = previousProperty; |
| 267 } else { |
| 268 var elem = descriptor[property]; |
| 269 if (property !== "^" && elem != null && elem.constructor === Array && pr
operty !== "<>") |
| 270 addStubs(newDesc, elem, property, false, descriptor, []); |
| 271 else |
| 272 newDesc[previousProperty = property] = elem; |
| 273 } |
| 274 } |
| 275 var classData = newDesc["^"], split, supr, fields = classData; |
| 276 var s = fields.split(";"); |
| 277 fields = s[1] == "" ? [] : s[1].split(","); |
| 278 supr = s[0]; |
| 279 split = supr.split(":"); |
| 280 if (split.length == 2) { |
| 281 supr = split[0]; |
| 282 var functionSignature = split[1]; |
| 283 if (functionSignature) |
| 284 newDesc.$signature = function(s) { |
| 285 return function() { |
| 286 return init.metadata[s]; |
| 287 }; |
| 288 }(functionSignature); |
| 289 } |
| 290 if (supr) |
| 291 processedClasses.pending[cls] = supr; |
| 292 processedClasses.combinedConstructorFunction += defineClass(cls, fields); |
| 293 processedClasses.constructorsList.push(cls); |
| 294 processedClasses.collected[cls] = [globalObject, newDesc]; |
| 295 classes.push(cls); |
| 296 } |
| 297 function processStatics(descriptor, processedClasses) { |
| 298 var properties = Object.keys(descriptor); |
| 299 for (var i = 0; i < properties.length; i++) { |
| 300 var property = properties[i]; |
| 301 if (property === "^") |
| 302 continue; |
| 303 var element = descriptor[property]; |
| 304 var firstChar = property.substring(0, 1); |
| 305 var previousProperty; |
| 306 if (firstChar === "+") { |
| 307 mangledGlobalNames[previousProperty] = property.substring(1); |
| 308 var flag = descriptor[property]; |
| 309 if (flag > 0) |
| 310 descriptor[previousProperty].$reflectable = flag; |
| 311 if (element && element.length) |
| 312 init.typeInformation[previousProperty] = element; |
| 313 } else if (firstChar === "*") { |
| 314 globalObject[previousProperty].$defaultValues = element; |
| 315 var optionalMethods = descriptor.$methodsWithOptionalArguments; |
| 316 if (!optionalMethods) |
| 317 descriptor.$methodsWithOptionalArguments = optionalMethods = {}; |
| 318 optionalMethods[property] = previousProperty; |
| 319 } else if (typeof element === "function") { |
| 320 globalObject[previousProperty = property] = element; |
| 321 functions.push(property); |
| 322 init.globalFunctions[property] = element; |
| 323 } else if (element.constructor === Array) |
| 324 addStubs(globalObject, element, property, true, descriptor, functions); |
| 325 else { |
| 326 previousProperty = property; |
| 327 processClassData(property, element, processedClasses); |
| 328 } |
| 329 } |
| 330 } |
| 331 function addStubs(descriptor, array, name, isStatic, originalDescriptor, funct
ions) { |
| 332 var index = 0, alias = array[index], f; |
| 333 if (typeof alias == "string") |
| 334 f = array[++index]; |
| 335 else { |
| 336 f = alias; |
| 337 alias = name; |
| 338 } |
| 339 var funcs = [originalDescriptor[name] = descriptor[name] = descriptor[alias]
= f]; |
| 340 f.$stubName = name; |
| 341 functions.push(name); |
| 342 for (; index < array.length; index += 2) { |
| 343 f = array[index + 1]; |
| 344 if (typeof f != "function") |
| 345 break; |
| 346 f.$stubName = array[index + 2]; |
| 347 funcs.push(f); |
| 348 if (f.$stubName) { |
| 349 originalDescriptor[f.$stubName] = descriptor[f.$stubName] = f; |
| 350 functions.push(f.$stubName); |
| 351 } |
| 352 } |
| 353 for (var i = 0; i < funcs.length; index++, i++) |
| 354 funcs[i].$callName = array[index + 1]; |
| 355 var getterStubName = array[++index]; |
| 356 array = array.slice(++index); |
| 357 var requiredParameterInfo = array[0]; |
| 358 var requiredParameterCount = requiredParameterInfo >> 1; |
| 359 var isAccessor = (requiredParameterInfo & 1) === 1; |
| 360 var isSetter = requiredParameterInfo === 3; |
| 361 var isGetter = requiredParameterInfo === 1; |
| 362 var optionalParameterInfo = array[1]; |
| 363 var optionalParameterCount = optionalParameterInfo >> 1; |
| 364 var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1; |
| 365 var isIntercepted = requiredParameterCount + optionalParameterCount != funcs
[0].length; |
| 366 var functionTypeIndex = array[2]; |
| 367 var unmangledNameIndex = 2 * optionalParameterCount + requiredParameterCount
+ 3; |
| 368 if (getterStubName) { |
| 369 f = tearOff(funcs, array, isStatic, name, isIntercepted); |
| 370 descriptor[name].$getter = f; |
| 371 f.$getterStub = true; |
| 372 if (isStatic) |
| 373 init.globalFunctions[name] = f; |
| 374 originalDescriptor[getterStubName] = descriptor[getterStubName] = f; |
| 375 funcs.push(f); |
| 376 if (getterStubName) |
| 377 functions.push(getterStubName); |
| 378 f.$stubName = getterStubName; |
| 379 f.$callName = null; |
| 380 } |
| 381 } |
| 382 function tearOffGetter(funcs, reflectionInfo, name, isIntercepted) { |
| 383 return isIntercepted ? new Function("funcs", "reflectionInfo", "name", "H",
"c", "return function tearOff_" + name + functionCounter++ + "(x) {" + "if (c ==
= null) c = H.closureFromTearOff(" + "this, funcs, reflectionInfo, false, [x], n
ame);" + "return new c(this, funcs[0], x, name);" + "}")(funcs, reflectionInfo,
name, H, null) : new Function("funcs", "reflectionInfo", "name", "H", "c", "retu
rn function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c =
H.closureFromTearOff(" + "this, funcs, reflectionInfo, false, [], name);" + "re
turn new c(this, funcs[0], null, name);" + "}")(funcs, reflectionInfo, name, H,
null); |
| 384 } |
| 385 function tearOff(funcs, reflectionInfo, isStatic, name, isIntercepted) { |
| 386 var cache; |
| 387 return isStatic ? function() { |
| 388 if (cache === void 0) |
| 389 cache = H.closureFromTearOff(this, funcs, reflectionInfo, true, [], name
).prototype; |
| 390 return cache; |
| 391 } : tearOffGetter(funcs, reflectionInfo, name, isIntercepted); |
| 392 } |
| 393 var functionCounter = 0; |
| 394 if (!init.libraries) |
| 395 init.libraries = []; |
| 396 if (!init.mangledNames) |
| 397 init.mangledNames = map(); |
| 398 if (!init.mangledGlobalNames) |
| 399 init.mangledGlobalNames = map(); |
| 400 if (!init.statics) |
| 401 init.statics = map(); |
| 402 if (!init.typeInformation) |
| 403 init.typeInformation = map(); |
| 404 if (!init.globalFunctions) |
| 405 init.globalFunctions = map(); |
| 406 var libraries = init.libraries; |
| 407 var mangledNames = init.mangledNames; |
| 408 var mangledGlobalNames = init.mangledGlobalNames; |
| 409 var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 410 var length = reflectionData.length; |
| 411 var processedClasses = Object.create(null); |
| 412 processedClasses.collected = Object.create(null); |
| 413 processedClasses.pending = Object.create(null); |
| 414 processedClasses.constructorsList = []; |
| 415 processedClasses.combinedConstructorFunction = "function $reflectable(fn){fn.$
reflectable=1;return fn};\n" + "var $desc;\n"; |
| 416 for (var i = 0; i < length; i++) { |
| 417 var data = reflectionData[i]; |
| 418 var name = data[0]; |
| 419 var uri = data[1]; |
| 420 var metadata = data[2]; |
| 421 var globalObject = data[3]; |
| 422 var descriptor = data[4]; |
| 423 var isRoot = !!data[5]; |
| 424 var fields = descriptor && descriptor["^"]; |
| 425 if (fields instanceof Array) |
| 426 fields = fields[0]; |
| 427 var classes = []; |
| 428 var functions = []; |
| 429 processStatics(descriptor, processedClasses); |
| 430 libraries.push([name, uri, classes, functions, metadata, fields, isRoot, glo
balObject]); |
| 431 } |
| 432 finishClasses(processedClasses); |
| 433 } |
| 434 var dart = [ |
| 435 ["_foreign_helper", "dart:_foreign_helper", , H, { |
| 436 "^": "", |
| 437 JS_CONST: { |
| 438 "^": "Object;code" |
| 439 } |
| 440 }], |
| 441 ["_interceptors", "dart:_interceptors", , J, { |
| 442 "^": "", |
| 443 getInterceptor: function(object) { |
| 444 return void 0; |
| 445 }, |
| 446 makeDispatchRecord: function(interceptor, proto, extension, indexability) { |
| 447 return {i: interceptor, p: proto, e: extension, x: indexability}; |
| 448 }, |
| 449 getNativeInterceptor: function(object) { |
| 450 var record, proto, objectProto, interceptor; |
| 451 record = object[init.dispatchPropertyName]; |
| 452 if (record == null) |
| 453 if ($.initNativeDispatchFlag == null) { |
| 454 H.initNativeDispatch(); |
| 455 record = object[init.dispatchPropertyName]; |
| 456 } |
| 457 if (record != null) { |
| 458 proto = record.p; |
| 459 if (false === proto) |
| 460 return record.i; |
| 461 if (true === proto) |
| 462 return object; |
| 463 objectProto = Object.getPrototypeOf(object); |
| 464 if (proto === objectProto) |
| 465 return record.i; |
| 466 if (record.e === objectProto) |
| 467 throw H.wrapException(P.UnimplementedError$("Return interceptor for " +
H.S(proto(object, record)))); |
| 468 } |
| 469 interceptor = H.lookupAndCacheInterceptor(object); |
| 470 if (interceptor == null) { |
| 471 proto = Object.getPrototypeOf(object); |
| 472 if (proto == null || proto === Object.prototype) |
| 473 return C.PlainJavaScriptObject_methods; |
| 474 else |
| 475 return C.UnknownJavaScriptObject_methods; |
| 476 } |
| 477 return interceptor; |
| 478 }, |
| 479 Interceptor: { |
| 480 "^": "Object;", |
| 481 $eq: function(receiver, other) { |
| 482 return receiver === other; |
| 483 }, |
| 484 get$hashCode: function(receiver) { |
| 485 return H.Primitives_objectHashCode(receiver); |
| 486 }, |
| 487 toString$0: ["super$Interceptor$toString$0", function(receiver) { |
| 488 return H.Primitives_objectToString(receiver); |
| 489 }], |
| 490 "%": "MediaError|MediaKeyError|SVGAnimatedLength|SVGAnimatedLengthList|SVGAn
imatedNumber|SVGAnimatedNumberList|SVGAnimatedString" |
| 491 }, |
| 492 JSBool: { |
| 493 "^": "Interceptor;", |
| 494 toString$0: function(receiver) { |
| 495 return String(receiver); |
| 496 }, |
| 497 get$hashCode: function(receiver) { |
| 498 return receiver ? 519018 : 218159; |
| 499 }, |
| 500 $isbool: 1 |
| 501 }, |
| 502 JSNull: { |
| 503 "^": "Interceptor;", |
| 504 $eq: function(receiver, other) { |
| 505 return null == other; |
| 506 }, |
| 507 toString$0: function(receiver) { |
| 508 return "null"; |
| 509 }, |
| 510 get$hashCode: function(receiver) { |
| 511 return 0; |
| 512 } |
| 513 }, |
| 514 JavaScriptObject: { |
| 515 "^": "Interceptor;", |
| 516 get$hashCode: function(_) { |
| 517 return 0; |
| 518 }, |
| 519 $isJSObject: 1 |
| 520 }, |
| 521 PlainJavaScriptObject: { |
| 522 "^": "JavaScriptObject;" |
| 523 }, |
| 524 UnknownJavaScriptObject: { |
| 525 "^": "JavaScriptObject;", |
| 526 toString$0: function(receiver) { |
| 527 return String(receiver); |
| 528 } |
| 529 }, |
| 530 JSArray: { |
| 531 "^": "Interceptor;", |
| 532 checkMutable$1: function(receiver, reason) { |
| 533 if (!!receiver.immutable$list) |
| 534 throw H.wrapException(P.UnsupportedError$(reason)); |
| 535 }, |
| 536 checkGrowable$1: function(receiver, reason) { |
| 537 if (!!receiver.fixed$length) |
| 538 throw H.wrapException(P.UnsupportedError$(reason)); |
| 539 }, |
| 540 add$1: function(receiver, value) { |
| 541 if (!!receiver.fixed$length) |
| 542 H.throwExpression(P.UnsupportedError$("add")); |
| 543 receiver.push(value); |
| 544 }, |
| 545 removeAt$1: function(receiver, index) { |
| 546 if (index >= receiver.length) |
| 547 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 548 this.checkGrowable$1(receiver, "removeAt"); |
| 549 return receiver.splice(index, 1)[0]; |
| 550 }, |
| 551 insert$2: function(receiver, index, value) { |
| 552 if (index > receiver.length) |
| 553 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 554 this.checkGrowable$1(receiver, "insert"); |
| 555 receiver.splice(index, 0, value); |
| 556 }, |
| 557 insertAll$2: function(receiver, index, iterable) { |
| 558 var insertionLength, end; |
| 559 this.checkGrowable$1(receiver, "insertAll"); |
| 560 P.RangeError_checkValueInInterval(index, 0, receiver.length, "index", null
); |
| 561 insertionLength = iterable.length; |
| 562 this.set$length(receiver, receiver.length + insertionLength); |
| 563 end = index + insertionLength; |
| 564 this.setRange$4(receiver, end, receiver.length, receiver, index); |
| 565 this.setRange$3(receiver, index, end, iterable); |
| 566 }, |
| 567 removeLast$0: function(receiver) { |
| 568 this.checkGrowable$1(receiver, "removeLast"); |
| 569 if (receiver.length === 0) |
| 570 throw H.wrapException(P.RangeError$value(-1, null, null)); |
| 571 return receiver.pop(); |
| 572 }, |
| 573 remove$1: function(receiver, element) { |
| 574 var i; |
| 575 this.checkGrowable$1(receiver, "remove"); |
| 576 for (i = 0; i < receiver.length; ++i) |
| 577 if (J.$eq(receiver[i], element)) { |
| 578 receiver.splice(i, 1); |
| 579 return true; |
| 580 } |
| 581 return false; |
| 582 }, |
| 583 addAll$1: function(receiver, collection) { |
| 584 var t1; |
| 585 for (t1 = new H.ListIterator(collection, 2, 0, null); t1.moveNext$0();) |
| 586 this.add$1(receiver, t1._current); |
| 587 }, |
| 588 forEach$1: function(receiver, f) { |
| 589 var end, i; |
| 590 end = receiver.length; |
| 591 for (i = 0; i < end; ++i) { |
| 592 f.call$1(receiver[i]); |
| 593 if (receiver.length !== end) |
| 594 throw H.wrapException(P.ConcurrentModificationError$(receiver)); |
| 595 } |
| 596 }, |
| 597 map$1: function(receiver, f) { |
| 598 return H.setRuntimeTypeInfo(new H.MappedListIterable(receiver, f), [null,
null]); |
| 599 }, |
| 600 join$1: function(receiver, separator) { |
| 601 var t1, list, i, t2; |
| 602 t1 = receiver.length; |
| 603 list = Array(t1); |
| 604 list.fixed$length = Array; |
| 605 for (i = 0; i < receiver.length; ++i) { |
| 606 t2 = H.S(receiver[i]); |
| 607 if (i >= t1) |
| 608 return H.ioore(list, i); |
| 609 list[i] = t2; |
| 610 } |
| 611 return list.join(separator); |
| 612 }, |
| 613 join$0: function($receiver) { |
| 614 return this.join$1($receiver, ""); |
| 615 }, |
| 616 skip$1: function(receiver, n) { |
| 617 return H.SubListIterable$(receiver, n, null, H.getTypeArgumentByIndex(rece
iver, 0)); |
| 618 }, |
| 619 fold$2: function(receiver, initialValue, combine) { |
| 620 var $length, value, i; |
| 621 $length = receiver.length; |
| 622 for (value = initialValue, i = 0; i < $length; ++i) { |
| 623 value = combine.call$2(value, receiver[i]); |
| 624 if (receiver.length !== $length) |
| 625 throw H.wrapException(P.ConcurrentModificationError$(receiver)); |
| 626 } |
| 627 return value; |
| 628 }, |
| 629 elementAt$1: function(receiver, index) { |
| 630 if (index >>> 0 !== index || index >= receiver.length) |
| 631 return H.ioore(receiver, index); |
| 632 return receiver[index]; |
| 633 }, |
| 634 sublist$2: function(receiver, start, end) { |
| 635 if (start < 0 || start > receiver.length) |
| 636 throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null
, null)); |
| 637 if (end < start || end > receiver.length) |
| 638 throw H.wrapException(P.RangeError$range(end, start, receiver.length, nu
ll, null)); |
| 639 if (start === end) |
| 640 return H.setRuntimeTypeInfo([], [H.getTypeArgumentByIndex(receiver, 0)])
; |
| 641 return H.setRuntimeTypeInfo(receiver.slice(start, end), [H.getTypeArgument
ByIndex(receiver, 0)]); |
| 642 }, |
| 643 get$first: function(receiver) { |
| 644 if (receiver.length > 0) |
| 645 return receiver[0]; |
| 646 throw H.wrapException(H.IterableElementError_noElement()); |
| 647 }, |
| 648 get$last: function(receiver) { |
| 649 var t1 = receiver.length; |
| 650 if (t1 > 0) |
| 651 return receiver[t1 - 1]; |
| 652 throw H.wrapException(H.IterableElementError_noElement()); |
| 653 }, |
| 654 setRange$4: function(receiver, start, end, iterable, skipCount) { |
| 655 var $length, i, t1; |
| 656 this.checkMutable$1(receiver, "set range"); |
| 657 P.RangeError_checkValidRange(start, end, receiver.length, null, null, null
); |
| 658 $length = end - start; |
| 659 if ($length === 0) |
| 660 return; |
| 661 if (skipCount < 0) |
| 662 H.throwExpression(P.RangeError$range(skipCount, 0, null, "skipCount", nu
ll)); |
| 663 if (skipCount + $length > iterable.length) |
| 664 throw H.wrapException(H.IterableElementError_tooFew()); |
| 665 if (skipCount < start) |
| 666 for (i = $length - 1; i >= 0; --i) { |
| 667 t1 = skipCount + i; |
| 668 if (t1 < 0 || t1 >= iterable.length) |
| 669 return H.ioore(iterable, t1); |
| 670 receiver[start + i] = iterable[t1]; |
| 671 } |
| 672 else |
| 673 for (i = 0; i < $length; ++i) { |
| 674 t1 = skipCount + i; |
| 675 if (t1 < 0 || t1 >= iterable.length) |
| 676 return H.ioore(iterable, t1); |
| 677 receiver[start + i] = iterable[t1]; |
| 678 } |
| 679 }, |
| 680 setRange$3: function($receiver, start, end, iterable) { |
| 681 return this.setRange$4($receiver, start, end, iterable, 0); |
| 682 }, |
| 683 indexOf$2: function(receiver, element, start) { |
| 684 var i, t1; |
| 685 if (start >= receiver.length) |
| 686 return -1; |
| 687 if (start < 0) |
| 688 start = 0; |
| 689 for (i = start; t1 = receiver.length, i < t1; ++i) { |
| 690 if (i < 0) |
| 691 return H.ioore(receiver, i); |
| 692 if (J.$eq(receiver[i], element)) |
| 693 return i; |
| 694 } |
| 695 return -1; |
| 696 }, |
| 697 indexOf$1: function($receiver, element) { |
| 698 return this.indexOf$2($receiver, element, 0); |
| 699 }, |
| 700 contains$1: function(receiver, other) { |
| 701 var i; |
| 702 for (i = 0; i < receiver.length; ++i) |
| 703 if (J.$eq(receiver[i], other)) |
| 704 return true; |
| 705 return false; |
| 706 }, |
| 707 get$isEmpty: function(receiver) { |
| 708 return receiver.length === 0; |
| 709 }, |
| 710 get$isNotEmpty: function(receiver) { |
| 711 return receiver.length !== 0; |
| 712 }, |
| 713 toString$0: function(receiver) { |
| 714 return P.IterableBase_iterableToFullString(receiver, "[", "]"); |
| 715 }, |
| 716 toList$1$growable: function(receiver, growable) { |
| 717 var t1; |
| 718 if (growable) |
| 719 return H.setRuntimeTypeInfo(receiver.slice(), [H.getTypeArgumentByIndex(
receiver, 0)]); |
| 720 else { |
| 721 t1 = H.setRuntimeTypeInfo(receiver.slice(), [H.getTypeArgumentByIndex(re
ceiver, 0)]); |
| 722 t1.fixed$length = Array; |
| 723 return t1; |
| 724 } |
| 725 }, |
| 726 toList$0: function($receiver) { |
| 727 return this.toList$1$growable($receiver, true); |
| 728 }, |
| 729 get$iterator: function(receiver) { |
| 730 return new H.ListIterator(receiver, receiver.length, 0, null); |
| 731 }, |
| 732 get$hashCode: function(receiver) { |
| 733 return H.Primitives_objectHashCode(receiver); |
| 734 }, |
| 735 get$length: function(receiver) { |
| 736 return receiver.length; |
| 737 }, |
| 738 set$length: function(receiver, newLength) { |
| 739 if (newLength < 0) |
| 740 throw H.wrapException(P.RangeError$value(newLength, null, null)); |
| 741 this.checkGrowable$1(receiver, "set length"); |
| 742 receiver.length = newLength; |
| 743 }, |
| 744 $index: function(receiver, index) { |
| 745 if (typeof index !== "number" || Math.floor(index) !== index) |
| 746 throw H.wrapException(P.ArgumentError$(index)); |
| 747 if (index >= receiver.length || index < 0) |
| 748 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 749 return receiver[index]; |
| 750 }, |
| 751 $indexSet: function(receiver, index, value) { |
| 752 if (!!receiver.immutable$list) |
| 753 H.throwExpression(P.UnsupportedError$("indexed set")); |
| 754 if (typeof index !== "number" || Math.floor(index) !== index) |
| 755 throw H.wrapException(P.ArgumentError$(index)); |
| 756 if (index >= receiver.length || index < 0) |
| 757 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 758 receiver[index] = value; |
| 759 }, |
| 760 $isJSIndexable: 1, |
| 761 $isList: 1, |
| 762 $asList: null, |
| 763 $isEfficientLength: 1, |
| 764 static: {JSArray_JSArray$fixed: function($length, $E) { |
| 765 var t1; |
| 766 if (typeof $length !== "number" || Math.floor($length) !== $length || $l
ength < 0) |
| 767 throw H.wrapException(P.ArgumentError$("Length must be a non-negative
integer: " + H.S($length))); |
| 768 t1 = H.setRuntimeTypeInfo(new Array($length), [$E]); |
| 769 t1.fixed$length = Array; |
| 770 return t1; |
| 771 }} |
| 772 }, |
| 773 JSNumber: { |
| 774 "^": "Interceptor;", |
| 775 get$isNaN: function(receiver) { |
| 776 return isNaN(receiver); |
| 777 }, |
| 778 get$isFinite: function(receiver) { |
| 779 return isFinite(receiver); |
| 780 }, |
| 781 remainder$1: function(receiver, b) { |
| 782 return receiver % b; |
| 783 }, |
| 784 toInt$0: function(receiver) { |
| 785 var t1; |
| 786 if (receiver >= -2147483648 && receiver <= 2147483647) |
| 787 return receiver | 0; |
| 788 if (isFinite(receiver)) { |
| 789 t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); |
| 790 return t1 + 0; |
| 791 } |
| 792 throw H.wrapException(P.UnsupportedError$("" + receiver)); |
| 793 }, |
| 794 round$0: function(receiver) { |
| 795 if (receiver > 0) { |
| 796 if (receiver !== 1 / 0) |
| 797 return Math.round(receiver); |
| 798 } else if (receiver > -1 / 0) |
| 799 return 0 - Math.round(0 - receiver); |
| 800 throw H.wrapException(P.UnsupportedError$("" + receiver)); |
| 801 }, |
| 802 toRadixString$1: function(receiver, radix) { |
| 803 var result, match, t1, exponent; |
| 804 H.checkInt(radix); |
| 805 if (radix < 2 || radix > 36) |
| 806 throw H.wrapException(P.RangeError$(radix)); |
| 807 result = receiver.toString(radix); |
| 808 if (C.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41) |
| 809 return result; |
| 810 match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); |
| 811 if (match == null) |
| 812 H.throwExpression(P.UnsupportedError$("Unexpected toString result: " + r
esult)); |
| 813 t1 = J.getInterceptor$asx(match); |
| 814 result = t1.$index(match, 1); |
| 815 exponent = +t1.$index(match, 3); |
| 816 if (t1.$index(match, 2) != null) { |
| 817 result += t1.$index(match, 2); |
| 818 exponent -= t1.$index(match, 2).length; |
| 819 } |
| 820 return result + C.JSString_methods.$mul("0", exponent); |
| 821 }, |
| 822 toString$0: function(receiver) { |
| 823 if (receiver === 0 && 1 / receiver < 0) |
| 824 return "-0.0"; |
| 825 else |
| 826 return "" + receiver; |
| 827 }, |
| 828 get$hashCode: function(receiver) { |
| 829 return receiver & 0x1FFFFFFF; |
| 830 }, |
| 831 $negate: function(receiver) { |
| 832 return -receiver; |
| 833 }, |
| 834 $add: function(receiver, other) { |
| 835 if (typeof other !== "number") |
| 836 throw H.wrapException(P.ArgumentError$(other)); |
| 837 return receiver + other; |
| 838 }, |
| 839 $sub: function(receiver, other) { |
| 840 if (typeof other !== "number") |
| 841 throw H.wrapException(P.ArgumentError$(other)); |
| 842 return receiver - other; |
| 843 }, |
| 844 $mul: function(receiver, other) { |
| 845 return receiver * other; |
| 846 }, |
| 847 _tdivFast$1: function(receiver, other) { |
| 848 return (receiver | 0) === receiver ? receiver / other | 0 : this.toInt$0(r
eceiver / other); |
| 849 }, |
| 850 _shlPositive$1: function(receiver, other) { |
| 851 return other > 31 ? 0 : receiver << other >>> 0; |
| 852 }, |
| 853 _shrOtherPositive$1: function(receiver, other) { |
| 854 var t1; |
| 855 if (receiver > 0) |
| 856 t1 = other > 31 ? 0 : receiver >>> other; |
| 857 else { |
| 858 t1 = other > 31 ? 31 : other; |
| 859 t1 = receiver >> t1 >>> 0; |
| 860 } |
| 861 return t1; |
| 862 }, |
| 863 _shrReceiverPositive$1: function(receiver, other) { |
| 864 if (other < 0) |
| 865 throw H.wrapException(P.ArgumentError$(other)); |
| 866 return other > 31 ? 0 : receiver >>> other; |
| 867 }, |
| 868 $lt: function(receiver, other) { |
| 869 if (typeof other !== "number") |
| 870 throw H.wrapException(P.ArgumentError$(other)); |
| 871 return receiver < other; |
| 872 }, |
| 873 $gt: function(receiver, other) { |
| 874 if (typeof other !== "number") |
| 875 throw H.wrapException(P.ArgumentError$(other)); |
| 876 return receiver > other; |
| 877 }, |
| 878 $ge: function(receiver, other) { |
| 879 if (typeof other !== "number") |
| 880 throw H.wrapException(P.ArgumentError$(other)); |
| 881 return receiver >= other; |
| 882 }, |
| 883 $isnum: 1 |
| 884 }, |
| 885 JSInt: { |
| 886 "^": "JSNumber;", |
| 887 $is$double: 1, |
| 888 $isnum: 1, |
| 889 $is$int: 1 |
| 890 }, |
| 891 JSDouble: { |
| 892 "^": "JSNumber;", |
| 893 $is$double: 1, |
| 894 $isnum: 1 |
| 895 }, |
| 896 JSString: { |
| 897 "^": "Interceptor;", |
| 898 codeUnitAt$1: function(receiver, index) { |
| 899 if (typeof index !== "number" || Math.floor(index) !== index) |
| 900 throw H.wrapException(P.ArgumentError$(index)); |
| 901 if (index < 0) |
| 902 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 903 if (index >= receiver.length) |
| 904 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 905 return receiver.charCodeAt(index); |
| 906 }, |
| 907 allMatches$2: function(receiver, string, start) { |
| 908 var t1; |
| 909 H.checkString(string); |
| 910 H.checkInt(start); |
| 911 t1 = J.get$length$asx(string); |
| 912 if (typeof t1 !== "number") |
| 913 return H.iae(t1); |
| 914 t1 = start > t1; |
| 915 if (t1) |
| 916 throw H.wrapException(P.RangeError$range(start, 0, J.get$length$asx(stri
ng), null, null)); |
| 917 return H.allMatchesInStringUnchecked(receiver, string, start); |
| 918 }, |
| 919 allMatches$1: function($receiver, string) { |
| 920 return this.allMatches$2($receiver, string, 0); |
| 921 }, |
| 922 matchAsPrefix$2: function(receiver, string, start) { |
| 923 var t1, i; |
| 924 if (start < 0 || start > string.length) |
| 925 throw H.wrapException(P.RangeError$range(start, 0, string.length, null,
null)); |
| 926 t1 = receiver.length; |
| 927 if (start + t1 > string.length) |
| 928 return; |
| 929 for (i = 0; i < t1; ++i) |
| 930 if (this.codeUnitAt$1(string, start + i) !== this.codeUnitAt$1(receiver,
i)) |
| 931 return; |
| 932 return new H.StringMatch(start, string, receiver); |
| 933 }, |
| 934 $add: function(receiver, other) { |
| 935 if (typeof other !== "string") |
| 936 throw H.wrapException(P.ArgumentError$(other)); |
| 937 return receiver + other; |
| 938 }, |
| 939 endsWith$1: function(receiver, other) { |
| 940 var otherLength, t1; |
| 941 H.checkString(other); |
| 942 otherLength = other.length; |
| 943 t1 = receiver.length; |
| 944 if (otherLength > t1) |
| 945 return false; |
| 946 return other === this.substring$1(receiver, t1 - otherLength); |
| 947 }, |
| 948 replaceAll$2: function(receiver, from, to) { |
| 949 H.checkString(to); |
| 950 return H.stringReplaceAllUnchecked(receiver, from, to); |
| 951 }, |
| 952 replaceFirst$3: function(receiver, from, to, startIndex) { |
| 953 H.checkString(to); |
| 954 H.checkInt(startIndex); |
| 955 P.RangeError_checkValueInInterval(startIndex, 0, receiver.length, "startIn
dex", null); |
| 956 return H.stringReplaceFirstUnchecked(receiver, from, to, startIndex); |
| 957 }, |
| 958 replaceFirst$2: function($receiver, from, to) { |
| 959 return this.replaceFirst$3($receiver, from, to, 0); |
| 960 }, |
| 961 split$1: function(receiver, pattern) { |
| 962 return receiver.split(pattern); |
| 963 }, |
| 964 replaceRange$3: function(receiver, start, end, replacement) { |
| 965 H.checkString(replacement); |
| 966 H.checkInt(start); |
| 967 end = P.RangeError_checkValidRange(start, end, receiver.length, null, null
, null); |
| 968 H.checkInt(end); |
| 969 return H.stringReplaceRangeUnchecked(receiver, start, end, replacement); |
| 970 }, |
| 971 startsWith$2: function(receiver, pattern, index) { |
| 972 var endIndex; |
| 973 H.checkInt(index); |
| 974 if (index > receiver.length) |
| 975 throw H.wrapException(P.RangeError$range(index, 0, receiver.length, null
, null)); |
| 976 if (typeof pattern === "string") { |
| 977 endIndex = index + pattern.length; |
| 978 if (endIndex > receiver.length) |
| 979 return false; |
| 980 return pattern === receiver.substring(index, endIndex); |
| 981 } |
| 982 return J.matchAsPrefix$2$s(pattern, receiver, index) != null; |
| 983 }, |
| 984 startsWith$1: function($receiver, pattern) { |
| 985 return this.startsWith$2($receiver, pattern, 0); |
| 986 }, |
| 987 substring$2: function(receiver, startIndex, endIndex) { |
| 988 var t1; |
| 989 if (typeof startIndex !== "number" || Math.floor(startIndex) !== startInde
x) |
| 990 H.throwExpression(P.ArgumentError$(startIndex)); |
| 991 if (endIndex == null) |
| 992 endIndex = receiver.length; |
| 993 if (typeof endIndex !== "number" || Math.floor(endIndex) !== endIndex) |
| 994 H.throwExpression(P.ArgumentError$(endIndex)); |
| 995 t1 = J.getInterceptor$n(startIndex); |
| 996 if (t1.$lt(startIndex, 0)) |
| 997 throw H.wrapException(P.RangeError$value(startIndex, null, null)); |
| 998 if (t1.$gt(startIndex, endIndex)) |
| 999 throw H.wrapException(P.RangeError$value(startIndex, null, null)); |
| 1000 if (J.$gt$n(endIndex, receiver.length)) |
| 1001 throw H.wrapException(P.RangeError$value(endIndex, null, null)); |
| 1002 return receiver.substring(startIndex, endIndex); |
| 1003 }, |
| 1004 substring$1: function($receiver, startIndex) { |
| 1005 return this.substring$2($receiver, startIndex, null); |
| 1006 }, |
| 1007 trim$0: function(receiver) { |
| 1008 var result, endIndex, startIndex, t1, endIndex0; |
| 1009 result = receiver.trim(); |
| 1010 endIndex = result.length; |
| 1011 if (endIndex === 0) |
| 1012 return result; |
| 1013 if (this.codeUnitAt$1(result, 0) === 133) { |
| 1014 startIndex = J.JSString__skipLeadingWhitespace(result, 1); |
| 1015 if (startIndex === endIndex) |
| 1016 return ""; |
| 1017 } else |
| 1018 startIndex = 0; |
| 1019 t1 = endIndex - 1; |
| 1020 endIndex0 = this.codeUnitAt$1(result, t1) === 133 ? J.JSString__skipTraili
ngWhitespace(result, t1) : endIndex; |
| 1021 if (startIndex === 0 && endIndex0 === endIndex) |
| 1022 return result; |
| 1023 return result.substring(startIndex, endIndex0); |
| 1024 }, |
| 1025 $mul: function(receiver, times) { |
| 1026 var s, result; |
| 1027 if (typeof times !== "number") |
| 1028 return H.iae(times); |
| 1029 if (0 >= times) |
| 1030 return ""; |
| 1031 if (times === 1 || receiver.length === 0) |
| 1032 return receiver; |
| 1033 if (times !== times >>> 0) |
| 1034 throw H.wrapException(C.C_OutOfMemoryError); |
| 1035 for (s = receiver, result = ""; true;) { |
| 1036 if ((times & 1) === 1) |
| 1037 result = s + result; |
| 1038 times = times >>> 1; |
| 1039 if (times === 0) |
| 1040 break; |
| 1041 s += s; |
| 1042 } |
| 1043 return result; |
| 1044 }, |
| 1045 get$codeUnits: function(receiver) { |
| 1046 return new H.CodeUnits(receiver); |
| 1047 }, |
| 1048 indexOf$2: function(receiver, pattern, start) { |
| 1049 if (start < 0 || start > receiver.length) |
| 1050 throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null
, null)); |
| 1051 return receiver.indexOf(pattern, start); |
| 1052 }, |
| 1053 indexOf$1: function($receiver, pattern) { |
| 1054 return this.indexOf$2($receiver, pattern, 0); |
| 1055 }, |
| 1056 lastIndexOf$2: function(receiver, pattern, start) { |
| 1057 var t1, t2; |
| 1058 if (start == null) |
| 1059 start = receiver.length; |
| 1060 else if (start < 0 || start > receiver.length) |
| 1061 throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null
, null)); |
| 1062 t1 = pattern.length; |
| 1063 if (typeof start !== "number") |
| 1064 return start.$add(); |
| 1065 t2 = receiver.length; |
| 1066 if (start + t1 > t2) |
| 1067 start = t2 - t1; |
| 1068 return receiver.lastIndexOf(pattern, start); |
| 1069 }, |
| 1070 lastIndexOf$1: function($receiver, pattern) { |
| 1071 return this.lastIndexOf$2($receiver, pattern, null); |
| 1072 }, |
| 1073 contains$2: function(receiver, other, startIndex) { |
| 1074 if (other == null) |
| 1075 H.throwExpression(P.ArgumentError$(null)); |
| 1076 if (startIndex > receiver.length) |
| 1077 throw H.wrapException(P.RangeError$range(startIndex, 0, receiver.length,
null, null)); |
| 1078 return H.stringContainsUnchecked(receiver, other, startIndex); |
| 1079 }, |
| 1080 contains$1: function($receiver, other) { |
| 1081 return this.contains$2($receiver, other, 0); |
| 1082 }, |
| 1083 get$isEmpty: function(receiver) { |
| 1084 return receiver.length === 0; |
| 1085 }, |
| 1086 get$isNotEmpty: function(receiver) { |
| 1087 return receiver.length !== 0; |
| 1088 }, |
| 1089 toString$0: function(receiver) { |
| 1090 return receiver; |
| 1091 }, |
| 1092 get$hashCode: function(receiver) { |
| 1093 var t1, hash, i; |
| 1094 for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { |
| 1095 hash = 536870911 & hash + receiver.charCodeAt(i); |
| 1096 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); |
| 1097 hash ^= hash >> 6; |
| 1098 } |
| 1099 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); |
| 1100 hash ^= hash >> 11; |
| 1101 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); |
| 1102 }, |
| 1103 get$length: function(receiver) { |
| 1104 return receiver.length; |
| 1105 }, |
| 1106 $index: function(receiver, index) { |
| 1107 if (typeof index !== "number" || Math.floor(index) !== index) |
| 1108 throw H.wrapException(P.ArgumentError$(index)); |
| 1109 if (index >= receiver.length || index < 0) |
| 1110 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 1111 return receiver[index]; |
| 1112 }, |
| 1113 $isJSIndexable: 1, |
| 1114 $isString: 1, |
| 1115 static: {JSString__isWhitespace: function(codeUnit) { |
| 1116 if (codeUnit < 256) |
| 1117 switch (codeUnit) { |
| 1118 case 9: |
| 1119 case 10: |
| 1120 case 11: |
| 1121 case 12: |
| 1122 case 13: |
| 1123 case 32: |
| 1124 case 133: |
| 1125 case 160: |
| 1126 return true; |
| 1127 default: |
| 1128 return false; |
| 1129 } |
| 1130 switch (codeUnit) { |
| 1131 case 5760: |
| 1132 case 6158: |
| 1133 case 8192: |
| 1134 case 8193: |
| 1135 case 8194: |
| 1136 case 8195: |
| 1137 case 8196: |
| 1138 case 8197: |
| 1139 case 8198: |
| 1140 case 8199: |
| 1141 case 8200: |
| 1142 case 8201: |
| 1143 case 8202: |
| 1144 case 8232: |
| 1145 case 8233: |
| 1146 case 8239: |
| 1147 case 8287: |
| 1148 case 12288: |
| 1149 case 65279: |
| 1150 return true; |
| 1151 default: |
| 1152 return false; |
| 1153 } |
| 1154 }, JSString__skipLeadingWhitespace: function(string, index) { |
| 1155 var t1, codeUnit; |
| 1156 for (t1 = string.length; index < t1;) { |
| 1157 codeUnit = C.JSString_methods.codeUnitAt$1(string, index); |
| 1158 if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(co
deUnit)) |
| 1159 break; |
| 1160 ++index; |
| 1161 } |
| 1162 return index; |
| 1163 }, JSString__skipTrailingWhitespace: function(string, index) { |
| 1164 var index0, codeUnit; |
| 1165 for (; index > 0; index = index0) { |
| 1166 index0 = index - 1; |
| 1167 codeUnit = C.JSString_methods.codeUnitAt$1(string, index0); |
| 1168 if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(co
deUnit)) |
| 1169 break; |
| 1170 } |
| 1171 return index; |
| 1172 }} |
| 1173 } |
| 1174 }], |
| 1175 ["_isolate_helper", "dart:_isolate_helper", , H, { |
| 1176 "^": "", |
| 1177 _callInIsolate: function(isolate, $function) { |
| 1178 var result = isolate.eval$1($function); |
| 1179 init.globalState.topEventLoop.run$0(); |
| 1180 return result; |
| 1181 }, |
| 1182 leaveJsAsync: function() { |
| 1183 --init.globalState.topEventLoop._activeJsAsyncCount; |
| 1184 }, |
| 1185 startRootIsolate: function(entry, args) { |
| 1186 var t1, t2, t3, t4, t5, rootContext; |
| 1187 t1 = {}; |
| 1188 t1.args_0 = args; |
| 1189 args = args; |
| 1190 t1.args_0 = args; |
| 1191 if (args == null) { |
| 1192 args = []; |
| 1193 t1.args_0 = args; |
| 1194 t2 = args; |
| 1195 } else |
| 1196 t2 = args; |
| 1197 if (!J.getInterceptor(t2).$isList) |
| 1198 throw H.wrapException(P.ArgumentError$("Arguments to main must be a List:
" + H.S(t2))); |
| 1199 t2 = new H._Manager(0, 0, 1, null, null, null, null, null, null, null, null,
null, entry); |
| 1200 t2._Manager$1(entry); |
| 1201 init.globalState = t2; |
| 1202 if (init.globalState.isWorker === true) |
| 1203 return; |
| 1204 t2 = init.globalState.nextIsolateId++; |
| 1205 t3 = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, H.RawReceivePor
tImpl); |
| 1206 t4 = P.LinkedHashSet_LinkedHashSet(null, null, null, P.$int); |
| 1207 t5 = new H.RawReceivePortImpl(0, null, false); |
| 1208 rootContext = new H._IsolateContext(t2, t3, t4, init.createNewIsolate(), t5,
new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false,
false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, fa
lse, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null)); |
| 1209 t4.add$1(0, 0); |
| 1210 rootContext._addRegistration$2(0, t5); |
| 1211 init.globalState.rootContext = rootContext; |
| 1212 init.globalState.currentContext = rootContext; |
| 1213 t2 = H.getDynamicRuntimeType(); |
| 1214 t3 = H.buildFunctionType(t2, [t2])._isTest$1(entry); |
| 1215 if (t3) |
| 1216 rootContext.eval$1(new H.startRootIsolate_closure(t1, entry)); |
| 1217 else { |
| 1218 t2 = H.buildFunctionType(t2, [t2, t2])._isTest$1(entry); |
| 1219 if (t2) |
| 1220 rootContext.eval$1(new H.startRootIsolate_closure0(t1, entry)); |
| 1221 else |
| 1222 rootContext.eval$1(entry); |
| 1223 } |
| 1224 init.globalState.topEventLoop.run$0(); |
| 1225 }, |
| 1226 IsolateNatives_computeThisScript: function() { |
| 1227 var currentScript = init.currentScript; |
| 1228 if (currentScript != null) |
| 1229 return String(currentScript.src); |
| 1230 if (typeof version == "function" && typeof os == "object" && "system" in os) |
| 1231 return H.IsolateNatives_computeThisScriptFromTrace(); |
| 1232 if (typeof version == "function" && typeof system == "function") |
| 1233 return thisFilename(); |
| 1234 if (init.globalState.isWorker === true) |
| 1235 return H.IsolateNatives_computeThisScriptFromTrace(); |
| 1236 return; |
| 1237 }, |
| 1238 IsolateNatives_computeThisScriptFromTrace: function() { |
| 1239 var stack, matches; |
| 1240 stack = new Error().stack; |
| 1241 if (stack == null) { |
| 1242 stack = function() { |
| 1243 try { |
| 1244 throw new Error(); |
| 1245 } catch (e) { |
| 1246 return e.stack; |
| 1247 } |
| 1248 }(); |
| 1249 if (stack == null) |
| 1250 throw H.wrapException(P.UnsupportedError$("No stack trace")); |
| 1251 } |
| 1252 matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m"
)); |
| 1253 if (matches != null) |
| 1254 return matches[1]; |
| 1255 matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m")); |
| 1256 if (matches != null) |
| 1257 return matches[1]; |
| 1258 throw H.wrapException(P.UnsupportedError$("Cannot extract URI from \"" + H.S
(stack) + "\"")); |
| 1259 }, |
| 1260 IsolateNatives__processWorkerMessage: function(sender, e) { |
| 1261 var msg, t1, functionName, entryPoint, args, message, isSpawnUri, startPause
d, replyTo, t2, t3, t4, context; |
| 1262 msg = new H._Deserializer(true, []).deserialize$1(e.data); |
| 1263 t1 = J.getInterceptor$asx(msg); |
| 1264 switch (t1.$index(msg, "command")) { |
| 1265 case "start": |
| 1266 init.globalState.currentManagerId = t1.$index(msg, "id"); |
| 1267 functionName = t1.$index(msg, "functionName"); |
| 1268 entryPoint = functionName == null ? init.globalState.entry : H.IsolateNa
tives__getJSFunctionFromName(functionName); |
| 1269 args = t1.$index(msg, "args"); |
| 1270 message = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "ms
g")); |
| 1271 isSpawnUri = t1.$index(msg, "isSpawnUri"); |
| 1272 startPaused = t1.$index(msg, "startPaused"); |
| 1273 replyTo = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "re
plyTo")); |
| 1274 t1 = init.globalState.nextIsolateId++; |
| 1275 t2 = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, H.RawReceiv
ePortImpl); |
| 1276 t3 = P.LinkedHashSet_LinkedHashSet(null, null, null, P.$int); |
| 1277 t4 = new H.RawReceivePortImpl(0, null, false); |
| 1278 context = new H._IsolateContext(t1, t2, t3, init.createNewIsolate(), t4,
new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false,
false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, fa
lse, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null)); |
| 1279 t3.add$1(0, 0); |
| 1280 context._addRegistration$2(0, t4); |
| 1281 init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context,
new H.IsolateNatives__processWorkerMessage_closure(entryPoint, args, message, i
sSpawnUri, startPaused, replyTo), "worker-start")); |
| 1282 init.globalState.currentContext = context; |
| 1283 init.globalState.topEventLoop.run$0(); |
| 1284 break; |
| 1285 case "spawn-worker": |
| 1286 break; |
| 1287 case "message": |
| 1288 if (t1.$index(msg, "port") != null) |
| 1289 J.send$1$x(t1.$index(msg, "port"), t1.$index(msg, "msg")); |
| 1290 init.globalState.topEventLoop.run$0(); |
| 1291 break; |
| 1292 case "close": |
| 1293 init.globalState.managers.remove$1(0, $.get$IsolateNatives_workerIds().$
index(0, sender)); |
| 1294 sender.terminate(); |
| 1295 init.globalState.topEventLoop.run$0(); |
| 1296 break; |
| 1297 case "log": |
| 1298 H.IsolateNatives__log(t1.$index(msg, "msg")); |
| 1299 break; |
| 1300 case "print": |
| 1301 if (init.globalState.isWorker === true) { |
| 1302 t1 = init.globalState.mainManager; |
| 1303 t2 = P.LinkedHashMap_LinkedHashMap$_literal(["command", "print", "msg"
, msg], null, null); |
| 1304 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t2); |
| 1305 t1.toString; |
| 1306 self.postMessage(t2); |
| 1307 } else |
| 1308 P.print(t1.$index(msg, "msg")); |
| 1309 break; |
| 1310 case "error": |
| 1311 throw H.wrapException(t1.$index(msg, "msg")); |
| 1312 } |
| 1313 }, |
| 1314 IsolateNatives__log: function(msg) { |
| 1315 var trace, t1, t2, exception; |
| 1316 if (init.globalState.isWorker === true) { |
| 1317 t1 = init.globalState.mainManager; |
| 1318 t2 = P.LinkedHashMap_LinkedHashMap$_literal(["command", "log", "msg", msg]
, null, null); |
| 1319 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(null,
P.$int)).serialize$1(t2); |
| 1320 t1.toString; |
| 1321 self.postMessage(t2); |
| 1322 } else |
| 1323 try { |
| 1324 self.console.log(msg); |
| 1325 } catch (exception) { |
| 1326 H.unwrapException(exception); |
| 1327 trace = H.getTraceFromException(exception); |
| 1328 throw H.wrapException(P.Exception_Exception(trace)); |
| 1329 } |
| 1330 }, |
| 1331 IsolateNatives__getJSFunctionFromName: function(functionName) { |
| 1332 return init.globalFunctions[functionName](); |
| 1333 }, |
| 1334 IsolateNatives__startIsolate: function(topLevel, args, message, isSpawnUri, st
artPaused, replyTo) { |
| 1335 var context, t1, t2, t3; |
| 1336 context = init.globalState.currentContext; |
| 1337 t1 = context.id; |
| 1338 $.Primitives_mirrorFunctionCacheName = $.Primitives_mirrorFunctionCacheName
+ ("_" + t1); |
| 1339 $.Primitives_mirrorInvokeCacheName = $.Primitives_mirrorInvokeCacheName + ("
_" + t1); |
| 1340 t1 = context.controlPort; |
| 1341 t2 = init.globalState.currentContext.id; |
| 1342 t3 = context.pauseCapability; |
| 1343 J.send$1$x(replyTo, ["spawned", new H._NativeJsSendPort(t1, t2), t3, context
.terminateCapability]); |
| 1344 t2 = new H.IsolateNatives__startIsolate_runStartFunction(topLevel, args, mes
sage, isSpawnUri, context); |
| 1345 if (startPaused === true) { |
| 1346 context.addPause$2(t3, t3); |
| 1347 init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, t
2, "start isolate")); |
| 1348 } else |
| 1349 t2.call$0(); |
| 1350 }, |
| 1351 _clone: function(message) { |
| 1352 return new H._Deserializer(true, []).deserialize$1(new H._Serializer(false,
P.LinkedHashMap_LinkedHashMap$identity(null, P.$int)).serialize$1(message)); |
| 1353 }, |
| 1354 startRootIsolate_closure: { |
| 1355 "^": "Closure:0;box_0,entry_1", |
| 1356 call$0: function() { |
| 1357 this.entry_1.call$1(this.box_0.args_0); |
| 1358 } |
| 1359 }, |
| 1360 startRootIsolate_closure0: { |
| 1361 "^": "Closure:0;box_0,entry_2", |
| 1362 call$0: function() { |
| 1363 this.entry_2.call$2(this.box_0.args_0, null); |
| 1364 } |
| 1365 }, |
| 1366 _Manager: { |
| 1367 "^": "Object;nextIsolateId,currentManagerId,nextManagerId,currentContext,roo
tContext,topEventLoop,fromCommandLine,isWorker,supportsWorkers,isolates,mainMana
ger,managers,entry", |
| 1368 _Manager$1: function(entry) { |
| 1369 var t1, t2, t3; |
| 1370 t1 = self.window == null; |
| 1371 t2 = self.Worker; |
| 1372 t3 = t1 && !!self.postMessage; |
| 1373 this.isWorker = t3; |
| 1374 if (!t3) |
| 1375 t2 = t2 != null && $.get$IsolateNatives_thisScript() != null; |
| 1376 else |
| 1377 t2 = true; |
| 1378 this.supportsWorkers = t2; |
| 1379 this.fromCommandLine = t1 && !t3; |
| 1380 this.topEventLoop = new H._EventLoop(P.ListQueue$(null, H._IsolateEvent),
0); |
| 1381 this.isolates = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, H.
_IsolateContext); |
| 1382 this.managers = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, nu
ll); |
| 1383 if (this.isWorker === true) { |
| 1384 t1 = new H._MainManagerStub(); |
| 1385 this.mainManager = t1; |
| 1386 self.onmessage = function(f, a) { |
| 1387 return function(e) { |
| 1388 f(a, e); |
| 1389 }; |
| 1390 }(H.IsolateNatives__processWorkerMessage, t1); |
| 1391 self.dartPrint = self.dartPrint || function(serialize) { |
| 1392 return function(object) { |
| 1393 if (self.console && self.console.log) |
| 1394 self.console.log(object); |
| 1395 else |
| 1396 self.postMessage(serialize(object)); |
| 1397 }; |
| 1398 }(H._Manager__serializePrintMessage); |
| 1399 } |
| 1400 }, |
| 1401 static: {_Manager__serializePrintMessage: function(object) { |
| 1402 var t1 = P.LinkedHashMap_LinkedHashMap$_literal(["command", "print", "ms
g", object], null, null); |
| 1403 return new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t1); |
| 1404 }} |
| 1405 }, |
| 1406 _IsolateContext: { |
| 1407 "^": "Object;id,ports,weakPorts,isolateStatics<,controlPort<,pauseCapability
,terminateCapability,initialized,isPaused,delayedEvents,pauseTokens,doneHandlers
,_scheduledControlEvents,_isExecutingEvent,errorsAreFatal,errorPorts", |
| 1408 addPause$2: function(authentification, resume) { |
| 1409 if (!this.pauseCapability.$eq(0, authentification)) |
| 1410 return; |
| 1411 if (this.pauseTokens.add$1(0, resume) && !this.isPaused) |
| 1412 this.isPaused = true; |
| 1413 this._updateGlobalState$0(); |
| 1414 }, |
| 1415 removePause$1: function(resume) { |
| 1416 var t1, t2, $event, t3, t4, t5; |
| 1417 if (!this.isPaused) |
| 1418 return; |
| 1419 t1 = this.pauseTokens; |
| 1420 t1.remove$1(0, resume); |
| 1421 if (t1._collection$_length === 0) { |
| 1422 for (t1 = this.delayedEvents; t2 = t1.length, t2 !== 0;) { |
| 1423 if (0 >= t2) |
| 1424 return H.ioore(t1, 0); |
| 1425 $event = t1.pop(); |
| 1426 t2 = init.globalState.topEventLoop.events; |
| 1427 t3 = t2._head; |
| 1428 t4 = t2._table; |
| 1429 t5 = t4.length; |
| 1430 t3 = (t3 - 1 & t5 - 1) >>> 0; |
| 1431 t2._head = t3; |
| 1432 if (t3 < 0 || t3 >= t5) |
| 1433 return H.ioore(t4, t3); |
| 1434 t4[t3] = $event; |
| 1435 if (t3 === t2._tail) |
| 1436 t2._grow$0(); |
| 1437 ++t2._modificationCount; |
| 1438 } |
| 1439 this.isPaused = false; |
| 1440 } |
| 1441 this._updateGlobalState$0(); |
| 1442 }, |
| 1443 addDoneListener$1: function(responsePort) { |
| 1444 var t1 = this.doneHandlers; |
| 1445 if (t1 == null) { |
| 1446 t1 = []; |
| 1447 this.doneHandlers = t1; |
| 1448 } |
| 1449 if (J.contains$1$asx(t1, responsePort)) |
| 1450 return; |
| 1451 this.doneHandlers.push(responsePort); |
| 1452 }, |
| 1453 removeDoneListener$1: function(responsePort) { |
| 1454 var t1 = this.doneHandlers; |
| 1455 if (t1 == null) |
| 1456 return; |
| 1457 J.remove$1$ax(t1, responsePort); |
| 1458 }, |
| 1459 setErrorsFatal$2: function(authentification, errorsAreFatal) { |
| 1460 if (!this.terminateCapability.$eq(0, authentification)) |
| 1461 return; |
| 1462 this.errorsAreFatal = errorsAreFatal; |
| 1463 }, |
| 1464 handlePing$2: function(responsePort, pingType) { |
| 1465 var t1, t2; |
| 1466 t1 = J.getInterceptor(pingType); |
| 1467 if (!t1.$eq(pingType, 0)) |
| 1468 t2 = t1.$eq(pingType, 1) && !this._isExecutingEvent; |
| 1469 else |
| 1470 t2 = true; |
| 1471 if (t2) { |
| 1472 J.send$1$x(responsePort, null); |
| 1473 return; |
| 1474 } |
| 1475 t2 = new H._IsolateContext_handlePing_respond(responsePort); |
| 1476 if (t1.$eq(pingType, 2)) { |
| 1477 init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(this, t2
, "ping")); |
| 1478 return; |
| 1479 } |
| 1480 t1 = this._scheduledControlEvents; |
| 1481 if (t1 == null) { |
| 1482 t1 = P.ListQueue$(null, null); |
| 1483 this._scheduledControlEvents = t1; |
| 1484 } |
| 1485 t1._add$1(t2); |
| 1486 }, |
| 1487 handleKill$2: function(authentification, priority) { |
| 1488 var t1, t2; |
| 1489 if (!this.terminateCapability.$eq(0, authentification)) |
| 1490 return; |
| 1491 t1 = J.getInterceptor(priority); |
| 1492 if (!t1.$eq(priority, 0)) |
| 1493 t2 = t1.$eq(priority, 1) && !this._isExecutingEvent; |
| 1494 else |
| 1495 t2 = true; |
| 1496 if (t2) { |
| 1497 this.kill$0(); |
| 1498 return; |
| 1499 } |
| 1500 if (t1.$eq(priority, 2)) { |
| 1501 t1 = init.globalState.topEventLoop; |
| 1502 t2 = this.get$kill(); |
| 1503 t1.events._add$1(new H._IsolateEvent(this, t2, "kill")); |
| 1504 return; |
| 1505 } |
| 1506 t1 = this._scheduledControlEvents; |
| 1507 if (t1 == null) { |
| 1508 t1 = P.ListQueue$(null, null); |
| 1509 this._scheduledControlEvents = t1; |
| 1510 } |
| 1511 t1._add$1(this.get$kill()); |
| 1512 }, |
| 1513 handleUncaughtError$2: function(error, stackTrace) { |
| 1514 var t1, message, t2; |
| 1515 t1 = this.errorPorts; |
| 1516 if (t1._collection$_length === 0) { |
| 1517 if (this.errorsAreFatal === true && this === init.globalState.rootContex
t) |
| 1518 return; |
| 1519 if (self.console && self.console.error) |
| 1520 self.console.error(error, stackTrace); |
| 1521 else { |
| 1522 P.print(error); |
| 1523 if (stackTrace != null) |
| 1524 P.print(stackTrace); |
| 1525 } |
| 1526 return; |
| 1527 } |
| 1528 message = Array(2); |
| 1529 message.fixed$length = Array; |
| 1530 message[0] = J.toString$0(error); |
| 1531 message[1] = stackTrace == null ? null : J.toString$0(stackTrace); |
| 1532 for (t2 = new P.LinkedHashSetIterator(t1, t1._collection$_modifications, n
ull, null), t2._collection$_cell = t1._collection$_first; t2.moveNext$0();) |
| 1533 J.send$1$x(t2._collection$_current, message); |
| 1534 }, |
| 1535 eval$1: function(code) { |
| 1536 var old, result, e, s, exception, t1; |
| 1537 old = init.globalState.currentContext; |
| 1538 init.globalState.currentContext = this; |
| 1539 $ = this.isolateStatics; |
| 1540 result = null; |
| 1541 this._isExecutingEvent = true; |
| 1542 try { |
| 1543 result = code.call$0(); |
| 1544 } catch (exception) { |
| 1545 t1 = H.unwrapException(exception); |
| 1546 e = t1; |
| 1547 s = H.getTraceFromException(exception); |
| 1548 this.handleUncaughtError$2(e, s); |
| 1549 if (this.errorsAreFatal === true) { |
| 1550 this.kill$0(); |
| 1551 if (this === init.globalState.rootContext) |
| 1552 throw exception; |
| 1553 } |
| 1554 } finally { |
| 1555 this._isExecutingEvent = false; |
| 1556 init.globalState.currentContext = old; |
| 1557 if (old != null) |
| 1558 $ = old.get$isolateStatics(); |
| 1559 if (this._scheduledControlEvents != null) |
| 1560 for (; t1 = this._scheduledControlEvents, !t1.get$isEmpty(t1);) |
| 1561 this._scheduledControlEvents.removeFirst$0().call$0(); |
| 1562 } |
| 1563 return result; |
| 1564 }, |
| 1565 lookup$1: function(portId) { |
| 1566 return this.ports.$index(0, portId); |
| 1567 }, |
| 1568 _addRegistration$2: function(portId, port) { |
| 1569 var t1 = this.ports; |
| 1570 if (t1.containsKey$1(portId)) |
| 1571 throw H.wrapException(P.Exception_Exception("Registry: ports must be reg
istered only once.")); |
| 1572 t1.$indexSet(0, portId, port); |
| 1573 }, |
| 1574 _updateGlobalState$0: function() { |
| 1575 if (this.ports.__js_helper$_length - this.weakPorts._collection$_length >
0 || this.isPaused || !this.initialized) |
| 1576 init.globalState.isolates.$indexSet(0, this.id, this); |
| 1577 else |
| 1578 this.kill$0(); |
| 1579 }, |
| 1580 kill$0: [function() { |
| 1581 var t1, t2; |
| 1582 t1 = this._scheduledControlEvents; |
| 1583 if (t1 != null) |
| 1584 t1.clear$0(0); |
| 1585 for (t1 = this.ports, t2 = t1.get$values(t1), t2 = H.setRuntimeTypeInfo(ne
w H.MappedIterator(null, J.get$iterator$ax(t2._iterable), t2._f), [H.getTypeArgu
mentByIndex(t2, 0), H.getTypeArgumentByIndex(t2, 1)]); t2.moveNext$0();) |
| 1586 t2._current.__isolate_helper$_close$0(); |
| 1587 t1.clear$0(0); |
| 1588 this.weakPorts.clear$0(0); |
| 1589 init.globalState.isolates.remove$1(0, this.id); |
| 1590 this.errorPorts.clear$0(0); |
| 1591 t1 = this.doneHandlers; |
| 1592 if (t1 != null) { |
| 1593 for (t1 = new H.ListIterator(t1, t1.length, 0, null); t1.moveNext$0();) |
| 1594 J.send$1$x(t1._current, null); |
| 1595 this.doneHandlers = null; |
| 1596 } |
| 1597 }, "call$0", "get$kill", 0, 0, 1] |
| 1598 }, |
| 1599 _IsolateContext_handlePing_respond: { |
| 1600 "^": "Closure:1;responsePort_0", |
| 1601 call$0: function() { |
| 1602 J.send$1$x(this.responsePort_0, null); |
| 1603 } |
| 1604 }, |
| 1605 _EventLoop: { |
| 1606 "^": "Object;events,_activeJsAsyncCount", |
| 1607 dequeue$0: function() { |
| 1608 var t1 = this.events; |
| 1609 if (t1._head === t1._tail) |
| 1610 return; |
| 1611 return t1.removeFirst$0(); |
| 1612 }, |
| 1613 runIteration$0: function() { |
| 1614 var $event, t1, t2; |
| 1615 $event = this.dequeue$0(); |
| 1616 if ($event == null) { |
| 1617 if (init.globalState.rootContext != null && init.globalState.isolates.co
ntainsKey$1(init.globalState.rootContext.id) && init.globalState.fromCommandLine
=== true && init.globalState.rootContext.ports.__js_helper$_length === 0) |
| 1618 H.throwExpression(P.Exception_Exception("Program exited with open Rece
ivePorts.")); |
| 1619 t1 = init.globalState; |
| 1620 if (t1.isWorker === true && t1.isolates.__js_helper$_length === 0 && t1.
topEventLoop._activeJsAsyncCount === 0) { |
| 1621 t1 = t1.mainManager; |
| 1622 t2 = P.LinkedHashMap_LinkedHashMap$_literal(["command", "close"], null
, null); |
| 1623 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t2); |
| 1624 t1.toString; |
| 1625 self.postMessage(t2); |
| 1626 } |
| 1627 return false; |
| 1628 } |
| 1629 $event.process$0(); |
| 1630 return true; |
| 1631 }, |
| 1632 _runHelper$0: function() { |
| 1633 if (self.window != null) |
| 1634 new H._EventLoop__runHelper_next(this).call$0(); |
| 1635 else |
| 1636 for (; this.runIteration$0();) |
| 1637 ; |
| 1638 }, |
| 1639 run$0: function() { |
| 1640 var e, trace, exception, t1, t2; |
| 1641 if (init.globalState.isWorker !== true) |
| 1642 this._runHelper$0(); |
| 1643 else |
| 1644 try { |
| 1645 this._runHelper$0(); |
| 1646 } catch (exception) { |
| 1647 t1 = H.unwrapException(exception); |
| 1648 e = t1; |
| 1649 trace = H.getTraceFromException(exception); |
| 1650 t1 = init.globalState.mainManager; |
| 1651 t2 = P.LinkedHashMap_LinkedHashMap$_literal(["command", "error", "msg"
, H.S(e) + "\n" + H.S(trace)], null, null); |
| 1652 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t2); |
| 1653 t1.toString; |
| 1654 self.postMessage(t2); |
| 1655 } |
| 1656 } |
| 1657 }, |
| 1658 _EventLoop__runHelper_next: { |
| 1659 "^": "Closure:1;this_0", |
| 1660 call$0: function() { |
| 1661 if (!this.this_0.runIteration$0()) |
| 1662 return; |
| 1663 P.Timer_Timer(C.Duration_0, this); |
| 1664 } |
| 1665 }, |
| 1666 _IsolateEvent: { |
| 1667 "^": "Object;isolate,fn,message>", |
| 1668 process$0: function() { |
| 1669 var t1 = this.isolate; |
| 1670 if (t1.isPaused) { |
| 1671 t1.delayedEvents.push(this); |
| 1672 return; |
| 1673 } |
| 1674 t1.eval$1(this.fn); |
| 1675 } |
| 1676 }, |
| 1677 _MainManagerStub: { |
| 1678 "^": "Object;" |
| 1679 }, |
| 1680 IsolateNatives__processWorkerMessage_closure: { |
| 1681 "^": "Closure:0;entryPoint_0,args_1,message_2,isSpawnUri_3,startPaused_4,rep
lyTo_5", |
| 1682 call$0: function() { |
| 1683 H.IsolateNatives__startIsolate(this.entryPoint_0, this.args_1, this.messag
e_2, this.isSpawnUri_3, this.startPaused_4, this.replyTo_5); |
| 1684 } |
| 1685 }, |
| 1686 IsolateNatives__startIsolate_runStartFunction: { |
| 1687 "^": "Closure:1;topLevel_0,args_1,message_2,isSpawnUri_3,context_4", |
| 1688 call$0: function() { |
| 1689 var t1, t2, t3; |
| 1690 this.context_4.initialized = true; |
| 1691 if (this.isSpawnUri_3 !== true) |
| 1692 this.topLevel_0.call$1(this.message_2); |
| 1693 else { |
| 1694 t1 = this.topLevel_0; |
| 1695 t2 = H.getDynamicRuntimeType(); |
| 1696 t3 = H.buildFunctionType(t2, [t2, t2])._isTest$1(t1); |
| 1697 if (t3) |
| 1698 t1.call$2(this.args_1, this.message_2); |
| 1699 else { |
| 1700 t2 = H.buildFunctionType(t2, [t2])._isTest$1(t1); |
| 1701 if (t2) |
| 1702 t1.call$1(this.args_1); |
| 1703 else |
| 1704 t1.call$0(); |
| 1705 } |
| 1706 } |
| 1707 } |
| 1708 }, |
| 1709 _BaseSendPort: { |
| 1710 "^": "Object;" |
| 1711 }, |
| 1712 _NativeJsSendPort: { |
| 1713 "^": "_BaseSendPort;_receivePort,_isolateId", |
| 1714 send$1: function(_, message) { |
| 1715 var isolate, t1, msg, t2; |
| 1716 isolate = init.globalState.isolates.$index(0, this._isolateId); |
| 1717 if (isolate == null) |
| 1718 return; |
| 1719 t1 = this._receivePort; |
| 1720 if (t1.get$_isClosed()) |
| 1721 return; |
| 1722 msg = H._clone(message); |
| 1723 if (isolate.get$controlPort() === t1) { |
| 1724 t1 = J.getInterceptor$asx(msg); |
| 1725 switch (t1.$index(msg, 0)) { |
| 1726 case "pause": |
| 1727 isolate.addPause$2(t1.$index(msg, 1), t1.$index(msg, 2)); |
| 1728 break; |
| 1729 case "resume": |
| 1730 isolate.removePause$1(t1.$index(msg, 1)); |
| 1731 break; |
| 1732 case "add-ondone": |
| 1733 isolate.addDoneListener$1(t1.$index(msg, 1)); |
| 1734 break; |
| 1735 case "remove-ondone": |
| 1736 isolate.removeDoneListener$1(t1.$index(msg, 1)); |
| 1737 break; |
| 1738 case "set-errors-fatal": |
| 1739 isolate.setErrorsFatal$2(t1.$index(msg, 1), t1.$index(msg, 2)); |
| 1740 break; |
| 1741 case "ping": |
| 1742 isolate.handlePing$2(t1.$index(msg, 1), t1.$index(msg, 2)); |
| 1743 break; |
| 1744 case "kill": |
| 1745 isolate.handleKill$2(t1.$index(msg, 1), t1.$index(msg, 2)); |
| 1746 break; |
| 1747 case "getErrors": |
| 1748 t1 = t1.$index(msg, 1); |
| 1749 isolate.errorPorts.add$1(0, t1); |
| 1750 break; |
| 1751 case "stopErrors": |
| 1752 t1 = t1.$index(msg, 1); |
| 1753 isolate.errorPorts.remove$1(0, t1); |
| 1754 break; |
| 1755 } |
| 1756 return; |
| 1757 } |
| 1758 t1 = init.globalState.topEventLoop; |
| 1759 t2 = "receive " + H.S(message); |
| 1760 t1.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send
_closure(this, msg), t2)); |
| 1761 }, |
| 1762 $eq: function(_, other) { |
| 1763 if (other == null) |
| 1764 return false; |
| 1765 return other instanceof H._NativeJsSendPort && J.$eq(this._receivePort, ot
her._receivePort); |
| 1766 }, |
| 1767 get$hashCode: function(_) { |
| 1768 return this._receivePort.get$_id(); |
| 1769 } |
| 1770 }, |
| 1771 _NativeJsSendPort_send_closure: { |
| 1772 "^": "Closure:0;this_0,msg_1", |
| 1773 call$0: function() { |
| 1774 var t1 = this.this_0._receivePort; |
| 1775 if (!t1.get$_isClosed()) |
| 1776 t1.__isolate_helper$_add$1(this.msg_1); |
| 1777 } |
| 1778 }, |
| 1779 _WorkerSendPort: { |
| 1780 "^": "_BaseSendPort;_workerId,_receivePortId,_isolateId", |
| 1781 send$1: function(_, message) { |
| 1782 var t1, workerMessage, manager; |
| 1783 t1 = P.LinkedHashMap_LinkedHashMap$_literal(["command", "message", "port",
this, "msg", message], null, null); |
| 1784 workerMessage = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$iden
tity(null, P.$int)).serialize$1(t1); |
| 1785 if (init.globalState.isWorker === true) { |
| 1786 init.globalState.mainManager.toString; |
| 1787 self.postMessage(workerMessage); |
| 1788 } else { |
| 1789 manager = init.globalState.managers.$index(0, this._workerId); |
| 1790 if (manager != null) |
| 1791 manager.postMessage(workerMessage); |
| 1792 } |
| 1793 }, |
| 1794 $eq: function(_, other) { |
| 1795 if (other == null) |
| 1796 return false; |
| 1797 return other instanceof H._WorkerSendPort && J.$eq(this._workerId, other._
workerId) && J.$eq(this._isolateId, other._isolateId) && J.$eq(this._receivePort
Id, other._receivePortId); |
| 1798 }, |
| 1799 get$hashCode: function(_) { |
| 1800 var t1, t2, t3; |
| 1801 t1 = this._workerId; |
| 1802 if (typeof t1 !== "number") |
| 1803 return t1.$shl(); |
| 1804 t2 = this._isolateId; |
| 1805 if (typeof t2 !== "number") |
| 1806 return t2.$shl(); |
| 1807 t3 = this._receivePortId; |
| 1808 if (typeof t3 !== "number") |
| 1809 return H.iae(t3); |
| 1810 return (t1 << 16 ^ t2 << 8 ^ t3) >>> 0; |
| 1811 } |
| 1812 }, |
| 1813 RawReceivePortImpl: { |
| 1814 "^": "Object;_id<,_handler,_isClosed<", |
| 1815 __isolate_helper$_close$0: function() { |
| 1816 this._isClosed = true; |
| 1817 this._handler = null; |
| 1818 }, |
| 1819 close$0: function(_) { |
| 1820 var t1, t2; |
| 1821 if (this._isClosed) |
| 1822 return; |
| 1823 this._isClosed = true; |
| 1824 this._handler = null; |
| 1825 t1 = init.globalState.currentContext; |
| 1826 t2 = this._id; |
| 1827 t1.ports.remove$1(0, t2); |
| 1828 t1.weakPorts.remove$1(0, t2); |
| 1829 t1._updateGlobalState$0(); |
| 1830 }, |
| 1831 __isolate_helper$_add$1: function(dataEvent) { |
| 1832 if (this._isClosed) |
| 1833 return; |
| 1834 this._handler$1(dataEvent); |
| 1835 }, |
| 1836 _handler$1: function(arg0) { |
| 1837 return this._handler.call$1(arg0); |
| 1838 }, |
| 1839 $isRawReceivePort: 1 |
| 1840 }, |
| 1841 TimerImpl: { |
| 1842 "^": "Object;_once,_inEventLoop,_handle", |
| 1843 TimerImpl$periodic$2: function(milliseconds, callback) { |
| 1844 if (self.setTimeout != null) { |
| 1845 ++init.globalState.topEventLoop._activeJsAsyncCount; |
| 1846 this._handle = self.setInterval(H.convertDartClosureToJS(new H.TimerImpl
$periodic_closure(this, callback), 0), milliseconds); |
| 1847 } else |
| 1848 throw H.wrapException(P.UnsupportedError$("Periodic timer.")); |
| 1849 }, |
| 1850 TimerImpl$2: function(milliseconds, callback) { |
| 1851 var t1, t2; |
| 1852 if (milliseconds === 0) |
| 1853 t1 = self.setTimeout == null || init.globalState.isWorker === true; |
| 1854 else |
| 1855 t1 = false; |
| 1856 if (t1) { |
| 1857 this._handle = 1; |
| 1858 t1 = init.globalState.topEventLoop; |
| 1859 t2 = init.globalState.currentContext; |
| 1860 t1.events._add$1(new H._IsolateEvent(t2, new H.TimerImpl_internalCallbac
k(this, callback), "timer")); |
| 1861 this._inEventLoop = true; |
| 1862 } else if (self.setTimeout != null) { |
| 1863 ++init.globalState.topEventLoop._activeJsAsyncCount; |
| 1864 this._handle = self.setTimeout(H.convertDartClosureToJS(new H.TimerImpl_
internalCallback0(this, callback), 0), milliseconds); |
| 1865 } else |
| 1866 throw H.wrapException(P.UnsupportedError$("Timer greater than 0.")); |
| 1867 }, |
| 1868 static: {TimerImpl$: function(milliseconds, callback) { |
| 1869 var t1 = new H.TimerImpl(true, false, null); |
| 1870 t1.TimerImpl$2(milliseconds, callback); |
| 1871 return t1; |
| 1872 }, TimerImpl$periodic: function(milliseconds, callback) { |
| 1873 var t1 = new H.TimerImpl(false, false, null); |
| 1874 t1.TimerImpl$periodic$2(milliseconds, callback); |
| 1875 return t1; |
| 1876 }} |
| 1877 }, |
| 1878 TimerImpl_internalCallback: { |
| 1879 "^": "Closure:1;this_0,callback_1", |
| 1880 call$0: function() { |
| 1881 this.this_0._handle = null; |
| 1882 this.callback_1.call$0(); |
| 1883 } |
| 1884 }, |
| 1885 TimerImpl_internalCallback0: { |
| 1886 "^": "Closure:1;this_2,callback_3", |
| 1887 call$0: function() { |
| 1888 this.this_2._handle = null; |
| 1889 H.leaveJsAsync(); |
| 1890 this.callback_3.call$0(); |
| 1891 } |
| 1892 }, |
| 1893 TimerImpl$periodic_closure: { |
| 1894 "^": "Closure:0;this_0,callback_1", |
| 1895 call$0: function() { |
| 1896 this.callback_1.call$1(this.this_0); |
| 1897 } |
| 1898 }, |
| 1899 CapabilityImpl: { |
| 1900 "^": "Object;_id<", |
| 1901 get$hashCode: function(_) { |
| 1902 var hash = this._id; |
| 1903 hash = C.JSInt_methods._shrOtherPositive$1(hash, 0) ^ C.JSInt_methods._tdi
vFast$1(hash, 4294967296); |
| 1904 hash = (~hash >>> 0) + (hash << 15 >>> 0) & 4294967295; |
| 1905 hash = ((hash ^ hash >>> 12) >>> 0) * 5 & 4294967295; |
| 1906 hash = ((hash ^ hash >>> 4) >>> 0) * 2057 & 4294967295; |
| 1907 return (hash ^ hash >>> 16) >>> 0; |
| 1908 }, |
| 1909 $eq: function(_, other) { |
| 1910 if (other == null) |
| 1911 return false; |
| 1912 if (other === this) |
| 1913 return true; |
| 1914 if (other instanceof H.CapabilityImpl) |
| 1915 return this._id === other._id; |
| 1916 return false; |
| 1917 } |
| 1918 }, |
| 1919 _Serializer: { |
| 1920 "^": "Object;_serializeSendPorts,serializedObjectIds", |
| 1921 serialize$1: [function(x) { |
| 1922 var t1, serializationId, serializeTearOff, t2, $name; |
| 1923 if (x == null || typeof x === "string" || typeof x === "number" || typeof
x === "boolean") |
| 1924 return x; |
| 1925 t1 = this.serializedObjectIds; |
| 1926 serializationId = t1.$index(0, x); |
| 1927 if (serializationId != null) |
| 1928 return ["ref", serializationId]; |
| 1929 t1.$indexSet(0, x, t1.__js_helper$_length); |
| 1930 t1 = J.getInterceptor(x); |
| 1931 if (!!t1.$isNativeByteBuffer) |
| 1932 return ["buffer", x]; |
| 1933 if (!!t1.$isNativeTypedData) |
| 1934 return ["typed", x]; |
| 1935 if (!!t1.$isJSIndexable) |
| 1936 return this.serializeJSIndexable$1(x); |
| 1937 if (!!t1.$isInternalMap) { |
| 1938 serializeTearOff = this.get$serialize(); |
| 1939 t2 = x.get$keys(); |
| 1940 t2 = H.MappedIterable_MappedIterable(t2, serializeTearOff, H.getRuntimeT
ypeArgument(t2, "IterableBase", 0), null); |
| 1941 t2 = P.List_List$from(t2, true, H.getRuntimeTypeArgument(t2, "IterableBa
se", 0)); |
| 1942 t1 = t1.get$values(x); |
| 1943 t1 = H.MappedIterable_MappedIterable(t1, serializeTearOff, H.getRuntimeT
ypeArgument(t1, "IterableBase", 0), null); |
| 1944 return ["map", t2, P.List_List$from(t1, true, H.getRuntimeTypeArgument(t
1, "IterableBase", 0))]; |
| 1945 } |
| 1946 if (!!t1.$isJSObject) |
| 1947 return this.serializeJSObject$1(x); |
| 1948 if (!!t1.$isInterceptor) |
| 1949 this.unsupported$1(x); |
| 1950 if (!!t1.$isRawReceivePort) |
| 1951 this.unsupported$2(x, "RawReceivePorts can't be transmitted:"); |
| 1952 if (!!t1.$is_NativeJsSendPort) |
| 1953 return this.serializeJsSendPort$1(x); |
| 1954 if (!!t1.$is_WorkerSendPort) |
| 1955 return this.serializeWorkerSendPort$1(x); |
| 1956 if (!!t1.$isClosure) { |
| 1957 $name = x.$name; |
| 1958 if ($name == null) |
| 1959 this.unsupported$2(x, "Closures can't be transmitted:"); |
| 1960 return ["function", $name]; |
| 1961 } |
| 1962 return ["dart", init.classIdExtractor(x), this.serializeArrayInPlace$1(ini
t.classFieldsExtractor(x))]; |
| 1963 }, "call$1", "get$serialize", 2, 0, 2], |
| 1964 unsupported$2: function(x, message) { |
| 1965 throw H.wrapException(P.UnsupportedError$(H.S(message == null ? "Can't tra
nsmit:" : message) + " " + H.S(x))); |
| 1966 }, |
| 1967 unsupported$1: function(x) { |
| 1968 return this.unsupported$2(x, null); |
| 1969 }, |
| 1970 serializeJSIndexable$1: function(indexable) { |
| 1971 var serialized = this.serializeArray$1(indexable); |
| 1972 if (!!indexable.fixed$length) |
| 1973 return ["fixed", serialized]; |
| 1974 if (!indexable.fixed$length) |
| 1975 return ["extendable", serialized]; |
| 1976 if (!indexable.immutable$list) |
| 1977 return ["mutable", serialized]; |
| 1978 if (indexable.constructor === Array) |
| 1979 return ["const", serialized]; |
| 1980 this.unsupported$2(indexable, "Can't serialize indexable: "); |
| 1981 }, |
| 1982 serializeArray$1: function(x) { |
| 1983 var serialized, i, t1; |
| 1984 serialized = []; |
| 1985 C.JSArray_methods.set$length(serialized, x.length); |
| 1986 for (i = 0; i < x.length; ++i) { |
| 1987 t1 = this.serialize$1(x[i]); |
| 1988 if (i >= serialized.length) |
| 1989 return H.ioore(serialized, i); |
| 1990 serialized[i] = t1; |
| 1991 } |
| 1992 return serialized; |
| 1993 }, |
| 1994 serializeArrayInPlace$1: function(x) { |
| 1995 var i; |
| 1996 for (i = 0; i < x.length; ++i) |
| 1997 C.JSArray_methods.$indexSet(x, i, this.serialize$1(x[i])); |
| 1998 return x; |
| 1999 }, |
| 2000 serializeJSObject$1: function(x) { |
| 2001 var keys, values, i, t1; |
| 2002 if (!!x.constructor && x.constructor !== Object) |
| 2003 this.unsupported$2(x, "Only plain JS Objects are supported:"); |
| 2004 keys = Object.keys(x); |
| 2005 values = []; |
| 2006 C.JSArray_methods.set$length(values, keys.length); |
| 2007 for (i = 0; i < keys.length; ++i) { |
| 2008 t1 = this.serialize$1(x[keys[i]]); |
| 2009 if (i >= values.length) |
| 2010 return H.ioore(values, i); |
| 2011 values[i] = t1; |
| 2012 } |
| 2013 return ["js-object", keys, values]; |
| 2014 }, |
| 2015 serializeWorkerSendPort$1: function(x) { |
| 2016 if (this._serializeSendPorts) |
| 2017 return ["sendport", x._workerId, x._isolateId, x._receivePortId]; |
| 2018 return ["raw sendport", x]; |
| 2019 }, |
| 2020 serializeJsSendPort$1: function(x) { |
| 2021 if (this._serializeSendPorts) |
| 2022 return ["sendport", init.globalState.currentManagerId, x._isolateId, x._
receivePort.get$_id()]; |
| 2023 return ["raw sendport", x]; |
| 2024 } |
| 2025 }, |
| 2026 _Deserializer: { |
| 2027 "^": "Object;_adjustSendPorts,deserializedObjects", |
| 2028 deserialize$1: [function(x) { |
| 2029 var serializationId, t1, result, classId, fields, emptyInstance; |
| 2030 if (x == null || typeof x === "string" || typeof x === "number" || typeof
x === "boolean") |
| 2031 return x; |
| 2032 if (typeof x !== "object" || x === null || x.constructor !== Array) |
| 2033 throw H.wrapException(P.ArgumentError$("Bad serialized message: " + H.S(
x))); |
| 2034 switch (C.JSArray_methods.get$first(x)) { |
| 2035 case "ref": |
| 2036 if (1 >= x.length) |
| 2037 return H.ioore(x, 1); |
| 2038 serializationId = x[1]; |
| 2039 t1 = this.deserializedObjects; |
| 2040 if (serializationId >>> 0 !== serializationId || serializationId >= t1
.length) |
| 2041 return H.ioore(t1, serializationId); |
| 2042 return t1[serializationId]; |
| 2043 case "buffer": |
| 2044 if (1 >= x.length) |
| 2045 return H.ioore(x, 1); |
| 2046 result = x[1]; |
| 2047 this.deserializedObjects.push(result); |
| 2048 return result; |
| 2049 case "typed": |
| 2050 if (1 >= x.length) |
| 2051 return H.ioore(x, 1); |
| 2052 result = x[1]; |
| 2053 this.deserializedObjects.push(result); |
| 2054 return result; |
| 2055 case "fixed": |
| 2056 if (1 >= x.length) |
| 2057 return H.ioore(x, 1); |
| 2058 result = x[1]; |
| 2059 this.deserializedObjects.push(result); |
| 2060 t1 = this.deserializeArrayInPlace$1(result); |
| 2061 t1.$builtinTypeInfo = [null]; |
| 2062 t1.fixed$length = Array; |
| 2063 return t1; |
| 2064 case "extendable": |
| 2065 if (1 >= x.length) |
| 2066 return H.ioore(x, 1); |
| 2067 result = x[1]; |
| 2068 this.deserializedObjects.push(result); |
| 2069 t1 = this.deserializeArrayInPlace$1(result); |
| 2070 t1.$builtinTypeInfo = [null]; |
| 2071 return t1; |
| 2072 case "mutable": |
| 2073 if (1 >= x.length) |
| 2074 return H.ioore(x, 1); |
| 2075 result = x[1]; |
| 2076 this.deserializedObjects.push(result); |
| 2077 return this.deserializeArrayInPlace$1(result); |
| 2078 case "const": |
| 2079 if (1 >= x.length) |
| 2080 return H.ioore(x, 1); |
| 2081 result = x[1]; |
| 2082 this.deserializedObjects.push(result); |
| 2083 t1 = this.deserializeArrayInPlace$1(result); |
| 2084 t1.$builtinTypeInfo = [null]; |
| 2085 t1.fixed$length = Array; |
| 2086 return t1; |
| 2087 case "map": |
| 2088 return this.deserializeMap$1(x); |
| 2089 case "sendport": |
| 2090 return this.deserializeSendPort$1(x); |
| 2091 case "raw sendport": |
| 2092 if (1 >= x.length) |
| 2093 return H.ioore(x, 1); |
| 2094 result = x[1]; |
| 2095 this.deserializedObjects.push(result); |
| 2096 return result; |
| 2097 case "js-object": |
| 2098 return this.deserializeJSObject$1(x); |
| 2099 case "function": |
| 2100 if (1 >= x.length) |
| 2101 return H.ioore(x, 1); |
| 2102 result = init.globalFunctions[x[1]](); |
| 2103 this.deserializedObjects.push(result); |
| 2104 return result; |
| 2105 case "dart": |
| 2106 t1 = x.length; |
| 2107 if (1 >= t1) |
| 2108 return H.ioore(x, 1); |
| 2109 classId = x[1]; |
| 2110 if (2 >= t1) |
| 2111 return H.ioore(x, 2); |
| 2112 fields = x[2]; |
| 2113 emptyInstance = init.instanceFromClassId(classId); |
| 2114 this.deserializedObjects.push(emptyInstance); |
| 2115 this.deserializeArrayInPlace$1(fields); |
| 2116 return init.initializeEmptyInstance(classId, emptyInstance, fields); |
| 2117 default: |
| 2118 throw H.wrapException("couldn't deserialize: " + H.S(x)); |
| 2119 } |
| 2120 }, "call$1", "get$deserialize", 2, 0, 2], |
| 2121 deserializeArrayInPlace$1: function(x) { |
| 2122 var t1, i, t2; |
| 2123 t1 = J.getInterceptor$asx(x); |
| 2124 i = 0; |
| 2125 while (true) { |
| 2126 t2 = t1.get$length(x); |
| 2127 if (typeof t2 !== "number") |
| 2128 return H.iae(t2); |
| 2129 if (!(i < t2)) |
| 2130 break; |
| 2131 t1.$indexSet(x, i, this.deserialize$1(t1.$index(x, i))); |
| 2132 ++i; |
| 2133 } |
| 2134 return x; |
| 2135 }, |
| 2136 deserializeMap$1: function(x) { |
| 2137 var t1, keys, values, result, t2, i; |
| 2138 t1 = x.length; |
| 2139 if (1 >= t1) |
| 2140 return H.ioore(x, 1); |
| 2141 keys = x[1]; |
| 2142 if (2 >= t1) |
| 2143 return H.ioore(x, 2); |
| 2144 values = x[2]; |
| 2145 result = P.LinkedHashMap_LinkedHashMap$_empty(null, null); |
| 2146 this.deserializedObjects.push(result); |
| 2147 keys = J.map$1$ax(keys, this.get$deserialize()).toList$0(0); |
| 2148 for (t1 = J.getInterceptor$asx(keys), t2 = J.getInterceptor$asx(values), i
= 0; i < t1.get$length(keys); ++i) { |
| 2149 if (i >= keys.length) |
| 2150 return H.ioore(keys, i); |
| 2151 result.$indexSet(0, keys[i], this.deserialize$1(t2.$index(values, i))); |
| 2152 } |
| 2153 return result; |
| 2154 }, |
| 2155 deserializeSendPort$1: function(x) { |
| 2156 var t1, managerId, isolateId, receivePortId, isolate, receivePort, result; |
| 2157 t1 = x.length; |
| 2158 if (1 >= t1) |
| 2159 return H.ioore(x, 1); |
| 2160 managerId = x[1]; |
| 2161 if (2 >= t1) |
| 2162 return H.ioore(x, 2); |
| 2163 isolateId = x[2]; |
| 2164 if (3 >= t1) |
| 2165 return H.ioore(x, 3); |
| 2166 receivePortId = x[3]; |
| 2167 if (J.$eq(managerId, init.globalState.currentManagerId)) { |
| 2168 isolate = init.globalState.isolates.$index(0, isolateId); |
| 2169 if (isolate == null) |
| 2170 return; |
| 2171 receivePort = isolate.lookup$1(receivePortId); |
| 2172 if (receivePort == null) |
| 2173 return; |
| 2174 result = new H._NativeJsSendPort(receivePort, isolateId); |
| 2175 } else |
| 2176 result = new H._WorkerSendPort(managerId, receivePortId, isolateId); |
| 2177 this.deserializedObjects.push(result); |
| 2178 return result; |
| 2179 }, |
| 2180 deserializeJSObject$1: function(x) { |
| 2181 var t1, keys, values, o, t2, i, t3; |
| 2182 t1 = x.length; |
| 2183 if (1 >= t1) |
| 2184 return H.ioore(x, 1); |
| 2185 keys = x[1]; |
| 2186 if (2 >= t1) |
| 2187 return H.ioore(x, 2); |
| 2188 values = x[2]; |
| 2189 o = {}; |
| 2190 this.deserializedObjects.push(o); |
| 2191 t1 = J.getInterceptor$asx(keys); |
| 2192 t2 = J.getInterceptor$asx(values); |
| 2193 i = 0; |
| 2194 while (true) { |
| 2195 t3 = t1.get$length(keys); |
| 2196 if (typeof t3 !== "number") |
| 2197 return H.iae(t3); |
| 2198 if (!(i < t3)) |
| 2199 break; |
| 2200 o[t1.$index(keys, i)] = this.deserialize$1(t2.$index(values, i)); |
| 2201 ++i; |
| 2202 } |
| 2203 return o; |
| 2204 } |
| 2205 } |
| 2206 }], |
| 2207 ["_js_helper", "dart:_js_helper", , H, { |
| 2208 "^": "", |
| 2209 isJsIndexable: function(object, record) { |
| 2210 var result; |
| 2211 if (record != null) { |
| 2212 result = record.x; |
| 2213 if (result != null) |
| 2214 return result; |
| 2215 } |
| 2216 return !!J.getInterceptor(object).$isJavaScriptIndexingBehavior; |
| 2217 }, |
| 2218 S: function(value) { |
| 2219 var res; |
| 2220 if (typeof value === "string") |
| 2221 return value; |
| 2222 if (typeof value === "number") { |
| 2223 if (value !== 0) |
| 2224 return "" + value; |
| 2225 } else if (true === value) |
| 2226 return "true"; |
| 2227 else if (false === value) |
| 2228 return "false"; |
| 2229 else if (value == null) |
| 2230 return "null"; |
| 2231 res = J.toString$0(value); |
| 2232 if (typeof res !== "string") |
| 2233 throw H.wrapException(P.ArgumentError$(value)); |
| 2234 return res; |
| 2235 }, |
| 2236 Primitives_objectHashCode: function(object) { |
| 2237 var hash = object.$identityHash; |
| 2238 if (hash == null) { |
| 2239 hash = Math.random() * 0x3fffffff | 0; |
| 2240 object.$identityHash = hash; |
| 2241 } |
| 2242 return hash; |
| 2243 }, |
| 2244 Primitives__throwFormatException: [function(string) { |
| 2245 throw H.wrapException(P.FormatException$(string, null, null)); |
| 2246 }, "call$1", "Primitives__throwFormatException$closure", 2, 0, 4], |
| 2247 Primitives_parseInt: function(source, radix, handleError) { |
| 2248 var match, t1, maxCharCode, digitsPart, i, t2; |
| 2249 handleError = H.Primitives__throwFormatException$closure(); |
| 2250 H.checkString(source); |
| 2251 match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); |
| 2252 if (radix == null) { |
| 2253 if (match != null) { |
| 2254 t1 = match.length; |
| 2255 if (2 >= t1) |
| 2256 return H.ioore(match, 2); |
| 2257 if (match[2] != null) |
| 2258 return parseInt(source, 16); |
| 2259 if (3 >= t1) |
| 2260 return H.ioore(match, 3); |
| 2261 if (match[3] != null) |
| 2262 return parseInt(source, 10); |
| 2263 return handleError.call$1(source); |
| 2264 } |
| 2265 radix = 10; |
| 2266 } else { |
| 2267 if (radix < 2 || radix > 36) |
| 2268 throw H.wrapException(P.RangeError$("Radix " + H.S(radix) + " not in ran
ge 2..36")); |
| 2269 if (match != null) { |
| 2270 if (radix === 10) { |
| 2271 if (3 >= match.length) |
| 2272 return H.ioore(match, 3); |
| 2273 t1 = match[3] != null; |
| 2274 } else |
| 2275 t1 = false; |
| 2276 if (t1) |
| 2277 return parseInt(source, 10); |
| 2278 if (!(radix < 10)) { |
| 2279 if (3 >= match.length) |
| 2280 return H.ioore(match, 3); |
| 2281 t1 = match[3] == null; |
| 2282 } else |
| 2283 t1 = true; |
| 2284 if (t1) { |
| 2285 maxCharCode = radix <= 10 ? 48 + radix - 1 : 97 + radix - 10 - 1; |
| 2286 if (1 >= match.length) |
| 2287 return H.ioore(match, 1); |
| 2288 digitsPart = match[1]; |
| 2289 t1 = J.getInterceptor$asx(digitsPart); |
| 2290 i = 0; |
| 2291 while (true) { |
| 2292 t2 = t1.get$length(digitsPart); |
| 2293 if (typeof t2 !== "number") |
| 2294 return H.iae(t2); |
| 2295 if (!(i < t2)) |
| 2296 break; |
| 2297 t1.codeUnitAt$1(digitsPart, 0); |
| 2298 if (C.JSString_methods.codeUnitAt$1(digitsPart, i) > maxCharCode) |
| 2299 return handleError.call$1(source); |
| 2300 ++i; |
| 2301 } |
| 2302 } |
| 2303 } |
| 2304 } |
| 2305 if (match == null) |
| 2306 return handleError.call$1(source); |
| 2307 return parseInt(source, radix); |
| 2308 }, |
| 2309 Primitives_objectTypeName: function(object) { |
| 2310 var $name, decompiled; |
| 2311 $name = C.JS_CONST_8ZY(J.getInterceptor(object)); |
| 2312 if ($name === "Object") { |
| 2313 decompiled = String(object.constructor).match(/^\s*function\s*(\S*)\s*\(/)
[1]; |
| 2314 if (typeof decompiled === "string") |
| 2315 $name = /^\w+$/.test(decompiled) ? decompiled : $name; |
| 2316 } |
| 2317 if ($name.length > 1 && C.JSString_methods.codeUnitAt$1($name, 0) === 36) |
| 2318 $name = C.JSString_methods.substring$1($name, 1); |
| 2319 return ($name + H.joinArguments(H.getRuntimeTypeInfo(object), 0, null)).repl
ace(/[^<,> ]+/g, function(m) { |
| 2320 return init.mangledGlobalNames[m] || m; |
| 2321 }); |
| 2322 }, |
| 2323 Primitives_objectToString: function(object) { |
| 2324 return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; |
| 2325 }, |
| 2326 Primitives_currentUri: function() { |
| 2327 if (!!self.location) |
| 2328 return self.location.href; |
| 2329 return; |
| 2330 }, |
| 2331 Primitives__fromCharCodeApply: function(array) { |
| 2332 var end, result, i, i0, chunkEnd; |
| 2333 end = array.length; |
| 2334 if (end <= 500) |
| 2335 return String.fromCharCode.apply(null, array); |
| 2336 for (result = "", i = 0; i < end; i = i0) { |
| 2337 i0 = i + 500; |
| 2338 chunkEnd = i0 < end ? i0 : end; |
| 2339 result += String.fromCharCode.apply(null, array.slice(i, chunkEnd)); |
| 2340 } |
| 2341 return result; |
| 2342 }, |
| 2343 Primitives_stringFromCodePoints: function(codePoints) { |
| 2344 var a, t1, i; |
| 2345 a = []; |
| 2346 a.$builtinTypeInfo = [P.$int]; |
| 2347 for (t1 = new H.ListIterator(codePoints, codePoints.length, 0, null); t1.mov
eNext$0();) { |
| 2348 i = t1._current; |
| 2349 if (typeof i !== "number" || Math.floor(i) !== i) |
| 2350 throw H.wrapException(P.ArgumentError$(i)); |
| 2351 if (i <= 65535) |
| 2352 a.push(i); |
| 2353 else if (i <= 1114111) { |
| 2354 a.push(55296 + (C.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 102
3)); |
| 2355 a.push(56320 + (i & 1023)); |
| 2356 } else |
| 2357 throw H.wrapException(P.ArgumentError$(i)); |
| 2358 } |
| 2359 return H.Primitives__fromCharCodeApply(a); |
| 2360 }, |
| 2361 Primitives_stringFromCharCodes: function(charCodes) { |
| 2362 var t1, i; |
| 2363 for (t1 = new H.ListIterator(charCodes, charCodes.length, 0, null); t1.moveN
ext$0();) { |
| 2364 i = t1._current; |
| 2365 if (typeof i !== "number" || Math.floor(i) !== i) |
| 2366 throw H.wrapException(P.ArgumentError$(i)); |
| 2367 if (i < 0) |
| 2368 throw H.wrapException(P.ArgumentError$(i)); |
| 2369 if (i > 65535) |
| 2370 return H.Primitives_stringFromCodePoints(charCodes); |
| 2371 } |
| 2372 return H.Primitives__fromCharCodeApply(charCodes); |
| 2373 }, |
| 2374 Primitives_stringFromCharCode: function(charCode) { |
| 2375 var bits; |
| 2376 if (0 <= charCode) { |
| 2377 if (charCode <= 65535) |
| 2378 return String.fromCharCode(charCode); |
| 2379 if (charCode <= 1114111) { |
| 2380 bits = charCode - 65536; |
| 2381 return String.fromCharCode((55296 | C.JSInt_methods._shrOtherPositive$1(
bits, 10)) >>> 0, 56320 | bits & 1023); |
| 2382 } |
| 2383 } |
| 2384 throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null)); |
| 2385 }, |
| 2386 Primitives_lazyAsJsDate: function(receiver) { |
| 2387 if (receiver.date === void 0) |
| 2388 receiver.date = new Date(receiver.millisecondsSinceEpoch); |
| 2389 return receiver.date; |
| 2390 }, |
| 2391 Primitives_getProperty: function(object, key) { |
| 2392 if (object == null || typeof object === "boolean" || typeof object === "numb
er" || typeof object === "string") |
| 2393 throw H.wrapException(P.ArgumentError$(object)); |
| 2394 return object[key]; |
| 2395 }, |
| 2396 Primitives_setProperty: function(object, key, value) { |
| 2397 if (object == null || typeof object === "boolean" || typeof object === "numb
er" || typeof object === "string") |
| 2398 throw H.wrapException(P.ArgumentError$(object)); |
| 2399 object[key] = value; |
| 2400 }, |
| 2401 iae: function(argument) { |
| 2402 throw H.wrapException(P.ArgumentError$(argument)); |
| 2403 }, |
| 2404 ioore: function(receiver, index) { |
| 2405 if (receiver == null) |
| 2406 J.get$length$asx(receiver); |
| 2407 if (typeof index !== "number" || Math.floor(index) !== index) |
| 2408 H.iae(index); |
| 2409 throw H.wrapException(P.RangeError$value(index, null, null)); |
| 2410 }, |
| 2411 checkInt: function(value) { |
| 2412 if (typeof value !== "number" || Math.floor(value) !== value) |
| 2413 throw H.wrapException(P.ArgumentError$(value)); |
| 2414 return value; |
| 2415 }, |
| 2416 checkString: function(value) { |
| 2417 if (typeof value !== "string") |
| 2418 throw H.wrapException(P.ArgumentError$(value)); |
| 2419 return value; |
| 2420 }, |
| 2421 wrapException: function(ex) { |
| 2422 var wrapper; |
| 2423 if (ex == null) |
| 2424 ex = new P.NullThrownError(); |
| 2425 wrapper = new Error(); |
| 2426 wrapper.dartException = ex; |
| 2427 if ("defineProperty" in Object) { |
| 2428 Object.defineProperty(wrapper, "message", {get: H.toStringWrapper}); |
| 2429 wrapper.name = ""; |
| 2430 } else |
| 2431 wrapper.toString = H.toStringWrapper; |
| 2432 return wrapper; |
| 2433 }, |
| 2434 toStringWrapper: function() { |
| 2435 return J.toString$0(this.dartException); |
| 2436 }, |
| 2437 throwExpression: function(ex) { |
| 2438 throw H.wrapException(ex); |
| 2439 }, |
| 2440 unwrapException: function(ex) { |
| 2441 var t1, message, number, ieErrorCode, t2, t3, t4, nullLiteralCall, t5, t6, t
7, t8, t9, match; |
| 2442 t1 = new H.unwrapException_saveStackTrace(ex); |
| 2443 if (ex == null) |
| 2444 return; |
| 2445 if (typeof ex !== "object") |
| 2446 return ex; |
| 2447 if ("dartException" in ex) |
| 2448 return t1.call$1(ex.dartException); |
| 2449 else if (!("message" in ex)) |
| 2450 return ex; |
| 2451 message = ex.message; |
| 2452 if ("number" in ex && typeof ex.number == "number") { |
| 2453 number = ex.number; |
| 2454 ieErrorCode = number & 65535; |
| 2455 if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) |
| 2456 switch (ieErrorCode) { |
| 2457 case 438: |
| 2458 return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " +
ieErrorCode + ")", null)); |
| 2459 case 445: |
| 2460 case 5007: |
| 2461 t2 = H.S(message) + " (Error " + ieErrorCode + ")"; |
| 2462 return t1.call$1(new H.NullError(t2, null)); |
| 2463 } |
| 2464 } |
| 2465 if (ex instanceof TypeError) { |
| 2466 t2 = $.get$TypeErrorDecoder_noSuchMethodPattern(); |
| 2467 t3 = $.get$TypeErrorDecoder_notClosurePattern(); |
| 2468 t4 = $.get$TypeErrorDecoder_nullCallPattern(); |
| 2469 nullLiteralCall = $.get$TypeErrorDecoder_nullLiteralCallPattern(); |
| 2470 t5 = $.get$TypeErrorDecoder_undefinedCallPattern(); |
| 2471 t6 = $.get$TypeErrorDecoder_undefinedLiteralCallPattern(); |
| 2472 t7 = $.get$TypeErrorDecoder_nullPropertyPattern(); |
| 2473 $.get$TypeErrorDecoder_nullLiteralPropertyPattern(); |
| 2474 t8 = $.get$TypeErrorDecoder_undefinedPropertyPattern(); |
| 2475 t9 = $.get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); |
| 2476 match = t2.matchTypeError$1(message); |
| 2477 if (match != null) |
| 2478 return t1.call$1(H.JsNoSuchMethodError$(message, match)); |
| 2479 else { |
| 2480 match = t3.matchTypeError$1(message); |
| 2481 if (match != null) { |
| 2482 match.method = "call"; |
| 2483 return t1.call$1(H.JsNoSuchMethodError$(message, match)); |
| 2484 } else { |
| 2485 match = t4.matchTypeError$1(message); |
| 2486 if (match == null) { |
| 2487 match = nullLiteralCall.matchTypeError$1(message); |
| 2488 if (match == null) { |
| 2489 match = t5.matchTypeError$1(message); |
| 2490 if (match == null) { |
| 2491 match = t6.matchTypeError$1(message); |
| 2492 if (match == null) { |
| 2493 match = t7.matchTypeError$1(message); |
| 2494 if (match == null) { |
| 2495 match = nullLiteralCall.matchTypeError$1(message); |
| 2496 if (match == null) { |
| 2497 match = t8.matchTypeError$1(message); |
| 2498 if (match == null) { |
| 2499 match = t9.matchTypeError$1(message); |
| 2500 t2 = match != null; |
| 2501 } else |
| 2502 t2 = true; |
| 2503 } else |
| 2504 t2 = true; |
| 2505 } else |
| 2506 t2 = true; |
| 2507 } else |
| 2508 t2 = true; |
| 2509 } else |
| 2510 t2 = true; |
| 2511 } else |
| 2512 t2 = true; |
| 2513 } else |
| 2514 t2 = true; |
| 2515 if (t2) { |
| 2516 t2 = match == null ? null : match.method; |
| 2517 return t1.call$1(new H.NullError(message, t2)); |
| 2518 } |
| 2519 } |
| 2520 } |
| 2521 t2 = typeof message === "string" ? message : ""; |
| 2522 return t1.call$1(new H.UnknownJsTypeError(t2)); |
| 2523 } |
| 2524 if (ex instanceof RangeError) { |
| 2525 if (typeof message === "string" && message.indexOf("call stack") !== -1) |
| 2526 return new P.StackOverflowError(); |
| 2527 return t1.call$1(new P.ArgumentError(false, null, null, null)); |
| 2528 } |
| 2529 if (typeof InternalError == "function" && ex instanceof InternalError) |
| 2530 if (typeof message === "string" && message === "too much recursion") |
| 2531 return new P.StackOverflowError(); |
| 2532 return ex; |
| 2533 }, |
| 2534 getTraceFromException: function(exception) { |
| 2535 return new H._StackTrace(exception, null); |
| 2536 }, |
| 2537 objectHashCode: function(object) { |
| 2538 if (object == null || typeof object != 'object') |
| 2539 return J.get$hashCode$(object); |
| 2540 else |
| 2541 return H.Primitives_objectHashCode(object); |
| 2542 }, |
| 2543 fillLiteralMap: function(keyValuePairs, result) { |
| 2544 var $length, index, index0, index1; |
| 2545 $length = keyValuePairs.length; |
| 2546 for (index = 0; index < $length; index = index1) { |
| 2547 index0 = index + 1; |
| 2548 index1 = index0 + 1; |
| 2549 result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); |
| 2550 } |
| 2551 return result; |
| 2552 }, |
| 2553 invokeClosure: function(closure, isolate, numberOfArguments, arg1, arg2, arg3,
arg4) { |
| 2554 var t1 = J.getInterceptor(numberOfArguments); |
| 2555 if (t1.$eq(numberOfArguments, 0)) |
| 2556 return H._callInIsolate(isolate, new H.invokeClosure_closure(closure)); |
| 2557 else if (t1.$eq(numberOfArguments, 1)) |
| 2558 return H._callInIsolate(isolate, new H.invokeClosure_closure0(closure, arg
1)); |
| 2559 else if (t1.$eq(numberOfArguments, 2)) |
| 2560 return H._callInIsolate(isolate, new H.invokeClosure_closure1(closure, arg
1, arg2)); |
| 2561 else if (t1.$eq(numberOfArguments, 3)) |
| 2562 return H._callInIsolate(isolate, new H.invokeClosure_closure2(closure, arg
1, arg2, arg3)); |
| 2563 else if (t1.$eq(numberOfArguments, 4)) |
| 2564 return H._callInIsolate(isolate, new H.invokeClosure_closure3(closure, arg
1, arg2, arg3, arg4)); |
| 2565 else |
| 2566 throw H.wrapException(P.Exception_Exception("Unsupported number of argumen
ts for wrapped closure")); |
| 2567 }, |
| 2568 convertDartClosureToJS: function(closure, arity) { |
| 2569 var $function; |
| 2570 if (closure == null) |
| 2571 return; |
| 2572 $function = closure.$identity; |
| 2573 if (!!$function) |
| 2574 return $function; |
| 2575 $function = function(closure, arity, context, invoke) { |
| 2576 return function(a1, a2, a3, a4) { |
| 2577 return invoke(closure, context, arity, a1, a2, a3, a4); |
| 2578 }; |
| 2579 }(closure, arity, init.globalState.currentContext, H.invokeClosure); |
| 2580 closure.$identity = $function; |
| 2581 return $function; |
| 2582 }, |
| 2583 Closure_fromTearOff: function(receiver, functions, reflectionInfo, isStatic, j
sArguments, propertyName) { |
| 2584 var $function, callName, functionType, $prototype, $constructor, t1, isInter
cepted, trampoline, signatureFunction, getReceiver, i, stub, stubCallName, t2; |
| 2585 $function = functions[0]; |
| 2586 $function.$stubName; |
| 2587 callName = $function.$callName; |
| 2588 if (!!J.getInterceptor(reflectionInfo).$isList) { |
| 2589 $function.$reflectionInfo = reflectionInfo; |
| 2590 functionType = H.ReflectionInfo_ReflectionInfo($function).functionType; |
| 2591 } else |
| 2592 functionType = reflectionInfo; |
| 2593 $prototype = isStatic ? Object.create(new H.TearOffClosure().constructor.pro
totype) : Object.create(new H.BoundClosure(null, null, null, null).constructor.p
rototype); |
| 2594 $prototype.$initialize = $prototype.constructor; |
| 2595 if (isStatic) |
| 2596 $constructor = function() { |
| 2597 this.$initialize(); |
| 2598 }; |
| 2599 else if (typeof dart_precompiled == "function") { |
| 2600 t1 = function(a, b, c, d) { |
| 2601 this.$initialize(a, b, c, d); |
| 2602 }; |
| 2603 $constructor = t1; |
| 2604 } else { |
| 2605 t1 = $.Closure_functionCounter; |
| 2606 $.Closure_functionCounter = J.$add$ns(t1, 1); |
| 2607 t1 = new Function("a", "b", "c", "d", "this.$initialize(a,b,c,d);" + t1); |
| 2608 $constructor = t1; |
| 2609 } |
| 2610 $prototype.constructor = $constructor; |
| 2611 $constructor.prototype = $prototype; |
| 2612 t1 = !isStatic; |
| 2613 if (t1) { |
| 2614 isIntercepted = jsArguments.length == 1 && true; |
| 2615 trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted); |
| 2616 trampoline.$reflectionInfo = reflectionInfo; |
| 2617 } else { |
| 2618 $prototype.$name = propertyName; |
| 2619 trampoline = $function; |
| 2620 isIntercepted = false; |
| 2621 } |
| 2622 if (typeof functionType == "number") |
| 2623 signatureFunction = function(s) { |
| 2624 return function() { |
| 2625 return init.metadata[s]; |
| 2626 }; |
| 2627 }(functionType); |
| 2628 else if (t1 && typeof functionType == "function") { |
| 2629 getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_s
elfOf; |
| 2630 signatureFunction = function(f, r) { |
| 2631 return function() { |
| 2632 return f.apply({$receiver: r(this)}, arguments); |
| 2633 }; |
| 2634 }(functionType, getReceiver); |
| 2635 } else |
| 2636 throw H.wrapException("Error in reflectionInfo."); |
| 2637 $prototype.$signature = signatureFunction; |
| 2638 $prototype[callName] = trampoline; |
| 2639 for (t1 = functions.length, i = 1; i < t1; ++i) { |
| 2640 stub = functions[i]; |
| 2641 stubCallName = stub.$callName; |
| 2642 if (stubCallName != null) { |
| 2643 t2 = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isInterce
pted); |
| 2644 $prototype[stubCallName] = t2; |
| 2645 } |
| 2646 } |
| 2647 $prototype["call*"] = trampoline; |
| 2648 $prototype.$requiredArgCount = $function.$requiredArgCount; |
| 2649 $prototype.$defaultValues = $function.$defaultValues; |
| 2650 return $constructor; |
| 2651 }, |
| 2652 Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) { |
| 2653 var getSelf = H.BoundClosure_selfOf; |
| 2654 switch (isSuperCall ? -1 : arity) { |
| 2655 case 0: |
| 2656 return function(n, S) { |
| 2657 return function() { |
| 2658 return S(this)[n](); |
| 2659 }; |
| 2660 }(stubName, getSelf); |
| 2661 case 1: |
| 2662 return function(n, S) { |
| 2663 return function(a) { |
| 2664 return S(this)[n](a); |
| 2665 }; |
| 2666 }(stubName, getSelf); |
| 2667 case 2: |
| 2668 return function(n, S) { |
| 2669 return function(a, b) { |
| 2670 return S(this)[n](a, b); |
| 2671 }; |
| 2672 }(stubName, getSelf); |
| 2673 case 3: |
| 2674 return function(n, S) { |
| 2675 return function(a, b, c) { |
| 2676 return S(this)[n](a, b, c); |
| 2677 }; |
| 2678 }(stubName, getSelf); |
| 2679 case 4: |
| 2680 return function(n, S) { |
| 2681 return function(a, b, c, d) { |
| 2682 return S(this)[n](a, b, c, d); |
| 2683 }; |
| 2684 }(stubName, getSelf); |
| 2685 case 5: |
| 2686 return function(n, S) { |
| 2687 return function(a, b, c, d, e) { |
| 2688 return S(this)[n](a, b, c, d, e); |
| 2689 }; |
| 2690 }(stubName, getSelf); |
| 2691 default: |
| 2692 return function(f, s) { |
| 2693 return function() { |
| 2694 return f.apply(s(this), arguments); |
| 2695 }; |
| 2696 }($function, getSelf); |
| 2697 } |
| 2698 }, |
| 2699 Closure_forwardCallTo: function(receiver, $function, isIntercepted) { |
| 2700 var stubName, arity, lookedUpFunction, t1, t2, $arguments; |
| 2701 if (isIntercepted) |
| 2702 return H.Closure_forwardInterceptedCallTo(receiver, $function); |
| 2703 stubName = $function.$stubName; |
| 2704 arity = $function.length; |
| 2705 lookedUpFunction = receiver[stubName]; |
| 2706 t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFu
nction; |
| 2707 if (typeof dart_precompiled == "function" || !t1 || arity >= 27) |
| 2708 return H.Closure_cspForwardCall(arity, !t1, stubName, $function); |
| 2709 if (arity === 0) { |
| 2710 t1 = $.BoundClosure_selfFieldNameCache; |
| 2711 if (t1 == null) { |
| 2712 t1 = H.BoundClosure_computeFieldNamed("self"); |
| 2713 $.BoundClosure_selfFieldNameCache = t1; |
| 2714 } |
| 2715 t1 = "return function(){return this." + H.S(t1) + "." + H.S(stubName) + "(
);"; |
| 2716 t2 = $.Closure_functionCounter; |
| 2717 $.Closure_functionCounter = J.$add$ns(t2, 1); |
| 2718 return new Function(t1 + H.S(t2) + "}")(); |
| 2719 } |
| 2720 $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(",
"); |
| 2721 t1 = "return function(" + $arguments + "){return this."; |
| 2722 t2 = $.BoundClosure_selfFieldNameCache; |
| 2723 if (t2 == null) { |
| 2724 t2 = H.BoundClosure_computeFieldNamed("self"); |
| 2725 $.BoundClosure_selfFieldNameCache = t2; |
| 2726 } |
| 2727 t2 = t1 + H.S(t2) + "." + H.S(stubName) + "(" + $arguments + ");"; |
| 2728 t1 = $.Closure_functionCounter; |
| 2729 $.Closure_functionCounter = J.$add$ns(t1, 1); |
| 2730 return new Function(t2 + H.S(t1) + "}")(); |
| 2731 }, |
| 2732 Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $functi
on) { |
| 2733 var getSelf, getReceiver; |
| 2734 getSelf = H.BoundClosure_selfOf; |
| 2735 getReceiver = H.BoundClosure_receiverOf; |
| 2736 switch (isSuperCall ? -1 : arity) { |
| 2737 case 0: |
| 2738 throw H.wrapException(H.RuntimeError$("Intercepted function with no argu
ments.")); |
| 2739 case 1: |
| 2740 return function(n, s, r) { |
| 2741 return function() { |
| 2742 return s(this)[n](r(this)); |
| 2743 }; |
| 2744 }($name, getSelf, getReceiver); |
| 2745 case 2: |
| 2746 return function(n, s, r) { |
| 2747 return function(a) { |
| 2748 return s(this)[n](r(this), a); |
| 2749 }; |
| 2750 }($name, getSelf, getReceiver); |
| 2751 case 3: |
| 2752 return function(n, s, r) { |
| 2753 return function(a, b) { |
| 2754 return s(this)[n](r(this), a, b); |
| 2755 }; |
| 2756 }($name, getSelf, getReceiver); |
| 2757 case 4: |
| 2758 return function(n, s, r) { |
| 2759 return function(a, b, c) { |
| 2760 return s(this)[n](r(this), a, b, c); |
| 2761 }; |
| 2762 }($name, getSelf, getReceiver); |
| 2763 case 5: |
| 2764 return function(n, s, r) { |
| 2765 return function(a, b, c, d) { |
| 2766 return s(this)[n](r(this), a, b, c, d); |
| 2767 }; |
| 2768 }($name, getSelf, getReceiver); |
| 2769 case 6: |
| 2770 return function(n, s, r) { |
| 2771 return function(a, b, c, d, e) { |
| 2772 return s(this)[n](r(this), a, b, c, d, e); |
| 2773 }; |
| 2774 }($name, getSelf, getReceiver); |
| 2775 default: |
| 2776 return function(f, s, r, a) { |
| 2777 return function() { |
| 2778 a = [r(this)]; |
| 2779 Array.prototype.push.apply(a, arguments); |
| 2780 return f.apply(s(this), a); |
| 2781 }; |
| 2782 }($function, getSelf, getReceiver); |
| 2783 } |
| 2784 }, |
| 2785 Closure_forwardInterceptedCallTo: function(receiver, $function) { |
| 2786 var selfField, t1, stubName, arity, isCsp, lookedUpFunction, t2, $arguments; |
| 2787 selfField = H.BoundClosure_selfFieldName(); |
| 2788 t1 = $.BoundClosure_receiverFieldNameCache; |
| 2789 if (t1 == null) { |
| 2790 t1 = H.BoundClosure_computeFieldNamed("receiver"); |
| 2791 $.BoundClosure_receiverFieldNameCache = t1; |
| 2792 } |
| 2793 stubName = $function.$stubName; |
| 2794 arity = $function.length; |
| 2795 isCsp = typeof dart_precompiled == "function"; |
| 2796 lookedUpFunction = receiver[stubName]; |
| 2797 t2 = $function == null ? lookedUpFunction == null : $function === lookedUpFu
nction; |
| 2798 if (isCsp || !t2 || arity >= 28) |
| 2799 return H.Closure_cspForwardInterceptedCall(arity, !t2, stubName, $function
); |
| 2800 if (arity === 1) { |
| 2801 t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubNam
e) + "(this." + H.S(t1) + ");"; |
| 2802 t2 = $.Closure_functionCounter; |
| 2803 $.Closure_functionCounter = J.$add$ns(t2, 1); |
| 2804 return new Function(t1 + H.S(t2) + "}")(); |
| 2805 } |
| 2806 $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).joi
n(","); |
| 2807 t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "
." + H.S(stubName) + "(this." + H.S(t1) + ", " + $arguments + ");"; |
| 2808 t2 = $.Closure_functionCounter; |
| 2809 $.Closure_functionCounter = J.$add$ns(t2, 1); |
| 2810 return new Function(t1 + H.S(t2) + "}")(); |
| 2811 }, |
| 2812 closureFromTearOff: function(receiver, functions, reflectionInfo, isStatic, js
Arguments, $name) { |
| 2813 var t1; |
| 2814 functions.fixed$length = Array; |
| 2815 if (!!J.getInterceptor(reflectionInfo).$isList) { |
| 2816 reflectionInfo.fixed$length = Array; |
| 2817 t1 = reflectionInfo; |
| 2818 } else |
| 2819 t1 = reflectionInfo; |
| 2820 return H.Closure_fromTearOff(receiver, functions, t1, !!isStatic, jsArgument
s, $name); |
| 2821 }, |
| 2822 intTypeCast: function(value) { |
| 2823 if (typeof value === "number" && Math.floor(value) === value || value == nul
l) |
| 2824 return value; |
| 2825 throw H.wrapException(H.CastErrorImplementation$(H.Primitives_objectTypeName
(value), "int")); |
| 2826 }, |
| 2827 throwCyclicInit: function(staticName) { |
| 2828 throw H.wrapException(new P.CyclicInitializationError("Cyclic initialization
for static " + H.S(staticName))); |
| 2829 }, |
| 2830 buildFunctionType: function(returnType, parameterTypes, optionalParameterTypes
) { |
| 2831 return new H.RuntimeFunctionType(returnType, parameterTypes, optionalParamet
erTypes, null); |
| 2832 }, |
| 2833 getDynamicRuntimeType: function() { |
| 2834 return C.C_DynamicRuntimeType; |
| 2835 }, |
| 2836 random64: function() { |
| 2837 return (Math.random() * 0x100000000 >>> 0) + (Math.random() * 0x100000000 >>
> 0) * 4294967296; |
| 2838 }, |
| 2839 setRuntimeTypeInfo: function(target, typeInfo) { |
| 2840 if (target != null) |
| 2841 target.$builtinTypeInfo = typeInfo; |
| 2842 return target; |
| 2843 }, |
| 2844 getRuntimeTypeInfo: function(target) { |
| 2845 if (target == null) |
| 2846 return; |
| 2847 return target.$builtinTypeInfo; |
| 2848 }, |
| 2849 getRuntimeTypeArguments: function(target, substitutionName) { |
| 2850 return H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeI
nfo(target)); |
| 2851 }, |
| 2852 getRuntimeTypeArgument: function(target, substitutionName, index) { |
| 2853 var $arguments = H.getRuntimeTypeArguments(target, substitutionName); |
| 2854 return $arguments == null ? null : $arguments[index]; |
| 2855 }, |
| 2856 getTypeArgumentByIndex: function(target, index) { |
| 2857 var rti = H.getRuntimeTypeInfo(target); |
| 2858 return rti == null ? null : rti[index]; |
| 2859 }, |
| 2860 runtimeTypeToString: function(type, onTypeVariable) { |
| 2861 if (type == null) |
| 2862 return "dynamic"; |
| 2863 else if (typeof type === "object" && type !== null && type.constructor === A
rray) |
| 2864 return type[0].builtin$cls + H.joinArguments(type, 1, onTypeVariable); |
| 2865 else if (typeof type == "function") |
| 2866 return type.builtin$cls; |
| 2867 else if (typeof type === "number" && Math.floor(type) === type) |
| 2868 return C.JSInt_methods.toString$0(type); |
| 2869 else |
| 2870 return; |
| 2871 }, |
| 2872 joinArguments: function(types, startIndex, onTypeVariable) { |
| 2873 var buffer, index, firstArgument, allDynamic, t1, argument; |
| 2874 if (types == null) |
| 2875 return ""; |
| 2876 buffer = new P.StringBuffer(""); |
| 2877 for (index = startIndex, firstArgument = true, allDynamic = true, t1 = ""; i
ndex < types.length; ++index) { |
| 2878 if (firstArgument) |
| 2879 firstArgument = false; |
| 2880 else |
| 2881 buffer._contents = t1 + ", "; |
| 2882 argument = types[index]; |
| 2883 if (argument != null) |
| 2884 allDynamic = false; |
| 2885 t1 = buffer._contents += H.S(H.runtimeTypeToString(argument, onTypeVariabl
e)); |
| 2886 } |
| 2887 return allDynamic ? "" : "<" + H.S(buffer) + ">"; |
| 2888 }, |
| 2889 substitute: function(substitution, $arguments) { |
| 2890 if (typeof substitution == "function") { |
| 2891 substitution = H.invokeOn(substitution, null, $arguments); |
| 2892 if (substitution == null || typeof substitution === "object" && substituti
on !== null && substitution.constructor === Array) |
| 2893 $arguments = substitution; |
| 2894 else if (typeof substitution == "function") |
| 2895 $arguments = H.invokeOn(substitution, null, $arguments); |
| 2896 } |
| 2897 return $arguments; |
| 2898 }, |
| 2899 areSubtypes: function(s, t) { |
| 2900 var len, i; |
| 2901 if (s == null || t == null) |
| 2902 return true; |
| 2903 len = s.length; |
| 2904 for (i = 0; i < len; ++i) |
| 2905 if (!H.isSubtype(s[i], t[i])) |
| 2906 return false; |
| 2907 return true; |
| 2908 }, |
| 2909 computeSignature: function(signature, context, contextName) { |
| 2910 return H.invokeOn(signature, context, H.getRuntimeTypeArguments(context, con
textName)); |
| 2911 }, |
| 2912 isSubtype: function(s, t) { |
| 2913 var t1, typeOfS, t2, typeOfT, $name, test, typeOfSPrototype, substitution; |
| 2914 if (s === t) |
| 2915 return true; |
| 2916 if (s == null || t == null) |
| 2917 return true; |
| 2918 if ("func" in t) |
| 2919 return H.isFunctionSubtype(s, t); |
| 2920 if ("func" in s) |
| 2921 return t.builtin$cls === "Function"; |
| 2922 t1 = typeof s === "object" && s !== null && s.constructor === Array; |
| 2923 typeOfS = t1 ? s[0] : s; |
| 2924 t2 = typeof t === "object" && t !== null && t.constructor === Array; |
| 2925 typeOfT = t2 ? t[0] : t; |
| 2926 $name = H.runtimeTypeToString(typeOfT, null); |
| 2927 if (typeOfT !== typeOfS) { |
| 2928 test = "$is" + H.S($name); |
| 2929 typeOfSPrototype = typeOfS.prototype; |
| 2930 if (!(test in typeOfSPrototype)) |
| 2931 return false; |
| 2932 substitution = typeOfSPrototype["$as" + H.S(H.runtimeTypeToString(typeOfT,
null))]; |
| 2933 } else |
| 2934 substitution = null; |
| 2935 if (!t1 && substitution == null || !t2) |
| 2936 return true; |
| 2937 t1 = t1 ? s.slice(1) : null; |
| 2938 t2 = t2 ? t.slice(1) : null; |
| 2939 return H.areSubtypes(H.substitute(substitution, t1), t2); |
| 2940 }, |
| 2941 areAssignable: function(s, t, allowShorter) { |
| 2942 var t1, sLength, tLength, i, t2; |
| 2943 t1 = t == null; |
| 2944 if (t1 && s == null) |
| 2945 return true; |
| 2946 if (t1) |
| 2947 return allowShorter; |
| 2948 if (s == null) |
| 2949 return false; |
| 2950 sLength = s.length; |
| 2951 tLength = t.length; |
| 2952 if (allowShorter) { |
| 2953 if (sLength < tLength) |
| 2954 return false; |
| 2955 } else if (sLength !== tLength) |
| 2956 return false; |
| 2957 for (i = 0; i < tLength; ++i) { |
| 2958 t1 = s[i]; |
| 2959 t2 = t[i]; |
| 2960 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) |
| 2961 return false; |
| 2962 } |
| 2963 return true; |
| 2964 }, |
| 2965 areAssignableMaps: function(s, t) { |
| 2966 var t1, names, i, $name, tType, sType; |
| 2967 if (t == null) |
| 2968 return true; |
| 2969 if (s == null) |
| 2970 return false; |
| 2971 t1 = Object.getOwnPropertyNames(t); |
| 2972 t1.fixed$length = Array; |
| 2973 names = t1; |
| 2974 for (t1 = names.length, i = 0; i < t1; ++i) { |
| 2975 $name = names[i]; |
| 2976 if (!Object.hasOwnProperty.call(s, $name)) |
| 2977 return false; |
| 2978 tType = t[$name]; |
| 2979 sType = s[$name]; |
| 2980 if (!(H.isSubtype(tType, sType) || H.isSubtype(sType, tType))) |
| 2981 return false; |
| 2982 } |
| 2983 return true; |
| 2984 }, |
| 2985 isFunctionSubtype: function(s, t) { |
| 2986 var sReturnType, tReturnType, sParameterTypes, tParameterTypes, sOptionalPar
ameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalP
arametersLen, tOptionalParametersLen, pos, t1, t2, tPos, sPos; |
| 2987 if (!("func" in s)) |
| 2988 return false; |
| 2989 if ("void" in s) { |
| 2990 if (!("void" in t) && "ret" in t) |
| 2991 return false; |
| 2992 } else if (!("void" in t)) { |
| 2993 sReturnType = s.ret; |
| 2994 tReturnType = t.ret; |
| 2995 if (!(H.isSubtype(sReturnType, tReturnType) || H.isSubtype(tReturnType, sR
eturnType))) |
| 2996 return false; |
| 2997 } |
| 2998 sParameterTypes = s.args; |
| 2999 tParameterTypes = t.args; |
| 3000 sOptionalParameterTypes = s.opt; |
| 3001 tOptionalParameterTypes = t.opt; |
| 3002 sParametersLen = sParameterTypes != null ? sParameterTypes.length : 0; |
| 3003 tParametersLen = tParameterTypes != null ? tParameterTypes.length : 0; |
| 3004 sOptionalParametersLen = sOptionalParameterTypes != null ? sOptionalParamete
rTypes.length : 0; |
| 3005 tOptionalParametersLen = tOptionalParameterTypes != null ? tOptionalParamete
rTypes.length : 0; |
| 3006 if (sParametersLen > tParametersLen) |
| 3007 return false; |
| 3008 if (sParametersLen + sOptionalParametersLen < tParametersLen + tOptionalPara
metersLen) |
| 3009 return false; |
| 3010 if (sParametersLen === tParametersLen) { |
| 3011 if (!H.areAssignable(sParameterTypes, tParameterTypes, false)) |
| 3012 return false; |
| 3013 if (!H.areAssignable(sOptionalParameterTypes, tOptionalParameterTypes, tru
e)) |
| 3014 return false; |
| 3015 } else { |
| 3016 for (pos = 0; pos < sParametersLen; ++pos) { |
| 3017 t1 = sParameterTypes[pos]; |
| 3018 t2 = tParameterTypes[pos]; |
| 3019 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) |
| 3020 return false; |
| 3021 } |
| 3022 for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) { |
| 3023 t1 = sOptionalParameterTypes[sPos]; |
| 3024 t2 = tParameterTypes[tPos]; |
| 3025 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) |
| 3026 return false; |
| 3027 } |
| 3028 for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) { |
| 3029 t1 = sOptionalParameterTypes[sPos]; |
| 3030 t2 = tOptionalParameterTypes[tPos]; |
| 3031 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) |
| 3032 return false; |
| 3033 } |
| 3034 } |
| 3035 return H.areAssignableMaps(s.named, t.named); |
| 3036 }, |
| 3037 invokeOn: function($function, receiver, $arguments) { |
| 3038 return $function.apply(receiver, $arguments); |
| 3039 }, |
| 3040 toStringForNativeObject: function(obj) { |
| 3041 var t1 = $.getTagFunction; |
| 3042 return "Instance of " + (t1 == null ? "<Unknown>" : t1.call$1(obj)); |
| 3043 }, |
| 3044 hashCodeForNativeObject: function(object) { |
| 3045 return H.Primitives_objectHashCode(object); |
| 3046 }, |
| 3047 defineProperty: function(obj, property, value) { |
| 3048 Object.defineProperty(obj, property, {value: value, enumerable: false, writa
ble: true, configurable: true}); |
| 3049 }, |
| 3050 lookupAndCacheInterceptor: function(obj) { |
| 3051 var tag, record, interceptor, interceptorClass, mark, t1; |
| 3052 tag = $.getTagFunction.call$1(obj); |
| 3053 record = $.dispatchRecordsForInstanceTags[tag]; |
| 3054 if (record != null) { |
| 3055 Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enum
erable: false, writable: true, configurable: true}); |
| 3056 return record.i; |
| 3057 } |
| 3058 interceptor = $.interceptorsForUncacheableTags[tag]; |
| 3059 if (interceptor != null) |
| 3060 return interceptor; |
| 3061 interceptorClass = init.interceptorsByTag[tag]; |
| 3062 if (interceptorClass == null) { |
| 3063 tag = $.alternateTagFunction.call$2(obj, tag); |
| 3064 if (tag != null) { |
| 3065 record = $.dispatchRecordsForInstanceTags[tag]; |
| 3066 if (record != null) { |
| 3067 Object.defineProperty(obj, init.dispatchPropertyName, {value: record,
enumerable: false, writable: true, configurable: true}); |
| 3068 return record.i; |
| 3069 } |
| 3070 interceptor = $.interceptorsForUncacheableTags[tag]; |
| 3071 if (interceptor != null) |
| 3072 return interceptor; |
| 3073 interceptorClass = init.interceptorsByTag[tag]; |
| 3074 } |
| 3075 } |
| 3076 if (interceptorClass == null) |
| 3077 return; |
| 3078 interceptor = interceptorClass.prototype; |
| 3079 mark = tag[0]; |
| 3080 if (mark === "!") { |
| 3081 record = H.makeLeafDispatchRecord(interceptor); |
| 3082 $.dispatchRecordsForInstanceTags[tag] = record; |
| 3083 Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enum
erable: false, writable: true, configurable: true}); |
| 3084 return record.i; |
| 3085 } |
| 3086 if (mark === "~") { |
| 3087 $.interceptorsForUncacheableTags[tag] = interceptor; |
| 3088 return interceptor; |
| 3089 } |
| 3090 if (mark === "-") { |
| 3091 t1 = H.makeLeafDispatchRecord(interceptor); |
| 3092 Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyNam
e, {value: t1, enumerable: false, writable: true, configurable: true}); |
| 3093 return t1.i; |
| 3094 } |
| 3095 if (mark === "+") |
| 3096 return H.patchInteriorProto(obj, interceptor); |
| 3097 if (mark === "*") |
| 3098 throw H.wrapException(P.UnimplementedError$(tag)); |
| 3099 if (init.leafTags[tag] === true) { |
| 3100 t1 = H.makeLeafDispatchRecord(interceptor); |
| 3101 Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyNam
e, {value: t1, enumerable: false, writable: true, configurable: true}); |
| 3102 return t1.i; |
| 3103 } else |
| 3104 return H.patchInteriorProto(obj, interceptor); |
| 3105 }, |
| 3106 patchInteriorProto: function(obj, interceptor) { |
| 3107 var proto = Object.getPrototypeOf(obj); |
| 3108 Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispat
chRecord(interceptor, proto, null, null), enumerable: false, writable: true, con
figurable: true}); |
| 3109 return interceptor; |
| 3110 }, |
| 3111 makeLeafDispatchRecord: function(interceptor) { |
| 3112 return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaS
criptIndexingBehavior); |
| 3113 }, |
| 3114 makeDefaultDispatchRecord: function(tag, interceptorClass, proto) { |
| 3115 var interceptor = interceptorClass.prototype; |
| 3116 if (init.leafTags[tag] === true) |
| 3117 return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJav
aScriptIndexingBehavior); |
| 3118 else |
| 3119 return J.makeDispatchRecord(interceptor, proto, null, null); |
| 3120 }, |
| 3121 initNativeDispatch: function() { |
| 3122 if (true === $.initNativeDispatchFlag) |
| 3123 return; |
| 3124 $.initNativeDispatchFlag = true; |
| 3125 H.initNativeDispatchContinue(); |
| 3126 }, |
| 3127 initNativeDispatchContinue: function() { |
| 3128 var map, tags, fun, i, tag, proto, record, interceptorClass; |
| 3129 $.dispatchRecordsForInstanceTags = Object.create(null); |
| 3130 $.interceptorsForUncacheableTags = Object.create(null); |
| 3131 H.initHooks(); |
| 3132 map = init.interceptorsByTag; |
| 3133 tags = Object.getOwnPropertyNames(map); |
| 3134 if (typeof window != "undefined") { |
| 3135 window; |
| 3136 fun = function() { |
| 3137 }; |
| 3138 for (i = 0; i < tags.length; ++i) { |
| 3139 tag = tags[i]; |
| 3140 proto = $.prototypeForTagFunction.call$1(tag); |
| 3141 if (proto != null) { |
| 3142 record = H.makeDefaultDispatchRecord(tag, map[tag], proto); |
| 3143 if (record != null) { |
| 3144 Object.defineProperty(proto, init.dispatchPropertyName, {value: reco
rd, enumerable: false, writable: true, configurable: true}); |
| 3145 fun.prototype = proto; |
| 3146 } |
| 3147 } |
| 3148 } |
| 3149 } |
| 3150 for (i = 0; i < tags.length; ++i) { |
| 3151 tag = tags[i]; |
| 3152 if (/^[A-Za-z_]/.test(tag)) { |
| 3153 interceptorClass = map[tag]; |
| 3154 map["!" + tag] = interceptorClass; |
| 3155 map["~" + tag] = interceptorClass; |
| 3156 map["-" + tag] = interceptorClass; |
| 3157 map["+" + tag] = interceptorClass; |
| 3158 map["*" + tag] = interceptorClass; |
| 3159 } |
| 3160 } |
| 3161 }, |
| 3162 initHooks: function() { |
| 3163 var hooks, transformers, i, transformer, getTag, getUnknownTag, prototypeFor
Tag; |
| 3164 hooks = C.JS_CONST_gkc(); |
| 3165 hooks = H.applyHooksTransformer(C.JS_CONST_0, H.applyHooksTransformer(C.JS_C
ONST_rr7, H.applyHooksTransformer(C.JS_CONST_Fs4, H.applyHooksTransformer(C.JS_C
ONST_Fs4, H.applyHooksTransformer(C.JS_CONST_gkc0, H.applyHooksTransformer(C.JS_
CONST_4hp, H.applyHooksTransformer(C.JS_CONST_QJm(C.JS_CONST_8ZY), hooks))))))); |
| 3166 if (typeof dartNativeDispatchHooksTransformer != "undefined") { |
| 3167 transformers = dartNativeDispatchHooksTransformer; |
| 3168 if (typeof transformers == "function") |
| 3169 transformers = [transformers]; |
| 3170 if (transformers.constructor == Array) |
| 3171 for (i = 0; i < transformers.length; ++i) { |
| 3172 transformer = transformers[i]; |
| 3173 if (typeof transformer == "function") |
| 3174 hooks = transformer(hooks) || hooks; |
| 3175 } |
| 3176 } |
| 3177 getTag = hooks.getTag; |
| 3178 getUnknownTag = hooks.getUnknownTag; |
| 3179 prototypeForTag = hooks.prototypeForTag; |
| 3180 $.getTagFunction = new H.initHooks_closure(getTag); |
| 3181 $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag); |
| 3182 $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag); |
| 3183 }, |
| 3184 applyHooksTransformer: function(transformer, hooks) { |
| 3185 return transformer(hooks) || hooks; |
| 3186 }, |
| 3187 allMatchesInStringUnchecked: function(needle, haystack, startIndex) { |
| 3188 var result, t1, $length, patternLength, position, endIndex; |
| 3189 result = H.setRuntimeTypeInfo([], [P.Match]); |
| 3190 t1 = J.getInterceptor$asx(haystack); |
| 3191 $length = t1.get$length(haystack); |
| 3192 patternLength = needle.length; |
| 3193 for (; true;) { |
| 3194 position = t1.indexOf$2(haystack, needle, startIndex); |
| 3195 if (position === -1) |
| 3196 break; |
| 3197 result.push(new H.StringMatch(position, haystack, needle)); |
| 3198 endIndex = position + patternLength; |
| 3199 if (endIndex === $length) |
| 3200 break; |
| 3201 else |
| 3202 startIndex = position === endIndex ? startIndex + 1 : endIndex; |
| 3203 } |
| 3204 return result; |
| 3205 }, |
| 3206 stringContainsUnchecked: function(receiver, other, startIndex) { |
| 3207 var t1; |
| 3208 if (typeof other === "string") |
| 3209 return C.JSString_methods.indexOf$2(receiver, other, startIndex) !== -1; |
| 3210 else { |
| 3211 t1 = J.getInterceptor(other); |
| 3212 if (!!t1.$isJSSyntaxRegExp) { |
| 3213 t1 = C.JSString_methods.substring$1(receiver, startIndex); |
| 3214 return other._nativeRegExp.test(H.checkString(t1)); |
| 3215 } else |
| 3216 return J.get$isNotEmpty$asx(t1.allMatches$1(other, C.JSString_methods.su
bstring$1(receiver, startIndex))); |
| 3217 } |
| 3218 }, |
| 3219 stringReplaceFirstRE: function(receiver, regexp, to, startIndex) { |
| 3220 var match, t1, start, t2; |
| 3221 match = regexp._execGlobal$2(receiver, startIndex); |
| 3222 if (match == null) |
| 3223 return receiver; |
| 3224 t1 = match._match; |
| 3225 start = t1.index; |
| 3226 t2 = t1.index; |
| 3227 if (0 >= t1.length) |
| 3228 return H.ioore(t1, 0); |
| 3229 t1 = J.get$length$asx(t1[0]); |
| 3230 if (typeof t1 !== "number") |
| 3231 return H.iae(t1); |
| 3232 return H.stringReplaceRangeUnchecked(receiver, start, t2 + t1, to); |
| 3233 }, |
| 3234 stringReplaceAllUnchecked: function(receiver, from, to) { |
| 3235 var $length, t1, i, nativeRegexp; |
| 3236 H.checkString(to); |
| 3237 if (typeof from === "string") |
| 3238 if (from === "") |
| 3239 if (receiver === "") |
| 3240 return to; |
| 3241 else { |
| 3242 $length = receiver.length; |
| 3243 for (t1 = to, i = 0; i < $length; ++i) |
| 3244 t1 = t1 + receiver[i] + to; |
| 3245 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 3246 } |
| 3247 else |
| 3248 return receiver.replace(new RegExp(from.replace(new RegExp("[[\\]{}()*+?
.\\\\^$|]", 'g'), "\\$&"), 'g'), to.replace(/\$/g, "$$$$")); |
| 3249 else if (from instanceof H.JSSyntaxRegExp) { |
| 3250 nativeRegexp = from.get$_nativeGlobalVersion(); |
| 3251 nativeRegexp.lastIndex = 0; |
| 3252 return receiver.replace(nativeRegexp, to.replace(/\$/g, "$$$$")); |
| 3253 } else { |
| 3254 if (from == null) |
| 3255 H.throwExpression(P.ArgumentError$(null)); |
| 3256 throw H.wrapException("String.replaceAll(Pattern) UNIMPLEMENTED"); |
| 3257 } |
| 3258 }, |
| 3259 stringReplaceFirstUnchecked: function(receiver, from, to, startIndex) { |
| 3260 var index, t1, matches, match; |
| 3261 if (typeof from === "string") { |
| 3262 index = C.JSString_methods.indexOf$2(receiver, from, startIndex); |
| 3263 if (index < 0) |
| 3264 return receiver; |
| 3265 return H.stringReplaceRangeUnchecked(receiver, index, index + from.length,
to); |
| 3266 } |
| 3267 t1 = J.getInterceptor(from); |
| 3268 if (!!t1.$isJSSyntaxRegExp) |
| 3269 return startIndex === 0 ? receiver.replace(from._nativeRegExp, to.replace(
/\$/g, "$$$$")) : H.stringReplaceFirstRE(receiver, from, to, startIndex); |
| 3270 if (from == null) |
| 3271 H.throwExpression(P.ArgumentError$(null)); |
| 3272 matches = J.get$iterator$ax(t1.allMatches$2(from, receiver, startIndex)); |
| 3273 if (!matches.moveNext$0()) |
| 3274 return receiver; |
| 3275 match = matches.get$current(); |
| 3276 return C.JSString_methods.substring$2(receiver, 0, J.get$start$x(match)) + t
o + C.JSString_methods.substring$1(receiver, match.get$end()); |
| 3277 }, |
| 3278 stringReplaceRangeUnchecked: function(receiver, start, end, replacement) { |
| 3279 var prefix, suffix; |
| 3280 prefix = receiver.substring(0, start); |
| 3281 suffix = receiver.substring(end); |
| 3282 return prefix + replacement + suffix; |
| 3283 }, |
| 3284 ReflectionInfo: { |
| 3285 "^": "Object;jsFunction,data>,isAccessor,requiredParameterCount,optionalPara
meterCount,areOptionalParametersNamed,functionType,cachedSortedIndices", |
| 3286 static: {ReflectionInfo_ReflectionInfo: function(jsFunction) { |
| 3287 var data, requiredParametersInfo, optionalParametersInfo; |
| 3288 data = jsFunction.$reflectionInfo; |
| 3289 if (data == null) |
| 3290 return; |
| 3291 data.fixed$length = Array; |
| 3292 data = data; |
| 3293 requiredParametersInfo = data[0]; |
| 3294 optionalParametersInfo = data[1]; |
| 3295 return new H.ReflectionInfo(jsFunction, data, (requiredParametersInfo &
1) === 1, requiredParametersInfo >> 1, optionalParametersInfo >> 1, (optionalPar
ametersInfo & 1) === 1, data[2], null); |
| 3296 }} |
| 3297 }, |
| 3298 TypeErrorDecoder: { |
| 3299 "^": "Object;_pattern,_arguments,_argumentsExpr,_expr,_method,_receiver", |
| 3300 matchTypeError$1: function(message) { |
| 3301 var match, result, t1; |
| 3302 match = new RegExp(this._pattern).exec(message); |
| 3303 if (match == null) |
| 3304 return; |
| 3305 result = Object.create(null); |
| 3306 t1 = this._arguments; |
| 3307 if (t1 !== -1) |
| 3308 result.arguments = match[t1 + 1]; |
| 3309 t1 = this._argumentsExpr; |
| 3310 if (t1 !== -1) |
| 3311 result.argumentsExpr = match[t1 + 1]; |
| 3312 t1 = this._expr; |
| 3313 if (t1 !== -1) |
| 3314 result.expr = match[t1 + 1]; |
| 3315 t1 = this._method; |
| 3316 if (t1 !== -1) |
| 3317 result.method = match[t1 + 1]; |
| 3318 t1 = this._receiver; |
| 3319 if (t1 !== -1) |
| 3320 result.receiver = match[t1 + 1]; |
| 3321 return result; |
| 3322 }, |
| 3323 static: {TypeErrorDecoder_extractPattern: function(message) { |
| 3324 var match, $arguments, argumentsExpr, expr, method, receiver; |
| 3325 message = message.replace(String({}), '$receiver$').replace(new RegExp("
[[\\]{}()*+?.\\\\^$|]", 'g'), '\\$&'); |
| 3326 match = message.match(/\\\$[a-zA-Z]+\\\$/g); |
| 3327 if (match == null) |
| 3328 match = []; |
| 3329 $arguments = match.indexOf("\\$arguments\\$"); |
| 3330 argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); |
| 3331 expr = match.indexOf("\\$expr\\$"); |
| 3332 method = match.indexOf("\\$method\\$"); |
| 3333 receiver = match.indexOf("\\$receiver\\$"); |
| 3334 return new H.TypeErrorDecoder(message.replace('\\$arguments\\$', '((?:x|
[^x])*)').replace('\\$argumentsExpr\\$', '((?:x|[^x])*)').replace('\\$expr\\$',
'((?:x|[^x])*)').replace('\\$method\\$', '((?:x|[^x])*)').replace('\\$receiver\\
$', '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); |
| 3335 }, TypeErrorDecoder_provokeCallErrorOn: function(expression) { |
| 3336 return function($expr$) { |
| 3337 var $argumentsExpr$ = '$arguments$'; |
| 3338 try { |
| 3339 $expr$.$method$($argumentsExpr$); |
| 3340 } catch (e) { |
| 3341 return e.message; |
| 3342 } |
| 3343 }(expression); |
| 3344 }, TypeErrorDecoder_provokePropertyErrorOn: function(expression) { |
| 3345 return function($expr$) { |
| 3346 try { |
| 3347 $expr$.$method$; |
| 3348 } catch (e) { |
| 3349 return e.message; |
| 3350 } |
| 3351 }(expression); |
| 3352 }} |
| 3353 }, |
| 3354 NullError: { |
| 3355 "^": "Error;_message,_method", |
| 3356 toString$0: function(_) { |
| 3357 var t1 = this._method; |
| 3358 if (t1 == null) |
| 3359 return "NullError: " + H.S(this._message); |
| 3360 return "NullError: Cannot call \"" + H.S(t1) + "\" on null"; |
| 3361 } |
| 3362 }, |
| 3363 JsNoSuchMethodError: { |
| 3364 "^": "Error;_message,_method,_receiver", |
| 3365 toString$0: function(_) { |
| 3366 var t1, t2; |
| 3367 t1 = this._method; |
| 3368 if (t1 == null) |
| 3369 return "NoSuchMethodError: " + H.S(this._message); |
| 3370 t2 = this._receiver; |
| 3371 if (t2 == null) |
| 3372 return "NoSuchMethodError: Cannot call \"" + H.S(t1) + "\" (" + H.S(this
._message) + ")"; |
| 3373 return "NoSuchMethodError: Cannot call \"" + H.S(t1) + "\" on \"" + H.S(t2
) + "\" (" + H.S(this._message) + ")"; |
| 3374 }, |
| 3375 static: {JsNoSuchMethodError$: function(_message, match) { |
| 3376 var t1, t2; |
| 3377 t1 = match == null; |
| 3378 t2 = t1 ? null : match.method; |
| 3379 t1 = t1 ? null : match.receiver; |
| 3380 return new H.JsNoSuchMethodError(_message, t2, t1); |
| 3381 }} |
| 3382 }, |
| 3383 UnknownJsTypeError: { |
| 3384 "^": "Error;_message", |
| 3385 toString$0: function(_) { |
| 3386 var t1 = this._message; |
| 3387 return C.JSString_methods.get$isEmpty(t1) ? "Error" : "Error: " + t1; |
| 3388 } |
| 3389 }, |
| 3390 unwrapException_saveStackTrace: { |
| 3391 "^": "Closure:2;ex_0", |
| 3392 call$1: function(error) { |
| 3393 if (!!J.getInterceptor(error).$isError) |
| 3394 if (error.$thrownJsError == null) |
| 3395 error.$thrownJsError = this.ex_0; |
| 3396 return error; |
| 3397 } |
| 3398 }, |
| 3399 _StackTrace: { |
| 3400 "^": "Object;_exception,__js_helper$_trace", |
| 3401 toString$0: function(_) { |
| 3402 var t1, trace; |
| 3403 t1 = this.__js_helper$_trace; |
| 3404 if (t1 != null) |
| 3405 return t1; |
| 3406 t1 = this._exception; |
| 3407 trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; |
| 3408 t1 = trace == null ? "" : trace; |
| 3409 this.__js_helper$_trace = t1; |
| 3410 return t1; |
| 3411 } |
| 3412 }, |
| 3413 invokeClosure_closure: { |
| 3414 "^": "Closure:0;closure_0", |
| 3415 call$0: function() { |
| 3416 return this.closure_0.call$0(); |
| 3417 } |
| 3418 }, |
| 3419 invokeClosure_closure0: { |
| 3420 "^": "Closure:0;closure_1,arg1_2", |
| 3421 call$0: function() { |
| 3422 return this.closure_1.call$1(this.arg1_2); |
| 3423 } |
| 3424 }, |
| 3425 invokeClosure_closure1: { |
| 3426 "^": "Closure:0;closure_3,arg1_4,arg2_5", |
| 3427 call$0: function() { |
| 3428 return this.closure_3.call$2(this.arg1_4, this.arg2_5); |
| 3429 } |
| 3430 }, |
| 3431 invokeClosure_closure2: { |
| 3432 "^": "Closure:0;closure_6,arg1_7,arg2_8,arg3_9", |
| 3433 call$0: function() { |
| 3434 return this.closure_6.call$3(this.arg1_7, this.arg2_8, this.arg3_9); |
| 3435 } |
| 3436 }, |
| 3437 invokeClosure_closure3: { |
| 3438 "^": "Closure:0;closure_10,arg1_11,arg2_12,arg3_13,arg4_14", |
| 3439 call$0: function() { |
| 3440 return this.closure_10.call$4(this.arg1_11, this.arg2_12, this.arg3_13, th
is.arg4_14); |
| 3441 } |
| 3442 }, |
| 3443 Closure: { |
| 3444 "^": "Object;", |
| 3445 toString$0: function(_) { |
| 3446 return "Closure"; |
| 3447 }, |
| 3448 get$$call: function() { |
| 3449 return this; |
| 3450 } |
| 3451 }, |
| 3452 TearOffClosure: { |
| 3453 "^": "Closure;" |
| 3454 }, |
| 3455 BoundClosure: { |
| 3456 "^": "TearOffClosure;_self,_target,_receiver,__js_helper$_name", |
| 3457 $eq: function(_, other) { |
| 3458 if (other == null) |
| 3459 return false; |
| 3460 if (this === other) |
| 3461 return true; |
| 3462 if (!(other instanceof H.BoundClosure)) |
| 3463 return false; |
| 3464 return this._self === other._self && this._target === other._target && thi
s._receiver === other._receiver; |
| 3465 }, |
| 3466 get$hashCode: function(_) { |
| 3467 var t1, receiverHashCode; |
| 3468 t1 = this._receiver; |
| 3469 if (t1 == null) |
| 3470 receiverHashCode = H.Primitives_objectHashCode(this._self); |
| 3471 else |
| 3472 receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Prim
itives_objectHashCode(t1); |
| 3473 return (receiverHashCode ^ H.Primitives_objectHashCode(this._target)) >>>
0; |
| 3474 }, |
| 3475 static: {BoundClosure_selfOf: function(closure) { |
| 3476 return closure._self; |
| 3477 }, BoundClosure_receiverOf: function(closure) { |
| 3478 return closure._receiver; |
| 3479 }, BoundClosure_selfFieldName: function() { |
| 3480 var t1 = $.BoundClosure_selfFieldNameCache; |
| 3481 if (t1 == null) { |
| 3482 t1 = H.BoundClosure_computeFieldNamed("self"); |
| 3483 $.BoundClosure_selfFieldNameCache = t1; |
| 3484 } |
| 3485 return t1; |
| 3486 }, BoundClosure_computeFieldNamed: function(fieldName) { |
| 3487 var template, t1, names, i, $name; |
| 3488 template = new H.BoundClosure("self", "target", "receiver", "name"); |
| 3489 t1 = Object.getOwnPropertyNames(template); |
| 3490 t1.fixed$length = Array; |
| 3491 names = t1; |
| 3492 for (t1 = names.length, i = 0; i < t1; ++i) { |
| 3493 $name = names[i]; |
| 3494 if (template[$name] === fieldName) |
| 3495 return $name; |
| 3496 } |
| 3497 }} |
| 3498 }, |
| 3499 CastErrorImplementation: { |
| 3500 "^": "Error;message>", |
| 3501 toString$0: function(_) { |
| 3502 return this.message; |
| 3503 }, |
| 3504 static: {CastErrorImplementation$: function(actualType, expectedType) { |
| 3505 return new H.CastErrorImplementation("CastError: Casting value of type "
+ H.S(actualType) + " to incompatible type " + H.S(expectedType)); |
| 3506 }} |
| 3507 }, |
| 3508 RuntimeError: { |
| 3509 "^": "Error;message>", |
| 3510 toString$0: function(_) { |
| 3511 return "RuntimeError: " + H.S(this.message); |
| 3512 }, |
| 3513 static: {RuntimeError$: function(message) { |
| 3514 return new H.RuntimeError(message); |
| 3515 }} |
| 3516 }, |
| 3517 RuntimeType: { |
| 3518 "^": "Object;" |
| 3519 }, |
| 3520 RuntimeFunctionType: { |
| 3521 "^": "RuntimeType;returnType,parameterTypes,optionalParameterTypes,namedPara
meters", |
| 3522 _isTest$1: function(expression) { |
| 3523 var functionTypeObject = this._extractFunctionTypeObjectFrom$1(expression)
; |
| 3524 return functionTypeObject == null ? false : H.isFunctionSubtype(functionTy
peObject, this.toRti$0()); |
| 3525 }, |
| 3526 _extractFunctionTypeObjectFrom$1: function(o) { |
| 3527 var interceptor = J.getInterceptor(o); |
| 3528 return "$signature" in interceptor ? interceptor.$signature() : null; |
| 3529 }, |
| 3530 toRti$0: function() { |
| 3531 var result, t1, t2, namedRti, keys, i, $name; |
| 3532 result = {func: "dynafunc"}; |
| 3533 t1 = this.returnType; |
| 3534 t2 = J.getInterceptor(t1); |
| 3535 if (!!t2.$isVoidRuntimeType) |
| 3536 result.void = true; |
| 3537 else if (!t2.$isDynamicRuntimeType) |
| 3538 result.ret = t1.toRti$0(); |
| 3539 t1 = this.parameterTypes; |
| 3540 if (t1 != null && t1.length !== 0) |
| 3541 result.args = H.RuntimeFunctionType_listToRti(t1); |
| 3542 t1 = this.optionalParameterTypes; |
| 3543 if (t1 != null && t1.length !== 0) |
| 3544 result.opt = H.RuntimeFunctionType_listToRti(t1); |
| 3545 t1 = this.namedParameters; |
| 3546 if (t1 != null) { |
| 3547 namedRti = Object.create(null); |
| 3548 keys = H.extractKeys(t1); |
| 3549 for (t2 = keys.length, i = 0; i < t2; ++i) { |
| 3550 $name = keys[i]; |
| 3551 namedRti[$name] = t1[$name].toRti$0(); |
| 3552 } |
| 3553 result.named = namedRti; |
| 3554 } |
| 3555 return result; |
| 3556 }, |
| 3557 toString$0: function(_) { |
| 3558 var t1, t2, result, needsComma, i, type, keys, $name; |
| 3559 t1 = this.parameterTypes; |
| 3560 if (t1 != null) |
| 3561 for (t2 = t1.length, result = "(", needsComma = false, i = 0; i < t2; ++
i, needsComma = true) { |
| 3562 type = t1[i]; |
| 3563 if (needsComma) |
| 3564 result += ", "; |
| 3565 result += H.S(type); |
| 3566 } |
| 3567 else { |
| 3568 result = "("; |
| 3569 needsComma = false; |
| 3570 } |
| 3571 t1 = this.optionalParameterTypes; |
| 3572 if (t1 != null && t1.length !== 0) { |
| 3573 result = (needsComma ? result + ", " : result) + "["; |
| 3574 for (t2 = t1.length, needsComma = false, i = 0; i < t2; ++i, needsComma
= true) { |
| 3575 type = t1[i]; |
| 3576 if (needsComma) |
| 3577 result += ", "; |
| 3578 result += H.S(type); |
| 3579 } |
| 3580 result += "]"; |
| 3581 } else { |
| 3582 t1 = this.namedParameters; |
| 3583 if (t1 != null) { |
| 3584 result = (needsComma ? result + ", " : result) + "{"; |
| 3585 keys = H.extractKeys(t1); |
| 3586 for (t2 = keys.length, needsComma = false, i = 0; i < t2; ++i, needsCo
mma = true) { |
| 3587 $name = keys[i]; |
| 3588 if (needsComma) |
| 3589 result += ", "; |
| 3590 result += H.S(t1[$name].toRti$0()) + " " + $name; |
| 3591 } |
| 3592 result += "}"; |
| 3593 } |
| 3594 } |
| 3595 return result + (") -> " + H.S(this.returnType)); |
| 3596 }, |
| 3597 static: {RuntimeFunctionType_listToRti: function(list) { |
| 3598 var result, t1, i; |
| 3599 list = list; |
| 3600 result = []; |
| 3601 for (t1 = list.length, i = 0; i < t1; ++i) |
| 3602 result.push(list[i].toRti$0()); |
| 3603 return result; |
| 3604 }} |
| 3605 }, |
| 3606 DynamicRuntimeType: { |
| 3607 "^": "RuntimeType;", |
| 3608 toString$0: function(_) { |
| 3609 return "dynamic"; |
| 3610 }, |
| 3611 toRti$0: function() { |
| 3612 return; |
| 3613 } |
| 3614 }, |
| 3615 JsLinkedHashMap: { |
| 3616 "^": "Object;__js_helper$_length,_strings,_nums,_rest,_first,_last,_modifica
tions", |
| 3617 get$length: function(_) { |
| 3618 return this.__js_helper$_length; |
| 3619 }, |
| 3620 get$isEmpty: function(_) { |
| 3621 return this.__js_helper$_length === 0; |
| 3622 }, |
| 3623 get$isNotEmpty: function(_) { |
| 3624 return this.__js_helper$_length !== 0; |
| 3625 }, |
| 3626 get$keys: function() { |
| 3627 return H.setRuntimeTypeInfo(new H.LinkedHashMapKeyIterable(this), [H.getTy
peArgumentByIndex(this, 0)]); |
| 3628 }, |
| 3629 get$values: function(_) { |
| 3630 return H.MappedIterable_MappedIterable(H.setRuntimeTypeInfo(new H.LinkedHa
shMapKeyIterable(this), [H.getTypeArgumentByIndex(this, 0)]), new H.JsLinkedHash
Map_values_closure(this), H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentBy
Index(this, 1)); |
| 3631 }, |
| 3632 containsKey$1: function(key) { |
| 3633 var strings, nums; |
| 3634 if (typeof key === "string" && key !== "__proto__") { |
| 3635 strings = this._strings; |
| 3636 if (strings == null) |
| 3637 return false; |
| 3638 return strings[key] != null; |
| 3639 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 3640 nums = this._nums; |
| 3641 if (nums == null) |
| 3642 return false; |
| 3643 return nums[key] != null; |
| 3644 } else |
| 3645 return this.internalContainsKey$1(key); |
| 3646 }, |
| 3647 internalContainsKey$1: function(key) { |
| 3648 var rest = this._rest; |
| 3649 if (rest == null) |
| 3650 return false; |
| 3651 return this.internalFindBucketIndex$2(rest[this.internalComputeHashCode$1(
key)], key) >= 0; |
| 3652 }, |
| 3653 $index: function(_, key) { |
| 3654 var strings, cell, nums; |
| 3655 if (typeof key === "string" && key !== "__proto__") { |
| 3656 strings = this._strings; |
| 3657 if (strings == null) |
| 3658 return; |
| 3659 cell = strings[key]; |
| 3660 return cell == null ? null : cell.get$hashMapCellValue(); |
| 3661 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 3662 nums = this._nums; |
| 3663 if (nums == null) |
| 3664 return; |
| 3665 cell = nums[key]; |
| 3666 return cell == null ? null : cell.get$hashMapCellValue(); |
| 3667 } else |
| 3668 return this.internalGet$1(key); |
| 3669 }, |
| 3670 internalGet$1: function(key) { |
| 3671 var rest, bucket, index; |
| 3672 rest = this._rest; |
| 3673 if (rest == null) |
| 3674 return; |
| 3675 bucket = rest[this.internalComputeHashCode$1(key)]; |
| 3676 index = this.internalFindBucketIndex$2(bucket, key); |
| 3677 if (index < 0) |
| 3678 return; |
| 3679 return bucket[index].get$hashMapCellValue(); |
| 3680 }, |
| 3681 $indexSet: function(_, key, value) { |
| 3682 var strings, nums; |
| 3683 if (typeof key === "string" && key !== "__proto__") { |
| 3684 strings = this._strings; |
| 3685 if (strings == null) { |
| 3686 strings = H.JsLinkedHashMap__newHashTable(); |
| 3687 this._strings = strings; |
| 3688 } |
| 3689 this._addHashTableEntry$3(strings, key, value); |
| 3690 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 3691 nums = this._nums; |
| 3692 if (nums == null) { |
| 3693 nums = H.JsLinkedHashMap__newHashTable(); |
| 3694 this._nums = nums; |
| 3695 } |
| 3696 this._addHashTableEntry$3(nums, key, value); |
| 3697 } else |
| 3698 this.internalSet$2(key, value); |
| 3699 }, |
| 3700 internalSet$2: function(key, value) { |
| 3701 var rest, hash, bucket, index; |
| 3702 rest = this._rest; |
| 3703 if (rest == null) { |
| 3704 rest = H.JsLinkedHashMap__newHashTable(); |
| 3705 this._rest = rest; |
| 3706 } |
| 3707 hash = this.internalComputeHashCode$1(key); |
| 3708 bucket = rest[hash]; |
| 3709 if (bucket == null) |
| 3710 rest[hash] = [this._newLinkedCell$2(key, value)]; |
| 3711 else { |
| 3712 index = this.internalFindBucketIndex$2(bucket, key); |
| 3713 if (index >= 0) |
| 3714 bucket[index].set$hashMapCellValue(value); |
| 3715 else |
| 3716 bucket.push(this._newLinkedCell$2(key, value)); |
| 3717 } |
| 3718 }, |
| 3719 remove$1: function(_, key) { |
| 3720 if (typeof key === "string" && key !== "__proto__") |
| 3721 return this._removeHashTableEntry$2(this._strings, key); |
| 3722 else if (typeof key === "number" && (key & 0x3ffffff) === key) |
| 3723 return this._removeHashTableEntry$2(this._nums, key); |
| 3724 else |
| 3725 return this.internalRemove$1(key); |
| 3726 }, |
| 3727 internalRemove$1: function(key) { |
| 3728 var rest, bucket, index, cell; |
| 3729 rest = this._rest; |
| 3730 if (rest == null) |
| 3731 return; |
| 3732 bucket = rest[this.internalComputeHashCode$1(key)]; |
| 3733 index = this.internalFindBucketIndex$2(bucket, key); |
| 3734 if (index < 0) |
| 3735 return; |
| 3736 cell = bucket.splice(index, 1)[0]; |
| 3737 this._unlinkCell$1(cell); |
| 3738 return cell.get$hashMapCellValue(); |
| 3739 }, |
| 3740 clear$0: function(_) { |
| 3741 if (this.__js_helper$_length > 0) { |
| 3742 this._last = null; |
| 3743 this._first = null; |
| 3744 this._rest = null; |
| 3745 this._nums = null; |
| 3746 this._strings = null; |
| 3747 this.__js_helper$_length = 0; |
| 3748 this._modifications = this._modifications + 1 & 67108863; |
| 3749 } |
| 3750 }, |
| 3751 forEach$1: function(_, action) { |
| 3752 var cell, modifications; |
| 3753 cell = this._first; |
| 3754 modifications = this._modifications; |
| 3755 for (; cell != null;) { |
| 3756 action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); |
| 3757 if (modifications !== this._modifications) |
| 3758 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 3759 cell = cell._next; |
| 3760 } |
| 3761 }, |
| 3762 _addHashTableEntry$3: function(table, key, value) { |
| 3763 var cell = table[key]; |
| 3764 if (cell == null) |
| 3765 table[key] = this._newLinkedCell$2(key, value); |
| 3766 else |
| 3767 cell.set$hashMapCellValue(value); |
| 3768 }, |
| 3769 _removeHashTableEntry$2: function(table, key) { |
| 3770 var cell; |
| 3771 if (table == null) |
| 3772 return; |
| 3773 cell = table[key]; |
| 3774 if (cell == null) |
| 3775 return; |
| 3776 this._unlinkCell$1(cell); |
| 3777 delete table[key]; |
| 3778 return cell.get$hashMapCellValue(); |
| 3779 }, |
| 3780 _newLinkedCell$2: function(key, value) { |
| 3781 var cell, last; |
| 3782 cell = new H.LinkedHashMapCell(key, value, null, null); |
| 3783 if (this._first == null) { |
| 3784 this._last = cell; |
| 3785 this._first = cell; |
| 3786 } else { |
| 3787 last = this._last; |
| 3788 cell._previous = last; |
| 3789 last._next = cell; |
| 3790 this._last = cell; |
| 3791 } |
| 3792 ++this.__js_helper$_length; |
| 3793 this._modifications = this._modifications + 1 & 67108863; |
| 3794 return cell; |
| 3795 }, |
| 3796 _unlinkCell$1: function(cell) { |
| 3797 var previous, next; |
| 3798 previous = cell.get$_previous(); |
| 3799 next = cell._next; |
| 3800 if (previous == null) |
| 3801 this._first = next; |
| 3802 else |
| 3803 previous._next = next; |
| 3804 if (next == null) |
| 3805 this._last = previous; |
| 3806 else |
| 3807 next._previous = previous; |
| 3808 --this.__js_helper$_length; |
| 3809 this._modifications = this._modifications + 1 & 67108863; |
| 3810 }, |
| 3811 internalComputeHashCode$1: function(key) { |
| 3812 return J.get$hashCode$(key) & 0x3ffffff; |
| 3813 }, |
| 3814 internalFindBucketIndex$2: function(bucket, key) { |
| 3815 var $length, i; |
| 3816 if (bucket == null) |
| 3817 return -1; |
| 3818 $length = bucket.length; |
| 3819 for (i = 0; i < $length; ++i) |
| 3820 if (J.$eq(bucket[i].get$hashMapCellKey(), key)) |
| 3821 return i; |
| 3822 return -1; |
| 3823 }, |
| 3824 toString$0: function(_) { |
| 3825 return P.Maps_mapToString(this); |
| 3826 }, |
| 3827 $isInternalMap: 1, |
| 3828 $isMap: 1, |
| 3829 static: {JsLinkedHashMap__newHashTable: function() { |
| 3830 var table = Object.create(null); |
| 3831 table["<non-identifier-key>"] = table; |
| 3832 delete table["<non-identifier-key>"]; |
| 3833 return table; |
| 3834 }} |
| 3835 }, |
| 3836 JsLinkedHashMap_values_closure: { |
| 3837 "^": "Closure:2;this_0", |
| 3838 call$1: function(each) { |
| 3839 return this.this_0.$index(0, each); |
| 3840 } |
| 3841 }, |
| 3842 LinkedHashMapCell: { |
| 3843 "^": "Object;hashMapCellKey<,hashMapCellValue@,_next,_previous<" |
| 3844 }, |
| 3845 LinkedHashMapKeyIterable: { |
| 3846 "^": "IterableBase;__js_helper$_map", |
| 3847 get$length: function(_) { |
| 3848 return this.__js_helper$_map.__js_helper$_length; |
| 3849 }, |
| 3850 get$isEmpty: function(_) { |
| 3851 return this.__js_helper$_map.__js_helper$_length === 0; |
| 3852 }, |
| 3853 get$iterator: function(_) { |
| 3854 var t1, t2; |
| 3855 t1 = this.__js_helper$_map; |
| 3856 t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, null, null); |
| 3857 t2._cell = t1._first; |
| 3858 return t2; |
| 3859 }, |
| 3860 contains$1: function(_, element) { |
| 3861 return this.__js_helper$_map.containsKey$1(element); |
| 3862 }, |
| 3863 forEach$1: function(_, f) { |
| 3864 var t1, cell, modifications; |
| 3865 t1 = this.__js_helper$_map; |
| 3866 cell = t1._first; |
| 3867 modifications = t1._modifications; |
| 3868 for (; cell != null;) { |
| 3869 f.call$1(cell.hashMapCellKey); |
| 3870 if (modifications !== t1._modifications) |
| 3871 throw H.wrapException(P.ConcurrentModificationError$(t1)); |
| 3872 cell = cell._next; |
| 3873 } |
| 3874 }, |
| 3875 $isEfficientLength: 1 |
| 3876 }, |
| 3877 LinkedHashMapKeyIterator: { |
| 3878 "^": "Object;__js_helper$_map,_modifications,_cell,__js_helper$_current", |
| 3879 get$current: function() { |
| 3880 return this.__js_helper$_current; |
| 3881 }, |
| 3882 moveNext$0: function() { |
| 3883 var t1 = this.__js_helper$_map; |
| 3884 if (this._modifications !== t1._modifications) |
| 3885 throw H.wrapException(P.ConcurrentModificationError$(t1)); |
| 3886 else { |
| 3887 t1 = this._cell; |
| 3888 if (t1 == null) { |
| 3889 this.__js_helper$_current = null; |
| 3890 return false; |
| 3891 } else { |
| 3892 this.__js_helper$_current = t1.hashMapCellKey; |
| 3893 this._cell = t1._next; |
| 3894 return true; |
| 3895 } |
| 3896 } |
| 3897 } |
| 3898 }, |
| 3899 initHooks_closure: { |
| 3900 "^": "Closure:2;getTag_0", |
| 3901 call$1: function(o) { |
| 3902 return this.getTag_0(o); |
| 3903 } |
| 3904 }, |
| 3905 initHooks_closure0: { |
| 3906 "^": "Closure:3;getUnknownTag_1", |
| 3907 call$2: function(o, tag) { |
| 3908 return this.getUnknownTag_1(o, tag); |
| 3909 } |
| 3910 }, |
| 3911 initHooks_closure1: { |
| 3912 "^": "Closure:4;prototypeForTag_2", |
| 3913 call$1: function(tag) { |
| 3914 return this.prototypeForTag_2(tag); |
| 3915 } |
| 3916 }, |
| 3917 JSSyntaxRegExp: { |
| 3918 "^": "Object;pattern,_nativeRegExp,_nativeGlobalRegExp,_nativeAnchoredRegExp
", |
| 3919 toString$0: function(_) { |
| 3920 return "RegExp/" + this.pattern + "/"; |
| 3921 }, |
| 3922 get$_nativeGlobalVersion: function() { |
| 3923 var t1 = this._nativeGlobalRegExp; |
| 3924 if (t1 != null) |
| 3925 return t1; |
| 3926 t1 = this._nativeRegExp; |
| 3927 t1 = H.JSSyntaxRegExp_makeNative(this.pattern, t1.multiline, !t1.ignoreCas
e, true); |
| 3928 this._nativeGlobalRegExp = t1; |
| 3929 return t1; |
| 3930 }, |
| 3931 get$_nativeAnchoredVersion: function() { |
| 3932 var t1 = this._nativeAnchoredRegExp; |
| 3933 if (t1 != null) |
| 3934 return t1; |
| 3935 t1 = this._nativeRegExp; |
| 3936 t1 = H.JSSyntaxRegExp_makeNative(this.pattern + "|()", t1.multiline, !t1.i
gnoreCase, true); |
| 3937 this._nativeAnchoredRegExp = t1; |
| 3938 return t1; |
| 3939 }, |
| 3940 firstMatch$1: function(string) { |
| 3941 var m = this._nativeRegExp.exec(H.checkString(string)); |
| 3942 if (m == null) |
| 3943 return; |
| 3944 return H._MatchImplementation$(this, m); |
| 3945 }, |
| 3946 allMatches$2: function(_, string, start) { |
| 3947 H.checkString(string); |
| 3948 H.checkInt(start); |
| 3949 if (start > string.length) |
| 3950 throw H.wrapException(P.RangeError$range(start, 0, string.length, null,
null)); |
| 3951 return new H._AllMatchesIterable(this, string, start); |
| 3952 }, |
| 3953 allMatches$1: function($receiver, string) { |
| 3954 return this.allMatches$2($receiver, string, 0); |
| 3955 }, |
| 3956 _execGlobal$2: function(string, start) { |
| 3957 var regexp, match; |
| 3958 regexp = this.get$_nativeGlobalVersion(); |
| 3959 regexp.lastIndex = start; |
| 3960 match = regexp.exec(string); |
| 3961 if (match == null) |
| 3962 return; |
| 3963 return H._MatchImplementation$(this, match); |
| 3964 }, |
| 3965 _execAnchored$2: function(string, start) { |
| 3966 var regexp, match, t1, t2; |
| 3967 regexp = this.get$_nativeAnchoredVersion(); |
| 3968 regexp.lastIndex = start; |
| 3969 match = regexp.exec(string); |
| 3970 if (match == null) |
| 3971 return; |
| 3972 t1 = match.length; |
| 3973 t2 = t1 - 1; |
| 3974 if (t2 < 0) |
| 3975 return H.ioore(match, t2); |
| 3976 if (match[t2] != null) |
| 3977 return; |
| 3978 C.JSArray_methods.set$length(match, t2); |
| 3979 return H._MatchImplementation$(this, match); |
| 3980 }, |
| 3981 matchAsPrefix$2: function(_, string, start) { |
| 3982 if (start > string.length) |
| 3983 throw H.wrapException(P.RangeError$range(start, 0, string.length, null,
null)); |
| 3984 return this._execAnchored$2(string, start); |
| 3985 }, |
| 3986 $isRegExp: 1, |
| 3987 static: {JSSyntaxRegExp_makeNative: function(source, multiLine, caseSensitiv
e, global) { |
| 3988 var m, i, g, regexp, errorMessage; |
| 3989 H.checkString(source); |
| 3990 m = multiLine ? "m" : ""; |
| 3991 i = caseSensitive ? "" : "i"; |
| 3992 g = global ? "g" : ""; |
| 3993 regexp = function() { |
| 3994 try { |
| 3995 return new RegExp(source, m + i + g); |
| 3996 } catch (e) { |
| 3997 return e; |
| 3998 } |
| 3999 }(); |
| 4000 if (regexp instanceof RegExp) |
| 4001 return regexp; |
| 4002 errorMessage = String(regexp); |
| 4003 throw H.wrapException(P.FormatException$("Illegal RegExp pattern: " + so
urce + ", " + errorMessage, null, null)); |
| 4004 }} |
| 4005 }, |
| 4006 _MatchImplementation: { |
| 4007 "^": "Object;pattern,_match", |
| 4008 get$start: function(_) { |
| 4009 return this._match.index; |
| 4010 }, |
| 4011 get$end: function() { |
| 4012 var t1, t2; |
| 4013 t1 = this._match; |
| 4014 t2 = t1.index; |
| 4015 if (0 >= t1.length) |
| 4016 return H.ioore(t1, 0); |
| 4017 t1 = J.get$length$asx(t1[0]); |
| 4018 if (typeof t1 !== "number") |
| 4019 return H.iae(t1); |
| 4020 return t2 + t1; |
| 4021 }, |
| 4022 $index: function(_, index) { |
| 4023 var t1 = this._match; |
| 4024 if (index >>> 0 !== index || index >= t1.length) |
| 4025 return H.ioore(t1, index); |
| 4026 return t1[index]; |
| 4027 }, |
| 4028 _MatchImplementation$2: function(pattern, _match) { |
| 4029 }, |
| 4030 static: {_MatchImplementation$: function(pattern, _match) { |
| 4031 var t1 = new H._MatchImplementation(pattern, _match); |
| 4032 t1._MatchImplementation$2(pattern, _match); |
| 4033 return t1; |
| 4034 }} |
| 4035 }, |
| 4036 _AllMatchesIterable: { |
| 4037 "^": "IterableBase;_re,_string,_start", |
| 4038 get$iterator: function(_) { |
| 4039 return new H._AllMatchesIterator(this._re, this._string, this._start, null
); |
| 4040 }, |
| 4041 $asIterableBase: function() { |
| 4042 return [P.Match]; |
| 4043 } |
| 4044 }, |
| 4045 _AllMatchesIterator: { |
| 4046 "^": "Object;_regExp,_string,_nextIndex,__js_helper$_current", |
| 4047 get$current: function() { |
| 4048 return this.__js_helper$_current; |
| 4049 }, |
| 4050 moveNext$0: function() { |
| 4051 var t1, t2, match, t3, nextIndex; |
| 4052 t1 = this._string; |
| 4053 if (t1 == null) |
| 4054 return false; |
| 4055 t2 = this._nextIndex; |
| 4056 if (t2 <= t1.length) { |
| 4057 match = this._regExp._execGlobal$2(t1, t2); |
| 4058 if (match != null) { |
| 4059 this.__js_helper$_current = match; |
| 4060 t1 = match._match; |
| 4061 t2 = t1.index; |
| 4062 if (0 >= t1.length) |
| 4063 return H.ioore(t1, 0); |
| 4064 t3 = J.get$length$asx(t1[0]); |
| 4065 if (typeof t3 !== "number") |
| 4066 return H.iae(t3); |
| 4067 nextIndex = t2 + t3; |
| 4068 this._nextIndex = t1.index === nextIndex ? nextIndex + 1 : nextIndex; |
| 4069 return true; |
| 4070 } |
| 4071 } |
| 4072 this.__js_helper$_current = null; |
| 4073 this._string = null; |
| 4074 return false; |
| 4075 } |
| 4076 }, |
| 4077 StringMatch: { |
| 4078 "^": "Object;start>,input,pattern", |
| 4079 get$end: function() { |
| 4080 return this.start + this.pattern.length; |
| 4081 }, |
| 4082 $index: function(_, g) { |
| 4083 if (g !== 0) |
| 4084 H.throwExpression(P.RangeError$value(g, null, null)); |
| 4085 return this.pattern; |
| 4086 } |
| 4087 } |
| 4088 }], |
| 4089 ["dart._internal", "dart:_internal", , H, { |
| 4090 "^": "", |
| 4091 IterableElementError_noElement: function() { |
| 4092 return new P.StateError("No element"); |
| 4093 }, |
| 4094 IterableElementError_tooFew: function() { |
| 4095 return new P.StateError("Too few elements"); |
| 4096 }, |
| 4097 Symbol_getName: function(symbol) { |
| 4098 return symbol.get$_name(); |
| 4099 }, |
| 4100 CodeUnits: { |
| 4101 "^": "UnmodifiableListBase;__internal$_string", |
| 4102 get$length: function(_) { |
| 4103 return this.__internal$_string.length; |
| 4104 }, |
| 4105 $index: function(_, i) { |
| 4106 return C.JSString_methods.codeUnitAt$1(this.__internal$_string, i); |
| 4107 }, |
| 4108 $asUnmodifiableListBase: function() { |
| 4109 return [P.$int]; |
| 4110 }, |
| 4111 $asListBase: function() { |
| 4112 return [P.$int]; |
| 4113 }, |
| 4114 $asList: function() { |
| 4115 return [P.$int]; |
| 4116 } |
| 4117 }, |
| 4118 ListIterable: { |
| 4119 "^": "IterableBase;", |
| 4120 get$iterator: function(_) { |
| 4121 return new H.ListIterator(this, this.get$length(this), 0, null); |
| 4122 }, |
| 4123 forEach$1: function(_, action) { |
| 4124 var $length, i; |
| 4125 $length = this.get$length(this); |
| 4126 for (i = 0; i < $length; ++i) { |
| 4127 action.call$1(this.elementAt$1(0, i)); |
| 4128 if ($length !== this.get$length(this)) |
| 4129 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 4130 } |
| 4131 }, |
| 4132 get$isEmpty: function(_) { |
| 4133 return this.get$length(this) === 0; |
| 4134 }, |
| 4135 get$last: function(_) { |
| 4136 if (this.get$length(this) === 0) |
| 4137 throw H.wrapException(H.IterableElementError_noElement()); |
| 4138 return this.elementAt$1(0, this.get$length(this) - 1); |
| 4139 }, |
| 4140 contains$1: function(_, element) { |
| 4141 var $length, i; |
| 4142 $length = this.get$length(this); |
| 4143 for (i = 0; i < $length; ++i) { |
| 4144 if (J.$eq(this.elementAt$1(0, i), element)) |
| 4145 return true; |
| 4146 if ($length !== this.get$length(this)) |
| 4147 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 4148 } |
| 4149 return false; |
| 4150 }, |
| 4151 join$1: function(_, separator) { |
| 4152 var $length, first, buffer, i, t1; |
| 4153 $length = this.get$length(this); |
| 4154 if (separator.length !== 0) { |
| 4155 if ($length === 0) |
| 4156 return ""; |
| 4157 first = H.S(this.elementAt$1(0, 0)); |
| 4158 if ($length !== this.get$length(this)) |
| 4159 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 4160 buffer = new P.StringBuffer(first); |
| 4161 for (i = 1; i < $length; ++i) { |
| 4162 buffer._contents += separator; |
| 4163 buffer._contents += H.S(this.elementAt$1(0, i)); |
| 4164 if ($length !== this.get$length(this)) |
| 4165 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 4166 } |
| 4167 t1 = buffer._contents; |
| 4168 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 4169 } else { |
| 4170 buffer = new P.StringBuffer(""); |
| 4171 for (i = 0; i < $length; ++i) { |
| 4172 buffer._contents += H.S(this.elementAt$1(0, i)); |
| 4173 if ($length !== this.get$length(this)) |
| 4174 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 4175 } |
| 4176 t1 = buffer._contents; |
| 4177 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 4178 } |
| 4179 }, |
| 4180 join$0: function($receiver) { |
| 4181 return this.join$1($receiver, ""); |
| 4182 }, |
| 4183 map$1: function(_, f) { |
| 4184 return H.setRuntimeTypeInfo(new H.MappedListIterable(this, f), [null, null
]); |
| 4185 }, |
| 4186 fold$2: function(_, initialValue, combine) { |
| 4187 var $length, value, i; |
| 4188 $length = this.get$length(this); |
| 4189 for (value = initialValue, i = 0; i < $length; ++i) { |
| 4190 value = combine.call$2(value, this.elementAt$1(0, i)); |
| 4191 if ($length !== this.get$length(this)) |
| 4192 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 4193 } |
| 4194 return value; |
| 4195 }, |
| 4196 toList$1$growable: function(_, growable) { |
| 4197 var result, i, t1; |
| 4198 if (growable) { |
| 4199 result = H.setRuntimeTypeInfo([], [H.getRuntimeTypeArgument(this, "ListI
terable", 0)]); |
| 4200 C.JSArray_methods.set$length(result, this.get$length(this)); |
| 4201 } else |
| 4202 result = H.setRuntimeTypeInfo(Array(this.get$length(this)), [H.getRuntim
eTypeArgument(this, "ListIterable", 0)]); |
| 4203 for (i = 0; i < this.get$length(this); ++i) { |
| 4204 t1 = this.elementAt$1(0, i); |
| 4205 if (i >= result.length) |
| 4206 return H.ioore(result, i); |
| 4207 result[i] = t1; |
| 4208 } |
| 4209 return result; |
| 4210 }, |
| 4211 toList$0: function($receiver) { |
| 4212 return this.toList$1$growable($receiver, true); |
| 4213 }, |
| 4214 $isEfficientLength: 1 |
| 4215 }, |
| 4216 SubListIterable: { |
| 4217 "^": "ListIterable;_iterable,__internal$_start,_endOrLength", |
| 4218 get$_endIndex: function() { |
| 4219 var $length, t1, t2; |
| 4220 $length = J.get$length$asx(this._iterable); |
| 4221 t1 = this._endOrLength; |
| 4222 if (t1 != null) { |
| 4223 if (typeof t1 !== "number") |
| 4224 return t1.$gt(); |
| 4225 t2 = t1 > $length; |
| 4226 } else |
| 4227 t2 = true; |
| 4228 if (t2) |
| 4229 return $length; |
| 4230 return t1; |
| 4231 }, |
| 4232 get$_startIndex: function() { |
| 4233 var $length, t1; |
| 4234 $length = J.get$length$asx(this._iterable); |
| 4235 t1 = this.__internal$_start; |
| 4236 if (t1 > $length) |
| 4237 return $length; |
| 4238 return t1; |
| 4239 }, |
| 4240 get$length: function(_) { |
| 4241 var $length, t1, t2, t3; |
| 4242 $length = J.get$length$asx(this._iterable); |
| 4243 t1 = this.__internal$_start; |
| 4244 if (t1 >= $length) |
| 4245 return 0; |
| 4246 t2 = this._endOrLength; |
| 4247 if (t2 != null) { |
| 4248 if (typeof t2 !== "number") |
| 4249 return t2.$ge(); |
| 4250 t3 = t2 >= $length; |
| 4251 } else |
| 4252 t3 = true; |
| 4253 if (t3) |
| 4254 return $length - t1; |
| 4255 if (typeof t2 !== "number") |
| 4256 return t2.$sub(); |
| 4257 return t2 - t1; |
| 4258 }, |
| 4259 elementAt$1: function(_, index) { |
| 4260 var realIndex, t1; |
| 4261 realIndex = this.get$_startIndex() + index; |
| 4262 if (index >= 0) { |
| 4263 t1 = this.get$_endIndex(); |
| 4264 if (typeof t1 !== "number") |
| 4265 return H.iae(t1); |
| 4266 t1 = realIndex >= t1; |
| 4267 } else |
| 4268 t1 = true; |
| 4269 if (t1) |
| 4270 throw H.wrapException(P.IndexError$(index, this, "index", null, null)); |
| 4271 return J.elementAt$1$ax(this._iterable, realIndex); |
| 4272 }, |
| 4273 SubListIterable$3: function(_iterable, _start, _endOrLength, $E) { |
| 4274 var t1, t2; |
| 4275 t1 = this.__internal$_start; |
| 4276 if (t1 < 0) |
| 4277 H.throwExpression(P.RangeError$range(t1, 0, null, "start", null)); |
| 4278 t2 = this._endOrLength; |
| 4279 if (t2 != null) { |
| 4280 if (typeof t2 !== "number") |
| 4281 return t2.$lt(); |
| 4282 if (t2 < 0) |
| 4283 H.throwExpression(P.RangeError$range(t2, 0, null, "end", null)); |
| 4284 if (t1 > t2) |
| 4285 throw H.wrapException(P.RangeError$range(t1, 0, t2, "start", null)); |
| 4286 } |
| 4287 }, |
| 4288 static: {SubListIterable$: function(_iterable, _start, _endOrLength, $E) { |
| 4289 var t1 = H.setRuntimeTypeInfo(new H.SubListIterable(_iterable, _start, _
endOrLength), [$E]); |
| 4290 t1.SubListIterable$3(_iterable, _start, _endOrLength, $E); |
| 4291 return t1; |
| 4292 }} |
| 4293 }, |
| 4294 ListIterator: { |
| 4295 "^": "Object;_iterable,__internal$_length,_index,_current", |
| 4296 get$current: function() { |
| 4297 return this._current; |
| 4298 }, |
| 4299 moveNext$0: function() { |
| 4300 var t1, t2, $length, t3; |
| 4301 t1 = this._iterable; |
| 4302 t2 = J.getInterceptor$asx(t1); |
| 4303 $length = t2.get$length(t1); |
| 4304 if (this.__internal$_length !== $length) |
| 4305 throw H.wrapException(P.ConcurrentModificationError$(t1)); |
| 4306 t3 = this._index; |
| 4307 if (t3 >= $length) { |
| 4308 this._current = null; |
| 4309 return false; |
| 4310 } |
| 4311 this._current = t2.elementAt$1(t1, t3); |
| 4312 ++this._index; |
| 4313 return true; |
| 4314 } |
| 4315 }, |
| 4316 MappedIterable: { |
| 4317 "^": "IterableBase;_iterable,_f", |
| 4318 get$iterator: function(_) { |
| 4319 var t1 = new H.MappedIterator(null, J.get$iterator$ax(this._iterable), thi
s._f); |
| 4320 t1.$builtinTypeInfo = this.$builtinTypeInfo; |
| 4321 return t1; |
| 4322 }, |
| 4323 get$length: function(_) { |
| 4324 return J.get$length$asx(this._iterable); |
| 4325 }, |
| 4326 get$isEmpty: function(_) { |
| 4327 return J.get$isEmpty$asx(this._iterable); |
| 4328 }, |
| 4329 get$last: function(_) { |
| 4330 return this._f$1(J.get$last$ax(this._iterable)); |
| 4331 }, |
| 4332 _f$1: function(arg0) { |
| 4333 return this._f.call$1(arg0); |
| 4334 }, |
| 4335 $asIterableBase: function($S, $T) { |
| 4336 return [$T]; |
| 4337 }, |
| 4338 static: {MappedIterable_MappedIterable: function(iterable, $function, $S, $T
) { |
| 4339 if (!!J.getInterceptor(iterable).$isEfficientLength) |
| 4340 return H.setRuntimeTypeInfo(new H.EfficientLengthMappedIterable(iterab
le, $function), [$S, $T]); |
| 4341 return H.setRuntimeTypeInfo(new H.MappedIterable(iterable, $function), [
$S, $T]); |
| 4342 }} |
| 4343 }, |
| 4344 EfficientLengthMappedIterable: { |
| 4345 "^": "MappedIterable;_iterable,_f", |
| 4346 $isEfficientLength: 1 |
| 4347 }, |
| 4348 MappedIterator: { |
| 4349 "^": "Iterator;_current,_iterator,_f", |
| 4350 moveNext$0: function() { |
| 4351 var t1 = this._iterator; |
| 4352 if (t1.moveNext$0()) { |
| 4353 this._current = this._f$1(t1.get$current()); |
| 4354 return true; |
| 4355 } |
| 4356 this._current = null; |
| 4357 return false; |
| 4358 }, |
| 4359 get$current: function() { |
| 4360 return this._current; |
| 4361 }, |
| 4362 _f$1: function(arg0) { |
| 4363 return this._f.call$1(arg0); |
| 4364 } |
| 4365 }, |
| 4366 MappedListIterable: { |
| 4367 "^": "ListIterable;_source,_f", |
| 4368 get$length: function(_) { |
| 4369 return J.get$length$asx(this._source); |
| 4370 }, |
| 4371 elementAt$1: function(_, index) { |
| 4372 return this._f$1(J.elementAt$1$ax(this._source, index)); |
| 4373 }, |
| 4374 _f$1: function(arg0) { |
| 4375 return this._f.call$1(arg0); |
| 4376 }, |
| 4377 $asListIterable: function($S, $T) { |
| 4378 return [$T]; |
| 4379 }, |
| 4380 $asIterableBase: function($S, $T) { |
| 4381 return [$T]; |
| 4382 }, |
| 4383 $isEfficientLength: 1 |
| 4384 }, |
| 4385 WhereIterable: { |
| 4386 "^": "IterableBase;_iterable,_f", |
| 4387 get$iterator: function(_) { |
| 4388 var t1 = new H.WhereIterator(J.get$iterator$ax(this._iterable), this._f); |
| 4389 t1.$builtinTypeInfo = this.$builtinTypeInfo; |
| 4390 return t1; |
| 4391 } |
| 4392 }, |
| 4393 WhereIterator: { |
| 4394 "^": "Iterator;_iterator,_f", |
| 4395 moveNext$0: function() { |
| 4396 for (var t1 = this._iterator; t1.moveNext$0();) |
| 4397 if (this._f$1(t1.get$current()) === true) |
| 4398 return true; |
| 4399 return false; |
| 4400 }, |
| 4401 get$current: function() { |
| 4402 return this._iterator.get$current(); |
| 4403 }, |
| 4404 _f$1: function(arg0) { |
| 4405 return this._f.call$1(arg0); |
| 4406 } |
| 4407 }, |
| 4408 SkipWhileIterable: { |
| 4409 "^": "IterableBase;_iterable,_f", |
| 4410 get$iterator: function(_) { |
| 4411 var t1 = new H.SkipWhileIterator(J.get$iterator$ax(this._iterable), this._
f, false); |
| 4412 t1.$builtinTypeInfo = this.$builtinTypeInfo; |
| 4413 return t1; |
| 4414 } |
| 4415 }, |
| 4416 SkipWhileIterator: { |
| 4417 "^": "Iterator;_iterator,_f,_hasSkipped", |
| 4418 moveNext$0: function() { |
| 4419 if (!this._hasSkipped) { |
| 4420 this._hasSkipped = true; |
| 4421 for (var t1 = this._iterator; t1.moveNext$0();) |
| 4422 if (this._f$1(t1.get$current()) !== true) |
| 4423 return true; |
| 4424 } |
| 4425 return this._iterator.moveNext$0(); |
| 4426 }, |
| 4427 get$current: function() { |
| 4428 return this._iterator.get$current(); |
| 4429 }, |
| 4430 _f$1: function(arg0) { |
| 4431 return this._f.call$1(arg0); |
| 4432 } |
| 4433 }, |
| 4434 FixedLengthListMixin: { |
| 4435 "^": "Object;", |
| 4436 set$length: function(receiver, newLength) { |
| 4437 throw H.wrapException(P.UnsupportedError$("Cannot change the length of a f
ixed-length list")); |
| 4438 }, |
| 4439 add$1: function(receiver, value) { |
| 4440 throw H.wrapException(P.UnsupportedError$("Cannot add to a fixed-length li
st")); |
| 4441 } |
| 4442 }, |
| 4443 UnmodifiableListMixin: { |
| 4444 "^": "Object;", |
| 4445 $indexSet: function(_, index, value) { |
| 4446 throw H.wrapException(P.UnsupportedError$("Cannot modify an unmodifiable l
ist")); |
| 4447 }, |
| 4448 set$length: function(_, newLength) { |
| 4449 throw H.wrapException(P.UnsupportedError$("Cannot change the length of an
unmodifiable list")); |
| 4450 }, |
| 4451 add$1: function(_, value) { |
| 4452 throw H.wrapException(P.UnsupportedError$("Cannot add to an unmodifiable l
ist")); |
| 4453 }, |
| 4454 $isList: 1, |
| 4455 $asList: null, |
| 4456 $isEfficientLength: 1 |
| 4457 }, |
| 4458 UnmodifiableListBase: { |
| 4459 "^": "ListBase+UnmodifiableListMixin;", |
| 4460 $isList: 1, |
| 4461 $asList: null, |
| 4462 $isEfficientLength: 1 |
| 4463 }, |
| 4464 ReversedListIterable: { |
| 4465 "^": "ListIterable;_source", |
| 4466 get$length: function(_) { |
| 4467 return J.get$length$asx(this._source); |
| 4468 }, |
| 4469 elementAt$1: function(_, index) { |
| 4470 var t1, t2; |
| 4471 t1 = this._source; |
| 4472 t2 = J.getInterceptor$asx(t1); |
| 4473 return t2.elementAt$1(t1, t2.get$length(t1) - 1 - index); |
| 4474 } |
| 4475 } |
| 4476 }], |
| 4477 ["dart._js_names", "dart:_js_names", , H, { |
| 4478 "^": "", |
| 4479 extractKeys: function(victim) { |
| 4480 var t1 = H.setRuntimeTypeInfo(victim ? Object.keys(victim) : [], [null]); |
| 4481 t1.fixed$length = Array; |
| 4482 return t1; |
| 4483 } |
| 4484 }], |
| 4485 ["dart.async", "dart:async", , P, { |
| 4486 "^": "", |
| 4487 _AsyncRun__initializeScheduleImmediate: function() { |
| 4488 var t1, div, span; |
| 4489 t1 = {}; |
| 4490 if (self.scheduleImmediate != null) |
| 4491 return P._AsyncRun__scheduleImmediateJsOverride$closure(); |
| 4492 if (self.MutationObserver != null && self.document != null) { |
| 4493 div = self.document.createElement("div"); |
| 4494 span = self.document.createElement("span"); |
| 4495 t1.storedCallback_0 = null; |
| 4496 new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initia
lizeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); |
| 4497 return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span)
; |
| 4498 } else if (self.setImmediate != null) |
| 4499 return P._AsyncRun__scheduleImmediateWithSetImmediate$closure(); |
| 4500 return P._AsyncRun__scheduleImmediateWithTimer$closure(); |
| 4501 }, |
| 4502 _AsyncRun__scheduleImmediateJsOverride: [function(callback) { |
| 4503 ++init.globalState.topEventLoop._activeJsAsyncCount; |
| 4504 self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImm
ediateJsOverride_internalCallback(callback), 0)); |
| 4505 }, "call$1", "_AsyncRun__scheduleImmediateJsOverride$closure", 2, 0, 29], |
| 4506 _AsyncRun__scheduleImmediateWithSetImmediate: [function(callback) { |
| 4507 ++init.globalState.topEventLoop._activeJsAsyncCount; |
| 4508 self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediat
eWithSetImmediate_internalCallback(callback), 0)); |
| 4509 }, "call$1", "_AsyncRun__scheduleImmediateWithSetImmediate$closure", 2, 0, 29]
, |
| 4510 _AsyncRun__scheduleImmediateWithTimer: [function(callback) { |
| 4511 P.Timer__createTimer(C.Duration_0, callback); |
| 4512 }, "call$1", "_AsyncRun__scheduleImmediateWithTimer$closure", 2, 0, 29], |
| 4513 _registerErrorHandler: function(errorHandler, zone) { |
| 4514 var t1 = H.getDynamicRuntimeType(); |
| 4515 t1 = H.buildFunctionType(t1, [t1, t1])._isTest$1(errorHandler); |
| 4516 if (t1) |
| 4517 return zone.registerBinaryCallback$1(errorHandler); |
| 4518 else |
| 4519 return zone.registerUnaryCallback$1(errorHandler); |
| 4520 }, |
| 4521 _completeWithErrorCallback: function(result, error, stackTrace) { |
| 4522 var replacement = $.Zone__current.errorCallback$2(error, stackTrace); |
| 4523 if (replacement != null) { |
| 4524 error = J.get$error$x(replacement); |
| 4525 error = error != null ? error : new P.NullThrownError(); |
| 4526 stackTrace = replacement.get$stackTrace(); |
| 4527 } |
| 4528 result._completeError$2(error, stackTrace); |
| 4529 }, |
| 4530 _asyncRunCallbackLoop: function() { |
| 4531 var t1, t2; |
| 4532 for (; t1 = $._nextCallback, t1 != null;) { |
| 4533 $._lastPriorityCallback = null; |
| 4534 t2 = t1.get$next(); |
| 4535 $._nextCallback = t2; |
| 4536 if (t2 == null) |
| 4537 $._lastCallback = null; |
| 4538 t1.callback$0(); |
| 4539 } |
| 4540 }, |
| 4541 _asyncRunCallback: [function() { |
| 4542 $._isInCallbackLoop = true; |
| 4543 try { |
| 4544 P._asyncRunCallbackLoop(); |
| 4545 } finally { |
| 4546 $._lastPriorityCallback = null; |
| 4547 $._isInCallbackLoop = false; |
| 4548 if ($._nextCallback != null) |
| 4549 $.get$_AsyncRun_scheduleImmediateClosure().call$1(P._asyncRunCallback$cl
osure()); |
| 4550 } |
| 4551 }, "call$0", "_asyncRunCallback$closure", 0, 0, 1], |
| 4552 _scheduleAsyncCallback: function(callback) { |
| 4553 var t1, newEntry; |
| 4554 if ($._nextCallback == null) { |
| 4555 t1 = new P._AsyncCallbackEntry(callback, null); |
| 4556 $._lastCallback = t1; |
| 4557 $._nextCallback = t1; |
| 4558 if (!$._isInCallbackLoop) |
| 4559 $.get$_AsyncRun_scheduleImmediateClosure().call$1(P._asyncRunCallback$cl
osure()); |
| 4560 } else { |
| 4561 newEntry = new P._AsyncCallbackEntry(callback, null); |
| 4562 $._lastCallback.next = newEntry; |
| 4563 $._lastCallback = newEntry; |
| 4564 } |
| 4565 }, |
| 4566 scheduleMicrotask: function(callback) { |
| 4567 var t1 = $.Zone__current; |
| 4568 if (C.C__RootZone === t1) { |
| 4569 P._rootScheduleMicrotask(null, null, C.C__RootZone, callback); |
| 4570 return; |
| 4571 } |
| 4572 t1.scheduleMicrotask$1(t1.bindCallback$2$runGuarded(callback, true)); |
| 4573 }, |
| 4574 StreamController_StreamController: function(onCancel, onListen, onPause, onRes
ume, sync, $T) { |
| 4575 if (onCancel == null) |
| 4576 return sync ? new P._NoCallbackSyncStreamController(null, 0, null) : new P
._NoCallbackAsyncStreamController(null, 0, null); |
| 4577 return sync ? H.setRuntimeTypeInfo(new P._SyncStreamController(onListen, onP
ause, onResume, onCancel, null, 0, null), [$T]) : H.setRuntimeTypeInfo(new P._As
yncStreamController(onListen, onPause, onResume, onCancel, null, 0, null), [$T])
; |
| 4578 }, |
| 4579 _runGuarded: function(notificationHandler) { |
| 4580 var result, e, s, exception, t1; |
| 4581 if (notificationHandler == null) |
| 4582 return; |
| 4583 try { |
| 4584 result = notificationHandler.call$0(); |
| 4585 if (!!J.getInterceptor(result).$isFuture) |
| 4586 return result; |
| 4587 return; |
| 4588 } catch (exception) { |
| 4589 t1 = H.unwrapException(exception); |
| 4590 e = t1; |
| 4591 s = H.getTraceFromException(exception); |
| 4592 $.Zone__current.handleUncaughtError$2(e, s); |
| 4593 } |
| 4594 }, |
| 4595 _AddStreamState_makeErrorHandler: function(controller) { |
| 4596 return new P._AddStreamState_makeErrorHandler_closure(controller); |
| 4597 }, |
| 4598 _nullDataHandler: [function(value) { |
| 4599 }, "call$1", "_nullDataHandler$closure", 2, 0, 30], |
| 4600 _nullErrorHandler: [function(error, stackTrace) { |
| 4601 $.Zone__current.handleUncaughtError$2(error, stackTrace); |
| 4602 }, function(error) { |
| 4603 return P._nullErrorHandler(error, null); |
| 4604 }, null, "call$2", "call$1", "_nullErrorHandler$closure", 2, 2, 6, 50], |
| 4605 _nullDoneHandler: [function() { |
| 4606 }, "call$0", "_nullDoneHandler$closure", 0, 0, 1], |
| 4607 _runUserCode: function(userCode, onSuccess, onError) { |
| 4608 var e, s, replacement, error, stackTrace, exception, t1, error0; |
| 4609 try { |
| 4610 onSuccess.call$1(userCode.call$0()); |
| 4611 } catch (exception) { |
| 4612 t1 = H.unwrapException(exception); |
| 4613 e = t1; |
| 4614 s = H.getTraceFromException(exception); |
| 4615 replacement = $.Zone__current.errorCallback$2(e, s); |
| 4616 if (replacement == null) |
| 4617 onError.call$2(e, s); |
| 4618 else { |
| 4619 error0 = J.get$error$x(replacement); |
| 4620 error = error0 != null ? error0 : new P.NullThrownError(); |
| 4621 stackTrace = replacement.get$stackTrace(); |
| 4622 onError.call$2(error, stackTrace); |
| 4623 } |
| 4624 } |
| 4625 }, |
| 4626 _cancelAndError: function(subscription, future, error, stackTrace) { |
| 4627 var cancelFuture = subscription.cancel$0(); |
| 4628 if (!!J.getInterceptor(cancelFuture).$isFuture) |
| 4629 cancelFuture.whenComplete$1(new P._cancelAndError_closure(future, error, s
tackTrace)); |
| 4630 else |
| 4631 future._completeError$2(error, stackTrace); |
| 4632 }, |
| 4633 _cancelAndErrorClosure: function(subscription, future) { |
| 4634 return new P._cancelAndErrorClosure_closure(subscription, future); |
| 4635 }, |
| 4636 _cancelAndValue: function(subscription, future, value) { |
| 4637 var cancelFuture = subscription.cancel$0(); |
| 4638 if (!!J.getInterceptor(cancelFuture).$isFuture) |
| 4639 cancelFuture.whenComplete$1(new P._cancelAndValue_closure(future, value)); |
| 4640 else |
| 4641 future._complete$1(value); |
| 4642 }, |
| 4643 _addErrorWithReplacement: function(sink, error, stackTrace) { |
| 4644 var replacement = $.Zone__current.errorCallback$2(error, stackTrace); |
| 4645 if (replacement != null) { |
| 4646 error = J.get$error$x(replacement); |
| 4647 error = error != null ? error : new P.NullThrownError(); |
| 4648 stackTrace = replacement.get$stackTrace(); |
| 4649 } |
| 4650 sink._addError$2(error, stackTrace); |
| 4651 }, |
| 4652 Timer_Timer: function(duration, callback) { |
| 4653 var t1; |
| 4654 if (J.$eq($.Zone__current, C.C__RootZone)) |
| 4655 return $.Zone__current.createTimer$2(duration, callback); |
| 4656 t1 = $.Zone__current; |
| 4657 return t1.createTimer$2(duration, t1.bindCallback$2$runGuarded(callback, tru
e)); |
| 4658 }, |
| 4659 Timer__createTimer: function(duration, callback) { |
| 4660 var milliseconds = duration.get$inMilliseconds(); |
| 4661 return H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); |
| 4662 }, |
| 4663 Timer__createPeriodicTimer: function(duration, callback) { |
| 4664 var milliseconds = duration.get$inMilliseconds(); |
| 4665 return H.TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback); |
| 4666 }, |
| 4667 Zone__enter: function(zone) { |
| 4668 var previous = $.Zone__current; |
| 4669 $.Zone__current = zone; |
| 4670 return previous; |
| 4671 }, |
| 4672 _parentDelegate: function(zone) { |
| 4673 if (zone.get$parent(zone) == null) |
| 4674 return; |
| 4675 return zone.get$parent(zone).get$_delegate(); |
| 4676 }, |
| 4677 _rootHandleUncaughtError: [function($self, $parent, zone, error, stackTrace) { |
| 4678 var t1, entry, t2; |
| 4679 t1 = new P._rootHandleUncaughtError_closure(error, stackTrace); |
| 4680 entry = new P._AsyncCallbackEntry(t1, null); |
| 4681 t2 = $._nextCallback; |
| 4682 if (t2 == null) { |
| 4683 P._scheduleAsyncCallback(t1); |
| 4684 $._lastPriorityCallback = $._lastCallback; |
| 4685 } else { |
| 4686 t1 = $._lastPriorityCallback; |
| 4687 if (t1 == null) { |
| 4688 entry.next = t2; |
| 4689 $._lastPriorityCallback = entry; |
| 4690 $._nextCallback = entry; |
| 4691 } else { |
| 4692 entry.next = t1.next; |
| 4693 t1.next = entry; |
| 4694 $._lastPriorityCallback = entry; |
| 4695 if (entry.next == null) |
| 4696 $._lastCallback = entry; |
| 4697 } |
| 4698 } |
| 4699 }, "call$5", "_rootHandleUncaughtError$closure", 10, 0, 31], |
| 4700 _rootRun: [function($self, $parent, zone, f) { |
| 4701 var old, t1; |
| 4702 if (J.$eq($.Zone__current, zone)) |
| 4703 return f.call$0(); |
| 4704 old = P.Zone__enter(zone); |
| 4705 try { |
| 4706 t1 = f.call$0(); |
| 4707 return t1; |
| 4708 } finally { |
| 4709 $.Zone__current = old; |
| 4710 } |
| 4711 }, "call$4", "_rootRun$closure", 8, 0, 32], |
| 4712 _rootRunUnary: [function($self, $parent, zone, f, arg) { |
| 4713 var old, t1; |
| 4714 if (J.$eq($.Zone__current, zone)) |
| 4715 return f.call$1(arg); |
| 4716 old = P.Zone__enter(zone); |
| 4717 try { |
| 4718 t1 = f.call$1(arg); |
| 4719 return t1; |
| 4720 } finally { |
| 4721 $.Zone__current = old; |
| 4722 } |
| 4723 }, "call$5", "_rootRunUnary$closure", 10, 0, 33], |
| 4724 _rootRunBinary: [function($self, $parent, zone, f, arg1, arg2) { |
| 4725 var old, t1; |
| 4726 if (J.$eq($.Zone__current, zone)) |
| 4727 return f.call$2(arg1, arg2); |
| 4728 old = P.Zone__enter(zone); |
| 4729 try { |
| 4730 t1 = f.call$2(arg1, arg2); |
| 4731 return t1; |
| 4732 } finally { |
| 4733 $.Zone__current = old; |
| 4734 } |
| 4735 }, "call$6", "_rootRunBinary$closure", 12, 0, 34], |
| 4736 _rootRegisterCallback: [function($self, $parent, zone, f) { |
| 4737 return f; |
| 4738 }, "call$4", "_rootRegisterCallback$closure", 8, 0, 35], |
| 4739 _rootRegisterUnaryCallback: [function($self, $parent, zone, f) { |
| 4740 return f; |
| 4741 }, "call$4", "_rootRegisterUnaryCallback$closure", 8, 0, 36], |
| 4742 _rootRegisterBinaryCallback: [function($self, $parent, zone, f) { |
| 4743 return f; |
| 4744 }, "call$4", "_rootRegisterBinaryCallback$closure", 8, 0, 37], |
| 4745 _rootErrorCallback: [function($self, $parent, zone, error, stackTrace) { |
| 4746 return; |
| 4747 }, "call$5", "_rootErrorCallback$closure", 10, 0, 38], |
| 4748 _rootScheduleMicrotask: [function($self, $parent, zone, f) { |
| 4749 var t1 = C.C__RootZone !== zone; |
| 4750 if (t1) |
| 4751 f = zone.bindCallback$2$runGuarded(f, !(!t1 || C.C__RootZone.get$errorZone
() === zone.get$errorZone())); |
| 4752 P._scheduleAsyncCallback(f); |
| 4753 }, "call$4", "_rootScheduleMicrotask$closure", 8, 0, 39], |
| 4754 _rootCreateTimer: [function($self, $parent, zone, duration, callback) { |
| 4755 return P.Timer__createTimer(duration, C.C__RootZone !== zone ? zone.bindCall
back$1(callback) : callback); |
| 4756 }, "call$5", "_rootCreateTimer$closure", 10, 0, 40], |
| 4757 _rootCreatePeriodicTimer: [function($self, $parent, zone, duration, callback)
{ |
| 4758 return P.Timer__createPeriodicTimer(duration, C.C__RootZone !== zone ? zone.
bindUnaryCallback$1(callback) : callback); |
| 4759 }, "call$5", "_rootCreatePeriodicTimer$closure", 10, 0, 41], |
| 4760 _rootPrint: [function($self, $parent, zone, line) { |
| 4761 H.printString(H.S(line)); |
| 4762 }, "call$4", "_rootPrint$closure", 8, 0, 42], |
| 4763 _printToZone: [function(line) { |
| 4764 J.print$1$x($.Zone__current, line); |
| 4765 }, "call$1", "_printToZone$closure", 2, 0, 23], |
| 4766 _rootFork: [function($self, $parent, zone, specification, zoneValues) { |
| 4767 var valueMap, t1; |
| 4768 $.printToZone = P._printToZone$closure(); |
| 4769 if (specification == null) |
| 4770 specification = C._ZoneSpecification_ALf; |
| 4771 else if (!(specification instanceof P._ZoneSpecification)) |
| 4772 throw H.wrapException(P.ArgumentError$("ZoneSpecifications must be instant
iated with the provided constructor.")); |
| 4773 if (zoneValues == null) |
| 4774 valueMap = zone instanceof P._Zone ? zone.get$_map() : P.HashMap_HashMap(n
ull, null, null, null, null); |
| 4775 else |
| 4776 valueMap = P.HashMap_HashMap$from(zoneValues, null, null); |
| 4777 t1 = new P._CustomZone(null, null, null, null, null, null, null, null, null,
null, null, null, null, null, zone, valueMap); |
| 4778 t1._CustomZone$3(zone, specification, valueMap); |
| 4779 return t1; |
| 4780 }, "call$5", "_rootFork$closure", 10, 0, 43], |
| 4781 runZoned: function(body, onError, zoneSpecification, zoneValues) { |
| 4782 var errorHandler, zone; |
| 4783 errorHandler = new P.runZoned_closure(onError); |
| 4784 zoneSpecification = new P._ZoneSpecification(errorHandler, null, null, null,
null, null, null, null, null, null, null, null, null); |
| 4785 zone = $.Zone__current.fork$2$specification$zoneValues(zoneSpecification, zo
neValues); |
| 4786 return zone.runGuarded$1(body); |
| 4787 }, |
| 4788 _AsyncRun__initializeScheduleImmediate_internalCallback: { |
| 4789 "^": "Closure:2;box_0", |
| 4790 call$1: function(_) { |
| 4791 var t1, f; |
| 4792 H.leaveJsAsync(); |
| 4793 t1 = this.box_0; |
| 4794 f = t1.storedCallback_0; |
| 4795 t1.storedCallback_0 = null; |
| 4796 f.call$0(); |
| 4797 } |
| 4798 }, |
| 4799 _AsyncRun__initializeScheduleImmediate_closure: { |
| 4800 "^": "Closure:5;box_0,div_1,span_2", |
| 4801 call$1: function(callback) { |
| 4802 var t1, t2; |
| 4803 ++init.globalState.topEventLoop._activeJsAsyncCount; |
| 4804 this.box_0.storedCallback_0 = callback; |
| 4805 t1 = this.div_1; |
| 4806 t2 = this.span_2; |
| 4807 t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); |
| 4808 } |
| 4809 }, |
| 4810 _AsyncRun__scheduleImmediateJsOverride_internalCallback: { |
| 4811 "^": "Closure:0;callback_0", |
| 4812 call$0: function() { |
| 4813 H.leaveJsAsync(); |
| 4814 this.callback_0.call$0(); |
| 4815 } |
| 4816 }, |
| 4817 _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: { |
| 4818 "^": "Closure:0;callback_0", |
| 4819 call$0: function() { |
| 4820 H.leaveJsAsync(); |
| 4821 this.callback_0.call$0(); |
| 4822 } |
| 4823 }, |
| 4824 _UncaughtAsyncError: { |
| 4825 "^": "AsyncError;error,stackTrace", |
| 4826 toString$0: function(_) { |
| 4827 var result, t1; |
| 4828 result = "Uncaught Error: " + H.S(this.error); |
| 4829 t1 = this.stackTrace; |
| 4830 return t1 != null ? result + ("\nStack Trace:\n" + H.S(t1)) : result; |
| 4831 }, |
| 4832 static: {_UncaughtAsyncError__getBestStackTrace: function(error, stackTrace)
{ |
| 4833 if (stackTrace != null) |
| 4834 return stackTrace; |
| 4835 if (!!J.getInterceptor(error).$isError) |
| 4836 return error.get$stackTrace(); |
| 4837 return; |
| 4838 }} |
| 4839 }, |
| 4840 Future: { |
| 4841 "^": "Object;" |
| 4842 }, |
| 4843 _FutureListener: { |
| 4844 "^": "Object;_nextListener<,result>,state,callback,errorCallback", |
| 4845 get$_zone: function() { |
| 4846 return this.result._zone; |
| 4847 }, |
| 4848 get$handlesValue: function() { |
| 4849 return (this.state & 1) !== 0; |
| 4850 }, |
| 4851 get$hasErrorTest: function() { |
| 4852 return this.state === 6; |
| 4853 }, |
| 4854 get$handlesComplete: function() { |
| 4855 return this.state === 8; |
| 4856 }, |
| 4857 get$_onValue: function() { |
| 4858 return this.callback; |
| 4859 }, |
| 4860 get$_whenCompleteAction: function() { |
| 4861 return this.callback; |
| 4862 }, |
| 4863 errorCallback$2: function(arg0, arg1) { |
| 4864 return this.errorCallback.call$2(arg0, arg1); |
| 4865 } |
| 4866 }, |
| 4867 _Future: { |
| 4868 "^": "Object;_state,_zone<,_resultOrListeners", |
| 4869 get$_hasError: function() { |
| 4870 return this._state === 8; |
| 4871 }, |
| 4872 set$_isChained: function(value) { |
| 4873 if (value) |
| 4874 this._state = 2; |
| 4875 else |
| 4876 this._state = 0; |
| 4877 }, |
| 4878 then$2$onError: function(f, onError) { |
| 4879 var result, t1; |
| 4880 result = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [nu
ll]); |
| 4881 t1 = result._zone; |
| 4882 if (t1 !== C.C__RootZone) { |
| 4883 f = t1.registerUnaryCallback$1(f); |
| 4884 if (onError != null) |
| 4885 onError = P._registerErrorHandler(onError, t1); |
| 4886 } |
| 4887 t1 = onError == null ? 1 : 3; |
| 4888 this._addListener$1(new P._FutureListener(null, result, t1, f, onError)); |
| 4889 return result; |
| 4890 }, |
| 4891 then$1: function(f) { |
| 4892 return this.then$2$onError(f, null); |
| 4893 }, |
| 4894 whenComplete$1: function(action) { |
| 4895 var t1, result; |
| 4896 t1 = $.Zone__current; |
| 4897 result = new P._Future(0, t1, null); |
| 4898 result.$builtinTypeInfo = this.$builtinTypeInfo; |
| 4899 if (t1 !== C.C__RootZone) |
| 4900 action = t1.registerCallback$1(action); |
| 4901 this._addListener$1(new P._FutureListener(null, result, 8, action, null)); |
| 4902 return result; |
| 4903 }, |
| 4904 _markPendingCompletion$0: function() { |
| 4905 if (this._state !== 0) |
| 4906 throw H.wrapException(P.StateError$("Future already completed")); |
| 4907 this._state = 1; |
| 4908 }, |
| 4909 get$_async$_value: function() { |
| 4910 return this._resultOrListeners; |
| 4911 }, |
| 4912 get$_error: function() { |
| 4913 return this._resultOrListeners; |
| 4914 }, |
| 4915 _setValue$1: function(value) { |
| 4916 this._state = 4; |
| 4917 this._resultOrListeners = value; |
| 4918 }, |
| 4919 _setErrorObject$1: function(error) { |
| 4920 this._state = 8; |
| 4921 this._resultOrListeners = error; |
| 4922 }, |
| 4923 _setError$2: function(error, stackTrace) { |
| 4924 this._setErrorObject$1(new P.AsyncError(error, stackTrace)); |
| 4925 }, |
| 4926 _addListener$1: function(listener) { |
| 4927 if (this._state >= 4) |
| 4928 this._zone.scheduleMicrotask$1(new P._Future__addListener_closure(this,
listener)); |
| 4929 else { |
| 4930 listener._nextListener = this._resultOrListeners; |
| 4931 this._resultOrListeners = listener; |
| 4932 } |
| 4933 }, |
| 4934 _removeListeners$0: function() { |
| 4935 var current, prev, next; |
| 4936 current = this._resultOrListeners; |
| 4937 this._resultOrListeners = null; |
| 4938 for (prev = null; current != null; prev = current, current = next) { |
| 4939 next = current.get$_nextListener(); |
| 4940 current._nextListener = prev; |
| 4941 } |
| 4942 return prev; |
| 4943 }, |
| 4944 _complete$1: function(value) { |
| 4945 var t1, listeners; |
| 4946 t1 = J.getInterceptor(value); |
| 4947 if (!!t1.$isFuture) |
| 4948 if (!!t1.$is_Future) |
| 4949 P._Future__chainCoreFuture(value, this); |
| 4950 else |
| 4951 P._Future__chainForeignFuture(value, this); |
| 4952 else { |
| 4953 listeners = this._removeListeners$0(); |
| 4954 this._setValue$1(value); |
| 4955 P._Future__propagateToListeners(this, listeners); |
| 4956 } |
| 4957 }, |
| 4958 _completeWithValue$1: function(value) { |
| 4959 var listeners = this._removeListeners$0(); |
| 4960 this._setValue$1(value); |
| 4961 P._Future__propagateToListeners(this, listeners); |
| 4962 }, |
| 4963 _completeError$2: [function(error, stackTrace) { |
| 4964 var listeners = this._removeListeners$0(); |
| 4965 this._setErrorObject$1(new P.AsyncError(error, stackTrace)); |
| 4966 P._Future__propagateToListeners(this, listeners); |
| 4967 }, function(error) { |
| 4968 return this._completeError$2(error, null); |
| 4969 }, "_completeError$1", "call$2", "call$1", "get$_completeError", 2, 2, 6, 50
], |
| 4970 _asyncComplete$1: function(value) { |
| 4971 var t1; |
| 4972 if (value == null) |
| 4973 ; |
| 4974 else { |
| 4975 t1 = J.getInterceptor(value); |
| 4976 if (!!t1.$isFuture) { |
| 4977 if (!!t1.$is_Future) { |
| 4978 t1 = value._state; |
| 4979 if (t1 >= 4 && t1 === 8) { |
| 4980 this._markPendingCompletion$0(); |
| 4981 this._zone.scheduleMicrotask$1(new P._Future__asyncComplete_closur
e(this, value)); |
| 4982 } else |
| 4983 P._Future__chainCoreFuture(value, this); |
| 4984 } else |
| 4985 P._Future__chainForeignFuture(value, this); |
| 4986 return; |
| 4987 } |
| 4988 } |
| 4989 this._markPendingCompletion$0(); |
| 4990 this._zone.scheduleMicrotask$1(new P._Future__asyncComplete_closure0(this,
value)); |
| 4991 }, |
| 4992 _asyncCompleteError$2: function(error, stackTrace) { |
| 4993 this._markPendingCompletion$0(); |
| 4994 this._zone.scheduleMicrotask$1(new P._Future__asyncCompleteError_closure(t
his, error, stackTrace)); |
| 4995 }, |
| 4996 $isFuture: 1, |
| 4997 static: {_Future$immediate: function(value, $T) { |
| 4998 var t1 = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [
$T]); |
| 4999 t1._asyncComplete$1(value); |
| 5000 return t1; |
| 5001 }, _Future__chainForeignFuture: function(source, target) { |
| 5002 target._state = 2; |
| 5003 source.then$2$onError(new P._Future__chainForeignFuture_closure(target),
new P._Future__chainForeignFuture_closure0(target)); |
| 5004 }, _Future__chainCoreFuture: function(source, target) { |
| 5005 var listener; |
| 5006 target._state = 2; |
| 5007 listener = new P._FutureListener(null, target, 0, null, null); |
| 5008 if (source._state >= 4) |
| 5009 P._Future__propagateToListeners(source, listener); |
| 5010 else |
| 5011 source._addListener$1(listener); |
| 5012 }, _Future__propagateToListeners: function(source, listeners) { |
| 5013 var t1, t2, t3, hasError, asyncError, listeners0, sourceValue, zone, old
Zone, chainSource, result; |
| 5014 t1 = {}; |
| 5015 t1.source_4 = source; |
| 5016 for (t2 = source; true;) { |
| 5017 t3 = {}; |
| 5018 hasError = t2.get$_hasError(); |
| 5019 if (listeners == null) { |
| 5020 if (hasError) { |
| 5021 asyncError = t1.source_4.get$_error(); |
| 5022 t1.source_4.get$_zone().handleUncaughtError$2(J.get$error$x(asyncE
rror), asyncError.get$stackTrace()); |
| 5023 } |
| 5024 return; |
| 5025 } |
| 5026 for (; listeners.get$_nextListener() != null; listeners = listeners0)
{ |
| 5027 listeners0 = listeners._nextListener; |
| 5028 listeners._nextListener = null; |
| 5029 P._Future__propagateToListeners(t1.source_4, listeners); |
| 5030 } |
| 5031 t3.listenerHasValue_1 = true; |
| 5032 sourceValue = hasError ? null : t1.source_4.get$_async$_value(); |
| 5033 t3.listenerValueOrError_2 = sourceValue; |
| 5034 t3.isPropagationAborted_3 = false; |
| 5035 t2 = !hasError; |
| 5036 if (!t2 || listeners.get$handlesValue() || listeners.state === 8) { |
| 5037 zone = listeners.get$_zone(); |
| 5038 if (hasError && !t1.source_4.get$_zone().inSameErrorZone$1(zone)) { |
| 5039 asyncError = t1.source_4.get$_error(); |
| 5040 t1.source_4.get$_zone().handleUncaughtError$2(J.get$error$x(asyncE
rror), asyncError.get$stackTrace()); |
| 5041 return; |
| 5042 } |
| 5043 oldZone = $.Zone__current; |
| 5044 if (oldZone == null ? zone != null : oldZone !== zone) |
| 5045 $.Zone__current = zone; |
| 5046 else |
| 5047 oldZone = null; |
| 5048 if (t2) { |
| 5049 if (listeners.get$handlesValue()) |
| 5050 t3.listenerHasValue_1 = new P._Future__propagateToListeners_hand
leValueCallback(t3, listeners, sourceValue, zone).call$0(); |
| 5051 } else |
| 5052 new P._Future__propagateToListeners_handleError(t1, t3, listeners,
zone).call$0(); |
| 5053 if (listeners.get$handlesComplete()) |
| 5054 new P._Future__propagateToListeners_handleWhenCompleteCallback(t1,
t3, hasError, listeners, zone).call$0(); |
| 5055 if (oldZone != null) |
| 5056 $.Zone__current = oldZone; |
| 5057 if (t3.isPropagationAborted_3) |
| 5058 return; |
| 5059 if (t3.listenerHasValue_1 === true) { |
| 5060 t2 = t3.listenerValueOrError_2; |
| 5061 t2 = (sourceValue == null ? t2 != null : sourceValue !== t2) && !!
J.getInterceptor(t2).$isFuture; |
| 5062 } else |
| 5063 t2 = false; |
| 5064 if (t2) { |
| 5065 chainSource = t3.listenerValueOrError_2; |
| 5066 result = listeners.result; |
| 5067 if (chainSource instanceof P._Future) |
| 5068 if (chainSource._state >= 4) { |
| 5069 result._state = 2; |
| 5070 t1.source_4 = chainSource; |
| 5071 listeners = new P._FutureListener(null, result, 0, null, null)
; |
| 5072 t2 = chainSource; |
| 5073 continue; |
| 5074 } else |
| 5075 P._Future__chainCoreFuture(chainSource, result); |
| 5076 else |
| 5077 P._Future__chainForeignFuture(chainSource, result); |
| 5078 return; |
| 5079 } |
| 5080 } |
| 5081 result = listeners.result; |
| 5082 listeners = result._removeListeners$0(); |
| 5083 t2 = t3.listenerHasValue_1; |
| 5084 t3 = t3.listenerValueOrError_2; |
| 5085 if (t2 === true) { |
| 5086 result._state = 4; |
| 5087 result._resultOrListeners = t3; |
| 5088 } else { |
| 5089 result._state = 8; |
| 5090 result._resultOrListeners = t3; |
| 5091 } |
| 5092 t1.source_4 = result; |
| 5093 t2 = result; |
| 5094 } |
| 5095 }} |
| 5096 }, |
| 5097 _Future__addListener_closure: { |
| 5098 "^": "Closure:0;this_0,listener_1", |
| 5099 call$0: function() { |
| 5100 P._Future__propagateToListeners(this.this_0, this.listener_1); |
| 5101 } |
| 5102 }, |
| 5103 _Future__chainForeignFuture_closure: { |
| 5104 "^": "Closure:2;target_0", |
| 5105 call$1: function(value) { |
| 5106 this.target_0._completeWithValue$1(value); |
| 5107 } |
| 5108 }, |
| 5109 _Future__chainForeignFuture_closure0: { |
| 5110 "^": "Closure:7;target_1", |
| 5111 call$2: function(error, stackTrace) { |
| 5112 this.target_1._completeError$2(error, stackTrace); |
| 5113 }, |
| 5114 call$1: function(error) { |
| 5115 return this.call$2(error, null); |
| 5116 } |
| 5117 }, |
| 5118 _Future__asyncComplete_closure: { |
| 5119 "^": "Closure:0;this_0,coreFuture_1", |
| 5120 call$0: function() { |
| 5121 P._Future__chainCoreFuture(this.coreFuture_1, this.this_0); |
| 5122 } |
| 5123 }, |
| 5124 _Future__asyncComplete_closure0: { |
| 5125 "^": "Closure:0;this_2,value_3", |
| 5126 call$0: function() { |
| 5127 this.this_2._completeWithValue$1(this.value_3); |
| 5128 } |
| 5129 }, |
| 5130 _Future__asyncCompleteError_closure: { |
| 5131 "^": "Closure:0;this_0,error_1,stackTrace_2", |
| 5132 call$0: function() { |
| 5133 this.this_0._completeError$2(this.error_1, this.stackTrace_2); |
| 5134 } |
| 5135 }, |
| 5136 _Future__propagateToListeners_handleValueCallback: { |
| 5137 "^": "Closure:8;box_1,listener_3,sourceValue_4,zone_5", |
| 5138 call$0: function() { |
| 5139 var e, s, exception, t1; |
| 5140 try { |
| 5141 this.box_1.listenerValueOrError_2 = this.zone_5.runUnary$2(this.listener
_3.get$_onValue(), this.sourceValue_4); |
| 5142 return true; |
| 5143 } catch (exception) { |
| 5144 t1 = H.unwrapException(exception); |
| 5145 e = t1; |
| 5146 s = H.getTraceFromException(exception); |
| 5147 this.box_1.listenerValueOrError_2 = new P.AsyncError(e, s); |
| 5148 return false; |
| 5149 } |
| 5150 } |
| 5151 }, |
| 5152 _Future__propagateToListeners_handleError: { |
| 5153 "^": "Closure:1;box_2,box_1,listener_6,zone_7", |
| 5154 call$0: function() { |
| 5155 var asyncError, matchesTest, test, e, s, errorCallback, e0, s0, t1, except
ion, t2, listenerValueOrError, t3, t4; |
| 5156 asyncError = this.box_2.source_4.get$_error(); |
| 5157 matchesTest = true; |
| 5158 t1 = this.listener_6; |
| 5159 if (t1.get$hasErrorTest()) { |
| 5160 test = t1.callback; |
| 5161 try { |
| 5162 matchesTest = this.zone_7.runUnary$2(test, J.get$error$x(asyncError)); |
| 5163 } catch (exception) { |
| 5164 t1 = H.unwrapException(exception); |
| 5165 e = t1; |
| 5166 s = H.getTraceFromException(exception); |
| 5167 t1 = J.get$error$x(asyncError); |
| 5168 t2 = e; |
| 5169 listenerValueOrError = (t1 == null ? t2 == null : t1 === t2) ? asyncEr
ror : new P.AsyncError(e, s); |
| 5170 t1 = this.box_1; |
| 5171 t1.listenerValueOrError_2 = listenerValueOrError; |
| 5172 t1.listenerHasValue_1 = false; |
| 5173 return; |
| 5174 } |
| 5175 } |
| 5176 errorCallback = t1.errorCallback; |
| 5177 if (matchesTest === true && errorCallback != null) { |
| 5178 try { |
| 5179 t1 = errorCallback; |
| 5180 t2 = H.getDynamicRuntimeType(); |
| 5181 t2 = H.buildFunctionType(t2, [t2, t2])._isTest$1(t1); |
| 5182 t3 = this.zone_7; |
| 5183 t4 = this.box_1; |
| 5184 if (t2) |
| 5185 t4.listenerValueOrError_2 = t3.runBinary$3(errorCallback, J.get$erro
r$x(asyncError), asyncError.get$stackTrace()); |
| 5186 else |
| 5187 t4.listenerValueOrError_2 = t3.runUnary$2(errorCallback, J.get$error
$x(asyncError)); |
| 5188 } catch (exception) { |
| 5189 t1 = H.unwrapException(exception); |
| 5190 e0 = t1; |
| 5191 s0 = H.getTraceFromException(exception); |
| 5192 t1 = J.get$error$x(asyncError); |
| 5193 t2 = e0; |
| 5194 listenerValueOrError = (t1 == null ? t2 == null : t1 === t2) ? asyncEr
ror : new P.AsyncError(e0, s0); |
| 5195 t1 = this.box_1; |
| 5196 t1.listenerValueOrError_2 = listenerValueOrError; |
| 5197 t1.listenerHasValue_1 = false; |
| 5198 return; |
| 5199 } |
| 5200 this.box_1.listenerHasValue_1 = true; |
| 5201 } else { |
| 5202 t1 = this.box_1; |
| 5203 t1.listenerValueOrError_2 = asyncError; |
| 5204 t1.listenerHasValue_1 = false; |
| 5205 } |
| 5206 } |
| 5207 }, |
| 5208 _Future__propagateToListeners_handleWhenCompleteCallback: { |
| 5209 "^": "Closure:1;box_2,box_1,hasError_8,listener_9,zone_10", |
| 5210 call$0: function() { |
| 5211 var t1, e, s, completeResult, t2, exception, result; |
| 5212 t1 = {}; |
| 5213 t1.completeResult_0 = null; |
| 5214 try { |
| 5215 completeResult = this.zone_10.run$1(this.listener_9.get$_whenCompleteAct
ion()); |
| 5216 t1.completeResult_0 = completeResult; |
| 5217 t2 = completeResult; |
| 5218 } catch (exception) { |
| 5219 t1 = H.unwrapException(exception); |
| 5220 e = t1; |
| 5221 s = H.getTraceFromException(exception); |
| 5222 if (this.hasError_8) { |
| 5223 t1 = J.get$error$x(this.box_2.source_4.get$_error()); |
| 5224 t2 = e; |
| 5225 t2 = t1 == null ? t2 == null : t1 === t2; |
| 5226 t1 = t2; |
| 5227 } else |
| 5228 t1 = false; |
| 5229 t2 = this.box_1; |
| 5230 if (t1) |
| 5231 t2.listenerValueOrError_2 = this.box_2.source_4.get$_error(); |
| 5232 else |
| 5233 t2.listenerValueOrError_2 = new P.AsyncError(e, s); |
| 5234 t2.listenerHasValue_1 = false; |
| 5235 return; |
| 5236 } |
| 5237 if (!!J.getInterceptor(t2).$isFuture) { |
| 5238 t2 = this.listener_9; |
| 5239 result = t2.get$result(t2); |
| 5240 result.set$_isChained(true); |
| 5241 this.box_1.isPropagationAborted_3 = true; |
| 5242 t1.completeResult_0.then$2$onError(new P._Future__propagateToListeners_h
andleWhenCompleteCallback_closure(this.box_2, result), new P._Future__propagateT
oListeners_handleWhenCompleteCallback_closure0(t1, result)); |
| 5243 } |
| 5244 } |
| 5245 }, |
| 5246 _Future__propagateToListeners_handleWhenCompleteCallback_closure: { |
| 5247 "^": "Closure:2;box_2,result_11", |
| 5248 call$1: function(ignored) { |
| 5249 P._Future__propagateToListeners(this.box_2.source_4, new P._FutureListener
(null, this.result_11, 0, null, null)); |
| 5250 } |
| 5251 }, |
| 5252 _Future__propagateToListeners_handleWhenCompleteCallback_closure0: { |
| 5253 "^": "Closure:7;box_0,result_12", |
| 5254 call$2: function(error, stackTrace) { |
| 5255 var t1, completeResult; |
| 5256 t1 = this.box_0; |
| 5257 if (!(t1.completeResult_0 instanceof P._Future)) { |
| 5258 completeResult = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current,
null), [null]); |
| 5259 t1.completeResult_0 = completeResult; |
| 5260 completeResult._setError$2(error, stackTrace); |
| 5261 } |
| 5262 P._Future__propagateToListeners(t1.completeResult_0, new P._FutureListener
(null, this.result_12, 0, null, null)); |
| 5263 }, |
| 5264 call$1: function(error) { |
| 5265 return this.call$2(error, null); |
| 5266 } |
| 5267 }, |
| 5268 _AsyncCallbackEntry: { |
| 5269 "^": "Object;callback,next@", |
| 5270 callback$0: function() { |
| 5271 return this.callback.call$0(); |
| 5272 } |
| 5273 }, |
| 5274 Stream: { |
| 5275 "^": "Object;", |
| 5276 map$1: function(_, convert) { |
| 5277 return H.setRuntimeTypeInfo(new P._MapStream(convert, this), [H.getRuntime
TypeArgument(this, "Stream", 0), null]); |
| 5278 }, |
| 5279 pipe$1: function(streamConsumer) { |
| 5280 return streamConsumer._async$_target.addStream$2$cancelOnError(this, true)
.then$1(new P.Stream_pipe_closure(streamConsumer)); |
| 5281 }, |
| 5282 contains$1: function(_, needle) { |
| 5283 var t1, future; |
| 5284 t1 = {}; |
| 5285 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [P.
bool]); |
| 5286 t1.subscription_0 = null; |
| 5287 t1.subscription_0 = this.listen$4$cancelOnError$onDone$onError(new P.Strea
m_contains_closure(t1, this, needle, future), true, new P.Stream_contains_closur
e0(future), future.get$_completeError()); |
| 5288 return future; |
| 5289 }, |
| 5290 forEach$1: function(_, action) { |
| 5291 var t1, future; |
| 5292 t1 = {}; |
| 5293 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [nu
ll]); |
| 5294 t1.subscription_0 = null; |
| 5295 t1.subscription_0 = this.listen$4$cancelOnError$onDone$onError(new P.Strea
m_forEach_closure(t1, this, action, future), true, new P.Stream_forEach_closure0
(future), future.get$_completeError()); |
| 5296 return future; |
| 5297 }, |
| 5298 get$length: function(_) { |
| 5299 var t1, future; |
| 5300 t1 = {}; |
| 5301 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [P.
$int]); |
| 5302 t1.count_0 = 0; |
| 5303 this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1)
, true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); |
| 5304 return future; |
| 5305 }, |
| 5306 get$isEmpty: function(_) { |
| 5307 var t1, future; |
| 5308 t1 = {}; |
| 5309 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [P.
bool]); |
| 5310 t1.subscription_0 = null; |
| 5311 t1.subscription_0 = this.listen$4$cancelOnError$onDone$onError(new P.Strea
m_isEmpty_closure(t1, future), true, new P.Stream_isEmpty_closure0(future), futu
re.get$_completeError()); |
| 5312 return future; |
| 5313 }, |
| 5314 toList$0: function(_) { |
| 5315 var result, future; |
| 5316 result = H.setRuntimeTypeInfo([], [H.getRuntimeTypeArgument(this, "Stream"
, 0)]); |
| 5317 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [[P
.List, H.getRuntimeTypeArgument(this, "Stream", 0)]]); |
| 5318 this.listen$4$cancelOnError$onDone$onError(new P.Stream_toList_closure(thi
s, result), true, new P.Stream_toList_closure0(result, future), future.get$_comp
leteError()); |
| 5319 return future; |
| 5320 }, |
| 5321 get$first: function(_) { |
| 5322 var t1, future; |
| 5323 t1 = {}; |
| 5324 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [H.
getRuntimeTypeArgument(this, "Stream", 0)]); |
| 5325 t1.subscription_0 = null; |
| 5326 t1.subscription_0 = this.listen$4$cancelOnError$onDone$onError(new P.Strea
m_first_closure(t1, this, future), true, new P.Stream_first_closure0(future), fu
ture.get$_completeError()); |
| 5327 return future; |
| 5328 }, |
| 5329 get$last: function(_) { |
| 5330 var t1, future; |
| 5331 t1 = {}; |
| 5332 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [H.
getRuntimeTypeArgument(this, "Stream", 0)]); |
| 5333 t1.result_0 = null; |
| 5334 t1.foundResult_1 = false; |
| 5335 this.listen$4$cancelOnError$onDone$onError(new P.Stream_last_closure(t1, t
his), true, new P.Stream_last_closure0(t1, future), future.get$_completeError())
; |
| 5336 return future; |
| 5337 } |
| 5338 }, |
| 5339 Stream_pipe_closure: { |
| 5340 "^": "Closure:2;streamConsumer_0", |
| 5341 call$1: function(_) { |
| 5342 return this.streamConsumer_0._async$_target.close$0(0); |
| 5343 } |
| 5344 }, |
| 5345 Stream_contains_closure: { |
| 5346 "^": "Closure;box_0,this_1,needle_2,future_3", |
| 5347 call$1: function(element) { |
| 5348 var t1, t2; |
| 5349 t1 = this.box_0; |
| 5350 t2 = this.future_3; |
| 5351 P._runUserCode(new P.Stream_contains__closure(this.needle_2, element), new
P.Stream_contains__closure0(t1, t2), P._cancelAndErrorClosure(t1.subscription_0
, t2)); |
| 5352 }, |
| 5353 $signature: function() { |
| 5354 return H.computeSignature(function(T) { |
| 5355 return {func: "dynamic__T", args: [T]}; |
| 5356 }, this.this_1, "Stream"); |
| 5357 } |
| 5358 }, |
| 5359 Stream_contains__closure: { |
| 5360 "^": "Closure:0;needle_4,element_5", |
| 5361 call$0: function() { |
| 5362 return J.$eq(this.element_5, this.needle_4); |
| 5363 } |
| 5364 }, |
| 5365 Stream_contains__closure0: { |
| 5366 "^": "Closure:9;box_0,future_6", |
| 5367 call$1: function(isMatch) { |
| 5368 if (isMatch === true) |
| 5369 P._cancelAndValue(this.box_0.subscription_0, this.future_6, true); |
| 5370 } |
| 5371 }, |
| 5372 Stream_contains_closure0: { |
| 5373 "^": "Closure:0;future_7", |
| 5374 call$0: function() { |
| 5375 this.future_7._complete$1(false); |
| 5376 } |
| 5377 }, |
| 5378 Stream_forEach_closure: { |
| 5379 "^": "Closure;box_0,this_1,action_2,future_3", |
| 5380 call$1: function(element) { |
| 5381 P._runUserCode(new P.Stream_forEach__closure(this.action_2, element), new
P.Stream_forEach__closure0(), P._cancelAndErrorClosure(this.box_0.subscription_0
, this.future_3)); |
| 5382 }, |
| 5383 $signature: function() { |
| 5384 return H.computeSignature(function(T) { |
| 5385 return {func: "dynamic__T", args: [T]}; |
| 5386 }, this.this_1, "Stream"); |
| 5387 } |
| 5388 }, |
| 5389 Stream_forEach__closure: { |
| 5390 "^": "Closure:0;action_4,element_5", |
| 5391 call$0: function() { |
| 5392 return this.action_4.call$1(this.element_5); |
| 5393 } |
| 5394 }, |
| 5395 Stream_forEach__closure0: { |
| 5396 "^": "Closure:2;", |
| 5397 call$1: function(_) { |
| 5398 } |
| 5399 }, |
| 5400 Stream_forEach_closure0: { |
| 5401 "^": "Closure:0;future_6", |
| 5402 call$0: function() { |
| 5403 this.future_6._complete$1(null); |
| 5404 } |
| 5405 }, |
| 5406 Stream_length_closure: { |
| 5407 "^": "Closure:2;box_0", |
| 5408 call$1: function(_) { |
| 5409 ++this.box_0.count_0; |
| 5410 } |
| 5411 }, |
| 5412 Stream_length_closure0: { |
| 5413 "^": "Closure:0;box_0,future_1", |
| 5414 call$0: function() { |
| 5415 this.future_1._complete$1(this.box_0.count_0); |
| 5416 } |
| 5417 }, |
| 5418 Stream_isEmpty_closure: { |
| 5419 "^": "Closure:2;box_0,future_1", |
| 5420 call$1: function(_) { |
| 5421 P._cancelAndValue(this.box_0.subscription_0, this.future_1, false); |
| 5422 } |
| 5423 }, |
| 5424 Stream_isEmpty_closure0: { |
| 5425 "^": "Closure:0;future_2", |
| 5426 call$0: function() { |
| 5427 this.future_2._complete$1(true); |
| 5428 } |
| 5429 }, |
| 5430 Stream_toList_closure: { |
| 5431 "^": "Closure;this_0,result_1", |
| 5432 call$1: function(data) { |
| 5433 this.result_1.push(data); |
| 5434 }, |
| 5435 $signature: function() { |
| 5436 return H.computeSignature(function(T) { |
| 5437 return {func: "dynamic__T", args: [T]}; |
| 5438 }, this.this_0, "Stream"); |
| 5439 } |
| 5440 }, |
| 5441 Stream_toList_closure0: { |
| 5442 "^": "Closure:0;result_2,future_3", |
| 5443 call$0: function() { |
| 5444 this.future_3._complete$1(this.result_2); |
| 5445 } |
| 5446 }, |
| 5447 Stream_first_closure: { |
| 5448 "^": "Closure;box_0,this_1,future_2", |
| 5449 call$1: function(value) { |
| 5450 P._cancelAndValue(this.box_0.subscription_0, this.future_2, value); |
| 5451 }, |
| 5452 $signature: function() { |
| 5453 return H.computeSignature(function(T) { |
| 5454 return {func: "dynamic__T", args: [T]}; |
| 5455 }, this.this_1, "Stream"); |
| 5456 } |
| 5457 }, |
| 5458 Stream_first_closure0: { |
| 5459 "^": "Closure:0;future_3", |
| 5460 call$0: function() { |
| 5461 var e, s, t1, exception; |
| 5462 try { |
| 5463 t1 = H.IterableElementError_noElement(); |
| 5464 throw H.wrapException(t1); |
| 5465 } catch (exception) { |
| 5466 t1 = H.unwrapException(exception); |
| 5467 e = t1; |
| 5468 s = H.getTraceFromException(exception); |
| 5469 P._completeWithErrorCallback(this.future_3, e, s); |
| 5470 } |
| 5471 } |
| 5472 }, |
| 5473 Stream_last_closure: { |
| 5474 "^": "Closure;box_0,this_1", |
| 5475 call$1: function(value) { |
| 5476 var t1 = this.box_0; |
| 5477 t1.foundResult_1 = true; |
| 5478 t1.result_0 = value; |
| 5479 }, |
| 5480 $signature: function() { |
| 5481 return H.computeSignature(function(T) { |
| 5482 return {func: "dynamic__T", args: [T]}; |
| 5483 }, this.this_1, "Stream"); |
| 5484 } |
| 5485 }, |
| 5486 Stream_last_closure0: { |
| 5487 "^": "Closure:0;box_0,future_2", |
| 5488 call$0: function() { |
| 5489 var e, s, t1, exception; |
| 5490 t1 = this.box_0; |
| 5491 if (t1.foundResult_1) { |
| 5492 this.future_2._complete$1(t1.result_0); |
| 5493 return; |
| 5494 } |
| 5495 try { |
| 5496 t1 = H.IterableElementError_noElement(); |
| 5497 throw H.wrapException(t1); |
| 5498 } catch (exception) { |
| 5499 t1 = H.unwrapException(exception); |
| 5500 e = t1; |
| 5501 s = H.getTraceFromException(exception); |
| 5502 P._completeWithErrorCallback(this.future_2, e, s); |
| 5503 } |
| 5504 } |
| 5505 }, |
| 5506 StreamSubscription: { |
| 5507 "^": "Object;" |
| 5508 }, |
| 5509 StreamController: { |
| 5510 "^": "Object;" |
| 5511 }, |
| 5512 _StreamController: { |
| 5513 "^": "Object;", |
| 5514 get$_pendingEvents: function() { |
| 5515 if ((this._state & 8) === 0) |
| 5516 return this._varData; |
| 5517 return this._varData.get$varData(); |
| 5518 }, |
| 5519 _ensurePendingEvents$0: function() { |
| 5520 var t1, state; |
| 5521 if ((this._state & 8) === 0) { |
| 5522 t1 = this._varData; |
| 5523 if (t1 == null) { |
| 5524 t1 = new P._StreamImplEvents(null, null, 0); |
| 5525 this._varData = t1; |
| 5526 } |
| 5527 return t1; |
| 5528 } |
| 5529 state = this._varData; |
| 5530 if (state.get$varData() == null) |
| 5531 state.varData = new P._StreamImplEvents(null, null, 0); |
| 5532 return state.varData; |
| 5533 }, |
| 5534 get$_subscription: function() { |
| 5535 if ((this._state & 8) !== 0) |
| 5536 return this._varData.get$varData(); |
| 5537 return this._varData; |
| 5538 }, |
| 5539 _badEventState$0: function() { |
| 5540 if ((this._state & 4) !== 0) |
| 5541 return new P.StateError("Cannot add event after closing"); |
| 5542 return new P.StateError("Cannot add event while adding a stream"); |
| 5543 }, |
| 5544 addStream$2$cancelOnError: function(source, cancelOnError) { |
| 5545 var t1, t2, t3, t4, addState; |
| 5546 t1 = this._state; |
| 5547 if (t1 >= 4) |
| 5548 throw H.wrapException(this._badEventState$0()); |
| 5549 if ((t1 & 2) !== 0) { |
| 5550 t1 = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [null
]); |
| 5551 t1._asyncComplete$1(null); |
| 5552 return t1; |
| 5553 } |
| 5554 t1 = this._varData; |
| 5555 t2 = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [null])
; |
| 5556 t3 = this.get$_async$_add(); |
| 5557 t4 = cancelOnError ? P._AddStreamState_makeErrorHandler(this) : this.get$_
addError(); |
| 5558 addState = H.setRuntimeTypeInfo(new P._StreamControllerAddStreamState(t1,
t2, source.listen$4$cancelOnError$onDone$onError(t3, cancelOnError, this.get$_cl
ose(), t4)), [null]); |
| 5559 t1 = this._state; |
| 5560 if ((t1 & 1) !== 0 ? this.get$_subscription().get$_isInputPaused() : (t1 &
2) === 0) |
| 5561 addState.addSubscription.pause$0(0); |
| 5562 this._varData = addState; |
| 5563 this._state |= 8; |
| 5564 return addState.addStreamFuture; |
| 5565 }, |
| 5566 _ensureDoneFuture$0: function() { |
| 5567 var t1 = this._doneFuture; |
| 5568 if (t1 == null) { |
| 5569 t1 = (this._state & 2) !== 0 ? $.get$Future__nullFuture() : H.setRuntime
TypeInfo(new P._Future(0, $.Zone__current, null), [null]); |
| 5570 this._doneFuture = t1; |
| 5571 } |
| 5572 return t1; |
| 5573 }, |
| 5574 add$1: function(_, value) { |
| 5575 if (this._state >= 4) |
| 5576 throw H.wrapException(this._badEventState$0()); |
| 5577 this._async$_add$1(value); |
| 5578 }, |
| 5579 addError$2: [function(error, stackTrace) { |
| 5580 var replacement; |
| 5581 if (this._state >= 4) |
| 5582 throw H.wrapException(this._badEventState$0()); |
| 5583 error = error != null ? error : new P.NullThrownError(); |
| 5584 replacement = $.Zone__current.errorCallback$2(error, stackTrace); |
| 5585 if (replacement != null) { |
| 5586 error = J.get$error$x(replacement); |
| 5587 error = error != null ? error : new P.NullThrownError(); |
| 5588 stackTrace = replacement.get$stackTrace(); |
| 5589 } |
| 5590 this._addError$2(error, stackTrace); |
| 5591 }, function(error) { |
| 5592 return this.addError$2(error, null); |
| 5593 }, "addError$1", "call$2", "call$1", "get$addError", 2, 2, 10, 50], |
| 5594 close$0: function(_) { |
| 5595 var t1 = this._state; |
| 5596 if ((t1 & 4) !== 0) |
| 5597 return this._ensureDoneFuture$0(); |
| 5598 if (t1 >= 4) |
| 5599 throw H.wrapException(this._badEventState$0()); |
| 5600 t1 |= 4; |
| 5601 this._state = t1; |
| 5602 if ((t1 & 1) !== 0) |
| 5603 this._sendDone$0(); |
| 5604 else if ((t1 & 3) === 0) |
| 5605 this._ensurePendingEvents$0().add$1(0, C.C__DelayedDone); |
| 5606 return this._ensureDoneFuture$0(); |
| 5607 }, |
| 5608 _async$_add$1: [function(value) { |
| 5609 var t1 = this._state; |
| 5610 if ((t1 & 1) !== 0) |
| 5611 this._sendData$1(value); |
| 5612 else if ((t1 & 3) === 0) |
| 5613 this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, null)); |
| 5614 }, "call$1", "get$_async$_add", 2, 0, function() { |
| 5615 return H.computeSignature(function(T) { |
| 5616 return {func: "void__T", void: true, args: [T]}; |
| 5617 }, this.$receiver, "_StreamController"); |
| 5618 }], |
| 5619 _addError$2: [function(error, stackTrace) { |
| 5620 var t1 = this._state; |
| 5621 if ((t1 & 1) !== 0) |
| 5622 this._sendError$2(error, stackTrace); |
| 5623 else if ((t1 & 3) === 0) |
| 5624 this._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackT
race, null)); |
| 5625 }, "call$2", "get$_addError", 4, 0, 11], |
| 5626 _close$0: [function() { |
| 5627 var addState = this._varData; |
| 5628 this._varData = addState.get$varData(); |
| 5629 this._state &= 4294967287; |
| 5630 addState.addStreamFuture._asyncComplete$1(null); |
| 5631 }, "call$0", "get$_close", 0, 0, 1], |
| 5632 _subscribe$4: function(onData, onError, onDone, cancelOnError) { |
| 5633 var t1, t2, subscription, pendingEvents, addState; |
| 5634 if ((this._state & 3) !== 0) |
| 5635 throw H.wrapException(P.StateError$("Stream has already been listened to
.")); |
| 5636 t1 = $.Zone__current; |
| 5637 t2 = cancelOnError ? 1 : 0; |
| 5638 subscription = H.setRuntimeTypeInfo(new P._ControllerSubscription(this, nu
ll, null, null, t1, t2, null, null), [null]); |
| 5639 subscription._BufferingStreamSubscription$4(onData, onError, onDone, cance
lOnError, null); |
| 5640 pendingEvents = this.get$_pendingEvents(); |
| 5641 t2 = this._state |= 1; |
| 5642 if ((t2 & 8) !== 0) { |
| 5643 addState = this._varData; |
| 5644 addState.set$varData(subscription); |
| 5645 addState.addSubscription.resume$0(); |
| 5646 } else |
| 5647 this._varData = subscription; |
| 5648 subscription._setPendingEvents$1(pendingEvents); |
| 5649 subscription._guardCallback$1(new P._StreamController__subscribe_closure(t
his)); |
| 5650 return subscription; |
| 5651 }, |
| 5652 _recordCancel$1: function(subscription) { |
| 5653 var result, e, s, exception, t1, result0; |
| 5654 result = null; |
| 5655 if ((this._state & 8) !== 0) |
| 5656 result = this._varData.cancel$0(); |
| 5657 this._varData = null; |
| 5658 this._state = this._state & 4294967286 | 2; |
| 5659 if (this.get$_onCancel() != null) |
| 5660 if (result == null) |
| 5661 try { |
| 5662 result = this._onCancel$0(); |
| 5663 } catch (exception) { |
| 5664 t1 = H.unwrapException(exception); |
| 5665 e = t1; |
| 5666 s = H.getTraceFromException(exception); |
| 5667 result0 = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, nul
l), [null]); |
| 5668 result0._asyncCompleteError$2(e, s); |
| 5669 result = result0; |
| 5670 } |
| 5671 else |
| 5672 result = result.whenComplete$1(this.get$_onCancel()); |
| 5673 t1 = new P._StreamController__recordCancel_complete(this); |
| 5674 if (result != null) |
| 5675 result = result.whenComplete$1(t1); |
| 5676 else |
| 5677 t1.call$0(); |
| 5678 return result; |
| 5679 } |
| 5680 }, |
| 5681 _StreamController__subscribe_closure: { |
| 5682 "^": "Closure:0;this_0", |
| 5683 call$0: function() { |
| 5684 P._runGuarded(this.this_0.get$_onListen()); |
| 5685 } |
| 5686 }, |
| 5687 _StreamController__recordCancel_complete: { |
| 5688 "^": "Closure:1;this_0", |
| 5689 call$0: function() { |
| 5690 var t1 = this.this_0._doneFuture; |
| 5691 if (t1 != null && t1._state === 0) |
| 5692 t1._asyncComplete$1(null); |
| 5693 } |
| 5694 }, |
| 5695 _SyncStreamControllerDispatch: { |
| 5696 "^": "Object;", |
| 5697 _sendData$1: function(data) { |
| 5698 this.get$_subscription()._async$_add$1(data); |
| 5699 }, |
| 5700 _sendError$2: function(error, stackTrace) { |
| 5701 this.get$_subscription()._addError$2(error, stackTrace); |
| 5702 }, |
| 5703 _sendDone$0: function() { |
| 5704 this.get$_subscription()._close$0(); |
| 5705 } |
| 5706 }, |
| 5707 _AsyncStreamControllerDispatch: { |
| 5708 "^": "Object;", |
| 5709 _sendData$1: function(data) { |
| 5710 this.get$_subscription()._addPending$1(new P._DelayedData(data, null)); |
| 5711 }, |
| 5712 _sendError$2: function(error, stackTrace) { |
| 5713 this.get$_subscription()._addPending$1(new P._DelayedError(error, stackTra
ce, null)); |
| 5714 }, |
| 5715 _sendDone$0: function() { |
| 5716 this.get$_subscription()._addPending$1(C.C__DelayedDone); |
| 5717 } |
| 5718 }, |
| 5719 _AsyncStreamController: { |
| 5720 "^": "_StreamController__AsyncStreamControllerDispatch;_onListen<,_onPause<,
_onResume<,_onCancel<,_varData,_state,_doneFuture", |
| 5721 _onCancel$0: function() { |
| 5722 return this._onCancel.call$0(); |
| 5723 } |
| 5724 }, |
| 5725 _StreamController__AsyncStreamControllerDispatch: { |
| 5726 "^": "_StreamController+_AsyncStreamControllerDispatch;" |
| 5727 }, |
| 5728 _SyncStreamController: { |
| 5729 "^": "_StreamController__SyncStreamControllerDispatch;_onListen<,_onPause<,_
onResume<,_onCancel<,_varData,_state,_doneFuture", |
| 5730 _onCancel$0: function() { |
| 5731 return this._onCancel.call$0(); |
| 5732 } |
| 5733 }, |
| 5734 _StreamController__SyncStreamControllerDispatch: { |
| 5735 "^": "_StreamController+_SyncStreamControllerDispatch;" |
| 5736 }, |
| 5737 _NoCallbacks: { |
| 5738 "^": "Object;", |
| 5739 get$_onListen: function() { |
| 5740 return; |
| 5741 }, |
| 5742 get$_onPause: function() { |
| 5743 return; |
| 5744 }, |
| 5745 get$_onResume: function() { |
| 5746 return; |
| 5747 }, |
| 5748 get$_onCancel: function() { |
| 5749 return; |
| 5750 }, |
| 5751 _onCancel$0: function() { |
| 5752 return this.get$_onCancel().call$0(); |
| 5753 } |
| 5754 }, |
| 5755 _NoCallbackAsyncStreamController: { |
| 5756 "^": "_StreamController__AsyncStreamControllerDispatch0+_NoCallbacks;_varDat
a,_state,_doneFuture" |
| 5757 }, |
| 5758 _StreamController__AsyncStreamControllerDispatch0: { |
| 5759 "^": "_StreamController+_AsyncStreamControllerDispatch;", |
| 5760 $as_StreamController: $.functionThatReturnsNull |
| 5761 }, |
| 5762 _NoCallbackSyncStreamController: { |
| 5763 "^": "_StreamController__SyncStreamControllerDispatch0+_NoCallbacks;_varData
,_state,_doneFuture" |
| 5764 }, |
| 5765 _StreamController__SyncStreamControllerDispatch0: { |
| 5766 "^": "_StreamController+_SyncStreamControllerDispatch;", |
| 5767 $as_StreamController: $.functionThatReturnsNull |
| 5768 }, |
| 5769 _ControllerStream: { |
| 5770 "^": "_StreamImpl;_controller", |
| 5771 _createSubscription$4: function(onData, onError, onDone, cancelOnError) { |
| 5772 return this._controller._subscribe$4(onData, onError, onDone, cancelOnErro
r); |
| 5773 }, |
| 5774 get$hashCode: function(_) { |
| 5775 return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; |
| 5776 }, |
| 5777 $eq: function(_, other) { |
| 5778 if (other == null) |
| 5779 return false; |
| 5780 if (this === other) |
| 5781 return true; |
| 5782 if (!(other instanceof P._ControllerStream)) |
| 5783 return false; |
| 5784 return other._controller === this._controller; |
| 5785 } |
| 5786 }, |
| 5787 _ControllerSubscription: { |
| 5788 "^": "_BufferingStreamSubscription;_controller,_onData,_onError,_onDone,_zon
e,_state,_cancelFuture,_pending", |
| 5789 _onCancel$0: function() { |
| 5790 return this._controller._recordCancel$1(this); |
| 5791 }, |
| 5792 _onPause$0: [function() { |
| 5793 var t1 = this._controller; |
| 5794 if ((t1._state & 8) !== 0) |
| 5795 t1._varData.pause$0(0); |
| 5796 P._runGuarded(t1.get$_onPause()); |
| 5797 }, "call$0", "get$_onPause", 0, 0, 1], |
| 5798 _onResume$0: [function() { |
| 5799 var t1 = this._controller; |
| 5800 if ((t1._state & 8) !== 0) |
| 5801 t1._varData.resume$0(); |
| 5802 P._runGuarded(t1.get$_onResume()); |
| 5803 }, "call$0", "get$_onResume", 0, 0, 1] |
| 5804 }, |
| 5805 _StreamSinkWrapper: { |
| 5806 "^": "Object;_async$_target", |
| 5807 add$1: function(_, data) { |
| 5808 var t1 = this._async$_target; |
| 5809 if (t1._state >= 4) |
| 5810 H.throwExpression(t1._badEventState$0()); |
| 5811 t1._async$_add$1(data); |
| 5812 }, |
| 5813 close$0: function(_) { |
| 5814 return this._async$_target.close$0(0); |
| 5815 } |
| 5816 }, |
| 5817 _AddStreamState: { |
| 5818 "^": "Object;", |
| 5819 pause$0: function(_) { |
| 5820 this.addSubscription.pause$0(0); |
| 5821 }, |
| 5822 resume$0: function() { |
| 5823 this.addSubscription.resume$0(); |
| 5824 }, |
| 5825 cancel$0: function() { |
| 5826 var cancel = this.addSubscription.cancel$0(); |
| 5827 if (cancel == null) { |
| 5828 this.addStreamFuture._asyncComplete$1(null); |
| 5829 return; |
| 5830 } |
| 5831 return cancel.whenComplete$1(new P._AddStreamState_cancel_closure(this)); |
| 5832 } |
| 5833 }, |
| 5834 _AddStreamState_makeErrorHandler_closure: { |
| 5835 "^": "Closure:12;controller_0", |
| 5836 call$2: function(e, s) { |
| 5837 var t1 = this.controller_0; |
| 5838 t1._addError$2(e, s); |
| 5839 t1._close$0(); |
| 5840 } |
| 5841 }, |
| 5842 _AddStreamState_cancel_closure: { |
| 5843 "^": "Closure:0;this_0", |
| 5844 call$0: function() { |
| 5845 this.this_0.addStreamFuture._asyncComplete$1(null); |
| 5846 } |
| 5847 }, |
| 5848 _StreamControllerAddStreamState: { |
| 5849 "^": "_AddStreamState;varData@,addStreamFuture,addSubscription" |
| 5850 }, |
| 5851 _EventSink: { |
| 5852 "^": "Object;" |
| 5853 }, |
| 5854 _BufferingStreamSubscription: { |
| 5855 "^": "Object;_onData,_onError,_onDone,_zone<,_state,_cancelFuture,_pending", |
| 5856 _setPendingEvents$1: function(pendingEvents) { |
| 5857 if (pendingEvents == null) |
| 5858 return; |
| 5859 this._pending = pendingEvents; |
| 5860 if (!pendingEvents.get$isEmpty(pendingEvents)) { |
| 5861 this._state = (this._state | 64) >>> 0; |
| 5862 this._pending.schedule$1(this); |
| 5863 } |
| 5864 }, |
| 5865 pause$1: function(_, resumeSignal) { |
| 5866 var t1 = this._state; |
| 5867 if ((t1 & 8) !== 0) |
| 5868 return; |
| 5869 this._state = (t1 + 128 | 4) >>> 0; |
| 5870 if (t1 < 128 && this._pending != null) |
| 5871 this._pending.cancelSchedule$0(); |
| 5872 if ((t1 & 4) === 0 && (this._state & 32) === 0) |
| 5873 this._guardCallback$1(this.get$_onPause()); |
| 5874 }, |
| 5875 pause$0: function($receiver) { |
| 5876 return this.pause$1($receiver, null); |
| 5877 }, |
| 5878 resume$0: function() { |
| 5879 var t1 = this._state; |
| 5880 if ((t1 & 8) !== 0) |
| 5881 return; |
| 5882 if (t1 >= 128) { |
| 5883 t1 -= 128; |
| 5884 this._state = t1; |
| 5885 if (t1 < 128) { |
| 5886 if ((t1 & 64) !== 0) { |
| 5887 t1 = this._pending; |
| 5888 t1 = !t1.get$isEmpty(t1); |
| 5889 } else |
| 5890 t1 = false; |
| 5891 if (t1) |
| 5892 this._pending.schedule$1(this); |
| 5893 else { |
| 5894 t1 = (this._state & 4294967291) >>> 0; |
| 5895 this._state = t1; |
| 5896 if ((t1 & 32) === 0) |
| 5897 this._guardCallback$1(this.get$_onResume()); |
| 5898 } |
| 5899 } |
| 5900 } |
| 5901 }, |
| 5902 cancel$0: function() { |
| 5903 var t1 = (this._state & 4294967279) >>> 0; |
| 5904 this._state = t1; |
| 5905 if ((t1 & 8) !== 0) |
| 5906 return this._cancelFuture; |
| 5907 this._cancel$0(); |
| 5908 return this._cancelFuture; |
| 5909 }, |
| 5910 get$_isInputPaused: function() { |
| 5911 return (this._state & 4) !== 0; |
| 5912 }, |
| 5913 _cancel$0: function() { |
| 5914 var t1 = (this._state | 8) >>> 0; |
| 5915 this._state = t1; |
| 5916 if ((t1 & 64) !== 0) |
| 5917 this._pending.cancelSchedule$0(); |
| 5918 if ((this._state & 32) === 0) |
| 5919 this._pending = null; |
| 5920 this._cancelFuture = this._onCancel$0(); |
| 5921 }, |
| 5922 _async$_add$1: ["super$_BufferingStreamSubscription$_async$_add$1", function
(data) { |
| 5923 var t1 = this._state; |
| 5924 if ((t1 & 8) !== 0) |
| 5925 return; |
| 5926 if (t1 < 32) |
| 5927 this._sendData$1(data); |
| 5928 else |
| 5929 this._addPending$1(new P._DelayedData(data, null)); |
| 5930 }], |
| 5931 _addError$2: ["super$_BufferingStreamSubscription$_addError$2", function(err
or, stackTrace) { |
| 5932 var t1 = this._state; |
| 5933 if ((t1 & 8) !== 0) |
| 5934 return; |
| 5935 if (t1 < 32) |
| 5936 this._sendError$2(error, stackTrace); |
| 5937 else |
| 5938 this._addPending$1(new P._DelayedError(error, stackTrace, null)); |
| 5939 }], |
| 5940 _close$0: function() { |
| 5941 var t1 = this._state; |
| 5942 if ((t1 & 8) !== 0) |
| 5943 return; |
| 5944 t1 = (t1 | 2) >>> 0; |
| 5945 this._state = t1; |
| 5946 if (t1 < 32) |
| 5947 this._sendDone$0(); |
| 5948 else |
| 5949 this._addPending$1(C.C__DelayedDone); |
| 5950 }, |
| 5951 _onPause$0: [function() { |
| 5952 }, "call$0", "get$_onPause", 0, 0, 1], |
| 5953 _onResume$0: [function() { |
| 5954 }, "call$0", "get$_onResume", 0, 0, 1], |
| 5955 _onCancel$0: function() { |
| 5956 return; |
| 5957 }, |
| 5958 _addPending$1: function($event) { |
| 5959 var pending, t1; |
| 5960 pending = this._pending; |
| 5961 if (pending == null) { |
| 5962 pending = new P._StreamImplEvents(null, null, 0); |
| 5963 this._pending = pending; |
| 5964 } |
| 5965 pending.add$1(0, $event); |
| 5966 t1 = this._state; |
| 5967 if ((t1 & 64) === 0) { |
| 5968 t1 = (t1 | 64) >>> 0; |
| 5969 this._state = t1; |
| 5970 if (t1 < 128) |
| 5971 this._pending.schedule$1(this); |
| 5972 } |
| 5973 }, |
| 5974 _sendData$1: function(data) { |
| 5975 var t1 = this._state; |
| 5976 this._state = (t1 | 32) >>> 0; |
| 5977 this._zone.runUnaryGuarded$2(this._onData, data); |
| 5978 this._state = (this._state & 4294967263) >>> 0; |
| 5979 this._checkState$1((t1 & 4) !== 0); |
| 5980 }, |
| 5981 _sendError$2: function(error, stackTrace) { |
| 5982 var t1, t2; |
| 5983 t1 = this._state; |
| 5984 t2 = new P._BufferingStreamSubscription__sendError_sendError(this, error,
stackTrace); |
| 5985 if ((t1 & 1) !== 0) { |
| 5986 this._state = (t1 | 16) >>> 0; |
| 5987 this._cancel$0(); |
| 5988 t1 = this._cancelFuture; |
| 5989 if (!!J.getInterceptor(t1).$isFuture) |
| 5990 t1.whenComplete$1(t2); |
| 5991 else |
| 5992 t2.call$0(); |
| 5993 } else { |
| 5994 t2.call$0(); |
| 5995 this._checkState$1((t1 & 4) !== 0); |
| 5996 } |
| 5997 }, |
| 5998 _sendDone$0: function() { |
| 5999 var t1, t2; |
| 6000 t1 = new P._BufferingStreamSubscription__sendDone_sendDone(this); |
| 6001 this._cancel$0(); |
| 6002 this._state = (this._state | 16) >>> 0; |
| 6003 t2 = this._cancelFuture; |
| 6004 if (!!J.getInterceptor(t2).$isFuture) |
| 6005 t2.whenComplete$1(t1); |
| 6006 else |
| 6007 t1.call$0(); |
| 6008 }, |
| 6009 _guardCallback$1: function(callback) { |
| 6010 var t1 = this._state; |
| 6011 this._state = (t1 | 32) >>> 0; |
| 6012 callback.call$0(); |
| 6013 this._state = (this._state & 4294967263) >>> 0; |
| 6014 this._checkState$1((t1 & 4) !== 0); |
| 6015 }, |
| 6016 _checkState$1: function(wasInputPaused) { |
| 6017 var t1, isInputPaused; |
| 6018 if ((this._state & 64) !== 0) { |
| 6019 t1 = this._pending; |
| 6020 t1 = t1.get$isEmpty(t1); |
| 6021 } else |
| 6022 t1 = false; |
| 6023 if (t1) { |
| 6024 t1 = (this._state & 4294967231) >>> 0; |
| 6025 this._state = t1; |
| 6026 if ((t1 & 4) !== 0) |
| 6027 if (t1 < 128) { |
| 6028 t1 = this._pending; |
| 6029 t1 = t1 == null || t1.get$isEmpty(t1); |
| 6030 } else |
| 6031 t1 = false; |
| 6032 else |
| 6033 t1 = false; |
| 6034 if (t1) |
| 6035 this._state = (this._state & 4294967291) >>> 0; |
| 6036 } |
| 6037 for (; true; wasInputPaused = isInputPaused) { |
| 6038 t1 = this._state; |
| 6039 if ((t1 & 8) !== 0) { |
| 6040 this._pending = null; |
| 6041 return; |
| 6042 } |
| 6043 isInputPaused = (t1 & 4) !== 0; |
| 6044 if (wasInputPaused === isInputPaused) |
| 6045 break; |
| 6046 this._state = (t1 ^ 32) >>> 0; |
| 6047 if (isInputPaused) |
| 6048 this._onPause$0(); |
| 6049 else |
| 6050 this._onResume$0(); |
| 6051 this._state = (this._state & 4294967263) >>> 0; |
| 6052 } |
| 6053 t1 = this._state; |
| 6054 if ((t1 & 64) !== 0 && t1 < 128) |
| 6055 this._pending.schedule$1(this); |
| 6056 }, |
| 6057 _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnEr
ror, $T) { |
| 6058 var t1 = this._zone; |
| 6059 this._onData = t1.registerUnaryCallback$1(onData); |
| 6060 this._onError = P._registerErrorHandler(onError == null ? P._nullErrorHand
ler$closure() : onError, t1); |
| 6061 this._onDone = t1.registerCallback$1(onDone == null ? P._nullDoneHandler$c
losure() : onDone); |
| 6062 }, |
| 6063 static: {_BufferingStreamSubscription$: function(onData, onError, onDone, ca
ncelOnError, $T) { |
| 6064 var t1, t2; |
| 6065 t1 = $.Zone__current; |
| 6066 t2 = cancelOnError ? 1 : 0; |
| 6067 t2 = H.setRuntimeTypeInfo(new P._BufferingStreamSubscription(null, null,
null, t1, t2, null, null), [$T]); |
| 6068 t2._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError
, $T); |
| 6069 return t2; |
| 6070 }} |
| 6071 }, |
| 6072 _BufferingStreamSubscription__sendError_sendError: { |
| 6073 "^": "Closure:1;this_0,error_1,stackTrace_2", |
| 6074 call$0: function() { |
| 6075 var t1, t2, t3, t4, t5, t6; |
| 6076 t1 = this.this_0; |
| 6077 t2 = t1._state; |
| 6078 if ((t2 & 8) !== 0 && (t2 & 16) === 0) |
| 6079 return; |
| 6080 t1._state = (t2 | 32) >>> 0; |
| 6081 t2 = t1._onError; |
| 6082 t3 = H.getDynamicRuntimeType(); |
| 6083 t3 = H.buildFunctionType(t3, [t3, t3])._isTest$1(t2); |
| 6084 t4 = t1._zone; |
| 6085 t5 = this.error_1; |
| 6086 t6 = t1._onError; |
| 6087 if (t3) |
| 6088 t4.runBinaryGuarded$3(t6, t5, this.stackTrace_2); |
| 6089 else |
| 6090 t4.runUnaryGuarded$2(t6, t5); |
| 6091 t1._state = (t1._state & 4294967263) >>> 0; |
| 6092 } |
| 6093 }, |
| 6094 _BufferingStreamSubscription__sendDone_sendDone: { |
| 6095 "^": "Closure:1;this_0", |
| 6096 call$0: function() { |
| 6097 var t1, t2; |
| 6098 t1 = this.this_0; |
| 6099 t2 = t1._state; |
| 6100 if ((t2 & 16) === 0) |
| 6101 return; |
| 6102 t1._state = (t2 | 42) >>> 0; |
| 6103 t1._zone.runGuarded$1(t1._onDone); |
| 6104 t1._state = (t1._state & 4294967263) >>> 0; |
| 6105 } |
| 6106 }, |
| 6107 _StreamImpl: { |
| 6108 "^": "Stream;", |
| 6109 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDon
e, onError) { |
| 6110 return this._createSubscription$4(onData, onError, onDone, true === cancel
OnError); |
| 6111 }, |
| 6112 listen$1: function(onData) { |
| 6113 return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null
); |
| 6114 }, |
| 6115 listen$2$onDone: function(onData, onDone) { |
| 6116 return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, nu
ll); |
| 6117 }, |
| 6118 listen$3$onDone$onError: function(onData, onDone, onError) { |
| 6119 return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, on
Error); |
| 6120 }, |
| 6121 listen$3$onDone$onError: function(onData, onDone, onError) { |
| 6122 return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, on
Error); |
| 6123 }, |
| 6124 _createSubscription$4: function(onData, onError, onDone, cancelOnError) { |
| 6125 return P._BufferingStreamSubscription$(onData, onError, onDone, cancelOnEr
ror, H.getTypeArgumentByIndex(this, 0)); |
| 6126 } |
| 6127 }, |
| 6128 _DelayedEvent: { |
| 6129 "^": "Object;next@" |
| 6130 }, |
| 6131 _DelayedData: { |
| 6132 "^": "_DelayedEvent;value,next", |
| 6133 perform$1: function(dispatch) { |
| 6134 dispatch._sendData$1(this.value); |
| 6135 } |
| 6136 }, |
| 6137 _DelayedError: { |
| 6138 "^": "_DelayedEvent;error>,stackTrace<,next", |
| 6139 perform$1: function(dispatch) { |
| 6140 dispatch._sendError$2(this.error, this.stackTrace); |
| 6141 } |
| 6142 }, |
| 6143 _DelayedDone: { |
| 6144 "^": "Object;", |
| 6145 perform$1: function(dispatch) { |
| 6146 dispatch._sendDone$0(); |
| 6147 }, |
| 6148 get$next: function() { |
| 6149 return; |
| 6150 }, |
| 6151 set$next: function(_) { |
| 6152 throw H.wrapException(P.StateError$("No events after a done.")); |
| 6153 } |
| 6154 }, |
| 6155 _PendingEvents: { |
| 6156 "^": "Object;", |
| 6157 schedule$1: function(dispatch) { |
| 6158 var t1 = this._state; |
| 6159 if (t1 === 1) |
| 6160 return; |
| 6161 if (t1 >= 1) { |
| 6162 this._state = 1; |
| 6163 return; |
| 6164 } |
| 6165 P.scheduleMicrotask(new P._PendingEvents_schedule_closure(this, dispatch))
; |
| 6166 this._state = 1; |
| 6167 }, |
| 6168 cancelSchedule$0: function() { |
| 6169 if (this._state === 1) |
| 6170 this._state = 3; |
| 6171 } |
| 6172 }, |
| 6173 _PendingEvents_schedule_closure: { |
| 6174 "^": "Closure:0;this_0,dispatch_1", |
| 6175 call$0: function() { |
| 6176 var t1, oldState; |
| 6177 t1 = this.this_0; |
| 6178 oldState = t1._state; |
| 6179 t1._state = 0; |
| 6180 if (oldState === 3) |
| 6181 return; |
| 6182 t1.handleNext$1(this.dispatch_1); |
| 6183 } |
| 6184 }, |
| 6185 _StreamImplEvents: { |
| 6186 "^": "_PendingEvents;firstPendingEvent,lastPendingEvent,_state", |
| 6187 get$isEmpty: function(_) { |
| 6188 return this.lastPendingEvent == null; |
| 6189 }, |
| 6190 add$1: function(_, $event) { |
| 6191 var t1 = this.lastPendingEvent; |
| 6192 if (t1 == null) { |
| 6193 this.lastPendingEvent = $event; |
| 6194 this.firstPendingEvent = $event; |
| 6195 } else { |
| 6196 t1.set$next($event); |
| 6197 this.lastPendingEvent = $event; |
| 6198 } |
| 6199 }, |
| 6200 handleNext$1: function(dispatch) { |
| 6201 var $event, t1; |
| 6202 $event = this.firstPendingEvent; |
| 6203 t1 = $event.get$next(); |
| 6204 this.firstPendingEvent = t1; |
| 6205 if (t1 == null) |
| 6206 this.lastPendingEvent = null; |
| 6207 $event.perform$1(dispatch); |
| 6208 } |
| 6209 }, |
| 6210 _cancelAndError_closure: { |
| 6211 "^": "Closure:0;future_0,error_1,stackTrace_2", |
| 6212 call$0: function() { |
| 6213 return this.future_0._completeError$2(this.error_1, this.stackTrace_2); |
| 6214 } |
| 6215 }, |
| 6216 _cancelAndErrorClosure_closure: { |
| 6217 "^": "Closure:12;subscription_0,future_1", |
| 6218 call$2: function(error, stackTrace) { |
| 6219 return P._cancelAndError(this.subscription_0, this.future_1, error, stackT
race); |
| 6220 } |
| 6221 }, |
| 6222 _cancelAndValue_closure: { |
| 6223 "^": "Closure:0;future_0,value_1", |
| 6224 call$0: function() { |
| 6225 return this.future_0._complete$1(this.value_1); |
| 6226 } |
| 6227 }, |
| 6228 _ForwardingStream: { |
| 6229 "^": "Stream;", |
| 6230 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDon
e, onError) { |
| 6231 return this._createSubscription$4(onData, onError, onDone, true === cancel
OnError); |
| 6232 }, |
| 6233 listen$3$onDone$onError: function(onData, onDone, onError) { |
| 6234 return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, on
Error); |
| 6235 }, |
| 6236 _createSubscription$4: function(onData, onError, onDone, cancelOnError) { |
| 6237 return P._ForwardingStreamSubscription$(this, onData, onError, onDone, can
celOnError, H.getRuntimeTypeArgument(this, "_ForwardingStream", 0), H.getRuntime
TypeArgument(this, "_ForwardingStream", 1)); |
| 6238 }, |
| 6239 _handleData$2: function(data, sink) { |
| 6240 sink._async$_add$1(data); |
| 6241 }, |
| 6242 $asStream: function($S, $T) { |
| 6243 return [$T]; |
| 6244 } |
| 6245 }, |
| 6246 _ForwardingStreamSubscription: { |
| 6247 "^": "_BufferingStreamSubscription;_stream,_subscription,_onData,_onError,_o
nDone,_zone,_state,_cancelFuture,_pending", |
| 6248 _async$_add$1: function(data) { |
| 6249 if ((this._state & 2) !== 0) |
| 6250 return; |
| 6251 this.super$_BufferingStreamSubscription$_async$_add$1(data); |
| 6252 }, |
| 6253 _addError$2: function(error, stackTrace) { |
| 6254 if ((this._state & 2) !== 0) |
| 6255 return; |
| 6256 this.super$_BufferingStreamSubscription$_addError$2(error, stackTrace); |
| 6257 }, |
| 6258 _onPause$0: [function() { |
| 6259 var t1 = this._subscription; |
| 6260 if (t1 == null) |
| 6261 return; |
| 6262 t1.pause$0(0); |
| 6263 }, "call$0", "get$_onPause", 0, 0, 1], |
| 6264 _onResume$0: [function() { |
| 6265 var t1 = this._subscription; |
| 6266 if (t1 == null) |
| 6267 return; |
| 6268 t1.resume$0(); |
| 6269 }, "call$0", "get$_onResume", 0, 0, 1], |
| 6270 _onCancel$0: function() { |
| 6271 var t1 = this._subscription; |
| 6272 if (t1 != null) { |
| 6273 this._subscription = null; |
| 6274 t1.cancel$0(); |
| 6275 } |
| 6276 return; |
| 6277 }, |
| 6278 _handleData$1: [function(data) { |
| 6279 this._stream._handleData$2(data, this); |
| 6280 }, "call$1", "get$_handleData", 2, 0, function() { |
| 6281 return H.computeSignature(function(S, T) { |
| 6282 return {func: "void__S", void: true, args: [S]}; |
| 6283 }, this.$receiver, "_ForwardingStreamSubscription"); |
| 6284 }], |
| 6285 _handleError$2: [function(error, stackTrace) { |
| 6286 this._addError$2(error, stackTrace); |
| 6287 }, "call$2", "get$_handleError", 4, 0, 13], |
| 6288 _handleDone$0: [function() { |
| 6289 this._close$0(); |
| 6290 }, "call$0", "get$_handleDone", 0, 0, 1], |
| 6291 _ForwardingStreamSubscription$5: function(_stream, onData, onError, onDone,
cancelOnError, $S, $T) { |
| 6292 var t1, t2; |
| 6293 t1 = this.get$_handleData(); |
| 6294 t2 = this.get$_handleError(); |
| 6295 this._subscription = this._stream._async$_source.listen$3$onDone$onError(t
1, this.get$_handleDone(), t2); |
| 6296 }, |
| 6297 $as_BufferingStreamSubscription: function($S, $T) { |
| 6298 return [$T]; |
| 6299 }, |
| 6300 static: {_ForwardingStreamSubscription$: function(_stream, onData, onError,
onDone, cancelOnError, $S, $T) { |
| 6301 var t1, t2; |
| 6302 t1 = $.Zone__current; |
| 6303 t2 = cancelOnError ? 1 : 0; |
| 6304 t2 = H.setRuntimeTypeInfo(new P._ForwardingStreamSubscription(_stream, n
ull, null, null, null, t1, t2, null, null), [$S, $T]); |
| 6305 t2._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError
, $T); |
| 6306 t2._ForwardingStreamSubscription$5(_stream, onData, onError, onDone, can
celOnError, $S, $T); |
| 6307 return t2; |
| 6308 }} |
| 6309 }, |
| 6310 _MapStream: { |
| 6311 "^": "_ForwardingStream;_transform,_async$_source", |
| 6312 _handleData$2: function(inputEvent, sink) { |
| 6313 var outputEvent, e, s, exception, t1; |
| 6314 outputEvent = null; |
| 6315 try { |
| 6316 outputEvent = this._transform$1(inputEvent); |
| 6317 } catch (exception) { |
| 6318 t1 = H.unwrapException(exception); |
| 6319 e = t1; |
| 6320 s = H.getTraceFromException(exception); |
| 6321 P._addErrorWithReplacement(sink, e, s); |
| 6322 return; |
| 6323 } |
| 6324 sink._async$_add$1(outputEvent); |
| 6325 }, |
| 6326 _transform$1: function(arg0) { |
| 6327 return this._transform.call$1(arg0); |
| 6328 } |
| 6329 }, |
| 6330 Timer: { |
| 6331 "^": "Object;" |
| 6332 }, |
| 6333 AsyncError: { |
| 6334 "^": "Object;error>,stackTrace<", |
| 6335 toString$0: function(_) { |
| 6336 return H.S(this.error); |
| 6337 }, |
| 6338 $isError: 1 |
| 6339 }, |
| 6340 _ZoneFunction: { |
| 6341 "^": "Object;zone,$function" |
| 6342 }, |
| 6343 ZoneSpecification: { |
| 6344 "^": "Object;" |
| 6345 }, |
| 6346 _ZoneSpecification: { |
| 6347 "^": "Object;handleUncaughtError,run,runUnary,runBinary,registerCallback,reg
isterUnaryCallback,registerBinaryCallback,errorCallback,scheduleMicrotask,create
Timer,createPeriodicTimer,print,fork", |
| 6348 handleUncaughtError$2: function(arg0, arg1) { |
| 6349 return this.handleUncaughtError.call$2(arg0, arg1); |
| 6350 }, |
| 6351 handleUncaughtError$3: function(arg0, arg1, arg2) { |
| 6352 return this.handleUncaughtError.call$3(arg0, arg1, arg2); |
| 6353 }, |
| 6354 run$1: function(arg0) { |
| 6355 return this.run.call$1(arg0); |
| 6356 }, |
| 6357 runUnary$2: function(arg0, arg1) { |
| 6358 return this.runUnary.call$2(arg0, arg1); |
| 6359 }, |
| 6360 runBinary$3: function(arg0, arg1, arg2) { |
| 6361 return this.runBinary.call$3(arg0, arg1, arg2); |
| 6362 }, |
| 6363 registerCallback$1: function(arg0) { |
| 6364 return this.registerCallback.call$1(arg0); |
| 6365 }, |
| 6366 registerUnaryCallback$1: function(arg0) { |
| 6367 return this.registerUnaryCallback.call$1(arg0); |
| 6368 }, |
| 6369 registerBinaryCallback$1: function(arg0) { |
| 6370 return this.registerBinaryCallback.call$1(arg0); |
| 6371 }, |
| 6372 errorCallback$2: function(arg0, arg1) { |
| 6373 return this.errorCallback.call$2(arg0, arg1); |
| 6374 }, |
| 6375 scheduleMicrotask$1: function(arg0) { |
| 6376 return this.scheduleMicrotask.call$1(arg0); |
| 6377 }, |
| 6378 createTimer$2: function(arg0, arg1) { |
| 6379 return this.createTimer.call$2(arg0, arg1); |
| 6380 }, |
| 6381 print$1: function($receiver, arg0) { |
| 6382 return this.print.call$1(arg0); |
| 6383 }, |
| 6384 fork$2$specification$zoneValues: function(arg0, arg1) { |
| 6385 return this.fork.call$2$specification$zoneValues(arg0, arg1); |
| 6386 } |
| 6387 }, |
| 6388 ZoneDelegate: { |
| 6389 "^": "Object;" |
| 6390 }, |
| 6391 Zone: { |
| 6392 "^": "Object;" |
| 6393 }, |
| 6394 _ZoneDelegate: { |
| 6395 "^": "Object;_delegationTarget", |
| 6396 handleUncaughtError$3: function(zone, error, stackTrace) { |
| 6397 var implementation, implZone; |
| 6398 implementation = this._delegationTarget.get$_handleUncaughtError(); |
| 6399 implZone = implementation.zone; |
| 6400 return implementation.$function.call$5(implZone, P._parentDelegate(implZon
e), zone, error, stackTrace); |
| 6401 } |
| 6402 }, |
| 6403 _Zone: { |
| 6404 "^": "Object;", |
| 6405 inSameErrorZone$1: function(otherZone) { |
| 6406 return this === otherZone || this.get$errorZone() === otherZone.get$errorZ
one(); |
| 6407 } |
| 6408 }, |
| 6409 _CustomZone: { |
| 6410 "^": "_Zone;_runUnary<,_run<,_runBinary<,_registerCallback<,_registerUnaryCa
llback<,_registerBinaryCallback<,_errorCallback<,_scheduleMicrotask<,_createTime
r<,_createPeriodicTimer<,_print<,_fork<,_handleUncaughtError<,_delegateCache,par
ent>,_map<", |
| 6411 get$_delegate: function() { |
| 6412 var t1 = this._delegateCache; |
| 6413 if (t1 != null) |
| 6414 return t1; |
| 6415 t1 = new P._ZoneDelegate(this); |
| 6416 this._delegateCache = t1; |
| 6417 return t1; |
| 6418 }, |
| 6419 get$errorZone: function() { |
| 6420 return this._handleUncaughtError.zone; |
| 6421 }, |
| 6422 runGuarded$1: function(f) { |
| 6423 var e, s, t1, exception; |
| 6424 try { |
| 6425 t1 = this.run$1(f); |
| 6426 return t1; |
| 6427 } catch (exception) { |
| 6428 t1 = H.unwrapException(exception); |
| 6429 e = t1; |
| 6430 s = H.getTraceFromException(exception); |
| 6431 return this.handleUncaughtError$2(e, s); |
| 6432 } |
| 6433 }, |
| 6434 runUnaryGuarded$2: function(f, arg) { |
| 6435 var e, s, t1, exception; |
| 6436 try { |
| 6437 t1 = this.runUnary$2(f, arg); |
| 6438 return t1; |
| 6439 } catch (exception) { |
| 6440 t1 = H.unwrapException(exception); |
| 6441 e = t1; |
| 6442 s = H.getTraceFromException(exception); |
| 6443 return this.handleUncaughtError$2(e, s); |
| 6444 } |
| 6445 }, |
| 6446 runBinaryGuarded$3: function(f, arg1, arg2) { |
| 6447 var e, s, t1, exception; |
| 6448 try { |
| 6449 t1 = this.runBinary$3(f, arg1, arg2); |
| 6450 return t1; |
| 6451 } catch (exception) { |
| 6452 t1 = H.unwrapException(exception); |
| 6453 e = t1; |
| 6454 s = H.getTraceFromException(exception); |
| 6455 return this.handleUncaughtError$2(e, s); |
| 6456 } |
| 6457 }, |
| 6458 bindCallback$2$runGuarded: function(f, runGuarded) { |
| 6459 var registered = this.registerCallback$1(f); |
| 6460 if (runGuarded) |
| 6461 return new P._CustomZone_bindCallback_closure(this, registered); |
| 6462 else |
| 6463 return new P._CustomZone_bindCallback_closure0(this, registered); |
| 6464 }, |
| 6465 bindCallback$1: function(f) { |
| 6466 return this.bindCallback$2$runGuarded(f, true); |
| 6467 }, |
| 6468 bindUnaryCallback$2$runGuarded: function(f, runGuarded) { |
| 6469 var registered = this.registerUnaryCallback$1(f); |
| 6470 if (runGuarded) |
| 6471 return new P._CustomZone_bindUnaryCallback_closure(this, registered); |
| 6472 else |
| 6473 return new P._CustomZone_bindUnaryCallback_closure0(this, registered); |
| 6474 }, |
| 6475 bindUnaryCallback$1: function(f) { |
| 6476 return this.bindUnaryCallback$2$runGuarded(f, true); |
| 6477 }, |
| 6478 $index: function(_, key) { |
| 6479 var t1, result, t2, value; |
| 6480 t1 = this._map; |
| 6481 result = t1.$index(0, key); |
| 6482 if (result != null || t1.containsKey$1(key)) |
| 6483 return result; |
| 6484 t2 = this.parent; |
| 6485 if (t2 != null) { |
| 6486 value = J.$index$asx(t2, key); |
| 6487 if (value != null) |
| 6488 t1.$indexSet(0, key, value); |
| 6489 return value; |
| 6490 } |
| 6491 return; |
| 6492 }, |
| 6493 handleUncaughtError$2: function(error, stackTrace) { |
| 6494 var implementation, t1, parentDelegate; |
| 6495 implementation = this._handleUncaughtError; |
| 6496 t1 = implementation.zone; |
| 6497 parentDelegate = P._parentDelegate(t1); |
| 6498 return implementation.$function.call$5(t1, parentDelegate, this, error, st
ackTrace); |
| 6499 }, |
| 6500 fork$2$specification$zoneValues: function(specification, zoneValues) { |
| 6501 var implementation, t1, parentDelegate; |
| 6502 implementation = this._fork; |
| 6503 t1 = implementation.zone; |
| 6504 parentDelegate = P._parentDelegate(t1); |
| 6505 return implementation.$function.call$5(t1, parentDelegate, this, specifica
tion, zoneValues); |
| 6506 }, |
| 6507 run$1: function(f) { |
| 6508 var implementation, t1, parentDelegate; |
| 6509 implementation = this._run; |
| 6510 t1 = implementation.zone; |
| 6511 parentDelegate = P._parentDelegate(t1); |
| 6512 return implementation.$function.call$4(t1, parentDelegate, this, f); |
| 6513 }, |
| 6514 runUnary$2: function(f, arg) { |
| 6515 var implementation, t1, parentDelegate; |
| 6516 implementation = this._runUnary; |
| 6517 t1 = implementation.zone; |
| 6518 parentDelegate = P._parentDelegate(t1); |
| 6519 return implementation.$function.call$5(t1, parentDelegate, this, f, arg); |
| 6520 }, |
| 6521 runBinary$3: function(f, arg1, arg2) { |
| 6522 var implementation, t1, parentDelegate; |
| 6523 implementation = this._runBinary; |
| 6524 t1 = implementation.zone; |
| 6525 parentDelegate = P._parentDelegate(t1); |
| 6526 return implementation.$function.call$6(t1, parentDelegate, this, f, arg1,
arg2); |
| 6527 }, |
| 6528 registerCallback$1: function(f) { |
| 6529 var implementation, t1, parentDelegate; |
| 6530 implementation = this._registerCallback; |
| 6531 t1 = implementation.zone; |
| 6532 parentDelegate = P._parentDelegate(t1); |
| 6533 return implementation.$function.call$4(t1, parentDelegate, this, f); |
| 6534 }, |
| 6535 registerUnaryCallback$1: function(f) { |
| 6536 var implementation, t1, parentDelegate; |
| 6537 implementation = this._registerUnaryCallback; |
| 6538 t1 = implementation.zone; |
| 6539 parentDelegate = P._parentDelegate(t1); |
| 6540 return implementation.$function.call$4(t1, parentDelegate, this, f); |
| 6541 }, |
| 6542 registerBinaryCallback$1: function(f) { |
| 6543 var implementation, t1, parentDelegate; |
| 6544 implementation = this._registerBinaryCallback; |
| 6545 t1 = implementation.zone; |
| 6546 parentDelegate = P._parentDelegate(t1); |
| 6547 return implementation.$function.call$4(t1, parentDelegate, this, f); |
| 6548 }, |
| 6549 errorCallback$2: function(error, stackTrace) { |
| 6550 var implementation, implementationZone, parentDelegate; |
| 6551 implementation = this._errorCallback; |
| 6552 implementationZone = implementation.zone; |
| 6553 if (implementationZone === C.C__RootZone) |
| 6554 return; |
| 6555 parentDelegate = P._parentDelegate(implementationZone); |
| 6556 return implementation.$function.call$5(implementationZone, parentDelegate,
this, error, stackTrace); |
| 6557 }, |
| 6558 scheduleMicrotask$1: function(f) { |
| 6559 var implementation, t1, parentDelegate; |
| 6560 implementation = this._scheduleMicrotask; |
| 6561 t1 = implementation.zone; |
| 6562 parentDelegate = P._parentDelegate(t1); |
| 6563 return implementation.$function.call$4(t1, parentDelegate, this, f); |
| 6564 }, |
| 6565 createTimer$2: function(duration, f) { |
| 6566 var implementation, t1, parentDelegate; |
| 6567 implementation = this._createTimer; |
| 6568 t1 = implementation.zone; |
| 6569 parentDelegate = P._parentDelegate(t1); |
| 6570 return implementation.$function.call$5(t1, parentDelegate, this, duration,
f); |
| 6571 }, |
| 6572 print$1: function(_, line) { |
| 6573 var implementation, t1, parentDelegate; |
| 6574 implementation = this._print; |
| 6575 t1 = implementation.zone; |
| 6576 parentDelegate = P._parentDelegate(t1); |
| 6577 return implementation.$function.call$4(t1, parentDelegate, this, line); |
| 6578 }, |
| 6579 _CustomZone$3: function($parent, specification, _map) { |
| 6580 var t1; |
| 6581 this._run = this.parent.get$_run(); |
| 6582 this._runUnary = this.parent.get$_runUnary(); |
| 6583 this._runBinary = this.parent.get$_runBinary(); |
| 6584 this._registerCallback = this.parent.get$_registerCallback(); |
| 6585 this._registerUnaryCallback = this.parent.get$_registerUnaryCallback(); |
| 6586 this._registerBinaryCallback = this.parent.get$_registerBinaryCallback(); |
| 6587 this._errorCallback = this.parent.get$_errorCallback(); |
| 6588 this._scheduleMicrotask = this.parent.get$_scheduleMicrotask(); |
| 6589 this._createTimer = this.parent.get$_createTimer(); |
| 6590 this._createPeriodicTimer = this.parent.get$_createPeriodicTimer(); |
| 6591 this._print = this.parent.get$_print(); |
| 6592 this._fork = this.parent.get$_fork(); |
| 6593 t1 = specification.handleUncaughtError; |
| 6594 this._handleUncaughtError = t1 != null ? new P._ZoneFunction(this, t1) : t
his.parent.get$_handleUncaughtError(); |
| 6595 } |
| 6596 }, |
| 6597 _CustomZone_bindCallback_closure: { |
| 6598 "^": "Closure:0;this_0,registered_1", |
| 6599 call$0: function() { |
| 6600 return this.this_0.runGuarded$1(this.registered_1); |
| 6601 } |
| 6602 }, |
| 6603 _CustomZone_bindCallback_closure0: { |
| 6604 "^": "Closure:0;this_2,registered_3", |
| 6605 call$0: function() { |
| 6606 return this.this_2.run$1(this.registered_3); |
| 6607 } |
| 6608 }, |
| 6609 _CustomZone_bindUnaryCallback_closure: { |
| 6610 "^": "Closure:2;this_0,registered_1", |
| 6611 call$1: function(arg) { |
| 6612 return this.this_0.runUnaryGuarded$2(this.registered_1, arg); |
| 6613 } |
| 6614 }, |
| 6615 _CustomZone_bindUnaryCallback_closure0: { |
| 6616 "^": "Closure:2;this_2,registered_3", |
| 6617 call$1: function(arg) { |
| 6618 return this.this_2.runUnary$2(this.registered_3, arg); |
| 6619 } |
| 6620 }, |
| 6621 _rootHandleUncaughtError_closure: { |
| 6622 "^": "Closure:0;error_0,stackTrace_1", |
| 6623 call$0: function() { |
| 6624 var t1 = this.error_0; |
| 6625 throw H.wrapException(new P._UncaughtAsyncError(t1, P._UncaughtAsyncError_
_getBestStackTrace(t1, this.stackTrace_1))); |
| 6626 } |
| 6627 }, |
| 6628 _RootZone: { |
| 6629 "^": "_Zone;", |
| 6630 get$_run: function() { |
| 6631 return C._ZoneFunction__RootZone__rootRun; |
| 6632 }, |
| 6633 get$_runUnary: function() { |
| 6634 return C._ZoneFunction__RootZone__rootRunUnary; |
| 6635 }, |
| 6636 get$_runBinary: function() { |
| 6637 return C._ZoneFunction__RootZone__rootRunBinary; |
| 6638 }, |
| 6639 get$_registerCallback: function() { |
| 6640 return C._ZoneFunction__RootZone__rootRegisterCallback; |
| 6641 }, |
| 6642 get$_registerUnaryCallback: function() { |
| 6643 return C._ZoneFunction_Eeh; |
| 6644 }, |
| 6645 get$_registerBinaryCallback: function() { |
| 6646 return C._ZoneFunction_7G2; |
| 6647 }, |
| 6648 get$_errorCallback: function() { |
| 6649 return C._ZoneFunction__RootZone__rootErrorCallback; |
| 6650 }, |
| 6651 get$_scheduleMicrotask: function() { |
| 6652 return C._ZoneFunction__RootZone__rootScheduleMicrotask; |
| 6653 }, |
| 6654 get$_createTimer: function() { |
| 6655 return C._ZoneFunction__RootZone__rootCreateTimer; |
| 6656 }, |
| 6657 get$_createPeriodicTimer: function() { |
| 6658 return C._ZoneFunction_3bB; |
| 6659 }, |
| 6660 get$_print: function() { |
| 6661 return C._ZoneFunction__RootZone__rootPrint; |
| 6662 }, |
| 6663 get$_fork: function() { |
| 6664 return C._ZoneFunction__RootZone__rootFork; |
| 6665 }, |
| 6666 get$_handleUncaughtError: function() { |
| 6667 return C._ZoneFunction_NMc; |
| 6668 }, |
| 6669 get$parent: function(_) { |
| 6670 return; |
| 6671 }, |
| 6672 get$_map: function() { |
| 6673 return $.get$_RootZone__rootMap(); |
| 6674 }, |
| 6675 get$_delegate: function() { |
| 6676 var t1 = $._RootZone__rootDelegate; |
| 6677 if (t1 != null) |
| 6678 return t1; |
| 6679 t1 = new P._ZoneDelegate(this); |
| 6680 $._RootZone__rootDelegate = t1; |
| 6681 return t1; |
| 6682 }, |
| 6683 get$errorZone: function() { |
| 6684 return this; |
| 6685 }, |
| 6686 runGuarded$1: function(f) { |
| 6687 var e, s, t1, exception; |
| 6688 try { |
| 6689 if (C.C__RootZone === $.Zone__current) { |
| 6690 t1 = f.call$0(); |
| 6691 return t1; |
| 6692 } |
| 6693 t1 = P._rootRun(null, null, this, f); |
| 6694 return t1; |
| 6695 } catch (exception) { |
| 6696 t1 = H.unwrapException(exception); |
| 6697 e = t1; |
| 6698 s = H.getTraceFromException(exception); |
| 6699 return P._rootHandleUncaughtError(null, null, this, e, s); |
| 6700 } |
| 6701 }, |
| 6702 runUnaryGuarded$2: function(f, arg) { |
| 6703 var e, s, t1, exception; |
| 6704 try { |
| 6705 if (C.C__RootZone === $.Zone__current) { |
| 6706 t1 = f.call$1(arg); |
| 6707 return t1; |
| 6708 } |
| 6709 t1 = P._rootRunUnary(null, null, this, f, arg); |
| 6710 return t1; |
| 6711 } catch (exception) { |
| 6712 t1 = H.unwrapException(exception); |
| 6713 e = t1; |
| 6714 s = H.getTraceFromException(exception); |
| 6715 return P._rootHandleUncaughtError(null, null, this, e, s); |
| 6716 } |
| 6717 }, |
| 6718 runBinaryGuarded$3: function(f, arg1, arg2) { |
| 6719 var e, s, t1, exception; |
| 6720 try { |
| 6721 if (C.C__RootZone === $.Zone__current) { |
| 6722 t1 = f.call$2(arg1, arg2); |
| 6723 return t1; |
| 6724 } |
| 6725 t1 = P._rootRunBinary(null, null, this, f, arg1, arg2); |
| 6726 return t1; |
| 6727 } catch (exception) { |
| 6728 t1 = H.unwrapException(exception); |
| 6729 e = t1; |
| 6730 s = H.getTraceFromException(exception); |
| 6731 return P._rootHandleUncaughtError(null, null, this, e, s); |
| 6732 } |
| 6733 }, |
| 6734 bindCallback$2$runGuarded: function(f, runGuarded) { |
| 6735 if (runGuarded) |
| 6736 return new P._RootZone_bindCallback_closure(this, f); |
| 6737 else |
| 6738 return new P._RootZone_bindCallback_closure0(this, f); |
| 6739 }, |
| 6740 bindCallback$1: function(f) { |
| 6741 return this.bindCallback$2$runGuarded(f, true); |
| 6742 }, |
| 6743 bindUnaryCallback$2$runGuarded: function(f, runGuarded) { |
| 6744 if (runGuarded) |
| 6745 return new P._RootZone_bindUnaryCallback_closure(this, f); |
| 6746 else |
| 6747 return new P._RootZone_bindUnaryCallback_closure0(this, f); |
| 6748 }, |
| 6749 bindUnaryCallback$1: function(f) { |
| 6750 return this.bindUnaryCallback$2$runGuarded(f, true); |
| 6751 }, |
| 6752 $index: function(_, key) { |
| 6753 return; |
| 6754 }, |
| 6755 handleUncaughtError$2: function(error, stackTrace) { |
| 6756 return P._rootHandleUncaughtError(null, null, this, error, stackTrace); |
| 6757 }, |
| 6758 fork$2$specification$zoneValues: function(specification, zoneValues) { |
| 6759 return P._rootFork(null, null, this, specification, zoneValues); |
| 6760 }, |
| 6761 run$1: function(f) { |
| 6762 if ($.Zone__current === C.C__RootZone) |
| 6763 return f.call$0(); |
| 6764 return P._rootRun(null, null, this, f); |
| 6765 }, |
| 6766 runUnary$2: function(f, arg) { |
| 6767 if ($.Zone__current === C.C__RootZone) |
| 6768 return f.call$1(arg); |
| 6769 return P._rootRunUnary(null, null, this, f, arg); |
| 6770 }, |
| 6771 runBinary$3: function(f, arg1, arg2) { |
| 6772 if ($.Zone__current === C.C__RootZone) |
| 6773 return f.call$2(arg1, arg2); |
| 6774 return P._rootRunBinary(null, null, this, f, arg1, arg2); |
| 6775 }, |
| 6776 registerCallback$1: function(f) { |
| 6777 return f; |
| 6778 }, |
| 6779 registerUnaryCallback$1: function(f) { |
| 6780 return f; |
| 6781 }, |
| 6782 registerBinaryCallback$1: function(f) { |
| 6783 return f; |
| 6784 }, |
| 6785 errorCallback$2: function(error, stackTrace) { |
| 6786 return; |
| 6787 }, |
| 6788 scheduleMicrotask$1: function(f) { |
| 6789 P._rootScheduleMicrotask(null, null, this, f); |
| 6790 }, |
| 6791 createTimer$2: function(duration, f) { |
| 6792 return P.Timer__createTimer(duration, f); |
| 6793 }, |
| 6794 print$1: function(_, line) { |
| 6795 H.printString(line); |
| 6796 } |
| 6797 }, |
| 6798 _RootZone_bindCallback_closure: { |
| 6799 "^": "Closure:0;this_0,f_1", |
| 6800 call$0: function() { |
| 6801 return this.this_0.runGuarded$1(this.f_1); |
| 6802 } |
| 6803 }, |
| 6804 _RootZone_bindCallback_closure0: { |
| 6805 "^": "Closure:0;this_2,f_3", |
| 6806 call$0: function() { |
| 6807 return this.this_2.run$1(this.f_3); |
| 6808 } |
| 6809 }, |
| 6810 _RootZone_bindUnaryCallback_closure: { |
| 6811 "^": "Closure:2;this_0,f_1", |
| 6812 call$1: function(arg) { |
| 6813 return this.this_0.runUnaryGuarded$2(this.f_1, arg); |
| 6814 } |
| 6815 }, |
| 6816 _RootZone_bindUnaryCallback_closure0: { |
| 6817 "^": "Closure:2;this_2,f_3", |
| 6818 call$1: function(arg) { |
| 6819 return this.this_2.runUnary$2(this.f_3, arg); |
| 6820 } |
| 6821 }, |
| 6822 runZoned_closure: { |
| 6823 "^": "Closure:14;onError_0", |
| 6824 call$5: function($self, $parent, zone, error, stackTrace) { |
| 6825 var e, s, t1, t2, exception; |
| 6826 try { |
| 6827 t1 = this.onError_0; |
| 6828 t2 = H.getDynamicRuntimeType(); |
| 6829 t2 = H.buildFunctionType(t2, [t2, t2])._isTest$1(t1); |
| 6830 if (t2) { |
| 6831 t1 = J.get$parent$x($self).runBinary$3(t1, error, stackTrace); |
| 6832 return t1; |
| 6833 } |
| 6834 t1 = J.get$parent$x($self).runUnary$2(t1, error); |
| 6835 return t1; |
| 6836 } catch (exception) { |
| 6837 t1 = H.unwrapException(exception); |
| 6838 e = t1; |
| 6839 s = H.getTraceFromException(exception); |
| 6840 t1 = e; |
| 6841 t2 = error; |
| 6842 if (t1 == null ? t2 == null : t1 === t2) |
| 6843 return $parent.handleUncaughtError$3(zone, error, stackTrace); |
| 6844 else |
| 6845 return $parent.handleUncaughtError$3(zone, e, s); |
| 6846 } |
| 6847 } |
| 6848 } |
| 6849 }], |
| 6850 ["dart.collection", "dart:collection", , P, { |
| 6851 "^": "", |
| 6852 LinkedHashMap_LinkedHashMap$_literal: function(keyValuePairs, $K, $V) { |
| 6853 return H.fillLiteralMap(keyValuePairs, H.setRuntimeTypeInfo(new H.JsLinkedHa
shMap(0, null, null, null, null, null, 0), [$K, $V])); |
| 6854 }, |
| 6855 LinkedHashMap_LinkedHashMap$_empty: function($K, $V) { |
| 6856 return H.setRuntimeTypeInfo(new H.JsLinkedHashMap(0, null, null, null, null,
null, 0), [$K, $V]); |
| 6857 }, |
| 6858 _defaultEquals: [function(a, b) { |
| 6859 return J.$eq(a, b); |
| 6860 }, "call$2", "_defaultEquals$closure", 4, 0, 44], |
| 6861 _defaultHashCode: [function(a) { |
| 6862 return J.get$hashCode$(a); |
| 6863 }, "call$1", "_defaultHashCode$closure", 2, 0, 26], |
| 6864 HashMap_HashMap: function(equals, hashCode, isValidKey, $K, $V) { |
| 6865 return H.setRuntimeTypeInfo(new P._HashMap(0, null, null, null, null), [$K,
$V]); |
| 6866 }, |
| 6867 HashMap_HashMap$from: function(other, $K, $V) { |
| 6868 var result = P.HashMap_HashMap(null, null, null, $K, $V); |
| 6869 J.forEach$1$ax(other, new P.HashMap_HashMap$from_closure(result)); |
| 6870 return result; |
| 6871 }, |
| 6872 IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDel
imiter) { |
| 6873 var parts, t1; |
| 6874 if (P.IterableBase__isToStringVisiting(iterable)) { |
| 6875 if (leftDelimiter === "(" && rightDelimiter === ")") |
| 6876 return "(...)"; |
| 6877 return leftDelimiter + "..." + rightDelimiter; |
| 6878 } |
| 6879 parts = []; |
| 6880 t1 = $.get$IterableBase__toStringVisiting(); |
| 6881 t1.push(iterable); |
| 6882 try { |
| 6883 P.IterableBase__iterablePartsToStrings(iterable, parts); |
| 6884 } finally { |
| 6885 if (0 >= t1.length) |
| 6886 return H.ioore(t1, 0); |
| 6887 t1.pop(); |
| 6888 } |
| 6889 t1 = new P.StringBuffer(leftDelimiter); |
| 6890 t1.writeAll$2(parts, ", "); |
| 6891 t1 = t1._contents += rightDelimiter; |
| 6892 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 6893 }, |
| 6894 IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDeli
miter) { |
| 6895 var buffer, t1; |
| 6896 if (P.IterableBase__isToStringVisiting(iterable)) |
| 6897 return leftDelimiter + "..." + rightDelimiter; |
| 6898 buffer = new P.StringBuffer(leftDelimiter); |
| 6899 t1 = $.get$IterableBase__toStringVisiting(); |
| 6900 t1.push(iterable); |
| 6901 try { |
| 6902 buffer.writeAll$2(iterable, ", "); |
| 6903 } finally { |
| 6904 if (0 >= t1.length) |
| 6905 return H.ioore(t1, 0); |
| 6906 t1.pop(); |
| 6907 } |
| 6908 t1 = buffer; |
| 6909 t1._contents = t1.get$_contents() + rightDelimiter; |
| 6910 t1 = buffer.get$_contents(); |
| 6911 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 6912 }, |
| 6913 IterableBase__isToStringVisiting: function(o) { |
| 6914 var i, t1; |
| 6915 for (i = 0; t1 = $.get$IterableBase__toStringVisiting(), i < t1.length; ++i)
{ |
| 6916 t1 = t1[i]; |
| 6917 if (o == null ? t1 == null : o === t1) |
| 6918 return true; |
| 6919 } |
| 6920 return false; |
| 6921 }, |
| 6922 IterableBase__iterablePartsToStrings: function(iterable, parts) { |
| 6923 var it, $length, count, next, ultimateString, penultimateString, penultimate
, ultimate, ultimate0, elision; |
| 6924 it = iterable.get$iterator(iterable); |
| 6925 $length = 0; |
| 6926 count = 0; |
| 6927 while (true) { |
| 6928 if (!($length < 80 || count < 3)) |
| 6929 break; |
| 6930 if (!it.moveNext$0()) |
| 6931 return; |
| 6932 next = H.S(it.get$current()); |
| 6933 parts.push(next); |
| 6934 $length += next.length + 2; |
| 6935 ++count; |
| 6936 } |
| 6937 if (!it.moveNext$0()) { |
| 6938 if (count <= 5) |
| 6939 return; |
| 6940 if (0 >= parts.length) |
| 6941 return H.ioore(parts, 0); |
| 6942 ultimateString = parts.pop(); |
| 6943 if (0 >= parts.length) |
| 6944 return H.ioore(parts, 0); |
| 6945 penultimateString = parts.pop(); |
| 6946 } else { |
| 6947 penultimate = it.get$current(); |
| 6948 ++count; |
| 6949 if (!it.moveNext$0()) { |
| 6950 if (count <= 4) { |
| 6951 parts.push(H.S(penultimate)); |
| 6952 return; |
| 6953 } |
| 6954 ultimateString = H.S(penultimate); |
| 6955 if (0 >= parts.length) |
| 6956 return H.ioore(parts, 0); |
| 6957 penultimateString = parts.pop(); |
| 6958 $length += ultimateString.length + 2; |
| 6959 } else { |
| 6960 ultimate = it.get$current(); |
| 6961 ++count; |
| 6962 for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { |
| 6963 ultimate0 = it.get$current(); |
| 6964 ++count; |
| 6965 if (count > 100) { |
| 6966 while (true) { |
| 6967 if (!($length > 75 && count > 3)) |
| 6968 break; |
| 6969 if (0 >= parts.length) |
| 6970 return H.ioore(parts, 0); |
| 6971 $length -= parts.pop().length + 2; |
| 6972 --count; |
| 6973 } |
| 6974 parts.push("..."); |
| 6975 return; |
| 6976 } |
| 6977 } |
| 6978 penultimateString = H.S(penultimate); |
| 6979 ultimateString = H.S(ultimate); |
| 6980 $length += ultimateString.length + penultimateString.length + 4; |
| 6981 } |
| 6982 } |
| 6983 if (count > parts.length + 2) { |
| 6984 $length += 5; |
| 6985 elision = "..."; |
| 6986 } else |
| 6987 elision = null; |
| 6988 while (true) { |
| 6989 if (!($length > 80 && parts.length > 3)) |
| 6990 break; |
| 6991 if (0 >= parts.length) |
| 6992 return H.ioore(parts, 0); |
| 6993 $length -= parts.pop().length + 2; |
| 6994 if (elision == null) { |
| 6995 $length += 5; |
| 6996 elision = "..."; |
| 6997 } |
| 6998 } |
| 6999 if (elision != null) |
| 7000 parts.push(elision); |
| 7001 parts.push(penultimateString); |
| 7002 parts.push(ultimateString); |
| 7003 }, |
| 7004 LinkedHashMap_LinkedHashMap: function(equals, hashCode, isValidKey, $K, $V) { |
| 7005 return H.setRuntimeTypeInfo(new H.JsLinkedHashMap(0, null, null, null, null,
null, 0), [$K, $V]); |
| 7006 }, |
| 7007 LinkedHashMap_LinkedHashMap$identity: function($K, $V) { |
| 7008 return H.setRuntimeTypeInfo(new P._LinkedIdentityHashMap(0, null, null, null
, null, null, 0), [$K, $V]); |
| 7009 }, |
| 7010 LinkedHashSet_LinkedHashSet: function(equals, hashCode, isValidKey, $E) { |
| 7011 return H.setRuntimeTypeInfo(new P._LinkedHashSet(0, null, null, null, null,
null, 0), [$E]); |
| 7012 }, |
| 7013 Maps_mapToString: function(m) { |
| 7014 var t1, result, t2; |
| 7015 t1 = {}; |
| 7016 if (P.IterableBase__isToStringVisiting(m)) |
| 7017 return "{...}"; |
| 7018 result = new P.StringBuffer(""); |
| 7019 try { |
| 7020 $.get$IterableBase__toStringVisiting().push(m); |
| 7021 t2 = result; |
| 7022 t2._contents = t2.get$_contents() + "{"; |
| 7023 t1.first_0 = true; |
| 7024 J.forEach$1$ax(m, new P.Maps_mapToString_closure(t1, result)); |
| 7025 t1 = result; |
| 7026 t1._contents = t1.get$_contents() + "}"; |
| 7027 } finally { |
| 7028 t1 = $.get$IterableBase__toStringVisiting(); |
| 7029 if (0 >= t1.length) |
| 7030 return H.ioore(t1, 0); |
| 7031 t1.pop(); |
| 7032 } |
| 7033 t1 = result.get$_contents(); |
| 7034 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 7035 }, |
| 7036 _HashMap: { |
| 7037 "^": "Object;_collection$_length,_collection$_strings,_collection$_nums,_col
lection$_rest,_keys", |
| 7038 get$length: function(_) { |
| 7039 return this._collection$_length; |
| 7040 }, |
| 7041 get$isEmpty: function(_) { |
| 7042 return this._collection$_length === 0; |
| 7043 }, |
| 7044 get$isNotEmpty: function(_) { |
| 7045 return this._collection$_length !== 0; |
| 7046 }, |
| 7047 containsKey$1: function(key) { |
| 7048 var strings, nums; |
| 7049 if (typeof key === "string" && key !== "__proto__") { |
| 7050 strings = this._collection$_strings; |
| 7051 return strings == null ? false : strings[key] != null; |
| 7052 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 7053 nums = this._collection$_nums; |
| 7054 return nums == null ? false : nums[key] != null; |
| 7055 } else |
| 7056 return this._containsKey$1(key); |
| 7057 }, |
| 7058 _containsKey$1: function(key) { |
| 7059 var rest = this._collection$_rest; |
| 7060 if (rest == null) |
| 7061 return false; |
| 7062 return this._findBucketIndex$2(rest[this._computeHashCode$1(key)], key) >=
0; |
| 7063 }, |
| 7064 $index: function(_, key) { |
| 7065 var strings, t1, entry, nums; |
| 7066 if (typeof key === "string" && key !== "__proto__") { |
| 7067 strings = this._collection$_strings; |
| 7068 if (strings == null) |
| 7069 t1 = null; |
| 7070 else { |
| 7071 entry = strings[key]; |
| 7072 t1 = entry === strings ? null : entry; |
| 7073 } |
| 7074 return t1; |
| 7075 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 7076 nums = this._collection$_nums; |
| 7077 if (nums == null) |
| 7078 t1 = null; |
| 7079 else { |
| 7080 entry = nums[key]; |
| 7081 t1 = entry === nums ? null : entry; |
| 7082 } |
| 7083 return t1; |
| 7084 } else |
| 7085 return this._get$1(key); |
| 7086 }, |
| 7087 _get$1: function(key) { |
| 7088 var rest, bucket, index; |
| 7089 rest = this._collection$_rest; |
| 7090 if (rest == null) |
| 7091 return; |
| 7092 bucket = rest[this._computeHashCode$1(key)]; |
| 7093 index = this._findBucketIndex$2(bucket, key); |
| 7094 return index < 0 ? null : bucket[index + 1]; |
| 7095 }, |
| 7096 $indexSet: function(_, key, value) { |
| 7097 var strings, nums; |
| 7098 if (typeof key === "string" && key !== "__proto__") { |
| 7099 strings = this._collection$_strings; |
| 7100 if (strings == null) { |
| 7101 strings = P._HashMap__newHashTable(); |
| 7102 this._collection$_strings = strings; |
| 7103 } |
| 7104 this._collection$_addHashTableEntry$3(strings, key, value); |
| 7105 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { |
| 7106 nums = this._collection$_nums; |
| 7107 if (nums == null) { |
| 7108 nums = P._HashMap__newHashTable(); |
| 7109 this._collection$_nums = nums; |
| 7110 } |
| 7111 this._collection$_addHashTableEntry$3(nums, key, value); |
| 7112 } else |
| 7113 this._set$2(key, value); |
| 7114 }, |
| 7115 _set$2: function(key, value) { |
| 7116 var rest, hash, bucket, index; |
| 7117 rest = this._collection$_rest; |
| 7118 if (rest == null) { |
| 7119 rest = P._HashMap__newHashTable(); |
| 7120 this._collection$_rest = rest; |
| 7121 } |
| 7122 hash = this._computeHashCode$1(key); |
| 7123 bucket = rest[hash]; |
| 7124 if (bucket == null) { |
| 7125 P._HashMap__setTableEntry(rest, hash, [key, value]); |
| 7126 ++this._collection$_length; |
| 7127 this._keys = null; |
| 7128 } else { |
| 7129 index = this._findBucketIndex$2(bucket, key); |
| 7130 if (index >= 0) |
| 7131 bucket[index + 1] = value; |
| 7132 else { |
| 7133 bucket.push(key, value); |
| 7134 ++this._collection$_length; |
| 7135 this._keys = null; |
| 7136 } |
| 7137 } |
| 7138 }, |
| 7139 forEach$1: function(_, action) { |
| 7140 var keys, $length, i, key; |
| 7141 keys = this._collection$_computeKeys$0(); |
| 7142 for ($length = keys.length, i = 0; i < $length; ++i) { |
| 7143 key = keys[i]; |
| 7144 action.call$2(key, this.$index(0, key)); |
| 7145 if (keys !== this._keys) |
| 7146 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 7147 } |
| 7148 }, |
| 7149 _collection$_computeKeys$0: function() { |
| 7150 var t1, result, strings, names, entries, index, i, nums, rest, bucket, $le
ngth, i0; |
| 7151 t1 = this._keys; |
| 7152 if (t1 != null) |
| 7153 return t1; |
| 7154 result = Array(this._collection$_length); |
| 7155 result.fixed$length = Array; |
| 7156 strings = this._collection$_strings; |
| 7157 if (strings != null) { |
| 7158 names = Object.getOwnPropertyNames(strings); |
| 7159 entries = names.length; |
| 7160 for (index = 0, i = 0; i < entries; ++i) { |
| 7161 result[index] = names[i]; |
| 7162 ++index; |
| 7163 } |
| 7164 } else |
| 7165 index = 0; |
| 7166 nums = this._collection$_nums; |
| 7167 if (nums != null) { |
| 7168 names = Object.getOwnPropertyNames(nums); |
| 7169 entries = names.length; |
| 7170 for (i = 0; i < entries; ++i) { |
| 7171 result[index] = +names[i]; |
| 7172 ++index; |
| 7173 } |
| 7174 } |
| 7175 rest = this._collection$_rest; |
| 7176 if (rest != null) { |
| 7177 names = Object.getOwnPropertyNames(rest); |
| 7178 entries = names.length; |
| 7179 for (i = 0; i < entries; ++i) { |
| 7180 bucket = rest[names[i]]; |
| 7181 $length = bucket.length; |
| 7182 for (i0 = 0; i0 < $length; i0 += 2) { |
| 7183 result[index] = bucket[i0]; |
| 7184 ++index; |
| 7185 } |
| 7186 } |
| 7187 } |
| 7188 this._keys = result; |
| 7189 return result; |
| 7190 }, |
| 7191 _collection$_addHashTableEntry$3: function(table, key, value) { |
| 7192 if (table[key] == null) { |
| 7193 ++this._collection$_length; |
| 7194 this._keys = null; |
| 7195 } |
| 7196 P._HashMap__setTableEntry(table, key, value); |
| 7197 }, |
| 7198 _computeHashCode$1: function(key) { |
| 7199 return J.get$hashCode$(key) & 0x3ffffff; |
| 7200 }, |
| 7201 _findBucketIndex$2: function(bucket, key) { |
| 7202 var $length, i; |
| 7203 if (bucket == null) |
| 7204 return -1; |
| 7205 $length = bucket.length; |
| 7206 for (i = 0; i < $length; i += 2) |
| 7207 if (J.$eq(bucket[i], key)) |
| 7208 return i; |
| 7209 return -1; |
| 7210 }, |
| 7211 $isMap: 1, |
| 7212 static: {_HashMap__setTableEntry: function(table, key, value) { |
| 7213 if (value == null) |
| 7214 table[key] = table; |
| 7215 else |
| 7216 table[key] = value; |
| 7217 }, _HashMap__newHashTable: function() { |
| 7218 var table = Object.create(null); |
| 7219 P._HashMap__setTableEntry(table, "<non-identifier-key>", table); |
| 7220 delete table["<non-identifier-key>"]; |
| 7221 return table; |
| 7222 }} |
| 7223 }, |
| 7224 _LinkedIdentityHashMap: { |
| 7225 "^": "JsLinkedHashMap;__js_helper$_length,_strings,_nums,_rest,_first,_last,
_modifications", |
| 7226 internalComputeHashCode$1: function(key) { |
| 7227 return H.objectHashCode(key) & 0x3ffffff; |
| 7228 }, |
| 7229 internalFindBucketIndex$2: function(bucket, key) { |
| 7230 var $length, i, t1; |
| 7231 if (bucket == null) |
| 7232 return -1; |
| 7233 $length = bucket.length; |
| 7234 for (i = 0; i < $length; ++i) { |
| 7235 t1 = bucket[i].get$hashMapCellKey(); |
| 7236 if (t1 == null ? key == null : t1 === key) |
| 7237 return i; |
| 7238 } |
| 7239 return -1; |
| 7240 } |
| 7241 }, |
| 7242 _LinkedHashSet: { |
| 7243 "^": "_HashSetBase;_collection$_length,_collection$_strings,_collection$_num
s,_collection$_rest,_collection$_first,_collection$_last,_collection$_modificati
ons", |
| 7244 get$iterator: function(_) { |
| 7245 var t1 = new P.LinkedHashSetIterator(this, this._collection$_modifications
, null, null); |
| 7246 t1._collection$_cell = this._collection$_first; |
| 7247 return t1; |
| 7248 }, |
| 7249 get$length: function(_) { |
| 7250 return this._collection$_length; |
| 7251 }, |
| 7252 get$isEmpty: function(_) { |
| 7253 return this._collection$_length === 0; |
| 7254 }, |
| 7255 get$isNotEmpty: function(_) { |
| 7256 return this._collection$_length !== 0; |
| 7257 }, |
| 7258 contains$1: function(_, object) { |
| 7259 var strings, nums; |
| 7260 if (typeof object === "string" && object !== "__proto__") { |
| 7261 strings = this._collection$_strings; |
| 7262 if (strings == null) |
| 7263 return false; |
| 7264 return strings[object] != null; |
| 7265 } else if (typeof object === "number" && (object & 0x3ffffff) === object)
{ |
| 7266 nums = this._collection$_nums; |
| 7267 if (nums == null) |
| 7268 return false; |
| 7269 return nums[object] != null; |
| 7270 } else |
| 7271 return this._contains$1(object); |
| 7272 }, |
| 7273 _contains$1: function(object) { |
| 7274 var rest = this._collection$_rest; |
| 7275 if (rest == null) |
| 7276 return false; |
| 7277 return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], obje
ct) >= 0; |
| 7278 }, |
| 7279 lookup$1: function(object) { |
| 7280 var t1; |
| 7281 if (!(typeof object === "string" && object !== "__proto__")) |
| 7282 t1 = typeof object === "number" && (object & 0x3ffffff) === object; |
| 7283 else |
| 7284 t1 = true; |
| 7285 if (t1) |
| 7286 return this.contains$1(0, object) ? object : null; |
| 7287 else |
| 7288 return this._lookup$1(object); |
| 7289 }, |
| 7290 _lookup$1: function(object) { |
| 7291 var rest, bucket, index; |
| 7292 rest = this._collection$_rest; |
| 7293 if (rest == null) |
| 7294 return; |
| 7295 bucket = rest[this._computeHashCode$1(object)]; |
| 7296 index = this._findBucketIndex$2(bucket, object); |
| 7297 if (index < 0) |
| 7298 return; |
| 7299 return J.$index$asx(bucket, index).get$_element(); |
| 7300 }, |
| 7301 forEach$1: function(_, action) { |
| 7302 var cell, modifications; |
| 7303 cell = this._collection$_first; |
| 7304 modifications = this._collection$_modifications; |
| 7305 for (; cell != null;) { |
| 7306 action.call$1(cell._element); |
| 7307 if (modifications !== this._collection$_modifications) |
| 7308 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 7309 cell = cell._collection$_next; |
| 7310 } |
| 7311 }, |
| 7312 get$last: function(_) { |
| 7313 var t1 = this._collection$_last; |
| 7314 if (t1 == null) |
| 7315 throw H.wrapException(P.StateError$("No elements")); |
| 7316 return t1._element; |
| 7317 }, |
| 7318 add$1: function(_, element) { |
| 7319 var strings, table, nums; |
| 7320 if (typeof element === "string" && element !== "__proto__") { |
| 7321 strings = this._collection$_strings; |
| 7322 if (strings == null) { |
| 7323 table = Object.create(null); |
| 7324 table["<non-identifier-key>"] = table; |
| 7325 delete table["<non-identifier-key>"]; |
| 7326 this._collection$_strings = table; |
| 7327 strings = table; |
| 7328 } |
| 7329 return this._collection$_addHashTableEntry$2(strings, element); |
| 7330 } else if (typeof element === "number" && (element & 0x3ffffff) === elemen
t) { |
| 7331 nums = this._collection$_nums; |
| 7332 if (nums == null) { |
| 7333 table = Object.create(null); |
| 7334 table["<non-identifier-key>"] = table; |
| 7335 delete table["<non-identifier-key>"]; |
| 7336 this._collection$_nums = table; |
| 7337 nums = table; |
| 7338 } |
| 7339 return this._collection$_addHashTableEntry$2(nums, element); |
| 7340 } else |
| 7341 return this._add$1(element); |
| 7342 }, |
| 7343 _add$1: function(element) { |
| 7344 var rest, hash, bucket; |
| 7345 rest = this._collection$_rest; |
| 7346 if (rest == null) { |
| 7347 rest = P._LinkedHashSet__newHashTable(); |
| 7348 this._collection$_rest = rest; |
| 7349 } |
| 7350 hash = this._computeHashCode$1(element); |
| 7351 bucket = rest[hash]; |
| 7352 if (bucket == null) |
| 7353 rest[hash] = [this._collection$_newLinkedCell$1(element)]; |
| 7354 else { |
| 7355 if (this._findBucketIndex$2(bucket, element) >= 0) |
| 7356 return false; |
| 7357 bucket.push(this._collection$_newLinkedCell$1(element)); |
| 7358 } |
| 7359 return true; |
| 7360 }, |
| 7361 remove$1: function(_, object) { |
| 7362 if (typeof object === "string" && object !== "__proto__") |
| 7363 return this._collection$_removeHashTableEntry$2(this._collection$_string
s, object); |
| 7364 else if (typeof object === "number" && (object & 0x3ffffff) === object) |
| 7365 return this._collection$_removeHashTableEntry$2(this._collection$_nums,
object); |
| 7366 else |
| 7367 return this._remove$1(object); |
| 7368 }, |
| 7369 _remove$1: function(object) { |
| 7370 var rest, bucket, index; |
| 7371 rest = this._collection$_rest; |
| 7372 if (rest == null) |
| 7373 return false; |
| 7374 bucket = rest[this._computeHashCode$1(object)]; |
| 7375 index = this._findBucketIndex$2(bucket, object); |
| 7376 if (index < 0) |
| 7377 return false; |
| 7378 this._collection$_unlinkCell$1(bucket.splice(index, 1)[0]); |
| 7379 return true; |
| 7380 }, |
| 7381 clear$0: function(_) { |
| 7382 if (this._collection$_length > 0) { |
| 7383 this._collection$_last = null; |
| 7384 this._collection$_first = null; |
| 7385 this._collection$_rest = null; |
| 7386 this._collection$_nums = null; |
| 7387 this._collection$_strings = null; |
| 7388 this._collection$_length = 0; |
| 7389 this._collection$_modifications = this._collection$_modifications + 1 &
67108863; |
| 7390 } |
| 7391 }, |
| 7392 _collection$_addHashTableEntry$2: function(table, element) { |
| 7393 if (table[element] != null) |
| 7394 return false; |
| 7395 table[element] = this._collection$_newLinkedCell$1(element); |
| 7396 return true; |
| 7397 }, |
| 7398 _collection$_removeHashTableEntry$2: function(table, element) { |
| 7399 var cell; |
| 7400 if (table == null) |
| 7401 return false; |
| 7402 cell = table[element]; |
| 7403 if (cell == null) |
| 7404 return false; |
| 7405 this._collection$_unlinkCell$1(cell); |
| 7406 delete table[element]; |
| 7407 return true; |
| 7408 }, |
| 7409 _collection$_newLinkedCell$1: function(element) { |
| 7410 var cell, last; |
| 7411 cell = new P.LinkedHashSetCell(element, null, null); |
| 7412 if (this._collection$_first == null) { |
| 7413 this._collection$_last = cell; |
| 7414 this._collection$_first = cell; |
| 7415 } else { |
| 7416 last = this._collection$_last; |
| 7417 cell._collection$_previous = last; |
| 7418 last._collection$_next = cell; |
| 7419 this._collection$_last = cell; |
| 7420 } |
| 7421 ++this._collection$_length; |
| 7422 this._collection$_modifications = this._collection$_modifications + 1 & 67
108863; |
| 7423 return cell; |
| 7424 }, |
| 7425 _collection$_unlinkCell$1: function(cell) { |
| 7426 var previous, next; |
| 7427 previous = cell.get$_collection$_previous(); |
| 7428 next = cell._collection$_next; |
| 7429 if (previous == null) |
| 7430 this._collection$_first = next; |
| 7431 else |
| 7432 previous._collection$_next = next; |
| 7433 if (next == null) |
| 7434 this._collection$_last = previous; |
| 7435 else |
| 7436 next._collection$_previous = previous; |
| 7437 --this._collection$_length; |
| 7438 this._collection$_modifications = this._collection$_modifications + 1 & 67
108863; |
| 7439 }, |
| 7440 _computeHashCode$1: function(element) { |
| 7441 return J.get$hashCode$(element) & 0x3ffffff; |
| 7442 }, |
| 7443 _findBucketIndex$2: function(bucket, element) { |
| 7444 var $length, i; |
| 7445 if (bucket == null) |
| 7446 return -1; |
| 7447 $length = bucket.length; |
| 7448 for (i = 0; i < $length; ++i) |
| 7449 if (J.$eq(bucket[i].get$_element(), element)) |
| 7450 return i; |
| 7451 return -1; |
| 7452 }, |
| 7453 $isEfficientLength: 1, |
| 7454 static: {_LinkedHashSet__newHashTable: function() { |
| 7455 var table = Object.create(null); |
| 7456 table["<non-identifier-key>"] = table; |
| 7457 delete table["<non-identifier-key>"]; |
| 7458 return table; |
| 7459 }} |
| 7460 }, |
| 7461 LinkedHashSetCell: { |
| 7462 "^": "Object;_element<,_collection$_next,_collection$_previous<" |
| 7463 }, |
| 7464 LinkedHashSetIterator: { |
| 7465 "^": "Object;_set,_collection$_modifications,_collection$_cell,_collection$_
current", |
| 7466 get$current: function() { |
| 7467 return this._collection$_current; |
| 7468 }, |
| 7469 moveNext$0: function() { |
| 7470 var t1 = this._set; |
| 7471 if (this._collection$_modifications !== t1._collection$_modifications) |
| 7472 throw H.wrapException(P.ConcurrentModificationError$(t1)); |
| 7473 else { |
| 7474 t1 = this._collection$_cell; |
| 7475 if (t1 == null) { |
| 7476 this._collection$_current = null; |
| 7477 return false; |
| 7478 } else { |
| 7479 this._collection$_current = t1._element; |
| 7480 this._collection$_cell = t1._collection$_next; |
| 7481 return true; |
| 7482 } |
| 7483 } |
| 7484 } |
| 7485 }, |
| 7486 UnmodifiableListView: { |
| 7487 "^": "UnmodifiableListBase;_collection$_source", |
| 7488 get$length: function(_) { |
| 7489 return this._collection$_source.length; |
| 7490 }, |
| 7491 $index: function(_, index) { |
| 7492 var t1 = this._collection$_source; |
| 7493 if (index >>> 0 !== index || index >= t1.length) |
| 7494 return H.ioore(t1, index); |
| 7495 return t1[index]; |
| 7496 } |
| 7497 }, |
| 7498 HashMap_HashMap$from_closure: { |
| 7499 "^": "Closure:15;result_0", |
| 7500 call$2: function(k, v) { |
| 7501 this.result_0.$indexSet(0, k, v); |
| 7502 } |
| 7503 }, |
| 7504 _HashSetBase: { |
| 7505 "^": "SetBase;" |
| 7506 }, |
| 7507 IterableBase: { |
| 7508 "^": "Object;", |
| 7509 map$1: function(_, f) { |
| 7510 return H.MappedIterable_MappedIterable(this, f, H.getRuntimeTypeArgument(t
his, "IterableBase", 0), null); |
| 7511 }, |
| 7512 contains$1: function(_, element) { |
| 7513 var t1; |
| 7514 for (t1 = this.get$iterator(this); t1.moveNext$0();) |
| 7515 if (J.$eq(t1.get$current(), element)) |
| 7516 return true; |
| 7517 return false; |
| 7518 }, |
| 7519 forEach$1: function(_, f) { |
| 7520 var t1; |
| 7521 for (t1 = this.get$iterator(this); t1.moveNext$0();) |
| 7522 f.call$1(t1.get$current()); |
| 7523 }, |
| 7524 toList$1$growable: function(_, growable) { |
| 7525 return P.List_List$from(this, growable, H.getRuntimeTypeArgument(this, "It
erableBase", 0)); |
| 7526 }, |
| 7527 toList$0: function($receiver) { |
| 7528 return this.toList$1$growable($receiver, true); |
| 7529 }, |
| 7530 get$length: function(_) { |
| 7531 var it, count; |
| 7532 it = this.get$iterator(this); |
| 7533 for (count = 0; it.moveNext$0();) |
| 7534 ++count; |
| 7535 return count; |
| 7536 }, |
| 7537 get$isEmpty: function(_) { |
| 7538 return !this.get$iterator(this).moveNext$0(); |
| 7539 }, |
| 7540 get$isNotEmpty: function(_) { |
| 7541 return this.get$isEmpty(this) !== true; |
| 7542 }, |
| 7543 skipWhile$1: ["super$IterableBase$skipWhile$1", function(_, test) { |
| 7544 return H.setRuntimeTypeInfo(new H.SkipWhileIterable(this, test), [H.getRun
timeTypeArgument(this, "IterableBase", 0)]); |
| 7545 }], |
| 7546 get$first: function(_) { |
| 7547 var it = this.get$iterator(this); |
| 7548 if (!it.moveNext$0()) |
| 7549 throw H.wrapException(H.IterableElementError_noElement()); |
| 7550 return it.get$current(); |
| 7551 }, |
| 7552 get$last: function(_) { |
| 7553 var it, result; |
| 7554 it = this.get$iterator(this); |
| 7555 if (!it.moveNext$0()) |
| 7556 throw H.wrapException(H.IterableElementError_noElement()); |
| 7557 do |
| 7558 result = it.get$current(); |
| 7559 while (it.moveNext$0()); |
| 7560 return result; |
| 7561 }, |
| 7562 elementAt$1: function(_, index) { |
| 7563 var t1, elementIndex, element; |
| 7564 if (index < 0) |
| 7565 H.throwExpression(P.RangeError$range(index, 0, null, "index", null)); |
| 7566 for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { |
| 7567 element = t1.get$current(); |
| 7568 if (index === elementIndex) |
| 7569 return element; |
| 7570 ++elementIndex; |
| 7571 } |
| 7572 throw H.wrapException(P.IndexError$(index, this, "index", null, elementInd
ex)); |
| 7573 }, |
| 7574 toString$0: function(_) { |
| 7575 return P.IterableBase_iterableToShortString(this, "(", ")"); |
| 7576 } |
| 7577 }, |
| 7578 ListBase: { |
| 7579 "^": "Object_ListMixin;" |
| 7580 }, |
| 7581 Object_ListMixin: { |
| 7582 "^": "Object+ListMixin;", |
| 7583 $isList: 1, |
| 7584 $asList: null, |
| 7585 $isEfficientLength: 1 |
| 7586 }, |
| 7587 ListMixin: { |
| 7588 "^": "Object;", |
| 7589 get$iterator: function(receiver) { |
| 7590 return new H.ListIterator(receiver, this.get$length(receiver), 0, null); |
| 7591 }, |
| 7592 elementAt$1: function(receiver, index) { |
| 7593 return this.$index(receiver, index); |
| 7594 }, |
| 7595 forEach$1: function(receiver, action) { |
| 7596 var $length, i; |
| 7597 $length = this.get$length(receiver); |
| 7598 for (i = 0; i < $length; ++i) { |
| 7599 action.call$1(this.$index(receiver, i)); |
| 7600 if ($length !== this.get$length(receiver)) |
| 7601 throw H.wrapException(P.ConcurrentModificationError$(receiver)); |
| 7602 } |
| 7603 }, |
| 7604 get$isEmpty: function(receiver) { |
| 7605 return this.get$length(receiver) === 0; |
| 7606 }, |
| 7607 get$isNotEmpty: function(receiver) { |
| 7608 return !this.get$isEmpty(receiver); |
| 7609 }, |
| 7610 get$last: function(receiver) { |
| 7611 if (this.get$length(receiver) === 0) |
| 7612 throw H.wrapException(H.IterableElementError_noElement()); |
| 7613 return this.$index(receiver, this.get$length(receiver) - 1); |
| 7614 }, |
| 7615 contains$1: function(receiver, element) { |
| 7616 var $length, i; |
| 7617 $length = this.get$length(receiver); |
| 7618 for (i = 0; i < this.get$length(receiver); ++i) { |
| 7619 if (J.$eq(this.$index(receiver, i), element)) |
| 7620 return true; |
| 7621 if ($length !== this.get$length(receiver)) |
| 7622 throw H.wrapException(P.ConcurrentModificationError$(receiver)); |
| 7623 } |
| 7624 return false; |
| 7625 }, |
| 7626 map$1: function(receiver, f) { |
| 7627 return H.setRuntimeTypeInfo(new H.MappedListIterable(receiver, f), [null,
null]); |
| 7628 }, |
| 7629 skip$1: function(receiver, count) { |
| 7630 return H.SubListIterable$(receiver, count, null, H.getRuntimeTypeArgument(
receiver, "ListMixin", 0)); |
| 7631 }, |
| 7632 add$1: function(receiver, element) { |
| 7633 var t1 = this.get$length(receiver); |
| 7634 this.set$length(receiver, t1 + 1); |
| 7635 this.$indexSet(receiver, t1, element); |
| 7636 }, |
| 7637 indexOf$2: function(receiver, element, startIndex) { |
| 7638 var i; |
| 7639 if (startIndex >= this.get$length(receiver)) |
| 7640 return -1; |
| 7641 if (startIndex < 0) |
| 7642 startIndex = 0; |
| 7643 for (i = startIndex; i < this.get$length(receiver); ++i) |
| 7644 if (J.$eq(this.$index(receiver, i), element)) |
| 7645 return i; |
| 7646 return -1; |
| 7647 }, |
| 7648 indexOf$1: function($receiver, element) { |
| 7649 return this.indexOf$2($receiver, element, 0); |
| 7650 }, |
| 7651 get$reversed: function(receiver) { |
| 7652 return H.setRuntimeTypeInfo(new H.ReversedListIterable(receiver), [H.getRu
ntimeTypeArgument(receiver, "ListMixin", 0)]); |
| 7653 }, |
| 7654 toString$0: function(receiver) { |
| 7655 return P.IterableBase_iterableToFullString(receiver, "[", "]"); |
| 7656 }, |
| 7657 $isList: 1, |
| 7658 $asList: null, |
| 7659 $isEfficientLength: 1 |
| 7660 }, |
| 7661 _UnmodifiableMapMixin: { |
| 7662 "^": "Object;", |
| 7663 $indexSet: function(_, key, value) { |
| 7664 throw H.wrapException(P.UnsupportedError$("Cannot modify unmodifiable map"
)); |
| 7665 }, |
| 7666 $isMap: 1 |
| 7667 }, |
| 7668 MapView: { |
| 7669 "^": "Object;", |
| 7670 $index: function(_, key) { |
| 7671 return J.$index$asx(this._collection$_map, key); |
| 7672 }, |
| 7673 $indexSet: function(_, key, value) { |
| 7674 J.$indexSet$ax(this._collection$_map, key, value); |
| 7675 }, |
| 7676 forEach$1: function(_, action) { |
| 7677 J.forEach$1$ax(this._collection$_map, action); |
| 7678 }, |
| 7679 get$isEmpty: function(_) { |
| 7680 return J.get$isEmpty$asx(this._collection$_map); |
| 7681 }, |
| 7682 get$isNotEmpty: function(_) { |
| 7683 return J.get$isNotEmpty$asx(this._collection$_map); |
| 7684 }, |
| 7685 get$length: function(_) { |
| 7686 return J.get$length$asx(this._collection$_map); |
| 7687 }, |
| 7688 toString$0: function(_) { |
| 7689 return J.toString$0(this._collection$_map); |
| 7690 }, |
| 7691 $isMap: 1 |
| 7692 }, |
| 7693 UnmodifiableMapView: { |
| 7694 "^": "MapView+_UnmodifiableMapMixin;_collection$_map", |
| 7695 $isMap: 1 |
| 7696 }, |
| 7697 Maps_mapToString_closure: { |
| 7698 "^": "Closure:15;box_0,result_1", |
| 7699 call$2: function(k, v) { |
| 7700 var t1, t2; |
| 7701 t1 = this.box_0; |
| 7702 if (!t1.first_0) |
| 7703 this.result_1._contents += ", "; |
| 7704 t1.first_0 = false; |
| 7705 t1 = this.result_1; |
| 7706 t2 = t1._contents += H.S(k); |
| 7707 t1._contents = t2 + ": "; |
| 7708 t1._contents += H.S(v); |
| 7709 } |
| 7710 }, |
| 7711 ListQueue: { |
| 7712 "^": "IterableBase;_table,_head,_tail,_modificationCount", |
| 7713 get$iterator: function(_) { |
| 7714 return new P._ListQueueIterator(this, this._tail, this._modificationCount,
this._head, null); |
| 7715 }, |
| 7716 forEach$1: function(_, action) { |
| 7717 var modificationCount, i, t1; |
| 7718 modificationCount = this._modificationCount; |
| 7719 for (i = this._head; i !== this._tail; i = (i + 1 & this._table.length - 1
) >>> 0) { |
| 7720 t1 = this._table; |
| 7721 if (i < 0 || i >= t1.length) |
| 7722 return H.ioore(t1, i); |
| 7723 action.call$1(t1[i]); |
| 7724 if (modificationCount !== this._modificationCount) |
| 7725 H.throwExpression(P.ConcurrentModificationError$(this)); |
| 7726 } |
| 7727 }, |
| 7728 get$isEmpty: function(_) { |
| 7729 return this._head === this._tail; |
| 7730 }, |
| 7731 get$length: function(_) { |
| 7732 return (this._tail - this._head & this._table.length - 1) >>> 0; |
| 7733 }, |
| 7734 get$last: function(_) { |
| 7735 var t1, t2, t3; |
| 7736 t1 = this._head; |
| 7737 t2 = this._tail; |
| 7738 if (t1 === t2) |
| 7739 throw H.wrapException(H.IterableElementError_noElement()); |
| 7740 t1 = this._table; |
| 7741 t3 = t1.length; |
| 7742 t2 = (t2 - 1 & t3 - 1) >>> 0; |
| 7743 if (t2 < 0 || t2 >= t3) |
| 7744 return H.ioore(t1, t2); |
| 7745 return t1[t2]; |
| 7746 }, |
| 7747 add$1: function(_, element) { |
| 7748 this._add$1(element); |
| 7749 }, |
| 7750 clear$0: function(_) { |
| 7751 var i, t1, t2, t3, t4; |
| 7752 i = this._head; |
| 7753 t1 = this._tail; |
| 7754 if (i !== t1) { |
| 7755 for (t2 = this._table, t3 = t2.length, t4 = t3 - 1; i !== t1; i = (i + 1
& t4) >>> 0) { |
| 7756 if (i < 0 || i >= t3) |
| 7757 return H.ioore(t2, i); |
| 7758 t2[i] = null; |
| 7759 } |
| 7760 this._tail = 0; |
| 7761 this._head = 0; |
| 7762 ++this._modificationCount; |
| 7763 } |
| 7764 }, |
| 7765 toString$0: function(_) { |
| 7766 return P.IterableBase_iterableToFullString(this, "{", "}"); |
| 7767 }, |
| 7768 removeFirst$0: function() { |
| 7769 var t1, t2, t3, result; |
| 7770 t1 = this._head; |
| 7771 if (t1 === this._tail) |
| 7772 throw H.wrapException(H.IterableElementError_noElement()); |
| 7773 ++this._modificationCount; |
| 7774 t2 = this._table; |
| 7775 t3 = t2.length; |
| 7776 if (t1 >= t3) |
| 7777 return H.ioore(t2, t1); |
| 7778 result = t2[t1]; |
| 7779 t2[t1] = null; |
| 7780 this._head = (t1 + 1 & t3 - 1) >>> 0; |
| 7781 return result; |
| 7782 }, |
| 7783 _add$1: function(element) { |
| 7784 var t1, t2, t3; |
| 7785 t1 = this._table; |
| 7786 t2 = this._tail; |
| 7787 t3 = t1.length; |
| 7788 if (t2 < 0 || t2 >= t3) |
| 7789 return H.ioore(t1, t2); |
| 7790 t1[t2] = element; |
| 7791 t3 = (t2 + 1 & t3 - 1) >>> 0; |
| 7792 this._tail = t3; |
| 7793 if (this._head === t3) |
| 7794 this._grow$0(); |
| 7795 ++this._modificationCount; |
| 7796 }, |
| 7797 _grow$0: function() { |
| 7798 var t1, newTable, t2, split; |
| 7799 t1 = Array(this._table.length * 2); |
| 7800 t1.fixed$length = Array; |
| 7801 newTable = H.setRuntimeTypeInfo(t1, [H.getTypeArgumentByIndex(this, 0)]); |
| 7802 t1 = this._table; |
| 7803 t2 = this._head; |
| 7804 split = t1.length - t2; |
| 7805 C.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); |
| 7806 C.JSArray_methods.setRange$4(newTable, split, split + this._head, this._ta
ble, 0); |
| 7807 this._head = 0; |
| 7808 this._tail = this._table.length; |
| 7809 this._table = newTable; |
| 7810 }, |
| 7811 ListQueue$1: function(initialCapacity, $E) { |
| 7812 var t1 = Array(8); |
| 7813 t1.fixed$length = Array; |
| 7814 this._table = H.setRuntimeTypeInfo(t1, [$E]); |
| 7815 }, |
| 7816 $isEfficientLength: 1, |
| 7817 static: {ListQueue$: function(initialCapacity, $E) { |
| 7818 var t1 = H.setRuntimeTypeInfo(new P.ListQueue(null, 0, 0, 0), [$E]); |
| 7819 t1.ListQueue$1(initialCapacity, $E); |
| 7820 return t1; |
| 7821 }} |
| 7822 }, |
| 7823 _ListQueueIterator: { |
| 7824 "^": "Object;_queue,_end,_modificationCount,_collection$_position,_collectio
n$_current", |
| 7825 get$current: function() { |
| 7826 return this._collection$_current; |
| 7827 }, |
| 7828 moveNext$0: function() { |
| 7829 var t1, t2, t3; |
| 7830 t1 = this._queue; |
| 7831 if (this._modificationCount !== t1._modificationCount) |
| 7832 H.throwExpression(P.ConcurrentModificationError$(t1)); |
| 7833 t2 = this._collection$_position; |
| 7834 if (t2 === this._end) { |
| 7835 this._collection$_current = null; |
| 7836 return false; |
| 7837 } |
| 7838 t1 = t1._table; |
| 7839 t3 = t1.length; |
| 7840 if (t2 >= t3) |
| 7841 return H.ioore(t1, t2); |
| 7842 this._collection$_current = t1[t2]; |
| 7843 this._collection$_position = (t2 + 1 & t3 - 1) >>> 0; |
| 7844 return true; |
| 7845 } |
| 7846 }, |
| 7847 SetMixin: { |
| 7848 "^": "Object;", |
| 7849 get$isEmpty: function(_) { |
| 7850 return this.get$length(this) === 0; |
| 7851 }, |
| 7852 get$isNotEmpty: function(_) { |
| 7853 return this.get$length(this) !== 0; |
| 7854 }, |
| 7855 map$1: function(_, f) { |
| 7856 return H.setRuntimeTypeInfo(new H.EfficientLengthMappedIterable(this, f),
[H.getTypeArgumentByIndex(this, 0), null]); |
| 7857 }, |
| 7858 toString$0: function(_) { |
| 7859 return P.IterableBase_iterableToFullString(this, "{", "}"); |
| 7860 }, |
| 7861 forEach$1: function(_, f) { |
| 7862 var t1; |
| 7863 for (t1 = this.get$iterator(this); t1.moveNext$0();) |
| 7864 f.call$1(t1._collection$_current); |
| 7865 }, |
| 7866 get$last: function(_) { |
| 7867 var it, result; |
| 7868 it = this.get$iterator(this); |
| 7869 if (!it.moveNext$0()) |
| 7870 throw H.wrapException(H.IterableElementError_noElement()); |
| 7871 do |
| 7872 result = it._collection$_current; |
| 7873 while (it.moveNext$0()); |
| 7874 return result; |
| 7875 }, |
| 7876 $isEfficientLength: 1 |
| 7877 }, |
| 7878 SetBase: { |
| 7879 "^": "SetMixin;" |
| 7880 } |
| 7881 }], |
| 7882 ["dart.convert", "dart:convert", , P, { |
| 7883 "^": "", |
| 7884 _convertJsonToDartLazy: function(object) { |
| 7885 var i; |
| 7886 if (object == null) |
| 7887 return; |
| 7888 if (typeof object != "object") |
| 7889 return object; |
| 7890 if (Object.getPrototypeOf(object) !== Array.prototype) |
| 7891 return new P._JsonMap(object, Object.create(null), null); |
| 7892 for (i = 0; i < object.length; ++i) |
| 7893 object[i] = P._convertJsonToDartLazy(object[i]); |
| 7894 return object; |
| 7895 }, |
| 7896 _parseJson: function(source, reviver) { |
| 7897 var parsed, e, t1, exception; |
| 7898 t1 = source; |
| 7899 if (typeof t1 !== "string") |
| 7900 throw H.wrapException(P.ArgumentError$(source)); |
| 7901 parsed = null; |
| 7902 try { |
| 7903 parsed = JSON.parse(source); |
| 7904 } catch (exception) { |
| 7905 t1 = H.unwrapException(exception); |
| 7906 e = t1; |
| 7907 throw H.wrapException(P.FormatException$(String(e), null, null)); |
| 7908 } |
| 7909 return P._convertJsonToDartLazy(parsed); |
| 7910 }, |
| 7911 _defaultToEncodable: [function(object) { |
| 7912 return object.toJson$0(); |
| 7913 }, "call$1", "_defaultToEncodable$closure", 2, 0, 45], |
| 7914 _JsonMap: { |
| 7915 "^": "Object;_original,_processed,_data", |
| 7916 $index: function(_, key) { |
| 7917 var t1, result; |
| 7918 t1 = this._processed; |
| 7919 if (t1 == null) |
| 7920 return this._data.$index(0, key); |
| 7921 else if (typeof key !== "string") |
| 7922 return; |
| 7923 else { |
| 7924 result = t1[key]; |
| 7925 return typeof result == "undefined" ? this._process$1(key) : result; |
| 7926 } |
| 7927 }, |
| 7928 get$length: function(_) { |
| 7929 var t1; |
| 7930 if (this._processed == null) { |
| 7931 t1 = this._data; |
| 7932 t1 = t1.get$length(t1); |
| 7933 } else |
| 7934 t1 = this._computeKeys$0().length; |
| 7935 return t1; |
| 7936 }, |
| 7937 get$isEmpty: function(_) { |
| 7938 var t1; |
| 7939 if (this._processed == null) { |
| 7940 t1 = this._data; |
| 7941 t1 = t1.get$length(t1); |
| 7942 } else |
| 7943 t1 = this._computeKeys$0().length; |
| 7944 return t1 === 0; |
| 7945 }, |
| 7946 get$isNotEmpty: function(_) { |
| 7947 var t1; |
| 7948 if (this._processed == null) { |
| 7949 t1 = this._data; |
| 7950 t1 = t1.get$length(t1); |
| 7951 } else |
| 7952 t1 = this._computeKeys$0().length; |
| 7953 return t1 > 0; |
| 7954 }, |
| 7955 $indexSet: function(_, key, value) { |
| 7956 var processed, original; |
| 7957 if (this._processed == null) |
| 7958 this._data.$indexSet(0, key, value); |
| 7959 else if (this.containsKey$1(key)) { |
| 7960 processed = this._processed; |
| 7961 processed[key] = value; |
| 7962 original = this._original; |
| 7963 if (original == null ? processed != null : original !== processed) |
| 7964 original[key] = null; |
| 7965 } else |
| 7966 this._upgrade$0().$indexSet(0, key, value); |
| 7967 }, |
| 7968 containsKey$1: function(key) { |
| 7969 if (this._processed == null) |
| 7970 return this._data.containsKey$1(key); |
| 7971 if (typeof key !== "string") |
| 7972 return false; |
| 7973 return Object.prototype.hasOwnProperty.call(this._original, key); |
| 7974 }, |
| 7975 forEach$1: function(_, f) { |
| 7976 var keys, i, key, value; |
| 7977 if (this._processed == null) |
| 7978 return this._data.forEach$1(0, f); |
| 7979 keys = this._computeKeys$0(); |
| 7980 for (i = 0; i < keys.length; ++i) { |
| 7981 key = keys[i]; |
| 7982 value = this._processed[key]; |
| 7983 if (typeof value == "undefined") { |
| 7984 value = P._convertJsonToDartLazy(this._original[key]); |
| 7985 this._processed[key] = value; |
| 7986 } |
| 7987 f.call$2(key, value); |
| 7988 if (keys !== this._data) |
| 7989 throw H.wrapException(P.ConcurrentModificationError$(this)); |
| 7990 } |
| 7991 }, |
| 7992 toString$0: function(_) { |
| 7993 return P.Maps_mapToString(this); |
| 7994 }, |
| 7995 _computeKeys$0: function() { |
| 7996 var keys = this._data; |
| 7997 if (keys == null) { |
| 7998 keys = Object.keys(this._original); |
| 7999 this._data = keys; |
| 8000 } |
| 8001 return keys; |
| 8002 }, |
| 8003 _upgrade$0: function() { |
| 8004 var result, keys, i, t1, key; |
| 8005 if (this._processed == null) |
| 8006 return this._data; |
| 8007 result = P.LinkedHashMap_LinkedHashMap$_empty(null, null); |
| 8008 keys = this._computeKeys$0(); |
| 8009 for (i = 0; t1 = keys.length, i < t1; ++i) { |
| 8010 key = keys[i]; |
| 8011 result.$indexSet(0, key, this.$index(0, key)); |
| 8012 } |
| 8013 if (t1 === 0) |
| 8014 keys.push(null); |
| 8015 else |
| 8016 C.JSArray_methods.set$length(keys, 0); |
| 8017 this._processed = null; |
| 8018 this._original = null; |
| 8019 this._data = result; |
| 8020 return result; |
| 8021 }, |
| 8022 _process$1: function(key) { |
| 8023 var result; |
| 8024 if (!Object.prototype.hasOwnProperty.call(this._original, key)) |
| 8025 return; |
| 8026 result = P._convertJsonToDartLazy(this._original[key]); |
| 8027 return this._processed[key] = result; |
| 8028 }, |
| 8029 $isMap: 1, |
| 8030 $asMap: $.functionThatReturnsNull |
| 8031 }, |
| 8032 Codec: { |
| 8033 "^": "Object;" |
| 8034 }, |
| 8035 Converter: { |
| 8036 "^": "Object;" |
| 8037 }, |
| 8038 Encoding: { |
| 8039 "^": "Codec;" |
| 8040 }, |
| 8041 JsonUnsupportedObjectError: { |
| 8042 "^": "Error;unsupportedObject,cause", |
| 8043 toString$0: function(_) { |
| 8044 if (this.cause != null) |
| 8045 return "Converting object to an encodable object failed."; |
| 8046 else |
| 8047 return "Converting object did not return an encodable object."; |
| 8048 }, |
| 8049 static: {JsonUnsupportedObjectError$: function(unsupportedObject, cause) { |
| 8050 return new P.JsonUnsupportedObjectError(unsupportedObject, cause); |
| 8051 }} |
| 8052 }, |
| 8053 JsonCyclicError: { |
| 8054 "^": "JsonUnsupportedObjectError;unsupportedObject,cause", |
| 8055 toString$0: function(_) { |
| 8056 return "Cyclic error in JSON stringify"; |
| 8057 } |
| 8058 }, |
| 8059 JsonCodec: { |
| 8060 "^": "Codec;_reviver,_toEncodable", |
| 8061 decode$2$reviver: function(source, reviver) { |
| 8062 return P._parseJson(source, this.get$decoder()._reviver); |
| 8063 }, |
| 8064 decode$1: function(source) { |
| 8065 return this.decode$2$reviver(source, null); |
| 8066 }, |
| 8067 encode$2$toEncodable: function(value, toEncodable) { |
| 8068 var t1 = this.get$encoder(); |
| 8069 return P._JsonStringStringifier_stringify(value, t1._toEncodable, t1.inden
t); |
| 8070 }, |
| 8071 encode$1: function(value) { |
| 8072 return this.encode$2$toEncodable(value, null); |
| 8073 }, |
| 8074 get$encoder: function() { |
| 8075 return C.JsonEncoder_null_null; |
| 8076 }, |
| 8077 get$decoder: function() { |
| 8078 return C.JsonDecoder_null; |
| 8079 } |
| 8080 }, |
| 8081 JsonEncoder: { |
| 8082 "^": "Converter;indent,_toEncodable" |
| 8083 }, |
| 8084 JsonDecoder: { |
| 8085 "^": "Converter;_reviver" |
| 8086 }, |
| 8087 _JsonStringifier: { |
| 8088 "^": "Object;", |
| 8089 writeStringContent$1: function(s) { |
| 8090 var t1, $length, offset, i, charCode, t2; |
| 8091 t1 = J.getInterceptor$asx(s); |
| 8092 $length = t1.get$length(s); |
| 8093 if (typeof $length !== "number") |
| 8094 return H.iae($length); |
| 8095 offset = 0; |
| 8096 i = 0; |
| 8097 for (; i < $length; ++i) { |
| 8098 charCode = t1.codeUnitAt$1(s, i); |
| 8099 if (charCode > 92) |
| 8100 continue; |
| 8101 if (charCode < 32) { |
| 8102 if (i > offset) |
| 8103 this.writeStringSlice$3(s, offset, i); |
| 8104 offset = i + 1; |
| 8105 this.writeCharCode$1(92); |
| 8106 switch (charCode) { |
| 8107 case 8: |
| 8108 this.writeCharCode$1(98); |
| 8109 break; |
| 8110 case 9: |
| 8111 this.writeCharCode$1(116); |
| 8112 break; |
| 8113 case 10: |
| 8114 this.writeCharCode$1(110); |
| 8115 break; |
| 8116 case 12: |
| 8117 this.writeCharCode$1(102); |
| 8118 break; |
| 8119 case 13: |
| 8120 this.writeCharCode$1(114); |
| 8121 break; |
| 8122 default: |
| 8123 this.writeCharCode$1(117); |
| 8124 this.writeCharCode$1(48); |
| 8125 this.writeCharCode$1(48); |
| 8126 t2 = charCode >>> 4 & 15; |
| 8127 this.writeCharCode$1(t2 < 10 ? 48 + t2 : 87 + t2); |
| 8128 t2 = charCode & 15; |
| 8129 this.writeCharCode$1(t2 < 10 ? 48 + t2 : 87 + t2); |
| 8130 break; |
| 8131 } |
| 8132 } else if (charCode === 34 || charCode === 92) { |
| 8133 if (i > offset) |
| 8134 this.writeStringSlice$3(s, offset, i); |
| 8135 offset = i + 1; |
| 8136 this.writeCharCode$1(92); |
| 8137 this.writeCharCode$1(charCode); |
| 8138 } |
| 8139 } |
| 8140 if (offset === 0) |
| 8141 this.writeString$1(s); |
| 8142 else if (offset < $length) |
| 8143 this.writeStringSlice$3(s, offset, $length); |
| 8144 }, |
| 8145 _checkCycle$1: function(object) { |
| 8146 var t1, t2, i, t3; |
| 8147 for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { |
| 8148 t3 = t1[i]; |
| 8149 if (object == null ? t3 == null : object === t3) |
| 8150 throw H.wrapException(new P.JsonCyclicError(object, null)); |
| 8151 } |
| 8152 t1.push(object); |
| 8153 }, |
| 8154 _removeSeen$1: function(object) { |
| 8155 var t1 = this._seen; |
| 8156 if (0 >= t1.length) |
| 8157 return H.ioore(t1, 0); |
| 8158 t1.pop(); |
| 8159 }, |
| 8160 writeObject$1: function(object) { |
| 8161 var customJson, e, t1, exception; |
| 8162 if (this.writeJsonValue$1(object)) |
| 8163 return; |
| 8164 this._checkCycle$1(object); |
| 8165 try { |
| 8166 customJson = this._toEncodable$1(object); |
| 8167 if (!this.writeJsonValue$1(customJson)) { |
| 8168 t1 = P.JsonUnsupportedObjectError$(object, null); |
| 8169 throw H.wrapException(t1); |
| 8170 } |
| 8171 t1 = this._seen; |
| 8172 if (0 >= t1.length) |
| 8173 return H.ioore(t1, 0); |
| 8174 t1.pop(); |
| 8175 } catch (exception) { |
| 8176 t1 = H.unwrapException(exception); |
| 8177 e = t1; |
| 8178 throw H.wrapException(P.JsonUnsupportedObjectError$(object, e)); |
| 8179 } |
| 8180 }, |
| 8181 writeJsonValue$1: function(object) { |
| 8182 var t1; |
| 8183 if (typeof object === "number") { |
| 8184 if (!C.JSNumber_methods.get$isFinite(object)) |
| 8185 return false; |
| 8186 this.writeNumber$1(object); |
| 8187 return true; |
| 8188 } else if (object === true) { |
| 8189 this.writeString$1("true"); |
| 8190 return true; |
| 8191 } else if (object === false) { |
| 8192 this.writeString$1("false"); |
| 8193 return true; |
| 8194 } else if (object == null) { |
| 8195 this.writeString$1("null"); |
| 8196 return true; |
| 8197 } else if (typeof object === "string") { |
| 8198 this.writeString$1("\""); |
| 8199 this.writeStringContent$1(object); |
| 8200 this.writeString$1("\""); |
| 8201 return true; |
| 8202 } else { |
| 8203 t1 = J.getInterceptor(object); |
| 8204 if (!!t1.$isList) { |
| 8205 this._checkCycle$1(object); |
| 8206 this.writeList$1(object); |
| 8207 this._removeSeen$1(object); |
| 8208 return true; |
| 8209 } else if (!!t1.$isMap) { |
| 8210 this._checkCycle$1(object); |
| 8211 this.writeMap$1(object); |
| 8212 this._removeSeen$1(object); |
| 8213 return true; |
| 8214 } else |
| 8215 return false; |
| 8216 } |
| 8217 }, |
| 8218 writeList$1: function(list) { |
| 8219 var t1, i; |
| 8220 this.writeString$1("["); |
| 8221 t1 = J.getInterceptor$asx(list); |
| 8222 if (t1.get$length(list) > 0) { |
| 8223 this.writeObject$1(t1.$index(list, 0)); |
| 8224 for (i = 1; i < t1.get$length(list); ++i) { |
| 8225 this.writeString$1(","); |
| 8226 this.writeObject$1(t1.$index(list, i)); |
| 8227 } |
| 8228 } |
| 8229 this.writeString$1("]"); |
| 8230 }, |
| 8231 writeMap$1: function(map) { |
| 8232 var t1 = {}; |
| 8233 this.writeString$1("{"); |
| 8234 t1.separator_0 = "\""; |
| 8235 map.forEach$1(0, new P._JsonStringifier_writeMap_closure(t1, this)); |
| 8236 this.writeString$1("}"); |
| 8237 }, |
| 8238 _toEncodable$1: function(arg0) { |
| 8239 return this._toEncodable.call$1(arg0); |
| 8240 } |
| 8241 }, |
| 8242 _JsonStringifier_writeMap_closure: { |
| 8243 "^": "Closure:16;box_0,this_1", |
| 8244 call$2: function(key, value) { |
| 8245 var t1, t2; |
| 8246 t1 = this.this_1; |
| 8247 t2 = this.box_0; |
| 8248 t1.writeString$1(t2.separator_0); |
| 8249 t2.separator_0 = ",\""; |
| 8250 t1.writeStringContent$1(key); |
| 8251 t1.writeString$1("\":"); |
| 8252 t1.writeObject$1(value); |
| 8253 } |
| 8254 }, |
| 8255 _JsonStringStringifier: { |
| 8256 "^": "_JsonStringifier;_sink,_seen,_toEncodable", |
| 8257 writeNumber$1: function(number) { |
| 8258 this._sink._contents += C.JSNumber_methods.toString$0(number); |
| 8259 }, |
| 8260 writeString$1: function(string) { |
| 8261 this._sink._contents += H.S(string); |
| 8262 }, |
| 8263 writeStringSlice$3: function(string, start, end) { |
| 8264 this._sink._contents += J.substring$2$s(string, start, end); |
| 8265 }, |
| 8266 writeCharCode$1: function(charCode) { |
| 8267 this._sink._contents += H.Primitives_stringFromCharCode(charCode); |
| 8268 }, |
| 8269 static: {_JsonStringStringifier_stringify: function(object, toEncodable, ind
ent) { |
| 8270 var output, t1, stringifier; |
| 8271 output = new P.StringBuffer(""); |
| 8272 t1 = P._defaultToEncodable$closure(); |
| 8273 stringifier = new P._JsonStringStringifier(output, [], t1); |
| 8274 stringifier.writeObject$1(object); |
| 8275 t1 = output._contents; |
| 8276 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 8277 }} |
| 8278 }, |
| 8279 Utf8Codec: { |
| 8280 "^": "Encoding;_allowMalformed", |
| 8281 get$encoder: function() { |
| 8282 return new P.Utf8Encoder(); |
| 8283 } |
| 8284 }, |
| 8285 Utf8Encoder: { |
| 8286 "^": "Converter;", |
| 8287 convert$3: function(string, start, end) { |
| 8288 var t1, stringLength, t2, $length, t3, encoder; |
| 8289 t1 = J.getInterceptor$asx(string); |
| 8290 stringLength = t1.get$length(string); |
| 8291 P.RangeError_checkValidRange(start, end, stringLength, null, null, null); |
| 8292 t2 = J.getInterceptor$n(stringLength); |
| 8293 $length = t2.$sub(stringLength, start); |
| 8294 t3 = J.getInterceptor($length); |
| 8295 if (t3.$eq($length, 0)) |
| 8296 return new Uint8Array(0); |
| 8297 t3 = t3.$mul($length, 3); |
| 8298 if (typeof t3 !== "number" || Math.floor(t3) !== t3) |
| 8299 H.throwExpression(P.ArgumentError$("Invalid length " + H.S(t3))); |
| 8300 t3 = new Uint8Array(t3); |
| 8301 encoder = new P._Utf8Encoder(0, 0, t3); |
| 8302 if (encoder._fillBuffer$3(string, start, stringLength) !== stringLength) |
| 8303 encoder._writeSurrogate$2(t1.codeUnitAt$1(string, t2.$sub(stringLength,
1)), 0); |
| 8304 return new Uint8Array(t3.subarray(0, C.NativeUint8List_methods._checkSubli
stArguments$3(t3, 0, encoder._bufferIndex, t3.length))); |
| 8305 }, |
| 8306 convert$1: function(string) { |
| 8307 return this.convert$3(string, 0, null); |
| 8308 } |
| 8309 }, |
| 8310 _Utf8Encoder: { |
| 8311 "^": "Object;_carry,_bufferIndex,_buffer", |
| 8312 _writeSurrogate$2: function(leadingSurrogate, nextCodeUnit) { |
| 8313 var t1, t2, rune, t3, t4; |
| 8314 t1 = this._buffer; |
| 8315 t2 = this._bufferIndex; |
| 8316 if ((nextCodeUnit & 64512) === 56320) { |
| 8317 rune = 65536 + ((leadingSurrogate & 1023) << 10 >>> 0) | nextCodeUnit &
1023; |
| 8318 t3 = t2 + 1; |
| 8319 this._bufferIndex = t3; |
| 8320 t4 = t1.length; |
| 8321 if (t2 >= t4) |
| 8322 return H.ioore(t1, t2); |
| 8323 t1[t2] = (240 | rune >>> 18) >>> 0; |
| 8324 t2 = t3 + 1; |
| 8325 this._bufferIndex = t2; |
| 8326 if (t3 >= t4) |
| 8327 return H.ioore(t1, t3); |
| 8328 t1[t3] = 128 | rune >>> 12 & 63; |
| 8329 t3 = t2 + 1; |
| 8330 this._bufferIndex = t3; |
| 8331 if (t2 >= t4) |
| 8332 return H.ioore(t1, t2); |
| 8333 t1[t2] = 128 | rune >>> 6 & 63; |
| 8334 this._bufferIndex = t3 + 1; |
| 8335 if (t3 >= t4) |
| 8336 return H.ioore(t1, t3); |
| 8337 t1[t3] = 128 | rune & 63; |
| 8338 return true; |
| 8339 } else { |
| 8340 t3 = t2 + 1; |
| 8341 this._bufferIndex = t3; |
| 8342 t4 = t1.length; |
| 8343 if (t2 >= t4) |
| 8344 return H.ioore(t1, t2); |
| 8345 t1[t2] = 224 | leadingSurrogate >>> 12; |
| 8346 t2 = t3 + 1; |
| 8347 this._bufferIndex = t2; |
| 8348 if (t3 >= t4) |
| 8349 return H.ioore(t1, t3); |
| 8350 t1[t3] = 128 | leadingSurrogate >>> 6 & 63; |
| 8351 this._bufferIndex = t2 + 1; |
| 8352 if (t2 >= t4) |
| 8353 return H.ioore(t1, t2); |
| 8354 t1[t2] = 128 | leadingSurrogate & 63; |
| 8355 return false; |
| 8356 } |
| 8357 }, |
| 8358 _fillBuffer$3: function(str, start, end) { |
| 8359 var t1, t2, t3, stringIndex, codeUnit, t4, stringIndex0, t5; |
| 8360 if (start !== end && (J.codeUnitAt$1$s(str, J.$sub$n(end, 1)) & 64512) ===
55296) |
| 8361 end = J.$sub$n(end, 1); |
| 8362 if (typeof end !== "number") |
| 8363 return H.iae(end); |
| 8364 t1 = this._buffer; |
| 8365 t2 = t1.length; |
| 8366 t3 = J.getInterceptor$s(str); |
| 8367 stringIndex = start; |
| 8368 for (; stringIndex < end; ++stringIndex) { |
| 8369 codeUnit = t3.codeUnitAt$1(str, stringIndex); |
| 8370 if (codeUnit <= 127) { |
| 8371 t4 = this._bufferIndex; |
| 8372 if (t4 >= t2) |
| 8373 break; |
| 8374 this._bufferIndex = t4 + 1; |
| 8375 t1[t4] = codeUnit; |
| 8376 } else if ((codeUnit & 64512) === 55296) { |
| 8377 if (this._bufferIndex + 3 >= t2) |
| 8378 break; |
| 8379 stringIndex0 = stringIndex + 1; |
| 8380 if (this._writeSurrogate$2(codeUnit, C.JSString_methods.codeUnitAt$1(s
tr, stringIndex0))) |
| 8381 stringIndex = stringIndex0; |
| 8382 } else if (codeUnit <= 2047) { |
| 8383 t4 = this._bufferIndex; |
| 8384 t5 = t4 + 1; |
| 8385 if (t5 >= t2) |
| 8386 break; |
| 8387 this._bufferIndex = t5; |
| 8388 if (t4 >= t2) |
| 8389 return H.ioore(t1, t4); |
| 8390 t1[t4] = 192 | codeUnit >>> 6; |
| 8391 this._bufferIndex = t5 + 1; |
| 8392 t1[t5] = 128 | codeUnit & 63; |
| 8393 } else { |
| 8394 t4 = this._bufferIndex; |
| 8395 if (t4 + 2 >= t2) |
| 8396 break; |
| 8397 t5 = t4 + 1; |
| 8398 this._bufferIndex = t5; |
| 8399 if (t4 >= t2) |
| 8400 return H.ioore(t1, t4); |
| 8401 t1[t4] = 224 | codeUnit >>> 12; |
| 8402 t4 = t5 + 1; |
| 8403 this._bufferIndex = t4; |
| 8404 if (t5 >= t2) |
| 8405 return H.ioore(t1, t5); |
| 8406 t1[t5] = 128 | codeUnit >>> 6 & 63; |
| 8407 this._bufferIndex = t4 + 1; |
| 8408 if (t4 >= t2) |
| 8409 return H.ioore(t1, t4); |
| 8410 t1[t4] = 128 | codeUnit & 63; |
| 8411 } |
| 8412 } |
| 8413 return stringIndex; |
| 8414 } |
| 8415 }, |
| 8416 Utf8Decoder: { |
| 8417 "^": "Converter;_allowMalformed", |
| 8418 convert$3: function(codeUnits, start, end) { |
| 8419 var $length, buffer, decoder, t1; |
| 8420 $length = J.get$length$asx(codeUnits); |
| 8421 P.RangeError_checkValidRange(start, end, $length, null, null, null); |
| 8422 buffer = new P.StringBuffer(""); |
| 8423 decoder = new P._Utf8Decoder(this._allowMalformed, buffer, true, 0, 0, 0); |
| 8424 decoder.convert$3(codeUnits, start, $length); |
| 8425 decoder.flush$0(); |
| 8426 t1 = buffer._contents; |
| 8427 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 8428 }, |
| 8429 convert$1: function(codeUnits) { |
| 8430 return this.convert$3(codeUnits, 0, null); |
| 8431 } |
| 8432 }, |
| 8433 _Utf8Decoder: { |
| 8434 "^": "Object;_allowMalformed,_stringSink,_isFirstCharacter,_value,_expectedU
nits,_extraUnits", |
| 8435 close$0: function(_) { |
| 8436 this.flush$0(); |
| 8437 }, |
| 8438 flush$0: function() { |
| 8439 if (this._expectedUnits > 0) { |
| 8440 if (!this._allowMalformed) |
| 8441 throw H.wrapException(P.FormatException$("Unfinished UTF-8 octet seque
nce", null, null)); |
| 8442 this._stringSink._contents += H.Primitives_stringFromCharCode(65533); |
| 8443 this._value = 0; |
| 8444 this._expectedUnits = 0; |
| 8445 this._extraUnits = 0; |
| 8446 } |
| 8447 }, |
| 8448 convert$3: function(codeUnits, startIndex, endIndex) { |
| 8449 var value, expectedUnits, extraUnits, t1, t2, t3, t4, t5, i, unit, t6, one
Bytes, i0; |
| 8450 value = this._value; |
| 8451 expectedUnits = this._expectedUnits; |
| 8452 extraUnits = this._extraUnits; |
| 8453 this._value = 0; |
| 8454 this._expectedUnits = 0; |
| 8455 this._extraUnits = 0; |
| 8456 t1 = new P._Utf8Decoder_convert_scanOneByteCharacters(endIndex); |
| 8457 t2 = new P._Utf8Decoder_convert_addSingleBytes(this, codeUnits, startIndex
, endIndex); |
| 8458 $loop$0: |
| 8459 for (t3 = this._stringSink, t4 = !this._allowMalformed, t5 = J.getInterc
eptor$asx(codeUnits), i = startIndex; true; i = i0) { |
| 8460 $multibyte$2: |
| 8461 if (expectedUnits > 0) { |
| 8462 do { |
| 8463 if (i === endIndex) |
| 8464 break $loop$0; |
| 8465 unit = t5.$index(codeUnits, i); |
| 8466 if (typeof unit !== "number") |
| 8467 return unit.$and(); |
| 8468 if ((unit & 192) !== 128) { |
| 8469 if (t4) |
| 8470 throw H.wrapException(P.FormatException$("Bad UTF-8 encoding
0x" + C.JSNumber_methods.toRadixString$1(unit, 16), null, null)); |
| 8471 this._isFirstCharacter = false; |
| 8472 t3._contents += H.Primitives_stringFromCharCode(65533); |
| 8473 expectedUnits = 0; |
| 8474 break $multibyte$2; |
| 8475 } else { |
| 8476 value = (value << 6 | unit & 63) >>> 0; |
| 8477 --expectedUnits; |
| 8478 ++i; |
| 8479 } |
| 8480 } while (expectedUnits > 0); |
| 8481 t6 = extraUnits - 1; |
| 8482 if (t6 < 0 || t6 >= 4) |
| 8483 return H.ioore(C.List_127_2047_65535_1114111, t6); |
| 8484 if (value <= C.List_127_2047_65535_1114111[t6]) { |
| 8485 if (t4) |
| 8486 throw H.wrapException(P.FormatException$("Overlong encoding of
0x" + C.JSInt_methods.toRadixString$1(value, 16), null, null)); |
| 8487 value = 65533; |
| 8488 expectedUnits = 0; |
| 8489 extraUnits = 0; |
| 8490 } |
| 8491 if (value > 1114111) { |
| 8492 if (t4) |
| 8493 throw H.wrapException(P.FormatException$("Character outside va
lid Unicode range: 0x" + C.JSInt_methods.toRadixString$1(value, 16), null, null)
); |
| 8494 value = 65533; |
| 8495 } |
| 8496 if (!this._isFirstCharacter || value !== 65279) |
| 8497 t3._contents += H.Primitives_stringFromCharCode(value); |
| 8498 this._isFirstCharacter = false; |
| 8499 } |
| 8500 for (; i < endIndex; i = i0) { |
| 8501 oneBytes = t1.call$2(codeUnits, i); |
| 8502 if (J.$gt$n(oneBytes, 0)) { |
| 8503 this._isFirstCharacter = false; |
| 8504 if (typeof oneBytes !== "number") |
| 8505 return H.iae(oneBytes); |
| 8506 i0 = i + oneBytes; |
| 8507 t2.call$2(i, i0); |
| 8508 if (i0 === endIndex) |
| 8509 break; |
| 8510 i = i0; |
| 8511 } |
| 8512 i0 = i + 1; |
| 8513 unit = t5.$index(codeUnits, i); |
| 8514 t6 = J.getInterceptor$n(unit); |
| 8515 if (t6.$lt(unit, 0)) { |
| 8516 if (t4) |
| 8517 throw H.wrapException(P.FormatException$("Negative UTF-8 code un
it: -0x" + J.toRadixString$1$n(t6.$negate(unit), 16), null, null)); |
| 8518 t3._contents += H.Primitives_stringFromCharCode(65533); |
| 8519 } else { |
| 8520 if (typeof unit !== "number") |
| 8521 return unit.$and(); |
| 8522 if ((unit & 224) === 192) { |
| 8523 value = unit & 31; |
| 8524 expectedUnits = 1; |
| 8525 extraUnits = 1; |
| 8526 continue $loop$0; |
| 8527 } |
| 8528 if ((unit & 240) === 224) { |
| 8529 value = unit & 15; |
| 8530 expectedUnits = 2; |
| 8531 extraUnits = 2; |
| 8532 continue $loop$0; |
| 8533 } |
| 8534 if ((unit & 248) === 240 && unit < 245) { |
| 8535 value = unit & 7; |
| 8536 expectedUnits = 3; |
| 8537 extraUnits = 3; |
| 8538 continue $loop$0; |
| 8539 } |
| 8540 if (t4) |
| 8541 throw H.wrapException(P.FormatException$("Bad UTF-8 encoding 0x"
+ C.JSNumber_methods.toRadixString$1(unit, 16), null, null)); |
| 8542 this._isFirstCharacter = false; |
| 8543 t3._contents += H.Primitives_stringFromCharCode(65533); |
| 8544 value = 65533; |
| 8545 expectedUnits = 0; |
| 8546 extraUnits = 0; |
| 8547 } |
| 8548 } |
| 8549 break $loop$0; |
| 8550 } |
| 8551 if (expectedUnits > 0) { |
| 8552 this._value = value; |
| 8553 this._expectedUnits = expectedUnits; |
| 8554 this._extraUnits = extraUnits; |
| 8555 } |
| 8556 } |
| 8557 }, |
| 8558 _Utf8Decoder_convert_scanOneByteCharacters: { |
| 8559 "^": "Closure:17;endIndex_0", |
| 8560 call$2: function(units, from) { |
| 8561 var to, t1, i, unit; |
| 8562 to = this.endIndex_0; |
| 8563 for (t1 = J.getInterceptor$asx(units), i = from; i < to; ++i) { |
| 8564 unit = t1.$index(units, i); |
| 8565 if (typeof unit !== "number") |
| 8566 return unit.$and(); |
| 8567 if ((unit & 127) !== unit) |
| 8568 return i - from; |
| 8569 } |
| 8570 return to - from; |
| 8571 } |
| 8572 }, |
| 8573 _Utf8Decoder_convert_addSingleBytes: { |
| 8574 "^": "Closure:18;this_1,codeUnits_2,startIndex_3,endIndex_4", |
| 8575 call$2: function(from, to) { |
| 8576 this.this_1._stringSink._contents += P.String_String$fromCharCodes(this.co
deUnits_2, from, to); |
| 8577 } |
| 8578 } |
| 8579 }], |
| 8580 ["dart.core", "dart:core", , P, { |
| 8581 "^": "", |
| 8582 _symbolToString: function(symbol) { |
| 8583 return H.Symbol_getName(symbol); |
| 8584 }, |
| 8585 String__checkBounds: function(len, start, end) { |
| 8586 if (start < 0 || start > len) |
| 8587 throw H.wrapException(P.RangeError$range(start, 0, len, null, null)); |
| 8588 if (end == null) |
| 8589 end = len; |
| 8590 else if (end < start || end > len) |
| 8591 throw H.wrapException(P.RangeError$range(end, start, len, null, null)); |
| 8592 return end; |
| 8593 }, |
| 8594 String__stringFromIterable: function(charCodes, start, end) { |
| 8595 var t1, it, i, list; |
| 8596 if (start < 0) |
| 8597 throw H.wrapException(P.RangeError$range(start, 0, J.get$length$asx(charCo
des), null, null)); |
| 8598 t1 = end == null; |
| 8599 if (!t1 && end < start) |
| 8600 throw H.wrapException(P.RangeError$range(end, start, J.get$length$asx(char
Codes), null, null)); |
| 8601 it = J.get$iterator$ax(charCodes); |
| 8602 for (i = 0; i < start; ++i) |
| 8603 if (!it.moveNext$0()) |
| 8604 throw H.wrapException(P.RangeError$range(start, 0, i, null, null)); |
| 8605 list = []; |
| 8606 if (t1) |
| 8607 for (; it.moveNext$0();) |
| 8608 list.push(it._current); |
| 8609 else |
| 8610 for (i = start; i < end; ++i) { |
| 8611 if (!it.moveNext$0()) |
| 8612 throw H.wrapException(P.RangeError$range(end, start, i, null, null)); |
| 8613 list.push(it._current); |
| 8614 } |
| 8615 return H.Primitives_stringFromCharCodes(list); |
| 8616 }, |
| 8617 Error_safeToString: function(object) { |
| 8618 if (typeof object === "number" || typeof object === "boolean" || null == obj
ect) |
| 8619 return J.toString$0(object); |
| 8620 if (typeof object === "string") |
| 8621 return JSON.stringify(object); |
| 8622 return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; |
| 8623 }, |
| 8624 Exception_Exception: function(message) { |
| 8625 return new P._ExceptionImplementation(message); |
| 8626 }, |
| 8627 identical: [function(a, b) { |
| 8628 return a == null ? b == null : a === b; |
| 8629 }, "call$2", "identical$closure", 4, 0, 46], |
| 8630 identityHashCode: [function(object) { |
| 8631 return H.objectHashCode(object); |
| 8632 }, "call$1", "identityHashCode$closure", 2, 0, 47], |
| 8633 List_List$filled: function($length, fill, $E) { |
| 8634 var result, t1, i; |
| 8635 result = J.JSArray_JSArray$fixed($length, $E); |
| 8636 if ($length !== 0 && true) |
| 8637 for (t1 = result.length, i = 0; i < t1; ++i) |
| 8638 result[i] = fill; |
| 8639 return result; |
| 8640 }, |
| 8641 List_List$from: function(elements, growable, $E) { |
| 8642 var list, t1; |
| 8643 list = H.setRuntimeTypeInfo([], [$E]); |
| 8644 for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) |
| 8645 list.push(t1.get$current()); |
| 8646 if (growable) |
| 8647 return list; |
| 8648 list.fixed$length = Array; |
| 8649 return list; |
| 8650 }, |
| 8651 List_List$generate: function($length, generator, growable, $E) { |
| 8652 var result, t1, i; |
| 8653 if (growable) { |
| 8654 result = H.setRuntimeTypeInfo([], [$E]); |
| 8655 C.JSArray_methods.set$length(result, $length); |
| 8656 } else { |
| 8657 t1 = Array($length); |
| 8658 t1.fixed$length = Array; |
| 8659 result = H.setRuntimeTypeInfo(t1, [$E]); |
| 8660 } |
| 8661 for (i = 0; i < $length; ++i) { |
| 8662 t1 = generator.call$1(i); |
| 8663 if (i >= result.length) |
| 8664 return H.ioore(result, i); |
| 8665 result[i] = t1; |
| 8666 } |
| 8667 return result; |
| 8668 }, |
| 8669 print: function(object) { |
| 8670 var line, t1; |
| 8671 line = H.S(object); |
| 8672 t1 = $.printToZone; |
| 8673 if (t1 == null) |
| 8674 H.printString(line); |
| 8675 else |
| 8676 t1.call$1(line); |
| 8677 }, |
| 8678 RegExp_RegExp: function(source, caseSensitive, multiLine) { |
| 8679 return new H.JSSyntaxRegExp(source, H.JSSyntaxRegExp_makeNative(source, mult
iLine, caseSensitive, false), null, null); |
| 8680 }, |
| 8681 String_String$fromCharCodes: function(charCodes, start, end) { |
| 8682 var len; |
| 8683 if (charCodes.constructor === Array) { |
| 8684 len = charCodes.length; |
| 8685 end = P.String__checkBounds(len, start, end); |
| 8686 return H.Primitives_stringFromCharCodes(start > 0 || end < len ? C.JSArray
_methods.sublist$2(charCodes, start, end) : charCodes); |
| 8687 } |
| 8688 return P.String__stringFromIterable(charCodes, start, end); |
| 8689 }, |
| 8690 String_String$fromCharCode: function(charCode) { |
| 8691 return H.Primitives_stringFromCharCode(charCode); |
| 8692 }, |
| 8693 NoSuchMethodError_toString_closure: { |
| 8694 "^": "Closure:19;box_0", |
| 8695 call$2: function(key, value) { |
| 8696 var t1 = this.box_0; |
| 8697 if (t1.i_1 > 0) |
| 8698 t1.sb_0._contents += ", "; |
| 8699 P._symbolToString(key); |
| 8700 } |
| 8701 }, |
| 8702 bool: { |
| 8703 "^": "Object;" |
| 8704 }, |
| 8705 "+bool": 0, |
| 8706 DateTime: { |
| 8707 "^": "Object;millisecondsSinceEpoch,isUtc", |
| 8708 $eq: function(_, other) { |
| 8709 if (other == null) |
| 8710 return false; |
| 8711 if (!(other instanceof P.DateTime)) |
| 8712 return false; |
| 8713 return this.millisecondsSinceEpoch === other.millisecondsSinceEpoch && thi
s.isUtc === other.isUtc; |
| 8714 }, |
| 8715 get$hashCode: function(_) { |
| 8716 return this.millisecondsSinceEpoch; |
| 8717 }, |
| 8718 toString$0: function(_) { |
| 8719 var t1, y, m, d, h, min, sec, ms; |
| 8720 t1 = this.isUtc; |
| 8721 y = P.DateTime__fourDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCFull
Year() + 0 : H.Primitives_lazyAsJsDate(this).getFullYear() + 0); |
| 8722 m = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCMonth
() + 1 : H.Primitives_lazyAsJsDate(this).getMonth() + 1); |
| 8723 d = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCDate(
) + 0 : H.Primitives_lazyAsJsDate(this).getDate() + 0); |
| 8724 h = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCHours
() + 0 : H.Primitives_lazyAsJsDate(this).getHours() + 0); |
| 8725 min = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCMin
utes() + 0 : H.Primitives_lazyAsJsDate(this).getMinutes() + 0); |
| 8726 sec = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCSec
onds() + 0 : H.Primitives_lazyAsJsDate(this).getSeconds() + 0); |
| 8727 ms = P.DateTime__threeDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCMi
lliseconds() + 0 : H.Primitives_lazyAsJsDate(this).getMilliseconds() + 0); |
| 8728 if (t1) |
| 8729 return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + m
s + "Z"; |
| 8730 else |
| 8731 return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + m
s; |
| 8732 }, |
| 8733 add$1: function(_, duration) { |
| 8734 return P.DateTime$fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch +
duration.get$inMilliseconds(), this.isUtc); |
| 8735 }, |
| 8736 DateTime$fromMillisecondsSinceEpoch$2$isUtc: function(millisecondsSinceEpoch
, isUtc) { |
| 8737 if (Math.abs(millisecondsSinceEpoch) > 864e13) |
| 8738 throw H.wrapException(P.ArgumentError$(millisecondsSinceEpoch)); |
| 8739 }, |
| 8740 static: {DateTime$fromMillisecondsSinceEpoch: function(millisecondsSinceEpoc
h, isUtc) { |
| 8741 var t1 = new P.DateTime(millisecondsSinceEpoch, isUtc); |
| 8742 t1.DateTime$fromMillisecondsSinceEpoch$2$isUtc(millisecondsSinceEpoch, i
sUtc); |
| 8743 return t1; |
| 8744 }, DateTime__fourDigits: function(n) { |
| 8745 var absN, sign; |
| 8746 absN = Math.abs(n); |
| 8747 sign = n < 0 ? "-" : ""; |
| 8748 if (absN >= 1000) |
| 8749 return "" + n; |
| 8750 if (absN >= 100) |
| 8751 return sign + "0" + H.S(absN); |
| 8752 if (absN >= 10) |
| 8753 return sign + "00" + H.S(absN); |
| 8754 return sign + "000" + H.S(absN); |
| 8755 }, DateTime__threeDigits: function(n) { |
| 8756 if (n >= 100) |
| 8757 return "" + n; |
| 8758 if (n >= 10) |
| 8759 return "0" + n; |
| 8760 return "00" + n; |
| 8761 }, DateTime__twoDigits: function(n) { |
| 8762 if (n >= 10) |
| 8763 return "" + n; |
| 8764 return "0" + n; |
| 8765 }} |
| 8766 }, |
| 8767 $double: { |
| 8768 "^": "num;" |
| 8769 }, |
| 8770 "+double": 0, |
| 8771 Duration: { |
| 8772 "^": "Object;_duration<", |
| 8773 $add: function(_, other) { |
| 8774 return new P.Duration(C.JSInt_methods.$add(this._duration, other.get$_dura
tion())); |
| 8775 }, |
| 8776 $sub: function(_, other) { |
| 8777 return new P.Duration(this._duration - other.get$_duration()); |
| 8778 }, |
| 8779 $mul: function(_, factor) { |
| 8780 return new P.Duration(C.JSInt_methods.round$0(this._duration * factor)); |
| 8781 }, |
| 8782 $lt: function(_, other) { |
| 8783 return this._duration < other.get$_duration(); |
| 8784 }, |
| 8785 $gt: function(_, other) { |
| 8786 return this._duration > other.get$_duration(); |
| 8787 }, |
| 8788 $ge: function(_, other) { |
| 8789 return C.JSInt_methods.$ge(this._duration, other.get$_duration()); |
| 8790 }, |
| 8791 get$inMilliseconds: function() { |
| 8792 return C.JSInt_methods._tdivFast$1(this._duration, 1000); |
| 8793 }, |
| 8794 $eq: function(_, other) { |
| 8795 if (other == null) |
| 8796 return false; |
| 8797 if (!(other instanceof P.Duration)) |
| 8798 return false; |
| 8799 return this._duration === other._duration; |
| 8800 }, |
| 8801 get$hashCode: function(_) { |
| 8802 return this._duration & 0x1FFFFFFF; |
| 8803 }, |
| 8804 toString$0: function(_) { |
| 8805 var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs; |
| 8806 t1 = new P.Duration_toString_twoDigits(); |
| 8807 t2 = this._duration; |
| 8808 if (t2 < 0) |
| 8809 return "-" + new P.Duration(-t2).toString$0(0); |
| 8810 twoDigitMinutes = t1.call$1(C.JSInt_methods.remainder$1(C.JSInt_methods._t
divFast$1(t2, 60000000), 60)); |
| 8811 twoDigitSeconds = t1.call$1(C.JSInt_methods.remainder$1(C.JSInt_methods._t
divFast$1(t2, 1000000), 60)); |
| 8812 sixDigitUs = new P.Duration_toString_sixDigits().call$1(C.JSInt_methods.re
mainder$1(t2, 1000000)); |
| 8813 return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDig
itMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs); |
| 8814 }, |
| 8815 $negate: function(_) { |
| 8816 return new P.Duration(-this._duration); |
| 8817 } |
| 8818 }, |
| 8819 Duration_toString_sixDigits: { |
| 8820 "^": "Closure:20;", |
| 8821 call$1: function(n) { |
| 8822 if (n >= 100000) |
| 8823 return "" + n; |
| 8824 if (n >= 10000) |
| 8825 return "0" + n; |
| 8826 if (n >= 1000) |
| 8827 return "00" + n; |
| 8828 if (n >= 100) |
| 8829 return "000" + n; |
| 8830 if (n >= 10) |
| 8831 return "0000" + n; |
| 8832 return "00000" + n; |
| 8833 } |
| 8834 }, |
| 8835 Duration_toString_twoDigits: { |
| 8836 "^": "Closure:20;", |
| 8837 call$1: function(n) { |
| 8838 if (n >= 10) |
| 8839 return "" + n; |
| 8840 return "0" + n; |
| 8841 } |
| 8842 }, |
| 8843 Error: { |
| 8844 "^": "Object;", |
| 8845 get$stackTrace: function() { |
| 8846 return H.getTraceFromException(this.$thrownJsError); |
| 8847 } |
| 8848 }, |
| 8849 NullThrownError: { |
| 8850 "^": "Error;", |
| 8851 toString$0: function(_) { |
| 8852 return "Throw of null."; |
| 8853 } |
| 8854 }, |
| 8855 ArgumentError: { |
| 8856 "^": "Error;_hasValue,invalidValue,name,message>", |
| 8857 get$_errorName: function() { |
| 8858 return "Invalid argument" + (!this._hasValue ? "(s)" : ""); |
| 8859 }, |
| 8860 get$_errorExplanation: function() { |
| 8861 return ""; |
| 8862 }, |
| 8863 toString$0: function(_) { |
| 8864 var t1, nameString, message, prefix, explanation, errorValue; |
| 8865 t1 = this.name; |
| 8866 nameString = t1 != null ? " (" + H.S(t1) + ")" : ""; |
| 8867 t1 = this.message; |
| 8868 message = t1 == null ? "" : ": " + H.S(t1); |
| 8869 prefix = this.get$_errorName() + nameString + message; |
| 8870 if (!this._hasValue) |
| 8871 return prefix; |
| 8872 explanation = this.get$_errorExplanation(); |
| 8873 errorValue = P.Error_safeToString(this.invalidValue); |
| 8874 return prefix + explanation + ": " + H.S(errorValue); |
| 8875 }, |
| 8876 static: {ArgumentError$: function(message) { |
| 8877 return new P.ArgumentError(false, null, null, message); |
| 8878 }} |
| 8879 }, |
| 8880 RangeError: { |
| 8881 "^": "ArgumentError;start>,end<,_hasValue,invalidValue,name,message", |
| 8882 get$_errorName: function() { |
| 8883 return "RangeError"; |
| 8884 }, |
| 8885 get$_errorExplanation: function() { |
| 8886 var t1, explanation, t2, t3; |
| 8887 t1 = this.start; |
| 8888 if (t1 == null) { |
| 8889 t1 = this.end; |
| 8890 explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : ""
; |
| 8891 } else { |
| 8892 t2 = this.end; |
| 8893 if (t2 == null) |
| 8894 explanation = ": Not greater than or equal to " + H.S(t1); |
| 8895 else { |
| 8896 t3 = J.getInterceptor$n(t2); |
| 8897 if (t3.$gt(t2, t1)) |
| 8898 explanation = ": Not in range " + H.S(t1) + ".." + H.S(t2) + ", incl
usive"; |
| 8899 else |
| 8900 explanation = t3.$lt(t2, t1) ? ": Valid value range is empty" : ": O
nly valid value is " + H.S(t1); |
| 8901 } |
| 8902 } |
| 8903 return explanation; |
| 8904 }, |
| 8905 static: {RangeError$: function(message) { |
| 8906 return new P.RangeError(null, null, false, null, null, message); |
| 8907 }, RangeError$value: function(value, $name, message) { |
| 8908 return new P.RangeError(null, null, true, value, $name, "Value not in ra
nge"); |
| 8909 }, RangeError$range: function(invalidValue, minValue, maxValue, $name, mes
sage) { |
| 8910 return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "
Invalid value"); |
| 8911 }, RangeError_checkValueInInterval: function(value, minValue, maxValue, $n
ame, message) { |
| 8912 if (value < minValue || value > maxValue) |
| 8913 throw H.wrapException(P.RangeError$range(value, minValue, maxValue, $n
ame, message)); |
| 8914 }, RangeError_checkValidRange: function(start, end, $length, startName, en
dName, message) { |
| 8915 var t1; |
| 8916 if (start >= 0) { |
| 8917 if (typeof $length !== "number") |
| 8918 return H.iae($length); |
| 8919 t1 = start > $length; |
| 8920 } else |
| 8921 t1 = true; |
| 8922 if (t1) |
| 8923 throw H.wrapException(P.RangeError$range(start, 0, $length, "start", m
essage)); |
| 8924 if (end != null) { |
| 8925 if (!(end < start)) { |
| 8926 if (typeof $length !== "number") |
| 8927 return H.iae($length); |
| 8928 t1 = end > $length; |
| 8929 } else |
| 8930 t1 = true; |
| 8931 if (t1) |
| 8932 throw H.wrapException(P.RangeError$range(end, start, $length, "end",
message)); |
| 8933 return end; |
| 8934 } |
| 8935 return $length; |
| 8936 }} |
| 8937 }, |
| 8938 IndexError: { |
| 8939 "^": "ArgumentError;indexable,length>,_hasValue,invalidValue,name,message", |
| 8940 get$start: function(_) { |
| 8941 return 0; |
| 8942 }, |
| 8943 get$end: function() { |
| 8944 return J.$sub$n(this.length, 1); |
| 8945 }, |
| 8946 get$_errorName: function() { |
| 8947 return "RangeError"; |
| 8948 }, |
| 8949 get$_errorExplanation: function() { |
| 8950 P.Error_safeToString(this.indexable); |
| 8951 var explanation = ": index should be less than " + H.S(this.length); |
| 8952 return J.$lt$n(this.invalidValue, 0) ? ": index must not be negative" : ex
planation; |
| 8953 }, |
| 8954 static: {IndexError$: function(invalidValue, indexable, $name, message, $len
gth) { |
| 8955 var t1 = $length != null ? $length : J.get$length$asx(indexable); |
| 8956 return new P.IndexError(indexable, t1, true, invalidValue, $name, "Index
out of range"); |
| 8957 }} |
| 8958 }, |
| 8959 UnsupportedError: { |
| 8960 "^": "Error;message>", |
| 8961 toString$0: function(_) { |
| 8962 return "Unsupported operation: " + this.message; |
| 8963 }, |
| 8964 static: {UnsupportedError$: function(message) { |
| 8965 return new P.UnsupportedError(message); |
| 8966 }} |
| 8967 }, |
| 8968 UnimplementedError: { |
| 8969 "^": "Error;message>", |
| 8970 toString$0: function(_) { |
| 8971 var t1 = this.message; |
| 8972 return t1 != null ? "UnimplementedError: " + H.S(t1) : "UnimplementedError
"; |
| 8973 }, |
| 8974 static: {UnimplementedError$: function(message) { |
| 8975 return new P.UnimplementedError(message); |
| 8976 }} |
| 8977 }, |
| 8978 StateError: { |
| 8979 "^": "Error;message>", |
| 8980 toString$0: function(_) { |
| 8981 return "Bad state: " + this.message; |
| 8982 }, |
| 8983 static: {StateError$: function(message) { |
| 8984 return new P.StateError(message); |
| 8985 }} |
| 8986 }, |
| 8987 ConcurrentModificationError: { |
| 8988 "^": "Error;modifiedObject", |
| 8989 toString$0: function(_) { |
| 8990 return "Concurrent modification during iteration: " + H.S(P.Error_safeToSt
ring(this.modifiedObject)) + "."; |
| 8991 }, |
| 8992 static: {ConcurrentModificationError$: function(modifiedObject) { |
| 8993 return new P.ConcurrentModificationError(modifiedObject); |
| 8994 }} |
| 8995 }, |
| 8996 OutOfMemoryError: { |
| 8997 "^": "Object;", |
| 8998 toString$0: function(_) { |
| 8999 return "Out of Memory"; |
| 9000 }, |
| 9001 get$stackTrace: function() { |
| 9002 return; |
| 9003 }, |
| 9004 $isError: 1 |
| 9005 }, |
| 9006 StackOverflowError: { |
| 9007 "^": "Object;", |
| 9008 toString$0: function(_) { |
| 9009 return "Stack Overflow"; |
| 9010 }, |
| 9011 get$stackTrace: function() { |
| 9012 return; |
| 9013 }, |
| 9014 $isError: 1 |
| 9015 }, |
| 9016 CyclicInitializationError: { |
| 9017 "^": "Error;variableName", |
| 9018 toString$0: function(_) { |
| 9019 return "Reading static variable '" + this.variableName + "' during its ini
tialization"; |
| 9020 } |
| 9021 }, |
| 9022 _ExceptionImplementation: { |
| 9023 "^": "Object;message>", |
| 9024 toString$0: function(_) { |
| 9025 var t1 = this.message; |
| 9026 if (t1 == null) |
| 9027 return "Exception"; |
| 9028 return "Exception: " + H.S(t1); |
| 9029 } |
| 9030 }, |
| 9031 FormatException: { |
| 9032 "^": "Object;message>,source,offset", |
| 9033 toString$0: function(_) { |
| 9034 var t1, report, offset, source, lineNum, lineStart, lastWasCR, i, $char, l
ineEnd, t2, end, start, prefix, postfix, slice; |
| 9035 t1 = this.message; |
| 9036 report = t1 != null && "" !== t1 ? "FormatException: " + H.S(t1) : "Format
Exception"; |
| 9037 offset = this.offset; |
| 9038 source = this.source; |
| 9039 if (typeof source !== "string") |
| 9040 return offset != null ? report + (" (at offset " + H.S(offset) + ")") :
report; |
| 9041 if (offset != null) { |
| 9042 t1 = J.getInterceptor$n(offset); |
| 9043 t1 = t1.$lt(offset, 0) || t1.$gt(offset, J.get$length$asx(source)); |
| 9044 } else |
| 9045 t1 = false; |
| 9046 if (t1) |
| 9047 offset = null; |
| 9048 if (offset == null) { |
| 9049 t1 = J.getInterceptor$asx(source); |
| 9050 if (J.$gt$n(t1.get$length(source), 78)) |
| 9051 source = t1.substring$2(source, 0, 75) + "..."; |
| 9052 return report + "\n" + H.S(source); |
| 9053 } |
| 9054 if (typeof offset !== "number") |
| 9055 return H.iae(offset); |
| 9056 t1 = J.getInterceptor$asx(source); |
| 9057 lineNum = 1; |
| 9058 lineStart = 0; |
| 9059 lastWasCR = null; |
| 9060 i = 0; |
| 9061 for (; i < offset; ++i) { |
| 9062 $char = t1.codeUnitAt$1(source, i); |
| 9063 if ($char === 10) { |
| 9064 if (lineStart !== i || lastWasCR !== true) |
| 9065 ++lineNum; |
| 9066 lineStart = i + 1; |
| 9067 lastWasCR = false; |
| 9068 } else if ($char === 13) { |
| 9069 ++lineNum; |
| 9070 lineStart = i + 1; |
| 9071 lastWasCR = true; |
| 9072 } |
| 9073 } |
| 9074 report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " +
H.S(offset - lineStart + 1) + ")\n") : report + (" (at character " + H.S(offset
+ 1) + ")\n"); |
| 9075 lineEnd = t1.get$length(source); |
| 9076 i = offset; |
| 9077 while (true) { |
| 9078 t2 = t1.get$length(source); |
| 9079 if (typeof t2 !== "number") |
| 9080 return H.iae(t2); |
| 9081 if (!(i < t2)) |
| 9082 break; |
| 9083 $char = t1.codeUnitAt$1(source, i); |
| 9084 if ($char === 10 || $char === 13) { |
| 9085 lineEnd = i; |
| 9086 break; |
| 9087 } |
| 9088 ++i; |
| 9089 } |
| 9090 t2 = J.getInterceptor$n(lineEnd); |
| 9091 if (J.$gt$n(t2.$sub(lineEnd, lineStart), 78)) |
| 9092 if (offset - lineStart < 75) { |
| 9093 end = lineStart + 75; |
| 9094 start = lineStart; |
| 9095 prefix = ""; |
| 9096 postfix = "..."; |
| 9097 } else { |
| 9098 if (J.$lt$n(t2.$sub(lineEnd, offset), 75)) { |
| 9099 start = t2.$sub(lineEnd, 75); |
| 9100 end = lineEnd; |
| 9101 postfix = ""; |
| 9102 } else { |
| 9103 start = offset - 36; |
| 9104 end = offset + 36; |
| 9105 postfix = "..."; |
| 9106 } |
| 9107 prefix = "..."; |
| 9108 } |
| 9109 else { |
| 9110 end = lineEnd; |
| 9111 start = lineStart; |
| 9112 prefix = ""; |
| 9113 postfix = ""; |
| 9114 } |
| 9115 slice = t1.substring$2(source, start, end); |
| 9116 if (typeof start !== "number") |
| 9117 return H.iae(start); |
| 9118 return report + prefix + slice + postfix + "\n" + C.JSString_methods.$mul(
" ", offset - start + prefix.length) + "^\n"; |
| 9119 }, |
| 9120 static: {FormatException$: function(message, source, offset) { |
| 9121 return new P.FormatException(message, source, offset); |
| 9122 }} |
| 9123 }, |
| 9124 Expando: { |
| 9125 "^": "Object;name", |
| 9126 toString$0: function(_) { |
| 9127 return "Expando:" + H.S(this.name); |
| 9128 }, |
| 9129 $index: function(_, object) { |
| 9130 var values = H.Primitives_getProperty(object, "expando$values"); |
| 9131 return values == null ? null : H.Primitives_getProperty(values, this._getK
ey$0()); |
| 9132 }, |
| 9133 $indexSet: function(_, object, value) { |
| 9134 var values = H.Primitives_getProperty(object, "expando$values"); |
| 9135 if (values == null) { |
| 9136 values = new P.Object(); |
| 9137 H.Primitives_setProperty(object, "expando$values", values); |
| 9138 } |
| 9139 H.Primitives_setProperty(values, this._getKey$0(), value); |
| 9140 }, |
| 9141 _getKey$0: function() { |
| 9142 var key, t1; |
| 9143 key = H.Primitives_getProperty(this, "expando$key"); |
| 9144 if (key == null) { |
| 9145 t1 = $.Expando__keyCount; |
| 9146 $.Expando__keyCount = t1 + 1; |
| 9147 key = "expando$key$" + t1; |
| 9148 H.Primitives_setProperty(this, "expando$key", key); |
| 9149 } |
| 9150 return key; |
| 9151 } |
| 9152 }, |
| 9153 $int: { |
| 9154 "^": "num;" |
| 9155 }, |
| 9156 "+int": 0, |
| 9157 Iterator: { |
| 9158 "^": "Object;" |
| 9159 }, |
| 9160 List: { |
| 9161 "^": "Object;", |
| 9162 $asList: null, |
| 9163 $isEfficientLength: 1 |
| 9164 }, |
| 9165 "+List": 0, |
| 9166 Map: { |
| 9167 "^": "Object;" |
| 9168 }, |
| 9169 Null: { |
| 9170 "^": "Object;", |
| 9171 toString$0: function(_) { |
| 9172 return "null"; |
| 9173 } |
| 9174 }, |
| 9175 "+Null": 0, |
| 9176 num: { |
| 9177 "^": "Object;" |
| 9178 }, |
| 9179 "+num": 0, |
| 9180 Object: { |
| 9181 "^": ";", |
| 9182 $eq: function(_, other) { |
| 9183 return this === other; |
| 9184 }, |
| 9185 get$hashCode: function(_) { |
| 9186 return H.Primitives_objectHashCode(this); |
| 9187 }, |
| 9188 toString$0: function(_) { |
| 9189 return H.Primitives_objectToString(this); |
| 9190 } |
| 9191 }, |
| 9192 Match: { |
| 9193 "^": "Object;" |
| 9194 }, |
| 9195 StackTrace: { |
| 9196 "^": "Object;" |
| 9197 }, |
| 9198 String: { |
| 9199 "^": "Object;" |
| 9200 }, |
| 9201 "+String": 0, |
| 9202 StringBuffer: { |
| 9203 "^": "Object;_contents<", |
| 9204 get$length: function(_) { |
| 9205 return this._contents.length; |
| 9206 }, |
| 9207 get$isEmpty: function(_) { |
| 9208 return this._contents.length === 0; |
| 9209 }, |
| 9210 get$isNotEmpty: function(_) { |
| 9211 return this._contents.length !== 0; |
| 9212 }, |
| 9213 writeAll$2: function(objects, separator) { |
| 9214 var iterator = J.get$iterator$ax(objects); |
| 9215 if (!iterator.moveNext$0()) |
| 9216 return; |
| 9217 if (separator.length === 0) { |
| 9218 do |
| 9219 this._contents += H.S(iterator.get$current()); |
| 9220 while (iterator.moveNext$0()); |
| 9221 } else { |
| 9222 this._contents += H.S(iterator.get$current()); |
| 9223 for (; iterator.moveNext$0();) { |
| 9224 this._contents += separator; |
| 9225 this._contents += H.S(iterator.get$current()); |
| 9226 } |
| 9227 } |
| 9228 }, |
| 9229 toString$0: function(_) { |
| 9230 var t1 = this._contents; |
| 9231 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 9232 } |
| 9233 }, |
| 9234 Symbol: { |
| 9235 "^": "Object;" |
| 9236 }, |
| 9237 Uri: { |
| 9238 "^": "Object;_host,_port,_path,scheme,_userInfo,_query,_fragment,_pathSegmen
ts,_queryParameters", |
| 9239 get$host: function(_) { |
| 9240 var t1 = this._host; |
| 9241 if (t1 == null) |
| 9242 return ""; |
| 9243 if (J.getInterceptor$s(t1).startsWith$1(t1, "[")) |
| 9244 return C.JSString_methods.substring$2(t1, 1, t1.length - 1); |
| 9245 return t1; |
| 9246 }, |
| 9247 get$port: function(_) { |
| 9248 var t1 = this._port; |
| 9249 if (t1 == null) |
| 9250 return P.Uri__defaultPort(this.scheme); |
| 9251 return t1; |
| 9252 }, |
| 9253 get$pathSegments: function() { |
| 9254 var t1, pathToSplit; |
| 9255 t1 = this._pathSegments; |
| 9256 if (t1 == null) { |
| 9257 pathToSplit = this._path; |
| 9258 if (pathToSplit.length !== 0 && C.JSString_methods.codeUnitAt$1(pathToSp
lit, 0) === 47) |
| 9259 pathToSplit = C.JSString_methods.substring$1(pathToSplit, 1); |
| 9260 t1 = pathToSplit === "" ? C.List_empty : H.setRuntimeTypeInfo(new H.Mapp
edListIterable(pathToSplit.split("/"), P.Uri_decodeComponent$closure()), [null,
null]).toList$1$growable(0, false); |
| 9261 t1 = H.setRuntimeTypeInfo(new P.UnmodifiableListView(t1), [null]); |
| 9262 this._pathSegments = t1; |
| 9263 } |
| 9264 return t1; |
| 9265 }, |
| 9266 _merge$2: function(base, reference) { |
| 9267 var backCount, refStart, baseEnd, newEnd, delta, t1; |
| 9268 if (base.length === 0) |
| 9269 return "/" + reference; |
| 9270 for (backCount = 0, refStart = 0; C.JSString_methods.startsWith$2(referenc
e, "../", refStart);) { |
| 9271 refStart += 3; |
| 9272 ++backCount; |
| 9273 } |
| 9274 baseEnd = C.JSString_methods.lastIndexOf$1(base, "/"); |
| 9275 while (true) { |
| 9276 if (!(baseEnd > 0 && backCount > 0)) |
| 9277 break; |
| 9278 newEnd = C.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); |
| 9279 if (newEnd < 0) |
| 9280 break; |
| 9281 delta = baseEnd - newEnd; |
| 9282 t1 = delta !== 2; |
| 9283 if (!t1 || delta === 3) |
| 9284 if (C.JSString_methods.codeUnitAt$1(base, newEnd + 1) === 46) |
| 9285 t1 = !t1 || C.JSString_methods.codeUnitAt$1(base, newEnd + 2) === 46
; |
| 9286 else |
| 9287 t1 = false; |
| 9288 else |
| 9289 t1 = false; |
| 9290 if (t1) |
| 9291 break; |
| 9292 --backCount; |
| 9293 baseEnd = newEnd; |
| 9294 } |
| 9295 return C.JSString_methods.replaceRange$3(base, baseEnd + 1, null, C.JSStri
ng_methods.substring$1(reference, refStart - 3 * backCount)); |
| 9296 }, |
| 9297 _hasDotSegments$1: function(path) { |
| 9298 if (path.length > 0 && C.JSString_methods.codeUnitAt$1(path, 0) === 46) |
| 9299 return true; |
| 9300 return C.JSString_methods.indexOf$1(path, "/.") !== -1; |
| 9301 }, |
| 9302 _removeDotSegments$1: function(path) { |
| 9303 var output, t1, appendSlash, segment, t2; |
| 9304 if (!this._hasDotSegments$1(path)) |
| 9305 return path; |
| 9306 output = []; |
| 9307 for (t1 = path.split("/"), t1 = new H.ListIterator(t1, t1.length, 0, null)
, appendSlash = false; t1.moveNext$0();) { |
| 9308 segment = t1._current; |
| 9309 if (J.$eq(segment, "..")) { |
| 9310 t2 = output.length; |
| 9311 if (t2 !== 0) |
| 9312 if (t2 === 1) { |
| 9313 if (0 >= t2) |
| 9314 return H.ioore(output, 0); |
| 9315 t2 = !J.$eq(output[0], ""); |
| 9316 } else |
| 9317 t2 = true; |
| 9318 else |
| 9319 t2 = false; |
| 9320 if (t2) { |
| 9321 if (0 >= output.length) |
| 9322 return H.ioore(output, 0); |
| 9323 output.pop(); |
| 9324 } |
| 9325 appendSlash = true; |
| 9326 } else if ("." === segment) |
| 9327 appendSlash = true; |
| 9328 else { |
| 9329 output.push(segment); |
| 9330 appendSlash = false; |
| 9331 } |
| 9332 } |
| 9333 if (appendSlash) |
| 9334 output.push(""); |
| 9335 return C.JSArray_methods.join$1(output, "/"); |
| 9336 }, |
| 9337 resolveUri$1: function(reference) { |
| 9338 var targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targ
etQuery, t1, fragment; |
| 9339 targetScheme = reference.scheme; |
| 9340 if (targetScheme.length !== 0) { |
| 9341 if (reference._host != null) { |
| 9342 targetUserInfo = reference._userInfo; |
| 9343 targetHost = reference.get$host(reference); |
| 9344 targetPort = reference._port != null ? reference.get$port(reference) :
null; |
| 9345 } else { |
| 9346 targetUserInfo = ""; |
| 9347 targetHost = null; |
| 9348 targetPort = null; |
| 9349 } |
| 9350 targetPath = this._removeDotSegments$1(reference._path); |
| 9351 targetQuery = reference._query; |
| 9352 if (targetQuery != null) |
| 9353 ; |
| 9354 else |
| 9355 targetQuery = null; |
| 9356 } else { |
| 9357 targetScheme = this.scheme; |
| 9358 if (reference._host != null) { |
| 9359 targetUserInfo = reference._userInfo; |
| 9360 targetHost = reference.get$host(reference); |
| 9361 targetPort = P.Uri__makePort(reference._port != null ? reference.get$p
ort(reference) : null, targetScheme); |
| 9362 targetPath = this._removeDotSegments$1(reference._path); |
| 9363 targetQuery = reference._query; |
| 9364 if (targetQuery != null) |
| 9365 ; |
| 9366 else |
| 9367 targetQuery = null; |
| 9368 } else { |
| 9369 t1 = reference._path; |
| 9370 if (t1 === "") { |
| 9371 targetPath = this._path; |
| 9372 targetQuery = reference._query; |
| 9373 if (targetQuery != null) |
| 9374 ; |
| 9375 else |
| 9376 targetQuery = this._query; |
| 9377 } else { |
| 9378 targetPath = C.JSString_methods.startsWith$1(t1, "/") ? this._remove
DotSegments$1(t1) : this._removeDotSegments$1(this._merge$2(this._path, t1)); |
| 9379 targetQuery = reference._query; |
| 9380 if (targetQuery != null) |
| 9381 ; |
| 9382 else |
| 9383 targetQuery = null; |
| 9384 } |
| 9385 targetUserInfo = this._userInfo; |
| 9386 targetHost = this._host; |
| 9387 targetPort = this._port; |
| 9388 } |
| 9389 } |
| 9390 fragment = reference._fragment; |
| 9391 if (fragment != null) |
| 9392 ; |
| 9393 else |
| 9394 fragment = null; |
| 9395 return new P.Uri(targetHost, targetPort, targetPath, targetScheme, targetU
serInfo, targetQuery, fragment, null, null); |
| 9396 }, |
| 9397 get$origin: function(_) { |
| 9398 var t1, t2; |
| 9399 t1 = this.scheme; |
| 9400 if (t1 !== "") { |
| 9401 t2 = this._host; |
| 9402 t2 = t2 == null || t2 === ""; |
| 9403 } else |
| 9404 t2 = true; |
| 9405 if (t2) |
| 9406 throw H.wrapException(P.StateError$("Cannot use origin without a scheme:
" + this.toString$0(0))); |
| 9407 if (t1 !== "http" && t1 !== "https") |
| 9408 throw H.wrapException(P.StateError$("Origin is only applicable schemes h
ttp and https: " + this.toString$0(0))); |
| 9409 t2 = this._port; |
| 9410 if (t2 == null) |
| 9411 return t1 + "://" + H.S(this._host); |
| 9412 return t1 + "://" + H.S(this._host) + ":" + H.S(t2); |
| 9413 }, |
| 9414 toFilePath$1$windows: function(windows) { |
| 9415 var t1, result; |
| 9416 t1 = this.scheme; |
| 9417 if (t1 !== "" && t1 !== "file") |
| 9418 throw H.wrapException(P.UnsupportedError$("Cannot extract a file path fr
om a " + t1 + " URI")); |
| 9419 t1 = this._query; |
| 9420 if ((t1 == null ? "" : t1) !== "") |
| 9421 throw H.wrapException(P.UnsupportedError$("Cannot extract a file path fr
om a URI with a query component")); |
| 9422 t1 = this._fragment; |
| 9423 if ((t1 == null ? "" : t1) !== "") |
| 9424 throw H.wrapException(P.UnsupportedError$("Cannot extract a file path fr
om a URI with a fragment component")); |
| 9425 if (this.get$host(this) !== "") |
| 9426 H.throwExpression(P.UnsupportedError$("Cannot extract a non-Windows file
path from a file URI with an authority")); |
| 9427 P.Uri__checkNonWindowsPathReservedCharacters(this.get$pathSegments(), fals
e); |
| 9428 result = new P.StringBuffer(""); |
| 9429 if (this.get$_isPathAbsolute()) |
| 9430 result._contents = "/"; |
| 9431 result.writeAll$2(this.get$pathSegments(), "/"); |
| 9432 t1 = result._contents; |
| 9433 t1 = t1.charCodeAt(0) == 0 ? t1 : t1; |
| 9434 return t1; |
| 9435 }, |
| 9436 toFilePath$0: function() { |
| 9437 return this.toFilePath$1$windows(null); |
| 9438 }, |
| 9439 get$_isPathAbsolute: function() { |
| 9440 if (this._path.length === 0) |
| 9441 return false; |
| 9442 return C.JSString_methods.startsWith$1(this._path, "/"); |
| 9443 }, |
| 9444 toString$0: function(_) { |
| 9445 var t1, t2, t3, t4; |
| 9446 t1 = this.scheme; |
| 9447 t2 = "" !== t1 ? t1 + ":" : ""; |
| 9448 t3 = this._host; |
| 9449 t4 = t3 == null; |
| 9450 if (!t4 || C.JSString_methods.startsWith$1(this._path, "//") || t1 === "fi
le") { |
| 9451 t1 = t2 + "//"; |
| 9452 t2 = this._userInfo; |
| 9453 if (t2.length !== 0) |
| 9454 t1 = t1 + t2 + "@"; |
| 9455 if (!t4) |
| 9456 t1 += H.S(t3); |
| 9457 t2 = this._port; |
| 9458 if (t2 != null) |
| 9459 t1 = t1 + ":" + H.S(t2); |
| 9460 } else |
| 9461 t1 = t2; |
| 9462 t1 += this._path; |
| 9463 t2 = this._query; |
| 9464 if (t2 != null) |
| 9465 t1 = t1 + "?" + H.S(t2); |
| 9466 t2 = this._fragment; |
| 9467 if (t2 != null) |
| 9468 t1 = t1 + "#" + H.S(t2); |
| 9469 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 9470 }, |
| 9471 $eq: function(_, other) { |
| 9472 var t1, t2, t3, t4; |
| 9473 if (other == null) |
| 9474 return false; |
| 9475 t1 = J.getInterceptor(other); |
| 9476 if (!t1.$isUri) |
| 9477 return false; |
| 9478 if (this.scheme === other.scheme) |
| 9479 if (this._host != null === (other._host != null)) |
| 9480 if (this._userInfo === other._userInfo) { |
| 9481 t2 = this.get$host(this); |
| 9482 t3 = t1.get$host(other); |
| 9483 if (t2 == null ? t3 == null : t2 === t3) { |
| 9484 t2 = this.get$port(this); |
| 9485 t1 = t1.get$port(other); |
| 9486 if (t2 == null ? t1 == null : t2 === t1) |
| 9487 if (this._path === other._path) { |
| 9488 t1 = this._query; |
| 9489 t2 = t1 == null; |
| 9490 t3 = other._query; |
| 9491 t4 = t3 == null; |
| 9492 if (!t2 === !t4) { |
| 9493 if (t2) |
| 9494 t1 = ""; |
| 9495 if (t1 == null ? (t4 ? "" : t3) == null : t1 === (t4 ? "" :
t3)) { |
| 9496 t1 = this._fragment; |
| 9497 t2 = t1 == null; |
| 9498 t3 = other._fragment; |
| 9499 t4 = t3 == null; |
| 9500 if (!t2 === !t4) { |
| 9501 if (t2) |
| 9502 t1 = ""; |
| 9503 t1 = t1 == null ? (t4 ? "" : t3) == null : t1 === (t4 ?
"" : t3); |
| 9504 } else |
| 9505 t1 = false; |
| 9506 } else |
| 9507 t1 = false; |
| 9508 } else |
| 9509 t1 = false; |
| 9510 } else |
| 9511 t1 = false; |
| 9512 else |
| 9513 t1 = false; |
| 9514 } else |
| 9515 t1 = false; |
| 9516 } else |
| 9517 t1 = false; |
| 9518 else |
| 9519 t1 = false; |
| 9520 else |
| 9521 t1 = false; |
| 9522 return t1; |
| 9523 }, |
| 9524 get$hashCode: function(_) { |
| 9525 var t1, t2, t3, t4, t5; |
| 9526 t1 = new P.Uri_hashCode_combine(); |
| 9527 t2 = this.get$host(this); |
| 9528 t3 = this.get$port(this); |
| 9529 t4 = this._query; |
| 9530 if (t4 == null) |
| 9531 t4 = ""; |
| 9532 t5 = this._fragment; |
| 9533 return t1.call$2(this.scheme, t1.call$2(this._userInfo, t1.call$2(t2, t1.c
all$2(t3, t1.call$2(this._path, t1.call$2(t4, t1.call$2(t5 == null ? "" : t5, 1)
)))))); |
| 9534 }, |
| 9535 static: {Uri__defaultPort: function(scheme) { |
| 9536 if (scheme === "http") |
| 9537 return 80; |
| 9538 if (scheme === "https") |
| 9539 return 443; |
| 9540 return 0; |
| 9541 }, Uri_parse: function(uri) { |
| 9542 var t1, pathStart, state, t2, i, t3, $char, index, t4, path, numberSignI
ndex, query, fragment; |
| 9543 t1 = {}; |
| 9544 t1.scheme_0 = ""; |
| 9545 t1.userinfo_1 = ""; |
| 9546 t1.host_2 = null; |
| 9547 t1.port_3 = null; |
| 9548 t1.index_4 = 0; |
| 9549 t1.char_5 = -1; |
| 9550 t2 = J.getInterceptor$asx(uri); |
| 9551 i = 0; |
| 9552 while (true) { |
| 9553 t3 = t2.get$length(uri); |
| 9554 if (typeof t3 !== "number") |
| 9555 return H.iae(t3); |
| 9556 if (!(i < t3)) { |
| 9557 pathStart = 0; |
| 9558 state = 0; |
| 9559 break; |
| 9560 } |
| 9561 $char = t2.codeUnitAt$1(uri, i); |
| 9562 t1.char_5 = $char; |
| 9563 if ($char === 63 || $char === 35) { |
| 9564 pathStart = 0; |
| 9565 state = 0; |
| 9566 break; |
| 9567 } |
| 9568 if ($char === 47) { |
| 9569 state = i === 0 ? 2 : 1; |
| 9570 pathStart = 0; |
| 9571 break; |
| 9572 } |
| 9573 if ($char === 58) { |
| 9574 if (i === 0) |
| 9575 P.Uri__fail(uri, 0, "Invalid empty scheme"); |
| 9576 t1.scheme_0 = P.Uri__makeScheme(uri, i); |
| 9577 ++i; |
| 9578 if (i === uri.length) { |
| 9579 t1.char_5 = -1; |
| 9580 state = 0; |
| 9581 } else { |
| 9582 $char = C.JSString_methods.codeUnitAt$1(uri, i); |
| 9583 t1.char_5 = $char; |
| 9584 if ($char === 63 || $char === 35) |
| 9585 state = 0; |
| 9586 else |
| 9587 state = $char === 47 ? 2 : 1; |
| 9588 } |
| 9589 pathStart = i; |
| 9590 break; |
| 9591 } |
| 9592 ++i; |
| 9593 t1.char_5 = -1; |
| 9594 } |
| 9595 t1.index_4 = i; |
| 9596 if (state === 2) { |
| 9597 index = i + 1; |
| 9598 t1.index_4 = index; |
| 9599 if (index === t2.get$length(uri)) { |
| 9600 t1.char_5 = -1; |
| 9601 state = 0; |
| 9602 } else { |
| 9603 $char = t2.codeUnitAt$1(uri, t1.index_4); |
| 9604 t1.char_5 = $char; |
| 9605 if ($char === 47) { |
| 9606 ++t1.index_4; |
| 9607 new P.Uri_parse_parseAuth(t1, uri, -1).call$0(); |
| 9608 pathStart = t1.index_4; |
| 9609 } |
| 9610 t3 = t1.char_5; |
| 9611 state = t3 === 63 || t3 === 35 || t3 === -1 ? 0 : 1; |
| 9612 } |
| 9613 } |
| 9614 if (state === 1) |
| 9615 while (true) { |
| 9616 t3 = ++t1.index_4; |
| 9617 t4 = t2.get$length(uri); |
| 9618 if (typeof t4 !== "number") |
| 9619 return H.iae(t4); |
| 9620 if (!(t3 < t4)) |
| 9621 break; |
| 9622 $char = t2.codeUnitAt$1(uri, t1.index_4); |
| 9623 t1.char_5 = $char; |
| 9624 if ($char === 63 || $char === 35) |
| 9625 break; |
| 9626 t1.char_5 = -1; |
| 9627 } |
| 9628 t3 = t1.scheme_0; |
| 9629 t4 = t1.host_2; |
| 9630 path = P.Uri__makePath(uri, pathStart, t1.index_4, null, t4 != null, t3
=== "file"); |
| 9631 t3 = t1.char_5; |
| 9632 if (t3 === 63) { |
| 9633 numberSignIndex = t2.indexOf$2(uri, "#", t1.index_4 + 1); |
| 9634 t3 = t1.index_4; |
| 9635 if (numberSignIndex < 0) { |
| 9636 query = P.Uri__makeQuery(uri, t3 + 1, t2.get$length(uri), null); |
| 9637 fragment = null; |
| 9638 } else { |
| 9639 query = P.Uri__makeQuery(uri, t3 + 1, numberSignIndex, null); |
| 9640 fragment = P.Uri__makeFragment(uri, numberSignIndex + 1, t2.get$leng
th(uri)); |
| 9641 } |
| 9642 } else { |
| 9643 fragment = t3 === 35 ? P.Uri__makeFragment(uri, t1.index_4 + 1, t2.get
$length(uri)) : null; |
| 9644 query = null; |
| 9645 } |
| 9646 t2 = t1.scheme_0; |
| 9647 t3 = t1.userinfo_1; |
| 9648 return new P.Uri(t1.host_2, t1.port_3, path, t2, t3, query, fragment, nu
ll, null); |
| 9649 }, Uri__fail: function(uri, index, message) { |
| 9650 throw H.wrapException(P.FormatException$(message, uri, index)); |
| 9651 }, Uri_Uri: function(fragment, host, path, pathSegments, port, query, quer
yParameters, scheme, userInfo) { |
| 9652 var isFile, t1; |
| 9653 scheme = P.Uri__makeScheme(scheme, scheme.length); |
| 9654 userInfo = P.Uri__makeUserInfo(userInfo, 0, userInfo.length); |
| 9655 host = P.Uri__makeHost(host, 0, host == null ? 0 : J.get$length$asx(host
), false); |
| 9656 query = P.Uri__makeQuery(query, 0, 0, queryParameters); |
| 9657 fragment = P.Uri__makeFragment(fragment, 0, 0); |
| 9658 port = P.Uri__makePort(port, scheme); |
| 9659 isFile = scheme === "file"; |
| 9660 if (host == null) |
| 9661 t1 = userInfo.length !== 0 || port != null || isFile; |
| 9662 else |
| 9663 t1 = false; |
| 9664 if (t1) |
| 9665 host = ""; |
| 9666 t1 = path == null ? 0 : path.length; |
| 9667 return new P.Uri(host, port, P.Uri__makePath(path, 0, t1, pathSegments,
host != null, isFile), scheme, userInfo, query, fragment, null, null); |
| 9668 }, Uri_Uri$file: function(path, windows) { |
| 9669 return windows ? P.Uri__makeWindowsFileUrl(path) : P.Uri__makeFileUri(pa
th); |
| 9670 }, Uri_base: function() { |
| 9671 var uri = H.Primitives_currentUri(); |
| 9672 if (uri != null) |
| 9673 return P.Uri_parse(uri); |
| 9674 throw H.wrapException(P.UnsupportedError$("'Uri.base' is not supported")
); |
| 9675 }, Uri__checkNonWindowsPathReservedCharacters: function(segments, argument
Error) { |
| 9676 segments.forEach$1(segments, new P.Uri__checkNonWindowsPathReservedChara
cters_closure(argumentError)); |
| 9677 }, Uri__checkWindowsPathReservedCharacters: function(segments, argumentErr
or, firstSegment) { |
| 9678 J.skip$1$ax(segments, firstSegment).forEach$1(0, new P.Uri__checkWindows
PathReservedCharacters_closure(argumentError)); |
| 9679 }, Uri__checkWindowsDriveLetter: function(charCode, argumentError) { |
| 9680 var t1; |
| 9681 if (!(65 <= charCode && charCode <= 90)) |
| 9682 t1 = 97 <= charCode && charCode <= 122; |
| 9683 else |
| 9684 t1 = true; |
| 9685 if (t1) |
| 9686 return; |
| 9687 if (argumentError) |
| 9688 throw H.wrapException(P.ArgumentError$("Illegal drive letter " + P.Str
ing_String$fromCharCode(charCode))); |
| 9689 else |
| 9690 throw H.wrapException(P.UnsupportedError$("Illegal drive letter " + P.
String_String$fromCharCode(charCode))); |
| 9691 }, Uri__makeFileUri: function(path) { |
| 9692 if (J.startsWith$1$s(path, "/")) |
| 9693 return P.Uri_Uri(null, null, null, path.split("/"), null, null, null,
"file", ""); |
| 9694 else |
| 9695 return P.Uri_Uri(null, null, null, path.split("/"), null, null, null,
"", ""); |
| 9696 }, Uri__makeWindowsFileUrl: function(path) { |
| 9697 var t1, pathSegments, pathStart, hostPart; |
| 9698 if (J.getInterceptor$s(path).startsWith$1(path, "\\\\?\\")) |
| 9699 if (C.JSString_methods.startsWith$2(path, "UNC\\", 4)) |
| 9700 path = C.JSString_methods.replaceRange$3(path, 0, 7, "\\"); |
| 9701 else { |
| 9702 path = C.JSString_methods.substring$1(path, 4); |
| 9703 if (path.length < 3 || C.JSString_methods.codeUnitAt$1(path, 1) !==
58 || C.JSString_methods.codeUnitAt$1(path, 2) !== 92) |
| 9704 throw H.wrapException(P.ArgumentError$("Windows paths with \\\\?\\
prefix must be absolute")); |
| 9705 } |
| 9706 else { |
| 9707 H.checkString("\\"); |
| 9708 path = H.stringReplaceAllUnchecked(path, "/", "\\"); |
| 9709 } |
| 9710 t1 = path.length; |
| 9711 if (t1 > 1 && C.JSString_methods.codeUnitAt$1(path, 1) === 58) { |
| 9712 P.Uri__checkWindowsDriveLetter(C.JSString_methods.codeUnitAt$1(path, 0
), true); |
| 9713 if (t1 === 2 || C.JSString_methods.codeUnitAt$1(path, 2) !== 92) |
| 9714 throw H.wrapException(P.ArgumentError$("Windows paths with drive let
ter must be absolute")); |
| 9715 pathSegments = path.split("\\"); |
| 9716 P.Uri__checkWindowsPathReservedCharacters(pathSegments, true, 1); |
| 9717 return P.Uri_Uri(null, null, null, pathSegments, null, null, null, "fi
le", ""); |
| 9718 } |
| 9719 if (C.JSString_methods.startsWith$1(path, "\\")) |
| 9720 if (C.JSString_methods.startsWith$2(path, "\\", 1)) { |
| 9721 pathStart = C.JSString_methods.indexOf$2(path, "\\", 2); |
| 9722 t1 = pathStart < 0; |
| 9723 hostPart = t1 ? C.JSString_methods.substring$1(path, 2) : C.JSString
_methods.substring$2(path, 2, pathStart); |
| 9724 pathSegments = (t1 ? "" : C.JSString_methods.substring$1(path, pathS
tart + 1)).split("\\"); |
| 9725 P.Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); |
| 9726 return P.Uri_Uri(null, hostPart, null, pathSegments, null, null, nul
l, "file", ""); |
| 9727 } else { |
| 9728 pathSegments = path.split("\\"); |
| 9729 P.Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); |
| 9730 return P.Uri_Uri(null, null, null, pathSegments, null, null, null, "
file", ""); |
| 9731 } |
| 9732 else { |
| 9733 pathSegments = path.split("\\"); |
| 9734 P.Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); |
| 9735 return P.Uri_Uri(null, null, null, pathSegments, null, null, null, "",
""); |
| 9736 } |
| 9737 }, Uri__makePort: function(port, scheme) { |
| 9738 if (port != null && port === P.Uri__defaultPort(scheme)) |
| 9739 return; |
| 9740 return port; |
| 9741 }, Uri__makeHost: function(host, start, end, strictIPv6) { |
| 9742 var t1, i; |
| 9743 if (host == null) |
| 9744 return; |
| 9745 if (start === end) |
| 9746 return ""; |
| 9747 if (J.getInterceptor$s(host).codeUnitAt$1(host, start) === 91) { |
| 9748 t1 = J.getInterceptor$n(end); |
| 9749 if (C.JSString_methods.codeUnitAt$1(host, t1.$sub(end, 1)) !== 93) |
| 9750 P.Uri__fail(host, start, "Missing end `]` to match `[` in host"); |
| 9751 P.Uri_parseIPv6Address(host, start + 1, t1.$sub(end, 1)); |
| 9752 return C.JSString_methods.substring$2(host, start, end).toLowerCase(); |
| 9753 } |
| 9754 if (!strictIPv6) { |
| 9755 if (typeof end !== "number") |
| 9756 return H.iae(end); |
| 9757 i = start; |
| 9758 for (; i < end; ++i) |
| 9759 if (C.JSString_methods.codeUnitAt$1(host, i) === 58) { |
| 9760 P.Uri_parseIPv6Address(host, start, end); |
| 9761 return "[" + host + "]"; |
| 9762 } |
| 9763 } |
| 9764 return P.Uri__normalizeRegName(host, start, end); |
| 9765 }, Uri__normalizeRegName: function(host, start, end) { |
| 9766 var index, sectionStart, buffer, isNormalized, $char, replacement, t1, s
lice, sourceLength, tail; |
| 9767 if (typeof end !== "number") |
| 9768 return H.iae(end); |
| 9769 index = start; |
| 9770 sectionStart = index; |
| 9771 buffer = null; |
| 9772 isNormalized = true; |
| 9773 for (; index < end;) { |
| 9774 $char = C.JSString_methods.codeUnitAt$1(host, index); |
| 9775 if ($char === 37) { |
| 9776 replacement = P.Uri__normalizeEscape(host, index, true); |
| 9777 t1 = replacement == null; |
| 9778 if (t1 && isNormalized) { |
| 9779 index += 3; |
| 9780 continue; |
| 9781 } |
| 9782 if (buffer == null) |
| 9783 buffer = new P.StringBuffer(""); |
| 9784 slice = C.JSString_methods.substring$2(host, sectionStart, index); |
| 9785 if (!isNormalized) |
| 9786 slice = slice.toLowerCase(); |
| 9787 buffer._contents = buffer._contents + slice; |
| 9788 if (t1) { |
| 9789 replacement = C.JSString_methods.substring$2(host, index, index +
3); |
| 9790 sourceLength = 3; |
| 9791 } else if (replacement === "%") { |
| 9792 replacement = "%25"; |
| 9793 sourceLength = 1; |
| 9794 } else |
| 9795 sourceLength = 3; |
| 9796 buffer._contents += replacement; |
| 9797 index += sourceLength; |
| 9798 sectionStart = index; |
| 9799 isNormalized = true; |
| 9800 } else { |
| 9801 if ($char < 127) { |
| 9802 t1 = $char >>> 4; |
| 9803 if (t1 >= 8) |
| 9804 return H.ioore(C.List_qNA, t1); |
| 9805 t1 = (C.List_qNA[t1] & C.JSInt_methods._shlPositive$1(1, $char & 1
5)) !== 0; |
| 9806 } else |
| 9807 t1 = false; |
| 9808 if (t1) { |
| 9809 if (isNormalized && 65 <= $char && 90 >= $char) { |
| 9810 if (buffer == null) |
| 9811 buffer = new P.StringBuffer(""); |
| 9812 if (sectionStart < index) { |
| 9813 t1 = C.JSString_methods.substring$2(host, sectionStart, index)
; |
| 9814 buffer._contents = buffer._contents + t1; |
| 9815 sectionStart = index; |
| 9816 } |
| 9817 isNormalized = false; |
| 9818 } |
| 9819 ++index; |
| 9820 } else { |
| 9821 if ($char <= 93) { |
| 9822 t1 = $char >>> 4; |
| 9823 if (t1 >= 8) |
| 9824 return H.ioore(C.List_2Vk, t1); |
| 9825 t1 = (C.List_2Vk[t1] & C.JSInt_methods._shlPositive$1(1, $char &
15)) !== 0; |
| 9826 } else |
| 9827 t1 = false; |
| 9828 if (t1) |
| 9829 P.Uri__fail(host, index, "Invalid character"); |
| 9830 else { |
| 9831 if (($char & 64512) === 55296 && index + 1 < end) { |
| 9832 tail = C.JSString_methods.codeUnitAt$1(host, index + 1); |
| 9833 if ((tail & 64512) === 56320) { |
| 9834 $char = (65536 | ($char & 1023) << 10 | tail & 1023) >>> 0; |
| 9835 sourceLength = 2; |
| 9836 } else |
| 9837 sourceLength = 1; |
| 9838 } else |
| 9839 sourceLength = 1; |
| 9840 if (buffer == null) |
| 9841 buffer = new P.StringBuffer(""); |
| 9842 slice = C.JSString_methods.substring$2(host, sectionStart, index
); |
| 9843 if (!isNormalized) |
| 9844 slice = slice.toLowerCase(); |
| 9845 buffer._contents = buffer._contents + slice; |
| 9846 buffer._contents += P.Uri__escapeChar($char); |
| 9847 index += sourceLength; |
| 9848 sectionStart = index; |
| 9849 } |
| 9850 } |
| 9851 } |
| 9852 } |
| 9853 if (buffer == null) |
| 9854 return C.JSString_methods.substring$2(host, start, end); |
| 9855 if (sectionStart < end) { |
| 9856 slice = C.JSString_methods.substring$2(host, sectionStart, end); |
| 9857 buffer._contents += !isNormalized ? slice.toLowerCase() : slice; |
| 9858 } |
| 9859 t1 = buffer._contents; |
| 9860 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 9861 }, Uri__makeScheme: function(scheme, end) { |
| 9862 var firstCodeUnit, allLowercase, t1, i, codeUnit; |
| 9863 if (J.$eq(end, 0)) |
| 9864 return ""; |
| 9865 firstCodeUnit = J.getInterceptor$s(scheme).codeUnitAt$1(scheme, 0); |
| 9866 allLowercase = firstCodeUnit >= 97; |
| 9867 if (!(allLowercase && firstCodeUnit <= 122)) |
| 9868 t1 = firstCodeUnit >= 65 && firstCodeUnit <= 90; |
| 9869 else |
| 9870 t1 = true; |
| 9871 if (!t1) |
| 9872 P.Uri__fail(scheme, 0, "Scheme not starting with alphabetic character"
); |
| 9873 if (typeof end !== "number") |
| 9874 return H.iae(end); |
| 9875 i = 0; |
| 9876 for (; i < end; ++i) { |
| 9877 codeUnit = C.JSString_methods.codeUnitAt$1(scheme, i); |
| 9878 if (codeUnit < 128) { |
| 9879 t1 = codeUnit >>> 4; |
| 9880 if (t1 >= 8) |
| 9881 return H.ioore(C.List_JYB, t1); |
| 9882 t1 = (C.List_JYB[t1] & C.JSInt_methods._shlPositive$1(1, codeUnit &
15)) !== 0; |
| 9883 } else |
| 9884 t1 = false; |
| 9885 if (!t1) |
| 9886 P.Uri__fail(scheme, i, "Illegal scheme character"); |
| 9887 if (codeUnit < 97 || codeUnit > 122) |
| 9888 allLowercase = false; |
| 9889 } |
| 9890 scheme = C.JSString_methods.substring$2(scheme, 0, end); |
| 9891 return !allLowercase ? scheme.toLowerCase() : scheme; |
| 9892 }, Uri__makeUserInfo: function(userInfo, start, end) { |
| 9893 return P.Uri__normalize(userInfo, start, end, C.List_gRj); |
| 9894 }, Uri__makePath: function(path, start, end, pathSegments, ensureLeadingSl
ash, isFile) { |
| 9895 var t1, result; |
| 9896 t1 = path == null; |
| 9897 if (t1 && pathSegments == null) |
| 9898 return isFile ? "/" : ""; |
| 9899 t1 = !t1; |
| 9900 if (t1 && pathSegments != null) |
| 9901 throw H.wrapException(P.ArgumentError$("Both path and pathSegments spe
cified")); |
| 9902 if (t1) |
| 9903 result = P.Uri__normalize(path, start, end, C.List_qg4); |
| 9904 else { |
| 9905 pathSegments.toString; |
| 9906 result = H.setRuntimeTypeInfo(new H.MappedListIterable(pathSegments, n
ew P.Uri__makePath_closure()), [null, null]).join$1(0, "/"); |
| 9907 } |
| 9908 if (result.length === 0) { |
| 9909 if (isFile) |
| 9910 return "/"; |
| 9911 } else if ((isFile || ensureLeadingSlash) && C.JSString_methods.codeUnit
At$1(result, 0) !== 47) |
| 9912 return "/" + result; |
| 9913 return result; |
| 9914 }, Uri__makeQuery: function(query, start, end, queryParameters) { |
| 9915 var t1, t2, result; |
| 9916 t1 = {}; |
| 9917 t2 = query == null; |
| 9918 if (t2 && true) |
| 9919 return; |
| 9920 t2 = !t2; |
| 9921 if (t2) |
| 9922 ; |
| 9923 if (t2) |
| 9924 return P.Uri__normalize(query, start, end, C.List_CVk); |
| 9925 result = new P.StringBuffer(""); |
| 9926 t1.first_0 = true; |
| 9927 C.JSNull_methods.forEach$1(queryParameters, new P.Uri__makeQuery_closure
(t1, result)); |
| 9928 t1 = result._contents; |
| 9929 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 9930 }, Uri__makeFragment: function(fragment, start, end) { |
| 9931 if (fragment == null) |
| 9932 return; |
| 9933 return P.Uri__normalize(fragment, start, end, C.List_CVk); |
| 9934 }, Uri__isHexDigit: function($char) { |
| 9935 if (57 >= $char) |
| 9936 return 48 <= $char; |
| 9937 $char |= 32; |
| 9938 return 97 <= $char && 102 >= $char; |
| 9939 }, Uri__hexValue: function($char) { |
| 9940 if (57 >= $char) |
| 9941 return $char - 48; |
| 9942 return ($char | 32) - 87; |
| 9943 }, Uri__normalizeEscape: function(source, index, lowerCase) { |
| 9944 var t1, firstDigit, secondDigit, value; |
| 9945 t1 = index + 2; |
| 9946 if (t1 >= source.length) |
| 9947 return "%"; |
| 9948 firstDigit = C.JSString_methods.codeUnitAt$1(source, index + 1); |
| 9949 secondDigit = C.JSString_methods.codeUnitAt$1(source, t1); |
| 9950 if (!P.Uri__isHexDigit(firstDigit) || !P.Uri__isHexDigit(secondDigit)) |
| 9951 return "%"; |
| 9952 value = P.Uri__hexValue(firstDigit) * 16 + P.Uri__hexValue(secondDigit); |
| 9953 if (value < 127) { |
| 9954 t1 = C.JSInt_methods._shrOtherPositive$1(value, 4); |
| 9955 if (t1 >= 8) |
| 9956 return H.ioore(C.List_nxB, t1); |
| 9957 t1 = (C.List_nxB[t1] & C.JSInt_methods._shlPositive$1(1, value & 15))
!== 0; |
| 9958 } else |
| 9959 t1 = false; |
| 9960 if (t1) |
| 9961 return H.Primitives_stringFromCharCode(lowerCase && 65 <= value && 90
>= value ? (value | 32) >>> 0 : value); |
| 9962 if (firstDigit >= 97 || secondDigit >= 97) |
| 9963 return C.JSString_methods.substring$2(source, index, index + 3).toUppe
rCase(); |
| 9964 return; |
| 9965 }, Uri__escapeChar: function($char) { |
| 9966 var codeUnits, flag, encodedBytes, t1, index, $byte, t2, t3; |
| 9967 if ($char < 128) { |
| 9968 codeUnits = Array(3); |
| 9969 codeUnits.fixed$length = Array; |
| 9970 codeUnits[0] = 37; |
| 9971 codeUnits[1] = C.JSString_methods.codeUnitAt$1("0123456789ABCDEF", $ch
ar >>> 4); |
| 9972 codeUnits[2] = C.JSString_methods.codeUnitAt$1("0123456789ABCDEF", $ch
ar & 15); |
| 9973 } else { |
| 9974 if ($char > 2047) |
| 9975 if ($char > 65535) { |
| 9976 flag = 240; |
| 9977 encodedBytes = 4; |
| 9978 } else { |
| 9979 flag = 224; |
| 9980 encodedBytes = 3; |
| 9981 } |
| 9982 else { |
| 9983 flag = 192; |
| 9984 encodedBytes = 2; |
| 9985 } |
| 9986 t1 = 3 * encodedBytes; |
| 9987 codeUnits = Array(t1); |
| 9988 codeUnits.fixed$length = Array; |
| 9989 for (index = 0; --encodedBytes, encodedBytes >= 0; flag = 128) { |
| 9990 $byte = C.JSInt_methods._shrReceiverPositive$1($char, 6 * encodedByt
es) & 63 | flag; |
| 9991 if (index >= t1) |
| 9992 return H.ioore(codeUnits, index); |
| 9993 codeUnits[index] = 37; |
| 9994 t2 = index + 1; |
| 9995 t3 = C.JSString_methods.codeUnitAt$1("0123456789ABCDEF", $byte >>> 4
); |
| 9996 if (t2 >= t1) |
| 9997 return H.ioore(codeUnits, t2); |
| 9998 codeUnits[t2] = t3; |
| 9999 t3 = index + 2; |
| 10000 t2 = C.JSString_methods.codeUnitAt$1("0123456789ABCDEF", $byte & 15)
; |
| 10001 if (t3 >= t1) |
| 10002 return H.ioore(codeUnits, t3); |
| 10003 codeUnits[t3] = t2; |
| 10004 index += 3; |
| 10005 } |
| 10006 } |
| 10007 return P.String_String$fromCharCodes(codeUnits, 0, null); |
| 10008 }, Uri__normalize: function(component, start, end, charTable) { |
| 10009 var t1, index, sectionStart, buffer, $char, t2, replacement, sourceLengt
h, tail; |
| 10010 if (typeof end !== "number") |
| 10011 return H.iae(end); |
| 10012 t1 = J.getInterceptor$s(component); |
| 10013 index = start; |
| 10014 sectionStart = index; |
| 10015 buffer = null; |
| 10016 for (; index < end;) { |
| 10017 $char = t1.codeUnitAt$1(component, index); |
| 10018 if ($char < 127) { |
| 10019 t2 = $char >>> 4; |
| 10020 if (t2 >= 8) |
| 10021 return H.ioore(charTable, t2); |
| 10022 t2 = (charTable[t2] & C.JSInt_methods._shlPositive$1(1, $char & 15))
!== 0; |
| 10023 } else |
| 10024 t2 = false; |
| 10025 if (t2) |
| 10026 ++index; |
| 10027 else { |
| 10028 if ($char === 37) { |
| 10029 replacement = P.Uri__normalizeEscape(component, index, false); |
| 10030 if (replacement == null) { |
| 10031 index += 3; |
| 10032 continue; |
| 10033 } |
| 10034 if ("%" === replacement) { |
| 10035 replacement = "%25"; |
| 10036 sourceLength = 1; |
| 10037 } else |
| 10038 sourceLength = 3; |
| 10039 } else { |
| 10040 if ($char <= 93) { |
| 10041 t2 = $char >>> 4; |
| 10042 if (t2 >= 8) |
| 10043 return H.ioore(C.List_2Vk, t2); |
| 10044 t2 = (C.List_2Vk[t2] & C.JSInt_methods._shlPositive$1(1, $char &
15)) !== 0; |
| 10045 } else |
| 10046 t2 = false; |
| 10047 if (t2) { |
| 10048 P.Uri__fail(component, index, "Invalid character"); |
| 10049 replacement = null; |
| 10050 sourceLength = null; |
| 10051 } else { |
| 10052 if (($char & 64512) === 55296) { |
| 10053 t2 = index + 1; |
| 10054 if (t2 < end) { |
| 10055 tail = C.JSString_methods.codeUnitAt$1(component, t2); |
| 10056 if ((tail & 64512) === 56320) { |
| 10057 $char = (65536 | ($char & 1023) << 10 | tail & 1023) >>> 0
; |
| 10058 sourceLength = 2; |
| 10059 } else |
| 10060 sourceLength = 1; |
| 10061 } else |
| 10062 sourceLength = 1; |
| 10063 } else |
| 10064 sourceLength = 1; |
| 10065 replacement = P.Uri__escapeChar($char); |
| 10066 } |
| 10067 } |
| 10068 if (buffer == null) |
| 10069 buffer = new P.StringBuffer(""); |
| 10070 t2 = C.JSString_methods.substring$2(component, sectionStart, index); |
| 10071 buffer._contents = buffer._contents + t2; |
| 10072 buffer._contents += H.S(replacement); |
| 10073 if (typeof sourceLength !== "number") |
| 10074 return H.iae(sourceLength); |
| 10075 index += sourceLength; |
| 10076 sectionStart = index; |
| 10077 } |
| 10078 } |
| 10079 if (buffer == null) |
| 10080 return t1.substring$2(component, start, end); |
| 10081 if (sectionStart < end) |
| 10082 buffer._contents += t1.substring$2(component, sectionStart, end); |
| 10083 t1 = buffer._contents; |
| 10084 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 10085 }, Uri_decodeComponent: [function(encodedComponent) { |
| 10086 return P.Uri__uriDecode(encodedComponent, C.Utf8Codec_false, false); |
| 10087 }, "call$1", "Uri_decodeComponent$closure", 2, 0, 48], Uri_splitQueryStrin
g: function(query, encoding) { |
| 10088 return C.JSArray_methods.fold$2(query.split("&"), P.LinkedHashMap_Linked
HashMap$_empty(null, null), new P.Uri_splitQueryString_closure(encoding)); |
| 10089 }, Uri_parseIPv4Address: function(host) { |
| 10090 var t1, bytes; |
| 10091 t1 = new P.Uri_parseIPv4Address_error(); |
| 10092 bytes = host.split("."); |
| 10093 if (bytes.length !== 4) |
| 10094 t1.call$1("IPv4 address should contain exactly 4 parts"); |
| 10095 return H.setRuntimeTypeInfo(new H.MappedListIterable(bytes, new P.Uri_pa
rseIPv4Address_closure(t1)), [null, null]).toList$0(0); |
| 10096 }, Uri_parseIPv6Address: function(host, start, end) { |
| 10097 var error, parseHex, parts, partStart, last, i, wildcardSeen, t1, atEnd,
isLastWildcard, exception, t2, bytes, index, value, wildCardLength, j; |
| 10098 if (end == null) |
| 10099 end = J.get$length$asx(host); |
| 10100 error = new P.Uri_parseIPv6Address_error(host); |
| 10101 parseHex = new P.Uri_parseIPv6Address_parseHex(host, error); |
| 10102 if (J.get$length$asx(host) < 2) |
| 10103 error.call$1("address is too short"); |
| 10104 parts = []; |
| 10105 partStart = start; |
| 10106 i = start; |
| 10107 wildcardSeen = false; |
| 10108 while (true) { |
| 10109 t1 = end; |
| 10110 if (typeof t1 !== "number") |
| 10111 return H.iae(t1); |
| 10112 if (!(i < t1)) |
| 10113 break; |
| 10114 if (J.codeUnitAt$1$s(host, i) === 58) { |
| 10115 if (i === start) { |
| 10116 ++i; |
| 10117 if (J.codeUnitAt$1$s(host, i) !== 58) |
| 10118 error.call$2("invalid start colon.", i); |
| 10119 partStart = i; |
| 10120 } |
| 10121 if (i === partStart) { |
| 10122 if (wildcardSeen) |
| 10123 error.call$2("only one wildcard `::` is allowed", i); |
| 10124 J.add$1$ax(parts, -1); |
| 10125 wildcardSeen = true; |
| 10126 } else |
| 10127 J.add$1$ax(parts, parseHex.call$2(partStart, i)); |
| 10128 partStart = i + 1; |
| 10129 } |
| 10130 ++i; |
| 10131 } |
| 10132 if (J.get$length$asx(parts) === 0) |
| 10133 error.call$1("too few parts"); |
| 10134 atEnd = J.$eq(partStart, end); |
| 10135 isLastWildcard = J.$eq(J.get$last$ax(parts), -1); |
| 10136 if (atEnd && !isLastWildcard) |
| 10137 error.call$2("expected a part after last `:`", end); |
| 10138 if (!atEnd) |
| 10139 try { |
| 10140 J.add$1$ax(parts, parseHex.call$2(partStart, end)); |
| 10141 } catch (exception) { |
| 10142 H.unwrapException(exception); |
| 10143 try { |
| 10144 last = P.Uri_parseIPv4Address(J.substring$2$s(host, partStart, end
)); |
| 10145 t1 = J.$index$asx(last, 0); |
| 10146 if (typeof t1 !== "number") |
| 10147 return t1.$shl(); |
| 10148 t2 = J.$index$asx(last, 1); |
| 10149 if (typeof t2 !== "number") |
| 10150 return H.iae(t2); |
| 10151 J.add$1$ax(parts, (t1 << 8 | t2) >>> 0); |
| 10152 t2 = J.$index$asx(last, 2); |
| 10153 if (typeof t2 !== "number") |
| 10154 return t2.$shl(); |
| 10155 t1 = J.$index$asx(last, 3); |
| 10156 if (typeof t1 !== "number") |
| 10157 return H.iae(t1); |
| 10158 J.add$1$ax(parts, (t2 << 8 | t1) >>> 0); |
| 10159 } catch (exception) { |
| 10160 H.unwrapException(exception); |
| 10161 error.call$2("invalid end of IPv6 address.", partStart); |
| 10162 } |
| 10163 } |
| 10164 if (wildcardSeen) { |
| 10165 if (J.get$length$asx(parts) > 7) |
| 10166 error.call$1("an address with a wildcard must have less than 7 parts
"); |
| 10167 } else if (J.get$length$asx(parts) !== 8) |
| 10168 error.call$1("an address without a wildcard must contain exactly 8 par
ts"); |
| 10169 bytes = Array(16); |
| 10170 bytes.$builtinTypeInfo = [P.$int]; |
| 10171 i = 0; |
| 10172 index = 0; |
| 10173 while (true) { |
| 10174 t1 = J.get$length$asx(parts); |
| 10175 if (typeof t1 !== "number") |
| 10176 return H.iae(t1); |
| 10177 if (!(i < t1)) |
| 10178 break; |
| 10179 value = J.$index$asx(parts, i); |
| 10180 if (J.getInterceptor(value).$eq(value, -1)) { |
| 10181 wildCardLength = 9 - J.get$length$asx(parts); |
| 10182 for (j = 0; j < wildCardLength; ++j) { |
| 10183 if (index < 0 || index >= 16) |
| 10184 return H.ioore(bytes, index); |
| 10185 bytes[index] = 0; |
| 10186 t1 = index + 1; |
| 10187 if (t1 >= 16) |
| 10188 return H.ioore(bytes, t1); |
| 10189 bytes[t1] = 0; |
| 10190 index += 2; |
| 10191 } |
| 10192 } else { |
| 10193 if (typeof value !== "number") |
| 10194 return value.$shr(); |
| 10195 t1 = C.JSNumber_methods._shrOtherPositive$1(value, 8); |
| 10196 if (index < 0 || index >= 16) |
| 10197 return H.ioore(bytes, index); |
| 10198 bytes[index] = t1; |
| 10199 t1 = index + 1; |
| 10200 if (t1 >= 16) |
| 10201 return H.ioore(bytes, t1); |
| 10202 bytes[t1] = value & 255; |
| 10203 index += 2; |
| 10204 } |
| 10205 ++i; |
| 10206 } |
| 10207 return bytes; |
| 10208 }, Uri__uriEncode: function(canonicalTable, text, encoding, spaceToPlus) { |
| 10209 var t1, result, bytes, t2, i, $byte, t3; |
| 10210 t1 = new P.Uri__uriEncode_byteToHex(); |
| 10211 result = new P.StringBuffer(""); |
| 10212 bytes = encoding.get$encoder().convert$1(text); |
| 10213 for (t2 = bytes.length, i = 0; i < t2; ++i) { |
| 10214 $byte = bytes[i]; |
| 10215 if ($byte < 128) { |
| 10216 t3 = $byte >>> 4; |
| 10217 if (t3 >= 8) |
| 10218 return H.ioore(canonicalTable, t3); |
| 10219 t3 = (canonicalTable[t3] & C.JSInt_methods._shlPositive$1(1, $byte &
15)) !== 0; |
| 10220 } else |
| 10221 t3 = false; |
| 10222 if (t3) |
| 10223 result._contents += H.Primitives_stringFromCharCode($byte); |
| 10224 else if (spaceToPlus && $byte === 32) |
| 10225 result._contents += H.Primitives_stringFromCharCode(43); |
| 10226 else { |
| 10227 result._contents += H.Primitives_stringFromCharCode(37); |
| 10228 t1.call$2($byte, result); |
| 10229 } |
| 10230 } |
| 10231 t1 = result._contents; |
| 10232 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 10233 }, Uri__hexCharPairToByte: function(s, pos) { |
| 10234 var $byte, i, charCode; |
| 10235 for ($byte = 0, i = 0; i < 2; ++i) { |
| 10236 charCode = C.JSString_methods.codeUnitAt$1(s, pos + i); |
| 10237 if (48 <= charCode && charCode <= 57) |
| 10238 $byte = $byte * 16 + charCode - 48; |
| 10239 else { |
| 10240 charCode |= 32; |
| 10241 if (97 <= charCode && charCode <= 102) |
| 10242 $byte = $byte * 16 + charCode - 87; |
| 10243 else |
| 10244 throw H.wrapException(P.ArgumentError$("Invalid URL encoding")); |
| 10245 } |
| 10246 } |
| 10247 return $byte; |
| 10248 }, Uri__uriDecode: function(text, encoding, plusToSpace) { |
| 10249 var t1, simple, i, t2, codeUnit, bytes, allowMalformed; |
| 10250 t1 = J.getInterceptor$asx(text); |
| 10251 simple = true; |
| 10252 i = 0; |
| 10253 while (true) { |
| 10254 t2 = t1.get$length(text); |
| 10255 if (typeof t2 !== "number") |
| 10256 return H.iae(t2); |
| 10257 if (!(i < t2 && simple)) |
| 10258 break; |
| 10259 codeUnit = t1.codeUnitAt$1(text, i); |
| 10260 simple = codeUnit !== 37 && codeUnit !== 43; |
| 10261 ++i; |
| 10262 } |
| 10263 if (simple) |
| 10264 if (encoding === C.Utf8Codec_false || false) |
| 10265 return text; |
| 10266 else |
| 10267 bytes = t1.get$codeUnits(text); |
| 10268 else { |
| 10269 bytes = []; |
| 10270 i = 0; |
| 10271 while (true) { |
| 10272 t2 = t1.get$length(text); |
| 10273 if (typeof t2 !== "number") |
| 10274 return H.iae(t2); |
| 10275 if (!(i < t2)) |
| 10276 break; |
| 10277 codeUnit = t1.codeUnitAt$1(text, i); |
| 10278 if (codeUnit > 127) |
| 10279 throw H.wrapException(P.ArgumentError$("Illegal percent encoding i
n URI")); |
| 10280 if (codeUnit === 37) { |
| 10281 if (i + 3 > text.length) |
| 10282 throw H.wrapException(P.ArgumentError$("Truncated URI")); |
| 10283 bytes.push(P.Uri__hexCharPairToByte(text, i + 1)); |
| 10284 i += 2; |
| 10285 } else if (plusToSpace && codeUnit === 43) |
| 10286 bytes.push(32); |
| 10287 else |
| 10288 bytes.push(codeUnit); |
| 10289 ++i; |
| 10290 } |
| 10291 } |
| 10292 allowMalformed = encoding._allowMalformed; |
| 10293 return new P.Utf8Decoder(allowMalformed).convert$1(bytes); |
| 10294 }} |
| 10295 }, |
| 10296 Uri_parse_isRegName: { |
| 10297 "^": "Closure:21;", |
| 10298 call$1: function(ch) { |
| 10299 ch.$lt(0, 128); |
| 10300 return false; |
| 10301 } |
| 10302 }, |
| 10303 Uri_parse_parseAuth: { |
| 10304 "^": "Closure:1;box_0,uri_1,EOI_2", |
| 10305 call$0: function() { |
| 10306 var t1, t2, t3, authStart, $char, lastColon, lastAt, char0, endBracket, ho
stEnd, hostStart, i, portNumber, digit; |
| 10307 t1 = this.box_0; |
| 10308 t2 = this.uri_1; |
| 10309 t3 = J.getInterceptor$asx(t2); |
| 10310 if (t1.index_4 === t3.get$length(t2)) { |
| 10311 t1.char_5 = this.EOI_2; |
| 10312 return; |
| 10313 } |
| 10314 authStart = t1.index_4; |
| 10315 t1.char_5 = t3.codeUnitAt$1(t2, authStart); |
| 10316 for ($char = this.EOI_2, lastColon = -1, lastAt = -1; t1.index_4 < t2.leng
th;) { |
| 10317 char0 = C.JSString_methods.codeUnitAt$1(t2, t1.index_4); |
| 10318 t1.char_5 = char0; |
| 10319 if (char0 === 47 || char0 === 63 || char0 === 35) |
| 10320 break; |
| 10321 if (char0 === 64) { |
| 10322 lastAt = t1.index_4; |
| 10323 lastColon = -1; |
| 10324 } else if (char0 === 58) |
| 10325 lastColon = t1.index_4; |
| 10326 else if (char0 === 91) { |
| 10327 endBracket = C.JSString_methods.indexOf$2(t2, "]", t1.index_4 + 1); |
| 10328 if (endBracket === -1) { |
| 10329 t1.index_4 = t2.length; |
| 10330 t1.char_5 = $char; |
| 10331 lastColon = -1; |
| 10332 break; |
| 10333 } else |
| 10334 t1.index_4 = endBracket; |
| 10335 lastColon = -1; |
| 10336 } |
| 10337 ++t1.index_4; |
| 10338 t1.char_5 = $char; |
| 10339 } |
| 10340 hostEnd = t1.index_4; |
| 10341 if (lastAt >= 0) { |
| 10342 t1.userinfo_1 = P.Uri__makeUserInfo(t2, authStart, lastAt); |
| 10343 hostStart = lastAt + 1; |
| 10344 } else |
| 10345 hostStart = authStart; |
| 10346 if (lastColon >= 0) { |
| 10347 i = lastColon + 1; |
| 10348 if (i < t1.index_4) |
| 10349 for (portNumber = 0; i < t1.index_4; ++i) { |
| 10350 digit = C.JSString_methods.codeUnitAt$1(t2, i); |
| 10351 if (48 > digit || 57 < digit) |
| 10352 P.Uri__fail(t2, i, "Invalid port number"); |
| 10353 portNumber = portNumber * 10 + (digit - 48); |
| 10354 } |
| 10355 else |
| 10356 portNumber = null; |
| 10357 t1.port_3 = P.Uri__makePort(portNumber, t1.scheme_0); |
| 10358 hostEnd = lastColon; |
| 10359 } |
| 10360 t1.host_2 = P.Uri__makeHost(t2, hostStart, hostEnd, true); |
| 10361 if (t1.index_4 < t2.length) |
| 10362 t1.char_5 = C.JSString_methods.codeUnitAt$1(t2, t1.index_4); |
| 10363 } |
| 10364 }, |
| 10365 Uri__checkNonWindowsPathReservedCharacters_closure: { |
| 10366 "^": "Closure:2;argumentError_0", |
| 10367 call$1: function(segment) { |
| 10368 if (J.contains$1$asx(segment, "/") === true) |
| 10369 if (this.argumentError_0) |
| 10370 throw H.wrapException(P.ArgumentError$("Illegal path character " + H.S
(segment))); |
| 10371 else |
| 10372 throw H.wrapException(P.UnsupportedError$("Illegal path character " +
H.S(segment))); |
| 10373 } |
| 10374 }, |
| 10375 Uri__checkWindowsPathReservedCharacters_closure: { |
| 10376 "^": "Closure:2;argumentError_0", |
| 10377 call$1: function(segment) { |
| 10378 if (J.contains$1$asx(segment, new H.JSSyntaxRegExp("[\"*/:<>?\\\\|]", H.JS
SyntaxRegExp_makeNative("[\"*/:<>?\\\\|]", false, true, false), null, null)) ===
true) |
| 10379 if (this.argumentError_0) |
| 10380 throw H.wrapException(P.ArgumentError$("Illegal character in path")); |
| 10381 else |
| 10382 throw H.wrapException(P.UnsupportedError$("Illegal character in path")
); |
| 10383 } |
| 10384 }, |
| 10385 Uri__makePath_closure: { |
| 10386 "^": "Closure:2;", |
| 10387 call$1: function(s) { |
| 10388 return P.Uri__uriEncode(C.List_qg40, s, C.Utf8Codec_false, false); |
| 10389 } |
| 10390 }, |
| 10391 Uri__makeQuery_closure: { |
| 10392 "^": "Closure:15;box_0,result_1", |
| 10393 call$2: function(key, value) { |
| 10394 var t1 = this.box_0; |
| 10395 if (!t1.first_0) |
| 10396 this.result_1._contents += "&"; |
| 10397 t1.first_0 = false; |
| 10398 t1 = this.result_1; |
| 10399 t1._contents += P.Uri__uriEncode(C.List_nxB, key, C.Utf8Codec_false, true)
; |
| 10400 value.get$isEmpty(value); |
| 10401 t1._contents += "="; |
| 10402 t1._contents += P.Uri__uriEncode(C.List_nxB, value, C.Utf8Codec_false, tru
e); |
| 10403 } |
| 10404 }, |
| 10405 Uri_hashCode_combine: { |
| 10406 "^": "Closure:22;", |
| 10407 call$2: function(part, current) { |
| 10408 return current * 31 + J.get$hashCode$(part) & 1073741823; |
| 10409 } |
| 10410 }, |
| 10411 Uri_splitQueryString_closure: { |
| 10412 "^": "Closure:15;encoding_0", |
| 10413 call$2: function(map, element) { |
| 10414 var t1, index, key, value; |
| 10415 t1 = J.getInterceptor$asx(element); |
| 10416 index = t1.indexOf$1(element, "="); |
| 10417 if (index === -1) { |
| 10418 if (element !== "") |
| 10419 J.$indexSet$ax(map, P.Uri__uriDecode(element, this.encoding_0, true),
""); |
| 10420 } else if (index !== 0) { |
| 10421 key = t1.substring$2(element, 0, index); |
| 10422 value = C.JSString_methods.substring$1(element, index + 1); |
| 10423 t1 = this.encoding_0; |
| 10424 J.$indexSet$ax(map, P.Uri__uriDecode(key, t1, true), P.Uri__uriDecode(va
lue, t1, true)); |
| 10425 } |
| 10426 return map; |
| 10427 } |
| 10428 }, |
| 10429 Uri_parseIPv4Address_error: { |
| 10430 "^": "Closure:23;", |
| 10431 call$1: function(msg) { |
| 10432 throw H.wrapException(P.FormatException$("Illegal IPv4 address, " + msg, n
ull, null)); |
| 10433 } |
| 10434 }, |
| 10435 Uri_parseIPv4Address_closure: { |
| 10436 "^": "Closure:2;error_0", |
| 10437 call$1: function(byteString) { |
| 10438 var $byte, t1; |
| 10439 $byte = H.Primitives_parseInt(byteString, null, null); |
| 10440 t1 = J.getInterceptor$n($byte); |
| 10441 if (t1.$lt($byte, 0) || t1.$gt($byte, 255)) |
| 10442 this.error_0.call$1("each part must be in the range of `0..255`"); |
| 10443 return $byte; |
| 10444 } |
| 10445 }, |
| 10446 Uri_parseIPv6Address_error: { |
| 10447 "^": "Closure:24;host_0", |
| 10448 call$2: function(msg, position) { |
| 10449 throw H.wrapException(P.FormatException$("Illegal IPv6 address, " + msg, t
his.host_0, position)); |
| 10450 }, |
| 10451 call$1: function(msg) { |
| 10452 return this.call$2(msg, null); |
| 10453 } |
| 10454 }, |
| 10455 Uri_parseIPv6Address_parseHex: { |
| 10456 "^": "Closure:25;host_1,error_2", |
| 10457 call$2: function(start, end) { |
| 10458 var value, t1; |
| 10459 if (J.$gt$n(J.$sub$n(end, start), 4)) |
| 10460 this.error_2.call$2("an IPv6 part can only contain a maximum of 4 hex di
gits", start); |
| 10461 value = H.Primitives_parseInt(C.JSString_methods.substring$2(this.host_1,
start, end), 16, null); |
| 10462 t1 = J.getInterceptor$n(value); |
| 10463 if (t1.$lt(value, 0) || t1.$gt(value, 65535)) |
| 10464 this.error_2.call$2("each part must be in the range of `0x0..0xFFFF`", s
tart); |
| 10465 return value; |
| 10466 } |
| 10467 }, |
| 10468 Uri__uriEncode_byteToHex: { |
| 10469 "^": "Closure:15;", |
| 10470 call$2: function($byte, buffer) { |
| 10471 buffer._contents += H.Primitives_stringFromCharCode(C.JSString_methods.cod
eUnitAt$1("0123456789ABCDEF", $byte >>> 4)); |
| 10472 buffer._contents += H.Primitives_stringFromCharCode(C.JSString_methods.cod
eUnitAt$1("0123456789ABCDEF", $byte & 15)); |
| 10473 } |
| 10474 } |
| 10475 }], |
| 10476 ["dart.dom.html", "dart:html", , W, { |
| 10477 "^": "", |
| 10478 WebSocket_WebSocket: function(url, protocol_OR_protocols) { |
| 10479 return new WebSocket(url); |
| 10480 }, |
| 10481 _JenkinsSmiHash_combine: function(hash, value) { |
| 10482 hash = 536870911 & hash + value; |
| 10483 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); |
| 10484 return hash ^ hash >>> 6; |
| 10485 }, |
| 10486 _JenkinsSmiHash_finish: function(hash) { |
| 10487 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); |
| 10488 hash ^= hash >>> 11; |
| 10489 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); |
| 10490 }, |
| 10491 _convertNativeToDart_Window: function(win) { |
| 10492 if (win == null) |
| 10493 return; |
| 10494 return W._DOMWindowCrossFrame__createSafe(win); |
| 10495 }, |
| 10496 _wrapZone: function(callback) { |
| 10497 if (J.$eq($.Zone__current, C.C__RootZone)) |
| 10498 return callback; |
| 10499 return $.Zone__current.bindUnaryCallback$2$runGuarded(callback, true); |
| 10500 }, |
| 10501 HtmlElement: { |
| 10502 "^": "Element;", |
| 10503 $isHtmlElement: 1, |
| 10504 $isElement: 1, |
| 10505 $isNode: 1, |
| 10506 $isObject: 1, |
| 10507 "%": "HTMLAppletElement|HTMLBRElement|HTMLBaseElement|HTMLButtonElement|HTML
CanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetail
sElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFieldSetEleme
nt|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingEle
ment|HTMLHtmlElement|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegend
Element|HTMLLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMe
nuItemElement|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOptGroupElemen
t|HTMLOptionElement|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTML
PictureElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLShadowEle
ment|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellEleme
nt|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeader
CellElement|HTMLTableRowElement|HTMLTableSectionElement|HTMLTemplateElement|HTML
TextAreaElement|HTMLTitleElement|HTMLUListElement|HTMLUnknownElement;HTMLElement
" |
| 10508 }, |
| 10509 AnchorElement: { |
| 10510 "^": "HtmlElement;origin=", |
| 10511 toString$0: function(receiver) { |
| 10512 return String(receiver); |
| 10513 }, |
| 10514 $isInterceptor: 1, |
| 10515 "%": "HTMLAnchorElement" |
| 10516 }, |
| 10517 ApplicationCacheErrorEvent: { |
| 10518 "^": "Event;message=", |
| 10519 "%": "ApplicationCacheErrorEvent" |
| 10520 }, |
| 10521 AreaElement: { |
| 10522 "^": "HtmlElement;origin=", |
| 10523 toString$0: function(receiver) { |
| 10524 return String(receiver); |
| 10525 }, |
| 10526 $isInterceptor: 1, |
| 10527 "%": "HTMLAreaElement" |
| 10528 }, |
| 10529 Blob: { |
| 10530 "^": "Interceptor;", |
| 10531 close$0: function(receiver) { |
| 10532 return receiver.close(); |
| 10533 }, |
| 10534 $isBlob: 1, |
| 10535 "%": ";Blob" |
| 10536 }, |
| 10537 BodyElement: { |
| 10538 "^": "HtmlElement;", |
| 10539 get$onLoad: function(receiver) { |
| 10540 return H.setRuntimeTypeInfo(new W._ElementEventStreamImpl(receiver, "load"
, false), [null]); |
| 10541 }, |
| 10542 $isInterceptor: 1, |
| 10543 "%": "HTMLBodyElement" |
| 10544 }, |
| 10545 CharacterData: { |
| 10546 "^": "Node;data=,length=", |
| 10547 $isInterceptor: 1, |
| 10548 "%": "CDATASection|CharacterData|Comment|ProcessingInstruction|Text" |
| 10549 }, |
| 10550 CompositionEvent: { |
| 10551 "^": "UIEvent;data=", |
| 10552 "%": "CompositionEvent" |
| 10553 }, |
| 10554 CssStyleDeclaration: { |
| 10555 "^": "Interceptor_CssStyleDeclarationBase;length=", |
| 10556 "%": "CSS2Properties|CSSStyleDeclaration|MSStyleCSSProperties" |
| 10557 }, |
| 10558 Interceptor_CssStyleDeclarationBase: { |
| 10559 "^": "Interceptor+CssStyleDeclarationBase;" |
| 10560 }, |
| 10561 CssStyleDeclarationBase: { |
| 10562 "^": "Object;" |
| 10563 }, |
| 10564 DocumentFragment: { |
| 10565 "^": "Node;", |
| 10566 $isInterceptor: 1, |
| 10567 "%": "DocumentFragment|ShadowRoot" |
| 10568 }, |
| 10569 DomError: { |
| 10570 "^": "Interceptor;message=", |
| 10571 "%": "DOMError|FileError" |
| 10572 }, |
| 10573 DomException: { |
| 10574 "^": "Interceptor;message=", |
| 10575 toString$0: function(receiver) { |
| 10576 return String(receiver); |
| 10577 }, |
| 10578 "%": "DOMException" |
| 10579 }, |
| 10580 DomRectReadOnly: { |
| 10581 "^": "Interceptor;bottom=,height=,left=,right=,top=,width=", |
| 10582 toString$0: function(receiver) { |
| 10583 return "Rectangle (" + H.S(receiver.left) + ", " + H.S(receiver.top) + ")
" + H.S(this.get$width(receiver)) + " x " + H.S(this.get$height(receiver)); |
| 10584 }, |
| 10585 $eq: function(receiver, other) { |
| 10586 var t1, t2, t3; |
| 10587 if (other == null) |
| 10588 return false; |
| 10589 t1 = J.getInterceptor(other); |
| 10590 if (!t1.$isRectangle) |
| 10591 return false; |
| 10592 t2 = receiver.left; |
| 10593 t3 = t1.get$left(other); |
| 10594 if (t2 == null ? t3 == null : t2 === t3) { |
| 10595 t2 = receiver.top; |
| 10596 t3 = t1.get$top(other); |
| 10597 if (t2 == null ? t3 == null : t2 === t3) { |
| 10598 t2 = this.get$width(receiver); |
| 10599 t3 = t1.get$width(other); |
| 10600 if (t2 == null ? t3 == null : t2 === t3) { |
| 10601 t2 = this.get$height(receiver); |
| 10602 t1 = t1.get$height(other); |
| 10603 t1 = t2 == null ? t1 == null : t2 === t1; |
| 10604 } else |
| 10605 t1 = false; |
| 10606 } else |
| 10607 t1 = false; |
| 10608 } else |
| 10609 t1 = false; |
| 10610 return t1; |
| 10611 }, |
| 10612 get$hashCode: function(receiver) { |
| 10613 var t1, t2, t3, t4; |
| 10614 t1 = J.get$hashCode$(receiver.left); |
| 10615 t2 = J.get$hashCode$(receiver.top); |
| 10616 t3 = J.get$hashCode$(this.get$width(receiver)); |
| 10617 t4 = J.get$hashCode$(this.get$height(receiver)); |
| 10618 return W._JenkinsSmiHash_finish(W._JenkinsSmiHash_combine(W._JenkinsSmiHas
h_combine(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(0, t1), t2), t3),
t4)); |
| 10619 }, |
| 10620 $isRectangle: 1, |
| 10621 $asRectangle: $.functionThatReturnsNull, |
| 10622 "%": ";DOMRectReadOnly" |
| 10623 }, |
| 10624 Element: { |
| 10625 "^": "Node;", |
| 10626 toString$0: function(receiver) { |
| 10627 return receiver.localName; |
| 10628 }, |
| 10629 get$onLoad: function(receiver) { |
| 10630 return H.setRuntimeTypeInfo(new W._ElementEventStreamImpl(receiver, "load"
, false), [null]); |
| 10631 }, |
| 10632 $isElement: 1, |
| 10633 $isNode: 1, |
| 10634 $isObject: 1, |
| 10635 $isInterceptor: 1, |
| 10636 "%": ";Element" |
| 10637 }, |
| 10638 EmbedElement: { |
| 10639 "^": "HtmlElement;src}", |
| 10640 "%": "HTMLEmbedElement" |
| 10641 }, |
| 10642 ErrorEvent: { |
| 10643 "^": "Event;error=,message=", |
| 10644 "%": "ErrorEvent" |
| 10645 }, |
| 10646 Event: { |
| 10647 "^": "Interceptor;", |
| 10648 "%": "AnimationPlayerEvent|AudioProcessingEvent|AutocompleteErrorEvent|Befor
eUnloadEvent|CloseEvent|CustomEvent|DeviceLightEvent|DeviceMotionEvent|DeviceOri
entationEvent|FetchEvent|FontFaceSetLoadEvent|GamepadEvent|HashChangeEvent|IDBVe
rsionChangeEvent|InstallEvent|InstallPhaseEvent|MIDIConnectionEvent|MediaKeyNeed
edEvent|MediaStreamEvent|MediaStreamTrackEvent|MutationEvent|OfflineAudioComplet
ionEvent|OverflowEvent|PageTransitionEvent|PopStateEvent|ProgressEvent|RTCDTMFTo
neChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|RelatedEvent|ResourceProg
ressEvent|SecurityPolicyViolationEvent|SpeechRecognitionEvent|SpeechSynthesisEve
nt|StorageEvent|TrackEvent|TransitionEvent|WebGLContextEvent|WebKitAnimationEven
t|WebKitTransitionEvent|XMLHttpRequestProgressEvent;ClipboardEvent|Event|InputEv
ent" |
| 10649 }, |
| 10650 EventTarget: { |
| 10651 "^": "Interceptor;", |
| 10652 _addEventListener$3: function(receiver, type, listener, useCapture) { |
| 10653 return receiver.addEventListener(type, H.convertDartClosureToJS(listener,
1), useCapture); |
| 10654 }, |
| 10655 _removeEventListener$3: function(receiver, type, listener, useCapture) { |
| 10656 return receiver.removeEventListener(type, H.convertDartClosureToJS(listene
r, 1), useCapture); |
| 10657 }, |
| 10658 "%": "MediaStream;EventTarget" |
| 10659 }, |
| 10660 File: { |
| 10661 "^": "Blob;", |
| 10662 $isFile: 1, |
| 10663 "%": "File" |
| 10664 }, |
| 10665 FormElement: { |
| 10666 "^": "HtmlElement;length=", |
| 10667 "%": "HTMLFormElement" |
| 10668 }, |
| 10669 HtmlCollection: { |
| 10670 "^": "Interceptor_ListMixin_ImmutableListMixin;", |
| 10671 get$length: function(receiver) { |
| 10672 return receiver.length; |
| 10673 }, |
| 10674 $index: function(receiver, index) { |
| 10675 if (index >>> 0 !== index || index >= receiver.length) |
| 10676 throw H.wrapException(P.IndexError$(index, receiver, null, null, null)); |
| 10677 return receiver[index]; |
| 10678 }, |
| 10679 $indexSet: function(receiver, index, value) { |
| 10680 throw H.wrapException(P.UnsupportedError$("Cannot assign element of immuta
ble List.")); |
| 10681 }, |
| 10682 set$length: function(receiver, value) { |
| 10683 throw H.wrapException(P.UnsupportedError$("Cannot resize immutable List.")
); |
| 10684 }, |
| 10685 get$last: function(receiver) { |
| 10686 var len = receiver.length; |
| 10687 if (len > 0) |
| 10688 return receiver[len - 1]; |
| 10689 throw H.wrapException(P.StateError$("No elements")); |
| 10690 }, |
| 10691 elementAt$1: function(receiver, index) { |
| 10692 if (index < 0 || index >= receiver.length) |
| 10693 return H.ioore(receiver, index); |
| 10694 return receiver[index]; |
| 10695 }, |
| 10696 $isList: 1, |
| 10697 $asList: function() { |
| 10698 return [W.Node]; |
| 10699 }, |
| 10700 $isEfficientLength: 1, |
| 10701 $isJavaScriptIndexingBehavior: 1, |
| 10702 $isJSIndexable: 1, |
| 10703 "%": "HTMLCollection|HTMLFormControlsCollection|HTMLOptionsCollection" |
| 10704 }, |
| 10705 Interceptor_ListMixin: { |
| 10706 "^": "Interceptor+ListMixin;", |
| 10707 $isList: 1, |
| 10708 $asList: function() { |
| 10709 return [W.Node]; |
| 10710 }, |
| 10711 $isEfficientLength: 1 |
| 10712 }, |
| 10713 Interceptor_ListMixin_ImmutableListMixin: { |
| 10714 "^": "Interceptor_ListMixin+ImmutableListMixin;", |
| 10715 $isList: 1, |
| 10716 $asList: function() { |
| 10717 return [W.Node]; |
| 10718 }, |
| 10719 $isEfficientLength: 1 |
| 10720 }, |
| 10721 IFrameElement: { |
| 10722 "^": "HtmlElement;src}", |
| 10723 get$contentWindow: function(receiver) { |
| 10724 return W._convertNativeToDart_Window(receiver.contentWindow); |
| 10725 }, |
| 10726 "%": "HTMLIFrameElement" |
| 10727 }, |
| 10728 ImageElement: { |
| 10729 "^": "HtmlElement;src}", |
| 10730 "%": "HTMLImageElement" |
| 10731 }, |
| 10732 InputElement: { |
| 10733 "^": "HtmlElement;src}", |
| 10734 $isInterceptor: 1, |
| 10735 "%": "HTMLInputElement" |
| 10736 }, |
| 10737 KeyboardEvent: { |
| 10738 "^": "UIEvent;location=", |
| 10739 "%": "KeyboardEvent" |
| 10740 }, |
| 10741 Location: { |
| 10742 "^": "Interceptor;", |
| 10743 get$origin: function(receiver) { |
| 10744 if ("origin" in receiver) |
| 10745 return receiver.origin; |
| 10746 return H.S(receiver.protocol) + "//" + H.S(receiver.host); |
| 10747 }, |
| 10748 toString$0: function(receiver) { |
| 10749 return String(receiver); |
| 10750 }, |
| 10751 "%": "Location" |
| 10752 }, |
| 10753 MediaElement: { |
| 10754 "^": "HtmlElement;error=,src}", |
| 10755 "%": "HTMLAudioElement|HTMLMediaElement|HTMLVideoElement" |
| 10756 }, |
| 10757 MediaKeyEvent: { |
| 10758 "^": "Event;message=", |
| 10759 "%": "MediaKeyEvent" |
| 10760 }, |
| 10761 MediaKeyMessageEvent: { |
| 10762 "^": "Event;message=", |
| 10763 "%": "MediaKeyMessageEvent" |
| 10764 }, |
| 10765 MessageEvent: { |
| 10766 "^": "Event;origin=", |
| 10767 get$data: function(receiver) { |
| 10768 return P.convertNativeToDart_AcceptStructuredClone(receiver.data, true); |
| 10769 }, |
| 10770 "%": "MessageEvent" |
| 10771 }, |
| 10772 MidiMessageEvent: { |
| 10773 "^": "Event;data=", |
| 10774 "%": "MIDIMessageEvent" |
| 10775 }, |
| 10776 MidiOutput: { |
| 10777 "^": "MidiPort;", |
| 10778 send$2: function(receiver, data, timestamp) { |
| 10779 return receiver.send(data, timestamp); |
| 10780 }, |
| 10781 send$1: function($receiver, data) { |
| 10782 return $receiver.send(data); |
| 10783 }, |
| 10784 "%": "MIDIOutput" |
| 10785 }, |
| 10786 MidiPort: { |
| 10787 "^": "EventTarget;", |
| 10788 "%": "MIDIInput;MIDIPort" |
| 10789 }, |
| 10790 Navigator: { |
| 10791 "^": "Interceptor;", |
| 10792 $isInterceptor: 1, |
| 10793 "%": "Navigator" |
| 10794 }, |
| 10795 NavigatorUserMediaError: { |
| 10796 "^": "Interceptor;message=", |
| 10797 "%": "NavigatorUserMediaError" |
| 10798 }, |
| 10799 Node: { |
| 10800 "^": "EventTarget;parent:parentElement=", |
| 10801 toString$0: function(receiver) { |
| 10802 var value = receiver.nodeValue; |
| 10803 return value == null ? this.super$Interceptor$toString$0(receiver) : value
; |
| 10804 }, |
| 10805 contains$1: function(receiver, other) { |
| 10806 return receiver.contains(other); |
| 10807 }, |
| 10808 $isNode: 1, |
| 10809 $isObject: 1, |
| 10810 "%": "Attr|Document|HTMLDocument|Notation|XMLDocument;Node" |
| 10811 }, |
| 10812 NodeList: { |
| 10813 "^": "Interceptor_ListMixin_ImmutableListMixin0;", |
| 10814 get$length: function(receiver) { |
| 10815 return receiver.length; |
| 10816 }, |
| 10817 $index: function(receiver, index) { |
| 10818 if (index >>> 0 !== index || index >= receiver.length) |
| 10819 throw H.wrapException(P.IndexError$(index, receiver, null, null, null)); |
| 10820 return receiver[index]; |
| 10821 }, |
| 10822 $indexSet: function(receiver, index, value) { |
| 10823 throw H.wrapException(P.UnsupportedError$("Cannot assign element of immuta
ble List.")); |
| 10824 }, |
| 10825 set$length: function(receiver, value) { |
| 10826 throw H.wrapException(P.UnsupportedError$("Cannot resize immutable List.")
); |
| 10827 }, |
| 10828 get$last: function(receiver) { |
| 10829 var len = receiver.length; |
| 10830 if (len > 0) |
| 10831 return receiver[len - 1]; |
| 10832 throw H.wrapException(P.StateError$("No elements")); |
| 10833 }, |
| 10834 elementAt$1: function(receiver, index) { |
| 10835 if (index < 0 || index >= receiver.length) |
| 10836 return H.ioore(receiver, index); |
| 10837 return receiver[index]; |
| 10838 }, |
| 10839 $isList: 1, |
| 10840 $asList: function() { |
| 10841 return [W.Node]; |
| 10842 }, |
| 10843 $isEfficientLength: 1, |
| 10844 $isJavaScriptIndexingBehavior: 1, |
| 10845 $isJSIndexable: 1, |
| 10846 "%": "NodeList|RadioNodeList" |
| 10847 }, |
| 10848 Interceptor_ListMixin0: { |
| 10849 "^": "Interceptor+ListMixin;", |
| 10850 $isList: 1, |
| 10851 $asList: function() { |
| 10852 return [W.Node]; |
| 10853 }, |
| 10854 $isEfficientLength: 1 |
| 10855 }, |
| 10856 Interceptor_ListMixin_ImmutableListMixin0: { |
| 10857 "^": "Interceptor_ListMixin0+ImmutableListMixin;", |
| 10858 $isList: 1, |
| 10859 $asList: function() { |
| 10860 return [W.Node]; |
| 10861 }, |
| 10862 $isEfficientLength: 1 |
| 10863 }, |
| 10864 OListElement: { |
| 10865 "^": "HtmlElement;start=", |
| 10866 "%": "HTMLOListElement" |
| 10867 }, |
| 10868 ObjectElement: { |
| 10869 "^": "HtmlElement;data=", |
| 10870 "%": "HTMLObjectElement" |
| 10871 }, |
| 10872 PositionError: { |
| 10873 "^": "Interceptor;message=", |
| 10874 "%": "PositionError" |
| 10875 }, |
| 10876 PushEvent: { |
| 10877 "^": "Event;data=", |
| 10878 "%": "PushEvent" |
| 10879 }, |
| 10880 ScriptElement: { |
| 10881 "^": "HtmlElement;src}", |
| 10882 "%": "HTMLScriptElement" |
| 10883 }, |
| 10884 SelectElement: { |
| 10885 "^": "HtmlElement;length=", |
| 10886 "%": "HTMLSelectElement" |
| 10887 }, |
| 10888 SourceElement: { |
| 10889 "^": "HtmlElement;src}", |
| 10890 "%": "HTMLSourceElement" |
| 10891 }, |
| 10892 SpeechRecognitionError: { |
| 10893 "^": "Event;error=,message=", |
| 10894 "%": "SpeechRecognitionError" |
| 10895 }, |
| 10896 TextEvent: { |
| 10897 "^": "UIEvent;data=", |
| 10898 "%": "TextEvent" |
| 10899 }, |
| 10900 TrackElement: { |
| 10901 "^": "HtmlElement;src}", |
| 10902 "%": "HTMLTrackElement" |
| 10903 }, |
| 10904 UIEvent: { |
| 10905 "^": "Event;", |
| 10906 "%": "DragEvent|FocusEvent|MSPointerEvent|MouseEvent|MouseScrollEvent|MouseW
heelEvent|PointerEvent|SVGZoomEvent|TouchEvent|WheelEvent;UIEvent" |
| 10907 }, |
| 10908 WebSocket: { |
| 10909 "^": "EventTarget;", |
| 10910 close$2: function(receiver, code, reason) { |
| 10911 return receiver.close(code, reason); |
| 10912 }, |
| 10913 close$0: function($receiver) { |
| 10914 return $receiver.close(); |
| 10915 }, |
| 10916 send$1: function(receiver, data) { |
| 10917 return receiver.send(data); |
| 10918 }, |
| 10919 "%": "WebSocket" |
| 10920 }, |
| 10921 Window: { |
| 10922 "^": "EventTarget;", |
| 10923 get$location: function(receiver) { |
| 10924 return receiver.location; |
| 10925 }, |
| 10926 get$parent: function(receiver) { |
| 10927 return W._convertNativeToDart_Window(receiver.parent); |
| 10928 }, |
| 10929 close$0: function(receiver) { |
| 10930 return receiver.close(); |
| 10931 }, |
| 10932 postMessage$3: function(receiver, message, targetOrigin, transfer) { |
| 10933 receiver.postMessage(P._convertDartToNative_PrepareForStructuredClone(mess
age), targetOrigin); |
| 10934 return; |
| 10935 }, |
| 10936 postMessage$2: function($receiver, message, targetOrigin) { |
| 10937 return this.postMessage$3($receiver, message, targetOrigin, null); |
| 10938 }, |
| 10939 $isInterceptor: 1, |
| 10940 "%": "DOMWindow|Window" |
| 10941 }, |
| 10942 _ClientRect: { |
| 10943 "^": "Interceptor;bottom=,height=,left=,right=,top=,width=", |
| 10944 toString$0: function(receiver) { |
| 10945 return "Rectangle (" + H.S(receiver.left) + ", " + H.S(receiver.top) + ")
" + H.S(receiver.width) + " x " + H.S(receiver.height); |
| 10946 }, |
| 10947 $eq: function(receiver, other) { |
| 10948 var t1, t2, t3; |
| 10949 if (other == null) |
| 10950 return false; |
| 10951 t1 = J.getInterceptor(other); |
| 10952 if (!t1.$isRectangle) |
| 10953 return false; |
| 10954 t2 = receiver.left; |
| 10955 t3 = t1.get$left(other); |
| 10956 if (t2 == null ? t3 == null : t2 === t3) { |
| 10957 t2 = receiver.top; |
| 10958 t3 = t1.get$top(other); |
| 10959 if (t2 == null ? t3 == null : t2 === t3) { |
| 10960 t2 = receiver.width; |
| 10961 t3 = t1.get$width(other); |
| 10962 if (t2 == null ? t3 == null : t2 === t3) { |
| 10963 t2 = receiver.height; |
| 10964 t1 = t1.get$height(other); |
| 10965 t1 = t2 == null ? t1 == null : t2 === t1; |
| 10966 } else |
| 10967 t1 = false; |
| 10968 } else |
| 10969 t1 = false; |
| 10970 } else |
| 10971 t1 = false; |
| 10972 return t1; |
| 10973 }, |
| 10974 get$hashCode: function(receiver) { |
| 10975 var t1, t2, t3, t4; |
| 10976 t1 = J.get$hashCode$(receiver.left); |
| 10977 t2 = J.get$hashCode$(receiver.top); |
| 10978 t3 = J.get$hashCode$(receiver.width); |
| 10979 t4 = J.get$hashCode$(receiver.height); |
| 10980 return W._JenkinsSmiHash_finish(W._JenkinsSmiHash_combine(W._JenkinsSmiHas
h_combine(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(0, t1), t2), t3),
t4)); |
| 10981 }, |
| 10982 $isRectangle: 1, |
| 10983 $asRectangle: $.functionThatReturnsNull, |
| 10984 "%": "ClientRect" |
| 10985 }, |
| 10986 _DocumentType: { |
| 10987 "^": "Node;", |
| 10988 $isInterceptor: 1, |
| 10989 "%": "DocumentType" |
| 10990 }, |
| 10991 _DomRect: { |
| 10992 "^": "DomRectReadOnly;", |
| 10993 get$height: function(receiver) { |
| 10994 return receiver.height; |
| 10995 }, |
| 10996 get$width: function(receiver) { |
| 10997 return receiver.width; |
| 10998 }, |
| 10999 "%": "DOMRect" |
| 11000 }, |
| 11001 _HTMLFrameSetElement: { |
| 11002 "^": "HtmlElement;", |
| 11003 $isInterceptor: 1, |
| 11004 "%": "HTMLFrameSetElement" |
| 11005 }, |
| 11006 _EventStream: { |
| 11007 "^": "Stream;_html$_target,_eventType,_useCapture", |
| 11008 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDon
e, onError) { |
| 11009 var t1 = new W._EventStreamSubscription(0, this._html$_target, this._event
Type, W._wrapZone(onData), this._useCapture); |
| 11010 t1.$builtinTypeInfo = this.$builtinTypeInfo; |
| 11011 t1._tryResume$0(); |
| 11012 return t1; |
| 11013 }, |
| 11014 listen$3$onDone$onError: function(onData, onDone, onError) { |
| 11015 return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, on
Error); |
| 11016 } |
| 11017 }, |
| 11018 _ElementEventStreamImpl: { |
| 11019 "^": "_EventStream;_html$_target,_eventType,_useCapture" |
| 11020 }, |
| 11021 _EventStreamSubscription: { |
| 11022 "^": "StreamSubscription;_pauseCount,_html$_target,_eventType,_html$_onData,
_useCapture", |
| 11023 cancel$0: function() { |
| 11024 if (this._html$_target == null) |
| 11025 return; |
| 11026 this._unlisten$0(); |
| 11027 this._html$_target = null; |
| 11028 this._html$_onData = null; |
| 11029 return; |
| 11030 }, |
| 11031 pause$1: function(_, resumeSignal) { |
| 11032 if (this._html$_target == null) |
| 11033 return; |
| 11034 ++this._pauseCount; |
| 11035 this._unlisten$0(); |
| 11036 }, |
| 11037 pause$0: function($receiver) { |
| 11038 return this.pause$1($receiver, null); |
| 11039 }, |
| 11040 resume$0: function() { |
| 11041 if (this._html$_target == null || this._pauseCount <= 0) |
| 11042 return; |
| 11043 --this._pauseCount; |
| 11044 this._tryResume$0(); |
| 11045 }, |
| 11046 _tryResume$0: function() { |
| 11047 var t1, t2, t3; |
| 11048 t1 = this._html$_onData; |
| 11049 t2 = t1 != null; |
| 11050 if (t2 && this._pauseCount <= 0) { |
| 11051 t3 = this._html$_target; |
| 11052 t3.toString; |
| 11053 if (t2) |
| 11054 J._addEventListener$3$x(t3, this._eventType, t1, this._useCapture); |
| 11055 } |
| 11056 }, |
| 11057 _unlisten$0: function() { |
| 11058 var t1, t2, t3; |
| 11059 t1 = this._html$_onData; |
| 11060 t2 = t1 != null; |
| 11061 if (t2) { |
| 11062 t3 = this._html$_target; |
| 11063 t3.toString; |
| 11064 if (t2) |
| 11065 J._removeEventListener$3$x(t3, this._eventType, t1, this._useCapture); |
| 11066 } |
| 11067 } |
| 11068 }, |
| 11069 ImmutableListMixin: { |
| 11070 "^": "Object;", |
| 11071 get$iterator: function(receiver) { |
| 11072 return new W.FixedSizeListIterator(receiver, this.get$length(receiver), -1
, null); |
| 11073 }, |
| 11074 add$1: function(receiver, value) { |
| 11075 throw H.wrapException(P.UnsupportedError$("Cannot add to immutable List.")
); |
| 11076 }, |
| 11077 $isList: 1, |
| 11078 $asList: null, |
| 11079 $isEfficientLength: 1 |
| 11080 }, |
| 11081 FixedSizeListIterator: { |
| 11082 "^": "Object;_array,_length,_position,_html$_current", |
| 11083 moveNext$0: function() { |
| 11084 var nextPosition, t1; |
| 11085 nextPosition = this._position + 1; |
| 11086 t1 = this._length; |
| 11087 if (nextPosition < t1) { |
| 11088 this._html$_current = J.$index$asx(this._array, nextPosition); |
| 11089 this._position = nextPosition; |
| 11090 return true; |
| 11091 } |
| 11092 this._html$_current = null; |
| 11093 this._position = t1; |
| 11094 return false; |
| 11095 }, |
| 11096 get$current: function() { |
| 11097 return this._html$_current; |
| 11098 } |
| 11099 }, |
| 11100 _DOMWindowCrossFrame: { |
| 11101 "^": "Object;_window", |
| 11102 get$location: function(_) { |
| 11103 return W._LocationCrossFrame__createSafe(this._window.location); |
| 11104 }, |
| 11105 get$parent: function(_) { |
| 11106 return W._DOMWindowCrossFrame__createSafe(this._window.parent); |
| 11107 }, |
| 11108 close$0: function(_) { |
| 11109 return this._window.close(); |
| 11110 }, |
| 11111 postMessage$3: function(_, message, targetOrigin, messagePorts) { |
| 11112 this._window.postMessage(P._convertDartToNative_PrepareForStructuredClone(
message), targetOrigin); |
| 11113 }, |
| 11114 postMessage$2: function($receiver, message, targetOrigin) { |
| 11115 return this.postMessage$3($receiver, message, targetOrigin, null); |
| 11116 }, |
| 11117 $isInterceptor: 1, |
| 11118 static: {_DOMWindowCrossFrame__createSafe: function(w) { |
| 11119 if (w === window) |
| 11120 return w; |
| 11121 else |
| 11122 return new W._DOMWindowCrossFrame(w); |
| 11123 }} |
| 11124 }, |
| 11125 _LocationCrossFrame: { |
| 11126 "^": "Object;_location", |
| 11127 static: {_LocationCrossFrame__createSafe: function($location) { |
| 11128 if ($location === window.location) |
| 11129 return $location; |
| 11130 else |
| 11131 return new W._LocationCrossFrame($location); |
| 11132 }} |
| 11133 } |
| 11134 }], |
| 11135 ["dart.dom.indexed_db", "dart:indexed_db", , P, { |
| 11136 "^": "" |
| 11137 }], |
| 11138 ["dart.dom.svg", "dart:svg", , P, { |
| 11139 "^": "", |
| 11140 AElement: { |
| 11141 "^": "GraphicsElement;", |
| 11142 $isInterceptor: 1, |
| 11143 "%": "SVGAElement" |
| 11144 }, |
| 11145 AltGlyphElement: { |
| 11146 "^": "TextPositioningElement;", |
| 11147 $isInterceptor: 1, |
| 11148 "%": "SVGAltGlyphElement" |
| 11149 }, |
| 11150 AnimationElement: { |
| 11151 "^": "SvgElement;", |
| 11152 $isInterceptor: 1, |
| 11153 "%": "SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|S
VGAnimationElement|SVGSetElement" |
| 11154 }, |
| 11155 FEBlendElement: { |
| 11156 "^": "SvgElement;", |
| 11157 $isInterceptor: 1, |
| 11158 "%": "SVGFEBlendElement" |
| 11159 }, |
| 11160 FEColorMatrixElement: { |
| 11161 "^": "SvgElement;", |
| 11162 $isInterceptor: 1, |
| 11163 "%": "SVGFEColorMatrixElement" |
| 11164 }, |
| 11165 FEComponentTransferElement: { |
| 11166 "^": "SvgElement;", |
| 11167 $isInterceptor: 1, |
| 11168 "%": "SVGFEComponentTransferElement" |
| 11169 }, |
| 11170 FECompositeElement: { |
| 11171 "^": "SvgElement;", |
| 11172 $isInterceptor: 1, |
| 11173 "%": "SVGFECompositeElement" |
| 11174 }, |
| 11175 FEConvolveMatrixElement: { |
| 11176 "^": "SvgElement;", |
| 11177 $isInterceptor: 1, |
| 11178 "%": "SVGFEConvolveMatrixElement" |
| 11179 }, |
| 11180 FEDiffuseLightingElement: { |
| 11181 "^": "SvgElement;", |
| 11182 $isInterceptor: 1, |
| 11183 "%": "SVGFEDiffuseLightingElement" |
| 11184 }, |
| 11185 FEDisplacementMapElement: { |
| 11186 "^": "SvgElement;", |
| 11187 $isInterceptor: 1, |
| 11188 "%": "SVGFEDisplacementMapElement" |
| 11189 }, |
| 11190 FEFloodElement: { |
| 11191 "^": "SvgElement;", |
| 11192 $isInterceptor: 1, |
| 11193 "%": "SVGFEFloodElement" |
| 11194 }, |
| 11195 FEGaussianBlurElement: { |
| 11196 "^": "SvgElement;", |
| 11197 $isInterceptor: 1, |
| 11198 "%": "SVGFEGaussianBlurElement" |
| 11199 }, |
| 11200 FEImageElement: { |
| 11201 "^": "SvgElement;", |
| 11202 $isInterceptor: 1, |
| 11203 "%": "SVGFEImageElement" |
| 11204 }, |
| 11205 FEMergeElement: { |
| 11206 "^": "SvgElement;", |
| 11207 $isInterceptor: 1, |
| 11208 "%": "SVGFEMergeElement" |
| 11209 }, |
| 11210 FEMorphologyElement: { |
| 11211 "^": "SvgElement;", |
| 11212 $isInterceptor: 1, |
| 11213 "%": "SVGFEMorphologyElement" |
| 11214 }, |
| 11215 FEOffsetElement: { |
| 11216 "^": "SvgElement;", |
| 11217 $isInterceptor: 1, |
| 11218 "%": "SVGFEOffsetElement" |
| 11219 }, |
| 11220 FESpecularLightingElement: { |
| 11221 "^": "SvgElement;", |
| 11222 $isInterceptor: 1, |
| 11223 "%": "SVGFESpecularLightingElement" |
| 11224 }, |
| 11225 FETileElement: { |
| 11226 "^": "SvgElement;", |
| 11227 $isInterceptor: 1, |
| 11228 "%": "SVGFETileElement" |
| 11229 }, |
| 11230 FETurbulenceElement: { |
| 11231 "^": "SvgElement;", |
| 11232 $isInterceptor: 1, |
| 11233 "%": "SVGFETurbulenceElement" |
| 11234 }, |
| 11235 FilterElement: { |
| 11236 "^": "SvgElement;", |
| 11237 $isInterceptor: 1, |
| 11238 "%": "SVGFilterElement" |
| 11239 }, |
| 11240 GraphicsElement: { |
| 11241 "^": "SvgElement;", |
| 11242 $isInterceptor: 1, |
| 11243 "%": "SVGCircleElement|SVGClipPathElement|SVGDefsElement|SVGEllipseElement|S
VGForeignObjectElement|SVGGElement|SVGGeometryElement|SVGLineElement|SVGPathElem
ent|SVGPolygonElement|SVGPolylineElement|SVGRectElement|SVGSwitchElement;SVGGrap
hicsElement" |
| 11244 }, |
| 11245 ImageElement0: { |
| 11246 "^": "GraphicsElement;", |
| 11247 $isInterceptor: 1, |
| 11248 "%": "SVGImageElement" |
| 11249 }, |
| 11250 MarkerElement: { |
| 11251 "^": "SvgElement;", |
| 11252 $isInterceptor: 1, |
| 11253 "%": "SVGMarkerElement" |
| 11254 }, |
| 11255 MaskElement: { |
| 11256 "^": "SvgElement;", |
| 11257 $isInterceptor: 1, |
| 11258 "%": "SVGMaskElement" |
| 11259 }, |
| 11260 PatternElement: { |
| 11261 "^": "SvgElement;", |
| 11262 $isInterceptor: 1, |
| 11263 "%": "SVGPatternElement" |
| 11264 }, |
| 11265 ScriptElement0: { |
| 11266 "^": "SvgElement;", |
| 11267 $isInterceptor: 1, |
| 11268 "%": "SVGScriptElement" |
| 11269 }, |
| 11270 SvgElement: { |
| 11271 "^": "Element;", |
| 11272 $isInterceptor: 1, |
| 11273 "%": "SVGAltGlyphDefElement|SVGAltGlyphItemElement|SVGComponentTransferFunct
ionElement|SVGDescElement|SVGDiscardElement|SVGFEDistantLightElement|SVGFEFuncAE
lement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEMergeNodeEleme
nt|SVGFEPointLightElement|SVGFESpotLightElement|SVGFontElement|SVGFontFaceElemen
t|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontF
aceUriElement|SVGGlyphElement|SVGHKernElement|SVGMetadataElement|SVGMissingGlyph
Element|SVGStopElement|SVGStyleElement|SVGTitleElement|SVGVKernElement;SVGElemen
t" |
| 11274 }, |
| 11275 SvgSvgElement: { |
| 11276 "^": "GraphicsElement;", |
| 11277 $isInterceptor: 1, |
| 11278 "%": "SVGSVGElement" |
| 11279 }, |
| 11280 SymbolElement: { |
| 11281 "^": "SvgElement;", |
| 11282 $isInterceptor: 1, |
| 11283 "%": "SVGSymbolElement" |
| 11284 }, |
| 11285 TextContentElement: { |
| 11286 "^": "GraphicsElement;", |
| 11287 "%": ";SVGTextContentElement" |
| 11288 }, |
| 11289 TextPathElement: { |
| 11290 "^": "TextContentElement;", |
| 11291 $isInterceptor: 1, |
| 11292 "%": "SVGTextPathElement" |
| 11293 }, |
| 11294 TextPositioningElement: { |
| 11295 "^": "TextContentElement;", |
| 11296 "%": "SVGTSpanElement|SVGTextElement;SVGTextPositioningElement" |
| 11297 }, |
| 11298 UseElement: { |
| 11299 "^": "GraphicsElement;", |
| 11300 $isInterceptor: 1, |
| 11301 "%": "SVGUseElement" |
| 11302 }, |
| 11303 ViewElement: { |
| 11304 "^": "SvgElement;", |
| 11305 $isInterceptor: 1, |
| 11306 "%": "SVGViewElement" |
| 11307 }, |
| 11308 _GradientElement: { |
| 11309 "^": "SvgElement;", |
| 11310 $isInterceptor: 1, |
| 11311 "%": "SVGGradientElement|SVGLinearGradientElement|SVGRadialGradientElement" |
| 11312 }, |
| 11313 _SVGCursorElement: { |
| 11314 "^": "SvgElement;", |
| 11315 $isInterceptor: 1, |
| 11316 "%": "SVGCursorElement" |
| 11317 }, |
| 11318 _SVGFEDropShadowElement: { |
| 11319 "^": "SvgElement;", |
| 11320 $isInterceptor: 1, |
| 11321 "%": "SVGFEDropShadowElement" |
| 11322 }, |
| 11323 _SVGGlyphRefElement: { |
| 11324 "^": "SvgElement;", |
| 11325 $isInterceptor: 1, |
| 11326 "%": "SVGGlyphRefElement" |
| 11327 }, |
| 11328 _SVGMPathElement: { |
| 11329 "^": "SvgElement;", |
| 11330 $isInterceptor: 1, |
| 11331 "%": "SVGMPathElement" |
| 11332 } |
| 11333 }], |
| 11334 ["dart.dom.web_audio", "dart:web_audio", , P, { |
| 11335 "^": "" |
| 11336 }], |
| 11337 ["dart.dom.web_gl", "dart:web_gl", , P, { |
| 11338 "^": "" |
| 11339 }], |
| 11340 ["dart.dom.web_sql", "dart:web_sql", , P, { |
| 11341 "^": "", |
| 11342 SqlError: { |
| 11343 "^": "Interceptor;message=", |
| 11344 "%": "SQLError" |
| 11345 } |
| 11346 }], |
| 11347 ["dart.isolate", "dart:isolate", , P, { |
| 11348 "^": "", |
| 11349 Capability: { |
| 11350 "^": "Object;" |
| 11351 } |
| 11352 }], |
| 11353 ["dart.math", "dart:math", , P, { |
| 11354 "^": "", |
| 11355 _JenkinsSmiHash_combine0: function(hash, value) { |
| 11356 hash = 536870911 & hash + value; |
| 11357 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); |
| 11358 return hash ^ hash >>> 6; |
| 11359 }, |
| 11360 _JenkinsSmiHash_finish0: function(hash) { |
| 11361 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); |
| 11362 hash ^= hash >>> 11; |
| 11363 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); |
| 11364 }, |
| 11365 max: [function(a, b) { |
| 11366 var t1; |
| 11367 if (typeof a !== "number") |
| 11368 throw H.wrapException(P.ArgumentError$(a)); |
| 11369 if (typeof b !== "number") |
| 11370 throw H.wrapException(P.ArgumentError$(b)); |
| 11371 if (a > b) |
| 11372 return a; |
| 11373 if (a < b) |
| 11374 return b; |
| 11375 if (typeof b === "number") { |
| 11376 if (typeof a === "number") |
| 11377 if (a === 0) |
| 11378 return a + b; |
| 11379 if (C.JSDouble_methods.get$isNaN(b)) |
| 11380 return b; |
| 11381 return a; |
| 11382 } |
| 11383 if (b === 0) |
| 11384 t1 = a === 0 ? 1 / a < 0 : a < 0; |
| 11385 else |
| 11386 t1 = false; |
| 11387 if (t1) |
| 11388 return b; |
| 11389 return a; |
| 11390 }, "call$2", "max$closure", 4, 0, 49] |
| 11391 }], |
| 11392 ["dart.typed_data.implementation", "dart:_native_typed_data", , H, { |
| 11393 "^": "", |
| 11394 NativeByteBuffer: { |
| 11395 "^": "Interceptor;", |
| 11396 $isNativeByteBuffer: 1, |
| 11397 "%": "ArrayBuffer" |
| 11398 }, |
| 11399 NativeTypedData: { |
| 11400 "^": "Interceptor;", |
| 11401 _invalidIndex$2: function(receiver, index, $length) { |
| 11402 var t1 = J.getInterceptor$n(index); |
| 11403 if (t1.$lt(index, 0) || t1.$ge(index, $length)) { |
| 11404 if (!!this.$isList) |
| 11405 if ($length === receiver.length) |
| 11406 throw H.wrapException(P.IndexError$(index, receiver, null, null, nul
l)); |
| 11407 throw H.wrapException(P.RangeError$range(index, 0, $length - 1, null, nu
ll)); |
| 11408 } else |
| 11409 throw H.wrapException(P.ArgumentError$("Invalid list index " + H.S(index
))); |
| 11410 }, |
| 11411 _checkIndex$2: function(receiver, index, $length) { |
| 11412 if (index >>> 0 !== index || index >= $length) |
| 11413 this._invalidIndex$2(receiver, index, $length); |
| 11414 }, |
| 11415 _checkSublistArguments$3: function(receiver, start, end, $length) { |
| 11416 var t1 = $length + 1; |
| 11417 this._checkIndex$2(receiver, start, t1); |
| 11418 this._checkIndex$2(receiver, end, t1); |
| 11419 if (start > end) |
| 11420 throw H.wrapException(P.RangeError$range(start, 0, end, null, null)); |
| 11421 return end; |
| 11422 }, |
| 11423 $isNativeTypedData: 1, |
| 11424 "%": "DataView;ArrayBufferView;NativeTypedArray|NativeTypedArray_ListMixin|N
ativeTypedArray_ListMixin_FixedLengthListMixin|NativeTypedArrayOfDouble|NativeTy
pedArray_ListMixin0|NativeTypedArray_ListMixin_FixedLengthListMixin0|NativeTyped
ArrayOfInt" |
| 11425 }, |
| 11426 NativeTypedArray: { |
| 11427 "^": "NativeTypedData;", |
| 11428 get$length: function(receiver) { |
| 11429 return receiver.length; |
| 11430 }, |
| 11431 $isJavaScriptIndexingBehavior: 1, |
| 11432 $isJSIndexable: 1 |
| 11433 }, |
| 11434 NativeTypedArrayOfDouble: { |
| 11435 "^": "NativeTypedArray_ListMixin_FixedLengthListMixin;", |
| 11436 $index: function(receiver, index) { |
| 11437 var t1 = receiver.length; |
| 11438 if (index >>> 0 !== index || index >= t1) |
| 11439 this._invalidIndex$2(receiver, index, t1); |
| 11440 return receiver[index]; |
| 11441 }, |
| 11442 $indexSet: function(receiver, index, value) { |
| 11443 var t1 = receiver.length; |
| 11444 if (index >>> 0 !== index || index >= t1) |
| 11445 this._invalidIndex$2(receiver, index, t1); |
| 11446 receiver[index] = value; |
| 11447 } |
| 11448 }, |
| 11449 NativeTypedArray_ListMixin: { |
| 11450 "^": "NativeTypedArray+ListMixin;", |
| 11451 $isList: 1, |
| 11452 $asList: function() { |
| 11453 return [P.$double]; |
| 11454 }, |
| 11455 $isEfficientLength: 1 |
| 11456 }, |
| 11457 NativeTypedArray_ListMixin_FixedLengthListMixin: { |
| 11458 "^": "NativeTypedArray_ListMixin+FixedLengthListMixin;" |
| 11459 }, |
| 11460 NativeTypedArrayOfInt: { |
| 11461 "^": "NativeTypedArray_ListMixin_FixedLengthListMixin0;", |
| 11462 $indexSet: function(receiver, index, value) { |
| 11463 var t1 = receiver.length; |
| 11464 if (index >>> 0 !== index || index >= t1) |
| 11465 this._invalidIndex$2(receiver, index, t1); |
| 11466 receiver[index] = value; |
| 11467 }, |
| 11468 $isList: 1, |
| 11469 $asList: function() { |
| 11470 return [P.$int]; |
| 11471 }, |
| 11472 $isEfficientLength: 1 |
| 11473 }, |
| 11474 NativeTypedArray_ListMixin0: { |
| 11475 "^": "NativeTypedArray+ListMixin;", |
| 11476 $isList: 1, |
| 11477 $asList: function() { |
| 11478 return [P.$int]; |
| 11479 }, |
| 11480 $isEfficientLength: 1 |
| 11481 }, |
| 11482 NativeTypedArray_ListMixin_FixedLengthListMixin0: { |
| 11483 "^": "NativeTypedArray_ListMixin0+FixedLengthListMixin;" |
| 11484 }, |
| 11485 NativeFloat32List: { |
| 11486 "^": "NativeTypedArrayOfDouble;", |
| 11487 $isList: 1, |
| 11488 $asList: function() { |
| 11489 return [P.$double]; |
| 11490 }, |
| 11491 $isEfficientLength: 1, |
| 11492 "%": "Float32Array" |
| 11493 }, |
| 11494 NativeFloat64List: { |
| 11495 "^": "NativeTypedArrayOfDouble;", |
| 11496 $isList: 1, |
| 11497 $asList: function() { |
| 11498 return [P.$double]; |
| 11499 }, |
| 11500 $isEfficientLength: 1, |
| 11501 "%": "Float64Array" |
| 11502 }, |
| 11503 NativeInt16List: { |
| 11504 "^": "NativeTypedArrayOfInt;", |
| 11505 $index: function(receiver, index) { |
| 11506 var t1 = receiver.length; |
| 11507 if (index >>> 0 !== index || index >= t1) |
| 11508 this._invalidIndex$2(receiver, index, t1); |
| 11509 return receiver[index]; |
| 11510 }, |
| 11511 $isList: 1, |
| 11512 $asList: function() { |
| 11513 return [P.$int]; |
| 11514 }, |
| 11515 $isEfficientLength: 1, |
| 11516 "%": "Int16Array" |
| 11517 }, |
| 11518 NativeInt32List: { |
| 11519 "^": "NativeTypedArrayOfInt;", |
| 11520 $index: function(receiver, index) { |
| 11521 var t1 = receiver.length; |
| 11522 if (index >>> 0 !== index || index >= t1) |
| 11523 this._invalidIndex$2(receiver, index, t1); |
| 11524 return receiver[index]; |
| 11525 }, |
| 11526 $isList: 1, |
| 11527 $asList: function() { |
| 11528 return [P.$int]; |
| 11529 }, |
| 11530 $isEfficientLength: 1, |
| 11531 "%": "Int32Array" |
| 11532 }, |
| 11533 NativeInt8List: { |
| 11534 "^": "NativeTypedArrayOfInt;", |
| 11535 $index: function(receiver, index) { |
| 11536 var t1 = receiver.length; |
| 11537 if (index >>> 0 !== index || index >= t1) |
| 11538 this._invalidIndex$2(receiver, index, t1); |
| 11539 return receiver[index]; |
| 11540 }, |
| 11541 $isList: 1, |
| 11542 $asList: function() { |
| 11543 return [P.$int]; |
| 11544 }, |
| 11545 $isEfficientLength: 1, |
| 11546 "%": "Int8Array" |
| 11547 }, |
| 11548 NativeUint16List: { |
| 11549 "^": "NativeTypedArrayOfInt;", |
| 11550 $index: function(receiver, index) { |
| 11551 var t1 = receiver.length; |
| 11552 if (index >>> 0 !== index || index >= t1) |
| 11553 this._invalidIndex$2(receiver, index, t1); |
| 11554 return receiver[index]; |
| 11555 }, |
| 11556 $isList: 1, |
| 11557 $asList: function() { |
| 11558 return [P.$int]; |
| 11559 }, |
| 11560 $isEfficientLength: 1, |
| 11561 "%": "Uint16Array" |
| 11562 }, |
| 11563 NativeUint32List: { |
| 11564 "^": "NativeTypedArrayOfInt;", |
| 11565 $index: function(receiver, index) { |
| 11566 var t1 = receiver.length; |
| 11567 if (index >>> 0 !== index || index >= t1) |
| 11568 this._invalidIndex$2(receiver, index, t1); |
| 11569 return receiver[index]; |
| 11570 }, |
| 11571 $isList: 1, |
| 11572 $asList: function() { |
| 11573 return [P.$int]; |
| 11574 }, |
| 11575 $isEfficientLength: 1, |
| 11576 "%": "Uint32Array" |
| 11577 }, |
| 11578 NativeUint8ClampedList: { |
| 11579 "^": "NativeTypedArrayOfInt;", |
| 11580 get$length: function(receiver) { |
| 11581 return receiver.length; |
| 11582 }, |
| 11583 $index: function(receiver, index) { |
| 11584 var t1 = receiver.length; |
| 11585 if (index >>> 0 !== index || index >= t1) |
| 11586 this._invalidIndex$2(receiver, index, t1); |
| 11587 return receiver[index]; |
| 11588 }, |
| 11589 $isList: 1, |
| 11590 $asList: function() { |
| 11591 return [P.$int]; |
| 11592 }, |
| 11593 $isEfficientLength: 1, |
| 11594 "%": "CanvasPixelArray|Uint8ClampedArray" |
| 11595 }, |
| 11596 NativeUint8List: { |
| 11597 "^": "NativeTypedArrayOfInt;", |
| 11598 get$length: function(receiver) { |
| 11599 return receiver.length; |
| 11600 }, |
| 11601 $index: function(receiver, index) { |
| 11602 var t1 = receiver.length; |
| 11603 if (index >>> 0 !== index || index >= t1) |
| 11604 this._invalidIndex$2(receiver, index, t1); |
| 11605 return receiver[index]; |
| 11606 }, |
| 11607 $isList: 1, |
| 11608 $asList: function() { |
| 11609 return [P.$int]; |
| 11610 }, |
| 11611 $isEfficientLength: 1, |
| 11612 "%": ";Uint8Array" |
| 11613 } |
| 11614 }], |
| 11615 ["dart2js._js_primitives", "dart:_js_primitives", , H, { |
| 11616 "^": "", |
| 11617 printString: function(string) { |
| 11618 if (typeof dartPrint == "function") { |
| 11619 dartPrint(string); |
| 11620 return; |
| 11621 } |
| 11622 if (typeof console == "object" && typeof console.log != "undefined") { |
| 11623 console.log(string); |
| 11624 return; |
| 11625 } |
| 11626 if (typeof window == "object") |
| 11627 return; |
| 11628 if (typeof print == "function") { |
| 11629 print(string); |
| 11630 return; |
| 11631 } |
| 11632 throw "Unable to print message: " + String(string); |
| 11633 } |
| 11634 }], |
| 11635 ["frame", "package:stack_trace/src/frame.dart", , S, { |
| 11636 "^": "", |
| 11637 Frame: { |
| 11638 "^": "Object;uri<,line,column,member<", |
| 11639 get$isCore: function() { |
| 11640 return this.uri.scheme === "dart"; |
| 11641 }, |
| 11642 get$$package: function() { |
| 11643 var t1 = this.uri; |
| 11644 if (t1.scheme !== "package") |
| 11645 return; |
| 11646 return C.JSArray_methods.get$first(t1._path.split("/")); |
| 11647 }, |
| 11648 get$location: function(_) { |
| 11649 var t1, t2; |
| 11650 t1 = this.line; |
| 11651 if (t1 == null) |
| 11652 return $.get$context().prettyUri$1(this.uri); |
| 11653 t2 = this.column; |
| 11654 if (t2 == null) |
| 11655 return $.get$context().prettyUri$1(this.uri) + " " + H.S(t1); |
| 11656 return $.get$context().prettyUri$1(this.uri) + " " + H.S(t1) + ":" + H.S(t
2); |
| 11657 }, |
| 11658 toString$0: function(_) { |
| 11659 return this.get$location(this) + " in " + H.S(this.member); |
| 11660 }, |
| 11661 static: {Frame_Frame$parseVM: function(frame) { |
| 11662 var match, t1, t2, member, uri, lineAndColumn, line, column; |
| 11663 if (J.$eq(frame, "...")) |
| 11664 return new S.Frame(P.Uri_Uri(null, null, null, null, null, null, null,
"", ""), null, null, "..."); |
| 11665 match = $.get$_vmFrame().firstMatch$1(frame); |
| 11666 if (match == null) |
| 11667 throw H.wrapException(P.FormatException$("Couldn't parse VM stack trac
e line '" + H.S(frame) + "'.", null, null)); |
| 11668 t1 = match._match; |
| 11669 if (1 >= t1.length) |
| 11670 return H.ioore(t1, 1); |
| 11671 t2 = J.replaceAll$2$s(t1[1], $.get$_asyncBody(), "<async>"); |
| 11672 H.checkString("<fn>"); |
| 11673 member = H.stringReplaceAllUnchecked(t2, "<anonymous closure>", "<fn>"); |
| 11674 if (2 >= t1.length) |
| 11675 return H.ioore(t1, 2); |
| 11676 uri = P.Uri_parse(t1[2]); |
| 11677 if (3 >= t1.length) |
| 11678 return H.ioore(t1, 3); |
| 11679 lineAndColumn = J.split$1$s(t1[3], ":"); |
| 11680 line = lineAndColumn.length > 1 ? H.Primitives_parseInt(lineAndColumn[1]
, null, null) : null; |
| 11681 column = lineAndColumn.length > 2 ? H.Primitives_parseInt(lineAndColumn[
2], null, null) : null; |
| 11682 return new S.Frame(uri, line, column, member); |
| 11683 }, Frame_Frame$parseV8: function(frame) { |
| 11684 var match, t1, t2, t3, t4; |
| 11685 match = $.get$_v8Frame().firstMatch$1(frame); |
| 11686 if (match == null) |
| 11687 throw H.wrapException(P.FormatException$("Couldn't parse V8 stack trac
e line '" + H.S(frame) + "'.", null, null)); |
| 11688 t1 = new S.Frame_Frame$parseV8_parseLocation(frame); |
| 11689 t2 = match._match; |
| 11690 t3 = t2.length; |
| 11691 if (2 >= t3) |
| 11692 return H.ioore(t2, 2); |
| 11693 t4 = t2[2]; |
| 11694 if (t4 != null) { |
| 11695 t2 = J.replaceAll$2$s(t2[1], "<anonymous>", "<fn>"); |
| 11696 H.checkString("<fn>"); |
| 11697 return t1.call$2(t4, H.stringReplaceAllUnchecked(t2, "Anonymous functi
on", "<fn>")); |
| 11698 } else { |
| 11699 if (3 >= t3) |
| 11700 return H.ioore(t2, 3); |
| 11701 return t1.call$2(t2[3], "<fn>"); |
| 11702 } |
| 11703 }, Frame__uriOrPathToUri: function(uriOrPath) { |
| 11704 var t1 = J.getInterceptor$asx(uriOrPath); |
| 11705 if (t1.contains$1(uriOrPath, $.get$Frame__uriRegExp()) === true) |
| 11706 return P.Uri_parse(uriOrPath); |
| 11707 else if (t1.contains$1(uriOrPath, $.get$Frame__windowsRegExp()) === true
) |
| 11708 return P.Uri_Uri$file(uriOrPath, true); |
| 11709 else if (t1.startsWith$1(uriOrPath, "/")) |
| 11710 return P.Uri_Uri$file(uriOrPath, false); |
| 11711 if (C.JSString_methods.contains$1(uriOrPath, "\\")) |
| 11712 return $.get$windows().toUri$1(uriOrPath); |
| 11713 return P.Uri_parse(uriOrPath); |
| 11714 }} |
| 11715 }, |
| 11716 Frame_Frame$parseV8_parseLocation: { |
| 11717 "^": "Closure:15;frame_0", |
| 11718 call$2: function($location, member) { |
| 11719 var t1, evalMatch, t2, urlMatch, t3; |
| 11720 t1 = $.get$_v8EvalLocation(); |
| 11721 evalMatch = t1.firstMatch$1($location); |
| 11722 for (; evalMatch != null;) { |
| 11723 t2 = evalMatch._match; |
| 11724 if (1 >= t2.length) |
| 11725 return H.ioore(t2, 1); |
| 11726 $location = t2[1]; |
| 11727 evalMatch = t1.firstMatch$1($location); |
| 11728 } |
| 11729 urlMatch = $.get$_v8UrlLocation().firstMatch$1($location); |
| 11730 if (urlMatch == null) |
| 11731 throw H.wrapException(P.FormatException$("Couldn't parse V8 stack trace
line '" + H.S(this.frame_0) + "'.", null, null)); |
| 11732 t1 = urlMatch._match; |
| 11733 if (1 >= t1.length) |
| 11734 return H.ioore(t1, 1); |
| 11735 t2 = S.Frame__uriOrPathToUri(t1[1]); |
| 11736 if (2 >= t1.length) |
| 11737 return H.ioore(t1, 2); |
| 11738 t3 = H.Primitives_parseInt(t1[2], null, null); |
| 11739 if (3 >= t1.length) |
| 11740 return H.ioore(t1, 3); |
| 11741 return new S.Frame(t2, t3, H.Primitives_parseInt(t1[3], null, null), membe
r); |
| 11742 } |
| 11743 } |
| 11744 }], |
| 11745 ["html_common", "dart:html_common", , P, { |
| 11746 "^": "", |
| 11747 _convertDartToNative_PrepareForStructuredClone: function(value) { |
| 11748 var copies, copy; |
| 11749 copies = []; |
| 11750 copy = new P._convertDartToNative_PrepareForStructuredClone_walk(new P._conv
ertDartToNative_PrepareForStructuredClone_findSlot([], copies), new P._convertDa
rtToNative_PrepareForStructuredClone_readSlot(copies), new P._convertDartToNativ
e_PrepareForStructuredClone_writeSlot(copies)).call$1(value); |
| 11751 new P._convertDartToNative_PrepareForStructuredClone_cleanupSlots().call$0()
; |
| 11752 return copy; |
| 11753 }, |
| 11754 convertNativeToDart_AcceptStructuredClone: function(object, mustCopy) { |
| 11755 var copies = []; |
| 11756 return new P.convertNativeToDart_AcceptStructuredClone_walk(mustCopy, new P.
convertNativeToDart_AcceptStructuredClone_findSlot([], copies), new P.convertNat
iveToDart_AcceptStructuredClone_readSlot(copies), new P.convertNativeToDart_Acce
ptStructuredClone_writeSlot(copies)).call$1(object); |
| 11757 }, |
| 11758 _convertDartToNative_PrepareForStructuredClone_findSlot: { |
| 11759 "^": "Closure:26;values_1,copies_2", |
| 11760 call$1: function(value) { |
| 11761 var t1, $length, i; |
| 11762 t1 = this.values_1; |
| 11763 $length = t1.length; |
| 11764 for (i = 0; i < $length; ++i) |
| 11765 if (t1[i] === value) |
| 11766 return i; |
| 11767 t1.push(value); |
| 11768 this.copies_2.push(null); |
| 11769 return $length; |
| 11770 } |
| 11771 }, |
| 11772 _convertDartToNative_PrepareForStructuredClone_readSlot: { |
| 11773 "^": "Closure:27;copies_3", |
| 11774 call$1: function(i) { |
| 11775 var t1 = this.copies_3; |
| 11776 if (i >= t1.length) |
| 11777 return H.ioore(t1, i); |
| 11778 return t1[i]; |
| 11779 } |
| 11780 }, |
| 11781 _convertDartToNative_PrepareForStructuredClone_writeSlot: { |
| 11782 "^": "Closure:28;copies_4", |
| 11783 call$2: function(i, x) { |
| 11784 var t1 = this.copies_4; |
| 11785 if (i >= t1.length) |
| 11786 return H.ioore(t1, i); |
| 11787 t1[i] = x; |
| 11788 } |
| 11789 }, |
| 11790 _convertDartToNative_PrepareForStructuredClone_cleanupSlots: { |
| 11791 "^": "Closure:0;", |
| 11792 call$0: function() { |
| 11793 } |
| 11794 }, |
| 11795 _convertDartToNative_PrepareForStructuredClone_walk: { |
| 11796 "^": "Closure:2;findSlot_5,readSlot_6,writeSlot_7", |
| 11797 call$1: function(e) { |
| 11798 var t1, t2, slot, copy, $length, i; |
| 11799 t1 = {}; |
| 11800 if (e == null) |
| 11801 return e; |
| 11802 if (typeof e === "boolean") |
| 11803 return e; |
| 11804 if (typeof e === "number") |
| 11805 return e; |
| 11806 if (typeof e === "string") |
| 11807 return e; |
| 11808 t2 = J.getInterceptor(e); |
| 11809 if (!!t2.$isDateTime) |
| 11810 return new Date(e.millisecondsSinceEpoch); |
| 11811 if (!!t2.$isRegExp) |
| 11812 throw H.wrapException(P.UnimplementedError$("structured clone of RegExp"
)); |
| 11813 if (!!t2.$isFile) |
| 11814 return e; |
| 11815 if (!!t2.$isBlob) |
| 11816 return e; |
| 11817 if (!!t2.$isNativeByteBuffer) |
| 11818 return e; |
| 11819 if (!!t2.$isNativeTypedData) |
| 11820 return e; |
| 11821 if (!!t2.$isMap) { |
| 11822 slot = this.findSlot_5.call$1(e); |
| 11823 copy = this.readSlot_6.call$1(slot); |
| 11824 t1.copy_0 = copy; |
| 11825 if (copy != null) |
| 11826 return copy; |
| 11827 copy = {}; |
| 11828 t1.copy_0 = copy; |
| 11829 this.writeSlot_7.call$2(slot, copy); |
| 11830 t2.forEach$1(e, new P._convertDartToNative_PrepareForStructuredClone_wal
k_closure(t1, this)); |
| 11831 return t1.copy_0; |
| 11832 } |
| 11833 if (!!t2.$isList) { |
| 11834 $length = t2.get$length(e); |
| 11835 slot = this.findSlot_5.call$1(e); |
| 11836 copy = this.readSlot_6.call$1(slot); |
| 11837 if (copy != null) { |
| 11838 if (true === copy) { |
| 11839 copy = new Array($length); |
| 11840 this.writeSlot_7.call$2(slot, copy); |
| 11841 } |
| 11842 return copy; |
| 11843 } |
| 11844 copy = new Array($length); |
| 11845 this.writeSlot_7.call$2(slot, copy); |
| 11846 for (i = 0; i < $length; ++i) { |
| 11847 t1 = this.call$1(t2.$index(e, i)); |
| 11848 if (i >= copy.length) |
| 11849 return H.ioore(copy, i); |
| 11850 copy[i] = t1; |
| 11851 } |
| 11852 return copy; |
| 11853 } |
| 11854 throw H.wrapException(P.UnimplementedError$("structured clone of other typ
e")); |
| 11855 } |
| 11856 }, |
| 11857 _convertDartToNative_PrepareForStructuredClone_walk_closure: { |
| 11858 "^": "Closure:15;box_0,walk_8", |
| 11859 call$2: function(key, value) { |
| 11860 this.box_0.copy_0[key] = this.walk_8.call$1(value); |
| 11861 } |
| 11862 }, |
| 11863 convertNativeToDart_AcceptStructuredClone_findSlot: { |
| 11864 "^": "Closure:26;values_0,copies_1", |
| 11865 call$1: function(value) { |
| 11866 var t1, $length, i, t2; |
| 11867 t1 = this.values_0; |
| 11868 $length = t1.length; |
| 11869 for (i = 0; i < $length; ++i) { |
| 11870 t2 = t1[i]; |
| 11871 if (t2 == null ? value == null : t2 === value) |
| 11872 return i; |
| 11873 } |
| 11874 t1.push(value); |
| 11875 this.copies_1.push(null); |
| 11876 return $length; |
| 11877 } |
| 11878 }, |
| 11879 convertNativeToDart_AcceptStructuredClone_readSlot: { |
| 11880 "^": "Closure:27;copies_2", |
| 11881 call$1: function(i) { |
| 11882 var t1 = this.copies_2; |
| 11883 if (i >= t1.length) |
| 11884 return H.ioore(t1, i); |
| 11885 return t1[i]; |
| 11886 } |
| 11887 }, |
| 11888 convertNativeToDart_AcceptStructuredClone_writeSlot: { |
| 11889 "^": "Closure:28;copies_3", |
| 11890 call$2: function(i, x) { |
| 11891 var t1 = this.copies_3; |
| 11892 if (i >= t1.length) |
| 11893 return H.ioore(t1, i); |
| 11894 t1[i] = x; |
| 11895 } |
| 11896 }, |
| 11897 convertNativeToDart_AcceptStructuredClone_walk: { |
| 11898 "^": "Closure:2;mustCopy_4,findSlot_5,readSlot_6,writeSlot_7", |
| 11899 call$1: function(e) { |
| 11900 var proto, slot, copy, t1, key, $length, t2, i; |
| 11901 if (e == null) |
| 11902 return e; |
| 11903 if (typeof e === "boolean") |
| 11904 return e; |
| 11905 if (typeof e === "number") |
| 11906 return e; |
| 11907 if (typeof e === "string") |
| 11908 return e; |
| 11909 if (e instanceof Date) |
| 11910 return P.DateTime$fromMillisecondsSinceEpoch(e.getTime(), true); |
| 11911 if (e instanceof RegExp) |
| 11912 throw H.wrapException(P.UnimplementedError$("structured clone of RegExp"
)); |
| 11913 proto = Object.getPrototypeOf(e); |
| 11914 if (proto === Object.prototype || proto === null) { |
| 11915 slot = this.findSlot_5.call$1(e); |
| 11916 copy = this.readSlot_6.call$1(slot); |
| 11917 if (copy != null) |
| 11918 return copy; |
| 11919 copy = P.LinkedHashMap_LinkedHashMap$_empty(null, null); |
| 11920 this.writeSlot_7.call$2(slot, copy); |
| 11921 for (t1 = Object.keys(e), t1 = new H.ListIterator(t1, t1.length, 0, null
); t1.moveNext$0();) { |
| 11922 key = t1._current; |
| 11923 copy.$indexSet(0, key, this.call$1(e[key])); |
| 11924 } |
| 11925 return copy; |
| 11926 } |
| 11927 if (e instanceof Array) { |
| 11928 slot = this.findSlot_5.call$1(e); |
| 11929 copy = this.readSlot_6.call$1(slot); |
| 11930 if (copy != null) |
| 11931 return copy; |
| 11932 t1 = J.getInterceptor$asx(e); |
| 11933 $length = t1.get$length(e); |
| 11934 copy = this.mustCopy_4 ? new Array($length) : e; |
| 11935 this.writeSlot_7.call$2(slot, copy); |
| 11936 if (typeof $length !== "number") |
| 11937 return H.iae($length); |
| 11938 t2 = J.getInterceptor$ax(copy); |
| 11939 i = 0; |
| 11940 for (; i < $length; ++i) |
| 11941 t2.$indexSet(copy, i, this.call$1(t1.$index(e, i))); |
| 11942 return copy; |
| 11943 } |
| 11944 return e; |
| 11945 } |
| 11946 } |
| 11947 }], |
| 11948 ["lazy_trace", "package:stack_trace/src/lazy_trace.dart", , S, { |
| 11949 "^": "", |
| 11950 LazyTrace: { |
| 11951 "^": "Object;_thunk,_inner", |
| 11952 get$_trace: function() { |
| 11953 var t1 = this._inner; |
| 11954 if (t1 == null) { |
| 11955 t1 = this._thunk$0(); |
| 11956 this._inner = t1; |
| 11957 } |
| 11958 return t1; |
| 11959 }, |
| 11960 get$terse: function() { |
| 11961 return new S.LazyTrace(new S.LazyTrace_terse_closure(this), null); |
| 11962 }, |
| 11963 toString$0: function(_) { |
| 11964 return J.toString$0(this.get$_trace()); |
| 11965 }, |
| 11966 _thunk$0: function() { |
| 11967 return this._thunk.call$0(); |
| 11968 }, |
| 11969 $isTrace: 1 |
| 11970 }, |
| 11971 LazyTrace_terse_closure: { |
| 11972 "^": "Closure:0;this_0", |
| 11973 call$0: function() { |
| 11974 return this.this_0.get$_trace().get$terse(); |
| 11975 } |
| 11976 } |
| 11977 }], |
| 11978 ["path", "package:path/path.dart", , B, { |
| 11979 "^": "", |
| 11980 current: function() { |
| 11981 var uri, t1, t2, path; |
| 11982 uri = P.Uri_base(); |
| 11983 t1 = $.get$Style_platform(); |
| 11984 t2 = $.get$Style_url(); |
| 11985 if (t1 == null ? t2 == null : t1 === t2) |
| 11986 return uri.resolveUri$1(P.Uri_parse(".")).toString$0(0); |
| 11987 else { |
| 11988 path = uri.toFilePath$0(); |
| 11989 return C.JSString_methods.substring$2(path, 0, path.length - 1); |
| 11990 } |
| 11991 } |
| 11992 }], |
| 11993 ["path.context", "package:path/src/context.dart", , F, { |
| 11994 "^": "", |
| 11995 _validateArgList: function(method, args) { |
| 11996 var i, numArgs, numArgs0, message, t1, t2; |
| 11997 for (i = 1; i < 8; ++i) { |
| 11998 if (args[i] == null || args[i - 1] != null) |
| 11999 continue; |
| 12000 for (numArgs = 8; numArgs >= 1; numArgs = numArgs0) { |
| 12001 numArgs0 = numArgs - 1; |
| 12002 if (args[numArgs0] != null) |
| 12003 break; |
| 12004 } |
| 12005 message = new P.StringBuffer(""); |
| 12006 t1 = method + "("; |
| 12007 message._contents = t1; |
| 12008 t2 = new H.SubListIterable(args, 0, numArgs); |
| 12009 t2.$builtinTypeInfo = [H.getTypeArgumentByIndex(args, 0)]; |
| 12010 if (numArgs < 0) |
| 12011 H.throwExpression(P.RangeError$range(numArgs, 0, null, "end", null)); |
| 12012 if (0 > numArgs) |
| 12013 H.throwExpression(P.RangeError$range(0, 0, numArgs, "start", null)); |
| 12014 t2 = new H.MappedListIterable(t2, new F._validateArgList_closure()); |
| 12015 t2.$builtinTypeInfo = [null, null]; |
| 12016 t1 += t2.join$1(0, ", "); |
| 12017 message._contents = t1; |
| 12018 message._contents = t1 + ("): part " + (i - 1) + " was null, but part " +
i + " was not."); |
| 12019 throw H.wrapException(P.ArgumentError$(message.toString$0(0))); |
| 12020 } |
| 12021 }, |
| 12022 Context: { |
| 12023 "^": "Object;style,_context0$_current", |
| 12024 join$8: function(_, part1, part2, part3, part4, part5, part6, part7, part8)
{ |
| 12025 var parts = [part1, part2, part3, part4, part5, part6, part7, part8]; |
| 12026 F._validateArgList("join", parts); |
| 12027 return this.joinAll$1(H.setRuntimeTypeInfo(new H.WhereIterable(parts, new
F.Context_join_closure()), [H.getTypeArgumentByIndex(parts, 0)])); |
| 12028 }, |
| 12029 join$2: function($receiver, part1, part2) { |
| 12030 return this.join$8($receiver, part1, part2, null, null, null, null, null,
null); |
| 12031 }, |
| 12032 joinAll$1: function(parts) { |
| 12033 var buffer, t1, t2, t3, needsSeparator, isAbsoluteAndNotRootRelative, part
, parsed, t4, root, t5; |
| 12034 buffer = new P.StringBuffer(""); |
| 12035 for (t1 = H.setRuntimeTypeInfo(new H.WhereIterable(parts, new F.Context_jo
inAll_closure()), [H.getRuntimeTypeArgument(parts, "IterableBase", 0)]), t1 = H.
setRuntimeTypeInfo(new H.WhereIterator(J.get$iterator$ax(t1._iterable), t1._f),
[H.getTypeArgumentByIndex(t1, 0)]), t2 = this.style, t3 = t1._iterator, needsSep
arator = false, isAbsoluteAndNotRootRelative = false; t1.moveNext$0();) { |
| 12036 part = t3.get$current(); |
| 12037 if (Q.ParsedPath_ParsedPath$parse(part, t2).isRootRelative && isAbsolute
AndNotRootRelative) { |
| 12038 parsed = Q.ParsedPath_ParsedPath$parse(part, t2); |
| 12039 t4 = buffer._contents; |
| 12040 root = Q.ParsedPath_ParsedPath$parse(t4.charCodeAt(0) == 0 ? t4 : t4,
t2).root; |
| 12041 t4 = root == null ? "" : root; |
| 12042 parsed.root = t4; |
| 12043 if (t2.needsSeparator$1(t4)) { |
| 12044 t4 = parsed.separators; |
| 12045 t5 = t2.get$separator(); |
| 12046 if (0 >= t4.length) |
| 12047 return H.ioore(t4, 0); |
| 12048 t4[0] = t5; |
| 12049 } |
| 12050 buffer._contents = ""; |
| 12051 buffer._contents += parsed.toString$0(0); |
| 12052 } else if (Q.ParsedPath_ParsedPath$parse(part, t2).root != null) { |
| 12053 isAbsoluteAndNotRootRelative = !Q.ParsedPath_ParsedPath$parse(part, t2
).isRootRelative; |
| 12054 buffer._contents = ""; |
| 12055 buffer._contents += H.S(part); |
| 12056 } else { |
| 12057 t4 = J.getInterceptor$asx(part); |
| 12058 if (J.$gt$n(t4.get$length(part), 0) && t2.containsSeparator$1(t4.$inde
x(part, 0)) === true) |
| 12059 ; |
| 12060 else if (needsSeparator) |
| 12061 buffer._contents += t2.get$separator(); |
| 12062 buffer._contents += H.S(part); |
| 12063 } |
| 12064 needsSeparator = t2.needsSeparator$1(part); |
| 12065 } |
| 12066 t1 = buffer._contents; |
| 12067 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 12068 }, |
| 12069 split$1: function(_, path) { |
| 12070 var parsed, t1, t2; |
| 12071 parsed = Q.ParsedPath_ParsedPath$parse(path, this.style); |
| 12072 t1 = parsed.parts; |
| 12073 t1 = H.setRuntimeTypeInfo(new H.WhereIterable(t1, new F.Context_split_clos
ure()), [H.getTypeArgumentByIndex(t1, 0)]); |
| 12074 t1 = P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "IterableBase
", 0)); |
| 12075 parsed.parts = t1; |
| 12076 t2 = parsed.root; |
| 12077 if (t2 != null) |
| 12078 C.JSArray_methods.insert$2(t1, 0, t2); |
| 12079 return parsed.parts; |
| 12080 }, |
| 12081 normalize$1: function(path) { |
| 12082 var parsed = Q.ParsedPath_ParsedPath$parse(path, this.style); |
| 12083 parsed.normalize$0(); |
| 12084 return parsed.toString$0(0); |
| 12085 }, |
| 12086 relative$2$from: function(path, from) { |
| 12087 var t1, t2, fromParsed, pathParsed, t3; |
| 12088 t1 = this._context0$_current; |
| 12089 from = t1 != null ? t1 : B.current(); |
| 12090 t1 = this.style; |
| 12091 if (Q.ParsedPath_ParsedPath$parse(from, t1).root == null && Q.ParsedPath_P
arsedPath$parse(path, t1).root != null) |
| 12092 return this.normalize$1(path); |
| 12093 if (Q.ParsedPath_ParsedPath$parse(path, t1).root == null || Q.ParsedPath_P
arsedPath$parse(path, t1).isRootRelative) { |
| 12094 t2 = this._context0$_current; |
| 12095 path = this.join$8(0, t2 != null ? t2 : B.current(), path, null, null, n
ull, null, null, null); |
| 12096 } |
| 12097 if (Q.ParsedPath_ParsedPath$parse(path, t1).root == null && Q.ParsedPath_P
arsedPath$parse(from, t1).root != null) |
| 12098 throw H.wrapException(E.PathException$("Unable to find a path to \"" + p
ath + "\" from \"" + H.S(from) + "\".")); |
| 12099 fromParsed = Q.ParsedPath_ParsedPath$parse(from, t1); |
| 12100 fromParsed.normalize$0(); |
| 12101 pathParsed = Q.ParsedPath_ParsedPath$parse(path, t1); |
| 12102 pathParsed.normalize$0(); |
| 12103 t2 = fromParsed.parts; |
| 12104 if (t2.length > 0 && J.$eq(t2[0], ".")) |
| 12105 return pathParsed.toString$0(0); |
| 12106 t2 = fromParsed.root; |
| 12107 t3 = pathParsed.root; |
| 12108 if (t2 == null ? t3 != null : t2 !== t3) |
| 12109 if (!(t2 == null || t3 == null)) { |
| 12110 t2.toString; |
| 12111 t2 = t2.toLowerCase(); |
| 12112 H.checkString("\\"); |
| 12113 t2 = H.stringReplaceAllUnchecked(t2, "/", "\\"); |
| 12114 t3 = pathParsed.root; |
| 12115 t3.toString; |
| 12116 t3 = t3.toLowerCase(); |
| 12117 H.checkString("\\"); |
| 12118 t3 = t2 !== H.stringReplaceAllUnchecked(t3, "/", "\\"); |
| 12119 t2 = t3; |
| 12120 } else |
| 12121 t2 = true; |
| 12122 else |
| 12123 t2 = false; |
| 12124 if (t2) |
| 12125 return pathParsed.toString$0(0); |
| 12126 while (true) { |
| 12127 t2 = fromParsed.parts; |
| 12128 if (t2.length > 0) { |
| 12129 t3 = pathParsed.parts; |
| 12130 t2 = t3.length > 0 && J.$eq(t2[0], t3[0]); |
| 12131 } else |
| 12132 t2 = false; |
| 12133 if (!t2) |
| 12134 break; |
| 12135 C.JSArray_methods.removeAt$1(fromParsed.parts, 0); |
| 12136 C.JSArray_methods.removeAt$1(fromParsed.separators, 1); |
| 12137 C.JSArray_methods.removeAt$1(pathParsed.parts, 0); |
| 12138 C.JSArray_methods.removeAt$1(pathParsed.separators, 1); |
| 12139 } |
| 12140 t2 = fromParsed.parts; |
| 12141 if (t2.length > 0 && J.$eq(t2[0], "..")) |
| 12142 throw H.wrapException(E.PathException$("Unable to find a path to \"" + p
ath + "\" from \"" + H.S(from) + "\".")); |
| 12143 C.JSArray_methods.insertAll$2(pathParsed.parts, 0, P.List_List$filled(from
Parsed.parts.length, "..", null)); |
| 12144 t2 = pathParsed.separators; |
| 12145 if (0 >= t2.length) |
| 12146 return H.ioore(t2, 0); |
| 12147 t2[0] = ""; |
| 12148 C.JSArray_methods.insertAll$2(t2, 1, P.List_List$filled(fromParsed.parts.l
ength, t1.get$separator(), null)); |
| 12149 t1 = pathParsed.parts; |
| 12150 t2 = t1.length; |
| 12151 if (t2 === 0) |
| 12152 return "."; |
| 12153 if (t2 > 1 && J.$eq(C.JSArray_methods.get$last(t1), ".")) { |
| 12154 t1 = pathParsed.parts; |
| 12155 if (0 >= t1.length) |
| 12156 return H.ioore(t1, 0); |
| 12157 t1.pop(); |
| 12158 t1 = pathParsed.separators; |
| 12159 C.JSArray_methods.removeLast$0(t1); |
| 12160 C.JSArray_methods.removeLast$0(t1); |
| 12161 C.JSArray_methods.add$1(t1, ""); |
| 12162 } |
| 12163 pathParsed.root = ""; |
| 12164 pathParsed.removeTrailingSeparators$0(); |
| 12165 return pathParsed.toString$0(0); |
| 12166 }, |
| 12167 relative$1: function(path) { |
| 12168 return this.relative$2$from(path, null); |
| 12169 }, |
| 12170 fromUri$1: function(uri) { |
| 12171 return this.style.pathFromUri$1(uri); |
| 12172 }, |
| 12173 toUri$1: function(path) { |
| 12174 var t1, t2; |
| 12175 t1 = this.style; |
| 12176 if (Q.ParsedPath_ParsedPath$parse(path, t1).root == null) |
| 12177 return t1.relativePathToUri$1(path); |
| 12178 else { |
| 12179 t2 = this._context0$_current; |
| 12180 return t1.absolutePathToUri$1(this.join$2(0, t2 != null ? t2 : B.current
(), path)); |
| 12181 } |
| 12182 }, |
| 12183 prettyUri$1: function(uri) { |
| 12184 var t1, t2, t3, t4, path, rel; |
| 12185 t1 = uri.scheme; |
| 12186 t2 = t1 === "file"; |
| 12187 if (t2) { |
| 12188 t3 = this.style; |
| 12189 t4 = $.get$Style_url(); |
| 12190 t4 = t3 == null ? t4 == null : t3 === t4; |
| 12191 t3 = t4; |
| 12192 } else |
| 12193 t3 = false; |
| 12194 if (t3) |
| 12195 return uri.toString$0(0); |
| 12196 if (!t2) |
| 12197 if (t1 !== "") { |
| 12198 t1 = this.style; |
| 12199 t2 = $.get$Style_url(); |
| 12200 t2 = t1 == null ? t2 != null : t1 !== t2; |
| 12201 t1 = t2; |
| 12202 } else |
| 12203 t1 = false; |
| 12204 else |
| 12205 t1 = false; |
| 12206 if (t1) |
| 12207 return uri.toString$0(0); |
| 12208 path = this.normalize$1(this.fromUri$1(uri)); |
| 12209 rel = this.relative$1(path); |
| 12210 this.split$1(0, rel); |
| 12211 return this.split$1(0, rel).length > this.split$1(0, path).length ? path :
rel; |
| 12212 }, |
| 12213 static: {Context_Context: function(current, style) { |
| 12214 current = style == null ? B.current() : "."; |
| 12215 if (style == null) |
| 12216 style = $.get$Style_platform(); |
| 12217 else if (!style.$isInternalStyle) |
| 12218 throw H.wrapException(P.ArgumentError$("Only styles defined by the pat
h package are allowed.")); |
| 12219 return new F.Context(style, current); |
| 12220 }} |
| 12221 }, |
| 12222 Context_join_closure: { |
| 12223 "^": "Closure:2;", |
| 12224 call$1: function(part) { |
| 12225 return part != null; |
| 12226 } |
| 12227 }, |
| 12228 Context_joinAll_closure: { |
| 12229 "^": "Closure:2;", |
| 12230 call$1: function(part) { |
| 12231 return !J.$eq(part, ""); |
| 12232 } |
| 12233 }, |
| 12234 Context_split_closure: { |
| 12235 "^": "Closure:2;", |
| 12236 call$1: function(part) { |
| 12237 return J.get$isEmpty$asx(part) !== true; |
| 12238 } |
| 12239 }, |
| 12240 _validateArgList_closure: { |
| 12241 "^": "Closure:2;", |
| 12242 call$1: function(arg) { |
| 12243 return arg == null ? "null" : "\"" + H.S(arg) + "\""; |
| 12244 } |
| 12245 } |
| 12246 }], |
| 12247 ["path.internal_style", "package:path/src/internal_style.dart", , E, { |
| 12248 "^": "", |
| 12249 InternalStyle: { |
| 12250 "^": "Style;", |
| 12251 relativePathToUri$1: function(path) { |
| 12252 return P.Uri_Uri(null, null, null, F.Context_Context(null, this).split$1(0
, path), null, null, null, "", ""); |
| 12253 } |
| 12254 } |
| 12255 }], |
| 12256 ["path.parsed_path", "package:path/src/parsed_path.dart", , Q, { |
| 12257 "^": "", |
| 12258 ParsedPath: { |
| 12259 "^": "Object;style,root,isRootRelative,parts,separators", |
| 12260 get$hasTrailingSeparator: function() { |
| 12261 var t1 = this.parts; |
| 12262 if (t1.length !== 0) |
| 12263 t1 = J.$eq(C.JSArray_methods.get$last(t1), "") || !J.$eq(C.JSArray_metho
ds.get$last(this.separators), ""); |
| 12264 else |
| 12265 t1 = false; |
| 12266 return t1; |
| 12267 }, |
| 12268 removeTrailingSeparators$0: function() { |
| 12269 var t1, t2; |
| 12270 while (true) { |
| 12271 t1 = this.parts; |
| 12272 if (!(t1.length !== 0 && J.$eq(C.JSArray_methods.get$last(t1), ""))) |
| 12273 break; |
| 12274 t1 = this.parts; |
| 12275 if (0 >= t1.length) |
| 12276 return H.ioore(t1, 0); |
| 12277 t1.pop(); |
| 12278 C.JSArray_methods.removeLast$0(this.separators); |
| 12279 } |
| 12280 t1 = this.separators; |
| 12281 t2 = t1.length; |
| 12282 if (t2 > 0) |
| 12283 t1[t2 - 1] = ""; |
| 12284 }, |
| 12285 normalize$0: function() { |
| 12286 var newParts, t1, leadingDoubles, part, t2, newSeparators; |
| 12287 newParts = []; |
| 12288 for (t1 = this.parts, t1 = new H.ListIterator(t1, t1.length, 0, null), lea
dingDoubles = 0; t1.moveNext$0();) { |
| 12289 part = t1._current; |
| 12290 t2 = J.getInterceptor(part); |
| 12291 if (t2.$eq(part, ".") || t2.$eq(part, "")) |
| 12292 ; |
| 12293 else if (t2.$eq(part, "..")) |
| 12294 if (newParts.length > 0) |
| 12295 newParts.pop(); |
| 12296 else |
| 12297 ++leadingDoubles; |
| 12298 else |
| 12299 newParts.push(part); |
| 12300 } |
| 12301 if (this.root == null) |
| 12302 C.JSArray_methods.insertAll$2(newParts, 0, P.List_List$filled(leadingDou
bles, "..", null)); |
| 12303 if (newParts.length === 0 && this.root == null) |
| 12304 newParts.push("."); |
| 12305 newSeparators = P.List_List$generate(newParts.length, new Q.ParsedPath_nor
malize_closure(this), true, null); |
| 12306 t1 = this.root; |
| 12307 C.JSArray_methods.insert$2(newSeparators, 0, t1 != null && newParts.length
> 0 && this.style.needsSeparator$1(t1) ? this.style.get$separator() : ""); |
| 12308 this.parts = newParts; |
| 12309 this.separators = newSeparators; |
| 12310 t1 = this.root; |
| 12311 if (t1 != null && this.style === $.get$Style_windows()) { |
| 12312 t1.toString; |
| 12313 H.checkString("\\"); |
| 12314 this.root = H.stringReplaceAllUnchecked(t1, "/", "\\"); |
| 12315 } |
| 12316 this.removeTrailingSeparators$0(); |
| 12317 }, |
| 12318 toString$0: function(_) { |
| 12319 var builder, t1, i; |
| 12320 builder = new P.StringBuffer(""); |
| 12321 t1 = this.root; |
| 12322 if (t1 != null) |
| 12323 builder._contents = H.S(t1); |
| 12324 for (i = 0; i < this.parts.length; ++i) { |
| 12325 t1 = this.separators; |
| 12326 if (i >= t1.length) |
| 12327 return H.ioore(t1, i); |
| 12328 builder._contents += H.S(t1[i]); |
| 12329 t1 = this.parts; |
| 12330 if (i >= t1.length) |
| 12331 return H.ioore(t1, i); |
| 12332 builder._contents += H.S(t1[i]); |
| 12333 } |
| 12334 t1 = builder._contents += H.S(C.JSArray_methods.get$last(this.separators))
; |
| 12335 return t1.charCodeAt(0) == 0 ? t1 : t1; |
| 12336 }, |
| 12337 static: {ParsedPath_ParsedPath$parse: function(path, style) { |
| 12338 var root, t1, parts, separators, t2, start, i, t3; |
| 12339 root = style.getRoot$1(path); |
| 12340 t1 = style.getRelativeRoot$1(path); |
| 12341 if (root != null) |
| 12342 path = J.substring$1$s(path, root.length); |
| 12343 parts = []; |
| 12344 separators = []; |
| 12345 t2 = J.getInterceptor$asx(path); |
| 12346 if (t2.get$isNotEmpty(path) && style.isSeparator$1(t2.codeUnitAt$1(path,
0))) { |
| 12347 separators.push(t2.$index(path, 0)); |
| 12348 start = 1; |
| 12349 } else { |
| 12350 separators.push(""); |
| 12351 start = 0; |
| 12352 } |
| 12353 i = start; |
| 12354 while (true) { |
| 12355 t3 = t2.get$length(path); |
| 12356 if (typeof t3 !== "number") |
| 12357 return H.iae(t3); |
| 12358 if (!(i < t3)) |
| 12359 break; |
| 12360 if (style.isSeparator$1(t2.codeUnitAt$1(path, i))) { |
| 12361 parts.push(C.JSString_methods.substring$2(path, start, i)); |
| 12362 if (i >= path.length) |
| 12363 return H.ioore(path, i); |
| 12364 separators.push(path[i]); |
| 12365 start = i + 1; |
| 12366 } |
| 12367 ++i; |
| 12368 } |
| 12369 t3 = t2.get$length(path); |
| 12370 if (typeof t3 !== "number") |
| 12371 return H.iae(t3); |
| 12372 if (start < t3) { |
| 12373 parts.push(t2.substring$1(path, start)); |
| 12374 separators.push(""); |
| 12375 } |
| 12376 return new Q.ParsedPath(style, root, t1 != null, parts, separators); |
| 12377 }} |
| 12378 }, |
| 12379 ParsedPath_normalize_closure: { |
| 12380 "^": "Closure:2;this_0", |
| 12381 call$1: function(_) { |
| 12382 return this.this_0.style.get$separator(); |
| 12383 } |
| 12384 } |
| 12385 }], |
| 12386 ["path.path_exception", "package:path/src/path_exception.dart", , E, { |
| 12387 "^": "", |
| 12388 PathException: { |
| 12389 "^": "Object;message>", |
| 12390 toString$0: function(_) { |
| 12391 return "PathException: " + this.message; |
| 12392 }, |
| 12393 static: {PathException$: function(message) { |
| 12394 return new E.PathException(message); |
| 12395 }} |
| 12396 } |
| 12397 }], |
| 12398 ["path.style", "package:path/src/style.dart", , S, { |
| 12399 "^": "", |
| 12400 Style__getPlatformStyle: function() { |
| 12401 if (P.Uri_base().scheme !== "file") |
| 12402 return $.get$Style_url(); |
| 12403 if (!C.JSString_methods.endsWith$1(P.Uri_base()._path, "/")) |
| 12404 return $.get$Style_url(); |
| 12405 if (P.Uri_Uri(null, null, "a/b", null, null, null, null, "", "").toFilePath$
0() === "a\\b") |
| 12406 return $.get$Style_windows(); |
| 12407 return $.get$Style_posix(); |
| 12408 }, |
| 12409 Style: { |
| 12410 "^": "Object;", |
| 12411 toString$0: function(_) { |
| 12412 return this.get$name(this); |
| 12413 } |
| 12414 } |
| 12415 }], |
| 12416 ["path.style.posix", "package:path/src/style/posix.dart", , Z, { |
| 12417 "^": "", |
| 12418 PosixStyle: { |
| 12419 "^": "InternalStyle;name>,separator<,separators,separatorPattern,needsSepara
torPattern,rootPattern,relativeRootPattern", |
| 12420 containsSeparator$1: function(path) { |
| 12421 return J.contains$1$asx(path, "/"); |
| 12422 }, |
| 12423 isSeparator$1: function(codeUnit) { |
| 12424 return codeUnit === 47; |
| 12425 }, |
| 12426 needsSeparator$1: function(path) { |
| 12427 var t1 = J.getInterceptor$asx(path); |
| 12428 return t1.get$isNotEmpty(path) && t1.codeUnitAt$1(path, J.$sub$n(t1.get$le
ngth(path), 1)) !== 47; |
| 12429 }, |
| 12430 getRoot$1: function(path) { |
| 12431 var t1 = J.getInterceptor$asx(path); |
| 12432 if (t1.get$isNotEmpty(path) && t1.codeUnitAt$1(path, 0) === 47) |
| 12433 return "/"; |
| 12434 return; |
| 12435 }, |
| 12436 getRelativeRoot$1: function(path) { |
| 12437 return; |
| 12438 }, |
| 12439 pathFromUri$1: function(uri) { |
| 12440 var t1 = uri.scheme; |
| 12441 if (t1 === "" || t1 === "file") |
| 12442 return P.Uri__uriDecode(uri._path, C.Utf8Codec_false, false); |
| 12443 throw H.wrapException(P.ArgumentError$("Uri " + uri.toString$0(0) + " must
have scheme 'file:'.")); |
| 12444 }, |
| 12445 absolutePathToUri$1: function(path) { |
| 12446 var parsed, t1; |
| 12447 parsed = Q.ParsedPath_ParsedPath$parse(path, this); |
| 12448 t1 = parsed.parts; |
| 12449 if (t1.length === 0) |
| 12450 C.JSArray_methods.addAll$1(t1, ["", ""]); |
| 12451 else if (parsed.get$hasTrailingSeparator()) |
| 12452 parsed.parts.push(""); |
| 12453 return P.Uri_Uri(null, null, null, parsed.parts, null, null, null, "file",
""); |
| 12454 } |
| 12455 } |
| 12456 }], |
| 12457 ["path.style.url", "package:path/src/style/url.dart", , E, { |
| 12458 "^": "", |
| 12459 UrlStyle: { |
| 12460 "^": "InternalStyle;name>,separator<,separators,separatorPattern,needsSepara
torPattern,rootPattern,relativeRootPattern", |
| 12461 containsSeparator$1: function(path) { |
| 12462 return J.contains$1$asx(path, "/"); |
| 12463 }, |
| 12464 isSeparator$1: function(codeUnit) { |
| 12465 return codeUnit === 47; |
| 12466 }, |
| 12467 needsSeparator$1: function(path) { |
| 12468 var t1, root; |
| 12469 t1 = J.getInterceptor$asx(path); |
| 12470 if (t1.get$isEmpty(path) === true) |
| 12471 return false; |
| 12472 if (t1.codeUnitAt$1(path, J.$sub$n(t1.get$length(path), 1)) !== 47) |
| 12473 return true; |
| 12474 root = this._url$_getRoot$1(path); |
| 12475 return root != null && C.JSString_methods.endsWith$1(root, "://"); |
| 12476 }, |
| 12477 getRoot$1: function(path) { |
| 12478 var root = this._url$_getRoot$1(path); |
| 12479 return root == null ? this.getRelativeRoot$1(path) : root; |
| 12480 }, |
| 12481 getRelativeRoot$1: function(path) { |
| 12482 var t1 = J.getInterceptor$asx(path); |
| 12483 if (t1.get$isEmpty(path) === true) |
| 12484 return; |
| 12485 return t1.codeUnitAt$1(path, 0) === 47 ? "/" : null; |
| 12486 }, |
| 12487 pathFromUri$1: function(uri) { |
| 12488 return uri.toString$0(0); |
| 12489 }, |
| 12490 relativePathToUri$1: function(path) { |
| 12491 return P.Uri_parse(path); |
| 12492 }, |
| 12493 absolutePathToUri$1: function(path) { |
| 12494 return P.Uri_parse(path); |
| 12495 }, |
| 12496 _url$_getRoot$1: function(path) { |
| 12497 var t1, start, $char, start0; |
| 12498 t1 = J.getInterceptor$asx(path); |
| 12499 if (t1.get$isEmpty(path) === true) |
| 12500 return; |
| 12501 if (!N.isAlphabetic(t1.codeUnitAt$1(path, 0))) |
| 12502 return; |
| 12503 for (t1 = path.length, start = 1; start < t1; ++start) { |
| 12504 $char = C.JSString_methods.codeUnitAt$1(path, start); |
| 12505 if (N.isAlphabetic($char)) |
| 12506 continue; |
| 12507 if ($char >= 48 && $char <= 57) |
| 12508 continue; |
| 12509 if ($char === 45 || $char === 43 || $char === 46) |
| 12510 continue; |
| 12511 break; |
| 12512 } |
| 12513 start0 = start + 3; |
| 12514 if (start0 > t1) |
| 12515 return; |
| 12516 if (C.JSString_methods.substring$2(path, start, start0) !== "://") |
| 12517 return; |
| 12518 start = start0; |
| 12519 while (true) { |
| 12520 if (!(start < t1 && C.JSString_methods.codeUnitAt$1(path, start) !== 47)
) |
| 12521 break; |
| 12522 ++start; |
| 12523 } |
| 12524 return C.JSString_methods.substring$2(path, 0, start); |
| 12525 } |
| 12526 } |
| 12527 }], |
| 12528 ["path.style.windows", "package:path/src/style/windows.dart", , T, { |
| 12529 "^": "", |
| 12530 WindowsStyle: { |
| 12531 "^": "InternalStyle;name>,separator<,separators,separatorPattern,needsSepara
torPattern,rootPattern,relativeRootPattern", |
| 12532 containsSeparator$1: function(path) { |
| 12533 return J.contains$1$asx(path, "/"); |
| 12534 }, |
| 12535 isSeparator$1: function(codeUnit) { |
| 12536 return codeUnit === 47 || codeUnit === 92; |
| 12537 }, |
| 12538 needsSeparator$1: function(path) { |
| 12539 var t1 = J.getInterceptor$asx(path); |
| 12540 if (t1.get$isEmpty(path) === true) |
| 12541 return false; |
| 12542 t1 = t1.codeUnitAt$1(path, J.$sub$n(t1.get$length(path), 1)); |
| 12543 return !(t1 === 47 || t1 === 92); |
| 12544 }, |
| 12545 getRoot$1: function(path) { |
| 12546 var root = this._getRoot$1(path); |
| 12547 return root == null ? this.getRelativeRoot$1(path) : root; |
| 12548 }, |
| 12549 getRelativeRoot$1: function(path) { |
| 12550 var t1, t2; |
| 12551 t1 = J.getInterceptor$asx(path); |
| 12552 if (t1.get$isEmpty(path) === true) |
| 12553 return; |
| 12554 t1 = t1.codeUnitAt$1(path, 0); |
| 12555 if (!(t1 === 47 || t1 === 92)) |
| 12556 return; |
| 12557 t1 = path.length; |
| 12558 if (t1 > 1) { |
| 12559 t2 = C.JSString_methods.codeUnitAt$1(path, 1); |
| 12560 t2 = t2 === 47 || t2 === 92; |
| 12561 } else |
| 12562 t2 = false; |
| 12563 if (t2) |
| 12564 return; |
| 12565 if (0 >= t1) |
| 12566 return H.ioore(path, 0); |
| 12567 return path[0]; |
| 12568 }, |
| 12569 pathFromUri$1: function(uri) { |
| 12570 var t1, path; |
| 12571 t1 = uri.scheme; |
| 12572 if (t1 !== "" && t1 !== "file") |
| 12573 throw H.wrapException(P.ArgumentError$("Uri " + uri.toString$0(0) + " mu
st have scheme 'file:'.")); |
| 12574 path = uri._path; |
| 12575 if (uri.get$host(uri) === "") { |
| 12576 if (C.JSString_methods.startsWith$1(path, "/")) |
| 12577 path = C.JSString_methods.replaceFirst$2(path, "/", ""); |
| 12578 } else |
| 12579 path = "\\\\" + H.S(uri.get$host(uri)) + path; |
| 12580 H.checkString("\\"); |
| 12581 return P.Uri__uriDecode(H.stringReplaceAllUnchecked(path, "/", "\\"), C.Ut
f8Codec_false, false); |
| 12582 }, |
| 12583 absolutePathToUri$1: function(path) { |
| 12584 var parsed, t1, rootParts, t2; |
| 12585 parsed = Q.ParsedPath_ParsedPath$parse(path, this); |
| 12586 if (J.startsWith$1$s(parsed.root, "\\\\")) { |
| 12587 t1 = parsed.root.split("\\"); |
| 12588 rootParts = H.setRuntimeTypeInfo(new H.WhereIterable(t1, new T.WindowsSt
yle_absolutePathToUri_closure()), [H.getTypeArgumentByIndex(t1, 0)]); |
| 12589 C.JSArray_methods.insert$2(parsed.parts, 0, rootParts.get$last(rootParts
)); |
| 12590 if (parsed.get$hasTrailingSeparator()) |
| 12591 parsed.parts.push(""); |
| 12592 return P.Uri_Uri(null, rootParts.get$first(rootParts), null, parsed.part
s, null, null, null, "file", ""); |
| 12593 } else { |
| 12594 if (parsed.parts.length === 0 || parsed.get$hasTrailingSeparator()) |
| 12595 parsed.parts.push(""); |
| 12596 t1 = parsed.parts; |
| 12597 t2 = parsed.root; |
| 12598 t2.toString; |
| 12599 H.checkString(""); |
| 12600 t2 = H.stringReplaceAllUnchecked(t2, "/", ""); |
| 12601 H.checkString(""); |
| 12602 C.JSArray_methods.insert$2(t1, 0, H.stringReplaceAllUnchecked(t2, "\\",
"")); |
| 12603 return P.Uri_Uri(null, null, null, parsed.parts, null, null, null, "file
", ""); |
| 12604 } |
| 12605 }, |
| 12606 _getRoot$1: function(path) { |
| 12607 var t1, start; |
| 12608 t1 = J.getInterceptor$asx(path); |
| 12609 if (J.$lt$n(t1.get$length(path), 3)) |
| 12610 return; |
| 12611 if (N.isAlphabetic(t1.codeUnitAt$1(path, 0))) { |
| 12612 if (C.JSString_methods.codeUnitAt$1(path, 1) !== 58) |
| 12613 return; |
| 12614 t1 = C.JSString_methods.codeUnitAt$1(path, 2); |
| 12615 if (!(t1 === 47 || t1 === 92)) |
| 12616 return; |
| 12617 return C.JSString_methods.substring$2(path, 0, 3); |
| 12618 } |
| 12619 if (!C.JSString_methods.startsWith$1(path, "\\\\")) |
| 12620 return; |
| 12621 t1 = path.length; |
| 12622 start = 2; |
| 12623 while (true) { |
| 12624 if (!(start < t1 && C.JSString_methods.codeUnitAt$1(path, start) !== 92)
) |
| 12625 break; |
| 12626 ++start; |
| 12627 } |
| 12628 if (start === 2 || start === t1) |
| 12629 return; |
| 12630 ++start; |
| 12631 if (C.JSString_methods.codeUnitAt$1(path, start) === 92) |
| 12632 return; |
| 12633 ++start; |
| 12634 while (true) { |
| 12635 if (!(start < t1 && C.JSString_methods.codeUnitAt$1(path, start) !== 92)
) |
| 12636 break; |
| 12637 ++start; |
| 12638 } |
| 12639 return C.JSString_methods.substring$2(path, 0, start); |
| 12640 } |
| 12641 }, |
| 12642 WindowsStyle_absolutePathToUri_closure: { |
| 12643 "^": "Closure:2;", |
| 12644 call$1: function(part) { |
| 12645 return !J.$eq(part, ""); |
| 12646 } |
| 12647 } |
| 12648 }], |
| 12649 ["path.utils", "package:path/src/utils.dart", , N, { |
| 12650 "^": "", |
| 12651 isAlphabetic: function($char) { |
| 12652 var t1; |
| 12653 if (!($char >= 65 && $char <= 90)) |
| 12654 t1 = $char >= 97 && $char <= 122; |
| 12655 else |
| 12656 t1 = true; |
| 12657 return t1; |
| 12658 } |
| 12659 }], |
| 12660 ["stack_trace.src.utils", "package:stack_trace/src/utils.dart", , N, { |
| 12661 "^": "", |
| 12662 padRight: function(string, $length) { |
| 12663 var t1, t2, i; |
| 12664 t1 = J.get$length$asx(string); |
| 12665 if (typeof $length !== "number") |
| 12666 return H.iae($length); |
| 12667 if (t1 >= $length) |
| 12668 return string; |
| 12669 for (t1 = $length - string.length, t2 = string, i = 0; i < t1; ++i) |
| 12670 t2 += " "; |
| 12671 return t2.charCodeAt(0) == 0 ? t2 : t2; |
| 12672 } |
| 12673 }], |
| 12674 ["trace", "package:stack_trace/src/trace.dart", , R, { |
| 12675 "^": "", |
| 12676 Trace: { |
| 12677 "^": "Object;frames", |
| 12678 get$terse: function() { |
| 12679 return this.foldFrames$2$terse(new R.Trace_terse_closure(), true); |
| 12680 }, |
| 12681 foldFrames$2$terse: function(predicate, terse) { |
| 12682 var newFrames, t1, frame; |
| 12683 if (terse) |
| 12684 predicate = new R.Trace_foldFrames_closure(predicate); |
| 12685 newFrames = []; |
| 12686 for (t1 = this.frames, t1 = t1.get$reversed(t1), t1 = new H.ListIterator(t
1, t1.get$length(t1), 0, null); t1.moveNext$0();) { |
| 12687 frame = t1._current; |
| 12688 if (predicate.call$1(frame) !== true) |
| 12689 newFrames.push(frame); |
| 12690 else if (newFrames.length === 0 || predicate.call$1(C.JSArray_methods.ge
t$last(newFrames)) !== true) |
| 12691 newFrames.push(new S.Frame(frame.get$uri(), frame.line, frame.column,
frame.member)); |
| 12692 } |
| 12693 if (terse) |
| 12694 newFrames = H.setRuntimeTypeInfo(new H.MappedListIterable(newFrames, new
R.Trace_foldFrames_closure0()), [null, null]).toList$0(0); |
| 12695 return new R.Trace(H.setRuntimeTypeInfo(new P.UnmodifiableListView(H.setRu
ntimeTypeInfo(new H.ReversedListIterable(newFrames), [H.getTypeArgumentByIndex(n
ewFrames, 0)]).toList$0(0)), [S.Frame])); |
| 12696 }, |
| 12697 toString$0: function(_) { |
| 12698 var t1 = this.frames; |
| 12699 return t1.map$1(t1, new R.Trace_toString_closure(t1.map$1(t1, new R.Trace_
toString_closure0()).fold$2(0, 0, P.max$closure()))).join$0(0); |
| 12700 }, |
| 12701 static: {Trace_Trace$from: function(trace) { |
| 12702 if (trace == null) |
| 12703 throw H.wrapException(P.ArgumentError$("Cannot create a Trace from nul
l.")); |
| 12704 if (!!J.getInterceptor(trace).$isTrace) |
| 12705 return trace; |
| 12706 return new S.LazyTrace(new R.Trace_Trace$from_closure(trace), null); |
| 12707 }, Trace_Trace$parse: function(trace) { |
| 12708 var error, t1, exception; |
| 12709 try { |
| 12710 if (J.get$isEmpty$asx(trace) === true) { |
| 12711 t1 = H.setRuntimeTypeInfo(new P.UnmodifiableListView(C.JSArray_metho
ds.toList$0(H.setRuntimeTypeInfo([], [S.Frame]))), [S.Frame]); |
| 12712 return new R.Trace(t1); |
| 12713 } |
| 12714 if (J.contains$1$asx(trace, $.get$_v8Trace()) === true) { |
| 12715 t1 = R.Trace$parseV8(trace); |
| 12716 return t1; |
| 12717 } |
| 12718 if (J.contains$1$asx(trace, $.get$_firefoxSafariTrace()) === true) { |
| 12719 t1 = R.Trace$parseFirefox(trace); |
| 12720 return t1; |
| 12721 } |
| 12722 if (J.contains$1$asx(trace, $.get$_friendlyTrace()) === true) { |
| 12723 t1 = R.Trace$parseFriendly(trace); |
| 12724 return t1; |
| 12725 } |
| 12726 t1 = R.Trace$parseVM(trace); |
| 12727 return t1; |
| 12728 } catch (exception) { |
| 12729 t1 = H.unwrapException(exception); |
| 12730 if (t1 instanceof P.FormatException) { |
| 12731 error = t1; |
| 12732 throw H.wrapException(P.FormatException$(H.S(J.get$message$x(error))
+ "\nStack trace:\n" + H.S(trace), null, null)); |
| 12733 } else |
| 12734 throw exception; |
| 12735 } |
| 12736 }, Trace$parseVM: function(trace) { |
| 12737 var t1 = J.trim$0$s(trace).split("\n"); |
| 12738 t1 = H.setRuntimeTypeInfo(new H.WhereIterable(t1, new R.Trace$parseVM_cl
osure()), [H.getTypeArgumentByIndex(t1, 0)]); |
| 12739 return new R.Trace(H.setRuntimeTypeInfo(new P.UnmodifiableListView(H.Map
pedIterable_MappedIterable(t1, new R.Trace$parseVM_closure0(), H.getRuntimeTypeA
rgument(t1, "IterableBase", 0), null).toList$0(0)), [S.Frame])); |
| 12740 }, Trace$parseV8: function(trace) { |
| 12741 var t1 = J.split$1$s(trace, "\n"); |
| 12742 t1 = H.SubListIterable$(t1, 1, null, H.getTypeArgumentByIndex(t1, 0)); |
| 12743 t1 = t1.super$IterableBase$skipWhile$1(t1, new R.Trace$parseV8_closure()
); |
| 12744 return new R.Trace(H.setRuntimeTypeInfo(new P.UnmodifiableListView(H.Map
pedIterable_MappedIterable(t1, new R.Trace$parseV8_closure0(), H.getRuntimeTypeA
rgument(t1, "IterableBase", 0), null).toList$0(0)), [S.Frame])); |
| 12745 }, Trace$parseFirefox: function(trace) { |
| 12746 var t1 = J.trim$0$s(trace).split("\n"); |
| 12747 t1 = H.setRuntimeTypeInfo(new H.WhereIterable(t1, new R.Trace$parseFiref
ox_closure()), [H.getTypeArgumentByIndex(t1, 0)]); |
| 12748 return new R.Trace(H.setRuntimeTypeInfo(new P.UnmodifiableListView(H.Map
pedIterable_MappedIterable(t1, new R.Trace$parseFirefox_closure0(), H.getRuntime
TypeArgument(t1, "IterableBase", 0), null).toList$0(0)), [S.Frame])); |
| 12749 }, Trace$parseFriendly: function(trace) { |
| 12750 var t1 = J.trim$0$s(trace).split("\n"); |
| 12751 t1 = H.setRuntimeTypeInfo(new H.WhereIterable(t1, new R.Trace$parseFrien
dly_closure()), [H.getTypeArgumentByIndex(t1, 0)]); |
| 12752 return new R.Trace(H.setRuntimeTypeInfo(new P.UnmodifiableListView(H.Map
pedIterable_MappedIterable(t1, new R.Trace$parseFriendly_closure0(), H.getRuntim
eTypeArgument(t1, "IterableBase", 0), null).toList$0(0)), [S.Frame])); |
| 12753 }} |
| 12754 }, |
| 12755 Trace_Trace$from_closure: { |
| 12756 "^": "Closure:0;trace_0", |
| 12757 call$0: function() { |
| 12758 return R.Trace_Trace$parse(J.toString$0(this.trace_0)); |
| 12759 } |
| 12760 }, |
| 12761 Trace$parseVM_closure: { |
| 12762 "^": "Closure:2;", |
| 12763 call$1: function(line) { |
| 12764 return J.get$isNotEmpty$asx(line); |
| 12765 } |
| 12766 }, |
| 12767 Trace$parseVM_closure0: { |
| 12768 "^": "Closure:2;", |
| 12769 call$1: function(line) { |
| 12770 return S.Frame_Frame$parseVM(line); |
| 12771 } |
| 12772 }, |
| 12773 Trace$parseV8_closure: { |
| 12774 "^": "Closure:2;", |
| 12775 call$1: function(line) { |
| 12776 return !J.startsWith$1$s(line, $.get$_v8TraceLine()); |
| 12777 } |
| 12778 }, |
| 12779 Trace$parseV8_closure0: { |
| 12780 "^": "Closure:2;", |
| 12781 call$1: function(line) { |
| 12782 return S.Frame_Frame$parseV8(line); |
| 12783 } |
| 12784 }, |
| 12785 Trace$parseFirefox_closure: { |
| 12786 "^": "Closure:2;", |
| 12787 call$1: function(line) { |
| 12788 var t1 = J.getInterceptor$asx(line); |
| 12789 return t1.get$isNotEmpty(line) && !t1.$eq(line, "[native code]"); |
| 12790 } |
| 12791 }, |
| 12792 Trace$parseFirefox_closure0: { |
| 12793 "^": "Closure:2;", |
| 12794 call$1: function(line) { |
| 12795 var match, t1, uri, t2, t3, member, column; |
| 12796 match = $.get$_firefoxSafariFrame().firstMatch$1(line); |
| 12797 if (match == null) |
| 12798 H.throwExpression(P.FormatException$("Couldn't parse Firefox/Safari stac
k trace line '" + H.S(line) + "'.", null, null)); |
| 12799 t1 = match._match; |
| 12800 if (3 >= t1.length) |
| 12801 return H.ioore(t1, 3); |
| 12802 uri = S.Frame__uriOrPathToUri(t1[3]); |
| 12803 t2 = t1.length; |
| 12804 if (1 >= t2) |
| 12805 return H.ioore(t1, 1); |
| 12806 t3 = t1[1]; |
| 12807 if (t3 != null) { |
| 12808 if (2 >= t2) |
| 12809 return H.ioore(t1, 2); |
| 12810 member = J.$add$ns(t3, C.JSArray_methods.join$0(P.List_List$filled(C.JSS
tring_methods.allMatches$1("/", t1[2]).length, ".<fn>", null))); |
| 12811 if (J.$eq(member, "")) |
| 12812 member = "<fn>"; |
| 12813 member = J.replaceFirst$2$s(member, $.get$_initialDot(), ""); |
| 12814 } else |
| 12815 member = "<fn>"; |
| 12816 if (4 >= t1.length) |
| 12817 return H.ioore(t1, 4); |
| 12818 if (J.$eq(t1[4], "")) |
| 12819 line = null; |
| 12820 else { |
| 12821 if (4 >= t1.length) |
| 12822 return H.ioore(t1, 4); |
| 12823 line = H.Primitives_parseInt(t1[4], null, null); |
| 12824 } |
| 12825 if (5 >= t1.length) |
| 12826 return H.ioore(t1, 5); |
| 12827 t2 = t1[5]; |
| 12828 if (t2 == null || J.$eq(t2, "")) |
| 12829 column = null; |
| 12830 else { |
| 12831 if (5 >= t1.length) |
| 12832 return H.ioore(t1, 5); |
| 12833 column = H.Primitives_parseInt(t1[5], null, null); |
| 12834 } |
| 12835 return new S.Frame(uri, line, column, member); |
| 12836 } |
| 12837 }, |
| 12838 Trace$parseFriendly_closure: { |
| 12839 "^": "Closure:2;", |
| 12840 call$1: function(line) { |
| 12841 return !J.startsWith$1$s(line, "====="); |
| 12842 } |
| 12843 }, |
| 12844 Trace$parseFriendly_closure0: { |
| 12845 "^": "Closure:2;", |
| 12846 call$1: function(line) { |
| 12847 var match, t1, uri, t2, t3, t4, column; |
| 12848 match = $.get$_friendlyFrame().firstMatch$1(line); |
| 12849 if (match == null) |
| 12850 H.throwExpression(P.FormatException$("Couldn't parse package:stack_trace
stack trace line '" + H.S(line) + "'.", null, null)); |
| 12851 t1 = match._match; |
| 12852 if (1 >= t1.length) |
| 12853 return H.ioore(t1, 1); |
| 12854 uri = P.Uri_parse(t1[1]); |
| 12855 if (uri.scheme === "") { |
| 12856 t2 = $.get$context(); |
| 12857 t3 = t2.fromUri$1(uri); |
| 12858 t4 = t2._context0$_current; |
| 12859 uri = t2.toUri$1(t2.join$8(0, t4 != null ? t4 : B.current(), t3, null, n
ull, null, null, null, null)); |
| 12860 } |
| 12861 if (2 >= t1.length) |
| 12862 return H.ioore(t1, 2); |
| 12863 t2 = t1[2]; |
| 12864 line = t2 == null ? null : H.Primitives_parseInt(t2, null, null); |
| 12865 if (3 >= t1.length) |
| 12866 return H.ioore(t1, 3); |
| 12867 t2 = t1[3]; |
| 12868 column = t2 == null ? null : H.Primitives_parseInt(t2, null, null); |
| 12869 if (4 >= t1.length) |
| 12870 return H.ioore(t1, 4); |
| 12871 return new S.Frame(uri, line, column, t1[4]); |
| 12872 } |
| 12873 }, |
| 12874 Trace_terse_closure: { |
| 12875 "^": "Closure:2;", |
| 12876 call$1: function(_) { |
| 12877 return false; |
| 12878 } |
| 12879 }, |
| 12880 Trace_foldFrames_closure: { |
| 12881 "^": "Closure:2;oldPredicate_0", |
| 12882 call$1: function(frame) { |
| 12883 if (this.oldPredicate_0.call$1(frame) === true) |
| 12884 return true; |
| 12885 if (frame.get$isCore()) |
| 12886 return true; |
| 12887 if (J.$eq(frame.get$$package(), "stack_trace")) |
| 12888 return true; |
| 12889 if (J.contains$1$asx(frame.member, "<async>") !== true) |
| 12890 return false; |
| 12891 return frame.line == null; |
| 12892 } |
| 12893 }, |
| 12894 Trace_foldFrames_closure0: { |
| 12895 "^": "Closure:2;", |
| 12896 call$1: function(frame) { |
| 12897 var t1, t2; |
| 12898 if (!frame.get$isCore()) |
| 12899 return frame; |
| 12900 t1 = frame.uri; |
| 12901 t1 = $.get$context().prettyUri$1(t1); |
| 12902 t2 = $.get$_terseRegExp(); |
| 12903 H.checkString(""); |
| 12904 return new S.Frame(P.Uri_parse(H.stringReplaceAllUnchecked(t1, t2, "")), n
ull, null, frame.member); |
| 12905 } |
| 12906 }, |
| 12907 Trace_toString_closure0: { |
| 12908 "^": "Closure:2;", |
| 12909 call$1: function(frame) { |
| 12910 return J.get$length$asx(J.get$location$x(frame)); |
| 12911 } |
| 12912 }, |
| 12913 Trace_toString_closure: { |
| 12914 "^": "Closure:2;longest_0", |
| 12915 call$1: function(frame) { |
| 12916 return H.S(N.padRight(J.get$location$x(frame), this.longest_0)) + " " + H
.S(frame.get$member()) + "\n"; |
| 12917 } |
| 12918 } |
| 12919 }], |
| 12920 ["unittest.multi_channel", "package:unittest/src/util/multi_channel.dart", , K,
{ |
| 12921 "^": "", |
| 12922 _MultiChannel: { |
| 12923 "^": "Object;_innerStream,_innerSink,_innerStreamSubscription,_streamControl
ler,_sinkController,_streamControllers,_sinkControllers,_nextId", |
| 12924 virtualChannel$1: function(id) { |
| 12925 var t1, t2, inputId, t3, streamController, sinkController; |
| 12926 t1 = {}; |
| 12927 if (this._innerStream == null) |
| 12928 throw H.wrapException(P.StateError$("The underlying channel is closed.")
); |
| 12929 t1.inputId_0 = null; |
| 12930 t1.outputId_1 = null; |
| 12931 if (id != null) { |
| 12932 t1.inputId_0 = id; |
| 12933 t1.outputId_1 = H.intTypeCast(id) + 1; |
| 12934 t2 = id; |
| 12935 } else { |
| 12936 t2 = this._nextId; |
| 12937 inputId = t2 + 1; |
| 12938 t1.inputId_0 = inputId; |
| 12939 t1.outputId_1 = t2; |
| 12940 this._nextId = t2 + 2; |
| 12941 t2 = inputId; |
| 12942 } |
| 12943 t3 = this._streamControllers; |
| 12944 if (t3.containsKey$1(t2)) |
| 12945 throw H.wrapException(P.ArgumentError$("A virtual channel with id " + H.
S(id) + " already exists.")); |
| 12946 streamController = P.StreamController_StreamController(null, null, null, n
ull, true, null); |
| 12947 sinkController = P.StreamController_StreamController(null, null, null, nul
l, true, null); |
| 12948 t3.$indexSet(0, t1.inputId_0, streamController); |
| 12949 this._sinkControllers.$indexSet(0, t1.inputId_0, sinkController); |
| 12950 H.setRuntimeTypeInfo(new P._ControllerStream(sinkController), [null]).list
en$2$onDone(new K._MultiChannel_virtualChannel_closure(t1, this), new K._MultiCh
annel_virtualChannel_closure0(t1, this)); |
| 12951 return new K.VirtualChannel(this, t1.outputId_1, H.setRuntimeTypeInfo(new
P._ControllerStream(streamController), [null]), H.setRuntimeTypeInfo(new P._Stre
amSinkWrapper(sinkController), [H.getRuntimeTypeArgument(sinkController, "_Strea
mController", 0)])); |
| 12952 }, |
| 12953 _closeChannel$2: function(inputId, outputId) { |
| 12954 var t1, t2; |
| 12955 t1 = this._streamControllers; |
| 12956 J.close$0$x(t1.remove$1(0, inputId)); |
| 12957 J.close$0$x(this._sinkControllers.remove$1(0, inputId)); |
| 12958 t2 = this._innerSink; |
| 12959 if (t2 == null) |
| 12960 return; |
| 12961 t2 = t2._async$_target; |
| 12962 if (t2._state >= 4) |
| 12963 H.throwExpression(t2._badEventState$0()); |
| 12964 t2._async$_add$1([outputId]); |
| 12965 if (t1.__js_helper$_length === 0) |
| 12966 this._closeInnerChannel$0(); |
| 12967 }, |
| 12968 _closeInnerChannel$0: [function() { |
| 12969 this._innerSink._async$_target.close$0(0); |
| 12970 this._innerStreamSubscription.cancel$0(); |
| 12971 this._innerStream = null; |
| 12972 this._innerSink = null; |
| 12973 for (var t1 = this._sinkControllers, t1 = t1.get$values(t1), t1 = P.List_L
ist$from(t1, true, H.getRuntimeTypeArgument(t1, "IterableBase", 0)), t1 = new H.
ListIterator(t1, t1.length, 0, null); t1.moveNext$0();) |
| 12974 J.close$0$x(t1._current); |
| 12975 }, "call$0", "get$_closeInnerChannel", 0, 0, 1], |
| 12976 _MultiChannel$2: function(_innerStream, _innerSink) { |
| 12977 var t1, t2; |
| 12978 t1 = this._streamController; |
| 12979 this._streamControllers.$indexSet(0, 0, t1); |
| 12980 t2 = this._sinkController; |
| 12981 this._sinkControllers.$indexSet(0, 0, t2); |
| 12982 H.setRuntimeTypeInfo(new P._ControllerStream(t2), [null]).listen$2$onDone(
new K._MultiChannel_closure(this), new K._MultiChannel_closure0(this)); |
| 12983 this._innerStreamSubscription = this._innerStream.listen$3$onDone$onError(
new K._MultiChannel_closure1(this), this.get$_closeInnerChannel(), t1.get$addErr
or()); |
| 12984 }, |
| 12985 static: {_MultiChannel$: function(_innerStream, _innerSink) { |
| 12986 var t1 = new K._MultiChannel(_innerStream, _innerSink, null, P.StreamCon
troller_StreamController(null, null, null, null, true, null), P.StreamController
_StreamController(null, null, null, null, true, null), P.LinkedHashMap_LinkedHas
hMap(null, null, null, P.$int, P.StreamController), P.LinkedHashMap_LinkedHashMa
p(null, null, null, P.$int, P.StreamController), 1); |
| 12987 t1._MultiChannel$2(_innerStream, _innerSink); |
| 12988 return t1; |
| 12989 }} |
| 12990 }, |
| 12991 _MultiChannel_closure: { |
| 12992 "^": "Closure:2;this_0", |
| 12993 call$1: function(message) { |
| 12994 var t1 = this.this_0._innerSink._async$_target; |
| 12995 if (t1._state >= 4) |
| 12996 H.throwExpression(t1._badEventState$0()); |
| 12997 t1._async$_add$1([0, message]); |
| 12998 return; |
| 12999 } |
| 13000 }, |
| 13001 _MultiChannel_closure0: { |
| 13002 "^": "Closure:0;this_1", |
| 13003 call$0: function() { |
| 13004 return this.this_1._closeChannel$2(0, 0); |
| 13005 } |
| 13006 }, |
| 13007 _MultiChannel_closure1: { |
| 13008 "^": "Closure:2;this_2", |
| 13009 call$1: function(message) { |
| 13010 var t1, id, t2, sink; |
| 13011 t1 = J.getInterceptor$asx(message); |
| 13012 id = t1.$index(message, 0); |
| 13013 t2 = this.this_2; |
| 13014 sink = t2._streamControllers.$index(0, id); |
| 13015 if (sink == null) |
| 13016 return; |
| 13017 if (J.$gt$n(t1.get$length(message), 1)) { |
| 13018 J.add$1$ax(sink, t1.$index(message, 1)); |
| 13019 return; |
| 13020 } |
| 13021 J.close$0$x(t2._sinkControllers.$index(0, id)); |
| 13022 } |
| 13023 }, |
| 13024 _MultiChannel_virtualChannel_closure: { |
| 13025 "^": "Closure:2;box_0,this_1", |
| 13026 call$1: function(message) { |
| 13027 var t1, t2; |
| 13028 t1 = this.this_1._innerSink; |
| 13029 t2 = this.box_0.outputId_1; |
| 13030 t1 = t1._async$_target; |
| 13031 if (t1._state >= 4) |
| 13032 H.throwExpression(t1._badEventState$0()); |
| 13033 t1._async$_add$1([t2, message]); |
| 13034 return; |
| 13035 } |
| 13036 }, |
| 13037 _MultiChannel_virtualChannel_closure0: { |
| 13038 "^": "Closure:0;box_0,this_2", |
| 13039 call$0: function() { |
| 13040 var t1 = this.box_0; |
| 13041 return this.this_2._closeChannel$2(t1.inputId_0, t1.outputId_1); |
| 13042 } |
| 13043 }, |
| 13044 VirtualChannel: { |
| 13045 "^": "Object;_parent,id,stream,sink" |
| 13046 } |
| 13047 }], |
| 13048 ["unittest.runner.browser.host", "host.dart", , O, { |
| 13049 "^": "", |
| 13050 main: [function() { |
| 13051 P.runZoned(new O.main_closure(), new O.main_closure0(), null, null); |
| 13052 }, "call$0", "main$closure", 0, 0, 1], |
| 13053 _connectToServer: function() { |
| 13054 var currentUrl, t1, scheme, isFile, userInfo, port, host, path, t2, query, f
ragment, webSocket, inputController, outputController; |
| 13055 currentUrl = P.Uri_parse(window.location.href); |
| 13056 t1 = currentUrl._queryParameters; |
| 13057 if (t1 == null) { |
| 13058 t1 = currentUrl._query; |
| 13059 t1 = H.setRuntimeTypeInfo(new P.UnmodifiableMapView(P.Uri_splitQueryString
(t1 == null ? "" : t1, C.Utf8Codec_false)), [null, null]); |
| 13060 currentUrl._queryParameters = t1; |
| 13061 } |
| 13062 t1 = currentUrl.resolveUri$1(P.Uri_parse(J.$index$asx(t1._collection$_map, "
managerUrl"))); |
| 13063 scheme = P.Uri__makeScheme("ws", 2); |
| 13064 isFile = scheme === "file"; |
| 13065 userInfo = t1._userInfo; |
| 13066 port = P.Uri__makePort(t1._port, scheme); |
| 13067 if (t1._host != null) |
| 13068 host = t1.get$host(t1); |
| 13069 else |
| 13070 host = userInfo.length !== 0 || port != null || isFile ? "" : null; |
| 13071 path = t1._path; |
| 13072 if (!isFile) |
| 13073 t2 = host != null && path.length !== 0; |
| 13074 else |
| 13075 t2 = true; |
| 13076 if (t2 && !C.JSString_methods.startsWith$1(path, "/")) |
| 13077 path = "/" + path; |
| 13078 query = t1._query; |
| 13079 if (query != null) |
| 13080 ; |
| 13081 else |
| 13082 query = null; |
| 13083 fragment = t1._fragment; |
| 13084 if (fragment != null) |
| 13085 ; |
| 13086 else |
| 13087 fragment = null; |
| 13088 webSocket = W.WebSocket_WebSocket(new P.Uri(host, port, path, scheme, userIn
fo, query, fragment, null, null).toString$0(0), null); |
| 13089 inputController = P.StreamController_StreamController(null, null, null, null
, true, null); |
| 13090 t1 = H.setRuntimeTypeInfo(new W._EventStream(webSocket, "message", false), [
null]); |
| 13091 H.setRuntimeTypeInfo(new W._EventStreamSubscription(0, t1._html$_target, t1.
_eventType, W._wrapZone(new O._connectToServer_closure(inputController)), t1._us
eCapture), [H.getTypeArgumentByIndex(t1, 0)])._tryResume$0(); |
| 13092 outputController = P.StreamController_StreamController(null, null, null, nul
l, true, null); |
| 13093 H.setRuntimeTypeInfo(new P._ControllerStream(outputController), [null]).list
en$1(new O._connectToServer_closure0(webSocket)); |
| 13094 return K._MultiChannel$(H.setRuntimeTypeInfo(new P._ControllerStream(inputCo
ntroller), [null]), H.setRuntimeTypeInfo(new P._StreamSinkWrapper(outputControll
er), [H.getRuntimeTypeArgument(outputController, "_StreamController", 0)])); |
| 13095 }, |
| 13096 _connectToIframe: function(url) { |
| 13097 var iframe, t1, inputController, outputController; |
| 13098 iframe = document.createElement("iframe", null); |
| 13099 t1 = J.getInterceptor$x(iframe); |
| 13100 t1.set$src(iframe, url); |
| 13101 document.body.appendChild(iframe); |
| 13102 inputController = P.StreamController_StreamController(null, null, null, null
, true, null); |
| 13103 outputController = P.StreamController_StreamController(null, null, null, nul
l, true, null); |
| 13104 t1 = t1.get$onLoad(iframe); |
| 13105 t1.get$first(t1).then$1(new O._connectToIframe_closure(iframe, inputControll
er, outputController)); |
| 13106 return new X.StreamChannel(H.setRuntimeTypeInfo(new P._ControllerStream(inpu
tController), [null]), H.setRuntimeTypeInfo(new P._StreamSinkWrapper(outputContr
oller), [H.getRuntimeTypeArgument(outputController, "_StreamController", 0)])); |
| 13107 }, |
| 13108 main_closure: { |
| 13109 "^": "Closure:0;", |
| 13110 call$0: function() { |
| 13111 var serverChannel = O._connectToServer(); |
| 13112 H.setRuntimeTypeInfo(new P._ControllerStream(serverChannel._streamControll
er), [null]).listen$1(new O.main__closure(serverChannel)); |
| 13113 } |
| 13114 }, |
| 13115 main__closure: { |
| 13116 "^": "Closure:2;serverChannel_0", |
| 13117 call$1: function(message) { |
| 13118 var t1, suiteChannel, iframeChannel; |
| 13119 t1 = J.getInterceptor$asx(message); |
| 13120 suiteChannel = this.serverChannel_0.virtualChannel$1(t1.$index(message, "c
hannel")); |
| 13121 iframeChannel = O._connectToIframe(t1.$index(message, "url")); |
| 13122 iframeChannel.stream.pipe$1(suiteChannel.sink); |
| 13123 suiteChannel.stream.pipe$1(iframeChannel.sink); |
| 13124 } |
| 13125 }, |
| 13126 main_closure0: { |
| 13127 "^": "Closure:15;", |
| 13128 call$2: function(error, stackTrace) { |
| 13129 P.print(H.S(error) + "\n" + H.S(R.Trace_Trace$from(stackTrace).get$terse()
)); |
| 13130 } |
| 13131 }, |
| 13132 _connectToServer_closure: { |
| 13133 "^": "Closure:2;inputController_0", |
| 13134 call$1: function(message) { |
| 13135 var t1, t2; |
| 13136 t1 = this.inputController_0; |
| 13137 t2 = C.JsonCodec_null_null.decode$1(J.get$data$x(message)); |
| 13138 if (t1._state >= 4) |
| 13139 H.throwExpression(t1._badEventState$0()); |
| 13140 t1._async$_add$1(t2); |
| 13141 return; |
| 13142 } |
| 13143 }, |
| 13144 _connectToServer_closure0: { |
| 13145 "^": "Closure:2;webSocket_1", |
| 13146 call$1: function(message) { |
| 13147 return this.webSocket_1.send(C.JsonCodec_null_null.encode$1(message)); |
| 13148 } |
| 13149 }, |
| 13150 _connectToIframe_closure: { |
| 13151 "^": "Closure:2;iframe_0,inputController_1,outputController_2", |
| 13152 call$1: function(_) { |
| 13153 var t1, t2; |
| 13154 t1 = this.iframe_0; |
| 13155 J.postMessage$2$x(J.get$contentWindow$x(t1), P.LinkedHashMap_LinkedHashMap
$_literal(["command", "connect"], null, null), J.get$origin$x(window.location)); |
| 13156 t2 = H.setRuntimeTypeInfo(new W._EventStream(window, "message", false), [n
ull]); |
| 13157 H.setRuntimeTypeInfo(new W._EventStreamSubscription(0, t2._html$_target, t
2._eventType, W._wrapZone(new O._connectToIframe__closure(t1, this.inputControll
er_1)), t2._useCapture), [H.getTypeArgumentByIndex(t2, 0)])._tryResume$0(); |
| 13158 H.setRuntimeTypeInfo(new P._ControllerStream(this.outputController_2), [nu
ll]).listen$1(new O._connectToIframe__closure0(t1)); |
| 13159 } |
| 13160 }, |
| 13161 _connectToIframe__closure: { |
| 13162 "^": "Closure:2;iframe_3,inputController_4", |
| 13163 call$1: function(message) { |
| 13164 var t1, t2; |
| 13165 t1 = J.getInterceptor$x(message); |
| 13166 if (t1.get$origin(message) !== J.get$origin$x(window.location)) |
| 13167 return; |
| 13168 if (!J.$eq(J.$index$asx(t1.get$data(message), "href"), this.iframe_3.src)) |
| 13169 return; |
| 13170 message.stopPropagation(); |
| 13171 t1 = this.inputController_4; |
| 13172 t2 = J.$index$asx(P.convertNativeToDart_AcceptStructuredClone(message.data
, true), "data"); |
| 13173 if (t1._state >= 4) |
| 13174 H.throwExpression(t1._badEventState$0()); |
| 13175 t1._async$_add$1(t2); |
| 13176 } |
| 13177 }, |
| 13178 _connectToIframe__closure0: { |
| 13179 "^": "Closure:2;iframe_5", |
| 13180 call$1: function(message) { |
| 13181 return J.postMessage$2$x(W._convertNativeToDart_Window(this.iframe_5.conte
ntWindow), message, J.get$origin$x(window.location)); |
| 13182 } |
| 13183 } |
| 13184 }, |
| 13185 1], |
| 13186 ["unittest.stream_channel", "package:unittest/src/util/stream_channel.dart", , X
, { |
| 13187 "^": "", |
| 13188 StreamChannel: { |
| 13189 "^": "Object;stream,sink" |
| 13190 } |
| 13191 }], |
| 13192 ]; |
| 13193 parseReflectionData(dart); |
| 13194 // getInterceptor methods |
| 13195 J.getInterceptor = function(receiver) { |
| 13196 if (typeof receiver == "number") { |
| 13197 if (Math.floor(receiver) == receiver) |
| 13198 return J.JSInt.prototype; |
| 13199 return J.JSDouble.prototype; |
| 13200 } |
| 13201 if (typeof receiver == "string") |
| 13202 return J.JSString.prototype; |
| 13203 if (receiver == null) |
| 13204 return J.JSNull.prototype; |
| 13205 if (typeof receiver == "boolean") |
| 13206 return J.JSBool.prototype; |
| 13207 if (receiver.constructor == Array) |
| 13208 return J.JSArray.prototype; |
| 13209 if (typeof receiver != "object") |
| 13210 return receiver; |
| 13211 if (receiver instanceof P.Object) |
| 13212 return receiver; |
| 13213 return J.getNativeInterceptor(receiver); |
| 13214 }; |
| 13215 J.getInterceptor$asx = function(receiver) { |
| 13216 if (typeof receiver == "string") |
| 13217 return J.JSString.prototype; |
| 13218 if (receiver == null) |
| 13219 return receiver; |
| 13220 if (receiver.constructor == Array) |
| 13221 return J.JSArray.prototype; |
| 13222 if (typeof receiver != "object") |
| 13223 return receiver; |
| 13224 if (receiver instanceof P.Object) |
| 13225 return receiver; |
| 13226 return J.getNativeInterceptor(receiver); |
| 13227 }; |
| 13228 J.getInterceptor$ax = function(receiver) { |
| 13229 if (receiver == null) |
| 13230 return receiver; |
| 13231 if (receiver.constructor == Array) |
| 13232 return J.JSArray.prototype; |
| 13233 if (typeof receiver != "object") |
| 13234 return receiver; |
| 13235 if (receiver instanceof P.Object) |
| 13236 return receiver; |
| 13237 return J.getNativeInterceptor(receiver); |
| 13238 }; |
| 13239 J.getInterceptor$n = function(receiver) { |
| 13240 if (typeof receiver == "number") |
| 13241 return J.JSNumber.prototype; |
| 13242 if (receiver == null) |
| 13243 return receiver; |
| 13244 if (!(receiver instanceof P.Object)) |
| 13245 return J.UnknownJavaScriptObject.prototype; |
| 13246 return receiver; |
| 13247 }; |
| 13248 J.getInterceptor$ns = function(receiver) { |
| 13249 if (typeof receiver == "number") |
| 13250 return J.JSNumber.prototype; |
| 13251 if (typeof receiver == "string") |
| 13252 return J.JSString.prototype; |
| 13253 if (receiver == null) |
| 13254 return receiver; |
| 13255 if (!(receiver instanceof P.Object)) |
| 13256 return J.UnknownJavaScriptObject.prototype; |
| 13257 return receiver; |
| 13258 }; |
| 13259 J.getInterceptor$s = function(receiver) { |
| 13260 if (typeof receiver == "string") |
| 13261 return J.JSString.prototype; |
| 13262 if (receiver == null) |
| 13263 return receiver; |
| 13264 if (!(receiver instanceof P.Object)) |
| 13265 return J.UnknownJavaScriptObject.prototype; |
| 13266 return receiver; |
| 13267 }; |
| 13268 J.getInterceptor$x = function(receiver) { |
| 13269 if (receiver == null) |
| 13270 return receiver; |
| 13271 if (typeof receiver != "object") |
| 13272 return receiver; |
| 13273 if (receiver instanceof P.Object) |
| 13274 return receiver; |
| 13275 return J.getNativeInterceptor(receiver); |
| 13276 }; |
| 13277 J.$add$ns = function(receiver, a0) { |
| 13278 if (typeof receiver == "number" && typeof a0 == "number") |
| 13279 return receiver + a0; |
| 13280 return J.getInterceptor$ns(receiver).$add(receiver, a0); |
| 13281 }; |
| 13282 J.$eq = function(receiver, a0) { |
| 13283 if (receiver == null) |
| 13284 return a0 == null; |
| 13285 if (typeof receiver != "object") |
| 13286 return a0 != null && receiver === a0; |
| 13287 return J.getInterceptor(receiver).$eq(receiver, a0); |
| 13288 }; |
| 13289 J.$gt$n = function(receiver, a0) { |
| 13290 if (typeof receiver == "number" && typeof a0 == "number") |
| 13291 return receiver > a0; |
| 13292 return J.getInterceptor$n(receiver).$gt(receiver, a0); |
| 13293 }; |
| 13294 J.$index$asx = function(receiver, a0) { |
| 13295 if (receiver.constructor == Array || typeof receiver == "string" || H.isJsInde
xable(receiver, receiver[init.dispatchPropertyName])) |
| 13296 if (a0 >>> 0 === a0 && a0 < receiver.length) |
| 13297 return receiver[a0]; |
| 13298 return J.getInterceptor$asx(receiver).$index(receiver, a0); |
| 13299 }; |
| 13300 J.$indexSet$ax = function(receiver, a0, a1) { |
| 13301 if ((receiver.constructor == Array || H.isJsIndexable(receiver, receiver[init.
dispatchPropertyName])) && !receiver.immutable$list && a0 >>> 0 === a0 && a0 < r
eceiver.length) |
| 13302 return receiver[a0] = a1; |
| 13303 return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); |
| 13304 }; |
| 13305 J.$lt$n = function(receiver, a0) { |
| 13306 if (typeof receiver == "number" && typeof a0 == "number") |
| 13307 return receiver < a0; |
| 13308 return J.getInterceptor$n(receiver).$lt(receiver, a0); |
| 13309 }; |
| 13310 J.$sub$n = function(receiver, a0) { |
| 13311 if (typeof receiver == "number" && typeof a0 == "number") |
| 13312 return receiver - a0; |
| 13313 return J.getInterceptor$n(receiver).$sub(receiver, a0); |
| 13314 }; |
| 13315 J._addEventListener$3$x = function(receiver, a0, a1, a2) { |
| 13316 return J.getInterceptor$x(receiver)._addEventListener$3(receiver, a0, a1, a2); |
| 13317 }; |
| 13318 J._removeEventListener$3$x = function(receiver, a0, a1, a2) { |
| 13319 return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a
2); |
| 13320 }; |
| 13321 J.add$1$ax = function(receiver, a0) { |
| 13322 return J.getInterceptor$ax(receiver).add$1(receiver, a0); |
| 13323 }; |
| 13324 J.close$0$x = function(receiver) { |
| 13325 return J.getInterceptor$x(receiver).close$0(receiver); |
| 13326 }; |
| 13327 J.codeUnitAt$1$s = function(receiver, a0) { |
| 13328 return J.getInterceptor$s(receiver).codeUnitAt$1(receiver, a0); |
| 13329 }; |
| 13330 J.contains$1$asx = function(receiver, a0) { |
| 13331 return J.getInterceptor$asx(receiver).contains$1(receiver, a0); |
| 13332 }; |
| 13333 J.elementAt$1$ax = function(receiver, a0) { |
| 13334 return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); |
| 13335 }; |
| 13336 J.forEach$1$ax = function(receiver, a0) { |
| 13337 return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); |
| 13338 }; |
| 13339 J.get$contentWindow$x = function(receiver) { |
| 13340 return J.getInterceptor$x(receiver).get$contentWindow(receiver); |
| 13341 }; |
| 13342 J.get$data$x = function(receiver) { |
| 13343 return J.getInterceptor$x(receiver).get$data(receiver); |
| 13344 }; |
| 13345 J.get$error$x = function(receiver) { |
| 13346 return J.getInterceptor$x(receiver).get$error(receiver); |
| 13347 }; |
| 13348 J.get$hashCode$ = function(receiver) { |
| 13349 return J.getInterceptor(receiver).get$hashCode(receiver); |
| 13350 }; |
| 13351 J.get$isEmpty$asx = function(receiver) { |
| 13352 return J.getInterceptor$asx(receiver).get$isEmpty(receiver); |
| 13353 }; |
| 13354 J.get$isNotEmpty$asx = function(receiver) { |
| 13355 return J.getInterceptor$asx(receiver).get$isNotEmpty(receiver); |
| 13356 }; |
| 13357 J.get$iterator$ax = function(receiver) { |
| 13358 return J.getInterceptor$ax(receiver).get$iterator(receiver); |
| 13359 }; |
| 13360 J.get$last$ax = function(receiver) { |
| 13361 return J.getInterceptor$ax(receiver).get$last(receiver); |
| 13362 }; |
| 13363 J.get$length$asx = function(receiver) { |
| 13364 return J.getInterceptor$asx(receiver).get$length(receiver); |
| 13365 }; |
| 13366 J.get$location$x = function(receiver) { |
| 13367 return J.getInterceptor$x(receiver).get$location(receiver); |
| 13368 }; |
| 13369 J.get$message$x = function(receiver) { |
| 13370 return J.getInterceptor$x(receiver).get$message(receiver); |
| 13371 }; |
| 13372 J.get$origin$x = function(receiver) { |
| 13373 return J.getInterceptor$x(receiver).get$origin(receiver); |
| 13374 }; |
| 13375 J.get$parent$x = function(receiver) { |
| 13376 return J.getInterceptor$x(receiver).get$parent(receiver); |
| 13377 }; |
| 13378 J.get$start$x = function(receiver) { |
| 13379 return J.getInterceptor$x(receiver).get$start(receiver); |
| 13380 }; |
| 13381 J.map$1$ax = function(receiver, a0) { |
| 13382 return J.getInterceptor$ax(receiver).map$1(receiver, a0); |
| 13383 }; |
| 13384 J.matchAsPrefix$2$s = function(receiver, a0, a1) { |
| 13385 return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); |
| 13386 }; |
| 13387 J.postMessage$2$x = function(receiver, a0, a1) { |
| 13388 return J.getInterceptor$x(receiver).postMessage$2(receiver, a0, a1); |
| 13389 }; |
| 13390 J.print$1$x = function(receiver, a0) { |
| 13391 return J.getInterceptor$x(receiver).print$1(receiver, a0); |
| 13392 }; |
| 13393 J.remove$1$ax = function(receiver, a0) { |
| 13394 return J.getInterceptor$ax(receiver).remove$1(receiver, a0); |
| 13395 }; |
| 13396 J.replaceAll$2$s = function(receiver, a0, a1) { |
| 13397 return J.getInterceptor$s(receiver).replaceAll$2(receiver, a0, a1); |
| 13398 }; |
| 13399 J.replaceFirst$2$s = function(receiver, a0, a1) { |
| 13400 return J.getInterceptor$s(receiver).replaceFirst$2(receiver, a0, a1); |
| 13401 }; |
| 13402 J.send$1$x = function(receiver, a0) { |
| 13403 return J.getInterceptor$x(receiver).send$1(receiver, a0); |
| 13404 }; |
| 13405 J.skip$1$ax = function(receiver, a0) { |
| 13406 return J.getInterceptor$ax(receiver).skip$1(receiver, a0); |
| 13407 }; |
| 13408 J.split$1$s = function(receiver, a0) { |
| 13409 return J.getInterceptor$s(receiver).split$1(receiver, a0); |
| 13410 }; |
| 13411 J.startsWith$1$s = function(receiver, a0) { |
| 13412 return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); |
| 13413 }; |
| 13414 J.substring$1$s = function(receiver, a0) { |
| 13415 return J.getInterceptor$s(receiver).substring$1(receiver, a0); |
| 13416 }; |
| 13417 J.substring$2$s = function(receiver, a0, a1) { |
| 13418 return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1); |
| 13419 }; |
| 13420 J.toRadixString$1$n = function(receiver, a0) { |
| 13421 return J.getInterceptor$n(receiver).toRadixString$1(receiver, a0); |
| 13422 }; |
| 13423 J.toString$0 = function(receiver) { |
| 13424 return J.getInterceptor(receiver).toString$0(receiver); |
| 13425 }; |
| 13426 J.trim$0$s = function(receiver) { |
| 13427 return J.getInterceptor$s(receiver).trim$0(receiver); |
| 13428 }; |
| 13429 Isolate.makeConstantList = function(list) { |
| 13430 list.immutable$list = Array; |
| 13431 list.fixed$length = Array; |
| 13432 return list; |
| 13433 }; |
| 13434 ; |
| 13435 C.JSArray_methods = J.JSArray.prototype; |
| 13436 C.JSDouble_methods = J.JSDouble.prototype; |
| 13437 C.JSInt_methods = J.JSInt.prototype; |
| 13438 C.JSNull_methods = J.JSNull.prototype; |
| 13439 C.JSNumber_methods = J.JSNumber.prototype; |
| 13440 C.JSString_methods = J.JSString.prototype; |
| 13441 C.NativeUint8List_methods = H.NativeUint8List.prototype; |
| 13442 C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; |
| 13443 C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; |
| 13444 C.C_DynamicRuntimeType = new H.DynamicRuntimeType(); |
| 13445 C.C_OutOfMemoryError = new P.OutOfMemoryError(); |
| 13446 C.C__DelayedDone = new P._DelayedDone(); |
| 13447 C.C__RootZone = new P._RootZone(); |
| 13448 C.Duration_0 = new P.Duration(0); |
| 13449 C.JS_CONST_0 = function(hooks) { |
| 13450 if (typeof dartExperimentalFixupGetTag != "function") return hooks; |
| 13451 hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); |
| 13452 }; |
| 13453 C.JS_CONST_4hp = function(hooks) { |
| 13454 var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; |
| 13455 if (userAgent.indexOf("Firefox") == -1) return hooks; |
| 13456 var getTag = hooks.getTag; |
| 13457 var quickMap = { |
| 13458 "BeforeUnloadEvent": "Event", |
| 13459 "DataTransfer": "Clipboard", |
| 13460 "GeoGeolocation": "Geolocation", |
| 13461 "Location": "!Location", |
| 13462 "WorkerMessageEvent": "MessageEvent", |
| 13463 "XMLDocument": "!Document"}; |
| 13464 function getTagFirefox(o) { |
| 13465 var tag = getTag(o); |
| 13466 return quickMap[tag] || tag; |
| 13467 } |
| 13468 hooks.getTag = getTagFirefox; |
| 13469 }; |
| 13470 C.JS_CONST_8ZY = function getTagFallback(o) { |
| 13471 var constructor = o.constructor; |
| 13472 if (typeof constructor == "function") { |
| 13473 var name = constructor.name; |
| 13474 if (typeof name == "string" && |
| 13475 name.length > 2 && |
| 13476 name !== "Object" && |
| 13477 name !== "Function.prototype") { |
| 13478 return name; |
| 13479 } |
| 13480 } |
| 13481 var s = Object.prototype.toString.call(o); |
| 13482 return s.substring(8, s.length - 1); |
| 13483 }; |
| 13484 C.JS_CONST_Fs4 = function(hooks) { return hooks; } |
| 13485 ; |
| 13486 C.JS_CONST_QJm = function(getTagFallback) { |
| 13487 return function(hooks) { |
| 13488 if (typeof navigator != "object") return hooks; |
| 13489 var ua = navigator.userAgent; |
| 13490 if (ua.indexOf("DumpRenderTree") >= 0) return hooks; |
| 13491 if (ua.indexOf("Chrome") >= 0) { |
| 13492 function confirm(p) { |
| 13493 return typeof window == "object" && window[p] && window[p].name == p; |
| 13494 } |
| 13495 if (confirm("Window") && confirm("HTMLElement")) return hooks; |
| 13496 } |
| 13497 hooks.getTag = getTagFallback; |
| 13498 }; |
| 13499 }; |
| 13500 C.JS_CONST_gkc = function() { |
| 13501 function typeNameInChrome(o) { |
| 13502 var constructor = o.constructor; |
| 13503 if (constructor) { |
| 13504 var name = constructor.name; |
| 13505 if (name) return name; |
| 13506 } |
| 13507 var s = Object.prototype.toString.call(o); |
| 13508 return s.substring(8, s.length - 1); |
| 13509 } |
| 13510 function getUnknownTag(object, tag) { |
| 13511 if (/^HTML[A-Z].*Element$/.test(tag)) { |
| 13512 var name = Object.prototype.toString.call(object); |
| 13513 if (name == "[object Object]") return null; |
| 13514 return "HTMLElement"; |
| 13515 } |
| 13516 } |
| 13517 function getUnknownTagGenericBrowser(object, tag) { |
| 13518 if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; |
| 13519 return getUnknownTag(object, tag); |
| 13520 } |
| 13521 function prototypeForTag(tag) { |
| 13522 if (typeof window == "undefined") return null; |
| 13523 if (typeof window[tag] == "undefined") return null; |
| 13524 var constructor = window[tag]; |
| 13525 if (typeof constructor != "function") return null; |
| 13526 return constructor.prototype; |
| 13527 } |
| 13528 function discriminator(tag) { return null; } |
| 13529 var isBrowser = typeof navigator == "object"; |
| 13530 return { |
| 13531 getTag: typeNameInChrome, |
| 13532 getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, |
| 13533 prototypeForTag: prototypeForTag, |
| 13534 discriminator: discriminator }; |
| 13535 }; |
| 13536 C.JS_CONST_gkc0 = function(hooks) { |
| 13537 var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; |
| 13538 if (userAgent.indexOf("Trident/") == -1) return hooks; |
| 13539 var getTag = hooks.getTag; |
| 13540 var quickMap = { |
| 13541 "BeforeUnloadEvent": "Event", |
| 13542 "DataTransfer": "Clipboard", |
| 13543 "HTMLDDElement": "HTMLElement", |
| 13544 "HTMLDTElement": "HTMLElement", |
| 13545 "HTMLPhraseElement": "HTMLElement", |
| 13546 "Position": "Geoposition" |
| 13547 }; |
| 13548 function getTagIE(o) { |
| 13549 var tag = getTag(o); |
| 13550 var newTag = quickMap[tag]; |
| 13551 if (newTag) return newTag; |
| 13552 if (tag == "Object") { |
| 13553 if (window.DataView && (o instanceof window.DataView)) return "DataView"; |
| 13554 } |
| 13555 return tag; |
| 13556 } |
| 13557 function prototypeForTagIE(tag) { |
| 13558 var constructor = window[tag]; |
| 13559 if (constructor == null) return null; |
| 13560 return constructor.prototype; |
| 13561 } |
| 13562 hooks.getTag = getTagIE; |
| 13563 hooks.prototypeForTag = prototypeForTagIE; |
| 13564 }; |
| 13565 C.JS_CONST_rr7 = function(hooks) { |
| 13566 var getTag = hooks.getTag; |
| 13567 var prototypeForTag = hooks.prototypeForTag; |
| 13568 function getTagFixed(o) { |
| 13569 var tag = getTag(o); |
| 13570 if (tag == "Document") { |
| 13571 if (!!o.xmlVersion) return "!Document"; |
| 13572 return "!HTMLDocument"; |
| 13573 } |
| 13574 return tag; |
| 13575 } |
| 13576 function prototypeForTagFixed(tag) { |
| 13577 if (tag == "Document") return null; |
| 13578 return prototypeForTag(tag); |
| 13579 } |
| 13580 hooks.getTag = getTagFixed; |
| 13581 hooks.prototypeForTag = prototypeForTagFixed; |
| 13582 }; |
| 13583 C.JsonCodec_null_null = new P.JsonCodec(null, null); |
| 13584 C.JsonDecoder_null = new P.JsonDecoder(null); |
| 13585 C.JsonEncoder_null_null = new P.JsonEncoder(null, null); |
| 13586 C.List_127_2047_65535_1114111 = H.setRuntimeTypeInfo(Isolate.makeConstantList([1
27, 2047, 65535, 1114111]), [P.$int]); |
| 13587 C.List_2Vk = Isolate.makeConstantList([0, 0, 32776, 33792, 1, 10240, 0, 0]); |
| 13588 C.List_CVk = Isolate.makeConstantList([0, 0, 65490, 45055, 65535, 34815, 65534,
18431]); |
| 13589 C.List_JYB = Isolate.makeConstantList([0, 0, 26624, 1023, 65534, 2047, 65534, 20
47]); |
| 13590 C.List_WnV = Isolate.makeConstantList(["/", "\\"]); |
| 13591 C.List_cSk = Isolate.makeConstantList(["/"]); |
| 13592 C.List_empty = H.setRuntimeTypeInfo(Isolate.makeConstantList([]), [P.String]); |
| 13593 C.List_gRj = Isolate.makeConstantList([0, 0, 32722, 12287, 65534, 34815, 65534,
18431]); |
| 13594 C.List_nxB = Isolate.makeConstantList([0, 0, 24576, 1023, 65534, 34815, 65534, 1
8431]); |
| 13595 C.List_qNA = Isolate.makeConstantList([0, 0, 32754, 11263, 65534, 34815, 65534,
18431]); |
| 13596 C.List_qg4 = Isolate.makeConstantList([0, 0, 65490, 12287, 65535, 34815, 65534,
18431]); |
| 13597 C.List_qg40 = Isolate.makeConstantList([0, 0, 32722, 12287, 65535, 34815, 65534,
18431]); |
| 13598 C.Utf8Codec_false = new P.Utf8Codec(false); |
| 13599 C._ZoneFunction_3bB = new P._ZoneFunction(C.C__RootZone, P._rootCreatePeriodicTi
mer$closure()); |
| 13600 C._ZoneFunction_7G2 = new P._ZoneFunction(C.C__RootZone, P._rootRegisterBinaryCa
llback$closure()); |
| 13601 C._ZoneFunction_Eeh = new P._ZoneFunction(C.C__RootZone, P._rootRegisterUnaryCal
lback$closure()); |
| 13602 C._ZoneFunction_NMc = new P._ZoneFunction(C.C__RootZone, P._rootHandleUncaughtEr
ror$closure()); |
| 13603 C._ZoneFunction__RootZone__rootCreateTimer = new P._ZoneFunction(C.C__RootZone,
P._rootCreateTimer$closure()); |
| 13604 C._ZoneFunction__RootZone__rootErrorCallback = new P._ZoneFunction(C.C__RootZone
, P._rootErrorCallback$closure()); |
| 13605 C._ZoneFunction__RootZone__rootFork = new P._ZoneFunction(C.C__RootZone, P._root
Fork$closure()); |
| 13606 C._ZoneFunction__RootZone__rootPrint = new P._ZoneFunction(C.C__RootZone, P._roo
tPrint$closure()); |
| 13607 C._ZoneFunction__RootZone__rootRegisterCallback = new P._ZoneFunction(C.C__RootZ
one, P._rootRegisterCallback$closure()); |
| 13608 C._ZoneFunction__RootZone__rootRun = new P._ZoneFunction(C.C__RootZone, P._rootR
un$closure()); |
| 13609 C._ZoneFunction__RootZone__rootRunBinary = new P._ZoneFunction(C.C__RootZone, P.
_rootRunBinary$closure()); |
| 13610 C._ZoneFunction__RootZone__rootRunUnary = new P._ZoneFunction(C.C__RootZone, P._
rootRunUnary$closure()); |
| 13611 C._ZoneFunction__RootZone__rootScheduleMicrotask = new P._ZoneFunction(C.C__Root
Zone, P._rootScheduleMicrotask$closure()); |
| 13612 C._ZoneSpecification_ALf = new P._ZoneSpecification(null, null, null, null, null
, null, null, null, null, null, null, null, null); |
| 13613 { |
| 13614 init.isHunkLoaded = function(hunkHash) { |
| 13615 return !!$dart_deferred_initializers[hunkHash]; |
| 13616 }; |
| 13617 init.deferredInitialized = new Object(null); |
| 13618 init.isHunkInitialized = function(hunkHash) { |
| 13619 return init.deferredInitialized[hunkHash]; |
| 13620 }; |
| 13621 init.initializeLoadedHunk = function(hunkHash) { |
| 13622 $dart_deferred_initializers[hunkHash](globalsHolder, $); |
| 13623 init.deferredInitialized[hunkHash] = true; |
| 13624 }; |
| 13625 } |
| 13626 init.deferredLibraryUris = {}; |
| 13627 init.deferredLibraryHashes = {}; |
| 13628 $.IsolateNatives_enableSpawnWorker = null; |
| 13629 $.RawReceivePortImpl__nextFreeId = 1; |
| 13630 $.Primitives_mirrorFunctionCacheName = "$cachedFunction"; |
| 13631 $.Primitives_mirrorInvokeCacheName = "$cachedInvocation"; |
| 13632 $.Closure_functionCounter = 0; |
| 13633 $.BoundClosure_selfFieldNameCache = null; |
| 13634 $.BoundClosure_receiverFieldNameCache = null; |
| 13635 $.RuntimeFunctionType_inAssert = false; |
| 13636 $.getTagFunction = null; |
| 13637 $.alternateTagFunction = null; |
| 13638 $.prototypeForTagFunction = null; |
| 13639 $.dispatchRecordsForInstanceTags = null; |
| 13640 $.interceptorsForUncacheableTags = null; |
| 13641 $.initNativeDispatchFlag = null; |
| 13642 $.printToZone = null; |
| 13643 $._nextCallback = null; |
| 13644 $._lastCallback = null; |
| 13645 $._lastPriorityCallback = null; |
| 13646 $._isInCallbackLoop = false; |
| 13647 $.Zone__current = C.C__RootZone; |
| 13648 $._RootZone__rootDelegate = null; |
| 13649 $.Expando__keyCount = 0; |
| 13650 $.Device__isOpera = null; |
| 13651 $.Device__isIE = null; |
| 13652 $.Device__isFirefox = null; |
| 13653 $.Device__isWebKit = null; |
| 13654 $.Device__cachedCssPrefix = null; |
| 13655 Isolate.$lazy($, "thisScript", "IsolateNatives_thisScript", "get$IsolateNatives_
thisScript", function() { |
| 13656 return H.IsolateNatives_computeThisScript(); |
| 13657 }); |
| 13658 Isolate.$lazy($, "workerIds", "IsolateNatives_workerIds", "get$IsolateNatives_wo
rkerIds", function() { |
| 13659 return new P.Expando(null); |
| 13660 }); |
| 13661 Isolate.$lazy($, "noSuchMethodPattern", "TypeErrorDecoder_noSuchMethodPattern",
"get$TypeErrorDecoder_noSuchMethodPattern", function() { |
| 13662 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
({toString: function() { |
| 13663 return "$receiver$"; |
| 13664 }})); |
| 13665 }); |
| 13666 Isolate.$lazy($, "notClosurePattern", "TypeErrorDecoder_notClosurePattern", "get
$TypeErrorDecoder_notClosurePattern", function() { |
| 13667 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
({$method$: null, toString: function() { |
| 13668 return "$receiver$"; |
| 13669 }})); |
| 13670 }); |
| 13671 Isolate.$lazy($, "nullCallPattern", "TypeErrorDecoder_nullCallPattern", "get$Typ
eErrorDecoder_nullCallPattern", function() { |
| 13672 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
(null)); |
| 13673 }); |
| 13674 Isolate.$lazy($, "nullLiteralCallPattern", "TypeErrorDecoder_nullLiteralCallPatt
ern", "get$TypeErrorDecoder_nullLiteralCallPattern", function() { |
| 13675 return H.TypeErrorDecoder_extractPattern(function() { |
| 13676 var $argumentsExpr$ = '$arguments$'; |
| 13677 try { |
| 13678 null.$method$($argumentsExpr$); |
| 13679 } catch (e) { |
| 13680 return e.message; |
| 13681 } |
| 13682 }()); |
| 13683 }); |
| 13684 Isolate.$lazy($, "undefinedCallPattern", "TypeErrorDecoder_undefinedCallPattern"
, "get$TypeErrorDecoder_undefinedCallPattern", function() { |
| 13685 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
(void 0)); |
| 13686 }); |
| 13687 Isolate.$lazy($, "undefinedLiteralCallPattern", "TypeErrorDecoder_undefinedLiter
alCallPattern", "get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { |
| 13688 return H.TypeErrorDecoder_extractPattern(function() { |
| 13689 var $argumentsExpr$ = '$arguments$'; |
| 13690 try { |
| 13691 (void 0).$method$($argumentsExpr$); |
| 13692 } catch (e) { |
| 13693 return e.message; |
| 13694 } |
| 13695 }()); |
| 13696 }); |
| 13697 Isolate.$lazy($, "nullPropertyPattern", "TypeErrorDecoder_nullPropertyPattern",
"get$TypeErrorDecoder_nullPropertyPattern", function() { |
| 13698 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOn(null)); |
| 13699 }); |
| 13700 Isolate.$lazy($, "nullLiteralPropertyPattern", "TypeErrorDecoder_nullLiteralProp
ertyPattern", "get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { |
| 13701 return H.TypeErrorDecoder_extractPattern(function() { |
| 13702 try { |
| 13703 null.$method$; |
| 13704 } catch (e) { |
| 13705 return e.message; |
| 13706 } |
| 13707 }()); |
| 13708 }); |
| 13709 Isolate.$lazy($, "undefinedPropertyPattern", "TypeErrorDecoder_undefinedProperty
Pattern", "get$TypeErrorDecoder_undefinedPropertyPattern", function() { |
| 13710 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOn(void 0)); |
| 13711 }); |
| 13712 Isolate.$lazy($, "undefinedLiteralPropertyPattern", "TypeErrorDecoder_undefinedL
iteralPropertyPattern", "get$TypeErrorDecoder_undefinedLiteralPropertyPattern",
function() { |
| 13713 return H.TypeErrorDecoder_extractPattern(function() { |
| 13714 try { |
| 13715 (void 0).$method$; |
| 13716 } catch (e) { |
| 13717 return e.message; |
| 13718 } |
| 13719 }()); |
| 13720 }); |
| 13721 Isolate.$lazy($, "scheduleImmediateClosure", "_AsyncRun_scheduleImmediateClosure
", "get$_AsyncRun_scheduleImmediateClosure", function() { |
| 13722 return P._AsyncRun__initializeScheduleImmediate(); |
| 13723 }); |
| 13724 Isolate.$lazy($, "_nullFuture", "Future__nullFuture", "get$Future__nullFuture",
function() { |
| 13725 return P._Future$immediate(null, null); |
| 13726 }); |
| 13727 Isolate.$lazy($, "_rootMap", "_RootZone__rootMap", "get$_RootZone__rootMap", fun
ction() { |
| 13728 return P.HashMap_HashMap(null, null, null, null, null); |
| 13729 }); |
| 13730 Isolate.$lazy($, "_toStringVisiting", "IterableBase__toStringVisiting", "get$Ite
rableBase__toStringVisiting", function() { |
| 13731 return []; |
| 13732 }); |
| 13733 Isolate.$lazy($, "_vmFrame", "_vmFrame", "get$_vmFrame", function() { |
| 13734 return P.RegExp_RegExp("^#\\d+\\s+(\\S.*) \\((.+?)((?::\\d+){0,2})\\)$", true,
false); |
| 13735 }); |
| 13736 Isolate.$lazy($, "_v8Frame", "_v8Frame", "get$_v8Frame", function() { |
| 13737 return P.RegExp_RegExp("^\\s*at (?:(\\S.*?)(?: \\[as [^\\]]+\\])? \\((.*)\\)|(
.*))$", true, false); |
| 13738 }); |
| 13739 Isolate.$lazy($, "_v8UrlLocation", "_v8UrlLocation", "get$_v8UrlLocation", funct
ion() { |
| 13740 return P.RegExp_RegExp("^(.*):(\\d+):(\\d+)$", true, false); |
| 13741 }); |
| 13742 Isolate.$lazy($, "_v8EvalLocation", "_v8EvalLocation", "get$_v8EvalLocation", fu
nction() { |
| 13743 return P.RegExp_RegExp("^eval at (?:\\S.*?) \\((.*)\\)(?:, .*?:\\d+:\\d+)?$",
true, false); |
| 13744 }); |
| 13745 Isolate.$lazy($, "_firefoxSafariFrame", "_firefoxSafariFrame", "get$_firefoxSafa
riFrame", function() { |
| 13746 return P.RegExp_RegExp("^(?:([^@(/]*)(?:\\(.*\\))?((?:/[^/]*)*)(?:\\(.*\\))?@)
?(.*?):(\\d*)(?::(\\d*))?$", true, false); |
| 13747 }); |
| 13748 Isolate.$lazy($, "_friendlyFrame", "_friendlyFrame", "get$_friendlyFrame", funct
ion() { |
| 13749 return P.RegExp_RegExp("^(\\S+)(?: (\\d+)(?::(\\d+))?)?\\s+([^\\d]\\S*)$", tru
e, false); |
| 13750 }); |
| 13751 Isolate.$lazy($, "_asyncBody", "_asyncBody", "get$_asyncBody", function() { |
| 13752 return P.RegExp_RegExp("<(<anonymous closure>|[^>]+)_async_body>", true, false
); |
| 13753 }); |
| 13754 Isolate.$lazy($, "_initialDot", "_initialDot", "get$_initialDot", function() { |
| 13755 return P.RegExp_RegExp("^\\.", true, false); |
| 13756 }); |
| 13757 Isolate.$lazy($, "_uriRegExp", "Frame__uriRegExp", "get$Frame__uriRegExp", funct
ion() { |
| 13758 return P.RegExp_RegExp("^[a-zA-Z][-+.a-zA-Z\\d]*://", true, false); |
| 13759 }); |
| 13760 Isolate.$lazy($, "_windowsRegExp", "Frame__windowsRegExp", "get$Frame__windowsRe
gExp", function() { |
| 13761 return P.RegExp_RegExp("^([a-zA-Z]:[\\\\/]|\\\\\\\\)", true, false); |
| 13762 }); |
| 13763 Isolate.$lazy($, "windows", "windows", "get$windows", function() { |
| 13764 return F.Context_Context(null, $.get$Style_windows()); |
| 13765 }); |
| 13766 Isolate.$lazy($, "context", "context", "get$context", function() { |
| 13767 return new F.Context($.get$Style_platform(), null); |
| 13768 }); |
| 13769 Isolate.$lazy($, "posix", "Style_posix", "get$Style_posix", function() { |
| 13770 return new Z.PosixStyle("posix", "/", C.List_cSk, P.RegExp_RegExp("/", true, f
alse), P.RegExp_RegExp("[^/]$", true, false), P.RegExp_RegExp("^/", true, false)
, null); |
| 13771 }); |
| 13772 Isolate.$lazy($, "windows", "Style_windows", "get$Style_windows", function() { |
| 13773 return new T.WindowsStyle("windows", "\\", C.List_WnV, P.RegExp_RegExp("[/\\\\
]", true, false), P.RegExp_RegExp("[^/\\\\]$", true, false), P.RegExp_RegExp("^(
\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])", true, false), P.RegExp_RegExp(
"^[/\\\\](?![/\\\\])", true, false)); |
| 13774 }); |
| 13775 Isolate.$lazy($, "url", "Style_url", "get$Style_url", function() { |
| 13776 return new E.UrlStyle("url", "/", C.List_cSk, P.RegExp_RegExp("/", true, false
), P.RegExp_RegExp("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$", true, false), P.RegExp
_RegExp("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*", true, false), P.RegExp_RegExp("^/", t
rue, false)); |
| 13777 }); |
| 13778 Isolate.$lazy($, "platform", "Style_platform", "get$Style_platform", function()
{ |
| 13779 return S.Style__getPlatformStyle(); |
| 13780 }); |
| 13781 Isolate.$lazy($, "_terseRegExp", "_terseRegExp", "get$_terseRegExp", function()
{ |
| 13782 return P.RegExp_RegExp("(-patch)?(/.*)?$", true, false); |
| 13783 }); |
| 13784 Isolate.$lazy($, "_v8Trace", "_v8Trace", "get$_v8Trace", function() { |
| 13785 return P.RegExp_RegExp("\\n ?at ", true, false); |
| 13786 }); |
| 13787 Isolate.$lazy($, "_v8TraceLine", "_v8TraceLine", "get$_v8TraceLine", function()
{ |
| 13788 return P.RegExp_RegExp(" ?at ", true, false); |
| 13789 }); |
| 13790 Isolate.$lazy($, "_firefoxSafariTrace", "_firefoxSafariTrace", "get$_firefoxSafa
riTrace", function() { |
| 13791 return P.RegExp_RegExp("^(([.0-9A-Za-z_$/<]|\\(.*\\))*@)?[^\\s]*:\\d*$", true,
true); |
| 13792 }); |
| 13793 Isolate.$lazy($, "_friendlyTrace", "_friendlyTrace", "get$_friendlyTrace", funct
ion() { |
| 13794 return P.RegExp_RegExp("^[^\\s]+( \\d+(:\\d+)?)?[ \\t]+[^\\s]+$", true, true); |
| 13795 }); |
| 13796 |
| 13797 init.metadata = [{func: "args0"}, |
| 13798 {func: "void_", void: true}, |
| 13799 {func: "args1", args: [null]}, |
| 13800 {func: "dynamic__dynamic_String", args: [null, P.String]}, |
| 13801 {func: "dynamic__String", args: [P.String]}, |
| 13802 {func: "dynamic__void_", args: [{func: "void_", void: true}]}, |
| 13803 {func: "void__dynamic__StackTrace", void: true, args: [null], opt: [P.StackTrace
]}, |
| 13804 {func: "dynamic__dynamic__dynamic", args: [null], opt: [null]}, |
| 13805 {func: "bool_", ret: P.bool}, |
| 13806 {func: "dynamic__bool", args: [P.bool]}, |
| 13807 {func: "void__Object__StackTrace", void: true, args: [P.Object], opt: [P.StackTr
ace]}, |
| 13808 {func: "void__Object_StackTrace", void: true, args: [P.Object, P.StackTrace]}, |
| 13809 {func: "dynamic__dynamic_StackTrace", args: [null, P.StackTrace]}, |
| 13810 {func: "void__dynamic_StackTrace", void: true, args: [null, P.StackTrace]}, |
| 13811 {func: "dynamic__Zone_ZoneDelegate_Zone_dynamic_StackTrace", args: [P.Zone, P.Zo
neDelegate, P.Zone, null, P.StackTrace]}, |
| 13812 {func: "args2", args: [null, null]}, |
| 13813 {func: "dynamic__String_dynamic", args: [P.String, null]}, |
| 13814 {func: "int__dynamic_int", ret: P.$int, args: [null, P.$int]}, |
| 13815 {func: "void__int_int", void: true, args: [P.$int, P.$int]}, |
| 13816 {func: "dynamic__Symbol_dynamic", args: [P.Symbol, null]}, |
| 13817 {func: "String__int", ret: P.String, args: [P.$int]}, |
| 13818 {func: "bool__int", ret: P.bool, args: [P.$int]}, |
| 13819 {func: "int__dynamic_dynamic", ret: P.$int, args: [null, null]}, |
| 13820 {func: "void__String", void: true, args: [P.String]}, |
| 13821 {func: "void__String__dynamic", void: true, args: [P.String], opt: [null]}, |
| 13822 {func: "int__int_int", ret: P.$int, args: [P.$int, P.$int]}, |
| 13823 {func: "int__dynamic", ret: P.$int, args: [null]}, |
| 13824 {func: "dynamic__int", args: [P.$int]}, |
| 13825 {func: "dynamic__int_dynamic", args: [P.$int, null]}, |
| 13826 {func: "void__void_", void: true, args: [{func: "void_", void: true}]}, |
| 13827 {func: "void__dynamic", void: true, args: [null]}, |
| 13828 {func: "void__Zone_ZoneDelegate_Zone_dynamic_StackTrace", void: true, args: [P.Z
one, P.ZoneDelegate, P.Zone, null, P.StackTrace]}, |
| 13829 {func: "dynamic__Zone_ZoneDelegate_Zone_args0", args: [P.Zone, P.ZoneDelegate, P
.Zone, {func: "args0"}]}, |
| 13830 {func: "dynamic__Zone_ZoneDelegate_Zone_args1_dynamic", args: [P.Zone, P.ZoneDel
egate, P.Zone, {func: "args1", args: [null]}, null]}, |
| 13831 {func: "dynamic__Zone_ZoneDelegate_Zone_args2_dynamic_dynamic", args: [P.Zone, P
.ZoneDelegate, P.Zone, {func: "args2", args: [null, null]}, null, null]}, |
| 13832 {func: "ZoneCallback__Zone_ZoneDelegate_Zone_args0", ret: {func: "args0"}, args:
[P.Zone, P.ZoneDelegate, P.Zone, {func: "args0"}]}, |
| 13833 {func: "ZoneUnaryCallback__Zone_ZoneDelegate_Zone_args1", ret: {func: "args1", a
rgs: [null]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: "args1", args: [null
]}]}, |
| 13834 {func: "ZoneBinaryCallback__Zone_ZoneDelegate_Zone_args2", ret: {func: "args2",
args: [null, null]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: "args2", args
: [null, null]}]}, |
| 13835 {func: "AsyncError__Zone_ZoneDelegate_Zone_Object_StackTrace", ret: P.AsyncError
, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}, |
| 13836 {func: "void__Zone_ZoneDelegate_Zone_args0", void: true, args: [P.Zone, P.ZoneDe
legate, P.Zone, {func: "args0"}]}, |
| 13837 {func: "Timer__Zone_ZoneDelegate_Zone_Duration_void_", ret: P.Timer, args: [P.Zo
ne, P.ZoneDelegate, P.Zone, P.Duration, {func: "void_", void: true}]}, |
| 13838 {func: "Timer__Zone_ZoneDelegate_Zone_Duration_void__Timer", ret: P.Timer, args:
[P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: "void__Timer", void: true,
args: [P.Timer]}]}, |
| 13839 {func: "void__Zone_ZoneDelegate_Zone_String", void: true, args: [P.Zone, P.ZoneD
elegate, P.Zone, P.String]}, |
| 13840 {func: "Zone__Zone_ZoneDelegate_Zone_ZoneSpecification_Map", ret: P.Zone, args:
[P.Zone, P.ZoneDelegate, P.Zone, P.ZoneSpecification, P.Map]}, |
| 13841 {func: "bool__dynamic_dynamic", ret: P.bool, args: [null, null]}, |
| 13842 {func: "Object__dynamic", ret: P.Object, args: [null]}, |
| 13843 {func: "bool__Object_Object", ret: P.bool, args: [P.Object, P.Object]}, |
| 13844 {func: "int__Object", ret: P.$int, args: [P.Object]}, |
| 13845 {func: "String__String", ret: P.String, args: [P.String]}, |
| 13846 {func: "num__num_num", ret: P.num, args: [P.num, P.num]}, |
| 13847 , |
| 13848 ]; |
| 13849 $ = null; |
| 13850 Isolate = Isolate.$finishIsolateConstructor(Isolate); |
| 13851 $ = new Isolate(); |
| 13852 function convertToFastObject(properties) { |
| 13853 function MyClass() { |
| 13854 } |
| 13855 MyClass.prototype = properties; |
| 13856 new MyClass(); |
| 13857 return properties; |
| 13858 } |
| 13859 ; |
| 13860 A = convertToFastObject(A); |
| 13861 B = convertToFastObject(B); |
| 13862 C = convertToFastObject(C); |
| 13863 D = convertToFastObject(D); |
| 13864 E = convertToFastObject(E); |
| 13865 F = convertToFastObject(F); |
| 13866 G = convertToFastObject(G); |
| 13867 H = convertToFastObject(H); |
| 13868 J = convertToFastObject(J); |
| 13869 K = convertToFastObject(K); |
| 13870 L = convertToFastObject(L); |
| 13871 M = convertToFastObject(M); |
| 13872 N = convertToFastObject(N); |
| 13873 O = convertToFastObject(O); |
| 13874 P = convertToFastObject(P); |
| 13875 Q = convertToFastObject(Q); |
| 13876 R = convertToFastObject(R); |
| 13877 S = convertToFastObject(S); |
| 13878 T = convertToFastObject(T); |
| 13879 U = convertToFastObject(U); |
| 13880 V = convertToFastObject(V); |
| 13881 W = convertToFastObject(W); |
| 13882 X = convertToFastObject(X); |
| 13883 Y = convertToFastObject(Y); |
| 13884 Z = convertToFastObject(Z); |
| 13885 function init() { |
| 13886 Isolate.$isolateProperties = Object.create(null); |
| 13887 init.allClasses = Object.create(null); |
| 13888 init.getTypeFromName = function(name) { |
| 13889 return init.allClasses[name]; |
| 13890 }; |
| 13891 init.interceptorsByTag = Object.create(null); |
| 13892 init.leafTags = Object.create(null); |
| 13893 init.finishedClasses = Object.create(null); |
| 13894 Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyVal
ue) { |
| 13895 if (!init.lazies) |
| 13896 init.lazies = Object.create(null); |
| 13897 init.lazies[fieldName] = getterName; |
| 13898 var sentinelUndefined = {}; |
| 13899 var sentinelInProgress = {}; |
| 13900 prototype[fieldName] = sentinelUndefined; |
| 13901 prototype[getterName] = function() { |
| 13902 var result = $[fieldName]; |
| 13903 try { |
| 13904 if (result === sentinelUndefined) { |
| 13905 $[fieldName] = sentinelInProgress; |
| 13906 try { |
| 13907 result = $[fieldName] = lazyValue(); |
| 13908 } finally { |
| 13909 if (result === sentinelUndefined) |
| 13910 $[fieldName] = null; |
| 13911 } |
| 13912 } else |
| 13913 if (result === sentinelInProgress) |
| 13914 H.throwCyclicInit(staticName); |
| 13915 return result; |
| 13916 } finally { |
| 13917 $[getterName] = function() { |
| 13918 return this[fieldName]; |
| 13919 }; |
| 13920 } |
| 13921 }; |
| 13922 }; |
| 13923 Isolate.$finishIsolateConstructor = function(oldIsolate) { |
| 13924 var isolateProperties = oldIsolate.$isolateProperties; |
| 13925 function Isolate() { |
| 13926 var staticNames = Object.keys(isolateProperties); |
| 13927 for (var i = 0; i < staticNames.length; i++) { |
| 13928 var staticName = staticNames[i]; |
| 13929 this[staticName] = isolateProperties[staticName]; |
| 13930 } |
| 13931 var lazies = init.lazies; |
| 13932 var lazyInitializers = lazies ? Object.keys(lazies) : []; |
| 13933 for (var i = 0; i < lazyInitializers.length; i++) |
| 13934 this[lazies[lazyInitializers[i]]] = null; |
| 13935 function ForceEfficientMap() { |
| 13936 } |
| 13937 ForceEfficientMap.prototype = this; |
| 13938 new ForceEfficientMap(); |
| 13939 for (var i = 0; i < lazyInitializers.length; i++) { |
| 13940 var lazyInitName = lazies[lazyInitializers[i]]; |
| 13941 this[lazyInitName] = isolateProperties[lazyInitName]; |
| 13942 } |
| 13943 } |
| 13944 Isolate.prototype = oldIsolate.prototype; |
| 13945 Isolate.prototype.constructor = Isolate; |
| 13946 Isolate.$isolateProperties = isolateProperties; |
| 13947 Isolate.makeConstantList = oldIsolate.makeConstantList; |
| 13948 return Isolate; |
| 13949 }; |
| 13950 } |
| 13951 !function() { |
| 13952 function intern(s) { |
| 13953 var o = {}; |
| 13954 o[s] = 1; |
| 13955 return Object.keys(convertToFastObject(o))[0]; |
| 13956 } |
| 13957 init.getIsolateTag = function(name) { |
| 13958 return intern("___dart_" + name + init.isolateTag); |
| 13959 }; |
| 13960 var tableProperty = "___dart_isolate_tags_"; |
| 13961 var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.
create(null)); |
| 13962 var rootProperty = "_ZxYxX"; |
| 13963 for (var i = 0;; i++) { |
| 13964 var property = intern(rootProperty + "_" + i + "_"); |
| 13965 if (!(property in usedProperties)) { |
| 13966 usedProperties[property] = 1; |
| 13967 init.isolateTag = property; |
| 13968 break; |
| 13969 } |
| 13970 } |
| 13971 init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); |
| 13972 }(); |
| 13973 ;// BEGIN invoke [main]. |
| 13974 (function(callback) { |
| 13975 if (typeof document === "undefined") { |
| 13976 callback(null); |
| 13977 return; |
| 13978 } |
| 13979 if (document.currentScript) { |
| 13980 callback(document.currentScript); |
| 13981 return; |
| 13982 } |
| 13983 var scripts = document.scripts; |
| 13984 function onLoad(event) { |
| 13985 for (var i = 0; i < scripts.length; ++i) |
| 13986 scripts[i].removeEventListener("load", onLoad, false); |
| 13987 callback(event.target); |
| 13988 } |
| 13989 for (var i = 0; i < scripts.length; ++i) |
| 13990 scripts[i].addEventListener("load", onLoad, false); |
| 13991 })(function(currentScript) { |
| 13992 init.currentScript = currentScript; |
| 13993 if (typeof dartMainRunner === "function") |
| 13994 dartMainRunner(function(a) { |
| 13995 H.startRootIsolate(O.main$closure(), a); |
| 13996 }, []); |
| 13997 else |
| 13998 (function(a) { |
| 13999 H.startRootIsolate(O.main$closure(), a); |
| 14000 })([]); |
| 14001 }); |
| 14002 ; |
| 14003 // END invoke [main]. |
| 14004 })() |
| 14005 |
| 14006 //# sourceMappingURL=host.dart.js.map |
OLD | NEW |