From 024eaa757d9c5360e1d3d5f37b8223b074615b8d Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Fri, 18 Mar 2022 11:47:40 -0700 Subject: [PATCH 1/2] update to package lints 2.0 --- analysis_options.yaml | 7 - integration_tests/nnbd_opted_in/pubspec.yaml | 2 +- integration_tests/nnbd_opted_out/pubspec.yaml | 2 +- .../test/lib/src/runner/browser/platform.dart | 24 +- pkgs/test/lib/src/runner/browser/safari.dart | 2 +- .../src/runner/browser/static/host.dart.js | 19598 ++++++++-------- pkgs/test/lib/src/runner/node/platform.dart | 12 +- pkgs/test/pubspec.yaml | 2 +- .../test/test/runner/json_reporter_utils.dart | 4 +- pkgs/test/test/runner/runner_test.dart | 15 +- pkgs/test/tool/host.dart | 4 +- .../test_api/lib/src/expect/never_called.dart | 9 +- .../lib/src/expect/stream_matchers.dart | 12 +- pkgs/test_api/pubspec.yaml | 2 +- .../test/frontend/expect_async_test.dart | 1 + pkgs/test_core/lib/src/executable.dart | 4 +- pkgs/test_core/lib/src/runner.dart | 5 +- .../lib/src/runner/compiler_pool.dart | 4 +- .../test_core/lib/src/runner/vm/platform.dart | 6 +- pkgs/test_core/pubspec.yaml | 2 +- 20 files changed, 10277 insertions(+), 9440 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 5622919ca..7dc6675cc 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -9,11 +9,4 @@ analyzer: linter: rules: - avoid_private_typedef_functions - - await_only_futures - - depend_on_referenced_packages - - implementation_imports - - prefer_generic_function_type_aliases - prefer_single_quotes - - prefer_typing_uninitialized_variables - - unnecessary_const - - unnecessary_new diff --git a/integration_tests/nnbd_opted_in/pubspec.yaml b/integration_tests/nnbd_opted_in/pubspec.yaml index b69666632..74aabed60 100644 --- a/integration_tests/nnbd_opted_in/pubspec.yaml +++ b/integration_tests/nnbd_opted_in/pubspec.yaml @@ -2,7 +2,7 @@ name: nnbd_opted_in environment: sdk: '>=2.12.0 <3.0.0' dev_dependencies: - lints: ^1.0.0 + lints: '>=1.0.0 <3.0.0' test: any dependency_overrides: test: diff --git a/integration_tests/nnbd_opted_out/pubspec.yaml b/integration_tests/nnbd_opted_out/pubspec.yaml index 1ac224c13..e73bf9d31 100644 --- a/integration_tests/nnbd_opted_out/pubspec.yaml +++ b/integration_tests/nnbd_opted_out/pubspec.yaml @@ -2,7 +2,7 @@ name: nnbd_opted_out environment: sdk: '>=2.11.0 <3.0.0' dev_dependencies: - lints: ^1.0.0 + lints: '>=1.0.0 <3.0.0' test: any dependency_overrides: test: diff --git a/pkgs/test/lib/src/runner/browser/platform.dart b/pkgs/test/lib/src/runner/browser/platform.dart index ee704dc20..b2152b519 100644 --- a/pkgs/test/lib/src/runner/browser/platform.dart +++ b/pkgs/test/lib/src/runner/browser/platform.dart @@ -73,7 +73,7 @@ class BrowserPlatform extends PlatformPlugin final _secret = Uri.encodeComponent(randomBase64(24)); /// The URL for this server. - Uri get url => _server.url.resolve(_secret + '/'); + Uri get url => _server.url.resolve('$_secret/'); /// A [OneOffHandler] for servicing WebSocket connections for /// [BrowserManager]s. @@ -167,7 +167,7 @@ class BrowserPlatform extends PlatformPlugin var path = p.fromUri(request.url); if (path.endsWith('.html')) { - var test = p.withoutExtension(path) + '.dart'; + var test = '${p.withoutExtension(path)}.dart'; var scriptBase = htmlEscape.convert(p.basename(test)); var link = ''; var testName = htmlEscape.convert(test); @@ -215,7 +215,7 @@ class BrowserPlatform extends PlatformPlugin throw ArgumentError('$browser is not a browser.'); } - var htmlPathFromTestPath = p.withoutExtension(path) + '.html'; + var htmlPathFromTestPath = '${p.withoutExtension(path)}.html'; if (File(htmlPathFromTestPath).existsSync()) { if (_config.customHtmlTemplatePath != null && p.basename(htmlPathFromTestPath) == @@ -262,7 +262,7 @@ class BrowserPlatform extends PlatformPlugin if (_closed) return null; suiteUrl = url.resolveUri( - p.toUri(p.withoutExtension(p.relative(path, from: _root)) + '.html')); + p.toUri('${p.withoutExtension(p.relative(path, from: _root))}.html')); } if (_closed) return null; @@ -297,7 +297,7 @@ class BrowserPlatform extends PlatformPlugin print('"pub serve" is compiling $path...'); }); - var sourceMapUrl = dartUrl.replace(path: dartUrl.path + '.js.map'); + var sourceMapUrl = dartUrl.replace(path: '${dartUrl.path}.js.map'); try { var request = await _http!.getUrl(sourceMapUrl); @@ -347,7 +347,7 @@ class BrowserPlatform extends PlatformPlugin Future _compileSuite(String dartPath, SuiteConfiguration suiteConfig) { return _compileFutures.putIfAbsent(dartPath, () async { var dir = Directory(_compiledDir!).createTempSync('test_').path; - var jsPath = p.join(dir, p.basename(dartPath) + '.browser_test.dart.js'); + var jsPath = p.join(dir, '${p.basename(dartPath)}.browser_test.dart.js'); var bootstrapContent = ''' ${suiteConfig.metadata.languageVersionComment ?? await rootPackageLanguageVersionComment} import "package:test/src/bootstrap/browser.dart"; @@ -362,29 +362,29 @@ class BrowserPlatform extends PlatformPlugin await _compilers.compile(bootstrapContent, jsPath, suiteConfig); if (_closed) return; - var bootstrapUrl = p.toUri(p.relative(dartPath, from: _root)).path + + var bootstrapUrl = '${p.toUri(p.relative(dartPath, from: _root)).path}' '.browser_test.dart'; _jsHandler.add(bootstrapUrl, (request) { return shelf.Response.ok(bootstrapContent, headers: {'Content-Type': 'application/dart'}); }); - var jsUrl = p.toUri(p.relative(dartPath, from: _root)).path + + var jsUrl = '${p.toUri(p.relative(dartPath, from: _root)).path}' '.browser_test.dart.js'; _jsHandler.add(jsUrl, (request) { return shelf.Response.ok(File(jsPath).readAsStringSync(), headers: {'Content-Type': 'application/javascript'}); }); - var mapUrl = p.toUri(p.relative(dartPath, from: _root)).path + + var mapUrl = '${p.toUri(p.relative(dartPath, from: _root)).path}' '.browser_test.dart.js.map'; _jsHandler.add(mapUrl, (request) { - return shelf.Response.ok(File(jsPath + '.map').readAsStringSync(), + return shelf.Response.ok(File('$jsPath.map').readAsStringSync(), headers: {'Content-Type': 'application/json'}); }); if (suiteConfig.jsTrace) return; - var mapPath = jsPath + '.map'; + var mapPath = '$jsPath.map'; _mappers[dartPath] = JSStackTraceMapper(File(mapPath).readAsStringSync(), mapUrl: p.toUri(mapPath), sdkRoot: Uri.parse('org-dartlang-sdk:///sdk'), @@ -396,7 +396,7 @@ class BrowserPlatform extends PlatformPlugin String dartPath, SuiteConfiguration suiteConfig) async { if (suiteConfig.jsTrace) return; var mapPath = p.join( - suiteConfig.precompiledPath!, dartPath + '.browser_test.dart.js.map'); + suiteConfig.precompiledPath!, '$dartPath.browser_test.dart.js.map'); var mapFile = File(mapPath); if (mapFile.existsSync()) { _mappers[dartPath] = JSStackTraceMapper(mapFile.readAsStringSync(), diff --git a/pkgs/test/lib/src/runner/browser/safari.dart b/pkgs/test/lib/src/runner/browser/safari.dart index 51bdde085..41cd896e7 100644 --- a/pkgs/test/lib/src/runner/browser/safari.dart +++ b/pkgs/test/lib/src/runner/browser/safari.dart @@ -35,7 +35,7 @@ class Safari extends Browser { // want it to load. var redirect = p.join(dir, 'redirect.html'); File(redirect).writeAsStringSync( - ''); + ''); var process = await Process.start( settings.executable, settings.arguments.toList()..add(redirect)); diff --git a/pkgs/test/lib/src/runner/browser/static/host.dart.js b/pkgs/test/lib/src/runner/browser/static/host.dart.js index 49dc4425d..d80234667 100644 --- a/pkgs/test/lib/src/runner/browser/static/host.dart.js +++ b/pkgs/test/lib/src/runner/browser/static/host.dart.js @@ -1,4 +1,4 @@ -// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.2.0. +// Generated by dart2js (NullSafetyMode.sound, csp), the Dart to JavaScript compiler version: 2.17.0-edge.280a87df1ece4797c12712fe23cc6d712659a5d5. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -9,22 +9,17 @@ // directly. Instead, a closure that will invoke [main], and its arguments // [args] is passed to [dartMainRunner]. // -// dartDeferredLibraryLoader(uri, successCallback, errorCallback): +// dartDeferredLibraryLoader(uri, successCallback, errorCallback, loadId): // if this function is defined, it will be called when a deferred library // is loaded. It should load and eval the javascript of `uri`, and call // successCallback. If it fails to do so, it should call errorCallback with -// an error. +// an error. The loadId argument is the deferred import that resulted in +// this uri being loaded. // // dartCallInstrumentation(id, qualifiedName): // if this function is defined, it will be called at each entry of a // method or constructor. Used only when compiling programs with // --experiment-call-instrumentation. -// -// defaultPackagesBase: -// Override the location where `package:` uris are resolved from. By default -// they are resolved under "packages/" from the current window location. -{ -} (function dartProgram() { function copyProperties(from, to) { var keys = Object.keys(from); @@ -33,6 +28,17 @@ to[key] = from[key]; } } + function mixinPropertiesHard(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!to.hasOwnProperty(key)) + to[key] = from[key]; + } + } + function mixinPropertiesEasy(from, to) { + Object.assign(to, from); + } var supportsDirectProtoAccess = function() { var cls = function() { }; @@ -52,23 +58,6 @@ } return false; }(); - function setFunctionNamesIfNecessary(holders) { - function t() { - } - ; - if (typeof t.name == "string") - return; - for (var i = 0; i < holders.length; i++) { - var holder = holders[i]; - var keys = Object.keys(holder); - for (var j = 0; j < keys.length; j++) { - var key = keys[j]; - var f = holder[key]; - if (typeof f == 'function') - f.name = key; - } - } - } function inherit(cls, sup) { cls.prototype.constructor = cls; cls.prototype["$is" + cls.name] = cls; @@ -86,16 +75,20 @@ for (var i = 0; i < classes.length; i++) inherit(classes[i], sup); } - function mixin(cls, mixin) { - copyProperties(mixin.prototype, cls.prototype); + function mixinEasy(cls, mixin) { + mixinPropertiesEasy(mixin.prototype, cls.prototype); cls.prototype.constructor = cls; } - function lazy(holder, name, getterName, initializer) { + function mixinHard(cls, mixin) { + mixinPropertiesHard(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function lazyOld(holder, name, getterName, initializer) { var uninitializedSentinel = holder; holder[name] = uninitializedSentinel; holder[getterName] = function() { holder[getterName] = function() { - H.throwCyclicInit(name); + A.throwCyclicInit(name); }; var result; var sentinelInProgress = initializer; @@ -115,6 +108,35 @@ return result; }; } + function lazy(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) + holder[name] = initializer(); + holder[getterName] = function() { + return this[name]; + }; + return holder[name]; + }; + } + function lazyFinal(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) { + var value = initializer(); + if (holder[name] !== uninitializedSentinel) + A.throwLateFieldADI(name); + holder[name] = value; + } + var finalValue = holder[name]; + holder[getterName] = function() { + return finalValue; + }; + return finalValue; + }; + } function makeConstList(list) { list.immutable$list = Array; list.fixed$length = Array; @@ -132,45 +154,42 @@ convertToFastObject(arrayOfObjects[i]); } var functionCounter = 0; - function tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted) { - return isIntercepted ? new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(receiver) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, true, name);" + "return new c(this, funcs[0], receiver, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null) : new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, false, name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null); + function instanceTearOffGetter(isIntercepted, parameters) { + var cache = null; + return isIntercepted ? function(receiver) { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(receiver, this); + } : function() { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(this, null); + }; } - function tearOff(funcs, applyTrampolineIndex, reflectionInfo, isStatic, name, isIntercepted) { + function staticTearOffGetter(parameters) { var cache = null; - return isStatic ? function() { + return function() { if (cache === null) - cache = H.closureFromTearOff(this, funcs, applyTrampolineIndex, reflectionInfo, true, false, name).prototype; + cache = A.closureFromTearOff(parameters).prototype; return cache; - } : tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted); + }; } var typesOffset = 0; - function installTearOff(container, getterName, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { - var funs = []; - for (var i = 0; i < funsOrNames.length; i++) { - var fun = funsOrNames[i]; - if (typeof fun == 'string') - fun = container[fun]; - fun.$callName = callNames[i]; - funs.push(fun); - } - var fun = funs[0]; - fun.$requiredArgCount = requiredParameterCount; - fun.$defaultValues = optionalParameterDefaultValues; - var reflectionInfo = funType; - if (typeof reflectionInfo == "number") - reflectionInfo = reflectionInfo + typesOffset; - var name = funsOrNames[0]; - fun.$stubName = name; - var getterFunction = tearOff(funs, applyIndex || 0, reflectionInfo, isStatic, name, isIntercepted); - container[getterName] = getterFunction; - if (isStatic) - fun.$tearOff = getterFunction; + function tearOffParameters(container, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + if (typeof funType == "number") + funType += typesOffset; + return {co: container, iS: isStatic, iI: isIntercepted, rC: requiredParameterCount, dV: optionalParameterDefaultValues, cs: callNames, fs: funsOrNames, fT: funType, aI: applyIndex || 0, nDA: needsDirectAccess}; } - function installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { - return installTearOff(container, getterName, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex); + function installStaticTearOff(holder, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + var parameters = tearOffParameters(holder, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, false); + var getterFunction = staticTearOffGetter(parameters); + holder[getterName] = getterFunction; } - function installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { - return installTearOff(container, getterName, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex); + function installInstanceTearOff(prototype, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + isIntercepted = !!isIntercepted; + var parameters = tearOffParameters(prototype, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, !!needsDirectAccess); + var getterFunction = instanceTearOffGetter(isIntercepted, parameters); + prototype[getterName] = getterFunction; } function setOrUpdateInterceptorsByTag(newTags) { var tags = init.interceptorsByTag; @@ -201,7 +220,7 @@ var hunkHelpers = function() { var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { return function(container, getterName, name, funType) { - return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); + return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex, false); }; }, mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { @@ -209,26 +228,20 @@ return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); }; }; - return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, lazyOld: lazyOld, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; }(); function initializeDeferredHunk(hunk) { typesOffset = init.types.length; hunk(hunkHelpers, init, holders, $); } - function getGlobalFromName(name) { - for (var i = 0; i < holders.length; i++) { - if (holders[i] == C) - continue; - if (holders[i][name]) - return holders[i][name]; - } - } - var C = {}, - H = {JS_CONST: function JS_CONST() { + var A = {JS_CONST: function JS_CONST() { + }, + LateError$fieldADI(fieldName) { + return new A.LateError("Field '" + fieldName + "' has been assigned during initialization."); }, - hexDigitValue: function(char) { - var digit, letter; - digit = char ^ 48; + hexDigitValue(char) { + var letter, + digit = char ^ 48; if (digit <= 9) return digit; letter = char | 32; @@ -236,31 +249,68 @@ return letter - 87; return -1; }, - SubListIterable$: function(_iterable, _start, _endOrLength, $E) { - P.RangeError_checkNotNegative(_start, "start"); + SystemHash_combine(hash, value) { + hash = hash + value & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + return hash ^ hash >>> 6; + }, + SystemHash_finish(hash) { + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >>> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + checkNotNullable(value, $name, $T) { + return value; + }, + SubListIterable$(_iterable, _start, _endOrLength, $E) { + A.RangeError_checkNotNegative(_start, "start"); if (_endOrLength != null) { - P.RangeError_checkNotNegative(_endOrLength, "end"); + A.RangeError_checkNotNegative(_endOrLength, "end"); if (_start > _endOrLength) - H.throwExpression(P.RangeError$range(_start, 0, _endOrLength, "start", null)); + A.throwExpression(A.RangeError$range(_start, 0, _endOrLength, "start", null)); } - return new H.SubListIterable(_iterable, _start, _endOrLength, [$E]); + return new A.SubListIterable(_iterable, _start, _endOrLength, $E._eval$1("SubListIterable<0>")); + }, + MappedIterable_MappedIterable(iterable, $function, $S, $T) { + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthMappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); + return new A.MappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("MappedIterable<1,2>")); + }, + TakeIterable_TakeIterable(iterable, takeCount, $E) { + var _s9_ = "takeCount"; + A.ArgumentError_checkNotNull(takeCount, _s9_, type$.int); + A.RangeError_checkNotNegative(takeCount, _s9_); + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthTakeIterable(iterable, takeCount, $E._eval$1("EfficientLengthTakeIterable<0>")); + return new A.TakeIterable(iterable, takeCount, $E._eval$1("TakeIterable<0>")); + }, + IterableElementError_noElement() { + return new A.StateError("No element"); + }, + IterableElementError_tooFew() { + return new A.StateError("Too few elements"); }, - MappedIterable_MappedIterable: function(iterable, $function, $S, $T) { - H.assertSubtype(iterable, "$isIterable", [$S], "$asIterable"); - H.functionTypeCheck($function, {func: 1, ret: $T, args: [$S]}); - if (!!J.getInterceptor$(iterable).$isEfficientLengthIterable) - return new H.EfficientLengthMappedIterable(iterable, $function, [$S, $T]); - return new H.MappedIterable(iterable, $function, [$S, $T]); + CastStream: function CastStream(t0, t1) { + this._source = t0; + this.$ti = t1; }, - IterableElementError_noElement: function() { - return new P.StateError("No element"); + CastStreamSubscription: function CastStreamSubscription(t0, t1, t2) { + var _ = this; + _._source = t0; + _.__internal$_zone = t1; + _._handleError = _._handleData = null; + _.$ti = t2; }, - IterableElementError_tooFew: function() { - return new P.StateError("Too few elements"); + LateError: function LateError(t0) { + this._message = t0; }, CodeUnits: function CodeUnits(t0) { this._string = t0; }, + nullFuture_closure: function nullFuture_closure() { + }, + SentinelValue: function SentinelValue() { + }, EfficientLengthIterable: function EfficientLengthIterable() { }, ListIterable: function ListIterable() { @@ -272,13 +322,13 @@ _._endOrLength = t2; _.$ti = t3; }, - ListIterator: function ListIterator(t0, t1, t2, t3) { + ListIterator: function ListIterator(t0, t1, t2) { var _ = this; _.__internal$_iterable = t0; _.__internal$_length = t1; - _.__internal$_index = t2; + _.__internal$_index = 0; _.__internal$_current = null; - _.$ti = t3; + _.$ti = t2; }, MappedIterable: function MappedIterable(t0, t1, t2) { this.__internal$_iterable = t0; @@ -325,6 +375,21 @@ _.__internal$_current = null; _.$ti = t3; }, + TakeIterable: function TakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + EfficientLengthTakeIterable: function EfficientLengthTakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + TakeIterator: function TakeIterator(t0, t1, t2) { + this._iterator = t0; + this._remaining = t1; + this.$ti = t2; + }, SkipWhileIterable: function SkipWhileIterable(t0, t1, t2) { this.__internal$_iterable = t0; this._f = t1; @@ -340,6 +405,14 @@ EmptyIterator: function EmptyIterator(t0) { this.$ti = t0; }, + WhereTypeIterable: function WhereTypeIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + WhereTypeIterator: function WhereTypeIterator(t0, t1) { + this._source = t0; + this.$ti = t1; + }, FixedLengthListMixin: function FixedLengthListMixin() { }, UnmodifiableListMixin: function UnmodifiableListMixin() { @@ -351,41 +424,31 @@ this.$ti = t1; }, Symbol: function Symbol(t0) { - this.__internal$_name = t0; + this._name = t0; }, - ConstantMap__throwUnmodifiable: function() { - throw H.wrapException(P.UnsupportedError$("Cannot modify unmodifiable Map")); + ConstantMap__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable Map")); }, - instantiate1: function(f, T1) { - var t1; - H.interceptedTypeCheck(f, "$isClosure"); - t1 = new H.Instantiation1(f, [T1]); - t1.Instantiation$1(f); - return t1; - }, - unminifyOrTag: function(rawClassName) { - var preserved = H.stringTypeCheck(init.mangledGlobalNames[rawClassName]); - if (typeof preserved === "string") + unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) return preserved; return rawClassName; }, - getType: function(index) { - return init.types[H.intTypeCheck(index)]; - }, - isJsIndexable: function(object, record) { + isJsIndexable(object, record) { var result; if (record != null) { result = record.x; if (result != null) return result; } - return !!J.getInterceptor$(object).$isJavaScriptIndexingBehavior; + return type$.JavaScriptIndexingBehavior_dynamic._is(object); }, - S: function(value) { - var res; - if (typeof value === "string") + S(value) { + var result; + if (typeof value == "string") return value; - if (typeof value === "number") { + if (typeof value == "number") { if (value !== 0) return "" + value; } else if (true === value) @@ -394,89 +457,83 @@ return "false"; else if (value == null) return "null"; - res = J.toString$0$(value); - if (typeof res !== "string") - throw H.wrapException(H.argumentErrorValue(value)); - return res; + result = J.toString$0$(value); + return result; }, - Primitives_objectHashCode: function(object) { - var hash = object.$identityHash; + Primitives_objectHashCode(object) { + var hash, + property = $.Primitives__identityHashCodeProperty; + if (property == null) + property = $.Primitives__identityHashCodeProperty = Symbol("identityHashCode"); + hash = object[property]; if (hash == null) { hash = Math.random() * 0x3fffffff | 0; - object.$identityHash = hash; + object[property] = hash; } return hash; }, - Primitives_parseInt: function(source, radix) { - var match, decimalMatch, maxCharCode, digitsPart, t1, i; - if (typeof source !== "string") - H.throwExpression(H.argumentErrorValue(source)); - match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); + Primitives_parseInt(source, radix) { + var decimalMatch, maxCharCode, digitsPart, t1, i, _null = null, + match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); if (match == null) - return; + return _null; if (3 >= match.length) - return H.ioore(match, 3); - decimalMatch = H.stringTypeCheck(match[3]); + return A.ioore(match, 3); + decimalMatch = match[3]; if (radix == null) { if (decimalMatch != null) return parseInt(source, 10); if (match[2] != null) return parseInt(source, 16); - return; + return _null; } if (radix < 2 || radix > 36) - throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null)); + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", _null)); if (radix === 10 && decimalMatch != null) return parseInt(source, 10); if (radix < 10 || decimalMatch == null) { maxCharCode = radix <= 10 ? 47 + radix : 86 + radix; digitsPart = match[1]; for (t1 = digitsPart.length, i = 0; i < t1; ++i) - if ((C.JSString_methods._codeUnitAt$1(digitsPart, i) | 32) > maxCharCode) - return; + if ((B.JSString_methods._codeUnitAt$1(digitsPart, i) | 32) > maxCharCode) + return _null; } return parseInt(source, radix); }, - Primitives_objectTypeName: function(object) { - return H.Primitives__objectClassName(object) + H._joinArguments(H.getRuntimeTypeInfo(object), 0, null); + Primitives_objectTypeName(object) { + return A.Primitives__objectTypeNameNewRti(object); }, - Primitives__objectClassName: function(object) { - var interceptor, interceptorConstructor, interceptorConstructorName, $name, t1, dispatchName, objectConstructor, match, decompiledName; + Primitives__objectTypeNameNewRti(object) { + var interceptor, dispatchName, t1, $constructor, constructorName; + if (object instanceof A.Object) + return A._rtiToString(A.instanceType(object), null); interceptor = J.getInterceptor$(object); - interceptorConstructor = interceptor.constructor; - if (typeof interceptorConstructor == "function") { - interceptorConstructorName = interceptorConstructor.name; - $name = typeof interceptorConstructorName === "string" ? interceptorConstructorName : null; - } else - $name = null; - t1 = $name == null; - if (t1 || interceptor === C.Interceptor_methods || !!interceptor.$isUnknownJavaScriptObject) { - dispatchName = C.C_JS_CONST(object); + if (interceptor === B.Interceptor_methods || interceptor === B.JavaScriptObject_methods || type$.UnknownJavaScriptObject._is(object)) { + dispatchName = B.C_JS_CONST(object); + t1 = dispatchName !== "Object" && dispatchName !== ""; if (t1) - $name = dispatchName; - if (dispatchName === "Object") { - objectConstructor = object.constructor; - if (typeof objectConstructor == "function") { - match = String(objectConstructor).match(/^\s*function\s*([\w$]*)\s*\(/); - decompiledName = match == null ? null : match[1]; - if (typeof decompiledName === "string" && /^\w+$/.test(decompiledName)) - $name = decompiledName; - } + return dispatchName; + $constructor = object.constructor; + if (typeof $constructor == "function") { + constructorName = $constructor.name; + if (typeof constructorName == "string") + t1 = constructorName !== "Object" && constructorName !== ""; + else + t1 = false; + if (t1) + return constructorName; } - return $name; } - $name = $name; - return H.unminifyOrTag($name.length > 1 && C.JSString_methods._codeUnitAt$1($name, 0) === 36 ? C.JSString_methods.substring$1($name, 1) : $name); + return A._rtiToString(A.instanceType(object), null); }, - Primitives_currentUri: function() { + Primitives_currentUri() { if (!!self.location) return self.location.href; - return; + return null; }, - Primitives__fromCharCodeApply: function(array) { - var end, result, i, i0, chunkEnd; - H.listTypeCheck(array); - end = J.get$length$asx(array); + Primitives__fromCharCodeApply(array) { + var result, i, i0, chunkEnd, + end = array.length; if (end <= 500) return String.fromCharCode.apply(null, array); for (result = "", i = 0; i < end; i = i0) { @@ -486,37 +543,37 @@ } return result; }, - Primitives_stringFromCodePoints: function(codePoints) { - var a, t1, _i, i; - a = H.setRuntimeTypeInfo([], [P.int]); - for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, H.throwConcurrentModificationError)(codePoints), ++_i) { + Primitives_stringFromCodePoints(codePoints) { + var t1, _i, i, + a = A._setArrayType([], type$.JSArray_int); + for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, A.throwConcurrentModificationError)(codePoints), ++_i) { i = codePoints[_i]; - if (typeof i !== "number" || Math.floor(i) !== i) - throw H.wrapException(H.argumentErrorValue(i)); + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); if (i <= 65535) - C.JSArray_methods.add$1(a, i); + B.JSArray_methods.add$1(a, i); else if (i <= 1114111) { - C.JSArray_methods.add$1(a, 55296 + (C.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023)); - C.JSArray_methods.add$1(a, 56320 + (i & 1023)); + B.JSArray_methods.add$1(a, 55296 + (B.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023)); + B.JSArray_methods.add$1(a, 56320 + (i & 1023)); } else - throw H.wrapException(H.argumentErrorValue(i)); + throw A.wrapException(A.argumentErrorValue(i)); } - return H.Primitives__fromCharCodeApply(a); + return A.Primitives__fromCharCodeApply(a); }, - Primitives_stringFromCharCodes: function(charCodes) { + Primitives_stringFromCharCodes(charCodes) { var t1, _i, i; for (t1 = charCodes.length, _i = 0; _i < t1; ++_i) { i = charCodes[_i]; - if (typeof i !== "number" || Math.floor(i) !== i) - throw H.wrapException(H.argumentErrorValue(i)); + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); if (i < 0) - throw H.wrapException(H.argumentErrorValue(i)); + throw A.wrapException(A.argumentErrorValue(i)); if (i > 65535) - return H.Primitives_stringFromCodePoints(charCodes); + return A.Primitives_stringFromCodePoints(charCodes); } - return H.Primitives__fromCharCodeApply(charCodes); + return A.Primitives__fromCharCodeApply(charCodes); }, - Primitives_stringFromNativeUint8List: function(charCodes, start, end) { + Primitives_stringFromNativeUint8List(charCodes, start, end) { var i, result, i0, chunkEnd; if (end <= 500 && start === 0 && end === charCodes.length) return String.fromCharCode.apply(null, charCodes); @@ -527,233 +584,228 @@ } return result; }, - Primitives_stringFromCharCode: function(charCode) { + Primitives_stringFromCharCode(charCode) { var bits; - if (typeof charCode !== "number") - return H.iae(charCode); if (0 <= charCode) { if (charCode <= 65535) return String.fromCharCode(charCode); if (charCode <= 1114111) { bits = charCode - 65536; - return String.fromCharCode((55296 | C.JSInt_methods._shrOtherPositive$1(bits, 10)) >>> 0, 56320 | bits & 1023); + return String.fromCharCode((B.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); } } - throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null)); + throw A.wrapException(A.RangeError$range(charCode, 0, 1114111, null, null)); }, - Primitives_lazyAsJsDate: function(receiver) { + Primitives_lazyAsJsDate(receiver) { if (receiver.date === void 0) - receiver.date = new Date(receiver._core$_value); + receiver.date = new Date(receiver._value); return receiver.date; }, - Primitives_getYear: function(receiver) { - var t1 = H.Primitives_lazyAsJsDate(receiver).getUTCFullYear() + 0; + Primitives_getYear(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getUTCFullYear() + 0; return t1; }, - Primitives_getMonth: function(receiver) { - var t1 = H.Primitives_lazyAsJsDate(receiver).getUTCMonth() + 1; + Primitives_getMonth(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getUTCMonth() + 1; return t1; }, - Primitives_getDay: function(receiver) { - var t1 = H.Primitives_lazyAsJsDate(receiver).getUTCDate() + 0; + Primitives_getDay(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getUTCDate() + 0; return t1; }, - Primitives_getHours: function(receiver) { - var t1 = H.Primitives_lazyAsJsDate(receiver).getUTCHours() + 0; + Primitives_getHours(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getUTCHours() + 0; return t1; }, - Primitives_getMinutes: function(receiver) { - var t1 = H.Primitives_lazyAsJsDate(receiver).getUTCMinutes() + 0; + Primitives_getMinutes(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getUTCMinutes() + 0; return t1; }, - Primitives_getSeconds: function(receiver) { - var t1 = H.Primitives_lazyAsJsDate(receiver).getUTCSeconds() + 0; + Primitives_getSeconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getUTCSeconds() + 0; return t1; }, - Primitives_getMilliseconds: function(receiver) { - var t1 = H.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0; + Primitives_getMilliseconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0; return t1; }, - Primitives_functionNoSuchMethod: function($function, positionalArguments, namedArguments) { - var t1, $arguments, namedArgumentList; - t1 = {}; - H.assertSubtype(namedArguments, "$isMap", [P.String, null], "$asMap"); + Primitives_functionNoSuchMethod($function, positionalArguments, namedArguments) { + var $arguments, namedArgumentList, t1 = {}; t1.argumentCount = 0; $arguments = []; namedArgumentList = []; t1.argumentCount = positionalArguments.length; - C.JSArray_methods.addAll$1($arguments, positionalArguments); + B.JSArray_methods.addAll$1($arguments, positionalArguments); t1.names = ""; if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - namedArguments.forEach$1(0, new H.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); - "" + t1.argumentCount; - return J.noSuchMethod$1$($function, new H.JSInvocationMirror(C.Symbol_call, 0, $arguments, namedArgumentList, 0)); - }, - Primitives_applyFunction: function($function, positionalArguments, namedArguments) { - var t1, $arguments, argumentCount, jsStub; - H.assertSubtype(namedArguments, "$isMap", [P.String, null], "$asMap"); - if (positionalArguments instanceof Array) + namedArguments.forEach$1(0, new A.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); + return J.noSuchMethod$1$($function, new A.JSInvocationMirror(B.Symbol_call, 0, $arguments, namedArgumentList, 0)); + }, + Primitives_applyFunction($function, positionalArguments, namedArguments) { + var t1, argumentCount, jsStub; + if (Array.isArray(positionalArguments)) t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; else t1 = false; if (t1) { - $arguments = positionalArguments; - argumentCount = $arguments.length; + argumentCount = positionalArguments.length; if (argumentCount === 0) { if (!!$function.call$0) return $function.call$0(); } else if (argumentCount === 1) { if (!!$function.call$1) - return $function.call$1($arguments[0]); + return $function.call$1(positionalArguments[0]); } else if (argumentCount === 2) { if (!!$function.call$2) - return $function.call$2($arguments[0], $arguments[1]); + return $function.call$2(positionalArguments[0], positionalArguments[1]); } else if (argumentCount === 3) { if (!!$function.call$3) - return $function.call$3($arguments[0], $arguments[1], $arguments[2]); + return $function.call$3(positionalArguments[0], positionalArguments[1], positionalArguments[2]); } else if (argumentCount === 4) { if (!!$function.call$4) - return $function.call$4($arguments[0], $arguments[1], $arguments[2], $arguments[3]); + return $function.call$4(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3]); } else if (argumentCount === 5) if (!!$function.call$5) - return $function.call$5($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]); + return $function.call$5(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3], positionalArguments[4]); jsStub = $function["call" + "$" + argumentCount]; if (jsStub != null) - return jsStub.apply($function, $arguments); + return jsStub.apply($function, positionalArguments); } - return H.Primitives__genericApplyFunction2($function, positionalArguments, namedArguments); + return A.Primitives__generalApplyFunction($function, positionalArguments, namedArguments); }, - Primitives__genericApplyFunction2: function($function, positionalArguments, namedArguments) { - var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, used, t2; - H.assertSubtype(namedArguments, "$isMap", [P.String, null], "$asMap"); - if (positionalArguments != null) - $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, true, null); - else - $arguments = []; - argumentCount = $arguments.length; - requiredParameterCount = $function.$requiredArgCount; + Primitives__generalApplyFunction($function, positionalArguments, namedArguments) { + var defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, maxArguments, missingDefaults, keys, _i, defaultValue, used, key, + $arguments = Array.isArray(positionalArguments) ? positionalArguments : A.List_List$of(positionalArguments, true, type$.dynamic), + argumentCount = $arguments.length, + requiredParameterCount = $function.$requiredArgCount; if (argumentCount < requiredParameterCount) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); defaultValuesClosure = $function.$defaultValues; t1 = defaultValuesClosure == null; defaultValues = !t1 ? defaultValuesClosure() : null; interceptor = J.getInterceptor$($function); jsFunction = interceptor["call*"]; - if (typeof jsFunction === "string") + if (typeof jsFunction == "string") jsFunction = interceptor[jsFunction]; if (t1) { if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); if (argumentCount === requiredParameterCount) return jsFunction.apply($function, $arguments); - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); } - if (defaultValues instanceof Array) { + if (Array.isArray(defaultValues)) { if (namedArguments != null && namedArguments.__js_helper$_length !== 0) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); - if (argumentCount > requiredParameterCount + defaultValues.length) - return H.Primitives_functionNoSuchMethod($function, $arguments, null); - C.JSArray_methods.addAll$1($arguments, defaultValues.slice(argumentCount - requiredParameterCount)); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + maxArguments = requiredParameterCount + defaultValues.length; + if (argumentCount > maxArguments) + return A.Primitives_functionNoSuchMethod($function, $arguments, null); + if (argumentCount < maxArguments) { + missingDefaults = defaultValues.slice(argumentCount - requiredParameterCount); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); + B.JSArray_methods.addAll$1($arguments, missingDefaults); + } return jsFunction.apply($function, $arguments); } else { if (argumentCount > requiredParameterCount) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if ($arguments === positionalArguments) + $arguments = A.List_List$of($arguments, true, type$.dynamic); keys = Object.keys(defaultValues); if (namedArguments == null) - for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) - C.JSArray_methods.add$1($arguments, defaultValues[H.stringTypeCheck(keys[_i])]); + for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + defaultValue = defaultValues[A._asString(keys[_i])]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } else { - for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) { - t2 = H.stringTypeCheck(keys[_i]); - if (namedArguments.containsKey$1(t2)) { + for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + key = A._asString(keys[_i]); + if (namedArguments.containsKey$1(key)) { ++used; - C.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2)); - } else - C.JSArray_methods.add$1($arguments, defaultValues[t2]); + B.JSArray_methods.add$1($arguments, namedArguments.$index(0, key)); + } else { + defaultValue = defaultValues[key]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } } if (used !== namedArguments.__js_helper$_length) - return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); } return jsFunction.apply($function, $arguments); } }, - iae: function(argument) { - throw H.wrapException(H.argumentErrorValue(argument)); + iae(argument) { + throw A.wrapException(A.argumentErrorValue(argument)); }, - ioore: function(receiver, index) { + ioore(receiver, index) { if (receiver == null) J.get$length$asx(receiver); - throw H.wrapException(H.diagnoseIndexError(receiver, index)); - }, - diagnoseIndexError: function(indexable, index) { - var $length, t1; - if (typeof index !== "number" || Math.floor(index) !== index) - return new P.ArgumentError(true, index, "index", null); - $length = H.intTypeCheck(J.get$length$asx(indexable)); - if (!(index < 0)) { - if (typeof $length !== "number") - return H.iae($length); - t1 = index >= $length; - } else - t1 = true; - if (t1) - return P.IndexError$(index, indexable, "index", null, $length); - return P.RangeError$value(index, "index"); - }, - diagnoseRangeError: function(start, end, $length) { + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + }, + diagnoseIndexError(indexable, index) { + var $length, _s5_ = "index"; + if (!A._isInt(index)) + return new A.ArgumentError(true, index, _s5_, null); + $length = A._asInt(J.get$length$asx(indexable)); + if (index < 0 || index >= $length) + return A.IndexError$(index, indexable, _s5_, null, $length); + return A.RangeError$value(index, _s5_); + }, + diagnoseRangeError(start, end, $length) { if (start > $length) - return new P.RangeError(0, $length, true, start, "start", "Invalid value"); + return A.RangeError$range(start, 0, $length, "start", null); if (end != null) if (end < start || end > $length) - return new P.RangeError(start, $length, true, end, "end", "Invalid value"); - return new P.ArgumentError(true, end, "end", null); - }, - argumentErrorValue: function(object) { - return new P.ArgumentError(true, object, null, null); + return A.RangeError$range(end, start, $length, "end", null); + return new A.ArgumentError(true, end, "end", null); }, - checkNum: function(value) { - if (typeof value !== "number") - throw H.wrapException(H.argumentErrorValue(value)); - return value; + argumentErrorValue(object) { + return new A.ArgumentError(true, object, null, null); }, - wrapException: function(ex) { - var wrapper; + wrapException(ex) { + var wrapper, t1; if (ex == null) - ex = new P.NullThrownError(); + ex = new A.NullThrownError(); wrapper = new Error(); wrapper.dartException = ex; + t1 = A.toStringWrapper; if ("defineProperty" in Object) { - Object.defineProperty(wrapper, "message", {get: H.toStringWrapper}); + Object.defineProperty(wrapper, "message", {get: t1}); wrapper.name = ""; } else - wrapper.toString = H.toStringWrapper; + wrapper.toString = t1; return wrapper; }, - toStringWrapper: function() { + toStringWrapper() { return J.toString$0$(this.dartException); }, - throwExpression: function(ex) { - throw H.wrapException(ex); + throwExpression(ex) { + throw A.wrapException(ex); }, - throwConcurrentModificationError: function(collection) { - throw H.wrapException(P.ConcurrentModificationError$(collection)); + throwConcurrentModificationError(collection) { + throw A.wrapException(A.ConcurrentModificationError$(collection)); }, - TypeErrorDecoder_extractPattern: function(message) { + TypeErrorDecoder_extractPattern(message) { var match, $arguments, argumentsExpr, expr, method, receiver; - message = message.replace(String({}), '$receiver$').replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); + message = A.quoteStringForRegExp(message.replace(String({}), "$receiver$")); match = message.match(/\\\$[a-zA-Z]+\\\$/g); if (match == null) - match = H.setRuntimeTypeInfo([], [P.String]); + match = A._setArrayType([], type$.JSArray_String); $arguments = match.indexOf("\\$arguments\\$"); argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); expr = match.indexOf("\\$expr\\$"); method = match.indexOf("\\$method\\$"); receiver = match.indexOf("\\$receiver\\$"); - return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); + return new A.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); }, - TypeErrorDecoder_provokeCallErrorOn: function(expression) { + TypeErrorDecoder_provokeCallErrorOn(expression) { return function($expr$) { - var $argumentsExpr$ = '$arguments$'; + var $argumentsExpr$ = "$arguments$"; try { $expr$.$method$($argumentsExpr$); } catch (e) { @@ -761,7 +813,7 @@ } }(expression); }, - TypeErrorDecoder_provokePropertyErrorOn: function(expression) { + TypeErrorDecoder_provokePropertyErrorOn(expression) { return function($expr$) { try { $expr$.$method$; @@ -770,39 +822,47 @@ } }(expression); }, - NullError$: function(_message, match) { - return new H.NullError(_message, match == null ? null : match.method); - }, - JsNoSuchMethodError$: function(_message, match) { - var t1, t2; - t1 = match == null; - t2 = t1 ? null : match.method; - return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); + JsNoSuchMethodError$(_message, match) { + var t1 = match == null, + t2 = t1 ? null : match.method; + return new A.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); }, - unwrapException: function(ex) { - var t1, message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t2; - t1 = new H.unwrapException_saveStackTrace(ex); + unwrapException(ex) { + var t1; if (ex == null) - return; - if (ex instanceof H.ExceptionAndStackTrace) - return t1.call$1(ex.dartException); + return new A.NullThrownFromJavaScriptException(ex); + if (ex instanceof A.ExceptionAndStackTrace) { + t1 = ex.dartException; + return A.saveStackTrace(ex, t1 == null ? type$.Object._as(t1) : t1); + } if (typeof ex !== "object") return ex; if ("dartException" in ex) - return t1.call$1(ex.dartException); - else if (!("message" in ex)) + return A.saveStackTrace(ex, ex.dartException); + return A._unwrapNonDartException(ex); + }, + saveStackTrace(ex, error) { + if (type$.Error._is(error)) + if (error.$thrownJsError == null) + error.$thrownJsError = ex; + return error; + }, + _unwrapNonDartException(ex) { + var message, number, ieErrorCode, t1, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, _null = null; + if (!("message" in ex)) return ex; message = ex.message; if ("number" in ex && typeof ex.number == "number") { number = ex.number; ieErrorCode = number & 65535; - if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) + if ((B.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) switch (ieErrorCode) { case 438: - return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", null)); + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A.S(message) + " (Error " + ieErrorCode + ")", _null)); case 445: case 5007: - return t1.call$1(H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", null)); + t1 = A.S(message); + return A.saveStackTrace(ex, new A.NullError(t1 + " (Error " + ieErrorCode + ")", _null)); } } if (ex instanceof TypeError) { @@ -818,12 +878,12 @@ undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); match = nsme.matchTypeError$1(message); if (match != null) - return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match)); + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A._asString(message), match)); else { match = notClosure.matchTypeError$1(message); if (match != null) { match.method = "call"; - return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match)); + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A._asString(message), match)); } else { match = nullCall.matchTypeError$1(message); if (match == null) { @@ -840,30 +900,32 @@ match = undefProperty.matchTypeError$1(message); if (match == null) { match = undefLiteralProperty.matchTypeError$1(message); - t2 = match != null; + t1 = match != null; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; + t1 = true; } else - t2 = true; - if (t2) - return t1.call$1(H.NullError$(H.stringTypeCheck(message), match)); + t1 = true; + if (t1) { + A._asString(message); + return A.saveStackTrace(ex, new A.NullError(message, match == null ? _null : match.method)); + } } } - return t1.call$1(new H.UnknownJsTypeError(typeof message === "string" ? message : "")); + return A.saveStackTrace(ex, new A.UnknownJsTypeError(typeof message == "string" ? message : "")); } if (ex instanceof RangeError) { - if (typeof message === "string" && message.indexOf("call stack") !== -1) - return new P.StackOverflowError(); + if (typeof message == "string" && message.indexOf("call stack") !== -1) + return new A.StackOverflowError(); message = function(ex) { try { return String(ex); @@ -871,27 +933,33 @@ } return null; }(ex); - return t1.call$1(new P.ArgumentError(false, null, null, typeof message === "string" ? message.replace(/^RangeError:\s*/, "") : message)); + return A.saveStackTrace(ex, new A.ArgumentError(false, _null, _null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); } if (typeof InternalError == "function" && ex instanceof InternalError) - if (typeof message === "string" && message === "too much recursion") - return new P.StackOverflowError(); + if (typeof message == "string" && message === "too much recursion") + return new A.StackOverflowError(); return ex; }, - getTraceFromException: function(exception) { + getTraceFromException(exception) { var trace; - if (exception instanceof H.ExceptionAndStackTrace) + if (exception instanceof A.ExceptionAndStackTrace) return exception.stackTrace; if (exception == null) - return new H._StackTrace(exception); + return new A._StackTrace(exception); trace = exception.$cachedTrace; if (trace != null) return trace; - return exception.$cachedTrace = new H._StackTrace(exception); + return exception.$cachedTrace = new A._StackTrace(exception); + }, + objectHashCode(object) { + if (object == null || typeof object != "object") + return J.get$hashCode$(object); + else + return A.Primitives_objectHashCode(object); }, - fillLiteralMap: function(keyValuePairs, result) { - var $length, index, index0, index1; - $length = keyValuePairs.length; + fillLiteralMap(keyValuePairs, result) { + var index, index0, index1, + $length = keyValuePairs.length; for (index = 0; index < $length; index = index1) { index0 = index + 1; index1 = index0 + 1; @@ -899,9 +967,9 @@ } return result; }, - invokeClosure: function(closure, numberOfArguments, arg1, arg2, arg3, arg4) { - H.interceptedTypeCheck(closure, "$isFunction"); - switch (H.intTypeCheck(numberOfArguments)) { + invokeClosure(closure, numberOfArguments, arg1, arg2, arg3, arg4) { + type$.Function._as(closure); + switch (A._asInt(numberOfArguments)) { case 0: return closure.call$0(); case 1: @@ -913,13 +981,12 @@ case 4: return closure.call$4(arg1, arg2, arg3, arg4); } - throw H.wrapException(new P._Exception("Unsupported number of arguments for wrapped closure")); + throw A.wrapException(new A._Exception("Unsupported number of arguments for wrapped closure")); }, - convertDartClosureToJS: function(closure, arity) { + convertDartClosureToJS(closure, arity) { var $function; - H.intTypeCheck(arity); if (closure == null) - return; + return null; $function = closure.$identity; if (!!$function) return $function; @@ -927,928 +994,323 @@ return function(a1, a2, a3, a4) { return invoke(closure, arity, a1, a2, a3, a4); }; - }(closure, arity, H.invokeClosure); + }(closure, arity, A.invokeClosure); closure.$identity = $function; return $function; }, - Closure_fromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, propertyName) { - var $function, callName, $prototype, $constructor, t1, trampoline, signatureFunction, getReceiver, applyTrampoline, i, stub, stubCallName; - $function = functions[0]; - callName = $function.$callName; - $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(null, null, null, null).constructor.prototype); + Closure_fromTearOff(parameters) { + var $prototype, $constructor, t2, trampoline, applyTrampoline, i, stub, stub0, stubName, stubCallName, + container = parameters.co, + isStatic = parameters.iS, + isIntercepted = parameters.iI, + needsDirectAccess = parameters.nDA, + applyTrampolineIndex = parameters.aI, + funsOrNames = parameters.fs, + callNames = parameters.cs, + $name = funsOrNames[0], + callName = callNames[0], + $function = container[$name], + t1 = parameters.fT; + t1.toString; + $prototype = isStatic ? Object.create(new A.StaticClosure().constructor.prototype) : Object.create(new A.BoundClosure(null, null).constructor.prototype); $prototype.$initialize = $prototype.constructor; if (isStatic) $constructor = function static_tear_off() { this.$initialize(); }; - else { - t1 = $.Closure_functionCounter; - if (typeof t1 !== "number") - return t1.$add(); - $.Closure_functionCounter = t1 + 1; - t1 = new Function("a,b,c,d" + t1, "this.$initialize(a,b,c,d" + t1 + ")"); - $constructor = t1; - } + else + $constructor = function tear_off(a, b) { + this.$initialize(a, b); + }; $prototype.constructor = $constructor; $constructor.prototype = $prototype; - if (!isStatic) { - trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted); - trampoline.$reflectionInfo = reflectionInfo; - } else { - $prototype.$static_name = propertyName; + $prototype.$_name = $name; + $prototype.$_target = $function; + t2 = !isStatic; + if (t2) + trampoline = A.Closure_forwardCallTo($name, $function, isIntercepted, needsDirectAccess); + else { + $prototype.$static_name = $name; trampoline = $function; } - if (typeof reflectionInfo == "number") - signatureFunction = function(getType, t) { - return function() { - return getType(t); - }; - }(H.getType, reflectionInfo); - else if (typeof reflectionInfo == "function") - if (isStatic) - signatureFunction = reflectionInfo; - else { - getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_selfOf; - signatureFunction = function(f, r) { - return function() { - return f.apply({$receiver: r(this)}, arguments); - }; - }(reflectionInfo, getReceiver); - } - else - throw H.wrapException("Error in reflectionInfo."); - $prototype.$signature = signatureFunction; + $prototype.$signature = A.Closure__computeSignatureFunctionNewRti(t1, isStatic, isIntercepted); $prototype[callName] = trampoline; - for (applyTrampoline = trampoline, i = 1; i < functions.length; ++i) { - stub = functions[i]; - stubCallName = stub.$callName; + for (applyTrampoline = trampoline, i = 1; i < funsOrNames.length; ++i) { + stub = funsOrNames[i]; + if (typeof stub == "string") { + stub0 = container[stub]; + stubName = stub; + stub = stub0; + } else + stubName = ""; + stubCallName = callNames[i]; if (stubCallName != null) { - stub = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isIntercepted); + if (t2) + stub = A.Closure_forwardCallTo(stubName, stub, isIntercepted, needsDirectAccess); $prototype[stubCallName] = stub; } - if (i === applyTrampolineIndex) { - stub.$reflectionInfo = reflectionInfo; + if (i === applyTrampolineIndex) applyTrampoline = stub; - } } $prototype["call*"] = applyTrampoline; - $prototype.$requiredArgCount = $function.$requiredArgCount; - $prototype.$defaultValues = $function.$defaultValues; + $prototype.$requiredArgCount = parameters.rC; + $prototype.$defaultValues = parameters.dV; return $constructor; }, - Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) { - var getSelf = H.BoundClosure_selfOf; - switch (isSuperCall ? -1 : arity) { + Closure__computeSignatureFunctionNewRti(functionType, isStatic, isIntercepted) { + if (typeof functionType == "number") + return functionType; + if (typeof functionType == "string") { + if (isStatic) + throw A.wrapException("Cannot compute signature for static tearoff."); + return function(recipe, evalOnReceiver) { + return function() { + return evalOnReceiver(this, recipe); + }; + }(functionType, A.BoundClosure_evalRecipe); + } + throw A.wrapException("Error in functionType of tearoff"); + }, + Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf; + switch (needsDirectAccess ? -1 : arity) { case 0: - return function(n, S) { + return function(entry, receiverOf) { return function() { - return S(this)[n](); + return receiverOf(this)[entry](); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 1: - return function(n, S) { + return function(entry, receiverOf) { return function(a) { - return S(this)[n](a); + return receiverOf(this)[entry](a); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 2: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b) { - return S(this)[n](a, b); + return receiverOf(this)[entry](a, b); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 3: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b, c) { - return S(this)[n](a, b, c); + return receiverOf(this)[entry](a, b, c); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 4: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b, c, d) { - return S(this)[n](a, b, c, d); + return receiverOf(this)[entry](a, b, c, d); }; - }(stubName, getSelf); + }(stubName, getReceiver); case 5: - return function(n, S) { + return function(entry, receiverOf) { return function(a, b, c, d, e) { - return S(this)[n](a, b, c, d, e); + return receiverOf(this)[entry](a, b, c, d, e); }; - }(stubName, getSelf); + }(stubName, getReceiver); default: - return function(f, s) { + return function(f, receiverOf) { return function() { - return f.apply(s(this), arguments); + return f.apply(receiverOf(this), arguments); }; - }($function, getSelf); + }($function, getReceiver); } }, - Closure_forwardCallTo: function(receiver, $function, isIntercepted) { - var stubName, arity, lookedUpFunction, t1, t2, selfName, $arguments; + Closure_forwardCallTo(stubName, $function, isIntercepted, needsDirectAccess) { + var arity, t1; if (isIntercepted) - return H.Closure_forwardInterceptedCallTo(receiver, $function); - stubName = $function.$stubName; + return A.Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess); arity = $function.length; - lookedUpFunction = receiver[stubName]; - t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; - t2 = !t1 || arity >= 27; - if (t2) - return H.Closure_cspForwardCall(arity, !t1, stubName, $function); - if (arity === 0) { - t1 = $.Closure_functionCounter; - if (typeof t1 !== "number") - return t1.$add(); - $.Closure_functionCounter = t1 + 1; - selfName = "self" + t1; - t1 = "return function(){var " + selfName + " = this."; - t2 = $.BoundClosure_selfFieldNameCache; - if (t2 == null) { - t2 = H.BoundClosure_computeFieldNamed("self"); - $.BoundClosure_selfFieldNameCache = t2; - } - return new Function(t1 + H.S(t2) + ";return " + selfName + "." + H.S(stubName) + "();}")(); - } - $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(","); - t1 = $.Closure_functionCounter; - if (typeof t1 !== "number") - return t1.$add(); - $.Closure_functionCounter = t1 + 1; - $arguments += t1; - t1 = "return function(" + $arguments + "){return this."; - t2 = $.BoundClosure_selfFieldNameCache; - if (t2 == null) { - t2 = H.BoundClosure_computeFieldNamed("self"); - $.BoundClosure_selfFieldNameCache = t2; - } - return new Function(t1 + H.S(t2) + "." + H.S(stubName) + "(" + $arguments + ");}")(); - }, - Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) { - var getSelf, getReceiver; - getSelf = H.BoundClosure_selfOf; - getReceiver = H.BoundClosure_receiverOf; - switch (isSuperCall ? -1 : arity) { + t1 = A.Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf, + getInterceptor = A.BoundClosure_interceptorOf; + switch (needsDirectAccess ? -1 : arity) { case 0: - throw H.wrapException(H.RuntimeError$("Intercepted function with no arguments.")); + throw A.wrapException(new A.RuntimeError("Intercepted function with no arguments.")); case 1: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function() { - return s(this)[n](r(this)); + return interceptorOf(this)[entry](receiverOf(this)); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 2: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a) { - return s(this)[n](r(this), a); + return interceptorOf(this)[entry](receiverOf(this), a); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 3: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b) { - return s(this)[n](r(this), a, b); + return interceptorOf(this)[entry](receiverOf(this), a, b); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 4: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b, c) { - return s(this)[n](r(this), a, b, c); + return interceptorOf(this)[entry](receiverOf(this), a, b, c); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 5: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b, c, d) { - return s(this)[n](r(this), a, b, c, d); + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); case 6: - return function(n, s, r) { + return function(entry, interceptorOf, receiverOf) { return function(a, b, c, d, e) { - return s(this)[n](r(this), a, b, c, d, e); + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d, e); }; - }($name, getSelf, getReceiver); + }(stubName, getInterceptor, getReceiver); default: - return function(f, s, r, a) { + return function(f, interceptorOf, receiverOf) { return function() { - a = [r(this)]; + var a = [receiverOf(this)]; Array.prototype.push.apply(a, arguments); - return f.apply(s(this), a); + return f.apply(interceptorOf(this), a); }; - }($function, getSelf, getReceiver); + }($function, getInterceptor, getReceiver); } }, - Closure_forwardInterceptedCallTo: function(receiver, $function) { - var t1, t2, stubName, arity, lookedUpFunction, t3, t4, $arguments; - t1 = $.BoundClosure_selfFieldNameCache; - if (t1 == null) { - t1 = H.BoundClosure_computeFieldNamed("self"); - $.BoundClosure_selfFieldNameCache = t1; - } - t2 = $.BoundClosure_receiverFieldNameCache; - if (t2 == null) { - t2 = H.BoundClosure_computeFieldNamed("receiver"); - $.BoundClosure_receiverFieldNameCache = t2; - } - stubName = $function.$stubName; + Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess) { + var arity, t1; + if ($.BoundClosure__interceptorFieldNameCache == null) + $.BoundClosure__interceptorFieldNameCache = A.BoundClosure__computeFieldNamed("interceptor"); + if ($.BoundClosure__receiverFieldNameCache == null) + $.BoundClosure__receiverFieldNameCache = A.BoundClosure__computeFieldNamed("receiver"); arity = $function.length; - lookedUpFunction = receiver[stubName]; - t3 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; - t4 = !t3 || arity >= 28; - if (t4) - return H.Closure_cspForwardInterceptedCall(arity, !t3, stubName, $function); - if (arity === 1) { - t1 = "return function(){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ");"; - t2 = $.Closure_functionCounter; - if (typeof t2 !== "number") - return t2.$add(); - $.Closure_functionCounter = t2 + 1; - return new Function(t1 + t2 + "}")(); - } - $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(","); - t1 = "return function(" + $arguments + "){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ", " + $arguments + ");"; - t2 = $.Closure_functionCounter; - if (typeof t2 !== "number") - return t2.$add(); - $.Closure_functionCounter = t2 + 1; - return new Function(t1 + t2 + "}")(); - }, - closureFromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, $name) { - return H.Closure_fromTearOff(receiver, functions, H.intTypeCheck(applyTrampolineIndex), reflectionInfo, !!isStatic, !!isIntercepted, $name); - }, - BoundClosure_selfOf: function(closure) { - return closure._self; - }, - BoundClosure_receiverOf: function(closure) { + t1 = A.Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + closureFromTearOff(parameters) { + return A.Closure_fromTearOff(parameters); + }, + BoundClosure_evalRecipe(closure, recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, A.instanceType(closure._receiver), recipe); + }, + BoundClosure_receiverOf(closure) { return closure._receiver; }, - BoundClosure_computeFieldNamed: function(fieldName) { - var template, names, t1, i, $name; - template = new H.BoundClosure("self", "target", "receiver", "name"); - names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template)); + BoundClosure_interceptorOf(closure) { + return closure._interceptor; + }, + BoundClosure__computeFieldNamed(fieldName) { + var t1, i, $name, + template = new A.BoundClosure("receiver", "interceptor"), + names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template), type$.nullable_Object); for (t1 = names.length, i = 0; i < t1; ++i) { $name = names[i]; if (template[$name] === fieldName) return $name; } + throw A.wrapException(A.ArgumentError$("Field name " + fieldName + " not found.", null)); }, - stringTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "string") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "String")); - }, - stringTypeCast: function(value) { - if (typeof value === "string" || value == null) - return value; - throw H.wrapException(H.CastErrorImplementation$(value, "String")); - }, - doubleTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "number") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "double")); - }, - numTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "number") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "num")); - }, - boolTypeCheck: function(value) { - if (value == null) - return value; - if (typeof value === "boolean") - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "bool")); - }, - intTypeCheck: function(value) { + boolConversionCheck(value) { if (value == null) - return value; - if (typeof value === "number" && Math.floor(value) === value) - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "int")); - }, - intTypeCast: function(value) { - if (typeof value === "number" && Math.floor(value) === value || value == null) - return value; - throw H.wrapException(H.CastErrorImplementation$(value, "int")); - }, - propertyTypeError: function(value, property) { - throw H.wrapException(H.TypeErrorImplementation$(value, H.unminifyOrTag(H.stringTypeCheck(property).substring(3)))); + A.assertThrow("boolean expression must not be null"); + return value; }, - interceptedTypeCheck: function(value, property) { - if (value == null) - return value; - if ((typeof value === "object" || typeof value === "function") && J.getInterceptor$(value)[property]) - return value; - H.propertyTypeError(value, property); + assertThrow(message) { + throw A.wrapException(new A._AssertionError(message)); }, - stringSuperNativeTypeCheck: function(value, property) { - if (value == null) - return value; - if (typeof value === "string") - return value; - if (J.getInterceptor$(value)[property]) - return value; - H.propertyTypeError(value, property); + throwCyclicInit(staticName) { + throw A.wrapException(new A.CyclicInitializationError(staticName)); }, - listTypeCheck: function(value) { - if (value == null) - return value; - if (!!J.getInterceptor$(value).$isList) - return value; - throw H.wrapException(H.TypeErrorImplementation$(value, "List")); + getIsolateAffinityTag($name) { + return init.getIsolateTag($name); }, - listSuperNativeTypeCheck: function(value, property) { - var t1; - if (value == null) - return value; - t1 = J.getInterceptor$(value); - if (!!t1.$isList) - return value; - if (t1[property]) - return value; - H.propertyTypeError(value, property); + defineProperty(obj, property, value) { + Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); }, - extractFunctionTypeObjectFromInternal: function(o) { - var signature; - if ("$signature" in o) { - signature = o.$signature; - if (typeof signature == "number") - return init.types[H.intTypeCheck(signature)]; - else - return o.$signature(); + lookupAndCacheInterceptor(obj) { + var interceptor, interceptorClass, altTag, mark, t1, + tag = A._asString($.getTagFunction.call$1(obj)), + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; } - return; - }, - functionTypeTest: function(value, functionTypeRti) { - var functionTypeObject; - if (value == null) - return false; - if (typeof value == "function") - return true; - functionTypeObject = H.extractFunctionTypeObjectFromInternal(J.getInterceptor$(value)); - if (functionTypeObject == null) - return false; - return H._isFunctionSubtype(functionTypeObject, null, functionTypeRti, null); - }, - functionTypeCheck: function(value, functionTypeRti) { - var $self, t1; - if (value == null) - return value; - if ($._inTypeAssertion) - return value; - $._inTypeAssertion = true; - try { - if (H.functionTypeTest(value, functionTypeRti)) - return value; - $self = H.runtimeTypeToString(functionTypeRti); - t1 = H.TypeErrorImplementation$(value, $self); - throw H.wrapException(t1); - } finally { - $._inTypeAssertion = false; + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + if (interceptorClass == null) { + altTag = A._asStringQ($.alternateTagFunction.call$2(obj, tag)); + if (altTag != null) { + record = $.dispatchRecordsForInstanceTags[altTag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[altTag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[altTag]; + tag = altTag; + } } - }, - futureOrCheck: function(o, futureOrRti) { - if (o != null && !H.checkSubtypeOfRuntimeType(o, futureOrRti)) - H.throwExpression(H.TypeErrorImplementation$(o, H.runtimeTypeToString(futureOrRti))); - return o; - }, - TypeErrorImplementation$: function(value, type) { - return new H.TypeErrorImplementation("TypeError: " + P.Error_safeToString(value) + ": type '" + H._typeDescription(value) + "' is not a subtype of type '" + type + "'"); - }, - CastErrorImplementation$: function(value, type) { - return new H.CastErrorImplementation("CastError: " + P.Error_safeToString(value) + ": type '" + H._typeDescription(value) + "' is not a subtype of type '" + type + "'"); - }, - _typeDescription: function(value) { - var t1, functionTypeObject; - t1 = J.getInterceptor$(value); - if (!!t1.$isClosure) { - functionTypeObject = H.extractFunctionTypeObjectFromInternal(t1); - if (functionTypeObject != null) - return H.runtimeTypeToString(functionTypeObject); - return "Closure"; + if (interceptorClass == null) + return null; + interceptor = interceptorClass.prototype; + mark = tag[0]; + if (mark === "!") { + record = A.makeLeafDispatchRecord(interceptor); + $.dispatchRecordsForInstanceTags[tag] = record; + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; } - return H.Primitives_objectTypeName(value); - }, - throwCyclicInit: function(staticName) { - throw H.wrapException(new P.CyclicInitializationError(H.stringTypeCheck(staticName))); + if (mark === "~") { + $.interceptorsForUncacheableTags[tag] = interceptor; + return interceptor; + } + if (mark === "-") { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } + if (mark === "+") + return A.patchInteriorProto(obj, interceptor); + if (mark === "*") + throw A.wrapException(A.UnimplementedError$(tag)); + if (init.leafTags[tag] === true) { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } else + return A.patchInteriorProto(obj, interceptor); }, - RuntimeError$: function(message) { - return new H.RuntimeError(message); + patchInteriorProto(obj, interceptor) { + var proto = Object.getPrototypeOf(obj); + Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); + return interceptor; }, - getIsolateAffinityTag: function($name) { - return init.getIsolateTag($name); + makeLeafDispatchRecord(interceptor) { + return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); }, - setRuntimeTypeInfo: function(target, rti) { - target.$ti = rti; - return target; + makeDefaultDispatchRecord(tag, interceptorClass, proto) { + var interceptor = interceptorClass.prototype; + if (init.leafTags[tag] === true) + return A.makeLeafDispatchRecord(interceptor); + else + return J.makeDispatchRecord(interceptor, proto, null, null); }, - getRuntimeTypeInfo: function(target) { - if (target == null) - return; - return target.$ti; - }, - getRuntimeTypeArguments: function(interceptor, object, substitutionName) { - return H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(object)); - }, - getRuntimeTypeArgumentIntercepted: function(interceptor, target, substitutionName, index) { - var $arguments; - H.stringTypeCheck(substitutionName); - H.intTypeCheck(index); - $arguments = H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target)); - return $arguments == null ? null : $arguments[index]; - }, - getRuntimeTypeArgument: function(target, substitutionName, index) { - var $arguments; - H.stringTypeCheck(substitutionName); - H.intTypeCheck(index); - $arguments = H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target)); - return $arguments == null ? null : $arguments[index]; - }, - getTypeArgumentByIndex: function(target, index) { - var rti; - H.intTypeCheck(index); - rti = H.getRuntimeTypeInfo(target); - return rti == null ? null : rti[index]; - }, - runtimeTypeToString: function(rti) { - return H._runtimeTypeToString(rti, null); - }, - _runtimeTypeToString: function(rti, genericContext) { - var t1, t2; - H.assertSubtype(genericContext, "$isList", [P.String], "$asList"); - if (rti == null) - return "dynamic"; - if (rti === -1) - return "void"; - if (typeof rti === "object" && rti !== null && rti.constructor === Array) - return H.unminifyOrTag(rti[0].name) + H._joinArguments(rti, 1, genericContext); - if (typeof rti == "function") - return H.unminifyOrTag(rti.name); - if (rti === -2) - return "dynamic"; - if (typeof rti === "number") { - H.intTypeCheck(rti); - if (genericContext == null || rti < 0 || rti >= genericContext.length) - return "unexpected-generic-index:" + rti; - t1 = genericContext.length; - t2 = t1 - rti - 1; - if (t2 < 0 || t2 >= t1) - return H.ioore(genericContext, t2); - return H.S(genericContext[t2]); - } - if ('func' in rti) - return H._functionRtiToString(rti, genericContext); - if ('futureOr' in rti) - return "FutureOr<" + H._runtimeTypeToString("type" in rti ? rti.type : null, genericContext) + ">"; - return "unknown-reified-type"; - }, - _functionRtiToString: function(rti, genericContext) { - var t1, boundsRti, outerContextLength, offset, i, i0, typeParameters, typeSep, t2, boundRti, returnTypeText, $arguments, argumentsText, sep, _i, argument, optionalArguments, namedArguments, t3; - t1 = [P.String]; - H.assertSubtype(genericContext, "$isList", t1, "$asList"); - if ("bounds" in rti) { - boundsRti = rti.bounds; - if (genericContext == null) { - genericContext = H.setRuntimeTypeInfo([], t1); - outerContextLength = null; - } else - outerContextLength = genericContext.length; - offset = genericContext.length; - for (i = boundsRti.length, i0 = i; i0 > 0; --i0) - C.JSArray_methods.add$1(genericContext, "T" + (offset + i0)); - for (typeParameters = "<", typeSep = "", i0 = 0; i0 < i; ++i0, typeSep = ", ") { - typeParameters += typeSep; - t1 = genericContext.length; - t2 = t1 - i0 - 1; - if (t2 < 0) - return H.ioore(genericContext, t2); - typeParameters = C.JSString_methods.$add(typeParameters, genericContext[t2]); - boundRti = boundsRti[i0]; - if (boundRti != null && boundRti !== P.Object) - typeParameters += " extends " + H._runtimeTypeToString(boundRti, genericContext); - } - typeParameters += ">"; - } else { - typeParameters = ""; - outerContextLength = null; - } - returnTypeText = !!rti.v ? "void" : H._runtimeTypeToString(rti.ret, genericContext); - if ("args" in rti) { - $arguments = rti.args; - for (t1 = $arguments.length, argumentsText = "", sep = "", _i = 0; _i < t1; ++_i, sep = ", ") { - argument = $arguments[_i]; - argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext); - } - } else { - argumentsText = ""; - sep = ""; - } - if ("opt" in rti) { - optionalArguments = rti.opt; - argumentsText += sep + "["; - for (t1 = optionalArguments.length, sep = "", _i = 0; _i < t1; ++_i, sep = ", ") { - argument = optionalArguments[_i]; - argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext); - } - argumentsText += "]"; - } - if ("named" in rti) { - namedArguments = rti.named; - argumentsText += sep + "{"; - for (t1 = H.extractKeys(namedArguments), t2 = t1.length, sep = "", _i = 0; _i < t2; ++_i, sep = ", ") { - t3 = H.stringTypeCheck(t1[_i]); - argumentsText = argumentsText + sep + H._runtimeTypeToString(namedArguments[t3], genericContext) + (" " + H.S(t3)); - } - argumentsText += "}"; - } - if (outerContextLength != null) - genericContext.length = outerContextLength; - return typeParameters + "(" + argumentsText + ") => " + returnTypeText; - }, - _joinArguments: function(types, startIndex, genericContext) { - var buffer, index, separator, allDynamic, t1, argument; - H.assertSubtype(genericContext, "$isList", [P.String], "$asList"); - if (types == null) - return ""; - buffer = new P.StringBuffer(""); - for (index = startIndex, separator = "", allDynamic = true, t1 = ""; index < types.length; ++index, separator = ", ") { - buffer._contents = t1 + separator; - argument = types[index]; - if (argument != null) - allDynamic = false; - t1 = buffer._contents += H._runtimeTypeToString(argument, genericContext); - } - return "<" + buffer.toString$0(0) + ">"; - }, - substitute: function(substitution, $arguments) { - if (substitution == null) - return $arguments; - substitution = substitution.apply(null, $arguments); - if (substitution == null) - return; - if (typeof substitution === "object" && substitution !== null && substitution.constructor === Array) - return substitution; - if (typeof substitution == "function") - return substitution.apply(null, $arguments); - return $arguments; - }, - checkSubtype: function(object, isField, checks, asField) { - var $arguments, interceptor; - H.stringTypeCheck(isField); - H.listTypeCheck(checks); - H.stringTypeCheck(asField); - if (object == null) - return false; - $arguments = H.getRuntimeTypeInfo(object); - interceptor = J.getInterceptor$(object); - if (interceptor[isField] == null) - return false; - return H.areSubtypes(H.substitute(interceptor[asField], $arguments), null, checks, null); - }, - assertSubtype: function(object, isField, checks, asField) { - H.stringTypeCheck(isField); - H.listTypeCheck(checks); - H.stringTypeCheck(asField); - if (object == null) - return object; - if (H.checkSubtype(object, isField, checks, asField)) - return object; - throw H.wrapException(H.TypeErrorImplementation$(object, function(str, names) { - return str.replace(/[^<,> ]+/g, function(m) { - return names[m] || m; - }); - }(H.unminifyOrTag(isField.substring(3)) + H._joinArguments(checks, 0, null), init.mangledGlobalNames))); - }, - assertIsSubtype: function(subtype, supertype, prefix, infix, suffix) { - H.stringTypeCheck(prefix); - H.stringTypeCheck(infix); - H.stringTypeCheck(suffix); - if (!H._isSubtype(subtype, null, supertype, null)) - H.throwTypeError("TypeError: " + H.S(prefix) + H.runtimeTypeToString(subtype) + H.S(infix) + H.runtimeTypeToString(supertype) + H.S(suffix)); - }, - throwTypeError: function(message) { - throw H.wrapException(new H.TypeErrorImplementation(H.stringTypeCheck(message))); - }, - areSubtypes: function(s, sEnv, t, tEnv) { - var len, i; - if (t == null) - return true; - if (s == null) { - len = t.length; - for (i = 0; i < len; ++i) - if (!H._isSubtype(null, null, t[i], tEnv)) - return false; - return true; - } - len = s.length; - for (i = 0; i < len; ++i) - if (!H._isSubtype(s[i], sEnv, t[i], tEnv)) - return false; - return true; - }, - computeSignature: function(signature, context, contextName) { - return signature.apply(context, H.substitute(J.getInterceptor$(context)["$as" + H.S(contextName)], H.getRuntimeTypeInfo(context))); - }, - isSupertypeOfNullRecursive: function(type) { - var typeArgument; - if (typeof type === "number") - return false; - if ('futureOr' in type) { - typeArgument = "type" in type ? type.type : null; - return type == null || type.name === "Object" || type.name === "Null" || type === -1 || type === -2 || H.isSupertypeOfNullRecursive(typeArgument); - } - return false; - }, - checkSubtypeOfRuntimeType: function(o, t) { - var type, rti; - if (o == null) - return t == null || t.name === "Object" || t.name === "Null" || t === -1 || t === -2 || H.isSupertypeOfNullRecursive(t); - if (t == null || t === -1 || t.name === "Object" || t === -2) - return true; - if (typeof t == "object") { - if ('futureOr' in t) - if (H.checkSubtypeOfRuntimeType(o, "type" in t ? t.type : null)) - return true; - if ('func' in t) - return H.functionTypeTest(o, t); - } - type = J.getInterceptor$(o).constructor; - rti = H.getRuntimeTypeInfo(o); - if (rti != null) { - rti = rti.slice(); - rti.splice(0, 0, type); - type = rti; - } - return H._isSubtype(type, null, t, null); - }, - assertSubtypeOfRuntimeType: function(object, type) { - if (object != null && !H.checkSubtypeOfRuntimeType(object, type)) - throw H.wrapException(H.TypeErrorImplementation$(object, H.runtimeTypeToString(type))); - return object; - }, - _isSubtype: function(s, sEnv, t, tEnv) { - var t1, typeOfS, tTypeArgument, futureSubstitution, futureArguments, t2, typeOfT, typeOfTString, substitution; - if (s === t) - return true; - if (t == null || t === -1 || t.name === "Object" || t === -2) - return true; - if (s === -2) - return true; - if (s == null || s === -1 || s.name === "Object" || s === -2) { - if (typeof t === "number") - return false; - if ('futureOr' in t) - return H._isSubtype(s, sEnv, "type" in t ? t.type : null, tEnv); - return false; - } - if (typeof s === "number") - return false; - if (typeof t === "number") - return false; - if (s.name === "Null") - return true; - if ('func' in t) - return H._isFunctionSubtype(s, sEnv, t, tEnv); - if ('func' in s) - return t.name === "Function"; - t1 = typeof s === "object" && s !== null && s.constructor === Array; - typeOfS = t1 ? s[0] : s; - if ('futureOr' in t) { - tTypeArgument = "type" in t ? t.type : null; - if ('futureOr' in s) - return H._isSubtype("type" in s ? s.type : null, sEnv, tTypeArgument, tEnv); - else if (H._isSubtype(s, sEnv, tTypeArgument, tEnv)) - return true; - else { - if (!('$is' + "Future" in typeOfS.prototype)) - return false; - futureSubstitution = typeOfS.prototype["$as" + "Future"]; - futureArguments = H.substitute(futureSubstitution, t1 ? s.slice(1) : null); - return H._isSubtype(typeof futureArguments === "object" && futureArguments !== null && futureArguments.constructor === Array ? futureArguments[0] : null, sEnv, tTypeArgument, tEnv); - } - } - t2 = typeof t === "object" && t !== null && t.constructor === Array; - typeOfT = t2 ? t[0] : t; - if (typeOfT !== typeOfS) { - typeOfTString = typeOfT.name; - if (!('$is' + typeOfTString in typeOfS.prototype)) - return false; - substitution = typeOfS.prototype["$as" + typeOfTString]; - } else - substitution = null; - if (!t2) - return true; - t1 = t1 ? s.slice(1) : null; - t2 = t.slice(1); - return H.areSubtypes(H.substitute(substitution, t1), sEnv, t2, tEnv); - }, - _isFunctionSubtype: function(s, sEnv, t, tEnv) { - var sBounds, tBounds, sParameterTypes, tParameterTypes, sOptionalParameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalParametersLen, tOptionalParametersLen, pos, tPos, sPos, sNamedParameters, tNamedParameters; - if (!('func' in s)) - return false; - if ("bounds" in s) { - if (!("bounds" in t)) - return false; - sBounds = s.bounds; - tBounds = t.bounds; - if (sBounds.length !== tBounds.length) - return false; - } else if ("bounds" in t) - return false; - if (!H._isSubtype(s.ret, sEnv, t.ret, tEnv)) - return false; - sParameterTypes = s.args; - tParameterTypes = t.args; - sOptionalParameterTypes = s.opt; - tOptionalParameterTypes = t.opt; - sParametersLen = sParameterTypes != null ? sParameterTypes.length : 0; - tParametersLen = tParameterTypes != null ? tParameterTypes.length : 0; - sOptionalParametersLen = sOptionalParameterTypes != null ? sOptionalParameterTypes.length : 0; - tOptionalParametersLen = tOptionalParameterTypes != null ? tOptionalParameterTypes.length : 0; - if (sParametersLen > tParametersLen) - return false; - if (sParametersLen + sOptionalParametersLen < tParametersLen + tOptionalParametersLen) - return false; - for (pos = 0; pos < sParametersLen; ++pos) - if (!H._isSubtype(tParameterTypes[pos], tEnv, sParameterTypes[pos], sEnv)) - return false; - for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) - if (!H._isSubtype(tParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv)) - return false; - for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) - if (!H._isSubtype(tOptionalParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv)) - return false; - sNamedParameters = s.named; - tNamedParameters = t.named; - if (tNamedParameters == null) - return true; - if (sNamedParameters == null) - return false; - return H.namedParametersSubtypeCheck(sNamedParameters, sEnv, tNamedParameters, tEnv); - }, - namedParametersSubtypeCheck: function(s, sEnv, t, tEnv) { - var names, t1, i, $name; - names = Object.getOwnPropertyNames(t); - for (t1 = names.length, i = 0; i < t1; ++i) { - $name = names[i]; - if (!Object.hasOwnProperty.call(s, $name)) - return false; - if (!H._isSubtype(t[$name], tEnv, s[$name], sEnv)) - return false; - } - return true; - }, - instantiatedGenericFunctionType: function(genericFunctionRti, parameters) { - if (genericFunctionRti == null) - return; - return H.finishBindInstantiatedFunctionType(genericFunctionRti, {func: 1}, parameters, 0); - }, - finishBindInstantiatedFunctionType: function(rti, result, parameters, depth) { - var namedParameters, boundNamed, names, t1, _i, $name; - if ("v" in rti) - result.v = rti.v; - else if ("ret" in rti) - result.ret = H.bindInstantiatedType(rti.ret, parameters, depth); - if ("args" in rti) - result.args = H.bindInstantiatedTypes(rti.args, parameters, depth); - if ("opt" in rti) - result.opt = H.bindInstantiatedTypes(rti.opt, parameters, depth); - if ("named" in rti) { - namedParameters = rti.named; - boundNamed = {}; - names = Object.keys(namedParameters); - for (t1 = names.length, _i = 0; _i < t1; ++_i) { - $name = H.stringTypeCheck(names[_i]); - boundNamed[$name] = H.bindInstantiatedType(namedParameters[$name], parameters, depth); - } - result.named = boundNamed; - } - return result; - }, - bindInstantiatedType: function(rti, parameters, depth) { - var result, bounds; - if (rti == null) - return rti; - if (rti === -1) - return rti; - if (typeof rti == "function") - return rti; - if (typeof rti === "number") { - if (rti < depth) - return rti; - return parameters[rti - depth]; - } - if (typeof rti === "object" && rti !== null && rti.constructor === Array) - return H.bindInstantiatedTypes(rti, parameters, depth); - if ('func' in rti) { - result = {func: 1}; - if ("bounds" in rti) { - bounds = rti.bounds; - depth += bounds.length; - result.bounds = H.bindInstantiatedTypes(bounds, parameters, depth); - } - return H.finishBindInstantiatedFunctionType(rti, result, parameters, depth); - } - throw H.wrapException(P.ArgumentError$("Unknown RTI format in bindInstantiatedType.")); - }, - bindInstantiatedTypes: function(rti, parameters, depth) { - var array, t1, i; - array = rti.slice(); - for (t1 = array.length, i = 0; i < t1; ++i) - C.JSArray_methods.$indexSet(array, i, H.bindInstantiatedType(array[i], parameters, depth)); - return array; - }, - JsLinkedHashMap_JsLinkedHashMap$es6: function($K, $V) { - return new H.JsLinkedHashMap([$K, $V]); - }, - defineProperty: function(obj, property, value) { - Object.defineProperty(obj, H.stringTypeCheck(property), {value: value, enumerable: false, writable: true, configurable: true}); - }, - lookupAndCacheInterceptor: function(obj) { - var tag, record, interceptor, interceptorClass, mark, t1; - tag = H.stringTypeCheck($.getTagFunction.call$1(obj)); - record = $.dispatchRecordsForInstanceTags[tag]; - if (record != null) { - Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); - return record.i; - } - interceptor = $.interceptorsForUncacheableTags[tag]; - if (interceptor != null) - return interceptor; - interceptorClass = init.interceptorsByTag[tag]; - if (interceptorClass == null) { - tag = H.stringTypeCheck($.alternateTagFunction.call$2(obj, tag)); - if (tag != null) { - record = $.dispatchRecordsForInstanceTags[tag]; - if (record != null) { - Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); - return record.i; - } - interceptor = $.interceptorsForUncacheableTags[tag]; - if (interceptor != null) - return interceptor; - interceptorClass = init.interceptorsByTag[tag]; - } - } - if (interceptorClass == null) - return; - interceptor = interceptorClass.prototype; - mark = tag[0]; - if (mark === "!") { - record = H.makeLeafDispatchRecord(interceptor); - $.dispatchRecordsForInstanceTags[tag] = record; - Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); - return record.i; - } - if (mark === "~") { - $.interceptorsForUncacheableTags[tag] = interceptor; - return interceptor; - } - if (mark === "-") { - t1 = H.makeLeafDispatchRecord(interceptor); - Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); - return t1.i; - } - if (mark === "+") - return H.patchInteriorProto(obj, interceptor); - if (mark === "*") - throw H.wrapException(P.UnimplementedError$(tag)); - if (init.leafTags[tag] === true) { - t1 = H.makeLeafDispatchRecord(interceptor); - Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); - return t1.i; - } else - return H.patchInteriorProto(obj, interceptor); - }, - patchInteriorProto: function(obj, interceptor) { - var proto = Object.getPrototypeOf(obj); - Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); - return interceptor; - }, - makeLeafDispatchRecord: function(interceptor) { - return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); - }, - makeDefaultDispatchRecord: function(tag, interceptorClass, proto) { - var interceptor = interceptorClass.prototype; - if (init.leafTags[tag] === true) - return H.makeLeafDispatchRecord(interceptor); - else - return J.makeDispatchRecord(interceptor, proto, null, null); - }, - initNativeDispatch: function() { - if (true === $.initNativeDispatchFlag) + initNativeDispatch() { + if (true === $.initNativeDispatchFlag) return; $.initNativeDispatchFlag = true; - H.initNativeDispatchContinue(); + A.initNativeDispatchContinue(); }, - initNativeDispatchContinue: function() { + initNativeDispatchContinue() { var map, tags, fun, i, tag, proto, record, interceptorClass; $.dispatchRecordsForInstanceTags = Object.create(null); $.interceptorsForUncacheableTags = Object.create(null); - H.initHooks(); + A.initHooks(); map = init.interceptorsByTag; tags = Object.getOwnPropertyNames(map); if (typeof window != "undefined") { @@ -1859,7 +1321,7 @@ tag = tags[i]; proto = $.prototypeForTagFunction.call$1(tag); if (proto != null) { - record = H.makeDefaultDispatchRecord(tag, map[tag], proto); + record = A.makeDefaultDispatchRecord(tag, map[tag], proto); if (record != null) { Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); fun.prototype = proto; @@ -1879,10 +1341,10 @@ } } }, - initHooks: function() { - var hooks, transformers, i, transformer, getTag, getUnknownTag, prototypeForTag; - hooks = C.C_JS_CONST0(); - hooks = H.applyHooksTransformer(C.C_JS_CONST1, H.applyHooksTransformer(C.C_JS_CONST2, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST4, H.applyHooksTransformer(C.C_JS_CONST5, H.applyHooksTransformer(C.C_JS_CONST6(C.C_JS_CONST), hooks))))))); + initHooks() { + var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag, + hooks = B.C_JS_CONST0(); + hooks = A.applyHooksTransformer(B.C_JS_CONST1, A.applyHooksTransformer(B.C_JS_CONST2, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST4, A.applyHooksTransformer(B.C_JS_CONST5, A.applyHooksTransformer(B.C_JS_CONST6(B.C_JS_CONST), hooks))))))); if (typeof dartNativeDispatchHooksTransformer != "undefined") { transformers = dartNativeDispatchHooksTransformer; if (typeof transformers == "function") @@ -1897,103 +1359,119 @@ getTag = hooks.getTag; getUnknownTag = hooks.getUnknownTag; prototypeForTag = hooks.prototypeForTag; - $.getTagFunction = new H.initHooks_closure(getTag); - $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag); - $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag); + $.getTagFunction = new A.initHooks_closure(getTag); + $.alternateTagFunction = new A.initHooks_closure0(getUnknownTag); + $.prototypeForTagFunction = new A.initHooks_closure1(prototypeForTag); }, - applyHooksTransformer: function(transformer, hooks) { + applyHooksTransformer(transformer, hooks) { return transformer(hooks) || hooks; }, - JSSyntaxRegExp_makeNative: function(source, multiLine, caseSensitive, global) { - var m, i, g, regexp; - m = multiLine ? "m" : ""; - i = caseSensitive ? "" : "i"; - g = global ? "g" : ""; - regexp = function(source, modifiers) { - try { - return new RegExp(source, modifiers); - } catch (e) { - return e; - } - }(source, m + i + g); + JSSyntaxRegExp_makeNative(source, multiLine, caseSensitive, unicode, dotAll, global) { + var m = multiLine ? "m" : "", + i = caseSensitive ? "" : "i", + u = unicode ? "u" : "", + s = dotAll ? "s" : "", + g = global ? "g" : "", + regexp = function(source, modifiers) { + try { + return new RegExp(source, modifiers); + } catch (e) { + return e; + } + }(source, m + i + u + s + g); if (regexp instanceof RegExp) return regexp; - throw H.wrapException(P.FormatException$("Illegal RegExp pattern (" + String(regexp) + ")", source, null)); + throw A.wrapException(A.FormatException$("Illegal RegExp pattern (" + String(regexp) + ")", source, null)); }, - stringContainsUnchecked: function(receiver, other, startIndex) { - var t1, t2; - if (typeof other === "string") + stringContainsUnchecked(receiver, other, startIndex) { + var t1; + if (typeof other == "string") return receiver.indexOf(other, startIndex) >= 0; - else { - t1 = J.getInterceptor$(other); - if (!!t1.$isJSSyntaxRegExp) { - t1 = C.JSString_methods.substring$1(receiver, startIndex); - t2 = other._nativeRegExp; - return t2.test(t1); - } else { - t1 = t1.allMatches$1(other, C.JSString_methods.substring$1(receiver, startIndex)); - return !t1.get$isEmpty(t1); - } + else if (other instanceof A.JSSyntaxRegExp) { + t1 = B.JSString_methods.substring$1(receiver, startIndex); + return other._nativeRegExp.test(t1); + } else { + t1 = J.allMatches$1$s(other, B.JSString_methods.substring$1(receiver, startIndex)); + return !t1.get$isEmpty(t1); } }, - stringReplaceFirstRE: function(receiver, regexp, replacement, startIndex) { + escapeReplacement(replacement) { + if (replacement.indexOf("$", 0) >= 0) + return replacement.replace(/\$/g, "$$$$"); + return replacement; + }, + stringReplaceFirstRE(receiver, regexp, replacement, startIndex) { var match = regexp._execGlobal$2(receiver, startIndex); if (match == null) return receiver; - return H.stringReplaceRangeUnchecked(receiver, match._match.index, match.get$end(), replacement); - }, - stringReplaceAllUnchecked: function(receiver, pattern, replacement) { - var $length, t1, i, nativeRegexp; - if (typeof pattern === "string") - if (pattern === "") - if (receiver === "") - return replacement; - else { - $length = receiver.length; - for (t1 = replacement, i = 0; i < $length; ++i) - t1 = t1 + receiver[i] + replacement; - return t1.charCodeAt(0) == 0 ? t1 : t1; - } - else - return receiver.replace(new RegExp(pattern.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"), 'g'), replacement.replace(/\$/g, "$$$$")); - else if (pattern instanceof H.JSSyntaxRegExp) { + return A.stringReplaceRangeUnchecked(receiver, match._match.index, match.get$end(), replacement); + }, + quoteStringForRegExp(string) { + if (/[[\]{}()*+?.\\^$|]/.test(string)) + return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); + return string; + }, + stringReplaceAllUnchecked(receiver, pattern, replacement) { + var nativeRegexp; + if (typeof pattern == "string") + return A.stringReplaceAllUncheckedString(receiver, pattern, replacement); + if (pattern instanceof A.JSSyntaxRegExp) { nativeRegexp = pattern.get$_nativeGlobalVersion(); nativeRegexp.lastIndex = 0; - return receiver.replace(nativeRegexp, replacement.replace(/\$/g, "$$$$")); - } else { - if (pattern == null) - H.throwExpression(H.argumentErrorValue(pattern)); - throw H.wrapException("String.replaceAll(Pattern) UNIMPLEMENTED"); + return receiver.replace(nativeRegexp, A.escapeReplacement(replacement)); + } + return A.stringReplaceAllGeneral(receiver, pattern, replacement); + }, + stringReplaceAllGeneral(receiver, pattern, replacement) { + var t1, startIndex, t2, match; + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), startIndex = 0, t2 = ""; t1.moveNext$0();) { + match = t1.get$current(); + t2 = t2 + receiver.substring(startIndex, match.get$start(match)) + replacement; + startIndex = match.get$end(); + } + t1 = t2 + receiver.substring(startIndex); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + stringReplaceAllUncheckedString(receiver, pattern, replacement) { + var $length, t1, i, index; + if (pattern === "") { + if (receiver === "") + return replacement; + $length = receiver.length; + t1 = "" + replacement; + for (i = 0; i < $length; ++i) + t1 = t1 + receiver[i] + replacement; + return t1.charCodeAt(0) == 0 ? t1 : t1; } + index = receiver.indexOf(pattern, 0); + if (index < 0) + return receiver; + if (receiver.length < 500 || replacement.indexOf("$", 0) >= 0) + return receiver.split(pattern).join(replacement); + return receiver.replace(new RegExp(A.quoteStringForRegExp(pattern), "g"), A.escapeReplacement(replacement)); }, - stringReplaceFirstUnchecked: function(receiver, pattern, replacement, startIndex) { + stringReplaceFirstUnchecked(receiver, pattern, replacement, startIndex) { var index, t1, matches, match; - if (typeof pattern === "string") { + if (typeof pattern == "string") { index = receiver.indexOf(pattern, startIndex); if (index < 0) return receiver; - return H.stringReplaceRangeUnchecked(receiver, index, index + pattern.length, replacement); - } - t1 = J.getInterceptor$(pattern); - if (!!t1.$isJSSyntaxRegExp) - return startIndex === 0 ? receiver.replace(pattern._nativeRegExp, replacement.replace(/\$/g, "$$$$")) : H.stringReplaceFirstRE(receiver, pattern, replacement, startIndex); - if (pattern == null) - H.throwExpression(H.argumentErrorValue(pattern)); - t1 = t1.allMatches$2(pattern, receiver, startIndex); - matches = H.assertSubtype(t1.get$iterator(t1), "$isIterator", [P.Match], "$asIterator"); + return A.stringReplaceRangeUnchecked(receiver, index, index + pattern.length, replacement); + } + if (pattern instanceof A.JSSyntaxRegExp) + return startIndex === 0 ? receiver.replace(pattern._nativeRegExp, A.escapeReplacement(replacement)) : A.stringReplaceFirstRE(receiver, pattern, replacement, startIndex); + t1 = J.allMatches$2$s(pattern, receiver, startIndex); + matches = t1.get$iterator(t1); if (!matches.moveNext$0()) return receiver; match = matches.get$current(); - return C.JSString_methods.replaceRange$3(receiver, match.get$start(match), match.get$end(), replacement); + return B.JSString_methods.replaceRange$3(receiver, match.get$start(match), match.get$end(), replacement); }, - stringReplaceRangeUnchecked: function(receiver, start, end, replacement) { - var prefix, suffix; - prefix = receiver.substring(0, start); - suffix = receiver.substring(end); - return prefix + replacement + suffix; + stringReplaceRangeUnchecked(receiver, start, end, replacement) { + return receiver.substring(0, start) + replacement + receiver.substring(end); }, ConstantMapView: function ConstantMapView(t0, t1) { - this._map = t0; + this._collection$_map = t0; this.$ti = t1; }, ConstantMap: function ConstantMap() { @@ -2002,7 +1480,7 @@ var _ = this; _.__js_helper$_length = t0; _._jsObject = t1; - _._keys = t2; + _.__js_helper$_keys = t2; _.$ti = t3; }, Instantiation: function Instantiation() { @@ -2014,7 +1492,7 @@ JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { var _ = this; _._memberName = t0; - _._kind = t1; + _.__js_helper$_kind = t1; _._arguments = t2; _._namedArgumentNames = t3; _._typeArgumentCount = t4; @@ -2034,58 +1512,54 @@ _._receiver = t5; }, NullError: function NullError(t0, t1) { - this._message = t0; + this.__js_helper$_message = t0; this._method = t1; }, JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { - this._message = t0; + this.__js_helper$_message = t0; this._method = t1; this._receiver = t2; }, UnknownJsTypeError: function UnknownJsTypeError(t0) { - this._message = t0; + this.__js_helper$_message = t0; + }, + NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) { + this._irritant = t0; }, ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) { this.dartException = t0; this.stackTrace = t1; }, - unwrapException_saveStackTrace: function unwrapException_saveStackTrace(t0) { - this.ex = t0; - }, _StackTrace: function _StackTrace(t0) { this._exception = t0; - this.__js_helper$_trace = null; + this._trace = null; }, Closure: function Closure() { }, + Closure0Args: function Closure0Args() { + }, + Closure2Args: function Closure2Args() { + }, TearOffClosure: function TearOffClosure() { }, StaticClosure: function StaticClosure() { }, - BoundClosure: function BoundClosure(t0, t1, t2, t3) { - var _ = this; - _._self = t0; - _._target = t1; - _._receiver = t2; - _._name = t3; - }, - TypeErrorImplementation: function TypeErrorImplementation(t0) { - this.message = t0; + BoundClosure: function BoundClosure(t0, t1) { + this._receiver = t0; + this._interceptor = t1; }, - CastErrorImplementation: function CastErrorImplementation(t0) { + RuntimeError: function RuntimeError(t0) { this.message = t0; }, - RuntimeError: function RuntimeError(t0) { + _AssertionError: function _AssertionError(t0) { this.message = t0; }, - TypeImpl: function TypeImpl(t0) { - this._rti = t0; - this._hashCode = this.__typeName = null; + _Required: function _Required() { }, JsLinkedHashMap: function JsLinkedHashMap(t0) { var _ = this; _.__js_helper$_length = 0; - _._last = _._first = _._rest = _._nums = _._strings = null; + _._last = _._first = _.__js_helper$_rest = _.__js_helper$_nums = _.__js_helper$_strings = null; _._modifications = 0; _.$ti = t0; }, @@ -2155,24 +1629,48 @@ _.__js_helper$_index = t2; _.__js_helper$_current = null; }, - _ensureNativeList: function(list) { + throwLateFieldADI(fieldName) { + return A.throwExpression(A.LateError$fieldADI(fieldName)); + }, + _Cell$named(_name) { + var t1 = new A._Cell(_name); + return t1.__late_helper$_value = t1; + }, + _lateReadCheck(value, $name) { + if (value === $) + throw A.wrapException(new A.LateError("Field '" + $name + "' has not been initialized.")); + return value; + }, + _lateWriteOnceCheck(value, $name) { + if (value !== $) + throw A.wrapException(new A.LateError("Field '" + $name + "' has already been initialized.")); + }, + _lateInitializeOnceCheck(value, $name) { + if (value !== $) + throw A.wrapException(A.LateError$fieldADI($name)); + }, + _Cell: function _Cell(t0) { + this.__late_helper$_name = t0; + this.__late_helper$_value = null; + }, + _ensureNativeList(list) { return list; }, - NativeInt8List__create1: function(arg) { + NativeInt8List__create1(arg) { return new Int8Array(arg); }, - _checkValidIndex: function(index, list, $length) { + _checkValidIndex(index, list, $length) { if (index >>> 0 !== index || index >= $length) - throw H.wrapException(H.diagnoseIndexError(list, index)); + throw A.wrapException(A.diagnoseIndexError(list, index)); }, - _checkValidRange: function(start, end, $length) { + _checkValidRange(start, end, $length) { var t1; if (!(start >>> 0 !== start)) t1 = end >>> 0 !== end || start > end || end > $length; else t1 = true; if (t1) - throw H.wrapException(H.diagnoseRangeError(start, end, $length)); + throw A.wrapException(A.diagnoseRangeError(start, end, $length)); return end; }, NativeByteBuffer: function NativeByteBuffer() { @@ -2207,479 +1705,1563 @@ }, _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { }, - extractKeys: function(victim) { - return J.JSArray_JSArray$markFixed(victim ? Object.keys(victim) : [], null); + Rti__getQuestionFromStar(universe, rti) { + var question = rti._precomputed1; + return question == null ? rti._precomputed1 = A._Universe__lookupQuestionRti(universe, rti._primary, true) : question; }, - printString: function(string) { - if (typeof dartPrint == "function") { - dartPrint(string); - return; + Rti__getFutureFromFutureOr(universe, rti) { + var future = rti._precomputed1; + return future == null ? rti._precomputed1 = A._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; + }, + Rti__isUnionOfFunctionType(rti) { + var kind = rti._kind; + if (kind === 6 || kind === 7 || kind === 8) + return A.Rti__isUnionOfFunctionType(rti._primary); + return kind === 11 || kind === 12; + }, + Rti__getCanonicalRecipe(rti) { + return rti._canonicalRecipe; + }, + findType(recipe) { + return A._Universe_eval(init.typeUniverse, recipe, false); + }, + instantiatedGenericFunctionType(genericFunctionRti, instantiationRti) { + var t1, cache, key, probe, rti; + if (genericFunctionRti == null) + return null; + t1 = instantiationRti._rest; + cache = genericFunctionRti._bindCache; + if (cache == null) + cache = genericFunctionRti._bindCache = new Map(); + key = instantiationRti._canonicalRecipe; + probe = cache.get(key); + if (probe != null) + return probe; + rti = A._substitute(init.typeUniverse, genericFunctionRti._primary, t1, 0); + cache.set(key, rti); + return rti; + }, + _substitute(universe, rti, typeArguments, depth) { + var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, + kind = rti._kind; + switch (kind) { + case 5: + case 1: + case 2: + case 3: + case 4: + return rti; + case 6: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupStarRti(universe, substitutedBaseType, true); + case 7: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupQuestionRti(universe, substitutedBaseType, true); + case 8: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); + case 9: + interfaceTypeArguments = rti._rest; + substitutedInterfaceTypeArguments = A._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); + if (substitutedInterfaceTypeArguments === interfaceTypeArguments) + return rti; + return A._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); + case 10: + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + $arguments = rti._rest; + substitutedArguments = A._substituteArray(universe, $arguments, typeArguments, depth); + if (substitutedBase === base && substitutedArguments === $arguments) + return rti; + return A._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); + case 11: + returnType = rti._primary; + substitutedReturnType = A._substitute(universe, returnType, typeArguments, depth); + functionParameters = rti._rest; + substitutedFunctionParameters = A._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); + if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters) + return rti; + return A._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); + case 12: + bounds = rti._rest; + depth += bounds.length; + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, depth); + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + if (substitutedBounds === bounds && substitutedBase === base) + return rti; + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); + case 13: + index = rti._primary; + if (index < depth) + return rti; + argument = typeArguments[index - depth]; + if (argument == null) + return rti; + return argument; + default: + throw A.wrapException(A.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); + } + }, + _substituteArray(universe, rtiArray, typeArguments, depth) { + var changed, i, rti, substitutedRti, + $length = rtiArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; ++i) { + rti = rtiArray[i]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result[i] = substitutedRti; + } + return changed ? result : rtiArray; + }, + _substituteNamed(universe, namedArray, typeArguments, depth) { + var changed, i, t1, t2, rti, substitutedRti, + $length = namedArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; i += 3) { + t1 = namedArray[i]; + t2 = namedArray[i + 1]; + rti = namedArray[i + 2]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result.splice(i, 3, t1, t2, substitutedRti); + } + return changed ? result : namedArray; + }, + _substituteFunctionParameters(universe, functionParameters, typeArguments, depth) { + var result, + requiredPositional = functionParameters._requiredPositional, + substitutedRequiredPositional = A._substituteArray(universe, requiredPositional, typeArguments, depth), + optionalPositional = functionParameters._optionalPositional, + substitutedOptionalPositional = A._substituteArray(universe, optionalPositional, typeArguments, depth), + named = functionParameters._named, + substitutedNamed = A._substituteNamed(universe, named, typeArguments, depth); + if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named) + return functionParameters; + result = new A._FunctionParameters(); + result._requiredPositional = substitutedRequiredPositional; + result._optionalPositional = substitutedOptionalPositional; + result._named = substitutedNamed; + return result; + }, + _setArrayType(target, rti) { + target[init.arrayRti] = rti; + return target; + }, + closureFunctionType(closure) { + var signature = closure.$signature; + if (signature != null) { + if (typeof signature == "number") + return A.getTypeFromTypesTable(signature); + return closure.$signature(); } - if (typeof console == "object" && typeof console.log != "undefined") { - console.log(string); - return; + return null; + }, + instanceOrFunctionType(object, testRti) { + var rti; + if (A.Rti__isUnionOfFunctionType(testRti)) + if (object instanceof A.Closure) { + rti = A.closureFunctionType(object); + if (rti != null) + return rti; + } + return A.instanceType(object); + }, + instanceType(object) { + var rti; + if (object instanceof A.Object) { + rti = object.$ti; + return rti != null ? rti : A._instanceTypeFromConstructor(object); } - if (typeof window == "object") - return; - if (typeof print == "function") { - print(string); - return; - } - throw "Unable to print message: " + String(string); - } - }, - J = { - makeDispatchRecord: function(interceptor, proto, extension, indexability) { - return {i: interceptor, p: proto, e: extension, x: indexability}; + if (Array.isArray(object)) + return A._arrayInstanceType(object); + return A._instanceTypeFromConstructor(J.getInterceptor$(object)); }, - getNativeInterceptor: function(object) { - var record, proto, objectProto, $constructor, interceptor; - record = object[init.dispatchPropertyName]; - if (record == null) - if ($.initNativeDispatchFlag == null) { - H.initNativeDispatch(); - record = object[init.dispatchPropertyName]; - } - if (record != null) { - proto = record.p; - if (false === proto) - return record.i; - if (true === proto) - return object; - objectProto = Object.getPrototypeOf(object); - if (proto === objectProto) - return record.i; - if (record.e === objectProto) - throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record)))); - } - $constructor = object.constructor; - interceptor = $constructor == null ? null : $constructor[$.$get$JS_INTEROP_INTERCEPTOR_TAG()]; - if (interceptor != null) - return interceptor; - interceptor = H.lookupAndCacheInterceptor(object); - if (interceptor != null) - return interceptor; - if (typeof object == "function") - return C.JavaScriptFunction_methods; - proto = Object.getPrototypeOf(object); - if (proto == null) - return C.PlainJavaScriptObject_methods; - if (proto === Object.prototype) - return C.PlainJavaScriptObject_methods; - if (typeof $constructor == "function") { - Object.defineProperty($constructor, $.$get$JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); - return C.UnknownJavaScriptObject_methods; + _arrayInstanceType(object) { + var rti = object[init.arrayRti], + defaultRti = type$.JSArray_dynamic; + if (rti == null) + return defaultRti; + if (rti.constructor !== defaultRti.constructor) + return defaultRti; + return rti; + }, + _instanceType(object) { + var rti = object.$ti; + return rti != null ? rti : A._instanceTypeFromConstructor(object); + }, + _instanceTypeFromConstructor(instance) { + var $constructor = instance.constructor, + probe = $constructor.$ccache; + if (probe != null) + return probe; + return A._instanceTypeFromConstructorMiss(instance, $constructor); + }, + _instanceTypeFromConstructorMiss(instance, $constructor) { + var effectiveConstructor = instance instanceof A.Closure ? instance.__proto__.__proto__.constructor : $constructor, + rti = A._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); + $constructor.$ccache = rti; + return rti; + }, + getTypeFromTypesTable(index) { + var rti, + table = init.types, + type = table[index]; + if (typeof type == "string") { + rti = A._Universe_eval(init.typeUniverse, type, false); + table[index] = rti; + return rti; } - return C.UnknownJavaScriptObject_methods; + return type; + }, + getRuntimeType(object) { + var rti = object instanceof A.Closure ? A.closureFunctionType(object) : null; + return A.createRuntimeType(rti == null ? A.instanceType(object) : rti); + }, + createRuntimeType(rti) { + var recipe, starErasedRecipe, starErasedRti, + type = rti._cachedRuntimeType; + if (type != null) + return type; + recipe = rti._canonicalRecipe; + starErasedRecipe = recipe.replace(/\*/g, ""); + if (starErasedRecipe === recipe) + return rti._cachedRuntimeType = new A._Type(rti); + starErasedRti = A._Universe_eval(init.typeUniverse, starErasedRecipe, true); + type = starErasedRti._cachedRuntimeType; + return rti._cachedRuntimeType = type == null ? starErasedRti._cachedRuntimeType = new A._Type(starErasedRti) : type; + }, + typeLiteral(recipe) { + return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); + }, + _installSpecializedIsTest(object) { + var t1, unstarred, isFn, $name, testRti = this; + if (testRti === type$.Object) + return A._finishIsFn(testRti, object, A._isObject); + if (!A.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + if (t1) + return A._finishIsFn(testRti, object, A._isTop); + t1 = testRti._kind; + unstarred = t1 === 6 ? testRti._primary : testRti; + if (unstarred === type$.int) + isFn = A._isInt; + else if (unstarred === type$.double || unstarred === type$.num) + isFn = A._isNum; + else if (unstarred === type$.String) + isFn = A._isString; + else + isFn = unstarred === type$.bool ? A._isBool : null; + if (isFn != null) + return A._finishIsFn(testRti, object, isFn); + if (unstarred._kind === 9) { + $name = unstarred._primary; + if (unstarred._rest.every(A.isTopType)) { + testRti._specializedTestResource = "$is" + $name; + if ($name === "List") + return A._finishIsFn(testRti, object, A._isListTestViaProperty); + return A._finishIsFn(testRti, object, A._isTestViaProperty); + } + } else if (t1 === 7) + return A._finishIsFn(testRti, object, A._generalNullableIsTestImplementation); + return A._finishIsFn(testRti, object, A._generalIsTestImplementation); + }, + _finishIsFn(testRti, object, isFn) { + testRti._is = isFn; + return testRti._is(object); + }, + _installSpecializedAsCheck(object) { + var t1, testRti = this, + asFn = A._generalAsCheckImplementation; + if (!A.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + if (t1) + asFn = A._asTop; + else if (testRti === type$.Object) + asFn = A._asObject; + else { + t1 = A.isNullable(testRti); + if (t1) + asFn = A._generalNullableAsCheckImplementation; + } + testRti._as = asFn; + return testRti._as(object); + }, + _nullIs(testRti) { + var t1, + kind = testRti._kind; + if (!A.isStrongTopType(testRti)) + if (!(testRti === type$.legacy_Object)) + if (!(testRti === type$.legacy_Never)) + if (kind !== 7) + t1 = kind === 8 && A._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull; + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; }, - JSArray_JSArray$fixed: function($length, $E) { - if ($length < 0 || $length > 4294967295) - throw H.wrapException(P.RangeError$range($length, 0, 4294967295, "length", null)); - return J.JSArray_JSArray$markFixed(new Array($length), $E); + _generalIsTestImplementation(object) { + var testRti = this; + if (object == null) + return A._nullIs(testRti); + return A._isSubtype(init.typeUniverse, A.instanceOrFunctionType(object, testRti), null, testRti, null); }, - JSArray_JSArray$markFixed: function(allocation, $E) { - return J.JSArray_markFixedList(H.setRuntimeTypeInfo(allocation, [$E])); + _generalNullableIsTestImplementation(object) { + if (object == null) + return true; + return this._primary._is(object); }, - JSArray_markFixedList: function(list) { - H.listTypeCheck(list); - list.fixed$length = Array; - return list; + _isTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A._nullIs(testRti); + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _isListTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A._nullIs(testRti); + if (typeof object != "object") + return false; + if (Array.isArray(object)) + return true; + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _generalAsCheckImplementation(object) { + var t1, testRti = this; + if (object == null) { + t1 = A.isNullable(testRti); + if (t1) + return object; + } else if (testRti._is(object)) + return object; + A._failedAsCheck(object, testRti); }, - JSArray_markUnmodifiableList: function(list) { - list.fixed$length = Array; - list.immutable$list = Array; - return list; + _generalNullableAsCheckImplementation(object) { + var testRti = this; + if (object == null) + return object; + else if (testRti._is(object)) + return object; + A._failedAsCheck(object, testRti); }, - JSString__isWhitespace: function(codeUnit) { - if (codeUnit < 256) - switch (codeUnit) { - case 9: - case 10: - case 11: - case 12: - case 13: - case 32: - case 133: - case 160: - return true; - default: - return false; - } - switch (codeUnit) { - case 5760: - case 8192: - case 8193: - case 8194: - case 8195: - case 8196: - case 8197: - case 8198: - case 8199: - case 8200: - case 8201: - case 8202: - case 8232: - case 8233: - case 8239: - case 8287: - case 12288: - case 65279: - return true; - default: - return false; - } + _failedAsCheck(object, testRti) { + throw A.wrapException(A._TypeError$fromMessage(A._Error_compose(object, A.instanceOrFunctionType(object, testRti), A._rtiToString(testRti, null)))); }, - JSString__skipLeadingWhitespace: function(string, index) { - var t1, codeUnit; - for (t1 = string.length; index < t1;) { - codeUnit = C.JSString_methods._codeUnitAt$1(string, index); - if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) - break; - ++index; - } - return index; + checkTypeBound(type, bound, variable, methodName) { + var _null = null; + if (A._isSubtype(init.typeUniverse, type, _null, bound, _null)) + return type; + throw A.wrapException(A._TypeError$fromMessage("The type argument '" + A._rtiToString(type, _null) + "' is not a subtype of the type variable bound '" + A._rtiToString(bound, _null) + "' of type variable '" + variable + "' in '" + methodName + "'.")); }, - JSString__skipTrailingWhitespace: function(string, index) { - var index0, codeUnit; - for (; index > 0; index = index0) { - index0 = index - 1; - codeUnit = C.JSString_methods.codeUnitAt$1(string, index0); - if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) - break; - } - return index; + _Error_compose(object, objectRti, checkedTypeDescription) { + var objectDescription = A.Error_safeToString(object); + return objectDescription + ": type '" + A._rtiToString(objectRti == null ? A.instanceType(object) : objectRti, null) + "' is not a subtype of type '" + checkedTypeDescription + "'"; }, - getInterceptor$: function(receiver) { - if (typeof receiver == "number") { - if (Math.floor(receiver) == receiver) - return J.JSInt.prototype; - return J.JSDouble.prototype; - } - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return J.JSNull.prototype; - if (typeof receiver == "boolean") - return J.JSBool.prototype; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); + _TypeError$fromMessage(message) { + return new A._TypeError("TypeError: " + message); }, - getInterceptor$ansx: function(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); + _TypeError__TypeError$forType(object, type) { + return new A._TypeError("TypeError: " + A._Error_compose(object, null, type)); }, - getInterceptor$asx: function(receiver) { - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); + _isObject(object) { + return object != null; }, - getInterceptor$ax: function(receiver) { - if (receiver == null) - return receiver; - if (receiver.constructor == Array) - return J.JSArray.prototype; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); + _asObject(object) { + if (object != null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "Object")); }, - getInterceptor$n: function(receiver) { - if (typeof receiver == "number") - return J.JSNumber.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof P.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; + _isTop(object) { + return true; }, - getInterceptor$s: function(receiver) { - if (typeof receiver == "string") - return J.JSString.prototype; - if (receiver == null) - return receiver; - if (!(receiver instanceof P.Object)) - return J.UnknownJavaScriptObject.prototype; - return receiver; + _asTop(object) { + return object; }, - getInterceptor$x: function(receiver) { - if (receiver == null) - return receiver; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - return receiver; - } - if (receiver instanceof P.Object) - return receiver; - return J.getNativeInterceptor(receiver); + _isBool(object) { + return true === object || false === object; }, - get$hashCode$: function(receiver) { - return J.getInterceptor$(receiver).get$hashCode(receiver); + _asBool(object) { + if (true === object) + return true; + if (false === object) + return false; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); }, - get$iterator$ax: function(receiver) { - return J.getInterceptor$ax(receiver).get$iterator(receiver); + _asBoolS(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool")); }, - get$length$asx: function(receiver) { - return J.getInterceptor$asx(receiver).get$length(receiver); + _asBoolQ(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "bool?")); }, - get$onClick$x: function(receiver) { - return J.getInterceptor$x(receiver).get$onClick(receiver); + _asDouble(object) { + if (typeof object == "number") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); }, - $add$ansx: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return receiver + a0; - return J.getInterceptor$ansx(receiver).$add(receiver, a0); + _asDoubleS(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double")); }, - $eq$: function(receiver, a0) { - if (receiver == null) - return a0 == null; - if (typeof receiver != "object") - return a0 != null && receiver === a0; - return J.getInterceptor$(receiver).$eq(receiver, a0); + _asDoubleQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "double?")); }, - $gt$n: function(receiver, a0) { - if (typeof receiver == "number" && typeof a0 == "number") - return receiver > a0; - return J.getInterceptor$n(receiver).$gt(receiver, a0); + _isInt(object) { + return typeof object == "number" && Math.floor(object) === object; }, - $index$asx: function(receiver, a0) { - if (typeof a0 === "number") - if (receiver.constructor == Array || typeof receiver == "string" || H.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) - if (a0 >>> 0 === a0 && a0 < receiver.length) - return receiver[a0]; - return J.getInterceptor$asx(receiver).$index(receiver, a0); + _asInt(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); }, - $indexSet$ax: function(receiver, a0, a1) { - return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); + _asIntS(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int")); }, - _codeUnitAt$1$s: function(receiver, a0) { - return J.getInterceptor$s(receiver)._codeUnitAt$1(receiver, a0); + _asIntQ(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "int?")); }, - _removeChild$1$x: function(receiver, a0) { - return J.getInterceptor$x(receiver)._removeChild$1(receiver, a0); + _isNum(object) { + return typeof object == "number"; }, - _removeEventListener$3$x: function(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); + _asNum(object) { + if (typeof object == "number") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); }, - addEventListener$3$x: function(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); + _asNumS(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num")); }, - codeUnitAt$1$s: function(receiver, a0) { - return J.getInterceptor$s(receiver).codeUnitAt$1(receiver, a0); + _asNumQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "num?")); }, - contains$1$asx: function(receiver, a0) { - return J.getInterceptor$asx(receiver).contains$1(receiver, a0); + _isString(object) { + return typeof object == "string"; }, - elementAt$1$ax: function(receiver, a0) { - return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); + _asString(object) { + if (typeof object == "string") + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); }, - endsWith$1$s: function(receiver, a0) { - return J.getInterceptor$s(receiver).endsWith$1(receiver, a0); + _asStringS(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String")); }, - fillRange$3$x: function(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver).fillRange$3(receiver, a0, a1, a2); + _asStringQ(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw A.wrapException(A._TypeError__TypeError$forType(object, "String?")); + }, + _rtiArrayToString(array, genericContext) { + var s, sep, i; + for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") + s += sep + A._rtiToString(array[i], genericContext); + return s; + }, + _functionRtiToString(functionType, genericContext, bounds) { + var boundsLength, outerContextLength, offset, i, t1, t2, typeParametersText, typeSep, t3, t4, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", "; + if (bounds != null) { + boundsLength = bounds.length; + if (genericContext == null) { + genericContext = A._setArrayType([], type$.JSArray_String); + outerContextLength = null; + } else + outerContextLength = genericContext.length; + offset = genericContext.length; + for (i = boundsLength; i > 0; --i) + B.JSArray_methods.add$1(genericContext, "T" + (offset + i)); + for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { + t3 = genericContext.length; + t4 = t3 - 1 - i; + if (!(t4 >= 0)) + return A.ioore(genericContext, t4); + typeParametersText = B.JSString_methods.$add(typeParametersText + typeSep, genericContext[t4]); + boundRti = bounds[i]; + kind = boundRti._kind; + if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) + if (!(boundRti === t2)) + t3 = false; + else + t3 = true; + else + t3 = true; + if (!t3) + typeParametersText += " extends " + A._rtiToString(boundRti, genericContext); + } + typeParametersText += ">"; + } else { + typeParametersText = ""; + outerContextLength = null; + } + t1 = functionType._primary; + parameters = functionType._rest; + requiredPositional = parameters._requiredPositional; + requiredPositionalLength = requiredPositional.length; + optionalPositional = parameters._optionalPositional; + optionalPositionalLength = optionalPositional.length; + named = parameters._named; + namedLength = named.length; + returnTypeText = A._rtiToString(t1, genericContext); + for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(requiredPositional[i], genericContext); + if (optionalPositionalLength > 0) { + argumentsText += sep + "["; + for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(optionalPositional[i], genericContext); + argumentsText += "]"; + } + if (namedLength > 0) { + argumentsText += sep + "{"; + for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) { + argumentsText += sep; + if (named[i + 1]) + argumentsText += "required "; + argumentsText += A._rtiToString(named[i + 2], genericContext) + " " + named[i]; + } + argumentsText += "}"; + } + if (outerContextLength != null) { + genericContext.toString; + genericContext.length = outerContextLength; + } + return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; }, - indexOf$2$s: function(receiver, a0, a1) { - return J.getInterceptor$s(receiver).indexOf$2(receiver, a0, a1); + _rtiToString(rti, genericContext) { + var s, questionArgument, argumentKind, $name, $arguments, t1, t2, + kind = rti._kind; + if (kind === 5) + return "erased"; + if (kind === 2) + return "dynamic"; + if (kind === 3) + return "void"; + if (kind === 1) + return "Never"; + if (kind === 4) + return "any"; + if (kind === 6) { + s = A._rtiToString(rti._primary, genericContext); + return s; + } + if (kind === 7) { + questionArgument = rti._primary; + s = A._rtiToString(questionArgument, genericContext); + argumentKind = questionArgument._kind; + return (argumentKind === 11 || argumentKind === 12 ? "(" + s + ")" : s) + "?"; + } + if (kind === 8) + return "FutureOr<" + A._rtiToString(rti._primary, genericContext) + ">"; + if (kind === 9) { + $name = A._unminifyOrTag(rti._primary); + $arguments = rti._rest; + return $arguments.length > 0 ? $name + ("<" + A._rtiArrayToString($arguments, genericContext) + ">") : $name; + } + if (kind === 11) + return A._functionRtiToString(rti, genericContext, null); + if (kind === 12) + return A._functionRtiToString(rti._primary, genericContext, rti._rest); + if (kind === 13) { + t1 = rti._primary; + t2 = genericContext.length; + t1 = t2 - 1 - t1; + if (!(t1 >= 0 && t1 < t2)) + return A.ioore(genericContext, t1); + return genericContext[t1]; + } + return "?"; + }, + _unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) + return preserved; + return rawClassName; }, - matchAsPrefix$2$s: function(receiver, a0, a1) { - return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); + _Universe_findRule(universe, targetType) { + var rule = universe.tR[targetType]; + for (; typeof rule == "string";) + rule = universe.tR[rule]; + return rule; + }, + _Universe_findErasedType(universe, cls) { + var $length, erased, $arguments, i, $interface, + t1 = universe.eT, + probe = t1[cls]; + if (probe == null) + return A._Universe_eval(universe, cls, false); + else if (typeof probe == "number") { + $length = probe; + erased = A._Universe__lookupTerminalRti(universe, 5, "#"); + $arguments = A._Utils_newArrayOrEmpty($length); + for (i = 0; i < $length; ++i) + $arguments[i] = erased; + $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); + t1[cls] = $interface; + return $interface; + } else + return probe; + }, + _Universe_addRules(universe, rules) { + return A._Utils_objectAssign(universe.tR, rules); + }, + _Universe_addErasedTypes(universe, types) { + return A._Utils_objectAssign(universe.eT, types); + }, + _Universe_eval(universe, recipe, normalize) { + var rti, + t1 = universe.eC, + probe = t1.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, null, recipe, normalize)); + t1.set(recipe, rti); + return rti; + }, + _Universe_evalInEnvironment(universe, environment, recipe) { + var probe, rti, + cache = environment._evalCache; + if (cache == null) + cache = environment._evalCache = new Map(); + probe = cache.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, environment, recipe, true)); + cache.set(recipe, rti); + return rti; + }, + _Universe_bind(universe, environment, argumentsRti) { + var argumentsRecipe, probe, rti, + cache = environment._bindCache; + if (cache == null) + cache = environment._bindCache = new Map(); + argumentsRecipe = argumentsRti._canonicalRecipe; + probe = cache.get(argumentsRecipe); + if (probe != null) + return probe; + rti = A._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]); + cache.set(argumentsRecipe, rti); + return rti; + }, + _Universe__installTypeTests(universe, rti) { + rti._as = A._installSpecializedAsCheck; + rti._is = A._installSpecializedIsTest; + return rti; + }, + _Universe__lookupTerminalRti(universe, kind, key) { + var rti, t1, + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = kind; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; }, - noSuchMethod$1$: function(receiver, a0) { - return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); + _Universe__lookupStarRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "*", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createStarRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; }, - padRight$1$s: function(receiver, a0) { - return J.getInterceptor$s(receiver).padRight$1(receiver, a0); + _Universe__createStarRti(universe, baseType, key, normalize) { + var baseKind, t1, rti; + if (normalize) { + baseKind = baseType._kind; + if (!A.isStrongTopType(baseType)) + t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6; + else + t1 = true; + if (t1) + return baseType; + } + rti = new A.Rti(null, null); + rti._kind = 6; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupQuestionRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "?", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createQuestionRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; }, - postMessage$3$x: function(receiver, a0, a1, a2) { - return J.getInterceptor$x(receiver).postMessage$3(receiver, a0, a1, a2); + _Universe__createQuestionRti(universe, baseType, key, normalize) { + var baseKind, t1, starArgument, rti; + if (normalize) { + baseKind = baseType._kind; + if (!A.isStrongTopType(baseType)) + if (!(baseType === type$.Null || baseType === type$.JSNull)) + if (baseKind !== 7) + t1 = baseKind === 8 && A.isNullable(baseType._primary); + else + t1 = true; + else + t1 = true; + else + t1 = true; + if (t1) + return baseType; + else if (baseKind === 1 || baseType === type$.legacy_Never) + return type$.Null; + else if (baseKind === 6) { + starArgument = baseType._primary; + if (starArgument._kind === 8 && A.isNullable(starArgument._primary)) + return starArgument; + else + return A.Rti__getQuestionFromStar(universe, baseType); + } + } + rti = new A.Rti(null, null); + rti._kind = 7; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupFutureOrRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "/", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createFutureOrRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; }, - replaceFirst$2$s: function(receiver, a0, a1) { - return J.getInterceptor$s(receiver).replaceFirst$2(receiver, a0, a1); + _Universe__createFutureOrRti(universe, baseType, key, normalize) { + var t1, t2, rti; + if (normalize) { + t1 = baseType._kind; + if (!A.isStrongTopType(baseType)) + if (!(baseType === type$.legacy_Object)) + t2 = false; + else + t2 = true; + else + t2 = true; + if (t2 || baseType === type$.Object) + return baseType; + else if (t1 === 1) + return A._Universe__lookupInterfaceRti(universe, "Future", [baseType]); + else if (baseType === type$.Null || baseType === type$.JSNull) + return type$.nullable_Future_Null; + } + rti = new A.Rti(null, null); + rti._kind = 8; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupGenericFunctionParameterRti(universe, index) { + var rti, t1, + key = "" + index + "^", + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 13; + rti._primary = index; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; }, - replaceRange$3$asx: function(receiver, a0, a1, a2) { - return J.getInterceptor$asx(receiver).replaceRange$3(receiver, a0, a1, a2); + _Universe__canonicalRecipeJoin($arguments) { + var s, sep, i, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",") + s += sep + $arguments[i]._canonicalRecipe; + return s; + }, + _Universe__canonicalRecipeJoinNamed($arguments) { + var s, sep, i, t1, nameSep, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") { + t1 = $arguments[i]; + nameSep = $arguments[i + 1] ? "!" : ":"; + s += sep + t1 + nameSep + $arguments[i + 2]._canonicalRecipe; + } + return s; + }, + _Universe__lookupInterfaceRti(universe, $name, $arguments) { + var probe, rti, t1, + s = $name; + if ($arguments.length > 0) + s += "<" + A._Universe__canonicalRecipeJoin($arguments) + ">"; + probe = universe.eC.get(s); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 9; + rti._primary = $name; + rti._rest = $arguments; + if ($arguments.length > 0) + rti._precomputed1 = $arguments[0]; + rti._canonicalRecipe = s; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(s, t1); + return t1; }, - startsWith$1$s: function(receiver, a0) { - return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); + _Universe__lookupBindingRti(universe, base, $arguments) { + var newBase, newArguments, key, probe, rti, t1; + if (base._kind === 10) { + newBase = base._primary; + newArguments = base._rest.concat($arguments); + } else { + newArguments = $arguments; + newBase = base; + } + key = newBase._canonicalRecipe + (";<" + A._Universe__canonicalRecipeJoin(newArguments) + ">"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 10; + rti._primary = newBase; + rti._rest = newArguments; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; }, - startsWith$2$s: function(receiver, a0, a1) { - return J.getInterceptor$s(receiver).startsWith$2(receiver, a0, a1); + _Universe__lookupFunctionRti(universe, returnType, parameters) { + var sep, key, probe, rti, t1, + s = returnType._canonicalRecipe, + requiredPositional = parameters._requiredPositional, + requiredPositionalLength = requiredPositional.length, + optionalPositional = parameters._optionalPositional, + optionalPositionalLength = optionalPositional.length, + named = parameters._named, + namedLength = named.length, + recipe = "(" + A._Universe__canonicalRecipeJoin(requiredPositional); + if (optionalPositionalLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "[" + A._Universe__canonicalRecipeJoin(optionalPositional) + "]"; + } + if (namedLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "{" + A._Universe__canonicalRecipeJoinNamed(named) + "}"; + } + key = s + (recipe + ")"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 11; + rti._primary = returnType; + rti._rest = parameters; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; }, - substring$1$s: function(receiver, a0) { - return J.getInterceptor$s(receiver).substring$1(receiver, a0); + _Universe__lookupGenericFunctionRti(universe, baseFunctionType, bounds, normalize) { + var t1, + key = baseFunctionType._canonicalRecipe + ("<" + A._Universe__canonicalRecipeJoin(bounds) + ">"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); + universe.eC.set(key, t1); + return t1; }, - substring$2$s: function(receiver, a0, a1) { - return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1); + _Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize) { + var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti; + if (normalize) { + $length = bounds.length; + typeArguments = A._Utils_newArrayOrEmpty($length); + for (count = 0, i = 0; i < $length; ++i) { + bound = bounds[i]; + if (bound._kind === 1) { + typeArguments[i] = bound; + ++count; + } + } + if (count > 0) { + substitutedBase = A._substitute(universe, baseFunctionType, typeArguments, 0); + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, 0); + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); + } + } + rti = new A.Rti(null, null); + rti._kind = 12; + rti._primary = baseFunctionType; + rti._rest = bounds; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Parser_create(universe, environment, recipe, normalize) { + return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; + }, + _Parser_parse(parser) { + var t2, i, ch, t3, array, head, base, parameters, optionalPositional, named, item, + source = parser.r, + t1 = parser.s; + for (t2 = source.length, i = 0; i < t2;) { + ch = source.charCodeAt(i); + if (ch >= 48 && ch <= 57) + i = A._Parser_handleDigit(i + 1, ch, source, t1); + else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36) + i = A._Parser_handleIdentifier(parser, i, source, t1, false); + else if (ch === 46) + i = A._Parser_handleIdentifier(parser, i, source, t1, true); + else { + ++i; + switch (ch) { + case 44: + break; + case 58: + t1.push(false); + break; + case 33: + t1.push(true); + break; + case 59: + t1.push(A._Parser_toType(parser.u, parser.e, t1.pop())); + break; + case 94: + t1.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); + break; + case 35: + t1.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); + break; + case 64: + t1.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); + break; + case 126: + t1.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); + break; + case 60: + t1.push(parser.p); + parser.p = t1.length; + break; + case 62: + t3 = parser.u; + array = t1.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = t1.pop(); + head = t1.pop(); + if (typeof head == "string") + t1.push(A._Universe__lookupInterfaceRti(t3, head, array)); + else { + base = A._Parser_toType(t3, parser.e, head); + switch (base._kind) { + case 11: + t1.push(A._Universe__lookupGenericFunctionRti(t3, base, array, parser.n)); + break; + default: + t1.push(A._Universe__lookupBindingRti(t3, base, array)); + break; + } + } + break; + case 38: + A._Parser_handleExtendedOperations(parser, t1); + break; + case 42: + t3 = parser.u; + t1.push(A._Universe__lookupStarRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 63: + t3 = parser.u; + t1.push(A._Universe__lookupQuestionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 47: + t3 = parser.u; + t1.push(A._Universe__lookupFutureOrRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + break; + case 40: + t1.push(parser.p); + parser.p = t1.length; + break; + case 41: + t3 = parser.u; + parameters = new A._FunctionParameters(); + optionalPositional = t3.sEA; + named = t3.sEA; + head = t1.pop(); + if (typeof head == "number") + switch (head) { + case -1: + optionalPositional = t1.pop(); + break; + case -2: + named = t1.pop(); + break; + default: + t1.push(head); + break; + } + else + t1.push(head); + array = t1.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = t1.pop(); + parameters._requiredPositional = array; + parameters._optionalPositional = optionalPositional; + parameters._named = named; + t1.push(A._Universe__lookupFunctionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parameters)); + break; + case 91: + t1.push(parser.p); + parser.p = t1.length; + break; + case 93: + array = t1.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = t1.pop(); + t1.push(array); + t1.push(-1); + break; + case 123: + t1.push(parser.p); + parser.p = t1.length; + break; + case 125: + array = t1.splice(parser.p); + A._Parser_toTypesNamed(parser.u, parser.e, array); + parser.p = t1.pop(); + t1.push(array); + t1.push(-2); + break; + default: + throw "Bad character " + ch; + } + } + } + item = t1.pop(); + return A._Parser_toType(parser.u, parser.e, item); }, - toString$0$: function(receiver) { - return J.getInterceptor$(receiver).toString$0(receiver); + _Parser_handleDigit(i, digit, source, stack) { + var t1, ch, + value = digit - 48; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (!(ch >= 48 && ch <= 57)) + break; + value = value * 10 + (ch - 48); + } + stack.push(value); + return i; + }, + _Parser_handleIdentifier(parser, start, source, stack, hasPeriod) { + var t1, ch, t2, string, environment, recipe, + i = start + 1; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (ch === 46) { + if (hasPeriod) + break; + hasPeriod = true; + } else { + if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36)) + t2 = ch >= 48 && ch <= 57; + else + t2 = true; + if (!t2) + break; + } + } + string = source.substring(start, i); + if (hasPeriod) { + t1 = parser.u; + environment = parser.e; + if (environment._kind === 10) + environment = environment._primary; + recipe = A._Universe_findRule(t1, environment._primary)[string]; + if (recipe == null) + A.throwExpression('No "' + string + '" in "' + A.Rti__getCanonicalRecipe(environment) + '"'); + stack.push(A._Universe_evalInEnvironment(t1, environment, recipe)); + } else + stack.push(string); + return i; }, - trim$0$s: function(receiver) { - return J.getInterceptor$s(receiver).trim$0(receiver); + _Parser_handleExtendedOperations(parser, stack) { + var $top = stack.pop(); + if (0 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 1, "0&")); + return; + } + if (1 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 4, "1&")); + return; + } + throw A.wrapException(A.AssertionError$("Unexpected extended operation " + A.S($top))); }, - waitUntilDone$0$x: function(receiver) { - return J.getInterceptor$x(receiver).waitUntilDone$0(receiver); + _Parser_toType(universe, environment, item) { + if (typeof item == "string") + return A._Universe__lookupInterfaceRti(universe, item, universe.sEA); + else if (typeof item == "number") + return A._Parser_indexToType(universe, environment, item); + else + return item; }, - Interceptor: function Interceptor() { + _Parser_toTypes(universe, environment, items) { + var i, + $length = items.length; + for (i = 0; i < $length; ++i) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_toTypesNamed(universe, environment, items) { + var i, + $length = items.length; + for (i = 2; i < $length; i += 3) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_indexToType(universe, environment, index) { + var typeArguments, len, + kind = environment._kind; + if (kind === 10) { + if (index === 0) + return environment._primary; + typeArguments = environment._rest; + len = typeArguments.length; + if (index <= len) + return typeArguments[index - 1]; + index -= len; + environment = environment._primary; + kind = environment._kind; + } else if (index === 0) + return environment; + if (kind !== 9) + throw A.wrapException(A.AssertionError$("Indexed base must be an interface type")); + typeArguments = environment._rest; + if (index <= typeArguments.length) + return typeArguments[index - 1]; + throw A.wrapException(A.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); + }, + _isSubtype(universe, s, sEnv, t, tEnv) { + var t1, sKind, leftTypeVariable, tKind, sBounds, tBounds, sLength, i, sBound, tBound; + if (s === t) + return true; + if (!A.isStrongTopType(t)) + if (!(t === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + if (t1) + return true; + sKind = s._kind; + if (sKind === 4) + return true; + if (A.isStrongTopType(s)) + return false; + if (s._kind !== 1) + t1 = false; + else + t1 = true; + if (t1) + return true; + leftTypeVariable = sKind === 13; + if (leftTypeVariable) + if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) + return true; + tKind = t._kind; + t1 = s === type$.Null || s === type$.JSNull; + if (t1) { + if (tKind === 8) + return A._isSubtype(universe, s, sEnv, t._primary, tEnv); + return t === type$.Null || t === type$.JSNull || tKind === 7 || tKind === 6; + } + if (t === type$.Object) { + if (sKind === 8) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + if (sKind === 6) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + return sKind !== 7; + } + if (sKind === 6) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + if (tKind === 6) { + t1 = A.Rti__getQuestionFromStar(universe, t); + return A._isSubtype(universe, s, sEnv, t1, tEnv); + } + if (sKind === 8) { + if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv)) + return false; + return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); + } + if (sKind === 7) { + t1 = A._isSubtype(universe, type$.Null, sEnv, t, tEnv); + return t1 && A._isSubtype(universe, s._primary, sEnv, t, tEnv); + } + if (tKind === 8) { + if (A._isSubtype(universe, s, sEnv, t._primary, tEnv)) + return true; + return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv); + } + if (tKind === 7) { + t1 = A._isSubtype(universe, s, sEnv, type$.Null, tEnv); + return t1 || A._isSubtype(universe, s, sEnv, t._primary, tEnv); + } + if (leftTypeVariable) + return false; + t1 = sKind !== 11; + if ((!t1 || sKind === 12) && t === type$.Function) + return true; + if (tKind === 12) { + if (s === type$.JavaScriptFunction) + return true; + if (sKind !== 12) + return false; + sBounds = s._rest; + tBounds = t._rest; + sLength = sBounds.length; + if (sLength !== tBounds.length) + return false; + sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); + tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); + for (i = 0; i < sLength; ++i) { + sBound = sBounds[i]; + tBound = tBounds[i]; + if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv)) + return false; + } + return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv); + } + if (tKind === 11) { + if (s === type$.JavaScriptFunction) + return true; + if (t1) + return false; + return A._isFunctionSubtype(universe, s, sEnv, t, tEnv); + } + if (sKind === 9) { + if (tKind !== 9) + return false; + return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv); + } + return false; }, - JSBool: function JSBool() { + _isFunctionSubtype(universe, s, sEnv, t, tEnv) { + var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; + if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) + return false; + sParameters = s._rest; + tParameters = t._rest; + sRequiredPositional = sParameters._requiredPositional; + tRequiredPositional = tParameters._requiredPositional; + sRequiredPositionalLength = sRequiredPositional.length; + tRequiredPositionalLength = tRequiredPositional.length; + if (sRequiredPositionalLength > tRequiredPositionalLength) + return false; + requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength; + sOptionalPositional = sParameters._optionalPositional; + tOptionalPositional = tParameters._optionalPositional; + sOptionalPositionalLength = sOptionalPositional.length; + tOptionalPositionalLength = tOptionalPositional.length; + if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength) + return false; + for (i = 0; i < sRequiredPositionalLength; ++i) { + t1 = sRequiredPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < requiredPositionalDelta; ++i) { + t1 = sOptionalPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < tOptionalPositionalLength; ++i) { + t1 = sOptionalPositional[requiredPositionalDelta + i]; + if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv)) + return false; + } + sNamed = sParameters._named; + tNamed = tParameters._named; + sNamedLength = sNamed.length; + tNamedLength = tNamed.length; + for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { + tName = tNamed[tIndex]; + for (; true;) { + if (sIndex >= sNamedLength) + return false; + sName = sNamed[sIndex]; + sIndex += 3; + if (tName < sName) + return false; + sIsRequired = sNamed[sIndex - 2]; + if (sName < tName) { + if (sIsRequired) + return false; + continue; + } + t1 = tNamed[tIndex + 1]; + if (sIsRequired && !t1) + return false; + t1 = sNamed[sIndex - 1]; + if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) + return false; + break; + } + } + for (; sIndex < sNamedLength;) { + if (sNamed[sIndex + 1]) + return false; + sIndex += 3; + } + return true; }, - JSNull: function JSNull() { + _isInterfaceSubtype(universe, s, sEnv, t, tEnv) { + var rule, recipes, $length, supertypeArgs, i, t1, t2, + sName = s._primary, + tName = t._primary; + for (; sName !== tName;) { + rule = universe.tR[sName]; + if (rule == null) + return false; + if (typeof rule == "string") { + sName = rule; + continue; + } + recipes = rule[tName]; + if (recipes == null) + return false; + $length = recipes.length; + supertypeArgs = $length > 0 ? new Array($length) : init.typeUniverse.sEA; + for (i = 0; i < $length; ++i) + supertypeArgs[i] = A._Universe_evalInEnvironment(universe, s, recipes[i]); + return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv); + } + t1 = s._rest; + t2 = t._rest; + return A._areArgumentsSubtypes(universe, t1, null, sEnv, t2, tEnv); }, - JavaScriptObject: function JavaScriptObject() { + _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv) { + var i, t1, t2, + $length = sArgs.length; + for (i = 0; i < $length; ++i) { + t1 = sArgs[i]; + t2 = tArgs[i]; + if (!A._isSubtype(universe, t1, sEnv, t2, tEnv)) + return false; + } + return true; }, - PlainJavaScriptObject: function PlainJavaScriptObject() { + isNullable(t) { + var t1, + kind = t._kind; + if (!(t === type$.Null || t === type$.JSNull)) + if (!A.isStrongTopType(t)) + if (kind !== 7) + if (!(kind === 6 && A.isNullable(t._primary))) + t1 = kind === 8 && A.isNullable(t._primary); + else + t1 = true; + else + t1 = true; + else + t1 = true; + else + t1 = true; + return t1; }, - UnknownJavaScriptObject: function UnknownJavaScriptObject() { + isTopType(t) { + var t1; + if (!A.isStrongTopType(t)) + if (!(t === type$.legacy_Object)) + t1 = false; + else + t1 = true; + else + t1 = true; + return t1; }, - JavaScriptFunction: function JavaScriptFunction() { + isStrongTopType(t) { + var kind = t._kind; + return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; }, - JSArray: function JSArray(t0) { - this.$ti = t0; + _Utils_objectAssign(o, other) { + var i, key, + keys = Object.keys(other), + $length = keys.length; + for (i = 0; i < $length; ++i) { + key = keys[i]; + o[key] = other[key]; + } }, - JSUnmodifiableArray: function JSUnmodifiableArray(t0) { - this.$ti = t0; + _Utils_newArrayOrEmpty($length) { + return $length > 0 ? new Array($length) : init.typeUniverse.sEA; }, - ArrayIterator: function ArrayIterator(t0, t1, t2, t3) { + Rti: function Rti(t0, t1) { var _ = this; - _._iterable = t0; - _.__interceptors$_length = t1; - _._index = t2; - _.__interceptors$_current = null; - _.$ti = t3; + _._as = t0; + _._is = t1; + _._cachedRuntimeType = _._specializedTestResource = _._precomputed1 = null; + _._kind = 0; + _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; }, - JSNumber: function JSNumber() { + _FunctionParameters: function _FunctionParameters() { + this._named = this._optionalPositional = this._requiredPositional = null; }, - JSInt: function JSInt() { + _Type: function _Type(t0) { + this._rti = t0; }, - JSDouble: function JSDouble() { + _Error: function _Error() { }, - JSString: function JSString() { - } - }, - P = { - _AsyncRun__initializeScheduleImmediate: function() { - var t1, div, span; - t1 = {}; + _TypeError: function _TypeError(t0) { + this.__rti$_message = t0; + }, + _AsyncRun__initializeScheduleImmediate() { + var div, span, t1 = {}; if (self.scheduleImmediate != null) - return P.async__AsyncRun__scheduleImmediateJsOverride$closure(); + return A.async__AsyncRun__scheduleImmediateJsOverride$closure(); if (self.MutationObserver != null && self.document != null) { div = self.document.createElement("div"); span = self.document.createElement("span"); t1.storedCallback = null; - new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); - return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); + new self.MutationObserver(A.convertDartClosureToJS(new A._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); + return new A._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); } else if (self.setImmediate != null) - return P.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); - return P.async__AsyncRun__scheduleImmediateWithTimer$closure(); + return A.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); + return A.async__AsyncRun__scheduleImmediateWithTimer$closure(); }, - _AsyncRun__scheduleImmediateJsOverride: function(callback) { - self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0)); + _AsyncRun__scheduleImmediateJsOverride(callback) { + self.scheduleImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateJsOverride_internalCallback(type$.void_Function._as(callback)), 0)); }, - _AsyncRun__scheduleImmediateWithSetImmediate: function(callback) { - self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0)); + _AsyncRun__scheduleImmediateWithSetImmediate(callback) { + self.setImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(type$.void_Function._as(callback)), 0)); }, - _AsyncRun__scheduleImmediateWithTimer: function(callback) { - P.Timer__createTimer(C.Duration_0, H.functionTypeCheck(callback, {func: 1, ret: -1})); + _AsyncRun__scheduleImmediateWithTimer(callback) { + A.Timer__createTimer(B.Duration_0, type$.void_Function._as(callback)); }, - Timer__createTimer: function(duration, callback) { - var milliseconds; - H.functionTypeCheck(callback, {func: 1, ret: -1}); - milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000); - return P._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); + Timer__createTimer(duration, callback) { + var milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$(milliseconds, callback); }, - Timer__createPeriodicTimer: function(duration, callback) { - var milliseconds; - H.functionTypeCheck(callback, {func: 1, ret: -1, args: [P.Timer]}); - milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000); - return P._TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback); + Timer__createPeriodicTimer(duration, callback) { + var milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$periodic(milliseconds, callback); }, - _TimerImpl$: function(milliseconds, callback) { - var t1 = new P._TimerImpl(); + _TimerImpl$(milliseconds, callback) { + var t1 = new A._TimerImpl(); t1._TimerImpl$2(milliseconds, callback); return t1; }, - _TimerImpl$periodic: function(milliseconds, callback) { - var t1 = new P._TimerImpl(); + _TimerImpl$periodic(milliseconds, callback) { + var t1 = new A._TimerImpl(); t1._TimerImpl$periodic$2(milliseconds, callback); return t1; }, - _makeAsyncAwaitCompleter: function($T) { - return new P._AsyncAwaitCompleter(new P._SyncCompleter(new P._Future(0, $.Zone__current, [$T]), [$T]), false, [$T]); + _makeAsyncAwaitCompleter($T) { + return new A._AsyncAwaitCompleter(new A._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); }, - _asyncStartSync: function(bodyFunction, completer) { - H.functionTypeCheck(bodyFunction, {func: 1, ret: -1, args: [P.int,,]}); - H.interceptedTypeCheck(completer, "$is_AsyncAwaitCompleter"); + _asyncStartSync(bodyFunction, completer) { bodyFunction.call$2(0, null); completer.isSync = true; - return completer._completer.future; - }, - _asyncAwait: function(object, bodyFunction) { - P._awaitOnObject(object, H.functionTypeCheck(bodyFunction, {func: 1, ret: -1, args: [P.int,,]})); - }, - _asyncReturn: function(object, completer) { - H.interceptedTypeCheck(completer, "$isCompleter").complete$1(0, object); - }, - _asyncRethrow: function(object, completer) { - H.interceptedTypeCheck(completer, "$isCompleter").completeError$2(H.unwrapException(object), H.getTraceFromException(object)); - }, - _awaitOnObject: function(object, bodyFunction) { - var thenCallback, errorCallback, t1, future; - H.functionTypeCheck(bodyFunction, {func: 1, ret: -1, args: [P.int,,]}); - thenCallback = new P._awaitOnObject_closure(bodyFunction); - errorCallback = new P._awaitOnObject_closure0(bodyFunction); - t1 = J.getInterceptor$(object); - if (!!t1.$is_Future) - object._thenNoZoneRegistration$1$2(thenCallback, errorCallback, null); - else if (!!t1.$isFuture) - object.then$1$2$onError(thenCallback, errorCallback, null); + return completer._future; + }, + _asyncAwait(object, bodyFunction) { + A._awaitOnObject(object, bodyFunction); + }, + _asyncReturn(object, completer) { + completer.complete$1(0, object); + }, + _asyncRethrow(object, completer) { + completer.completeError$2(A.unwrapException(object), A.getTraceFromException(object)); + }, + _awaitOnObject(object, bodyFunction) { + var t1, future, + thenCallback = new A._awaitOnObject_closure(bodyFunction), + errorCallback = new A._awaitOnObject_closure0(bodyFunction); + if (object instanceof A._Future) + object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic); else { - future = new P._Future(0, $.Zone__current, [null]); - H.assertSubtypeOfRuntimeType(object, null); - future._state = 4; - future._resultOrListeners = object; - future._thenNoZoneRegistration$1$2(thenCallback, null, null); + t1 = type$.dynamic; + if (type$.Future_dynamic._is(object)) + object.then$1$2$onError(thenCallback, errorCallback, t1); + else { + future = new A._Future($.Zone__current, type$._Future_dynamic); + future._async$_state = 8; + future._resultOrListeners = object; + future._thenAwait$1$2(thenCallback, errorCallback, t1); + } } }, - _wrapJsFunctionForAsync: function($function) { + _wrapJsFunctionForAsync($function) { var $protected = function(fn, ERROR) { return function(errorCode, result) { while (true) @@ -2692,276 +3274,290 @@ } }; }($function, 1); - return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), P.Null, P.int, null); + return $.Zone__current.registerBinaryCallback$3$1(new A._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); }, - _Future$zoneValue: function(value, _zone, $T) { - var t1 = new P._Future(0, _zone, [$T]); - H.assertSubtypeOfRuntimeType(value, $T); - t1._state = 4; - t1._resultOrListeners = value; - return t1; + AsyncError$(error, stackTrace) { + var t1 = A.checkNotNullable(error, "error", type$.Object); + return new A.AsyncError(t1, stackTrace == null ? A.AsyncError_defaultStackTrace(error) : stackTrace); }, - _Future__chainForeignFuture: function(source, target) { - var e, s, exception; - target._state = 1; - try { - source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), null); - } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s)); + AsyncError_defaultStackTrace(error) { + var stackTrace; + if (type$.Error._is(error)) { + stackTrace = error.get$stackTrace(); + if (stackTrace != null) + return stackTrace; } + return B._StringStackTrace_3uE; + }, + Future_Future$value(value, $T) { + var t1, t2; + $T._as(value); + t1 = value; + t2 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t2._asyncComplete$1(t1); + return t2; }, - _Future__chainCoreFuture: function(source, target) { - var t1, listeners; - for (; t1 = source._state, t1 === 2;) - source = H.interceptedTypeCheck(source._resultOrListeners, "$is_Future"); - if (t1 >= 4) { + _Future__chainCoreFuture(source, target) { + var t1, t2, listeners; + for (t1 = type$._Future_dynamic; t2 = source._async$_state, (t2 & 4) !== 0;) + source = t1._as(source._resultOrListeners); + if ((t2 & 24) !== 0) { listeners = target._removeListeners$0(); - target._state = source._state; - target._resultOrListeners = source._resultOrListeners; - P._Future__propagateToListeners(target, listeners); + target._cloneResult$1(source); + A._Future__propagateToListeners(target, listeners); } else { - listeners = H.interceptedTypeCheck(target._resultOrListeners, "$is_FutureListener"); - target._state = 2; + listeners = type$.nullable__FutureListener_dynamic_dynamic._as(target._resultOrListeners); + target._async$_state = target._async$_state & 1 | 4; target._resultOrListeners = source; source._prependListeners$1(listeners); } }, - _Future__propagateToListeners: function(source, listeners) { - var _box_1, t1, _box_0, hasError, asyncError, listeners0, sourceResult, t2, t3, zone, oldZone, current, result; - _box_1 = {}; - _box_1.source = source; - for (t1 = source; true;) { + _Future__propagateToListeners(source, listeners) { + var t2, t3, t4, _box_0, t5, t6, hasError, asyncError, nextListener, nextListener0, sourceResult, t7, zone, oldZone, result, current, _box_1 = {}, + t1 = _box_1.source = source; + for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic, t4 = type$.Future_dynamic; true;) { _box_0 = {}; - hasError = t1._state === 8; + t5 = t1._async$_state; + t6 = (t5 & 16) === 0; + hasError = !t6; if (listeners == null) { - if (hasError) { - asyncError = H.interceptedTypeCheck(t1._resultOrListeners, "$isAsyncError"); + if (hasError && (t5 & 1) === 0) { + asyncError = t2._as(t1._resultOrListeners); t1._zone.handleUncaughtError$2(asyncError.error, asyncError.stackTrace); } return; } - for (; listeners0 = listeners._nextListener, listeners0 != null; listeners = listeners0) { - listeners._nextListener = null; - P._Future__propagateToListeners(_box_1.source, listeners); + _box_0.listener = listeners; + nextListener = listeners._nextListener; + for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) { + t1._nextListener = null; + A._Future__propagateToListeners(_box_1.source, t1); + _box_0.listener = nextListener; + nextListener0 = nextListener._nextListener; } - t1 = _box_1.source; - sourceResult = t1._resultOrListeners; + t5 = _box_1.source; + sourceResult = t5._resultOrListeners; _box_0.listenerHasError = hasError; _box_0.listenerValueOrError = sourceResult; - t2 = !hasError; - if (t2) { - t3 = listeners.state; - t3 = (t3 & 1) !== 0 || t3 === 8; + if (t6) { + t7 = t1.state; + t7 = (t7 & 1) !== 0 || (t7 & 15) === 8; } else - t3 = true; - if (t3) { - t3 = listeners.result; - zone = t3._zone; + t7 = true; + if (t7) { + zone = t1.result._zone; if (hasError) { - t1 = t1._zone; - t1.toString; - t1 = !(t1 == zone || t1.get$errorZone() === zone.get$errorZone()); + t1 = t5._zone; + t1 = !(t1 === zone || t1.get$errorZone() === zone.get$errorZone()); } else t1 = false; if (t1) { t1 = _box_1.source; - asyncError = H.interceptedTypeCheck(t1._resultOrListeners, "$isAsyncError"); + asyncError = t2._as(t1._resultOrListeners); t1._zone.handleUncaughtError$2(asyncError.error, asyncError.stackTrace); return; } oldZone = $.Zone__current; - if (oldZone != zone) + if (oldZone !== zone) $.Zone__current = zone; else oldZone = null; - t1 = listeners.state; - if (t1 === 8) - new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_1, _box_0, listeners, hasError).call$0(); - else if (t2) { + t1 = _box_0.listener.state; + if ((t1 & 15) === 8) + new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); + else if (t6) { if ((t1 & 1) !== 0) - new P._Future__propagateToListeners_handleValueCallback(_box_0, listeners, sourceResult).call$0(); + new A._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); } else if ((t1 & 2) !== 0) - new P._Future__propagateToListeners_handleError(_box_1, _box_0, listeners).call$0(); + new A._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); if (oldZone != null) $.Zone__current = oldZone; t1 = _box_0.listenerValueOrError; - if (!!J.getInterceptor$(t1).$isFuture) { - if (t1._state >= 4) { - current = H.interceptedTypeCheck(t3._resultOrListeners, "$is_FutureListener"); - t3._resultOrListeners = null; - listeners = t3._reverseListeners$1(current); - t3._state = t1._state; - t3._resultOrListeners = t1._resultOrListeners; + if (t4._is(t1)) { + t5 = _box_0.listener.$ti; + t5 = t5._eval$1("Future<2>")._is(t1) || !t5._rest[1]._is(t1); + } else + t5 = false; + if (t5) { + t4._as(t1); + result = _box_0.listener.result; + if ((t1._async$_state & 24) !== 0) { + current = t3._as(result._resultOrListeners); + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._async$_state = t1._async$_state & 30 | result._async$_state & 1; + result._resultOrListeners = t1._resultOrListeners; _box_1.source = t1; continue; } else - P._Future__chainCoreFuture(t1, t3); + A._Future__chainCoreFuture(t1, result); return; } } - result = listeners.result; - current = H.interceptedTypeCheck(result._resultOrListeners, "$is_FutureListener"); + result = _box_0.listener.result; + current = t3._as(result._resultOrListeners); result._resultOrListeners = null; listeners = result._reverseListeners$1(current); t1 = _box_0.listenerHasError; - t2 = _box_0.listenerValueOrError; + t5 = _box_0.listenerValueOrError; if (!t1) { - H.assertSubtypeOfRuntimeType(t2, H.getTypeArgumentByIndex(result, 0)); - result._state = 4; - result._resultOrListeners = t2; + result.$ti._precomputed1._as(t5); + result._async$_state = 8; + result._resultOrListeners = t5; } else { - H.interceptedTypeCheck(t2, "$isAsyncError"); - result._state = 8; - result._resultOrListeners = t2; + t2._as(t5); + result._async$_state = result._async$_state & 1 | 16; + result._resultOrListeners = t5; } _box_1.source = result; t1 = result; } }, - _registerErrorHandler: function(errorHandler, zone) { - if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object, P.StackTrace]})) - return zone.registerBinaryCallback$3$1(errorHandler, null, P.Object, P.StackTrace); - if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object]})) - return zone.registerUnaryCallback$2$1(errorHandler, null, P.Object); - throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result")); + _registerErrorHandler(errorHandler, zone) { + if (type$.dynamic_Function_Object_StackTrace._is(errorHandler)) + return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.dynamic_Function_Object._is(errorHandler)) + return zone.registerUnaryCallback$2$1(errorHandler, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$value(errorHandler, "onError", string$.Error_)); }, - _microtaskLoop: function() { - var t1, t2; - for (; t1 = $._nextCallback, t1 != null;) { + _microtaskLoop() { + var entry, next; + for (entry = $._nextCallback; entry != null; entry = $._nextCallback) { $._lastPriorityCallback = null; - t2 = t1.next; - $._nextCallback = t2; - if (t2 == null) + next = entry.next; + $._nextCallback = next; + if (next == null) $._lastCallback = null; - t1.callback.call$0(); + entry.callback.call$0(); } }, - _startMicrotaskLoop: function() { + _startMicrotaskLoop() { $._isInCallbackLoop = true; try { - P._microtaskLoop(); + A._microtaskLoop(); } finally { $._lastPriorityCallback = null; $._isInCallbackLoop = false; if ($._nextCallback != null) - $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); } }, - _scheduleAsyncCallback: function(callback) { - var newEntry = new P._AsyncCallbackEntry(H.functionTypeCheck(callback, {func: 1, ret: -1})); - if ($._nextCallback == null) { - $._lastCallback = newEntry; - $._nextCallback = newEntry; + _scheduleAsyncCallback(callback) { + var newEntry = new A._AsyncCallbackEntry(callback), + lastCallback = $._lastCallback; + if (lastCallback == null) { + $._nextCallback = $._lastCallback = newEntry; if (!$._isInCallbackLoop) - $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); - } else { - $._lastCallback.next = newEntry; - $._lastCallback = newEntry; - } + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); + } else + $._lastCallback = lastCallback.next = newEntry; }, - _schedulePriorityAsyncCallback: function(callback) { - var t1, entry, t2; - H.functionTypeCheck(callback, {func: 1, ret: -1}); - t1 = $._nextCallback; + _schedulePriorityAsyncCallback(callback) { + var entry, lastPriorityCallback, next, + t1 = $._nextCallback; if (t1 == null) { - P._scheduleAsyncCallback(callback); + A._scheduleAsyncCallback(callback); $._lastPriorityCallback = $._lastCallback; return; } - entry = new P._AsyncCallbackEntry(callback); - t2 = $._lastPriorityCallback; - if (t2 == null) { + entry = new A._AsyncCallbackEntry(callback); + lastPriorityCallback = $._lastPriorityCallback; + if (lastPriorityCallback == null) { entry.next = t1; - $._lastPriorityCallback = entry; - $._nextCallback = entry; + $._nextCallback = $._lastPriorityCallback = entry; } else { - entry.next = t2.next; - t2.next = entry; - $._lastPriorityCallback = entry; - if (entry.next == null) + next = lastPriorityCallback.next; + entry.next = next; + $._lastPriorityCallback = lastPriorityCallback.next = entry; + if (next == null) $._lastCallback = entry; } }, - scheduleMicrotask: function(callback) { - var currentZone, t1; - H.functionTypeCheck(callback, {func: 1, ret: -1}); - currentZone = $.Zone__current; - if (C.C__RootZone === currentZone) { - P._rootScheduleMicrotask(null, null, C.C__RootZone, callback); + scheduleMicrotask(callback) { + var t1, _null = null, + currentZone = $.Zone__current; + if (B.C__RootZone === currentZone) { + A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback); return; } - if (C.C__RootZone === currentZone.get$_scheduleMicrotask().zone) - t1 = C.C__RootZone.get$errorZone() === currentZone.get$errorZone(); + if (B.C__RootZone === currentZone.get$_scheduleMicrotask().zone) + t1 = B.C__RootZone.get$errorZone() === currentZone.get$errorZone(); else t1 = false; if (t1) { - P._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback$1$1(callback, -1)); + A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback$1$1(callback, type$.void)); return; } t1 = $.Zone__current; t1.scheduleMicrotask$1(t1.bindCallbackGuarded$1(callback)); }, - StreamIterator_StreamIterator: function(stream, $T) { - return new P._StreamIterator(H.assertSubtype(stream, "$isStream", [$T], "$asStream"), [$T]); + StreamIterator_StreamIterator(stream, $T) { + A.checkNotNullable(stream, "stream", type$.Object); + return new A._StreamIterator($T._eval$1("_StreamIterator<0>")); }, - StreamController_StreamController: function(onCancel, onListen, sync, $T) { - H.functionTypeCheck(onListen, {func: 1, ret: -1}); - H.functionTypeCheck(onCancel, {func: 1}); - return new P._SyncStreamController(0, onListen, null, null, onCancel, [$T]); + StreamController_StreamController(onCancel, onListen, sync, $T) { + return new A._SyncStreamController(onListen, null, null, onCancel, $T._eval$1("_SyncStreamController<0>")); }, - _runGuarded: function(notificationHandler) { + _runGuarded(notificationHandler) { var e, s, exception; - H.functionTypeCheck(notificationHandler, {func: 1}); if (notificationHandler == null) return; try { notificationHandler.call$0(); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); $.Zone__current.handleUncaughtError$2(e, s); } }, - _nullDataHandler: function(value) { + _BufferingStreamSubscription__registerDataHandler(zone, handleData, $T) { + var t1 = handleData == null ? A.async___nullDataHandler$closure() : handleData; + return zone.registerUnaryCallback$2$1(t1, type$.void, $T); + }, + _BufferingStreamSubscription__registerErrorHandler(zone, handleError) { + if (handleError == null) + handleError = A.async___nullErrorHandler$closure(); + if (type$.void_Function_Object_StackTrace._is(handleError)) + return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.void_Function_Object._is(handleError)) + return zone.registerUnaryCallback$2$1(handleError, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$(string$.handle, null)); }, - _nullErrorHandler: function(error, stackTrace) { - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + _nullDataHandler(value) { + }, + _nullErrorHandler(error, stackTrace) { + type$.Object._as(error); + type$.StackTrace._as(stackTrace); $.Zone__current.handleUncaughtError$2(error, stackTrace); }, - _nullDoneHandler: function() { + _nullDoneHandler() { }, - Timer_Timer$periodic: function(duration, callback) { - var t1, boundCallback; - H.functionTypeCheck(callback, {func: 1, ret: -1, args: [P.Timer]}); - t1 = $.Zone__current; - if (t1 === C.C__RootZone) + Timer_Timer$periodic(duration, callback) { + var boundCallback, + t1 = $.Zone__current; + if (t1 === B.C__RootZone) return t1.createPeriodicTimer$2(duration, callback); - boundCallback = t1.bindUnaryCallbackGuarded$1$1(callback, P.Timer); + boundCallback = t1.bindUnaryCallbackGuarded$1$1(callback, type$.Timer); return $.Zone__current.createPeriodicTimer$2(duration, boundCallback); }, - _ZoneSpecification$: function(createPeriodicTimer, createTimer, errorCallback, fork, handleUncaughtError, $print, registerBinaryCallback, registerCallback, registerUnaryCallback, run, runBinary, runUnary, scheduleMicrotask) { - return new P._ZoneSpecification(handleUncaughtError, run, runUnary, runBinary, registerCallback, registerUnaryCallback, registerBinaryCallback, errorCallback, scheduleMicrotask, createTimer, createPeriodicTimer, $print, fork); + ZoneSpecification_ZoneSpecification$from(other, handleUncaughtError) { + var t1 = handleUncaughtError == null ? other.handleUncaughtError : handleUncaughtError; + return new A._ZoneSpecification(t1, other.run, other.runUnary, other.runBinary, other.registerCallback, other.registerUnaryCallback, other.registerBinaryCallback, other.errorCallback, other.scheduleMicrotask, other.createTimer, other.createPeriodicTimer, other.print, other.fork); }, - _parentDelegate: function(zone) { - if (zone.get$parent(zone) == null) - return; - return zone.get$parent(zone).get$_delegate(); + _rootHandleUncaughtError($self, $parent, zone, error, stackTrace) { + A._rootHandleError(error, type$.StackTrace._as(stackTrace)); }, - _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { - var t1 = {}; - t1.error = error; - P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(t1, H.interceptedTypeCheck(stackTrace, "$isStackTrace"))); + _rootHandleError(error, stackTrace) { + A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace)); }, - _rootRun: function($self, $parent, zone, f, $R) { + _rootRun($self, $parent, zone, f, $R) { var old, t1; - H.interceptedTypeCheck($self, "$isZone"); - H.interceptedTypeCheck($parent, "$isZoneDelegate"); - H.interceptedTypeCheck(zone, "$isZone"); - H.functionTypeCheck(f, {func: 1, ret: $R}); + type$.nullable_Zone._as($self); + type$.nullable_ZoneDelegate._as($parent); + type$.Zone._as(zone); + $R._eval$1("0()")._as(f); t1 = $.Zone__current; - if (t1 == zone) + if (t1 === zone) return f.call$0(); $.Zone__current = zone; old = t1; @@ -2972,15 +3568,15 @@ $.Zone__current = old; } }, - _rootRunUnary: function($self, $parent, zone, f, arg, $R, $T) { + _rootRunUnary($self, $parent, zone, f, arg, $R, $T) { var old, t1; - H.interceptedTypeCheck($self, "$isZone"); - H.interceptedTypeCheck($parent, "$isZoneDelegate"); - H.interceptedTypeCheck(zone, "$isZone"); - H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}); - H.assertSubtypeOfRuntimeType(arg, $T); + type$.nullable_Zone._as($self); + type$.nullable_ZoneDelegate._as($parent); + type$.Zone._as(zone); + $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f); + $T._as(arg); t1 = $.Zone__current; - if (t1 == zone) + if (t1 === zone) return f.call$1(arg); $.Zone__current = zone; old = t1; @@ -2991,16 +3587,16 @@ $.Zone__current = old; } }, - _rootRunBinary: function($self, $parent, zone, f, arg1, arg2, $R, T1, T2) { + _rootRunBinary($self, $parent, zone, f, arg1, arg2, $R, T1, T2) { var old, t1; - H.interceptedTypeCheck($self, "$isZone"); - H.interceptedTypeCheck($parent, "$isZoneDelegate"); - H.interceptedTypeCheck(zone, "$isZone"); - H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); - H.assertSubtypeOfRuntimeType(arg1, T1); - H.assertSubtypeOfRuntimeType(arg2, T2); + type$.nullable_Zone._as($self); + type$.nullable_ZoneDelegate._as($parent); + type$.Zone._as(zone); + $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); + T1._as(arg1); + T2._as(arg2); t1 = $.Zone__current; - if (t1 == zone) + if (t1 === zone) return f.call$2(arg1, arg2); $.Zone__current = zone; old = t1; @@ -3011,130 +3607,77 @@ $.Zone__current = old; } }, - _rootRegisterCallback: function($self, $parent, zone, f, $R) { - return H.functionTypeCheck(f, {func: 1, ret: $R}); + _rootRegisterCallback($self, $parent, zone, f, $R) { + return $R._eval$1("0()")._as(f); }, - _rootRegisterUnaryCallback: function($self, $parent, zone, f, $R, $T) { - return H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}); + _rootRegisterUnaryCallback($self, $parent, zone, f, $R, $T) { + return $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f); }, - _rootRegisterBinaryCallback: function($self, $parent, zone, f, $R, T1, T2) { - return H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); + _rootRegisterBinaryCallback($self, $parent, zone, f, $R, T1, T2) { + return $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); }, - _rootErrorCallback: function($self, $parent, zone, error, stackTrace) { - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - return; + _rootErrorCallback($self, $parent, zone, error, stackTrace) { + type$.nullable_StackTrace._as(stackTrace); + return null; }, - _rootScheduleMicrotask: function($self, $parent, zone, f) { - var t1; - H.functionTypeCheck(f, {func: 1, ret: -1}); - t1 = C.C__RootZone !== zone; - if (t1) - f = !(!t1 || C.C__RootZone.get$errorZone() === zone.get$errorZone()) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, -1); - P._scheduleAsyncCallback(f); + _rootScheduleMicrotask($self, $parent, zone, f) { + var t1, t2; + type$.void_Function._as(f); + if (B.C__RootZone !== zone) { + t1 = B.C__RootZone.get$errorZone(); + t2 = zone.get$errorZone(); + f = t1 !== t2 ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void); + } + A._scheduleAsyncCallback(f); }, - _rootCreateTimer: function($self, $parent, zone, duration, callback) { - H.interceptedTypeCheck(duration, "$isDuration"); - callback = zone.bindCallback$1$1(H.functionTypeCheck(callback, {func: 1, ret: -1}), -1); - return P.Timer__createTimer(duration, callback); + _rootCreateTimer($self, $parent, zone, duration, callback) { + type$.Duration._as(duration); + type$.void_Function._as(callback); + return A.Timer__createTimer(duration, B.C__RootZone !== zone ? zone.bindCallback$1$1(callback, type$.void) : callback); }, - _rootCreatePeriodicTimer: function($self, $parent, zone, duration, callback) { - H.interceptedTypeCheck(duration, "$isDuration"); - callback = zone.bindUnaryCallback$2$1(H.functionTypeCheck(callback, {func: 1, ret: -1, args: [P.Timer]}), null, P.Timer); - return P.Timer__createPeriodicTimer(duration, callback); + _rootCreatePeriodicTimer($self, $parent, zone, duration, callback) { + type$.Duration._as(duration); + type$.void_Function_Timer._as(callback); + return A.Timer__createPeriodicTimer(duration, B.C__RootZone !== zone ? zone.bindUnaryCallback$2$1(callback, type$.void, type$.Timer) : callback); }, - _rootPrint: function($self, $parent, zone, line) { - H.printString(H.stringTypeCheck(line)); + _rootPrint($self, $parent, zone, line) { + A.printString(A._asString(line)); }, - _printToZone: function(line) { + _printToZone(line) { $.Zone__current.print$1(0, line); }, - _rootFork: function($self, $parent, zone, specification, zoneValues) { - var valueMap, t1, t2; - H.interceptedTypeCheck(specification, "$isZoneSpecification"); - H.interceptedTypeCheck(zoneValues, "$isMap"); - $.printToZone = P.async___printToZone$closure(); - if (specification == null) - specification = C._ZoneSpecification_ALf; - valueMap = zone.get$_async$_map(); - t1 = new P._CustomZone(zone, valueMap); - t2 = zone.get$_run(); - t1.set$_run(t2); - t2 = zone.get$_runUnary(); - t1.set$_runUnary(t2); - t2 = zone.get$_runBinary(); - t1.set$_runBinary(t2); - t2 = zone.get$_registerCallback(); - t1.set$_registerCallback(t2); - t2 = zone.get$_registerUnaryCallback(); - t1.set$_registerUnaryCallback(t2); - t2 = zone.get$_registerBinaryCallback(); - t1.set$_registerBinaryCallback(t2); - t2 = zone.get$_errorCallback(); - t1.set$_errorCallback(t2); - t2 = zone.get$_scheduleMicrotask(); - t1.set$_scheduleMicrotask(t2); - t2 = zone.get$_createTimer(); - t1.set$_createTimer(t2); - t2 = zone.get$_createPeriodicTimer(); - t1.set$_createPeriodicTimer(t2); - t2 = zone.get$_print(); - t1.set$_print(t2); - t2 = zone.get$_fork(); - t1.set$_fork(t2); - t2 = specification.handleUncaughtError; - t1.set$_handleUncaughtError(t2 != null ? new P._ZoneFunction(t1, t2, [{func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}]) : zone.get$_handleUncaughtError()); + _rootFork($self, $parent, zone, specification, zoneValues) { + var valueMap, t1, handleUncaughtError; + type$.nullable_ZoneSpecification._as(specification); + type$.nullable_Map_of_nullable_Object_and_nullable_Object._as(zoneValues); + $.printToZone = A.async___printToZone$closure(); + valueMap = zone.get$_map(); + valueMap = valueMap; + t1 = new A._CustomZone(zone.get$_run(), zone.get$_runUnary(), zone.get$_runBinary(), zone.get$_registerCallback(), zone.get$_registerUnaryCallback(), zone.get$_registerBinaryCallback(), zone.get$_errorCallback(), zone.get$_scheduleMicrotask(), zone.get$_createTimer(), zone.get$_createPeriodicTimer(), zone.get$_print(), zone.get$_fork(), zone.get$_handleUncaughtError(), zone, valueMap); + handleUncaughtError = specification.handleUncaughtError; + if (handleUncaughtError != null) + t1.set$_handleUncaughtError(new A._ZoneFunction(t1, handleUncaughtError, type$._ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace)); return t1; }, - runZoned: function(body, onError, $R) { - var zoneSpecification, zoneValues, e, stackTrace, t1, errorHandler, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, exception; - t1 = {}; - zoneSpecification = null; - zoneValues = null; - H.functionTypeCheck(body, {func: 1, ret: $R}); - t1.unaryOnError = null; - t1.binaryOnError = null; - if (H.functionTypeTest(onError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]})) - t1.binaryOnError = onError; - else if (H.functionTypeTest(onError, {func: 1, ret: -1, args: [P.Object]})) - t1.unaryOnError = onError; - else - throw H.wrapException(P.ArgumentError$("onError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")); - errorHandler = new P.runZoned_closure(t1); + runZonedGuarded(body, onError, $R) { + var error, stackTrace, parentZone, errorHandler, t1, exception, _null = null, zoneSpecification = null, zoneValues = null; + A.checkNotNullable(body, "body", $R._eval$1("0()")); + A.checkNotNullable(onError, "onError", type$.void_Function_Object_StackTrace); + parentZone = $.Zone__current; + errorHandler = new A.runZonedGuarded_closure(parentZone, onError); if (zoneSpecification == null) - zoneSpecification = P._ZoneSpecification$(null, null, null, null, errorHandler, null, null, null, null, null, null, null, null); - else { - t2 = zoneSpecification; - t3 = t2.run; - t4 = t2.runUnary; - t5 = t2.runBinary; - t6 = t2.registerCallback; - t7 = t2.registerUnaryCallback; - t8 = t2.registerBinaryCallback; - t9 = t2.errorCallback; - t10 = t2.scheduleMicrotask; - t11 = t2.createTimer; - t12 = t2.createPeriodicTimer; - t13 = t2.print; - t2 = t2.fork; - zoneSpecification = P._ZoneSpecification$(t12, t11, t9, t2, errorHandler, t13, t8, t6, t7, t3, t5, t4, t10); - } + zoneSpecification = new A._ZoneSpecification(errorHandler, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + else + zoneSpecification = A.ZoneSpecification_ZoneSpecification$from(zoneSpecification, errorHandler); try { - t2 = P._runZoned(body, zoneValues, zoneSpecification, $R); - return t2; + t1 = parentZone.fork$2$specification$zoneValues(zoneSpecification, zoneValues).run$1$1(body, $R); + return t1; } catch (exception) { - e = H.unwrapException(exception); - stackTrace = H.getTraceFromException(exception); - t2 = t1.binaryOnError; - if (t2 != null) - t2.call$2(e, stackTrace); - else - t1.unaryOnError.call$1(e); + error = A.unwrapException(exception); + stackTrace = A.getTraceFromException(exception); + onError.call$2(error, stackTrace); } - return; - }, - _runZoned: function(body, zoneValues, specification, $R) { - H.functionTypeCheck(body, {func: 1, ret: $R}); - return $.Zone__current.fork$2$specification$zoneValues(specification, zoneValues).run$1$1(body, $R); + return _null; }, _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { this._box_0 = t0; @@ -3164,19 +3707,10 @@ _.start = t2; _.callback = t3; }, - _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1, t2) { - this._completer = t0; - this.isSync = t1; - this.$ti = t2; - }, - _AsyncAwaitCompleter_complete_closure: function _AsyncAwaitCompleter_complete_closure(t0, t1) { - this.$this = t0; - this.value = t1; - }, - _AsyncAwaitCompleter_completeError_closure: function _AsyncAwaitCompleter_completeError_closure(t0, t1, t2) { - this.$this = t0; - this.e = t1; - this.st = t2; + _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) { + this._future = t0; + this.isSync = false; + this.$ti = t1; }, _awaitOnObject_closure: function _awaitOnObject_closure(t0) { this.bodyFunction = t0; @@ -3187,7 +3721,9 @@ _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) { this.$protected = t0; }, - Future: function Future() { + AsyncError: function AsyncError(t0, t1) { + this.error = t0; + this.stackTrace = t1; }, _Completer: function _Completer() { }, @@ -3208,12 +3744,12 @@ _.errorCallback = t3; _.$ti = t4; }, - _Future: function _Future(t0, t1, t2) { + _Future: function _Future(t0, t1) { var _ = this; - _._state = t0; - _._zone = t1; + _._async$_state = 0; + _._zone = t0; _._resultOrListeners = null; - _.$ti = t2; + _.$ti = t1; }, _Future__addListener_closure: function _Future__addListener_closure(t0, t1) { this.$this = t0; @@ -3224,17 +3760,17 @@ this.$this = t1; }, _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) { - this.target = t0; + this.$this = t0; }, _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) { - this.target = t0; + this.$this = t0; }, _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) { - this.target = t0; + this.$this = t0; this.e = t1; this.s = t2; }, - _Future__asyncComplete_closure: function _Future__asyncComplete_closure(t0, t1) { + _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { this.$this = t0; this.value = t1; }, @@ -3247,25 +3783,21 @@ this.error = t1; this.stackTrace = t2; }, - _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2, t3) { - var _ = this; - _._box_1 = t0; - _._box_0 = t1; - _.listener = t2; - _.hasError = t3; + _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) { + this._box_0 = t0; + this._box_1 = t1; + this.hasError = t2; }, _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) { this.originalSource = t0; }, - _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1, t2) { + _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) { this._box_0 = t0; - this.listener = t1; - this.sourceResult = t2; + this.sourceResult = t1; }, - _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1, t2) { + _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) { this._box_1 = t0; this._box_0 = t1; - this.listener = t2; }, _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) { this.callback = t0; @@ -3298,29 +3830,31 @@ }, _SyncStreamControllerDispatch: function _SyncStreamControllerDispatch() { }, - _SyncStreamController: function _SyncStreamController(t0, t1, t2, t3, t4, t5) { + _SyncStreamController: function _SyncStreamController(t0, t1, t2, t3, t4) { var _ = this; _._varData = null; - _._state = t0; + _._async$_state = 0; _._doneFuture = null; - _.onListen = t1; - _.onPause = t2; - _.onResume = t3; - _.onCancel = t4; - _.$ti = t5; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; }, _ControllerStream: function _ControllerStream(t0, t1) { this._controller = t0; this.$ti = t1; }, - _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3) { + _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) { var _ = this; _._controller = t0; - _._onDone = _._onError = _._async$_onData = null; - _._zone = t1; - _._state = t2; + _._async$_onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._async$_state = t5; _._pending = _._cancelFuture = null; - _.$ti = t3; + _.$ti = t6; }, _StreamSinkWrapper: function _StreamSinkWrapper(t0, t1) { this._async$_target = t0; @@ -3361,41 +3895,53 @@ this.$this = t0; this.dispatch = t1; }, - _StreamImplEvents: function _StreamImplEvents(t0, t1) { + _StreamImplEvents: function _StreamImplEvents(t0) { var _ = this; _.lastPendingEvent = _.firstPendingEvent = null; - _._state = t0; - _.$ti = t1; + _._async$_state = 0; + _.$ti = t0; }, _DoneStreamSubscription: function _DoneStreamSubscription(t0, t1, t2) { var _ = this; _._zone = t0; - _._state = 0; + _._async$_state = 0; _._onDone = t1; _.$ti = t2; }, - _StreamIterator: function _StreamIterator(t0, t1) { - var _ = this; - _._subscription = null; - _._stateData = t0; - _._isPaused = false; - _.$ti = t1; + _StreamIterator: function _StreamIterator(t0) { + this.$ti = t0; }, _EmptyStream: function _EmptyStream(t0) { this.$ti = t0; }, - Timer: function Timer() { - }, - AsyncError: function AsyncError(t0, t1) { - this.error = t0; - this.stackTrace = t1; - }, _ZoneFunction: function _ZoneFunction(t0, t1, t2) { this.zone = t0; this.$function = t1; this.$ti = t2; }, - ZoneSpecification: function ZoneSpecification() { + _RunNullaryZoneFunction: function _RunNullaryZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _RunUnaryZoneFunction: function _RunUnaryZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _RunBinaryZoneFunction: function _RunBinaryZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _RegisterNullaryZoneFunction: function _RegisterNullaryZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _RegisterUnaryZoneFunction: function _RegisterUnaryZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _RegisterBinaryZoneFunction: function _RegisterBinaryZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; }, _ZoneSpecification: function _ZoneSpecification(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { var _ = this; @@ -3413,20 +3959,29 @@ _.print = t11; _.fork = t12; }, - ZoneDelegate: function ZoneDelegate() { - }, - Zone: function Zone() { - }, _ZoneDelegate: function _ZoneDelegate(t0) { this._delegationTarget = t0; }, _Zone: function _Zone() { }, - _CustomZone: function _CustomZone(t0, t1) { + _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { var _ = this; - _._delegateCache = _._handleUncaughtError = _._fork = _._print = _._createPeriodicTimer = _._createTimer = _._scheduleMicrotask = _._errorCallback = _._registerBinaryCallback = _._registerUnaryCallback = _._registerCallback = _._runBinary = _._runUnary = _._run = null; - _.parent = t0; - _._async$_map = t1; + _._run = t0; + _._runUnary = t1; + _._runBinary = t2; + _._registerCallback = t3; + _._registerUnaryCallback = t4; + _._registerBinaryCallback = t5; + _._errorCallback = t6; + _._scheduleMicrotask = t7; + _._createTimer = t8; + _._createPeriodicTimer = t9; + _._print = t10; + _._fork = t11; + _._handleUncaughtError = t12; + _._delegateCache = null; + _.parent = t13; + _._map = t14; }, _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) { this.$this = t0; @@ -3449,8 +4004,8 @@ this.registered = t1; this.T = t2; }, - _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) { - this._box_0 = t0; + _rootHandleError_closure: function _rootHandleError_closure(t0, t1) { + this.error = t0; this.stackTrace = t1; }, _RootZone: function _RootZone() { @@ -3460,6 +4015,13 @@ this.f = t1; this.R = t2; }, + _RootZone_bindUnaryCallback_closure: function _RootZone_bindUnaryCallback_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.f = t1; + _.T = t2; + _.R = t3; + }, _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) { this.$this = t0; this.f = t1; @@ -3469,106 +4031,99 @@ this.f = t1; this.T = t2; }, - runZoned_closure: function runZoned_closure(t0) { - this._box_0 = t0; + runZonedGuarded_closure: function runZonedGuarded_closure(t0, t1) { + this.parentZone = t0; + this.onError = t1; }, - HashMap_HashMap: function($K, $V) { - return new P._HashMap([$K, $V]); + HashMap_HashMap($K, $V) { + return new A._HashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("_HashMap<1,2>")); }, - _HashMap__getTableEntry: function(table, key) { + _HashMap__getTableEntry(table, key) { var entry = table[key]; return entry === table ? null : entry; }, - _HashMap__setTableEntry: function(table, key, value) { + _HashMap__setTableEntry(table, key, value) { if (value == null) table[key] = table; else table[key] = value; }, - _HashMap__newHashTable: function() { + _HashMap__newHashTable() { var table = Object.create(null); - P._HashMap__setTableEntry(table, "", table); + A._HashMap__setTableEntry(table, "", table); delete table[""]; return table; }, - LinkedHashMap_LinkedHashMap$_literal: function(keyValuePairs, $K, $V) { - H.listTypeCheck(keyValuePairs); - return H.assertSubtype(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap([$K, $V])), "$isLinkedHashMap", [$K, $V], "$asLinkedHashMap"); + LinkedHashMap_LinkedHashMap$_literal(keyValuePairs, $K, $V) { + return $K._eval$1("@<0>")._bind$1($V)._eval$1("LinkedHashMap<1,2>")._as(A.fillLiteralMap(keyValuePairs, new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")))); }, - LinkedHashMap_LinkedHashMap$_empty: function($K, $V) { - return new H.JsLinkedHashMap([$K, $V]); + LinkedHashMap_LinkedHashMap$_empty($K, $V) { + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); }, - LinkedHashMap__makeEmpty: function() { - return new H.JsLinkedHashMap([null, null]); + LinkedHashSet_LinkedHashSet$_empty($E) { + return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); }, - LinkedHashSet_LinkedHashSet: function($E) { - return new P._LinkedHashSet([$E]); - }, - _LinkedHashSet__newHashTable: function() { + _LinkedHashSet__newHashTable() { var table = Object.create(null); table[""] = table; delete table[""]; return table; }, - IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) { + IterableBase_iterableToShortString(iterable, leftDelimiter, rightDelimiter) { var parts, t1; - if (P._isToStringVisiting(iterable)) { + if (A._isToStringVisiting(iterable)) { if (leftDelimiter === "(" && rightDelimiter === ")") return "(...)"; return leftDelimiter + "..." + rightDelimiter; } - parts = H.setRuntimeTypeInfo([], [P.String]); - t1 = $.$get$_toStringVisiting(); - C.JSArray_methods.add$1(t1, iterable); + parts = A._setArrayType([], type$.JSArray_String); + B.JSArray_methods.add$1($._toStringVisiting, iterable); try { - P._iterablePartsToStrings(iterable, parts); + A._iterablePartsToStrings(iterable, parts); } finally { - if (0 >= t1.length) - return H.ioore(t1, -1); - t1.pop(); + if (0 >= $._toStringVisiting.length) + return A.ioore($._toStringVisiting, -1); + $._toStringVisiting.pop(); } - t1 = P.StringBuffer__writeAll(leftDelimiter, H.listSuperNativeTypeCheck(parts, "$isIterable"), ", ") + rightDelimiter; + t1 = A.StringBuffer__writeAll(leftDelimiter, type$.Iterable_dynamic._as(parts), ", ") + rightDelimiter; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) { - var buffer, t1, t2; - if (P._isToStringVisiting(iterable)) + IterableBase_iterableToFullString(iterable, leftDelimiter, rightDelimiter) { + var buffer, t1; + if (A._isToStringVisiting(iterable)) return leftDelimiter + "..." + rightDelimiter; - buffer = new P.StringBuffer(leftDelimiter); - t1 = $.$get$_toStringVisiting(); - C.JSArray_methods.add$1(t1, iterable); + buffer = new A.StringBuffer(leftDelimiter); + B.JSArray_methods.add$1($._toStringVisiting, iterable); try { - t2 = buffer; - t2._contents = P.StringBuffer__writeAll(t2._contents, iterable, ", "); + t1 = buffer; + t1._contents = A.StringBuffer__writeAll(t1._contents, iterable, ", "); } finally { - if (0 >= t1.length) - return H.ioore(t1, -1); - t1.pop(); + if (0 >= $._toStringVisiting.length) + return A.ioore($._toStringVisiting, -1); + $._toStringVisiting.pop(); } buffer._contents += rightDelimiter; t1 = buffer._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - _isToStringVisiting: function(o) { - var i, t1; - for (i = 0; t1 = $.$get$_toStringVisiting(), i < t1.length; ++i) - if (o === t1[i]) + _isToStringVisiting(o) { + var t1, i; + for (t1 = $._toStringVisiting.length, i = 0; i < t1; ++i) + if (o === $._toStringVisiting[i]) return true; return false; }, - _iterablePartsToStrings: function(iterable, parts) { - var it, $length, count, next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision; - H.assertSubtype(parts, "$isList", [P.String], "$asList"); - it = iterable.get$iterator(iterable); - $length = 0; - count = 0; + _iterablePartsToStrings(iterable, parts) { + var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, + it = iterable.get$iterator(iterable), + $length = 0, count = 0; while (true) { if (!($length < 80 || count < 3)) break; if (!it.moveNext$0()) return; - next = H.S(it.get$current()); - C.JSArray_methods.add$1(parts, next); + next = A.S(it.get$current()); + B.JSArray_methods.add$1(parts, next); $length += next.length + 2; ++count; } @@ -3576,22 +4131,22 @@ if (count <= 5) return; if (0 >= parts.length) - return H.ioore(parts, -1); + return A.ioore(parts, -1); ultimateString = parts.pop(); if (0 >= parts.length) - return H.ioore(parts, -1); + return A.ioore(parts, -1); penultimateString = parts.pop(); } else { penultimate = it.get$current(); ++count; if (!it.moveNext$0()) { if (count <= 4) { - C.JSArray_methods.add$1(parts, H.S(penultimate)); + B.JSArray_methods.add$1(parts, A.S(penultimate)); return; } - ultimateString = H.S(penultimate); + ultimateString = A.S(penultimate); if (0 >= parts.length) - return H.ioore(parts, -1); + return A.ioore(parts, -1); penultimateString = parts.pop(); $length += ultimateString.length + 2; } else { @@ -3605,16 +4160,16 @@ if (!($length > 75 && count > 3)) break; if (0 >= parts.length) - return H.ioore(parts, -1); + return A.ioore(parts, -1); $length -= parts.pop().length + 2; --count; } - C.JSArray_methods.add$1(parts, "..."); + B.JSArray_methods.add$1(parts, "..."); return; } } - penultimateString = H.S(penultimate); - ultimateString = H.S(ultimate); + penultimateString = A.S(penultimate); + ultimateString = A.S(ultimate); $length += ultimateString.length + penultimateString.length + 4; } } @@ -3627,7 +4182,7 @@ if (!($length > 80 && parts.length > 3)) break; if (0 >= parts.length) - return H.ioore(parts, -1); + return A.ioore(parts, -1); $length -= parts.pop().length + 2; if (elision == null) { $length += 5; @@ -3635,27 +4190,25 @@ } } if (elision != null) - C.JSArray_methods.add$1(parts, elision); - C.JSArray_methods.add$1(parts, penultimateString); - C.JSArray_methods.add$1(parts, ultimateString); - }, - MapBase_mapToString: function(m) { - var result, t1; - t1 = {}; - if (P._isToStringVisiting(m)) + B.JSArray_methods.add$1(parts, elision); + B.JSArray_methods.add$1(parts, penultimateString); + B.JSArray_methods.add$1(parts, ultimateString); + }, + MapBase_mapToString(m) { + var result, t1 = {}; + if (A._isToStringVisiting(m)) return "{...}"; - result = new P.StringBuffer(""); + result = new A.StringBuffer(""); try { - C.JSArray_methods.add$1($.$get$_toStringVisiting(), m); + B.JSArray_methods.add$1($._toStringVisiting, m); result._contents += "{"; t1.first = true; - m.forEach$1(0, new P.MapBase_mapToString_closure(t1, result)); + m.forEach$1(0, new A.MapBase_mapToString_closure(t1, result)); result._contents += "}"; } finally { - t1 = $.$get$_toStringVisiting(); - if (0 >= t1.length) - return H.ioore(t1, -1); - t1.pop(); + if (0 >= $._toStringVisiting.length) + return A.ioore($._toStringVisiting, -1); + $._toStringVisiting.pop(); } t1 = result._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; @@ -3663,17 +4216,17 @@ _HashMap: function _HashMap(t0) { var _ = this; _._collection$_length = 0; - _._collection$_keys = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _._keys = _._collection$_rest = _._nums = _._strings = null; _.$ti = t0; }, _HashMapKeyIterable: function _HashMapKeyIterable(t0, t1) { - this._map = t0; + this._collection$_map = t0; this.$ti = t1; }, _HashMapKeyIterator: function _HashMapKeyIterator(t0, t1, t2) { var _ = this; - _._map = t0; - _._collection$_keys = t1; + _._collection$_map = t0; + _._keys = t1; _._offset = 0; _._collection$_current = null; _.$ti = t2; @@ -3681,7 +4234,7 @@ _LinkedHashSet: function _LinkedHashSet(t0) { var _ = this; _._collection$_length = 0; - _._collection$_last = _._collection$_first = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _._collection$_last = _._collection$_first = _._collection$_rest = _._nums = _._strings = null; _._collection$_modifications = 0; _.$ti = t0; }, @@ -3715,133 +4268,137 @@ MapView: function MapView() { }, UnmodifiableMapView: function UnmodifiableMapView(t0, t1) { - this._map = t0; + this._collection$_map = t0; this.$ti = t1; }, + SetMixin: function SetMixin() { + }, _SetBase: function _SetBase() { }, _ListBase_Object_ListMixin: function _ListBase_Object_ListMixin() { }, _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { }, - _parseJson: function(source, reviver) { - var parsed, e, exception, t1; - if (typeof source !== "string") - throw H.wrapException(H.argumentErrorValue(source)); - parsed = null; + __SetBase_Object_SetMixin: function __SetBase_Object_SetMixin() { + }, + _parseJson(source, reviver) { + var e, exception, t1, parsed = null; try { parsed = JSON.parse(source); } catch (exception) { - e = H.unwrapException(exception); - t1 = P.FormatException$(String(e), null, null); - throw H.wrapException(t1); + e = A.unwrapException(exception); + t1 = A.FormatException$(String(e), null, null); + throw A.wrapException(t1); } - t1 = P._convertJsonToDartLazy(parsed); + t1 = A._convertJsonToDartLazy(parsed); return t1; }, - _convertJsonToDartLazy: function(object) { + _convertJsonToDartLazy(object) { var i; if (object == null) - return; + return null; if (typeof object != "object") return object; if (Object.getPrototypeOf(object) !== Array.prototype) - return new P._JsonMap(object, Object.create(null)); + return new A._JsonMap(object, Object.create(null)); for (i = 0; i < object.length; ++i) - object[i] = P._convertJsonToDartLazy(object[i]); + object[i] = A._convertJsonToDartLazy(object[i]); return object; }, - Utf8Decoder__convertIntercepted: function(allowMalformed, codeUnits, start, end) { - H.assertSubtype(codeUnits, "$isList", [P.int], "$asList"); - if (codeUnits instanceof Uint8Array) - return P.Utf8Decoder__convertInterceptedUint8List(false, codeUnits, start, end); - return; + Utf8Decoder__convertIntercepted(allowMalformed, codeUnits, start, end) { + var casted, result; + if (codeUnits instanceof Uint8Array) { + casted = codeUnits; + end = casted.length; + if (end - start < 15) + return null; + result = A.Utf8Decoder__convertInterceptedUint8List(allowMalformed, casted, start, end); + if (result != null && allowMalformed) + if (result.indexOf("\ufffd") >= 0) + return null; + return result; + } + return null; }, - Utf8Decoder__convertInterceptedUint8List: function(allowMalformed, codeUnits, start, end) { - var decoder, t1, $length; - decoder = $.$get$Utf8Decoder__decoder(); + Utf8Decoder__convertInterceptedUint8List(allowMalformed, codeUnits, start, end) { + var decoder = allowMalformed ? $.$get$Utf8Decoder__decoderNonfatal() : $.$get$Utf8Decoder__decoder(); if (decoder == null) - return; - t1 = 0 === start; - if (t1 && true) - return P.Utf8Decoder__useTextDecoderChecked(decoder, codeUnits); - $length = codeUnits.length; - end = P.RangeError_checkValidRange(start, end, $length); - if (t1 && end === $length) - return P.Utf8Decoder__useTextDecoderChecked(decoder, codeUnits); - return P.Utf8Decoder__useTextDecoderChecked(decoder, codeUnits.subarray(start, end)); - }, - Utf8Decoder__useTextDecoderChecked: function(decoder, codeUnits) { - if (P.Utf8Decoder__unsafe(codeUnits)) - return; - return P.Utf8Decoder__useTextDecoderUnchecked(decoder, codeUnits); + return null; + if (0 === start && end === codeUnits.length) + return A.Utf8Decoder__useTextDecoder(decoder, codeUnits); + return A.Utf8Decoder__useTextDecoder(decoder, codeUnits.subarray(start, A.RangeError_checkValidRange(start, end, codeUnits.length))); }, - Utf8Decoder__useTextDecoderUnchecked: function(decoder, codeUnits) { + Utf8Decoder__useTextDecoder(decoder, codeUnits) { var t1, exception; try { t1 = decoder.decode(codeUnits); return t1; } catch (exception) { - H.unwrapException(exception); - } - return; - }, - Utf8Decoder__unsafe: function(codeUnits) { - var limit, i; - limit = codeUnits.length - 2; - for (i = 0; i < limit; ++i) - if (codeUnits[i] === 237) - if ((codeUnits[i + 1] & 224) === 160) - return true; - return false; - }, - Utf8Decoder__makeDecoder: function() { - var t1, exception; - try { - t1 = new TextDecoder("utf-8", {fatal: true}); - return t1; - } catch (exception) { - H.unwrapException(exception); } - return; + return null; }, - _scanOneByteCharacters: function(units, from, endIndex) { - var t1, i, unit; - H.assertSubtype(units, "$isList", [P.int], "$asList"); - for (t1 = J.getInterceptor$asx(units), i = from; i < endIndex; ++i) { - unit = t1.$index(units, i); - if (typeof unit !== "number") - return unit.$and(); - if ((unit & 127) !== unit) - return i - from; - } - return endIndex - from; - }, - Base64Codec__checkPadding: function(source, sourceIndex, sourceEnd, firstPadding, paddingCount, $length) { - if (C.JSInt_methods.$mod($length, 4) !== 0) - throw H.wrapException(P.FormatException$("Invalid base64 padding, padded length must be multiple of four, is " + $length, source, sourceEnd)); + Base64Codec__checkPadding(source, sourceIndex, sourceEnd, firstPadding, paddingCount, $length) { + if (B.JSInt_methods.$mod($length, 4) !== 0) + throw A.wrapException(A.FormatException$("Invalid base64 padding, padded length must be multiple of four, is " + $length, source, sourceEnd)); if (firstPadding + paddingCount !== $length) - throw H.wrapException(P.FormatException$("Invalid base64 padding, '=' not at the end", source, sourceIndex)); + throw A.wrapException(A.FormatException$("Invalid base64 padding, '=' not at the end", source, sourceIndex)); if (paddingCount > 2) - throw H.wrapException(P.FormatException$("Invalid base64 padding, more than two '=' characters", source, sourceIndex)); + throw A.wrapException(A.FormatException$("Invalid base64 padding, more than two '=' characters", source, sourceIndex)); }, - JsonUnsupportedObjectError$: function(unsupportedObject, cause, partialResult) { - return new P.JsonUnsupportedObjectError(unsupportedObject, cause); + JsonUnsupportedObjectError$(unsupportedObject, cause, partialResult) { + return new A.JsonUnsupportedObjectError(unsupportedObject, cause); }, - _defaultToEncodable: function(object) { + _defaultToEncodable(object) { return object.toJson$0(); }, - _JsonStringStringifier_stringify: function(object, toEncodable, indent) { - var output, t1; - output = new P.StringBuffer(""); - P._JsonStringStringifier_printOn(object, output, toEncodable, indent); + _JsonStringStringifier$(_sink, _toEncodable) { + return new A._JsonStringStringifier(_sink, [], A.convert___defaultToEncodable$closure()); + }, + _JsonStringStringifier_stringify(object, toEncodable, indent) { + var t1, + output = new A.StringBuffer(""); + A._JsonStringStringifier_printOn(object, output, toEncodable, indent); t1 = output._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - _JsonStringStringifier_printOn: function(object, output, toEncodable, indent) { - var stringifier = new P._JsonStringStringifier(output, [], P.convert___defaultToEncodable$closure()); + _JsonStringStringifier_printOn(object, output, toEncodable, indent) { + var stringifier = A._JsonStringStringifier$(output, toEncodable); stringifier.writeObject$1(object); }, + _Utf8Decoder_errorDescription(state) { + switch (state) { + case 65: + return "Missing extension byte"; + case 67: + return "Unexpected extension byte"; + case 69: + return "Invalid UTF-8 byte"; + case 71: + return "Overlong encoding"; + case 73: + return "Out of unicode range"; + case 75: + return "Encoded surrogate"; + case 77: + return "Unfinished UTF-8 octet sequence"; + default: + return ""; + } + }, + _Utf8Decoder__makeUint8List(codeUnits, start, end) { + var t1, i, b, + $length = end - start, + bytes = new Uint8Array($length); + for (t1 = J.getInterceptor$asx(codeUnits), i = 0; i < $length; ++i) { + b = t1.$index(codeUnits, start + i); + if ((b & 4294967040) >>> 0 !== 0) + b = 255; + if (!(i < $length)) + return A.ioore(bytes, i); + bytes[i] = b; + } + return bytes; + }, _JsonMap: function _JsonMap(t0, t1) { this._original = t0; this._processed = t1; @@ -3850,19 +4407,20 @@ _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) { this._convert$_parent = t0; }, - AsciiCodec: function AsciiCodec(t0) { - this._allowInvalid = t0; + Utf8Decoder__decoder_closure: function Utf8Decoder__decoder_closure() { + }, + Utf8Decoder__decoderNonfatal_closure: function Utf8Decoder__decoderNonfatal_closure() { + }, + AsciiCodec: function AsciiCodec() { }, _UnicodeSubsetEncoder: function _UnicodeSubsetEncoder() { }, AsciiEncoder: function AsciiEncoder(t0) { this._subsetMask = t0; }, - Base64Codec: function Base64Codec(t0) { - this._encoder = t0; + Base64Codec: function Base64Codec() { }, - Base64Encoder: function Base64Encoder(t0) { - this._urlSafe = t0; + Base64Encoder: function Base64Encoder() { }, Codec: function Codec() { }, @@ -3883,13 +4441,10 @@ this.unsupportedObject = t0; this.cause = t1; }, - JsonCodec: function JsonCodec(t0, t1) { - this._reviver = t0; - this._toEncodable = t1; + JsonCodec: function JsonCodec() { }, - JsonEncoder: function JsonEncoder(t0, t1) { - this.indent = t0; - this._toEncodable = t1; + JsonEncoder: function JsonEncoder(t0) { + this._toEncodable = t0; }, JsonDecoder: function JsonDecoder(t0) { this._reviver = t0; @@ -3901,12 +4456,11 @@ this.keyValueList = t1; }, _JsonStringStringifier: function _JsonStringStringifier(t0, t1, t2) { - this._convert$_sink = t0; + this._sink = t0; this._seen = t1; this._toEncodable = t2; }, - Utf8Codec: function Utf8Codec(t0) { - this._allowMalformed = t0; + Utf8Codec: function Utf8Codec() { }, Utf8Encoder: function Utf8Encoder() { }, @@ -3917,87 +4471,89 @@ Utf8Decoder: function Utf8Decoder(t0) { this._allowMalformed = t0; }, - _Utf8Decoder: function _Utf8Decoder(t0, t1) { - var _ = this; - _._allowMalformed = t0; - _._stringSink = t1; - _._isFirstCharacter = true; - _._extraUnits = _._expectedUnits = _._value = 0; - }, - _Utf8Decoder_convert_addSingleBytes: function _Utf8Decoder_convert_addSingleBytes(t0, t1, t2, t3) { - var _ = this; - _.$this = t0; - _.startIndex = t1; - _.endIndex = t2; - _.codeUnits = t3; + _Utf8Decoder: function _Utf8Decoder(t0) { + this.allowMalformed = t0; + this._state = 16; + this._charOrIndex = 0; }, - int_parse: function(source, onError, radix) { - var value; - H.functionTypeCheck(onError, {func: 1, ret: P.int, args: [P.String]}); - value = H.Primitives_parseInt(source, radix); + int_parse(source, radix) { + var value = A.Primitives_parseInt(source, radix); if (value != null) return value; - if (onError != null) - return onError.call$1(source); - throw H.wrapException(P.FormatException$(source, null, null)); + throw A.wrapException(A.FormatException$(source, null, null)); }, - Error__objectToString: function(object) { - if (object instanceof H.Closure) + Error__objectToString(object) { + if (object instanceof A.Closure) return object.toString$0(0); - return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; + return "Instance of '" + A.Primitives_objectTypeName(object) + "'"; + }, + Error__throw(error, stackTrace) { + error = A.wrapException(error); + if (error == null) + error = type$.Object._as(error); + error.stack = stackTrace.toString$0(0); + throw error; + throw A.wrapException("unreachable"); }, - List_List$filled: function($length, fill, $E) { - var result, i; - H.assertSubtypeOfRuntimeType(fill, $E); - result = J.JSArray_JSArray$fixed($length, $E); - if ($length !== 0 && true) + List_List$filled($length, fill, growable, $E) { + var i, + result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E); + if ($length !== 0 && fill != null) for (i = 0; i < result.length; ++i) - C.JSArray_methods.$indexSet(result, i, fill); - return H.assertSubtype(result, "$isList", [$E], "$asList"); - }, - List_List$from: function(elements, growable, $E) { - var t1, list, t2; - t1 = [$E]; - list = H.setRuntimeTypeInfo([], t1); - for (t2 = J.get$iterator$ax(elements); t2.moveNext$0();) - C.JSArray_methods.add$1(list, H.assertSubtypeOfRuntimeType(t2.get$current(), $E)); + result[i] = fill; + return result; + }, + List_List$from(elements, growable, $E) { + var t1, + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + B.JSArray_methods.add$1(list, $E._as(t1.get$current())); if (growable) return list; - return H.assertSubtype(J.JSArray_markFixedList(list), "$isList", t1, "$asList"); - }, - List_List$unmodifiable: function(elements, $E) { - var t1 = [$E]; - return H.assertSubtype(J.JSArray_markUnmodifiableList(H.assertSubtype(P.List_List$from(elements, false, $E), "$isList", t1, "$asList")), "$isList", t1, "$asList"); - }, - String_String$fromCharCodes: function(charCodes, start, end) { - var t1, len; - t1 = P.int; - H.assertSubtype(charCodes, "$isIterable", [t1], "$asIterable"); - if (typeof charCodes === "object" && charCodes !== null && charCodes.constructor === Array) { - H.assertSubtype(charCodes, "$isJSArray", [t1], "$asJSArray"); - len = charCodes.length; - end = P.RangeError_checkValidRange(start, end, len); - return H.Primitives_stringFromCharCodes(start > 0 || end < len ? C.JSArray_methods.sublist$2(charCodes, start, end) : charCodes); - } - if (!!J.getInterceptor$(charCodes).$isNativeUint8List) - return H.Primitives_stringFromNativeUint8List(charCodes, start, P.RangeError_checkValidRange(start, end, charCodes.length)); - return P.String__stringFromIterable(charCodes, start, end); - }, - String_String$fromCharCode: function(charCode) { - return H.Primitives_stringFromCharCode(charCode); - }, - String__stringFromIterable: function(charCodes, start, end) { - var t1, it, i, list; - H.assertSubtype(charCodes, "$isIterable", [P.int], "$asIterable"); + return J.JSArray_markFixedList(list, $E); + }, + List_List$of(elements, growable, $E) { + var t1 = A.List_List$_of(elements, $E); + return t1; + }, + List_List$_of(elements, $E) { + var list, t1; + if (Array.isArray(elements)) + return A._setArrayType(elements.slice(0), $E._eval$1("JSArray<0>")); + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + B.JSArray_methods.add$1(list, t1.get$current()); + return list; + }, + List_List$unmodifiable(elements, $E) { + return J.JSArray_markUnmodifiableList(A.List_List$from(elements, false, $E)); + }, + String_String$fromCharCodes(charCodes, start, end) { + var array, len; + if (Array.isArray(charCodes)) { + array = charCodes; + len = array.length; + end = A.RangeError_checkValidRange(start, end, len); + return A.Primitives_stringFromCharCodes(start > 0 || end < len ? array.slice(start, end) : array); + } + if (type$.NativeUint8List._is(charCodes)) + return A.Primitives_stringFromNativeUint8List(charCodes, start, A.RangeError_checkValidRange(start, end, charCodes.length)); + return A.String__stringFromIterable(charCodes, start, end); + }, + String_String$fromCharCode(charCode) { + return A.Primitives_stringFromCharCode(charCode); + }, + String__stringFromIterable(charCodes, start, end) { + var t1, it, i, list, _null = null; if (start < 0) - throw H.wrapException(P.RangeError$range(start, 0, J.get$length$asx(charCodes), null, null)); + throw A.wrapException(A.RangeError$range(start, 0, J.get$length$asx(charCodes), _null, _null)); t1 = end == null; if (!t1 && end < start) - throw H.wrapException(P.RangeError$range(end, start, J.get$length$asx(charCodes), null, null)); + throw A.wrapException(A.RangeError$range(end, start, J.get$length$asx(charCodes), _null, _null)); it = J.get$iterator$ax(charCodes); for (i = 0; i < start; ++i) if (!it.moveNext$0()) - throw H.wrapException(P.RangeError$range(start, 0, i, null, null)); + throw A.wrapException(A.RangeError$range(start, 0, i, _null, _null)); list = []; if (t1) for (; it.moveNext$0();) @@ -4005,72 +4561,69 @@ else for (i = start; i < end; ++i) { if (!it.moveNext$0()) - throw H.wrapException(P.RangeError$range(end, start, i, null, null)); + throw A.wrapException(A.RangeError$range(end, start, i, _null, _null)); list.push(it.get$current()); } - return H.Primitives_stringFromCharCodes(list); + return A.Primitives_stringFromCharCodes(list); }, - RegExp_RegExp: function(source, multiLine) { - return new H.JSSyntaxRegExp(source, H.JSSyntaxRegExp_makeNative(source, multiLine, true, false)); + RegExp_RegExp(source, multiLine) { + return new A.JSSyntaxRegExp(source, A.JSSyntaxRegExp_makeNative(source, multiLine, true, false, false, false)); }, - StringBuffer__writeAll: function(string, objects, separator) { + StringBuffer__writeAll(string, objects, separator) { var iterator = J.get$iterator$ax(objects); if (!iterator.moveNext$0()) return string; if (separator.length === 0) { do - string += H.S(iterator.get$current()); + string += A.S(iterator.get$current()); while (iterator.moveNext$0()); } else { - string += H.S(iterator.get$current()); + string += A.S(iterator.get$current()); for (; iterator.moveNext$0();) - string = string + separator + H.S(iterator.get$current()); + string = string + separator + A.S(iterator.get$current()); } return string; }, - NoSuchMethodError$: function(receiver, memberName, positionalArguments, namedArguments) { - return new P.NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, null); + NoSuchMethodError$(receiver, memberName, positionalArguments, namedArguments) { + return new A.NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments); }, - Uri_base: function() { - var uri = H.Primitives_currentUri(); + Uri_base() { + var uri = A.Primitives_currentUri(); if (uri != null) - return P.Uri_parse(uri); - throw H.wrapException(P.UnsupportedError$("'Uri.base' is not supported")); + return A.Uri_parse(uri); + throw A.wrapException(A.UnsupportedError$("'Uri.base' is not supported")); }, - _Uri__uriEncode: function(canonicalTable, text, encoding, spaceToPlus) { - var t1, bytes, i, t2, byte, t3; - H.assertSubtype(canonicalTable, "$isList", [P.int], "$asList"); - if (encoding === C.Utf8Codec_false) { + _Uri__uriEncode(canonicalTable, text, encoding, spaceToPlus) { + var t1, bytes, i, t2, byte, t3, + _s16_ = "0123456789ABCDEF"; + if (encoding === B.C_Utf8Codec) { t1 = $.$get$_Uri__needsNoEncoding()._nativeRegExp; - if (typeof text !== "string") - H.throwExpression(H.argumentErrorValue(text)); t1 = t1.test(text); } else t1 = false; if (t1) return text; - H.assertSubtypeOfRuntimeType(text, H.getRuntimeTypeArgument(encoding, "Codec", 0)); + A._instanceType(encoding)._eval$1("Codec.S")._as(text); bytes = encoding.get$encoder().convert$1(text); for (t1 = bytes.length, i = 0, t2 = ""; i < t1; ++i) { byte = bytes[i]; if (byte < 128) { t3 = byte >>> 4; - if (t3 >= 8) - return H.ioore(canonicalTable, t3); + if (!(t3 < 8)) + return A.ioore(canonicalTable, t3); t3 = (canonicalTable[t3] & 1 << (byte & 15)) !== 0; } else t3 = false; if (t3) - t2 += H.Primitives_stringFromCharCode(byte); + t2 += A.Primitives_stringFromCharCode(byte); else - t2 = spaceToPlus && byte === 32 ? t2 + "+" : t2 + "%" + "0123456789ABCDEF"[byte >>> 4 & 15] + "0123456789ABCDEF"[byte & 15]; + t2 = spaceToPlus && byte === 32 ? t2 + "+" : t2 + "%" + _s16_[byte >>> 4 & 15] + _s16_[byte & 15]; } return t2.charCodeAt(0) == 0 ? t2 : t2; }, - DateTime__fourDigits: function(n) { - var absN, sign; - absN = Math.abs(n); - sign = n < 0 ? "-" : ""; + DateTime__fourDigits(n) { + var absN = Math.abs(n), + sign = n < 0 ? "-" : ""; if (absN >= 1000) return "" + n; if (absN >= 100) @@ -4079,176 +4632,168 @@ return sign + "00" + absN; return sign + "000" + absN; }, - DateTime__threeDigits: function(n) { + DateTime__threeDigits(n) { if (n >= 100) return "" + n; if (n >= 10) return "0" + n; return "00" + n; }, - DateTime__twoDigits: function(n) { + DateTime__twoDigits(n) { if (n >= 10) return "" + n; return "0" + n; }, - Duration$: function(seconds) { - return new P.Duration(1000000 * seconds); - }, - Error_safeToString: function(object) { - if (typeof object === "number" || typeof object === "boolean" || null == object) + Error_safeToString(object) { + if (typeof object == "number" || A._isBool(object) || object == null) return J.toString$0$(object); - if (typeof object === "string") + if (typeof object == "string") return JSON.stringify(object); - return P.Error__objectToString(object); + return A.Error__objectToString(object); }, - ArgumentError$: function(message) { - return new P.ArgumentError(false, null, null, message); + AssertionError$(message) { + return new A.AssertionError(message); }, - ArgumentError$value: function(value, $name, message) { - return new P.ArgumentError(true, value, $name, message); + ArgumentError$(message, $name) { + return new A.ArgumentError(false, null, $name, message); }, - RangeError$value: function(value, $name) { - return new P.RangeError(null, null, true, value, $name, "Value not in range"); + ArgumentError$value(value, $name, message) { + return new A.ArgumentError(true, value, $name, message); }, - RangeError$range: function(invalidValue, minValue, maxValue, $name, message) { - return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); + ArgumentError_checkNotNull(argument, $name, $T) { + return argument; }, - RangeError_checkValueInInterval: function(value, minValue, maxValue, $name) { + RangeError$value(value, $name) { + return new A.RangeError(null, null, true, value, $name, "Value not in range"); + }, + RangeError$range(invalidValue, minValue, maxValue, $name, message) { + return new A.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); + }, + RangeError_checkValueInInterval(value, minValue, maxValue, $name) { if (value < minValue || value > maxValue) - throw H.wrapException(P.RangeError$range(value, minValue, maxValue, $name, null)); + throw A.wrapException(A.RangeError$range(value, minValue, maxValue, $name, null)); + return value; }, - RangeError_checkValidRange: function(start, end, $length) { - if (typeof start !== "number") - return H.iae(start); + RangeError_checkValidRange(start, end, $length) { if (0 > start || start > $length) - throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null)); + throw A.wrapException(A.RangeError$range(start, 0, $length, "start", null)); if (end != null) { if (start > end || end > $length) - throw H.wrapException(P.RangeError$range(end, start, $length, "end", null)); + throw A.wrapException(A.RangeError$range(end, start, $length, "end", null)); return end; } return $length; }, - RangeError_checkNotNegative: function(value, $name) { - if (typeof value !== "number") - return value.$lt(); + RangeError_checkNotNegative(value, $name) { if (value < 0) - throw H.wrapException(P.RangeError$range(value, 0, null, $name, null)); + throw A.wrapException(A.RangeError$range(value, 0, null, $name, null)); + return value; }, - IndexError$: function(invalidValue, indexable, $name, message, $length) { - var t1 = H.intTypeCheck($length == null ? J.get$length$asx(indexable) : $length); - return new P.IndexError(t1, true, invalidValue, $name, "Index out of range"); + IndexError$(invalidValue, indexable, $name, message, $length) { + var t1 = A._asInt($length == null ? J.get$length$asx(indexable) : $length); + return new A.IndexError(t1, true, invalidValue, $name, "Index out of range"); }, - UnsupportedError$: function(message) { - return new P.UnsupportedError(message); + UnsupportedError$(message) { + return new A.UnsupportedError(message); }, - UnimplementedError$: function(message) { - return new P.UnimplementedError(message); + UnimplementedError$(message) { + return new A.UnimplementedError(message); }, - StateError$: function(message) { - return new P.StateError(message); + StateError$(message) { + return new A.StateError(message); }, - ConcurrentModificationError$: function(modifiedObject) { - return new P.ConcurrentModificationError(modifiedObject); + ConcurrentModificationError$(modifiedObject) { + return new A.ConcurrentModificationError(modifiedObject); }, - FormatException$: function(message, source, offset) { - return new P.FormatException(message, source, offset); + FormatException$(message, source, offset) { + return new A.FormatException(message, source, offset); }, - List_List$generate: function($length, generator, growable, $E) { - var result, i; - H.functionTypeCheck(generator, {func: 1, ret: $E, args: [P.int]}); - result = H.setRuntimeTypeInfo([], [$E]); - C.JSArray_methods.set$length(result, $length); - for (i = 0; i < $length; ++i) - C.JSArray_methods.$indexSet(result, i, generator.call$1(i)); - return result; + Object_hash(object1, object2) { + var t2, + t1 = object1.get$hashCode(object1); + object2 = A.Primitives_objectHashCode(object2); + t2 = $.$get$_hashSeed(); + return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(t2, t1), object2)); + }, + Uri_Uri$dataFromString($content) { + var t1, _null = null, + buffer = new A.StringBuffer(""), + indices = A._setArrayType([-1], type$.JSArray_int); + A.UriData__writeUri(_null, _null, _null, buffer, indices); + B.JSArray_methods.add$1(indices, buffer._contents.length); + buffer._contents += ","; + A.UriData__uriEncodeBytes(B.List_CVk, B.C_AsciiCodec.encode$1($content), buffer); + t1 = buffer._contents; + return new A.UriData(t1.charCodeAt(0) == 0 ? t1 : t1, indices, _null).get$uri(); }, - Uri_parse: function(uri) { - var end, delta, t1, indices, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, isSimple, scheme, t2, schemeAuth, queryStart0, pathStart0; - end = uri.length; + Uri_parse(uri) { + var delta, indices, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, isSimple, scheme, t1, t2, schemeAuth, queryStart0, pathStart0, userInfoStart, userInfo, host, portNumber, port, path, query, _null = null, + end = uri.length; if (end >= 5) { - delta = ((J._codeUnitAt$1$s(uri, 4) ^ 58) * 3 | C.JSString_methods._codeUnitAt$1(uri, 0) ^ 100 | C.JSString_methods._codeUnitAt$1(uri, 1) ^ 97 | C.JSString_methods._codeUnitAt$1(uri, 2) ^ 116 | C.JSString_methods._codeUnitAt$1(uri, 3) ^ 97) >>> 0; + delta = ((B.JSString_methods._codeUnitAt$1(uri, 4) ^ 58) * 3 | B.JSString_methods._codeUnitAt$1(uri, 0) ^ 100 | B.JSString_methods._codeUnitAt$1(uri, 1) ^ 97 | B.JSString_methods._codeUnitAt$1(uri, 2) ^ 116 | B.JSString_methods._codeUnitAt$1(uri, 3) ^ 97) >>> 0; if (delta === 0) - return P.UriData__parse(end < end ? C.JSString_methods.substring$2(uri, 0, end) : uri, 5, null).get$uri(); + return A.UriData__parse(end < end ? B.JSString_methods.substring$2(uri, 0, end) : uri, 5, _null).get$uri(); else if (delta === 32) - return P.UriData__parse(C.JSString_methods.substring$2(uri, 5, end), 0, null).get$uri(); - } - t1 = new Array(8); - t1.fixed$length = Array; - indices = H.setRuntimeTypeInfo(t1, [P.int]); - C.JSArray_methods.$indexSet(indices, 0, 0); - C.JSArray_methods.$indexSet(indices, 1, -1); - C.JSArray_methods.$indexSet(indices, 2, -1); - C.JSArray_methods.$indexSet(indices, 7, -1); - C.JSArray_methods.$indexSet(indices, 3, 0); - C.JSArray_methods.$indexSet(indices, 4, 0); - C.JSArray_methods.$indexSet(indices, 5, end); - C.JSArray_methods.$indexSet(indices, 6, end); - if (P._scan(uri, 0, end, 0, indices) >= 14) - C.JSArray_methods.$indexSet(indices, 7, end); + return A.UriData__parse(B.JSString_methods.substring$2(uri, 5, end), 0, _null).get$uri(); + } + indices = A.List_List$filled(8, 0, false, type$.int); + B.JSArray_methods.$indexSet(indices, 0, 0); + B.JSArray_methods.$indexSet(indices, 1, -1); + B.JSArray_methods.$indexSet(indices, 2, -1); + B.JSArray_methods.$indexSet(indices, 7, -1); + B.JSArray_methods.$indexSet(indices, 3, 0); + B.JSArray_methods.$indexSet(indices, 4, 0); + B.JSArray_methods.$indexSet(indices, 5, end); + B.JSArray_methods.$indexSet(indices, 6, end); + if (A._scan(uri, 0, end, 0, indices) >= 14) + B.JSArray_methods.$indexSet(indices, 7, end); schemeEnd = indices[1]; - if (typeof schemeEnd !== "number") - return schemeEnd.$ge(); if (schemeEnd >= 0) - if (P._scan(uri, 0, schemeEnd, 20, indices) === 20) + if (A._scan(uri, 0, schemeEnd, 20, indices) === 20) indices[7] = schemeEnd; - t1 = indices[2]; - if (typeof t1 !== "number") - return t1.$add(); - hostStart = t1 + 1; + hostStart = indices[2] + 1; portStart = indices[3]; pathStart = indices[4]; queryStart = indices[5]; fragmentStart = indices[6]; - if (typeof fragmentStart !== "number") - return fragmentStart.$lt(); - if (typeof queryStart !== "number") - return H.iae(queryStart); if (fragmentStart < queryStart) queryStart = fragmentStart; - if (typeof pathStart !== "number") - return pathStart.$lt(); if (pathStart < hostStart) pathStart = queryStart; else if (pathStart <= schemeEnd) pathStart = schemeEnd + 1; - if (typeof portStart !== "number") - return portStart.$lt(); if (portStart < hostStart) portStart = pathStart; - t1 = indices[7]; - if (typeof t1 !== "number") - return t1.$lt(); - isSimple = t1 < 0; + isSimple = indices[7] < 0; if (isSimple) if (hostStart > schemeEnd + 3) { - scheme = null; + scheme = _null; isSimple = false; } else { t1 = portStart > 0; if (t1 && portStart + 1 === pathStart) { - scheme = null; + scheme = _null; isSimple = false; } else { - if (!(queryStart < end && queryStart === pathStart + 2 && J.startsWith$2$s(uri, "..", pathStart))) - t2 = queryStart > pathStart + 2 && J.startsWith$2$s(uri, "/..", queryStart - 3); + if (!(queryStart < end && queryStart === pathStart + 2 && B.JSString_methods.startsWith$2(uri, "..", pathStart))) + t2 = queryStart > pathStart + 2 && B.JSString_methods.startsWith$2(uri, "/..", queryStart - 3); else t2 = true; if (t2) { - scheme = null; + scheme = _null; isSimple = false; } else { if (schemeEnd === 4) - if (J.startsWith$2$s(uri, "file", 0)) { + if (B.JSString_methods.startsWith$2(uri, "file", 0)) { if (hostStart <= 0) { - if (!C.JSString_methods.startsWith$2(uri, "/", pathStart)) { + if (!B.JSString_methods.startsWith$2(uri, "/", pathStart)) { schemeAuth = "file:///"; delta = 3; } else { schemeAuth = "file://"; delta = 2; } - uri = schemeAuth + C.JSString_methods.substring$2(uri, pathStart, end); + uri = schemeAuth + B.JSString_methods.substring$2(uri, pathStart, end); schemeEnd -= 0; t1 = delta - 0; queryStart += t1; @@ -4258,47 +4803,46 @@ portStart = 7; pathStart = 7; } else if (pathStart === queryStart) { - queryStart0 = queryStart + 1; ++fragmentStart; - uri = C.JSString_methods.replaceRange$3(uri, pathStart, queryStart, "/"); + queryStart0 = queryStart + 1; + uri = B.JSString_methods.replaceRange$3(uri, pathStart, queryStart, "/"); ++end; queryStart = queryStart0; } scheme = "file"; - } else if (C.JSString_methods.startsWith$2(uri, "http", 0)) { - if (t1 && portStart + 3 === pathStart && C.JSString_methods.startsWith$2(uri, "80", portStart + 1)) { + } else if (B.JSString_methods.startsWith$2(uri, "http", 0)) { + if (t1 && portStart + 3 === pathStart && B.JSString_methods.startsWith$2(uri, "80", portStart + 1)) { + fragmentStart -= 3; pathStart0 = pathStart - 3; queryStart -= 3; - fragmentStart -= 3; - uri = C.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); end -= 3; pathStart = pathStart0; } scheme = "http"; } else - scheme = null; - else if (schemeEnd === 5 && J.startsWith$2$s(uri, "https", 0)) { - if (t1 && portStart + 4 === pathStart && J.startsWith$2$s(uri, "443", portStart + 1)) { + scheme = _null; + else if (schemeEnd === 5 && B.JSString_methods.startsWith$2(uri, "https", 0)) { + if (t1 && portStart + 4 === pathStart && B.JSString_methods.startsWith$2(uri, "443", portStart + 1)) { + fragmentStart -= 4; pathStart0 = pathStart - 4; queryStart -= 4; - fragmentStart -= 4; - uri = J.replaceRange$3$asx(uri, portStart, pathStart, ""); + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); end -= 3; pathStart = pathStart0; } scheme = "https"; } else - scheme = null; + scheme = _null; isSimple = true; } } } else - scheme = null; + scheme = _null; if (isSimple) { - t1 = uri.length; - if (end < t1) { - uri = J.substring$2$s(uri, 0, end); + if (end < uri.length) { + uri = B.JSString_methods.substring$2(uri, 0, end); schemeEnd -= 0; hostStart -= 0; portStart -= 0; @@ -4306,192 +4850,163 @@ queryStart -= 0; fragmentStart -= 0; } - return new P._SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme); + return new A._SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme); } - return P._Uri__Uri$notSimple(uri, 0, end, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme); - }, - Uri_decodeComponent: function(encodedComponent) { - H.stringTypeCheck(encodedComponent); - return P._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, C.Utf8Codec_false, false); - }, - Uri_splitQueryString: function(query) { - var t1 = P.String; - return C.JSArray_methods.fold$1$2(H.setRuntimeTypeInfo(query.split("&"), [t1]), P.LinkedHashMap_LinkedHashMap$_empty(t1, t1), new P.Uri_splitQueryString_closure(C.Utf8Codec_false), [P.Map, P.String, P.String]); - }, - Uri__parseIPv4Address: function(host, start, end) { - var error, result, t1, i, partStart, partIndex, char, part, partIndex0; - error = new P.Uri__parseIPv4Address_error(host); - result = new Uint8Array(4); - for (t1 = result.length, i = start, partStart = i, partIndex = 0; i < end; ++i) { - char = C.JSString_methods.codeUnitAt$1(host, i); + if (scheme == null) + if (schemeEnd > 0) + scheme = A._Uri__makeScheme(uri, 0, schemeEnd); + else { + if (schemeEnd === 0) + A._Uri__fail(uri, 0, "Invalid empty scheme"); + scheme = ""; + } + if (hostStart > 0) { + userInfoStart = schemeEnd + 3; + userInfo = userInfoStart < hostStart ? A._Uri__makeUserInfo(uri, userInfoStart, hostStart - 1) : ""; + host = A._Uri__makeHost(uri, hostStart, portStart, false); + t1 = portStart + 1; + if (t1 < pathStart) { + portNumber = A.Primitives_parseInt(B.JSString_methods.substring$2(uri, t1, pathStart), _null); + port = A._Uri__makePort(portNumber == null ? A.throwExpression(A.FormatException$("Invalid port", uri, t1)) : portNumber, scheme); + } else + port = _null; + } else { + port = _null; + host = port; + userInfo = ""; + } + path = A._Uri__makePath(uri, pathStart, queryStart, _null, scheme, host != null); + query = queryStart < fragmentStart ? A._Uri__makeQuery(uri, queryStart + 1, fragmentStart, _null) : _null; + return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragmentStart < end ? A._Uri__makeFragment(uri, fragmentStart + 1, end) : _null); + }, + Uri_decodeComponent(encodedComponent) { + A._asString(encodedComponent); + return A._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, B.C_Utf8Codec, false); + }, + Uri_splitQueryString(query) { + var t1 = type$.String; + return B.JSArray_methods.fold$1$2(A._setArrayType(query.split("&"), type$.JSArray_String), A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), new A.Uri_splitQueryString_closure(B.C_Utf8Codec), type$.Map_String_String); + }, + Uri__parseIPv4Address(host, start, end) { + var i, partStart, partIndex, char, part, partIndex0, + _s43_ = "IPv4 address should contain exactly 4 parts", + _s37_ = "each part must be in the range 0..255", + error = new A.Uri__parseIPv4Address_error(host), + result = new Uint8Array(4); + for (i = start, partStart = i, partIndex = 0; i < end; ++i) { + char = B.JSString_methods.codeUnitAt$1(host, i); if (char !== 46) { if ((char ^ 48) > 9) error.call$2("invalid character", i); } else { if (partIndex === 3) - error.call$2("IPv4 address should contain exactly 4 parts", i); - part = P.int_parse(C.JSString_methods.substring$2(host, partStart, i), null, null); - if (typeof part !== "number") - return part.$gt(); + error.call$2(_s43_, i); + part = A.int_parse(B.JSString_methods.substring$2(host, partStart, i), null); if (part > 255) - error.call$2("each part must be in the range 0..255", partStart); + error.call$2(_s37_, partStart); partIndex0 = partIndex + 1; - if (partIndex >= t1) - return H.ioore(result, partIndex); + if (!(partIndex < 4)) + return A.ioore(result, partIndex); result[partIndex] = part; partStart = i + 1; partIndex = partIndex0; } } if (partIndex !== 3) - error.call$2("IPv4 address should contain exactly 4 parts", end); - part = P.int_parse(C.JSString_methods.substring$2(host, partStart, end), null, null); - if (typeof part !== "number") - return part.$gt(); + error.call$2(_s43_, end); + part = A.int_parse(B.JSString_methods.substring$2(host, partStart, end), null); if (part > 255) - error.call$2("each part must be in the range 0..255", partStart); - if (partIndex >= t1) - return H.ioore(result, partIndex); + error.call$2(_s37_, partStart); + if (!(partIndex < 4)) + return A.ioore(result, partIndex); result[partIndex] = part; return result; }, - Uri_parseIPv6Address: function(host, start, end) { - var error, parseHex, parts, i, partStart, wildcardSeen, seenDot, char, atEnd, t1, last, t2, bytes, wildCardLength, index, value, j, t3; - if (end == null) - end = host.length; - error = new P.Uri_parseIPv6Address_error(host); - parseHex = new P.Uri_parseIPv6Address_parseHex(error, host); + Uri_parseIPv6Address(host, start, end) { + var parts, i, partStart, wildcardSeen, seenDot, char, atEnd, t1, last, bytes, wildCardLength, index, value, j, t2, _null = null, + error = new A.Uri_parseIPv6Address_error(host), + parseHex = new A.Uri_parseIPv6Address_parseHex(error, host); if (host.length < 2) - error.call$1("address is too short"); - parts = H.setRuntimeTypeInfo([], [P.int]); + error.call$2("address is too short", _null); + parts = A._setArrayType([], type$.JSArray_int); for (i = start, partStart = i, wildcardSeen = false, seenDot = false; i < end; ++i) { - char = C.JSString_methods.codeUnitAt$1(host, i); + char = B.JSString_methods.codeUnitAt$1(host, i); if (char === 58) { if (i === start) { ++i; - if (C.JSString_methods.codeUnitAt$1(host, i) !== 58) + if (B.JSString_methods.codeUnitAt$1(host, i) !== 58) error.call$2("invalid start colon.", i); partStart = i; } if (i === partStart) { if (wildcardSeen) error.call$2("only one wildcard `::` is allowed", i); - C.JSArray_methods.add$1(parts, -1); + B.JSArray_methods.add$1(parts, -1); wildcardSeen = true; } else - C.JSArray_methods.add$1(parts, parseHex.call$2(partStart, i)); + B.JSArray_methods.add$1(parts, parseHex.call$2(partStart, i)); partStart = i + 1; } else if (char === 46) seenDot = true; } if (parts.length === 0) - error.call$1("too few parts"); + error.call$2("too few parts", _null); atEnd = partStart === end; - t1 = C.JSArray_methods.get$last(parts); + t1 = B.JSArray_methods.get$last(parts); if (atEnd && t1 !== -1) error.call$2("expected a part after last `:`", end); if (!atEnd) if (!seenDot) - C.JSArray_methods.add$1(parts, parseHex.call$2(partStart, end)); + B.JSArray_methods.add$1(parts, parseHex.call$2(partStart, end)); else { - last = P.Uri__parseIPv4Address(host, partStart, end); - t1 = last[0]; - if (typeof t1 !== "number") - return t1.$shl(); - t2 = last[1]; - if (typeof t2 !== "number") - return H.iae(t2); - C.JSArray_methods.add$1(parts, (t1 << 8 | t2) >>> 0); - t2 = last[2]; - if (typeof t2 !== "number") - return t2.$shl(); - t1 = last[3]; - if (typeof t1 !== "number") - return H.iae(t1); - C.JSArray_methods.add$1(parts, (t2 << 8 | t1) >>> 0); + last = A.Uri__parseIPv4Address(host, partStart, end); + B.JSArray_methods.add$1(parts, (last[0] << 8 | last[1]) >>> 0); + B.JSArray_methods.add$1(parts, (last[2] << 8 | last[3]) >>> 0); } if (wildcardSeen) { if (parts.length > 7) - error.call$1("an address with a wildcard must have less than 7 parts"); + error.call$2("an address with a wildcard must have less than 7 parts", _null); } else if (parts.length !== 8) - error.call$1("an address without a wildcard must contain exactly 8 parts"); + error.call$2("an address without a wildcard must contain exactly 8 parts", _null); bytes = new Uint8Array(16); - for (t1 = parts.length, t2 = bytes.length, wildCardLength = 9 - t1, i = 0, index = 0; i < t1; ++i) { + for (t1 = parts.length, wildCardLength = 9 - t1, i = 0, index = 0; i < t1; ++i) { value = parts[i]; if (value === -1) for (j = 0; j < wildCardLength; ++j) { - if (index < 0 || index >= t2) - return H.ioore(bytes, index); + if (!(index >= 0 && index < 16)) + return A.ioore(bytes, index); bytes[index] = 0; - t3 = index + 1; - if (t3 >= t2) - return H.ioore(bytes, t3); - bytes[t3] = 0; + t2 = index + 1; + if (!(t2 < 16)) + return A.ioore(bytes, t2); + bytes[t2] = 0; index += 2; } else { - if (typeof value !== "number") - return value.$shr(); - t3 = C.JSInt_methods._shrOtherPositive$1(value, 8); - if (index < 0 || index >= t2) - return H.ioore(bytes, index); - bytes[index] = t3; - t3 = index + 1; - if (t3 >= t2) - return H.ioore(bytes, t3); - bytes[t3] = value & 255; + t2 = B.JSInt_methods._shrOtherPositive$1(value, 8); + if (!(index >= 0 && index < 16)) + return A.ioore(bytes, index); + bytes[index] = t2; + t2 = index + 1; + if (!(t2 < 16)) + return A.ioore(bytes, t2); + bytes[t2] = value & 255; index += 2; } } return bytes; }, - _Uri__Uri$notSimple: function(uri, start, end, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme) { - var userInfoStart, userInfo, host, t1, port, path, query; - if (scheme == null) { - if (typeof schemeEnd !== "number") - return schemeEnd.$gt(); - if (schemeEnd > start) - scheme = P._Uri__makeScheme(uri, start, schemeEnd); - else { - if (schemeEnd === start) - P._Uri__fail(uri, start, "Invalid empty scheme"); - scheme = ""; - } - } - if (hostStart > start) { - if (typeof schemeEnd !== "number") - return schemeEnd.$add(); - userInfoStart = schemeEnd + 3; - userInfo = userInfoStart < hostStart ? P._Uri__makeUserInfo(uri, userInfoStart, hostStart - 1) : ""; - host = P._Uri__makeHost(uri, hostStart, portStart, false); - if (typeof portStart !== "number") - return portStart.$add(); - t1 = portStart + 1; - if (typeof pathStart !== "number") - return H.iae(pathStart); - port = t1 < pathStart ? P._Uri__makePort(P.int_parse(J.substring$2$s(uri, t1, pathStart), new P._Uri__Uri$notSimple_closure(uri, portStart), null), scheme) : null; - } else { - userInfo = ""; - host = null; - port = null; - } - path = P._Uri__makePath(uri, pathStart, queryStart, null, scheme, host != null); - if (typeof queryStart !== "number") - return queryStart.$lt(); - if (typeof fragmentStart !== "number") - return H.iae(fragmentStart); - query = queryStart < fragmentStart ? P._Uri__makeQuery(uri, queryStart + 1, fragmentStart, null) : null; - return new P._Uri(scheme, userInfo, host, port, path, query, fragmentStart < end ? P._Uri__makeFragment(uri, fragmentStart + 1, end) : null); - }, - _Uri__Uri: function(host, path, pathSegments, scheme) { - var userInfo, query, fragment, port, isFile, t1, hasAuthority, t2; - H.assertSubtype(pathSegments, "$isIterable", [P.String], "$asIterable"); - scheme = P._Uri__makeScheme(scheme, 0, scheme == null ? 0 : scheme.length); - userInfo = P._Uri__makeUserInfo(null, 0, 0); - host = P._Uri__makeHost(host, 0, host == null ? 0 : host.length, false); - query = P._Uri__makeQuery(null, 0, 0, null); - fragment = P._Uri__makeFragment(null, 0, 0); - port = P._Uri__makePort(null, scheme); + _Uri$_internal(scheme, _userInfo, _host, _port, path, _query, _fragment) { + return new A._Uri(scheme, _userInfo, _host, _port, path, _query, _fragment); + }, + _Uri__Uri(host, path, pathSegments, scheme) { + var userInfo, query, fragment, port, isFile, t1, hasAuthority, t2, _null = null; + scheme = scheme == null ? "" : A._Uri__makeScheme(scheme, 0, scheme.length); + userInfo = A._Uri__makeUserInfo(_null, 0, 0); + host = A._Uri__makeHost(host, 0, host == null ? 0 : host.length, false); + query = A._Uri__makeQuery(_null, 0, 0, _null); + fragment = A._Uri__makeFragment(_null, 0, 0); + port = A._Uri__makePort(_null, scheme); isFile = scheme === "file"; if (host == null) t1 = userInfo.length !== 0 || port != null || isFile; @@ -4501,44 +5016,53 @@ host = ""; t1 = host == null; hasAuthority = !t1; - path = P._Uri__makePath(path, 0, path == null ? 0 : path.length, pathSegments, scheme, hasAuthority); + path = A._Uri__makePath(path, 0, path == null ? 0 : path.length, pathSegments, scheme, hasAuthority); t2 = scheme.length === 0; - if (t2 && t1 && !J.startsWith$1$s(path, "/")) - path = P._Uri__normalizeRelativePath(path, !t2 || hasAuthority); + if (t2 && t1 && !B.JSString_methods.startsWith$1(path, "/")) + path = A._Uri__normalizeRelativePath(path, !t2 || hasAuthority); else - path = P._Uri__removeDotSegments(path); - return new P._Uri(scheme, userInfo, t1 && J.startsWith$1$s(path, "//") ? "" : host, port, path, query, fragment); + path = A._Uri__removeDotSegments(path); + return A._Uri$_internal(scheme, userInfo, t1 && B.JSString_methods.startsWith$1(path, "//") ? "" : host, port, path, query, fragment); }, - _Uri__defaultPort: function(scheme) { + _Uri__defaultPort(scheme) { if (scheme === "http") return 80; if (scheme === "https") return 443; return 0; }, - _Uri__fail: function(uri, index, message) { - throw H.wrapException(P.FormatException$(message, uri, index)); + _Uri__fail(uri, index, message) { + throw A.wrapException(A.FormatException$(message, uri, index)); }, - _Uri__Uri$file: function(path, windows) { - return windows ? P._Uri__makeWindowsFileUrl(path, false) : P._Uri__makeFileUri(path, false); + _Uri__Uri$file(path, windows) { + return windows ? A._Uri__makeWindowsFileUrl(path, false) : A._Uri__makeFileUri(path, false); }, - _Uri__checkNonWindowsPathReservedCharacters: function(segments, argumentError) { - C.JSArray_methods.forEach$1(H.assertSubtype(segments, "$isList", [P.String], "$asList"), new P._Uri__checkNonWindowsPathReservedCharacters_closure(false)); + _Uri__checkNonWindowsPathReservedCharacters(segments, argumentError) { + var t1, _i, segment; + for (t1 = segments.length, _i = 0; _i < t1; ++_i) { + segment = segments[_i]; + if (J.contains$1$asx(segment, "/")) { + t1 = A.UnsupportedError$("Illegal path character " + A.S(segment)); + throw A.wrapException(t1); + } + } }, - _Uri__checkWindowsPathReservedCharacters: function(segments, argumentError, firstSegment) { - var t1, t2; - H.assertSubtype(segments, "$isList", [P.String], "$asList"); - for (t1 = H.SubListIterable$(segments, firstSegment, null, H.getTypeArgumentByIndex(segments, 0)), t1 = new H.ListIterator(t1, t1.get$length(t1), 0, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) { - t2 = t1.__internal$_current; - if (J.contains$1$asx(t2, P.RegExp_RegExp('["*/:<>?\\\\|]', false))) + _Uri__checkWindowsPathReservedCharacters(segments, argumentError, firstSegment) { + var t1, t2, t3; + for (t1 = A.SubListIterable$(segments, firstSegment, null, A._arrayInstanceType(segments)._precomputed1), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(t1), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (B.JSString_methods.contains$1(t3, A.RegExp_RegExp('["*/:<>?\\\\|]', false))) if (argumentError) - throw H.wrapException(P.ArgumentError$("Illegal character in path")); + throw A.wrapException(A.ArgumentError$("Illegal character in path", null)); else - throw H.wrapException(P.UnsupportedError$("Illegal character in path: " + t2)); + throw A.wrapException(A.UnsupportedError$("Illegal character in path: " + t3)); } }, - _Uri__checkWindowsDriveLetter: function(charCode, argumentError) { - var t1; + _Uri__checkWindowsDriveLetter(charCode, argumentError) { + var t1, + _s21_ = "Illegal drive letter "; if (!(65 <= charCode && charCode <= 90)) t1 = 97 <= charCode && charCode <= 122; else @@ -4546,110 +5070,190 @@ if (t1) return; if (argumentError) - throw H.wrapException(P.ArgumentError$("Illegal drive letter " + P.String_String$fromCharCode(charCode))); + throw A.wrapException(A.ArgumentError$(_s21_ + A.String_String$fromCharCode(charCode), null)); else - throw H.wrapException(P.UnsupportedError$("Illegal drive letter " + P.String_String$fromCharCode(charCode))); + throw A.wrapException(A.UnsupportedError$(_s21_ + A.String_String$fromCharCode(charCode))); }, - _Uri__makeFileUri: function(path, slashTerminated) { - var segments = H.setRuntimeTypeInfo(path.split("/"), [P.String]); - if (C.JSString_methods.startsWith$1(path, "/")) - return P._Uri__Uri(null, null, segments, "file"); + _Uri__makeFileUri(path, slashTerminated) { + var _null = null, + segments = A._setArrayType(path.split("/"), type$.JSArray_String); + if (B.JSString_methods.startsWith$1(path, "/")) + return A._Uri__Uri(_null, _null, segments, "file"); else - return P._Uri__Uri(null, null, segments, null); + return A._Uri__Uri(_null, _null, segments, _null); }, - _Uri__makeWindowsFileUrl: function(path, slashTerminated) { - var t1, pathSegments, pathStart, hostPart; - if (J.startsWith$1$s(path, "\\\\?\\")) - if (C.JSString_methods.startsWith$2(path, "UNC\\", 4)) - path = C.JSString_methods.replaceRange$3(path, 0, 7, "\\"); + _Uri__makeWindowsFileUrl(path, slashTerminated) { + var t1, pathSegments, pathStart, hostPart, _s1_ = "\\", _null = null, _s4_ = "file"; + if (B.JSString_methods.startsWith$1(path, "\\\\?\\")) + if (B.JSString_methods.startsWith$2(path, "UNC\\", 4)) + path = B.JSString_methods.replaceRange$3(path, 0, 7, _s1_); else { - path = C.JSString_methods.substring$1(path, 4); - if (path.length < 3 || C.JSString_methods._codeUnitAt$1(path, 1) !== 58 || C.JSString_methods._codeUnitAt$1(path, 2) !== 92) - throw H.wrapException(P.ArgumentError$("Windows paths with \\\\?\\ prefix must be absolute")); + path = B.JSString_methods.substring$1(path, 4); + if (path.length < 3 || B.JSString_methods._codeUnitAt$1(path, 1) !== 58 || B.JSString_methods._codeUnitAt$1(path, 2) !== 92) + throw A.wrapException(A.ArgumentError$("Windows paths with \\\\?\\ prefix must be absolute", _null)); } else - path = H.stringReplaceAllUnchecked(path, "/", "\\"); + path = A.stringReplaceAllUnchecked(path, "/", _s1_); t1 = path.length; - if (t1 > 1 && C.JSString_methods._codeUnitAt$1(path, 1) === 58) { - P._Uri__checkWindowsDriveLetter(C.JSString_methods._codeUnitAt$1(path, 0), true); - if (t1 === 2 || C.JSString_methods._codeUnitAt$1(path, 2) !== 92) - throw H.wrapException(P.ArgumentError$("Windows paths with drive letter must be absolute")); - pathSegments = H.setRuntimeTypeInfo(path.split("\\"), [P.String]); - P._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 1); - return P._Uri__Uri(null, null, pathSegments, "file"); - } - if (C.JSString_methods.startsWith$1(path, "\\")) - if (C.JSString_methods.startsWith$2(path, "\\", 1)) { - pathStart = C.JSString_methods.indexOf$2(path, "\\", 2); + if (t1 > 1 && B.JSString_methods._codeUnitAt$1(path, 1) === 58) { + A._Uri__checkWindowsDriveLetter(B.JSString_methods._codeUnitAt$1(path, 0), true); + if (t1 === 2 || B.JSString_methods._codeUnitAt$1(path, 2) !== 92) + throw A.wrapException(A.ArgumentError$("Windows paths with drive letter must be absolute", _null)); + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 1); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); + } + if (B.JSString_methods.startsWith$1(path, _s1_)) + if (B.JSString_methods.startsWith$2(path, _s1_, 1)) { + pathStart = B.JSString_methods.indexOf$2(path, _s1_, 2); t1 = pathStart < 0; - hostPart = t1 ? C.JSString_methods.substring$1(path, 2) : C.JSString_methods.substring$2(path, 2, pathStart); - pathSegments = H.setRuntimeTypeInfo((t1 ? "" : C.JSString_methods.substring$1(path, pathStart + 1)).split("\\"), [P.String]); - P._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); - return P._Uri__Uri(hostPart, null, pathSegments, "file"); + hostPart = t1 ? B.JSString_methods.substring$1(path, 2) : B.JSString_methods.substring$2(path, 2, pathStart); + pathSegments = A._setArrayType((t1 ? "" : B.JSString_methods.substring$1(path, pathStart + 1)).split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(hostPart, _null, pathSegments, _s4_); } else { - pathSegments = H.setRuntimeTypeInfo(path.split("\\"), [P.String]); - P._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); - return P._Uri__Uri(null, null, pathSegments, "file"); + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); } else { - pathSegments = H.setRuntimeTypeInfo(path.split("\\"), [P.String]); - P._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); - return P._Uri__Uri(null, null, pathSegments, null); + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _null); } }, - _Uri__makePort: function(port, scheme) { - if (port != null && port === P._Uri__defaultPort(scheme)) - return; + _Uri__makePort(port, scheme) { + if (port != null && port === A._Uri__defaultPort(scheme)) + return null; return port; }, - _Uri__makeHost: function(host, start, end, strictIPv6) { - var t1, i; + _Uri__makeHost(host, start, end, strictIPv6) { + var t1, t2, index, zoneIDstart, zoneID, i; if (host == null) - return; + return null; if (start === end) return ""; - if (C.JSString_methods.codeUnitAt$1(host, start) === 91) { - if (typeof end !== "number") - return end.$sub(); + if (B.JSString_methods.codeUnitAt$1(host, start) === 91) { t1 = end - 1; - if (C.JSString_methods.codeUnitAt$1(host, t1) !== 93) - P._Uri__fail(host, start, "Missing end `]` to match `[` in host"); - P.Uri_parseIPv6Address(host, start + 1, t1); - return C.JSString_methods.substring$2(host, start, end).toLowerCase(); - } - if (typeof end !== "number") - return H.iae(end); - i = start; - for (; i < end; ++i) - if (C.JSString_methods.codeUnitAt$1(host, i) === 58) { - P.Uri_parseIPv6Address(host, start, end); - return "[" + host + "]"; + if (B.JSString_methods.codeUnitAt$1(host, t1) !== 93) + A._Uri__fail(host, start, "Missing end `]` to match `[` in host"); + t2 = start + 1; + index = A._Uri__checkZoneID(host, t2, t1); + if (index < t1) { + zoneIDstart = index + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, t1, "%25"); + } else + zoneID = ""; + A.Uri_parseIPv6Address(host, t2, index); + return B.JSString_methods.substring$2(host, start, index).toLowerCase() + zoneID + "]"; + } + for (i = start; i < end; ++i) + if (B.JSString_methods.codeUnitAt$1(host, i) === 58) { + index = B.JSString_methods.indexOf$2(host, "%", start); + index = index >= start && index < end ? index : end; + if (index < end) { + zoneIDstart = index + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, end, "%25"); + } else + zoneID = ""; + A.Uri_parseIPv6Address(host, start, index); + return "[" + B.JSString_methods.substring$2(host, start, index) + zoneID + "]"; + } + return A._Uri__normalizeRegName(host, start, end); + }, + _Uri__checkZoneID(host, start, end) { + var index = B.JSString_methods.indexOf$2(host, "%", start); + return index >= start && index < end ? index : end; + }, + _Uri__normalizeZoneID(host, start, end, prefix) { + var index, sectionStart, isNormalized, char, replacement, t1, t2, tail, sourceLength, slice, + buffer = prefix !== "" ? new A.StringBuffer(prefix) : null; + for (index = start, sectionStart = index, isNormalized = true; index < end;) { + char = B.JSString_methods.codeUnitAt$1(host, index); + if (char === 37) { + replacement = A._Uri__normalizeEscape(host, index, true); + t1 = replacement == null; + if (t1 && isNormalized) { + index += 3; + continue; + } + if (buffer == null) + buffer = new A.StringBuffer(""); + t2 = buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + if (t1) + replacement = B.JSString_methods.substring$2(host, index, index + 3); + else if (replacement === "%") + A._Uri__fail(host, index, "ZoneID should not contain % anymore"); + buffer._contents = t2 + replacement; + index += 3; + sectionStart = index; + isNormalized = true; + } else { + if (char < 127) { + t1 = char >>> 4; + if (!(t1 < 8)) + return A.ioore(B.List_nxB, t1); + t1 = (B.List_nxB[t1] & 1 << (char & 15)) !== 0; + } else + t1 = false; + if (t1) { + if (isNormalized && 65 <= char && 90 >= char) { + if (buffer == null) + buffer = new A.StringBuffer(""); + if (sectionStart < index) { + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + sectionStart = index; + } + isNormalized = false; + } + ++index; + } else { + if ((char & 64512) === 55296 && index + 1 < end) { + tail = B.JSString_methods.codeUnitAt$1(host, index + 1); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; + } else + sourceLength = 1; + } else + sourceLength = 1; + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t1._contents += A._Uri__escapeChar(char); + index += sourceLength; + sectionStart = index; + } } - return P._Uri__normalizeRegName(host, start, end); + } + if (buffer == null) + return B.JSString_methods.substring$2(host, start, end); + if (sectionStart < end) + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, end); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; }, - _Uri__normalizeRegName: function(host, start, end) { + _Uri__normalizeRegName(host, start, end) { var index, sectionStart, buffer, isNormalized, char, replacement, t1, slice, t2, sourceLength, tail; - if (typeof end !== "number") - return H.iae(end); - index = start; - sectionStart = index; - buffer = null; - isNormalized = true; - for (; index < end;) { - char = C.JSString_methods.codeUnitAt$1(host, index); + for (index = start, sectionStart = index, buffer = null, isNormalized = true; index < end;) { + char = B.JSString_methods.codeUnitAt$1(host, index); if (char === 37) { - replacement = P._Uri__normalizeEscape(host, index, true); + replacement = A._Uri__normalizeEscape(host, index, true); t1 = replacement == null; if (t1 && isNormalized) { index += 3; continue; } if (buffer == null) - buffer = new P.StringBuffer(""); - slice = C.JSString_methods.substring$2(host, sectionStart, index); + buffer = new A.StringBuffer(""); + slice = B.JSString_methods.substring$2(host, sectionStart, index); t2 = buffer._contents += !isNormalized ? slice.toLowerCase() : slice; if (t1) { - replacement = C.JSString_methods.substring$2(host, index, index + 3); + replacement = B.JSString_methods.substring$2(host, index, index + 3); sourceLength = 3; } else if (replacement === "%") { replacement = "%25"; @@ -4663,17 +5267,17 @@ } else { if (char < 127) { t1 = char >>> 4; - if (t1 >= 8) - return H.ioore(C.List_qNA, t1); - t1 = (C.List_qNA[t1] & 1 << (char & 15)) !== 0; + if (!(t1 < 8)) + return A.ioore(B.List_qNA, t1); + t1 = (B.List_qNA[t1] & 1 << (char & 15)) !== 0; } else t1 = false; if (t1) { if (isNormalized && 65 <= char && 90 >= char) { if (buffer == null) - buffer = new P.StringBuffer(""); + buffer = new A.StringBuffer(""); if (sectionStart < index) { - buffer._contents += C.JSString_methods.substring$2(host, sectionStart, index); + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); sectionStart = index; } isNormalized = false; @@ -4682,28 +5286,33 @@ } else { if (char <= 93) { t1 = char >>> 4; - if (t1 >= 8) - return H.ioore(C.List_2Vk, t1); - t1 = (C.List_2Vk[t1] & 1 << (char & 15)) !== 0; + if (!(t1 < 8)) + return A.ioore(B.List_2Vk, t1); + t1 = (B.List_2Vk[t1] & 1 << (char & 15)) !== 0; } else t1 = false; if (t1) - P._Uri__fail(host, index, "Invalid character"); + A._Uri__fail(host, index, "Invalid character"); else { if ((char & 64512) === 55296 && index + 1 < end) { - tail = C.JSString_methods.codeUnitAt$1(host, index + 1); + tail = B.JSString_methods.codeUnitAt$1(host, index + 1); if ((tail & 64512) === 56320) { - char = 65536 | (char & 1023) << 10 | tail & 1023; + char = (char & 1023) << 10 | tail & 1023 | 65536; sourceLength = 2; } else sourceLength = 1; } else sourceLength = 1; - if (buffer == null) - buffer = new P.StringBuffer(""); - slice = C.JSString_methods.substring$2(host, sectionStart, index); - buffer._contents += !isNormalized ? slice.toLowerCase() : slice; - buffer._contents += P._Uri__escapeChar(char); + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (!isNormalized) + slice = slice.toLowerCase(); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t1._contents += A._Uri__escapeChar(char); index += sourceLength; sectionStart = index; } @@ -4711,42 +5320,38 @@ } } if (buffer == null) - return C.JSString_methods.substring$2(host, start, end); + return B.JSString_methods.substring$2(host, start, end); if (sectionStart < end) { - slice = C.JSString_methods.substring$2(host, sectionStart, end); + slice = B.JSString_methods.substring$2(host, sectionStart, end); buffer._contents += !isNormalized ? slice.toLowerCase() : slice; } t1 = buffer._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - _Uri__makeScheme: function(scheme, start, end) { + _Uri__makeScheme(scheme, start, end) { var i, containsUpperCase, codeUnit, t1; if (start === end) return ""; - if (!P._Uri__isAlphabeticCharacter(J.getInterceptor$s(scheme)._codeUnitAt$1(scheme, start))) - P._Uri__fail(scheme, start, "Scheme not starting with alphabetic character"); - if (typeof end !== "number") - return H.iae(end); - i = start; - containsUpperCase = false; - for (; i < end; ++i) { - codeUnit = C.JSString_methods._codeUnitAt$1(scheme, i); + if (!A._Uri__isAlphabeticCharacter(B.JSString_methods._codeUnitAt$1(scheme, start))) + A._Uri__fail(scheme, start, "Scheme not starting with alphabetic character"); + for (i = start, containsUpperCase = false; i < end; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(scheme, i); if (codeUnit < 128) { t1 = codeUnit >>> 4; - if (t1 >= 8) - return H.ioore(C.List_JYB, t1); - t1 = (C.List_JYB[t1] & 1 << (codeUnit & 15)) !== 0; + if (!(t1 < 8)) + return A.ioore(B.List_JYB, t1); + t1 = (B.List_JYB[t1] & 1 << (codeUnit & 15)) !== 0; } else t1 = false; if (!t1) - P._Uri__fail(scheme, i, "Illegal scheme character"); + A._Uri__fail(scheme, i, "Illegal scheme character"); if (65 <= codeUnit && codeUnit <= 90) containsUpperCase = true; } - scheme = C.JSString_methods.substring$2(scheme, start, end); - return P._Uri__canonicalizeScheme(containsUpperCase ? scheme.toLowerCase() : scheme); + scheme = B.JSString_methods.substring$2(scheme, start, end); + return A._Uri__canonicalizeScheme(containsUpperCase ? scheme.toLowerCase() : scheme); }, - _Uri__canonicalizeScheme: function(scheme) { + _Uri__canonicalizeScheme(scheme) { if (scheme === "http") return "http"; if (scheme === "file") @@ -4757,89 +5362,80 @@ return "package"; return scheme; }, - _Uri__makeUserInfo: function(userInfo, start, end) { + _Uri__makeUserInfo(userInfo, start, end) { if (userInfo == null) return ""; - return P._Uri__normalizeOrSubstring(userInfo, start, end, C.List_gRj, false); - }, - _Uri__makePath: function(path, start, end, pathSegments, scheme, hasAuthority) { - var t1, isFile, ensureLeadingSlash, t2, result; - t1 = P.String; - H.assertSubtype(pathSegments, "$isIterable", [t1], "$asIterable"); - isFile = scheme === "file"; - ensureLeadingSlash = isFile || hasAuthority; - t2 = path == null; - if (t2 && pathSegments == null) - return isFile ? "/" : ""; - t2 = !t2; - if (t2 && pathSegments != null) - throw H.wrapException(P.ArgumentError$("Both path and pathSegments specified")); - if (t2) - result = P._Uri__normalizeOrSubstring(path, start, end, C.List_qg4, true); - else { - pathSegments.toString; - t2 = H.getTypeArgumentByIndex(pathSegments, 0); - result = new H.MappedListIterable(pathSegments, H.functionTypeCheck(new P._Uri__makePath_closure(), {func: 1, ret: t1, args: [t2]}), [t2, t1]).join$1(0, "/"); - } + return A._Uri__normalizeOrSubstring(userInfo, start, end, B.List_gRj, false); + }, + _Uri__makePath(path, start, end, pathSegments, scheme, hasAuthority) { + var t1, result, + isFile = scheme === "file", + ensureLeadingSlash = isFile || hasAuthority; + if (path == null) { + if (pathSegments == null) + return isFile ? "/" : ""; + t1 = A._arrayInstanceType(pathSegments); + result = new A.MappedListIterable(pathSegments, t1._eval$1("String(1)")._as(new A._Uri__makePath_closure()), t1._eval$1("MappedListIterable<1,String>")).join$1(0, "/"); + } else if (pathSegments != null) + throw A.wrapException(A.ArgumentError$("Both path and pathSegments specified", null)); + else + result = A._Uri__normalizeOrSubstring(path, start, end, B.List_qg4, true); if (result.length === 0) { if (isFile) return "/"; - } else if (ensureLeadingSlash && !C.JSString_methods.startsWith$1(result, "/")) + } else if (ensureLeadingSlash && !B.JSString_methods.startsWith$1(result, "/")) result = "/" + result; - return P._Uri__normalizePath(result, scheme, hasAuthority); + return A._Uri__normalizePath(result, scheme, hasAuthority); }, - _Uri__normalizePath: function(path, scheme, hasAuthority) { + _Uri__normalizePath(path, scheme, hasAuthority) { var t1 = scheme.length === 0; - if (t1 && !hasAuthority && !C.JSString_methods.startsWith$1(path, "/")) - return P._Uri__normalizeRelativePath(path, !t1 || hasAuthority); - return P._Uri__removeDotSegments(path); + if (t1 && !hasAuthority && !B.JSString_methods.startsWith$1(path, "/")) + return A._Uri__normalizeRelativePath(path, !t1 || hasAuthority); + return A._Uri__removeDotSegments(path); }, - _Uri__makeQuery: function(query, start, end, queryParameters) { + _Uri__makeQuery(query, start, end, queryParameters) { if (query != null) - return P._Uri__normalizeOrSubstring(query, start, end, C.List_CVk, true); - return; + return A._Uri__normalizeOrSubstring(query, start, end, B.List_CVk, true); + return null; }, - _Uri__makeFragment: function(fragment, start, end) { + _Uri__makeFragment(fragment, start, end) { if (fragment == null) - return; - return P._Uri__normalizeOrSubstring(fragment, start, end, C.List_CVk, true); + return null; + return A._Uri__normalizeOrSubstring(fragment, start, end, B.List_CVk, true); }, - _Uri__normalizeEscape: function(source, index, lowerCase) { - var t1, firstDigit, secondDigit, firstDigitValue, secondDigitValue, value; - if (typeof index !== "number") - return index.$add(); - t1 = index + 2; + _Uri__normalizeEscape(source, index, lowerCase) { + var firstDigit, secondDigit, firstDigitValue, secondDigitValue, value, + t1 = index + 2; if (t1 >= source.length) return "%"; - firstDigit = J.getInterceptor$s(source).codeUnitAt$1(source, index + 1); - secondDigit = C.JSString_methods.codeUnitAt$1(source, t1); - firstDigitValue = H.hexDigitValue(firstDigit); - secondDigitValue = H.hexDigitValue(secondDigit); + firstDigit = B.JSString_methods.codeUnitAt$1(source, index + 1); + secondDigit = B.JSString_methods.codeUnitAt$1(source, t1); + firstDigitValue = A.hexDigitValue(firstDigit); + secondDigitValue = A.hexDigitValue(secondDigit); if (firstDigitValue < 0 || secondDigitValue < 0) return "%"; value = firstDigitValue * 16 + secondDigitValue; if (value < 127) { - t1 = C.JSInt_methods._shrOtherPositive$1(value, 4); - if (t1 >= 8) - return H.ioore(C.List_nxB, t1); - t1 = (C.List_nxB[t1] & 1 << (value & 15)) !== 0; + t1 = B.JSInt_methods._shrOtherPositive$1(value, 4); + if (!(t1 < 8)) + return A.ioore(B.List_nxB, t1); + t1 = (B.List_nxB[t1] & 1 << (value & 15)) !== 0; } else t1 = false; if (t1) - return H.Primitives_stringFromCharCode(lowerCase && 65 <= value && 90 >= value ? (value | 32) >>> 0 : value); + return A.Primitives_stringFromCharCode(lowerCase && 65 <= value && 90 >= value ? (value | 32) >>> 0 : value); if (firstDigit >= 97 || secondDigit >= 97) - return C.JSString_methods.substring$2(source, index, index + 3).toUpperCase(); - return; + return B.JSString_methods.substring$2(source, index, index + 3).toUpperCase(); + return null; }, - _Uri__escapeChar: function(char) { - var t1, codeUnits, flag, encodedBytes, index, byte; + _Uri__escapeChar(char) { + var codeUnits, flag, encodedBytes, t1, index, byte, t2, t3, + _s16_ = "0123456789ABCDEF"; if (char < 128) { - t1 = new Array(3); - t1.fixed$length = Array; - codeUnits = H.setRuntimeTypeInfo(t1, [P.int]); - C.JSArray_methods.$indexSet(codeUnits, 0, 37); - C.JSArray_methods.$indexSet(codeUnits, 1, C.JSString_methods._codeUnitAt$1("0123456789ABCDEF", char >>> 4)); - C.JSArray_methods.$indexSet(codeUnits, 2, C.JSString_methods._codeUnitAt$1("0123456789ABCDEF", char & 15)); + codeUnits = new Uint8Array(3); + codeUnits[0] = 37; + codeUnits[1] = B.JSString_methods._codeUnitAt$1(_s16_, char >>> 4); + codeUnits[2] = B.JSString_methods._codeUnitAt$1(_s16_, char & 15); } else { if (char > 2047) if (char > 65535) { @@ -4853,167 +5449,163 @@ flag = 192; encodedBytes = 2; } - t1 = new Array(3 * encodedBytes); - t1.fixed$length = Array; - codeUnits = H.setRuntimeTypeInfo(t1, [P.int]); + t1 = 3 * encodedBytes; + codeUnits = new Uint8Array(t1); for (index = 0; --encodedBytes, encodedBytes >= 0; flag = 128) { - byte = C.JSInt_methods._shrReceiverPositive$1(char, 6 * encodedBytes) & 63 | flag; - C.JSArray_methods.$indexSet(codeUnits, index, 37); - C.JSArray_methods.$indexSet(codeUnits, index + 1, C.JSString_methods._codeUnitAt$1("0123456789ABCDEF", byte >>> 4)); - C.JSArray_methods.$indexSet(codeUnits, index + 2, C.JSString_methods._codeUnitAt$1("0123456789ABCDEF", byte & 15)); + byte = B.JSInt_methods._shrReceiverPositive$1(char, 6 * encodedBytes) & 63 | flag; + if (!(index < t1)) + return A.ioore(codeUnits, index); + codeUnits[index] = 37; + t2 = index + 1; + t3 = B.JSString_methods._codeUnitAt$1(_s16_, byte >>> 4); + if (!(t2 < t1)) + return A.ioore(codeUnits, t2); + codeUnits[t2] = t3; + t3 = index + 2; + t2 = B.JSString_methods._codeUnitAt$1(_s16_, byte & 15); + if (!(t3 < t1)) + return A.ioore(codeUnits, t3); + codeUnits[t3] = t2; index += 3; } } - return P.String_String$fromCharCodes(codeUnits, 0, null); - }, - _Uri__normalizeOrSubstring: function(component, start, end, charTable, escapeDelimiters) { - var t1 = P._Uri__normalize(component, start, end, H.assertSubtype(charTable, "$isList", [P.int], "$asList"), escapeDelimiters); - return t1 == null ? J.substring$2$s(component, start, end) : t1; - }, - _Uri__normalize: function(component, start, end, charTable, escapeDelimiters) { - var t1, t2, index, sectionStart, buffer, char, t3, replacement, sourceLength, tail; - H.assertSubtype(charTable, "$isList", [P.int], "$asList"); - t1 = !escapeDelimiters; - t2 = J.getInterceptor$s(component); - index = start; - sectionStart = index; - buffer = null; - while (true) { - if (typeof index !== "number") - return index.$lt(); - if (typeof end !== "number") - return H.iae(end); - if (!(index < end)) - break; - c$0: { - char = t2.codeUnitAt$1(component, index); - if (char < 127) { - t3 = char >>> 4; - if (t3 >= 8) - return H.ioore(charTable, t3); - t3 = (charTable[t3] & 1 << (char & 15)) !== 0; - } else - t3 = false; - if (t3) - ++index; - else { - if (char === 37) { - replacement = P._Uri__normalizeEscape(component, index, false); - if (replacement == null) { - index += 3; - break c$0; - } - if ("%" === replacement) { - replacement = "%25"; - sourceLength = 1; + return A.String_String$fromCharCodes(codeUnits, 0, null); + }, + _Uri__normalizeOrSubstring(component, start, end, charTable, escapeDelimiters) { + var t1 = A._Uri__normalize(component, start, end, charTable, escapeDelimiters); + return t1 == null ? B.JSString_methods.substring$2(component, start, end) : t1; + }, + _Uri__normalize(component, start, end, charTable, escapeDelimiters) { + var t1, index, sectionStart, buffer, char, t2, replacement, sourceLength, tail, t3, _null = null; + for (t1 = !escapeDelimiters, index = start, sectionStart = index, buffer = _null; index < end;) { + char = B.JSString_methods.codeUnitAt$1(component, index); + if (char < 127) { + t2 = char >>> 4; + if (!(t2 < 8)) + return A.ioore(charTable, t2); + t2 = (charTable[t2] & 1 << (char & 15)) !== 0; + } else + t2 = false; + if (t2) + ++index; + else { + if (char === 37) { + replacement = A._Uri__normalizeEscape(component, index, false); + if (replacement == null) { + index += 3; + continue; + } + if ("%" === replacement) { + replacement = "%25"; + sourceLength = 1; + } else + sourceLength = 3; + } else { + if (t1) + if (char <= 93) { + t2 = char >>> 4; + if (!(t2 < 8)) + return A.ioore(B.List_2Vk, t2); + t2 = (B.List_2Vk[t2] & 1 << (char & 15)) !== 0; } else - sourceLength = 3; + t2 = false; + else + t2 = false; + if (t2) { + A._Uri__fail(component, index, "Invalid character"); + sourceLength = _null; + replacement = sourceLength; } else { - if (t1) - if (char <= 93) { - t3 = char >>> 4; - if (t3 >= 8) - return H.ioore(C.List_2Vk, t3); - t3 = (C.List_2Vk[t3] & 1 << (char & 15)) !== 0; - } else - t3 = false; - else - t3 = false; - if (t3) { - P._Uri__fail(component, index, "Invalid character"); - replacement = null; - sourceLength = null; - } else { - if ((char & 64512) === 55296) { - t3 = index + 1; - if (t3 < end) { - tail = C.JSString_methods.codeUnitAt$1(component, t3); - if ((tail & 64512) === 56320) { - char = 65536 | (char & 1023) << 10 | tail & 1023; - sourceLength = 2; - } else - sourceLength = 1; + if ((char & 64512) === 55296) { + t2 = index + 1; + if (t2 < end) { + tail = B.JSString_methods.codeUnitAt$1(component, t2); + if ((tail & 64512) === 56320) { + char = (char & 1023) << 10 | tail & 1023 | 65536; + sourceLength = 2; } else sourceLength = 1; } else sourceLength = 1; - replacement = P._Uri__escapeChar(char); - } + } else + sourceLength = 1; + replacement = A._Uri__escapeChar(char); } - if (buffer == null) - buffer = new P.StringBuffer(""); - buffer._contents += C.JSString_methods.substring$2(component, sectionStart, index); - buffer._contents += H.S(replacement); - if (typeof sourceLength !== "number") - return H.iae(sourceLength); - index += sourceLength; - sectionStart = index; } + if (buffer == null) { + buffer = new A.StringBuffer(""); + t2 = buffer; + } else + t2 = buffer; + t3 = t2._contents += B.JSString_methods.substring$2(component, sectionStart, index); + t2._contents = t3 + A.S(replacement); + if (typeof sourceLength !== "number") + return A.iae(sourceLength); + index += sourceLength; + sectionStart = index; } } if (buffer == null) - return; - if (typeof sectionStart !== "number") - return sectionStart.$lt(); + return _null; if (sectionStart < end) - buffer._contents += t2.substring$2(component, sectionStart, end); + buffer._contents += B.JSString_methods.substring$2(component, sectionStart, end); t1 = buffer._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - _Uri__mayContainDotSegments: function(path) { - if (J.getInterceptor$s(path).startsWith$1(path, ".")) + _Uri__mayContainDotSegments(path) { + if (B.JSString_methods.startsWith$1(path, ".")) return true; - return C.JSString_methods.indexOf$1(path, "/.") !== -1; + return B.JSString_methods.indexOf$1(path, "/.") !== -1; }, - _Uri__removeDotSegments: function(path) { + _Uri__removeDotSegments(path) { var output, t1, t2, appendSlash, _i, segment, t3; - if (!P._Uri__mayContainDotSegments(path)) + if (!A._Uri__mayContainDotSegments(path)) return path; - output = H.setRuntimeTypeInfo([], [P.String]); + output = A._setArrayType([], type$.JSArray_String); for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { segment = t1[_i]; if (J.$eq$(segment, "..")) { t3 = output.length; if (t3 !== 0) { if (0 >= t3) - return H.ioore(output, -1); + return A.ioore(output, -1); output.pop(); if (output.length === 0) - C.JSArray_methods.add$1(output, ""); + B.JSArray_methods.add$1(output, ""); } appendSlash = true; } else if ("." === segment) appendSlash = true; else { - C.JSArray_methods.add$1(output, segment); + B.JSArray_methods.add$1(output, segment); appendSlash = false; } } if (appendSlash) - C.JSArray_methods.add$1(output, ""); - return C.JSArray_methods.join$1(output, "/"); + B.JSArray_methods.add$1(output, ""); + return B.JSArray_methods.join$1(output, "/"); }, - _Uri__normalizeRelativePath: function(path, allowScheme) { + _Uri__normalizeRelativePath(path, allowScheme) { var output, t1, t2, appendSlash, _i, segment; - if (!P._Uri__mayContainDotSegments(path)) - return !allowScheme ? P._Uri__escapeScheme(path) : path; - output = H.setRuntimeTypeInfo([], [P.String]); + if (!A._Uri__mayContainDotSegments(path)) + return !allowScheme ? A._Uri__escapeScheme(path) : path; + output = A._setArrayType([], type$.JSArray_String); for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { segment = t1[_i]; if (".." === segment) - if (output.length !== 0 && C.JSArray_methods.get$last(output) !== "..") { + if (output.length !== 0 && B.JSArray_methods.get$last(output) !== "..") { if (0 >= output.length) - return H.ioore(output, -1); + return A.ioore(output, -1); output.pop(); appendSlash = true; } else { - C.JSArray_methods.add$1(output, ".."); + B.JSArray_methods.add$1(output, ".."); appendSlash = false; } else if ("." === segment) appendSlash = true; else { - C.JSArray_methods.add$1(output, segment); + B.JSArray_methods.add$1(output, segment); appendSlash = false; } } @@ -5021,7 +5613,7 @@ if (t1 !== 0) if (t1 === 1) { if (0 >= t1) - return H.ioore(output, 0); + return A.ioore(output, 0); t1 = output[0].length === 0; } else t1 = false; @@ -5029,28 +5621,28 @@ t1 = true; if (t1) return "./"; - if (appendSlash || C.JSArray_methods.get$last(output) === "..") - C.JSArray_methods.add$1(output, ""); + if (appendSlash || B.JSArray_methods.get$last(output) === "..") + B.JSArray_methods.add$1(output, ""); if (!allowScheme) { if (0 >= output.length) - return H.ioore(output, 0); - C.JSArray_methods.$indexSet(output, 0, P._Uri__escapeScheme(output[0])); + return A.ioore(output, 0); + B.JSArray_methods.$indexSet(output, 0, A._Uri__escapeScheme(output[0])); } - return C.JSArray_methods.join$1(output, "/"); + return B.JSArray_methods.join$1(output, "/"); }, - _Uri__escapeScheme: function(path) { - var t1, i, char, t2; - t1 = path.length; - if (t1 >= 2 && P._Uri__isAlphabeticCharacter(J._codeUnitAt$1$s(path, 0))) + _Uri__escapeScheme(path) { + var i, char, t2, + t1 = path.length; + if (t1 >= 2 && A._Uri__isAlphabeticCharacter(B.JSString_methods._codeUnitAt$1(path, 0))) for (i = 1; i < t1; ++i) { - char = C.JSString_methods._codeUnitAt$1(path, i); + char = B.JSString_methods._codeUnitAt$1(path, i); if (char === 58) - return C.JSString_methods.substring$2(path, 0, i) + "%3A" + C.JSString_methods.substring$1(path, i + 1); + return B.JSString_methods.substring$2(path, 0, i) + "%3A" + B.JSString_methods.substring$1(path, i + 1); if (char <= 127) { t2 = char >>> 4; - if (t2 >= 8) - return H.ioore(C.List_JYB, t2); - t2 = (C.List_JYB[t2] & 1 << (char & 15)) === 0; + if (!(t2 < 8)) + return A.ioore(B.List_JYB, t2); + t2 = (B.List_JYB[t2] & 1 << (char & 15)) === 0; } else t2 = true; if (t2) @@ -5058,34 +5650,39 @@ } return path; }, - _Uri__toWindowsFilePath: function(uri) { - var segments, t1, hasDriveLetter, t2, host; - segments = uri.get$pathSegments(); - t1 = segments.length; + _Uri__packageNameEnd(uri, path) { + if (uri.isScheme$1("package") && uri._host == null) + return A._skipPackageNameChars(path, 0, path.length); + return -1; + }, + _Uri__toWindowsFilePath(uri) { + var hasDriveLetter, t2, host, + segments = uri.get$pathSegments(), + t1 = segments.length; if (t1 > 0 && J.get$length$asx(segments[0]) === 2 && J.codeUnitAt$1$s(segments[0], 1) === 58) { if (0 >= t1) - return H.ioore(segments, 0); - P._Uri__checkWindowsDriveLetter(J.codeUnitAt$1$s(segments[0], 0), false); - P._Uri__checkWindowsPathReservedCharacters(segments, false, 1); + return A.ioore(segments, 0); + A._Uri__checkWindowsDriveLetter(J.codeUnitAt$1$s(segments[0], 0), false); + A._Uri__checkWindowsPathReservedCharacters(segments, false, 1); hasDriveLetter = true; } else { - P._Uri__checkWindowsPathReservedCharacters(segments, false, 0); + A._Uri__checkWindowsPathReservedCharacters(segments, false, 0); hasDriveLetter = false; } - t2 = uri.get$hasAbsolutePath() && !hasDriveLetter ? "\\" : ""; + t2 = uri.get$hasAbsolutePath() && !hasDriveLetter ? "" + "\\" : ""; if (uri.get$hasAuthority()) { host = uri.get$host(uri); if (host.length !== 0) - t2 = t2 + "\\" + H.S(host) + "\\"; + t2 = t2 + "\\" + host + "\\"; } - t2 = P.StringBuffer__writeAll(t2, segments, "\\"); + t2 = A.StringBuffer__writeAll(t2, segments, "\\"); t1 = hasDriveLetter && t1 === 1 ? t2 + "\\" : t2; return t1.charCodeAt(0) == 0 ? t1 : t1; }, - _Uri__hexCharPairToByte: function(s, pos) { - var t1, byte, i, charCode; - for (t1 = J.getInterceptor$s(s), byte = 0, i = 0; i < 2; ++i) { - charCode = t1._codeUnitAt$1(s, pos + i); + _Uri__hexCharPairToByte(s, pos) { + var byte, i, charCode; + for (byte = 0, i = 0; i < 2; ++i) { + charCode = B.JSString_methods._codeUnitAt$1(s, pos + i); if (48 <= charCode && charCode <= 57) byte = byte * 16 + charCode - 48; else { @@ -5093,84 +5690,83 @@ if (97 <= charCode && charCode <= 102) byte = byte * 16 + charCode - 87; else - throw H.wrapException(P.ArgumentError$("Invalid URL encoding")); + throw A.wrapException(A.ArgumentError$("Invalid URL encoding", null)); } } return byte; }, - _Uri__uriDecode: function(text, start, end, encoding, plusToSpace) { - var simple, t1, i, codeUnit, t2, bytes; - t1 = J.getInterceptor$s(text); - i = start; + _Uri__uriDecode(text, start, end, encoding, plusToSpace) { + var simple, codeUnit, t1, bytes, + i = start; while (true) { if (!(i < end)) { simple = true; break; } - codeUnit = t1._codeUnitAt$1(text, i); + codeUnit = B.JSString_methods._codeUnitAt$1(text, i); if (codeUnit <= 127) if (codeUnit !== 37) - t2 = plusToSpace && codeUnit === 43; + t1 = plusToSpace && codeUnit === 43; else - t2 = true; + t1 = true; else - t2 = true; - if (t2) { + t1 = true; + if (t1) { simple = false; break; } ++i; } if (simple) { - if (C.Utf8Codec_false !== encoding) - t2 = false; + if (B.C_Utf8Codec !== encoding) + t1 = false; else - t2 = true; - if (t2) - return t1.substring$2(text, start, end); + t1 = true; + if (t1) + return B.JSString_methods.substring$2(text, start, end); else - bytes = new H.CodeUnits(t1.substring$2(text, start, end)); + bytes = new A.CodeUnits(B.JSString_methods.substring$2(text, start, end)); } else { - bytes = H.setRuntimeTypeInfo([], [P.int]); - for (i = start; i < end; ++i) { - codeUnit = t1._codeUnitAt$1(text, i); + bytes = A._setArrayType([], type$.JSArray_int); + for (t1 = text.length, i = start; i < end; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(text, i); if (codeUnit > 127) - throw H.wrapException(P.ArgumentError$("Illegal percent encoding in URI")); + throw A.wrapException(A.ArgumentError$("Illegal percent encoding in URI", null)); if (codeUnit === 37) { - if (i + 3 > text.length) - throw H.wrapException(P.ArgumentError$("Truncated URI")); - C.JSArray_methods.add$1(bytes, P._Uri__hexCharPairToByte(text, i + 1)); + if (i + 3 > t1) + throw A.wrapException(A.ArgumentError$("Truncated URI", null)); + B.JSArray_methods.add$1(bytes, A._Uri__hexCharPairToByte(text, i + 1)); i += 2; } else if (plusToSpace && codeUnit === 43) - C.JSArray_methods.add$1(bytes, 32); + B.JSArray_methods.add$1(bytes, 32); else - C.JSArray_methods.add$1(bytes, codeUnit); + B.JSArray_methods.add$1(bytes, codeUnit); } } - H.assertSubtype(bytes, "$isList", [P.int], "$asList"); - return new P.Utf8Decoder(false).convert$1(bytes); + type$.List_int._as(bytes); + return B.Utf8Decoder_false.convert$1(bytes); }, - _Uri__isAlphabeticCharacter: function(codeUnit) { + _Uri__isAlphabeticCharacter(codeUnit) { var lowerCase = codeUnit | 32; return 97 <= lowerCase && lowerCase <= 122; }, - UriData__writeUri: function(mimeType, charsetName, parameters, buffer, indices) { + UriData__writeUri(mimeType, charsetName, parameters, buffer, indices) { var slashIndex, t1; if (true) buffer._contents = buffer._contents; else { - slashIndex = P.UriData__validateMimeType(""); + slashIndex = A.UriData__validateMimeType(""); if (slashIndex < 0) - throw H.wrapException(P.ArgumentError$value("", "mimeType", "Invalid MIME type")); - t1 = buffer._contents += H.S(P._Uri__uriEncode(C.List_qFt, C.JSString_methods.substring$2("", 0, slashIndex), C.Utf8Codec_false, false)); + throw A.wrapException(A.ArgumentError$value("", "mimeType", "Invalid MIME type")); + t1 = buffer._contents += A._Uri__uriEncode(B.List_qFt, B.JSString_methods.substring$2("", 0, slashIndex), B.C_Utf8Codec, false); buffer._contents = t1 + "/"; - buffer._contents += H.S(P._Uri__uriEncode(C.List_qFt, C.JSString_methods.substring$1("", slashIndex + 1), C.Utf8Codec_false, false)); + buffer._contents += A._Uri__uriEncode(B.List_qFt, B.JSString_methods.substring$1("", slashIndex + 1), B.C_Utf8Codec, false); } }, - UriData__validateMimeType: function(mimeType) { + UriData__validateMimeType(mimeType) { var t1, slashIndex, i; for (t1 = mimeType.length, slashIndex = -1, i = 0; i < t1; ++i) { - if (C.JSString_methods._codeUnitAt$1(mimeType, i) !== 47) + if (B.JSString_methods._codeUnitAt$1(mimeType, i) !== 47) continue; if (slashIndex < 0) { slashIndex = i; @@ -5180,11 +5776,12 @@ } return slashIndex; }, - UriData__parse: function(text, start, sourceUri) { - var indices, t1, i, slashIndex, char, equalsIndex, lastSeparator, t2, data; - indices = H.setRuntimeTypeInfo([start - 1], [P.int]); + UriData__parse(text, start, sourceUri) { + var t1, i, slashIndex, char, equalsIndex, lastSeparator, t2, data, + _s17_ = "Invalid MIME type", + indices = A._setArrayType([start - 1], type$.JSArray_int); for (t1 = text.length, i = start, slashIndex = -1, char = null; i < t1; ++i) { - char = C.JSString_methods._codeUnitAt$1(text, i); + char = B.JSString_methods._codeUnitAt$1(text, i); if (char === 44 || char === 59) break; if (char === 47) { @@ -5192,16 +5789,16 @@ slashIndex = i; continue; } - throw H.wrapException(P.FormatException$("Invalid MIME type", text, i)); + throw A.wrapException(A.FormatException$(_s17_, text, i)); } } if (slashIndex < 0 && i > start) - throw H.wrapException(P.FormatException$("Invalid MIME type", text, i)); + throw A.wrapException(A.FormatException$(_s17_, text, i)); for (; char !== 44;) { - C.JSArray_methods.add$1(indices, i); + B.JSArray_methods.add$1(indices, i); ++i; for (equalsIndex = -1; i < t1; ++i) { - char = C.JSString_methods._codeUnitAt$1(text, i); + char = B.JSString_methods._codeUnitAt$1(text, i); if (char === 61) { if (equalsIndex < 0) equalsIndex = i; @@ -5209,660 +5806,1195 @@ break; } if (equalsIndex >= 0) - C.JSArray_methods.add$1(indices, equalsIndex); + B.JSArray_methods.add$1(indices, equalsIndex); else { - lastSeparator = C.JSArray_methods.get$last(indices); - if (char !== 44 || i !== lastSeparator + 7 || !C.JSString_methods.startsWith$2(text, "base64", lastSeparator + 1)) - throw H.wrapException(P.FormatException$("Expecting '='", text, i)); + lastSeparator = B.JSArray_methods.get$last(indices); + if (char !== 44 || i !== lastSeparator + 7 || !B.JSString_methods.startsWith$2(text, "base64", lastSeparator + 1)) + throw A.wrapException(A.FormatException$("Expecting '='", text, i)); break; } } - C.JSArray_methods.add$1(indices, i); + B.JSArray_methods.add$1(indices, i); t2 = i + 1; if ((indices.length & 1) === 1) - text = C.Base64Codec_Base64Encoder_false.normalize$3(text, t2, t1); + text = B.C_Base64Codec.normalize$3(text, t2, t1); else { - data = P._Uri__normalize(text, t2, t1, C.List_CVk, true); + data = A._Uri__normalize(text, t2, t1, B.List_CVk, true); if (data != null) - text = C.JSString_methods.replaceRange$3(text, t2, t1, data); + text = B.JSString_methods.replaceRange$3(text, t2, t1, data); + } + return new A.UriData(text, indices, sourceUri); + }, + UriData__uriEncodeBytes(canonicalTable, bytes, buffer) { + var t1, byteOr, i, byte, t2, t3, + _s16_ = "0123456789ABCDEF"; + for (t1 = J.getInterceptor$asx(bytes), byteOr = 0, i = 0; i < t1.get$length(bytes); ++i) { + byte = t1.$index(bytes, i); + byteOr |= byte; + if (byte < 128) { + t2 = B.JSInt_methods._shrOtherPositive$1(byte, 4); + if (!(t2 < 8)) + return A.ioore(canonicalTable, t2); + t2 = (canonicalTable[t2] & 1 << (byte & 15)) !== 0; + } else + t2 = false; + t3 = buffer._contents; + if (t2) + buffer._contents = t3 + A.Primitives_stringFromCharCode(byte); + else { + t2 = t3 + A.Primitives_stringFromCharCode(37); + buffer._contents = t2; + t2 += A.Primitives_stringFromCharCode(B.JSString_methods._codeUnitAt$1(_s16_, B.JSInt_methods._shrOtherPositive$1(byte, 4))); + buffer._contents = t2; + buffer._contents = t2 + A.Primitives_stringFromCharCode(B.JSString_methods._codeUnitAt$1(_s16_, byte & 15)); + } + } + if ((byteOr & 4294967040) >>> 0 !== 0) + for (i = 0; i < t1.get$length(bytes); ++i) { + byte = t1.$index(bytes, i); + if (byte < 0 || byte > 255) + throw A.wrapException(A.ArgumentError$value(byte, "non-byte value", null)); + } + }, + _createTables() { + var _i, t1, t2, t3, t4, t5, + _s77_ = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", + _s1_ = ".", _s1_0 = ":", _s1_1 = "/", _s1_2 = "?", _s1_3 = "#", + tables = A._setArrayType(new Array(22), type$.JSArray_Uint8List); + for (_i = 0; _i < 22; ++_i) + tables[_i] = new Uint8Array(96); + t1 = new A._createTables_build(tables); + t2 = new A._createTables_setChars(); + t3 = new A._createTables_setRange(); + t4 = type$.Uint8List; + t5 = t4._as(t1.call$2(0, 225)); + t2.call$3(t5, _s77_, 1); + t2.call$3(t5, _s1_, 14); + t2.call$3(t5, _s1_0, 34); + t2.call$3(t5, _s1_1, 3); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(14, 225)); + t2.call$3(t5, _s77_, 1); + t2.call$3(t5, _s1_, 15); + t2.call$3(t5, _s1_0, 34); + t2.call$3(t5, _s1_1, 234); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(15, 225)); + t2.call$3(t5, _s77_, 1); + t2.call$3(t5, "%", 225); + t2.call$3(t5, _s1_0, 34); + t2.call$3(t5, _s1_1, 9); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(1, 225)); + t2.call$3(t5, _s77_, 1); + t2.call$3(t5, _s1_0, 34); + t2.call$3(t5, _s1_1, 10); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(2, 235)); + t2.call$3(t5, _s77_, 139); + t2.call$3(t5, _s1_1, 131); + t2.call$3(t5, _s1_, 146); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(3, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_1, 68); + t2.call$3(t5, _s1_, 18); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(4, 229)); + t2.call$3(t5, _s77_, 5); + t3.call$3(t5, "AZ", 229); + t2.call$3(t5, _s1_0, 102); + t2.call$3(t5, "@", 68); + t2.call$3(t5, "[", 232); + t2.call$3(t5, _s1_1, 138); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(5, 229)); + t2.call$3(t5, _s77_, 5); + t3.call$3(t5, "AZ", 229); + t2.call$3(t5, _s1_0, 102); + t2.call$3(t5, "@", 68); + t2.call$3(t5, _s1_1, 138); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(6, 231)); + t3.call$3(t5, "19", 7); + t2.call$3(t5, "@", 68); + t2.call$3(t5, _s1_1, 138); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(7, 231)); + t3.call$3(t5, "09", 7); + t2.call$3(t5, "@", 68); + t2.call$3(t5, _s1_1, 138); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t2.call$3(t4._as(t1.call$2(8, 8)), "]", 5); + t5 = t4._as(t1.call$2(9, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_, 16); + t2.call$3(t5, _s1_1, 234); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(16, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_, 17); + t2.call$3(t5, _s1_1, 234); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(17, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_1, 9); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(10, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_, 18); + t2.call$3(t5, _s1_1, 234); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(18, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_, 19); + t2.call$3(t5, _s1_1, 234); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(19, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_1, 234); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(11, 235)); + t2.call$3(t5, _s77_, 11); + t2.call$3(t5, _s1_1, 10); + t2.call$3(t5, _s1_2, 172); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(12, 236)); + t2.call$3(t5, _s77_, 12); + t2.call$3(t5, _s1_2, 12); + t2.call$3(t5, _s1_3, 205); + t5 = t4._as(t1.call$2(13, 237)); + t2.call$3(t5, _s77_, 13); + t2.call$3(t5, _s1_2, 13); + t3.call$3(t4._as(t1.call$2(20, 245)), "az", 21); + t1 = t4._as(t1.call$2(21, 245)); + t3.call$3(t1, "az", 21); + t3.call$3(t1, "09", 21); + t2.call$3(t1, "+-.", 21); + return tables; + }, + _scan(uri, start, end, state, indices) { + var i, table, char, transition, + tables = $.$get$_scannerTables(); + for (i = start; i < end; ++i) { + if (!(state >= 0 && state < tables.length)) + return A.ioore(tables, state); + table = tables[state]; + char = B.JSString_methods._codeUnitAt$1(uri, i) ^ 96; + transition = table[char > 95 ? 31 : char]; + state = transition & 31; + B.JSArray_methods.$indexSet(indices, transition >>> 5, i); + } + return state; + }, + _SimpleUri__packageNameEnd(uri) { + if (uri._schemeEnd === 7 && B.JSString_methods.startsWith$1(uri._uri, "package") && uri._hostStart <= 0) + return A._skipPackageNameChars(uri._uri, uri._pathStart, uri._queryStart); + return -1; + }, + _skipPackageNameChars(source, start, end) { + var i, dots, char; + for (i = start, dots = 0; i < end; ++i) { + char = B.JSString_methods.codeUnitAt$1(source, i); + if (char === 47) + return dots !== 0 ? i : -1; + if (char === 37 || char === 58) + return -1; + dots |= char ^ 46; + } + return -1; + }, + _caseInsensitiveCompareStart(prefix, string, start) { + var t1, result, i, prefixChar, stringChar, delta, lowerChar; + for (t1 = prefix.length, result = 0, i = 0; i < t1; ++i) { + prefixChar = B.JSString_methods._codeUnitAt$1(prefix, i); + stringChar = B.JSString_methods._codeUnitAt$1(string, start + i); + delta = prefixChar ^ stringChar; + if (delta !== 0) { + if (delta === 32) { + lowerChar = stringChar | delta; + if (97 <= lowerChar && lowerChar <= 122) { + result = 32; + continue; + } + } + return -1; + } } - return new P.UriData(text, indices, sourceUri); + return result; + }, + NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { + this._box_0 = t0; + this.sb = t1; + }, + DateTime: function DateTime(t0, t1) { + this._value = t0; + this.isUtc = t1; + }, + Duration: function Duration(t0) { + this._duration = t0; + }, + Error: function Error() { + }, + AssertionError: function AssertionError(t0) { + this.message = t0; + }, + TypeError: function TypeError() { + }, + NullThrownError: function NullThrownError() { + }, + ArgumentError: function ArgumentError(t0, t1, t2, t3) { + var _ = this; + _._hasValue = t0; + _.invalidValue = t1; + _.name = t2; + _.message = t3; + }, + RangeError: function RangeError(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.start = t0; + _.end = t1; + _._hasValue = t2; + _.invalidValue = t3; + _.name = t4; + _.message = t5; + }, + IndexError: function IndexError(t0, t1, t2, t3, t4) { + var _ = this; + _.length = t0; + _._hasValue = t1; + _.invalidValue = t2; + _.name = t3; + _.message = t4; + }, + NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { + var _ = this; + _._core$_receiver = t0; + _._core$_memberName = t1; + _._core$_arguments = t2; + _._namedArguments = t3; + }, + UnsupportedError: function UnsupportedError(t0) { + this.message = t0; + }, + UnimplementedError: function UnimplementedError(t0) { + this.message = t0; + }, + StateError: function StateError(t0) { + this.message = t0; + }, + ConcurrentModificationError: function ConcurrentModificationError(t0) { + this.modifiedObject = t0; + }, + OutOfMemoryError: function OutOfMemoryError() { + }, + StackOverflowError: function StackOverflowError() { + }, + CyclicInitializationError: function CyclicInitializationError(t0) { + this.variableName = t0; + }, + _Exception: function _Exception(t0) { + this.message = t0; + }, + FormatException: function FormatException(t0, t1, t2) { + this.message = t0; + this.source = t1; + this.offset = t2; + }, + Iterable: function Iterable() { + }, + Iterator: function Iterator() { + }, + Null: function Null() { + }, + Object: function Object() { + }, + _StringStackTrace: function _StringStackTrace(t0) { + this._stackTrace = t0; + }, + StringBuffer: function StringBuffer(t0) { + this._contents = t0; + }, + Uri_splitQueryString_closure: function Uri_splitQueryString_closure(t0) { + this.encoding = t0; + }, + Uri__parseIPv4Address_error: function Uri__parseIPv4Address_error(t0) { + this.host = t0; + }, + Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { + this.host = t0; + }, + Uri_parseIPv6Address_parseHex: function Uri_parseIPv6Address_parseHex(t0, t1) { + this.error = t0; + this.host = t1; + }, + _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_queryParameters = _.___Uri_hashCode = _.___Uri_pathSegments = _.___Uri__text = $; + }, + _Uri__makePath_closure: function _Uri__makePath_closure() { + }, + UriData: function UriData(t0, t1, t2) { + this._text = t0; + this._separatorIndices = t1; + this._uriCache = t2; + }, + _createTables_build: function _createTables_build(t0) { + this.tables = t0; + }, + _createTables_setChars: function _createTables_setChars() { + }, + _createTables_setRange: function _createTables_setRange() { + }, + _SimpleUri: function _SimpleUri(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._uri = t0; + _._schemeEnd = t1; + _._hostStart = t2; + _._portStart = t3; + _._pathStart = t4; + _._queryStart = t5; + _._fragmentStart = t6; + _._schemeCache = t7; + _._hashCodeCache = null; + }, + _DataUri: function _DataUri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_queryParameters = _.___Uri_hashCode = _.___Uri_pathSegments = _.___Uri__text = $; + }, + window() { + return window; + }, + WebSocket_WebSocket(url) { + return new WebSocket(url); + }, + _EventStreamSubscription$(_target, _eventType, onData, _useCapture, $T) { + var t1 = onData == null ? null : A._wrapZone(new A._EventStreamSubscription_closure(onData), type$.Event); + t1 = new A._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>")); + t1._tryResume$0(); + return t1; + }, + _convertNativeToDart_Window(win) { + return A._DOMWindowCrossFrame__createSafe(win); + }, + _DOMWindowCrossFrame__createSafe(w) { + if (w === window) + return type$.WindowBase._as(w); + else + return new A._DOMWindowCrossFrame(w); + }, + _wrapZone(callback, $T) { + var t1 = $.Zone__current; + if (t1 === B.C__RootZone) + return callback; + return t1.bindUnaryCallbackGuarded$1$1(callback, $T); + }, + HtmlElement: function HtmlElement() { + }, + AnchorElement: function AnchorElement() { + }, + AreaElement: function AreaElement() { + }, + Blob: function Blob() { + }, + CharacterData: function CharacterData() { + }, + DomException: function DomException() { + }, + DomTokenList: function DomTokenList() { + }, + Element: function Element() { + }, + Event: function Event() { + }, + EventTarget: function EventTarget() { + }, + File: function File() { + }, + FormElement: function FormElement() { + }, + HtmlCollection: function HtmlCollection() { + }, + IFrameElement: function IFrameElement() { + }, + Location: function Location() { + }, + MessageEvent: function MessageEvent() { + }, + MessagePort: function MessagePort() { + }, + MouseEvent: function MouseEvent() { + }, + Node: function Node() { + }, + SelectElement: function SelectElement() { + }, + UIEvent: function UIEvent() { + }, + Window: function Window() { + }, + EventStreamProvider: function EventStreamProvider(t0, t1) { + this._eventType = t0; + this.$ti = t1; + }, + _EventStream: function _EventStream(t0, t1, t2, t3) { + var _ = this; + _._target = t0; + _._eventType = t1; + _._useCapture = t2; + _.$ti = t3; + }, + _ElementEventStreamImpl: function _ElementEventStreamImpl(t0, t1, t2, t3) { + var _ = this; + _._target = t0; + _._eventType = t1; + _._useCapture = t2; + _.$ti = t3; + }, + _EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) { + var _ = this; + _._pauseCount = 0; + _._target = t0; + _._eventType = t1; + _._onData = t2; + _._useCapture = t3; + _.$ti = t4; + }, + _EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) { + this.onData = t0; }, - UriData__uriEncodeBytes: function(canonicalTable, bytes, buffer) { - var t1, byteOr, i, byte, t2; - t1 = [P.int]; - H.assertSubtype(canonicalTable, "$isList", t1, "$asList"); - H.assertSubtype(bytes, "$isList", t1, "$asList"); - for (t1 = J.getInterceptor$asx(bytes), byteOr = 0, i = 0; i < t1.get$length(bytes); ++i) { - byte = t1.$index(bytes, i); - if (typeof byte !== "number") - return H.iae(byte); - byteOr |= byte; - if (byte < 128) { - t2 = C.JSInt_methods._shrOtherPositive$1(byte, 4); - if (t2 >= 8) - return H.ioore(canonicalTable, t2); - t2 = (canonicalTable[t2] & 1 << (byte & 15)) !== 0; - } else - t2 = false; - if (t2) - buffer._contents += H.Primitives_stringFromCharCode(byte); - else { - buffer._contents += H.Primitives_stringFromCharCode(37); - buffer._contents += H.Primitives_stringFromCharCode(C.JSString_methods._codeUnitAt$1("0123456789ABCDEF", C.JSInt_methods._shrOtherPositive$1(byte, 4))); - buffer._contents += H.Primitives_stringFromCharCode(C.JSString_methods._codeUnitAt$1("0123456789ABCDEF", byte & 15)); - } - } - if ((byteOr & 4294967040) >>> 0 !== 0) - for (i = 0; i < t1.get$length(bytes); ++i) { - byte = t1.$index(bytes, i); - if (typeof byte !== "number") - return byte.$lt(); - if (byte < 0 || byte > 255) - throw H.wrapException(P.ArgumentError$value(byte, "non-byte value", null)); - } + _EventStreamSubscription_onData_closure: function _EventStreamSubscription_onData_closure(t0) { + this.handleData = t0; }, - _createTables: function() { - var tables, t1, t2, t3, b; - tables = P.List_List$generate(22, new P._createTables_closure(), true, P.Uint8List); - t1 = new P._createTables_build(tables); - t2 = new P._createTables_setChars(); - t3 = new P._createTables_setRange(); - b = H.interceptedTypeCheck(t1.call$2(0, 225), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 1); - t2.call$3(b, ".", 14); - t2.call$3(b, ":", 34); - t2.call$3(b, "/", 3); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(14, 225), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 1); - t2.call$3(b, ".", 15); - t2.call$3(b, ":", 34); - t2.call$3(b, "/", 234); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(15, 225), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 1); - t2.call$3(b, "%", 225); - t2.call$3(b, ":", 34); - t2.call$3(b, "/", 9); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(1, 225), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 1); - t2.call$3(b, ":", 34); - t2.call$3(b, "/", 10); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(2, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 139); - t2.call$3(b, "/", 131); - t2.call$3(b, ".", 146); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(3, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, "/", 68); - t2.call$3(b, ".", 18); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(4, 229), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 5); - t3.call$3(b, "AZ", 229); - t2.call$3(b, ":", 102); - t2.call$3(b, "@", 68); - t2.call$3(b, "[", 232); - t2.call$3(b, "/", 138); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(5, 229), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 5); - t3.call$3(b, "AZ", 229); - t2.call$3(b, ":", 102); - t2.call$3(b, "@", 68); - t2.call$3(b, "/", 138); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(6, 231), "$isUint8List"); - t3.call$3(b, "19", 7); - t2.call$3(b, "@", 68); - t2.call$3(b, "/", 138); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(7, 231), "$isUint8List"); - t3.call$3(b, "09", 7); - t2.call$3(b, "@", 68); - t2.call$3(b, "/", 138); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - t2.call$3(H.interceptedTypeCheck(t1.call$2(8, 8), "$isUint8List"), "]", 5); - b = H.interceptedTypeCheck(t1.call$2(9, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, ".", 16); - t2.call$3(b, "/", 234); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(16, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, ".", 17); - t2.call$3(b, "/", 234); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(17, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, "/", 9); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(10, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, ".", 18); - t2.call$3(b, "/", 234); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(18, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, ".", 19); - t2.call$3(b, "/", 234); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(19, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, "/", 234); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(11, 235), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 11); - t2.call$3(b, "/", 10); - t2.call$3(b, "?", 172); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(12, 236), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 12); - t2.call$3(b, "?", 12); - t2.call$3(b, "#", 205); - b = H.interceptedTypeCheck(t1.call$2(13, 237), "$isUint8List"); - t2.call$3(b, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=", 13); - t2.call$3(b, "?", 13); - t3.call$3(H.interceptedTypeCheck(t1.call$2(20, 245), "$isUint8List"), "az", 21); - b = H.interceptedTypeCheck(t1.call$2(21, 245), "$isUint8List"); - t3.call$3(b, "az", 21); - t3.call$3(b, "09", 21); - t2.call$3(b, "+-.", 21); - return tables; + ImmutableListMixin: function ImmutableListMixin() { }, - _scan: function(uri, start, end, state, indices) { - var tables, t1, i, table, char, transition; - H.assertSubtype(indices, "$isList", [P.int], "$asList"); - tables = $.$get$_scannerTables(); - if (typeof end !== "number") - return H.iae(end); - t1 = J.getInterceptor$s(uri); - i = start; - for (; i < end; ++i) { - if (state < 0 || state >= tables.length) - return H.ioore(tables, state); - table = tables[state]; - char = t1._codeUnitAt$1(uri, i) ^ 96; - if (char > 95) - char = 31; - if (char >= table.length) - return H.ioore(table, char); - transition = table[char]; - state = transition & 31; - C.JSArray_methods.$indexSet(indices, transition >>> 5, i); - } - return state; + FixedSizeListIterator: function FixedSizeListIterator(t0, t1, t2) { + var _ = this; + _._array = t0; + _._length = t1; + _._position = -1; + _._current = null; + _.$ti = t2; }, - NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { + _DOMWindowCrossFrame: function _DOMWindowCrossFrame(t0) { + this._window = t0; + }, + _HtmlCollection_JavaScriptObject_ListMixin: function _HtmlCollection_JavaScriptObject_ListMixin() { + }, + _HtmlCollection_JavaScriptObject_ListMixin_ImmutableListMixin: function _HtmlCollection_JavaScriptObject_ListMixin_ImmutableListMixin() { + }, + _StructuredClone: function _StructuredClone() { + }, + _StructuredClone_walk_closure: function _StructuredClone_walk_closure(t0, t1) { this._box_0 = t0; - this.sb = t1; + this.$this = t1; }, - bool: function bool() { + _StructuredClone_walk_closure0: function _StructuredClone_walk_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; }, - DateTime: function DateTime(t0, t1) { - this._core$_value = t0; - this.isUtc = t1; + _AcceptStructuredClone: function _AcceptStructuredClone() { }, - double: function double() { + _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; }, - Duration: function Duration(t0) { - this._duration = t0; + _StructuredCloneDart2Js: function _StructuredCloneDart2Js(t0, t1) { + this.values = t0; + this.copies = t1; }, - Duration_toString_sixDigits: function Duration_toString_sixDigits() { + _AcceptStructuredCloneDart2Js: function _AcceptStructuredCloneDart2Js(t0, t1) { + this.values = t0; + this.copies = t1; + this.mustCopy = false; }, - Duration_toString_twoDigits: function Duration_toString_twoDigits() { + promiseToFuture(jsPromise, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new A._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); + jsPromise.then(A.convertDartClosureToJS(new A.promiseToFuture_closure(completer, $T), 1), A.convertDartClosureToJS(new A.promiseToFuture_closure0(completer), 1)); + return t1; }, - Error: function Error() { + NullRejectionException: function NullRejectionException(t0) { + this.isUndefined = t0; }, - NullThrownError: function NullThrownError() { + promiseToFuture_closure: function promiseToFuture_closure(t0, t1) { + this.completer = t0; + this.T = t1; }, - ArgumentError: function ArgumentError(t0, t1, t2, t3) { - var _ = this; - _._hasValue = t0; - _.invalidValue = t1; - _.name = t2; - _.message = t3; + promiseToFuture_closure0: function promiseToFuture_closure0(t0) { + this.completer = t0; }, - RangeError: function RangeError(t0, t1, t2, t3, t4, t5) { - var _ = this; - _.start = t0; - _.end = t1; - _._hasValue = t2; - _.invalidValue = t3; - _.name = t4; - _.message = t5; + SvgElement: function SvgElement() { }, - IndexError: function IndexError(t0, t1, t2, t3, t4) { + NullStreamSink: function NullStreamSink(t0, t1) { var _ = this; - _.length = t0; - _._hasValue = t1; - _.invalidValue = t2; - _.name = t3; - _.message = t4; + _.done = t0; + _._addingStream = _._null_stream_sink$_closed = false; + _.$ti = t1; }, - NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3, t4) { - var _ = this; - _._core$_receiver = t0; - _._core$_memberName = t1; - _._core$_arguments = t2; - _._namedArguments = t3; - _._existingArgumentNames = t4; + NullStreamSink_addStream_closure: function NullStreamSink_addStream_closure(t0) { + this.$this = t0; }, - UnsupportedError: function UnsupportedError(t0) { - this.message = t0; + Context_Context(style) { + var current = style == null ? A.current() : "."; + if (style == null) + style = $.$get$Style_platform(); + return new A.Context(type$.InternalStyle._as(style), current); }, - UnimplementedError: function UnimplementedError(t0) { - this.message = t0; + _parseUri(uri) { + return uri; }, - StateError: function StateError(t0) { - this.message = t0; + _validateArgList(method, args) { + var numArgs, i, numArgs0, message, t1, t2, t3, t4; + for (numArgs = args.length, i = 1; i < numArgs; ++i) { + if (args[i] == null || args[i - 1] != null) + continue; + for (; numArgs >= 1; numArgs = numArgs0) { + numArgs0 = numArgs - 1; + if (args[numArgs0] != null) + break; + } + message = new A.StringBuffer(""); + t1 = "" + (method + "("); + message._contents = t1; + t2 = A._arrayInstanceType(args); + t3 = t2._eval$1("SubListIterable<1>"); + t4 = new A.SubListIterable(args, 0, numArgs, t3); + t4.SubListIterable$3(args, 0, numArgs, t2._precomputed1); + t3 = t1 + new A.MappedListIterable(t4, t3._eval$1("String(ListIterable.E)")._as(new A._validateArgList_closure()), t3._eval$1("MappedListIterable")).join$1(0, ", "); + message._contents = t3; + message._contents = t3 + ("): part " + (i - 1) + " was null, but part " + i + " was not."); + throw A.wrapException(A.ArgumentError$(message.toString$0(0), null)); + } }, - ConcurrentModificationError: function ConcurrentModificationError(t0) { - this.modifiedObject = t0; + Context: function Context(t0, t1) { + this.style = t0; + this._context$_current = t1; }, - OutOfMemoryError: function OutOfMemoryError() { + Context_joinAll_closure: function Context_joinAll_closure() { }, - StackOverflowError: function StackOverflowError() { + Context_split_closure: function Context_split_closure() { }, - CyclicInitializationError: function CyclicInitializationError(t0) { - this.variableName = t0; + _validateArgList_closure: function _validateArgList_closure() { }, - _Exception: function _Exception(t0) { - this.message = t0; + InternalStyle: function InternalStyle() { }, - FormatException: function FormatException(t0, t1, t2) { + ParsedPath_ParsedPath$parse(path, style) { + var t1, parts, separators, start, i, + root = style.getRoot$1(path); + style.isRootRelative$1(path); + if (root != null) + path = B.JSString_methods.substring$1(path, root.length); + t1 = type$.JSArray_String; + parts = A._setArrayType([], t1); + separators = A._setArrayType([], t1); + t1 = path.length; + if (t1 !== 0 && style.isSeparator$1(B.JSString_methods._codeUnitAt$1(path, 0))) { + if (0 >= t1) + return A.ioore(path, 0); + B.JSArray_methods.add$1(separators, path[0]); + start = 1; + } else { + B.JSArray_methods.add$1(separators, ""); + start = 0; + } + for (i = start; i < t1; ++i) + if (style.isSeparator$1(B.JSString_methods._codeUnitAt$1(path, i))) { + B.JSArray_methods.add$1(parts, B.JSString_methods.substring$2(path, start, i)); + B.JSArray_methods.add$1(separators, path[i]); + start = i + 1; + } + if (start < t1) { + B.JSArray_methods.add$1(parts, B.JSString_methods.substring$1(path, start)); + B.JSArray_methods.add$1(separators, ""); + } + return new A.ParsedPath(style, root, parts, separators); + }, + ParsedPath: function ParsedPath(t0, t1, t2, t3) { + var _ = this; + _.style = t0; + _.root = t1; + _.parts = t2; + _.separators = t3; + }, + PathException$(message) { + return new A.PathException(message); + }, + PathException: function PathException(t0) { this.message = t0; - this.source = t1; - this.offset = t2; }, - Function: function Function() { + Style__getPlatformStyle() { + if (A.Uri_base().get$scheme() !== "file") + return $.$get$Style_url(); + var t1 = A.Uri_base(); + if (!B.JSString_methods.endsWith$1(t1.get$path(t1), "/")) + return $.$get$Style_url(); + if (A._Uri__Uri(null, "a/b", null, null).toFilePath$0() === "a\\b") + return $.$get$Style_windows(); + return $.$get$Style_posix(); + }, + Style: function Style() { }, - int: function int() { + PosixStyle: function PosixStyle(t0, t1, t2) { + this.separatorPattern = t0; + this.needsSeparatorPattern = t1; + this.rootPattern = t2; }, - Iterable: function Iterable() { + UrlStyle: function UrlStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; }, - Iterator: function Iterator() { + WindowsStyle: function WindowsStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; + }, + WindowsStyle_absolutePathToUri_closure: function WindowsStyle_absolutePathToUri_closure() { + }, + Chain_Chain$parse(chain) { + var t1, t2, + _s51_ = string$.______; + if (chain.length === 0) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([], type$.JSArray_Trace), type$.Trace)); + t1 = $.$get$vmChainGap(); + if (B.JSString_methods.contains$1(chain, t1)) { + t1 = B.JSString_methods.split$1(chain, t1); + t2 = A._arrayInstanceType(t1); + return new A.Chain(A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(t1, t2._eval$1("bool(1)")._as(new A.Chain_Chain$parse_closure()), t2._eval$1("WhereIterable<1>")), t2._eval$1("Trace(1)")._as(new A.Chain_Chain$parse_closure0()), t2._eval$1("MappedIterable<1,Trace>")), type$.Trace)); + } + if (!B.JSString_methods.contains$1(chain, _s51_)) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([A.Trace_Trace$parse(chain)], type$.JSArray_Trace), type$.Trace)); + return new A.Chain(A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(chain.split(_s51_), type$.JSArray_String), type$.Trace_Function_String._as(new A.Chain_Chain$parse_closure1()), type$.MappedListIterable_String_Trace), type$.Trace)); }, - List: function List() { + Chain: function Chain(t0) { + this.traces = t0; }, - Map: function Map() { + Chain_Chain$parse_closure: function Chain_Chain$parse_closure() { }, - Null: function Null() { + Chain_Chain$parse_closure0: function Chain_Chain$parse_closure0() { }, - num: function num() { + Chain_Chain$parse_closure1: function Chain_Chain$parse_closure1() { }, - Object: function Object() { + Chain_toTrace_closure: function Chain_toTrace_closure() { }, - Match: function Match() { + Chain_toString_closure0: function Chain_toString_closure0() { }, - StackTrace: function StackTrace() { + Chain_toString__closure0: function Chain_toString__closure0() { }, - _StringStackTrace: function _StringStackTrace(t0) { - this._stackTrace = t0; + Chain_toString_closure: function Chain_toString_closure(t0) { + this.longest = t0; }, - String: function String() { + Chain_toString__closure: function Chain_toString__closure(t0) { + this.longest = t0; }, - StringBuffer: function StringBuffer(t0) { - this._contents = t0; + Frame_Frame$parseVM(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseVM_closure(frame)); }, - Symbol0: function Symbol0() { + Frame_Frame$parseV8(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseV8_closure(frame)); }, - Uri_splitQueryString_closure: function Uri_splitQueryString_closure(t0) { - this.encoding = t0; + Frame_Frame$_parseFirefoxEval(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$_parseFirefoxEval_closure(frame)); }, - Uri__parseIPv4Address_error: function Uri__parseIPv4Address_error(t0) { - this.host = t0; + Frame_Frame$parseFirefox(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFirefox_closure(frame)); }, - Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { - this.host = t0; + Frame_Frame$parseFriendly(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFriendly_closure(frame)); }, - Uri_parseIPv6Address_parseHex: function Uri_parseIPv6Address_parseHex(t0, t1) { - this.error = t0; - this.host = t1; + Frame__uriOrPathToUri(uriOrPath) { + if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__uriRegExp())) + return A.Uri_parse(uriOrPath); + else if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__windowsRegExp())) + return A._Uri__Uri$file(uriOrPath, true); + else if (B.JSString_methods.startsWith$1(uriOrPath, "/")) + return A._Uri__Uri$file(uriOrPath, false); + if (B.JSString_methods.contains$1(uriOrPath, "\\")) + return $.$get$windows().toUri$1(uriOrPath); + return A.Uri_parse(uriOrPath); }, - _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { + Frame__catchFormatException(text, body) { + var t1, exception; + try { + t1 = body.call$0(); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FormatException) + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), text); + else + throw exception; + } + }, + Frame: function Frame(t0, t1, t2, t3) { var _ = this; - _.scheme = t0; - _._userInfo = t1; - _._host = t2; - _._port = t3; - _.path = t4; - _._query = t5; - _._fragment = t6; - _._queryParameters = _._hashCodeCache = _._text = _._pathSegments = null; + _.uri = t0; + _.line = t1; + _.column = t2; + _.member = t3; }, - _Uri__Uri$notSimple_closure: function _Uri__Uri$notSimple_closure(t0, t1) { - this.uri = t0; - this.portStart = t1; + Frame_Frame$parseVM_closure: function Frame_Frame$parseVM_closure(t0) { + this.frame = t0; }, - _Uri__checkNonWindowsPathReservedCharacters_closure: function _Uri__checkNonWindowsPathReservedCharacters_closure(t0) { - this.argumentError = t0; + Frame_Frame$parseV8_closure: function Frame_Frame$parseV8_closure(t0) { + this.frame = t0; }, - _Uri__makePath_closure: function _Uri__makePath_closure() { + Frame_Frame$parseV8_closure_parseLocation: function Frame_Frame$parseV8_closure_parseLocation(t0) { + this.frame = t0; }, - UriData: function UriData(t0, t1, t2) { - this._text = t0; - this._separatorIndices = t1; - this._uriCache = t2; + Frame_Frame$_parseFirefoxEval_closure: function Frame_Frame$_parseFirefoxEval_closure(t0) { + this.frame = t0; }, - _createTables_closure: function _createTables_closure() { + Frame_Frame$parseFirefox_closure: function Frame_Frame$parseFirefox_closure(t0) { + this.frame = t0; }, - _createTables_build: function _createTables_build(t0) { - this.tables = t0; + Frame_Frame$parseFriendly_closure: function Frame_Frame$parseFriendly_closure(t0) { + this.frame = t0; + }, + LazyTrace: function LazyTrace(t0) { + this._thunk = t0; + this.__LazyTrace__trace = $; + }, + LazyTrace_terse_closure: function LazyTrace_terse_closure(t0) { + this.$this = t0; + }, + Trace_Trace$from(trace) { + if (type$.Trace._is(trace)) + return trace; + if (trace instanceof A.Chain) + return trace.toTrace$0(); + return new A.LazyTrace(new A.Trace_Trace$from_closure(trace)); + }, + Trace_Trace$parse(trace) { + var error, t1, exception; + try { + if (trace.length === 0) { + t1 = A.Trace$(A._setArrayType([], type$.JSArray_Frame), null); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_v8Trace())) { + t1 = A.Trace$parseV8(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, "\tat ")) { + t1 = A.Trace$parseJSCore(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_firefoxSafariTrace()) || B.JSString_methods.contains$1(trace, $.$get$_firefoxEvalTrace())) { + t1 = A.Trace$parseFirefox(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, string$.______)) { + t1 = A.Chain_Chain$parse(trace).toTrace$0(); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_friendlyTrace())) { + t1 = A.Trace$parseFriendly(trace); + return t1; + } + t1 = A.Trace$parseVM(trace); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.FormatException) { + error = t1; + throw A.wrapException(A.FormatException$(error.message + "\nStack trace:\n" + trace, null, null)); + } else + throw exception; + } }, - _createTables_setChars: function _createTables_setChars() { + Trace$parseVM(trace) { + var t1 = A.List_List$unmodifiable(A.Trace__parseVM(trace), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace__parseVM(trace) { + var $frames, + t1 = B.JSString_methods.trim$0(trace), + t2 = type$.Pattern._as($.$get$vmChainGap()), + t3 = type$.WhereIterable_String, + lines = new A.WhereIterable(A._setArrayType(A.stringReplaceAllUnchecked(t1, t2, "").split("\n"), type$.JSArray_String), type$.bool_Function_String._as(new A.Trace__parseVM_closure()), t3); + if (!lines.get$iterator(lines).moveNext$0()) + return A._setArrayType([], type$.JSArray_Frame); + t1 = A.TakeIterable_TakeIterable(lines, lines.get$length(lines) - 1, t3._eval$1("Iterable.E")); + t2 = A._instanceType(t1); + t2 = A.MappedIterable_MappedIterable(t1, t2._eval$1("Frame(Iterable.E)")._as(new A.Trace__parseVM_closure0()), t2._eval$1("Iterable.E"), type$.Frame); + $frames = A.List_List$of(t2, true, A._instanceType(t2)._eval$1("Iterable.E")); + if (!J.endsWith$1$s(lines.get$last(lines), ".da")) + B.JSArray_methods.add$1($frames, A.Frame_Frame$parseVM(lines.get$last(lines))); + return $frames; }, - _createTables_setRange: function _createTables_setRange() { + Trace$parseV8(trace) { + var t2, t3, + t1 = A.SubListIterable$(A._setArrayType(trace.split("\n"), type$.JSArray_String), 1, null, type$.String); + t1 = t1.super$Iterable$skipWhile(0, t1.$ti._eval$1("bool(ListIterable.E)")._as(new A.Trace$parseV8_closure())); + t2 = type$.Frame; + t3 = t1.$ti; + t2 = A.List_List$unmodifiable(A.MappedIterable_MappedIterable(t1, t3._eval$1("Frame(Iterable.E)")._as(new A.Trace$parseV8_closure0()), t3._eval$1("Iterable.E"), t2), t2); + return new A.Trace(t2, new A._StringStackTrace(trace)); }, - _SimpleUri: function _SimpleUri(t0, t1, t2, t3, t4, t5, t6, t7) { - var _ = this; - _._uri = t0; - _._schemeEnd = t1; - _._hostStart = t2; - _._portStart = t3; - _._pathStart = t4; - _._queryStart = t5; - _._fragmentStart = t6; - _._schemeCache = t7; - _._hashCodeCache = null; + Trace$parseJSCore(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(trace.split("\n"), type$.JSArray_String), type$.bool_Function_String._as(new A.Trace$parseJSCore_closure()), type$.WhereIterable_String), type$.Frame_Function_String._as(new A.Trace$parseJSCore_closure0()), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); }, - _DataUri: function _DataUri(t0, t1, t2, t3, t4, t5, t6) { - var _ = this; - _.scheme = t0; - _._userInfo = t1; - _._host = t2; - _._port = t3; - _.path = t4; - _._query = t5; - _._fragment = t6; - _._queryParameters = _._hashCodeCache = _._text = _._pathSegments = null; + Trace$parseFirefox(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), type$.bool_Function_String._as(new A.Trace$parseFirefox_closure()), type$.WhereIterable_String), type$.Frame_Function_String._as(new A.Trace$parseFirefox_closure0()), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); }, - convertNativePromiseToDartFuture: function(promise) { - var t1, completer; - t1 = new P._Future(0, $.Zone__current, [null]); - completer = new P._AsyncCompleter(t1, [null]); - promise.then(H.convertDartClosureToJS(new P.convertNativePromiseToDartFuture_closure(completer), 1))["catch"](H.convertDartClosureToJS(new P.convertNativePromiseToDartFuture_closure0(completer), 1)); - return t1; + Trace$parseFriendly(trace) { + var t1 = trace.length === 0 ? A._setArrayType([], type$.JSArray_Frame) : new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), type$.bool_Function_String._as(new A.Trace$parseFriendly_closure()), type$.WhereIterable_String), type$.Frame_Function_String._as(new A.Trace$parseFriendly_closure0()), type$.MappedIterable_String_Frame); + t1 = A.List_List$unmodifiable(t1, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); }, - _StructuredClone: function _StructuredClone() { + Trace$($frames, original) { + var t1 = A.List_List$unmodifiable($frames, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(original == null ? "" : original)); }, - _StructuredClone_walk_closure: function _StructuredClone_walk_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; + Trace: function Trace(t0, t1) { + this.frames = t0; + this.original = t1; }, - _AcceptStructuredClone: function _AcceptStructuredClone() { + Trace_Trace$from_closure: function Trace_Trace$from_closure(t0) { + this.trace = t0; }, - _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; + Trace__parseVM_closure: function Trace__parseVM_closure() { }, - _StructuredCloneDart2Js: function _StructuredCloneDart2Js(t0, t1) { - this.values = t0; - this.copies = t1; + Trace__parseVM_closure0: function Trace__parseVM_closure0() { }, - _AcceptStructuredCloneDart2Js: function _AcceptStructuredCloneDart2Js(t0, t1) { - this.values = t0; - this.copies = t1; - this.mustCopy = false; + Trace$parseV8_closure: function Trace$parseV8_closure() { }, - convertNativePromiseToDartFuture_closure: function convertNativePromiseToDartFuture_closure(t0) { - this.completer = t0; + Trace$parseV8_closure0: function Trace$parseV8_closure0() { }, - convertNativePromiseToDartFuture_closure0: function convertNativePromiseToDartFuture_closure0(t0) { - this.completer = t0; + Trace$parseJSCore_closure: function Trace$parseJSCore_closure() { }, - SvgElement: function SvgElement() { + Trace$parseJSCore_closure0: function Trace$parseJSCore_closure0() { }, - Uint8List: function Uint8List() { + Trace$parseFirefox_closure: function Trace$parseFirefox_closure() { }, - _convertDartFunctionFast: function(f) { - var existing, ret; - existing = f.$dart_jsFunction; - if (existing != null) - return existing; - ret = function(_call, f) { - return function() { - return _call(f, Array.prototype.slice.apply(arguments)); - }; - }(P._callDartFunctionFast, f); - ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; - f.$dart_jsFunction = ret; - return ret; + Trace$parseFirefox_closure0: function Trace$parseFirefox_closure0() { }, - _callDartFunctionFast: function(callback, $arguments) { - H.listTypeCheck($arguments); - H.interceptedTypeCheck(callback, "$isFunction"); - return H.Primitives_applyFunction(callback, $arguments, null); + Trace$parseFriendly_closure: function Trace$parseFriendly_closure() { }, - allowInterop: function(f, $F) { - H.assertIsSubtype($F, P.Function, "The type argument '", "' is not a subtype of the type variable bound '", "' of type variable 'F' in 'allowInterop'."); - H.assertSubtypeOfRuntimeType(f, $F); - if (typeof f == "function") - return f; - else - return H.assertSubtypeOfRuntimeType(P._convertDartFunctionFast(f), $F); + Trace$parseFriendly_closure0: function Trace$parseFriendly_closure0() { }, - max: function(a, b, $T) { - H.assertIsSubtype($T, P.num, "The type argument '", "' is not a subtype of the type variable bound '", "' of type variable 'T' in 'max'."); - H.assertSubtypeOfRuntimeType(a, $T); - H.assertSubtypeOfRuntimeType(b, $T); - return Math.max(H.checkNum(a), H.checkNum(b)); - } - }, - W = { - window: function() { - return window; + Trace_terse_closure: function Trace_terse_closure() { }, - WebSocket_WebSocket: function(url) { - return new WebSocket(url); + Trace_foldFrames_closure: function Trace_foldFrames_closure(t0) { + this.oldPredicate = t0; }, - _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) { - var t1 = onData == null ? null : W._wrapZone(new W._EventStreamSubscription_closure(onData), W.Event); - t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, [$T]); - t1._tryResume$0(); - return t1; + Trace_foldFrames_closure0: function Trace_foldFrames_closure0(t0) { + this._box_0 = t0; }, - _convertNativeToDart_Window: function(win) { - if (win == null) - return; - return W._DOMWindowCrossFrame__createSafe(win); + Trace_toString_closure0: function Trace_toString_closure0() { }, - _DOMWindowCrossFrame__createSafe: function(w) { - if (w === window) - return H.interceptedTypeCheck(w, "$isWindowBase"); - else - return new W._DOMWindowCrossFrame(w); + Trace_toString_closure: function Trace_toString_closure(t0) { + this.longest = t0; }, - _wrapZone: function(callback, $T) { - var t1; - H.functionTypeCheck(callback, {func: 1, ret: -1, args: [$T]}); - t1 = $.Zone__current; - if (t1 === C.C__RootZone) - return callback; - return t1.bindUnaryCallbackGuarded$1$1(callback, $T); + UnparsedFrame: function UnparsedFrame(t0, t1) { + this.uri = t0; + this.member = t1; }, - HtmlElement: function HtmlElement() { + GuaranteeChannel$(innerStream, innerSink, allowSinkErrors, $T) { + var t2, t1 = {}; + t1.innerStream = innerStream; + t2 = new A.GuaranteeChannel($T._eval$1("GuaranteeChannel<0>")); + t2.GuaranteeChannel$3$allowSinkErrors(innerSink, true, t1, $T); + return t2; }, - AnchorElement: function AnchorElement() { + GuaranteeChannel: function GuaranteeChannel(t0) { + var _ = this; + _.__GuaranteeChannel__streamController = _.__GuaranteeChannel__sink = $; + _._subscription = null; + _._disconnected = false; + _.$ti = t0; }, - AreaElement: function AreaElement() { + GuaranteeChannel_closure: function GuaranteeChannel_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.T = t2; }, - Blob: function Blob() { + GuaranteeChannel__closure: function GuaranteeChannel__closure(t0) { + this.$this = t0; }, - CharacterData: function CharacterData() { + _GuaranteeSink: function _GuaranteeSink(t0, t1, t2, t3, t4) { + var _ = this; + _._inner = t0; + _._channel = t1; + _._doneCompleter = t2; + _._closed = _._disconnected = false; + _._addStreamCompleter = _._addStreamSubscription = null; + _._allowErrors = t3; + _.$ti = t4; }, - DomException: function DomException() { + _GuaranteeSink_addStream_closure: function _GuaranteeSink_addStream_closure(t0) { + this.$this = t0; }, - DomTokenList: function DomTokenList() { + _MultiChannel$(inner, $T) { + var t1 = type$.int; + t1 = new A._MultiChannel(inner, A.StreamChannelController$(true, $T), A.LinkedHashMap_LinkedHashMap$_empty(t1, $T._eval$1("StreamChannelController<0>")), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashSet_LinkedHashSet$_empty(t1), $T._eval$1("_MultiChannel<0>")); + t1._MultiChannel$1(inner, $T); + return t1; }, - Element: function Element() { + _MultiChannel: function _MultiChannel(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._multi_channel$_inner = t0; + _._innerStreamSubscription = null; + _._mainController = t1; + _._controllers = t2; + _._pendingIds = t3; + _._closedIds = t4; + _._nextId = 1; + _.$ti = t5; }, - Event: function Event() { + _MultiChannel_closure: function _MultiChannel_closure(t0, t1) { + this.$this = t0; + this.T = t1; }, - EventTarget: function EventTarget() { + _MultiChannel_closure0: function _MultiChannel_closure0(t0) { + this.$this = t0; }, - File: function File() { + _MultiChannel_closure1: function _MultiChannel_closure1(t0, t1) { + this.$this = t0; + this.T = t1; }, - FormElement: function FormElement() { + _MultiChannel__closure: function _MultiChannel__closure(t0, t1, t2) { + this.$this = t0; + this.id = t1; + this.T = t2; }, - HtmlCollection: function HtmlCollection() { + _MultiChannel_virtualChannel_closure: function _MultiChannel_virtualChannel_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; }, - IFrameElement: function IFrameElement() { + _MultiChannel_virtualChannel_closure0: function _MultiChannel_virtualChannel_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; }, - Location: function Location() { + VirtualChannel: function VirtualChannel(t0, t1, t2, t3) { + var _ = this; + _._parent = t0; + _.stream = t1; + _.sink = t2; + _.$ti = t3; }, - MessageEvent: function MessageEvent() { + StreamChannelController$(sync, $T) { + var _null = null, + t1 = new A.StreamChannelController($T._eval$1("StreamChannelController<0>")), + localToForeignController = A.StreamController_StreamController(_null, _null, true, $T), + foreignToLocalController = A.StreamController_StreamController(_null, _null, true, $T), + t2 = A._instanceType(foreignToLocalController), + t3 = A._instanceType(localToForeignController), + t4 = $T._eval$1("StreamChannel<0>"), + t5 = t4._as(A.GuaranteeChannel$(new A._ControllerStream(foreignToLocalController, t2._eval$1("_ControllerStream<1>")), new A._StreamSinkWrapper(localToForeignController, t3._eval$1("_StreamSinkWrapper<1>")), true, $T)); + A._lateWriteOnceCheck($, "_local"); + t1.set$__StreamChannelController__local(t5); + t2 = t4._as(A.GuaranteeChannel$(new A._ControllerStream(localToForeignController, t3._eval$1("_ControllerStream<1>")), new A._StreamSinkWrapper(foreignToLocalController, t2._eval$1("_StreamSinkWrapper<1>")), true, $T)); + A._lateWriteOnceCheck(t1.__StreamChannelController__foreign, "_foreign"); + t1.set$__StreamChannelController__foreign(t2); + return t1; }, - MessagePort: function MessagePort() { + StreamChannelController: function StreamChannelController(t0) { + this.__StreamChannelController__foreign = this.__StreamChannelController__local = $; + this.$ti = t0; }, - MouseEvent: function MouseEvent() { + StreamChannelMixin: function StreamChannelMixin() { }, - Node: function Node() { + main() { + var t1 = self.testRunner; + if (t1 != null) + J.waitUntilDone$0$x(t1); + if (J.$eq$($.$get$_currentUrl().get$queryParameters().$index(0, "debug"), "true")) + document.body.classList.add("debug"); + A.runZonedGuarded(new A.main_closure(), new A.main_closure0(), type$.Null); }, - SelectElement: function SelectElement() { + _connectToServer() { + var webSocket, controller, t2, + t1 = $.$get$_currentUrl().get$queryParameters().$index(0, "managerUrl"); + t1.toString; + webSocket = A.WebSocket_WebSocket(t1); + t1 = type$.dynamic; + controller = A.StreamChannelController$(true, t1); + t2 = type$.nullable_void_Function_MessageEvent._as(new A._connectToServer_closure(controller)); + type$.nullable_void_Function._as(null); + A._EventStreamSubscription$(webSocket, "message", t2, false, type$.MessageEvent); + t2 = A._lateReadCheck(A._lateReadCheck(controller.__StreamChannelController__local, "_local").__GuaranteeChannel__streamController, "_streamController"); + new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$1(new A._connectToServer_closure0(webSocket)); + return A._MultiChannel$(A._lateReadCheck(controller.__StreamChannelController__foreign, "_foreign"), t1); + }, + _connectToIframe(url, id) { + var channel, controller, readyCompleter, subscriptions, t2, t3, t4, + t1 = document, + iframe = t1.createElement("iframe"); + $._iframes.$indexSet(0, id, iframe); + B.IFrameElement_methods.set$src(iframe, url); + t1.body.appendChild(iframe); + channel = new MessageChannel(); + controller = A.StreamChannelController$(true, type$.dynamic); + readyCompleter = new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic); + subscriptions = A._setArrayType([], type$.JSArray_StreamSubscription_void); + $._subscriptions.$indexSet(0, id, subscriptions); + t1 = window; + t2 = type$.nullable_void_Function_MessageEvent; + t3 = t2._as(new A._connectToIframe_closure(iframe, channel, readyCompleter, controller)); + type$.nullable_void_Function._as(null); + t4 = type$.MessageEvent; + B.JSArray_methods.add$1(subscriptions, A._EventStreamSubscription$(t1, "message", t3, false, t4)); + B.JSArray_methods.add$1(subscriptions, A._EventStreamSubscription$(channel.port1, "message", t2._as(new A._connectToIframe_closure0(controller)), false, t4)); + t4 = A._lateReadCheck(A._lateReadCheck(controller.__StreamChannelController__local, "_local").__GuaranteeChannel__streamController, "_streamController"); + B.JSArray_methods.add$1(subscriptions, new A._ControllerStream(t4, A._instanceType(t4)._eval$1("_ControllerStream<1>")).listen$1(new A._connectToIframe_closure1(readyCompleter, channel))); + return A._lateReadCheck(controller.__StreamChannelController__foreign, "_foreign"); + }, + TestRunner: function TestRunner() { }, - UIEvent: function UIEvent() { + _JSApi: function _JSApi() { }, - Window: function Window() { + main_closure: function main_closure() { }, - _EventStream: function _EventStream(t0, t1, t2, t3) { - var _ = this; - _._html$_target = t0; - _._eventType = t1; - _._useCapture = t2; - _.$ti = t3; + main__closure: function main__closure(t0) { + this.serverChannel = t0; }, - _ElementEventStreamImpl: function _ElementEventStreamImpl(t0, t1, t2, t3) { - var _ = this; - _._html$_target = t0; - _._eventType = t1; - _._useCapture = t2; - _.$ti = t3; + main__closure0: function main__closure0(t0) { + this.serverChannel = t0; }, - _EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) { - var _ = this; - _._pauseCount = 0; - _._html$_target = t0; - _._eventType = t1; - _._onData = t2; - _._useCapture = t3; - _.$ti = t4; + main__closure1: function main__closure1(t0) { + this.serverChannel = t0; }, - _EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) { - this.onData = t0; + main__closure2: function main__closure2(t0) { + this.serverChannel = t0; }, - ImmutableListMixin: function ImmutableListMixin() { + main__closure3: function main__closure3(t0) { + this.serverChannel = t0; }, - FixedSizeListIterator: function FixedSizeListIterator(t0, t1, t2, t3) { - var _ = this; - _._array = t0; - _._length = t1; - _._position = t2; - _._current = null; - _.$ti = t3; + main_closure0: function main_closure0() { }, - _DOMWindowCrossFrame: function _DOMWindowCrossFrame(t0) { - this._window = t0; + _connectToServer_closure: function _connectToServer_closure(t0) { + this.controller = t0; }, - _HtmlCollection_Interceptor_ListMixin: function _HtmlCollection_Interceptor_ListMixin() { + _connectToServer_closure0: function _connectToServer_closure0(t0) { + this.webSocket = t0; }, - _HtmlCollection_Interceptor_ListMixin_ImmutableListMixin: function _HtmlCollection_Interceptor_ListMixin_ImmutableListMixin() { - } - }, - S = {NullStreamSink: function NullStreamSink(t0, t1) { + _connectToIframe_closure: function _connectToIframe_closure(t0, t1, t2, t3) { var _ = this; - _.done = t0; - _._addingStream = _._null_stream_sink$_closed = false; - _.$ti = t1; - }, NullStreamSink_addStream_closure: function NullStreamSink_addStream_closure(t0) { - this.$this = t0; - }}, - M = { - Context_Context: function(style) { - var current = style == null ? D.current() : "."; - if (style == null) - style = $.$get$Style_platform(); - return new M.Context(style, current); - }, - _parseUri: function(uri) { - if (!!J.getInterceptor$(uri).$isUri) - return uri; - throw H.wrapException(P.ArgumentError$value(uri, "uri", "Value must be a String or a Uri")); + _.iframe = t0; + _.channel = t1; + _.readyCompleter = t2; + _.controller = t3; }, - _validateArgList: function(method, args) { - var t1, numArgs, i, numArgs0, message, t2, t3, t4; - t1 = P.String; - H.assertSubtype(args, "$isList", [t1], "$asList"); - for (numArgs = args.length, i = 1; i < numArgs; ++i) { - if (args[i] == null || args[i - 1] != null) - continue; - for (; numArgs >= 1; numArgs = numArgs0) { - numArgs0 = numArgs - 1; - if (args[numArgs0] != null) - break; - } - message = new P.StringBuffer(""); - t2 = method + "("; - message._contents = t2; - t3 = H.SubListIterable$(args, 0, numArgs, H.getTypeArgumentByIndex(args, 0)); - t4 = H.getTypeArgumentByIndex(t3, 0); - t1 = t2 + new H.MappedListIterable(t3, H.functionTypeCheck(new M._validateArgList_closure(), {func: 1, ret: t1, args: [t4]}), [t4, t1]).join$1(0, ", "); - message._contents = t1; - message._contents = t1 + ("): part " + (i - 1) + " was null, but part " + i + " was not."); - throw H.wrapException(P.ArgumentError$(message.toString$0(0))); + _connectToIframe_closure0: function _connectToIframe_closure0(t0) { + this.controller = t0; + }, + _connectToIframe_closure1: function _connectToIframe_closure1(t0, t1) { + this.readyCompleter = t0; + this.channel = t1; + }, + printString(string) { + if (typeof dartPrint == "function") { + dartPrint(string); + return; + } + if (typeof console == "object" && typeof console.log != "undefined") { + console.log(string); + return; + } + if (typeof window == "object") + return; + if (typeof print == "function") { + print(string); + return; } + throw "Unable to print message: " + String(string); }, - Context: function Context(t0, t1) { - this.style = t0; - this._context$_current = t1; + _convertDartFunctionFast(f) { + var ret, + existing = f.$dart_jsFunction; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFast, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f.$dart_jsFunction = ret; + return ret; }, - Context_join_closure: function Context_join_closure() { + _callDartFunctionFast(callback, $arguments) { + type$.List_dynamic._as($arguments); + type$.Function._as(callback); + return A.Primitives_applyFunction(callback, $arguments, null); }, - Context_joinAll_closure: function Context_joinAll_closure() { + allowInterop(f, $F) { + if (typeof f == "function") + return f; + else + return $F._as(A._convertDartFunctionFast(f)); }, - Context_split_closure: function Context_split_closure() { + max(a, b, $T) { + A.checkTypeBound($T, type$.num, "T", "max"); + return Math.max($T._as(a), $T._as(b)); }, - _validateArgList_closure: function _validateArgList_closure() { - } - }, - B = {InternalStyle: function InternalStyle() { - }, - StreamChannelController$: function(sync, $T) { - var t1, localToForeignController, foreignToLocalController, t2, t3; - t1 = new B.StreamChannelController([$T]); - localToForeignController = P.StreamController_StreamController(null, null, true, $T); - foreignToLocalController = P.StreamController_StreamController(null, null, true, $T); - t2 = H.getTypeArgumentByIndex(foreignToLocalController, 0); - t3 = H.getTypeArgumentByIndex(localToForeignController, 0); - t1.set$_local(K.GuaranteeChannel$(new P._ControllerStream(foreignToLocalController, [t2]), new P._StreamSinkWrapper(localToForeignController, [t3]), true, $T)); - t1.set$_foreign(K.GuaranteeChannel$(new P._ControllerStream(localToForeignController, [t3]), new P._StreamSinkWrapper(foreignToLocalController, [t2]), true, $T)); + current() { + var exception, t1, path, lastIndex, uri = null; + try { + uri = A.Uri_base(); + } catch (exception) { + if (type$.Exception._is(A.unwrapException(exception))) { + t1 = $._current; + if (t1 != null) + return t1; + throw exception; + } else + throw exception; + } + if (J.$eq$(uri, $._currentUriBase)) { + t1 = $._current; + t1.toString; + return t1; + } + $._currentUriBase = uri; + if ($.$get$Style_platform() == $.$get$Style_url()) + t1 = $._current = uri.resolve$1(".").toString$0(0); + else { + path = uri.toFilePath$0(); + lastIndex = path.length - 1; + t1 = $._current = lastIndex === 0 ? path : B.JSString_methods.substring$2(path, 0, lastIndex); + } return t1; }, - StreamChannelController: function StreamChannelController(t0) { - this._foreign = this._local = null; - this.$ti = t0; - }, - isAlphabetic: function(char) { + isAlphabetic(char) { var t1; if (!(char >= 65 && char <= 90)) t1 = char >= 97 && char <= 122; @@ -5870,783 +7002,574 @@ t1 = true; return t1; }, - isDriveLetter: function(path, index) { - var t1, t2; - t1 = path.length; - t2 = index + 2; + isDriveLetter(path, index) { + var t1 = path.length, + t2 = index + 2; if (t1 < t2) return false; - if (!B.isAlphabetic(J.getInterceptor$s(path).codeUnitAt$1(path, index))) + if (!A.isAlphabetic(B.JSString_methods.codeUnitAt$1(path, index))) return false; - if (C.JSString_methods.codeUnitAt$1(path, index + 1) !== 58) + if (B.JSString_methods.codeUnitAt$1(path, index + 1) !== 58) return false; if (t1 === t2) return true; - return C.JSString_methods.codeUnitAt$1(path, t2) === 47; - } - }, - X = { - ParsedPath_ParsedPath$parse: function(path, style) { - var root, t1, parts, separators, start, i; - root = style.getRoot$1(path); - style.isRootRelative$1(path); - if (root != null) - path = J.substring$1$s(path, root.length); - t1 = [P.String]; - parts = H.setRuntimeTypeInfo([], t1); - separators = H.setRuntimeTypeInfo([], t1); - t1 = path.length; - if (t1 !== 0 && style.isSeparator$1(C.JSString_methods._codeUnitAt$1(path, 0))) { - if (0 >= t1) - return H.ioore(path, 0); - C.JSArray_methods.add$1(separators, path[0]); - start = 1; - } else { - C.JSArray_methods.add$1(separators, ""); - start = 0; - } - for (i = start; i < t1; ++i) - if (style.isSeparator$1(C.JSString_methods._codeUnitAt$1(path, i))) { - C.JSArray_methods.add$1(parts, C.JSString_methods.substring$2(path, start, i)); - C.JSArray_methods.add$1(separators, path[i]); - start = i + 1; - } - if (start < t1) { - C.JSArray_methods.add$1(parts, C.JSString_methods.substring$1(path, start)); - C.JSArray_methods.add$1(separators, ""); - } - return new X.ParsedPath(style, root, parts, separators); - }, - ParsedPath: function ParsedPath(t0, t1, t2, t3) { - var _ = this; - _.style = t0; - _.root = t1; - _.parts = t2; - _.separators = t3; - }, - ParsedPath_normalize_closure: function ParsedPath_normalize_closure(t0) { - this.$this = t0; - }, - PathException$: function(message) { - return new X.PathException(message); - }, - PathException: function PathException(t0) { - this.message = t0; + return B.JSString_methods.codeUnitAt$1(path, t2) === 47; } }, - O = { - Style__getPlatformStyle: function() { - if (P.Uri_base().get$scheme() !== "file") - return $.$get$Style_url(); - var t1 = P.Uri_base(); - if (!J.endsWith$1$s(t1.get$path(t1), "/")) - return $.$get$Style_url(); - if (P._Uri__Uri(null, "a/b", null, null).toFilePath$0() === "a\\b") - return $.$get$Style_windows(); - return $.$get$Style_posix(); + J = { + makeDispatchRecord(interceptor, proto, extension, indexability) { + return {i: interceptor, p: proto, e: extension, x: indexability}; }, - Style: function Style() { - } - }, - E = {PosixStyle: function PosixStyle() { - this.name = "posix"; - this.separator = "/"; - }}, - F = {UrlStyle: function UrlStyle() { - this.name = "url"; - this.separator = "/"; - }}, - L = {WindowsStyle: function WindowsStyle() { - this.name = "windows"; - this.separator = "\\"; - }, WindowsStyle_absolutePathToUri_closure: function WindowsStyle_absolutePathToUri_closure() { - }}, - U = { - Chain_Chain$parse: function(chain) { - var t1, t2, t3; - if (chain.length === 0) { - t1 = Y.Trace; - return new U.Chain(P.List_List$unmodifiable(H.setRuntimeTypeInfo([], [t1]), t1)); - } - if (J.getInterceptor$asx(chain).contains$1(chain, "\n")) { - t1 = H.setRuntimeTypeInfo(chain.split("\n"), [P.String]); - t2 = Y.Trace; - t3 = H.getTypeArgumentByIndex(t1, 0); - return new U.Chain(P.List_List$unmodifiable(new H.MappedListIterable(t1, H.functionTypeCheck(new U.Chain_Chain$parse_closure(), {func: 1, ret: t2, args: [t3]}), [t3, t2]), t2)); + getNativeInterceptor(object) { + var proto, objectProto, $constructor, interceptor, t1, + record = object[init.dispatchPropertyName]; + if (record == null) + if ($.initNativeDispatchFlag == null) { + A.initNativeDispatch(); + record = object[init.dispatchPropertyName]; + } + if (record != null) { + proto = record.p; + if (false === proto) + return record.i; + if (true === proto) + return object; + objectProto = Object.getPrototypeOf(object); + if (proto === objectProto) + return record.i; + if (record.e === objectProto) + throw A.wrapException(A.UnimplementedError$("Return interceptor for " + A.S(proto(object, record)))); } - if (!C.JSString_methods.contains$1(chain, "===== asynchronous gap ===========================\n")) { - t1 = Y.Trace; - return new U.Chain(P.List_List$unmodifiable(H.setRuntimeTypeInfo([Y.Trace_Trace$parse(chain)], [t1]), t1)); + $constructor = object.constructor; + if ($constructor == null) + interceptor = null; + else { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + interceptor = $constructor[t1]; } - t1 = H.setRuntimeTypeInfo(chain.split("===== asynchronous gap ===========================\n"), [P.String]); - t2 = Y.Trace; - t3 = H.getTypeArgumentByIndex(t1, 0); - return new U.Chain(P.List_List$unmodifiable(new H.MappedListIterable(t1, H.functionTypeCheck(new U.Chain_Chain$parse_closure0(), {func: 1, ret: t2, args: [t3]}), [t3, t2]), t2)); - }, - Chain: function Chain(t0) { - this.traces = t0; - }, - Chain_Chain$parse_closure: function Chain_Chain$parse_closure() { - }, - Chain_Chain$parse_closure0: function Chain_Chain$parse_closure0() { - }, - Chain_toTrace_closure: function Chain_toTrace_closure() { - }, - Chain_toString_closure0: function Chain_toString_closure0() { - }, - Chain_toString__closure0: function Chain_toString__closure0() { - }, - Chain_toString_closure: function Chain_toString_closure(t0) { - this.longest = t0; - }, - Chain_toString__closure: function Chain_toString__closure(t0) { - this.longest = t0; - } - }, - A = { - Frame_Frame$parseVM: function(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseVM_closure(frame)); - }, - Frame_Frame$parseV8: function(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseV8_closure(frame)); - }, - Frame_Frame$parseFirefox: function(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFirefox_closure(frame)); - }, - Frame_Frame$parseFriendly: function(frame) { - return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFriendly_closure(frame)); - }, - Frame__uriOrPathToUri: function(uriOrPath) { - if (J.getInterceptor$asx(uriOrPath).contains$1(uriOrPath, $.$get$Frame__uriRegExp())) - return P.Uri_parse(uriOrPath); - else if (C.JSString_methods.contains$1(uriOrPath, $.$get$Frame__windowsRegExp())) - return P._Uri__Uri$file(uriOrPath, true); - else if (C.JSString_methods.startsWith$1(uriOrPath, "/")) - return P._Uri__Uri$file(uriOrPath, false); - if (C.JSString_methods.contains$1(uriOrPath, "\\")) - return $.$get$windows().toUri$1(uriOrPath); - return P.Uri_parse(uriOrPath); - }, - Frame__catchFormatException: function(text, body) { - var t1, exception; - H.functionTypeCheck(body, {func: 1, ret: A.Frame}); - try { - t1 = body.call$0(); - return t1; - } catch (exception) { - if (H.unwrapException(exception) instanceof P.FormatException) - return new N.UnparsedFrame(P._Uri__Uri(null, "unparsed", null, null), text); - else - throw exception; + if (interceptor != null) + return interceptor; + interceptor = A.lookupAndCacheInterceptor(object); + if (interceptor != null) + return interceptor; + if (typeof object == "function") + return B.JavaScriptFunction_methods; + proto = Object.getPrototypeOf(object); + if (proto == null) + return B.PlainJavaScriptObject_methods; + if (proto === Object.prototype) + return B.PlainJavaScriptObject_methods; + if (typeof $constructor == "function") { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + Object.defineProperty($constructor, t1, {value: B.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + return B.UnknownJavaScriptObject_methods; } + return B.UnknownJavaScriptObject_methods; }, - Frame: function Frame(t0, t1, t2, t3) { - var _ = this; - _.uri = t0; - _.line = t1; - _.column = t2; - _.member = t3; - }, - Frame_Frame$parseVM_closure: function Frame_Frame$parseVM_closure(t0) { - this.frame = t0; + JSArray_JSArray$fixed($length, $E) { + if ($length < 0 || $length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); }, - Frame_Frame$parseV8_closure: function Frame_Frame$parseV8_closure(t0) { - this.frame = t0; + JSArray_JSArray$growable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); }, - Frame_Frame$parseV8_closure_parseLocation: function Frame_Frame$parseV8_closure_parseLocation(t0) { - this.frame = t0; + JSArray_JSArray$markFixed(allocation, $E) { + return J.JSArray_markFixedList(A._setArrayType(allocation, $E._eval$1("JSArray<0>")), $E); }, - Frame_Frame$parseFirefox_closure: function Frame_Frame$parseFirefox_closure(t0) { - this.frame = t0; + JSArray_markFixedList(list, $T) { + list.fixed$length = Array; + return list; }, - Frame_Frame$parseFriendly_closure: function Frame_Frame$parseFriendly_closure(t0) { - this.frame = t0; - } - }, - T = {LazyTrace: function LazyTrace(t0) { - this._thunk = t0; - this._lazy_trace$_inner = null; - }, LazyTrace_terse_closure: function LazyTrace_terse_closure(t0) { - this.$this = t0; - }}, - Y = { - Trace_Trace$from: function(trace) { - if (trace == null) - throw H.wrapException(P.ArgumentError$("Cannot create a Trace from null.")); - if (!!trace.$isTrace) - return trace; - if (!!trace.$isChain) - return trace.toTrace$0(); - return new T.LazyTrace(new Y.Trace_Trace$from_closure(trace)); + JSArray_markUnmodifiableList(list) { + list.fixed$length = Array; + list.immutable$list = Array; + return list; }, - Trace_Trace$parse: function(trace) { - var error, t1, exception; - try { - if (trace.length === 0) { - t1 = A.Frame; - t1 = P.List_List$unmodifiable(H.setRuntimeTypeInfo([], [t1]), t1); - return new Y.Trace(t1, new P._StringStackTrace(null)); - } - if (J.getInterceptor$asx(trace).contains$1(trace, $.$get$_v8Trace())) { - t1 = Y.Trace$parseV8(trace); - return t1; - } - if (C.JSString_methods.contains$1(trace, "\tat ")) { - t1 = Y.Trace$parseJSCore(trace); - return t1; - } - if (C.JSString_methods.contains$1(trace, $.$get$_firefoxSafariTrace())) { - t1 = Y.Trace$parseFirefox(trace); - return t1; - } - if (C.JSString_methods.contains$1(trace, "===== asynchronous gap ===========================\n")) { - t1 = U.Chain_Chain$parse(trace).toTrace$0(); - return t1; - } - if (C.JSString_methods.contains$1(trace, $.$get$_friendlyTrace())) { - t1 = Y.Trace$parseFriendly(trace); - return t1; + JSString__isWhitespace(codeUnit) { + if (codeUnit < 256) + switch (codeUnit) { + case 9: + case 10: + case 11: + case 12: + case 13: + case 32: + case 133: + case 160: + return true; + default: + return false; } - t1 = P.List_List$unmodifiable(Y.Trace__parseVM(trace), A.Frame); - return new Y.Trace(t1, new P._StringStackTrace(trace)); - } catch (exception) { - t1 = H.unwrapException(exception); - if (t1 instanceof P.FormatException) { - error = t1; - throw H.wrapException(P.FormatException$(H.S(error.message) + "\nStack trace:\n" + H.S(trace), null, null)); - } else - throw exception; + switch (codeUnit) { + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8232: + case 8233: + case 8239: + case 8287: + case 12288: + case 65279: + return true; + default: + return false; } }, - Trace__parseVM: function(trace) { - var t1, lines, t2, t3, $frames; - t1 = J.trim$0$s(trace); - lines = H.setRuntimeTypeInfo(H.stringReplaceAllUnchecked(t1, "\n", "").split("\n"), [P.String]); - t1 = H.SubListIterable$(lines, 0, lines.length - 1, H.getTypeArgumentByIndex(lines, 0)); - t2 = A.Frame; - t3 = H.getTypeArgumentByIndex(t1, 0); - $frames = new H.MappedListIterable(t1, H.functionTypeCheck(new Y.Trace__parseVM_closure(), {func: 1, ret: t2, args: [t3]}), [t3, t2]).toList$0(0); - if (!J.endsWith$1$s(C.JSArray_methods.get$last(lines), ".da")) - C.JSArray_methods.add$1($frames, A.Frame_Frame$parseVM(C.JSArray_methods.get$last(lines))); - return $frames; + JSString__skipLeadingWhitespace(string, index) { + var t1, codeUnit; + for (t1 = string.length; index < t1;) { + codeUnit = B.JSString_methods._codeUnitAt$1(string, index); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + ++index; + } + return index; }, - Trace$parseV8: function(trace) { - var t1, t2, t3; - t1 = H.setRuntimeTypeInfo(trace.split("\n"), [P.String]); - t1 = H.SubListIterable$(t1, 1, null, H.getTypeArgumentByIndex(t1, 0)); - t1 = t1.super$Iterable$skipWhile(0, H.functionTypeCheck(new Y.Trace$parseV8_closure(), {func: 1, ret: P.bool, args: [H.getTypeArgumentByIndex(t1, 0)]})); - t2 = A.Frame; - t3 = H.getTypeArgumentByIndex(t1, 0); - return new Y.Trace(P.List_List$unmodifiable(H.MappedIterable_MappedIterable(t1, H.functionTypeCheck(new Y.Trace$parseV8_closure0(), {func: 1, ret: t2, args: [t3]}), t3, t2), t2), new P._StringStackTrace(trace)); - }, - Trace$parseJSCore: function(trace) { - var t1, t2, t3; - t1 = H.setRuntimeTypeInfo(trace.split("\n"), [P.String]); - t2 = H.getTypeArgumentByIndex(t1, 0); - t3 = A.Frame; - return new Y.Trace(P.List_List$unmodifiable(new H.MappedIterable(new H.WhereIterable(t1, H.functionTypeCheck(new Y.Trace$parseJSCore_closure(), {func: 1, ret: P.bool, args: [t2]}), [t2]), H.functionTypeCheck(new Y.Trace$parseJSCore_closure0(), {func: 1, ret: t3, args: [t2]}), [t2, t3]), t3), new P._StringStackTrace(trace)); + JSString__skipTrailingWhitespace(string, index) { + var index0, codeUnit; + for (; index > 0; index = index0) { + index0 = index - 1; + codeUnit = B.JSString_methods.codeUnitAt$1(string, index0); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + } + return index; }, - Trace$parseFirefox: function(trace) { - var t1, t2, t3; - t1 = H.setRuntimeTypeInfo(J.trim$0$s(trace).split("\n"), [P.String]); - t2 = H.getTypeArgumentByIndex(t1, 0); - t3 = A.Frame; - return new Y.Trace(P.List_List$unmodifiable(new H.MappedIterable(new H.WhereIterable(t1, H.functionTypeCheck(new Y.Trace$parseFirefox_closure(), {func: 1, ret: P.bool, args: [t2]}), [t2]), H.functionTypeCheck(new Y.Trace$parseFirefox_closure0(), {func: 1, ret: t3, args: [t2]}), [t2, t3]), t3), new P._StringStackTrace(trace)); + getInterceptor$(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSNumNotInt.prototype; + } + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return J.JSNull.prototype; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); }, - Trace$parseFriendly: function(trace) { - var t1, t2, t3; - t1 = A.Frame; - if (trace.length === 0) - t2 = H.setRuntimeTypeInfo([], [t1]); - else { - t2 = H.setRuntimeTypeInfo(J.trim$0$s(trace).split("\n"), [P.String]); - t3 = H.getTypeArgumentByIndex(t2, 0); - t3 = new H.MappedIterable(new H.WhereIterable(t2, H.functionTypeCheck(new Y.Trace$parseFriendly_closure(), {func: 1, ret: P.bool, args: [t3]}), [t3]), H.functionTypeCheck(new Y.Trace$parseFriendly_closure0(), {func: 1, ret: t1, args: [t3]}), [t3, t1]); - t2 = t3; + getInterceptor$asx(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; } - return new Y.Trace(P.List_List$unmodifiable(t2, t1), new P._StringStackTrace(trace)); + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); }, - Trace: function Trace(t0, t1) { - this.frames = t0; - this.original = t1; + getInterceptor$ax(receiver) { + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); }, - Trace_Trace$from_closure: function Trace_Trace$from_closure(t0) { - this.trace = t0; + getInterceptor$s(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; }, - Trace__parseVM_closure: function Trace__parseVM_closure() { + getInterceptor$x(receiver) { + if (receiver == null) + return receiver; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); }, - Trace$parseV8_closure: function Trace$parseV8_closure() { + getInterceptor$z(receiver) { + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; }, - Trace$parseV8_closure0: function Trace$parseV8_closure0() { + get$hashCode$(receiver) { + return J.getInterceptor$(receiver).get$hashCode(receiver); }, - Trace$parseJSCore_closure: function Trace$parseJSCore_closure() { + get$iterator$ax(receiver) { + return J.getInterceptor$ax(receiver).get$iterator(receiver); }, - Trace$parseJSCore_closure0: function Trace$parseJSCore_closure0() { + get$length$asx(receiver) { + return J.getInterceptor$asx(receiver).get$length(receiver); }, - Trace$parseFirefox_closure: function Trace$parseFirefox_closure() { + get$onClick$x(receiver) { + return J.getInterceptor$x(receiver).get$onClick(receiver); }, - Trace$parseFirefox_closure0: function Trace$parseFirefox_closure0() { + get$parent$z(receiver) { + return J.getInterceptor$z(receiver).get$parent(receiver); }, - Trace$parseFriendly_closure: function Trace$parseFriendly_closure() { + $eq$(receiver, a0) { + if (receiver == null) + return a0 == null; + if (typeof receiver != "object") + return a0 != null && receiver === a0; + return J.getInterceptor$(receiver).$eq(receiver, a0); }, - Trace$parseFriendly_closure0: function Trace$parseFriendly_closure0() { + $index$asx(receiver, a0) { + if (typeof a0 === "number") + if (receiver.constructor == Array || typeof receiver == "string" || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) + if (a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0]; + return J.getInterceptor$asx(receiver).$index(receiver, a0); }, - Trace_terse_closure: function Trace_terse_closure() { + $indexSet$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); }, - Trace_foldFrames_closure: function Trace_foldFrames_closure(t0) { - this.oldPredicate = t0; + _removeChild$1$x(receiver, a0) { + return J.getInterceptor$x(receiver)._removeChild$1(receiver, a0); }, - Trace_foldFrames_closure0: function Trace_foldFrames_closure0(t0) { - this._box_0 = t0; + _removeEventListener$3$x(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2); }, - Trace_toString_closure0: function Trace_toString_closure0() { + addEventListener$3$x(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); }, - Trace_toString_closure: function Trace_toString_closure(t0) { - this.longest = t0; - } - }, - N = {UnparsedFrame: function UnparsedFrame(t0, t1) { - var _ = this; - _.uri = t0; - _.column = _.line = null; - _.isCore = false; - _.library = "unparsed"; - _.$package = null; - _.location = "unparsed"; - _.member = t1; - }}, - K = { - GuaranteeChannel$: function(innerStream, innerSink, allowSinkErrors, $T) { - var t1, t2; - t1 = {}; - t1.innerStream = innerStream; - t2 = new K.GuaranteeChannel([$T]); - t2.GuaranteeChannel$3$allowSinkErrors(innerSink, true, t1, $T); - return t2; + allMatches$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).allMatches$1(receiver, a0); }, - GuaranteeChannel: function GuaranteeChannel(t0) { - var _ = this; - _._guarantee_channel$_subscription = _._streamController = _._sink = null; - _._disconnected = false; - _.$ti = t0; + allMatches$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).allMatches$2(receiver, a0, a1); }, - GuaranteeChannel_closure: function GuaranteeChannel_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; + codeUnitAt$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).codeUnitAt$1(receiver, a0); }, - GuaranteeChannel__closure: function GuaranteeChannel__closure(t0) { - this.$this = t0; + contains$1$asx(receiver, a0) { + return J.getInterceptor$asx(receiver).contains$1(receiver, a0); }, - _GuaranteeSink: function _GuaranteeSink(t0, t1, t2, t3, t4) { - var _ = this; - _._inner = t0; - _._channel = t1; - _._doneCompleter = t2; - _._closed = _._disconnected = false; - _._addStreamCompleter = _._addStreamSubscription = null; - _._allowErrors = t3; - _.$ti = t4; + elementAt$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); }, - _GuaranteeSink_addStream_closure: function _GuaranteeSink_addStream_closure(t0) { - this.$this = t0; + endsWith$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).endsWith$1(receiver, a0); }, - main: function() { - var t1 = self.testRunner; - if (t1 != null) - J.waitUntilDone$0$x(t1); - if (J.$eq$($.$get$_currentUrl().get$queryParameters().$index(0, "debug"), "true")) - document.body.classList.add("debug"); - P.runZoned(new K.main_closure(), new K.main_closure0(), P.Null); - }, - _connectToServer: function() { - var webSocket, controller, t1; - webSocket = W.WebSocket_WebSocket($.$get$_currentUrl().get$queryParameters().$index(0, "managerUrl")); - controller = B.StreamChannelController$(true, null); - t1 = W.MessageEvent; - W._EventStreamSubscription$(webSocket, "message", H.functionTypeCheck(new K._connectToServer_closure(controller), {func: 1, ret: -1, args: [t1]}), false, t1); - t1 = controller._local._streamController; - t1.toString; - new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).listen$1(new K._connectToServer_closure0(webSocket)); - return D._MultiChannel$(controller._foreign, null); - }, - _connectToIframe: function(url, id) { - var t1, iframe, channel, controller, readyCompleter, subscriptions, t2, t3; - t1 = document; - iframe = t1.createElement("iframe"); - $.$get$_iframes().$indexSet(0, id, iframe); - iframe.src = url; - t1.body.appendChild(iframe); - channel = new MessageChannel(); - controller = B.StreamChannelController$(true, null); - readyCompleter = new P._AsyncCompleter(new P._Future(0, $.Zone__current, [null]), [null]); - subscriptions = H.setRuntimeTypeInfo([], [[P.StreamSubscription,,]]); - $.$get$_subscriptions().$indexSet(0, id, subscriptions); - t1 = W.MessageEvent; - t2 = {func: 1, ret: -1, args: [t1]}; - C.JSArray_methods.add$1(subscriptions, W._EventStreamSubscription$(window, "message", H.functionTypeCheck(new K._connectToIframe_closure(iframe, channel, readyCompleter, controller), t2), false, t1)); - t3 = channel.port1; - t3.toString; - C.JSArray_methods.add$1(subscriptions, W._EventStreamSubscription$(t3, "message", H.functionTypeCheck(new K._connectToIframe_closure0(controller), t2), false, t1)); - t1 = controller._local._streamController; - t1.toString; - C.JSArray_methods.add$1(subscriptions, new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).listen$1(new K._connectToIframe_closure1(readyCompleter, channel))); - return controller._foreign; + matchAsPrefix$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); }, - _TestRunner: function _TestRunner() { + noSuchMethod$1$(receiver, a0) { + return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); }, - _JSApi: function _JSApi() { + postMessage$3$x(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver).postMessage$3(receiver, a0, a1, a2); }, - main_closure: function main_closure() { + toString$0$(receiver) { + return J.getInterceptor$(receiver).toString$0(receiver); }, - main__closure: function main__closure(t0) { - this.serverChannel = t0; + waitUntilDone$0$x(receiver) { + return J.getInterceptor$x(receiver).waitUntilDone$0(receiver); }, - main__closure0: function main__closure0(t0) { - this.serverChannel = t0; + Interceptor: function Interceptor() { }, - main__closure1: function main__closure1(t0) { - this.serverChannel = t0; + JSBool: function JSBool() { }, - main__closure2: function main__closure2(t0) { - this.serverChannel = t0; + JSNull: function JSNull() { }, - main__closure3: function main__closure3(t0) { - this.serverChannel = t0; + JavaScriptObject: function JavaScriptObject() { }, - main_closure0: function main_closure0() { + LegacyJavaScriptObject: function LegacyJavaScriptObject() { }, - _connectToServer_closure: function _connectToServer_closure(t0) { - this.controller = t0; + PlainJavaScriptObject: function PlainJavaScriptObject() { }, - _connectToServer_closure0: function _connectToServer_closure0(t0) { - this.webSocket = t0; + UnknownJavaScriptObject: function UnknownJavaScriptObject() { }, - _connectToIframe_closure: function _connectToIframe_closure(t0, t1, t2, t3) { - var _ = this; - _.iframe = t0; - _.channel = t1; - _.readyCompleter = t2; - _.controller = t3; + JavaScriptFunction: function JavaScriptFunction() { }, - _connectToIframe_closure0: function _connectToIframe_closure0(t0) { - this.controller = t0; + JSArray: function JSArray(t0) { + this.$ti = t0; }, - _connectToIframe_closure1: function _connectToIframe_closure1(t0, t1) { - this.readyCompleter = t0; - this.channel = t1; - } - }, - D = { - _MultiChannel$: function(_inner, $T) { - var t1 = P.int; - t1 = new D._MultiChannel(_inner, B.StreamChannelController$(true, $T), P.LinkedHashMap_LinkedHashMap$_empty(t1, [B.StreamChannelController, $T]), P.LinkedHashSet_LinkedHashSet(t1), P.LinkedHashSet_LinkedHashSet(t1), [$T]); - t1._MultiChannel$1(_inner, $T); - return t1; + JSUnmodifiableArray: function JSUnmodifiableArray(t0) { + this.$ti = t0; }, - _MultiChannel: function _MultiChannel(t0, t1, t2, t3, t4, t5) { + ArrayIterator: function ArrayIterator(t0, t1, t2) { var _ = this; - _._multi_channel$_inner = t0; - _._innerStreamSubscription = null; - _._mainController = t1; - _._controllers = t2; - _._pendingIds = t3; - _._closedIds = t4; - _._nextId = 1; - _.$ti = t5; - }, - _MultiChannel_closure: function _MultiChannel_closure(t0, t1) { - this.$this = t0; - this.T = t1; - }, - _MultiChannel_closure0: function _MultiChannel_closure0(t0) { - this.$this = t0; - }, - _MultiChannel_closure1: function _MultiChannel_closure1(t0, t1) { - this.$this = t0; - this.T = t1; - }, - _MultiChannel__closure: function _MultiChannel__closure(t0, t1, t2) { - this.$this = t0; - this.id = t1; - this.T = t2; + _._iterable = t0; + _.__interceptors$_length = t1; + _._index = 0; + _.__interceptors$_current = null; + _.$ti = t2; }, - _MultiChannel_virtualChannel_closure: function _MultiChannel_virtualChannel_closure(t0, t1) { - this._box_0 = t0; - this.$this = t1; + JSNumber: function JSNumber() { }, - _MultiChannel_virtualChannel_closure0: function _MultiChannel_virtualChannel_closure0(t0, t1) { - this._box_0 = t0; - this.$this = t1; + JSInt: function JSInt() { }, - VirtualChannel: function VirtualChannel(t0, t1, t2, t3) { - var _ = this; - _._parent = t0; - _.stream = t1; - _.sink = t2; - _.$ti = t3; + JSNumNotInt: function JSNumNotInt() { }, - current: function() { - var uri, t1, path, lastIndex; - uri = P.Uri_base(); - if (J.$eq$(uri, $._currentUriBase)) - return $._current; - $._currentUriBase = uri; - if ($.$get$Style_platform() == $.$get$Style_url()) { - t1 = uri.resolve$1(".").toString$0(0); - $._current = t1; - return t1; - } else { - path = uri.toFilePath$0(); - lastIndex = path.length - 1; - t1 = lastIndex === 0 ? path : C.JSString_methods.substring$2(path, 0, lastIndex); - $._current = t1; - return t1; - } + JSString: function JSString() { } }, - R = {StreamChannelMixin: function StreamChannelMixin() { - }}; - var holders = [C, H, J, P, W, S, M, B, X, O, E, F, L, U, A, T, Y, N, K, D, R]; - hunkHelpers.setFunctionNamesIfNecessary(holders); + B = {}; + var holders = [A, J, B]; var $ = {}; - H.JS_CONST.prototype = {}; + A.JS_CONST.prototype = {}; J.Interceptor.prototype = { - $eq: function(receiver, other) { + $eq(receiver, other) { return receiver === other; }, - get$hashCode: function(receiver) { - return H.Primitives_objectHashCode(receiver); + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); }, - toString$0: function(receiver) { - return "Instance of '" + H.Primitives_objectTypeName(receiver) + "'"; + toString$0(receiver) { + return "Instance of '" + A.Primitives_objectTypeName(receiver) + "'"; }, - noSuchMethod$1: function(receiver, invocation) { - H.interceptedTypeCheck(invocation, "$isInvocation"); - throw H.wrapException(P.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); + noSuchMethod$1(receiver, invocation) { + type$.Invocation._as(invocation); + throw A.wrapException(A.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); } }; J.JSBool.prototype = { - toString$0: function(receiver) { + toString$0(receiver) { return String(receiver); }, - get$hashCode: function(receiver) { + get$hashCode(receiver) { return receiver ? 519018 : 218159; }, $isbool: 1 }; J.JSNull.prototype = { - $eq: function(receiver, other) { + $eq(receiver, other) { return null == other; }, - toString$0: function(receiver) { + toString$0(receiver) { return "null"; }, - get$hashCode: function(receiver) { + get$hashCode(receiver) { return 0; }, - noSuchMethod$1: function(receiver, invocation) { - return this.super$Interceptor$noSuchMethod(receiver, H.interceptedTypeCheck(invocation, "$isInvocation")); - }, $isNull: 1 }; - J.JavaScriptObject.prototype = { - get$hashCode: function(receiver) { + J.JavaScriptObject.prototype = {}; + J.LegacyJavaScriptObject.prototype = { + get$hashCode(receiver) { return 0; }, - toString$0: function(receiver) { + toString$0(receiver) { return String(receiver); }, - waitUntilDone$0: function(receiver) { + $isJSObject: 1, + waitUntilDone$0(receiver) { return receiver.waitUntilDone(); } }; J.PlainJavaScriptObject.prototype = {}; J.UnknownJavaScriptObject.prototype = {}; J.JavaScriptFunction.prototype = { - toString$0: function(receiver) { + toString$0(receiver) { var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; if (dartClosure == null) - return this.super$JavaScriptObject$toString(receiver); - return "JavaScript function for " + H.S(J.toString$0$(dartClosure)); - }, - $signature: function() { - return {func: 1, opt: [,,,,,,,,,,,,,,,,]}; + return this.super$LegacyJavaScriptObject$toString(receiver); + return "JavaScript function for " + J.toString$0$(dartClosure); }, $isFunction: 1 }; J.JSArray.prototype = { - add$1: function(receiver, value) { - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0)); + add$1(receiver, value) { + A._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("add")); + A.throwExpression(A.UnsupportedError$("add")); receiver.push(value); }, - removeAt$1: function(receiver, index) { + removeAt$1(receiver, index) { var t1; if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("removeAt")); + A.throwExpression(A.UnsupportedError$("removeAt")); t1 = receiver.length; if (index >= t1) - throw H.wrapException(P.RangeError$value(index, null)); + throw A.wrapException(A.RangeError$value(index, null)); return receiver.splice(index, 1)[0]; }, - insert$2: function(receiver, index, value) { + insert$2(receiver, index, value) { var t1; - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0)); + A._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("insert")); + A.throwExpression(A.UnsupportedError$("insert")); t1 = receiver.length; if (index > t1) - throw H.wrapException(P.RangeError$value(index, null)); + throw A.wrapException(A.RangeError$value(index, null)); receiver.splice(index, 0, value); }, - insertAll$2: function(receiver, index, iterable) { - var insertionLength, end; - H.assertSubtype(iterable, "$isIterable", [H.getTypeArgumentByIndex(receiver, 0)], "$asIterable"); + insertAll$2(receiver, index, iterable) { + var t1, insertionLength, end; + A._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(iterable); if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("insertAll")); - P.RangeError_checkValueInInterval(index, 0, receiver.length, "index"); + A.throwExpression(A.UnsupportedError$("insertAll")); + t1 = receiver.length; + A.RangeError_checkValueInInterval(index, 0, t1, "index"); insertionLength = iterable.length; - this.set$length(receiver, receiver.length + insertionLength); + receiver.length = t1 + insertionLength; end = index + insertionLength; this.setRange$4(receiver, end, receiver.length, receiver, index); this.setRange$3(receiver, index, end, iterable); }, - removeLast$0: function(receiver) { + removeLast$0(receiver) { if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("removeLast")); + A.throwExpression(A.UnsupportedError$("removeLast")); if (receiver.length === 0) - throw H.wrapException(H.diagnoseIndexError(receiver, -1)); + throw A.wrapException(A.diagnoseIndexError(receiver, -1)); return receiver.pop(); }, - addAll$1: function(receiver, collection) { - var t1, _i; - H.assertSubtype(collection, "$isIterable", [H.getTypeArgumentByIndex(receiver, 0)], "$asIterable"); + addAll$1(receiver, collection) { + A._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(collection); if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("addAll")); - for (t1 = collection.length, _i = 0; _i < collection.length; collection.length === t1 || (0, H.throwConcurrentModificationError)(collection), ++_i) - receiver.push(collection[_i]); - }, - forEach$1: function(receiver, f) { - var end, i; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(receiver, 0)]}); - end = receiver.length; - for (i = 0; i < end; ++i) { - f.call$1(receiver[i]); - if (receiver.length !== end) - throw H.wrapException(P.ConcurrentModificationError$(receiver)); - } - }, - join$1: function(receiver, separator) { - var list, i; - list = new Array(receiver.length); - list.fixed$length = Array; + A.throwExpression(A.UnsupportedError$("addAll")); + this._addAllFromArray$1(receiver, collection); + return; + }, + _addAllFromArray$1(receiver, array) { + var len, i; + type$.JSArray_dynamic._as(array); + len = array.length; + if (len === 0) + return; + if (receiver === array) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + for (i = 0; i < len; ++i) + receiver.push(array[i]); + }, + join$1(receiver, separator) { + var i, + list = A.List_List$filled(receiver.length, "", false, type$.String); for (i = 0; i < receiver.length; ++i) - this.$indexSet(list, i, H.S(receiver[i])); + this.$indexSet(list, i, A.S(receiver[i])); return list.join(separator); }, - join$0: function($receiver) { + join$0($receiver) { return this.join$1($receiver, ""); }, - fold$1$2: function(receiver, initialValue, combine, $T) { + fold$1$2(receiver, initialValue, combine, $T) { var $length, value, i; - H.assertSubtypeOfRuntimeType(initialValue, $T); - H.functionTypeCheck(combine, {func: 1, ret: $T, args: [$T, H.getTypeArgumentByIndex(receiver, 0)]}); + $T._as(initialValue); + A._arrayInstanceType(receiver)._bind$1($T)._eval$1("1(1,2)")._as(combine); $length = receiver.length; for (value = initialValue, i = 0; i < $length; ++i) { value = combine.call$2(value, receiver[i]); if (receiver.length !== $length) - throw H.wrapException(P.ConcurrentModificationError$(receiver)); + throw A.wrapException(A.ConcurrentModificationError$(receiver)); } return value; }, - elementAt$1: function(receiver, index) { - if (index < 0 || index >= receiver.length) - return H.ioore(receiver, index); + elementAt$1(receiver, index) { + if (!(index >= 0 && index < receiver.length)) + return A.ioore(receiver, index); return receiver[index]; }, - sublist$2: function(receiver, start, end) { - if (start < 0 || start > receiver.length) - throw H.wrapException(P.RangeError$range(start, 0, receiver.length, "start", null)); - if (end < start || end > receiver.length) - throw H.wrapException(P.RangeError$range(end, start, receiver.length, "end", null)); - if (start === end) - return H.setRuntimeTypeInfo([], [H.getTypeArgumentByIndex(receiver, 0)]); - return H.setRuntimeTypeInfo(receiver.slice(start, end), [H.getTypeArgumentByIndex(receiver, 0)]); - }, - get$first: function(receiver) { + get$first(receiver) { if (receiver.length > 0) return receiver[0]; - throw H.wrapException(H.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_noElement()); }, - get$last: function(receiver) { + get$last(receiver) { var t1 = receiver.length; if (t1 > 0) return receiver[t1 - 1]; - throw H.wrapException(H.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_noElement()); }, - setRange$4: function(receiver, start, end, iterable, skipCount) { - var t1, $length, i; - t1 = H.getTypeArgumentByIndex(receiver, 0); - H.assertSubtype(iterable, "$isIterable", [t1], "$asIterable"); + setRange$4(receiver, start, end, iterable, skipCount) { + var $length, otherList, t1, i; + A._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(iterable); if (!!receiver.immutable$list) - H.throwExpression(P.UnsupportedError$("setRange")); - P.RangeError_checkValidRange(start, end, receiver.length); + A.throwExpression(A.UnsupportedError$("setRange")); + A.RangeError_checkValidRange(start, end, receiver.length); $length = end - start; if ($length === 0) return; - P.RangeError_checkNotNegative(skipCount, "skipCount"); - H.assertSubtype(iterable, "$isList", [t1], "$asList"); - t1 = J.getInterceptor$asx(iterable); - if (skipCount + $length > t1.get$length(iterable)) - throw H.wrapException(H.IterableElementError_tooFew()); + A.RangeError_checkNotNegative(skipCount, "skipCount"); + otherList = iterable; + t1 = J.getInterceptor$asx(otherList); + if (skipCount + $length > t1.get$length(otherList)) + throw A.wrapException(A.IterableElementError_tooFew()); if (skipCount < start) for (i = $length - 1; i >= 0; --i) - receiver[start + i] = t1.$index(iterable, skipCount + i); + receiver[start + i] = t1.$index(otherList, skipCount + i); else for (i = 0; i < $length; ++i) - receiver[start + i] = t1.$index(iterable, skipCount + i); + receiver[start + i] = t1.$index(otherList, skipCount + i); }, - setRange$3: function($receiver, start, end, iterable) { + setRange$3($receiver, start, end, iterable) { return this.setRange$4($receiver, start, end, iterable, 0); }, - get$isNotEmpty: function(receiver) { + get$isNotEmpty(receiver) { return receiver.length !== 0; }, - toString$0: function(receiver) { - return P.IterableBase_iterableToFullString(receiver, "[", "]"); + toString$0(receiver) { + return A.IterableBase_iterableToFullString(receiver, "[", "]"); }, - get$iterator: function(receiver) { - return new J.ArrayIterator(receiver, receiver.length, 0, [H.getTypeArgumentByIndex(receiver, 0)]); + get$iterator(receiver) { + return new J.ArrayIterator(receiver, receiver.length, A._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>")); }, - get$hashCode: function(receiver) { - return H.Primitives_objectHashCode(receiver); + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); }, - get$length: function(receiver) { + get$length(receiver) { return receiver.length; }, - set$length: function(receiver, newLength) { + set$length(receiver, newLength) { if (!!receiver.fixed$length) - H.throwExpression(P.UnsupportedError$("set length")); - if (newLength < 0) - throw H.wrapException(P.RangeError$range(newLength, 0, null, "newLength", null)); + A.throwExpression(A.UnsupportedError$("set length")); + if (newLength > receiver.length) + A._arrayInstanceType(receiver)._precomputed1._as(null); receiver.length = newLength; }, - $index: function(receiver, index) { - H.intTypeCheck(index); - if (index >= receiver.length || index < 0) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + $index(receiver, index) { + A._asInt(index); + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); return receiver[index]; }, - $indexSet: function(receiver, index, value) { - H.intTypeCheck(index); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0)); + $indexSet(receiver, index, value) { + A._asInt(index); + A._arrayInstanceType(receiver)._precomputed1._as(value); if (!!receiver.immutable$list) - H.throwExpression(P.UnsupportedError$("indexed set")); - if (typeof index !== "number" || Math.floor(index) !== index) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); - if (index >= receiver.length || index < 0) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + A.throwExpression(A.UnsupportedError$("indexed set")); + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); receiver[index] = value; }, $isEfficientLengthIterable: 1, @@ -6655,92 +7578,66 @@ }; J.JSUnmodifiableArray.prototype = {}; J.ArrayIterator.prototype = { - get$current: function() { - return this.__interceptors$_current; - }, - moveNext$0: function() { - var t1, $length, t2; - t1 = this._iterable; - $length = t1.length; - if (this.__interceptors$_length !== $length) - throw H.wrapException(H.throwConcurrentModificationError(t1)); - t2 = this._index; + get$current() { + var t1 = this.__interceptors$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t2, _this = this, + t1 = _this._iterable, + $length = t1.length; + if (_this.__interceptors$_length !== $length) + throw A.wrapException(A.throwConcurrentModificationError(t1)); + t2 = _this._index; if (t2 >= $length) { - this.set$__interceptors$_current(null); + _this.set$__interceptors$_current(null); return false; } - this.set$__interceptors$_current(t1[t2]); - ++this._index; + _this.set$__interceptors$_current(t1[t2]); + ++_this._index; return true; }, - set$__interceptors$_current: function(_current) { - this.__interceptors$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + set$__interceptors$_current(_current) { + this.__interceptors$_current = this.$ti._eval$1("1?")._as(_current); }, $isIterator: 1 }; J.JSNumber.prototype = { - toRadixString$1: function(receiver, radix) { - var result, match, t1, exponent; - if (radix < 2 || radix > 36) - throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null)); - result = receiver.toString(radix); - if (C.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41) - return result; - match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); - if (match == null) - H.throwExpression(P.UnsupportedError$("Unexpected toString result: " + result)); - t1 = match.length; - if (1 >= t1) - return H.ioore(match, 1); - result = match[1]; - if (3 >= t1) - return H.ioore(match, 3); - exponent = +match[3]; - t1 = match[2]; - if (t1 != null) { - result += t1; - exponent -= t1.length; - } - return result + C.JSString_methods.$mul("0", exponent); - }, - toString$0: function(receiver) { + toString$0(receiver) { if (receiver === 0 && 1 / receiver < 0) return "-0.0"; else return "" + receiver; }, - get$hashCode: function(receiver) { - var intValue, absolute, floorLog2, factor, scaled; - intValue = receiver | 0; + get$hashCode(receiver) { + var absolute, floorLog2, factor, scaled, + intValue = receiver | 0; if (receiver === intValue) - return 536870911 & intValue; + return intValue & 536870911; absolute = Math.abs(receiver); floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0; factor = Math.pow(2, floorLog2); scaled = absolute < 1 ? absolute / factor : factor / absolute; - return 536870911 & ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259; + return ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259 & 536870911; }, - $mod: function(receiver, other) { + $mod(receiver, other) { var result = receiver % other; if (result === 0) return 0; if (result > 0) return result; - if (other < 0) - return result - other; - else - return result + other; + return result + other; }, - $tdiv: function(receiver, other) { + $tdiv(receiver, other) { if ((receiver | 0) === receiver) - if (other >= 1 || other < -1) + if (other >= 1 || false) return receiver / other | 0; return this._tdivSlow$1(receiver, other); }, - _tdivFast$1: function(receiver, other) { + _tdivFast$1(receiver, other) { return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); }, - _tdivSlow$1: function(receiver, other) { + _tdivSlow$1(receiver, other) { var quotient = receiver / other; if (quotient >= -2147483648 && quotient <= 2147483647) return quotient | 0; @@ -6749,9 +7646,9 @@ return Math.floor(quotient); } else if (quotient > -1 / 0) return Math.ceil(quotient); - throw H.wrapException(P.UnsupportedError$("Result of truncating division is " + H.S(quotient) + ": " + H.S(receiver) + " ~/ " + other)); + throw A.wrapException(A.UnsupportedError$("Result of truncating division is " + A.S(quotient) + ": " + A.S(receiver) + " ~/ " + other)); }, - _shrOtherPositive$1: function(receiver, other) { + _shrOtherPositive$1(receiver, other) { var t1; if (receiver > 0) t1 = this._shrBothPositive$1(receiver, other); @@ -6761,97 +7658,104 @@ } return t1; }, - _shrReceiverPositive$1: function(receiver, other) { - if (other < 0) - throw H.wrapException(H.argumentErrorValue(other)); + _shrReceiverPositive$1(receiver, other) { + if (0 > other) + throw A.wrapException(A.argumentErrorValue(other)); return this._shrBothPositive$1(receiver, other); }, - _shrBothPositive$1: function(receiver, other) { + _shrBothPositive$1(receiver, other) { return other > 31 ? 0 : receiver >>> other; }, - $gt: function(receiver, other) { - if (typeof other !== "number") - throw H.wrapException(H.argumentErrorValue(other)); - return receiver > other; - }, $isdouble: 1, $isnum: 1 }; J.JSInt.prototype = {$isint: 1}; - J.JSDouble.prototype = {}; + J.JSNumNotInt.prototype = {}; J.JSString.prototype = { - codeUnitAt$1: function(receiver, index) { - if (typeof index !== "number" || Math.floor(index) !== index) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + codeUnitAt$1(receiver, index) { if (index < 0) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + throw A.wrapException(A.diagnoseIndexError(receiver, index)); if (index >= receiver.length) - H.throwExpression(H.diagnoseIndexError(receiver, index)); + A.throwExpression(A.diagnoseIndexError(receiver, index)); return receiver.charCodeAt(index); }, - _codeUnitAt$1: function(receiver, index) { + _codeUnitAt$1(receiver, index) { if (index >= receiver.length) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + throw A.wrapException(A.diagnoseIndexError(receiver, index)); return receiver.charCodeAt(index); }, - allMatches$2: function(receiver, string, start) { - var t1; - if (typeof string !== "string") - H.throwExpression(H.argumentErrorValue(string)); - t1 = string.length; + allMatches$2(receiver, string, start) { + var t1 = string.length; if (start > t1) - throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null)); - return new H._StringAllMatchesIterable(string, receiver, start); + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._StringAllMatchesIterable(string, receiver, start); }, - allMatches$1: function($receiver, string) { + allMatches$1($receiver, string) { return this.allMatches$2($receiver, string, 0); }, - matchAsPrefix$2: function(receiver, string, start) { - var t1, i; - if (typeof start !== "number") - return start.$lt(); + matchAsPrefix$2(receiver, string, start) { + var t1, i, _null = null; if (start < 0 || start > string.length) - throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null)); + throw A.wrapException(A.RangeError$range(start, 0, string.length, _null, _null)); t1 = receiver.length; if (start + t1 > string.length) - return; + return _null; for (i = 0; i < t1; ++i) if (this.codeUnitAt$1(string, start + i) !== this._codeUnitAt$1(receiver, i)) - return; - return new H.StringMatch(start, receiver); + return _null; + return new A.StringMatch(start, receiver); }, - $add: function(receiver, other) { - if (typeof other !== "string") - throw H.wrapException(P.ArgumentError$value(other, null, null)); + $add(receiver, other) { return receiver + other; }, - endsWith$1: function(receiver, other) { - var otherLength, t1; - otherLength = other.length; - t1 = receiver.length; + endsWith$1(receiver, other) { + var otherLength = other.length, + t1 = receiver.length; if (otherLength > t1) return false; return other === this.substring$1(receiver, t1 - otherLength); }, - replaceFirst$2: function(receiver, from, to) { - P.RangeError_checkValueInInterval(0, 0, receiver.length, "startIndex"); - return H.stringReplaceFirstUnchecked(receiver, from, to, 0); - }, - replaceRange$3: function(receiver, start, end, replacement) { - if (typeof start !== "number" || Math.floor(start) !== start) - H.throwExpression(H.argumentErrorValue(start)); - end = P.RangeError_checkValidRange(start, end, receiver.length); - return H.stringReplaceRangeUnchecked(receiver, start, end, replacement); + replaceFirst$2(receiver, from, to) { + type$.Pattern._as(from); + A.RangeError_checkValueInInterval(0, 0, receiver.length, "startIndex"); + return A.stringReplaceFirstUnchecked(receiver, from, to, 0); + }, + split$1(receiver, pattern) { + type$.Pattern._as(pattern); + if (typeof pattern == "string") + return A._setArrayType(receiver.split(pattern), type$.JSArray_String); + else if (pattern instanceof A.JSSyntaxRegExp && pattern.get$_nativeAnchoredVersion().exec("").length - 2 === 0) + return A._setArrayType(receiver.split(pattern._nativeRegExp), type$.JSArray_String); + else + return this._defaultSplit$1(receiver, pattern); + }, + replaceRange$3(receiver, start, end, replacement) { + var e = A.RangeError_checkValidRange(start, end, receiver.length); + return A.stringReplaceRangeUnchecked(receiver, start, e, replacement); + }, + _defaultSplit$1(receiver, pattern) { + var t1, start, $length, match, matchStart, matchEnd, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), start = 0, $length = 1; t1.moveNext$0();) { + match = t1.get$current(); + matchStart = match.get$start(match); + matchEnd = match.get$end(); + $length = matchEnd - matchStart; + if ($length === 0 && start === matchStart) + continue; + B.JSArray_methods.add$1(result, this.substring$2(receiver, start, matchStart)); + start = matchEnd; + } + if (start < receiver.length || $length > 0) + B.JSArray_methods.add$1(result, this.substring$1(receiver, start)); + return result; }, - startsWith$2: function(receiver, pattern, index) { + startsWith$2(receiver, pattern, index) { var endIndex; - if (typeof index !== "number" || Math.floor(index) !== index) - H.throwExpression(H.argumentErrorValue(index)); - if (typeof index !== "number") - return index.$lt(); + type$.Pattern._as(pattern); if (index < 0 || index > receiver.length) - throw H.wrapException(P.RangeError$range(index, 0, receiver.length, null, null)); - if (typeof pattern === "string") { + throw A.wrapException(A.RangeError$range(index, 0, receiver.length, null, null)); + if (typeof pattern == "string") { endIndex = index + pattern.length; if (endIndex > receiver.length) return false; @@ -6859,31 +7763,19 @@ } return J.matchAsPrefix$2$s(pattern, receiver, index) != null; }, - startsWith$1: function($receiver, pattern) { + startsWith$1($receiver, pattern) { return this.startsWith$2($receiver, pattern, 0); }, - substring$2: function(receiver, startIndex, endIndex) { - if (typeof startIndex !== "number" || Math.floor(startIndex) !== startIndex) - H.throwExpression(H.argumentErrorValue(startIndex)); - if (endIndex == null) - endIndex = receiver.length; - if (typeof startIndex !== "number") - return startIndex.$lt(); - if (startIndex < 0) - throw H.wrapException(P.RangeError$value(startIndex, null)); - if (startIndex > endIndex) - throw H.wrapException(P.RangeError$value(startIndex, null)); - if (endIndex > receiver.length) - throw H.wrapException(P.RangeError$value(endIndex, null)); - return receiver.substring(startIndex, endIndex); - }, - substring$1: function($receiver, startIndex) { - return this.substring$2($receiver, startIndex, null); - }, - trim$0: function(receiver) { - var result, endIndex, startIndex, t1, endIndex0; - result = receiver.trim(); - endIndex = result.length; + substring$2(receiver, start, end) { + return receiver.substring(start, A.RangeError_checkValidRange(start, end, receiver.length)); + }, + substring$1($receiver, start) { + return this.substring$2($receiver, start, null); + }, + trim$0(receiver) { + var startIndex, t1, endIndex0, + result = receiver.trim(), + endIndex = result.length; if (endIndex === 0) return result; if (this._codeUnitAt$1(result, 0) === 133) { @@ -6898,14 +7790,14 @@ return result; return result.substring(startIndex, endIndex0); }, - $mul: function(receiver, times) { + $mul(receiver, times) { var s, result; if (0 >= times) return ""; if (times === 1 || receiver.length === 0) return receiver; if (times !== times >>> 0) - throw H.wrapException(C.C_OutOfMemoryError); + throw A.wrapException(B.C_OutOfMemoryError); for (s = receiver, result = ""; true;) { if ((times & 1) === 1) result = s + result; @@ -6916,898 +7808,958 @@ } return result; }, - padRight$1: function(receiver, width) { - var delta; - if (typeof width !== "number") - return width.$sub(); - delta = width - receiver.length; + padLeft$2(receiver, width, padding) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return this.$mul(padding, delta) + receiver; + }, + padRight$1(receiver, width) { + var delta = width - receiver.length; if (delta <= 0) return receiver; return receiver + this.$mul(" ", delta); }, - indexOf$2: function(receiver, pattern, start) { + indexOf$2(receiver, pattern, start) { var t1; if (start < 0 || start > receiver.length) - throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null, null)); + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); t1 = receiver.indexOf(pattern, start); return t1; }, - indexOf$1: function($receiver, pattern) { + indexOf$1($receiver, pattern) { return this.indexOf$2($receiver, pattern, 0); }, - lastIndexOf$2: function(receiver, pattern, start) { + lastIndexOf$2(receiver, pattern, start) { var t1, t2; if (start == null) start = receiver.length; else if (start < 0 || start > receiver.length) - throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null, null)); + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); t1 = pattern.length; t2 = receiver.length; if (start + t1 > t2) start = t2 - t1; return receiver.lastIndexOf(pattern, start); }, - lastIndexOf$1: function($receiver, pattern) { + lastIndexOf$1($receiver, pattern) { return this.lastIndexOf$2($receiver, pattern, null); }, - contains$1: function(receiver, other) { - if (other == null) - H.throwExpression(H.argumentErrorValue(other)); - return H.stringContainsUnchecked(receiver, other, 0); + contains$1(receiver, other) { + type$.Pattern._as(other); + return A.stringContainsUnchecked(receiver, other, 0); }, - toString$0: function(receiver) { + toString$0(receiver) { return receiver; }, - get$hashCode: function(receiver) { + get$hashCode(receiver) { var t1, hash, i; for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { - hash = 536870911 & hash + receiver.charCodeAt(i); - hash = 536870911 & hash + ((524287 & hash) << 10); + hash = hash + receiver.charCodeAt(i) & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; hash ^= hash >> 6; } - hash = 536870911 & hash + ((67108863 & hash) << 3); + hash = hash + ((hash & 67108863) << 3) & 536870911; hash ^= hash >> 11; - return 536870911 & hash + ((16383 & hash) << 15); + return hash + ((hash & 16383) << 15) & 536870911; }, - get$length: function(receiver) { + get$length(receiver) { return receiver.length; }, - $index: function(receiver, index) { - H.intTypeCheck(index); - if (index >= receiver.length || false) - throw H.wrapException(H.diagnoseIndexError(receiver, index)); + $index(receiver, index) { + A._asInt(index); + if (index >= receiver.length) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); return receiver[index]; }, $isPattern: 1, $isString: 1 }; - H.CodeUnits.prototype = { - get$length: function(_) { - return this._string.length; + A.CastStream.prototype = { + listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { + var t2, + t1 = this.$ti; + t1._eval$1("~(2)?")._as(onData); + t2 = this._source.listen$3$cancelOnError$onDone(null, cancelOnError, type$.nullable_void_Function._as(onDone)); + t1 = new A.CastStreamSubscription(t2, $.Zone__current, t1._eval$1("@<1>")._bind$1(t1._rest[1])._eval$1("CastStreamSubscription<1,2>")); + t2.onData$1(t1.get$__internal$_onData()); + t1.onData$1(onData); + t1.onError$1(0, onError); + return t1; }, - $index: function(_, i) { - return C.JSString_methods.codeUnitAt$1(this._string, H.intTypeCheck(i)); + listen$1(onData) { + return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); + }, + listen$3$onDone$onError(onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError); + }, + listen$3$cancelOnError$onDone(onData, cancelOnError, onDone) { + return this.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, null); + } + }; + A.CastStreamSubscription.prototype = { + cancel$0() { + return this._source.cancel$0(); }, - $asEfficientLengthIterable: function() { - return [P.int]; + onData$1(handleData) { + var t1 = this.$ti; + t1._eval$1("~(2)?")._as(handleData); + this.set$_handleData(handleData == null ? null : this.__internal$_zone.registerUnaryCallback$2$1(handleData, type$.dynamic, t1._rest[1])); + }, + onError$1(_, handleError) { + var _this = this; + _this._source.onError$1(0, handleError); + if (handleError == null) + _this._handleError = null; + else if (type$.void_Function_Object_StackTrace._is(handleError)) + _this._handleError = _this.__internal$_zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); + else if (type$.void_Function_Object._is(handleError)) + _this._handleError = _this.__internal$_zone.registerUnaryCallback$2$1(handleError, type$.dynamic, type$.Object); + else + throw A.wrapException(A.ArgumentError$(string$.handle, null)); }, - $asUnmodifiableListMixin: function() { - return [P.int]; + __internal$_onData$1(data) { + var targetData, error, stack, handleError, t2, exception, _this = this, + t1 = _this.$ti; + t1._precomputed1._as(data); + t2 = _this._handleData; + if (t2 == null) + return; + targetData = null; + try { + targetData = t1._rest[1]._as(data); + } catch (exception) { + error = A.unwrapException(exception); + stack = A.getTraceFromException(exception); + handleError = _this._handleError; + if (handleError == null) + _this.__internal$_zone.handleUncaughtError$2(error, stack); + else { + t1 = type$.Object; + t2 = _this.__internal$_zone; + if (type$.void_Function_Object_StackTrace._is(handleError)) + t2.runBinaryGuarded$2$3(handleError, error, stack, t1, type$.StackTrace); + else + t2.runUnaryGuarded$1$2(type$.void_Function_Object._as(handleError), error, t1); + } + return; + } + _this.__internal$_zone.runUnaryGuarded$1$2(t2, targetData, t1._rest[1]); }, - $asListMixin: function() { - return [P.int]; + set$_handleData(_handleData) { + this._handleData = this.$ti._eval$1("~(2)?")._as(_handleData); }, - $asIterable: function() { - return [P.int]; + $isStreamSubscription: 1 + }; + A.LateError.prototype = { + toString$0(_) { + return "LateInitializationError: " + this._message; + } + }; + A.CodeUnits.prototype = { + get$length(_) { + return this._string.length; }, - $asList: function() { - return [P.int]; + $index(_, i) { + return B.JSString_methods.codeUnitAt$1(this._string, A._asInt(i)); } }; - H.EfficientLengthIterable.prototype = {}; - H.ListIterable.prototype = { - get$iterator: function(_) { - return new H.ListIterator(this, this.get$length(this), 0, [H.getRuntimeTypeArgument(this, "ListIterable", 0)]); + A.nullFuture_closure.prototype = { + call$0() { + return A.Future_Future$value(null, type$.Null); + }, + $signature: 46 + }; + A.SentinelValue.prototype = {}; + A.EfficientLengthIterable.prototype = {}; + A.ListIterable.prototype = { + get$iterator(_) { + var _this = this; + return new A.ListIterator(_this, _this.get$length(_this), A._instanceType(_this)._eval$1("ListIterator")); }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this.get$length(this) === 0; }, - join$1: function(_, separator) { - var $length, first, t1, i; - $length = this.get$length(this); + join$1(_, separator) { + var first, t1, i, _this = this, + $length = _this.get$length(_this); if (separator.length !== 0) { if ($length === 0) return ""; - first = H.S(this.elementAt$1(0, 0)); - if ($length !== this.get$length(this)) - throw H.wrapException(P.ConcurrentModificationError$(this)); + first = A.S(_this.elementAt$1(0, 0)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); for (t1 = first, i = 1; i < $length; ++i) { - t1 = t1 + separator + H.S(this.elementAt$1(0, i)); - if ($length !== this.get$length(this)) - throw H.wrapException(P.ConcurrentModificationError$(this)); + t1 = t1 + separator + A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); } return t1.charCodeAt(0) == 0 ? t1 : t1; } else { for (i = 0, t1 = ""; i < $length; ++i) { - t1 += H.S(this.elementAt$1(0, i)); - if ($length !== this.get$length(this)) - throw H.wrapException(P.ConcurrentModificationError$(this)); + t1 += A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); } return t1.charCodeAt(0) == 0 ? t1 : t1; } }, - join$0: function($receiver) { + join$0($receiver) { return this.join$1($receiver, ""); }, - fold$1$2: function(_, initialValue, combine, $T) { - var $length, value, i; - H.assertSubtypeOfRuntimeType(initialValue, $T); - H.functionTypeCheck(combine, {func: 1, ret: $T, args: [$T, H.getRuntimeTypeArgument(this, "ListIterable", 0)]}); - $length = this.get$length(this); + fold$1$2(_, initialValue, combine, $T) { + var $length, value, i, _this = this; + $T._as(initialValue); + A._instanceType(_this)._bind$1($T)._eval$1("1(1,ListIterable.E)")._as(combine); + $length = _this.get$length(_this); for (value = initialValue, i = 0; i < $length; ++i) { - value = combine.call$2(value, this.elementAt$1(0, i)); - if ($length !== this.get$length(this)) - throw H.wrapException(P.ConcurrentModificationError$(this)); + value = combine.call$2(value, _this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); } return value; - }, - toList$1$growable: function(_, growable) { - var result, i; - result = H.setRuntimeTypeInfo([], [H.getRuntimeTypeArgument(this, "ListIterable", 0)]); - C.JSArray_methods.set$length(result, this.get$length(this)); - for (i = 0; i < this.get$length(this); ++i) - C.JSArray_methods.$indexSet(result, i, this.elementAt$1(0, i)); - return result; - }, - toList$0: function($receiver) { - return this.toList$1$growable($receiver, true); } }; - H.SubListIterable.prototype = { - get$_endIndex: function() { - var $length, t1; - $length = J.get$length$asx(this.__internal$_iterable); - t1 = this._endOrLength; - if (t1 == null || t1 > $length) + A.SubListIterable.prototype = { + SubListIterable$3(_iterable, _start, _endOrLength, $E) { + var endOrLength, + t1 = this.__internal$_start; + A.RangeError_checkNotNegative(t1, "start"); + endOrLength = this._endOrLength; + if (endOrLength != null) { + A.RangeError_checkNotNegative(endOrLength, "end"); + if (t1 > endOrLength) + throw A.wrapException(A.RangeError$range(t1, 0, endOrLength, "start", null)); + } + }, + get$_endIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength > $length) return $length; - return t1; + return endOrLength; }, - get$_startIndex: function() { - var $length, t1; - $length = J.get$length$asx(this.__internal$_iterable); - t1 = this.__internal$_start; + get$_startIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + t1 = this.__internal$_start; if (t1 > $length) return $length; return t1; }, - get$length: function(_) { - var $length, t1, t2; - $length = J.get$length$asx(this.__internal$_iterable); - t1 = this.__internal$_start; + get$length(_) { + var endOrLength, + $length = J.get$length$asx(this.__internal$_iterable), + t1 = this.__internal$_start; if (t1 >= $length) return 0; - t2 = this._endOrLength; - if (t2 == null || t2 >= $length) + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength >= $length) return $length - t1; - if (typeof t2 !== "number") - return t2.$sub(); - return t2 - t1; - }, - elementAt$1: function(_, index) { - var realIndex, t1; - realIndex = this.get$_startIndex() + index; - if (index >= 0) { - t1 = this.get$_endIndex(); - if (typeof t1 !== "number") - return H.iae(t1); - t1 = realIndex >= t1; - } else - t1 = true; - if (t1) - throw H.wrapException(P.IndexError$(index, this, "index", null, null)); - return J.elementAt$1$ax(this.__internal$_iterable, realIndex); - } - }; - H.ListIterator.prototype = { - get$current: function() { - return this.__internal$_current; - }, - moveNext$0: function() { - var t1, t2, $length, t3; - t1 = this.__internal$_iterable; - t2 = J.getInterceptor$asx(t1); - $length = t2.get$length(t1); - if (this.__internal$_length !== $length) - throw H.wrapException(P.ConcurrentModificationError$(t1)); - t3 = this.__internal$_index; + if (typeof endOrLength !== "number") + return endOrLength.$sub(); + return endOrLength - t1; + }, + elementAt$1(_, index) { + var _this = this, + realIndex = _this.get$_startIndex() + index; + if (index < 0 || realIndex >= _this.get$_endIndex()) + throw A.wrapException(A.IndexError$(index, _this, "index", null, null)); + return J.elementAt$1$ax(_this.__internal$_iterable, realIndex); + } + }; + A.ListIterator.prototype = { + get$current() { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t3, _this = this, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + $length = t2.get$length(t1); + if (_this.__internal$_length !== $length) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + t3 = _this.__internal$_index; if (t3 >= $length) { - this.set$__internal$_current(null); + _this.set$__internal$_current(null); return false; } - this.set$__internal$_current(t2.elementAt$1(t1, t3)); - ++this.__internal$_index; + _this.set$__internal$_current(t2.elementAt$1(t1, t3)); + ++_this.__internal$_index; return true; }, - set$__internal$_current: function(_current) { - this.__internal$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + set$__internal$_current(_current) { + this.__internal$_current = this.$ti._eval$1("1?")._as(_current); }, $isIterator: 1 }; - H.MappedIterable.prototype = { - get$iterator: function(_) { - return new H.MappedIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, this.$ti); + A.MappedIterable.prototype = { + get$iterator(_) { + var t1 = A._instanceType(this); + return new A.MappedIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, t1._eval$1("@<1>")._bind$1(t1._rest[1])._eval$1("MappedIterator<1,2>")); }, - get$length: function(_) { + get$length(_) { return J.get$length$asx(this.__internal$_iterable); - }, - $asIterable: function($S, $T) { - return [$T]; } }; - H.EfficientLengthMappedIterable.prototype = {$isEfficientLengthIterable: 1, - $asEfficientLengthIterable: function($S, $T) { - return [$T]; - } - }; - H.MappedIterator.prototype = { - moveNext$0: function() { - var t1 = this._iterator; + A.EfficientLengthMappedIterable.prototype = {$isEfficientLengthIterable: 1}; + A.MappedIterator.prototype = { + moveNext$0() { + var _this = this, + t1 = _this._iterator; if (t1.moveNext$0()) { - this.set$__internal$_current(this._f.call$1(t1.get$current())); + _this.set$__internal$_current(_this._f.call$1(t1.get$current())); return true; } - this.set$__internal$_current(null); + _this.set$__internal$_current(null); return false; }, - get$current: function() { - return this.__internal$_current; + get$current() { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; }, - set$__internal$_current: function(_current) { - this.__internal$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 1)); - }, - $asIterator: function($S, $T) { - return [$T]; + set$__internal$_current(_current) { + this.__internal$_current = this.$ti._eval$1("2?")._as(_current); } }; - H.MappedListIterable.prototype = { - get$length: function(_) { + A.MappedListIterable.prototype = { + get$length(_) { return J.get$length$asx(this._source); }, - elementAt$1: function(_, index) { + elementAt$1(_, index) { return this._f.call$1(J.elementAt$1$ax(this._source, index)); - }, - $asEfficientLengthIterable: function($S, $T) { - return [$T]; - }, - $asListIterable: function($S, $T) { - return [$T]; - }, - $asIterable: function($S, $T) { - return [$T]; } }; - H.WhereIterable.prototype = { - get$iterator: function(_) { - return new H.WhereIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, this.$ti); + A.WhereIterable.prototype = { + get$iterator(_) { + return new A.WhereIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, this.$ti._eval$1("WhereIterator<1>")); } }; - H.WhereIterator.prototype = { - moveNext$0: function() { + A.WhereIterator.prototype = { + moveNext$0() { var t1, t2; for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();) - if (t2.call$1(t1.get$current())) + if (A.boolConversionCheck(t2.call$1(t1.get$current()))) return true; return false; }, - get$current: function() { + get$current() { return this._iterator.get$current(); } }; - H.ExpandIterable.prototype = { - get$iterator: function(_) { - return new H.ExpandIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, C.C_EmptyIterator, this.$ti); - }, - $asIterable: function($S, $T) { - return [$T]; + A.ExpandIterable.prototype = { + get$iterator(_) { + var t1 = this.$ti; + return new A.ExpandIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, B.C_EmptyIterator, t1._eval$1("@<1>")._bind$1(t1._rest[1])._eval$1("ExpandIterator<1,2>")); } }; - H.ExpandIterator.prototype = { - get$current: function() { - return this.__internal$_current; + A.ExpandIterator.prototype = { + get$current() { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; }, - moveNext$0: function() { - var t1, t2; - if (this._currentExpansion == null) + moveNext$0() { + var t1, t2, _this = this; + if (_this._currentExpansion == null) return false; - for (t1 = this._iterator, t2 = this._f; !this._currentExpansion.moveNext$0();) { - this.set$__internal$_current(null); + for (t1 = _this._iterator, t2 = _this._f; !_this._currentExpansion.moveNext$0();) { + _this.set$__internal$_current(null); if (t1.moveNext$0()) { - this.set$_currentExpansion(null); - this.set$_currentExpansion(J.get$iterator$ax(t2.call$1(t1.get$current()))); + _this.set$_currentExpansion(null); + _this.set$_currentExpansion(J.get$iterator$ax(t2.call$1(t1.get$current()))); } else return false; } - this.set$__internal$_current(this._currentExpansion.get$current()); + _this.set$__internal$_current(_this._currentExpansion.get$current()); return true; }, - set$_currentExpansion: function(_currentExpansion) { - this._currentExpansion = H.assertSubtype(_currentExpansion, "$isIterator", [H.getTypeArgumentByIndex(this, 1)], "$asIterator"); + set$_currentExpansion(_currentExpansion) { + this._currentExpansion = this.$ti._eval$1("Iterator<2>?")._as(_currentExpansion); + }, + set$__internal$_current(_current) { + this.__internal$_current = this.$ti._eval$1("2?")._as(_current); + }, + $isIterator: 1 + }; + A.TakeIterable.prototype = { + get$iterator(_) { + return new A.TakeIterator(J.get$iterator$ax(this.__internal$_iterable), this._takeCount, A._instanceType(this)._eval$1("TakeIterator<1>")); + } + }; + A.EfficientLengthTakeIterable.prototype = { + get$length(_) { + var iterableLength = J.get$length$asx(this.__internal$_iterable), + t1 = this._takeCount; + if (iterableLength > t1) + return t1; + return iterableLength; }, - set$__internal$_current: function(_current) { - this.__internal$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 1)); + $isEfficientLengthIterable: 1 + }; + A.TakeIterator.prototype = { + moveNext$0() { + if (--this._remaining >= 0) + return this._iterator.moveNext$0(); + this._remaining = -1; + return false; }, - $isIterator: 1, - $asIterator: function($S, $T) { - return [$T]; + get$current() { + if (this._remaining < 0) { + this.$ti._precomputed1._as(null); + return null; + } + return this._iterator.get$current(); } }; - H.SkipWhileIterable.prototype = { - get$iterator: function(_) { - return new H.SkipWhileIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, this.$ti); + A.SkipWhileIterable.prototype = { + get$iterator(_) { + return new A.SkipWhileIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, this.$ti._eval$1("SkipWhileIterator<1>")); } }; - H.SkipWhileIterator.prototype = { - moveNext$0: function() { - var t1, t2; - if (!this._hasSkipped) { - this._hasSkipped = true; - for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();) - if (!t2.call$1(t1.get$current())) + A.SkipWhileIterator.prototype = { + moveNext$0() { + var t1, t2, _this = this; + if (!_this._hasSkipped) { + _this._hasSkipped = true; + for (t1 = _this._iterator, t2 = _this._f; t1.moveNext$0();) + if (!A.boolConversionCheck(t2.call$1(t1.get$current()))) return true; } - return this._iterator.moveNext$0(); + return _this._iterator.moveNext$0(); }, - get$current: function() { + get$current() { return this._iterator.get$current(); } }; - H.EmptyIterator.prototype = { - moveNext$0: function() { + A.EmptyIterator.prototype = { + moveNext$0() { return false; }, - get$current: function() { - return; + get$current() { + throw A.wrapException(A.IterableElementError_noElement()); + }, + $isIterator: 1 + }; + A.WhereTypeIterable.prototype = { + get$iterator(_) { + return new A.WhereTypeIterator(J.get$iterator$ax(this._source), this.$ti._eval$1("WhereTypeIterator<1>")); + } + }; + A.WhereTypeIterator.prototype = { + moveNext$0() { + var t1, t2; + for (t1 = this._source, t2 = this.$ti._precomputed1; t1.moveNext$0();) + if (t2._is(t1.get$current())) + return true; + return false; + }, + get$current() { + return this.$ti._precomputed1._as(this._source.get$current()); }, $isIterator: 1 }; - H.FixedLengthListMixin.prototype = {}; - H.UnmodifiableListMixin.prototype = { - $indexSet: function(_, index, value) { - H.intTypeCheck(index); - H.assertSubtypeOfRuntimeType(value, H.getRuntimeTypeArgument(this, "UnmodifiableListMixin", 0)); - throw H.wrapException(P.UnsupportedError$("Cannot modify an unmodifiable list")); + A.FixedLengthListMixin.prototype = {}; + A.UnmodifiableListMixin.prototype = { + $indexSet(_, index, value) { + A._asInt(index); + A._instanceType(this)._eval$1("UnmodifiableListMixin.E")._as(value); + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); } }; - H.UnmodifiableListBase.prototype = {}; - H.ReversedListIterable.prototype = { - get$length: function(_) { + A.UnmodifiableListBase.prototype = {}; + A.ReversedListIterable.prototype = { + get$length(_) { return J.get$length$asx(this._source); }, - elementAt$1: function(_, index) { - var t1, t2; - t1 = this._source; - t2 = J.getInterceptor$asx(t1); + elementAt$1(_, index) { + var t1 = this._source, + t2 = J.getInterceptor$asx(t1); return t2.elementAt$1(t1, t2.get$length(t1) - 1 - index); } }; - H.Symbol.prototype = { - get$hashCode: function(_) { + A.Symbol.prototype = { + get$hashCode(_) { var hash = this._hashCode; if (hash != null) return hash; - hash = 536870911 & 664597 * J.get$hashCode$(this.__internal$_name); + hash = 664597 * J.get$hashCode$(this._name) & 536870911; this._hashCode = hash; return hash; }, - toString$0: function(_) { - return 'Symbol("' + H.S(this.__internal$_name) + '")'; + toString$0(_) { + return 'Symbol("' + A.S(this._name) + '")'; }, - $eq: function(_, other) { + $eq(_, other) { if (other == null) return false; - return other instanceof H.Symbol && this.__internal$_name == other.__internal$_name; + return other instanceof A.Symbol && this._name == other._name; }, $isSymbol0: 1 }; - H.ConstantMapView.prototype = {}; - H.ConstantMap.prototype = { - get$isEmpty: function(_) { + A.ConstantMapView.prototype = {}; + A.ConstantMap.prototype = { + get$isEmpty(_) { return this.get$length(this) === 0; }, - toString$0: function(_) { - return P.MapBase_mapToString(this); + toString$0(_) { + return A.MapBase_mapToString(this); }, - $indexSet: function(_, key, val) { - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)); - H.assertSubtypeOfRuntimeType(val, H.getTypeArgumentByIndex(this, 1)); - return H.ConstantMap__throwUnmodifiable(); + $indexSet(_, key, val) { + var t1 = A._instanceType(this); + t1._precomputed1._as(key); + t1._rest[1]._as(val); + A.ConstantMap__throwUnmodifiable(); }, $isMap: 1 }; - H.ConstantStringMap.prototype = { - get$length: function(_) { + A.ConstantStringMap.prototype = { + get$length(_) { return this.__js_helper$_length; }, - containsKey$1: function(key) { - if (typeof key !== "string") - return false; + containsKey$1(key) { if ("__proto__" === key) return false; return this._jsObject.hasOwnProperty(key); }, - $index: function(_, key) { + $index(_, key) { if (!this.containsKey$1(key)) - return; - return this._fetch$1(key); + return null; + return this._jsObject[key]; }, - _fetch$1: function(key) { - return this._jsObject[H.stringTypeCheck(key)]; - }, - forEach$1: function(_, f) { - var t1, keys, t2, i, key; - t1 = H.getTypeArgumentByIndex(this, 1); - H.functionTypeCheck(f, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0), t1]}); - keys = this._keys; - for (t2 = keys.length, i = 0; i < t2; ++i) { - key = keys[i]; - f.call$2(key, H.assertSubtypeOfRuntimeType(this._fetch$1(key), t1)); + forEach$1(_, f) { + var keys, t2, t3, i, t4, + t1 = this.$ti; + t1._eval$1("~(1,2)")._as(f); + keys = this.__js_helper$_keys; + for (t2 = keys.length, t3 = this._jsObject, t1 = t1._rest[1], i = 0; i < t2; ++i) { + t4 = A._asString(keys[i]); + f.call$2(t4, t1._as(t3[t4])); } } }; - H.Instantiation.prototype = { - Instantiation$1: function(_genericClosure) { - if (false) - H.instantiatedGenericFunctionType(0, 0); + A.Instantiation.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Instantiation && this._genericClosure.$eq(0, other._genericClosure) && A.getRuntimeType(this) === A.getRuntimeType(other); + }, + get$hashCode(_) { + return A.Object_hash(this._genericClosure, A.getRuntimeType(this)); }, - toString$0: function(_) { - var types = "<" + C.JSArray_methods.join$1([new H.TypeImpl(H.getTypeArgumentByIndex(this, 0))], ", ") + ">"; - return H.S(this._genericClosure) + " with " + types; + toString$0(_) { + var t1 = B.JSArray_methods.join$1([A.createRuntimeType(this.$ti._precomputed1)], ", "); + return this._genericClosure.toString$0(0) + " with " + ("<" + t1 + ">"); } }; - H.Instantiation1.prototype = { - call$2: function(a0, a1) { - return this._genericClosure.call$1$2(a0, a1, this.$ti[0]); + A.Instantiation1.prototype = { + call$2(a0, a1) { + return this._genericClosure.call$1$2(a0, a1, this.$ti._rest[0]); }, - call$4: function(a0, a1, a2, a3) { - return this._genericClosure.call$1$4(a0, a1, a2, a3, this.$ti[0]); + call$4(a0, a1, a2, a3) { + return this._genericClosure.call$1$4(a0, a1, a2, a3, this.$ti._rest[0]); }, - $signature: function() { - return H.instantiatedGenericFunctionType(H.extractFunctionTypeObjectFromInternal(this._genericClosure), this.$ti); + $signature() { + return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.$ti); } }; - H.JSInvocationMirror.prototype = { - get$memberName: function() { + A.JSInvocationMirror.prototype = { + get$memberName() { var t1 = this._memberName; return t1; }, - get$positionalArguments: function() { - var t1, argumentCount, list, index; - if (this._kind === 1) - return C.List_empty0; - t1 = this._arguments; - argumentCount = t1.length - this._namedArgumentNames.length - this._typeArgumentCount; + get$positionalArguments() { + var t1, argumentCount, list, index, _this = this; + if (_this.__js_helper$_kind === 1) + return B.List_empty0; + t1 = _this._arguments; + argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount; if (argumentCount === 0) - return C.List_empty0; + return B.List_empty0; list = []; for (index = 0; index < argumentCount; ++index) { - if (index >= t1.length) - return H.ioore(t1, index); + if (!(index < t1.length)) + return A.ioore(t1, index); list.push(t1[index]); } return J.JSArray_markUnmodifiableList(list); }, - get$namedArguments: function() { - var t1, namedArgumentCount, t2, namedArgumentsStartIndex, t3, map, i, t4, t5; - if (this._kind !== 0) - return C.Map_empty0; - t1 = this._namedArgumentNames; + get$namedArguments() { + var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, t3, t4, _this = this; + if (_this.__js_helper$_kind !== 0) + return B.Map_empty0; + t1 = _this._namedArgumentNames; namedArgumentCount = t1.length; - t2 = this._arguments; - namedArgumentsStartIndex = t2.length - namedArgumentCount - this._typeArgumentCount; + t2 = _this._arguments; + namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount; if (namedArgumentCount === 0) - return C.Map_empty0; - t3 = P.Symbol0; - map = new H.JsLinkedHashMap([t3, null]); + return B.Map_empty0; + map = new A.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); for (i = 0; i < namedArgumentCount; ++i) { - if (i >= t1.length) - return H.ioore(t1, i); - t4 = t1[i]; - t5 = namedArgumentsStartIndex + i; - if (t5 < 0 || t5 >= t2.length) - return H.ioore(t2, t5); - map.$indexSet(0, new H.Symbol(t4), t2[t5]); + if (!(i < t1.length)) + return A.ioore(t1, i); + t3 = t1[i]; + t4 = namedArgumentsStartIndex + i; + if (!(t4 >= 0 && t4 < t2.length)) + return A.ioore(t2, t4); + map.$indexSet(0, new A.Symbol(t3), t2[t4]); } - return new H.ConstantMapView(map, [t3, null]); + return new A.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); }, $isInvocation: 1 }; - H.Primitives_functionNoSuchMethod_closure.prototype = { - call$2: function($name, argument) { + A.Primitives_functionNoSuchMethod_closure.prototype = { + call$2($name, argument) { var t1; - H.stringTypeCheck($name); + A._asString($name); t1 = this._box_0; - t1.names = t1.names + "$" + H.S($name); - C.JSArray_methods.add$1(this.namedArgumentList, $name); - C.JSArray_methods.add$1(this.$arguments, argument); + t1.names = t1.names + "$" + $name; + B.JSArray_methods.add$1(this.namedArgumentList, $name); + B.JSArray_methods.add$1(this.$arguments, argument); ++t1.argumentCount; }, - $signature: 50 + $signature: 44 }; - H.TypeErrorDecoder.prototype = { - matchTypeError$1: function(message) { - var match, result, t1; - match = new RegExp(this._pattern).exec(message); + A.TypeErrorDecoder.prototype = { + matchTypeError$1(message) { + var result, t1, _this = this, + match = new RegExp(_this._pattern).exec(message); if (match == null) - return; + return null; result = Object.create(null); - t1 = this._arguments; + t1 = _this._arguments; if (t1 !== -1) result.arguments = match[t1 + 1]; - t1 = this._argumentsExpr; + t1 = _this._argumentsExpr; if (t1 !== -1) result.argumentsExpr = match[t1 + 1]; - t1 = this._expr; + t1 = _this._expr; if (t1 !== -1) result.expr = match[t1 + 1]; - t1 = this._method; + t1 = _this._method; if (t1 !== -1) result.method = match[t1 + 1]; - t1 = this._receiver; + t1 = _this._receiver; if (t1 !== -1) result.receiver = match[t1 + 1]; return result; } }; - H.NullError.prototype = { - toString$0: function(_) { + A.NullError.prototype = { + toString$0(_) { var t1 = this._method; if (t1 == null) - return "NoSuchMethodError: " + H.S(this._message); + return "NoSuchMethodError: " + this.__js_helper$_message; return "NoSuchMethodError: method not found: '" + t1 + "' on null"; } }; - H.JsNoSuchMethodError.prototype = { - toString$0: function(_) { - var t1, t2; - t1 = this._method; + A.JsNoSuchMethodError.prototype = { + toString$0(_) { + var t2, _this = this, + _s38_ = "NoSuchMethodError: method not found: '", + t1 = _this._method; if (t1 == null) - return "NoSuchMethodError: " + H.S(this._message); - t2 = this._receiver; + return "NoSuchMethodError: " + _this.__js_helper$_message; + t2 = _this._receiver; if (t2 == null) - return "NoSuchMethodError: method not found: '" + t1 + "' (" + H.S(this._message) + ")"; - return "NoSuchMethodError: method not found: '" + t1 + "' on '" + t2 + "' (" + H.S(this._message) + ")"; + return _s38_ + t1 + "' (" + _this.__js_helper$_message + ")"; + return _s38_ + t1 + "' on '" + t2 + "' (" + _this.__js_helper$_message + ")"; } }; - H.UnknownJsTypeError.prototype = { - toString$0: function(_) { - var t1 = this._message; + A.UnknownJsTypeError.prototype = { + toString$0(_) { + var t1 = this.__js_helper$_message; return t1.length === 0 ? "Error" : "Error: " + t1; } }; - H.ExceptionAndStackTrace.prototype = {}; - H.unwrapException_saveStackTrace.prototype = { - call$1: function(error) { - if (!!J.getInterceptor$(error).$isError) - if (error.$thrownJsError == null) - error.$thrownJsError = this.ex; - return error; + A.NullThrownFromJavaScriptException.prototype = { + toString$0(_) { + return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)"; }, - $signature: 8 + $isException: 1 }; - H._StackTrace.prototype = { - toString$0: function(_) { - var t1, trace; - t1 = this.__js_helper$_trace; + A.ExceptionAndStackTrace.prototype = {}; + A._StackTrace.prototype = { + toString$0(_) { + var trace, + t1 = this._trace; if (t1 != null) return t1; t1 = this._exception; trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; - t1 = trace == null ? "" : trace; - this.__js_helper$_trace = t1; - return t1; + return this._trace = trace == null ? "" : trace; }, $isStackTrace: 1 }; - H.Closure.prototype = { - toString$0: function(_) { - return "Closure '" + H.Primitives_objectTypeName(this).trim() + "'"; + A.Closure.prototype = { + toString$0(_) { + var $constructor = this.constructor, + $name = $constructor == null ? null : $constructor.name; + return "Closure '" + A.unminifyOrTag($name == null ? "unknown" : $name) + "'"; }, $isFunction: 1, - get$$call: function() { + get$$call() { return this; }, "call*": "call$1", $requiredArgCount: 1, $defaultValues: null }; - H.TearOffClosure.prototype = {}; - H.StaticClosure.prototype = { - toString$0: function(_) { + A.Closure0Args.prototype = {"call*": "call$0", $requiredArgCount: 0}; + A.Closure2Args.prototype = {"call*": "call$2", $requiredArgCount: 2}; + A.TearOffClosure.prototype = {}; + A.StaticClosure.prototype = { + toString$0(_) { var $name = this.$static_name; if ($name == null) return "Closure of unknown static method"; - return "Closure '" + H.unminifyOrTag($name) + "'"; + return "Closure '" + A.unminifyOrTag($name) + "'"; } }; - H.BoundClosure.prototype = { - $eq: function(_, other) { + A.BoundClosure.prototype = { + $eq(_, other) { if (other == null) return false; if (this === other) return true; - if (!(other instanceof H.BoundClosure)) + if (!(other instanceof A.BoundClosure)) return false; - return this._self === other._self && this._target === other._target && this._receiver === other._receiver; + return this.$_target === other.$_target && this._receiver === other._receiver; }, - get$hashCode: function(_) { - var t1, receiverHashCode; - t1 = this._receiver; - if (t1 == null) - receiverHashCode = H.Primitives_objectHashCode(this._self); - else - receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Primitives_objectHashCode(t1); - return (receiverHashCode ^ H.Primitives_objectHashCode(this._target)) >>> 0; + get$hashCode(_) { + return (A.objectHashCode(this._receiver) ^ A.Primitives_objectHashCode(this.$_target)) >>> 0; }, - toString$0: function(_) { - var receiver = this._receiver; - if (receiver == null) - receiver = this._self; - return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.Primitives_objectTypeName(receiver) + "'"); + toString$0(_) { + return "Closure '" + this.$_name + "' of " + ("Instance of '" + A.Primitives_objectTypeName(this._receiver) + "'"); } }; - H.TypeErrorImplementation.prototype = { - toString$0: function(_) { - return this.message; + A.RuntimeError.prototype = { + toString$0(_) { + return "RuntimeError: " + this.message; } }; - H.CastErrorImplementation.prototype = { - toString$0: function(_) { - return this.message; - } - }; - H.RuntimeError.prototype = { - toString$0: function(_) { - return "RuntimeError: " + H.S(this.message); - } - }; - H.TypeImpl.prototype = { - get$_typeName: function() { - var t1 = this.__typeName; - if (t1 == null) { - t1 = H.runtimeTypeToString(this._rti); - this.__typeName = t1; - } - return t1; - }, - toString$0: function(_) { - return this.get$_typeName(); - }, - get$hashCode: function(_) { - var t1 = this._hashCode; - if (t1 == null) { - t1 = C.JSString_methods.get$hashCode(this.get$_typeName()); - this._hashCode = t1; - } - return t1; - }, - $eq: function(_, other) { - if (other == null) - return false; - return other instanceof H.TypeImpl && this.get$_typeName() === other.get$_typeName(); + A._AssertionError.prototype = { + toString$0(_) { + return "Assertion failed: " + A.Error_safeToString(this.message); } }; - H.JsLinkedHashMap.prototype = { - get$length: function(_) { + A._Required.prototype = {}; + A.JsLinkedHashMap.prototype = { + get$length(_) { return this.__js_helper$_length; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this.__js_helper$_length === 0; }, - get$keys: function() { - return new H.LinkedHashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]); + get$keys() { + return new A.LinkedHashMapKeyIterable(this, A._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>")); }, - get$values: function(_) { - var t1 = H.getTypeArgumentByIndex(this, 0); - return H.MappedIterable_MappedIterable(new H.LinkedHashMapKeyIterable(this, [t1]), new H.JsLinkedHashMap_values_closure(this), t1, H.getTypeArgumentByIndex(this, 1)); + get$values(_) { + var t1 = A._instanceType(this); + return A.MappedIterable_MappedIterable(new A.LinkedHashMapKeyIterable(this, t1._eval$1("LinkedHashMapKeyIterable<1>")), new A.JsLinkedHashMap_values_closure(this), t1._precomputed1, t1._rest[1]); }, - containsKey$1: function(key) { + containsKey$1(key) { var strings, nums; - if (typeof key === "string") { - strings = this._strings; + if (typeof key == "string") { + strings = this.__js_helper$_strings; if (strings == null) return false; - return this._containsTableEntry$2(strings, key); - } else if (typeof key === "number" && (key & 0x3ffffff) === key) { - nums = this._nums; + return strings[key] != null; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this.__js_helper$_nums; if (nums == null) return false; - return this._containsTableEntry$2(nums, key); + return nums[key] != null; } else return this.internalContainsKey$1(key); }, - internalContainsKey$1: function(key) { - var rest = this._rest; + internalContainsKey$1(key) { + var rest = this.__js_helper$_rest; if (rest == null) return false; - return this.internalFindBucketIndex$2(this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff), key) >= 0; + return this.internalFindBucketIndex$2(rest[this.internalComputeHashCode$1(key)], key) >= 0; }, - $index: function(_, key) { - var strings, cell, t1, nums; - if (typeof key === "string") { - strings = this._strings; + $index(_, key) { + var strings, cell, t1, nums, _null = null; + if (typeof key == "string") { + strings = this.__js_helper$_strings; if (strings == null) - return; - cell = this._getTableCell$2(strings, key); - t1 = cell == null ? null : cell.hashMapCellValue; + return _null; + cell = strings[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; return t1; - } else if (typeof key === "number" && (key & 0x3ffffff) === key) { - nums = this._nums; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this.__js_helper$_nums; if (nums == null) - return; - cell = this._getTableCell$2(nums, key); - t1 = cell == null ? null : cell.hashMapCellValue; + return _null; + cell = nums[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; return t1; } else return this.internalGet$1(key); }, - internalGet$1: function(key) { - var rest, bucket, index; - rest = this._rest; + internalGet$1(key) { + var bucket, index, + rest = this.__js_helper$_rest; if (rest == null) - return; - bucket = this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff); + return null; + bucket = rest[this.internalComputeHashCode$1(key)]; index = this.internalFindBucketIndex$2(bucket, key); if (index < 0) - return; + return null; return bucket[index].hashMapCellValue; }, - $indexSet: function(_, key, value) { - var strings, nums, rest, hash, bucket, index; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 1)); - if (typeof key === "string") { - strings = this._strings; - if (strings == null) { - strings = this._newHashTable$0(); - this._strings = strings; - } - this._addHashTableEntry$3(strings, key, value); - } else if (typeof key === "number" && (key & 0x3ffffff) === key) { - nums = this._nums; - if (nums == null) { - nums = this._newHashTable$0(); - this._nums = nums; - } - this._addHashTableEntry$3(nums, key, value); - } else { - rest = this._rest; - if (rest == null) { - rest = this._newHashTable$0(); - this._rest = rest; - } - hash = J.get$hashCode$(key) & 0x3ffffff; - bucket = this._getTableBucket$2(rest, hash); - if (bucket == null) - this._setTableEntry$3(rest, hash, [this._newLinkedCell$2(key, value)]); - else { - index = this.internalFindBucketIndex$2(bucket, key); - if (index >= 0) - bucket[index].hashMapCellValue = value; - else - bucket.push(this._newLinkedCell$2(key, value)); - } + $indexSet(_, key, value) { + var strings, nums, _this = this, + t1 = A._instanceType(_this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); + if (typeof key == "string") { + strings = _this.__js_helper$_strings; + _this.__js_helper$_addHashTableEntry$3(strings == null ? _this.__js_helper$_strings = _this._newHashTable$0() : strings, key, value); + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = _this.__js_helper$_nums; + _this.__js_helper$_addHashTableEntry$3(nums == null ? _this.__js_helper$_nums = _this._newHashTable$0() : nums, key, value); + } else + _this.internalSet$2(key, value); + }, + internalSet$2(key, value) { + var rest, hash, bucket, index, _this = this, + t1 = A._instanceType(_this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); + rest = _this.__js_helper$_rest; + if (rest == null) + rest = _this.__js_helper$_rest = _this._newHashTable$0(); + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [_this._newLinkedCell$2(key, value)]; + else { + index = _this.internalFindBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index].hashMapCellValue = value; + else + bucket.push(_this._newLinkedCell$2(key, value)); } }, - putIfAbsent$2: function(key, ifAbsent) { - var value; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)); - H.functionTypeCheck(ifAbsent, {func: 1, ret: H.getTypeArgumentByIndex(this, 1)}); - if (this.containsKey$1(key)) - return this.$index(0, key); + putIfAbsent$2(key, ifAbsent) { + var t2, value, _this = this, + t1 = A._instanceType(_this); + t1._precomputed1._as(key); + t1._eval$1("2()")._as(ifAbsent); + if (_this.containsKey$1(key)) { + t2 = _this.$index(0, key); + return t2 == null ? t1._rest[1]._as(t2) : t2; + } value = ifAbsent.call$0(); - this.$indexSet(0, key, value); + _this.$indexSet(0, key, value); return value; }, - remove$1: function(_, key) { - if (typeof key === "string") - return this._removeHashTableEntry$2(this._strings, key); - else if (typeof key === "number" && (key & 0x3ffffff) === key) - return this._removeHashTableEntry$2(this._nums, key); + remove$1(_, key) { + var _this = this; + if (typeof key == "string") + return _this._removeHashTableEntry$2(_this.__js_helper$_strings, key); + else if (typeof key == "number" && (key & 0x3fffffff) === key) + return _this._removeHashTableEntry$2(_this.__js_helper$_nums, key); else - return this.internalRemove$1(key); + return _this.internalRemove$1(key); }, - internalRemove$1: function(key) { - var rest, bucket, index, cell; - rest = this._rest; + internalRemove$1(key) { + var hash, bucket, index, cell, _this = this, + rest = _this.__js_helper$_rest; if (rest == null) - return; - bucket = this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff); - index = this.internalFindBucketIndex$2(bucket, key); + return null; + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + index = _this.internalFindBucketIndex$2(bucket, key); if (index < 0) - return; + return null; cell = bucket.splice(index, 1)[0]; - this._unlinkCell$1(cell); + _this._unlinkCell$1(cell); + if (bucket.length === 0) + delete rest[hash]; return cell.hashMapCellValue; }, - clear$0: function(_) { - if (this.__js_helper$_length > 0) { - this._last = null; - this._first = null; - this._rest = null; - this._nums = null; - this._strings = null; - this.__js_helper$_length = 0; - this._modified$0(); - } - }, - forEach$1: function(_, action) { - var cell, modifications; - H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentByIndex(this, 1)]}); - cell = this._first; - modifications = this._modifications; + clear$0(_) { + var _this = this; + if (_this.__js_helper$_length > 0) { + _this.__js_helper$_strings = _this.__js_helper$_nums = _this.__js_helper$_rest = _this._first = _this._last = null; + _this.__js_helper$_length = 0; + _this._modified$0(); + } + }, + forEach$1(_, action) { + var cell, modifications, _this = this; + A._instanceType(_this)._eval$1("~(1,2)")._as(action); + cell = _this._first; + modifications = _this._modifications; for (; cell != null;) { action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); - if (modifications !== this._modifications) - throw H.wrapException(P.ConcurrentModificationError$(this)); + if (modifications !== _this._modifications) + throw A.wrapException(A.ConcurrentModificationError$(_this)); cell = cell._next; } }, - _addHashTableEntry$3: function(table, key, value) { - var cell; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 1)); - cell = this._getTableCell$2(table, key); + __js_helper$_addHashTableEntry$3(table, key, value) { + var cell, + t1 = A._instanceType(this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); + cell = table[key]; if (cell == null) - this._setTableEntry$3(table, key, this._newLinkedCell$2(key, value)); + table[key] = this._newLinkedCell$2(key, value); else cell.hashMapCellValue = value; }, - _removeHashTableEntry$2: function(table, key) { + _removeHashTableEntry$2(table, key) { var cell; if (table == null) - return; - cell = this._getTableCell$2(table, key); + return null; + cell = table[key]; if (cell == null) - return; + return null; this._unlinkCell$1(cell); - this._deleteTableEntry$2(table, key); + delete table[key]; return cell.hashMapCellValue; }, - _modified$0: function() { - this._modifications = this._modifications + 1 & 67108863; + _modified$0() { + this._modifications = this._modifications + 1 & 1073741823; }, - _newLinkedCell$2: function(key, value) { - var cell, last; - cell = new H.LinkedHashMapCell(H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)), H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 1))); - if (this._first == null) { - this._last = cell; - this._first = cell; - } else { - last = this._last; - cell._previous = last; - last._next = cell; - this._last = cell; + _newLinkedCell$2(key, value) { + var _this = this, + t1 = A._instanceType(_this), + cell = new A.LinkedHashMapCell(t1._precomputed1._as(key), t1._rest[1]._as(value)); + if (_this._first == null) + _this._first = _this._last = cell; + else { + t1 = _this._last; + t1.toString; + cell._previous = t1; + _this._last = t1._next = cell; } - ++this.__js_helper$_length; - this._modified$0(); + ++_this.__js_helper$_length; + _this._modified$0(); return cell; }, - _unlinkCell$1: function(cell) { - var previous, next; - previous = cell._previous; - next = cell._next; + _unlinkCell$1(cell) { + var _this = this, + previous = cell._previous, + next = cell._next; if (previous == null) - this._first = next; + _this._first = next; else previous._next = next; if (next == null) - this._last = previous; + _this._last = previous; else next._previous = previous; - --this.__js_helper$_length; - this._modified$0(); + --_this.__js_helper$_length; + _this._modified$0(); + }, + internalComputeHashCode$1(key) { + return J.get$hashCode$(key) & 0x3fffffff; }, - internalFindBucketIndex$2: function(bucket, key) { + internalFindBucketIndex$2(bucket, key) { var $length, i; if (bucket == null) return -1; @@ -7817,715 +8769,704 @@ return i; return -1; }, - toString$0: function(_) { - return P.MapBase_mapToString(this); + toString$0(_) { + return A.MapBase_mapToString(this); }, - _getTableCell$2: function(table, key) { - return table[key]; - }, - _getTableBucket$2: function(table, key) { - return table[key]; - }, - _setTableEntry$3: function(table, key, value) { - table[key] = value; - }, - _deleteTableEntry$2: function(table, key) { - delete table[key]; - }, - _containsTableEntry$2: function(table, key) { - return this._getTableCell$2(table, key) != null; - }, - _newHashTable$0: function() { + _newHashTable$0() { var table = Object.create(null); - this._setTableEntry$3(table, "", table); - this._deleteTableEntry$2(table, ""); + table[""] = table; + delete table[""]; return table; }, $isLinkedHashMap: 1 }; - H.JsLinkedHashMap_values_closure.prototype = { - call$1: function(each) { - var t1 = this.$this; - return t1.$index(0, H.assertSubtypeOfRuntimeType(each, H.getTypeArgumentByIndex(t1, 0))); + A.JsLinkedHashMap_values_closure.prototype = { + call$1(each) { + var t1 = this.$this, + t2 = A._instanceType(t1); + t1 = t1.$index(0, t2._precomputed1._as(each)); + return t1 == null ? t2._rest[1]._as(t1) : t1; }, - $signature: function() { - var t1 = this.$this; - return {func: 1, ret: H.getTypeArgumentByIndex(t1, 1), args: [H.getTypeArgumentByIndex(t1, 0)]}; + $signature() { + return A._instanceType(this.$this)._eval$1("2(1)"); } }; - H.LinkedHashMapCell.prototype = {}; - H.LinkedHashMapKeyIterable.prototype = { - get$length: function(_) { + A.LinkedHashMapCell.prototype = {}; + A.LinkedHashMapKeyIterable.prototype = { + get$length(_) { return this.__js_helper$_map.__js_helper$_length; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this.__js_helper$_map.__js_helper$_length === 0; }, - get$iterator: function(_) { - var t1, t2; - t1 = this.__js_helper$_map; - t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti); + get$iterator(_) { + var t1 = this.__js_helper$_map, + t2 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti._eval$1("LinkedHashMapKeyIterator<1>")); t2._cell = t1._first; return t2; } }; - H.LinkedHashMapKeyIterator.prototype = { - get$current: function() { + A.LinkedHashMapKeyIterator.prototype = { + get$current() { return this.__js_helper$_current; }, - moveNext$0: function() { - var t1 = this.__js_helper$_map; - if (this._modifications !== t1._modifications) - throw H.wrapException(P.ConcurrentModificationError$(t1)); - else { - t1 = this._cell; - if (t1 == null) { - this.set$__js_helper$_current(null); - return false; - } else { - this.set$__js_helper$_current(t1.hashMapCellKey); - this._cell = this._cell._next; - return true; - } + moveNext$0() { + var cell, _this = this, + t1 = _this.__js_helper$_map; + if (_this._modifications !== t1._modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + cell = _this._cell; + if (cell == null) { + _this.set$__js_helper$_current(null); + return false; + } else { + _this.set$__js_helper$_current(cell.hashMapCellKey); + _this._cell = cell._next; + return true; } }, - set$__js_helper$_current: function(_current) { - this.__js_helper$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + set$__js_helper$_current(_current) { + this.__js_helper$_current = this.$ti._eval$1("1?")._as(_current); }, $isIterator: 1 }; - H.initHooks_closure.prototype = { - call$1: function(o) { + A.initHooks_closure.prototype = { + call$1(o) { return this.getTag(o); }, - $signature: 8 + $signature: 14 }; - H.initHooks_closure0.prototype = { - call$2: function(o, tag) { + A.initHooks_closure0.prototype = { + call$2(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 65 + $signature: 42 }; - H.initHooks_closure1.prototype = { - call$1: function(tag) { - return this.prototypeForTag(H.stringTypeCheck(tag)); + A.initHooks_closure1.prototype = { + call$1(tag) { + return this.prototypeForTag(A._asString(tag)); }, - $signature: 48 + $signature: 53 }; - H.JSSyntaxRegExp.prototype = { - toString$0: function(_) { - return "RegExp/" + this.pattern + "/"; + A.JSSyntaxRegExp.prototype = { + toString$0(_) { + return "RegExp/" + this.pattern + "/" + this._nativeRegExp.flags; }, - get$_nativeGlobalVersion: function() { - var t1 = this._nativeGlobalRegExp; + get$_nativeGlobalVersion() { + var _this = this, + t1 = _this._nativeGlobalRegExp; if (t1 != null) return t1; - t1 = this._nativeRegExp; - t1 = H.JSSyntaxRegExp_makeNative(this.pattern, t1.multiline, !t1.ignoreCase, true); - this._nativeGlobalRegExp = t1; - return t1; + t1 = _this._nativeRegExp; + return _this._nativeGlobalRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern, t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); }, - get$_nativeAnchoredVersion: function() { - var t1 = this._nativeAnchoredRegExp; + get$_nativeAnchoredVersion() { + var _this = this, + t1 = _this._nativeAnchoredRegExp; if (t1 != null) return t1; - t1 = this._nativeRegExp; - t1 = H.JSSyntaxRegExp_makeNative(this.pattern + "|()", t1.multiline, !t1.ignoreCase, true); - this._nativeAnchoredRegExp = t1; - return t1; + t1 = _this._nativeRegExp; + return _this._nativeAnchoredRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern + "|()", t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, true); }, - firstMatch$1: function(string) { - var m; - if (typeof string !== "string") - H.throwExpression(H.argumentErrorValue(string)); - m = this._nativeRegExp.exec(string); + firstMatch$1(string) { + var m = this._nativeRegExp.exec(string); if (m == null) - return; - return new H._MatchImplementation(m); + return null; + return new A._MatchImplementation(m); }, - allMatches$2: function(_, string, start) { - if (start > string.length) - throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null)); - return new H._AllMatchesIterable(this, string, start); + allMatches$2(_, string, start) { + var t1 = string.length; + if (start > t1) + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._AllMatchesIterable(this, string, start); }, - allMatches$1: function($receiver, string) { + allMatches$1($receiver, string) { return this.allMatches$2($receiver, string, 0); }, - _execGlobal$2: function(string, start) { - var regexp, match; - regexp = this.get$_nativeGlobalVersion(); + _execGlobal$2(string, start) { + var match, + regexp = this.get$_nativeGlobalVersion(); + if (regexp == null) + regexp = type$.Object._as(regexp); regexp.lastIndex = start; match = regexp.exec(string); if (match == null) - return; - return new H._MatchImplementation(match); - }, - _execAnchored$2: function(string, start) { - var regexp, match; - regexp = this.get$_nativeAnchoredVersion(); + return null; + return new A._MatchImplementation(match); + }, + _execAnchored$2(string, start) { + var match, + regexp = this.get$_nativeAnchoredVersion(); + if (regexp == null) + regexp = type$.Object._as(regexp); regexp.lastIndex = start; match = regexp.exec(string); if (match == null) - return; + return null; if (0 >= match.length) - return H.ioore(match, -1); + return A.ioore(match, -1); if (match.pop() != null) - return; - return new H._MatchImplementation(match); + return null; + return new A._MatchImplementation(match); }, - matchAsPrefix$2: function(_, string, start) { - if (typeof start !== "number") - return start.$lt(); + matchAsPrefix$2(_, string, start) { if (start < 0 || start > string.length) - throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null)); + throw A.wrapException(A.RangeError$range(start, 0, string.length, null, null)); return this._execAnchored$2(string, start); }, $isPattern: 1, $isRegExp: 1 }; - H._MatchImplementation.prototype = { - get$start: function(_) { + A._MatchImplementation.prototype = { + get$start(_) { return this._match.index; }, - get$end: function() { + get$end() { var t1 = this._match; return t1.index + t1[0].length; }, - $index: function(_, index) { + $index(_, index) { var t1; - H.intTypeCheck(index); + A._asInt(index); t1 = this._match; - if (index >= t1.length) - return H.ioore(t1, index); + if (!(index < t1.length)) + return A.ioore(t1, index); return t1[index]; }, - $isMatch: 1 + $isMatch: 1, + $isRegExpMatch: 1 }; - H._AllMatchesIterable.prototype = { - get$iterator: function(_) { - return new H._AllMatchesIterator(this._re, this.__js_helper$_string, this._start); - }, - $asIterable: function() { - return [P.Match]; + A._AllMatchesIterable.prototype = { + get$iterator(_) { + return new A._AllMatchesIterator(this._re, this.__js_helper$_string, this._start); } }; - H._AllMatchesIterator.prototype = { - get$current: function() { - return this.__js_helper$_current; + A._AllMatchesIterator.prototype = { + get$current() { + var t1 = this.__js_helper$_current; + return t1 == null ? type$.RegExpMatch._as(t1) : t1; }, - moveNext$0: function() { - var t1, t2, match, nextIndex; - t1 = this.__js_helper$_string; - if (t1 == null) + moveNext$0() { + var t1, t2, t3, match, nextIndex, _this = this, + string = _this.__js_helper$_string; + if (string == null) return false; - t2 = this._nextIndex; - if (t2 <= t1.length) { - match = this._regExp._execGlobal$2(t1, t2); + t1 = _this._nextIndex; + t2 = string.length; + if (t1 <= t2) { + t3 = _this._regExp; + match = t3._execGlobal$2(string, t1); if (match != null) { - this.__js_helper$_current = match; + _this.__js_helper$_current = match; nextIndex = match.get$end(); - this._nextIndex = match._match.index === nextIndex ? nextIndex + 1 : nextIndex; + if (match._match.index === nextIndex) { + if (t3._nativeRegExp.unicode) { + t1 = _this._nextIndex; + t3 = t1 + 1; + if (t3 < t2) { + t1 = B.JSString_methods.codeUnitAt$1(string, t1); + if (t1 >= 55296 && t1 <= 56319) { + t1 = B.JSString_methods.codeUnitAt$1(string, t3); + t1 = t1 >= 56320 && t1 <= 57343; + } else + t1 = false; + } else + t1 = false; + } else + t1 = false; + nextIndex = (t1 ? nextIndex + 1 : nextIndex) + 1; + } + _this._nextIndex = nextIndex; return true; } } - this.__js_helper$_current = null; - this.__js_helper$_string = null; + _this.__js_helper$_string = _this.__js_helper$_current = null; return false; }, - $isIterator: 1, - $asIterator: function() { - return [P.Match]; - } + $isIterator: 1 }; - H.StringMatch.prototype = { - get$end: function() { - var t1 = this.start; - if (typeof t1 !== "number") - return t1.$add(); - return t1 + this.pattern.length; + A.StringMatch.prototype = { + get$end() { + return this.start + this.pattern.length; }, - $index: function(_, g) { - H.intTypeCheck(g); - if (g !== 0) - H.throwExpression(P.RangeError$value(g, null)); + $index(_, g) { + A.throwExpression(A.RangeError$value(A._asInt(g), null)); return this.pattern; }, $isMatch: 1, - get$start: function(receiver) { + get$start(receiver) { return this.start; } }; - H._StringAllMatchesIterable.prototype = { - get$iterator: function(_) { - return new H._StringAllMatchesIterator(this._input, this._pattern, this.__js_helper$_index); - }, - $asIterable: function() { - return [P.Match]; + A._StringAllMatchesIterable.prototype = { + get$iterator(_) { + return new A._StringAllMatchesIterator(this._input, this._pattern, this.__js_helper$_index); } }; - H._StringAllMatchesIterator.prototype = { - moveNext$0: function() { - var t1, t2, t3, t4, t5, index, end; - t1 = this.__js_helper$_index; - t2 = this._pattern; - t3 = t2.length; - t4 = this._input; - t5 = t4.length; + A._StringAllMatchesIterator.prototype = { + moveNext$0() { + var index, end, _this = this, + t1 = _this.__js_helper$_index, + t2 = _this._pattern, + t3 = t2.length, + t4 = _this._input, + t5 = t4.length; if (t1 + t3 > t5) { - this.__js_helper$_current = null; + _this.__js_helper$_current = null; return false; } index = t4.indexOf(t2, t1); if (index < 0) { - this.__js_helper$_index = t5 + 1; - this.__js_helper$_current = null; + _this.__js_helper$_index = t5 + 1; + _this.__js_helper$_current = null; return false; } end = index + t3; - this.__js_helper$_current = new H.StringMatch(index, t2); - this.__js_helper$_index = end === this.__js_helper$_index ? end + 1 : end; + _this.__js_helper$_current = new A.StringMatch(index, t2); + _this.__js_helper$_index = end === _this.__js_helper$_index ? end + 1 : end; return true; }, - get$current: function() { - return this.__js_helper$_current; + get$current() { + var t1 = this.__js_helper$_current; + t1.toString; + return t1; }, - $isIterator: 1, - $asIterator: function() { - return [P.Match]; + $isIterator: 1 + }; + A._Cell.prototype = { + _readLocal$0() { + var t1 = this.__late_helper$_value; + if (t1 === this) + throw A.wrapException(new A.LateError("Local '" + this.__late_helper$_name + "' has not been initialized.")); + return t1; } }; - H.NativeByteBuffer.prototype = {$isNativeByteBuffer: 1}; - H.NativeTypedData.prototype = {$isNativeTypedData: 1}; - H.NativeTypedArray.prototype = { - get$length: function(receiver) { + A.NativeByteBuffer.prototype = {$isNativeByteBuffer: 1}; + A.NativeTypedData.prototype = {$isNativeTypedData: 1}; + A.NativeTypedArray.prototype = { + get$length(receiver) { return receiver.length; }, - $isJavaScriptIndexingBehavior: 1, - $asJavaScriptIndexingBehavior: function() { - } + $isJavaScriptIndexingBehavior: 1 }; - H.NativeTypedArrayOfDouble.prototype = { - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeTypedArrayOfDouble.prototype = { + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; }, - $indexSet: function(receiver, index, value) { - H.intTypeCheck(index); - H.doubleTypeCheck(value); - H._checkValidIndex(index, receiver, receiver.length); + $indexSet(receiver, index, value) { + A._asInt(index); + A._asDouble(value); + A._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, $isEfficientLengthIterable: 1, - $asEfficientLengthIterable: function() { - return [P.double]; - }, - $asFixedLengthListMixin: function() { - return [P.double]; - }, - $asListMixin: function() { - return [P.double]; - }, $isIterable: 1, - $asIterable: function() { - return [P.double]; - }, - $isList: 1, - $asList: function() { - return [P.double]; - } + $isList: 1 }; - H.NativeTypedArrayOfInt.prototype = { - $indexSet: function(receiver, index, value) { - H.intTypeCheck(index); - H.intTypeCheck(value); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeTypedArrayOfInt.prototype = { + $indexSet(receiver, index, value) { + A._asInt(index); + A._asInt(value); + A._checkValidIndex(index, receiver, receiver.length); receiver[index] = value; }, $isEfficientLengthIterable: 1, - $asEfficientLengthIterable: function() { - return [P.int]; - }, - $asFixedLengthListMixin: function() { - return [P.int]; - }, - $asListMixin: function() { - return [P.int]; - }, $isIterable: 1, - $asIterable: function() { - return [P.int]; - }, - $isList: 1, - $asList: function() { - return [P.int]; - } + $isList: 1 }; - H.NativeInt16List.prototype = { - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeInt16List.prototype = { + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; } }; - H.NativeInt32List.prototype = { - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeInt32List.prototype = { + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; } }; - H.NativeInt8List.prototype = { - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeInt8List.prototype = { + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; } }; - H.NativeUint16List.prototype = { - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeUint16List.prototype = { + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; } }; - H.NativeUint32List.prototype = { - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + A.NativeUint32List.prototype = { + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; } }; - H.NativeUint8ClampedList.prototype = { - get$length: function(receiver) { + A.NativeUint8ClampedList.prototype = { + get$length(receiver) { return receiver.length; }, - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; } }; - H.NativeUint8List.prototype = { - get$length: function(receiver) { + A.NativeUint8List.prototype = { + get$length(receiver) { return receiver.length; }, - $index: function(receiver, index) { - H.intTypeCheck(index); - H._checkValidIndex(index, receiver, receiver.length); + $index(receiver, index) { + A._asInt(index); + A._checkValidIndex(index, receiver, receiver.length); return receiver[index]; }, - sublist$2: function(receiver, start, end) { - return new Uint8Array(receiver.subarray(start, H._checkValidRange(start, end, receiver.length))); + sublist$2(receiver, start, end) { + return new Uint8Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); }, $isNativeUint8List: 1, $isUint8List: 1 }; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; - P._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { - call$1: function(_) { - var t1, f; - t1 = this._box_0; - f = t1.storedCallback; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A.Rti.prototype = { + _eval$1(recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, this, recipe); + }, + _bind$1(typeOrTuple) { + return A._Universe_bind(init.typeUniverse, this, typeOrTuple); + } + }; + A._FunctionParameters.prototype = {}; + A._Type.prototype = { + toString$0(_) { + return A._rtiToString(this._rti, null); + } + }; + A._Error.prototype = { + toString$0(_) { + return this.__rti$_message; + } + }; + A._TypeError.prototype = {$isTypeError: 1}; + A._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { + call$1(_) { + var t1 = this._box_0, + f = t1.storedCallback; t1.storedCallback = null; f.call$0(); }, - $signature: 4 + $signature: 7 }; - P._AsyncRun__initializeScheduleImmediate_closure.prototype = { - call$1: function(callback) { + A._AsyncRun__initializeScheduleImmediate_closure.prototype = { + call$1(callback) { var t1, t2; - this._box_0.storedCallback = H.functionTypeCheck(callback, {func: 1, ret: -1}); + this._box_0.storedCallback = type$.void_Function._as(callback); t1 = this.div; t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 42 + $signature: 51 }; - P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { - call$0: function() { + A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { + call$0() { this.callback.call$0(); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 + $signature: 2 }; - P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { - call$0: function() { + A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { + call$0() { this.callback.call$0(); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 + $signature: 2 }; - P._TimerImpl.prototype = { - _TimerImpl$2: function(milliseconds, callback) { + A._TimerImpl.prototype = { + _TimerImpl$2(milliseconds, callback) { if (self.setTimeout != null) - self.setTimeout(H.convertDartClosureToJS(new P._TimerImpl_internalCallback(this, callback), 0), milliseconds); + self.setTimeout(A.convertDartClosureToJS(new A._TimerImpl_internalCallback(this, callback), 0), milliseconds); else - throw H.wrapException(P.UnsupportedError$("`setTimeout()` not found.")); + throw A.wrapException(A.UnsupportedError$("`setTimeout()` not found.")); }, - _TimerImpl$periodic$2: function(milliseconds, callback) { + _TimerImpl$periodic$2(milliseconds, callback) { if (self.setTimeout != null) - self.setInterval(H.convertDartClosureToJS(new P._TimerImpl$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds); + self.setInterval(A.convertDartClosureToJS(new A._TimerImpl$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds); else - throw H.wrapException(P.UnsupportedError$("Periodic timer.")); + throw A.wrapException(A.UnsupportedError$("Periodic timer.")); }, $isTimer: 1 }; - P._TimerImpl_internalCallback.prototype = { - call$0: function() { + A._TimerImpl_internalCallback.prototype = { + call$0() { this.$this._tick = 1; this.callback.call$0(); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - P._TimerImpl$periodic_closure.prototype = { - call$0: function() { - var t1, tick, t2, duration; - t1 = this.$this; - tick = t1._tick + 1; - t2 = this.milliseconds; + A._TimerImpl$periodic_closure.prototype = { + call$0() { + var duration, _this = this, + t1 = _this.$this, + tick = t1._tick + 1, + t2 = _this.milliseconds; if (t2 > 0) { - duration = Date.now() - this.start; + duration = Date.now() - _this.start; if (duration > (tick + 1) * t2) - tick = C.JSInt_methods.$tdiv(duration, t2); + tick = B.JSInt_methods.$tdiv(duration, t2); } t1._tick = tick; - this.callback.call$1(t1); + _this.callback.call$1(t1); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 + $signature: 2 }; - P._AsyncAwaitCompleter.prototype = { - complete$1: function(_, value) { - var t1; - H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(this, 0)}); - if (this.isSync) - this._completer.complete$1(0, value); - else if (H.checkSubtype(value, "$isFuture", this.$ti, "$asFuture")) { - t1 = this._completer; - value.then$1$2$onError(t1.get$complete(t1), t1.get$completeError(), -1); - } else - P.scheduleMicrotask(new P._AsyncAwaitCompleter_complete_closure(this, value)); + A._AsyncAwaitCompleter.prototype = { + complete$1(_, value) { + var t2, _this = this, + t1 = _this.$ti; + t1._eval$1("1/?")._as(value); + if (value == null) + t1._precomputed1._as(value); + if (!_this.isSync) + _this._future._asyncComplete$1(value); + else { + t2 = _this._future; + if (t1._eval$1("Future<1>")._is(value)) + t2._chainFuture$1(value); + else + t2._completeWithValue$1(t1._precomputed1._as(value)); + } }, - completeError$2: function(e, st) { + completeError$2(e, st) { + var t1 = this._future; if (this.isSync) - this._completer.completeError$2(e, st); + t1._completeError$2(e, st); else - P.scheduleMicrotask(new P._AsyncAwaitCompleter_completeError_closure(this, e, st)); + t1._asyncCompleteError$2(e, st); }, $isCompleter: 1 }; - P._AsyncAwaitCompleter_complete_closure.prototype = { - call$0: function() { - this.$this._completer.complete$1(0, this.value); - }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 - }; - P._AsyncAwaitCompleter_completeError_closure.prototype = { - call$0: function() { - this.$this._completer.completeError$2(this.e, this.st); - }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 - }; - P._awaitOnObject_closure.prototype = { - call$1: function(result) { + A._awaitOnObject_closure.prototype = { + call$1(result) { return this.bodyFunction.call$2(0, result); }, - $signature: 6 + $signature: 3 }; - P._awaitOnObject_closure0.prototype = { - call$2: function(error, stackTrace) { - this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, H.interceptedTypeCheck(stackTrace, "$isStackTrace"))); + A._awaitOnObject_closure0.prototype = { + call$2(error, stackTrace) { + this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - "call*": "call$2", - $requiredArgCount: 2, - $signature: 15 + $signature: 68 }; - P._wrapJsFunctionForAsync_closure.prototype = { - call$2: function(errorCode, result) { - this.$protected(H.intTypeCheck(errorCode), result); + A._wrapJsFunctionForAsync_closure.prototype = { + call$2(errorCode, result) { + this.$protected(A._asInt(errorCode), result); }, - "call*": "call$2", - $requiredArgCount: 2, $signature: 41 }; - P.Future.prototype = {}; - P._Completer.prototype = { - completeError$2: function(error, stackTrace) { + A.AsyncError.prototype = { + toString$0(_) { + return A.S(this.error); + }, + $isError: 1, + get$stackTrace() { + return this.stackTrace; + } + }; + A._Completer.prototype = { + completeError$2(error, stackTrace) { var replacement; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - if (error == null) - error = new P.NullThrownError(); - if (this.future._state !== 0) - throw H.wrapException(P.StateError$("Future already completed")); + A.checkNotNullable(error, "error", type$.Object); + if ((this.future._async$_state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); replacement = $.Zone__current.errorCallback$2(error, stackTrace); if (replacement != null) { error = replacement.error; - if (error == null) - error = new P.NullThrownError(); stackTrace = replacement.stackTrace; - } + } else if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); this._completeError$2(error, stackTrace); }, - completeError$1: function(error) { + completeError$1(error) { return this.completeError$2(error, null); }, $isCompleter: 1 }; - P._AsyncCompleter.prototype = { - complete$1: function(_, value) { - var t1; - H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(this, 0)}); - t1 = this.future; - if (t1._state !== 0) - throw H.wrapException(P.StateError$("Future already completed")); - t1._asyncComplete$1(value); + A._AsyncCompleter.prototype = { + complete$1(_, value) { + var t2, + t1 = this.$ti; + t1._eval$1("1/?")._as(value); + t2 = this.future; + if ((t2._async$_state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t2._asyncComplete$1(t1._eval$1("1/")._as(value)); }, - complete$0: function($receiver) { + complete$0($receiver) { return this.complete$1($receiver, null); }, - _completeError$2: function(error, stackTrace) { + _completeError$2(error, stackTrace) { this.future._asyncCompleteError$2(error, stackTrace); } }; - P._SyncCompleter.prototype = { - complete$1: function(_, value) { - var t1; - H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(this, 0)}); - t1 = this.future; - if (t1._state !== 0) - throw H.wrapException(P.StateError$("Future already completed")); - t1._complete$1(value); + A._SyncCompleter.prototype = { + complete$1(_, value) { + var t2, + t1 = this.$ti; + t1._eval$1("1/?")._as(value); + t2 = this.future; + if ((t2._async$_state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t2._complete$1(t1._eval$1("1/")._as(value)); }, - complete$0: function($receiver) { + complete$0($receiver) { return this.complete$1($receiver, null); }, - _completeError$2: function(error, stackTrace) { + _completeError$2(error, stackTrace) { this.future._completeError$2(error, stackTrace); } }; - P._FutureListener.prototype = { - matchesErrorTest$1: function(asyncError) { - if (this.state !== 6) + A._FutureListener.prototype = { + matchesErrorTest$1(asyncError) { + if ((this.state & 15) !== 6) return true; - return this.result._zone.runUnary$2$2(H.functionTypeCheck(this.callback, {func: 1, ret: P.bool, args: [P.Object]}), asyncError.error, P.bool, P.Object); - }, - handleError$1: function(asyncError) { - var errorCallback, t1, t2, t3; - errorCallback = this.errorCallback; - t1 = P.Object; - t2 = {futureOr: 1, type: H.getTypeArgumentByIndex(this, 1)}; - t3 = this.result._zone; - if (H.functionTypeTest(errorCallback, {func: 1, args: [P.Object, P.StackTrace]})) - return H.futureOrCheck(t3.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, null, t1, P.StackTrace), t2); + return this.result._zone.runUnary$2$2(type$.bool_Function_Object._as(this.callback), asyncError.error, type$.bool, type$.Object); + }, + handleError$1(asyncError) { + var exception, _this = this, + errorCallback = _this.errorCallback, + result = null, + t1 = type$.dynamic, + t2 = type$.Object, + t3 = asyncError.error, + t4 = _this.result._zone; + if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) + result = t4.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace); else - return H.futureOrCheck(t3.runUnary$2$2(H.functionTypeCheck(errorCallback, {func: 1, args: [P.Object]}), asyncError.error, null, t1), t2); + result = t4.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), t3, t1, t2); + try { + t1 = _this.$ti._eval$1("2/")._as(result); + return t1; + } catch (exception) { + if (type$.TypeError._is(A.unwrapException(exception))) { + if ((_this.state & 1) !== 0) + throw A.wrapException(A.ArgumentError$("The error handler of Future.then must return a value of the returned future's type", "onError")); + throw A.wrapException(A.ArgumentError$("The error handler of Future.catchError must return a value of the future's type", "onError")); + } else + throw exception; + } } }; - P._Future.prototype = { - then$1$2$onError: function(f, onError, $R) { - var t1, currentZone; - t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $R}, args: [t1]}); + A._Future.prototype = { + then$1$2$onError(f, onError, $R) { + var currentZone, result, t2, + t1 = this.$ti; + t1._bind$1($R)._eval$1("1/(2)")._as(f); currentZone = $.Zone__current; - if (currentZone !== C.C__RootZone) { - f = currentZone.registerUnaryCallback$2$1(f, {futureOr: 1, type: $R}, t1); + if (currentZone === B.C__RootZone) { + if (onError != null && !type$.dynamic_Function_Object_StackTrace._is(onError) && !type$.dynamic_Function_Object._is(onError)) + throw A.wrapException(A.ArgumentError$value(onError, "onError", string$.Error_)); + } else { + f = currentZone.registerUnaryCallback$2$1(f, $R._eval$1("0/"), t1._precomputed1); if (onError != null) - onError = P._registerErrorHandler(onError, currentZone); + onError = A._registerErrorHandler(onError, currentZone); } - return this._thenNoZoneRegistration$1$2(f, onError, $R); + result = new A._Future($.Zone__current, $R._eval$1("_Future<0>")); + t2 = onError == null ? 1 : 3; + this._addListener$1(new A._FutureListener(result, t2, f, onError, t1._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); + return result; }, - then$1$1: function(f, $R) { + then$1$1(f, $R) { return this.then$1$2$onError(f, null, $R); }, - _thenNoZoneRegistration$1$2: function(f, onError, $E) { - var t1, result, t2; - t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $E}, args: [t1]}); - result = new P._Future(0, $.Zone__current, [$E]); - t2 = onError == null ? 1 : 3; - this._addListener$1(new P._FutureListener(result, t2, f, onError, [t1, $E])); + _thenAwait$1$2(f, onError, $E) { + var result, + t1 = this.$ti; + t1._bind$1($E)._eval$1("1/(2)")._as(f); + result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); + this._addListener$1(new A._FutureListener(result, 3, f, onError, t1._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); return result; }, - whenComplete$1: function(action) { - var t1, result; - H.functionTypeCheck(action, {func: 1}); - t1 = $.Zone__current; - result = new P._Future(0, t1, this.$ti); - if (t1 !== C.C__RootZone) - action = t1.registerCallback$1$1(action, null); - t1 = H.getTypeArgumentByIndex(this, 0); - this._addListener$1(new P._FutureListener(result, 8, action, null, [t1, t1])); + whenComplete$1(action) { + var t1, t2, result; + type$.dynamic_Function._as(action); + t1 = this.$ti; + t2 = $.Zone__current; + result = new A._Future(t2, t1); + if (t2 !== B.C__RootZone) + action = t2.registerCallback$1$1(action, type$.dynamic); + this._addListener$1(new A._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>"))); return result; }, - _addListener$1: function(listener) { - var t1, source; - t1 = this._state; - if (t1 <= 1) { - listener._nextListener = H.interceptedTypeCheck(this._resultOrListeners, "$is_FutureListener"); - this._resultOrListeners = listener; + _setErrorObject$1(error) { + this._async$_state = this._async$_state & 1 | 16; + this._resultOrListeners = error; + }, + _cloneResult$1(source) { + this._async$_state = source._async$_state & 30 | this._async$_state & 1; + this._resultOrListeners = source._resultOrListeners; + }, + _addListener$1(listener) { + var source, _this = this, + t1 = _this._async$_state; + if (t1 <= 3) { + listener._nextListener = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners); + _this._resultOrListeners = listener; } else { - if (t1 === 2) { - source = H.interceptedTypeCheck(this._resultOrListeners, "$is_Future"); - t1 = source._state; - if (t1 < 4) { + if ((t1 & 4) !== 0) { + source = type$._Future_dynamic._as(_this._resultOrListeners); + if ((source._async$_state & 24) === 0) { source._addListener$1(listener); return; } - this._state = t1; - this._resultOrListeners = source._resultOrListeners; + _this._cloneResult$1(source); } - this._zone.scheduleMicrotask$1(new P._Future__addListener_closure(this, listener)); + _this._zone.scheduleMicrotask$1(new A._Future__addListener_closure(_this, listener)); } }, - _prependListeners$1: function(listeners) { - var _box_0, t1, existingListeners, cursor, cursor0, source; - _box_0 = {}; + _prependListeners$1(listeners) { + var t1, existingListeners, next, cursor, next0, source, _this = this, _box_0 = {}; _box_0.listeners = listeners; if (listeners == null) return; - t1 = this._state; - if (t1 <= 1) { - existingListeners = H.interceptedTypeCheck(this._resultOrListeners, "$is_FutureListener"); - this._resultOrListeners = listeners; + t1 = _this._async$_state; + if (t1 <= 3) { + existingListeners = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners); + _this._resultOrListeners = listeners; if (existingListeners != null) { - for (cursor = listeners; cursor0 = cursor._nextListener, cursor0 != null; cursor = cursor0) - ; + next = listeners._nextListener; + for (cursor = listeners; next != null; cursor = next, next = next0) + next0 = next._nextListener; cursor._nextListener = existingListeners; } } else { - if (t1 === 2) { - source = H.interceptedTypeCheck(this._resultOrListeners, "$is_Future"); - t1 = source._state; - if (t1 < 4) { + if ((t1 & 4) !== 0) { + source = type$._Future_dynamic._as(_this._resultOrListeners); + if ((source._async$_state & 24) === 0) { source._prependListeners$1(listeners); return; } - this._state = t1; - this._resultOrListeners = source._resultOrListeners; + _this._cloneResult$1(source); } - _box_0.listeners = this._reverseListeners$1(listeners); - this._zone.scheduleMicrotask$1(new P._Future__prependListeners_closure(_box_0, this)); + _box_0.listeners = _this._reverseListeners$1(listeners); + _this._zone.scheduleMicrotask$1(new A._Future__prependListeners_closure(_box_0, _this)); } }, - _removeListeners$0: function() { - var current = H.interceptedTypeCheck(this._resultOrListeners, "$is_FutureListener"); + _removeListeners$0() { + var current = type$.nullable__FutureListener_dynamic_dynamic._as(this._resultOrListeners); this._resultOrListeners = null; return this._reverseListeners$1(current); }, - _reverseListeners$1: function(listeners) { + _reverseListeners$1(listeners) { var current, prev, next; for (current = listeners, prev = null; current != null; prev = current, current = next) { next = current._nextListener; @@ -8533,424 +9474,413 @@ } return prev; }, - _complete$1: function(value) { - var t1, t2, listeners; - t1 = H.getTypeArgumentByIndex(this, 0); - H.futureOrCheck(value, {futureOr: 1, type: t1}); - t2 = this.$ti; - if (H.checkSubtype(value, "$isFuture", t2, "$asFuture")) - if (H.checkSubtype(value, "$is_Future", t2, null)) - P._Future__chainCoreFuture(value, this); + _chainForeignFuture$1(source) { + var e, s, exception, _this = this; + _this._async$_state ^= 2; + try { + source.then$1$2$onError(new A._Future__chainForeignFuture_closure(_this), new A._Future__chainForeignFuture_closure0(_this), type$.Null); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A.scheduleMicrotask(new A._Future__chainForeignFuture_closure1(_this, e, s)); + } + }, + _complete$1(value) { + var listeners, _this = this, + t1 = _this.$ti; + t1._eval$1("1/")._as(value); + if (t1._eval$1("Future<1>")._is(value)) + if (t1._is(value)) + A._Future__chainCoreFuture(value, _this); else - P._Future__chainForeignFuture(value, this); + _this._chainForeignFuture$1(value); else { - listeners = this._removeListeners$0(); - H.assertSubtypeOfRuntimeType(value, t1); - this._state = 4; - this._resultOrListeners = value; - P._Future__propagateToListeners(this, listeners); - } - }, - _completeError$2: function(error, stackTrace) { + listeners = _this._removeListeners$0(); + t1._precomputed1._as(value); + _this._async$_state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + } + }, + _completeWithValue$1(value) { + var listeners, _this = this; + _this.$ti._precomputed1._as(value); + listeners = _this._removeListeners$0(); + _this._async$_state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + }, + _completeError$2(error, stackTrace) { var listeners; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + type$.Object._as(error); + type$.StackTrace._as(stackTrace); listeners = this._removeListeners$0(); - this._state = 8; - this._resultOrListeners = new P.AsyncError(error, stackTrace); - P._Future__propagateToListeners(this, listeners); - }, - _completeError$1: function(error) { - return this._completeError$2(error, null); + this._setErrorObject$1(A.AsyncError$(error, stackTrace)); + A._Future__propagateToListeners(this, listeners); }, - _asyncComplete$1: function(value) { - H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(this, 0)}); - if (H.checkSubtype(value, "$isFuture", this.$ti, "$asFuture")) { + _asyncComplete$1(value) { + var t1 = this.$ti; + t1._eval$1("1/")._as(value); + if (t1._eval$1("Future<1>")._is(value)) { this._chainFuture$1(value); return; } - this._state = 1; - this._zone.scheduleMicrotask$1(new P._Future__asyncComplete_closure(this, value)); - }, - _chainFuture$1: function(value) { - var t1 = this.$ti; - H.assertSubtype(value, "$isFuture", t1, "$asFuture"); - if (H.checkSubtype(value, "$is_Future", t1, null)) { - if (value._state === 8) { - this._state = 1; - this._zone.scheduleMicrotask$1(new P._Future__chainFuture_closure(this, value)); + this._asyncCompleteWithValue$1(t1._precomputed1._as(value)); + }, + _asyncCompleteWithValue$1(value) { + var _this = this; + _this.$ti._precomputed1._as(value); + _this._async$_state ^= 2; + _this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteWithValue_closure(_this, value)); + }, + _chainFuture$1(value) { + var _this = this, + t1 = _this.$ti; + t1._eval$1("Future<1>")._as(value); + if (t1._is(value)) { + if ((value._async$_state & 16) !== 0) { + _this._async$_state ^= 2; + _this._zone.scheduleMicrotask$1(new A._Future__chainFuture_closure(_this, value)); } else - P._Future__chainCoreFuture(value, this); + A._Future__chainCoreFuture(value, _this); return; } - P._Future__chainForeignFuture(value, this); + _this._chainForeignFuture$1(value); }, - _asyncCompleteError$2: function(error, stackTrace) { - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - this._state = 1; - this._zone.scheduleMicrotask$1(new P._Future__asyncCompleteError_closure(this, error, stackTrace)); + _asyncCompleteError$2(error, stackTrace) { + type$.StackTrace._as(stackTrace); + this._async$_state ^= 2; + this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteError_closure(this, error, stackTrace)); }, $isFuture: 1 }; - P._Future__addListener_closure.prototype = { - call$0: function() { - P._Future__propagateToListeners(this.$this, this.listener); + A._Future__addListener_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this.listener); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - P._Future__prependListeners_closure.prototype = { - call$0: function() { - P._Future__propagateToListeners(this.$this, this._box_0.listeners); + A._Future__prependListeners_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this._box_0.listeners); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - P._Future__chainForeignFuture_closure.prototype = { - call$1: function(value) { - var t1 = this.target; - t1._state = 0; - t1._complete$1(value); + A._Future__chainForeignFuture_closure.prototype = { + call$1(value) { + var error, stackTrace, exception, + t1 = this.$this; + t1._async$_state ^= 2; + try { + t1._completeWithValue$1(t1.$ti._precomputed1._as(value)); + } catch (exception) { + error = A.unwrapException(exception); + stackTrace = A.getTraceFromException(exception); + t1._completeError$2(error, stackTrace); + } }, - $signature: 4 + $signature: 7 }; - P._Future__chainForeignFuture_closure0.prototype = { - call$2: function(error, stackTrace) { - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - this.target._completeError$2(error, stackTrace); + A._Future__chainForeignFuture_closure0.prototype = { + call$2(error, stackTrace) { + this.$this._completeError$2(type$.Object._as(error), type$.StackTrace._as(stackTrace)); }, - call$1: function(error) { - return this.call$2(error, null); - }, - "call*": "call$2", - $defaultValues: function() { - return [null]; - }, - $signature: 38 + $signature: 36 }; - P._Future__chainForeignFuture_closure1.prototype = { - call$0: function() { - this.target._completeError$2(this.e, this.s); + A._Future__chainForeignFuture_closure1.prototype = { + call$0() { + this.$this._completeError$2(this.e, this.s); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - P._Future__asyncComplete_closure.prototype = { - call$0: function() { - var t1, t2, listeners; - t1 = this.$this; - t2 = H.assertSubtypeOfRuntimeType(this.value, H.getTypeArgumentByIndex(t1, 0)); - listeners = t1._removeListeners$0(); - t1._state = 4; - t1._resultOrListeners = t2; - P._Future__propagateToListeners(t1, listeners); - }, - "call*": "call$0", - $requiredArgCount: 0, + A._Future__asyncCompleteWithValue_closure.prototype = { + call$0() { + this.$this._completeWithValue$1(this.value); + }, $signature: 0 }; - P._Future__chainFuture_closure.prototype = { - call$0: function() { - P._Future__chainCoreFuture(this.value, this.$this); + A._Future__chainFuture_closure.prototype = { + call$0() { + A._Future__chainCoreFuture(this.value, this.$this); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - P._Future__asyncCompleteError_closure.prototype = { - call$0: function() { + A._Future__asyncCompleteError_closure.prototype = { + call$0() { this.$this._completeError$2(this.error, this.stackTrace); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - P._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { - call$0: function() { - var completeResult, e, s, t1, exception, t2, originalSource; - completeResult = null; + A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { + call$0() { + var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null; try { - t1 = this.listener; - completeResult = t1.result._zone.run$1$1(H.functionTypeCheck(t1.callback, {func: 1}), null); + t1 = _this._box_0.listener; + completeResult = t1.result._zone.run$1$1(type$.dynamic_Function._as(t1.callback), type$.dynamic); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - if (this.hasError) { - t1 = H.interceptedTypeCheck(this._box_1.source._resultOrListeners, "$isAsyncError").error; - t2 = e; - t2 = t1 == null ? t2 == null : t1 === t2; - t1 = t2; - } else - t1 = false; - t2 = this._box_0; + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = _this.hasError && type$.AsyncError._as(_this._box_1.source._resultOrListeners).error === e; + t2 = _this._box_0; if (t1) - t2.listenerValueOrError = H.interceptedTypeCheck(this._box_1.source._resultOrListeners, "$isAsyncError"); + t2.listenerValueOrError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); else - t2.listenerValueOrError = new P.AsyncError(e, s); + t2.listenerValueOrError = A.AsyncError$(e, s); t2.listenerHasError = true; return; } - if (!!J.getInterceptor$(completeResult).$isFuture) { - if (completeResult instanceof P._Future && completeResult._state >= 4) { - if (completeResult._state === 8) { - t1 = this._box_0; - t1.listenerValueOrError = H.interceptedTypeCheck(completeResult._resultOrListeners, "$isAsyncError"); - t1.listenerHasError = true; - } - return; + if (completeResult instanceof A._Future && (completeResult._async$_state & 24) !== 0) { + if ((completeResult._async$_state & 16) !== 0) { + t1 = _this._box_0; + t1.listenerValueOrError = type$.AsyncError._as(completeResult._resultOrListeners); + t1.listenerHasError = true; } - originalSource = this._box_1.source; - t1 = this._box_0; - t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), null); + return; + } + if (type$.Future_dynamic._is(completeResult)) { + originalSource = _this._box_1.source; + t1 = _this._box_0; + t1.listenerValueOrError = completeResult.then$1$1(new A._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic); t1.listenerHasError = false; } }, - $signature: 1 + $signature: 0 }; - P._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { - call$1: function(_) { + A._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { + call$1(_) { return this.originalSource; }, - $signature: 22 + $signature: 30 }; - P._Future__propagateToListeners_handleValueCallback.prototype = { - call$0: function() { - var e, s, t1, t2, t3, t4, exception; + A._Future__propagateToListeners_handleValueCallback.prototype = { + call$0() { + var e, s, t1, t2, t3, t4, t5, exception; try { - t1 = this.listener; - t1.toString; - t2 = H.getTypeArgumentByIndex(t1, 0); - t3 = H.assertSubtypeOfRuntimeType(this.sourceResult, t2); - t4 = H.getTypeArgumentByIndex(t1, 1); - this._box_0.listenerValueOrError = t1.result._zone.runUnary$2$2(H.functionTypeCheck(t1.callback, {func: 1, ret: {futureOr: 1, type: t4}, args: [t2]}), t3, {futureOr: 1, type: t4}, t2); + t1 = this._box_0; + t2 = t1.listener; + t3 = t2.$ti; + t4 = t3._precomputed1; + t5 = t4._as(this.sourceResult); + t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t3._eval$1("2/(1)")._as(t2.callback), t5, t3._eval$1("2/"), t4); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); t1 = this._box_0; - t1.listenerValueOrError = new P.AsyncError(e, s); + t1.listenerValueOrError = A.AsyncError$(e, s); t1.listenerHasError = true; } }, - $signature: 1 + $signature: 0 }; - P._Future__propagateToListeners_handleError.prototype = { - call$0: function() { - var asyncError, e, s, t1, t2, exception, t3, t4; + A._Future__propagateToListeners_handleError.prototype = { + call$0() { + var asyncError, e, s, t1, exception, t2, _this = this; try { - asyncError = H.interceptedTypeCheck(this._box_1.source._resultOrListeners, "$isAsyncError"); - t1 = this.listener; - if (t1.matchesErrorTest$1(asyncError) && t1.errorCallback != null) { - t2 = this._box_0; - t2.listenerValueOrError = t1.handleError$1(asyncError); - t2.listenerHasError = false; + asyncError = type$.AsyncError._as(_this._box_1.source._resultOrListeners); + t1 = _this._box_0; + if (t1.listener.matchesErrorTest$1(asyncError) && t1.listener.errorCallback != null) { + t1.listenerValueOrError = t1.listener.handleError$1(asyncError); + t1.listenerHasError = false; } } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - t1 = H.interceptedTypeCheck(this._box_1.source._resultOrListeners, "$isAsyncError"); - t2 = t1.error; - t3 = e; - t4 = this._box_0; - if (t2 == null ? t3 == null : t2 === t3) - t4.listenerValueOrError = t1; + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners); + t2 = _this._box_0; + if (t1.error === e) + t2.listenerValueOrError = t1; else - t4.listenerValueOrError = new P.AsyncError(e, s); - t4.listenerHasError = true; + t2.listenerValueOrError = A.AsyncError$(e, s); + t2.listenerHasError = true; } }, - $signature: 1 + $signature: 0 }; - P._AsyncCallbackEntry.prototype = {}; - P.Stream.prototype = { - pipe$1: function(streamConsumer) { - H.assertSubtype(streamConsumer, "$isStreamConsumer", [H.getRuntimeTypeArgument(this, "Stream", 0)], "$asStreamConsumer"); - return streamConsumer.addStream$1(this).then$1$1(new P.Stream_pipe_closure(streamConsumer), null); + A._AsyncCallbackEntry.prototype = {}; + A.Stream.prototype = { + pipe$1(streamConsumer) { + A._instanceType(this)._eval$1("StreamConsumer")._as(streamConsumer); + return streamConsumer.addStream$1(this).then$1$1(new A.Stream_pipe_closure(streamConsumer), type$.dynamic); }, - get$length: function(_) { - var t1, future; - t1 = {}; - future = new P._Future(0, $.Zone__current, [P.int]); + get$length(_) { + var t1 = {}, + future = new A._Future($.Zone__current, type$._Future_int); t1.count = 0; - this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); + this.listen$4$cancelOnError$onDone$onError(new A.Stream_length_closure(t1, this), true, new A.Stream_length_closure0(t1, future), future.get$_completeError()); return future; } }; - P.Stream_pipe_closure.prototype = { - call$1: function(_) { + A.Stream_pipe_closure.prototype = { + call$1(_) { return this.streamConsumer.close$0(0); }, - $signature: 33 + $signature: 29 }; - P.Stream_length_closure.prototype = { - call$1: function(_) { - H.assertSubtypeOfRuntimeType(_, H.getRuntimeTypeArgument(this.$this, "Stream", 0)); + A.Stream_length_closure.prototype = { + call$1(_) { + A._instanceType(this.$this)._eval$1("Stream.T")._as(_); ++this._box_0.count; }, - $signature: function() { - return {func: 1, ret: P.Null, args: [H.getRuntimeTypeArgument(this.$this, "Stream", 0)]}; + $signature() { + return A._instanceType(this.$this)._eval$1("~(Stream.T)"); } }; - P.Stream_length_closure0.prototype = { - call$0: function() { + A.Stream_length_closure0.prototype = { + call$0() { this.future._complete$1(this._box_0.count); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - P.StreamSubscription.prototype = {}; - P.StreamTransformerBase.prototype = {$isStreamTransformer: 1}; - P._StreamController.prototype = { - get$_pendingEvents: function() { - if ((this._state & 8) === 0) - return H.assertSubtype(this._varData, "$is_PendingEvents", this.$ti, "$as_PendingEvents"); - var t1 = this.$ti; - return H.assertSubtype(H.assertSubtype(this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").varData, "$is_PendingEvents", t1, "$as_PendingEvents"); - }, - _ensurePendingEvents$0: function() { - var t1, state, t2; - if ((this._state & 8) === 0) { - t1 = this._varData; - if (t1 == null) { - t1 = new P._StreamImplEvents(0, this.$ti); - this._varData = t1; - } - return H.assertSubtype(t1, "$is_StreamImplEvents", this.$ti, "$as_StreamImplEvents"); - } - t1 = this.$ti; - state = H.assertSubtype(this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState"); - t2 = state.varData; - if (t2 == null) { - t2 = new P._StreamImplEvents(0, t1); - state.varData = t2; - } - return H.assertSubtype(t2, "$is_StreamImplEvents", t1, "$as_StreamImplEvents"); - }, - get$_subscription: function() { - if ((this._state & 8) !== 0) { - var t1 = this.$ti; - return H.assertSubtype(H.assertSubtype(this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").varData, "$is_ControllerSubscription", t1, "$as_ControllerSubscription"); - } - return H.assertSubtype(this._varData, "$is_ControllerSubscription", this.$ti, "$as_ControllerSubscription"); - }, - _badEventState$0: function() { - if ((this._state & 4) !== 0) - return new P.StateError("Cannot add event after closing"); - return new P.StateError("Cannot add event while adding a stream"); - }, - _ensureDoneFuture$0: function() { + A.StreamSubscription.prototype = {}; + A.StreamTransformerBase.prototype = {$isStreamTransformer: 1}; + A._StreamController.prototype = { + get$_pendingEvents() { + var t1, _this = this; + if ((_this._async$_state & 8) === 0) + return A._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(_this._varData); + t1 = A._instanceType(_this); + return t1._eval$1("_PendingEvents<1>?")._as(t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).varData); + }, + _ensurePendingEvents$0() { + var events, t1, state, _this = this; + if ((_this._async$_state & 8) === 0) { + events = _this._varData; + if (events == null) + events = _this._varData = new A._StreamImplEvents(A._instanceType(_this)._eval$1("_StreamImplEvents<1>")); + return A._instanceType(_this)._eval$1("_StreamImplEvents<1>")._as(events); + } + t1 = A._instanceType(_this); + state = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData); + events = state.varData; + if (events == null) + events = state.varData = new A._StreamImplEvents(t1._eval$1("_StreamImplEvents<1>")); + return t1._eval$1("_StreamImplEvents<1>")._as(events); + }, + get$_async$_subscription() { + var varData = this._varData; + if ((this._async$_state & 8) !== 0) + varData = type$._StreamControllerAddStreamState_nullable_Object._as(varData).varData; + return A._instanceType(this)._eval$1("_ControllerSubscription<1>")._as(varData); + }, + _badEventState$0() { + if ((this._async$_state & 4) !== 0) + return new A.StateError("Cannot add event after closing"); + return new A.StateError("Cannot add event while adding a stream"); + }, + _ensureDoneFuture$0() { var t1 = this._doneFuture; - if (t1 == null) { - t1 = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future(0, $.Zone__current, [null]); - this._doneFuture = t1; - } + if (t1 == null) + t1 = this._doneFuture = (this._async$_state & 2) !== 0 ? $.$get$Future__nullFuture() : new A._Future($.Zone__current, type$._Future_void); return t1; }, - add$1: function(_, value) { - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 0)); - if (this._state >= 4) - throw H.wrapException(this._badEventState$0()); - this._add$1(value); - }, - addError$2: function(error, stackTrace) { - var replacement; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - if (this._state >= 4) - throw H.wrapException(this._badEventState$0()); - if (error == null) - error = new P.NullThrownError(); + add$1(_, value) { + var _this = this; + A._instanceType(_this)._precomputed1._as(value); + if (_this._async$_state >= 4) + throw A.wrapException(_this._badEventState$0()); + _this._add$1(value); + }, + addError$2(error, stackTrace) { + var replacement, + t1 = type$.Object; + t1._as(error); + type$.nullable_StackTrace._as(stackTrace); + A.checkNotNullable(error, "error", t1); + if (this._async$_state >= 4) + throw A.wrapException(this._badEventState$0()); replacement = $.Zone__current.errorCallback$2(error, stackTrace); if (replacement != null) { error = replacement.error; - if (error == null) - error = new P.NullThrownError(); stackTrace = replacement.stackTrace; - } + } else if (stackTrace == null) + stackTrace = A.AsyncError_defaultStackTrace(error); this._async$_addError$2(error, stackTrace); }, - addError$1: function(error) { + addError$1(error) { return this.addError$2(error, null); }, - close$0: function(_) { - var t1 = this._state; + close$0(_) { + var _this = this, + t1 = _this._async$_state; if ((t1 & 4) !== 0) - return this._ensureDoneFuture$0(); + return _this._ensureDoneFuture$0(); if (t1 >= 4) - throw H.wrapException(this._badEventState$0()); - t1 |= 4; - this._state = t1; + throw A.wrapException(_this._badEventState$0()); + t1 = _this._async$_state = t1 | 4; if ((t1 & 1) !== 0) - this._sendDone$0(); + _this._sendDone$0(); else if ((t1 & 3) === 0) - this._ensurePendingEvents$0().add$1(0, C.C__DelayedDone); - return this._ensureDoneFuture$0(); - }, - _add$1: function(value) { - var t1; - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 0)); - t1 = this._state; - if ((t1 & 1) !== 0) - this._sendData$1(value); - else if ((t1 & 3) === 0) - this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, this.$ti)); - }, - _async$_addError$2: function(error, stackTrace) { - var t1 = this._state; + _this._ensurePendingEvents$0().add$1(0, B.C__DelayedDone); + return _this._ensureDoneFuture$0(); + }, + _add$1(value) { + var t2, _this = this, + t1 = A._instanceType(_this); + t1._precomputed1._as(value); + t2 = _this._async$_state; + if ((t2 & 1) !== 0) + _this._sendData$1(value); + else if ((t2 & 3) === 0) + _this._ensurePendingEvents$0().add$1(0, new A._DelayedData(value, t1._eval$1("_DelayedData<1>"))); + }, + _async$_addError$2(error, stackTrace) { + var t1 = this._async$_state; if ((t1 & 1) !== 0) this._sendError$2(error, stackTrace); else if ((t1 & 3) === 0) - this._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackTrace)); - }, - _subscribe$4: function(onData, onError, onDone, cancelOnError) { - var t1, t2, t3, t4, subscription, pendingEvents, addState; - t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - if ((this._state & 3) !== 0) - throw H.wrapException(P.StateError$("Stream has already been listened to.")); + this._ensurePendingEvents$0().add$1(0, new A._DelayedError(error, stackTrace)); + }, + _subscribe$4(onData, onError, onDone, cancelOnError) { + var t2, t3, t4, t5, t6, subscription, pendingEvents, addState, _this = this, + t1 = A._instanceType(_this); + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); + if ((_this._async$_state & 3) !== 0) + throw A.wrapException(A.StateError$("Stream has already been listened to.")); t2 = $.Zone__current; t3 = cancelOnError ? 1 : 0; - t4 = this.$ti; - subscription = new P._ControllerSubscription(this, t2, t3, t4); - subscription._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError, t1); - pendingEvents = this.get$_pendingEvents(); - t1 = this._state |= 1; - if ((t1 & 8) !== 0) { - addState = H.assertSubtype(this._varData, "$is_StreamControllerAddStreamState", t4, "$as_StreamControllerAddStreamState"); + t4 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1); + t5 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError); + t6 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + subscription = new A._ControllerSubscription(_this, t4, t5, t2.registerCallback$1$1(t6, type$.void), t2, t3, t1._eval$1("_ControllerSubscription<1>")); + pendingEvents = _this.get$_pendingEvents(); + t3 = _this._async$_state |= 1; + if ((t3 & 8) !== 0) { + addState = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData); addState.varData = subscription; addState.addSubscription.resume$0(0); } else - this._varData = subscription; + _this._varData = subscription; subscription._setPendingEvents$1(pendingEvents); - subscription._guardCallback$1(new P._StreamController__subscribe_closure(this)); + subscription._guardCallback$1(new A._StreamController__subscribe_closure(_this)); return subscription; }, - _recordCancel$1: function(subscription) { - var result, e, s, t1, exception, result0; - t1 = this.$ti; - H.assertSubtype(subscription, "$isStreamSubscription", t1, "$asStreamSubscription"); + _recordCancel$1(subscription) { + var result, onCancel, cancelResult, e, s, exception, result0, _this = this, + t1 = A._instanceType(_this); + t1._eval$1("StreamSubscription<1>")._as(subscription); result = null; - if ((this._state & 8) !== 0) - result = H.assertSubtype(this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").cancel$0(); - this._varData = null; - this._state = this._state & 4294967286 | 2; - t1 = this.onCancel; - if (t1 != null) + if ((_this._async$_state & 8) !== 0) + result = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).cancel$0(); + _this._varData = null; + _this._async$_state = _this._async$_state & 4294967286 | 2; + onCancel = _this.onCancel; + if (onCancel != null) if (result == null) try { - result = H.interceptedTypeCheck(t1.call$0(), "$isFuture"); + cancelResult = onCancel.call$0(); + if (type$.Future_void._is(cancelResult)) + result = cancelResult; } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - result0 = new P._Future(0, $.Zone__current, [null]); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + result0 = new A._Future($.Zone__current, type$._Future_void); result0._asyncCompleteError$2(e, s); result = result0; } else - result = result.whenComplete$1(t1); - t1 = new P._StreamController__recordCancel_complete(this); + result = result.whenComplete$1(onCancel); + t1 = new A._StreamController__recordCancel_complete(_this); if (result != null) result = result.whenComplete$1(t1); else @@ -8963,546 +9893,546 @@ $is_StreamControllerLifecycle: 1, $is_EventDispatch: 1 }; - P._StreamController__subscribe_closure.prototype = { - call$0: function() { - P._runGuarded(this.$this.onListen); + A._StreamController__subscribe_closure.prototype = { + call$0() { + A._runGuarded(this.$this.onListen); }, $signature: 0 }; - P._StreamController__recordCancel_complete.prototype = { - call$0: function() { - var t1 = this.$this._doneFuture; - if (t1 != null && t1._state === 0) - t1._asyncComplete$1(null); + A._StreamController__recordCancel_complete.prototype = { + call$0() { + var doneFuture = this.$this._doneFuture; + if (doneFuture != null && (doneFuture._async$_state & 30) === 0) + doneFuture._asyncComplete$1(null); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - P._SyncStreamControllerDispatch.prototype = { - _sendData$1: function(data) { - H.assertSubtypeOfRuntimeType(data, H.getTypeArgumentByIndex(this, 0)); - this.get$_subscription()._add$1(data); + A._SyncStreamControllerDispatch.prototype = { + _sendData$1(data) { + this.$ti._precomputed1._as(data); + this.get$_async$_subscription()._add$1(data); }, - _sendError$2: function(error, stackTrace) { - this.get$_subscription()._async$_addError$2(error, stackTrace); + _sendError$2(error, stackTrace) { + this.get$_async$_subscription()._async$_addError$2(error, stackTrace); }, - _sendDone$0: function() { - this.get$_subscription()._close$0(); + _sendDone$0() { + this.get$_async$_subscription()._close$0(); } }; - P._SyncStreamController.prototype = {}; - P._ControllerStream.prototype = { - get$hashCode: function(_) { - return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; + A._SyncStreamController.prototype = {}; + A._ControllerStream.prototype = { + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; }, - $eq: function(_, other) { + $eq(_, other) { if (other == null) return false; if (this === other) return true; - return other instanceof P._ControllerStream && other._controller === this._controller; + return other instanceof A._ControllerStream && other._controller === this._controller; } }; - P._ControllerSubscription.prototype = { - _onCancel$0: function() { + A._ControllerSubscription.prototype = { + _onCancel$0() { return this._controller._recordCancel$1(this); }, - _onPause$0: function() { - var t1, t2; - t1 = this._controller; - t2 = H.getTypeArgumentByIndex(t1, 0); - H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription"); - if ((t1._state & 8) !== 0) - H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState").addSubscription.pause$0(0); - P._runGuarded(t1.onPause); - }, - _onResume$0: function() { - var t1, t2; - t1 = this._controller; - t2 = H.getTypeArgumentByIndex(t1, 0); - H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription"); - if ((t1._state & 8) !== 0) - H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState").addSubscription.resume$0(0); - P._runGuarded(t1.onResume); + _onPause$0() { + var t1 = this._controller, + t2 = A._instanceType(t1); + t2._eval$1("StreamSubscription<1>")._as(this); + if ((t1._async$_state & 8) !== 0) + t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).addSubscription.pause$0(0); + A._runGuarded(t1.onPause); + }, + _onResume$0() { + var t1 = this._controller, + t2 = A._instanceType(t1); + t2._eval$1("StreamSubscription<1>")._as(this); + if ((t1._async$_state & 8) !== 0) + t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).addSubscription.resume$0(0); + A._runGuarded(t1.onResume); } }; - P._StreamSinkWrapper.prototype = { - add$1: function(_, data) { - this._async$_target.add$1(0, H.assertSubtypeOfRuntimeType(data, H.getTypeArgumentByIndex(this, 0))); + A._StreamSinkWrapper.prototype = { + add$1(_, data) { + this._async$_target.add$1(0, this.$ti._precomputed1._as(data)); }, $isStreamConsumer: 1, $isStreamSink: 1 }; - P._AddStreamState_cancel_closure.prototype = { - call$0: function() { + A._AddStreamState_cancel_closure.prototype = { + call$0() { this.$this.addStreamFuture._asyncComplete$1(null); }, - $signature: 0 + $signature: 2 }; - P._BufferingStreamSubscription.prototype = { - _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError, $T) { - var t1, handleData, t2, handleError, handleDone; - t1 = H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0); - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); - handleData = onData == null ? P.async___nullDataHandler$closure() : onData; - t2 = this._zone; - this.set$_async$_onData(t2.registerUnaryCallback$2$1(handleData, null, t1)); - handleError = onError == null ? P.async___nullErrorHandler$closure() : onError; - if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]})) - this._onError = t2.registerBinaryCallback$3$1(handleError, null, P.Object, P.StackTrace); - else if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object]})) - this._onError = t2.registerUnaryCallback$2$1(handleError, null, P.Object); - else - H.throwExpression(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - handleDone = onDone == null ? P.async___nullDoneHandler$closure() : onDone; - this.set$_onDone(t2.registerCallback$1$1(handleDone, -1)); - }, - _setPendingEvents$1: function(pendingEvents) { - H.assertSubtype(pendingEvents, "$is_PendingEvents", [H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0)], "$as_PendingEvents"); + A._BufferingStreamSubscription.prototype = { + _setPendingEvents$1(pendingEvents) { + var _this = this; + A._instanceType(_this)._eval$1("_PendingEvents<_BufferingStreamSubscription.T>?")._as(pendingEvents); if (pendingEvents == null) return; - this.set$_pending(pendingEvents); + _this.set$_pending(pendingEvents); if (pendingEvents.lastPendingEvent != null) { - this._state = (this._state | 64) >>> 0; - this._pending.schedule$1(this); + _this._async$_state = (_this._async$_state | 64) >>> 0; + pendingEvents.schedule$1(_this); } }, - cancel$0: function() { - var t1 = (this._state & 4294967279) >>> 0; - this._state = t1; + onData$1(handleData) { + var t1 = A._instanceType(this); + this.set$_async$_onData(A._BufferingStreamSubscription__registerDataHandler(this._zone, t1._eval$1("~(_BufferingStreamSubscription.T)?")._as(handleData), t1._eval$1("_BufferingStreamSubscription.T"))); + }, + onError$1(_, handleError) { + this._onError = A._BufferingStreamSubscription__registerErrorHandler(this._zone, handleError); + }, + cancel$0() { + var _this = this, + t1 = (_this._async$_state & 4294967279) >>> 0; + _this._async$_state = t1; if ((t1 & 8) === 0) - this._cancel$0(); - t1 = this._cancelFuture; + _this._cancel$0(); + t1 = _this._cancelFuture; return t1 == null ? $.$get$Future__nullFuture() : t1; }, - _cancel$0: function() { - var t1, t2; - t1 = (this._state | 8) >>> 0; - this._state = t1; + _cancel$0() { + var t2, _this = this, + t1 = _this._async$_state = (_this._async$_state | 8) >>> 0; if ((t1 & 64) !== 0) { - t2 = this._pending; - if (t2._state === 1) - t2._state = 3; + t2 = _this._pending; + if (t2._async$_state === 1) + t2._async$_state = 3; } if ((t1 & 32) === 0) - this.set$_pending(null); - this._cancelFuture = this._onCancel$0(); - }, - _add$1: function(data) { - var t1, t2; - t1 = H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0); - H.assertSubtypeOfRuntimeType(data, t1); - t2 = this._state; + _this.set$_pending(null); + _this._cancelFuture = _this._onCancel$0(); + }, + _add$1(data) { + var t2, _this = this, + t1 = A._instanceType(_this); + t1._eval$1("_BufferingStreamSubscription.T")._as(data); + t2 = _this._async$_state; if ((t2 & 8) !== 0) return; if (t2 < 32) - this._sendData$1(data); + _this._sendData$1(data); else - this._addPending$1(new P._DelayedData(data, [t1])); + _this._addPending$1(new A._DelayedData(data, t1._eval$1("_DelayedData<_BufferingStreamSubscription.T>"))); }, - _async$_addError$2: function(error, stackTrace) { - var t1 = this._state; + _async$_addError$2(error, stackTrace) { + var t1 = this._async$_state; if ((t1 & 8) !== 0) return; if (t1 < 32) this._sendError$2(error, stackTrace); else - this._addPending$1(new P._DelayedError(error, stackTrace)); + this._addPending$1(new A._DelayedError(error, stackTrace)); }, - _close$0: function() { - var t1 = this._state; + _close$0() { + var _this = this, + t1 = _this._async$_state; if ((t1 & 8) !== 0) return; t1 = (t1 | 2) >>> 0; - this._state = t1; + _this._async$_state = t1; if (t1 < 32) - this._sendDone$0(); + _this._sendDone$0(); else - this._addPending$1(C.C__DelayedDone); + _this._addPending$1(B.C__DelayedDone); }, - _onPause$0: function() { + _onPause$0() { }, - _onResume$0: function() { + _onResume$0() { }, - _onCancel$0: function() { - return; + _onCancel$0() { + return null; }, - _addPending$1: function($event) { - var t1, pending; - t1 = [H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0)]; - pending = H.assertSubtype(this._pending, "$is_StreamImplEvents", t1, "$as_StreamImplEvents"); - if (pending == null) { - pending = new P._StreamImplEvents(0, t1); - this.set$_pending(pending); - } + _addPending$1($event) { + var _this = this, + t1 = A._instanceType(_this), + pending = t1._eval$1("_StreamImplEvents<_BufferingStreamSubscription.T>?")._as(_this._pending); + if (pending == null) + pending = new A._StreamImplEvents(t1._eval$1("_StreamImplEvents<_BufferingStreamSubscription.T>")); + _this.set$_pending(pending); pending.add$1(0, $event); - t1 = this._state; + t1 = _this._async$_state; if ((t1 & 64) === 0) { t1 = (t1 | 64) >>> 0; - this._state = t1; + _this._async$_state = t1; if (t1 < 128) - this._pending.schedule$1(this); - } - }, - _sendData$1: function(data) { - var t1, t2; - t1 = H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0); - H.assertSubtypeOfRuntimeType(data, t1); - t2 = this._state; - this._state = (t2 | 32) >>> 0; - this._zone.runUnaryGuarded$1$2(this._async$_onData, data, t1); - this._state = (this._state & 4294967263) >>> 0; - this._checkState$1((t2 & 4) !== 0); - }, - _sendError$2: function(error, stackTrace) { - var t1, t2; - t1 = this._state; - t2 = new P._BufferingStreamSubscription__sendError_sendError(this, error, stackTrace); + pending.schedule$1(_this); + } + }, + _sendData$1(data) { + var t2, _this = this, + t1 = A._instanceType(_this)._eval$1("_BufferingStreamSubscription.T"); + t1._as(data); + t2 = _this._async$_state; + _this._async$_state = (t2 | 32) >>> 0; + _this._zone.runUnaryGuarded$1$2(_this._async$_onData, data, t1); + _this._async$_state = (_this._async$_state & 4294967263) >>> 0; + _this._checkState$1((t2 & 4) !== 0); + }, + _sendError$2(error, stackTrace) { + var cancelFuture, _this = this, + t1 = _this._async$_state, + t2 = new A._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); if ((t1 & 1) !== 0) { - this._state = (t1 | 16) >>> 0; - this._cancel$0(); - t1 = this._cancelFuture; - if (t1 != null && t1 !== $.$get$Future__nullFuture()) - t1.whenComplete$1(t2); + _this._async$_state = (t1 | 16) >>> 0; + _this._cancel$0(); + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t2); else t2.call$0(); } else { t2.call$0(); - this._checkState$1((t1 & 4) !== 0); + _this._checkState$1((t1 & 4) !== 0); } }, - _sendDone$0: function() { - var t1, t2; - t1 = new P._BufferingStreamSubscription__sendDone_sendDone(this); - this._cancel$0(); - this._state = (this._state | 16) >>> 0; - t2 = this._cancelFuture; - if (t2 != null && t2 !== $.$get$Future__nullFuture()) - t2.whenComplete$1(t1); + _sendDone$0() { + var cancelFuture, _this = this, + t1 = new A._BufferingStreamSubscription__sendDone_sendDone(_this); + _this._cancel$0(); + _this._async$_state = (_this._async$_state | 16) >>> 0; + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t1); else t1.call$0(); }, - _guardCallback$1: function(callback) { - var t1; - H.functionTypeCheck(callback, {func: 1, ret: -1}); - t1 = this._state; - this._state = (t1 | 32) >>> 0; + _guardCallback$1(callback) { + var t1, _this = this; + type$.void_Function._as(callback); + t1 = _this._async$_state; + _this._async$_state = (t1 | 32) >>> 0; callback.call$0(); - this._state = (this._state & 4294967263) >>> 0; - this._checkState$1((t1 & 4) !== 0); - }, - _checkState$1: function(wasInputPaused) { - var t1, t2, isInputPaused; - t1 = this._state; - if ((t1 & 64) !== 0 && this._pending.lastPendingEvent == null) { - t1 = (t1 & 4294967231) >>> 0; - this._state = t1; + _this._async$_state = (_this._async$_state & 4294967263) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _checkState$1(wasInputPaused) { + var t2, isInputPaused, _this = this, + t1 = _this._async$_state; + if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) { + t1 = _this._async$_state = (t1 & 4294967231) >>> 0; if ((t1 & 4) !== 0) if (t1 < 128) { - t2 = this._pending; - t2 = t2 == null || t2.lastPendingEvent == null; + t2 = _this._pending; + t2 = t2 == null ? null : t2.lastPendingEvent == null; + t2 = t2 !== false; } else t2 = false; else t2 = false; if (t2) { t1 = (t1 & 4294967291) >>> 0; - this._state = t1; + _this._async$_state = t1; } } for (; true; wasInputPaused = isInputPaused) { if ((t1 & 8) !== 0) { - this.set$_pending(null); + _this.set$_pending(null); return; } isInputPaused = (t1 & 4) !== 0; if (wasInputPaused === isInputPaused) break; - this._state = (t1 ^ 32) >>> 0; + _this._async$_state = (t1 ^ 32) >>> 0; if (isInputPaused) - this._onPause$0(); + _this._onPause$0(); else - this._onResume$0(); - t1 = (this._state & 4294967263) >>> 0; - this._state = t1; + _this._onResume$0(); + t1 = (_this._async$_state & 4294967263) >>> 0; + _this._async$_state = t1; } if ((t1 & 64) !== 0 && t1 < 128) - this._pending.schedule$1(this); - }, - set$_async$_onData: function(_onData) { - this._async$_onData = H.functionTypeCheck(_onData, {func: 1, ret: -1, args: [H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0)]}); + _this._pending.schedule$1(_this); }, - set$_onDone: function(_onDone) { - this._onDone = H.functionTypeCheck(_onDone, {func: 1, ret: -1}); + set$_async$_onData(_onData) { + this._async$_onData = A._instanceType(this)._eval$1("~(_BufferingStreamSubscription.T)")._as(_onData); }, - set$_pending: function(_pending) { - this._pending = H.assertSubtype(_pending, "$is_PendingEvents", [H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0)], "$as_PendingEvents"); + set$_pending(_pending) { + this._pending = A._instanceType(this)._eval$1("_PendingEvents<_BufferingStreamSubscription.T>?")._as(_pending); }, $isStreamSubscription: 1, $is_EventDispatch: 1 }; - P._BufferingStreamSubscription__sendError_sendError.prototype = { - call$0: function() { - var t1, t2, onError, t3, t4; - t1 = this.$this; - t2 = t1._state; + A._BufferingStreamSubscription__sendError_sendError.prototype = { + call$0() { + var onError, t3, t4, + t1 = this.$this, + t2 = t1._async$_state; if ((t2 & 8) !== 0 && (t2 & 16) === 0) return; - t1._state = (t2 | 32) >>> 0; + t1._async$_state = (t2 | 32) >>> 0; onError = t1._onError; t2 = this.error; - t3 = P.Object; + t3 = type$.Object; t4 = t1._zone; - if (H.functionTypeTest(onError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]})) - t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, P.StackTrace); + if (type$.void_Function_Object_StackTrace._is(onError)) + t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace); else - t4.runUnaryGuarded$1$2(H.functionTypeCheck(t1._onError, {func: 1, ret: -1, args: [P.Object]}), t2, t3); - t1._state = (t1._state & 4294967263) >>> 0; + t4.runUnaryGuarded$1$2(type$.void_Function_Object._as(onError), t2, t3); + t1._async$_state = (t1._async$_state & 4294967263) >>> 0; }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - P._BufferingStreamSubscription__sendDone_sendDone.prototype = { - call$0: function() { - var t1, t2; - t1 = this.$this; - t2 = t1._state; + A._BufferingStreamSubscription__sendDone_sendDone.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._async$_state; if ((t2 & 16) === 0) return; - t1._state = (t2 | 42) >>> 0; + t1._async$_state = (t2 | 42) >>> 0; t1._zone.runGuarded$1(t1._onDone); - t1._state = (t1._state & 4294967263) >>> 0; + t1._async$_state = (t1._async$_state & 4294967263) >>> 0; }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - P._StreamImpl.prototype = { - listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - return this._controller._subscribe$4(H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}), onError, onDone, true === cancelOnError); + A._StreamImpl.prototype = { + listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { + var t1 = this.$ti; + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); + return this._controller._subscribe$4(t1._eval$1("~(1)?")._as(onData), onError, onDone, cancelOnError === true); }, - listen$1: function(onData) { + listen$1(onData) { return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); }, - listen$3$onDone$onError: function(onData, onDone, onError) { + listen$3$onDone$onError(onData, onDone, onError) { return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError); }, - listen$2$onDone: function(onData, onDone) { + listen$2$onDone(onData, onDone) { return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, null); + }, + listen$3$cancelOnError$onDone(onData, cancelOnError, onDone) { + return this.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, null); } }; - P._DelayedEvent.prototype = { - set$next: function(next) { - this.next = H.interceptedTypeCheck(next, "$is_DelayedEvent"); + A._DelayedEvent.prototype = { + set$next(next) { + this.next = type$.nullable__DelayedEvent_dynamic._as(next); }, - get$next: function() { + get$next() { return this.next; } }; - P._DelayedData.prototype = { - perform$1: function(dispatch) { - H.assertSubtype(dispatch, "$is_EventDispatch", this.$ti, "$as_EventDispatch")._sendData$1(this.value); + A._DelayedData.prototype = { + perform$1(dispatch) { + this.$ti._eval$1("_EventDispatch<1>")._as(dispatch)._sendData$1(this.value); } }; - P._DelayedError.prototype = { - perform$1: function(dispatch) { + A._DelayedError.prototype = { + perform$1(dispatch) { dispatch._sendError$2(this.error, this.stackTrace); - }, - $as_DelayedEvent: function() { } }; - P._DelayedDone.prototype = { - perform$1: function(dispatch) { + A._DelayedDone.prototype = { + perform$1(dispatch) { dispatch._sendDone$0(); }, - get$next: function() { - return; + get$next() { + return null; }, - set$next: function(_) { - throw H.wrapException(P.StateError$("No events after a done.")); + set$next(_) { + throw A.wrapException(A.StateError$("No events after a done.")); }, - $is_DelayedEvent: 1, - $as_DelayedEvent: function() { - } + $is_DelayedEvent: 1 }; - P._PendingEvents.prototype = { - schedule$1: function(dispatch) { - var t1; - H.assertSubtype(dispatch, "$is_EventDispatch", this.$ti, "$as_EventDispatch"); - t1 = this._state; + A._PendingEvents.prototype = { + schedule$1(dispatch) { + var t1, _this = this; + _this.$ti._eval$1("_EventDispatch<1>")._as(dispatch); + t1 = _this._async$_state; if (t1 === 1) return; if (t1 >= 1) { - this._state = 1; + _this._async$_state = 1; return; } - P.scheduleMicrotask(new P._PendingEvents_schedule_closure(this, dispatch)); - this._state = 1; + A.scheduleMicrotask(new A._PendingEvents_schedule_closure(_this, dispatch)); + _this._async$_state = 1; } }; - P._PendingEvents_schedule_closure.prototype = { - call$0: function() { - var t1, oldState, t2, $event, t3; - t1 = this.$this; - oldState = t1._state; - t1._state = 0; + A._PendingEvents_schedule_closure.prototype = { + call$0() { + var t2, $event, nextEvent, + t1 = this.$this, + oldState = t1._async$_state; + t1._async$_state = 0; if (oldState === 3) return; - t2 = H.assertSubtype(this.dispatch, "$is_EventDispatch", [H.getTypeArgumentByIndex(t1, 0)], "$as_EventDispatch"); + t2 = t1.$ti._eval$1("_EventDispatch<1>")._as(this.dispatch); $event = t1.firstPendingEvent; - t3 = $event.get$next(); - t1.firstPendingEvent = t3; - if (t3 == null) + nextEvent = $event.get$next(); + t1.firstPendingEvent = nextEvent; + if (nextEvent == null) t1.lastPendingEvent = null; $event.perform$1(t2); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - P._StreamImplEvents.prototype = { - add$1: function(_, $event) { - var t1 = this.lastPendingEvent; - if (t1 == null) { - this.lastPendingEvent = $event; - this.firstPendingEvent = $event; - } else { - t1.set$next($event); - this.lastPendingEvent = $event; + A._StreamImplEvents.prototype = { + add$1(_, $event) { + var _this = this, + lastEvent = _this.lastPendingEvent; + if (lastEvent == null) + _this.firstPendingEvent = _this.lastPendingEvent = $event; + else { + lastEvent.set$next($event); + _this.lastPendingEvent = $event; } } }; - P._DoneStreamSubscription.prototype = { - _schedule$0: function() { - if ((this._state & 2) !== 0) + A._DoneStreamSubscription.prototype = { + _schedule$0() { + var _this = this; + if ((_this._async$_state & 2) !== 0) return; - this._zone.scheduleMicrotask$1(this.get$_sendDone()); - this._state = (this._state | 2) >>> 0; + _this._zone.scheduleMicrotask$1(_this.get$_sendDone()); + _this._async$_state = (_this._async$_state | 2) >>> 0; }, - cancel$0: function() { + onData$1(handleData) { + this.$ti._eval$1("~(1)?")._as(handleData); + }, + onError$1(_, handleError) { + }, + cancel$0() { return $.$get$Future__nullFuture(); }, - _sendDone$0: function() { - var t1 = (this._state & 4294967293) >>> 0; - this._state = t1; + _sendDone$0() { + var doneHandler, _this = this, + t1 = _this._async$_state = (_this._async$_state & 4294967293) >>> 0; if (t1 >= 4) return; - this._state = (t1 | 1) >>> 0; - t1 = this._onDone; - if (t1 != null) - this._zone.runGuarded$1(t1); + _this._async$_state = (t1 | 1) >>> 0; + doneHandler = _this._onDone; + if (doneHandler != null) + _this._zone.runGuarded$1(doneHandler); }, $isStreamSubscription: 1 }; - P._StreamIterator.prototype = {}; - P._EmptyStream.prototype = { - listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { - var t1; - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - t1 = new P._DoneStreamSubscription($.Zone__current, onDone, this.$ti); + A._StreamIterator.prototype = {}; + A._EmptyStream.prototype = { + listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { + var t1 = this.$ti; + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); + t1 = new A._DoneStreamSubscription($.Zone__current, onDone, t1._eval$1("_DoneStreamSubscription<1>")); t1._schedule$0(); return t1; }, - listen$1: function(onData) { + listen$1(onData) { return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); }, - listen$3$onDone$onError: function(onData, onDone, onError) { + listen$3$onDone$onError(onData, onDone, onError) { return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError); - } - }; - P.Timer.prototype = {}; - P.AsyncError.prototype = { - toString$0: function(_) { - return H.S(this.error); }, - $isError: 1 - }; - P._ZoneFunction.prototype = {}; - P.ZoneSpecification.prototype = {}; - P._ZoneSpecification.prototype = {$isZoneSpecification: 1}; - P.ZoneDelegate.prototype = {}; - P.Zone.prototype = {}; - P._ZoneDelegate.prototype = { - handleUncaughtError$3: function(zone, error, stackTrace) { - var implementation, implZone; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - implementation = this._delegationTarget.get$_handleUncaughtError(); + listen$3$cancelOnError$onDone(onData, cancelOnError, onDone) { + return this.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, null); + } + }; + A._ZoneFunction.prototype = {}; + A._RunNullaryZoneFunction.prototype = {}; + A._RunUnaryZoneFunction.prototype = {}; + A._RunBinaryZoneFunction.prototype = {}; + A._RegisterNullaryZoneFunction.prototype = {}; + A._RegisterUnaryZoneFunction.prototype = {}; + A._RegisterBinaryZoneFunction.prototype = {}; + A._ZoneSpecification.prototype = {$isZoneSpecification: 1}; + A._ZoneDelegate.prototype = {$isZoneDelegate: 1}; + A._Zone.prototype = { + _processUncaughtError$3(zone, error, stackTrace) { + var implZone, handler, parentDelegate, parentZone, currentZone, e, s, implementation, t1, exception; + type$.StackTrace._as(stackTrace); + implementation = this.get$_handleUncaughtError(); implZone = implementation.zone; - return implementation.$function.call$5(implZone, P._parentDelegate(implZone), zone, error, stackTrace); + if (implZone === B.C__RootZone) { + A._rootHandleError(error, stackTrace); + return; + } + handler = implementation.$function; + parentDelegate = implZone.get$_parentDelegate(); + t1 = J.get$parent$z(implZone); + t1.toString; + parentZone = t1; + currentZone = $.Zone__current; + try { + $.Zone__current = parentZone; + handler.call$5(implZone, parentDelegate, zone, error, stackTrace); + $.Zone__current = currentZone; + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + $.Zone__current = currentZone; + t1 = error === e ? stackTrace : s; + parentZone._processUncaughtError$3(implZone, e, t1); + } }, - $isZoneDelegate: 1 + $isZone: 1 }; - P._Zone.prototype = {$isZone: 1}; - P._CustomZone.prototype = { - get$_delegate: function() { + A._CustomZone.prototype = { + get$_delegate() { var t1 = this._delegateCache; - if (t1 != null) - return t1; - t1 = new P._ZoneDelegate(this); - this._delegateCache = t1; - return t1; + return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + return this.parent.get$_delegate(); }, - get$errorZone: function() { + get$errorZone() { return this._handleUncaughtError.zone; }, - runGuarded$1: function(f) { + runGuarded$1(f) { var e, s, exception; - H.functionTypeCheck(f, {func: 1, ret: -1}); + type$.void_Function._as(f); try { - this.run$1$1(f, -1); + this.run$1$1(f, type$.void); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - this.handleUncaughtError$2(e, s); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, type$.Object._as(e), type$.StackTrace._as(s)); } }, - runUnaryGuarded$1$2: function(f, arg, $T) { + runUnaryGuarded$1$2(f, arg, $T) { var e, s, exception; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}); - H.assertSubtypeOfRuntimeType(arg, $T); + $T._eval$1("~(0)")._as(f); + $T._as(arg); try { - this.runUnary$2$2(f, arg, -1, $T); + this.runUnary$2$2(f, arg, type$.void, $T); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - this.handleUncaughtError$2(e, s); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, type$.Object._as(e), type$.StackTrace._as(s)); } }, - runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) { + runBinaryGuarded$2$3(f, arg1, arg2, T1, T2) { var e, s, exception; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [T1, T2]}); - H.assertSubtypeOfRuntimeType(arg1, T1); - H.assertSubtypeOfRuntimeType(arg2, T2); + T1._eval$1("@<0>")._bind$1(T2)._eval$1("~(1,2)")._as(f); + T1._as(arg1); + T2._as(arg2); try { - this.runBinary$3$3(f, arg1, arg2, -1, T1, T2); + this.runBinary$3$3(f, arg1, arg2, type$.void, T1, T2); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - this.handleUncaughtError$2(e, s); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, type$.Object._as(e), type$.StackTrace._as(s)); } }, - bindCallback$1$1: function(f, $R) { - return new P._CustomZone_bindCallback_closure(this, this.registerCallback$1$1(H.functionTypeCheck(f, {func: 1, ret: $R}), $R), $R); + bindCallback$1$1(f, $R) { + return new A._CustomZone_bindCallback_closure(this, this.registerCallback$1$1($R._eval$1("0()")._as(f), $R), $R); }, - bindUnaryCallback$2$1: function(f, $R, $T) { - return new P._CustomZone_bindUnaryCallback_closure(this, this.registerUnaryCallback$2$1(H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}), $R, $T), $T, $R); + bindUnaryCallback$2$1(f, $R, $T) { + return new A._CustomZone_bindUnaryCallback_closure(this, this.registerUnaryCallback$2$1($R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f), $R, $T), $T, $R); }, - bindCallbackGuarded$1: function(f) { - return new P._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback$1$1(H.functionTypeCheck(f, {func: 1, ret: -1}), -1)); + bindCallbackGuarded$1(f) { + return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback$1$1(type$.void_Function._as(f), type$.void)); }, - bindUnaryCallbackGuarded$1$1: function(f, $T) { - return new P._CustomZone_bindUnaryCallbackGuarded_closure(this, this.registerUnaryCallback$2$1(H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}), -1, $T), $T); + bindUnaryCallbackGuarded$1$1(f, $T) { + return new A._CustomZone_bindUnaryCallbackGuarded_closure(this, this.registerUnaryCallback$2$1($T._eval$1("~(0)")._as(f), type$.void, $T), $T); }, - $index: function(_, key) { - var t1, result, value; - t1 = this._async$_map; - result = t1.$index(0, key); + $index(_, key) { + var value, + t1 = this._map, + result = t1.$index(0, key); if (result != null || t1.containsKey$1(key)) return result; value = this.parent.$index(0, key); @@ -9510,574 +10440,508 @@ t1.$indexSet(0, key, value); return value; }, - handleUncaughtError$2: function(error, stackTrace) { - var implementation, t1, parentDelegate; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - implementation = this._handleUncaughtError; - t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return implementation.$function.call$5(t1, parentDelegate, this, error, stackTrace); + handleUncaughtError$2(error, stackTrace) { + this._processUncaughtError$3(this, error, type$.StackTrace._as(stackTrace)); }, - fork$2$specification$zoneValues: function(specification, zoneValues) { - var implementation, t1, parentDelegate; - implementation = this._fork; - t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return implementation.$function.call$5(t1, parentDelegate, this, specification, zoneValues); + fork$2$specification$zoneValues(specification, zoneValues) { + var implementation = this._fork, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, specification, zoneValues); }, - run$1$1: function(f, $R) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(f, {func: 1, ret: $R}); + run$1$1(f, $R) { + var implementation, t1; + $R._eval$1("0()")._as(f); implementation = this._run; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return H.functionTypeCheck(implementation.$function, {func: 1, bounds: [P.Object], ret: 0, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0}]}).call$1$4(t1, parentDelegate, this, f, $R); + return implementation.$function.call$1$4(t1, t1.get$_parentDelegate(), this, f, $R); }, - runUnary$2$2: function(f, arg, $R, $T) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}); - H.assertSubtypeOfRuntimeType(arg, $T); + runUnary$2$2(f, arg, $R, $T) { + var implementation, t1; + $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f); + $T._as(arg); implementation = this._runUnary; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return H.functionTypeCheck(implementation.$function, {func: 1, bounds: [P.Object, P.Object], ret: 0, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1]}, 1]}).call$2$5(t1, parentDelegate, this, f, arg, $R, $T); - }, - runBinary$3$3: function(f, arg1, arg2, $R, T1, T2) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); - H.assertSubtypeOfRuntimeType(arg1, T1); - H.assertSubtypeOfRuntimeType(arg2, T2); + return implementation.$function.call$2$5(t1, t1.get$_parentDelegate(), this, f, arg, $R, $T); + }, + runBinary$3$3(f, arg1, arg2, $R, T1, T2) { + var implementation, t1; + $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); + T1._as(arg1); + T2._as(arg2); implementation = this._runBinary; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return H.functionTypeCheck(implementation.$function, {func: 1, bounds: [P.Object, P.Object, P.Object], ret: 0, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1, 2]}, 1, 2]}).call$3$6(t1, parentDelegate, this, f, arg1, arg2, $R, T1, T2); + return implementation.$function.call$3$6(t1, t1.get$_parentDelegate(), this, f, arg1, arg2, $R, T1, T2); }, - registerCallback$1$1: function(callback, $R) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(callback, {func: 1, ret: $R}); + registerCallback$1$1(callback, $R) { + var implementation, t1; + $R._eval$1("0()")._as(callback); implementation = this._registerCallback; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return H.functionTypeCheck(implementation.$function, {func: 1, bounds: [P.Object], ret: {func: 1, ret: 0}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0}]}).call$1$4(t1, parentDelegate, this, callback, $R); + return implementation.$function.call$1$4(t1, t1.get$_parentDelegate(), this, callback, $R); }, - registerUnaryCallback$2$1: function(callback, $R, $T) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(callback, {func: 1, ret: $R, args: [$T]}); + registerUnaryCallback$2$1(callback, $R, $T) { + var implementation, t1; + $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(callback); implementation = this._registerUnaryCallback; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return H.functionTypeCheck(implementation.$function, {func: 1, bounds: [P.Object, P.Object], ret: {func: 1, ret: 0, args: [1]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1]}]}).call$2$4(t1, parentDelegate, this, callback, $R, $T); + return implementation.$function.call$2$4(t1, t1.get$_parentDelegate(), this, callback, $R, $T); }, - registerBinaryCallback$3$1: function(callback, $R, T1, T2) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(callback, {func: 1, ret: $R, args: [T1, T2]}); + registerBinaryCallback$3$1(callback, $R, T1, T2) { + var implementation, t1; + $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(callback); implementation = this._registerBinaryCallback; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return H.functionTypeCheck(implementation.$function, {func: 1, bounds: [P.Object, P.Object, P.Object], ret: {func: 1, ret: 0, args: [1, 2]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1, 2]}]}).call$3$4(t1, parentDelegate, this, callback, $R, T1, T2); + return implementation.$function.call$3$4(t1, t1.get$_parentDelegate(), this, callback, $R, T1, T2); }, - errorCallback$2: function(error, stackTrace) { - var implementation, implementationZone, parentDelegate; + errorCallback$2(error, stackTrace) { + var implementation, implementationZone; + A.checkNotNullable(error, "error", type$.Object); implementation = this._errorCallback; implementationZone = implementation.zone; - if (implementationZone === C.C__RootZone) - return; - parentDelegate = P._parentDelegate(implementationZone); - return implementation.$function.call$5(implementationZone, parentDelegate, this, error, stackTrace); + if (implementationZone === B.C__RootZone) + return null; + return implementation.$function.call$5(implementationZone, implementationZone.get$_parentDelegate(), this, error, stackTrace); }, - scheduleMicrotask$1: function(f) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(f, {func: 1, ret: -1}); + scheduleMicrotask$1(f) { + var implementation, t1; + type$.void_Function._as(f); implementation = this._scheduleMicrotask; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return implementation.$function.call$4(t1, parentDelegate, this, f); + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); }, - createPeriodicTimer$2: function(duration, f) { - var implementation, t1, parentDelegate; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [P.Timer]}); + createPeriodicTimer$2(duration, f) { + var implementation, t1; + type$.void_Function_Timer._as(f); implementation = this._createPeriodicTimer; t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return implementation.$function.call$5(t1, parentDelegate, this, duration, f); - }, - print$1: function(_, line) { - var implementation, t1, parentDelegate; - implementation = this._print; - t1 = implementation.zone; - parentDelegate = P._parentDelegate(t1); - return implementation.$function.call$4(t1, parentDelegate, this, line); - }, - set$_run: function(_run) { - this._run = H.assertSubtype(_run, "$is_ZoneFunction", [P.Function], "$as_ZoneFunction"); - }, - set$_runUnary: function(_runUnary) { - this._runUnary = H.assertSubtype(_runUnary, "$is_ZoneFunction", [P.Function], "$as_ZoneFunction"); + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, duration, f); }, - set$_runBinary: function(_runBinary) { - this._runBinary = H.assertSubtype(_runBinary, "$is_ZoneFunction", [P.Function], "$as_ZoneFunction"); + print$1(_, line) { + var implementation = this._print, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, line); }, - set$_registerCallback: function(_registerCallback) { - this._registerCallback = H.assertSubtype(_registerCallback, "$is_ZoneFunction", [P.Function], "$as_ZoneFunction"); + set$_handleUncaughtError(_handleUncaughtError) { + this._handleUncaughtError = type$._ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace._as(_handleUncaughtError); }, - set$_registerUnaryCallback: function(_registerUnaryCallback) { - this._registerUnaryCallback = H.assertSubtype(_registerUnaryCallback, "$is_ZoneFunction", [P.Function], "$as_ZoneFunction"); - }, - set$_registerBinaryCallback: function(_registerBinaryCallback) { - this._registerBinaryCallback = H.assertSubtype(_registerBinaryCallback, "$is_ZoneFunction", [P.Function], "$as_ZoneFunction"); - }, - set$_errorCallback: function(_errorCallback) { - this._errorCallback = H.assertSubtype(_errorCallback, "$is_ZoneFunction", [{func: 1, ret: P.AsyncError, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}], "$as_ZoneFunction"); - }, - set$_scheduleMicrotask: function(_scheduleMicrotask) { - this._scheduleMicrotask = H.assertSubtype(_scheduleMicrotask, "$is_ZoneFunction", [{func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: -1}]}], "$as_ZoneFunction"); - }, - set$_createTimer: function(_createTimer) { - this._createTimer = H.assertSubtype(_createTimer, "$is_ZoneFunction", [{func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, ret: -1}]}], "$as_ZoneFunction"); - }, - set$_createPeriodicTimer: function(_createPeriodicTimer) { - this._createPeriodicTimer = H.assertSubtype(_createPeriodicTimer, "$is_ZoneFunction", [{func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, ret: -1, args: [P.Timer]}]}], "$as_ZoneFunction"); - }, - set$_print: function(_print) { - this._print = H.assertSubtype(_print, "$is_ZoneFunction", [{func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, P.String]}], "$as_ZoneFunction"); - }, - set$_fork: function(_fork) { - this._fork = H.assertSubtype(_fork, "$is_ZoneFunction", [{func: 1, ret: P.Zone, args: [P.Zone, P.ZoneDelegate, P.Zone, P.ZoneSpecification, [P.Map,,,]]}], "$as_ZoneFunction"); - }, - set$_handleUncaughtError: function(_handleUncaughtError) { - this._handleUncaughtError = H.assertSubtype(_handleUncaughtError, "$is_ZoneFunction", [{func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}], "$as_ZoneFunction"); - }, - get$_run: function() { + get$_run() { return this._run; }, - get$_runUnary: function() { + get$_runUnary() { return this._runUnary; }, - get$_runBinary: function() { + get$_runBinary() { return this._runBinary; }, - get$_registerCallback: function() { + get$_registerCallback() { return this._registerCallback; }, - get$_registerUnaryCallback: function() { + get$_registerUnaryCallback() { return this._registerUnaryCallback; }, - get$_registerBinaryCallback: function() { + get$_registerBinaryCallback() { return this._registerBinaryCallback; }, - get$_errorCallback: function() { + get$_errorCallback() { return this._errorCallback; }, - get$_scheduleMicrotask: function() { + get$_scheduleMicrotask() { return this._scheduleMicrotask; }, - get$_createTimer: function() { + get$_createTimer() { return this._createTimer; }, - get$_createPeriodicTimer: function() { + get$_createPeriodicTimer() { return this._createPeriodicTimer; }, - get$_print: function() { + get$_print() { return this._print; }, - get$_fork: function() { + get$_fork() { return this._fork; }, - get$_handleUncaughtError: function() { + get$_handleUncaughtError() { return this._handleUncaughtError; }, - get$parent: function(receiver) { + get$parent(receiver) { return this.parent; }, - get$_async$_map: function() { - return this._async$_map; + get$_map() { + return this._map; } }; - P._CustomZone_bindCallback_closure.prototype = { - call$0: function() { + A._CustomZone_bindCallback_closure.prototype = { + call$0() { return this.$this.run$1$1(this.registered, this.R); }, - $signature: function() { - return {func: 1, ret: this.R}; + $signature() { + return this.R._eval$1("0()"); } }; - P._CustomZone_bindUnaryCallback_closure.prototype = { - call$1: function(arg) { - var t1 = this.T; - return this.$this.runUnary$2$2(this.registered, H.assertSubtypeOfRuntimeType(arg, t1), this.R, t1); + A._CustomZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this, + t1 = _this.T; + return _this.$this.runUnary$2$2(_this.registered, t1._as(arg), _this.R, t1); }, - $signature: function() { - return {func: 1, ret: this.R, args: [this.T]}; + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); } }; - P._CustomZone_bindCallbackGuarded_closure.prototype = { - call$0: function() { + A._CustomZone_bindCallbackGuarded_closure.prototype = { + call$0() { return this.$this.runGuarded$1(this.registered); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - P._CustomZone_bindUnaryCallbackGuarded_closure.prototype = { - call$1: function(arg) { + A._CustomZone_bindUnaryCallbackGuarded_closure.prototype = { + call$1(arg) { var t1 = this.T; - return this.$this.runUnaryGuarded$1$2(this.registered, H.assertSubtypeOfRuntimeType(arg, t1), t1); + return this.$this.runUnaryGuarded$1$2(this.registered, t1._as(arg), t1); }, - $signature: function() { - return {func: 1, ret: -1, args: [this.T]}; + $signature() { + return this.T._eval$1("~(0)"); } }; - P._rootHandleUncaughtError_closure.prototype = { - call$0: function() { - var t1, t2, error; - t1 = this._box_0; - t2 = t1.error; - if (t2 == null) { - error = new P.NullThrownError(); - t1.error = error; - t1 = error; - } else - t1 = t2; - t2 = this.stackTrace; - if (t2 == null) - throw H.wrapException(t1); - error = H.wrapException(t1); - error.stack = t2.toString$0(0); - throw error; + A._rootHandleError_closure.prototype = { + call$0() { + var t1 = this.error, + t2 = this.stackTrace; + A.checkNotNullable(t1, "error", type$.Object); + A.checkNotNullable(t2, "stackTrace", type$.StackTrace); + A.Error__throw(t1, t2); }, $signature: 0 }; - P._RootZone.prototype = { - get$_run: function() { - return C._ZoneFunction__RootZone__rootRun; + A._RootZone.prototype = { + get$_run() { + return B._RunNullaryZoneFunction__RootZone__rootRun; }, - get$_runUnary: function() { - return C._ZoneFunction__RootZone__rootRunUnary; + get$_runUnary() { + return B._RunUnaryZoneFunction__RootZone__rootRunUnary; }, - get$_runBinary: function() { - return C._ZoneFunction__RootZone__rootRunBinary; + get$_runBinary() { + return B._RunBinaryZoneFunction__RootZone__rootRunBinary; }, - get$_registerCallback: function() { - return C._ZoneFunction__RootZone__rootRegisterCallback; + get$_registerCallback() { + return B._RegisterNullaryZoneFunction__RootZone__rootRegisterCallback; }, - get$_registerUnaryCallback: function() { - return C._ZoneFunction_Eeh; + get$_registerUnaryCallback() { + return B._RegisterUnaryZoneFunction_Bqo; }, - get$_registerBinaryCallback: function() { - return C._ZoneFunction_7G2; + get$_registerBinaryCallback() { + return B._RegisterBinaryZoneFunction_kGu; }, - get$_errorCallback: function() { - return C._ZoneFunction__RootZone__rootErrorCallback; + get$_errorCallback() { + return B._ZoneFunction__RootZone__rootErrorCallback; }, - get$_scheduleMicrotask: function() { - return C._ZoneFunction__RootZone__rootScheduleMicrotask; + get$_scheduleMicrotask() { + return B._ZoneFunction__RootZone__rootScheduleMicrotask; }, - get$_createTimer: function() { - return C._ZoneFunction__RootZone__rootCreateTimer; + get$_createTimer() { + return B._ZoneFunction__RootZone__rootCreateTimer; }, - get$_createPeriodicTimer: function() { - return C._ZoneFunction_3bB; + get$_createPeriodicTimer() { + return B._ZoneFunction_3bB; }, - get$_print: function() { - return C._ZoneFunction__RootZone__rootPrint; + get$_print() { + return B._ZoneFunction__RootZone__rootPrint; }, - get$_fork: function() { - return C._ZoneFunction__RootZone__rootFork; + get$_fork() { + return B._ZoneFunction__RootZone__rootFork; }, - get$_handleUncaughtError: function() { - return C._ZoneFunction_NMc; + get$_handleUncaughtError() { + return B._ZoneFunction_NMc; }, - get$parent: function(_) { - return; + get$parent(_) { + return null; }, - get$_async$_map: function() { + get$_map() { return $.$get$_RootZone__rootMap(); }, - get$_delegate: function() { + get$_delegate() { var t1 = $._RootZone__rootDelegate; - if (t1 != null) - return t1; - t1 = new P._ZoneDelegate(this); - $._RootZone__rootDelegate = t1; - return t1; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + var t1 = $._RootZone__rootDelegate; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; }, - get$errorZone: function() { + get$errorZone() { return this; }, - runGuarded$1: function(f) { + runGuarded$1(f) { var e, s, exception; - H.functionTypeCheck(f, {func: 1, ret: -1}); + type$.void_Function._as(f); try { - if (C.C__RootZone === $.Zone__current) { + if (B.C__RootZone === $.Zone__current) { f.call$0(); return; } - P._rootRun(null, null, this, f, -1); + A._rootRun(null, null, this, f, type$.void); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(null, null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(type$.Object._as(e), type$.StackTrace._as(s)); } }, - runUnaryGuarded$1$2: function(f, arg, $T) { + runUnaryGuarded$1$2(f, arg, $T) { var e, s, exception; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}); - H.assertSubtypeOfRuntimeType(arg, $T); + $T._eval$1("~(0)")._as(f); + $T._as(arg); try { - if (C.C__RootZone === $.Zone__current) { + if (B.C__RootZone === $.Zone__current) { f.call$1(arg); return; } - P._rootRunUnary(null, null, this, f, arg, -1, $T); + A._rootRunUnary(null, null, this, f, arg, type$.void, $T); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(null, null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(type$.Object._as(e), type$.StackTrace._as(s)); } }, - runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) { + runBinaryGuarded$2$3(f, arg1, arg2, T1, T2) { var e, s, exception; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [T1, T2]}); - H.assertSubtypeOfRuntimeType(arg1, T1); - H.assertSubtypeOfRuntimeType(arg2, T2); + T1._eval$1("@<0>")._bind$1(T2)._eval$1("~(1,2)")._as(f); + T1._as(arg1); + T2._as(arg2); try { - if (C.C__RootZone === $.Zone__current) { + if (B.C__RootZone === $.Zone__current) { f.call$2(arg1, arg2); return; } - P._rootRunBinary(null, null, this, f, arg1, arg2, -1, T1, T2); + A._rootRunBinary(null, null, this, f, arg1, arg2, type$.void, T1, T2); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - P._rootHandleUncaughtError(null, null, this, e, H.interceptedTypeCheck(s, "$isStackTrace")); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(type$.Object._as(e), type$.StackTrace._as(s)); } }, - bindCallback$1$1: function(f, $R) { - return new P._RootZone_bindCallback_closure(this, H.functionTypeCheck(f, {func: 1, ret: $R}), $R); + bindCallback$1$1(f, $R) { + return new A._RootZone_bindCallback_closure(this, $R._eval$1("0()")._as(f), $R); }, - bindCallbackGuarded$1: function(f) { - return new P._RootZone_bindCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1})); + bindUnaryCallback$2$1(f, $R, $T) { + return new A._RootZone_bindUnaryCallback_closure(this, $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f), $T, $R); }, - bindUnaryCallbackGuarded$1$1: function(f, $T) { - return new P._RootZone_bindUnaryCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}), $T); + bindCallbackGuarded$1(f) { + return new A._RootZone_bindCallbackGuarded_closure(this, type$.void_Function._as(f)); }, - $index: function(_, key) { - return; + bindUnaryCallbackGuarded$1$1(f, $T) { + return new A._RootZone_bindUnaryCallbackGuarded_closure(this, $T._eval$1("~(0)")._as(f), $T); }, - handleUncaughtError$2: function(error, stackTrace) { - P._rootHandleUncaughtError(null, null, this, error, H.interceptedTypeCheck(stackTrace, "$isStackTrace")); + $index(_, key) { + return null; }, - fork$2$specification$zoneValues: function(specification, zoneValues) { - return P._rootFork(null, null, this, specification, zoneValues); + handleUncaughtError$2(error, stackTrace) { + A._rootHandleError(error, type$.StackTrace._as(stackTrace)); }, - run$1$1: function(f, $R) { - H.functionTypeCheck(f, {func: 1, ret: $R}); - if ($.Zone__current === C.C__RootZone) + fork$2$specification$zoneValues(specification, zoneValues) { + return A._rootFork(null, null, this, specification, zoneValues); + }, + run$1$1(f, $R) { + $R._eval$1("0()")._as(f); + if ($.Zone__current === B.C__RootZone) return f.call$0(); - return P._rootRun(null, null, this, f, $R); + return A._rootRun(null, null, this, f, $R); }, - runUnary$2$2: function(f, arg, $R, $T) { - H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}); - H.assertSubtypeOfRuntimeType(arg, $T); - if ($.Zone__current === C.C__RootZone) + runUnary$2$2(f, arg, $R, $T) { + $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f); + $T._as(arg); + if ($.Zone__current === B.C__RootZone) return f.call$1(arg); - return P._rootRunUnary(null, null, this, f, arg, $R, $T); + return A._rootRunUnary(null, null, this, f, arg, $R, $T); }, - runBinary$3$3: function(f, arg1, arg2, $R, T1, T2) { - H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); - H.assertSubtypeOfRuntimeType(arg1, T1); - H.assertSubtypeOfRuntimeType(arg2, T2); - if ($.Zone__current === C.C__RootZone) + runBinary$3$3(f, arg1, arg2, $R, T1, T2) { + $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); + T1._as(arg1); + T2._as(arg2); + if ($.Zone__current === B.C__RootZone) return f.call$2(arg1, arg2); - return P._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2); + return A._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2); }, - registerCallback$1$1: function(f, $R) { - return H.functionTypeCheck(f, {func: 1, ret: $R}); + registerCallback$1$1(f, $R) { + return $R._eval$1("0()")._as(f); }, - registerUnaryCallback$2$1: function(f, $R, $T) { - return H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]}); + registerUnaryCallback$2$1(f, $R, $T) { + return $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f); }, - registerBinaryCallback$3$1: function(f, $R, T1, T2) { - return H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]}); + registerBinaryCallback$3$1(f, $R, T1, T2) { + return $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f); }, - errorCallback$2: function(error, stackTrace) { - return; + errorCallback$2(error, stackTrace) { + return null; }, - scheduleMicrotask$1: function(f) { - P._rootScheduleMicrotask(null, null, this, H.functionTypeCheck(f, {func: 1, ret: -1})); + scheduleMicrotask$1(f) { + A._rootScheduleMicrotask(null, null, this, type$.void_Function._as(f)); }, - createPeriodicTimer$2: function(duration, f) { - return P.Timer__createPeriodicTimer(duration, H.functionTypeCheck(f, {func: 1, ret: -1, args: [P.Timer]})); + createPeriodicTimer$2(duration, f) { + return A.Timer__createPeriodicTimer(duration, type$.void_Function_Timer._as(f)); }, - print$1: function(_, line) { - H.printString(line); + print$1(_, line) { + A.printString(line); } }; - P._RootZone_bindCallback_closure.prototype = { - call$0: function() { + A._RootZone_bindCallback_closure.prototype = { + call$0() { return this.$this.run$1$1(this.f, this.R); }, - $signature: function() { - return {func: 1, ret: this.R}; + $signature() { + return this.R._eval$1("0()"); + } + }; + A._RootZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this, + t1 = _this.T; + return _this.$this.runUnary$2$2(_this.f, t1._as(arg), _this.R, t1); + }, + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); } }; - P._RootZone_bindCallbackGuarded_closure.prototype = { - call$0: function() { + A._RootZone_bindCallbackGuarded_closure.prototype = { + call$0() { return this.$this.runGuarded$1(this.f); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - P._RootZone_bindUnaryCallbackGuarded_closure.prototype = { - call$1: function(arg) { + A._RootZone_bindUnaryCallbackGuarded_closure.prototype = { + call$1(arg) { var t1 = this.T; - return this.$this.runUnaryGuarded$1$2(this.f, H.assertSubtypeOfRuntimeType(arg, t1), t1); + return this.$this.runUnaryGuarded$1$2(this.f, t1._as(arg), t1); }, - $signature: function() { - return {func: 1, ret: -1, args: [this.T]}; + $signature() { + return this.T._eval$1("~(0)"); } }; - P.runZoned_closure.prototype = { - call$5: function($self, $parent, zone, error, stackTrace) { - var e, s, t1, t2, t3, exception; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); + A.runZonedGuarded_closure.prototype = { + call$5($self, $parent, zone, error, stackTrace) { + var e, s, exception, t2, + t1 = type$.StackTrace; + t1._as(stackTrace); try { - t1 = this._box_0; - t2 = -1; - t3 = P.Object; - if (t1.binaryOnError != null) - $self.get$parent($self).runBinary$3$3(t1.binaryOnError, error, stackTrace, t2, t3, P.StackTrace); - else - $self.get$parent($self).runUnary$2$2(t1.unaryOnError, error, t2, t3); + this.parentZone.runBinary$3$3(this.onError, error, stackTrace, type$.void, type$.Object, t1); } catch (exception) { - e = H.unwrapException(exception); - s = H.getTraceFromException(exception); - t1 = e; - if (t1 == null ? error == null : t1 === error) - $parent.handleUncaughtError$3(zone, error, stackTrace); + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t2 = $parent._delegationTarget; + if (e === error) + t2._processUncaughtError$3(zone, error, stackTrace); else - $parent.handleUncaughtError$3(zone, e, s); + t2._processUncaughtError$3(zone, type$.Object._as(e), t1._as(s)); } }, - $signature: 32 + $signature: 27 }; - P._HashMap.prototype = { - get$length: function(_) { + A._HashMap.prototype = { + get$length(_) { return this._collection$_length; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this._collection$_length === 0; }, - get$keys: function() { - return new P._HashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]); + get$keys() { + return new A._HashMapKeyIterable(this, A._instanceType(this)._eval$1("_HashMapKeyIterable<1>")); }, - containsKey$1: function(key) { - var strings, nums; - if (typeof key === "string" && key !== "__proto__") { - strings = this._collection$_strings; + containsKey$1(key) { + var strings, t1; + if (key !== "__proto__") { + strings = this._strings; return strings == null ? false : strings[key] != null; - } else if (typeof key === "number" && (key & 1073741823) === key) { - nums = this._collection$_nums; - return nums == null ? false : nums[key] != null; - } else - return this._containsKey$1(key); + } else { + t1 = this._containsKey$1(key); + return t1; + } }, - _containsKey$1: function(key) { + _containsKey$1(key) { var rest = this._collection$_rest; if (rest == null) return false; return this._findBucketIndex$2(this._getBucket$2(rest, key), key) >= 0; }, - $index: function(_, key) { + $index(_, key) { var strings, t1, nums; - if (typeof key === "string" && key !== "__proto__") { - strings = this._collection$_strings; - t1 = strings == null ? null : P._HashMap__getTableEntry(strings, key); + if (typeof key == "string" && key !== "__proto__") { + strings = this._strings; + t1 = strings == null ? null : A._HashMap__getTableEntry(strings, key); return t1; - } else if (typeof key === "number" && (key & 1073741823) === key) { - nums = this._collection$_nums; - t1 = nums == null ? null : P._HashMap__getTableEntry(nums, key); + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._nums; + t1 = nums == null ? null : A._HashMap__getTableEntry(nums, key); return t1; } else return this._get$1(key); }, - _get$1: function(key) { - var rest, bucket, index; - rest = this._collection$_rest; + _get$1(key) { + var bucket, index, + rest = this._collection$_rest; if (rest == null) - return; + return null; bucket = this._getBucket$2(rest, key); index = this._findBucketIndex$2(bucket, key); return index < 0 ? null : bucket[index + 1]; }, - $indexSet: function(_, key, value) { - var strings, nums; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 1)); - if (typeof key === "string" && key !== "__proto__") { - strings = this._collection$_strings; - if (strings == null) { - strings = P._HashMap__newHashTable(); - this._collection$_strings = strings; - } - this._collection$_addHashTableEntry$3(strings, key, value); - } else if (typeof key === "number" && (key & 1073741823) === key) { - nums = this._collection$_nums; - if (nums == null) { - nums = P._HashMap__newHashTable(); - this._collection$_nums = nums; - } - this._collection$_addHashTableEntry$3(nums, key, value); + $indexSet(_, key, value) { + var strings, nums, _this = this, + t1 = A._instanceType(_this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); + if (typeof key == "string" && key !== "__proto__") { + strings = _this._strings; + _this._addHashTableEntry$3(strings == null ? _this._strings = A._HashMap__newHashTable() : strings, key, value); + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = _this._nums; + _this._addHashTableEntry$3(nums == null ? _this._nums = A._HashMap__newHashTable() : nums, key, value); } else - this._set$2(key, value); - }, - _set$2: function(key, value) { - var rest, hash, bucket, index; - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 1)); - rest = this._collection$_rest; - if (rest == null) { - rest = P._HashMap__newHashTable(); - this._collection$_rest = rest; - } - hash = this._computeHashCode$1(key); + _this._set$2(key, value); + }, + _set$2(key, value) { + var rest, hash, bucket, index, _this = this, + t1 = A._instanceType(_this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._HashMap__newHashTable(); + hash = _this._computeHashCode$1(key); bucket = rest[hash]; if (bucket == null) { - P._HashMap__setTableEntry(rest, hash, [key, value]); - ++this._collection$_length; - this._collection$_keys = null; + A._HashMap__setTableEntry(rest, hash, [key, value]); + ++_this._collection$_length; + _this._keys = null; } else { - index = this._findBucketIndex$2(bucket, key); + index = _this._findBucketIndex$2(bucket, key); if (index >= 0) bucket[index + 1] = value; else { bucket.push(key, value); - ++this._collection$_length; - this._collection$_keys = null; + ++_this._collection$_length; + _this._keys = null; } } }, - forEach$1: function(_, action) { - var t1, keys, $length, i, key; - t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(action, {func: 1, ret: -1, args: [t1, H.getTypeArgumentByIndex(this, 1)]}); - keys = this._collection$_computeKeys$0(); - for ($length = keys.length, i = 0; i < $length; ++i) { + forEach$1(_, action) { + var keys, $length, t2, i, key, t3, _this = this, + t1 = A._instanceType(_this); + t1._eval$1("~(1,2)")._as(action); + keys = _this._computeKeys$0(); + for ($length = keys.length, t2 = t1._precomputed1, t1 = t1._rest[1], i = 0; i < $length; ++i) { key = keys[i]; - action.call$2(H.assertSubtypeOfRuntimeType(key, t1), this.$index(0, key)); - if (keys !== this._collection$_keys) - throw H.wrapException(P.ConcurrentModificationError$(this)); + t2._as(key); + t3 = _this.$index(0, key); + action.call$2(key, t3 == null ? t1._as(t3) : t3); + if (keys !== _this._keys) + throw A.wrapException(A.ConcurrentModificationError$(_this)); } }, - _collection$_computeKeys$0: function() { - var t1, result, strings, names, entries, index, i, nums, rest, bucket, $length, i0; - t1 = this._collection$_keys; - if (t1 != null) - return t1; - result = new Array(this._collection$_length); - result.fixed$length = Array; - strings = this._collection$_strings; + _computeKeys$0() { + var strings, names, entries, index, i, nums, rest, bucket, $length, i0, _this = this, + result = _this._keys; + if (result != null) + return result; + result = A.List_List$filled(_this._collection$_length, null, false, type$.dynamic); + strings = _this._strings; if (strings != null) { names = Object.getOwnPropertyNames(strings); entries = names.length; @@ -10087,7 +10951,7 @@ } } else index = 0; - nums = this._collection$_nums; + nums = _this._nums; if (nums != null) { names = Object.getOwnPropertyNames(nums); entries = names.length; @@ -10096,7 +10960,7 @@ ++index; } } - rest = this._collection$_rest; + rest = _this._collection$_rest; if (rest != null) { names = Object.getOwnPropertyNames(rest); entries = names.length; @@ -10109,25 +10973,25 @@ } } } - this._collection$_keys = result; - return result; + return _this._keys = result; }, - _collection$_addHashTableEntry$3: function(table, key, value) { - H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)); - H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 1)); + _addHashTableEntry$3(table, key, value) { + var t1 = A._instanceType(this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); if (table[key] == null) { ++this._collection$_length; - this._collection$_keys = null; + this._keys = null; } - P._HashMap__setTableEntry(table, key, value); + A._HashMap__setTableEntry(table, key, value); }, - _computeHashCode$1: function(key) { + _computeHashCode$1(key) { return J.get$hashCode$(key) & 1073741823; }, - _getBucket$2: function(table, key) { + _getBucket$2(table, key) { return table[this._computeHashCode$1(key)]; }, - _findBucketIndex$2: function(bucket, key) { + _findBucketIndex$2(bucket, key) { var $length, i; if (bucket == null) return -1; @@ -10138,516 +11002,505 @@ return -1; } }; - P._HashMapKeyIterable.prototype = { - get$length: function(_) { - return this._map._collection$_length; + A._HashMapKeyIterable.prototype = { + get$length(_) { + return this._collection$_map._collection$_length; }, - get$isEmpty: function(_) { - return this._map._collection$_length === 0; + get$isEmpty(_) { + return this._collection$_map._collection$_length === 0; }, - get$iterator: function(_) { - var t1 = this._map; - return new P._HashMapKeyIterator(t1, t1._collection$_computeKeys$0(), this.$ti); + get$iterator(_) { + var t1 = this._collection$_map; + return new A._HashMapKeyIterator(t1, t1._computeKeys$0(), this.$ti._eval$1("_HashMapKeyIterator<1>")); } }; - P._HashMapKeyIterator.prototype = { - get$current: function() { - return this._collection$_current; + A._HashMapKeyIterator.prototype = { + get$current() { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; }, - moveNext$0: function() { - var keys, offset, t1; - keys = this._collection$_keys; - offset = this._offset; - t1 = this._map; - if (keys !== t1._collection$_keys) - throw H.wrapException(P.ConcurrentModificationError$(t1)); + moveNext$0() { + var _this = this, + keys = _this._keys, + offset = _this._offset, + t1 = _this._collection$_map; + if (keys !== t1._keys) + throw A.wrapException(A.ConcurrentModificationError$(t1)); else if (offset >= keys.length) { - this.set$_collection$_current(null); + _this.set$_collection$_current(null); return false; } else { - this.set$_collection$_current(keys[offset]); - this._offset = offset + 1; + _this.set$_collection$_current(keys[offset]); + _this._offset = offset + 1; return true; } }, - set$_collection$_current: function(_current) { - this._collection$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + set$_collection$_current(_current) { + this._collection$_current = this.$ti._eval$1("1?")._as(_current); }, $isIterator: 1 }; - P._LinkedHashSet.prototype = { - get$iterator: function(_) { - var t1 = new P._LinkedHashSetIterator(this, this._collection$_modifications, this.$ti); - t1._collection$_cell = this._collection$_first; + A._LinkedHashSet.prototype = { + get$iterator(_) { + var _this = this, + t1 = new A._LinkedHashSetIterator(_this, _this._collection$_modifications, A._instanceType(_this)._eval$1("_LinkedHashSetIterator<1>")); + t1._collection$_cell = _this._collection$_first; return t1; }, - get$length: function(_) { + get$length(_) { return this._collection$_length; }, - contains$1: function(_, object) { - var strings, nums; - if (typeof object === "string" && object !== "__proto__") { - strings = this._collection$_strings; - if (strings == null) - return false; - return H.interceptedTypeCheck(strings[object], "$is_LinkedHashSetCell") != null; - } else if (typeof object === "number" && (object & 1073741823) === object) { - nums = this._collection$_nums; + contains$1(_, object) { + var nums; + if ((object & 1073741823) === object) { + nums = this._nums; if (nums == null) return false; - return H.interceptedTypeCheck(nums[object], "$is_LinkedHashSetCell") != null; + return type$.nullable__LinkedHashSetCell._as(nums[object]) != null; } else return this._contains$1(object); }, - _contains$1: function(object) { + _contains$1(object) { var rest = this._collection$_rest; if (rest == null) return false; - return this._findBucketIndex$2(this._getBucket$2(rest, object), object) >= 0; - }, - add$1: function(_, element) { - var strings, nums; - H.assertSubtypeOfRuntimeType(element, H.getTypeArgumentByIndex(this, 0)); - if (typeof element === "string" && element !== "__proto__") { - strings = this._collection$_strings; - if (strings == null) { - strings = P._LinkedHashSet__newHashTable(); - this._collection$_strings = strings; - } - return this._collection$_addHashTableEntry$2(strings, element); - } else if (typeof element === "number" && (element & 1073741823) === element) { - nums = this._collection$_nums; - if (nums == null) { - nums = P._LinkedHashSet__newHashTable(); - this._collection$_nums = nums; - } - return this._collection$_addHashTableEntry$2(nums, element); + return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0; + }, + add$1(_, element) { + var strings, nums, _this = this; + A._instanceType(_this)._precomputed1._as(element); + if (typeof element == "string" && element !== "__proto__") { + strings = _this._strings; + return _this._addHashTableEntry$2(strings == null ? _this._strings = A._LinkedHashSet__newHashTable() : strings, element); + } else if (typeof element == "number" && (element & 1073741823) === element) { + nums = _this._nums; + return _this._addHashTableEntry$2(nums == null ? _this._nums = A._LinkedHashSet__newHashTable() : nums, element); } else - return this._collection$_add$1(element); + return _this._collection$_add$1(element); }, - _collection$_add$1: function(element) { - var rest, hash, bucket; - H.assertSubtypeOfRuntimeType(element, H.getTypeArgumentByIndex(this, 0)); - rest = this._collection$_rest; - if (rest == null) { - rest = P._LinkedHashSet__newHashTable(); - this._collection$_rest = rest; - } - hash = this._computeHashCode$1(element); + _collection$_add$1(element) { + var rest, hash, bucket, _this = this; + A._instanceType(_this)._precomputed1._as(element); + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._LinkedHashSet__newHashTable(); + hash = _this._computeHashCode$1(element); bucket = rest[hash]; if (bucket == null) - rest[hash] = [this._collection$_newLinkedCell$1(element)]; + rest[hash] = [_this._collection$_newLinkedCell$1(element)]; else { - if (this._findBucketIndex$2(bucket, element) >= 0) + if (_this._findBucketIndex$2(bucket, element) >= 0) return false; - bucket.push(this._collection$_newLinkedCell$1(element)); + bucket.push(_this._collection$_newLinkedCell$1(element)); } return true; }, - remove$1: function(_, object) { - if (typeof object === "string" && object !== "__proto__") - return this._collection$_removeHashTableEntry$2(this._collection$_strings, object); - else if (typeof object === "number" && (object & 1073741823) === object) - return this._collection$_removeHashTableEntry$2(this._collection$_nums, object); + remove$1(_, object) { + var _this = this; + if (typeof object == "string" && object !== "__proto__") + return _this._collection$_removeHashTableEntry$2(_this._strings, object); + else if (typeof object == "number" && (object & 1073741823) === object) + return _this._collection$_removeHashTableEntry$2(_this._nums, object); else - return this._remove$1(object); + return _this._remove$1(object); }, - _remove$1: function(object) { - var rest, bucket, index; - rest = this._collection$_rest; + _remove$1(object) { + var hash, bucket, index, cell, _this = this, + rest = _this._collection$_rest; if (rest == null) return false; - bucket = this._getBucket$2(rest, object); - index = this._findBucketIndex$2(bucket, object); + hash = _this._computeHashCode$1(object); + bucket = rest[hash]; + index = _this._findBucketIndex$2(bucket, object); if (index < 0) return false; - this._collection$_unlinkCell$1(bucket.splice(index, 1)[0]); + cell = bucket.splice(index, 1)[0]; + if (0 === bucket.length) + delete rest[hash]; + _this._collection$_unlinkCell$1(cell); return true; }, - _collection$_addHashTableEntry$2: function(table, element) { - H.assertSubtypeOfRuntimeType(element, H.getTypeArgumentByIndex(this, 0)); - if (H.interceptedTypeCheck(table[element], "$is_LinkedHashSetCell") != null) + _addHashTableEntry$2(table, element) { + A._instanceType(this)._precomputed1._as(element); + if (type$.nullable__LinkedHashSetCell._as(table[element]) != null) return false; table[element] = this._collection$_newLinkedCell$1(element); return true; }, - _collection$_removeHashTableEntry$2: function(table, element) { + _collection$_removeHashTableEntry$2(table, element) { var cell; if (table == null) return false; - cell = H.interceptedTypeCheck(table[element], "$is_LinkedHashSetCell"); + cell = type$.nullable__LinkedHashSetCell._as(table[element]); if (cell == null) return false; this._collection$_unlinkCell$1(cell); delete table[element]; return true; }, - _collection$_modified$0: function() { - this._collection$_modifications = 1073741823 & this._collection$_modifications + 1; + _collection$_modified$0() { + this._collection$_modifications = this._collection$_modifications + 1 & 1073741823; }, - _collection$_newLinkedCell$1: function(element) { - var cell, last; - cell = new P._LinkedHashSetCell(H.assertSubtypeOfRuntimeType(element, H.getTypeArgumentByIndex(this, 0))); - if (this._collection$_first == null) { - this._collection$_last = cell; - this._collection$_first = cell; - } else { - last = this._collection$_last; - cell._collection$_previous = last; - last._collection$_next = cell; - this._collection$_last = cell; + _collection$_newLinkedCell$1(element) { + var t1, _this = this, + cell = new A._LinkedHashSetCell(A._instanceType(_this)._precomputed1._as(element)); + if (_this._collection$_first == null) + _this._collection$_first = _this._collection$_last = cell; + else { + t1 = _this._collection$_last; + t1.toString; + cell._collection$_previous = t1; + _this._collection$_last = t1._collection$_next = cell; } - ++this._collection$_length; - this._collection$_modified$0(); + ++_this._collection$_length; + _this._collection$_modified$0(); return cell; }, - _collection$_unlinkCell$1: function(cell) { - var previous, next; - previous = cell._collection$_previous; - next = cell._collection$_next; + _collection$_unlinkCell$1(cell) { + var _this = this, + previous = cell._collection$_previous, + next = cell._collection$_next; if (previous == null) - this._collection$_first = next; + _this._collection$_first = next; else previous._collection$_next = next; if (next == null) - this._collection$_last = previous; + _this._collection$_last = previous; else next._collection$_previous = previous; - --this._collection$_length; - this._collection$_modified$0(); + --_this._collection$_length; + _this._collection$_modified$0(); }, - _computeHashCode$1: function(element) { + _computeHashCode$1(element) { return J.get$hashCode$(element) & 1073741823; }, - _getBucket$2: function(table, element) { - return table[this._computeHashCode$1(element)]; - }, - _findBucketIndex$2: function(bucket, element) { - var $length, i, t1; + _findBucketIndex$2(bucket, element) { + var $length, i; if (bucket == null) return -1; $length = bucket.length; - for (i = 0; i < $length; ++i) { - t1 = bucket[i]._element; - if (t1 == null ? element == null : t1 === element) + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i]._element, element)) return i; - } return -1; } }; - P._LinkedHashSetCell.prototype = {}; - P._LinkedHashSetIterator.prototype = { - get$current: function() { - return this._collection$_current; - }, - moveNext$0: function() { - var t1 = this._set; - if (this._collection$_modifications !== t1._collection$_modifications) - throw H.wrapException(P.ConcurrentModificationError$(t1)); - else { - t1 = this._collection$_cell; - if (t1 == null) { - this.set$_collection$_current(null); - return false; - } else { - this.set$_collection$_current(H.assertSubtypeOfRuntimeType(t1._element, H.getTypeArgumentByIndex(this, 0))); - this._collection$_cell = this._collection$_cell._collection$_next; - return true; - } + A._LinkedHashSetCell.prototype = {}; + A._LinkedHashSetIterator.prototype = { + get$current() { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + cell = _this._collection$_cell, + t1 = _this._set; + if (_this._collection$_modifications !== t1._collection$_modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (cell == null) { + _this.set$_collection$_current(null); + return false; + } else { + _this.set$_collection$_current(_this.$ti._eval$1("1?")._as(cell._element)); + _this._collection$_cell = cell._collection$_next; + return true; } }, - set$_collection$_current: function(_current) { - this._collection$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + set$_collection$_current(_current) { + this._collection$_current = this.$ti._eval$1("1?")._as(_current); }, $isIterator: 1 }; - P.IterableBase.prototype = {}; - P.ListBase.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1}; - P.ListMixin.prototype = { - get$iterator: function(receiver) { - return new H.ListIterator(receiver, this.get$length(receiver), 0, [H.getRuntimeTypeArgumentIntercepted(this, receiver, "ListMixin", 0)]); + A.IterableBase.prototype = {}; + A.ListBase.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1}; + A.ListMixin.prototype = { + get$iterator(receiver) { + return new A.ListIterator(receiver, this.get$length(receiver), A.instanceType(receiver)._eval$1("ListIterator")); }, - elementAt$1: function(receiver, index) { + elementAt$1(receiver, index) { return this.$index(receiver, index); }, - get$isEmpty: function(receiver) { + get$isEmpty(receiver) { return this.get$length(receiver) === 0; }, - get$isNotEmpty: function(receiver) { + get$isNotEmpty(receiver) { return !this.get$isEmpty(receiver); }, - fillRange$3: function(receiver, start, end, fill) { + fillRange$3(receiver, start, end, fill) { var i; - H.assertSubtypeOfRuntimeType(fill, H.getRuntimeTypeArgumentIntercepted(this, receiver, "ListMixin", 0)); - P.RangeError_checkValidRange(start, end, this.get$length(receiver)); + A.instanceType(receiver)._eval$1("ListMixin.E?")._as(fill); + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); for (i = start; i < end; ++i) this.$indexSet(receiver, i, fill); }, - toString$0: function(receiver) { - return P.IterableBase_iterableToFullString(receiver, "[", "]"); + toString$0(receiver) { + return A.IterableBase_iterableToFullString(receiver, "[", "]"); } }; - P.MapBase.prototype = {}; - P.MapBase_mapToString_closure.prototype = { - call$2: function(k, v) { - var t1, t2; - t1 = this._box_0; + A.MapBase.prototype = {}; + A.MapBase_mapToString_closure.prototype = { + call$2(k, v) { + var t2, + t1 = this._box_0; if (!t1.first) this.result._contents += ", "; t1.first = false; t1 = this.result; - t2 = t1._contents += H.S(k); + t2 = t1._contents += A.S(k); t1._contents = t2 + ": "; - t1._contents += H.S(v); + t1._contents += A.S(v); }, - $signature: 13 + $signature: 21 }; - P.MapMixin.prototype = { - forEach$1: function(_, action) { - var t1, key; - H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getRuntimeTypeArgument(this, "MapMixin", 0), H.getRuntimeTypeArgument(this, "MapMixin", 1)]}); - for (t1 = this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) { - key = t1.get$current(); - action.call$2(key, this.$index(0, key)); + A.MapMixin.prototype = { + forEach$1(_, action) { + var t2, key, t3, + t1 = A._instanceType(this); + t1._eval$1("~(MapMixin.K,MapMixin.V)")._as(action); + for (t2 = this.get$keys(), t2 = t2.get$iterator(t2), t1 = t1._eval$1("MapMixin.V"); t2.moveNext$0();) { + key = t2.get$current(); + t3 = this.$index(0, key); + action.call$2(key, t3 == null ? t1._as(t3) : t3); } }, - get$length: function(_) { + get$length(_) { var t1 = this.get$keys(); return t1.get$length(t1); }, - get$isEmpty: function(_) { + get$isEmpty(_) { var t1 = this.get$keys(); return t1.get$isEmpty(t1); }, - toString$0: function(_) { - return P.MapBase_mapToString(this); + toString$0(_) { + return A.MapBase_mapToString(this); }, $isMap: 1 }; - P._UnmodifiableMapMixin.prototype = { - $indexSet: function(_, key, value) { - H.assertSubtypeOfRuntimeType(key, H.getRuntimeTypeArgument(this, "_UnmodifiableMapMixin", 0)); - H.assertSubtypeOfRuntimeType(value, H.getRuntimeTypeArgument(this, "_UnmodifiableMapMixin", 1)); - throw H.wrapException(P.UnsupportedError$("Cannot modify unmodifiable map")); + A._UnmodifiableMapMixin.prototype = { + $indexSet(_, key, value) { + var t1 = A._instanceType(this); + t1._precomputed1._as(key); + t1._rest[1]._as(value); + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); } }; - P.MapView.prototype = { - $index: function(_, key) { - return this._map.$index(0, key); + A.MapView.prototype = { + $index(_, key) { + return this._collection$_map.$index(0, key); }, - $indexSet: function(_, key, value) { - this._map.$indexSet(0, H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(this, 0)), H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(this, 1))); + $indexSet(_, key, value) { + var t1 = A._instanceType(this); + this._collection$_map.$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value)); }, - forEach$1: function(_, action) { - this._map.forEach$1(0, H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentByIndex(this, 1)]})); + forEach$1(_, action) { + this._collection$_map.forEach$1(0, A._instanceType(this)._eval$1("~(1,2)")._as(action)); }, - get$isEmpty: function(_) { - var t1 = this._map; + get$isEmpty(_) { + var t1 = this._collection$_map; return t1.get$isEmpty(t1); }, - get$length: function(_) { - var t1 = this._map; + get$length(_) { + var t1 = this._collection$_map; return t1.get$length(t1); }, - toString$0: function(_) { - return J.toString$0$(this._map); + toString$0(_) { + return this._collection$_map.toString$0(0); }, $isMap: 1 }; - P.UnmodifiableMapView.prototype = {}; - P._SetBase.prototype = { - toString$0: function(_) { - return P.IterableBase_iterableToFullString(this, "{", "}"); - }, - $isEfficientLengthIterable: 1, - $isIterable: 1, - $isSet: 1 + A.UnmodifiableMapView.prototype = {}; + A.SetMixin.prototype = { + toString$0(_) { + return A.IterableBase_iterableToFullString(this, "{", "}"); + } }; - P._ListBase_Object_ListMixin.prototype = {}; - P._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; - P._JsonMap.prototype = { - $index: function(_, key) { - var t1, result; - t1 = this._processed; + A._SetBase.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isSet: 1}; + A._ListBase_Object_ListMixin.prototype = {}; + A._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; + A.__SetBase_Object_SetMixin.prototype = {}; + A._JsonMap.prototype = { + $index(_, key) { + var result, + t1 = this._processed; if (t1 == null) return this._data.$index(0, key); - else if (typeof key !== "string") - return; + else if (typeof key != "string") + return null; else { result = t1[key]; return typeof result == "undefined" ? this._process$1(key) : result; } }, - get$length: function(_) { - return this._processed == null ? this._data.__js_helper$_length : this._computeKeys$0().length; + get$length(_) { + return this._processed == null ? this._data.__js_helper$_length : this._convert$_computeKeys$0().length; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return this.get$length(this) === 0; }, - get$keys: function() { + get$keys() { if (this._processed == null) { var t1 = this._data; - return new H.LinkedHashMapKeyIterable(t1, [H.getTypeArgumentByIndex(t1, 0)]); + return new A.LinkedHashMapKeyIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>")); } - return new P._JsonMapKeyIterable(this); + return new A._JsonMapKeyIterable(this); }, - $indexSet: function(_, key, value) { - var processed, original; - if (this._processed == null) - this._data.$indexSet(0, key, value); - else if (this.containsKey$1(key)) { - processed = this._processed; + $indexSet(_, key, value) { + var processed, original, _this = this; + if (_this._processed == null) + _this._data.$indexSet(0, key, value); + else if (_this.containsKey$1(key)) { + processed = _this._processed; processed[key] = value; - original = this._original; + original = _this._original; if (original == null ? processed != null : original !== processed) original[key] = null; } else - this._upgrade$0().$indexSet(0, key, value); + _this._upgrade$0().$indexSet(0, key, value); }, - containsKey$1: function(key) { + containsKey$1(key) { if (this._processed == null) return this._data.containsKey$1(key); return Object.prototype.hasOwnProperty.call(this._original, key); }, - forEach$1: function(_, f) { - var keys, i, key, value; - H.functionTypeCheck(f, {func: 1, ret: -1, args: [P.String,,]}); - if (this._processed == null) - return this._data.forEach$1(0, f); - keys = this._computeKeys$0(); + forEach$1(_, f) { + var keys, i, key, value, _this = this; + type$.void_Function_String_dynamic._as(f); + if (_this._processed == null) + return _this._data.forEach$1(0, f); + keys = _this._convert$_computeKeys$0(); for (i = 0; i < keys.length; ++i) { key = keys[i]; - value = this._processed[key]; + value = _this._processed[key]; if (typeof value == "undefined") { - value = P._convertJsonToDartLazy(this._original[key]); - this._processed[key] = value; + value = A._convertJsonToDartLazy(_this._original[key]); + _this._processed[key] = value; } f.call$2(key, value); - if (keys !== this._data) - throw H.wrapException(P.ConcurrentModificationError$(this)); + if (keys !== _this._data) + throw A.wrapException(A.ConcurrentModificationError$(_this)); } }, - _computeKeys$0: function() { - var keys = H.listTypeCheck(this._data); - if (keys == null) { - keys = H.setRuntimeTypeInfo(Object.keys(this._original), [P.String]); - this._data = keys; - } + _convert$_computeKeys$0() { + var keys = type$.nullable_List_dynamic._as(this._data); + if (keys == null) + keys = this._data = A._setArrayType(Object.keys(this._original), type$.JSArray_String); return keys; }, - _upgrade$0: function() { - var result, keys, i, t1, key; - if (this._processed == null) - return this._data; - result = P.LinkedHashMap_LinkedHashMap$_empty(P.String, null); - keys = this._computeKeys$0(); + _upgrade$0() { + var result, keys, i, t1, key, _this = this; + if (_this._processed == null) + return _this._data; + result = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic); + keys = _this._convert$_computeKeys$0(); for (i = 0; t1 = keys.length, i < t1; ++i) { key = keys[i]; - result.$indexSet(0, key, this.$index(0, key)); + result.$indexSet(0, key, _this.$index(0, key)); } if (t1 === 0) - C.JSArray_methods.add$1(keys, null); + B.JSArray_methods.add$1(keys, ""); else - C.JSArray_methods.set$length(keys, 0); - this._processed = null; - this._original = null; - this._data = result; - return result; + B.JSArray_methods.set$length(keys, 0); + _this._original = _this._processed = null; + return _this._data = result; }, - _process$1: function(key) { + _process$1(key) { var result; if (!Object.prototype.hasOwnProperty.call(this._original, key)) - return; - result = P._convertJsonToDartLazy(this._original[key]); + return null; + result = A._convertJsonToDartLazy(this._original[key]); return this._processed[key] = result; - }, - $asMapMixin: function() { - return [P.String, null]; - }, - $asMap: function() { - return [P.String, null]; } }; - P._JsonMapKeyIterable.prototype = { - get$length: function(_) { + A._JsonMapKeyIterable.prototype = { + get$length(_) { var t1 = this._convert$_parent; return t1.get$length(t1); }, - elementAt$1: function(_, index) { + elementAt$1(_, index) { var t1 = this._convert$_parent; if (t1._processed == null) t1 = t1.get$keys().elementAt$1(0, index); else { - t1 = t1._computeKeys$0(); - if (index < 0 || index >= t1.length) - return H.ioore(t1, index); + t1 = t1._convert$_computeKeys$0(); + if (!(index >= 0 && index < t1.length)) + return A.ioore(t1, index); t1 = t1[index]; } return t1; }, - get$iterator: function(_) { + get$iterator(_) { var t1 = this._convert$_parent; if (t1._processed == null) { t1 = t1.get$keys(); t1 = t1.get$iterator(t1); } else { - t1 = t1._computeKeys$0(); - t1 = new J.ArrayIterator(t1, t1.length, 0, [H.getTypeArgumentByIndex(t1, 0)]); + t1 = t1._convert$_computeKeys$0(); + t1 = new J.ArrayIterator(t1, t1.length, A._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); } return t1; + } + }; + A.Utf8Decoder__decoder_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: true}); + return t1; + } catch (exception) { + } + return null; }, - $asEfficientLengthIterable: function() { - return [P.String]; - }, - $asListIterable: function() { - return [P.String]; + $signature: 22 + }; + A.Utf8Decoder__decoderNonfatal_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: false}); + return t1; + } catch (exception) { + } + return null; }, - $asIterable: function() { - return [P.String]; - } + $signature: 22 }; - P.AsciiCodec.prototype = { - encode$1: function(source) { - return C.AsciiEncoder_127.convert$1(source); + A.AsciiCodec.prototype = { + encode$1(source) { + return B.AsciiEncoder_127.convert$1(source); } }; - P._UnicodeSubsetEncoder.prototype = { - convert$1: function(string) { - var $length, result, t1, t2, t3, i, codeUnit; - H.stringTypeCheck(string); - $length = P.RangeError_checkValidRange(0, null, string.length) - 0; + A._UnicodeSubsetEncoder.prototype = { + convert$1(string) { + var $length, result, t1, i, codeUnit; + A._asString(string); + $length = A.RangeError_checkValidRange(0, null, string.length) - 0; result = new Uint8Array($length); - for (t1 = result.length, t2 = ~this._subsetMask, t3 = J.getInterceptor$s(string), i = 0; i < $length; ++i) { - codeUnit = t3._codeUnitAt$1(string, i); - if ((codeUnit & t2) !== 0) - throw H.wrapException(P.ArgumentError$value(string, "string", "Contains invalid characters.")); - if (i >= t1) - return H.ioore(result, i); + for (t1 = ~this._subsetMask, i = 0; i < $length; ++i) { + codeUnit = B.JSString_methods._codeUnitAt$1(string, i); + if ((codeUnit & t1) !== 0) + throw A.wrapException(A.ArgumentError$value(string, "string", "Contains invalid characters.")); + if (!(i < $length)) + return A.ioore(result, i); result[i] = codeUnit; } return result; - }, - $asStreamTransformer: function() { - return [P.String, [P.List, P.int]]; - }, - $asConverter: function() { - return [P.String, [P.List, P.int]]; } }; - P.AsciiEncoder.prototype = {}; - P.Base64Codec.prototype = { - normalize$3: function(source, start, end) { - var inverseAlphabet, t1, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t2, endLength, $length; - end = P.RangeError_checkValidRange(start, end, source.length); + A.AsciiEncoder.prototype = {}; + A.Base64Codec.prototype = { + normalize$3(source, start, end) { + var inverseAlphabet, t1, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t2, t3, endLength, $length, + _s31_ = "Invalid base64 encoding length "; + end = A.RangeError_checkValidRange(start, end, source.length); inverseAlphabet = $.$get$_Base64Decoder__inverseAlphabet(); - for (t1 = J.getInterceptor$asx(source), i = start, sliceStart = i, buffer = null, firstPadding = -1, firstPaddingSourceIndex = -1, paddingCount = 0; i < end; i = i0) { + for (t1 = inverseAlphabet.length, i = start, sliceStart = i, buffer = null, firstPadding = -1, firstPaddingSourceIndex = -1, paddingCount = 0; i < end; i = i0) { i0 = i + 1; - char = t1._codeUnitAt$1(source, i); + char = B.JSString_methods._codeUnitAt$1(source, i); if (char === 37) { i1 = i0 + 2; if (i1 <= end) { - digit1 = H.hexDigitValue(C.JSString_methods._codeUnitAt$1(source, i0)); - digit2 = H.hexDigitValue(C.JSString_methods._codeUnitAt$1(source, i0 + 1)); + digit1 = A.hexDigitValue(B.JSString_methods._codeUnitAt$1(source, i0)); + digit2 = A.hexDigitValue(B.JSString_methods._codeUnitAt$1(source, i0 + 1)); char0 = digit1 * 16 + digit2 - (digit2 & 256); if (char0 === 37) char0 = -1; @@ -10657,11 +11510,11 @@ } else char0 = char; if (0 <= char0 && char0 <= 127) { - if (char0 < 0 || char0 >= inverseAlphabet.length) - return H.ioore(inverseAlphabet, char0); + if (!(char0 >= 0 && char0 < t1)) + return A.ioore(inverseAlphabet, char0); value = inverseAlphabet[char0]; if (value >= 0) { - char0 = C.JSString_methods.codeUnitAt$1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", value); + char0 = B.JSString_methods.codeUnitAt$1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", value); if (char0 === char) continue; char = char0; @@ -10681,25 +11534,28 @@ char = char0; } if (value !== -2) { - if (buffer == null) - buffer = new P.StringBuffer(""); - buffer._contents += C.JSString_methods.substring$2(source, sliceStart, i); - buffer._contents += H.Primitives_stringFromCharCode(char); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t2 = buffer; + } else + t2 = buffer; + t3 = t2._contents += B.JSString_methods.substring$2(source, sliceStart, i); + t2._contents = t3 + A.Primitives_stringFromCharCode(char); sliceStart = i0; continue; } } - throw H.wrapException(P.FormatException$("Invalid base64 data", source, i)); + throw A.wrapException(A.FormatException$("Invalid base64 data", source, i)); } if (buffer != null) { - t1 = buffer._contents += t1.substring$2(source, sliceStart, end); + t1 = buffer._contents += B.JSString_methods.substring$2(source, sliceStart, end); t2 = t1.length; if (firstPadding >= 0) - P.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, t2); + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, t2); else { - endLength = C.JSInt_methods.$mod(t2 - 1, 4) + 1; + endLength = B.JSInt_methods.$mod(t2 - 1, 4) + 1; if (endLength === 1) - throw H.wrapException(P.FormatException$("Invalid base64 encoding length ", source, end)); + throw A.wrapException(A.FormatException$(_s31_, source, end)); for (; endLength < 4;) { t1 += "="; buffer._contents = t1; @@ -10707,780 +11563,780 @@ } } t1 = buffer._contents; - return C.JSString_methods.replaceRange$3(source, start, end, t1.charCodeAt(0) == 0 ? t1 : t1); + return B.JSString_methods.replaceRange$3(source, start, end, t1.charCodeAt(0) == 0 ? t1 : t1); } $length = end - start; if (firstPadding >= 0) - P.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, $length); + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, $length); else { - endLength = C.JSInt_methods.$mod($length, 4); + endLength = B.JSInt_methods.$mod($length, 4); if (endLength === 1) - throw H.wrapException(P.FormatException$("Invalid base64 encoding length ", source, end)); + throw A.wrapException(A.FormatException$(_s31_, source, end)); if (endLength > 1) - source = t1.replaceRange$3(source, end, end, endLength === 2 ? "==" : "="); + source = B.JSString_methods.replaceRange$3(source, end, end, endLength === 2 ? "==" : "="); } return source; - }, - $asCodec: function() { - return [[P.List, P.int], P.String]; - } - }; - P.Base64Encoder.prototype = { - $asStreamTransformer: function() { - return [[P.List, P.int], P.String]; - }, - $asConverter: function() { - return [[P.List, P.int], P.String]; - } - }; - P.Codec.prototype = {}; - P._FusedCodec.prototype = { - $asCodec: function($S, $M, $T) { - return [$S, $T]; - } - }; - P.Converter.prototype = {}; - P.Encoding.prototype = { - $asCodec: function() { - return [P.String, [P.List, P.int]]; } }; - P.JsonUnsupportedObjectError.prototype = { - toString$0: function(_) { - var safeString = P.Error_safeToString(this.unsupportedObject); + A.Base64Encoder.prototype = {}; + A.Codec.prototype = {}; + A._FusedCodec.prototype = {}; + A.Converter.prototype = {}; + A.Encoding.prototype = {}; + A.JsonUnsupportedObjectError.prototype = { + toString$0(_) { + var safeString = A.Error_safeToString(this.unsupportedObject); return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString; } }; - P.JsonCyclicError.prototype = { - toString$0: function(_) { + A.JsonCyclicError.prototype = { + toString$0(_) { return "Cyclic error in JSON stringify"; } }; - P.JsonCodec.prototype = { - decode$2$reviver: function(_, source, reviver) { - var t1 = P._parseJson(source, this.get$decoder()._reviver); + A.JsonCodec.prototype = { + decode$2$reviver(_, source, reviver) { + var t1; + type$.nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object._as(reviver); + t1 = A._parseJson(source, this.get$decoder()._reviver); return t1; }, - encode$2$toEncodable: function(value, toEncodable) { - var t1 = this.get$encoder(); - t1 = P._JsonStringStringifier_stringify(value, t1._toEncodable, t1.indent); + encode$2$toEncodable(value, toEncodable) { + var t1; + type$.nullable_nullable_Object_Function_dynamic._as(toEncodable); + t1 = A._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); return t1; }, - get$encoder: function() { - return C.JsonEncoder_null_null; - }, - get$decoder: function() { - return C.JsonDecoder_null; - }, - $asCodec: function() { - return [P.Object, P.String]; - } - }; - P.JsonEncoder.prototype = { - $asStreamTransformer: function() { - return [P.Object, P.String]; - }, - $asConverter: function() { - return [P.Object, P.String]; - } - }; - P.JsonDecoder.prototype = { - $asStreamTransformer: function() { - return [P.String, P.Object]; - }, - $asConverter: function() { - return [P.String, P.Object]; - } - }; - P._JsonStringifier.prototype = { - writeStringContent$1: function(s) { - var $length, t1, offset, i, charCode, t2; - $length = s.length; - for (t1 = J.getInterceptor$s(s), offset = 0, i = 0; i < $length; ++i) { - charCode = t1._codeUnitAt$1(s, i); - if (charCode > 92) + get$encoder() { + return B.JsonEncoder_null; + }, + get$decoder() { + return B.JsonDecoder_null; + } + }; + A.JsonEncoder.prototype = {}; + A.JsonDecoder.prototype = {}; + A._JsonStringifier.prototype = { + writeStringContent$1(s) { + var offset, i, charCode, t1, t2, _this = this, + $length = s.length; + for (offset = 0, i = 0; i < $length; ++i) { + charCode = B.JSString_methods._codeUnitAt$1(s, i); + if (charCode > 92) { + if (charCode >= 55296) { + t1 = charCode & 64512; + if (t1 === 55296) { + t2 = i + 1; + t2 = !(t2 < $length && (B.JSString_methods._codeUnitAt$1(s, t2) & 64512) === 56320); + } else + t2 = false; + if (!t2) + if (t1 === 56320) { + t1 = i - 1; + t1 = !(t1 >= 0 && (B.JSString_methods.codeUnitAt$1(s, t1) & 64512) === 55296); + } else + t1 = false; + else + t1 = true; + if (t1) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + _this.writeCharCode$1(117); + _this.writeCharCode$1(100); + t1 = charCode >>> 8 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + } + } continue; + } if (charCode < 32) { if (i > offset) - this.writeStringSlice$3(s, offset, i); + _this.writeStringSlice$3(s, offset, i); offset = i + 1; - this.writeCharCode$1(92); + _this.writeCharCode$1(92); switch (charCode) { case 8: - this.writeCharCode$1(98); + _this.writeCharCode$1(98); break; case 9: - this.writeCharCode$1(116); + _this.writeCharCode$1(116); break; case 10: - this.writeCharCode$1(110); + _this.writeCharCode$1(110); break; case 12: - this.writeCharCode$1(102); + _this.writeCharCode$1(102); break; case 13: - this.writeCharCode$1(114); + _this.writeCharCode$1(114); break; default: - this.writeCharCode$1(117); - this.writeCharCode$1(48); - this.writeCharCode$1(48); - t2 = charCode >>> 4 & 15; - this.writeCharCode$1(t2 < 10 ? 48 + t2 : 87 + t2); - t2 = charCode & 15; - this.writeCharCode$1(t2 < 10 ? 48 + t2 : 87 + t2); + _this.writeCharCode$1(117); + _this.writeCharCode$1(48); + _this.writeCharCode$1(48); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); break; } } else if (charCode === 34 || charCode === 92) { if (i > offset) - this.writeStringSlice$3(s, offset, i); + _this.writeStringSlice$3(s, offset, i); offset = i + 1; - this.writeCharCode$1(92); - this.writeCharCode$1(charCode); + _this.writeCharCode$1(92); + _this.writeCharCode$1(charCode); } } if (offset === 0) - this.writeString$1(s); + _this.writeString$1(s); else if (offset < $length) - this.writeStringSlice$3(s, offset, $length); + _this.writeStringSlice$3(s, offset, $length); }, - _checkCycle$1: function(object) { + _checkCycle$1(object) { var t1, t2, i, t3; for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { t3 = t1[i]; if (object == null ? t3 == null : object === t3) - throw H.wrapException(new P.JsonCyclicError(object, null)); + throw A.wrapException(new A.JsonCyclicError(object, null)); } - C.JSArray_methods.add$1(t1, object); + B.JSArray_methods.add$1(t1, object); }, - writeObject$1: function(object) { - var customJson, e, t1, exception; - if (this.writeJsonValue$1(object)) + writeObject$1(object) { + var customJson, e, t1, exception, _this = this; + if (_this.writeJsonValue$1(object)) return; - this._checkCycle$1(object); + _this._checkCycle$1(object); try { - customJson = this._toEncodable.call$1(object); - if (!this.writeJsonValue$1(customJson)) { - t1 = P.JsonUnsupportedObjectError$(object, null, this.get$_partialResult()); - throw H.wrapException(t1); + customJson = _this._toEncodable.call$1(object); + if (!_this.writeJsonValue$1(customJson)) { + t1 = A.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); + throw A.wrapException(t1); } - t1 = this._seen; + t1 = _this._seen; if (0 >= t1.length) - return H.ioore(t1, -1); + return A.ioore(t1, -1); t1.pop(); } catch (exception) { - e = H.unwrapException(exception); - t1 = P.JsonUnsupportedObjectError$(object, e, this.get$_partialResult()); - throw H.wrapException(t1); + e = A.unwrapException(exception); + t1 = A.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); + throw A.wrapException(t1); } }, - writeJsonValue$1: function(object) { - var t1, success; - if (typeof object === "number") { + writeJsonValue$1(object) { + var t1, success, _this = this; + if (typeof object == "number") { if (!isFinite(object)) return false; - this.writeNumber$1(object); + _this.writeNumber$1(object); return true; } else if (object === true) { - this.writeString$1("true"); + _this.writeString$1("true"); return true; } else if (object === false) { - this.writeString$1("false"); + _this.writeString$1("false"); return true; } else if (object == null) { - this.writeString$1("null"); + _this.writeString$1("null"); return true; - } else if (typeof object === "string") { - this.writeString$1('"'); - this.writeStringContent$1(object); - this.writeString$1('"'); + } else if (typeof object == "string") { + _this.writeString$1('"'); + _this.writeStringContent$1(object); + _this.writeString$1('"'); return true; - } else { - t1 = J.getInterceptor$(object); - if (!!t1.$isList) { - this._checkCycle$1(object); - this.writeList$1(object); - t1 = this._seen; - if (0 >= t1.length) - return H.ioore(t1, -1); - t1.pop(); - return true; - } else if (!!t1.$isMap) { - this._checkCycle$1(object); - success = this.writeMap$1(object); - t1 = this._seen; - if (0 >= t1.length) - return H.ioore(t1, -1); - t1.pop(); - return success; - } else - return false; - } + } else if (type$.List_dynamic._is(object)) { + _this._checkCycle$1(object); + _this.writeList$1(object); + t1 = _this._seen; + if (0 >= t1.length) + return A.ioore(t1, -1); + t1.pop(); + return true; + } else if (type$.Map_dynamic_dynamic._is(object)) { + _this._checkCycle$1(object); + success = _this.writeMap$1(object); + t1 = _this._seen; + if (0 >= t1.length) + return A.ioore(t1, -1); + t1.pop(); + return success; + } else + return false; }, - writeList$1: function(list) { - var t1, i; - this.writeString$1("["); + writeList$1(list) { + var t1, i, _this = this; + _this.writeString$1("["); t1 = J.getInterceptor$asx(list); if (t1.get$isNotEmpty(list)) { - this.writeObject$1(t1.$index(list, 0)); + _this.writeObject$1(t1.$index(list, 0)); for (i = 1; i < t1.get$length(list); ++i) { - this.writeString$1(","); - this.writeObject$1(t1.$index(list, i)); + _this.writeString$1(","); + _this.writeObject$1(t1.$index(list, i)); } } - this.writeString$1("]"); + _this.writeString$1("]"); }, - writeMap$1: function(map) { - var _box_0, t1, keyValueList, separator, i, t2; - _box_0 = {}; + writeMap$1(map) { + var t1, keyValueList, i, separator, t2, _this = this, _box_0 = {}; if (map.get$isEmpty(map)) { - this.writeString$1("{}"); + _this.writeString$1("{}"); return true; } t1 = map.get$length(map) * 2; - keyValueList = new Array(t1); - keyValueList.fixed$length = Array; - _box_0.i = 0; + keyValueList = A.List_List$filled(t1, null, false, type$.nullable_Object); + i = _box_0.i = 0; _box_0.allStringKeys = true; - map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList)); + map.forEach$1(0, new A._JsonStringifier_writeMap_closure(_box_0, keyValueList)); if (!_box_0.allStringKeys) return false; - this.writeString$1("{"); - for (separator = '"', i = 0; i < t1; i += 2, separator = ',"') { - this.writeString$1(separator); - this.writeStringContent$1(H.stringTypeCheck(keyValueList[i])); - this.writeString$1('":'); + _this.writeString$1("{"); + for (separator = '"'; i < t1; i += 2, separator = ',"') { + _this.writeString$1(separator); + _this.writeStringContent$1(A._asString(keyValueList[i])); + _this.writeString$1('":'); t2 = i + 1; - if (t2 >= t1) - return H.ioore(keyValueList, t2); - this.writeObject$1(keyValueList[t2]); + if (!(t2 < t1)) + return A.ioore(keyValueList, t2); + _this.writeObject$1(keyValueList[t2]); } - this.writeString$1("}"); + _this.writeString$1("}"); return true; } }; - P._JsonStringifier_writeMap_closure.prototype = { - call$2: function(key, value) { + A._JsonStringifier_writeMap_closure.prototype = { + call$2(key, value) { var t1, t2; - if (typeof key !== "string") + if (typeof key != "string") this._box_0.allStringKeys = false; t1 = this.keyValueList; t2 = this._box_0; - C.JSArray_methods.$indexSet(t1, t2.i++, key); - C.JSArray_methods.$indexSet(t1, t2.i++, value); + B.JSArray_methods.$indexSet(t1, t2.i++, key); + B.JSArray_methods.$indexSet(t1, t2.i++, value); }, - $signature: 13 + $signature: 21 }; - P._JsonStringStringifier.prototype = { - get$_partialResult: function() { - var t1 = this._convert$_sink; - return !!t1.$isStringBuffer ? t1.toString$0(0) : null; + A._JsonStringStringifier.prototype = { + get$_partialResult() { + var t1 = this._sink; + return t1 instanceof A.StringBuffer ? t1.toString$0(0) : null; }, - writeNumber$1: function(number) { - this._convert$_sink.write$1(C.JSNumber_methods.toString$0(number)); + writeNumber$1(number) { + this._sink.write$1(B.JSNumber_methods.toString$0(number)); }, - writeString$1: function(string) { - this._convert$_sink.write$1(string); + writeString$1(string) { + this._sink.write$1(string); }, - writeStringSlice$3: function(string, start, end) { - this._convert$_sink.write$1(J.substring$2$s(string, start, end)); + writeStringSlice$3(string, start, end) { + this._sink.write$1(B.JSString_methods.substring$2(string, start, end)); }, - writeCharCode$1: function(charCode) { - this._convert$_sink.writeCharCode$1(charCode); + writeCharCode$1(charCode) { + this._sink.writeCharCode$1(charCode); } }; - P.Utf8Codec.prototype = { - get$encoder: function() { - return C.C_Utf8Encoder; + A.Utf8Codec.prototype = { + get$encoder() { + return B.C_Utf8Encoder; } }; - P.Utf8Encoder.prototype = { - convert$1: function(string) { + A.Utf8Encoder.prototype = { + convert$1(string) { var end, $length, t1, encoder; - H.stringTypeCheck(string); - end = P.RangeError_checkValidRange(0, null, string.length); + A._asString(string); + end = A.RangeError_checkValidRange(0, null, string.length); $length = end - 0; if ($length === 0) return new Uint8Array(0); t1 = new Uint8Array($length * 3); - encoder = new P._Utf8Encoder(t1); - if (encoder._fillBuffer$3(string, 0, end) !== end) - encoder._writeSurrogate$2(J.codeUnitAt$1$s(string, end - 1), 0); - return C.NativeUint8List_methods.sublist$2(t1, 0, encoder._bufferIndex); - }, - $asStreamTransformer: function() { - return [P.String, [P.List, P.int]]; - }, - $asConverter: function() { - return [P.String, [P.List, P.int]]; - } - }; - P._Utf8Encoder.prototype = { - _writeSurrogate$2: function(leadingSurrogate, nextCodeUnit) { - var t1, t2, t3, t4, rune; - t1 = this._buffer; - t2 = this._bufferIndex; - t3 = t2 + 1; - t4 = t1.length; + encoder = new A._Utf8Encoder(t1); + if (encoder._fillBuffer$3(string, 0, end) !== end) { + B.JSString_methods.codeUnitAt$1(string, end - 1); + encoder._writeReplacementCharacter$0(); + } + return B.NativeUint8List_methods.sublist$2(t1, 0, encoder._bufferIndex); + } + }; + A._Utf8Encoder.prototype = { + _writeReplacementCharacter$0() { + var _this = this, + t1 = _this._buffer, + t2 = _this._bufferIndex, + t3 = _this._bufferIndex = t2 + 1, + t4 = t1.length; + if (!(t2 < t4)) + return A.ioore(t1, t2); + t1[t2] = 239; + t2 = _this._bufferIndex = t3 + 1; + if (!(t3 < t4)) + return A.ioore(t1, t3); + t1[t3] = 191; + _this._bufferIndex = t2 + 1; + if (!(t2 < t4)) + return A.ioore(t1, t2); + t1[t2] = 189; + }, + _writeSurrogate$2(leadingSurrogate, nextCodeUnit) { + var rune, t1, t2, t3, t4, _this = this; if ((nextCodeUnit & 64512) === 56320) { rune = 65536 + ((leadingSurrogate & 1023) << 10) | nextCodeUnit & 1023; - this._bufferIndex = t3; - if (t2 >= t4) - return H.ioore(t1, t2); - t1[t2] = 240 | rune >>> 18; - t2 = t3 + 1; - this._bufferIndex = t2; - if (t3 >= t4) - return H.ioore(t1, t3); - t1[t3] = 128 | rune >>> 12 & 63; - t3 = t2 + 1; - this._bufferIndex = t3; - if (t2 >= t4) - return H.ioore(t1, t2); - t1[t2] = 128 | rune >>> 6 & 63; - this._bufferIndex = t3 + 1; - if (t3 >= t4) - return H.ioore(t1, t3); - t1[t3] = 128 | rune & 63; + t1 = _this._buffer; + t2 = _this._bufferIndex; + t3 = _this._bufferIndex = t2 + 1; + t4 = t1.length; + if (!(t2 < t4)) + return A.ioore(t1, t2); + t1[t2] = rune >>> 18 | 240; + t2 = _this._bufferIndex = t3 + 1; + if (!(t3 < t4)) + return A.ioore(t1, t3); + t1[t3] = rune >>> 12 & 63 | 128; + t3 = _this._bufferIndex = t2 + 1; + if (!(t2 < t4)) + return A.ioore(t1, t2); + t1[t2] = rune >>> 6 & 63 | 128; + _this._bufferIndex = t3 + 1; + if (!(t3 < t4)) + return A.ioore(t1, t3); + t1[t3] = rune & 63 | 128; return true; } else { - this._bufferIndex = t3; - if (t2 >= t4) - return H.ioore(t1, t2); - t1[t2] = 224 | leadingSurrogate >>> 12; - t2 = t3 + 1; - this._bufferIndex = t2; - if (t3 >= t4) - return H.ioore(t1, t3); - t1[t3] = 128 | leadingSurrogate >>> 6 & 63; - this._bufferIndex = t2 + 1; - if (t2 >= t4) - return H.ioore(t1, t2); - t1[t2] = 128 | leadingSurrogate & 63; + _this._writeReplacementCharacter$0(); return false; } }, - _fillBuffer$3: function(str, start, end) { - var t1, t2, t3, stringIndex, codeUnit, t4, stringIndex0, t5; - if (start !== end && (J.codeUnitAt$1$s(str, end - 1) & 64512) === 55296) + _fillBuffer$3(str, start, end) { + var t1, t2, stringIndex, codeUnit, t3, stringIndex0, t4, _this = this; + if (start !== end && (B.JSString_methods.codeUnitAt$1(str, end - 1) & 64512) === 55296) --end; - for (t1 = this._buffer, t2 = t1.length, t3 = J.getInterceptor$s(str), stringIndex = start; stringIndex < end; ++stringIndex) { - codeUnit = t3._codeUnitAt$1(str, stringIndex); + for (t1 = _this._buffer, t2 = t1.length, stringIndex = start; stringIndex < end; ++stringIndex) { + codeUnit = B.JSString_methods._codeUnitAt$1(str, stringIndex); if (codeUnit <= 127) { - t4 = this._bufferIndex; - if (t4 >= t2) - break; - this._bufferIndex = t4 + 1; - t1[t4] = codeUnit; - } else if ((codeUnit & 64512) === 55296) { - if (this._bufferIndex + 3 >= t2) - break; - stringIndex0 = stringIndex + 1; - if (this._writeSurrogate$2(codeUnit, C.JSString_methods._codeUnitAt$1(str, stringIndex0))) - stringIndex = stringIndex0; - } else if (codeUnit <= 2047) { - t4 = this._bufferIndex; - t5 = t4 + 1; - if (t5 >= t2) + t3 = _this._bufferIndex; + if (t3 >= t2) break; - this._bufferIndex = t5; - if (t4 >= t2) - return H.ioore(t1, t4); - t1[t4] = 192 | codeUnit >>> 6; - this._bufferIndex = t5 + 1; - t1[t5] = 128 | codeUnit & 63; + _this._bufferIndex = t3 + 1; + t1[t3] = codeUnit; } else { - t4 = this._bufferIndex; - if (t4 + 2 >= t2) - break; - t5 = t4 + 1; - this._bufferIndex = t5; - if (t4 >= t2) - return H.ioore(t1, t4); - t1[t4] = 224 | codeUnit >>> 12; - t4 = t5 + 1; - this._bufferIndex = t4; - if (t5 >= t2) - return H.ioore(t1, t5); - t1[t5] = 128 | codeUnit >>> 6 & 63; - this._bufferIndex = t4 + 1; - if (t4 >= t2) - return H.ioore(t1, t4); - t1[t4] = 128 | codeUnit & 63; + t3 = codeUnit & 64512; + if (t3 === 55296) { + if (_this._bufferIndex + 4 > t2) + break; + stringIndex0 = stringIndex + 1; + if (_this._writeSurrogate$2(codeUnit, B.JSString_methods._codeUnitAt$1(str, stringIndex0))) + stringIndex = stringIndex0; + } else if (t3 === 56320) { + if (_this._bufferIndex + 3 > t2) + break; + _this._writeReplacementCharacter$0(); + } else if (codeUnit <= 2047) { + t3 = _this._bufferIndex; + t4 = t3 + 1; + if (t4 >= t2) + break; + _this._bufferIndex = t4; + if (!(t3 < t2)) + return A.ioore(t1, t3); + t1[t3] = codeUnit >>> 6 | 192; + _this._bufferIndex = t4 + 1; + t1[t4] = codeUnit & 63 | 128; + } else { + t3 = _this._bufferIndex; + if (t3 + 2 >= t2) + break; + t4 = _this._bufferIndex = t3 + 1; + if (!(t3 < t2)) + return A.ioore(t1, t3); + t1[t3] = codeUnit >>> 12 | 224; + t3 = _this._bufferIndex = t4 + 1; + if (!(t4 < t2)) + return A.ioore(t1, t4); + t1[t4] = codeUnit >>> 6 & 63 | 128; + _this._bufferIndex = t3 + 1; + if (!(t3 < t2)) + return A.ioore(t1, t3); + t1[t3] = codeUnit & 63 | 128; + } } } return stringIndex; } }; - P.Utf8Decoder.prototype = { - convert$1: function(codeUnits) { - var result, end, buffer, decoder, t1; - H.assertSubtype(codeUnits, "$isList", [P.int], "$asList"); - result = P.Utf8Decoder__convertIntercepted(false, codeUnits, 0, null); + A.Utf8Decoder.prototype = { + convert$1(codeUnits) { + var t1, result; + type$.List_int._as(codeUnits); + t1 = this._allowMalformed; + result = A.Utf8Decoder__convertIntercepted(t1, codeUnits, 0, null); if (result != null) return result; - end = P.RangeError_checkValidRange(0, null, J.get$length$asx(codeUnits)); - buffer = new P.StringBuffer(""); - decoder = new P._Utf8Decoder(false, buffer); - decoder.convert$3(codeUnits, 0, end); - decoder.flush$2(codeUnits, end); - t1 = buffer._contents; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - $asStreamTransformer: function() { - return [[P.List, P.int], P.String]; - }, - $asConverter: function() { - return [[P.List, P.int], P.String]; + return new A._Utf8Decoder(t1).convertGeneral$4(codeUnits, 0, null, true); } }; - P._Utf8Decoder.prototype = { - flush$2: function(source, offset) { - var t1; - H.assertSubtype(source, "$isList", [P.int], "$asList"); - if (this._expectedUnits > 0) { - t1 = P.FormatException$("Unfinished UTF-8 octet sequence", source, offset); - throw H.wrapException(t1); - } - }, - convert$3: function(codeUnits, startIndex, endIndex) { - var value, expectedUnits, extraUnits, addSingleBytes, t1, t2, i, unit, t3, oneBytes, i0, i1, t4; - H.assertSubtype(codeUnits, "$isList", [P.int], "$asList"); - value = this._value; - expectedUnits = this._expectedUnits; - extraUnits = this._extraUnits; - this._value = 0; - this._expectedUnits = 0; - this._extraUnits = 0; - addSingleBytes = new P._Utf8Decoder_convert_addSingleBytes(this, startIndex, endIndex, codeUnits); + A._Utf8Decoder.prototype = { + convertGeneral$4(codeUnits, start, maybeEnd, single) { + var end, bytes, errorOffset, result, t1, message, _this = this; + type$.List_int._as(codeUnits); + end = A.RangeError_checkValidRange(start, maybeEnd, J.get$length$asx(codeUnits)); + if (start === end) + return ""; + if (type$.Uint8List._is(codeUnits)) { + bytes = codeUnits; + errorOffset = 0; + } else { + bytes = A._Utf8Decoder__makeUint8List(codeUnits, start, end); + end -= start; + errorOffset = start; + start = 0; + } + result = _this._convertRecursive$4(bytes, start, end, single); + t1 = _this._state; + if ((t1 & 1) !== 0) { + message = A._Utf8Decoder_errorDescription(t1); + _this._state = 0; + throw A.wrapException(A.FormatException$(message, codeUnits, errorOffset + _this._charOrIndex)); + } + return result; + }, + _convertRecursive$4(bytes, start, end, single) { + var mid, s1, _this = this; + if (end - start > 1000) { + mid = B.JSInt_methods._tdivFast$1(start + end, 2); + s1 = _this._convertRecursive$4(bytes, start, mid, false); + if ((_this._state & 1) !== 0) + return s1; + return s1 + _this._convertRecursive$4(bytes, mid, end, single); + } + return _this.decodeGeneral$4(bytes, start, end, single); + }, + decodeGeneral$4(bytes, start, end, single) { + var byte, t2, type, t3, i0, markEnd, i1, m, _this = this, _65533 = 65533, + state = _this._state, + char = _this._charOrIndex, + buffer = new A.StringBuffer(""), + i = start + 1, + t1 = bytes.length; + if (!(start >= 0 && start < t1)) + return A.ioore(bytes, start); + byte = bytes[start]; $label0$0: - for (t1 = J.getInterceptor$asx(codeUnits), t2 = this._stringSink, i = startIndex; true; i = i1) { - $label1$1: - if (expectedUnits > 0) { - do { - if (i === endIndex) - break $label0$0; - unit = t1.$index(codeUnits, i); - if (typeof unit !== "number") - return unit.$and(); - if ((unit & 192) !== 128) { - t3 = P.FormatException$("Bad UTF-8 encoding 0x" + C.JSInt_methods.toRadixString$1(unit, 16), codeUnits, i); - throw H.wrapException(t3); - } else { - value = (value << 6 | unit & 63) >>> 0; - --expectedUnits; - ++i; + for (t2 = _this.allowMalformed; true;) { + for (; true; i = i0) { + type = B.JSString_methods._codeUnitAt$1("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHIHHHJEEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKCCCCCCCCCCCCDCLONNNMEEEEEEEEEEE", byte) & 31; + char = state <= 32 ? byte & 61694 >>> type : (byte & 63 | char << 6) >>> 0; + state = B.JSString_methods._codeUnitAt$1(" \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA", state + type); + if (state === 0) { + buffer._contents += A.Primitives_stringFromCharCode(char); + if (i === end) + break $label0$0; + break; + } else if ((state & 1) !== 0) { + if (t2) + switch (state) { + case 69: + case 67: + buffer._contents += A.Primitives_stringFromCharCode(_65533); + break; + case 65: + buffer._contents += A.Primitives_stringFromCharCode(_65533); + --i; + break; + default: + t3 = buffer._contents += A.Primitives_stringFromCharCode(_65533); + buffer._contents = t3 + A.Primitives_stringFromCharCode(_65533); + break; } - } while (expectedUnits > 0); - t3 = extraUnits - 1; - if (t3 < 0 || t3 >= 4) - return H.ioore(C.List_127_2047_65535_1114111, t3); - if (value <= C.List_127_2047_65535_1114111[t3]) { - t3 = P.FormatException$("Overlong encoding of 0x" + C.JSInt_methods.toRadixString$1(value, 16), codeUnits, i - extraUnits - 1); - throw H.wrapException(t3); - } - if (value > 1114111) { - t3 = P.FormatException$("Character outside valid Unicode range: 0x" + C.JSInt_methods.toRadixString$1(value, 16), codeUnits, i - extraUnits - 1); - throw H.wrapException(t3); + else { + _this._state = state; + _this._charOrIndex = i - 1; + return ""; } - if (!this._isFirstCharacter || value !== 65279) - t2._contents += H.Primitives_stringFromCharCode(value); - this._isFirstCharacter = false; + state = 0; } - for (t3 = i < endIndex; t3;) { - oneBytes = P._scanOneByteCharacters(codeUnits, i, endIndex); - if (oneBytes > 0) { - this._isFirstCharacter = false; - i0 = i + oneBytes; - addSingleBytes.call$2(i, i0); - if (i0 === endIndex) + if (i === end) + break $label0$0; + i0 = i + 1; + if (!(i >= 0 && i < t1)) + return A.ioore(bytes, i); + byte = bytes[i]; + } + i0 = i + 1; + if (!(i >= 0 && i < t1)) + return A.ioore(bytes, i); + byte = bytes[i]; + if (byte < 128) { + while (true) { + if (!(i0 < end)) { + markEnd = end; break; - } else - i0 = i; - i1 = i0 + 1; - unit = t1.$index(codeUnits, i0); - if (typeof unit !== "number") - return unit.$lt(); - if (unit < 0) { - t4 = P.FormatException$("Negative UTF-8 code unit: -0x" + C.JSInt_methods.toRadixString$1(-unit, 16), codeUnits, i1 - 1); - throw H.wrapException(t4); - } else { - if ((unit & 224) === 192) { - value = unit & 31; - expectedUnits = 1; - extraUnits = 1; - continue $label0$0; } - if ((unit & 240) === 224) { - value = unit & 15; - expectedUnits = 2; - extraUnits = 2; - continue $label0$0; - } - if ((unit & 248) === 240 && unit < 245) { - value = unit & 7; - expectedUnits = 3; - extraUnits = 3; - continue $label0$0; + i1 = i0 + 1; + if (!(i0 >= 0 && i0 < t1)) + return A.ioore(bytes, i0); + byte = bytes[i0]; + if (byte >= 128) { + markEnd = i1 - 1; + i0 = i1; + break; } - t4 = P.FormatException$("Bad UTF-8 encoding 0x" + C.JSInt_methods.toRadixString$1(unit, 16), codeUnits, i1 - 1); - throw H.wrapException(t4); + i0 = i1; } - } - break $label0$0; + if (markEnd - i < 20) + for (m = i; m < markEnd; ++m) { + if (!(m < t1)) + return A.ioore(bytes, m); + buffer._contents += A.Primitives_stringFromCharCode(bytes[m]); + } + else + buffer._contents += A.String_String$fromCharCodes(bytes, i, markEnd); + if (markEnd === end) + break $label0$0; + i = i0; + } else + i = i0; } - if (expectedUnits > 0) { - this._value = value; - this._expectedUnits = expectedUnits; - this._extraUnits = extraUnits; - } + if (single && state > 32) + if (t2) + buffer._contents += A.Primitives_stringFromCharCode(_65533); + else { + _this._state = 77; + _this._charOrIndex = end; + return ""; + } + _this._state = state; + _this._charOrIndex = char; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; } }; - P._Utf8Decoder_convert_addSingleBytes.prototype = { - call$2: function(from, to) { - this.$this._stringSink._contents += P.String_String$fromCharCodes(this.codeUnits, from, to); - }, - $signature: 27 - }; - P.NoSuchMethodError_toString_closure.prototype = { - call$2: function(key, value) { + A.NoSuchMethodError_toString_closure.prototype = { + call$2(key, value) { var t1, t2, t3; - H.interceptedTypeCheck(key, "$isSymbol0"); + type$.Symbol._as(key); t1 = this.sb; t2 = this._box_0; - t1._contents += t2.comma; - t3 = t1._contents += H.S(key.__internal$_name); + t3 = t1._contents += t2.comma; + t3 += key._name; + t1._contents = t3; t1._contents = t3 + ": "; - t1._contents += P.Error_safeToString(value); + t1._contents += A.Error_safeToString(value); t2.comma = ", "; }, - $signature: 26 + $signature: 23 }; - P.bool.prototype = {}; - P.DateTime.prototype = { - $eq: function(_, other) { + A.DateTime.prototype = { + $eq(_, other) { if (other == null) return false; - return other instanceof P.DateTime && this._core$_value === other._core$_value && true; - }, - get$hashCode: function(_) { - var t1 = this._core$_value; - return (t1 ^ C.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823; - }, - toString$0: function(_) { - var y, m, d, h, min, sec, ms, t1; - y = P.DateTime__fourDigits(H.Primitives_getYear(this)); - m = P.DateTime__twoDigits(H.Primitives_getMonth(this)); - d = P.DateTime__twoDigits(H.Primitives_getDay(this)); - h = P.DateTime__twoDigits(H.Primitives_getHours(this)); - min = P.DateTime__twoDigits(H.Primitives_getMinutes(this)); - sec = P.DateTime__twoDigits(H.Primitives_getSeconds(this)); - ms = P.DateTime__threeDigits(H.Primitives_getMilliseconds(this)); - t1 = y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z"; - return t1; - } - }; - P.double.prototype = {}; - P.Duration.prototype = { - $eq: function(_, other) { + return other instanceof A.DateTime && this._value === other._value && true; + }, + get$hashCode(_) { + var t1 = this._value; + return (t1 ^ B.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823; + }, + toString$0(_) { + var _this = this, + y = A.DateTime__fourDigits(A.Primitives_getYear(_this)), + m = A.DateTime__twoDigits(A.Primitives_getMonth(_this)), + d = A.DateTime__twoDigits(A.Primitives_getDay(_this)), + h = A.DateTime__twoDigits(A.Primitives_getHours(_this)), + min = A.DateTime__twoDigits(A.Primitives_getMinutes(_this)), + sec = A.DateTime__twoDigits(A.Primitives_getSeconds(_this)), + ms = A.DateTime__threeDigits(A.Primitives_getMilliseconds(_this)); + return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z"; + } + }; + A.Duration.prototype = { + $eq(_, other) { if (other == null) return false; - return other instanceof P.Duration && this._duration === other._duration; - }, - get$hashCode: function(_) { - return C.JSInt_methods.get$hashCode(this._duration); - }, - toString$0: function(_) { - var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs; - t1 = new P.Duration_toString_twoDigits(); - t2 = this._duration; - if (t2 < 0) - return "-" + new P.Duration(0 - t2).toString$0(0); - twoDigitMinutes = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 60000000) % 60); - twoDigitSeconds = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 1000000) % 60); - sixDigitUs = new P.Duration_toString_sixDigits().call$1(t2 % 1000000); - return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDigitMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs); - } - }; - P.Duration_toString_sixDigits.prototype = { - call$1: function(n) { - if (n >= 100000) - return "" + n; - if (n >= 10000) - return "0" + n; - if (n >= 1000) - return "00" + n; - if (n >= 100) - return "000" + n; - if (n >= 10) - return "0000" + n; - return "00000" + n; + return other instanceof A.Duration && this._duration === other._duration; }, - $signature: 12 - }; - P.Duration_toString_twoDigits.prototype = { - call$1: function(n) { - if (n >= 10) - return "" + n; - return "0" + n; + get$hashCode(_) { + return B.JSInt_methods.get$hashCode(this._duration); }, - $signature: 12 + toString$0(_) { + var minutes, minutesPadding, seconds, secondsPadding, + microseconds = this._duration, + hours = B.JSInt_methods._tdivFast$1(microseconds, 3600000000); + microseconds %= 3600000000; + minutes = B.JSInt_methods._tdivFast$1(microseconds, 60000000); + microseconds %= 60000000; + minutesPadding = minutes < 10 ? "0" : ""; + seconds = B.JSInt_methods._tdivFast$1(microseconds, 1000000); + secondsPadding = seconds < 10 ? "0" : ""; + return "" + hours + ":" + minutesPadding + minutes + ":" + secondsPadding + seconds + "." + B.JSString_methods.padLeft$2(B.JSInt_methods.toString$0(microseconds % 1000000), 6, "0"); + } }; - P.Error.prototype = {}; - P.NullThrownError.prototype = { - toString$0: function(_) { + A.Error.prototype = { + get$stackTrace() { + return A.getTraceFromException(this.$thrownJsError); + } + }; + A.AssertionError.prototype = { + toString$0(_) { + var t1 = this.message; + if (t1 != null) + return "Assertion failed: " + A.Error_safeToString(t1); + return "Assertion failed"; + } + }; + A.TypeError.prototype = {}; + A.NullThrownError.prototype = { + toString$0(_) { return "Throw of null."; } }; - P.ArgumentError.prototype = { - get$_errorName: function() { + A.ArgumentError.prototype = { + get$_errorName() { return "Invalid argument" + (!this._hasValue ? "(s)" : ""); }, - get$_errorExplanation: function() { + get$_errorExplanation() { return ""; }, - toString$0: function(_) { - var t1, nameString, message, prefix, explanation, errorValue; - t1 = this.name; - nameString = t1 != null ? " (" + t1 + ")" : ""; - t1 = this.message; - message = t1 == null ? "" : ": " + H.S(t1); - prefix = this.get$_errorName() + nameString + message; - if (!this._hasValue) + toString$0(_) { + var _this = this, + $name = _this.name, + nameString = $name == null ? "" : " (" + $name + ")", + message = _this.message, + messageString = message == null ? "" : ": " + A.S(message), + prefix = _this.get$_errorName() + nameString + messageString; + if (!_this._hasValue) return prefix; - explanation = this.get$_errorExplanation(); - errorValue = P.Error_safeToString(this.invalidValue); - return prefix + explanation + ": " + errorValue; + return prefix + _this.get$_errorExplanation() + ": " + A.Error_safeToString(_this.invalidValue); } }; - P.RangeError.prototype = { - get$_errorName: function() { + A.RangeError.prototype = { + get$_errorName() { return "RangeError"; }, - get$_errorExplanation: function() { - var t1, explanation, t2; - t1 = this.start; - if (t1 == null) { - t1 = this.end; - explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : ""; - } else { - t2 = this.end; - if (t2 == null) - explanation = ": Not greater than or equal to " + H.S(t1); - else if (t2 > t1) - explanation = ": Not in range " + H.S(t1) + ".." + H.S(t2) + ", inclusive"; - else - explanation = t2 < t1 ? ": Valid value range is empty" : ": Only valid value is " + H.S(t1); - } + get$_errorExplanation() { + var explanation, + start = this.start, + end = this.end; + if (start == null) + explanation = end != null ? ": Not less than or equal to " + A.S(end) : ""; + else if (end == null) + explanation = ": Not greater than or equal to " + A.S(start); + else if (end > start) + explanation = ": Not in inclusive range " + A.S(start) + ".." + A.S(end); + else + explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + A.S(start); return explanation; } }; - P.IndexError.prototype = { - get$_errorName: function() { + A.IndexError.prototype = { + get$_errorName() { return "RangeError"; }, - get$_errorExplanation: function() { - var invalidValue, t1; - invalidValue = H.intTypeCheck(this.invalidValue); - if (typeof invalidValue !== "number") - return invalidValue.$lt(); - if (invalidValue < 0) + get$_errorExplanation() { + if (A._asInt(this.invalidValue) < 0) return ": index must not be negative"; - t1 = this.length; + var t1 = this.length; if (t1 === 0) return ": no indices are valid"; - return ": index should be less than " + H.S(t1); + return ": index should be less than " + t1; }, - get$length: function(receiver) { + get$length(receiver) { return this.length; } }; - P.NoSuchMethodError.prototype = { - toString$0: function(_) { - var _box_0, sb, t1, t2, _i, t3, t4, argument, receiverText, actualParameters; - _box_0 = {}; - sb = new P.StringBuffer(""); + A.NoSuchMethodError.prototype = { + toString$0(_) { + var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, + sb = new A.StringBuffer(""); _box_0.comma = ""; - for (t1 = this._core$_arguments, t2 = t1.length, _i = 0, t3 = "", t4 = ""; _i < t2; ++_i, t4 = ", ") { - argument = t1[_i]; - sb._contents = t3 + t4; - t3 = sb._contents += P.Error_safeToString(argument); + $arguments = _this._core$_arguments; + for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { + argument = $arguments[_i]; + sb._contents = t2 + t3; + t2 = sb._contents += A.Error_safeToString(argument); _box_0.comma = ", "; } - this._namedArguments.forEach$1(0, new P.NoSuchMethodError_toString_closure(_box_0, sb)); - receiverText = P.Error_safeToString(this._core$_receiver); + _this._namedArguments.forEach$1(0, new A.NoSuchMethodError_toString_closure(_box_0, sb)); + receiverText = A.Error_safeToString(_this._core$_receiver); actualParameters = sb.toString$0(0); - t1 = "NoSuchMethodError: method not found: '" + H.S(this._core$_memberName.__internal$_name) + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; - return t1; + return "NoSuchMethodError: method not found: '" + _this._core$_memberName._name + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; } }; - P.UnsupportedError.prototype = { - toString$0: function(_) { + A.UnsupportedError.prototype = { + toString$0(_) { return "Unsupported operation: " + this.message; } }; - P.UnimplementedError.prototype = { - toString$0: function(_) { - var t1 = this.message; - return t1 != null ? "UnimplementedError: " + t1 : "UnimplementedError"; + A.UnimplementedError.prototype = { + toString$0(_) { + var message = this.message; + return message != null ? "UnimplementedError: " + message : "UnimplementedError"; } }; - P.StateError.prototype = { - toString$0: function(_) { + A.StateError.prototype = { + toString$0(_) { return "Bad state: " + this.message; } }; - P.ConcurrentModificationError.prototype = { - toString$0: function(_) { + A.ConcurrentModificationError.prototype = { + toString$0(_) { var t1 = this.modifiedObject; if (t1 == null) return "Concurrent modification during iteration."; - return "Concurrent modification during iteration: " + P.Error_safeToString(t1) + "."; + return "Concurrent modification during iteration: " + A.Error_safeToString(t1) + "."; } }; - P.OutOfMemoryError.prototype = { - toString$0: function(_) { + A.OutOfMemoryError.prototype = { + toString$0(_) { return "Out of Memory"; }, + get$stackTrace() { + return null; + }, $isError: 1 }; - P.StackOverflowError.prototype = { - toString$0: function(_) { + A.StackOverflowError.prototype = { + toString$0(_) { return "Stack Overflow"; }, + get$stackTrace() { + return null; + }, $isError: 1 }; - P.CyclicInitializationError.prototype = { - toString$0: function(_) { - var t1 = this.variableName; - return t1 == null ? "Reading static variable during its initialization" : "Reading static variable '" + t1 + "' during its initialization"; + A.CyclicInitializationError.prototype = { + toString$0(_) { + return "Reading static variable '" + this.variableName + "' during its initialization"; } }; - P._Exception.prototype = { - toString$0: function(_) { + A._Exception.prototype = { + toString$0(_) { return "Exception: " + this.message; - } + }, + $isException: 1 }; - P.FormatException.prototype = { - toString$0: function(_) { - var t1, report, offset, objectSource, source, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, end, start, prefix, postfix, slice; - t1 = this.message; - report = t1 != null && "" !== t1 ? "FormatException: " + H.S(t1) : "FormatException"; - offset = this.offset; - objectSource = this.source; - if (typeof objectSource === "string") { + A.FormatException.prototype = { + toString$0(_) { + var t1, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, end, start, prefix, postfix, + message = this.message, + report = "" !== message ? "FormatException: " + message : "FormatException", + offset = this.offset, + source = this.source; + if (typeof source == "string") { if (offset != null) - t1 = offset < 0 || offset > objectSource.length; + t1 = offset < 0 || offset > source.length; else t1 = false; if (t1) offset = null; if (offset == null) { - source = objectSource.length > 78 ? C.JSString_methods.substring$2(objectSource, 0, 75) + "..." : objectSource; + if (source.length > 78) + source = B.JSString_methods.substring$2(source, 0, 75) + "..."; return report + "\n" + source; } for (lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { - char = C.JSString_methods._codeUnitAt$1(objectSource, i); + char = B.JSString_methods._codeUnitAt$1(source, i); if (char === 10) { if (lineStart !== i || !previousCharWasCR) ++lineNum; @@ -11493,9 +12349,9 @@ } } report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n"); - lineEnd = objectSource.length; + lineEnd = source.length; for (i = offset; i < lineEnd; ++i) { - char = C.JSString_methods.codeUnitAt$1(objectSource, i); + char = B.JSString_methods.codeUnitAt$1(source, i); if (char === 10 || char === 13) { lineEnd = i; break; @@ -11525,237 +12381,267 @@ prefix = ""; postfix = ""; } - slice = C.JSString_methods.substring$2(objectSource, start, end); - return report + prefix + slice + postfix + "\n" + C.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; + return report + prefix + B.JSString_methods.substring$2(source, start, end) + postfix + "\n" + B.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; } else - return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report; - } + return offset != null ? report + (" (at offset " + A.S(offset) + ")") : report; + }, + $isException: 1 }; - P.Function.prototype = {}; - P.int.prototype = {}; - P.Iterable.prototype = { - get$length: function(_) { - var it, count; - it = this.get$iterator(this); + A.Iterable.prototype = { + get$length(_) { + var count, + it = this.get$iterator(this); for (count = 0; it.moveNext$0();) ++count; return count; }, - get$isEmpty: function(_) { + get$isEmpty(_) { return !this.get$iterator(this).moveNext$0(); }, - skipWhile$1: function(_, test) { - var t1 = H.getRuntimeTypeArgument(this, "Iterable", 0); - return new H.SkipWhileIterable(this, H.functionTypeCheck(test, {func: 1, ret: P.bool, args: [t1]}), [t1]); + skipWhile$1(_, test) { + var t1 = A._instanceType(this); + return new A.SkipWhileIterable(this, t1._eval$1("bool(Iterable.E)")._as(test), t1._eval$1("SkipWhileIterable")); }, - get$first: function(_) { + get$first(_) { var it = this.get$iterator(this); if (!it.moveNext$0()) - throw H.wrapException(H.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_noElement()); return it.get$current(); }, - get$last: function(_) { - var it, result; - it = this.get$iterator(this); + get$last(_) { + var result, + it = this.get$iterator(this); if (!it.moveNext$0()) - throw H.wrapException(H.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_noElement()); do result = it.get$current(); while (it.moveNext$0()); return result; }, - elementAt$1: function(_, index) { + elementAt$1(_, index) { var t1, elementIndex, element; - P.RangeError_checkNotNegative(index, "index"); + A.RangeError_checkNotNegative(index, "index"); for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { element = t1.get$current(); if (index === elementIndex) return element; ++elementIndex; } - throw H.wrapException(P.IndexError$(index, this, "index", null, elementIndex)); + throw A.wrapException(A.IndexError$(index, this, "index", null, elementIndex)); }, - toString$0: function(_) { - return P.IterableBase_iterableToShortString(this, "(", ")"); + toString$0(_) { + return A.IterableBase_iterableToShortString(this, "(", ")"); } }; - P.Iterator.prototype = {}; - P.List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1}; - P.Map.prototype = {}; - P.Null.prototype = { - get$hashCode: function(_) { - return P.Object.prototype.get$hashCode.call(this, this); + A.Iterator.prototype = {}; + A.Null.prototype = { + get$hashCode(_) { + return A.Object.prototype.get$hashCode.call(this, this); }, - toString$0: function(_) { + toString$0(_) { return "null"; } }; - P.num.prototype = {}; - P.Object.prototype = {constructor: P.Object, $isObject: 1, - $eq: function(_, other) { + A.Object.prototype = {$isObject: 1, + $eq(_, other) { return this === other; }, - get$hashCode: function(_) { - return H.Primitives_objectHashCode(this); + get$hashCode(_) { + return A.Primitives_objectHashCode(this); }, - toString$0: function(_) { - return "Instance of '" + H.Primitives_objectTypeName(this) + "'"; + toString$0(_) { + return "Instance of '" + A.Primitives_objectTypeName(this) + "'"; }, - noSuchMethod$1: function(_, invocation) { - H.interceptedTypeCheck(invocation, "$isInvocation"); - throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); + noSuchMethod$1(_, invocation) { + type$.Invocation._as(invocation); + throw A.wrapException(A.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments())); }, - toString: function() { + toString() { return this.toString$0(this); } }; - P.Match.prototype = {}; - P.StackTrace.prototype = {}; - P._StringStackTrace.prototype = { - toString$0: function(_) { + A._StringStackTrace.prototype = { + toString$0(_) { return this._stackTrace; }, $isStackTrace: 1 }; - P.String.prototype = {$isPattern: 1}; - P.StringBuffer.prototype = { - get$length: function(_) { + A.StringBuffer.prototype = { + get$length(_) { return this._contents.length; }, - write$1: function(obj) { - this._contents += H.S(obj); + write$1(obj) { + this._contents += A.S(obj); }, - writeCharCode$1: function(charCode) { - this._contents += H.Primitives_stringFromCharCode(charCode); + writeCharCode$1(charCode) { + this._contents += A.Primitives_stringFromCharCode(charCode); }, - toString$0: function(_) { + toString$0(_) { var t1 = this._contents; return t1.charCodeAt(0) == 0 ? t1 : t1; }, $isStringSink: 1 }; - P.Symbol0.prototype = {}; - P.Uri_splitQueryString_closure.prototype = { - call$2: function(map, element) { - var t1, index, key, value; - t1 = P.String; - H.assertSubtype(map, "$isMap", [t1, t1], "$asMap"); - H.stringTypeCheck(element); - index = J.getInterceptor$s(element).indexOf$1(element, "="); + A.Uri_splitQueryString_closure.prototype = { + call$2(map, element) { + var index, key, value, t1; + type$.Map_String_String._as(map); + A._asString(element); + index = B.JSString_methods.indexOf$1(element, "="); if (index === -1) { if (element !== "") - map.$indexSet(0, P._Uri__uriDecode(element, 0, element.length, this.encoding, true), ""); + map.$indexSet(0, A._Uri__uriDecode(element, 0, element.length, this.encoding, true), ""); } else if (index !== 0) { - key = C.JSString_methods.substring$2(element, 0, index); - value = C.JSString_methods.substring$1(element, index + 1); + key = B.JSString_methods.substring$2(element, 0, index); + value = B.JSString_methods.substring$1(element, index + 1); t1 = this.encoding; - map.$indexSet(0, P._Uri__uriDecode(key, 0, key.length, t1, true), P._Uri__uriDecode(value, 0, value.length, t1, true)); + map.$indexSet(0, A._Uri__uriDecode(key, 0, key.length, t1, true), A._Uri__uriDecode(value, 0, value.length, t1, true)); } return map; }, - $signature: 36 + $signature: 34 }; - P.Uri__parseIPv4Address_error.prototype = { - call$2: function(msg, position) { - throw H.wrapException(P.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); + A.Uri__parseIPv4Address_error.prototype = { + call$2(msg, position) { + throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); }, - $signature: 23 + $signature: 24 }; - P.Uri_parseIPv6Address_error.prototype = { - call$2: function(msg, position) { - throw H.wrapException(P.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); + A.Uri_parseIPv6Address_error.prototype = { + call$2(msg, position) { + throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); }, - call$1: function(msg) { - return this.call$2(msg, null); - }, - $signature: 24 + $signature: 25 }; - P.Uri_parseIPv6Address_parseHex.prototype = { - call$2: function(start, end) { + A.Uri_parseIPv6Address_parseHex.prototype = { + call$2(start, end) { var value; if (end - start > 4) this.error.call$2("an IPv6 part can only contain a maximum of 4 hex digits", start); - value = P.int_parse(C.JSString_methods.substring$2(this.host, start, end), null, 16); - if (typeof value !== "number") - return value.$lt(); + value = A.int_parse(B.JSString_methods.substring$2(this.host, start, end), 16); if (value < 0 || value > 65535) this.error.call$2("each part must be in the range of `0x0..0xFFFF`", start); return value; }, - $signature: 25 + $signature: 26 }; - P._Uri.prototype = { - get$userInfo: function() { + A._Uri.prototype = { + get$_text() { + var t1, t2, t3, t4, _this = this, + value = _this.___Uri__text; + if (value === $) { + t1 = _this.scheme; + t2 = t1.length !== 0 ? "" + t1 + ":" : ""; + t3 = _this._host; + t4 = t3 == null; + if (!t4 || t1 === "file") { + t1 = t2 + "//"; + t2 = _this._userInfo; + if (t2.length !== 0) + t1 = t1 + t2 + "@"; + if (!t4) + t1 += t3; + t2 = _this._port; + if (t2 != null) + t1 = t1 + ":" + A.S(t2); + } else + t1 = t2; + t1 += _this.path; + t2 = _this._query; + if (t2 != null) + t1 = t1 + "?" + t2; + t2 = _this._fragment; + if (t2 != null) + t1 = t1 + "#" + t2; + A._lateInitializeOnceCheck(value, "_text"); + value = _this.___Uri__text = t1.charCodeAt(0) == 0 ? t1 : t1; + } + return value; + }, + get$pathSegments() { + var pathToSplit, result, _this = this, + value = _this.___Uri_pathSegments; + if (value === $) { + pathToSplit = _this.path; + if (pathToSplit.length !== 0 && B.JSString_methods._codeUnitAt$1(pathToSplit, 0) === 47) + pathToSplit = B.JSString_methods.substring$1(pathToSplit, 1); + result = pathToSplit.length === 0 ? B.List_empty : A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(pathToSplit.split("/"), type$.JSArray_String), type$.dynamic_Function_String._as(A.core_Uri_decodeComponent$closure()), type$.MappedListIterable_String_dynamic), type$.String); + A._lateInitializeOnceCheck(_this.___Uri_pathSegments, "pathSegments"); + _this.set$___Uri_pathSegments(result); + value = result; + } + return value; + }, + get$hashCode(_) { + var result, _this = this, + value = _this.___Uri_hashCode; + if (value === $) { + result = B.JSString_methods.get$hashCode(_this.get$_text()); + A._lateInitializeOnceCheck(_this.___Uri_hashCode, "hashCode"); + _this.___Uri_hashCode = result; + value = result; + } + return value; + }, + get$queryParameters() { + var t1, result, _this = this, + value = _this.___Uri_queryParameters; + if (value === $) { + t1 = _this._query; + result = new A.UnmodifiableMapView(A.Uri_splitQueryString(t1 == null ? "" : t1), type$.UnmodifiableMapView_String_String); + A._lateInitializeOnceCheck(_this.___Uri_queryParameters, "queryParameters"); + _this.set$___Uri_queryParameters(result); + value = result; + } + return value; + }, + get$userInfo() { return this._userInfo; }, - get$host: function(_) { - var t1 = this._host; - if (t1 == null) + get$host(_) { + var host = this._host; + if (host == null) return ""; - if (C.JSString_methods.startsWith$1(t1, "[")) - return C.JSString_methods.substring$2(t1, 1, t1.length - 1); - return t1; + if (B.JSString_methods.startsWith$1(host, "[")) + return B.JSString_methods.substring$2(host, 1, host.length - 1); + return host; }, - get$port: function(_) { + get$port(_) { var t1 = this._port; - if (t1 == null) - return P._Uri__defaultPort(this.scheme); - return t1; + return t1 == null ? A._Uri__defaultPort(this.scheme) : t1; }, - get$query: function() { + get$query() { var t1 = this._query; return t1 == null ? "" : t1; }, - get$fragment: function() { + get$fragment() { var t1 = this._fragment; return t1 == null ? "" : t1; }, - get$pathSegments: function() { - var result, pathToSplit, t1, t2, t3; - result = this._pathSegments; - if (result != null) - return result; - pathToSplit = this.path; - if (pathToSplit.length !== 0 && J._codeUnitAt$1$s(pathToSplit, 0) === 47) - pathToSplit = J.substring$1$s(pathToSplit, 1); - if (pathToSplit === "") - result = C.List_empty; - else { - t1 = P.String; - t2 = H.setRuntimeTypeInfo(pathToSplit.split("/"), [t1]); - t3 = H.getTypeArgumentByIndex(t2, 0); - result = P.List_List$unmodifiable(new H.MappedListIterable(t2, H.functionTypeCheck(P.core_Uri_decodeComponent$closure(), {func: 1, ret: null, args: [t3]}), [t3, null]), t1); - } - this.set$_pathSegments(result); - return result; - }, - get$queryParameters: function() { - var t1, t2; - if (this._queryParameters == null) { - t1 = this._query; - t2 = P.String; - this.set$_queryParameters(new P.UnmodifiableMapView(P.Uri_splitQueryString(t1 == null ? "" : t1), [t2, t2])); - } - return this._queryParameters; + isScheme$1(scheme) { + var thisScheme = this.scheme; + if (scheme.length !== thisScheme.length) + return false; + return A._caseInsensitiveCompareStart(scheme, thisScheme, 0) >= 0; }, - _mergePaths$2: function(base, reference) { - var t1, backCount, refStart, baseEnd, newEnd, delta; - for (t1 = J.getInterceptor$s(reference), backCount = 0, refStart = 0; t1.startsWith$2(reference, "../", refStart);) { + _mergePaths$2(base, reference) { + var backCount, refStart, baseEnd, newEnd, delta, t1; + for (backCount = 0, refStart = 0; B.JSString_methods.startsWith$2(reference, "../", refStart);) { refStart += 3; ++backCount; } - baseEnd = J.getInterceptor$s(base).lastIndexOf$1(base, "/"); + baseEnd = B.JSString_methods.lastIndexOf$1(base, "/"); while (true) { if (!(baseEnd > 0 && backCount > 0)) break; - newEnd = C.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); + newEnd = B.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); if (newEnd < 0) break; delta = baseEnd - newEnd; t1 = delta !== 2; if (!t1 || delta === 3) - if (C.JSString_methods.codeUnitAt$1(base, newEnd + 1) === 46) - t1 = !t1 || C.JSString_methods.codeUnitAt$1(base, newEnd + 2) === 46; + if (B.JSString_methods.codeUnitAt$1(base, newEnd + 1) === 46) + t1 = !t1 || B.JSString_methods.codeUnitAt$1(base, newEnd + 2) === 46; else t1 = false; else @@ -11765,157 +12651,129 @@ --backCount; baseEnd = newEnd; } - return C.JSString_methods.replaceRange$3(base, baseEnd + 1, null, C.JSString_methods.substring$1(reference, refStart - 3 * backCount)); + return B.JSString_methods.replaceRange$3(base, baseEnd + 1, null, B.JSString_methods.substring$1(reference, refStart - 3 * backCount)); }, - resolve$1: function(reference) { - return this.resolveUri$1(P.Uri_parse(reference)); + resolve$1(reference) { + return this.resolveUri$1(A.Uri_parse(reference)); }, - resolveUri$1: function(reference) { - var targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, t1, mergedPath, t2; + resolveUri$1(reference) { + var targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, packageNameEnd, packageName, mergedPath, t1, _this = this, _null = null; if (reference.get$scheme().length !== 0) { targetScheme = reference.get$scheme(); if (reference.get$hasAuthority()) { targetUserInfo = reference.get$userInfo(); targetHost = reference.get$host(reference); - targetPort = reference.get$hasPort() ? reference.get$port(reference) : null; + targetPort = reference.get$hasPort() ? reference.get$port(reference) : _null; } else { + targetPort = _null; + targetHost = targetPort; targetUserInfo = ""; - targetHost = null; - targetPort = null; } - targetPath = P._Uri__removeDotSegments(reference.get$path(reference)); - targetQuery = reference.get$hasQuery() ? reference.get$query() : null; + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; } else { - targetScheme = this.scheme; + targetScheme = _this.scheme; if (reference.get$hasAuthority()) { targetUserInfo = reference.get$userInfo(); targetHost = reference.get$host(reference); - targetPort = P._Uri__makePort(reference.get$hasPort() ? reference.get$port(reference) : null, targetScheme); - targetPath = P._Uri__removeDotSegments(reference.get$path(reference)); - targetQuery = reference.get$hasQuery() ? reference.get$query() : null; + targetPort = A._Uri__makePort(reference.get$hasPort() ? reference.get$port(reference) : _null, targetScheme); + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; } else { - targetUserInfo = this._userInfo; - targetHost = this._host; - targetPort = this._port; - if (reference.get$path(reference) === "") { - targetPath = this.path; - targetQuery = reference.get$hasQuery() ? reference.get$query() : this._query; - } else { - if (reference.get$hasAbsolutePath()) - targetPath = P._Uri__removeDotSegments(reference.get$path(reference)); + targetUserInfo = _this._userInfo; + targetHost = _this._host; + targetPort = _this._port; + targetPath = _this.path; + if (reference.get$path(reference) === "") + targetQuery = reference.get$hasQuery() ? reference.get$query() : _this._query; + else { + packageNameEnd = A._Uri__packageNameEnd(_this, targetPath); + if (packageNameEnd > 0) { + packageName = B.JSString_methods.substring$2(targetPath, 0, packageNameEnd); + targetPath = reference.get$hasAbsolutePath() ? packageName + A._Uri__removeDotSegments(reference.get$path(reference)) : packageName + A._Uri__removeDotSegments(_this._mergePaths$2(B.JSString_methods.substring$1(targetPath, packageName.length), reference.get$path(reference))); + } else if (reference.get$hasAbsolutePath()) + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + else if (targetPath.length === 0) + if (targetHost == null) + targetPath = targetScheme.length === 0 ? reference.get$path(reference) : A._Uri__removeDotSegments(reference.get$path(reference)); + else + targetPath = A._Uri__removeDotSegments("/" + reference.get$path(reference)); else { - t1 = this.path; - if (t1.length === 0) - if (targetHost == null) - targetPath = targetScheme.length === 0 ? reference.get$path(reference) : P._Uri__removeDotSegments(reference.get$path(reference)); - else - targetPath = P._Uri__removeDotSegments(C.JSString_methods.$add("/", reference.get$path(reference))); - else { - mergedPath = this._mergePaths$2(t1, reference.get$path(reference)); - t2 = targetScheme.length === 0; - if (!t2 || targetHost != null || J.startsWith$1$s(t1, "/")) - targetPath = P._Uri__removeDotSegments(mergedPath); - else - targetPath = P._Uri__normalizeRelativePath(mergedPath, !t2 || targetHost != null); - } + mergedPath = _this._mergePaths$2(targetPath, reference.get$path(reference)); + t1 = targetScheme.length === 0; + if (!t1 || targetHost != null || B.JSString_methods.startsWith$1(targetPath, "/")) + targetPath = A._Uri__removeDotSegments(mergedPath); + else + targetPath = A._Uri__normalizeRelativePath(mergedPath, !t1 || targetHost != null); } - targetQuery = reference.get$hasQuery() ? reference.get$query() : null; + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; } } } - return new P._Uri(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, reference.get$hasFragment() ? reference.get$fragment() : null); + return A._Uri$_internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, reference.get$hasFragment() ? reference.get$fragment() : _null); }, - get$hasAuthority: function() { + get$hasAuthority() { return this._host != null; }, - get$hasPort: function() { + get$hasPort() { return this._port != null; }, - get$hasQuery: function() { + get$hasQuery() { return this._query != null; }, - get$hasFragment: function() { + get$hasFragment() { return this._fragment != null; }, - get$hasAbsolutePath: function() { - return J.startsWith$1$s(this.path, "/"); + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$1(this.path, "/"); }, - toFilePath$0: function() { - var t1, windows, pathSegments; - t1 = this.scheme; + toFilePath$0() { + var pathSegments, _this = this, + t1 = _this.scheme; if (t1 !== "" && t1 !== "file") - throw H.wrapException(P.UnsupportedError$("Cannot extract a file path from a " + H.S(t1) + " URI")); - t1 = this._query; + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + t1 + " URI")); + t1 = _this._query; if ((t1 == null ? "" : t1) !== "") - throw H.wrapException(P.UnsupportedError$("Cannot extract a file path from a URI with a query component")); - t1 = this._fragment; + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + t1 = _this._fragment; if ((t1 == null ? "" : t1) !== "") - throw H.wrapException(P.UnsupportedError$("Cannot extract a file path from a URI with a fragment component")); - windows = $.$get$_Uri__isWindowsCached(); - if (windows) - t1 = P._Uri__toWindowsFilePath(this); + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + t1 = $.$get$_Uri__isWindowsCached(); + if (t1) + t1 = A._Uri__toWindowsFilePath(_this); else { - if (this._host != null && this.get$host(this) !== "") - H.throwExpression(P.UnsupportedError$("Cannot extract a non-Windows file path from a file URI with an authority")); - pathSegments = this.get$pathSegments(); - P._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); - t1 = P.StringBuffer__writeAll(J.startsWith$1$s(this.path, "/") ? "/" : "", pathSegments, "/"); + if (_this._host != null && _this.get$host(_this) !== "") + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + pathSegments = _this.get$pathSegments(); + A._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); + t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "" + "/" : "", pathSegments, "/"); t1 = t1.charCodeAt(0) == 0 ? t1 : t1; } return t1; }, - toString$0: function(_) { - var t1, t2, t3, t4; - t1 = this._text; - if (t1 == null) { - t1 = this.scheme; - t2 = t1.length !== 0 ? H.S(t1) + ":" : ""; - t3 = this._host; - t4 = t3 == null; - if (!t4 || t1 === "file") { - t1 = t2 + "//"; - t2 = this._userInfo; - if (t2.length !== 0) - t1 = t1 + H.S(t2) + "@"; - if (!t4) - t1 += t3; - t2 = this._port; - if (t2 != null) - t1 = t1 + ":" + H.S(t2); - } else - t1 = t2; - t1 += H.S(this.path); - t2 = this._query; - if (t2 != null) - t1 = t1 + "?" + t2; - t2 = this._fragment; - if (t2 != null) - t1 = t1 + "#" + t2; - t1 = t1.charCodeAt(0) == 0 ? t1 : t1; - this._text = t1; - } - return t1; + toString$0(_) { + return this.get$_text(); }, - $eq: function(_, other) { - var t1, t2; + $eq(_, other) { + var t1, t2, _this = this; if (other == null) return false; - if (this === other) + if (_this === other) return true; - if (!!J.getInterceptor$(other).$isUri) - if (this.scheme == other.get$scheme()) - if (this._host != null === other.get$hasAuthority()) - if (this._userInfo == other.get$userInfo()) - if (this.get$host(this) == other.get$host(other)) - if (this.get$port(this) == other.get$port(other)) - if (this.path == other.get$path(other)) { - t1 = this._query; + if (type$.Uri._is(other)) + if (_this.scheme === other.get$scheme()) + if (_this._host != null === other.get$hasAuthority()) + if (_this._userInfo === other.get$userInfo()) + if (_this.get$host(_this) === other.get$host(other)) + if (_this.get$port(_this) === other.get$port(other)) + if (_this.path === other.get$path(other)) { + t1 = _this._query; t2 = t1 == null; if (!t2 === other.get$hasQuery()) { if (t2) t1 = ""; if (t1 === other.get$query()) { - t1 = this._fragment; + t1 = _this._fragment; t2 = t1 == null; if (!t2 === other.get$hasFragment()) { if (t2) @@ -11938,455 +12796,281 @@ else t1 = false; else - t1 = false; - else - t1 = false; - return t1; - }, - get$hashCode: function(_) { - var t1 = this._hashCodeCache; - if (t1 == null) { - t1 = C.JSString_methods.get$hashCode(this.toString$0(0)); - this._hashCodeCache = t1; - } + t1 = false; + else + t1 = false; return t1; }, - set$_pathSegments: function(_pathSegments) { - this._pathSegments = H.assertSubtype(_pathSegments, "$isList", [P.String], "$asList"); + set$___Uri_pathSegments(___Uri_pathSegments) { + this.___Uri_pathSegments = type$.List_String._as(___Uri_pathSegments); }, - set$_queryParameters: function(_queryParameters) { - var t1 = P.String; - this._queryParameters = H.assertSubtype(_queryParameters, "$isMap", [t1, t1], "$asMap"); + set$___Uri_queryParameters(___Uri_queryParameters) { + this.___Uri_queryParameters = type$.Map_String_String._as(___Uri_queryParameters); }, $isUri: 1, - get$scheme: function() { + get$scheme() { return this.scheme; }, - get$path: function(receiver) { + get$path(receiver) { return this.path; } }; - P._Uri__Uri$notSimple_closure.prototype = { - call$1: function(_) { - var t1 = this.portStart; - if (typeof t1 !== "number") - return t1.$add(); - throw H.wrapException(P.FormatException$("Invalid port", this.uri, t1 + 1)); - }, - $signature: 20 - }; - P._Uri__checkNonWindowsPathReservedCharacters_closure.prototype = { - call$1: function(segment) { - H.stringTypeCheck(segment); - if (J.contains$1$asx(segment, "/")) - if (this.argumentError) - throw H.wrapException(P.ArgumentError$("Illegal path character " + segment)); - else - throw H.wrapException(P.UnsupportedError$("Illegal path character " + segment)); + A._Uri__makePath_closure.prototype = { + call$1(s) { + return A._Uri__uriEncode(B.List_qg40, A._asString(s), B.C_Utf8Codec, false); }, $signature: 20 }; - P._Uri__makePath_closure.prototype = { - call$1: function(s) { - return P._Uri__uriEncode(C.List_qg40, H.stringTypeCheck(s), C.Utf8Codec_false, false); - }, - $signature: 14 - }; - P.UriData.prototype = { - get$uri: function() { - var t1, t2, queryIndex, end, query; - t1 = this._uriCache; - if (t1 != null) - return t1; - t1 = this._separatorIndices; - if (0 >= t1.length) - return H.ioore(t1, 0); - t2 = this._text; - t1 = t1[0] + 1; - queryIndex = J.indexOf$2$s(t2, "?", t1); - end = t2.length; - if (queryIndex >= 0) { - query = P._Uri__normalizeOrSubstring(t2, queryIndex + 1, end, C.List_CVk, false); - end = queryIndex; - } else - query = null; - t1 = new P._DataUri("data", null, null, null, P._Uri__normalizeOrSubstring(t2, t1, end, C.List_qg4, false), query, null); - this._uriCache = t1; + A.UriData.prototype = { + get$uri() { + var t2, queryIndex, end, query, _this = this, _null = null, + t1 = _this._uriCache; + if (t1 == null) { + t1 = _this._separatorIndices; + if (0 >= t1.length) + return A.ioore(t1, 0); + t2 = _this._text; + t1 = t1[0] + 1; + queryIndex = B.JSString_methods.indexOf$2(t2, "?", t1); + end = t2.length; + if (queryIndex >= 0) { + query = A._Uri__normalizeOrSubstring(t2, queryIndex + 1, end, B.List_CVk, false); + end = queryIndex; + } else + query = _null; + t1 = _this._uriCache = new A._DataUri("data", "", _null, _null, A._Uri__normalizeOrSubstring(t2, t1, end, B.List_qg4, false), query, _null); + } return t1; }, - toString$0: function(_) { - var t1, t2; - t1 = this._separatorIndices; + toString$0(_) { + var t2, + t1 = this._separatorIndices; if (0 >= t1.length) - return H.ioore(t1, 0); + return A.ioore(t1, 0); t2 = this._text; - return t1[0] === -1 ? "data:" + H.S(t2) : t2; + return t1[0] === -1 ? "data:" + t2 : t2; } }; - P._createTables_closure.prototype = { - call$1: function(_) { - return new Uint8Array(96); - }, - $signature: 28 - }; - P._createTables_build.prototype = { - call$2: function(state, defaultTransition) { + A._createTables_build.prototype = { + call$2(state, defaultTransition) { var t1 = this.tables; - if (state >= t1.length) - return H.ioore(t1, state); + if (!(state < t1.length)) + return A.ioore(t1, state); t1 = t1[state]; - J.fillRange$3$x(t1, 0, 96, defaultTransition); + B.NativeUint8List_methods.fillRange$3(t1, 0, 96, defaultTransition); return t1; }, - $signature: 29 + $signature: 28 }; - P._createTables_setChars.prototype = { - call$3: function(target, chars, transition) { + A._createTables_setChars.prototype = { + call$3(target, chars, transition) { var t1, i, t2; for (t1 = chars.length, i = 0; i < t1; ++i) { - t2 = C.JSString_methods._codeUnitAt$1(chars, i) ^ 96; - if (t2 >= target.length) - return H.ioore(target, t2); + t2 = B.JSString_methods._codeUnitAt$1(chars, i) ^ 96; + if (!(t2 < 96)) + return A.ioore(target, t2); target[t2] = transition; } - } + }, + $signature: 19 }; - P._createTables_setRange.prototype = { - call$3: function(target, range, transition) { + A._createTables_setRange.prototype = { + call$3(target, range, transition) { var i, n, t1; - for (i = C.JSString_methods._codeUnitAt$1(range, 0), n = C.JSString_methods._codeUnitAt$1(range, 1); i <= n; ++i) { + for (i = B.JSString_methods._codeUnitAt$1(range, 0), n = B.JSString_methods._codeUnitAt$1(range, 1); i <= n; ++i) { t1 = (i ^ 96) >>> 0; - if (t1 >= target.length) - return H.ioore(target, t1); + if (!(t1 < 96)) + return A.ioore(target, t1); target[t1] = transition; } - } + }, + $signature: 19 }; - P._SimpleUri.prototype = { - get$hasAuthority: function() { + A._SimpleUri.prototype = { + get$hasAuthority() { return this._hostStart > 0; }, - get$hasPort: function() { - var t1, t2; - if (this._hostStart > 0) { - t1 = this._portStart; - if (typeof t1 !== "number") - return t1.$add(); - t2 = this._pathStart; - if (typeof t2 !== "number") - return H.iae(t2); - t2 = t1 + 1 < t2; - t1 = t2; - } else - t1 = false; - return t1; - }, - get$hasQuery: function() { - var t1, t2; - t1 = this._queryStart; - t2 = this._fragmentStart; - if (typeof t1 !== "number") - return t1.$lt(); - if (typeof t2 !== "number") - return H.iae(t2); - return t1 < t2; - }, - get$hasFragment: function() { - var t1, t2; - t1 = this._fragmentStart; - t2 = this._uri.length; - if (typeof t1 !== "number") - return t1.$lt(); - return t1 < t2; + get$hasPort() { + return this._hostStart > 0 && this._portStart + 1 < this._pathStart; }, - get$_isFile: function() { - return this._schemeEnd === 4 && J.startsWith$1$s(this._uri, "file"); + get$hasQuery() { + return this._queryStart < this._fragmentStart; }, - get$_isHttp: function() { - return this._schemeEnd === 4 && J.startsWith$1$s(this._uri, "http"); + get$hasFragment() { + return this._fragmentStart < this._uri.length; }, - get$_isHttps: function() { - return this._schemeEnd === 5 && J.startsWith$1$s(this._uri, "https"); + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$2(this._uri, "/", this._pathStart); }, - get$hasAbsolutePath: function() { - return J.startsWith$2$s(this._uri, "/", this._pathStart); + get$scheme() { + var t1 = this._schemeCache; + return t1 == null ? this._schemeCache = this._computeScheme$0() : t1; }, - get$scheme: function() { - var t1, t2; - t1 = this._schemeEnd; - if (typeof t1 !== "number") - return t1.$le(); + _computeScheme$0() { + var t2, _this = this, + t1 = _this._schemeEnd; if (t1 <= 0) return ""; - t2 = this._schemeCache; - if (t2 != null) - return t2; - if (this.get$_isHttp()) { - this._schemeCache = "http"; - t1 = "http"; - } else if (this.get$_isHttps()) { - this._schemeCache = "https"; - t1 = "https"; - } else if (this.get$_isFile()) { - this._schemeCache = "file"; - t1 = "file"; - } else if (t1 === 7 && J.startsWith$1$s(this._uri, "package")) { - this._schemeCache = "package"; - t1 = "package"; - } else { - t1 = J.substring$2$s(this._uri, 0, t1); - this._schemeCache = t1; - } - return t1; + t2 = t1 === 4; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "http")) + return "http"; + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) + return "https"; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "file")) + return "file"; + if (t1 === 7 && B.JSString_methods.startsWith$1(_this._uri, "package")) + return "package"; + return B.JSString_methods.substring$2(_this._uri, 0, t1); }, - get$userInfo: function() { - var t1, t2; - t1 = this._hostStart; - t2 = this._schemeEnd; - if (typeof t2 !== "number") - return t2.$add(); - t2 += 3; - return t1 > t2 ? J.substring$2$s(this._uri, t2, t1 - 1) : ""; - }, - get$host: function(_) { - var t1 = this._hostStart; - return t1 > 0 ? J.substring$2$s(this._uri, t1, this._portStart) : ""; + get$userInfo() { + var t1 = this._hostStart, + t2 = this._schemeEnd + 3; + return t1 > t2 ? B.JSString_methods.substring$2(this._uri, t2, t1 - 1) : ""; }, - get$port: function(_) { - var t1; - if (this.get$hasPort()) { - t1 = this._portStart; - if (typeof t1 !== "number") - return t1.$add(); - return P.int_parse(J.substring$2$s(this._uri, t1 + 1, this._pathStart), null, null); - } - if (this.get$_isHttp()) + get$host(_) { + var t1 = this._hostStart; + return t1 > 0 ? B.JSString_methods.substring$2(this._uri, t1, this._portStart) : ""; + }, + get$port(_) { + var t1, _this = this; + if (_this.get$hasPort()) + return A.int_parse(B.JSString_methods.substring$2(_this._uri, _this._portStart + 1, _this._pathStart), null); + t1 = _this._schemeEnd; + if (t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "http")) return 80; - if (this.get$_isHttps()) + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) return 443; return 0; }, - get$path: function(_) { - return J.substring$2$s(this._uri, this._pathStart, this._queryStart); + get$path(_) { + return B.JSString_methods.substring$2(this._uri, this._pathStart, this._queryStart); }, - get$query: function() { - var t1, t2; - t1 = this._queryStart; - t2 = this._fragmentStart; - if (typeof t1 !== "number") - return t1.$lt(); - if (typeof t2 !== "number") - return H.iae(t2); - return t1 < t2 ? J.substring$2$s(this._uri, t1 + 1, t2) : ""; - }, - get$fragment: function() { - var t1, t2, t3; - t1 = this._fragmentStart; - t2 = this._uri; - t3 = t2.length; - if (typeof t1 !== "number") - return t1.$lt(); - return t1 < t3 ? J.substring$1$s(t2, t1 + 1) : ""; - }, - get$pathSegments: function() { - var start, end, t1, t2, parts, i; - start = this._pathStart; - end = this._queryStart; - t1 = this._uri; - if (J.getInterceptor$s(t1).startsWith$2(t1, "/", start)) { - if (typeof start !== "number") - return start.$add(); + get$query() { + var t1 = this._queryStart, + t2 = this._fragmentStart; + return t1 < t2 ? B.JSString_methods.substring$2(this._uri, t1 + 1, t2) : ""; + }, + get$fragment() { + var t1 = this._fragmentStart, + t2 = this._uri; + return t1 < t2.length ? B.JSString_methods.substring$1(t2, t1 + 1) : ""; + }, + get$pathSegments() { + var parts, i, + start = this._pathStart, + end = this._queryStart, + t1 = this._uri; + if (B.JSString_methods.startsWith$2(t1, "/", start)) ++start; - } - if (start == end) - return C.List_empty; - t2 = P.String; - parts = H.setRuntimeTypeInfo([], [t2]); - i = start; - while (true) { - if (typeof i !== "number") - return i.$lt(); - if (typeof end !== "number") - return H.iae(end); - if (!(i < end)) - break; - if (C.JSString_methods.codeUnitAt$1(t1, i) === 47) { - C.JSArray_methods.add$1(parts, C.JSString_methods.substring$2(t1, start, i)); + if (start === end) + return B.List_empty; + parts = A._setArrayType([], type$.JSArray_String); + for (i = start; i < end; ++i) + if (B.JSString_methods.codeUnitAt$1(t1, i) === 47) { + B.JSArray_methods.add$1(parts, B.JSString_methods.substring$2(t1, start, i)); start = i + 1; } - ++i; - } - C.JSArray_methods.add$1(parts, C.JSString_methods.substring$2(t1, start, end)); - return P.List_List$unmodifiable(parts, t2); - }, - get$queryParameters: function() { - var t1, t2; - t1 = this._queryStart; - t2 = this._fragmentStart; - if (typeof t1 !== "number") - return t1.$lt(); - if (typeof t2 !== "number") - return H.iae(t2); - if (t1 >= t2) - return C.Map_empty; - t1 = P.String; - return new P.UnmodifiableMapView(P.Uri_splitQueryString(this.get$query()), [t1, t1]); - }, - _isPort$1: function(port) { - var t1, portDigitStart; - t1 = this._portStart; - if (typeof t1 !== "number") - return t1.$add(); - portDigitStart = t1 + 1; - return portDigitStart + port.length === this._pathStart && J.startsWith$2$s(this._uri, port, portDigitStart); - }, - removeFragment$0: function() { - var t1, t2, t3; - t1 = this._fragmentStart; - t2 = this._uri; - t3 = t2.length; - if (typeof t1 !== "number") - return t1.$lt(); - if (t1 >= t3) - return this; - return new P._SimpleUri(J.substring$2$s(t2, 0, t1), this._schemeEnd, this._hostStart, this._portStart, this._pathStart, this._queryStart, t1, this._schemeCache); - }, - resolve$1: function(reference) { - return this.resolveUri$1(P.Uri_parse(reference)); - }, - resolveUri$1: function(reference) { - if (reference instanceof P._SimpleUri) + B.JSArray_methods.add$1(parts, B.JSString_methods.substring$2(t1, start, end)); + return A.List_List$unmodifiable(parts, type$.String); + }, + get$queryParameters() { + if (this._queryStart >= this._fragmentStart) + return B.Map_empty; + return new A.UnmodifiableMapView(A.Uri_splitQueryString(this.get$query()), type$.UnmodifiableMapView_String_String); + }, + _isPort$1(port) { + var portDigitStart = this._portStart + 1; + return portDigitStart + port.length === this._pathStart && B.JSString_methods.startsWith$2(this._uri, port, portDigitStart); + }, + removeFragment$0() { + var _this = this, + t1 = _this._fragmentStart, + t2 = _this._uri; + if (t1 >= t2.length) + return _this; + return new A._SimpleUri(B.JSString_methods.substring$2(t2, 0, t1), _this._schemeEnd, _this._hostStart, _this._portStart, _this._pathStart, _this._queryStart, t1, _this._schemeCache); + }, + resolve$1(reference) { + return this.resolveUri$1(A.Uri_parse(reference)); + }, + resolveUri$1(reference) { + if (reference instanceof A._SimpleUri) return this._simpleMerge$2(this, reference); return this._toNonSimple$0().resolveUri$1(reference); }, - _simpleMerge$2: function(base, ref) { - var t1, t2, t3, isSimple, delta, newUri, t4, t5, t6, refStart, baseStart, baseEnd, baseUri, baseStart0, backCount, refStart0, insert; - t1 = ref._schemeEnd; - if (typeof t1 !== "number") - return t1.$gt(); + _simpleMerge$2(base, ref) { + var t2, t3, t4, isSimple, delta, refStart, basePathStart, packageNameEnd, basePathStart0, baseStart, baseEnd, baseUri, baseStart0, backCount, refStart0, insert, + t1 = ref._schemeEnd; if (t1 > 0) return ref; t2 = ref._hostStart; if (t2 > 0) { t3 = base._schemeEnd; - if (typeof t3 !== "number") - return t3.$gt(); if (t3 <= 0) return ref; - if (base.get$_isFile()) - isSimple = ref._pathStart != ref._queryStart; - else if (base.get$_isHttp()) + t4 = t3 === 4; + if (t4 && B.JSString_methods.startsWith$1(base._uri, "file")) + isSimple = ref._pathStart !== ref._queryStart; + else if (t4 && B.JSString_methods.startsWith$1(base._uri, "http")) isSimple = !ref._isPort$1("80"); else - isSimple = !base.get$_isHttps() || !ref._isPort$1("443"); + isSimple = !(t3 === 5 && B.JSString_methods.startsWith$1(base._uri, "https")) || !ref._isPort$1("443"); if (isSimple) { delta = t3 + 1; - newUri = J.substring$2$s(base._uri, 0, delta) + J.substring$1$s(ref._uri, t1 + 1); - t1 = ref._portStart; - if (typeof t1 !== "number") - return t1.$add(); - t4 = ref._pathStart; - if (typeof t4 !== "number") - return t4.$add(); - t5 = ref._queryStart; - if (typeof t5 !== "number") - return t5.$add(); - t6 = ref._fragmentStart; - if (typeof t6 !== "number") - return t6.$add(); - return new P._SimpleUri(newUri, t3, t2 + delta, t1 + delta, t4 + delta, t5 + delta, t6 + delta, base._schemeCache); + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, delta) + B.JSString_methods.substring$1(ref._uri, t1 + 1), t3, t2 + delta, ref._portStart + delta, ref._pathStart + delta, ref._queryStart + delta, ref._fragmentStart + delta, base._schemeCache); } else return this._toNonSimple$0().resolveUri$1(ref); } refStart = ref._pathStart; t1 = ref._queryStart; - if (refStart == t1) { + if (refStart === t1) { t2 = ref._fragmentStart; - if (typeof t1 !== "number") - return t1.$lt(); - if (typeof t2 !== "number") - return H.iae(t2); if (t1 < t2) { t3 = base._queryStart; - if (typeof t3 !== "number") - return t3.$sub(); delta = t3 - t1; - return new P._SimpleUri(J.substring$2$s(base._uri, 0, t3) + J.substring$1$s(ref._uri, t1), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, t1 + delta, t2 + delta, base._schemeCache); + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(ref._uri, t1), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, t1 + delta, t2 + delta, base._schemeCache); } t1 = ref._uri; if (t2 < t1.length) { t3 = base._fragmentStart; - if (typeof t3 !== "number") - return t3.$sub(); - return new P._SimpleUri(J.substring$2$s(base._uri, 0, t3) + J.substring$1$s(t1, t2), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, base._queryStart, t2 + (t3 - t2), base._schemeCache); + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(t1, t2), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, base._queryStart, t2 + (t3 - t2), base._schemeCache); } return base.removeFragment$0(); } t2 = ref._uri; - if (J.getInterceptor$s(t2).startsWith$2(t2, "/", refStart)) { - t3 = base._pathStart; - if (typeof t3 !== "number") - return t3.$sub(); - if (typeof refStart !== "number") - return H.iae(refStart); - delta = t3 - refStart; - newUri = J.substring$2$s(base._uri, 0, t3) + C.JSString_methods.substring$1(t2, refStart); - if (typeof t1 !== "number") - return t1.$add(); - t2 = ref._fragmentStart; - if (typeof t2 !== "number") - return t2.$add(); - return new P._SimpleUri(newUri, base._schemeEnd, base._hostStart, base._portStart, t3, t1 + delta, t2 + delta, base._schemeCache); + if (B.JSString_methods.startsWith$2(t2, "/", refStart)) { + basePathStart = base._pathStart; + packageNameEnd = A._SimpleUri__packageNameEnd(this); + basePathStart0 = packageNameEnd > 0 ? packageNameEnd : basePathStart; + delta = basePathStart0 - refStart; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, basePathStart0) + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, basePathStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); } baseStart = base._pathStart; baseEnd = base._queryStart; - if (baseStart == baseEnd && base._hostStart > 0) { - for (; C.JSString_methods.startsWith$2(t2, "../", refStart);) { - if (typeof refStart !== "number") - return refStart.$add(); + if (baseStart === baseEnd && base._hostStart > 0) { + for (; B.JSString_methods.startsWith$2(t2, "../", refStart);) refStart += 3; - } - if (typeof baseStart !== "number") - return baseStart.$sub(); - if (typeof refStart !== "number") - return H.iae(refStart); delta = baseStart - refStart + 1; - newUri = J.substring$2$s(base._uri, 0, baseStart) + "/" + C.JSString_methods.substring$1(t2, refStart); - if (typeof t1 !== "number") - return t1.$add(); - t2 = ref._fragmentStart; - if (typeof t2 !== "number") - return t2.$add(); - return new P._SimpleUri(newUri, base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, t2 + delta, base._schemeCache); + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, baseStart) + "/" + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); } baseUri = base._uri; - for (t3 = J.getInterceptor$s(baseUri), baseStart0 = baseStart; t3.startsWith$2(baseUri, "../", baseStart0);) { - if (typeof baseStart0 !== "number") - return baseStart0.$add(); - baseStart0 += 3; - } + packageNameEnd = A._SimpleUri__packageNameEnd(this); + if (packageNameEnd >= 0) + baseStart0 = packageNameEnd; + else + for (baseStart0 = baseStart; B.JSString_methods.startsWith$2(baseUri, "../", baseStart0);) + baseStart0 += 3; backCount = 0; while (true) { - if (typeof refStart !== "number") - return refStart.$add(); refStart0 = refStart + 3; - if (typeof t1 !== "number") - return H.iae(t1); - if (!(refStart0 <= t1 && C.JSString_methods.startsWith$2(t2, "../", refStart))) + if (!(refStart0 <= t1 && B.JSString_methods.startsWith$2(t2, "../", refStart))) break; ++backCount; refStart = refStart0; } - insert = ""; - while (true) { - if (typeof baseEnd !== "number") - return baseEnd.$gt(); - if (typeof baseStart0 !== "number") - return H.iae(baseStart0); - if (!(baseEnd > baseStart0)) - break; + for (insert = ""; baseEnd > baseStart0;) { --baseEnd; - if (C.JSString_methods.codeUnitAt$1(baseUri, baseEnd) === 47) { + if (B.JSString_methods.codeUnitAt$1(baseUri, baseEnd) === 47) { if (backCount === 0) { insert = "/"; break; @@ -12395,443 +13079,445 @@ insert = "/"; } } - if (baseEnd === baseStart0) { - t3 = base._schemeEnd; - if (typeof t3 !== "number") - return t3.$gt(); - t3 = t3 <= 0 && !C.JSString_methods.startsWith$2(baseUri, "/", baseStart); - } else - t3 = false; - if (t3) { + if (baseEnd === baseStart0 && base._schemeEnd <= 0 && !B.JSString_methods.startsWith$2(baseUri, "/", baseStart)) { refStart -= backCount * 3; insert = ""; } delta = baseEnd - refStart + insert.length; - newUri = C.JSString_methods.substring$2(baseUri, 0, baseEnd) + insert + C.JSString_methods.substring$1(t2, refStart); - t2 = ref._fragmentStart; - if (typeof t2 !== "number") - return t2.$add(); - return new P._SimpleUri(newUri, base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, t2 + delta, base._schemeCache); - }, - toFilePath$0: function() { - var t1, t2, t3, windows; - t1 = this._schemeEnd; - if (typeof t1 !== "number") - return t1.$ge(); - if (t1 >= 0 && !this.get$_isFile()) - throw H.wrapException(P.UnsupportedError$("Cannot extract a file path from a " + H.S(this.get$scheme()) + " URI")); - t1 = this._queryStart; - t2 = this._uri; - t3 = t2.length; - if (typeof t1 !== "number") - return t1.$lt(); - if (t1 < t3) { - t2 = this._fragmentStart; - if (typeof t2 !== "number") - return H.iae(t2); - if (t1 < t2) - throw H.wrapException(P.UnsupportedError$("Cannot extract a file path from a URI with a query component")); - throw H.wrapException(P.UnsupportedError$("Cannot extract a file path from a URI with a fragment component")); - } - windows = $.$get$_Uri__isWindowsCached(); - if (windows) - t1 = P._Uri__toWindowsFilePath(this); + return new A._SimpleUri(B.JSString_methods.substring$2(baseUri, 0, baseEnd) + insert + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + }, + toFilePath$0() { + var t2, t3, _this = this, + t1 = _this._schemeEnd; + if (t1 >= 0) { + t2 = !(t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "file")); + t1 = t2; + } else + t1 = false; + if (t1) + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + _this.get$scheme() + " URI")); + t1 = _this._queryStart; + t2 = _this._uri; + if (t1 < t2.length) { + if (t1 < _this._fragmentStart) + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + } + t3 = $.$get$_Uri__isWindowsCached(); + if (t3) + t1 = A._Uri__toWindowsFilePath(_this); else { - t3 = this._portStart; - if (typeof t3 !== "number") - return H.iae(t3); - if (this._hostStart < t3) - H.throwExpression(P.UnsupportedError$("Cannot extract a non-Windows file path from a file URI with an authority")); - t1 = J.substring$2$s(t2, this._pathStart, t1); + if (_this._hostStart < _this._portStart) + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + t1 = B.JSString_methods.substring$2(t2, _this._pathStart, t1); } return t1; }, - get$hashCode: function(_) { + get$hashCode(_) { var t1 = this._hashCodeCache; - if (t1 == null) { - t1 = J.get$hashCode$(this._uri); - this._hashCodeCache = t1; - } - return t1; + return t1 == null ? this._hashCodeCache = B.JSString_methods.get$hashCode(this._uri) : t1; }, - $eq: function(_, other) { + $eq(_, other) { if (other == null) return false; if (this === other) return true; - return !!J.getInterceptor$(other).$isUri && this._uri == other.toString$0(0); - }, - _toNonSimple$0: function() { - var t1, t2, t3, t4, t5, t6, t7, t8; - t1 = this.get$scheme(); - t2 = this.get$userInfo(); - t3 = this._hostStart > 0 ? this.get$host(this) : null; - t4 = this.get$hasPort() ? this.get$port(this) : null; - t5 = this._uri; - t6 = this._queryStart; - t7 = J.substring$2$s(t5, this._pathStart, t6); - t8 = this._fragmentStart; - if (typeof t6 !== "number") - return t6.$lt(); - if (typeof t8 !== "number") - return H.iae(t8); - t6 = t6 < t8 ? this.get$query() : null; - return new P._Uri(t1, t2, t3, t4, t7, t6, t8 < t5.length ? this.get$fragment() : null); - }, - toString$0: function(_) { + return type$.Uri._is(other) && this._uri === other.toString$0(0); + }, + _toNonSimple$0() { + var _this = this, _null = null, + t1 = _this.get$scheme(), + t2 = _this.get$userInfo(), + t3 = _this._hostStart > 0 ? _this.get$host(_this) : _null, + t4 = _this.get$hasPort() ? _this.get$port(_this) : _null, + t5 = _this._uri, + t6 = _this._queryStart, + t7 = B.JSString_methods.substring$2(t5, _this._pathStart, t6), + t8 = _this._fragmentStart; + t6 = t6 < t8 ? _this.get$query() : _null; + return A._Uri$_internal(t1, t2, t3, t4, t7, t6, t8 < t5.length ? _this.get$fragment() : _null); + }, + toString$0(_) { return this._uri; }, $isUri: 1 }; - P._DataUri.prototype = {}; - W.HtmlElement.prototype = {}; - W.AnchorElement.prototype = { - toString$0: function(receiver) { + A._DataUri.prototype = {}; + A.HtmlElement.prototype = {}; + A.AnchorElement.prototype = { + toString$0(receiver) { return String(receiver); } }; - W.AreaElement.prototype = { - toString$0: function(receiver) { + A.AreaElement.prototype = { + toString$0(receiver) { return String(receiver); } }; - W.Blob.prototype = {$isBlob: 1}; - W.CharacterData.prototype = { - get$length: function(receiver) { + A.Blob.prototype = {$isBlob: 1}; + A.CharacterData.prototype = { + get$length(receiver) { return receiver.length; } }; - W.DomException.prototype = { - toString$0: function(receiver) { + A.DomException.prototype = { + toString$0(receiver) { return String(receiver); } }; - W.DomTokenList.prototype = { - get$length: function(receiver) { + A.DomTokenList.prototype = { + get$length(receiver) { return receiver.length; } }; - W.Element.prototype = { - toString$0: function(receiver) { + A.Element.prototype = { + toString$0(receiver) { return receiver.localName; }, - get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); + get$onClick(receiver) { + return new A._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); }, $isElement: 1 }; - W.Event.prototype = {$isEvent: 1}; - W.EventTarget.prototype = { - addEventListener$3: function(receiver, type, listener, useCapture) { - H.functionTypeCheck(listener, {func: 1, args: [W.Event]}); + A.Event.prototype = {$isEvent: 1}; + A.EventTarget.prototype = { + addEventListener$3(receiver, type, listener, useCapture) { + type$.nullable_dynamic_Function_Event._as(listener); if (listener != null) this._addEventListener$3(receiver, type, listener, false); }, - _addEventListener$3: function(receiver, type, listener, options) { - return receiver.addEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), false); + _addEventListener$3(receiver, type, listener, options) { + return receiver.addEventListener(type, A.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false); }, - _removeEventListener$3: function(receiver, type, listener, options) { - return receiver.removeEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), false); + _removeEventListener$3(receiver, type, listener, options) { + return receiver.removeEventListener(type, A.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false); }, $isEventTarget: 1 }; - W.File.prototype = {$isFile: 1}; - W.FormElement.prototype = { - get$length: function(receiver) { + A.File.prototype = {$isFile: 1}; + A.FormElement.prototype = { + get$length(receiver) { return receiver.length; } }; - W.HtmlCollection.prototype = { - get$length: function(receiver) { + A.HtmlCollection.prototype = { + get$length(receiver) { return receiver.length; }, - $index: function(receiver, index) { - H.intTypeCheck(index); + $index(receiver, index) { + A._asInt(index); if (index >>> 0 !== index || index >= receiver.length) - throw H.wrapException(P.IndexError$(index, receiver, null, null, null)); + throw A.wrapException(A.IndexError$(index, receiver, null, null, null)); return receiver[index]; }, - $indexSet: function(receiver, index, value) { - H.intTypeCheck(index); - H.interceptedTypeCheck(value, "$isNode"); - throw H.wrapException(P.UnsupportedError$("Cannot assign element of immutable List.")); + $indexSet(receiver, index, value) { + A._asInt(index); + type$.Node._as(value); + throw A.wrapException(A.UnsupportedError$("Cannot assign element of immutable List.")); }, - elementAt$1: function(receiver, index) { - if (index < 0 || index >= receiver.length) - return H.ioore(receiver, index); + elementAt$1(receiver, index) { + if (!(index >= 0 && index < receiver.length)) + return A.ioore(receiver, index); return receiver[index]; }, $isEfficientLengthIterable: 1, - $asEfficientLengthIterable: function() { - return [W.Node]; - }, $isJavaScriptIndexingBehavior: 1, - $asJavaScriptIndexingBehavior: function() { - return [W.Node]; - }, - $asListMixin: function() { - return [W.Node]; - }, $isIterable: 1, - $asIterable: function() { - return [W.Node]; - }, - $isList: 1, - $asList: function() { - return [W.Node]; + $isList: 1 + }; + A.IFrameElement.prototype = { + set$src(receiver, value) { + receiver.src = value; }, - $asImmutableListMixin: function() { - return [W.Node]; - } + $isIFrameElement: 1 }; - W.IFrameElement.prototype = {$isIFrameElement: 1}; - W.Location.prototype = { - get$origin: function(receiver) { + A.Location.prototype = { + get$origin(receiver) { if ("origin" in receiver) return receiver.origin; - return H.S(receiver.protocol) + "//" + H.S(receiver.host); + return receiver.protocol + "//" + receiver.host; }, - toString$0: function(receiver) { + toString$0(receiver) { return String(receiver); - } + }, + $isLocation: 1 }; - W.MessageEvent.prototype = {$isMessageEvent: 1}; - W.MessagePort.prototype = { - addEventListener$3: function(receiver, type, listener, useCapture) { - H.functionTypeCheck(listener, {func: 1, args: [W.Event]}); + A.MessageEvent.prototype = {$isMessageEvent: 1}; + A.MessagePort.prototype = { + addEventListener$3(receiver, type, listener, useCapture) { + type$.nullable_dynamic_Function_Event._as(listener); if (type === "message") receiver.start(); this.super$EventTarget$addEventListener(receiver, type, listener, false); }, - postMessage$1: function(receiver, message) { - receiver.postMessage(new P._StructuredCloneDart2Js([], []).walk$1(message)); + postMessage$1(receiver, message) { + receiver.postMessage(new A._StructuredCloneDart2Js([], []).walk$1(message)); return; }, $isMessagePort: 1 }; - W.MouseEvent.prototype = {$isMouseEvent: 1}; - W.Node.prototype = { - toString$0: function(receiver) { + A.MouseEvent.prototype = {$isMouseEvent: 1}; + A.Node.prototype = { + toString$0(receiver) { var value = receiver.nodeValue; return value == null ? this.super$Interceptor$toString(receiver) : value; }, - _removeChild$1: function(receiver, child) { + _removeChild$1(receiver, child) { return receiver.removeChild(child); }, $isNode: 1 }; - W.SelectElement.prototype = { - get$length: function(receiver) { + A.SelectElement.prototype = { + get$length(receiver) { return receiver.length; } }; - W.UIEvent.prototype = {}; - W.Window.prototype = { - get$location: function(receiver) { - return receiver.location; + A.UIEvent.prototype = {}; + A.Window.prototype = { + get$location(receiver) { + return type$.Location._as(receiver.location); }, - postMessage$3: function(receiver, message, targetOrigin, transfer) { - H.assertSubtype(transfer, "$isList", [P.Object], "$asList"); - this._postMessage_1$3(receiver, new P._StructuredCloneDart2Js([], []).walk$1(message), targetOrigin, transfer); + postMessage$3(receiver, message, targetOrigin, transfer) { + type$.nullable_List_Object._as(transfer); + this._postMessage_1$3(receiver, new A._StructuredCloneDart2Js([], []).walk$1(message), targetOrigin, transfer); return; }, - _postMessage_1$3: function(receiver, message, targetOrigin, transfer) { - return receiver.postMessage(message, targetOrigin, H.assertSubtype(transfer, "$isList", [P.Object], "$asList")); + _postMessage_1$3(receiver, message, targetOrigin, transfer) { + return receiver.postMessage(message, targetOrigin, type$.List_Object._as(transfer)); }, $isWindowBase: 1 }; - W._EventStream.prototype = { - listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { - var t1 = H.getTypeArgumentByIndex(this, 0); - H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]}); - H.functionTypeCheck(onDone, {func: 1, ret: -1}); - return W._EventStreamSubscription$(this._html$_target, this._eventType, onData, false, t1); + A.EventStreamProvider.prototype = {}; + A._EventStream.prototype = { + listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError) { + var t1 = A._instanceType(this); + t1._eval$1("~(1)?")._as(onData); + type$.nullable_void_Function._as(onDone); + return A._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1); }, - listen$1: function(onData) { + listen$1(onData) { return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null); }, - listen$3$onDone$onError: function(onData, onDone, onError) { + listen$3$onDone$onError(onData, onDone, onError) { return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError); - } - }; - W._ElementEventStreamImpl.prototype = {}; - W._EventStreamSubscription.prototype = { - cancel$0: function() { - if (this._html$_target == null) - return; - this._unlisten$0(); - this._html$_target = null; - this.set$_onData(null); - return; }, - _tryResume$0: function() { - var t1 = this._onData; - if (t1 != null && this._pauseCount <= 0) - J.addEventListener$3$x(this._html$_target, this._eventType, t1, false); + listen$3$cancelOnError$onDone(onData, cancelOnError, onDone) { + return this.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, null); + } + }; + A._ElementEventStreamImpl.prototype = {}; + A._EventStreamSubscription.prototype = { + cancel$0() { + var _this = this; + if (_this._target == null) + return $.$get$nullFuture(); + _this._unlisten$0(); + _this._target = null; + _this.set$_onData(null); + return $.$get$nullFuture(); + }, + onData$1(handleData) { + var t1, _this = this; + _this.$ti._eval$1("~(1)?")._as(handleData); + if (_this._target == null) + throw A.wrapException(A.StateError$("Subscription has been canceled.")); + _this._unlisten$0(); + t1 = A._wrapZone(new A._EventStreamSubscription_onData_closure(handleData), type$.Event); + _this.set$_onData(t1); + _this._tryResume$0(); + }, + onError$1(_, handleError) { + }, + _tryResume$0() { + var t2, _this = this, + t1 = _this._onData; + if (t1 != null && _this._pauseCount <= 0) { + t2 = _this._target; + t2.toString; + J.addEventListener$3$x(t2, _this._eventType, t1, false); + } }, - _unlisten$0: function() { - var t1, t2, t3; - t1 = this._onData; - t2 = t1 != null; - if (t2) { - t3 = this._html$_target; - t3.toString; - H.functionTypeCheck(t1, {func: 1, args: [W.Event]}); - if (t2) - J._removeEventListener$3$x(t3, this._eventType, t1, false); + _unlisten$0() { + var t2, + t1 = this._onData; + if (t1 != null) { + t2 = this._target; + t2.toString; + J._removeEventListener$3$x(t2, this._eventType, type$.nullable_dynamic_Function_Event._as(t1), false); } }, - set$_onData: function(_onData) { - this._onData = H.functionTypeCheck(_onData, {func: 1, args: [W.Event]}); + set$_onData(_onData) { + this._onData = type$.nullable_dynamic_Function_Event._as(_onData); } }; - W._EventStreamSubscription_closure.prototype = { - call$1: function(e) { - return this.onData.call$1(H.interceptedTypeCheck(e, "$isEvent")); + A._EventStreamSubscription_closure.prototype = { + call$1(e) { + return this.onData.call$1(type$.Event._as(e)); }, - $signature: 30 + $signature: 18 + }; + A._EventStreamSubscription_onData_closure.prototype = { + call$1(e) { + return this.handleData.call$1(type$.Event._as(e)); + }, + $signature: 18 }; - W.ImmutableListMixin.prototype = { - get$iterator: function(receiver) { - return new W.FixedSizeListIterator(receiver, receiver.length, -1, [H.getRuntimeTypeArgumentIntercepted(this, receiver, "ImmutableListMixin", 0)]); + A.ImmutableListMixin.prototype = { + get$iterator(receiver) { + return new A.FixedSizeListIterator(receiver, receiver.length, A.instanceType(receiver)._eval$1("FixedSizeListIterator")); } }; - W.FixedSizeListIterator.prototype = { - moveNext$0: function() { - var nextPosition, t1; - nextPosition = this._position + 1; - t1 = this._length; + A.FixedSizeListIterator.prototype = { + moveNext$0() { + var _this = this, + nextPosition = _this._position + 1, + t1 = _this._length; if (nextPosition < t1) { - t1 = this._array; - if (nextPosition < 0 || nextPosition >= t1.length) - return H.ioore(t1, nextPosition); - this.set$_current(t1[nextPosition]); - this._position = nextPosition; + t1 = _this._array; + if (!(nextPosition >= 0 && nextPosition < t1.length)) + return A.ioore(t1, nextPosition); + _this.set$_current(t1[nextPosition]); + _this._position = nextPosition; return true; } - this.set$_current(null); - this._position = t1; + _this.set$_current(null); + _this._position = t1; return false; }, - get$current: function() { - return this._current; + get$current() { + var t1 = this._current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; }, - set$_current: function(_current) { - this._current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0)); + set$_current(_current) { + this._current = this.$ti._eval$1("1?")._as(_current); }, $isIterator: 1 }; - W._DOMWindowCrossFrame.prototype = { - postMessage$3: function(_, message, targetOrigin, messagePorts) { - this._window.postMessage(new P._StructuredCloneDart2Js([], []).walk$1(message), targetOrigin, messagePorts); + A._DOMWindowCrossFrame.prototype = { + postMessage$3(_, message, targetOrigin, messagePorts) { + this._window.postMessage(new A._StructuredCloneDart2Js([], []).walk$1(message), targetOrigin, messagePorts); }, $isEventTarget: 1, $isWindowBase: 1 }; - W._HtmlCollection_Interceptor_ListMixin.prototype = {}; - W._HtmlCollection_Interceptor_ListMixin_ImmutableListMixin.prototype = {}; - P._StructuredClone.prototype = { - findSlot$1: function(value) { - var t1, $length, i; - t1 = this.values; - $length = t1.length; + A._HtmlCollection_JavaScriptObject_ListMixin.prototype = {}; + A._HtmlCollection_JavaScriptObject_ListMixin_ImmutableListMixin.prototype = {}; + A._StructuredClone.prototype = { + findSlot$1(value) { + var i, + t1 = this.values, + $length = t1.length; for (i = 0; i < $length; ++i) if (t1[i] === value) return i; - C.JSArray_methods.add$1(t1, value); - C.JSArray_methods.add$1(this.copies, null); + B.JSArray_methods.add$1(t1, value); + B.JSArray_methods.add$1(this.copies, null); return $length; }, - walk$1: function(e) { - var t1, t2, slot, copy; - t1 = {}; + walk$1(e) { + var slot, t2, copy, _this = this, t1 = {}; if (e == null) return e; - if (typeof e === "boolean") + if (A._isBool(e)) return e; - if (typeof e === "number") + if (typeof e == "number") return e; - if (typeof e === "string") + if (typeof e == "string") return e; - t2 = J.getInterceptor$(e); - if (!!t2.$isDateTime) - return new Date(e._core$_value); - if (!!t2.$isRegExp) - throw H.wrapException(P.UnimplementedError$("structured clone of RegExp")); - if (!!t2.$isFile) + if (e instanceof A.DateTime) + return new Date(e._value); + if (type$.RegExp._is(e)) + throw A.wrapException(A.UnimplementedError$("structured clone of RegExp")); + if (type$.File._is(e)) return e; - if (!!t2.$isBlob) + if (type$.Blob._is(e)) return e; - if (!!t2.$isNativeByteBuffer || !!t2.$isNativeTypedData || !!t2.$isMessagePort) + if (type$.NativeByteBuffer._is(e) || type$.NativeTypedData._is(e) || type$.MessagePort._is(e)) return e; - if (!!t2.$isMap) { - slot = this.findSlot$1(e); - t2 = this.copies; - if (slot >= t2.length) - return H.ioore(t2, slot); - copy = t2[slot]; - t1.copy = copy; + if (type$.Map_dynamic_dynamic._is(e)) { + slot = _this.findSlot$1(e); + t2 = _this.copies; + if (!(slot < t2.length)) + return A.ioore(t2, slot); + copy = t1.copy = t2[slot]; if (copy != null) return copy; copy = {}; t1.copy = copy; - C.JSArray_methods.$indexSet(t2, slot, copy); - e.forEach$1(0, new P._StructuredClone_walk_closure(t1, this)); + B.JSArray_methods.$indexSet(t2, slot, copy); + e.forEach$1(0, new A._StructuredClone_walk_closure(t1, _this)); return t1.copy; } - if (!!t2.$isList) { - slot = this.findSlot$1(e); - t1 = this.copies; - if (slot >= t1.length) - return H.ioore(t1, slot); + if (type$.List_dynamic._is(e)) { + slot = _this.findSlot$1(e); + t1 = _this.copies; + if (!(slot < t1.length)) + return A.ioore(t1, slot); copy = t1[slot]; if (copy != null) return copy; - return this.copyList$2(e, slot); + return _this.copyList$2(e, slot); + } + if (type$.JSObject._is(e)) { + slot = _this.findSlot$1(e); + t2 = _this.copies; + if (!(slot < t2.length)) + return A.ioore(t2, slot); + copy = t1.copy = t2[slot]; + if (copy != null) + return copy; + copy = {}; + t1.copy = copy; + B.JSArray_methods.$indexSet(t2, slot, copy); + _this.forEachObjectKey$2(e, new A._StructuredClone_walk_closure0(t1, _this)); + return t1.copy; } - throw H.wrapException(P.UnimplementedError$("structured clone of other type")); + throw A.wrapException(A.UnimplementedError$("structured clone of other type")); }, - copyList$2: function(e, slot) { - var t1, $length, copy, i; - t1 = J.getInterceptor$asx(e); - $length = t1.get$length(e); - copy = new Array($length); - C.JSArray_methods.$indexSet(this.copies, slot, copy); + copyList$2(e, slot) { + var i, + t1 = J.getInterceptor$asx(e), + $length = t1.get$length(e), + copy = new Array($length); + B.JSArray_methods.$indexSet(this.copies, slot, copy); for (i = 0; i < $length; ++i) - C.JSArray_methods.$indexSet(copy, i, this.walk$1(t1.$index(e, i))); + B.JSArray_methods.$indexSet(copy, i, this.walk$1(t1.$index(e, i))); return copy; } }; - P._StructuredClone_walk_closure.prototype = { - call$2: function(key, value) { + A._StructuredClone_walk_closure.prototype = { + call$2(key, value) { this._box_0.copy[key] = this.$this.walk$1(value); }, - $signature: 13 + $signature: 31 }; - P._AcceptStructuredClone.prototype = { - findSlot$1: function(value) { - var t1, $length, i, t2; - t1 = this.values; - $length = t1.length; - for (i = 0; i < $length; ++i) { - t2 = t1[i]; - if (t2 == null ? value == null : t2 === value) + A._StructuredClone_walk_closure0.prototype = { + call$2(key, value) { + this._box_0.copy[key] = this.$this.walk$1(value); + }, + $signature: 32 + }; + A._AcceptStructuredClone.prototype = { + findSlot$1(value) { + var i, + t1 = this.values, + $length = t1.length; + for (i = 0; i < $length; ++i) + if (t1[i] === value) return i; - } - C.JSArray_methods.add$1(t1, value); - C.JSArray_methods.add$1(this.copies, null); + B.JSArray_methods.add$1(t1, value); + B.JSArray_methods.add$1(this.copies, null); return $length; }, - walk$1: function(e) { - var _box_0, millisSinceEpoch, t1, proto, slot, copy, l, t2, $length, i; - _box_0 = {}; + walk$1(e) { + var millisSinceEpoch, t1, proto, slot, copy, t2, l, $length, i, _this = this, _box_0 = {}; if (e == null) return e; - if (typeof e === "boolean") + if (A._isBool(e)) return e; - if (typeof e === "number") + if (typeof e == "number") return e; - if (typeof e === "string") + if (typeof e == "string") return e; if (e instanceof Date) { millisSinceEpoch = e.getTime(); @@ -12840,216 +13526,217 @@ else t1 = true; if (t1) - H.throwExpression(P.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch)); - return new P.DateTime(millisSinceEpoch, true); + A.throwExpression(A.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch, null)); + A.checkNotNullable(true, "isUtc", type$.bool); + return new A.DateTime(millisSinceEpoch, true); } if (e instanceof RegExp) - throw H.wrapException(P.UnimplementedError$("structured clone of RegExp")); + throw A.wrapException(A.UnimplementedError$("structured clone of RegExp")); if (typeof Promise != "undefined" && e instanceof Promise) - return P.convertNativePromiseToDartFuture(e); + return A.promiseToFuture(e, type$.dynamic); proto = Object.getPrototypeOf(e); if (proto === Object.prototype || proto === null) { - slot = this.findSlot$1(e); - t1 = this.copies; - if (slot >= t1.length) - return H.ioore(t1, slot); - copy = t1[slot]; - _box_0.copy = copy; + slot = _this.findSlot$1(e); + t1 = _this.copies; + if (!(slot < t1.length)) + return A.ioore(t1, slot); + copy = _box_0.copy = t1[slot]; if (copy != null) return copy; - copy = P.LinkedHashMap__makeEmpty(); + t2 = type$.dynamic; + copy = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); _box_0.copy = copy; - C.JSArray_methods.$indexSet(t1, slot, copy); - this.forEachJsField$2(e, new P._AcceptStructuredClone_walk_closure(_box_0, this)); + B.JSArray_methods.$indexSet(t1, slot, copy); + _this.forEachJsField$2(e, new A._AcceptStructuredClone_walk_closure(_box_0, _this)); return _box_0.copy; } if (e instanceof Array) { l = e; - slot = this.findSlot$1(l); - t1 = this.copies; - if (slot >= t1.length) - return H.ioore(t1, slot); + slot = _this.findSlot$1(l); + t1 = _this.copies; + if (!(slot < t1.length)) + return A.ioore(t1, slot); copy = t1[slot]; if (copy != null) return copy; t2 = J.getInterceptor$asx(l); $length = t2.get$length(l); - copy = this.mustCopy ? new Array($length) : l; - C.JSArray_methods.$indexSet(t1, slot, copy); + copy = _this.mustCopy ? new Array($length) : l; + B.JSArray_methods.$indexSet(t1, slot, copy); for (t1 = J.getInterceptor$ax(copy), i = 0; i < $length; ++i) - t1.$indexSet(copy, i, this.walk$1(t2.$index(l, i))); + t1.$indexSet(copy, i, _this.walk$1(t2.$index(l, i))); return copy; } return e; }, - convertNativeToDart_AcceptStructuredClone$2$mustCopy: function(object, mustCopy) { + convertNativeToDart_AcceptStructuredClone$2$mustCopy(object, mustCopy) { this.mustCopy = true; return this.walk$1(object); } }; - P._AcceptStructuredClone_walk_closure.prototype = { - call$2: function(key, value) { - var t1, t2; - t1 = this._box_0.copy; - t2 = this.$this.walk$1(value); + A._AcceptStructuredClone_walk_closure.prototype = { + call$2(key, value) { + var t1 = this._box_0.copy, + t2 = this.$this.walk$1(value); J.$indexSet$ax(t1, key, t2); return t2; }, - $signature: 31 + $signature: 33 }; - P._StructuredCloneDart2Js.prototype = {}; - P._AcceptStructuredCloneDart2Js.prototype = { - forEachJsField$2: function(object, action) { + A._StructuredCloneDart2Js.prototype = { + forEachObjectKey$2(object, action) { var t1, t2, _i, key; - H.functionTypeCheck(action, {func: 1, args: [,,]}); - for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) { + type$.dynamic_Function_dynamic_dynamic._as(action); + for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t2; ++_i) { key = t1[_i]; action.call$2(key, object[key]); } } }; - P.convertNativePromiseToDartFuture_closure.prototype = { - call$1: function(result) { - return this.completer.complete$1(0, result); - }, - $signature: 6 + A._AcceptStructuredCloneDart2Js.prototype = { + forEachJsField$2(object, action) { + var t1, t2, _i, key; + type$.dynamic_Function_dynamic_dynamic._as(action); + for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + key = t1[_i]; + action.call$2(key, object[key]); + } + } }; - P.convertNativePromiseToDartFuture_closure0.prototype = { - call$1: function(result) { - return this.completer.completeError$1(result); + A.NullRejectionException.prototype = { + toString$0(_) { + return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; }, - $signature: 6 + $isException: 1 }; - P.SvgElement.prototype = { - get$onClick: function(receiver) { - return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); - } - }; - P.Uint8List.prototype = {$isEfficientLengthIterable: 1, - $asEfficientLengthIterable: function() { - return [P.int]; + A.promiseToFuture_closure.prototype = { + call$1(r) { + return this.completer.complete$1(0, this.T._eval$1("0/?")._as(r)); }, - $isIterable: 1, - $asIterable: function() { - return [P.int]; + $signature: 3 + }; + A.promiseToFuture_closure0.prototype = { + call$1(e) { + if (e == null) + return this.completer.completeError$1(new A.NullRejectionException(e === undefined)); + return this.completer.completeError$1(e); }, - $isList: 1, - $asList: function() { - return [P.int]; + $signature: 3 + }; + A.SvgElement.prototype = { + get$onClick(receiver) { + return new A._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_MouseEvent); } }; - S.NullStreamSink.prototype = { - addStream$1: function(stream) { - var future; - H.assertSubtype(stream, "$isStream", this.$ti, "$asStream"); - this._checkEventAllowed$0(); - this._addingStream = true; - future = stream.listen$1(null).cancel$0(); - if (future == null) { - future = new P._Future(0, $.Zone__current, [null]); - future._asyncComplete$1(null); - } - return future.whenComplete$1(new S.NullStreamSink_addStream_closure(this)); + A.NullStreamSink.prototype = { + addStream$1(stream) { + var _this = this; + _this.$ti._eval$1("Stream<1>")._as(stream); + _this._checkEventAllowed$0(); + _this._addingStream = true; + return stream.listen$1(null).cancel$0().whenComplete$1(new A.NullStreamSink_addStream_closure(_this)); }, - _checkEventAllowed$0: function() { + _checkEventAllowed$0() { if (this._null_stream_sink$_closed) - throw H.wrapException(P.StateError$("Cannot add to a closed sink.")); + throw A.wrapException(A.StateError$("Cannot add to a closed sink.")); if (this._addingStream) - throw H.wrapException(P.StateError$("Cannot add to a sink while adding a stream.")); + throw A.wrapException(A.StateError$("Cannot add to a sink while adding a stream.")); }, - close$0: function(_) { + close$0(_) { this._null_stream_sink$_closed = true; return this.done; }, $isStreamConsumer: 1, $isStreamSink: 1 }; - S.NullStreamSink_addStream_closure.prototype = { - call$0: function() { + A.NullStreamSink_addStream_closure.prototype = { + call$0() { this.$this._addingStream = false; }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 + $signature: 2 }; - M.Context.prototype = { - absolute$7: function(_, part1, part2, part3, part4, part5, part6, part7) { + A.Context.prototype = { + absolute$7(_, part1, part2, part3, part4, part5, part6, part7) { var t1; - M._validateArgList("absolute", H.setRuntimeTypeInfo([part1, part2, part3, part4, part5, part6, part7], [P.String])); + A._validateArgList("absolute", A._setArrayType([part1, part2, part3, part4, part5, part6, part7], type$.JSArray_nullable_String)); t1 = this.style; t1 = t1.rootLength$1(part1) > 0 && !t1.isRootRelative$1(part1); if (t1) return part1; t1 = this._context$_current; - return this.join$8(0, t1 != null ? t1 : D.current(), part1, part2, part3, part4, part5, part6, part7); + return this.join$8(0, t1 == null ? A.current() : t1, part1, part2, part3, part4, part5, part6, part7); }, - absolute$1: function($receiver, part1) { + absolute$1($receiver, part1) { return this.absolute$7($receiver, part1, null, null, null, null, null, null); }, - join$8: function(_, part1, part2, part3, part4, part5, part6, part7, part8) { - var parts, t1; - parts = H.setRuntimeTypeInfo([part1, part2, part3, part4, part5, part6, part7, part8], [P.String]); - M._validateArgList("join", parts); - t1 = H.getTypeArgumentByIndex(parts, 0); - return this.joinAll$1(new H.WhereIterable(parts, H.functionTypeCheck(new M.Context_join_closure(), {func: 1, ret: P.bool, args: [t1]}), [t1])); + join$8(_, part1, part2, part3, part4, part5, part6, part7, part8) { + var parts = A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8], type$.JSArray_nullable_String); + A._validateArgList("join", parts); + return this.joinAll$1(new A.WhereTypeIterable(parts, type$.WhereTypeIterable_String)); }, - join$2: function($receiver, part1, part2) { + join$2($receiver, part1, part2) { return this.join$8($receiver, part1, part2, null, null, null, null, null, null); }, - joinAll$1: function(parts) { - var t1, t2, t3, needsSeparator, isAbsoluteAndNotRootRelative, t4, t5, parsed, path; - H.assertSubtype(parts, "$isIterable", [P.String], "$asIterable"); - for (t1 = H.getTypeArgumentByIndex(parts, 0), t2 = H.functionTypeCheck(new M.Context_joinAll_closure(), {func: 1, ret: P.bool, args: [t1]}), t3 = parts.get$iterator(parts), t1 = new H.WhereIterator(t3, t2, [t1]), t2 = this.style, needsSeparator = false, isAbsoluteAndNotRootRelative = false, t4 = ""; t1.moveNext$0();) { + joinAll$1(parts) { + var t1, t2, t3, needsSeparator, isAbsoluteAndNotRootRelative, t4, t5, parsed, path, t6; + type$.Iterable_String._as(parts); + for (t1 = parts.$ti, t2 = t1._eval$1("bool(Iterable.E)")._as(new A.Context_joinAll_closure()), t3 = parts.get$iterator(parts), t1 = new A.WhereIterator(t3, t2, t1._eval$1("WhereIterator")), t2 = this.style, needsSeparator = false, isAbsoluteAndNotRootRelative = false, t4 = ""; t1.moveNext$0();) { t5 = t3.get$current(); if (t2.isRootRelative$1(t5) && isAbsoluteAndNotRootRelative) { - parsed = X.ParsedPath_ParsedPath$parse(t5, t2); + parsed = A.ParsedPath_ParsedPath$parse(t5, t2); path = t4.charCodeAt(0) == 0 ? t4 : t4; - t4 = C.JSString_methods.substring$2(path, 0, t2.rootLength$2$withDrive(path, true)); + t4 = B.JSString_methods.substring$2(path, 0, t2.rootLength$2$withDrive(path, true)); parsed.root = t4; if (t2.needsSeparator$1(t4)) - C.JSArray_methods.$indexSet(parsed.separators, 0, t2.get$separator()); - t4 = parsed.toString$0(0); + B.JSArray_methods.$indexSet(parsed.separators, 0, t2.get$separator()); + t4 = "" + parsed.toString$0(0); } else if (t2.rootLength$1(t5) > 0) { isAbsoluteAndNotRootRelative = !t2.isRootRelative$1(t5); - t4 = H.S(t5); + t4 = "" + t5; } else { - if (!(t5.length > 0 && t2.containsSeparator$1(t5[0]))) + t6 = t5.length; + if (t6 !== 0) { + if (0 >= t6) + return A.ioore(t5, 0); + t6 = t2.containsSeparator$1(t5[0]); + } else + t6 = false; + if (!t6) if (needsSeparator) t4 += t2.get$separator(); - t4 += H.S(t5); + t4 += t5; } needsSeparator = t2.needsSeparator$1(t5); } return t4.charCodeAt(0) == 0 ? t4 : t4; }, - split$1: function(_, path) { - var parsed, t1, t2; - parsed = X.ParsedPath_ParsedPath$parse(path, this.style); - t1 = parsed.parts; - t2 = H.getTypeArgumentByIndex(t1, 0); - parsed.set$parts(P.List_List$from(new H.WhereIterable(t1, H.functionTypeCheck(new M.Context_split_closure(), {func: 1, ret: P.bool, args: [t2]}), [t2]), true, t2)); + split$1(_, path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this.style), + t1 = parsed.parts, + t2 = A._arrayInstanceType(t1), + t3 = t2._eval$1("WhereIterable<1>"); + parsed.set$parts(A.List_List$of(new A.WhereIterable(t1, t2._eval$1("bool(1)")._as(new A.Context_split_closure()), t3), true, t3._eval$1("Iterable.E"))); t1 = parsed.root; if (t1 != null) - C.JSArray_methods.insert$2(parsed.parts, 0, t1); + B.JSArray_methods.insert$2(parsed.parts, 0, t1); return parsed.parts; }, - normalize$1: function(path) { + normalize$1(path) { var parsed; if (!this._needsNormalization$1(path)) return path; - parsed = X.ParsedPath_ParsedPath$parse(path, this.style); + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); parsed.normalize$0(); return parsed.toString$0(0); }, - _needsNormalization$1: function(path) { - var t1, root, t2, i, start, previous, t3, previousPrevious, codeUnit, t4; - path.toString; - t1 = this.style; - root = t1.rootLength$1(path); + _needsNormalization$1(path) { + var i, start, previous, t2, t3, previousPrevious, codeUnit, t4, + t1 = this.style, + root = t1.rootLength$1(path); if (root !== 0) { if (t1 === $.$get$Style_windows()) - for (t2 = J.getInterceptor$s(path), i = 0; i < root; ++i) - if (t2._codeUnitAt$1(path, i) === 47) + for (i = 0; i < root; ++i) + if (B.JSString_methods._codeUnitAt$1(path, i) === 47) return true; start = root; previous = 47; @@ -13057,8 +13744,8 @@ start = 0; previous = null; } - for (t2 = new H.CodeUnits(path)._string, t3 = t2.length, i = start, previousPrevious = null; i < t3; ++i, previousPrevious = previous, previous = codeUnit) { - codeUnit = C.JSString_methods.codeUnitAt$1(t2, i); + for (t2 = new A.CodeUnits(path)._string, t3 = t2.length, i = start, previousPrevious = null; i < t3; ++i, previousPrevious = previous, previous = codeUnit) { + codeUnit = B.JSString_methods.codeUnitAt$1(t2, i); if (t1.isSeparator$1(codeUnit)) { if (t1 === $.$get$Style_windows() && codeUnit === 47) return true; @@ -13084,26 +13771,34 @@ return true; return false; }, - relative$1: function(path) { - var t1, t2, from, fromParsed, pathParsed, t3; - t1 = this.style; - t2 = t1.rootLength$1(path); + relative$1(path) { + var from, fromParsed, pathParsed, t3, t4, t5, _this = this, + _s26_ = 'Unable to find a path to "', + t1 = _this.style, + t2 = t1.rootLength$1(path); if (t2 <= 0) - return this.normalize$1(path); - t2 = this._context$_current; - from = t2 != null ? t2 : D.current(); + return _this.normalize$1(path); + t2 = _this._context$_current; + from = t2 == null ? A.current() : t2; if (t1.rootLength$1(from) <= 0 && t1.rootLength$1(path) > 0) - return this.normalize$1(path); + return _this.normalize$1(path); if (t1.rootLength$1(path) <= 0 || t1.isRootRelative$1(path)) - path = this.absolute$1(0, path); + path = _this.absolute$1(0, path); if (t1.rootLength$1(path) <= 0 && t1.rootLength$1(from) > 0) - throw H.wrapException(X.PathException$('Unable to find a path to "' + H.S(path) + '" from "' + H.S(from) + '".')); - fromParsed = X.ParsedPath_ParsedPath$parse(from, t1); + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + fromParsed = A.ParsedPath_ParsedPath$parse(from, t1); fromParsed.normalize$0(); - pathParsed = X.ParsedPath_ParsedPath$parse(path, t1); + pathParsed = A.ParsedPath_ParsedPath$parse(path, t1); pathParsed.normalize$0(); t2 = fromParsed.parts; - if (t2.length > 0 && J.$eq$(t2[0], ".")) + t3 = t2.length; + if (t3 !== 0) { + if (0 >= t3) + return A.ioore(t2, 0); + t2 = J.$eq$(t2[0], "."); + } else + t2 = false; + if (t2) return pathParsed.toString$0(0); t2 = fromParsed.root; t3 = pathParsed.root; @@ -13115,290 +13810,310 @@ return pathParsed.toString$0(0); while (true) { t2 = fromParsed.parts; - if (t2.length > 0) { - t3 = pathParsed.parts; - t2 = t3.length > 0 && t1.pathsEqual$2(t2[0], t3[0]); + t3 = t2.length; + if (t3 !== 0) { + t4 = pathParsed.parts; + t5 = t4.length; + if (t5 !== 0) { + if (0 >= t3) + return A.ioore(t2, 0); + t2 = t2[0]; + if (0 >= t5) + return A.ioore(t4, 0); + t4 = t1.pathsEqual$2(t2, t4[0]); + t2 = t4; + } else + t2 = false; } else t2 = false; if (!t2) break; - C.JSArray_methods.removeAt$1(fromParsed.parts, 0); - C.JSArray_methods.removeAt$1(fromParsed.separators, 1); - C.JSArray_methods.removeAt$1(pathParsed.parts, 0); - C.JSArray_methods.removeAt$1(pathParsed.separators, 1); + B.JSArray_methods.removeAt$1(fromParsed.parts, 0); + B.JSArray_methods.removeAt$1(fromParsed.separators, 1); + B.JSArray_methods.removeAt$1(pathParsed.parts, 0); + B.JSArray_methods.removeAt$1(pathParsed.separators, 1); } t2 = fromParsed.parts; - if (t2.length > 0 && J.$eq$(t2[0], "..")) - throw H.wrapException(X.PathException$('Unable to find a path to "' + H.S(path) + '" from "' + H.S(from) + '".')); - t2 = P.String; - C.JSArray_methods.insertAll$2(pathParsed.parts, 0, P.List_List$filled(fromParsed.parts.length, "..", t2)); - C.JSArray_methods.$indexSet(pathParsed.separators, 0, ""); - C.JSArray_methods.insertAll$2(pathParsed.separators, 1, P.List_List$filled(fromParsed.parts.length, t1.get$separator(), t2)); + t3 = t2.length; + if (t3 !== 0) { + if (0 >= t3) + return A.ioore(t2, 0); + t2 = J.$eq$(t2[0], ".."); + } else + t2 = false; + if (t2) + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + t2 = type$.String; + B.JSArray_methods.insertAll$2(pathParsed.parts, 0, A.List_List$filled(fromParsed.parts.length, "..", false, t2)); + B.JSArray_methods.$indexSet(pathParsed.separators, 0, ""); + B.JSArray_methods.insertAll$2(pathParsed.separators, 1, A.List_List$filled(fromParsed.parts.length, t1.get$separator(), false, t2)); t1 = pathParsed.parts; t2 = t1.length; if (t2 === 0) return "."; - if (t2 > 1 && J.$eq$(C.JSArray_methods.get$last(t1), ".")) { - C.JSArray_methods.removeLast$0(pathParsed.parts); + if (t2 > 1 && J.$eq$(B.JSArray_methods.get$last(t1), ".")) { + B.JSArray_methods.removeLast$0(pathParsed.parts); t1 = pathParsed.separators; - C.JSArray_methods.removeLast$0(t1); - C.JSArray_methods.removeLast$0(t1); - C.JSArray_methods.add$1(t1, ""); + if (0 >= t1.length) + return A.ioore(t1, -1); + t1.pop(); + if (0 >= t1.length) + return A.ioore(t1, -1); + t1.pop(); + B.JSArray_methods.add$1(t1, ""); } pathParsed.root = ""; pathParsed.removeTrailingSeparators$0(); return pathParsed.toString$0(0); }, - toUri$1: function(path) { - var t1, t2; - t1 = this.style; + toUri$1(path) { + var t2, + t1 = this.style; if (t1.rootLength$1(path) <= 0) return t1.relativePathToUri$1(path); else { t2 = this._context$_current; - return t1.absolutePathToUri$1(this.join$2(0, t2 != null ? t2 : D.current(), path)); + return t1.absolutePathToUri$1(this.join$2(0, t2 == null ? A.current() : t2, path)); } }, - prettyUri$1: function(uri) { - var typedUri, path, rel; - typedUri = M._parseUri(uri); - if (typedUri.get$scheme() === "file" && this.style == $.$get$Style_url()) + prettyUri$1(uri) { + var path, rel, _this = this, + typedUri = A._parseUri(uri); + if (typedUri.get$scheme() === "file" && _this.style === $.$get$Style_url()) return typedUri.toString$0(0); - else if (typedUri.get$scheme() !== "file" && typedUri.get$scheme() !== "" && this.style != $.$get$Style_url()) + else if (typedUri.get$scheme() !== "file" && typedUri.get$scheme() !== "" && _this.style !== $.$get$Style_url()) return typedUri.toString$0(0); - path = this.normalize$1(this.style.pathFromUri$1(M._parseUri(typedUri))); - rel = this.relative$1(path); - return this.split$1(0, rel).length > this.split$1(0, path).length ? path : rel; + path = _this.normalize$1(_this.style.pathFromUri$1(A._parseUri(typedUri))); + rel = _this.relative$1(path); + return _this.split$1(0, rel).length > _this.split$1(0, path).length ? path : rel; } }; - M.Context_join_closure.prototype = { - call$1: function(part) { - return H.stringTypeCheck(part) != null; - }, - $signature: 2 - }; - M.Context_joinAll_closure.prototype = { - call$1: function(part) { - return H.stringTypeCheck(part) !== ""; + A.Context_joinAll_closure.prototype = { + call$1(part) { + return A._asString(part) !== ""; }, - $signature: 2 + $signature: 1 }; - M.Context_split_closure.prototype = { - call$1: function(part) { - return H.stringTypeCheck(part).length !== 0; + A.Context_split_closure.prototype = { + call$1(part) { + return A._asString(part).length !== 0; }, - $signature: 2 + $signature: 1 }; - M._validateArgList_closure.prototype = { - call$1: function(arg) { - H.stringTypeCheck(arg); + A._validateArgList_closure.prototype = { + call$1(arg) { + A._asStringQ(arg); return arg == null ? "null" : '"' + arg + '"'; }, - $signature: 14 + $signature: 35 }; - B.InternalStyle.prototype = { - getRoot$1: function(path) { - var $length, t1; - $length = this.rootLength$1(path); + A.InternalStyle.prototype = { + getRoot$1(path) { + var t1, + $length = this.rootLength$1(path); if ($length > 0) - return J.substring$2$s(path, 0, $length); + return B.JSString_methods.substring$2(path, 0, $length); if (this.isRootRelative$1(path)) { if (0 >= path.length) - return H.ioore(path, 0); + return A.ioore(path, 0); t1 = path[0]; } else t1 = null; return t1; }, - relativePathToUri$1: function(path) { - var segments = M.Context_Context(this).split$1(0, path); - if (this.isSeparator$1(J.codeUnitAt$1$s(path, path.length - 1))) - C.JSArray_methods.add$1(segments, ""); - return P._Uri__Uri(null, null, segments, null); + relativePathToUri$1(path) { + var segments, _null = null, + t1 = path.length; + if (t1 === 0) + return A._Uri__Uri(_null, _null, _null, _null); + segments = A.Context_Context(this).split$1(0, path); + if (this.isSeparator$1(B.JSString_methods.codeUnitAt$1(path, t1 - 1))) + B.JSArray_methods.add$1(segments, ""); + return A._Uri__Uri(_null, _null, segments, _null); }, - pathsEqual$2: function(path1, path2) { - return path1 == path2; + pathsEqual$2(path1, path2) { + return path1 === path2; } }; - X.ParsedPath.prototype = { - get$hasTrailingSeparator: function() { + A.ParsedPath.prototype = { + get$hasTrailingSeparator() { var t1 = this.parts; if (t1.length !== 0) - t1 = J.$eq$(C.JSArray_methods.get$last(t1), "") || !J.$eq$(C.JSArray_methods.get$last(this.separators), ""); + t1 = J.$eq$(B.JSArray_methods.get$last(t1), "") || !J.$eq$(B.JSArray_methods.get$last(this.separators), ""); else t1 = false; return t1; }, - removeTrailingSeparators$0: function() { - var t1, t2; + removeTrailingSeparators$0() { + var t1, t2, _this = this; while (true) { - t1 = this.parts; - if (!(t1.length !== 0 && J.$eq$(C.JSArray_methods.get$last(t1), ""))) + t1 = _this.parts; + if (!(t1.length !== 0 && J.$eq$(B.JSArray_methods.get$last(t1), ""))) break; - C.JSArray_methods.removeLast$0(this.parts); - C.JSArray_methods.removeLast$0(this.separators); + B.JSArray_methods.removeLast$0(_this.parts); + t1 = _this.separators; + if (0 >= t1.length) + return A.ioore(t1, -1); + t1.pop(); } - t1 = this.separators; + t1 = _this.separators; t2 = t1.length; - if (t2 > 0) - C.JSArray_methods.$indexSet(t1, t2 - 1, ""); - }, - normalize$0: function() { - var t1, newParts, t2, t3, leadingDoubles, _i, part, t4, newSeparators; - t1 = P.String; - newParts = H.setRuntimeTypeInfo([], [t1]); - for (t2 = this.parts, t3 = t2.length, leadingDoubles = 0, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) { - part = t2[_i]; - t4 = J.getInterceptor$(part); - if (!(t4.$eq(part, ".") || t4.$eq(part, ""))) - if (t4.$eq(part, "..")) - if (newParts.length > 0) + if (t2 !== 0) + B.JSArray_methods.$indexSet(t1, t2 - 1, ""); + }, + normalize$0() { + var t1, t2, leadingDoubles, _i, part, t3, _this = this, + newParts = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.parts, t2 = t1.length, leadingDoubles = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + part = t1[_i]; + t3 = J.getInterceptor$(part); + if (!(t3.$eq(part, ".") || t3.$eq(part, ""))) + if (t3.$eq(part, "..")) { + t3 = newParts.length; + if (t3 !== 0) { + if (0 >= t3) + return A.ioore(newParts, -1); newParts.pop(); - else + } else ++leadingDoubles; - else - C.JSArray_methods.add$1(newParts, part); - } - if (this.root == null) - C.JSArray_methods.insertAll$2(newParts, 0, P.List_List$filled(leadingDoubles, "..", t1)); - if (newParts.length === 0 && this.root == null) - C.JSArray_methods.add$1(newParts, "."); - newSeparators = P.List_List$generate(newParts.length, new X.ParsedPath_normalize_closure(this), true, t1); - t1 = this.root; - C.JSArray_methods.insert$2(newSeparators, 0, t1 != null && newParts.length > 0 && this.style.needsSeparator$1(t1) ? this.style.get$separator() : ""); - this.set$parts(newParts); - this.set$separators(newSeparators); - t1 = this.root; - if (t1 != null && this.style == $.$get$Style_windows()) { - t1.toString; - this.root = H.stringReplaceAllUnchecked(t1, "/", "\\"); - } - this.removeTrailingSeparators$0(); - }, - toString$0: function(_) { - var t1, i, t2; - t1 = this.root; - t1 = t1 != null ? t1 : ""; - for (i = 0; i < this.parts.length; ++i) { - t2 = this.separators; - if (i >= t2.length) - return H.ioore(t2, i); - t2 = t1 + H.S(t2[i]); - t1 = this.parts; - if (i >= t1.length) - return H.ioore(t1, i); - t1 = t2 + H.S(t1[i]); - } - t1 += H.S(C.JSArray_methods.get$last(this.separators)); + } else + B.JSArray_methods.add$1(newParts, part); + } + if (_this.root == null) + B.JSArray_methods.insertAll$2(newParts, 0, A.List_List$filled(leadingDoubles, "..", false, type$.String)); + if (newParts.length === 0 && _this.root == null) + B.JSArray_methods.add$1(newParts, "."); + _this.set$parts(newParts); + t1 = _this.style; + _this.set$separators(A.List_List$filled(newParts.length + 1, t1.get$separator(), true, type$.String)); + t2 = _this.root; + if (t2 == null || newParts.length === 0 || !t1.needsSeparator$1(t2)) + B.JSArray_methods.$indexSet(_this.separators, 0, ""); + t2 = _this.root; + if (t2 != null && t1 === $.$get$Style_windows()) { + t2.toString; + _this.root = A.stringReplaceAllUnchecked(t2, "/", "\\"); + } + _this.removeTrailingSeparators$0(); + }, + toString$0(_) { + var i, t2, t3, _this = this, + t1 = _this.root; + t1 = t1 != null ? "" + t1 : ""; + for (i = 0; i < _this.parts.length; ++i, t1 = t3) { + t2 = _this.separators; + if (!(i < t2.length)) + return A.ioore(t2, i); + t2 = A.S(t2[i]); + t3 = _this.parts; + if (!(i < t3.length)) + return A.ioore(t3, i); + t3 = t1 + t2 + A.S(t3[i]); + } + t1 += A.S(B.JSArray_methods.get$last(_this.separators)); return t1.charCodeAt(0) == 0 ? t1 : t1; }, - set$parts: function(parts) { - this.parts = H.assertSubtype(parts, "$isList", [P.String], "$asList"); + set$parts(parts) { + this.parts = type$.List_String._as(parts); }, - set$separators: function(separators) { - this.separators = H.assertSubtype(separators, "$isList", [P.String], "$asList"); + set$separators(separators) { + this.separators = type$.List_String._as(separators); } }; - X.ParsedPath_normalize_closure.prototype = { - call$1: function(_) { - return this.$this.style.get$separator(); - }, - $signature: 12 - }; - X.PathException.prototype = { - toString$0: function(_) { + A.PathException.prototype = { + toString$0(_) { return "PathException: " + this.message; - } + }, + $isException: 1 }; - O.Style.prototype = { - toString$0: function(_) { + A.Style.prototype = { + toString$0(_) { return this.get$name(this); } }; - E.PosixStyle.prototype = { - containsSeparator$1: function(path) { - return C.JSString_methods.contains$1(path, "/"); + A.PosixStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); }, - isSeparator$1: function(codeUnit) { + isSeparator$1(codeUnit) { return codeUnit === 47; }, - needsSeparator$1: function(path) { + needsSeparator$1(path) { var t1 = path.length; - return t1 !== 0 && J.codeUnitAt$1$s(path, t1 - 1) !== 47; + return t1 !== 0 && B.JSString_methods.codeUnitAt$1(path, t1 - 1) !== 47; }, - rootLength$2$withDrive: function(path, withDrive) { - if (path.length !== 0 && J._codeUnitAt$1$s(path, 0) === 47) + rootLength$2$withDrive(path, withDrive) { + if (path.length !== 0 && B.JSString_methods._codeUnitAt$1(path, 0) === 47) return 1; return 0; }, - rootLength$1: function(path) { + rootLength$1(path) { return this.rootLength$2$withDrive(path, false); }, - isRootRelative$1: function(path) { + isRootRelative$1(path) { return false; }, - pathFromUri$1: function(uri) { + pathFromUri$1(uri) { var t1; if (uri.get$scheme() === "" || uri.get$scheme() === "file") { t1 = uri.get$path(uri); - return P._Uri__uriDecode(t1, 0, t1.length, C.Utf8Codec_false, false); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); } - throw H.wrapException(P.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.")); + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); }, - absolutePathToUri$1: function(path) { - var parsed, t1; - parsed = X.ParsedPath_ParsedPath$parse(path, this); - t1 = parsed.parts; + absolutePathToUri$1(path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.parts; if (t1.length === 0) - C.JSArray_methods.addAll$1(t1, H.setRuntimeTypeInfo(["", ""], [P.String])); + B.JSArray_methods.addAll$1(t1, A._setArrayType(["", ""], type$.JSArray_String)); else if (parsed.get$hasTrailingSeparator()) - C.JSArray_methods.add$1(parsed.parts, ""); - return P._Uri__Uri(null, null, parsed.parts, "file"); + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(null, null, parsed.parts, "file"); }, - get$name: function(receiver) { - return this.name; + get$name() { + return "posix"; }, - get$separator: function() { - return this.separator; + get$separator() { + return "/"; } }; - F.UrlStyle.prototype = { - containsSeparator$1: function(path) { - return C.JSString_methods.contains$1(path, "/"); + A.UrlStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); }, - isSeparator$1: function(codeUnit) { + isSeparator$1(codeUnit) { return codeUnit === 47; }, - needsSeparator$1: function(path) { + needsSeparator$1(path) { var t1 = path.length; if (t1 === 0) return false; - if (J.getInterceptor$s(path).codeUnitAt$1(path, t1 - 1) !== 47) + if (B.JSString_methods.codeUnitAt$1(path, t1 - 1) !== 47) return true; - return C.JSString_methods.endsWith$1(path, "://") && this.rootLength$1(path) === t1; + return B.JSString_methods.endsWith$1(path, "://") && this.rootLength$1(path) === t1; }, - rootLength$2$withDrive: function(path, withDrive) { - var t1, i, codeUnit, index, t2; - t1 = path.length; + rootLength$2$withDrive(path, withDrive) { + var i, codeUnit, index, t2, + t1 = path.length; if (t1 === 0) return 0; - if (J.getInterceptor$s(path)._codeUnitAt$1(path, 0) === 47) + if (B.JSString_methods._codeUnitAt$1(path, 0) === 47) return 1; for (i = 0; i < t1; ++i) { - codeUnit = C.JSString_methods._codeUnitAt$1(path, i); + codeUnit = B.JSString_methods._codeUnitAt$1(path, i); if (codeUnit === 47) return 0; if (codeUnit === 58) { if (i === 0) return 0; - index = C.JSString_methods.indexOf$2(path, "/", C.JSString_methods.startsWith$2(path, "//", i + 1) ? i + 3 : i); + index = B.JSString_methods.indexOf$2(path, "/", B.JSString_methods.startsWith$2(path, "//", i + 1) ? i + 3 : i); if (index <= 0) return t1; if (!withDrive || t1 < index + 3) return index; - if (!C.JSString_methods.startsWith$1(path, "file://")) + if (!B.JSString_methods.startsWith$1(path, "file://")) return index; - if (!B.isDriveLetter(path, index + 1)) + if (!A.isDriveLetter(path, index + 1)) return index; t2 = index + 3; return t1 === t2 ? t2 : index + 4; @@ -13406,56 +14121,56 @@ } return 0; }, - rootLength$1: function(path) { + rootLength$1(path) { return this.rootLength$2$withDrive(path, false); }, - isRootRelative$1: function(path) { - return path.length !== 0 && J._codeUnitAt$1$s(path, 0) === 47; + isRootRelative$1(path) { + return path.length !== 0 && B.JSString_methods._codeUnitAt$1(path, 0) === 47; }, - pathFromUri$1: function(uri) { - return J.toString$0$(uri); + pathFromUri$1(uri) { + return uri.toString$0(0); }, - relativePathToUri$1: function(path) { - return P.Uri_parse(path); + relativePathToUri$1(path) { + return A.Uri_parse(path); }, - absolutePathToUri$1: function(path) { - return P.Uri_parse(path); + absolutePathToUri$1(path) { + return A.Uri_parse(path); }, - get$name: function(receiver) { - return this.name; + get$name() { + return "url"; }, - get$separator: function() { - return this.separator; + get$separator() { + return "/"; } }; - L.WindowsStyle.prototype = { - containsSeparator$1: function(path) { - return C.JSString_methods.contains$1(path, "/"); + A.WindowsStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); }, - isSeparator$1: function(codeUnit) { + isSeparator$1(codeUnit) { return codeUnit === 47 || codeUnit === 92; }, - needsSeparator$1: function(path) { + needsSeparator$1(path) { var t1 = path.length; if (t1 === 0) return false; - t1 = J.codeUnitAt$1$s(path, t1 - 1); + t1 = B.JSString_methods.codeUnitAt$1(path, t1 - 1); return !(t1 === 47 || t1 === 92); }, - rootLength$2$withDrive: function(path, withDrive) { - var t1, t2, index; - t1 = path.length; + rootLength$2$withDrive(path, withDrive) { + var t2, index, + t1 = path.length; if (t1 === 0) return 0; - t2 = J.getInterceptor$s(path)._codeUnitAt$1(path, 0); + t2 = B.JSString_methods._codeUnitAt$1(path, 0); if (t2 === 47) return 1; if (t2 === 92) { - if (t1 < 2 || C.JSString_methods._codeUnitAt$1(path, 1) !== 92) + if (t1 < 2 || B.JSString_methods._codeUnitAt$1(path, 1) !== 92) return 1; - index = C.JSString_methods.indexOf$2(path, "\\", 2); + index = B.JSString_methods.indexOf$2(path, "\\", 2); if (index > 0) { - index = C.JSString_methods.indexOf$2(path, "\\", index + 1); + index = B.JSString_methods.indexOf$2(path, "\\", index + 1); if (index > 0) return index; } @@ -13463,59 +14178,57 @@ } if (t1 < 3) return 0; - if (!B.isAlphabetic(t2)) + if (!A.isAlphabetic(t2)) return 0; - if (C.JSString_methods._codeUnitAt$1(path, 1) !== 58) + if (B.JSString_methods._codeUnitAt$1(path, 1) !== 58) return 0; - t1 = C.JSString_methods._codeUnitAt$1(path, 2); + t1 = B.JSString_methods._codeUnitAt$1(path, 2); if (!(t1 === 47 || t1 === 92)) return 0; return 3; }, - rootLength$1: function(path) { + rootLength$1(path) { return this.rootLength$2$withDrive(path, false); }, - isRootRelative$1: function(path) { + isRootRelative$1(path) { return this.rootLength$1(path) === 1; }, - pathFromUri$1: function(uri) { + pathFromUri$1(uri) { var path, t1; if (uri.get$scheme() !== "" && uri.get$scheme() !== "file") - throw H.wrapException(P.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.")); + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); path = uri.get$path(uri); if (uri.get$host(uri) === "") { - if (path.length >= 3 && J.startsWith$1$s(path, "/") && B.isDriveLetter(path, 1)) - path = J.replaceFirst$2$s(path, "/", ""); + if (path.length >= 3 && B.JSString_methods.startsWith$1(path, "/") && A.isDriveLetter(path, 1)) + path = B.JSString_methods.replaceFirst$2(path, "/", ""); } else - path = "\\\\" + H.S(uri.get$host(uri)) + H.S(path); - path.toString; - t1 = H.stringReplaceAllUnchecked(path, "/", "\\"); - return P._Uri__uriDecode(t1, 0, t1.length, C.Utf8Codec_false, false); - }, - absolutePathToUri$1: function(path) { - var parsed, t1, t2, rootParts; - parsed = X.ParsedPath_ParsedPath$parse(path, this); - t1 = parsed.root; - if (J.startsWith$1$s(t1, "\\\\")) { - t1 = H.setRuntimeTypeInfo(t1.split("\\"), [P.String]); - t2 = H.getTypeArgumentByIndex(t1, 0); - rootParts = new H.WhereIterable(t1, H.functionTypeCheck(new L.WindowsStyle_absolutePathToUri_closure(), {func: 1, ret: P.bool, args: [t2]}), [t2]); - C.JSArray_methods.insert$2(parsed.parts, 0, rootParts.get$last(rootParts)); + path = "\\\\" + uri.get$host(uri) + path; + t1 = A.stringReplaceAllUnchecked(path, "/", "\\"); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); + }, + absolutePathToUri$1(path) { + var rootParts, t2, + parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.root; + t1.toString; + if (B.JSString_methods.startsWith$1(t1, "\\\\")) { + rootParts = new A.WhereIterable(A._setArrayType(t1.split("\\"), type$.JSArray_String), type$.bool_Function_String._as(new A.WindowsStyle_absolutePathToUri_closure()), type$.WhereIterable_String); + B.JSArray_methods.insert$2(parsed.parts, 0, rootParts.get$last(rootParts)); if (parsed.get$hasTrailingSeparator()) - C.JSArray_methods.add$1(parsed.parts, ""); - return P._Uri__Uri(rootParts.get$first(rootParts), null, parsed.parts, "file"); + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(rootParts.get$first(rootParts), null, parsed.parts, "file"); } else { if (parsed.parts.length === 0 || parsed.get$hasTrailingSeparator()) - C.JSArray_methods.add$1(parsed.parts, ""); + B.JSArray_methods.add$1(parsed.parts, ""); t1 = parsed.parts; t2 = parsed.root; t2.toString; - t2 = H.stringReplaceAllUnchecked(t2, "/", ""); - C.JSArray_methods.insert$2(t1, 0, H.stringReplaceAllUnchecked(t2, "\\", "")); - return P._Uri__Uri(null, null, parsed.parts, "file"); + t2 = A.stringReplaceAllUnchecked(t2, "/", ""); + B.JSArray_methods.insert$2(t1, 0, A.stringReplaceAllUnchecked(t2, "\\", "")); + return A._Uri__Uri(null, null, parsed.parts, "file"); } }, - codeUnitsEqual$2: function(codeUnit1, codeUnit2) { + codeUnitsEqual$2(codeUnit1, codeUnit2) { var upperCase1; if (codeUnit1 === codeUnit2) return true; @@ -13528,1163 +14241,1386 @@ upperCase1 = codeUnit1 | 32; return upperCase1 >= 97 && upperCase1 <= 122; }, - pathsEqual$2: function(path1, path2) { - var t1, t2, i; - if (path1 == path2) + pathsEqual$2(path1, path2) { + var t1, i; + if (path1 === path2) return true; t1 = path1.length; if (t1 !== path2.length) return false; - for (t2 = J.getInterceptor$s(path2), i = 0; i < t1; ++i) - if (!this.codeUnitsEqual$2(C.JSString_methods._codeUnitAt$1(path1, i), t2._codeUnitAt$1(path2, i))) + for (i = 0; i < t1; ++i) + if (!this.codeUnitsEqual$2(B.JSString_methods._codeUnitAt$1(path1, i), B.JSString_methods._codeUnitAt$1(path2, i))) return false; return true; }, - get$name: function(receiver) { - return this.name; + get$name() { + return "windows"; }, - get$separator: function() { - return this.separator; + get$separator() { + return "\\"; } }; - L.WindowsStyle_absolutePathToUri_closure.prototype = { - call$1: function(part) { - return H.stringTypeCheck(part) !== ""; + A.WindowsStyle_absolutePathToUri_closure.prototype = { + call$1(part) { + return A._asString(part) !== ""; }, - $signature: 2 + $signature: 1 }; - U.Chain.prototype = { - toTrace$0: function() { - var t1, t2, t3; - t1 = this.traces; - t2 = A.Frame; - t3 = H.getTypeArgumentByIndex(t1, 0); - return new Y.Trace(P.List_List$unmodifiable(new H.ExpandIterable(t1, H.functionTypeCheck(new U.Chain_toTrace_closure(), {func: 1, ret: [P.Iterable, t2], args: [t3]}), [t3, t2]), t2), new P._StringStackTrace(null)); - }, - toString$0: function(_) { - var t1, t2, t3, t4; - t1 = this.traces; - t2 = P.int; - t3 = H.getTypeArgumentByIndex(t1, 0); - t4 = P.String; - return new H.MappedListIterable(t1, H.functionTypeCheck(new U.Chain_toString_closure(new H.MappedListIterable(t1, H.functionTypeCheck(new U.Chain_toString_closure0(), {func: 1, ret: t2, args: [t3]}), [t3, t2]).fold$1$2(0, 0, H.instantiate1(P.math__max$closure(), t2), t2)), {func: 1, ret: t4, args: [t3]}), [t3, t4]).join$1(0, "===== asynchronous gap ===========================\n"); + A.Chain.prototype = { + toTrace$0() { + var t1 = this.traces, + t2 = A._arrayInstanceType(t1); + return A.Trace$(new A.ExpandIterable(t1, t2._eval$1("Iterable(1)")._as(new A.Chain_toTrace_closure()), t2._eval$1("ExpandIterable<1,Frame>")), null); + }, + toString$0(_) { + var t1 = this.traces, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, t2._eval$1("String(1)")._as(new A.Chain_toString_closure(new A.MappedListIterable(t1, t2._eval$1("int(1)")._as(new A.Chain_toString_closure0()), t2._eval$1("MappedListIterable<1,int>")).fold$1$2(0, 0, B.CONSTANT, type$.int))), t2._eval$1("MappedListIterable<1,String>")).join$1(0, string$.______); }, $isStackTrace: 1 }; - U.Chain_Chain$parse_closure.prototype = { - call$1: function(trace) { - H.stringTypeCheck(trace); - return new Y.Trace(P.List_List$unmodifiable(Y.Trace__parseVM(trace), A.Frame), new P._StringStackTrace(trace)); + A.Chain_Chain$parse_closure.prototype = { + call$1(line) { + return A._asString(line).length !== 0; }, - $signature: 19 + $signature: 1 }; - U.Chain_Chain$parse_closure0.prototype = { - call$1: function(trace) { - return Y.Trace$parseFriendly(H.stringTypeCheck(trace)); + A.Chain_Chain$parse_closure0.prototype = { + call$1(trace) { + return A.Trace$parseVM(A._asString(trace)); }, - $signature: 19 + $signature: 17 }; - U.Chain_toTrace_closure.prototype = { - call$1: function(trace) { - return H.interceptedTypeCheck(trace, "$isTrace").get$frames(); + A.Chain_Chain$parse_closure1.prototype = { + call$1(trace) { + return A.Trace$parseFriendly(A._asString(trace)); }, - $signature: 34 + $signature: 17 }; - U.Chain_toString_closure0.prototype = { - call$1: function(trace) { - var t1, t2, t3; - t1 = H.interceptedTypeCheck(trace, "$isTrace").get$frames(); - t2 = P.int; - t3 = H.getTypeArgumentByIndex(t1, 0); - return new H.MappedListIterable(t1, H.functionTypeCheck(new U.Chain_toString__closure0(), {func: 1, ret: t2, args: [t3]}), [t3, t2]).fold$1$2(0, 0, H.instantiate1(P.math__max$closure(), t2), t2); + A.Chain_toTrace_closure.prototype = { + call$1(trace) { + return type$.Trace._as(trace).get$frames(); }, - $signature: 35 + $signature: 37 + }; + A.Chain_toString_closure0.prototype = { + call$1(trace) { + var t1 = type$.Trace._as(trace).get$frames(), + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, t2._eval$1("int(1)")._as(new A.Chain_toString__closure0()), t2._eval$1("MappedListIterable<1,int>")).fold$1$2(0, 0, B.CONSTANT, type$.int); + }, + $signature: 38 }; - U.Chain_toString__closure0.prototype = { - call$1: function(frame) { - H.interceptedTypeCheck(frame, "$isFrame"); + A.Chain_toString__closure0.prototype = { + call$1(frame) { + type$.Frame._as(frame); return frame.get$location(frame).length; }, - $signature: 18 + $signature: 16 }; - U.Chain_toString_closure.prototype = { - call$1: function(trace) { - var t1, t2, t3; - t1 = H.interceptedTypeCheck(trace, "$isTrace").get$frames(); - t2 = P.String; - t3 = H.getTypeArgumentByIndex(t1, 0); - return new H.MappedListIterable(t1, H.functionTypeCheck(new U.Chain_toString__closure(this.longest), {func: 1, ret: t2, args: [t3]}), [t3, t2]).join$0(0); + A.Chain_toString_closure.prototype = { + call$1(trace) { + var t1 = type$.Trace._as(trace).get$frames(), + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, t2._eval$1("String(1)")._as(new A.Chain_toString__closure(this.longest)), t2._eval$1("MappedListIterable<1,String>")).join$0(0); }, - $signature: 37 + $signature: 40 }; - U.Chain_toString__closure.prototype = { - call$1: function(frame) { - H.interceptedTypeCheck(frame, "$isFrame"); - return J.padRight$1$s(frame.get$location(frame), this.longest) + " " + H.S(frame.get$member()) + "\n"; + A.Chain_toString__closure.prototype = { + call$1(frame) { + type$.Frame._as(frame); + return B.JSString_methods.padRight$1(frame.get$location(frame), this.longest) + " " + A.S(frame.get$member()) + "\n"; }, - $signature: 17 + $signature: 15 }; A.Frame.prototype = { - get$isCore: function() { + get$isCore() { return this.uri.get$scheme() === "dart"; }, - get$library: function() { + get$library() { var t1 = this.uri; if (t1.get$scheme() === "data") return "data:..."; return $.$get$context().prettyUri$1(t1); }, - get$$package: function() { + get$$package() { var t1 = this.uri; if (t1.get$scheme() !== "package") - return; - return C.JSArray_methods.get$first(t1.get$path(t1).split("/")); + return null; + return B.JSArray_methods.get$first(t1.get$path(t1).split("/")); }, - get$location: function(_) { - var t1, t2; - t1 = this.line; + get$location(_) { + var t2, _this = this, + t1 = _this.line; if (t1 == null) - return this.get$library(); - t2 = this.column; + return _this.get$library(); + t2 = _this.column; if (t2 == null) - return H.S(this.get$library()) + " " + H.S(t1); - return H.S(this.get$library()) + " " + H.S(t1) + ":" + H.S(t2); + return _this.get$library() + " " + A.S(t1); + return _this.get$library() + " " + A.S(t1) + ":" + A.S(t2); }, - toString$0: function(_) { - return H.S(this.get$location(this)) + " in " + H.S(this.member); + toString$0(_) { + return this.get$location(this) + " in " + A.S(this.member); }, - get$uri: function() { + get$uri() { return this.uri; }, - get$line: function() { + get$line() { return this.line; }, - get$column: function() { + get$column() { return this.column; }, - get$member: function() { + get$member() { return this.member; } }; A.Frame_Frame$parseVM_closure.prototype = { - call$0: function() { - var t1, match, t2, t3, member, uri, lineAndColumn, line; - t1 = this.frame; + call$0() { + var match, t2, t3, member, uri, lineAndColumn, line, _null = null, + t1 = this.frame; if (t1 === "...") - return new A.Frame(P._Uri__Uri(null, null, null, null), null, null, "..."); + return new A.Frame(A._Uri__Uri(_null, _null, _null, _null), _null, _null, "..."); match = $.$get$_vmFrame().firstMatch$1(t1); if (match == null) - return new N.UnparsedFrame(P._Uri__Uri(null, "unparsed", null, null), t1); + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); t1 = match._match; if (1 >= t1.length) - return H.ioore(t1, 1); + return A.ioore(t1, 1); t2 = t1[1]; - t3 = $.$get$_asyncBody(); t2.toString; - t2 = H.stringReplaceAllUnchecked(t2, t3, ""); - member = H.stringReplaceAllUnchecked(t2, "", ""); + t3 = type$.Pattern._as($.$get$_asyncBody()); + t2 = A.stringReplaceAllUnchecked(t2, t3, ""); + member = A.stringReplaceAllUnchecked(t2, "", ""); if (2 >= t1.length) - return H.ioore(t1, 2); - uri = P.Uri_parse(t1[2]); + return A.ioore(t1, 2); + t2 = t1[2]; + t3 = t2; + t3.toString; + if (B.JSString_methods.startsWith$1(t3, "= t1.length) - return H.ioore(t1, 3); + return A.ioore(t1, 3); lineAndColumn = t1[3].split(":"); t1 = lineAndColumn.length; - line = t1 > 1 ? P.int_parse(lineAndColumn[1], null, null) : null; - return new A.Frame(uri, line, t1 > 2 ? P.int_parse(lineAndColumn[2], null, null) : null, member); + line = t1 > 1 ? A.int_parse(lineAndColumn[1], _null) : _null; + return new A.Frame(uri, line, t1 > 2 ? A.int_parse(lineAndColumn[2], _null) : _null, member); }, - $signature: 7 + $signature: 5 }; A.Frame_Frame$parseV8_closure.prototype = { - call$0: function() { - var t1, match, t2, t3, t4; - t1 = this.frame; - match = $.$get$_v8Frame().firstMatch$1(t1); + call$0() { + var t2, t3, t4, _s4_ = "", + t1 = this.frame, + match = $.$get$_v8Frame().firstMatch$1(t1); if (match == null) - return new N.UnparsedFrame(P._Uri__Uri(null, "unparsed", null, null), t1); + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), t1); t1 = new A.Frame_Frame$parseV8_closure_parseLocation(t1); t2 = match._match; t3 = t2.length; if (2 >= t3) - return H.ioore(t2, 2); + return A.ioore(t2, 2); t4 = t2[2]; if (t4 != null) { + t3 = t4; + t3.toString; t2 = t2[1]; t2.toString; - t2 = H.stringReplaceAllUnchecked(t2, "", ""); - t2 = H.stringReplaceAllUnchecked(t2, "Anonymous function", ""); - return t1.call$2(t4, H.stringReplaceAllUnchecked(t2, "(anonymous function)", "")); + t2 = A.stringReplaceAllUnchecked(t2, "", _s4_); + t2 = A.stringReplaceAllUnchecked(t2, "Anonymous function", _s4_); + return t1.call$2(t3, A.stringReplaceAllUnchecked(t2, "(anonymous function)", _s4_)); } else { if (3 >= t3) - return H.ioore(t2, 3); - return t1.call$2(t2[3], ""); + return A.ioore(t2, 3); + t2 = t2[3]; + t2.toString; + return t1.call$2(t2, _s4_); } }, - $signature: 7 + $signature: 5 }; A.Frame_Frame$parseV8_closure_parseLocation.prototype = { - call$2: function($location, member) { - var t1, evalMatch, t2, urlMatch, t3; - t1 = $.$get$_v8EvalLocation(); - evalMatch = t1.firstMatch$1($location); - for (; evalMatch != null;) { + call$2($location, member) { + var t2, urlMatch, uri, line, columnMatch, _null = null, + t1 = $.$get$_v8EvalLocation(), + evalMatch = t1.firstMatch$1($location); + for (; evalMatch != null; $location = t2) { t2 = evalMatch._match; if (1 >= t2.length) - return H.ioore(t2, 1); - $location = t2[1]; - evalMatch = t1.firstMatch$1($location); + return A.ioore(t2, 1); + t2 = t2[1]; + t2.toString; + evalMatch = t1.firstMatch$1(t2); } if ($location === "native") - return new A.Frame(P.Uri_parse("native"), null, null, member); + return new A.Frame(A.Uri_parse("native"), _null, _null, member); urlMatch = $.$get$_v8UrlLocation().firstMatch$1($location); if (urlMatch == null) - return new N.UnparsedFrame(P._Uri__Uri(null, "unparsed", null, null), this.frame); + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), this.frame); t1 = urlMatch._match; if (1 >= t1.length) - return H.ioore(t1, 1); - t2 = A.Frame__uriOrPathToUri(t1[1]); + return A.ioore(t1, 1); + t2 = t1[1]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + if (2 >= t1.length) + return A.ioore(t1, 2); + t2 = t1[2]; + t2.toString; + line = A.int_parse(t2, _null); + if (3 >= t1.length) + return A.ioore(t1, 3); + columnMatch = t1[3]; + return new A.Frame(uri, line, columnMatch != null ? A.int_parse(columnMatch, _null) : _null, member); + }, + $signature: 43 + }; + A.Frame_Frame$_parseFirefoxEval_closure.prototype = { + call$0() { + var t2, member, uri, line, _null = null, + t1 = this.frame, + match = $.$get$_firefoxEvalLocation().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t1 = match._match; + if (1 >= t1.length) + return A.ioore(t1, 1); + t2 = t1[1]; + t2.toString; + member = A.stringReplaceAllUnchecked(t2, "/<", ""); if (2 >= t1.length) - return H.ioore(t1, 2); - t3 = P.int_parse(t1[2], null, null); + return A.ioore(t1, 2); + t2 = t1[2]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); if (3 >= t1.length) - return H.ioore(t1, 3); - return new A.Frame(t2, t3, P.int_parse(t1[3], null, null), member); + return A.ioore(t1, 3); + t1 = t1[3]; + t1.toString; + line = A.int_parse(t1, _null); + return new A.Frame(uri, line, _null, member.length === 0 || member === "anonymous" ? "" : member); }, - $signature: 40 + $signature: 5 }; A.Frame_Frame$parseFirefox_closure.prototype = { - call$0: function() { - var t1, match, uri, t2, t3, member, line; - t1 = this.frame; - match = $.$get$_firefoxSafariFrame().firstMatch$1(t1); + call$0() { + var t2, t3, t4, uri, member, line, column, _null = null, + t1 = this.frame, + match = $.$get$_firefoxSafariFrame().firstMatch$1(t1); if (match == null) - return new N.UnparsedFrame(P._Uri__Uri(null, "unparsed", null, null), t1); - t1 = match._match; - if (3 >= t1.length) - return H.ioore(t1, 3); - uri = A.Frame__uriOrPathToUri(t1[3]); - t2 = t1.length; - if (1 >= t2) - return H.ioore(t1, 1); - t3 = t1[1]; - if (t3 != null) { - if (2 >= t2) - return H.ioore(t1, 2); - t2 = C.JSString_methods.allMatches$1("/", t1[2]); - member = J.$add$ansx(t3, C.JSArray_methods.join$0(P.List_List$filled(t2.get$length(t2), ".", P.String))); + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t2 = match._match; + if (3 >= t2.length) + return A.ioore(t2, 3); + t3 = t2[3]; + t4 = t3; + t4.toString; + if (B.JSString_methods.contains$1(t4, " line ")) + return A.Frame_Frame$_parseFirefoxEval(t1); + t1 = t3; + t1.toString; + uri = A.Frame__uriOrPathToUri(t1); + t1 = t2.length; + if (1 >= t1) + return A.ioore(t2, 1); + member = t2[1]; + if (member != null) { + if (2 >= t1) + return A.ioore(t2, 2); + t1 = t2[2]; + t1.toString; + t1 = B.JSString_methods.allMatches$1("/", t1); + member += B.JSArray_methods.join$0(A.List_List$filled(t1.get$length(t1), ".", false, type$.String)); if (member === "") member = ""; - member = C.JSString_methods.replaceFirst$2(member, $.$get$_initialDot(), ""); + member = B.JSString_methods.replaceFirst$2(member, $.$get$_initialDot(), ""); } else member = ""; - if (4 >= t1.length) - return H.ioore(t1, 4); - t2 = t1[4]; - line = t2 === "" ? null : P.int_parse(t2, null, null); - if (5 >= t1.length) - return H.ioore(t1, 5); - t1 = t1[5]; - return new A.Frame(uri, line, t1 == null || t1 === "" ? null : P.int_parse(t1, null, null), member); + if (4 >= t2.length) + return A.ioore(t2, 4); + t1 = t2[4]; + if (t1 === "") + line = _null; + else { + t1 = t1; + t1.toString; + line = A.int_parse(t1, _null); + } + if (5 >= t2.length) + return A.ioore(t2, 5); + t1 = t2[5]; + if (t1 == null || t1 === "") + column = _null; + else { + t1 = t1; + t1.toString; + column = A.int_parse(t1, _null); + } + return new A.Frame(uri, line, column, member); }, - $signature: 7 + $signature: 5 }; A.Frame_Frame$parseFriendly_closure.prototype = { - call$0: function() { - var t1, match, t2, buffer, indices, uri, line, column; - t1 = this.frame; - match = $.$get$_friendlyFrame().firstMatch$1(t1); + call$0() { + var t2, uri, line, column, _null = null, + t1 = this.frame, + match = $.$get$_friendlyFrame().firstMatch$1(t1); if (match == null) - throw H.wrapException(P.FormatException$("Couldn't parse package:stack_trace stack trace line '" + H.S(t1) + "'.", null, null)); + throw A.wrapException(A.FormatException$("Couldn't parse package:stack_trace stack trace line '" + t1 + "'.", _null, _null)); t1 = match._match; if (1 >= t1.length) - return H.ioore(t1, 1); + return A.ioore(t1, 1); t2 = t1[1]; - if (t2 === "data:...") { - buffer = new P.StringBuffer(""); - indices = H.setRuntimeTypeInfo([-1], [P.int]); - P.UriData__writeUri(null, null, null, buffer, indices); - C.JSArray_methods.add$1(indices, buffer._contents.length); - buffer._contents += ","; - P.UriData__uriEncodeBytes(C.List_CVk, C.AsciiCodec_false.encode$1(""), buffer); - t2 = buffer._contents; - uri = new P.UriData(t2.charCodeAt(0) == 0 ? t2 : t2, indices, null).get$uri(); - } else - uri = P.Uri_parse(t2); + if (t2 === "data:...") + uri = A.Uri_Uri$dataFromString(""); + else { + t2 = t2; + t2.toString; + uri = A.Uri_parse(t2); + } if (uri.get$scheme() === "") { t2 = $.$get$context(); - uri = t2.toUri$1(t2.absolute$7(0, t2.style.pathFromUri$1(M._parseUri(uri)), null, null, null, null, null, null)); + uri = t2.toUri$1(t2.absolute$7(0, t2.style.pathFromUri$1(A._parseUri(uri)), _null, _null, _null, _null, _null, _null)); } if (2 >= t1.length) - return H.ioore(t1, 2); + return A.ioore(t1, 2); t2 = t1[2]; - line = t2 == null ? null : P.int_parse(t2, null, null); + if (t2 == null) + line = _null; + else { + t2 = t2; + t2.toString; + line = A.int_parse(t2, _null); + } if (3 >= t1.length) - return H.ioore(t1, 3); + return A.ioore(t1, 3); t2 = t1[3]; - column = t2 == null ? null : P.int_parse(t2, null, null); + if (t2 == null) + column = _null; + else { + t2 = t2; + t2.toString; + column = A.int_parse(t2, _null); + } if (4 >= t1.length) - return H.ioore(t1, 4); + return A.ioore(t1, 4); return new A.Frame(uri, line, column, t1[4]); }, - $signature: 7 + $signature: 5 }; - T.LazyTrace.prototype = { - get$_trace: function() { - var t1 = this._lazy_trace$_inner; - if (t1 == null) { - t1 = H.interceptedTypeCheck(this._thunk.call$0(), "$isTrace"); - this._lazy_trace$_inner = t1; + A.LazyTrace.prototype = { + get$_lazy_trace$_trace() { + var result, _this = this, + value = _this.__LazyTrace__trace; + if (value === $) { + result = _this._thunk.call$0(); + A._lateInitializeOnceCheck(_this.__LazyTrace__trace, "_trace"); + _this.__LazyTrace__trace = result; + value = result; } - return t1; + return value; }, - get$frames: function() { - return this.get$_trace().get$frames(); + get$frames() { + return this.get$_lazy_trace$_trace().get$frames(); }, - get$terse: function() { - return new T.LazyTrace(new T.LazyTrace_terse_closure(this)); + get$terse() { + return new A.LazyTrace(new A.LazyTrace_terse_closure(this)); }, - toString$0: function(_) { - return J.toString$0$(this.get$_trace()); + toString$0(_) { + return this.get$_lazy_trace$_trace().toString$0(0); }, $isStackTrace: 1, $isTrace: 1 }; - T.LazyTrace_terse_closure.prototype = { - call$0: function() { - return this.$this.get$_trace().get$terse(); + A.LazyTrace_terse_closure.prototype = { + call$0() { + return this.$this.get$_lazy_trace$_trace().get$terse(); }, - $signature: 16 + $signature: 13 }; - Y.Trace.prototype = { - get$terse: function() { - return this.foldFrames$2$terse(new Y.Trace_terse_closure(), true); + A.Trace.prototype = { + get$terse() { + return this.foldFrames$2$terse(new A.Trace_terse_closure(), true); }, - foldFrames$2$terse: function(predicate, terse) { - var _box_0, t1, newFrames, t2, t3; - _box_0 = {}; + foldFrames$2$terse(predicate, terse) { + var newFrames, t1, t2, t3, _box_0 = {}; + _box_0.predicate = predicate; + type$.bool_Function_Frame._as(predicate); _box_0.predicate = predicate; - _box_0.predicate = new Y.Trace_foldFrames_closure(H.functionTypeCheck(predicate, {func: 1, ret: P.bool, args: [A.Frame]})); - t1 = A.Frame; - newFrames = H.setRuntimeTypeInfo([], [t1]); - for (t2 = this.frames, t3 = H.getTypeArgumentByIndex(t2, 0), t2 = new H.ReversedListIterable(t2, [t3]), t3 = new H.ListIterator(t2, t2.get$length(t2), 0, [t3]); t3.moveNext$0();) { - t2 = t3.__internal$_current; - if (t2 instanceof N.UnparsedFrame || !_box_0.predicate.call$1(t2)) - C.JSArray_methods.add$1(newFrames, t2); - else if (newFrames.length === 0 || !_box_0.predicate.call$1(C.JSArray_methods.get$last(newFrames))) - C.JSArray_methods.add$1(newFrames, new A.Frame(t2.get$uri(), t2.get$line(), t2.get$column(), t2.get$member())); - } - t2 = H.getTypeArgumentByIndex(newFrames, 0); - newFrames = new H.MappedListIterable(newFrames, H.functionTypeCheck(new Y.Trace_foldFrames_closure0(_box_0), {func: 1, ret: t1, args: [t2]}), [t2, t1]).toList$0(0); - if (newFrames.length > 1 && _box_0.predicate.call$1(C.JSArray_methods.get$first(newFrames))) - C.JSArray_methods.removeAt$1(newFrames, 0); - return new Y.Trace(P.List_List$unmodifiable(new H.ReversedListIterable(newFrames, [H.getTypeArgumentByIndex(newFrames, 0)]), t1), new P._StringStackTrace(this.original._stackTrace)); - }, - toString$0: function(_) { - var t1, t2, t3, t4; - t1 = this.frames; - t2 = P.int; - t3 = H.getTypeArgumentByIndex(t1, 0); - t4 = P.String; - return new H.MappedListIterable(t1, H.functionTypeCheck(new Y.Trace_toString_closure(new H.MappedListIterable(t1, H.functionTypeCheck(new Y.Trace_toString_closure0(), {func: 1, ret: t2, args: [t3]}), [t3, t2]).fold$1$2(0, 0, H.instantiate1(P.math__max$closure(), t2), t2)), {func: 1, ret: t4, args: [t3]}), [t3, t4]).join$0(0); + _box_0.predicate = new A.Trace_foldFrames_closure(predicate); + newFrames = A._setArrayType([], type$.JSArray_Frame); + for (t1 = this.frames, t2 = A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>"), t1 = new A.ReversedListIterable(t1, t2), t1 = new A.ListIterator(t1, t1.get$length(t1), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 instanceof A.UnparsedFrame || !A.boolConversionCheck(_box_0.predicate.call$1(t3))) + B.JSArray_methods.add$1(newFrames, t3); + else if (newFrames.length === 0 || !A.boolConversionCheck(_box_0.predicate.call$1(B.JSArray_methods.get$last(newFrames)))) + B.JSArray_methods.add$1(newFrames, new A.Frame(t3.get$uri(), t3.get$line(), t3.get$column(), t3.get$member())); + } + t1 = type$.MappedListIterable_Frame_Frame; + newFrames = A.List_List$of(new A.MappedListIterable(newFrames, type$.Frame_Function_Frame._as(new A.Trace_foldFrames_closure0(_box_0)), t1), true, t1._eval$1("ListIterable.E")); + if (newFrames.length > 1 && A.boolConversionCheck(_box_0.predicate.call$1(B.JSArray_methods.get$first(newFrames)))) + B.JSArray_methods.removeAt$1(newFrames, 0); + return A.Trace$(new A.ReversedListIterable(newFrames, A._arrayInstanceType(newFrames)._eval$1("ReversedListIterable<1>")), this.original._stackTrace); + }, + toString$0(_) { + var t1 = this.frames, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, t2._eval$1("String(1)")._as(new A.Trace_toString_closure(new A.MappedListIterable(t1, t2._eval$1("int(1)")._as(new A.Trace_toString_closure0()), t2._eval$1("MappedListIterable<1,int>")).fold$1$2(0, 0, B.CONSTANT, type$.int))), t2._eval$1("MappedListIterable<1,String>")).join$0(0); }, $isStackTrace: 1, - get$frames: function() { + get$frames() { return this.frames; } }; - Y.Trace_Trace$from_closure.prototype = { - call$0: function() { - return Y.Trace_Trace$parse(this.trace.toString$0(0)); + A.Trace_Trace$from_closure.prototype = { + call$0() { + return A.Trace_Trace$parse(this.trace.toString$0(0)); }, - $signature: 16 + $signature: 13 }; - Y.Trace__parseVM_closure.prototype = { - call$1: function(line) { - return A.Frame_Frame$parseVM(H.stringTypeCheck(line)); + A.Trace__parseVM_closure.prototype = { + call$1(line) { + return A._asString(line).length !== 0; }, - $signature: 5 + $signature: 1 }; - Y.Trace$parseV8_closure.prototype = { - call$1: function(line) { - return !J.startsWith$1$s(H.stringTypeCheck(line), $.$get$_v8TraceLine()); + A.Trace__parseVM_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseVM(A._asString(line)); }, - $signature: 2 + $signature: 4 }; - Y.Trace$parseV8_closure0.prototype = { - call$1: function(line) { - return A.Frame_Frame$parseV8(H.stringTypeCheck(line)); + A.Trace$parseV8_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(A._asString(line), $.$get$_v8TraceLine()); }, - $signature: 5 + $signature: 1 }; - Y.Trace$parseJSCore_closure.prototype = { - call$1: function(line) { - return H.stringTypeCheck(line) !== "\tat "; + A.Trace$parseV8_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseV8(A._asString(line)); }, - $signature: 2 + $signature: 4 }; - Y.Trace$parseJSCore_closure0.prototype = { - call$1: function(line) { - return A.Frame_Frame$parseV8(H.stringTypeCheck(line)); + A.Trace$parseJSCore_closure.prototype = { + call$1(line) { + return A._asString(line) !== "\tat "; }, - $signature: 5 + $signature: 1 + }; + A.Trace$parseJSCore_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseV8(A._asString(line)); + }, + $signature: 4 }; - Y.Trace$parseFirefox_closure.prototype = { - call$1: function(line) { - H.stringTypeCheck(line); + A.Trace$parseFirefox_closure.prototype = { + call$1(line) { + A._asString(line); return line.length !== 0 && line !== "[native code]"; }, - $signature: 2 + $signature: 1 }; - Y.Trace$parseFirefox_closure0.prototype = { - call$1: function(line) { - return A.Frame_Frame$parseFirefox(H.stringTypeCheck(line)); + A.Trace$parseFirefox_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseFirefox(A._asString(line)); }, - $signature: 5 + $signature: 4 }; - Y.Trace$parseFriendly_closure.prototype = { - call$1: function(line) { - return !J.startsWith$1$s(H.stringTypeCheck(line), "====="); + A.Trace$parseFriendly_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(A._asString(line), "====="); }, - $signature: 2 + $signature: 1 }; - Y.Trace$parseFriendly_closure0.prototype = { - call$1: function(line) { - return A.Frame_Frame$parseFriendly(H.stringTypeCheck(line)); + A.Trace$parseFriendly_closure0.prototype = { + call$1(line) { + return A.Frame_Frame$parseFriendly(A._asString(line)); }, - $signature: 5 + $signature: 4 }; - Y.Trace_terse_closure.prototype = { - call$1: function(_) { + A.Trace_terse_closure.prototype = { + call$1(_) { return false; }, - $signature: 21 + $signature: 12 }; - Y.Trace_foldFrames_closure.prototype = { - call$1: function(frame) { - if (this.oldPredicate.call$1(frame)) + A.Trace_foldFrames_closure.prototype = { + call$1(frame) { + var t1; + if (A.boolConversionCheck(this.oldPredicate.call$1(frame))) return true; if (frame.get$isCore()) return true; if (frame.get$$package() === "stack_trace") return true; - if (!J.contains$1$asx(frame.get$member(), "")) + t1 = frame.get$member(); + t1.toString; + if (!B.JSString_methods.contains$1(t1, "")) return false; return frame.get$line() == null; }, - $signature: 21 + $signature: 12 }; - Y.Trace_foldFrames_closure0.prototype = { - call$1: function(frame) { + A.Trace_foldFrames_closure0.prototype = { + call$1(frame) { var t1, t2; - H.interceptedTypeCheck(frame, "$isFrame"); - if (frame instanceof N.UnparsedFrame || !this._box_0.predicate.call$1(frame)) + type$.Frame._as(frame); + if (frame instanceof A.UnparsedFrame || !A.boolConversionCheck(this._box_0.predicate.call$1(frame))) return frame; t1 = frame.get$library(); - t2 = $.$get$_terseRegExp(); - t1.toString; - return new A.Frame(P.Uri_parse(H.stringReplaceAllUnchecked(t1, t2, "")), null, null, frame.get$member()); + t2 = type$.Pattern._as($.$get$_terseRegExp()); + return new A.Frame(A.Uri_parse(A.stringReplaceAllUnchecked(t1, t2, "")), null, null, frame.get$member()); }, - $signature: 44 + $signature: 47 }; - Y.Trace_toString_closure0.prototype = { - call$1: function(frame) { - H.interceptedTypeCheck(frame, "$isFrame"); + A.Trace_toString_closure0.prototype = { + call$1(frame) { + type$.Frame._as(frame); return frame.get$location(frame).length; }, - $signature: 18 + $signature: 16 }; - Y.Trace_toString_closure.prototype = { - call$1: function(frame) { - H.interceptedTypeCheck(frame, "$isFrame"); - if (frame instanceof N.UnparsedFrame) + A.Trace_toString_closure.prototype = { + call$1(frame) { + type$.Frame._as(frame); + if (frame instanceof A.UnparsedFrame) return frame.toString$0(0) + "\n"; - return J.padRight$1$s(frame.get$location(frame), this.longest) + " " + H.S(frame.get$member()) + "\n"; + return B.JSString_methods.padRight$1(frame.get$location(frame), this.longest) + " " + A.S(frame.get$member()) + "\n"; }, - $signature: 17 + $signature: 15 }; - N.UnparsedFrame.prototype = { - toString$0: function(_) { + A.UnparsedFrame.prototype = { + toString$0(_) { return this.member; }, $isFrame: 1, - get$uri: function() { + get$uri() { return this.uri; }, - get$line: function() { - return this.line; + get$line() { + return null; }, - get$column: function() { - return this.column; + get$column() { + return null; }, - get$isCore: function() { - return this.isCore; + get$isCore() { + return false; }, - get$library: function() { - return this.library; + get$library() { + return "unparsed"; }, - get$$package: function() { - return this.$package; + get$$package() { + return null; }, - get$location: function(receiver) { - return this.location; + get$location() { + return "unparsed"; }, - get$member: function() { + get$member() { return this.member; } }; - K.GuaranteeChannel.prototype = { - GuaranteeChannel$3$allowSinkErrors: function(innerSink, allowSinkErrors, _box_0, $T) { - this.set$_sink(new K._GuaranteeSink(innerSink, this, new P._AsyncCompleter(new P._Future(0, $.Zone__current, [null]), [null]), true, [$T])); - this.set$_streamController(P.StreamController_StreamController(null, new K.GuaranteeChannel_closure(_box_0, this), true, $T)); + A.GuaranteeChannel.prototype = { + GuaranteeChannel$3$allowSinkErrors(innerSink, allowSinkErrors, _box_0, $T) { + var _this = this, + t1 = _this.$ti, + t2 = t1._eval$1("_GuaranteeSink<1>")._as(new A._GuaranteeSink(innerSink, _this, new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic), true, $T._eval$1("_GuaranteeSink<0>"))); + A._lateWriteOnceCheck(_this.__GuaranteeChannel__sink, "_sink"); + _this.set$__GuaranteeChannel__sink(t2); + t1 = t1._eval$1("StreamController<1>")._as(A.StreamController_StreamController(null, new A.GuaranteeChannel_closure(_box_0, _this, $T), true, $T)); + A._lateWriteOnceCheck(_this.__GuaranteeChannel__streamController, "_streamController"); + _this.set$__GuaranteeChannel__streamController(t1); }, - _onSinkDisconnected$0: function() { + _onSinkDisconnected$0() { this._disconnected = true; - var t1 = this._guarantee_channel$_subscription; - if (t1 != null) - t1.cancel$0(); - this._streamController.close$0(0); + var subscription = this._subscription; + if (subscription != null) + subscription.cancel$0(); + A._lateReadCheck(this.__GuaranteeChannel__streamController, "_streamController").close$0(0); }, - set$_sink: function(_sink) { - this._sink = H.assertSubtype(_sink, "$is_GuaranteeSink", this.$ti, "$as_GuaranteeSink"); + set$__GuaranteeChannel__sink(__GuaranteeChannel__sink) { + this.__GuaranteeChannel__sink = this.$ti._eval$1("_GuaranteeSink<1>")._as(__GuaranteeChannel__sink); }, - set$_streamController: function(_streamController) { - this._streamController = H.assertSubtype(_streamController, "$isStreamController", this.$ti, "$asStreamController"); + set$__GuaranteeChannel__streamController(__GuaranteeChannel__streamController) { + this.__GuaranteeChannel__streamController = this.$ti._eval$1("StreamController<1>")._as(__GuaranteeChannel__streamController); }, - set$_guarantee_channel$_subscription: function(_subscription) { - this._guarantee_channel$_subscription = H.assertSubtype(_subscription, "$isStreamSubscription", this.$ti, "$asStreamSubscription"); + set$_subscription(_subscription) { + this._subscription = this.$ti._eval$1("StreamSubscription<1>?")._as(_subscription); } }; - K.GuaranteeChannel_closure.prototype = { - call$0: function() { - var t1, t2, t3; - t1 = this.$this; + A.GuaranteeChannel_closure.prototype = { + call$0() { + var t2, t3, + _s17_ = "_streamController", + t1 = this.$this; if (t1._disconnected) return; t2 = this._box_0.innerStream; - t3 = t1._streamController; - t1.set$_guarantee_channel$_subscription(t2.listen$3$onDone$onError(t3.get$add(t3), new K.GuaranteeChannel__closure(t1), t3.get$addError())); + t3 = A._lateReadCheck(t1.__GuaranteeChannel__streamController, _s17_); + t1.set$_subscription(t2.listen$3$onDone$onError(this.T._eval$1("~(0)")._as(t3.get$add(t3)), new A.GuaranteeChannel__closure(t1), A._lateReadCheck(t1.__GuaranteeChannel__streamController, _s17_).get$addError())); }, $signature: 0 }; - K.GuaranteeChannel__closure.prototype = { - call$0: function() { + A.GuaranteeChannel__closure.prototype = { + call$0() { var t1 = this.$this; - t1._sink._onStreamDisconnected$0(); - t1._streamController.close$0(0); + A._lateReadCheck(t1.__GuaranteeChannel__sink, "_sink")._onStreamDisconnected$0(); + A._lateReadCheck(t1.__GuaranteeChannel__streamController, "_streamController").close$0(0); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - K._GuaranteeSink.prototype = { - add$1: function(_, data) { - var t1; - H.assertSubtypeOfRuntimeType(data, H.getTypeArgumentByIndex(this, 0)); - if (this._closed) - throw H.wrapException(P.StateError$("Cannot add event after closing.")); - if (this._addStreamSubscription != null) - throw H.wrapException(P.StateError$("Cannot add event while adding stream.")); - if (this._disconnected) + A._GuaranteeSink.prototype = { + add$1(_, data) { + var t1, _this = this; + _this.$ti._precomputed1._as(data); + if (_this._closed) + throw A.wrapException(A.StateError$("Cannot add event after closing.")); + if (_this._addStreamSubscription != null) + throw A.wrapException(A.StateError$("Cannot add event while adding stream.")); + if (_this._disconnected) return; - t1 = this._inner; - t1._async$_target.add$1(0, H.assertSubtypeOfRuntimeType(data, H.getTypeArgumentByIndex(t1, 0))); - }, - addError$2: function(error, stackTrace) { - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - if (this._closed) - throw H.wrapException(P.StateError$("Cannot add event after closing.")); - if (this._addStreamSubscription != null) - throw H.wrapException(P.StateError$("Cannot add event while adding stream.")); - if (this._disconnected) + t1 = _this._inner; + t1._async$_target.add$1(0, t1.$ti._precomputed1._as(data)); + }, + addError$2(error, stackTrace) { + var _this = this; + type$.Object._as(error); + type$.nullable_StackTrace._as(stackTrace); + if (_this._closed) + throw A.wrapException(A.StateError$("Cannot add event after closing.")); + if (_this._addStreamSubscription != null) + throw A.wrapException(A.StateError$("Cannot add event while adding stream.")); + if (_this._disconnected) return; - this._addError$2(error, stackTrace); + _this._addError$2(error, stackTrace); }, - addError$1: function(error) { + addError$1(error) { return this.addError$2(error, null); }, - _addError$2: function(error, stackTrace) { - this._inner._async$_target.addError$2(error, H.interceptedTypeCheck(stackTrace, "$isStackTrace")); + _addError$2(error, stackTrace) { + this._inner._async$_target.addError$2(type$.Object._as(error), type$.nullable_StackTrace._as(stackTrace)); return; }, - _addError$1: function(error) { + _addError$1(error) { return this._addError$2(error, null); }, - addStream$1: function(stream) { - var t1, t2; - H.assertSubtype(stream, "$isStream", this.$ti, "$asStream"); - if (this._closed) - throw H.wrapException(P.StateError$("Cannot add stream after closing.")); - if (this._addStreamSubscription != null) - throw H.wrapException(P.StateError$("Cannot add stream while adding stream.")); - if (this._disconnected) { - t1 = new P._Future(0, $.Zone__current, [null]); - t1._asyncComplete$1(null); - return t1; - } - t1 = new P._SyncCompleter(new P._Future(0, $.Zone__current, [null]), [null]); - this._addStreamCompleter = t1; - t2 = this._inner; - this.set$_addStreamSubscription(stream.listen$3$onDone$onError(t2.get$add(t2), t1.get$complete(t1), this.get$_addError())); - return this._addStreamCompleter.future.then$1$1(new K._GuaranteeSink_addStream_closure(this), null); - }, - close$0: function(_) { - if (this._addStreamSubscription != null) - throw H.wrapException(P.StateError$("Cannot close sink while adding stream.")); - if (this._closed) - return this._doneCompleter.future; - this._closed = true; - if (!this._disconnected) { - this._channel._onSinkDisconnected$0(); - this._doneCompleter.complete$1(0, this._inner._async$_target.close$0(0)); - } - return this._doneCompleter.future; - }, - _onStreamDisconnected$0: function() { - this._disconnected = true; - var t1 = this._doneCompleter; - if (t1.future._state === 0) + addStream$1(stream) { + var t2, t3, _this = this, + t1 = _this.$ti; + t1._eval$1("Stream<1>")._as(stream); + if (_this._closed) + throw A.wrapException(A.StateError$("Cannot add stream after closing.")); + if (_this._addStreamSubscription != null) + throw A.wrapException(A.StateError$("Cannot add stream while adding stream.")); + if (_this._disconnected) + return A.Future_Future$value(null, type$.void); + t2 = _this._addStreamCompleter = new A._SyncCompleter(new A._Future($.Zone__current, type$._Future_dynamic), type$._SyncCompleter_dynamic); + t3 = _this._inner; + _this.set$_addStreamSubscription(stream.listen$3$onDone$onError(t1._eval$1("~(1)")._as(t3.get$add(t3)), type$.void_Function_$opt_dynamic._as(t2.get$complete(t2)), _this.get$_addError())); + return _this._addStreamCompleter.future.then$1$1(new A._GuaranteeSink_addStream_closure(_this), type$.void); + }, + close$0(_) { + var _this = this; + if (_this._addStreamSubscription != null) + throw A.wrapException(A.StateError$("Cannot close sink while adding stream.")); + if (_this._closed) + return _this._doneCompleter.future; + _this._closed = true; + if (!_this._disconnected) { + _this._channel._onSinkDisconnected$0(); + _this._doneCompleter.complete$1(0, _this._inner._async$_target.close$0(0)); + } + return _this._doneCompleter.future; + }, + _onStreamDisconnected$0() { + var t1, t2, _this = this; + _this._disconnected = true; + t1 = _this._doneCompleter; + if ((t1.future._async$_state & 30) === 0) t1.complete$0(0); - t1 = this._addStreamSubscription; + t1 = _this._addStreamSubscription; if (t1 == null) return; - this._addStreamCompleter.complete$1(0, t1.cancel$0()); - this._addStreamCompleter = null; - this.set$_addStreamSubscription(null); + t2 = _this._addStreamCompleter; + t2.toString; + t2.complete$1(0, t1.cancel$0()); + _this._addStreamCompleter = null; + _this.set$_addStreamSubscription(null); }, - set$_addStreamSubscription: function(_addStreamSubscription) { - this._addStreamSubscription = H.assertSubtype(_addStreamSubscription, "$isStreamSubscription", this.$ti, "$asStreamSubscription"); + set$_addStreamSubscription(_addStreamSubscription) { + this._addStreamSubscription = this.$ti._eval$1("StreamSubscription<1>?")._as(_addStreamSubscription); }, $isStreamConsumer: 1, $isStreamSink: 1 }; - K._GuaranteeSink_addStream_closure.prototype = { - call$1: function(_) { + A._GuaranteeSink_addStream_closure.prototype = { + call$1(_) { var t1 = this.$this; t1._addStreamCompleter = null; t1.set$_addStreamSubscription(null); }, - $signature: 4 + $signature: 7 }; - D._MultiChannel.prototype = { - _MultiChannel$1: function(_inner, $T) { - var t1, t2; - t1 = this._mainController; - this._controllers.$indexSet(0, 0, t1); - t2 = t1._local._streamController; - t2.toString; - new P._ControllerStream(t2, [H.getTypeArgumentByIndex(t2, 0)]).listen$2$onDone(new D._MultiChannel_closure(this, $T), new D._MultiChannel_closure0(this)); - t2 = this._multi_channel$_inner._streamController; - t2.toString; - this._innerStreamSubscription = new P._ControllerStream(t2, [H.getTypeArgumentByIndex(t2, 0)]).listen$3$onDone$onError(new D._MultiChannel_closure1(this, $T), this.get$_closeInnerChannel(), t1._local._sink.get$addError()); - }, - virtualChannel$1: function(id) { - var t1, t2, inputId, controller, t3; - t1 = {}; - t1.inputId = null; - t1.outputId = null; - if (id != null) { - t1.inputId = id; - t1.outputId = id + 1; - t2 = id; + A._MultiChannel.prototype = { + _MultiChannel$1(inner, $T) { + var t2, t3, _this = this, + _s17_ = "_streamController", + t1 = _this._mainController; + _this._controllers.$indexSet(0, 0, t1); + t2 = A._lateReadCheck(A._lateReadCheck(t1.__StreamChannelController__local, "_local").__GuaranteeChannel__streamController, _s17_); + new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(new A._MultiChannel_closure(_this, $T), new A._MultiChannel_closure0(_this)); + t2 = A._lateReadCheck(_this._multi_channel$_inner.__GuaranteeChannel__streamController, _s17_); + t3 = A._instanceType(t2)._eval$1("_ControllerStream<1>"); + _this._innerStreamSubscription = new A.CastStream(new A._ControllerStream(t2, t3), t3._eval$1("CastStream>")).listen$3$onDone$onError(new A._MultiChannel_closure1(_this, $T), _this.get$_closeInnerChannel(), A._lateReadCheck(A._lateReadCheck(t1.__StreamChannelController__local, "_local").__GuaranteeChannel__sink, "_sink").get$addError()); + }, + virtualChannel$1(id) { + var t2, controller, _this = this, + _s17_ = "_streamController", + _s8_ = "_foreign", + t1 = {}; + t1.outputId = t1.inputId = null; + t1.inputId = id; + t1.outputId = id + 1; + if (_this._multi_channel$_inner == null) { + t1 = _this.$ti; + t2 = A.Future_Future$value(null, type$.dynamic); + return new A.VirtualChannel(_this, new A._EmptyStream(t1._eval$1("_EmptyStream<1>")), new A.NullStreamSink(t2, t1._eval$1("NullStreamSink<1>")), t1._eval$1("VirtualChannel<1>")); + } + controller = A._Cell$named("controller"); + if (_this._pendingIds.remove$1(0, id)) { + t2 = _this._controllers.$index(0, id); + t2.toString; + controller.__late_helper$_value = t2; } else { - t2 = this._nextId; - inputId = t2 + 1; - t1.inputId = inputId; - t1.outputId = t2; - this._nextId = t2 + 2; - t2 = inputId; - } - if (this._multi_channel$_inner == null) { - t1 = this.$ti; - t2 = new P._Future(0, $.Zone__current, [null]); - t2._asyncComplete$1(null); - return new D.VirtualChannel(this, new P._EmptyStream(t1), new S.NullStreamSink(t2, t1), t1); - } - if (this._pendingIds.remove$1(0, t2)) - controller = this._controllers.$index(0, t2); - else { - t3 = this._controllers; - if (t3.containsKey$1(t2) || this._closedIds.contains$1(0, t2)) - throw H.wrapException(P.ArgumentError$("A virtual channel with id " + H.S(id) + " already exists.")); + t2 = _this._controllers; + if (t2.containsKey$1(id) || _this._closedIds.contains$1(0, id)) + throw A.wrapException(A.ArgumentError$("A virtual channel with id " + id + " already exists.", null)); else { - controller = B.StreamChannelController$(true, H.getTypeArgumentByIndex(this, 0)); - t3.$indexSet(0, t2, controller); + controller.__late_helper$_value = A.StreamChannelController$(true, _this.$ti._precomputed1); + t2.$indexSet(0, id, controller._readLocal$0()); } } - t2 = controller._local._streamController; - t2.toString; - new P._ControllerStream(t2, [H.getTypeArgumentByIndex(t2, 0)]).listen$2$onDone(new D._MultiChannel_virtualChannel_closure(t1, this), new D._MultiChannel_virtualChannel_closure0(t1, this)); - t1 = controller._foreign; - t2 = t1._streamController; - t2.toString; - return new D.VirtualChannel(this, new P._ControllerStream(t2, [H.getTypeArgumentByIndex(t2, 0)]), t1._sink, this.$ti); + t2 = A._lateReadCheck(A._lateReadCheck(controller._readLocal$0().__StreamChannelController__local, "_local").__GuaranteeChannel__streamController, _s17_); + new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$2$onDone(new A._MultiChannel_virtualChannel_closure(t1, _this), new A._MultiChannel_virtualChannel_closure0(t1, _this)); + t1 = A._lateReadCheck(A._lateReadCheck(controller._readLocal$0().__StreamChannelController__foreign, _s8_).__GuaranteeChannel__streamController, _s17_); + return new A.VirtualChannel(_this, new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")), A._lateReadCheck(A._lateReadCheck(controller._readLocal$0().__StreamChannelController__foreign, _s8_).__GuaranteeChannel__sink, "_sink"), _this.$ti._eval$1("VirtualChannel<1>")); }, - _closeChannel$2: function(inputId, outputId) { - var t1, t2; - this._closedIds.add$1(0, inputId); - t1 = this._controllers; - t1.remove$1(0, inputId)._local._sink.close$0(0); - t2 = this._multi_channel$_inner; + _closeChannel$2(inputId, outputId) { + var t1, t2, _this = this; + _this._closedIds.add$1(0, inputId); + t1 = _this._controllers; + t2 = t1.remove$1(0, inputId); + t2.toString; + A._lateReadCheck(A._lateReadCheck(t2.__StreamChannelController__local, "_local").__GuaranteeChannel__sink, "_sink").close$0(0); + t2 = _this._multi_channel$_inner; if (t2 == null) return; - t2._sink.add$1(0, H.setRuntimeTypeInfo([outputId], [P.int])); + A._lateReadCheck(t2.__GuaranteeChannel__sink, "_sink").add$1(0, A._setArrayType([outputId], type$.JSArray_int)); if (t1.__js_helper$_length === 0) - this._closeInnerChannel$0(); - }, - _closeInnerChannel$0: function() { - var t1, t2, t3, _i; - this._multi_channel$_inner._sink.close$0(0); - this._innerStreamSubscription.cancel$0(); - this._multi_channel$_inner = null; - for (t1 = this._controllers, t2 = P.List_List$from(t1.get$values(t1), true, null), t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) - t2[_i].get$local()._sink.close$0(0); + _this._closeInnerChannel$0(); + }, + _closeInnerChannel$0() { + var t1, t2, t3, _i, _this = this; + A._lateReadCheck(_this._multi_channel$_inner.__GuaranteeChannel__sink, "_sink").close$0(0); + _this._innerStreamSubscription._source.cancel$0(); + _this._multi_channel$_inner = null; + for (t1 = _this._controllers, t2 = A.List_List$from(t1.get$values(t1), true, type$.dynamic), t3 = t2.length, _i = 0; _i < t3; ++_i) + A._lateReadCheck(t2[_i].get$local().__GuaranteeChannel__sink, "_sink").close$0(0); t1.clear$0(0); }, $isMultiChannel: 1 }; - D._MultiChannel_closure.prototype = { - call$1: function(message) { - H.assertSubtypeOfRuntimeType(message, this.T); - return this.$this._multi_channel$_inner._sink.add$1(0, H.setRuntimeTypeInfo([0, message], [P.Object])); + A._MultiChannel_closure.prototype = { + call$1(message) { + this.T._as(message); + return A._lateReadCheck(this.$this._multi_channel$_inner.__GuaranteeChannel__sink, "_sink").add$1(0, [0, message]); }, - $signature: function() { - return {func: 1, ret: -1, args: [this.T]}; + $signature() { + return this.T._eval$1("~(0)"); } }; - D._MultiChannel_closure0.prototype = { - call$0: function() { + A._MultiChannel_closure0.prototype = { + call$0() { return this.$this._closeChannel$2(0, 0); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - D._MultiChannel_closure1.prototype = { - call$1: function(message) { - var t1, id, t2, t3, controller; + A._MultiChannel_closure1.prototype = { + call$1(message) { + var t1, id, t2, t3, controller, t4; + type$.List_dynamic._as(message); t1 = J.getInterceptor$asx(message); - id = t1.$index(message, 0); + id = A._asInt(t1.$index(message, 0)); t2 = this.$this; if (t2._closedIds.contains$1(0, id)) return; - H.intTypeCheck(id); t3 = this.T; - controller = t2._controllers.putIfAbsent$2(id, new D._MultiChannel__closure(t2, id, t3)); - if (J.$gt$n(t1.get$length(message), 1)) - controller._local._sink.add$1(0, H.assertSubtypeOfRuntimeType(t1.$index(message, 1), t3)); + controller = t2._controllers.putIfAbsent$2(id, new A._MultiChannel__closure(t2, id, t3)); + t2 = t1.get$length(message); + t4 = controller.__StreamChannelController__local; + if (t2 > 1) + A._lateReadCheck(A._lateReadCheck(t4, "_local").__GuaranteeChannel__sink, "_sink").add$1(0, t3._as(t1.$index(message, 1))); else - controller._local._sink.close$0(0); + A._lateReadCheck(A._lateReadCheck(t4, "_local").__GuaranteeChannel__sink, "_sink").close$0(0); }, - $signature: 4 + $signature: 48 }; - D._MultiChannel__closure.prototype = { - call$0: function() { - this.$this._pendingIds.add$1(0, H.intTypeCheck(this.id)); - return B.StreamChannelController$(true, this.T); + A._MultiChannel__closure.prototype = { + call$0() { + this.$this._pendingIds.add$1(0, this.id); + return A.StreamChannelController$(true, this.T); }, - $signature: function() { - return {func: 1, ret: [B.StreamChannelController, this.T]}; + $signature() { + return this.T._eval$1("StreamChannelController<0>()"); } }; - D._MultiChannel_virtualChannel_closure.prototype = { - call$1: function(message) { + A._MultiChannel_virtualChannel_closure.prototype = { + call$1(message) { var t1 = this.$this; - H.assertSubtypeOfRuntimeType(message, H.getTypeArgumentByIndex(t1, 0)); - return t1._multi_channel$_inner._sink.add$1(0, H.setRuntimeTypeInfo([this._box_0.outputId, message], [P.Object])); + t1.$ti._precomputed1._as(message); + return A._lateReadCheck(t1._multi_channel$_inner.__GuaranteeChannel__sink, "_sink").add$1(0, [this._box_0.outputId, message]); }, - $signature: function() { - return {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this.$this, 0)]}; + $signature() { + return this.$this.$ti._eval$1("~(1)"); } }; - D._MultiChannel_virtualChannel_closure0.prototype = { - call$0: function() { + A._MultiChannel_virtualChannel_closure0.prototype = { + call$0() { var t1 = this._box_0; return this.$this._closeChannel$2(t1.inputId, t1.outputId); }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 1 + $signature: 0 }; - D.VirtualChannel.prototype = {$isMultiChannel: 1}; - B.StreamChannelController.prototype = { - get$local: function() { - return this._local; + A.VirtualChannel.prototype = {$isMultiChannel: 1}; + A.StreamChannelController.prototype = { + get$local() { + return A._lateReadCheck(this.__StreamChannelController__local, "_local"); + }, + set$__StreamChannelController__local(__StreamChannelController__local) { + this.__StreamChannelController__local = this.$ti._eval$1("StreamChannel<1>")._as(__StreamChannelController__local); + }, + set$__StreamChannelController__foreign(__StreamChannelController__foreign) { + this.__StreamChannelController__foreign = this.$ti._eval$1("StreamChannel<1>")._as(__StreamChannelController__foreign); + } + }; + A.StreamChannelMixin.prototype = {$isStreamChannel: 1}; + A.TestRunner.prototype = {}; + A._JSApi.prototype = {}; + A.main_closure.prototype = { + call$0() { + var play, t2, t3, + serverChannel = A._connectToServer(), + t1 = A._lateReadCheck(A._lateReadCheck(serverChannel._mainController.__StreamChannelController__foreign, "_foreign").__GuaranteeChannel__streamController, "_streamController"); + new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$1(new A.main__closure(serverChannel)); + A.Timer_Timer$periodic(new A.Duration(1000000), new A.main__closure0(serverChannel)); + play = document.querySelector("#play"); + play.toString; + t1 = J.get$onClick$x(play); + t2 = t1.$ti; + t3 = t2._eval$1("~(1)?")._as(new A.main__closure1(serverChannel)); + type$.nullable_void_Function._as(null); + A._EventStreamSubscription$(t1._target, t1._eventType, t3, false, t2._precomputed1); + t2 = type$.void_Function; + self.dartTest = {resume: A.allowInterop(new A.main__closure2(serverChannel), t2), restartCurrent: A.allowInterop(new A.main__closure3(serverChannel), t2)}; }, - set$_local: function(_local) { - this._local = H.assertSubtype(_local, "$isStreamChannel", this.$ti, "$asStreamChannel"); - }, - set$_foreign: function(_foreign) { - this._foreign = H.assertSubtype(_foreign, "$isStreamChannel", this.$ti, "$asStreamChannel"); - } - }; - R.StreamChannelMixin.prototype = {$isStreamChannel: 1}; - K._TestRunner.prototype = {}; - K._JSApi.prototype = {}; - K.main_closure.prototype = { - call$0: function() { - var serverChannel, t1, t2; - serverChannel = K._connectToServer(); - t1 = serverChannel._mainController._foreign._streamController; - t1.toString; - new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).listen$1(new K.main__closure(serverChannel)); - P.Timer_Timer$periodic(P.Duration$(1), new K.main__closure0(serverChannel)); - t1 = J.get$onClick$x(document.querySelector("#play")); - t2 = H.getTypeArgumentByIndex(t1, 0); - W._EventStreamSubscription$(t1._html$_target, t1._eventType, H.functionTypeCheck(new K.main__closure1(serverChannel), {func: 1, ret: -1, args: [t2]}), false, t2); - t2 = {func: 1, ret: -1}; - t2 = {resume: P.allowInterop(new K.main__closure2(serverChannel), t2), restartCurrent: P.allowInterop(new K.main__closure3(serverChannel), t2)}; - self.dartTest = t2; - }, - "call*": "call$0", - $requiredArgCount: 0, - $signature: 0 + $signature: 2 }; - K.main__closure.prototype = { - call$1: function(message) { - var t1, suiteChannel, t2, t3; - t1 = J.getInterceptor$asx(message); - if (J.$eq$(t1.$index(message, "command"), "loadSuite")) { - suiteChannel = this.serverChannel.virtualChannel$1(H.intTypeCast(t1.$index(message, "channel"))); - t1 = H.assertSubtype(K._connectToIframe(H.stringTypeCast(t1.$index(message, "url")), H.intTypeCast(t1.$index(message, "id"))), "$isStreamChannel", [H.getTypeArgumentByIndex(suiteChannel, 0)], "$asStreamChannel"); - suiteChannel.stream.pipe$1(t1._sink); - t1 = t1._streamController; - t1.toString; - new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).pipe$1(suiteChannel.sink); - } else if (J.$eq$(t1.$index(message, "command"), "displayPause")) + A.main__closure.prototype = { + call$1(message) { + var suiteChannel, t2, t3, + _s7_ = "command", + t1 = J.getInterceptor$asx(message); + if (J.$eq$(t1.$index(message, _s7_), "loadSuite")) { + suiteChannel = this.serverChannel.virtualChannel$1(A._asInt(t1.$index(message, "channel"))); + t1 = suiteChannel.$ti._eval$1("StreamChannel<1>")._as(A._connectToIframe(A._asString(t1.$index(message, "url")), A._asInt(t1.$index(message, "id")))); + suiteChannel.stream.pipe$1(A._lateReadCheck(t1.__GuaranteeChannel__sink, "_sink")); + t1 = A._lateReadCheck(t1.__GuaranteeChannel__streamController, "_streamController"); + new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).pipe$1(suiteChannel.sink); + } else if (J.$eq$(t1.$index(message, _s7_), "displayPause")) document.body.classList.add("paused"); - else if (J.$eq$(t1.$index(message, "command"), "resume")) + else if (J.$eq$(t1.$index(message, _s7_), "resume")) document.body.classList.remove("paused"); else { - t2 = $.$get$_iframes().remove$1(0, t1.$index(message, "id")); + t2 = $._iframes.remove$1(0, t1.$index(message, "id")); t3 = t2.parentNode; if (t3 != null) J._removeChild$1$x(t3, t2); - for (t1 = J.get$iterator$ax($.$get$_subscriptions().remove$1(0, t1.$index(message, "id"))); t1.moveNext$0();) + t1 = $._subscriptions.remove$1(0, t1.$index(message, "id")); + t1.toString; + t1 = J.get$iterator$ax(t1); + for (; t1.moveNext$0();) t1.get$current().cancel$0(); } }, - $signature: 4 + $signature: 3 }; - K.main__closure0.prototype = { - call$1: function(_) { + A.main__closure0.prototype = { + call$1(_) { var t1; - H.interceptedTypeCheck(_, "$isTimer"); - t1 = P.String; - return this.serverChannel._mainController._foreign._sink.add$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["command", "ping"], t1, t1)); + type$.Timer._as(_); + t1 = type$.String; + return A._lateReadCheck(A._lateReadCheck(this.serverChannel._mainController.__StreamChannelController__foreign, "_foreign").__GuaranteeChannel__sink, "_sink").add$1(0, A.LinkedHashMap_LinkedHashMap$_literal(["command", "ping"], t1, t1)); }, - $signature: 46 + $signature: 49 }; - K.main__closure1.prototype = { - call$1: function(_) { + A.main__closure1.prototype = { + call$1(_) { var list, removed, t1; - H.interceptedTypeCheck(_, "$isMouseEvent"); + type$.MouseEvent._as(_); list = document.body.classList; removed = list.contains("paused"); list.remove("paused"); if (!removed) return; - t1 = P.String; - this.serverChannel._mainController._foreign._sink.add$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["command", "resume"], t1, t1)); + t1 = type$.String; + A._lateReadCheck(A._lateReadCheck(this.serverChannel._mainController.__StreamChannelController__foreign, "_foreign").__GuaranteeChannel__sink, "_sink").add$1(0, A.LinkedHashMap_LinkedHashMap$_literal(["command", "resume"], t1, t1)); }, - $signature: 47 + $signature: 50 }; - K.main__closure2.prototype = { - call$0: function() { - var list, removed, t1; - list = document.body.classList; - removed = list.contains("paused"); + A.main__closure2.prototype = { + call$0() { + var t1, + list = document.body.classList, + removed = list.contains("paused"); list.remove("paused"); if (!removed) return; - t1 = P.String; - this.serverChannel._mainController._foreign._sink.add$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["command", "resume"], t1, t1)); + t1 = type$.String; + A._lateReadCheck(A._lateReadCheck(this.serverChannel._mainController.__StreamChannelController__foreign, "_foreign").__GuaranteeChannel__sink, "_sink").add$1(0, A.LinkedHashMap_LinkedHashMap$_literal(["command", "resume"], t1, t1)); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - K.main__closure3.prototype = { - call$0: function() { - var t1 = P.String; - this.serverChannel._mainController._foreign._sink.add$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["command", "restart"], t1, t1)); + A.main__closure3.prototype = { + call$0() { + var t1 = type$.String; + A._lateReadCheck(A._lateReadCheck(this.serverChannel._mainController.__StreamChannelController__foreign, "_foreign").__GuaranteeChannel__sink, "_sink").add$1(0, A.LinkedHashMap_LinkedHashMap$_literal(["command", "restart"], t1, t1)); }, - "call*": "call$0", - $requiredArgCount: 0, $signature: 0 }; - K.main_closure0.prototype = { - call$2: function(error, stackTrace) { - var line, t1; - H.interceptedTypeCheck(stackTrace, "$isStackTrace"); - line = H.S(error) + "\n" + Y.Trace_Trace$from(stackTrace).get$terse().toString$0(0); - t1 = $.printToZone; - if (t1 == null) - H.printString(line); + A.main_closure0.prototype = { + call$2(error, stackTrace) { + var line, toZone; + type$.Object._as(error); + type$.StackTrace._as(stackTrace); + line = A.S(error) + "\n" + A.Trace_Trace$from(stackTrace).get$terse().toString$0(0); + toZone = $.printToZone; + if (toZone == null) + A.printString(line); else - t1.call$1(line); + toZone.call$1(line); }, - "call*": "call$2", - $requiredArgCount: 2, - $signature: 15 + $signature: 9 }; - K._connectToServer_closure.prototype = { - call$1: function(message) { - H.interceptedTypeCheck(message, "$isMessageEvent"); - this.controller._local._sink.add$1(0, C.JsonCodec_null_null.decode$2$reviver(0, H.stringTypeCast(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true)), null)); + A._connectToServer_closure.prototype = { + call$1(message) { + type$.MessageEvent._as(message); + A._lateReadCheck(A._lateReadCheck(this.controller.__StreamChannelController__local, "_local").__GuaranteeChannel__sink, "_sink").add$1(0, B.C_JsonCodec.decode$2$reviver(0, A._asString(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true)), null)); }, - $signature: 10 + $signature: 8 }; - K._connectToServer_closure0.prototype = { - call$1: function(message) { - return this.webSocket.send(C.JsonCodec_null_null.encode$2$toEncodable(message, null)); + A._connectToServer_closure0.prototype = { + call$1(message) { + return this.webSocket.send(B.C_JsonCodec.encode$2$toEncodable(message, null)); }, - $signature: 6 + $signature: 3 }; - K._connectToIframe_closure.prototype = { - call$1: function(message) { - var t1, t2; - H.interceptedTypeCheck(message, "$isMessageEvent"); - t1 = message.origin; - t2 = window.location; - if (t1 !== (t2 && C.Location_methods).get$origin(t2)) + A._connectToIframe_closure.prototype = { + call$1(message) { + var t1, t2, _this = this; + type$.MessageEvent._as(message); + t1 = type$.Location; + if (message.origin !== B.Location_methods.get$origin(t1._as(window.location))) return; - t1 = this.iframe; - if (!J.$eq$(J.$index$asx(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "href"), t1.src)) + t2 = _this.iframe; + if (!J.$eq$(J.$index$asx(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "href"), t2.src)) return; message.stopPropagation(); - if (J.$eq$(J.$index$asx(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "ready"), true)) { - t1 = W._convertNativeToDart_Window(t1.contentWindow); - t2 = window.location; - J.postMessage$3$x(t1, "port", (t2 && C.Location_methods).get$origin(t2), H.setRuntimeTypeInfo([this.channel.port2], [W.MessagePort])); - this.readyCompleter.complete$0(0); - } else if (J.$eq$(J.$index$asx(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "exception"), true)) - this.controller._local._sink.add$1(0, J.$index$asx(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "data")); + if (J.$eq$(J.$index$asx(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "ready"), true)) { + t2 = A._convertNativeToDart_Window(t2.contentWindow); + t2.toString; + J.postMessage$3$x(t2, "port", B.Location_methods.get$origin(t1._as(window.location)), A._setArrayType([_this.channel.port2], type$.JSArray_MessagePort)); + _this.readyCompleter.complete$0(0); + } else if (J.$eq$(J.$index$asx(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "exception"), true)) + A._lateReadCheck(A._lateReadCheck(_this.controller.__StreamChannelController__local, "_local").__GuaranteeChannel__sink, "_sink").add$1(0, J.$index$asx(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "data")); }, - $signature: 10 + $signature: 8 }; - K._connectToIframe_closure0.prototype = { - call$1: function(message) { - H.interceptedTypeCheck(message, "$isMessageEvent"); - this.controller._local._sink.add$1(0, J.$index$asx(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "data")); + A._connectToIframe_closure0.prototype = { + call$1(message) { + type$.MessageEvent._as(message); + A._lateReadCheck(A._lateReadCheck(this.controller.__StreamChannelController__local, "_local").__GuaranteeChannel__sink, "_sink").add$1(0, J.$index$asx(new A._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(message.data, true), "data")); }, - $signature: 10 + $signature: 8 }; - K._connectToIframe_closure1.prototype = { - call$1: function(message) { + A._connectToIframe_closure1.prototype = { + call$1(message) { var $async$goto = 0, - $async$completer = P._makeAsyncAwaitCompleter(P.Null), - $async$self = this, t1; - var $async$call$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) - return P._asyncRethrow($async$result, $async$completer); + return A._asyncRethrow($async$result, $async$completer); while (true) switch ($async$goto) { case 0: // Function start $async$goto = 2; - return P._asyncAwait($async$self.readyCompleter.future, $async$call$1); + return A._asyncAwait($async$self.readyCompleter.future, $async$call$1); case 2: // returning from await. - t1 = $async$self.channel.port1; - (t1 && C.MessagePort_methods).postMessage$1(t1, message); + B.MessagePort_methods.postMessage$1($async$self.channel.port1, message); // implicit return - return P._asyncReturn(null, $async$completer); + return A._asyncReturn(null, $async$completer); } }); - return P._asyncStartSync($async$call$1, $async$completer); + return A._asyncStartSync($async$call$1, $async$completer); }, - $signature: 49 + $signature: 52 }; (function aliases() { var _ = J.Interceptor.prototype; _.super$Interceptor$toString = _.toString$0; - _.super$Interceptor$noSuchMethod = _.noSuchMethod$1; - _ = J.JavaScriptObject.prototype; - _.super$JavaScriptObject$toString = _.toString$0; - _ = P.Iterable.prototype; + _ = J.LegacyJavaScriptObject.prototype; + _.super$LegacyJavaScriptObject$toString = _.toString$0; + _ = A.Iterable.prototype; _.super$Iterable$skipWhile = _.skipWhile$1; - _ = W.EventTarget.prototype; + _ = A.EventTarget.prototype; _.super$EventTarget$addEventListener = _.addEventListener$3; })(); (function installTearOffs() { - var _static_1 = hunkHelpers._static_1, + var _instance_1_u = hunkHelpers._instance_1u, + _static_1 = hunkHelpers._static_1, _static_0 = hunkHelpers._static_0, + _static_2 = hunkHelpers._static_2, _static = hunkHelpers.installStaticTearOff, _instance = hunkHelpers.installInstanceTearOff, + _instance_2_u = hunkHelpers._instance_2u, _instance_1_i = hunkHelpers._instance_1i, _instance_0_u = hunkHelpers._instance_0u; - _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 9); - _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 9); - _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 9); - _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 1); - _static_1(P, "async___nullDataHandler$closure", "_nullDataHandler", 11); - _static(P, "async___nullErrorHandler$closure", 1, function() { - return [null]; - }, ["call$2", "call$1"], ["_nullErrorHandler", function(error) { - return P._nullErrorHandler(error, null); - }], 3, 0); - _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 1); - _static(P, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 51, 0); - _static(P, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { - return P._rootRun($self, $parent, zone, f, null); - }], 52, 1); - _static(P, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { - return P._rootRunUnary($self, $parent, zone, f, arg, null, null); - }], 53, 1); - _static(P, "async___rootRunBinary$closure", 6, null, ["call$3$6", "call$6"], ["_rootRunBinary", function($self, $parent, zone, f, arg1, arg2) { - return P._rootRunBinary($self, $parent, zone, f, arg1, arg2, null, null, null); - }], 54, 1); - _static(P, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { - return P._rootRegisterCallback($self, $parent, zone, f, null); - }], 55, 0); - _static(P, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { - return P._rootRegisterUnaryCallback($self, $parent, zone, f, null, null); - }], 56, 0); - _static(P, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { - return P._rootRegisterBinaryCallback($self, $parent, zone, f, null, null, null); - }], 57, 0); - _static(P, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 58, 0); - _static(P, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 59, 0); - _static(P, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 60, 0); - _static(P, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 61, 0); - _static(P, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 62, 0); - _static_1(P, "async___printToZone$closure", "_printToZone", 63); - _static(P, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 64, 0); - _instance(P._Completer.prototype, "get$completeError", 0, 1, function() { - return [null]; - }, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 3, 0); - _instance(P._SyncCompleter.prototype, "get$complete", 1, 0, function() { - return [null]; - }, ["call$1", "call$0"], ["complete$1", "complete$0"], 39, 0); - _instance(P._Future.prototype, "get$_completeError", 0, 1, function() { + _instance_1_u(A.CastStreamSubscription.prototype, "get$__internal$_onData", "__internal$_onData$1", 11); + _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6); + _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6); + _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6); + _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); + _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 3); + _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 9); + _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); + _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 54, 0); + _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { + return A._rootRun($self, $parent, zone, f, type$.dynamic); + }], 55, 1); + _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { + return A._rootRunUnary($self, $parent, zone, f, arg, type$.dynamic, type$.dynamic); + }], 56, 1); + _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6", "call$6"], ["_rootRunBinary", function($self, $parent, zone, f, arg1, arg2) { + return A._rootRunBinary($self, $parent, zone, f, arg1, arg2, type$.dynamic, type$.dynamic, type$.dynamic); + }], 57, 1); + _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { + return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); + }], 58, 0); + _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { + return A._rootRegisterUnaryCallback($self, $parent, zone, f, type$.dynamic, type$.dynamic); + }], 59, 0); + _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { + return A._rootRegisterBinaryCallback($self, $parent, zone, f, type$.dynamic, type$.dynamic, type$.dynamic); + }], 60, 0); + _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 61, 0); + _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 62, 0); + _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 63, 0); + _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 64, 0); + _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 65, 0); + _static_1(A, "async___printToZone$closure", "_printToZone", 66); + _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 67, 0); + _instance(A._SyncCompleter.prototype, "get$complete", 1, 0, function() { return [null]; - }, ["call$2", "call$1"], ["_completeError$2", "_completeError$1"], 3, 0); + }, ["call$1", "call$0"], ["complete$1", "complete$0"], 39, 0, 0); + _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 9); var _; - _instance_1_i(_ = P._StreamController.prototype, "get$add", "add$1", 11); + _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 11); _instance(_, "get$addError", 0, 1, function() { return [null]; - }, ["call$2", "call$1"], ["addError$2", "addError$1"], 3, 0); - _instance_1_i(P._StreamSinkWrapper.prototype, "get$add", "add$1", 11); - _instance_0_u(P._DoneStreamSubscription.prototype, "get$_sendDone", "_sendDone$0", 1); - _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 8); - _static_1(P, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 14); - _instance(_ = K._GuaranteeSink.prototype, "get$addError", 0, 1, function() { + }, ["call$2", "call$1"], ["addError$2", "addError$1"], 10, 0, 0); + _instance_1_i(A._StreamSinkWrapper.prototype, "get$add", "add$1", 11); + _instance_0_u(A._DoneStreamSubscription.prototype, "get$_sendDone", "_sendDone$0", 0); + _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 14); + _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 20); + _instance(_ = A._GuaranteeSink.prototype, "get$addError", 0, 1, function() { return [null]; - }, ["call$2", "call$1"], ["addError$2", "addError$1"], 3, 0); + }, ["call$2", "call$1"], ["addError$2", "addError$1"], 10, 0, 0); _instance(_, "get$_addError", 0, 1, function() { return [null]; - }, ["call$2", "call$1"], ["_addError$2", "_addError$1"], 45, 0); - _instance_0_u(D._MultiChannel.prototype, "get$_closeInnerChannel", "_closeInnerChannel$0", 1); - _static(P, "math__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { - return P.max(a, b, P.num); - }], 43, 0); + }, ["call$2", "call$1"], ["_addError$2", "_addError$1"], 10, 0, 0); + _instance_0_u(A._MultiChannel.prototype, "get$_closeInnerChannel", "_closeInnerChannel$0", 0); + _static(A, "math__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { + return A.max(a, b, type$.num); + }], 45, 0); })(); (function inheritance() { var _mixin = hunkHelpers.mixin, _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; - _inherit(P.Object, null); - _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P._ListBase_Object_ListMixin, P.Iterable, H.ListIterator, P.Iterator, H.ExpandIterator, H.EmptyIterator, H.FixedLengthListMixin, H.UnmodifiableListMixin, H.Symbol, P.MapView, H.ConstantMap, H.Closure, H.JSInvocationMirror, H.TypeErrorDecoder, P.Error, H.ExceptionAndStackTrace, H._StackTrace, H.TypeImpl, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.JSSyntaxRegExp, H._MatchImplementation, H._AllMatchesIterator, H.StringMatch, H._StringAllMatchesIterator, P._TimerImpl, P._AsyncAwaitCompleter, P.Future, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._SyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._DoneStreamSubscription, P._StreamIterator, P.Timer, P.AsyncError, P._ZoneFunction, P.ZoneSpecification, P._ZoneSpecification, P.ZoneDelegate, P.Zone, P._ZoneDelegate, P._Zone, P._HashMapKeyIterator, P._SetBase, P._LinkedHashSetCell, P._LinkedHashSetIterator, P.ListMixin, P._UnmodifiableMapMixin, P.Codec, P._JsonStringifier, P._Utf8Encoder, P._Utf8Decoder, P.bool, P.DateTime, P.num, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Function, P.List, P.Map, P.Null, P.Match, P.StackTrace, P._StringStackTrace, P.String, P.StringBuffer, P.Symbol0, P._Uri, P.UriData, P._SimpleUri, W.ImmutableListMixin, W.FixedSizeListIterator, W._DOMWindowCrossFrame, P._StructuredClone, P._AcceptStructuredClone, P.Uint8List, S.NullStreamSink, M.Context, O.Style, X.ParsedPath, X.PathException, U.Chain, A.Frame, T.LazyTrace, Y.Trace, N.UnparsedFrame, R.StreamChannelMixin, K._GuaranteeSink, B.StreamChannelController]); - _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeByteBuffer, H.NativeTypedData, W.EventTarget, W.Blob, W.DomException, W.DomTokenList, W.Event, W._HtmlCollection_Interceptor_ListMixin, W.Location]); - _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, K._TestRunner, K._JSApi]); + _inherit(A.Object, null); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Stream, A.CastStreamSubscription, A.Error, A._ListBase_Object_ListMixin, A.Closure, A.SentinelValue, A.Iterable, A.ListIterator, A.Iterator, A.ExpandIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A.Symbol, A.MapView, A.ConstantMap, A.JSInvocationMirror, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A._Required, A.MapMixin, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.StreamSubscription, A.StreamTransformerBase, A._StreamController, A._SyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._RunNullaryZoneFunction, A._RunUnaryZoneFunction, A._RunBinaryZoneFunction, A._RegisterNullaryZoneFunction, A._RegisterUnaryZoneFunction, A._RegisterBinaryZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.__SetBase_Object_SetMixin, A._LinkedHashSetCell, A._LinkedHashSetIterator, A.ListMixin, A._UnmodifiableMapMixin, A.SetMixin, A.Codec, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.EventStreamProvider, A.ImmutableListMixin, A.FixedSizeListIterator, A._DOMWindowCrossFrame, A._StructuredClone, A._AcceptStructuredClone, A.NullRejectionException, A.NullStreamSink, A.Context, A.Style, A.ParsedPath, A.PathException, A.Chain, A.Frame, A.LazyTrace, A.Trace, A.UnparsedFrame, A.StreamChannelMixin, A._GuaranteeSink, A.StreamChannelController]); + _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, A.NativeByteBuffer, A.NativeTypedData]); + _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, A.EventTarget, A.Blob, A.DomException, A.DomTokenList, A.Event, A._HtmlCollection_JavaScriptObject_ListMixin, A.Location]); + _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, A.TestRunner, A._JSApi]); _inherit(J.JSUnmodifiableArray, J.JSArray); - _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]); - _inherit(P.ListBase, P._ListBase_Object_ListMixin); - _inherit(H.UnmodifiableListBase, P.ListBase); - _inherit(H.CodeUnits, H.UnmodifiableListBase); - _inheritMany(P.Iterable, [H.EfficientLengthIterable, H.MappedIterable, H.WhereIterable, H.ExpandIterable, H.SkipWhileIterable, P.IterableBase, H._StringAllMatchesIterable]); - _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable, P._HashMapKeyIterable]); - _inheritMany(H.ListIterable, [H.SubListIterable, H.MappedListIterable, H.ReversedListIterable, P._JsonMapKeyIterable]); - _inherit(H.EfficientLengthMappedIterable, H.MappedIterable); - _inheritMany(P.Iterator, [H.MappedIterator, H.WhereIterator, H.SkipWhileIterator]); - _inherit(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P.MapView); - _inherit(P.UnmodifiableMapView, P._UnmodifiableMapView_MapView__UnmodifiableMapMixin); - _inherit(H.ConstantMapView, P.UnmodifiableMapView); - _inherit(H.ConstantStringMap, H.ConstantMap); - _inheritMany(H.Closure, [H.Instantiation, H.Primitives_functionNoSuchMethod_closure, H.unwrapException_saveStackTrace, H.TearOffClosure, H.JsLinkedHashMap_values_closure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._TimerImpl$periodic_closure, P._AsyncAwaitCompleter_complete_closure, P._AsyncAwaitCompleter_completeError_closure, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncComplete_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_pipe_closure, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._AddStreamState_cancel_closure, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._CustomZone_bindCallback_closure, P._CustomZone_bindUnaryCallback_closure, P._CustomZone_bindCallbackGuarded_closure, P._CustomZone_bindUnaryCallbackGuarded_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.runZoned_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P._Utf8Decoder_convert_addSingleBytes, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, P.Uri_splitQueryString_closure, P.Uri__parseIPv4Address_error, P.Uri_parseIPv6Address_error, P.Uri_parseIPv6Address_parseHex, P._Uri__Uri$notSimple_closure, P._Uri__checkNonWindowsPathReservedCharacters_closure, P._Uri__makePath_closure, P._createTables_closure, P._createTables_build, P._createTables_setChars, P._createTables_setRange, W._EventStreamSubscription_closure, P._StructuredClone_walk_closure, P._AcceptStructuredClone_walk_closure, P.convertNativePromiseToDartFuture_closure, P.convertNativePromiseToDartFuture_closure0, S.NullStreamSink_addStream_closure, M.Context_join_closure, M.Context_joinAll_closure, M.Context_split_closure, M._validateArgList_closure, X.ParsedPath_normalize_closure, L.WindowsStyle_absolutePathToUri_closure, U.Chain_Chain$parse_closure, U.Chain_Chain$parse_closure0, U.Chain_toTrace_closure, U.Chain_toString_closure0, U.Chain_toString__closure0, U.Chain_toString_closure, U.Chain_toString__closure, A.Frame_Frame$parseVM_closure, A.Frame_Frame$parseV8_closure, A.Frame_Frame$parseV8_closure_parseLocation, A.Frame_Frame$parseFirefox_closure, A.Frame_Frame$parseFriendly_closure, T.LazyTrace_terse_closure, Y.Trace_Trace$from_closure, Y.Trace__parseVM_closure, Y.Trace$parseV8_closure, Y.Trace$parseV8_closure0, Y.Trace$parseJSCore_closure, Y.Trace$parseJSCore_closure0, Y.Trace$parseFirefox_closure, Y.Trace$parseFirefox_closure0, Y.Trace$parseFriendly_closure, Y.Trace$parseFriendly_closure0, Y.Trace_terse_closure, Y.Trace_foldFrames_closure, Y.Trace_foldFrames_closure0, Y.Trace_toString_closure0, Y.Trace_toString_closure, K.GuaranteeChannel_closure, K.GuaranteeChannel__closure, K._GuaranteeSink_addStream_closure, D._MultiChannel_closure, D._MultiChannel_closure0, D._MultiChannel_closure1, D._MultiChannel__closure, D._MultiChannel_virtualChannel_closure, D._MultiChannel_virtualChannel_closure0, K.main_closure, K.main__closure, K.main__closure0, K.main__closure1, K.main__closure2, K.main__closure3, K.main_closure0, K._connectToServer_closure, K._connectToServer_closure0, K._connectToIframe_closure, K._connectToIframe_closure0, K._connectToIframe_closure1]); - _inherit(H.Instantiation1, H.Instantiation); - _inheritMany(P.Error, [H.NullError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.TypeErrorImplementation, H.CastErrorImplementation, H.RuntimeError, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]); - _inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]); - _inherit(P.MapBase, P.MapMixin); - _inheritMany(P.MapBase, [H.JsLinkedHashMap, P._HashMap, P._JsonMap]); - _inherit(H._AllMatchesIterable, P.IterableBase); - _inherit(H.NativeTypedArray, H.NativeTypedData); - _inheritMany(H.NativeTypedArray, [H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); - _inherit(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); - _inherit(H.NativeTypedArrayOfDouble, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); - _inherit(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); - _inherit(H.NativeTypedArrayOfInt, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); - _inheritMany(H.NativeTypedArrayOfInt, [H.NativeInt16List, H.NativeInt32List, H.NativeInt8List, H.NativeUint16List, H.NativeUint32List, H.NativeUint8ClampedList, H.NativeUint8List]); - _inheritMany(P._Completer, [P._AsyncCompleter, P._SyncCompleter]); - _inherit(P._SyncStreamController, P._StreamController); - _inheritMany(P.Stream, [P._StreamImpl, P._EmptyStream, W._EventStream]); - _inherit(P._ControllerStream, P._StreamImpl); - _inherit(P._ControllerSubscription, P._BufferingStreamSubscription); - _inheritMany(P._DelayedEvent, [P._DelayedData, P._DelayedError]); - _inherit(P._StreamImplEvents, P._PendingEvents); - _inheritMany(P._Zone, [P._CustomZone, P._RootZone]); - _inherit(P._LinkedHashSet, P._SetBase); - _inheritMany(P.Codec, [P.Encoding, P.Base64Codec, P._FusedCodec, P.JsonCodec]); - _inheritMany(P.Encoding, [P.AsciiCodec, P.Utf8Codec]); - _inherit(P.Converter, P.StreamTransformerBase); - _inheritMany(P.Converter, [P._UnicodeSubsetEncoder, P.Base64Encoder, P.JsonEncoder, P.JsonDecoder, P.Utf8Encoder, P.Utf8Decoder]); - _inherit(P.AsciiEncoder, P._UnicodeSubsetEncoder); - _inherit(P.JsonCyclicError, P.JsonUnsupportedObjectError); - _inherit(P._JsonStringStringifier, P._JsonStringifier); - _inheritMany(P.num, [P.double, P.int]); - _inheritMany(P.ArgumentError, [P.RangeError, P.IndexError]); - _inherit(P._DataUri, P._Uri); - _inheritMany(W.EventTarget, [W.Node, W.MessagePort, W.Window]); - _inheritMany(W.Node, [W.Element, W.CharacterData]); - _inheritMany(W.Element, [W.HtmlElement, P.SvgElement]); - _inheritMany(W.HtmlElement, [W.AnchorElement, W.AreaElement, W.FormElement, W.IFrameElement, W.SelectElement]); - _inherit(W.File, W.Blob); - _inherit(W._HtmlCollection_Interceptor_ListMixin_ImmutableListMixin, W._HtmlCollection_Interceptor_ListMixin); - _inherit(W.HtmlCollection, W._HtmlCollection_Interceptor_ListMixin_ImmutableListMixin); - _inheritMany(W.Event, [W.MessageEvent, W.UIEvent]); - _inherit(W.MouseEvent, W.UIEvent); - _inherit(W._ElementEventStreamImpl, W._EventStream); - _inherit(W._EventStreamSubscription, P.StreamSubscription); - _inherit(P._StructuredCloneDart2Js, P._StructuredClone); - _inherit(P._AcceptStructuredCloneDart2Js, P._AcceptStructuredClone); - _inherit(B.InternalStyle, O.Style); - _inheritMany(B.InternalStyle, [E.PosixStyle, F.UrlStyle, L.WindowsStyle]); - _inheritMany(R.StreamChannelMixin, [K.GuaranteeChannel, D._MultiChannel, D.VirtualChannel]); - _mixin(H.UnmodifiableListBase, H.UnmodifiableListMixin); - _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, P.ListMixin); - _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin); - _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, P.ListMixin); - _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin); - _mixin(P._SyncStreamController, P._SyncStreamControllerDispatch); - _mixin(P._ListBase_Object_ListMixin, P.ListMixin); - _mixin(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P._UnmodifiableMapMixin); - _mixin(W._HtmlCollection_Interceptor_ListMixin, P.ListMixin); - _mixin(W._HtmlCollection_Interceptor_ListMixin_ImmutableListMixin, W.ImmutableListMixin); + _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); + _inheritMany(A.Stream, [A.CastStream, A._StreamImpl, A._EmptyStream, A._EventStream]); + _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A.RuntimeError, A.AssertionError, A._Error, A.JsonUnsupportedObjectError, A.NullThrownError, A.ArgumentError, A.NoSuchMethodError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError, A.CyclicInitializationError]); + _inherit(A.ListBase, A._ListBase_Object_ListMixin); + _inherit(A.UnmodifiableListBase, A.ListBase); + _inherit(A.CodeUnits, A.UnmodifiableListBase); + _inheritMany(A.Closure, [A.Closure0Args, A.Instantiation, A.Closure2Args, A.TearOffClosure, A.JsLinkedHashMap_values_closure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__chainForeignFuture_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_pipe_closure, A.Stream_length_closure, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._Uri__makePath_closure, A._createTables_setChars, A._createTables_setRange, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.WindowsStyle_absolutePathToUri_closure, A.Chain_Chain$parse_closure, A.Chain_Chain$parse_closure0, A.Chain_Chain$parse_closure1, A.Chain_toTrace_closure, A.Chain_toString_closure0, A.Chain_toString__closure0, A.Chain_toString_closure, A.Chain_toString__closure, A.Trace__parseVM_closure, A.Trace__parseVM_closure0, A.Trace$parseV8_closure, A.Trace$parseV8_closure0, A.Trace$parseJSCore_closure, A.Trace$parseJSCore_closure0, A.Trace$parseFirefox_closure, A.Trace$parseFirefox_closure0, A.Trace$parseFriendly_closure, A.Trace$parseFriendly_closure0, A.Trace_terse_closure, A.Trace_foldFrames_closure, A.Trace_foldFrames_closure0, A.Trace_toString_closure0, A.Trace_toString_closure, A._GuaranteeSink_addStream_closure, A._MultiChannel_closure, A._MultiChannel_closure1, A._MultiChannel_virtualChannel_closure, A.main__closure, A.main__closure0, A.main__closure1, A._connectToServer_closure, A._connectToServer_closure0, A._connectToIframe_closure, A._connectToIframe_closure0, A._connectToIframe_closure1]); + _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainForeignFuture_closure1, A._Future__asyncCompleteWithValue_closure, A._Future__chainFuture_closure, A._Future__asyncCompleteError_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A.Stream_length_closure0, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._AddStreamState_cancel_closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A.Utf8Decoder__decoder_closure, A.Utf8Decoder__decoderNonfatal_closure, A.NullStreamSink_addStream_closure, A.Frame_Frame$parseVM_closure, A.Frame_Frame$parseV8_closure, A.Frame_Frame$_parseFirefoxEval_closure, A.Frame_Frame$parseFirefox_closure, A.Frame_Frame$parseFriendly_closure, A.LazyTrace_terse_closure, A.Trace_Trace$from_closure, A.GuaranteeChannel_closure, A.GuaranteeChannel__closure, A._MultiChannel_closure0, A._MultiChannel__closure, A._MultiChannel_virtualChannel_closure0, A.main_closure, A.main__closure2, A.main__closure3]); + _inheritMany(A.Iterable, [A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipWhileIterable, A.WhereTypeIterable, A.IterableBase, A._StringAllMatchesIterable]); + _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.LinkedHashMapKeyIterable, A._HashMapKeyIterable]); + _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A._JsonMapKeyIterable]); + _inherit(A.EfficientLengthMappedIterable, A.MappedIterable); + _inheritMany(A.Iterator, [A.MappedIterator, A.WhereIterator, A.TakeIterator, A.SkipWhileIterator]); + _inherit(A.EfficientLengthTakeIterable, A.TakeIterable); + _inherit(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A.MapView); + _inherit(A.UnmodifiableMapView, A._UnmodifiableMapView_MapView__UnmodifiableMapMixin); + _inherit(A.ConstantMapView, A.UnmodifiableMapView); + _inherit(A.ConstantStringMap, A.ConstantMap); + _inherit(A.Instantiation1, A.Instantiation); + _inheritMany(A.Closure2Args, [A.Primitives_functionNoSuchMethod_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__chainForeignFuture_closure0, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A.NoSuchMethodError_toString_closure, A.Uri_splitQueryString_closure, A.Uri__parseIPv4Address_error, A.Uri_parseIPv6Address_error, A.Uri_parseIPv6Address_parseHex, A._createTables_build, A._StructuredClone_walk_closure, A._StructuredClone_walk_closure0, A._AcceptStructuredClone_walk_closure, A.Frame_Frame$parseV8_closure_parseLocation, A.main_closure0]); + _inherit(A.NullError, A.TypeError); + _inheritMany(A.TearOffClosure, [A.StaticClosure, A.BoundClosure]); + _inherit(A._AssertionError, A.AssertionError); + _inherit(A.MapBase, A.MapMixin); + _inheritMany(A.MapBase, [A.JsLinkedHashMap, A._HashMap, A._JsonMap]); + _inherit(A._AllMatchesIterable, A.IterableBase); + _inherit(A.NativeTypedArray, A.NativeTypedData); + _inheritMany(A.NativeTypedArray, [A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); + _inherit(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfDouble, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inherit(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfInt, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inheritMany(A.NativeTypedArrayOfInt, [A.NativeInt16List, A.NativeInt32List, A.NativeInt8List, A.NativeUint16List, A.NativeUint32List, A.NativeUint8ClampedList, A.NativeUint8List]); + _inherit(A._TypeError, A._Error); + _inheritMany(A._Completer, [A._AsyncCompleter, A._SyncCompleter]); + _inherit(A._SyncStreamController, A._StreamController); + _inherit(A._ControllerStream, A._StreamImpl); + _inherit(A._ControllerSubscription, A._BufferingStreamSubscription); + _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]); + _inherit(A._StreamImplEvents, A._PendingEvents); + _inheritMany(A._Zone, [A._CustomZone, A._RootZone]); + _inherit(A._SetBase, A.__SetBase_Object_SetMixin); + _inherit(A._LinkedHashSet, A._SetBase); + _inheritMany(A.Codec, [A.Encoding, A.Base64Codec, A._FusedCodec, A.JsonCodec]); + _inheritMany(A.Encoding, [A.AsciiCodec, A.Utf8Codec]); + _inherit(A.Converter, A.StreamTransformerBase); + _inheritMany(A.Converter, [A._UnicodeSubsetEncoder, A.Base64Encoder, A.JsonEncoder, A.JsonDecoder, A.Utf8Encoder, A.Utf8Decoder]); + _inherit(A.AsciiEncoder, A._UnicodeSubsetEncoder); + _inherit(A.JsonCyclicError, A.JsonUnsupportedObjectError); + _inherit(A._JsonStringStringifier, A._JsonStringifier); + _inheritMany(A.ArgumentError, [A.RangeError, A.IndexError]); + _inherit(A._DataUri, A._Uri); + _inheritMany(A.EventTarget, [A.Node, A.MessagePort, A.Window]); + _inheritMany(A.Node, [A.Element, A.CharacterData]); + _inheritMany(A.Element, [A.HtmlElement, A.SvgElement]); + _inheritMany(A.HtmlElement, [A.AnchorElement, A.AreaElement, A.FormElement, A.IFrameElement, A.SelectElement]); + _inherit(A.File, A.Blob); + _inherit(A._HtmlCollection_JavaScriptObject_ListMixin_ImmutableListMixin, A._HtmlCollection_JavaScriptObject_ListMixin); + _inherit(A.HtmlCollection, A._HtmlCollection_JavaScriptObject_ListMixin_ImmutableListMixin); + _inheritMany(A.Event, [A.MessageEvent, A.UIEvent]); + _inherit(A.MouseEvent, A.UIEvent); + _inherit(A._ElementEventStreamImpl, A._EventStream); + _inherit(A._EventStreamSubscription, A.StreamSubscription); + _inherit(A._StructuredCloneDart2Js, A._StructuredClone); + _inherit(A._AcceptStructuredCloneDart2Js, A._AcceptStructuredClone); + _inherit(A.InternalStyle, A.Style); + _inheritMany(A.InternalStyle, [A.PosixStyle, A.UrlStyle, A.WindowsStyle]); + _inheritMany(A.StreamChannelMixin, [A.GuaranteeChannel, A._MultiChannel, A.VirtualChannel]); + _mixin(A.UnmodifiableListBase, A.UnmodifiableListMixin); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListMixin); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListMixin); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._SyncStreamController, A._SyncStreamControllerDispatch); + _mixin(A._ListBase_Object_ListMixin, A.ListMixin); + _mixin(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A._UnmodifiableMapMixin); + _mixin(A.__SetBase_Object_SetMixin, A.SetMixin); + _mixin(A._HtmlCollection_JavaScriptObject_ListMixin, A.ListMixin); + _mixin(A._HtmlCollection_JavaScriptObject_ListMixin_ImmutableListMixin, A.ImmutableListMixin); + })(); + var init = { + typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, + mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, + mangledNames: {}, + types: ["~()", "bool(String)", "Null()", "~(@)", "Frame(String)", "Frame()", "~(~())", "Null(@)", "~(MessageEvent)", "~(Object,StackTrace)", "~(Object[StackTrace?])", "~(Object?)", "bool(Frame)", "Trace()", "@(@)", "String(Frame)", "int(Frame)", "Trace(String)", "~(Event)", "~(Uint8List,String,int)", "String(String)", "~(Object?,Object?)", "@()", "~(Symbol0,@)", "~(String,int)", "~(String,int?)", "int(int,int)", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "Uint8List(@,@)", "Future<@>(@)", "_Future<@>(@)", "~(@,@)", "Null(@,@)", "@(@,@)", "Map(Map,String)", "String(String?)", "Null(Object,StackTrace)", "List(Trace)", "int(Trace)", "~([Object?])", "String(Trace)", "~(int,@)", "@(@,String)", "Frame(String,String)", "~(String,@)", "0^(0^,0^)", "Future()", "Frame(Frame)", "~(List<@>)", "~(Timer)", "~(MouseEvent)", "Null(~())", "Future<~>(@)", "@(String)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "~(String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "Null(@,StackTrace)"], + interceptorsByTag: null, + leafTags: null, + arrayRti: Symbol("$ti") + }; + A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","TestRunner":"LegacyJavaScriptObject","_JSApi":"LegacyJavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","AudioElement":"HtmlElement","MediaElement":"HtmlElement","HtmlDocument":"Node","Document":"Node","PointerEvent":"MouseEvent","WebSocket":"EventTarget","CompositionEvent":"UIEvent","CDataSection":"CharacterData","Text":"CharacterData","HtmlFormControlsCollection":"HtmlCollection","NativeFloat32List":"NativeTypedArrayOfDouble","NativeByteData":"NativeTypedData","JSBool":{"bool":[]},"JSNull":{"Null":[]},"LegacyJavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSNumNotInt":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"CastStream":{"Stream":["2"],"Stream.T":"2"},"CastStreamSubscription":{"StreamSubscription":["2"]},"LateError":{"Error":[]},"CodeUnits":{"ListMixin":["int"],"UnmodifiableListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListMixin.E":"int","UnmodifiableListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereIterator":{"Iterator":["1"]},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"ExpandIterator":{"Iterator":["2"]},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"TakeIterator":{"Iterator":["1"]},"SkipWhileIterable":{"Iterable":["1"],"Iterable.E":"1"},"SkipWhileIterator":{"Iterator":["1"]},"EmptyIterator":{"Iterator":["1"]},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterator":{"Iterator":["1"]},"UnmodifiableListBase":{"ListMixin":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"Instantiation":{"Closure":[],"Function":[]},"Instantiation1":{"Closure":[],"Function":[]},"JSInvocationMirror":{"Invocation":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Closure":[],"Function":[]},"Closure2Args":{"Closure":[],"Function":[]},"TearOffClosure":{"Closure":[],"Function":[]},"StaticClosure":{"Closure":[],"Function":[]},"BoundClosure":{"Closure":[],"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"JSSyntaxRegExp":{"RegExp":[],"Pattern":[]},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"_AllMatchesIterator":{"Iterator":["RegExpMatch"]},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"_StringAllMatchesIterator":{"Iterator":["Match"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"NativeTypedData":[]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"NativeTypedData":[],"EfficientLengthIterable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"Uint8List":[],"JavaScriptIndexingBehavior":["int"],"List":["int"],"NativeTypedData":[],"EfficientLengthIterable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_Future":{"Future":["1"]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"StreamTransformerBase":{"StreamTransformer":["1","2"]},"_StreamController":{"StreamController":["1"],"StreamSink":["1"],"StreamConsumer":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_SyncStreamController":{"_SyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"StreamConsumer":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamSinkWrapper":{"StreamSink":["1"],"StreamConsumer":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_EmptyStream":{"Stream":["1"],"Stream.T":"1"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"_Zone":[],"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_HashMap":{"MapMixin":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashMapKeyIterator":{"Iterator":["1"]},"_LinkedHashSet":{"SetMixin":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_LinkedHashSetIterator":{"Iterator":["1"]},"IterableBase":{"Iterable":["1"]},"ListBase":{"ListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"_SetBase":{"SetMixin":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Codec":["String","List"],"Codec.S":"String"},"_UnicodeSubsetEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"AsciiEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Base64Codec":{"Codec":["List","String"],"Codec.S":"List"},"Base64Encoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"_FusedCodec":{"Codec":["1","3"],"Codec.S":"1"},"Converter":{"StreamTransformer":["1","2"]},"Encoding":{"Codec":["String","List"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"],"StreamTransformer":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"],"StreamTransformer":["String","Object?"]},"Utf8Codec":{"Codec":["String","List"],"Codec.S":"String"},"Utf8Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Utf8Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"double":{"num":[]},"int":{"num":[]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"RegExpMatch":{"Match":[]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"IFrameElement":{"Element":[],"Node":[],"EventTarget":[]},"MessageEvent":{"Event":[]},"MessagePort":{"EventTarget":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"HtmlElement":{"Element":[],"Node":[],"EventTarget":[]},"AnchorElement":{"Element":[],"Node":[],"EventTarget":[]},"AreaElement":{"Element":[],"Node":[],"EventTarget":[]},"CharacterData":{"Node":[],"EventTarget":[]},"Element":{"Node":[],"EventTarget":[]},"File":{"Blob":[]},"FormElement":{"Element":[],"Node":[],"EventTarget":[]},"HtmlCollection":{"ListMixin":["Node"],"ImmutableListMixin":["Node"],"List":["Node"],"JavaScriptIndexingBehavior":["Node"],"EfficientLengthIterable":["Node"],"Iterable":["Node"],"ImmutableListMixin.E":"Node","ListMixin.E":"Node"},"SelectElement":{"Element":[],"Node":[],"EventTarget":[]},"UIEvent":{"Event":[]},"Window":{"WindowBase":[],"EventTarget":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"FixedSizeListIterator":{"Iterator":["1"]},"_DOMWindowCrossFrame":{"WindowBase":[],"EventTarget":[]},"NullRejectionException":{"Exception":[]},"SvgElement":{"Element":[],"Node":[],"EventTarget":[]},"NullStreamSink":{"StreamSink":["1"],"StreamConsumer":["1"]},"PathException":{"Exception":[]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"Chain":{"StackTrace":[]},"LazyTrace":{"Trace":[],"StackTrace":[]},"Trace":{"StackTrace":[]},"UnparsedFrame":{"Frame":[]},"GuaranteeChannel":{"StreamChannelMixin":["1"],"StreamChannel":["1"]},"_GuaranteeSink":{"StreamSink":["1"],"StreamConsumer":["1"]},"_MultiChannel":{"StreamChannelMixin":["1"],"MultiChannel":["1"],"StreamChannel":["1"]},"VirtualChannel":{"StreamChannelMixin":["1"],"MultiChannel":["1"],"StreamChannel":["1"]},"StreamChannelMixin":{"StreamChannel":["1"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]}}')); + A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"UnmodifiableListBase":1,"NativeTypedArray":1,"StreamTransformerBase":2,"IterableBase":1,"ListBase":1,"MapBase":2,"_SetBase":1,"_ListBase_Object_ListMixin":1,"__SetBase_Object_SetMixin":1}')); + var string$ = { + ______: "===== asynchronous gap ===========================\n", + Cannotff: "Cannot extract a file path from a URI with a fragment component", + Cannotfq: "Cannot extract a file path from a URI with a query component", + Cannotn: "Cannot extract a non-Windows file path from a file URI with an authority", + Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type", + handle: "handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace." + }; + var type$ = (function rtii() { + var findType = A.findType; + return { + AsyncError: findType("AsyncError"), + Blob: findType("Blob"), + ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), + Duration: findType("Duration"), + EfficientLengthIterable_dynamic: findType("EfficientLengthIterable<@>"), + Error: findType("Error"), + Event: findType("Event"), + Exception: findType("Exception"), + File: findType("File"), + Frame: findType("Frame"), + Frame_Function_Frame: findType("Frame(Frame)"), + Frame_Function_String: findType("Frame(String)"), + Function: findType("Function"), + Future_dynamic: findType("Future<@>"), + Future_void: findType("Future<~>"), + InternalStyle: findType("InternalStyle"), + Invocation: findType("Invocation"), + Iterable_String: findType("Iterable"), + Iterable_dynamic: findType("Iterable<@>"), + JSArray_Frame: findType("JSArray"), + JSArray_MessagePort: findType("JSArray"), + JSArray_StreamSubscription_void: findType("JSArray>"), + JSArray_String: findType("JSArray"), + JSArray_Trace: findType("JSArray"), + JSArray_Uint8List: findType("JSArray"), + JSArray_dynamic: findType("JSArray<@>"), + JSArray_int: findType("JSArray"), + JSArray_nullable_String: findType("JSArray"), + JSNull: findType("JSNull"), + JSObject: findType("JSObject"), + JavaScriptFunction: findType("JavaScriptFunction"), + JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), + JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), + List_Object: findType("List"), + List_String: findType("List"), + List_dynamic: findType("List<@>"), + List_int: findType("List"), + Location: findType("Location"), + Map_String_String: findType("Map"), + Map_dynamic_dynamic: findType("Map<@,@>"), + MappedIterable_String_Frame: findType("MappedIterable"), + MappedListIterable_Frame_Frame: findType("MappedListIterable"), + MappedListIterable_String_Trace: findType("MappedListIterable"), + MappedListIterable_String_dynamic: findType("MappedListIterable"), + MessageEvent: findType("MessageEvent"), + MessagePort: findType("MessagePort"), + MouseEvent: findType("MouseEvent"), + NativeByteBuffer: findType("NativeByteBuffer"), + NativeTypedData: findType("NativeTypedData"), + NativeUint8List: findType("NativeUint8List"), + Node: findType("Node"), + Null: findType("Null"), + Object: findType("Object"), + Pattern: findType("Pattern"), + RegExp: findType("RegExp"), + RegExpMatch: findType("RegExpMatch"), + StackTrace: findType("StackTrace"), + String: findType("String"), + Symbol: findType("Symbol0"), + Timer: findType("Timer"), + Trace: findType("Trace"), + Trace_Function_String: findType("Trace(String)"), + TypeError: findType("TypeError"), + Uint8List: findType("Uint8List"), + UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), + UnmodifiableMapView_String_String: findType("UnmodifiableMapView"), + Uri: findType("Uri"), + WhereIterable_String: findType("WhereIterable"), + WhereTypeIterable_String: findType("WhereTypeIterable"), + WindowBase: findType("WindowBase"), + Zone: findType("Zone"), + _AsyncCompleter_dynamic: findType("_AsyncCompleter<@>"), + _ElementEventStreamImpl_MouseEvent: findType("_ElementEventStreamImpl"), + _Future_dynamic: findType("_Future<@>"), + _Future_int: findType("_Future"), + _Future_void: findType("_Future<~>"), + _StreamControllerAddStreamState_nullable_Object: findType("_StreamControllerAddStreamState"), + _SyncCompleter_dynamic: findType("_SyncCompleter<@>"), + _ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace: findType("_ZoneFunction<~(Zone,ZoneDelegate,Zone,Object,StackTrace)>"), + bool: findType("bool"), + bool_Function_Frame: findType("bool(Frame)"), + bool_Function_Object: findType("bool(Object)"), + bool_Function_String: findType("bool(String)"), + double: findType("double"), + dynamic: findType("@"), + dynamic_Function: findType("@()"), + dynamic_Function_Object: findType("@(Object)"), + dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), + dynamic_Function_String: findType("@(String)"), + dynamic_Function_dynamic_dynamic: findType("@(@,@)"), + int: findType("int"), + legacy_Never: findType("0&*"), + legacy_Object: findType("Object*"), + nullable_Future_Null: findType("Future?"), + nullable_List_Object: findType("List?"), + nullable_List_dynamic: findType("List<@>?"), + nullable_Map_of_nullable_Object_and_nullable_Object: findType("Map?"), + nullable_Object: findType("Object?"), + nullable_StackTrace: findType("StackTrace?"), + nullable_Zone: findType("Zone?"), + nullable_ZoneDelegate: findType("ZoneDelegate?"), + nullable_ZoneSpecification: findType("ZoneSpecification?"), + nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"), + nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"), + nullable__LinkedHashSetCell: findType("_LinkedHashSetCell?"), + nullable_dynamic_Function_Event: findType("@(Event)?"), + nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object: findType("Object?(Object?,Object?)?"), + nullable_nullable_Object_Function_dynamic: findType("Object?(@)?"), + nullable_void_Function: findType("~()?"), + nullable_void_Function_MessageEvent: findType("~(MessageEvent)?"), + num: findType("num"), + void: findType("~"), + void_Function: findType("~()"), + void_Function_$opt_dynamic: findType("~([@])"), + void_Function_Object: findType("~(Object)"), + void_Function_Object_StackTrace: findType("~(Object,StackTrace)"), + void_Function_String_dynamic: findType("~(String,@)"), + void_Function_Timer: findType("~(Timer)") + }; })(); (function constants() { var makeConstList = hunkHelpers.makeConstList; - C.Interceptor_methods = J.Interceptor.prototype; - C.JSArray_methods = J.JSArray.prototype; - C.JSInt_methods = J.JSInt.prototype; - C.JSNumber_methods = J.JSNumber.prototype; - C.JSString_methods = J.JSString.prototype; - C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; - C.Location_methods = W.Location.prototype; - C.MessagePort_methods = W.MessagePort.prototype; - C.NativeUint8List_methods = H.NativeUint8List.prototype; - C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; - C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; - C.Window_methods = W.Window.prototype; - C.AsciiCodec_false = new P.AsciiCodec(false); - C.AsciiEncoder_127 = new P.AsciiEncoder(127); - C.Base64Encoder_false = new P.Base64Encoder(false); - C.Base64Codec_Base64Encoder_false = new P.Base64Codec(C.Base64Encoder_false); - C.C_EmptyIterator = new H.EmptyIterator([P.Null]); - C.C_JS_CONST = function getTagFallback(o) { + B.IFrameElement_methods = A.IFrameElement.prototype; + B.Interceptor_methods = J.Interceptor.prototype; + B.JSArray_methods = J.JSArray.prototype; + B.JSInt_methods = J.JSInt.prototype; + B.JSNumber_methods = J.JSNumber.prototype; + B.JSString_methods = J.JSString.prototype; + B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; + B.JavaScriptObject_methods = J.JavaScriptObject.prototype; + B.Location_methods = A.Location.prototype; + B.MessagePort_methods = A.MessagePort.prototype; + B.NativeUint8List_methods = A.NativeUint8List.prototype; + B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; + B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; + B.Window_methods = A.Window.prototype; + B.AsciiEncoder_127 = new A.AsciiEncoder(127); + B.CONSTANT = new A.Instantiation1(A.math__max$closure(), A.findType("Instantiation1")); + B.C_AsciiCodec = new A.AsciiCodec(); + B.C_Base64Encoder = new A.Base64Encoder(); + B.C_Base64Codec = new A.Base64Codec(); + B.C_EmptyIterator = new A.EmptyIterator(A.findType("EmptyIterator<0&>")); + B.C_JS_CONST = function getTagFallback(o) { var s = Object.prototype.toString.call(o); return s.substring(8, s.length - 1); }; - C.C_JS_CONST0 = function() { + B.C_JS_CONST0 = function() { var toStringFunction = Object.prototype.toString; function getTag(o) { var s = toStringFunction.call(o); @@ -14716,7 +15652,7 @@ prototypeForTag: prototypeForTag, discriminator: discriminator }; }; - C.C_JS_CONST6 = function(getTagFallback) { + B.C_JS_CONST6 = function(getTagFallback) { return function(hooks) { if (typeof navigator != "object") return hooks; var ua = navigator.userAgent; @@ -14730,11 +15666,11 @@ hooks.getTag = getTagFallback; }; }; - C.C_JS_CONST1 = function(hooks) { + B.C_JS_CONST1 = function(hooks) { if (typeof dartExperimentalFixupGetTag != "function") return hooks; hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); }; - C.C_JS_CONST2 = function(hooks) { + B.C_JS_CONST2 = function(hooks) { var getTag = hooks.getTag; var prototypeForTag = hooks.prototypeForTag; function getTagFixed(o) { @@ -14752,7 +15688,7 @@ hooks.getTag = getTagFixed; hooks.prototypeForTag = prototypeForTagFixed; }; - C.C_JS_CONST5 = function(hooks) { + B.C_JS_CONST5 = function(hooks) { var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; if (userAgent.indexOf("Firefox") == -1) return hooks; var getTag = hooks.getTag; @@ -14769,7 +15705,7 @@ } hooks.getTag = getTagFirefox; }; - C.C_JS_CONST4 = function(hooks) { + B.C_JS_CONST4 = function(hooks) { var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; if (userAgent.indexOf("Trident/") == -1) return hooks; var getTag = hooks.getTag; @@ -14798,56 +15734,57 @@ hooks.getTag = getTagIE; hooks.prototypeForTag = prototypeForTagIE; }; - C.C_JS_CONST3 = function(hooks) { return hooks; } + B.C_JS_CONST3 = function(hooks) { return hooks; } ; - C.C_OutOfMemoryError = new P.OutOfMemoryError(); - C.C_Utf8Encoder = new P.Utf8Encoder(); - C.C__DelayedDone = new P._DelayedDone(); - C.C__RootZone = new P._RootZone(); - C.Duration_0 = new P.Duration(0); - C.JsonCodec_null_null = new P.JsonCodec(null, null); - C.JsonDecoder_null = new P.JsonDecoder(null); - C.JsonEncoder_null_null = new P.JsonEncoder(null, null); - C.List_127_2047_65535_1114111 = H.setRuntimeTypeInfo(makeConstList([127, 2047, 65535, 1114111]), [P.int]); - C.List_2Vk = H.setRuntimeTypeInfo(makeConstList([0, 0, 32776, 33792, 1, 10240, 0, 0]), [P.int]); - C.List_CVk = H.setRuntimeTypeInfo(makeConstList([0, 0, 65490, 45055, 65535, 34815, 65534, 18431]), [P.int]); - C.List_JYB = H.setRuntimeTypeInfo(makeConstList([0, 0, 26624, 1023, 65534, 2047, 65534, 2047]), [P.int]); - C.List_WnV = H.setRuntimeTypeInfo(makeConstList(["/", "\\"]), [P.String]); - C.List_cSk = H.setRuntimeTypeInfo(makeConstList(["/"]), [P.String]); - C.List_empty = H.setRuntimeTypeInfo(makeConstList([]), [P.String]); - C.List_empty0 = makeConstList([]); - C.List_gRj = H.setRuntimeTypeInfo(makeConstList([0, 0, 32722, 12287, 65534, 34815, 65534, 18431]), [P.int]); - C.List_nxB = H.setRuntimeTypeInfo(makeConstList([0, 0, 24576, 1023, 65534, 34815, 65534, 18431]), [P.int]); - C.List_qFt = H.setRuntimeTypeInfo(makeConstList([0, 0, 27858, 1023, 65534, 51199, 65535, 32767]), [P.int]); - C.List_qNA = H.setRuntimeTypeInfo(makeConstList([0, 0, 32754, 11263, 65534, 34815, 65534, 18431]), [P.int]); - C.List_qg40 = H.setRuntimeTypeInfo(makeConstList([0, 0, 32722, 12287, 65535, 34815, 65534, 18431]), [P.int]); - C.List_qg4 = H.setRuntimeTypeInfo(makeConstList([0, 0, 65490, 12287, 65535, 34815, 65534, 18431]), [P.int]); - C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty, [P.String, P.String]); - C.List_empty1 = H.setRuntimeTypeInfo(makeConstList([]), [P.Symbol0]); - C.Map_empty0 = new H.ConstantStringMap(0, {}, C.List_empty1, [P.Symbol0, null]); - C.Symbol_call = new H.Symbol("call"); - C.Utf8Codec_false = new P.Utf8Codec(false); - C._ZoneFunction_3bB = new P._ZoneFunction(C.C__RootZone, P.async___rootCreatePeriodicTimer$closure(), [{func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, ret: -1, args: [P.Timer]}]}]); - C._ZoneFunction_7G2 = new P._ZoneFunction(C.C__RootZone, P.async___rootRegisterBinaryCallback$closure(), [P.Function]); - C._ZoneFunction_Eeh = new P._ZoneFunction(C.C__RootZone, P.async___rootRegisterUnaryCallback$closure(), [P.Function]); - C._ZoneFunction_NMc = new P._ZoneFunction(C.C__RootZone, P.async___rootHandleUncaughtError$closure(), [{func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}]); - C._ZoneFunction__RootZone__rootCreateTimer = new P._ZoneFunction(C.C__RootZone, P.async___rootCreateTimer$closure(), [{func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, ret: -1}]}]); - C._ZoneFunction__RootZone__rootErrorCallback = new P._ZoneFunction(C.C__RootZone, P.async___rootErrorCallback$closure(), [{func: 1, ret: P.AsyncError, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}]); - C._ZoneFunction__RootZone__rootFork = new P._ZoneFunction(C.C__RootZone, P.async___rootFork$closure(), [{func: 1, ret: P.Zone, args: [P.Zone, P.ZoneDelegate, P.Zone, P.ZoneSpecification, [P.Map,,,]]}]); - C._ZoneFunction__RootZone__rootPrint = new P._ZoneFunction(C.C__RootZone, P.async___rootPrint$closure(), [{func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, P.String]}]); - C._ZoneFunction__RootZone__rootRegisterCallback = new P._ZoneFunction(C.C__RootZone, P.async___rootRegisterCallback$closure(), [P.Function]); - C._ZoneFunction__RootZone__rootRun = new P._ZoneFunction(C.C__RootZone, P.async___rootRun$closure(), [P.Function]); - C._ZoneFunction__RootZone__rootRunBinary = new P._ZoneFunction(C.C__RootZone, P.async___rootRunBinary$closure(), [P.Function]); - C._ZoneFunction__RootZone__rootRunUnary = new P._ZoneFunction(C.C__RootZone, P.async___rootRunUnary$closure(), [P.Function]); - C._ZoneFunction__RootZone__rootScheduleMicrotask = new P._ZoneFunction(C.C__RootZone, P.async___rootScheduleMicrotask$closure(), [{func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: -1}]}]); - C._ZoneSpecification_ALf = new P._ZoneSpecification(null, null, null, null, null, null, null, null, null, null, null, null, null); + B.C_JsonCodec = new A.JsonCodec(); + B.C_OutOfMemoryError = new A.OutOfMemoryError(); + B.C_SentinelValue = new A.SentinelValue(); + B.C_Utf8Codec = new A.Utf8Codec(); + B.C_Utf8Encoder = new A.Utf8Encoder(); + B.C__DelayedDone = new A._DelayedDone(); + B.C__Required = new A._Required(); + B.C__RootZone = new A._RootZone(); + B.Duration_0 = new A.Duration(0); + B.JsonDecoder_null = new A.JsonDecoder(null); + B.JsonEncoder_null = new A.JsonEncoder(null); + B.List_2Vk = A._setArrayType(makeConstList([0, 0, 32776, 33792, 1, 10240, 0, 0]), type$.JSArray_int); + B.List_CVk = A._setArrayType(makeConstList([0, 0, 65490, 45055, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_JYB = A._setArrayType(makeConstList([0, 0, 26624, 1023, 65534, 2047, 65534, 2047]), type$.JSArray_int); + B.List_empty = A._setArrayType(makeConstList([]), type$.JSArray_String); + B.List_empty0 = A._setArrayType(makeConstList([]), type$.JSArray_dynamic); + B.List_gRj = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.List_nxB = A._setArrayType(makeConstList([0, 0, 24576, 1023, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.List_qFt = A._setArrayType(makeConstList([0, 0, 27858, 1023, 65534, 51199, 65535, 32767]), type$.JSArray_int); + B.List_qNA = A._setArrayType(makeConstList([0, 0, 32754, 11263, 65534, 34815, 65534, 18431]), type$.JSArray_int); + B.List_qg40 = A._setArrayType(makeConstList([0, 0, 32722, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.List_qg4 = A._setArrayType(makeConstList([0, 0, 65490, 12287, 65535, 34815, 65534, 18431]), type$.JSArray_int); + B.Map_empty = new A.ConstantStringMap(0, {}, B.List_empty, A.findType("ConstantStringMap")); + B.List_empty1 = A._setArrayType(makeConstList([]), A.findType("JSArray")); + B.Map_empty0 = new A.ConstantStringMap(0, {}, B.List_empty1, A.findType("ConstantStringMap")); + B.Symbol_call = new A.Symbol("call"); + B.Type_Object_xQ6 = A.typeLiteral("Object"); + B.Utf8Decoder_false = new A.Utf8Decoder(false); + B._RegisterBinaryZoneFunction_kGu = new A._RegisterBinaryZoneFunction(B.C__RootZone, A.async___rootRegisterBinaryCallback$closure()); + B._RegisterNullaryZoneFunction__RootZone__rootRegisterCallback = new A._RegisterNullaryZoneFunction(B.C__RootZone, A.async___rootRegisterCallback$closure()); + B._RegisterUnaryZoneFunction_Bqo = new A._RegisterUnaryZoneFunction(B.C__RootZone, A.async___rootRegisterUnaryCallback$closure()); + B._RunBinaryZoneFunction__RootZone__rootRunBinary = new A._RunBinaryZoneFunction(B.C__RootZone, A.async___rootRunBinary$closure()); + B._RunNullaryZoneFunction__RootZone__rootRun = new A._RunNullaryZoneFunction(B.C__RootZone, A.async___rootRun$closure()); + B._RunUnaryZoneFunction__RootZone__rootRunUnary = new A._RunUnaryZoneFunction(B.C__RootZone, A.async___rootRunUnary$closure()); + B._StringStackTrace_3uE = new A._StringStackTrace(""); + B._ZoneFunction_3bB = new A._ZoneFunction(B.C__RootZone, A.async___rootCreatePeriodicTimer$closure(), A.findType("_ZoneFunction")); + B._ZoneFunction_NMc = new A._ZoneFunction(B.C__RootZone, A.async___rootHandleUncaughtError$closure(), type$._ZoneFunction_of_void_Function_Zone_ZoneDelegate_Zone_Object_StackTrace); + B._ZoneFunction__RootZone__rootCreateTimer = new A._ZoneFunction(B.C__RootZone, A.async___rootCreateTimer$closure(), A.findType("_ZoneFunction")); + B._ZoneFunction__RootZone__rootErrorCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootErrorCallback$closure(), A.findType("_ZoneFunction")); + B._ZoneFunction__RootZone__rootFork = new A._ZoneFunction(B.C__RootZone, A.async___rootFork$closure(), A.findType("_ZoneFunction?)>")); + B._ZoneFunction__RootZone__rootPrint = new A._ZoneFunction(B.C__RootZone, A.async___rootPrint$closure(), A.findType("_ZoneFunction<~(Zone,ZoneDelegate,Zone,String)>")); + B._ZoneFunction__RootZone__rootScheduleMicrotask = new A._ZoneFunction(B.C__RootZone, A.async___rootScheduleMicrotask$closure(), A.findType("_ZoneFunction<~(Zone,ZoneDelegate,Zone,~())>")); })(); (function staticFields() { + $._JS_INTEROP_INTERCEPTOR_TAG = null; $.printToZone = null; - $.Closure_functionCounter = 0; - $.BoundClosure_selfFieldNameCache = null; - $.BoundClosure_receiverFieldNameCache = null; - $._inTypeAssertion = false; + $.Primitives__identityHashCodeProperty = null; + $.BoundClosure__receiverFieldNameCache = null; + $.BoundClosure__interceptorFieldNameCache = null; $.getTagFunction = null; $.alternateTagFunction = null; $.prototypeForTagFunction = null; @@ -14858,195 +15795,101 @@ $._lastCallback = null; $._lastPriorityCallback = null; $._isInCallbackLoop = false; - $.Zone__current = C.C__RootZone; + $.Zone__current = B.C__RootZone; $._RootZone__rootDelegate = null; + $._toStringVisiting = A._setArrayType([], A.findType("JSArray")); $._currentUriBase = null; $._current = null; + $._iframes = A.LinkedHashMap_LinkedHashMap$_empty(type$.int, A.findType("IFrameElement")); + $._subscriptions = A.LinkedHashMap_LinkedHashMap$_empty(type$.int, A.findType("List>")); })(); (function lazyInitializers() { - var _lazy = hunkHelpers.lazy; - _lazy($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { - return H.getIsolateAffinityTag("_$dart_dartClosure"); - }); - _lazy($, "JS_INTEROP_INTERCEPTOR_TAG", "$get$JS_INTEROP_INTERCEPTOR_TAG", function() { - return H.getIsolateAffinityTag("_$dart_js"); - }); - _lazy($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ - toString: function() { - return "$receiver$"; - } - })); - }); - _lazy($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null, - toString: function() { - return "$receiver$"; - } - })); - }); - _lazy($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null)); - }); - _lazy($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = '$arguments$'; - try { - null.$method$($argumentsExpr$); - } catch (e) { - return e.message; - } - }()); - }); - _lazy($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0)); - }); - _lazy($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - var $argumentsExpr$ = '$arguments$'; - try { - (void 0).$method$($argumentsExpr$); - } catch (e) { - return e.message; - } - }()); - }); - _lazy($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null)); - }); - _lazy($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - try { - null.$method$; - } catch (e) { - return e.message; - } - }()); - }); - _lazy($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0)); - }); - _lazy($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() { - return H.TypeErrorDecoder_extractPattern(function() { - try { - (void 0).$method$; - } catch (e) { - return e.message; - } - }()); - }); - _lazy($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() { - return P._AsyncRun__initializeScheduleImmediate(); - }); - _lazy($, "Future__nullFuture", "$get$Future__nullFuture", function() { - return P._Future$zoneValue(null, C.C__RootZone, P.Null); - }); - _lazy($, "_RootZone__rootMap", "$get$_RootZone__rootMap", function() { - return P.HashMap_HashMap(null, null); - }); - _lazy($, "_toStringVisiting", "$get$_toStringVisiting", function() { - return []; - }); - _lazy($, "Utf8Decoder__decoder", "$get$Utf8Decoder__decoder", function() { - return P.Utf8Decoder__makeDecoder(); - }); - _lazy($, "_Base64Decoder__inverseAlphabet", "$get$_Base64Decoder__inverseAlphabet", function() { - return H.NativeInt8List__create1(H._ensureNativeList(H.setRuntimeTypeInfo([-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, 62, -2, 62, -2, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -1, -2, -2, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, 63, -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2], [P.int]))); - }); - _lazy($, "_Uri__isWindowsCached", "$get$_Uri__isWindowsCached", function() { - return typeof process != "undefined" && Object.prototype.toString.call(process) == "[object process]" && process.platform == "win32"; - }); - _lazy($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", function() { - return P.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", false); - }); - _lazy($, "_scannerTables", "$get$_scannerTables", function() { - return P._createTables(); - }); - _lazy($, "windows", "$get$windows", function() { - return M.Context_Context($.$get$Style_windows()); - }); - _lazy($, "context", "$get$context", function() { - return new M.Context($.$get$Style_platform(), null); - }); - _lazy($, "Style_posix", "$get$Style_posix", function() { - P.RegExp_RegExp("/", false); - P.RegExp_RegExp("[^/]$", false); - P.RegExp_RegExp("^/", false); - return new E.PosixStyle(); - }); - _lazy($, "Style_windows", "$get$Style_windows", function() { - P.RegExp_RegExp("[/\\\\]", false); - P.RegExp_RegExp("[^/\\\\]$", false); - P.RegExp_RegExp("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])", false); - P.RegExp_RegExp("^[/\\\\](?![/\\\\])", false); - return new L.WindowsStyle(); - }); - _lazy($, "Style_url", "$get$Style_url", function() { - P.RegExp_RegExp("/", false); - P.RegExp_RegExp("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$", false); - P.RegExp_RegExp("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*", false); - P.RegExp_RegExp("^/", false); - return new F.UrlStyle(); - }); - _lazy($, "Style_platform", "$get$Style_platform", function() { - return O.Style__getPlatformStyle(); - }); - _lazy($, "_vmFrame", "$get$_vmFrame", function() { - return P.RegExp_RegExp("^#\\d+\\s+(\\S.*) \\((.+?)((?::\\d+){0,2})\\)$", false); - }); - _lazy($, "_v8Frame", "$get$_v8Frame", function() { - return P.RegExp_RegExp("^\\s*at (?:(\\S.*?)(?: \\[as [^\\]]+\\])? \\((.*)\\)|(.*))$", false); - }); - _lazy($, "_v8UrlLocation", "$get$_v8UrlLocation", function() { - return P.RegExp_RegExp("^(.*):(\\d+):(\\d+)|native$", false); - }); - _lazy($, "_v8EvalLocation", "$get$_v8EvalLocation", function() { - return P.RegExp_RegExp("^eval at (?:\\S.*?) \\((.*)\\)(?:, .*?:\\d+:\\d+)?$", false); - }); - _lazy($, "_firefoxSafariFrame", "$get$_firefoxSafariFrame", function() { - return P.RegExp_RegExp("^(?:([^@(/]*)(?:\\(.*\\))?((?:/[^/]*)*)(?:\\(.*\\))?@)?(.*?):(\\d*)(?::(\\d*))?$", false); - }); - _lazy($, "_friendlyFrame", "$get$_friendlyFrame", function() { - return P.RegExp_RegExp("^(\\S+)(?: (\\d+)(?::(\\d+))?)?\\s+([^\\d].*)$", false); - }); - _lazy($, "_asyncBody", "$get$_asyncBody", function() { - return P.RegExp_RegExp("<(|[^>]+)_async_body>", false); - }); - _lazy($, "_initialDot", "$get$_initialDot", function() { - return P.RegExp_RegExp("^\\.", false); - }); - _lazy($, "Frame__uriRegExp", "$get$Frame__uriRegExp", function() { - return P.RegExp_RegExp("^[a-zA-Z][-+.a-zA-Z\\d]*://", false); - }); - _lazy($, "Frame__windowsRegExp", "$get$Frame__windowsRegExp", function() { - return P.RegExp_RegExp("^([a-zA-Z]:[\\\\/]|\\\\\\\\)", false); - }); - _lazy($, "_terseRegExp", "$get$_terseRegExp", function() { - return P.RegExp_RegExp("(-patch)?([/\\\\].*)?$", false); - }); - _lazy($, "_v8Trace", "$get$_v8Trace", function() { - return P.RegExp_RegExp("\\n ?at ", false); - }); - _lazy($, "_v8TraceLine", "$get$_v8TraceLine", function() { - return P.RegExp_RegExp(" ?at ", false); - }); - _lazy($, "_firefoxSafariTrace", "$get$_firefoxSafariTrace", function() { - return P.RegExp_RegExp("^(([.0-9A-Za-z_$/<]|\\(.*\\))*@)?[^\\s]*:\\d*$", true); - }); - _lazy($, "_friendlyTrace", "$get$_friendlyTrace", function() { - return P.RegExp_RegExp("^[^\\s<][^\\s]*( \\d+(:\\d+)?)?[ \\t]+[^\\s]+$", true); - }); - _lazy($, "_iframes", "$get$_iframes", function() { - return H.JsLinkedHashMap_JsLinkedHashMap$es6(P.int, W.IFrameElement); - }); - _lazy($, "_subscriptions", "$get$_subscriptions", function() { - return H.JsLinkedHashMap_JsLinkedHashMap$es6(P.int, [P.List, [P.StreamSubscription,,]]); - }); - _lazy($, "_currentUrl", "$get$_currentUrl", function() { - return P.Uri_parse(C.Window_methods.get$location(W.window()).href); + var _lazyFinal = hunkHelpers.lazyFinal; + _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure")); + _lazyFinal($, "nullFuture", "$get$nullFuture", () => B.C__RootZone.run$1$1(new A.nullFuture_closure(), A.findType("Future"))); + _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({ + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({$method$: null, + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + null.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + (void 0).$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + null.$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + (void 0).$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", () => A._AsyncRun__initializeScheduleImmediate()); + _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", () => A.findType("_Future")._as($.$get$nullFuture())); + _lazyFinal($, "_RootZone__rootMap", "$get$_RootZone__rootMap", () => { + var t1 = type$.dynamic; + return A.HashMap_HashMap(t1, t1); }); + _lazyFinal($, "Utf8Decoder__decoder", "$get$Utf8Decoder__decoder", () => new A.Utf8Decoder__decoder_closure().call$0()); + _lazyFinal($, "Utf8Decoder__decoderNonfatal", "$get$Utf8Decoder__decoderNonfatal", () => new A.Utf8Decoder__decoderNonfatal_closure().call$0()); + _lazyFinal($, "_Base64Decoder__inverseAlphabet", "$get$_Base64Decoder__inverseAlphabet", () => A.NativeInt8List__create1(A._ensureNativeList(A._setArrayType([-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, 62, -2, 62, -2, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -1, -2, -2, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, 63, -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2], type$.JSArray_int)))); + _lazyFinal($, "_Uri__isWindowsCached", "$get$_Uri__isWindowsCached", () => typeof process != "undefined" && Object.prototype.toString.call(process) == "[object process]" && process.platform == "win32"); + _lazyFinal($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", () => A.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", false)); + _lazyFinal($, "_hashSeed", "$get$_hashSeed", () => A.objectHashCode(B.Type_Object_xQ6)); + _lazyFinal($, "_scannerTables", "$get$_scannerTables", () => A._createTables()); + _lazyFinal($, "windows", "$get$windows", () => A.Context_Context($.$get$Style_windows())); + _lazyFinal($, "context", "$get$context", () => new A.Context(type$.InternalStyle._as($.$get$Style_platform()), null)); + _lazyFinal($, "Style_posix", "$get$Style_posix", () => new A.PosixStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("[^/]$", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_windows", "$get$Style_windows", () => new A.WindowsStyle(A.RegExp_RegExp("[/\\\\]", false), A.RegExp_RegExp("[^/\\\\]$", false), A.RegExp_RegExp("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])", false), A.RegExp_RegExp("^[/\\\\](?![/\\\\])", false))); + _lazyFinal($, "Style_url", "$get$Style_url", () => new A.UrlStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$", false), A.RegExp_RegExp("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_platform", "$get$Style_platform", () => A.Style__getPlatformStyle()); + _lazyFinal($, "_vmFrame", "$get$_vmFrame", () => A.RegExp_RegExp("^#\\d+\\s+(\\S.*) \\((.+?)((?::\\d+){0,2})\\)$", false)); + _lazyFinal($, "_v8Frame", "$get$_v8Frame", () => A.RegExp_RegExp("^\\s*at (?:(\\S.*?)(?: \\[as [^\\]]+\\])? \\((.*)\\)|(.*))$", false)); + _lazyFinal($, "_v8UrlLocation", "$get$_v8UrlLocation", () => A.RegExp_RegExp("^(.*?):(\\d+)(?::(\\d+))?$|native$", false)); + _lazyFinal($, "_v8EvalLocation", "$get$_v8EvalLocation", () => A.RegExp_RegExp("^eval at (?:\\S.*?) \\((.*)\\)(?:, .*?:\\d+:\\d+)?$", false)); + _lazyFinal($, "_firefoxEvalLocation", "$get$_firefoxEvalLocation", () => A.RegExp_RegExp("(\\S+)@(\\S+) line (\\d+) >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariFrame", "$get$_firefoxSafariFrame", () => A.RegExp_RegExp("^(?:([^@(/]*)(?:\\(.*\\))?((?:/[^/]*)*)(?:\\(.*\\))?@)?(.*?):(\\d*)(?::(\\d*))?$", false)); + _lazyFinal($, "_friendlyFrame", "$get$_friendlyFrame", () => A.RegExp_RegExp("^(\\S+)(?: (\\d+)(?::(\\d+))?)?\\s+([^\\d].*)$", false)); + _lazyFinal($, "_asyncBody", "$get$_asyncBody", () => A.RegExp_RegExp("<(|[^>]+)_async_body>", false)); + _lazyFinal($, "_initialDot", "$get$_initialDot", () => A.RegExp_RegExp("^\\.", false)); + _lazyFinal($, "Frame__uriRegExp", "$get$Frame__uriRegExp", () => A.RegExp_RegExp("^[a-zA-Z][-+.a-zA-Z\\d]*://", false)); + _lazyFinal($, "Frame__windowsRegExp", "$get$Frame__windowsRegExp", () => A.RegExp_RegExp("^([a-zA-Z]:[\\\\/]|\\\\\\\\)", false)); + _lazyFinal($, "_terseRegExp", "$get$_terseRegExp", () => A.RegExp_RegExp("(-patch)?([/\\\\].*)?$", false)); + _lazyFinal($, "_v8Trace", "$get$_v8Trace", () => A.RegExp_RegExp("\\n ?at ", false)); + _lazyFinal($, "_v8TraceLine", "$get$_v8TraceLine", () => A.RegExp_RegExp(" ?at ", false)); + _lazyFinal($, "_firefoxEvalTrace", "$get$_firefoxEvalTrace", () => A.RegExp_RegExp("@\\S+ line \\d+ >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariTrace", "$get$_firefoxSafariTrace", () => A.RegExp_RegExp("^(([.0-9A-Za-z_$/<]|\\(.*\\))*@)?[^\\s]*:\\d*$", true)); + _lazyFinal($, "_friendlyTrace", "$get$_friendlyTrace", () => A.RegExp_RegExp("^[^\\s<][^\\s]*( \\d+(:\\d+)?)?[ \\t]+[^\\s]+$", true)); + _lazyFinal($, "vmChainGap", "$get$vmChainGap", () => A.RegExp_RegExp("^\\n?$", true)); + _lazyFinal($, "_currentUrl", "$get$_currentUrl", () => A.Uri_parse(B.Window_methods.get$location(A.window()).href)); })(); - var init = {mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], types: [{func: 1, ret: P.Null}, {func: 1, ret: -1}, {func: 1, ret: P.bool, args: [P.String]}, {func: 1, ret: -1, args: [P.Object], opt: [P.StackTrace]}, {func: 1, ret: P.Null, args: [,]}, {func: 1, ret: A.Frame, args: [P.String]}, {func: 1, ret: -1, args: [,]}, {func: 1, ret: A.Frame}, {func: 1, args: [,]}, {func: 1, ret: -1, args: [{func: 1, ret: -1}]}, {func: 1, ret: P.Null, args: [W.MessageEvent]}, {func: 1, ret: -1, args: [P.Object]}, {func: 1, ret: P.String, args: [P.int]}, {func: 1, ret: P.Null, args: [,,]}, {func: 1, ret: P.String, args: [P.String]}, {func: 1, ret: P.Null, args: [, P.StackTrace]}, {func: 1, ret: Y.Trace}, {func: 1, ret: P.String, args: [A.Frame]}, {func: 1, ret: P.int, args: [A.Frame]}, {func: 1, ret: Y.Trace, args: [P.String]}, {func: 1, ret: P.Null, args: [P.String]}, {func: 1, ret: P.bool, args: [A.Frame]}, {func: 1, ret: [P._Future,,], args: [,]}, {func: 1, ret: -1, args: [P.String, P.int]}, {func: 1, ret: -1, args: [P.String], opt: [,]}, {func: 1, ret: P.int, args: [P.int, P.int]}, {func: 1, ret: P.Null, args: [P.Symbol0,,]}, {func: 1, ret: -1, args: [P.int, P.int]}, {func: 1, ret: P.Uint8List, args: [P.int]}, {func: 1, ret: P.Uint8List, args: [,,]}, {func: 1, args: [W.Event]}, {func: 1, args: [,,]}, {func: 1, ret: P.Null, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}, {func: 1, ret: [P.Future,,], args: [,]}, {func: 1, ret: [P.List, A.Frame], args: [Y.Trace]}, {func: 1, ret: P.int, args: [Y.Trace]}, {func: 1, ret: [P.Map, P.String, P.String], args: [[P.Map, P.String, P.String], P.String]}, {func: 1, ret: P.String, args: [Y.Trace]}, {func: 1, ret: P.Null, args: [,], opt: [P.StackTrace]}, {func: 1, ret: -1, opt: [P.Object]}, {func: 1, ret: A.Frame, args: [,,]}, {func: 1, ret: P.Null, args: [P.int,,]}, {func: 1, ret: P.Null, args: [{func: 1, ret: -1}]}, {func: 1, bounds: [P.num], ret: 0, args: [0, 0]}, {func: 1, ret: A.Frame, args: [A.Frame]}, {func: 1, ret: -1, args: [,], opt: [P.StackTrace]}, {func: 1, ret: -1, args: [P.Timer]}, {func: 1, ret: P.Null, args: [W.MouseEvent]}, {func: 1, args: [P.String]}, {func: 1, ret: [P.Future, P.Null], args: [,]}, {func: 1, ret: P.Null, args: [P.String,,]}, {func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone,, P.StackTrace]}, {func: 1, bounds: [P.Object], ret: 0, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0}]}, {func: 1, bounds: [P.Object, P.Object], ret: 0, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1]}, 1]}, {func: 1, bounds: [P.Object, P.Object, P.Object], ret: 0, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1, 2]}, 1, 2]}, {func: 1, bounds: [P.Object], ret: {func: 1, ret: 0}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0}]}, {func: 1, bounds: [P.Object, P.Object], ret: {func: 1, ret: 0, args: [1]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1]}]}, {func: 1, bounds: [P.Object, P.Object, P.Object], ret: {func: 1, ret: 0, args: [1, 2]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: 0, args: [1, 2]}]}, {func: 1, ret: P.AsyncError, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}, {func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, ret: -1}]}, {func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, ret: -1}]}, {func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, ret: -1, args: [P.Timer]}]}, {func: 1, ret: -1, args: [P.Zone, P.ZoneDelegate, P.Zone, P.String]}, {func: 1, ret: -1, args: [P.String]}, {func: 1, ret: P.Zone, args: [P.Zone, P.ZoneDelegate, P.Zone, P.ZoneSpecification, [P.Map,,,]]}, {func: 1, args: [, P.String]}], interceptorsByTag: null, leafTags: null}; (function nativeSupport() { !function() { var intern = function(s) { @@ -15070,15 +15913,15 @@ } init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); }(); - hunkHelpers.setOrUpdateInterceptorsByTag({DOMError: J.Interceptor, MediaError: J.Interceptor, MessageChannel: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, ArrayBuffer: H.NativeByteBuffer, DataView: H.NativeTypedData, ArrayBufferView: H.NativeTypedData, Float32Array: H.NativeTypedArrayOfDouble, Float64Array: H.NativeTypedArrayOfDouble, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, HTMLAudioElement: W.HtmlElement, HTMLBRElement: W.HtmlElement, HTMLBaseElement: W.HtmlElement, HTMLBodyElement: W.HtmlElement, HTMLButtonElement: W.HtmlElement, HTMLCanvasElement: W.HtmlElement, HTMLContentElement: W.HtmlElement, HTMLDListElement: W.HtmlElement, HTMLDataElement: W.HtmlElement, HTMLDataListElement: W.HtmlElement, HTMLDetailsElement: W.HtmlElement, HTMLDialogElement: W.HtmlElement, HTMLDivElement: W.HtmlElement, HTMLEmbedElement: W.HtmlElement, HTMLFieldSetElement: W.HtmlElement, HTMLHRElement: W.HtmlElement, HTMLHeadElement: W.HtmlElement, HTMLHeadingElement: W.HtmlElement, HTMLHtmlElement: W.HtmlElement, HTMLImageElement: W.HtmlElement, HTMLInputElement: W.HtmlElement, HTMLLIElement: W.HtmlElement, HTMLLabelElement: W.HtmlElement, HTMLLegendElement: W.HtmlElement, HTMLLinkElement: W.HtmlElement, HTMLMapElement: W.HtmlElement, HTMLMediaElement: W.HtmlElement, HTMLMenuElement: W.HtmlElement, HTMLMetaElement: W.HtmlElement, HTMLMeterElement: W.HtmlElement, HTMLModElement: W.HtmlElement, HTMLOListElement: W.HtmlElement, HTMLObjectElement: W.HtmlElement, HTMLOptGroupElement: W.HtmlElement, HTMLOptionElement: W.HtmlElement, HTMLOutputElement: W.HtmlElement, HTMLParagraphElement: W.HtmlElement, HTMLParamElement: W.HtmlElement, HTMLPictureElement: W.HtmlElement, HTMLPreElement: W.HtmlElement, HTMLProgressElement: W.HtmlElement, HTMLQuoteElement: W.HtmlElement, HTMLScriptElement: W.HtmlElement, HTMLShadowElement: W.HtmlElement, HTMLSlotElement: W.HtmlElement, HTMLSourceElement: W.HtmlElement, HTMLSpanElement: W.HtmlElement, HTMLStyleElement: W.HtmlElement, HTMLTableCaptionElement: W.HtmlElement, HTMLTableCellElement: W.HtmlElement, HTMLTableDataCellElement: W.HtmlElement, HTMLTableHeaderCellElement: W.HtmlElement, HTMLTableColElement: W.HtmlElement, HTMLTableElement: W.HtmlElement, HTMLTableRowElement: W.HtmlElement, HTMLTableSectionElement: W.HtmlElement, HTMLTemplateElement: W.HtmlElement, HTMLTextAreaElement: W.HtmlElement, HTMLTimeElement: W.HtmlElement, HTMLTitleElement: W.HtmlElement, HTMLTrackElement: W.HtmlElement, HTMLUListElement: W.HtmlElement, HTMLUnknownElement: W.HtmlElement, HTMLVideoElement: W.HtmlElement, HTMLDirectoryElement: W.HtmlElement, HTMLFontElement: W.HtmlElement, HTMLFrameElement: W.HtmlElement, HTMLFrameSetElement: W.HtmlElement, HTMLMarqueeElement: W.HtmlElement, HTMLElement: W.HtmlElement, HTMLAnchorElement: W.AnchorElement, HTMLAreaElement: W.AreaElement, Blob: W.Blob, CDATASection: W.CharacterData, CharacterData: W.CharacterData, Comment: W.CharacterData, ProcessingInstruction: W.CharacterData, Text: W.CharacterData, DOMException: W.DomException, DOMTokenList: W.DomTokenList, Element: W.Element, AbortPaymentEvent: W.Event, AnimationEvent: W.Event, AnimationPlaybackEvent: W.Event, ApplicationCacheErrorEvent: W.Event, BackgroundFetchClickEvent: W.Event, BackgroundFetchEvent: W.Event, BackgroundFetchFailEvent: W.Event, BackgroundFetchedEvent: W.Event, BeforeInstallPromptEvent: W.Event, BeforeUnloadEvent: W.Event, BlobEvent: W.Event, CanMakePaymentEvent: W.Event, ClipboardEvent: W.Event, CloseEvent: W.Event, CustomEvent: W.Event, DeviceMotionEvent: W.Event, DeviceOrientationEvent: W.Event, ErrorEvent: W.Event, ExtendableEvent: W.Event, ExtendableMessageEvent: W.Event, FetchEvent: W.Event, FontFaceSetLoadEvent: W.Event, ForeignFetchEvent: W.Event, GamepadEvent: W.Event, HashChangeEvent: W.Event, InstallEvent: W.Event, MediaEncryptedEvent: W.Event, MediaKeyMessageEvent: W.Event, MediaQueryListEvent: W.Event, MediaStreamEvent: W.Event, MediaStreamTrackEvent: W.Event, MIDIConnectionEvent: W.Event, MIDIMessageEvent: W.Event, MutationEvent: W.Event, NotificationEvent: W.Event, PageTransitionEvent: W.Event, PaymentRequestEvent: W.Event, PaymentRequestUpdateEvent: W.Event, PopStateEvent: W.Event, PresentationConnectionAvailableEvent: W.Event, PresentationConnectionCloseEvent: W.Event, ProgressEvent: W.Event, PromiseRejectionEvent: W.Event, PushEvent: W.Event, RTCDataChannelEvent: W.Event, RTCDTMFToneChangeEvent: W.Event, RTCPeerConnectionIceEvent: W.Event, RTCTrackEvent: W.Event, SecurityPolicyViolationEvent: W.Event, SensorErrorEvent: W.Event, SpeechRecognitionError: W.Event, SpeechRecognitionEvent: W.Event, SpeechSynthesisEvent: W.Event, StorageEvent: W.Event, SyncEvent: W.Event, TrackEvent: W.Event, TransitionEvent: W.Event, WebKitTransitionEvent: W.Event, VRDeviceEvent: W.Event, VRDisplayEvent: W.Event, VRSessionEvent: W.Event, MojoInterfaceRequestEvent: W.Event, ResourceProgressEvent: W.Event, USBConnectionEvent: W.Event, IDBVersionChangeEvent: W.Event, AudioProcessingEvent: W.Event, OfflineAudioCompletionEvent: W.Event, WebGLContextEvent: W.Event, Event: W.Event, InputEvent: W.Event, WebSocket: W.EventTarget, EventTarget: W.EventTarget, File: W.File, HTMLFormElement: W.FormElement, HTMLCollection: W.HtmlCollection, HTMLFormControlsCollection: W.HtmlCollection, HTMLOptionsCollection: W.HtmlCollection, HTMLIFrameElement: W.IFrameElement, Location: W.Location, MessageEvent: W.MessageEvent, MessagePort: W.MessagePort, MouseEvent: W.MouseEvent, DragEvent: W.MouseEvent, PointerEvent: W.MouseEvent, WheelEvent: W.MouseEvent, Document: W.Node, DocumentFragment: W.Node, HTMLDocument: W.Node, ShadowRoot: W.Node, XMLDocument: W.Node, Attr: W.Node, DocumentType: W.Node, Node: W.Node, HTMLSelectElement: W.SelectElement, CompositionEvent: W.UIEvent, FocusEvent: W.UIEvent, KeyboardEvent: W.UIEvent, TextEvent: W.UIEvent, TouchEvent: W.UIEvent, UIEvent: W.UIEvent, Window: W.Window, DOMWindow: W.Window, SVGAElement: P.SvgElement, SVGAnimateElement: P.SvgElement, SVGAnimateMotionElement: P.SvgElement, SVGAnimateTransformElement: P.SvgElement, SVGAnimationElement: P.SvgElement, SVGCircleElement: P.SvgElement, SVGClipPathElement: P.SvgElement, SVGDefsElement: P.SvgElement, SVGDescElement: P.SvgElement, SVGDiscardElement: P.SvgElement, SVGEllipseElement: P.SvgElement, SVGFEBlendElement: P.SvgElement, SVGFEColorMatrixElement: P.SvgElement, SVGFEComponentTransferElement: P.SvgElement, SVGFECompositeElement: P.SvgElement, SVGFEConvolveMatrixElement: P.SvgElement, SVGFEDiffuseLightingElement: P.SvgElement, SVGFEDisplacementMapElement: P.SvgElement, SVGFEDistantLightElement: P.SvgElement, SVGFEFloodElement: P.SvgElement, SVGFEFuncAElement: P.SvgElement, SVGFEFuncBElement: P.SvgElement, SVGFEFuncGElement: P.SvgElement, SVGFEFuncRElement: P.SvgElement, SVGFEGaussianBlurElement: P.SvgElement, SVGFEImageElement: P.SvgElement, SVGFEMergeElement: P.SvgElement, SVGFEMergeNodeElement: P.SvgElement, SVGFEMorphologyElement: P.SvgElement, SVGFEOffsetElement: P.SvgElement, SVGFEPointLightElement: P.SvgElement, SVGFESpecularLightingElement: P.SvgElement, SVGFESpotLightElement: P.SvgElement, SVGFETileElement: P.SvgElement, SVGFETurbulenceElement: P.SvgElement, SVGFilterElement: P.SvgElement, SVGForeignObjectElement: P.SvgElement, SVGGElement: P.SvgElement, SVGGeometryElement: P.SvgElement, SVGGraphicsElement: P.SvgElement, SVGImageElement: P.SvgElement, SVGLineElement: P.SvgElement, SVGLinearGradientElement: P.SvgElement, SVGMarkerElement: P.SvgElement, SVGMaskElement: P.SvgElement, SVGMetadataElement: P.SvgElement, SVGPathElement: P.SvgElement, SVGPatternElement: P.SvgElement, SVGPolygonElement: P.SvgElement, SVGPolylineElement: P.SvgElement, SVGRadialGradientElement: P.SvgElement, SVGRectElement: P.SvgElement, SVGScriptElement: P.SvgElement, SVGSetElement: P.SvgElement, SVGStopElement: P.SvgElement, SVGStyleElement: P.SvgElement, SVGElement: P.SvgElement, SVGSVGElement: P.SvgElement, SVGSwitchElement: P.SvgElement, SVGSymbolElement: P.SvgElement, SVGTSpanElement: P.SvgElement, SVGTextContentElement: P.SvgElement, SVGTextElement: P.SvgElement, SVGTextPathElement: P.SvgElement, SVGTextPositioningElement: P.SvgElement, SVGTitleElement: P.SvgElement, SVGUseElement: P.SvgElement, SVGViewElement: P.SvgElement, SVGGradientElement: P.SvgElement, SVGComponentTransferFunctionElement: P.SvgElement, SVGFEDropShadowElement: P.SvgElement, SVGMPathElement: P.SvgElement}); - hunkHelpers.setOrUpdateLeafTags({DOMError: true, MediaError: true, MessageChannel: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, ArrayBuffer: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, Blob: false, CDATASection: true, CharacterData: true, Comment: true, ProcessingInstruction: true, Text: true, DOMException: true, DOMTokenList: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, ProgressEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, ResourceProgressEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, WebSocket: true, EventTarget: false, File: true, HTMLFormElement: true, HTMLCollection: true, HTMLFormControlsCollection: true, HTMLOptionsCollection: true, HTMLIFrameElement: true, Location: true, MessageEvent: true, MessagePort: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, DocumentFragment: true, HTMLDocument: true, ShadowRoot: true, XMLDocument: true, Attr: true, DocumentType: true, Node: false, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, Window: true, DOMWindow: true, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); - H.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; - H.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; + hunkHelpers.setOrUpdateInterceptorsByTag({DOMError: J.JavaScriptObject, MediaError: J.JavaScriptObject, MessageChannel: J.JavaScriptObject, NavigatorUserMediaError: J.JavaScriptObject, OverconstrainedError: J.JavaScriptObject, PositionError: J.JavaScriptObject, GeolocationPositionError: J.JavaScriptObject, ArrayBuffer: A.NativeByteBuffer, DataView: A.NativeTypedData, ArrayBufferView: A.NativeTypedData, Float32Array: A.NativeTypedArrayOfDouble, Float64Array: A.NativeTypedArrayOfDouble, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List, HTMLAudioElement: A.HtmlElement, HTMLBRElement: A.HtmlElement, HTMLBaseElement: A.HtmlElement, HTMLBodyElement: A.HtmlElement, HTMLButtonElement: A.HtmlElement, HTMLCanvasElement: A.HtmlElement, HTMLContentElement: A.HtmlElement, HTMLDListElement: A.HtmlElement, HTMLDataElement: A.HtmlElement, HTMLDataListElement: A.HtmlElement, HTMLDetailsElement: A.HtmlElement, HTMLDialogElement: A.HtmlElement, HTMLDivElement: A.HtmlElement, HTMLEmbedElement: A.HtmlElement, HTMLFieldSetElement: A.HtmlElement, HTMLHRElement: A.HtmlElement, HTMLHeadElement: A.HtmlElement, HTMLHeadingElement: A.HtmlElement, HTMLHtmlElement: A.HtmlElement, HTMLImageElement: A.HtmlElement, HTMLInputElement: A.HtmlElement, HTMLLIElement: A.HtmlElement, HTMLLabelElement: A.HtmlElement, HTMLLegendElement: A.HtmlElement, HTMLLinkElement: A.HtmlElement, HTMLMapElement: A.HtmlElement, HTMLMediaElement: A.HtmlElement, HTMLMenuElement: A.HtmlElement, HTMLMetaElement: A.HtmlElement, HTMLMeterElement: A.HtmlElement, HTMLModElement: A.HtmlElement, HTMLOListElement: A.HtmlElement, HTMLObjectElement: A.HtmlElement, HTMLOptGroupElement: A.HtmlElement, HTMLOptionElement: A.HtmlElement, HTMLOutputElement: A.HtmlElement, HTMLParagraphElement: A.HtmlElement, HTMLParamElement: A.HtmlElement, HTMLPictureElement: A.HtmlElement, HTMLPreElement: A.HtmlElement, HTMLProgressElement: A.HtmlElement, HTMLQuoteElement: A.HtmlElement, HTMLScriptElement: A.HtmlElement, HTMLShadowElement: A.HtmlElement, HTMLSlotElement: A.HtmlElement, HTMLSourceElement: A.HtmlElement, HTMLSpanElement: A.HtmlElement, HTMLStyleElement: A.HtmlElement, HTMLTableCaptionElement: A.HtmlElement, HTMLTableCellElement: A.HtmlElement, HTMLTableDataCellElement: A.HtmlElement, HTMLTableHeaderCellElement: A.HtmlElement, HTMLTableColElement: A.HtmlElement, HTMLTableElement: A.HtmlElement, HTMLTableRowElement: A.HtmlElement, HTMLTableSectionElement: A.HtmlElement, HTMLTemplateElement: A.HtmlElement, HTMLTextAreaElement: A.HtmlElement, HTMLTimeElement: A.HtmlElement, HTMLTitleElement: A.HtmlElement, HTMLTrackElement: A.HtmlElement, HTMLUListElement: A.HtmlElement, HTMLUnknownElement: A.HtmlElement, HTMLVideoElement: A.HtmlElement, HTMLDirectoryElement: A.HtmlElement, HTMLFontElement: A.HtmlElement, HTMLFrameElement: A.HtmlElement, HTMLFrameSetElement: A.HtmlElement, HTMLMarqueeElement: A.HtmlElement, HTMLElement: A.HtmlElement, HTMLAnchorElement: A.AnchorElement, HTMLAreaElement: A.AreaElement, Blob: A.Blob, CDATASection: A.CharacterData, CharacterData: A.CharacterData, Comment: A.CharacterData, ProcessingInstruction: A.CharacterData, Text: A.CharacterData, DOMException: A.DomException, DOMTokenList: A.DomTokenList, Element: A.Element, AbortPaymentEvent: A.Event, AnimationEvent: A.Event, AnimationPlaybackEvent: A.Event, ApplicationCacheErrorEvent: A.Event, BackgroundFetchClickEvent: A.Event, BackgroundFetchEvent: A.Event, BackgroundFetchFailEvent: A.Event, BackgroundFetchedEvent: A.Event, BeforeInstallPromptEvent: A.Event, BeforeUnloadEvent: A.Event, BlobEvent: A.Event, CanMakePaymentEvent: A.Event, ClipboardEvent: A.Event, CloseEvent: A.Event, CustomEvent: A.Event, DeviceMotionEvent: A.Event, DeviceOrientationEvent: A.Event, ErrorEvent: A.Event, ExtendableEvent: A.Event, ExtendableMessageEvent: A.Event, FetchEvent: A.Event, FontFaceSetLoadEvent: A.Event, ForeignFetchEvent: A.Event, GamepadEvent: A.Event, HashChangeEvent: A.Event, InstallEvent: A.Event, MediaEncryptedEvent: A.Event, MediaKeyMessageEvent: A.Event, MediaQueryListEvent: A.Event, MediaStreamEvent: A.Event, MediaStreamTrackEvent: A.Event, MIDIConnectionEvent: A.Event, MIDIMessageEvent: A.Event, MutationEvent: A.Event, NotificationEvent: A.Event, PageTransitionEvent: A.Event, PaymentRequestEvent: A.Event, PaymentRequestUpdateEvent: A.Event, PopStateEvent: A.Event, PresentationConnectionAvailableEvent: A.Event, PresentationConnectionCloseEvent: A.Event, ProgressEvent: A.Event, PromiseRejectionEvent: A.Event, PushEvent: A.Event, RTCDataChannelEvent: A.Event, RTCDTMFToneChangeEvent: A.Event, RTCPeerConnectionIceEvent: A.Event, RTCTrackEvent: A.Event, SecurityPolicyViolationEvent: A.Event, SensorErrorEvent: A.Event, SpeechRecognitionError: A.Event, SpeechRecognitionEvent: A.Event, SpeechSynthesisEvent: A.Event, StorageEvent: A.Event, SyncEvent: A.Event, TrackEvent: A.Event, TransitionEvent: A.Event, WebKitTransitionEvent: A.Event, VRDeviceEvent: A.Event, VRDisplayEvent: A.Event, VRSessionEvent: A.Event, MojoInterfaceRequestEvent: A.Event, ResourceProgressEvent: A.Event, USBConnectionEvent: A.Event, IDBVersionChangeEvent: A.Event, AudioProcessingEvent: A.Event, OfflineAudioCompletionEvent: A.Event, WebGLContextEvent: A.Event, Event: A.Event, InputEvent: A.Event, SubmitEvent: A.Event, WebSocket: A.EventTarget, EventTarget: A.EventTarget, File: A.File, HTMLFormElement: A.FormElement, HTMLCollection: A.HtmlCollection, HTMLFormControlsCollection: A.HtmlCollection, HTMLOptionsCollection: A.HtmlCollection, HTMLIFrameElement: A.IFrameElement, Location: A.Location, MessageEvent: A.MessageEvent, MessagePort: A.MessagePort, MouseEvent: A.MouseEvent, DragEvent: A.MouseEvent, PointerEvent: A.MouseEvent, WheelEvent: A.MouseEvent, Document: A.Node, DocumentFragment: A.Node, HTMLDocument: A.Node, ShadowRoot: A.Node, XMLDocument: A.Node, Attr: A.Node, DocumentType: A.Node, Node: A.Node, HTMLSelectElement: A.SelectElement, CompositionEvent: A.UIEvent, FocusEvent: A.UIEvent, KeyboardEvent: A.UIEvent, TextEvent: A.UIEvent, TouchEvent: A.UIEvent, UIEvent: A.UIEvent, Window: A.Window, DOMWindow: A.Window, SVGAElement: A.SvgElement, SVGAnimateElement: A.SvgElement, SVGAnimateMotionElement: A.SvgElement, SVGAnimateTransformElement: A.SvgElement, SVGAnimationElement: A.SvgElement, SVGCircleElement: A.SvgElement, SVGClipPathElement: A.SvgElement, SVGDefsElement: A.SvgElement, SVGDescElement: A.SvgElement, SVGDiscardElement: A.SvgElement, SVGEllipseElement: A.SvgElement, SVGFEBlendElement: A.SvgElement, SVGFEColorMatrixElement: A.SvgElement, SVGFEComponentTransferElement: A.SvgElement, SVGFECompositeElement: A.SvgElement, SVGFEConvolveMatrixElement: A.SvgElement, SVGFEDiffuseLightingElement: A.SvgElement, SVGFEDisplacementMapElement: A.SvgElement, SVGFEDistantLightElement: A.SvgElement, SVGFEFloodElement: A.SvgElement, SVGFEFuncAElement: A.SvgElement, SVGFEFuncBElement: A.SvgElement, SVGFEFuncGElement: A.SvgElement, SVGFEFuncRElement: A.SvgElement, SVGFEGaussianBlurElement: A.SvgElement, SVGFEImageElement: A.SvgElement, SVGFEMergeElement: A.SvgElement, SVGFEMergeNodeElement: A.SvgElement, SVGFEMorphologyElement: A.SvgElement, SVGFEOffsetElement: A.SvgElement, SVGFEPointLightElement: A.SvgElement, SVGFESpecularLightingElement: A.SvgElement, SVGFESpotLightElement: A.SvgElement, SVGFETileElement: A.SvgElement, SVGFETurbulenceElement: A.SvgElement, SVGFilterElement: A.SvgElement, SVGForeignObjectElement: A.SvgElement, SVGGElement: A.SvgElement, SVGGeometryElement: A.SvgElement, SVGGraphicsElement: A.SvgElement, SVGImageElement: A.SvgElement, SVGLineElement: A.SvgElement, SVGLinearGradientElement: A.SvgElement, SVGMarkerElement: A.SvgElement, SVGMaskElement: A.SvgElement, SVGMetadataElement: A.SvgElement, SVGPathElement: A.SvgElement, SVGPatternElement: A.SvgElement, SVGPolygonElement: A.SvgElement, SVGPolylineElement: A.SvgElement, SVGRadialGradientElement: A.SvgElement, SVGRectElement: A.SvgElement, SVGScriptElement: A.SvgElement, SVGSetElement: A.SvgElement, SVGStopElement: A.SvgElement, SVGStyleElement: A.SvgElement, SVGElement: A.SvgElement, SVGSVGElement: A.SvgElement, SVGSwitchElement: A.SvgElement, SVGSymbolElement: A.SvgElement, SVGTSpanElement: A.SvgElement, SVGTextContentElement: A.SvgElement, SVGTextElement: A.SvgElement, SVGTextPathElement: A.SvgElement, SVGTextPositioningElement: A.SvgElement, SVGTitleElement: A.SvgElement, SVGUseElement: A.SvgElement, SVGViewElement: A.SvgElement, SVGGradientElement: A.SvgElement, SVGComponentTransferFunctionElement: A.SvgElement, SVGFEDropShadowElement: A.SvgElement, SVGMPathElement: A.SvgElement}); + hunkHelpers.setOrUpdateLeafTags({DOMError: true, MediaError: true, MessageChannel: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, GeolocationPositionError: true, ArrayBuffer: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, Blob: false, CDATASection: true, CharacterData: true, Comment: true, ProcessingInstruction: true, Text: true, DOMException: true, DOMTokenList: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, ProgressEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, ResourceProgressEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, SubmitEvent: false, WebSocket: true, EventTarget: false, File: true, HTMLFormElement: true, HTMLCollection: true, HTMLFormControlsCollection: true, HTMLOptionsCollection: true, HTMLIFrameElement: true, Location: true, MessageEvent: true, MessagePort: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, DocumentFragment: true, HTMLDocument: true, ShadowRoot: true, XMLDocument: true, Attr: true, DocumentType: true, Node: false, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, Window: true, DOMWindow: true, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true}); + A.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; })(); Function.prototype.call$0 = function() { return this(); @@ -15089,50 +15932,50 @@ Function.prototype.call$2 = function(a, b) { return this(a, b); }; - Function.prototype.call$3 = function(a, b, c) { - return this(a, b, c); - }; - Function.prototype.call$4 = function(a, b, c, d) { - return this(a, b, c, d); - }; Function.prototype.call$1$1 = function(a) { return this(a); }; - Function.prototype.call$3$1 = function(a) { - return this(a); - }; Function.prototype.call$3$3 = function(a, b, c) { return this(a, b, c); }; - Function.prototype.call$2$2 = function(a, b) { - return this(a, b); - }; - Function.prototype.call$2$1 = function(a) { - return this(a); + Function.prototype.call$5 = function(a, b, c, d, e) { + return this(a, b, c, d, e); }; - Function.prototype.call$2$3 = function(a, b, c) { + Function.prototype.call$3 = function(a, b, c) { return this(a, b, c); }; - Function.prototype.call$1$2 = function(a, b) { - return this(a, b); + Function.prototype.call$4 = function(a, b, c, d) { + return this(a, b, c, d); }; - Function.prototype.call$5 = function(a, b, c, d, e) { - return this(a, b, c, d, e); + Function.prototype.call$3$6 = function(a, b, c, d, e, f) { + return this(a, b, c, d, e, f); }; - Function.prototype.call$3$4 = function(a, b, c, d) { + Function.prototype.call$1$4 = function(a, b, c, d) { return this(a, b, c, d); }; + Function.prototype.call$2$1 = function(a) { + return this(a); + }; + Function.prototype.call$2$5 = function(a, b, c, d, e) { + return this(a, b, c, d, e); + }; Function.prototype.call$2$4 = function(a, b, c, d) { return this(a, b, c, d); }; - Function.prototype.call$1$4 = function(a, b, c, d) { + Function.prototype.call$2$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$3$1 = function(a) { + return this(a); + }; + Function.prototype.call$3$4 = function(a, b, c, d) { return this(a, b, c, d); }; - Function.prototype.call$3$6 = function(a, b, c, d, e, f) { - return this(a, b, c, d, e, f); + Function.prototype.call$1$2 = function(a, b) { + return this(a, b); }; - Function.prototype.call$2$5 = function(a, b, c, d, e) { - return this(a, b, c, d, e); + Function.prototype.call$2$3 = function(a, b, c) { + return this(a, b, c); }; convertAllToFastObject(holders); convertToFastObject($); @@ -15141,7 +15984,7 @@ callback(null); return; } - if (typeof document.currentScript != 'undefined') { + if (typeof document.currentScript != "undefined") { callback(document.currentScript); return; } @@ -15155,10 +15998,11 @@ scripts[i].addEventListener("load", onLoad, false); })(function(currentScript) { init.currentScript = currentScript; + var callMain = A.main; if (typeof dartMainRunner === "function") - dartMainRunner(K.main, []); + dartMainRunner(callMain, []); else - K.main([]); + callMain([]); }); })(); diff --git a/pkgs/test/lib/src/runner/node/platform.dart b/pkgs/test/lib/src/runner/node/platform.dart index c20517c30..b9387412d 100644 --- a/pkgs/test/lib/src/runner/node/platform.dart +++ b/pkgs/test/lib/src/runner/node/platform.dart @@ -149,7 +149,7 @@ class NodePlatform extends PlatformPlugin Future> _spawnNormalProcess(String testPath, Runtime runtime, SuiteConfiguration suiteConfig, int socketPort) async { var dir = Directory(_compiledDir).createTempSync('test_').path; - var jsPath = p.join(dir, p.basename(testPath) + '.node_test.dart.js'); + var jsPath = p.join(dir, '${p.basename(testPath)}.node_test.dart.js'); await _compilers.compile(''' ${suiteConfig.metadata.languageVersionComment ?? await rootPackageLanguageVersionComment} import "package:test/src/bootstrap/node.dart"; @@ -169,7 +169,7 @@ class NodePlatform extends PlatformPlugin StackTraceMapper? mapper; if (!suiteConfig.jsTrace) { - var mapPath = jsPath + '.map'; + var mapPath = '$jsPath.map'; mapper = JSStackTraceMapper(await File(mapPath).readAsString(), mapUrl: p.toUri(mapPath), sdkRoot: Uri.parse('org-dartlang-sdk:///sdk'), @@ -190,7 +190,7 @@ class NodePlatform extends PlatformPlugin StackTraceMapper? mapper; var jsPath = p.join(precompiledPath, '$testPath.node_test.dart.js'); if (!suiteConfig.jsTrace) { - var mapPath = jsPath + '.map'; + var mapPath = '$jsPath.map'; mapper = JSStackTraceMapper(await File(mapPath).readAsString(), mapUrl: p.toUri(mapPath), sdkRoot: Uri.parse('org-dartlang-sdk:///sdk'), @@ -210,16 +210,16 @@ class NodePlatform extends PlatformPlugin SuiteConfiguration suiteConfig, int socketPort) async { var dir = Directory(_compiledDir).createTempSync('test_').path; - var jsPath = p.join(dir, p.basename(testPath) + '.node_test.dart.js'); + var jsPath = p.join(dir, '${p.basename(testPath)}.node_test.dart.js'); var url = _config.pubServeUrl!.resolveUri( - p.toUri(p.relative(testPath, from: 'test') + '.node_test.dart.js')); + p.toUri('${p.relative(testPath, from: 'test')}.node_test.dart.js')); var js = await _get(url, testPath); await File(jsPath).writeAsString(preamble.getPreamble(minified: true) + js); StackTraceMapper? mapper; if (!suiteConfig.jsTrace) { - var mapUrl = url.replace(path: url.path + '.map'); + var mapUrl = url.replace(path: '${url.path}.map'); mapper = JSStackTraceMapper(await _get(mapUrl, testPath), mapUrl: mapUrl, sdkRoot: p.toUri('packages/\$sdk'), diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml index 237dd4133..6985d6534 100644 --- a/pkgs/test/pubspec.yaml +++ b/pkgs/test/pubspec.yaml @@ -38,7 +38,7 @@ dependencies: dev_dependencies: fake_async: ^1.0.0 glob: ^2.0.0 - lints: ^1.0.0 + lints: '>=1.0.0 <3.0.0' test_descriptor: ^2.0.0 test_process: ^2.0.0 diff --git a/pkgs/test/test/runner/json_reporter_utils.dart b/pkgs/test/test/runner/json_reporter_utils.dart index 0255c612a..816cb2654 100644 --- a/pkgs/test/test/runner/json_reporter_utils.dart +++ b/pkgs/test/test/runner/json_reporter_utils.dart @@ -32,13 +32,13 @@ Future expectJsonReport( expect(outputLines.map(decodeLine), containsAll([allSuitesJson()])); // A single start event is emitted first. - final _start = { + final start = { 'type': 'start', 'protocolVersion': '0.1.1', 'runnerVersion': testVersion, 'pid': testPid, }; - expect(decodeLine(outputLines.first), equals(_start)); + expect(decodeLine(outputLines.first), equals(start)); // A single done event is emitted last. expect(decodeLine(outputLines.last), equals(done)); diff --git a/pkgs/test/test/runner/runner_test.dart b/pkgs/test/test/runner/runner_test.dart index c3938833e..cdf60c211 100644 --- a/pkgs/test/test/runner/runner_test.dart +++ b/pkgs/test/test/runner/runner_test.dart @@ -118,10 +118,9 @@ Output: '''; -final _browsers = '[vm (default), chrome, firefox' + - (Platform.isMacOS ? ', safari' : '') + - (Platform.isWindows ? ', ie' : '') + - ', node]'; +final _browsers = '[vm (default), chrome, firefox' + '${Platform.isMacOS ? ', safari' : ''}' + '${Platform.isWindows ? ', ie' : ''}, node]'; void main() { setUpAll(precompileTestExecutable); @@ -746,7 +745,7 @@ void main(List args) async { }); group('nnbd', () { - final _testContents = ''' + final testContents = ''' import 'package:test/test.dart'; import 'opted_out.dart'; @@ -766,7 +765,7 @@ final foo = true;''').create(); () async { await d.file('test.dart', ''' // @dart=2.12 -$_testContents +$testContents ''').create(); var test = await runTest(['test.dart']); @@ -782,7 +781,7 @@ $_testContents () async { await d.file('test.dart', ''' // @dart=2.8 -$_testContents''').create(); +$testContents''').create(); var test = await runTest(['test.dart']); expect(test.stdout, emitsThrough(contains('+1: All tests passed!'))); @@ -798,7 +797,7 @@ $_testContents''').create(); }); setUp(() async { - await d.file('test.dart', _testContents).create(); + await d.file('test.dart', testContents).create(); }); test('sound null safety is enabled if the package is opted in', () async { diff --git a/pkgs/test/tool/host.dart b/pkgs/test/tool/host.dart index 5e46f92f1..c2395a03e 100644 --- a/pkgs/test/tool/host.dart +++ b/pkgs/test/tool/host.dart @@ -15,13 +15,13 @@ import 'package:js/js.dart'; /// A class defined in content shell, used to control its behavior. @JS() -class _TestRunner { +class TestRunner { external void waitUntilDone(); } /// Returns the current content shell runner, or `null` if none exists. @JS() -external _TestRunner? get testRunner; +external TestRunner? get testRunner; /// A class that exposes the test API to JS. /// diff --git a/pkgs/test_api/lib/src/expect/never_called.dart b/pkgs/test_api/lib/src/expect/never_called.dart index 4b93bd747..96c81cb6b 100644 --- a/pkgs/test_api/lib/src/expect/never_called.dart +++ b/pkgs/test_api/lib/src/expect/never_called.dart @@ -55,12 +55,13 @@ Null Function( .where((argument) => argument != placeholder) .toList(); + var argsText = arguments.isEmpty + ? ' no arguments.' + : ':\n${bullet(arguments.map(prettyPrint))}'; zone.handleUncaughtError( TestFailure( - 'Callback should never have been called, but it was called with' + - (arguments.isEmpty - ? ' no arguments.' - : ':\n${bullet(arguments.map(prettyPrint))}')), + 'Callback should never have been called, but it was called with' + '$argsText'), zone.run(() => Chain.current())); return null; }; diff --git a/pkgs/test_api/lib/src/expect/stream_matchers.dart b/pkgs/test_api/lib/src/expect/stream_matchers.dart index 95495ffbc..df2fbbd01 100644 --- a/pkgs/test_api/lib/src/expect/stream_matchers.dart +++ b/pkgs/test_api/lib/src/expect/stream_matchers.dart @@ -89,8 +89,8 @@ StreamMatcher emitsAnyOf(Iterable matchers) { } if (streamMatchers.length == 1) return streamMatchers.first; - var description = 'do one of the following:\n' + - bullet(streamMatchers.map((matcher) => matcher.description)); + var description = 'do one of the following:\n' + '${bullet(streamMatchers.map((matcher) => matcher.description))}'; return StreamMatcher((queue) async { var transaction = queue.startTransaction(); @@ -166,8 +166,8 @@ StreamMatcher emitsInOrder(Iterable matchers) { var streamMatchers = matchers.map(emits).toList(); if (streamMatchers.length == 1) return streamMatchers.first; - var description = 'do the following in order:\n' + - bullet(streamMatchers.map((matcher) => matcher.description)); + var description = 'do the following in order:\n' + '${bullet(streamMatchers.map((matcher) => matcher.description))}'; return StreamMatcher((queue) async { for (var i = 0; i < streamMatchers.length; i++) { @@ -310,8 +310,8 @@ Future _tryMatch(StreamQueue queue, StreamMatcher matcher) { StreamMatcher emitsInAnyOrder(Iterable matchers) { var streamMatchers = matchers.map(emits).toSet(); if (streamMatchers.length == 1) return streamMatchers.first; - var description = 'do the following in any order:\n' + - bullet(streamMatchers.map((matcher) => matcher.description)); + var description = 'do the following in any order:\n' + '${bullet(streamMatchers.map((matcher) => matcher.description))}'; return StreamMatcher( (queue) async => await _tryInAnyOrder(queue, streamMatchers) ? null : '', diff --git a/pkgs/test_api/pubspec.yaml b/pkgs/test_api/pubspec.yaml index 71e97a0c1..d568ff2df 100644 --- a/pkgs/test_api/pubspec.yaml +++ b/pkgs/test_api/pubspec.yaml @@ -27,7 +27,7 @@ dev_dependencies: glob: ^2.0.0 graphs: ^2.0.0 path: ^1.8.0 - lints: ^1.0.0 + lints: '>=1.0.0 <3.0.0' test: any test_core: any diff --git a/pkgs/test_api/test/frontend/expect_async_test.dart b/pkgs/test_api/test/frontend/expect_async_test.dart index ea60828a7..dde2e414b 100644 --- a/pkgs/test_api/test/frontend/expect_async_test.dart +++ b/pkgs/test_api/test/frontend/expect_async_test.dart @@ -377,6 +377,7 @@ void main() { }); test("doesn't support a function with 7 arguments", () { + // ignore: no_leading_underscores_for_local_identifiers expect(() => expectAsync((_a, _b, _c, _d, _e, _f, _g) {}), throwsArgumentError); }); diff --git a/pkgs/test_core/lib/src/executable.dart b/pkgs/test_core/lib/src/executable.dart index 65d5414c5..68929e1d2 100644 --- a/pkgs/test_core/lib/src/executable.dart +++ b/pkgs/test_core/lib/src/executable.dart @@ -60,7 +60,7 @@ Future _execute(List args) async { /// Signals will only be captured as long as this has an active subscription. /// Otherwise, they'll be handled by Dart's default signal handler, which /// terminates the program immediately. - final _signals = Platform.isWindows + final signals = Platform.isWindows ? ProcessSignal.sigint.watch() : Platform.isFuchsia // Signals don't exist on Fuchsia. ? Stream.empty() @@ -139,7 +139,7 @@ Future _execute(List args) async { Runner? runner; - signalSubscription ??= _signals.listen((signal) async { + signalSubscription ??= signals.listen((signal) async { completeShutdown(); await runner?.close(); }); diff --git a/pkgs/test_core/lib/src/runner.dart b/pkgs/test_core/lib/src/runner.dart index 88280195c..1acba5988 100644 --- a/pkgs/test_core/lib/src/runner.dart +++ b/pkgs/test_core/lib/src/runner.dart @@ -207,9 +207,8 @@ class Runner { } } - warn("this package doesn't support running tests on " + - toSentence(unsupportedNames, conjunction: 'or') + - '.'); + warn("this package doesn't support running tests on " + '${toSentence(unsupportedNames, conjunction: 'or')}.'); } /// Closes the runner. diff --git a/pkgs/test_core/lib/src/runner/compiler_pool.dart b/pkgs/test_core/lib/src/runner/compiler_pool.dart index bb9ead418..1bcc92e9b 100644 --- a/pkgs/test_core/lib/src/runner/compiler_pool.dart +++ b/pkgs/test_core/lib/src/runner/compiler_pool.dart @@ -104,7 +104,7 @@ class CompilerPool { if (exitCode != 0) throw 'dart2js failed.'; - _fixSourceMap(jsPath + '.map'); + _fixSourceMap('$jsPath.map'); }); }); } @@ -117,7 +117,7 @@ class CompilerPool { var root = map['sourceRoot'] as String; map['sources'] = map['sources'].map((source) { - var url = Uri.parse(root + '$source'); + var url = Uri.parse('$root$source'); if (url.scheme != '' && url.scheme != 'file') return source; if (url.path.endsWith('/runInBrowser.dart')) return ''; return p.toUri(mapPath).resolveUri(url).toString(); diff --git a/pkgs/test_core/lib/src/runner/vm/platform.dart b/pkgs/test_core/lib/src/runner/vm/platform.dart index 70b38799b..3164f64f6 100644 --- a/pkgs/test_core/lib/src/runner/vm/platform.dart +++ b/pkgs/test_core/lib/src/runner/vm/platform.dart @@ -179,9 +179,9 @@ Future _spawnDataIsolate( Future _spawnPrecompiledIsolate( String testPath, SendPort message, String precompiledPath) async { - testPath = p.absolute(p.join(precompiledPath, testPath) + '.vm_test.dart'); + testPath = p.absolute('${p.join(precompiledPath, testPath)}.vm_test.dart'); var dillTestpath = - testPath.substring(0, testPath.length - '.dart'.length) + '.vm.app.dill'; + '${testPath.substring(0, testPath.length - '.dart'.length)}.vm.app.dill'; if (await File(dillTestpath).exists()) { testPath = dillTestpath; } @@ -200,7 +200,7 @@ Future> _gatherCoverage(Environment environment) async { Future _spawnPubServeIsolate( String testPath, SendPort message, Uri pubServeUrl) async { var url = pubServeUrl.resolveUri( - p.toUri(p.relative(testPath, from: 'test') + '.vm_test.dart')); + p.toUri('${p.relative(testPath, from: 'test')}.vm_test.dart')); try { return await Isolate.spawnUri(url, [], message, checked: true); diff --git a/pkgs/test_core/pubspec.yaml b/pkgs/test_core/pubspec.yaml index c88f15c9a..1c7349a75 100644 --- a/pkgs/test_core/pubspec.yaml +++ b/pkgs/test_core/pubspec.yaml @@ -33,7 +33,7 @@ dependencies: test_api: 0.4.9 dev_dependencies: - lints: ^1.0.0 + lints: '>=1.0.0 <3.0.0' dependency_overrides: test_api: From d73391138246c86015d1e53d64e15cc065e313b3 Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Fri, 18 Mar 2022 11:49:21 -0700 Subject: [PATCH 2/2] update the pubspec/changelog --- pkgs/test/CHANGELOG.md | 2 ++ pkgs/test/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/test/CHANGELOG.md b/pkgs/test/CHANGELOG.md index 11faa50c9..27e2fcd70 100644 --- a/pkgs/test/CHANGELOG.md +++ b/pkgs/test/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.20.3-dev + ## 1.20.2 * Drop `dart2js-path` command line argument. diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml index 6985d6534..4732e0dea 100644 --- a/pkgs/test/pubspec.yaml +++ b/pkgs/test/pubspec.yaml @@ -1,5 +1,5 @@ name: test -version: 1.20.2 +version: 1.20.3-dev description: >- A full featured library for writing and running Dart tests across platforms. repository: https://github.com/dart-lang/test/blob/master/pkgs/test