敲起来 (dart)

当你在敲击键盘的时候, 出现相应键位的动画特效

  1. // ==UserScript==
  2. // @name 敲起来 (dart)
  3. // @description 当你在敲击键盘的时候, 出现相应键位的动画特效
  4. // @version 1.1.0
  5. // @author Axetroy
  6. // @include *
  7. // @grant none
  8. // @run-at document-idle
  9. // @namespace https://greasyfork.org/zh-CN/users/3400-axetroy
  10. // @license The MIT License (MIT); http://opensource.org/licenses/MIT
  11. // ==/UserScript==
  12.  
  13. // Github源码: https://github.com/axetroy/type-up
  14.  
  15. // Generated by dart2js, the Dart to JavaScript compiler version: 1.21.1.
  16. // The code supports the following hooks:
  17. // dartPrint(message):
  18. // if this function is defined it is called instead of the Dart [print]
  19. // method.
  20. //
  21. // dartMainRunner(main, args):
  22. // if this function is defined, the Dart [main] method will not be invoked
  23. // directly. Instead, a closure that will invoke [main], and its arguments
  24. // [args] is passed to [dartMainRunner].
  25. //
  26. // dartDeferredLibraryLoader(uri, successCallback, errorCallback):
  27. // if this function is defined, it will be called when a deferred library
  28. // is loaded. It should load and eval the javascript of `uri`, and call
  29. // successCallback. If it fails to do so, it should call errorCallback with
  30. // an error.
  31. //
  32. // defaultPackagesBase:
  33. // Override the location where `package:` uris are resolved from. By default
  34. // they are resolved under "packages/" from the current window location.
  35. (function() {
  36. // /* ::norenaming:: */
  37. var supportsDirectProtoAccess = function() {
  38. var cls = function() {
  39. };
  40. cls.prototype = {p: {}};
  41. var object = new cls();
  42. if (!(object.__proto__ && object.__proto__.p === cls.prototype.p))
  43. return false;
  44. try {
  45. if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0)
  46. return true;
  47. if (typeof version == "function" && version.length == 0) {
  48. var v = version();
  49. if (/^\d+\.\d+\.\d+\.\d+$/.test(v))
  50. return true;
  51. }
  52. } catch (_) {
  53. }
  54. return false;
  55. }();
  56. function map(x) {
  57. x = Object.create(null);
  58. x.x = 0;
  59. delete x.x;
  60. return x;
  61. }
  62. // The global objects start as so-called "slow objects". For V8, this
  63. // means that it won't try to make map transitions as we add properties
  64. // to these objects. Later on, we attempt to turn these objects into
  65. // fast objects by calling "convertToFastObject" (see
  66. // [emitConvertToFastObjectFunction]).
  67. var A = map();
  68. var B = map();
  69. var C = map();
  70. var D = map();
  71. var E = map();
  72. var F = map();
  73. var G = map();
  74. var H = map();
  75. var J = map();
  76. var K = map();
  77. var L = map();
  78. var M = map();
  79. var N = map();
  80. var O = map();
  81. var P = map();
  82. var Q = map();
  83. var R = map();
  84. var S = map();
  85. var T = map();
  86. var U = map();
  87. var V = map();
  88. var W = map();
  89. var X = map();
  90. var Y = map();
  91. var Z = map();
  92. function Isolate() {
  93. }
  94. init();
  95. // Constructors are generated at runtime.
  96. function setupProgram(programData, typesOffset) {
  97. "use strict";
  98. function generateAccessor(fieldDescriptor, accessors, cls) {
  99. var fieldInformation = fieldDescriptor.split("-");
  100. var field = fieldInformation[0];
  101. var len = field.length;
  102. var code = field.charCodeAt(len - 1);
  103. var reflectable;
  104. if (fieldInformation.length > 1)
  105. reflectable = true;
  106. else
  107. reflectable = false;
  108. code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? code - 117 : code >= 37 && code <= 43 ? code - 27 : 0;
  109. if (code) {
  110. var getterCode = code & 3;
  111. var setterCode = code >> 2;
  112. var accessorName = field = field.substring(0, len - 1);
  113. var divider = field.indexOf(":");
  114. if (divider > 0) {
  115. accessorName = field.substring(0, divider);
  116. field = field.substring(divider + 1);
  117. }
  118. if (getterCode) {
  119. var args = getterCode & 2 ? "receiver" : "";
  120. var receiver = getterCode & 1 ? "this" : "receiver";
  121. var body = "return " + receiver + "." + field;
  122. var property = cls + ".prototype.get$" + accessorName + "=";
  123. var fn = "function(" + args + "){" + body + "}";
  124. if (reflectable)
  125. accessors.push(property + "$reflectable(" + fn + ");\n");
  126. else
  127. accessors.push(property + fn + ";\n");
  128. }
  129. if (setterCode) {
  130. var args = setterCode & 2 ? "receiver, value" : "value";
  131. var receiver = setterCode & 1 ? "this" : "receiver";
  132. var body = receiver + "." + field + " = value";
  133. var property = cls + ".prototype.set$" + accessorName + "=";
  134. var fn = "function(" + args + "){" + body + "}";
  135. if (reflectable)
  136. accessors.push(property + "$reflectable(" + fn + ");\n");
  137. else
  138. accessors.push(property + fn + ";\n");
  139. }
  140. }
  141. return field;
  142. }
  143. function defineClass(name, fields) {
  144. var accessors = [];
  145. var str = "function " + name + "(";
  146. var body = "";
  147. var fieldNames = "";
  148. for (var i = 0; i < fields.length; i++) {
  149. if (i != 0)
  150. str += ", ";
  151. var field = generateAccessor(fields[i], accessors, name);
  152. fieldNames += "'" + field + "',";
  153. var parameter = "p_" + field;
  154. str += parameter;
  155. body += "this." + field + " = " + parameter + ";\n";
  156. }
  157. if (supportsDirectProtoAccess)
  158. body += "this." + "$deferredAction" + "();";
  159. str += ") {\n" + body + "}\n";
  160. str += name + ".builtin$cls=\"" + name + "\";\n";
  161. str += "$desc=$collectedClasses." + name + "[1];\n";
  162. str += name + ".prototype = $desc;\n";
  163. if (typeof defineClass.name != "string")
  164. str += name + ".name=\"" + name + "\";\n";
  165. str += name + "." + "$__fields__" + "=[" + fieldNames + "];\n";
  166. str += accessors.join("");
  167. return str;
  168. }
  169. init.createNewIsolate = function() {
  170. return new Isolate();
  171. };
  172. init.classIdExtractor = function(o) {
  173. return o.constructor.name;
  174. };
  175. init.classFieldsExtractor = function(o) {
  176. var fieldNames = o.constructor.$__fields__;
  177. if (!fieldNames)
  178. return [];
  179. var result = [];
  180. result.length = fieldNames.length;
  181. for (var i = 0; i < fieldNames.length; i++)
  182. result[i] = o[fieldNames[i]];
  183. return result;
  184. };
  185. init.instanceFromClassId = function(name) {
  186. return new init.allClasses[name]();
  187. };
  188. init.initializeEmptyInstance = function(name, o, fields) {
  189. init.allClasses[name].apply(o, fields);
  190. return o;
  191. };
  192. var inheritFrom = supportsDirectProtoAccess ? function(constructor, superConstructor) {
  193. var prototype = constructor.prototype;
  194. prototype.__proto__ = superConstructor.prototype;
  195. prototype.constructor = constructor;
  196. prototype["$is" + constructor.name] = constructor;
  197. return convertToFastObject(prototype);
  198. } : function() {
  199. function tmp() {
  200. }
  201. return function(constructor, superConstructor) {
  202. tmp.prototype = superConstructor.prototype;
  203. var object = new tmp();
  204. convertToSlowObject(object);
  205. var properties = constructor.prototype;
  206. var members = Object.keys(properties);
  207. for (var i = 0; i < members.length; i++) {
  208. var member = members[i];
  209. object[member] = properties[member];
  210. }
  211. object["$is" + constructor.name] = constructor;
  212. object.constructor = constructor;
  213. constructor.prototype = object;
  214. return object;
  215. };
  216. }();
  217. function finishClasses(processedClasses) {
  218. var allClasses = init.allClasses;
  219. processedClasses.combinedConstructorFunction += "return [\n" + processedClasses.constructorsList.join(",\n ") + "\n]";
  220. var constructors = new Function("$collectedClasses", processedClasses.combinedConstructorFunction)(processedClasses.collected);
  221. processedClasses.combinedConstructorFunction = null;
  222. for (var i = 0; i < constructors.length; i++) {
  223. var constructor = constructors[i];
  224. var cls = constructor.name;
  225. var desc = processedClasses.collected[cls];
  226. var globalObject = desc[0];
  227. desc = desc[1];
  228. allClasses[cls] = constructor;
  229. globalObject[cls] = constructor;
  230. }
  231. constructors = null;
  232. var finishedClasses = init.finishedClasses;
  233. function finishClass(cls) {
  234. if (finishedClasses[cls])
  235. return;
  236. finishedClasses[cls] = true;
  237. var superclass = processedClasses.pending[cls];
  238. if (superclass && superclass.indexOf("+") > 0) {
  239. var s = superclass.split("+");
  240. superclass = s[0];
  241. var mixinClass = s[1];
  242. finishClass(mixinClass);
  243. var mixin = allClasses[mixinClass];
  244. var mixinPrototype = mixin.prototype;
  245. var clsPrototype = allClasses[cls].prototype;
  246. var properties = Object.keys(mixinPrototype);
  247. for (var i = 0; i < properties.length; i++) {
  248. var d = properties[i];
  249. if (!hasOwnProperty.call(clsPrototype, d))
  250. clsPrototype[d] = mixinPrototype[d];
  251. }
  252. }
  253. if (!superclass || typeof superclass != "string") {
  254. var constructor = allClasses[cls];
  255. var prototype = constructor.prototype;
  256. prototype.constructor = constructor;
  257. prototype.$isObject = constructor;
  258. prototype.$deferredAction = function() {
  259. };
  260. return;
  261. }
  262. finishClass(superclass);
  263. var superConstructor = allClasses[superclass];
  264. if (!superConstructor)
  265. superConstructor = existingIsolateProperties[superclass];
  266. var constructor = allClasses[cls];
  267. var prototype = inheritFrom(constructor, superConstructor);
  268. if (mixinPrototype)
  269. prototype.$deferredAction = mixinDeferredActionHelper(mixinPrototype, prototype);
  270. if (Object.prototype.hasOwnProperty.call(prototype, "%")) {
  271. var nativeSpec = prototype["%"].split(";");
  272. if (nativeSpec[0]) {
  273. var tags = nativeSpec[0].split("|");
  274. for (var i = 0; i < tags.length; i++) {
  275. init.interceptorsByTag[tags[i]] = constructor;
  276. init.leafTags[tags[i]] = true;
  277. }
  278. }
  279. if (nativeSpec[1]) {
  280. tags = nativeSpec[1].split("|");
  281. if (nativeSpec[2]) {
  282. var subclasses = nativeSpec[2].split("|");
  283. for (var i = 0; i < subclasses.length; i++) {
  284. var subclass = allClasses[subclasses[i]];
  285. subclass.$nativeSuperclassTag = tags[0];
  286. }
  287. }
  288. for (i = 0; i < tags.length; i++) {
  289. init.interceptorsByTag[tags[i]] = constructor;
  290. init.leafTags[tags[i]] = false;
  291. }
  292. }
  293. prototype.$deferredAction();
  294. }
  295. if (prototype.$isInterceptor)
  296. prototype.$deferredAction();
  297. }
  298. var properties = Object.keys(processedClasses.pending);
  299. for (var i = 0; i < properties.length; i++)
  300. finishClass(properties[i]);
  301. }
  302. function finishAddStubsHelper() {
  303. var prototype = this;
  304. while (!prototype.hasOwnProperty("$deferredAction"))
  305. prototype = prototype.__proto__;
  306. delete prototype.$deferredAction;
  307. var properties = Object.keys(prototype);
  308. for (var index = 0; index < properties.length; index++) {
  309. var property = properties[index];
  310. var firstChar = property.charCodeAt(0);
  311. var elem;
  312. if (property !== "^" && property !== "$reflectable" && firstChar !== 43 && firstChar !== 42 && (elem = prototype[property]) != null && elem.constructor === Array && property !== "<>")
  313. addStubs(prototype, elem, property, false, []);
  314. }
  315. convertToFastObject(prototype);
  316. prototype = prototype.__proto__;
  317. prototype.$deferredAction();
  318. }
  319. function mixinDeferredActionHelper(mixinPrototype, targetPrototype) {
  320. var chain;
  321. if (targetPrototype.hasOwnProperty("$deferredAction"))
  322. chain = targetPrototype.$deferredAction;
  323. return function foo() {
  324. var prototype = this;
  325. while (!prototype.hasOwnProperty("$deferredAction"))
  326. prototype = prototype.__proto__;
  327. if (chain)
  328. prototype.$deferredAction = chain;
  329. else {
  330. delete prototype.$deferredAction;
  331. convertToFastObject(prototype);
  332. }
  333. mixinPrototype.$deferredAction();
  334. prototype.$deferredAction();
  335. };
  336. }
  337. function processClassData(cls, descriptor, processedClasses) {
  338. descriptor = convertToSlowObject(descriptor);
  339. var previousProperty;
  340. var properties = Object.keys(descriptor);
  341. var hasDeferredWork = false;
  342. var shouldDeferWork = supportsDirectProtoAccess && cls != "Object";
  343. for (var i = 0; i < properties.length; i++) {
  344. var property = properties[i];
  345. var firstChar = property.charCodeAt(0);
  346. if (property === "static") {
  347. processStatics(init.statics[cls] = descriptor.static, processedClasses);
  348. delete descriptor.static;
  349. } else if (firstChar === 43) {
  350. mangledNames[previousProperty] = property.substring(1);
  351. var flag = descriptor[property];
  352. if (flag > 0)
  353. descriptor[previousProperty].$reflectable = flag;
  354. } else if (firstChar === 42) {
  355. descriptor[previousProperty].$defaultValues = descriptor[property];
  356. var optionalMethods = descriptor.$methodsWithOptionalArguments;
  357. if (!optionalMethods)
  358. descriptor.$methodsWithOptionalArguments = optionalMethods = {};
  359. optionalMethods[property] = previousProperty;
  360. } else {
  361. var elem = descriptor[property];
  362. if (property !== "^" && elem != null && elem.constructor === Array && property !== "<>")
  363. if (shouldDeferWork)
  364. hasDeferredWork = true;
  365. else
  366. addStubs(descriptor, elem, property, false, []);
  367. else
  368. previousProperty = property;
  369. }
  370. }
  371. if (hasDeferredWork)
  372. descriptor.$deferredAction = finishAddStubsHelper;
  373. var classData = descriptor["^"], split, supr, fields = classData;
  374. var s = fields.split(";");
  375. fields = s[1] ? s[1].split(",") : [];
  376. supr = s[0];
  377. split = supr.split(":");
  378. if (split.length == 2) {
  379. supr = split[0];
  380. var functionSignature = split[1];
  381. if (functionSignature)
  382. descriptor.$signature = function(s) {
  383. return function() {
  384. return init.types[s];
  385. };
  386. }(functionSignature);
  387. }
  388. if (supr)
  389. processedClasses.pending[cls] = supr;
  390. processedClasses.combinedConstructorFunction += defineClass(cls, fields);
  391. processedClasses.constructorsList.push(cls);
  392. processedClasses.collected[cls] = [globalObject, descriptor];
  393. classes.push(cls);
  394. }
  395. function processStatics(descriptor, processedClasses) {
  396. var properties = Object.keys(descriptor);
  397. for (var i = 0; i < properties.length; i++) {
  398. var property = properties[i];
  399. if (property === "^")
  400. continue;
  401. var element = descriptor[property];
  402. var firstChar = property.charCodeAt(0);
  403. var previousProperty;
  404. if (firstChar === 43) {
  405. mangledGlobalNames[previousProperty] = property.substring(1);
  406. var flag = descriptor[property];
  407. if (flag > 0)
  408. descriptor[previousProperty].$reflectable = flag;
  409. if (element && element.length)
  410. init.typeInformation[previousProperty] = element;
  411. } else if (firstChar === 42) {
  412. globalObject[previousProperty].$defaultValues = element;
  413. var optionalMethods = descriptor.$methodsWithOptionalArguments;
  414. if (!optionalMethods)
  415. descriptor.$methodsWithOptionalArguments = optionalMethods = {};
  416. optionalMethods[property] = previousProperty;
  417. } else if (typeof element === "function") {
  418. globalObject[previousProperty = property] = element;
  419. functions.push(property);
  420. init.globalFunctions[property] = element;
  421. } else if (element.constructor === Array)
  422. addStubs(globalObject, element, property, true, functions);
  423. else {
  424. previousProperty = property;
  425. processClassData(property, element, processedClasses);
  426. }
  427. }
  428. }
  429. function addStubs(prototype, array, name, isStatic, functions) {
  430. var index = 0, alias = array[index], f;
  431. if (typeof alias == "string")
  432. f = array[++index];
  433. else {
  434. f = alias;
  435. alias = name;
  436. }
  437. var funcs = [prototype[name] = prototype[alias] = f];
  438. f.$stubName = name;
  439. functions.push(name);
  440. for (index++; index < array.length; index++) {
  441. f = array[index];
  442. if (typeof f != "function")
  443. break;
  444. if (!isStatic)
  445. f.$stubName = array[++index];
  446. funcs.push(f);
  447. if (f.$stubName) {
  448. prototype[f.$stubName] = f;
  449. functions.push(f.$stubName);
  450. }
  451. }
  452. for (var i = 0; i < funcs.length; index++, i++)
  453. funcs[i].$callName = array[index];
  454. var getterStubName = array[index];
  455. array = array.slice(++index);
  456. var requiredParameterInfo = array[0];
  457. var requiredParameterCount = requiredParameterInfo >> 1;
  458. var isAccessor = (requiredParameterInfo & 1) === 1;
  459. var isSetter = requiredParameterInfo === 3;
  460. var isGetter = requiredParameterInfo === 1;
  461. var optionalParameterInfo = array[1];
  462. var optionalParameterCount = optionalParameterInfo >> 1;
  463. var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1;
  464. var isIntercepted = requiredParameterCount + optionalParameterCount != funcs[0].length;
  465. var functionTypeIndex = array[2];
  466. if (typeof functionTypeIndex == "number")
  467. array[2] = functionTypeIndex + typesOffset;
  468. var unmangledNameIndex = 2 * optionalParameterCount + requiredParameterCount + 3;
  469. if (getterStubName) {
  470. f = tearOff(funcs, array, isStatic, name, isIntercepted);
  471. prototype[name].$getter = f;
  472. f.$getterStub = true;
  473. if (isStatic) {
  474. init.globalFunctions[name] = f;
  475. functions.push(getterStubName);
  476. }
  477. prototype[getterStubName] = f;
  478. funcs.push(f);
  479. f.$stubName = getterStubName;
  480. f.$callName = null;
  481. }
  482. }
  483. function tearOffGetter(funcs, reflectionInfo, name, isIntercepted) {
  484. return isIntercepted ? new Function("funcs", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(x) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, reflectionInfo, false, [x], name);" + "return new c(this, funcs[0], x, name);" + "}")(funcs, reflectionInfo, name, H, null) : new Function("funcs", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, reflectionInfo, false, [], name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, reflectionInfo, name, H, null);
  485. }
  486. function tearOff(funcs, reflectionInfo, isStatic, name, isIntercepted) {
  487. var cache;
  488. return isStatic ? function() {
  489. if (cache === void 0)
  490. cache = H.closureFromTearOff(this, funcs, reflectionInfo, true, [], name).prototype;
  491. return cache;
  492. } : tearOffGetter(funcs, reflectionInfo, name, isIntercepted);
  493. }
  494. var functionCounter = 0;
  495. if (!init.libraries)
  496. init.libraries = [];
  497. if (!init.mangledNames)
  498. init.mangledNames = map();
  499. if (!init.mangledGlobalNames)
  500. init.mangledGlobalNames = map();
  501. if (!init.statics)
  502. init.statics = map();
  503. if (!init.typeInformation)
  504. init.typeInformation = map();
  505. if (!init.globalFunctions)
  506. init.globalFunctions = map();
  507. var libraries = init.libraries;
  508. var mangledNames = init.mangledNames;
  509. var mangledGlobalNames = init.mangledGlobalNames;
  510. var hasOwnProperty = Object.prototype.hasOwnProperty;
  511. var length = programData.length;
  512. var processedClasses = map();
  513. processedClasses.collected = map();
  514. processedClasses.pending = map();
  515. processedClasses.constructorsList = [];
  516. processedClasses.combinedConstructorFunction = "function $reflectable(fn){fn.$reflectable=1;return fn};\n" + "var $desc;\n";
  517. for (var i = 0; i < length; i++) {
  518. var data = programData[i];
  519. var name = data[0];
  520. var uri = data[1];
  521. var metadata = data[2];
  522. var globalObject = data[3];
  523. var descriptor = data[4];
  524. var isRoot = !!data[5];
  525. var fields = descriptor && descriptor["^"];
  526. if (fields instanceof Array)
  527. fields = fields[0];
  528. var classes = [];
  529. var functions = [];
  530. processStatics(descriptor, processedClasses);
  531. libraries.push([name, uri, classes, functions, metadata, fields, isRoot, globalObject]);
  532. }
  533. finishClasses(processedClasses);
  534. }
  535. Isolate.functionThatReturnsNull = function() {
  536. };
  537. var dart = [["_foreign_helper", "dart:_foreign_helper",, H, {
  538. "^": "",
  539. JS_CONST: {
  540. "^": "Object;code"
  541. }
  542. }], ["_interceptors", "dart:_interceptors",, J, {
  543. "^": "",
  544. getInterceptor: function(object) {
  545. return void 0;
  546. },
  547. makeDispatchRecord: function(interceptor, proto, extension, indexability) {
  548. return {i: interceptor, p: proto, e: extension, x: indexability};
  549. },
  550. getNativeInterceptor: function(object) {
  551. var record, proto, objectProto, $constructor, interceptor;
  552. record = object[init.dispatchPropertyName];
  553. if (record == null)
  554. if ($.initNativeDispatchFlag == null) {
  555. H.initNativeDispatch();
  556. record = object[init.dispatchPropertyName];
  557. }
  558. if (record != null) {
  559. proto = record.p;
  560. if (false === proto)
  561. return record.i;
  562. if (true === proto)
  563. return object;
  564. objectProto = Object.getPrototypeOf(object);
  565. if (proto === objectProto)
  566. return record.i;
  567. if (record.e === objectProto)
  568. throw H.wrapException(new P.UnimplementedError("Return interceptor for " + H.S(proto(object, record))));
  569. }
  570. $constructor = object.constructor;
  571. interceptor = $constructor == null ? null : $constructor[$.$get$JS_INTEROP_INTERCEPTOR_TAG()];
  572. if (interceptor != null)
  573. return interceptor;
  574. interceptor = H.lookupAndCacheInterceptor(object);
  575. if (interceptor != null)
  576. return interceptor;
  577. if (typeof object == "function")
  578. return C.JavaScriptFunction_methods;
  579. proto = Object.getPrototypeOf(object);
  580. if (proto == null)
  581. return C.PlainJavaScriptObject_methods;
  582. if (proto === Object.prototype)
  583. return C.PlainJavaScriptObject_methods;
  584. if (typeof $constructor == "function") {
  585. Object.defineProperty($constructor, $.$get$JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true});
  586. return C.UnknownJavaScriptObject_methods;
  587. }
  588. return C.UnknownJavaScriptObject_methods;
  589. },
  590. Interceptor: {
  591. "^": "Object;",
  592. $eq: function(receiver, other) {
  593. return receiver === other;
  594. },
  595. get$hashCode: function(receiver) {
  596. return H.Primitives_objectHashCode(receiver);
  597. },
  598. toString$0: ["super$Interceptor$toString", function(receiver) {
  599. return H.Primitives_objectToHumanReadableString(receiver);
  600. }],
  601. "%": "Blob|DOMError|DOMImplementation|File|FileError|MediaError|MediaKeyError|NavigatorUserMediaError|PositionError|Range|SQLError|SVGAnimatedLength|SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedString"
  602. },
  603. JSBool: {
  604. "^": "Interceptor;",
  605. toString$0: function(receiver) {
  606. return String(receiver);
  607. },
  608. get$hashCode: function(receiver) {
  609. return receiver ? 519018 : 218159;
  610. },
  611. $isbool: 1
  612. },
  613. JSNull: {
  614. "^": "Interceptor;",
  615. $eq: function(receiver, other) {
  616. return null == other;
  617. },
  618. toString$0: function(receiver) {
  619. return "null";
  620. },
  621. get$hashCode: function(receiver) {
  622. return 0;
  623. }
  624. },
  625. JavaScriptObject: {
  626. "^": "Interceptor;",
  627. get$hashCode: function(receiver) {
  628. return 0;
  629. },
  630. toString$0: ["super$JavaScriptObject$toString", function(receiver) {
  631. return String(receiver);
  632. }],
  633. $isJSObject: 1
  634. },
  635. PlainJavaScriptObject: {
  636. "^": "JavaScriptObject;"
  637. },
  638. UnknownJavaScriptObject: {
  639. "^": "JavaScriptObject;"
  640. },
  641. JavaScriptFunction: {
  642. "^": "JavaScriptObject;",
  643. toString$0: function(receiver) {
  644. var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()];
  645. return dartClosure == null ? this.super$JavaScriptObject$toString(receiver) : J.toString$0$(dartClosure);
  646. },
  647. $signature: function() {
  648. return {func: 1, opt: [,,,,,,,,,,,,,,,,]};
  649. }
  650. },
  651. JSArray: {
  652. "^": "Interceptor;$ti",
  653. checkMutable$1: function(receiver, reason) {
  654. if (!!receiver.immutable$list)
  655. throw H.wrapException(new P.UnsupportedError(reason));
  656. },
  657. checkGrowable$1: function(receiver, reason) {
  658. if (!!receiver.fixed$length)
  659. throw H.wrapException(new P.UnsupportedError(reason));
  660. },
  661. map$1: function(receiver, f) {
  662. return new H.MappedListIterable(receiver, f, [null, null]);
  663. },
  664. join$1: function(receiver, separator) {
  665. var t1, list, i, t2;
  666. t1 = receiver.length;
  667. list = new Array(t1);
  668. list.fixed$length = Array;
  669. for (i = 0; i < receiver.length; ++i) {
  670. t2 = H.S(receiver[i]);
  671. if (i >= t1)
  672. return H.ioore(list, i);
  673. list[i] = t2;
  674. }
  675. return list.join(separator);
  676. },
  677. elementAt$1: function(receiver, index) {
  678. if (index < 0 || index >= receiver.length)
  679. return H.ioore(receiver, index);
  680. return receiver[index];
  681. },
  682. get$first: function(receiver) {
  683. if (receiver.length > 0)
  684. return receiver[0];
  685. throw H.wrapException(H.IterableElementError_noElement());
  686. },
  687. setRange$4: function(receiver, start, end, iterable, skipCount) {
  688. var $length, i, t1;
  689. this.checkMutable$1(receiver, "set range");
  690. P.RangeError_checkValidRange(start, end, receiver.length, null, null, null);
  691. $length = end - start;
  692. if ($length === 0)
  693. return;
  694. if (skipCount < 0)
  695. H.throwExpression(P.RangeError$range(skipCount, 0, null, "skipCount", null));
  696. if (skipCount + $length > iterable.length)
  697. throw H.wrapException(H.IterableElementError_tooFew());
  698. if (skipCount < start)
  699. for (i = $length - 1; i >= 0; --i) {
  700. t1 = skipCount + i;
  701. if (t1 < 0 || t1 >= iterable.length)
  702. return H.ioore(iterable, t1);
  703. receiver[start + i] = iterable[t1];
  704. }
  705. else
  706. for (i = 0; i < $length; ++i) {
  707. t1 = skipCount + i;
  708. if (t1 < 0 || t1 >= iterable.length)
  709. return H.ioore(iterable, t1);
  710. receiver[start + i] = iterable[t1];
  711. }
  712. },
  713. any$1: function(receiver, test) {
  714. var end, i;
  715. end = receiver.length;
  716. for (i = 0; i < end; ++i) {
  717. if (test.call$1(receiver[i]) === true)
  718. return true;
  719. if (receiver.length !== end)
  720. throw H.wrapException(new P.ConcurrentModificationError(receiver));
  721. }
  722. return false;
  723. },
  724. contains$1: function(receiver, other) {
  725. var i;
  726. for (i = 0; i < receiver.length; ++i)
  727. if (J.$eq$(receiver[i], other))
  728. return true;
  729. return false;
  730. },
  731. toString$0: function(receiver) {
  732. return P.IterableBase_iterableToFullString(receiver, "[", "]");
  733. },
  734. get$iterator: function(receiver) {
  735. return new J.ArrayIterator(receiver, receiver.length, 0, null);
  736. },
  737. get$hashCode: function(receiver) {
  738. return H.Primitives_objectHashCode(receiver);
  739. },
  740. get$length: function(receiver) {
  741. return receiver.length;
  742. },
  743. set$length: function(receiver, newLength) {
  744. this.checkGrowable$1(receiver, "set length");
  745. if (newLength < 0)
  746. throw H.wrapException(P.RangeError$range(newLength, 0, null, "newLength", null));
  747. receiver.length = newLength;
  748. },
  749. $index: function(receiver, index) {
  750. if (typeof index !== "number" || Math.floor(index) !== index)
  751. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  752. if (index >= receiver.length || index < 0)
  753. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  754. return receiver[index];
  755. },
  756. $indexSet: function(receiver, index, value) {
  757. this.checkMutable$1(receiver, "indexed set");
  758. if (typeof index !== "number" || Math.floor(index) !== index)
  759. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  760. if (index >= receiver.length || index < 0)
  761. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  762. receiver[index] = value;
  763. },
  764. $isJSIndexable: 1,
  765. $asJSIndexable: Isolate.functionThatReturnsNull,
  766. $isList: 1,
  767. $asList: null,
  768. $isEfficientLengthIterable: 1,
  769. $asEfficientLengthIterable: null
  770. },
  771. JSUnmodifiableArray: {
  772. "^": "JSArray;$ti"
  773. },
  774. ArrayIterator: {
  775. "^": "Object;__interceptors$_iterable,__interceptors$_length,__interceptors$_index,__interceptors$_current",
  776. get$current: function() {
  777. return this.__interceptors$_current;
  778. },
  779. moveNext$0: function() {
  780. var t1, $length, t2;
  781. t1 = this.__interceptors$_iterable;
  782. $length = t1.length;
  783. if (this.__interceptors$_length !== $length)
  784. throw H.wrapException(H.throwConcurrentModificationError(t1));
  785. t2 = this.__interceptors$_index;
  786. if (t2 >= $length) {
  787. this.__interceptors$_current = null;
  788. return false;
  789. }
  790. this.__interceptors$_current = t1[t2];
  791. this.__interceptors$_index = t2 + 1;
  792. return true;
  793. }
  794. },
  795. JSNumber: {
  796. "^": "Interceptor;",
  797. remainder$1: function(receiver, b) {
  798. return receiver % b;
  799. },
  800. toRadixString$1: function(receiver, radix) {
  801. var result, match, t1, exponent;
  802. if (radix < 2 || radix > 36)
  803. throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null));
  804. result = receiver.toString(radix);
  805. if (C.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41)
  806. return result;
  807. match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result);
  808. if (match == null)
  809. H.throwExpression(new P.UnsupportedError("Unexpected toString result: " + result));
  810. t1 = J.getInterceptor$asx(match);
  811. result = t1.$index(match, 1);
  812. exponent = +t1.$index(match, 3);
  813. if (t1.$index(match, 2) != null) {
  814. result += t1.$index(match, 2);
  815. exponent -= t1.$index(match, 2).length;
  816. }
  817. return result + C.JSString_methods.$mul("0", exponent);
  818. },
  819. toString$0: function(receiver) {
  820. if (receiver === 0 && 1 / receiver < 0)
  821. return "-0.0";
  822. else
  823. return "" + receiver;
  824. },
  825. get$hashCode: function(receiver) {
  826. return receiver & 0x1FFFFFFF;
  827. },
  828. $add: function(receiver, other) {
  829. if (typeof other !== "number")
  830. throw H.wrapException(H.argumentErrorValue(other));
  831. return receiver + other;
  832. },
  833. _tdivFast$1: function(receiver, other) {
  834. return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other);
  835. },
  836. _tdivSlow$1: function(receiver, other) {
  837. var quotient = receiver / other;
  838. if (quotient >= -2147483648 && quotient <= 2147483647)
  839. return quotient | 0;
  840. if (quotient > 0) {
  841. if (quotient !== 1 / 0)
  842. return Math.floor(quotient);
  843. } else if (quotient > -1 / 0)
  844. return Math.ceil(quotient);
  845. throw H.wrapException(new P.UnsupportedError("Result of truncating division is " + H.S(quotient) + ": " + H.S(receiver) + " ~/ " + other));
  846. },
  847. _shrOtherPositive$1: function(receiver, other) {
  848. var t1;
  849. if (receiver > 0)
  850. t1 = other > 31 ? 0 : receiver >>> other;
  851. else {
  852. t1 = other > 31 ? 31 : other;
  853. t1 = receiver >> t1 >>> 0;
  854. }
  855. return t1;
  856. },
  857. $lt: function(receiver, other) {
  858. if (typeof other !== "number")
  859. throw H.wrapException(H.argumentErrorValue(other));
  860. return receiver < other;
  861. },
  862. $isnum: 1
  863. },
  864. JSInt: {
  865. "^": "JSNumber;",
  866. $isnum: 1,
  867. $is$int: 1
  868. },
  869. JSDouble: {
  870. "^": "JSNumber;",
  871. $isnum: 1
  872. },
  873. JSString: {
  874. "^": "Interceptor;",
  875. codeUnitAt$1: function(receiver, index) {
  876. if (index < 0)
  877. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  878. if (index >= receiver.length)
  879. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  880. return receiver.charCodeAt(index);
  881. },
  882. $add: function(receiver, other) {
  883. if (typeof other !== "string")
  884. throw H.wrapException(P.ArgumentError$value(other, null, null));
  885. return receiver + other;
  886. },
  887. substring$2: function(receiver, startIndex, endIndex) {
  888. if (endIndex == null)
  889. endIndex = receiver.length;
  890. H.checkInt(endIndex);
  891. if (startIndex < 0)
  892. throw H.wrapException(P.RangeError$value(startIndex, null, null));
  893. if (typeof endIndex !== "number")
  894. return H.iae(endIndex);
  895. if (startIndex > endIndex)
  896. throw H.wrapException(P.RangeError$value(startIndex, null, null));
  897. if (endIndex > receiver.length)
  898. throw H.wrapException(P.RangeError$value(endIndex, null, null));
  899. return receiver.substring(startIndex, endIndex);
  900. },
  901. substring$1: function($receiver, startIndex) {
  902. return this.substring$2($receiver, startIndex, null);
  903. },
  904. toLowerCase$0: function(receiver) {
  905. return receiver.toLowerCase();
  906. },
  907. $mul: function(receiver, times) {
  908. var s, result;
  909. if (0 >= times)
  910. return "";
  911. if (times === 1 || receiver.length === 0)
  912. return receiver;
  913. if (times !== times >>> 0)
  914. throw H.wrapException(C.C_OutOfMemoryError);
  915. for (s = receiver, result = ""; true;) {
  916. if ((times & 1) === 1)
  917. result = s + result;
  918. times = times >>> 1;
  919. if (times === 0)
  920. break;
  921. s += s;
  922. }
  923. return result;
  924. },
  925. contains$2: function(receiver, other, startIndex) {
  926. if (startIndex > receiver.length)
  927. throw H.wrapException(P.RangeError$range(startIndex, 0, receiver.length, null, null));
  928. return H.stringContainsUnchecked(receiver, other, startIndex);
  929. },
  930. toString$0: function(receiver) {
  931. return receiver;
  932. },
  933. get$hashCode: function(receiver) {
  934. var t1, hash, i;
  935. for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) {
  936. hash = 536870911 & hash + receiver.charCodeAt(i);
  937. hash = 536870911 & hash + ((524287 & hash) << 10);
  938. hash ^= hash >> 6;
  939. }
  940. hash = 536870911 & hash + ((67108863 & hash) << 3);
  941. hash ^= hash >> 11;
  942. return 536870911 & hash + ((16383 & hash) << 15);
  943. },
  944. get$length: function(receiver) {
  945. return receiver.length;
  946. },
  947. $index: function(receiver, index) {
  948. if (typeof index !== "number" || Math.floor(index) !== index)
  949. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  950. if (index >= receiver.length || index < 0)
  951. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  952. return receiver[index];
  953. },
  954. $isJSIndexable: 1,
  955. $asJSIndexable: Isolate.functionThatReturnsNull,
  956. $isString: 1
  957. }
  958. }], ["dart._internal", "dart:_internal",, H, {
  959. "^": "",
  960. IterableElementError_noElement: function() {
  961. return new P.StateError("No element");
  962. },
  963. IterableElementError_tooMany: function() {
  964. return new P.StateError("Too many elements");
  965. },
  966. IterableElementError_tooFew: function() {
  967. return new P.StateError("Too few elements");
  968. },
  969. EfficientLengthIterable: {
  970. "^": "Iterable;$ti",
  971. $asEfficientLengthIterable: null
  972. },
  973. ListIterable: {
  974. "^": "EfficientLengthIterable;$ti",
  975. get$iterator: function(_) {
  976. return new H.ListIterator(this, this.get$length(this), 0, null);
  977. },
  978. where$1: function(_, test) {
  979. return this.super$Iterable$where(0, test);
  980. },
  981. map$1: function(_, f) {
  982. return new H.MappedListIterable(this, f, [H.getRuntimeTypeArgument(this, "ListIterable", 0), null]);
  983. },
  984. toList$1$growable: function(_, growable) {
  985. var result, i, t1;
  986. result = H.setRuntimeTypeInfo([], [H.getRuntimeTypeArgument(this, "ListIterable", 0)]);
  987. C.JSArray_methods.set$length(result, this.get$length(this));
  988. for (i = 0; i < this.get$length(this); ++i) {
  989. t1 = this.elementAt$1(0, i);
  990. if (i >= result.length)
  991. return H.ioore(result, i);
  992. result[i] = t1;
  993. }
  994. return result;
  995. },
  996. toList$0: function($receiver) {
  997. return this.toList$1$growable($receiver, true);
  998. }
  999. },
  1000. ListIterator: {
  1001. "^": "Object;_iterable,__internal$_length,_index,__internal$_current",
  1002. get$current: function() {
  1003. return this.__internal$_current;
  1004. },
  1005. moveNext$0: function() {
  1006. var t1, t2, $length, t3;
  1007. t1 = this._iterable;
  1008. t2 = J.getInterceptor$asx(t1);
  1009. $length = t2.get$length(t1);
  1010. if (this.__internal$_length !== $length)
  1011. throw H.wrapException(new P.ConcurrentModificationError(t1));
  1012. t3 = this._index;
  1013. if (t3 >= $length) {
  1014. this.__internal$_current = null;
  1015. return false;
  1016. }
  1017. this.__internal$_current = t2.elementAt$1(t1, t3);
  1018. ++this._index;
  1019. return true;
  1020. }
  1021. },
  1022. MappedIterable: {
  1023. "^": "Iterable;_iterable,_f,$ti",
  1024. get$iterator: function(_) {
  1025. return new H.MappedIterator(null, J.get$iterator$ax(this._iterable), this._f, this.$ti);
  1026. },
  1027. get$length: function(_) {
  1028. return J.get$length$asx(this._iterable);
  1029. },
  1030. $asIterable: function($S, $T) {
  1031. return [$T];
  1032. },
  1033. static: {
  1034. MappedIterable_MappedIterable: function(iterable, $function, $S, $T) {
  1035. if (!!J.getInterceptor(iterable).$isEfficientLengthIterable)
  1036. return new H.EfficientLengthMappedIterable(iterable, $function, [$S, $T]);
  1037. return new H.MappedIterable(iterable, $function, [$S, $T]);
  1038. }
  1039. }
  1040. },
  1041. EfficientLengthMappedIterable: {
  1042. "^": "MappedIterable;_iterable,_f,$ti",
  1043. $isEfficientLengthIterable: 1,
  1044. $asEfficientLengthIterable: function($S, $T) {
  1045. return [$T];
  1046. }
  1047. },
  1048. MappedIterator: {
  1049. "^": "Iterator;__internal$_current,_iterator,_f,$ti",
  1050. moveNext$0: function() {
  1051. var t1 = this._iterator;
  1052. if (t1.moveNext$0()) {
  1053. this.__internal$_current = this._f.call$1(t1.get$current());
  1054. return true;
  1055. }
  1056. this.__internal$_current = null;
  1057. return false;
  1058. },
  1059. get$current: function() {
  1060. return this.__internal$_current;
  1061. }
  1062. },
  1063. MappedListIterable: {
  1064. "^": "ListIterable;_source,_f,$ti",
  1065. get$length: function(_) {
  1066. return J.get$length$asx(this._source);
  1067. },
  1068. elementAt$1: function(_, index) {
  1069. return this._f.call$1(J.elementAt$1$ax(this._source, index));
  1070. },
  1071. $asListIterable: function($S, $T) {
  1072. return [$T];
  1073. },
  1074. $asEfficientLengthIterable: function($S, $T) {
  1075. return [$T];
  1076. },
  1077. $asIterable: function($S, $T) {
  1078. return [$T];
  1079. }
  1080. },
  1081. WhereIterable: {
  1082. "^": "Iterable;_iterable,_f,$ti",
  1083. get$iterator: function(_) {
  1084. return new H.WhereIterator(J.get$iterator$ax(this._iterable), this._f, this.$ti);
  1085. },
  1086. map$1: function(_, f) {
  1087. return new H.MappedIterable(this, f, [H.getTypeArgumentByIndex(this, 0), null]);
  1088. }
  1089. },
  1090. WhereIterator: {
  1091. "^": "Iterator;_iterator,_f,$ti",
  1092. moveNext$0: function() {
  1093. var t1, t2;
  1094. for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();)
  1095. if (t2.call$1(t1.get$current()) === true)
  1096. return true;
  1097. return false;
  1098. },
  1099. get$current: function() {
  1100. return this._iterator.get$current();
  1101. }
  1102. },
  1103. FixedLengthListMixin: {
  1104. "^": "Object;$ti"
  1105. }
  1106. }], ["_isolate_helper", "dart:_isolate_helper",, H, {
  1107. "^": "",
  1108. _callInIsolate: function(isolate, $function) {
  1109. var result = isolate.eval$1($function);
  1110. if (!init.globalState.currentContext._isExecutingEvent)
  1111. init.globalState.topEventLoop.run$0();
  1112. return result;
  1113. },
  1114. startRootIsolate: function(entry, args) {
  1115. var t1, t2, t3, t4, t5, rootContext;
  1116. t1 = {};
  1117. t1.args = args;
  1118. if (args == null) {
  1119. args = [];
  1120. t1.args = args;
  1121. t2 = args;
  1122. } else
  1123. t2 = args;
  1124. if (!J.getInterceptor(t2).$isList)
  1125. throw H.wrapException(P.ArgumentError$("Arguments to main must be a List: " + H.S(t2)));
  1126. init.globalState = new H._Manager(0, 0, 1, null, null, null, null, null, null, null, null, null, entry);
  1127. t2 = init.globalState;
  1128. t3 = self.window == null;
  1129. t4 = self.Worker;
  1130. t5 = t3 && !!self.postMessage;
  1131. t2.isWorker = t5;
  1132. t5 = !t5;
  1133. if (t5)
  1134. t4 = t4 != null && $.$get$IsolateNatives_thisScript() != null;
  1135. else
  1136. t4 = true;
  1137. t2.supportsWorkers = t4;
  1138. t2.fromCommandLine = t3 && t5;
  1139. t2.topEventLoop = new H._EventLoop(P.ListQueue$(null, H._IsolateEvent), 0);
  1140. t3 = P.$int;
  1141. t2.isolates = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, H._IsolateContext]);
  1142. t2.managers = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, null]);
  1143. if (t2.isWorker === true) {
  1144. t4 = new H._MainManagerStub();
  1145. t2.mainManager = t4;
  1146. self.onmessage = function(f, a) {
  1147. return function(e) {
  1148. f(a, e);
  1149. };
  1150. }(H.IsolateNatives__processWorkerMessage, t4);
  1151. self.dartPrint = self.dartPrint || function(serialize) {
  1152. return function(object) {
  1153. if (self.console && self.console.log)
  1154. self.console.log(object);
  1155. else
  1156. self.postMessage(serialize(object));
  1157. };
  1158. }(H._Manager__serializePrintMessage);
  1159. }
  1160. if (init.globalState.isWorker === true)
  1161. return;
  1162. t2 = init.globalState.nextIsolateId++;
  1163. t4 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, H.RawReceivePortImpl]);
  1164. t3 = P.LinkedHashSet_LinkedHashSet(null, null, null, t3);
  1165. t5 = new H.RawReceivePortImpl(0, null, false);
  1166. rootContext = new H._IsolateContext(t2, t4, t3, init.createNewIsolate(), t5, new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false, false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, false, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null));
  1167. t3.add$1(0, 0);
  1168. rootContext._addRegistration$2(0, t5);
  1169. init.globalState.rootContext = rootContext;
  1170. init.globalState.currentContext = rootContext;
  1171. t2 = H.getDynamicRuntimeType();
  1172. if (H.buildFunctionType(t2, [t2])._isTest$1(entry))
  1173. rootContext.eval$1(new H.startRootIsolate_closure(t1, entry));
  1174. else if (H.buildFunctionType(t2, [t2, t2])._isTest$1(entry))
  1175. rootContext.eval$1(new H.startRootIsolate_closure0(t1, entry));
  1176. else
  1177. rootContext.eval$1(entry);
  1178. init.globalState.topEventLoop.run$0();
  1179. },
  1180. IsolateNatives_computeThisScript: function() {
  1181. var currentScript = init.currentScript;
  1182. if (currentScript != null)
  1183. return String(currentScript.src);
  1184. if (init.globalState.isWorker === true)
  1185. return H.IsolateNatives_computeThisScriptFromTrace();
  1186. return;
  1187. },
  1188. IsolateNatives_computeThisScriptFromTrace: function() {
  1189. var stack, matches;
  1190. stack = new Error().stack;
  1191. if (stack == null) {
  1192. stack = function() {
  1193. try {
  1194. throw new Error();
  1195. } catch (e) {
  1196. return e.stack;
  1197. }
  1198. }();
  1199. if (stack == null)
  1200. throw H.wrapException(new P.UnsupportedError("No stack trace"));
  1201. }
  1202. matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m"));
  1203. if (matches != null)
  1204. return matches[1];
  1205. matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m"));
  1206. if (matches != null)
  1207. return matches[1];
  1208. throw H.wrapException(new P.UnsupportedError('Cannot extract URI from "' + H.S(stack) + '"'));
  1209. },
  1210. IsolateNatives__processWorkerMessage: function(sender, e) {
  1211. var msg, t1, functionName, entryPoint, args, message, isSpawnUri, startPaused, replyTo, t2, t3, t4, context;
  1212. msg = new H._Deserializer(true, []).deserialize$1(e.data);
  1213. t1 = J.getInterceptor$asx(msg);
  1214. switch (t1.$index(msg, "command")) {
  1215. case "start":
  1216. init.globalState.currentManagerId = t1.$index(msg, "id");
  1217. functionName = t1.$index(msg, "functionName");
  1218. entryPoint = functionName == null ? init.globalState.entry : init.globalFunctions[functionName]();
  1219. args = t1.$index(msg, "args");
  1220. message = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "msg"));
  1221. isSpawnUri = t1.$index(msg, "isSpawnUri");
  1222. startPaused = t1.$index(msg, "startPaused");
  1223. replyTo = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "replyTo"));
  1224. t1 = init.globalState.nextIsolateId++;
  1225. t2 = P.$int;
  1226. t3 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, H.RawReceivePortImpl]);
  1227. t2 = P.LinkedHashSet_LinkedHashSet(null, null, null, t2);
  1228. t4 = new H.RawReceivePortImpl(0, null, false);
  1229. context = new H._IsolateContext(t1, t3, t2, init.createNewIsolate(), t4, new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false, false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, false, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null));
  1230. t2.add$1(0, 0);
  1231. context._addRegistration$2(0, t4);
  1232. init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, new H.IsolateNatives__processWorkerMessage_closure(entryPoint, args, message, isSpawnUri, startPaused, replyTo), "worker-start"));
  1233. init.globalState.currentContext = context;
  1234. init.globalState.topEventLoop.run$0();
  1235. break;
  1236. case "spawn-worker":
  1237. break;
  1238. case "message":
  1239. if (t1.$index(msg, "port") != null)
  1240. J.send$1$x(t1.$index(msg, "port"), t1.$index(msg, "msg"));
  1241. init.globalState.topEventLoop.run$0();
  1242. break;
  1243. case "close":
  1244. init.globalState.managers.remove$1(0, $.$get$IsolateNatives_workerIds().$index(0, sender));
  1245. sender.terminate();
  1246. init.globalState.topEventLoop.run$0();
  1247. break;
  1248. case "log":
  1249. H.IsolateNatives__log(t1.$index(msg, "msg"));
  1250. break;
  1251. case "print":
  1252. if (init.globalState.isWorker === true) {
  1253. t1 = init.globalState.mainManager;
  1254. t2 = P.LinkedHashMap__makeLiteral(["command", "print", "msg", msg]);
  1255. t2 = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.$int)).serialize$1(t2);
  1256. t1.toString;
  1257. self.postMessage(t2);
  1258. } else
  1259. P.print(t1.$index(msg, "msg"));
  1260. break;
  1261. case "error":
  1262. throw H.wrapException(t1.$index(msg, "msg"));
  1263. }
  1264. },
  1265. IsolateNatives__log: function(msg) {
  1266. var trace, t1, t2, exception;
  1267. if (init.globalState.isWorker === true) {
  1268. t1 = init.globalState.mainManager;
  1269. t2 = P.LinkedHashMap__makeLiteral(["command", "log", "msg", msg]);
  1270. t2 = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.$int)).serialize$1(t2);
  1271. t1.toString;
  1272. self.postMessage(t2);
  1273. } else
  1274. try {
  1275. self.console.log(msg);
  1276. } catch (exception) {
  1277. H.unwrapException(exception);
  1278. trace = H.getTraceFromException(exception);
  1279. throw H.wrapException(P.Exception_Exception(trace));
  1280. }
  1281. },
  1282. IsolateNatives__startIsolate: function(topLevel, args, message, isSpawnUri, startPaused, replyTo) {
  1283. var context, t1, t2, t3;
  1284. context = init.globalState.currentContext;
  1285. t1 = context.id;
  1286. $.Primitives_mirrorFunctionCacheName = $.Primitives_mirrorFunctionCacheName + ("_" + t1);
  1287. $.Primitives_mirrorInvokeCacheName = $.Primitives_mirrorInvokeCacheName + ("_" + t1);
  1288. t1 = context.controlPort;
  1289. t2 = init.globalState.currentContext.id;
  1290. t3 = context.pauseCapability;
  1291. J.send$1$x(replyTo, ["spawned", new H._NativeJsSendPort(t1, t2), t3, context.terminateCapability]);
  1292. t2 = new H.IsolateNatives__startIsolate_runStartFunction(topLevel, args, message, isSpawnUri, context);
  1293. if (startPaused === true) {
  1294. context.addPause$2(t3, t3);
  1295. init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, t2, "start isolate"));
  1296. } else
  1297. t2.call$0();
  1298. },
  1299. _clone: function(message) {
  1300. return new H._Deserializer(true, []).deserialize$1(new H._Serializer(false, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.$int)).serialize$1(message));
  1301. },
  1302. startRootIsolate_closure: {
  1303. "^": "Closure:0;_box_0,entry",
  1304. call$0: function() {
  1305. this.entry.call$1(this._box_0.args);
  1306. }
  1307. },
  1308. startRootIsolate_closure0: {
  1309. "^": "Closure:0;_box_0,entry",
  1310. call$0: function() {
  1311. this.entry.call$2(this._box_0.args, null);
  1312. }
  1313. },
  1314. _Manager: {
  1315. "^": "Object;nextIsolateId,currentManagerId,nextManagerId,currentContext,rootContext,topEventLoop,fromCommandLine,isWorker,supportsWorkers,isolates,mainManager,managers,entry",
  1316. static: {
  1317. _Manager__serializePrintMessage: function(object) {
  1318. var t1 = P.LinkedHashMap__makeLiteral(["command", "print", "msg", object]);
  1319. return new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.$int)).serialize$1(t1);
  1320. }
  1321. }
  1322. },
  1323. _IsolateContext: {
  1324. "^": "Object;id,ports,weakPorts,isolateStatics<,controlPort<,pauseCapability,terminateCapability,initialized,isPaused,delayedEvents,pauseTokens,doneHandlers,_scheduledControlEvents,_isExecutingEvent,errorsAreFatal,errorPorts",
  1325. addPause$2: function(authentification, resume) {
  1326. if (!this.pauseCapability.$eq(0, authentification))
  1327. return;
  1328. if (this.pauseTokens.add$1(0, resume) && !this.isPaused)
  1329. this.isPaused = true;
  1330. this._updateGlobalState$0();
  1331. },
  1332. removePause$1: function(resume) {
  1333. var t1, t2, $event, t3, t4, t5;
  1334. if (!this.isPaused)
  1335. return;
  1336. t1 = this.pauseTokens;
  1337. t1.remove$1(0, resume);
  1338. if (t1._collection$_length === 0) {
  1339. for (t1 = this.delayedEvents; t2 = t1.length, t2 !== 0;) {
  1340. if (0 >= t2)
  1341. return H.ioore(t1, -1);
  1342. $event = t1.pop();
  1343. t2 = init.globalState.topEventLoop.events;
  1344. t3 = t2._head;
  1345. t4 = t2._table;
  1346. t5 = t4.length;
  1347. t3 = (t3 - 1 & t5 - 1) >>> 0;
  1348. t2._head = t3;
  1349. if (t3 < 0 || t3 >= t5)
  1350. return H.ioore(t4, t3);
  1351. t4[t3] = $event;
  1352. if (t3 === t2._tail)
  1353. t2._grow$0();
  1354. ++t2._modificationCount;
  1355. }
  1356. this.isPaused = false;
  1357. }
  1358. this._updateGlobalState$0();
  1359. },
  1360. addDoneListener$2: function(responsePort, response) {
  1361. var t1, i, t2;
  1362. if (this.doneHandlers == null)
  1363. this.doneHandlers = [];
  1364. for (t1 = J.getInterceptor(responsePort), i = 0; t2 = this.doneHandlers, i < t2.length; i += 2)
  1365. if (t1.$eq(responsePort, t2[i])) {
  1366. t1 = this.doneHandlers;
  1367. t2 = i + 1;
  1368. if (t2 >= t1.length)
  1369. return H.ioore(t1, t2);
  1370. t1[t2] = response;
  1371. return;
  1372. }
  1373. t2.push(responsePort);
  1374. this.doneHandlers.push(response);
  1375. },
  1376. removeDoneListener$1: function(responsePort) {
  1377. var t1, i, t2;
  1378. if (this.doneHandlers == null)
  1379. return;
  1380. for (t1 = J.getInterceptor(responsePort), i = 0; t2 = this.doneHandlers, i < t2.length; i += 2)
  1381. if (t1.$eq(responsePort, t2[i])) {
  1382. t1 = this.doneHandlers;
  1383. t2 = i + 2;
  1384. t1.toString;
  1385. if (typeof t1 !== "object" || t1 === null || !!t1.fixed$length)
  1386. H.throwExpression(new P.UnsupportedError("removeRange"));
  1387. P.RangeError_checkValidRange(i, t2, t1.length, null, null, null);
  1388. t1.splice(i, t2 - i);
  1389. return;
  1390. }
  1391. },
  1392. setErrorsFatal$2: function(authentification, errorsAreFatal) {
  1393. if (!this.terminateCapability.$eq(0, authentification))
  1394. return;
  1395. this.errorsAreFatal = errorsAreFatal;
  1396. },
  1397. handlePing$3: function(responsePort, pingType, response) {
  1398. var t1 = J.getInterceptor(pingType);
  1399. if (!t1.$eq(pingType, 0))
  1400. t1 = t1.$eq(pingType, 1) && !this._isExecutingEvent;
  1401. else
  1402. t1 = true;
  1403. if (t1) {
  1404. J.send$1$x(responsePort, response);
  1405. return;
  1406. }
  1407. t1 = this._scheduledControlEvents;
  1408. if (t1 == null) {
  1409. t1 = P.ListQueue$(null, null);
  1410. this._scheduledControlEvents = t1;
  1411. }
  1412. t1._add$1(new H._IsolateContext_handlePing_respond(responsePort, response));
  1413. },
  1414. handleKill$2: function(authentification, priority) {
  1415. var t1;
  1416. if (!this.terminateCapability.$eq(0, authentification))
  1417. return;
  1418. t1 = J.getInterceptor(priority);
  1419. if (!t1.$eq(priority, 0))
  1420. t1 = t1.$eq(priority, 1) && !this._isExecutingEvent;
  1421. else
  1422. t1 = true;
  1423. if (t1) {
  1424. this.kill$0();
  1425. return;
  1426. }
  1427. t1 = this._scheduledControlEvents;
  1428. if (t1 == null) {
  1429. t1 = P.ListQueue$(null, null);
  1430. this._scheduledControlEvents = t1;
  1431. }
  1432. t1._add$1(this.get$kill());
  1433. },
  1434. handleUncaughtError$2: function(error, stackTrace) {
  1435. var t1, message, t2;
  1436. t1 = this.errorPorts;
  1437. if (t1._collection$_length === 0) {
  1438. if (this.errorsAreFatal === true && this === init.globalState.rootContext)
  1439. return;
  1440. if (self.console && self.console.error)
  1441. self.console.error(error, stackTrace);
  1442. else {
  1443. P.print(error);
  1444. if (stackTrace != null)
  1445. P.print(stackTrace);
  1446. }
  1447. return;
  1448. }
  1449. message = new Array(2);
  1450. message.fixed$length = Array;
  1451. message[0] = J.toString$0$(error);
  1452. message[1] = stackTrace == null ? null : J.toString$0$(stackTrace);
  1453. for (t2 = new P._LinkedHashSetIterator(t1, t1._collection$_modifications, null, null), t2._collection$_cell = t1._collection$_first; t2.moveNext$0();)
  1454. J.send$1$x(t2._collection$_current, message);
  1455. },
  1456. eval$1: function(code) {
  1457. var old, result, oldIsExecutingEvent, e, s, exception, t1;
  1458. old = init.globalState.currentContext;
  1459. init.globalState.currentContext = this;
  1460. $ = this.isolateStatics;
  1461. result = null;
  1462. oldIsExecutingEvent = this._isExecutingEvent;
  1463. this._isExecutingEvent = true;
  1464. try {
  1465. result = code.call$0();
  1466. } catch (exception) {
  1467. t1 = H.unwrapException(exception);
  1468. e = t1;
  1469. s = H.getTraceFromException(exception);
  1470. this.handleUncaughtError$2(e, s);
  1471. if (this.errorsAreFatal === true) {
  1472. this.kill$0();
  1473. if (this === init.globalState.rootContext)
  1474. throw exception;
  1475. }
  1476. } finally {
  1477. this._isExecutingEvent = oldIsExecutingEvent;
  1478. init.globalState.currentContext = old;
  1479. if (old != null)
  1480. $ = old.get$isolateStatics();
  1481. if (this._scheduledControlEvents != null)
  1482. for (; t1 = this._scheduledControlEvents, !t1.get$isEmpty(t1);)
  1483. this._scheduledControlEvents.removeFirst$0().call$0();
  1484. }
  1485. return result;
  1486. },
  1487. lookup$1: function(portId) {
  1488. return this.ports.$index(0, portId);
  1489. },
  1490. _addRegistration$2: function(portId, port) {
  1491. var t1 = this.ports;
  1492. if (t1.containsKey$1(portId))
  1493. throw H.wrapException(P.Exception_Exception("Registry: ports must be registered only once."));
  1494. t1.$indexSet(0, portId, port);
  1495. },
  1496. _updateGlobalState$0: function() {
  1497. var t1 = this.ports;
  1498. if (t1.get$length(t1) - this.weakPorts._collection$_length > 0 || this.isPaused || !this.initialized)
  1499. init.globalState.isolates.$indexSet(0, this.id, this);
  1500. else
  1501. this.kill$0();
  1502. },
  1503. kill$0: [function() {
  1504. var t1, t2, i, responsePort, t3;
  1505. t1 = this._scheduledControlEvents;
  1506. if (t1 != null)
  1507. t1.clear$0(0);
  1508. for (t1 = this.ports, t2 = t1.get$values(t1), t2 = t2.get$iterator(t2); t2.moveNext$0();)
  1509. t2.get$current()._close$0();
  1510. t1.clear$0(0);
  1511. this.weakPorts.clear$0(0);
  1512. init.globalState.isolates.remove$1(0, this.id);
  1513. this.errorPorts.clear$0(0);
  1514. if (this.doneHandlers != null) {
  1515. for (i = 0; t1 = this.doneHandlers, t2 = t1.length, i < t2; i += 2) {
  1516. responsePort = t1[i];
  1517. t3 = i + 1;
  1518. if (t3 >= t2)
  1519. return H.ioore(t1, t3);
  1520. J.send$1$x(responsePort, t1[t3]);
  1521. }
  1522. this.doneHandlers = null;
  1523. }
  1524. }, "call$0", "get$kill", 0, 0, 1]
  1525. },
  1526. _IsolateContext_handlePing_respond: {
  1527. "^": "Closure:1;responsePort,response",
  1528. call$0: function() {
  1529. J.send$1$x(this.responsePort, this.response);
  1530. }
  1531. },
  1532. _EventLoop: {
  1533. "^": "Object;events,_activeJsAsyncCount",
  1534. dequeue$0: function() {
  1535. var t1 = this.events;
  1536. if (t1._head === t1._tail)
  1537. return;
  1538. return t1.removeFirst$0();
  1539. },
  1540. runIteration$0: function() {
  1541. var $event, t1, t2;
  1542. $event = this.dequeue$0();
  1543. if ($event == null) {
  1544. if (init.globalState.rootContext != null)
  1545. if (init.globalState.isolates.containsKey$1(init.globalState.rootContext.id))
  1546. if (init.globalState.fromCommandLine === true) {
  1547. t1 = init.globalState.rootContext.ports;
  1548. t1 = t1.get$isEmpty(t1);
  1549. } else
  1550. t1 = false;
  1551. else
  1552. t1 = false;
  1553. else
  1554. t1 = false;
  1555. if (t1)
  1556. H.throwExpression(P.Exception_Exception("Program exited with open ReceivePorts."));
  1557. t1 = init.globalState;
  1558. if (t1.isWorker === true) {
  1559. t2 = t1.isolates;
  1560. t2 = t2.get$isEmpty(t2) && t1.topEventLoop._activeJsAsyncCount === 0;
  1561. } else
  1562. t2 = false;
  1563. if (t2) {
  1564. t1 = t1.mainManager;
  1565. t2 = P.LinkedHashMap__makeLiteral(["command", "close"]);
  1566. t2 = new H._Serializer(true, new P._LinkedIdentityHashMap(0, null, null, null, null, null, 0, [null, P.$int])).serialize$1(t2);
  1567. t1.toString;
  1568. self.postMessage(t2);
  1569. }
  1570. return false;
  1571. }
  1572. $event.process$0();
  1573. return true;
  1574. },
  1575. _runHelper$0: function() {
  1576. if (self.window != null)
  1577. new H._EventLoop__runHelper_next(this).call$0();
  1578. else
  1579. for (; this.runIteration$0();)
  1580. ;
  1581. },
  1582. run$0: function() {
  1583. var e, trace, exception, t1, t2;
  1584. if (init.globalState.isWorker !== true)
  1585. this._runHelper$0();
  1586. else
  1587. try {
  1588. this._runHelper$0();
  1589. } catch (exception) {
  1590. t1 = H.unwrapException(exception);
  1591. e = t1;
  1592. trace = H.getTraceFromException(exception);
  1593. t1 = init.globalState.mainManager;
  1594. t2 = P.LinkedHashMap__makeLiteral(["command", "error", "msg", H.S(e) + "\n" + H.S(trace)]);
  1595. t2 = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.$int)).serialize$1(t2);
  1596. t1.toString;
  1597. self.postMessage(t2);
  1598. }
  1599. }
  1600. },
  1601. _EventLoop__runHelper_next: {
  1602. "^": "Closure:1;$this",
  1603. call$0: function() {
  1604. if (!this.$this.runIteration$0())
  1605. return;
  1606. P.Timer_Timer(C.Duration_0, this);
  1607. }
  1608. },
  1609. _IsolateEvent: {
  1610. "^": "Object;isolate,fn,message",
  1611. process$0: function() {
  1612. var t1 = this.isolate;
  1613. if (t1.isPaused) {
  1614. t1.delayedEvents.push(this);
  1615. return;
  1616. }
  1617. t1.eval$1(this.fn);
  1618. }
  1619. },
  1620. _MainManagerStub: {
  1621. "^": "Object;"
  1622. },
  1623. IsolateNatives__processWorkerMessage_closure: {
  1624. "^": "Closure:0;entryPoint,args,message,isSpawnUri,startPaused,replyTo",
  1625. call$0: function() {
  1626. H.IsolateNatives__startIsolate(this.entryPoint, this.args, this.message, this.isSpawnUri, this.startPaused, this.replyTo);
  1627. }
  1628. },
  1629. IsolateNatives__startIsolate_runStartFunction: {
  1630. "^": "Closure:1;topLevel,args,message,isSpawnUri,context",
  1631. call$0: function() {
  1632. var t1, t2, t3;
  1633. t1 = this.context;
  1634. t1.initialized = true;
  1635. if (this.isSpawnUri !== true)
  1636. this.topLevel.call$1(this.message);
  1637. else {
  1638. t2 = this.topLevel;
  1639. t3 = H.getDynamicRuntimeType();
  1640. if (H.buildFunctionType(t3, [t3, t3])._isTest$1(t2))
  1641. t2.call$2(this.args, this.message);
  1642. else if (H.buildFunctionType(t3, [t3])._isTest$1(t2))
  1643. t2.call$1(this.args);
  1644. else
  1645. t2.call$0();
  1646. }
  1647. t1._updateGlobalState$0();
  1648. }
  1649. },
  1650. _BaseSendPort: {
  1651. "^": "Object;"
  1652. },
  1653. _NativeJsSendPort: {
  1654. "^": "_BaseSendPort;_receivePort,_isolateId",
  1655. send$1: function(_, message) {
  1656. var isolate, t1, msg;
  1657. isolate = init.globalState.isolates.$index(0, this._isolateId);
  1658. if (isolate == null)
  1659. return;
  1660. t1 = this._receivePort;
  1661. if (t1.get$_isClosed())
  1662. return;
  1663. msg = H._clone(message);
  1664. if (isolate.get$controlPort() === t1) {
  1665. t1 = J.getInterceptor$asx(msg);
  1666. switch (t1.$index(msg, 0)) {
  1667. case "pause":
  1668. isolate.addPause$2(t1.$index(msg, 1), t1.$index(msg, 2));
  1669. break;
  1670. case "resume":
  1671. isolate.removePause$1(t1.$index(msg, 1));
  1672. break;
  1673. case "add-ondone":
  1674. isolate.addDoneListener$2(t1.$index(msg, 1), t1.$index(msg, 2));
  1675. break;
  1676. case "remove-ondone":
  1677. isolate.removeDoneListener$1(t1.$index(msg, 1));
  1678. break;
  1679. case "set-errors-fatal":
  1680. isolate.setErrorsFatal$2(t1.$index(msg, 1), t1.$index(msg, 2));
  1681. break;
  1682. case "ping":
  1683. isolate.handlePing$3(t1.$index(msg, 1), t1.$index(msg, 2), t1.$index(msg, 3));
  1684. break;
  1685. case "kill":
  1686. isolate.handleKill$2(t1.$index(msg, 1), t1.$index(msg, 2));
  1687. break;
  1688. case "getErrors":
  1689. t1 = t1.$index(msg, 1);
  1690. isolate.errorPorts.add$1(0, t1);
  1691. break;
  1692. case "stopErrors":
  1693. t1 = t1.$index(msg, 1);
  1694. isolate.errorPorts.remove$1(0, t1);
  1695. break;
  1696. }
  1697. return;
  1698. }
  1699. init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send_closure(this, msg), "receive"));
  1700. },
  1701. $eq: function(_, other) {
  1702. if (other == null)
  1703. return false;
  1704. return other instanceof H._NativeJsSendPort && J.$eq$(this._receivePort, other._receivePort);
  1705. },
  1706. get$hashCode: function(_) {
  1707. return this._receivePort.get$_id();
  1708. }
  1709. },
  1710. _NativeJsSendPort_send_closure: {
  1711. "^": "Closure:0;$this,msg",
  1712. call$0: function() {
  1713. var t1 = this.$this._receivePort;
  1714. if (!t1.get$_isClosed())
  1715. t1.__isolate_helper$_add$1(this.msg);
  1716. }
  1717. },
  1718. _WorkerSendPort: {
  1719. "^": "_BaseSendPort;_workerId,_receivePortId,_isolateId",
  1720. send$1: function(_, message) {
  1721. var t1, workerMessage, manager;
  1722. t1 = P.LinkedHashMap__makeLiteral(["command", "message", "port", this, "msg", message]);
  1723. workerMessage = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.$int)).serialize$1(t1);
  1724. if (init.globalState.isWorker === true) {
  1725. init.globalState.mainManager.toString;
  1726. self.postMessage(workerMessage);
  1727. } else {
  1728. manager = init.globalState.managers.$index(0, this._workerId);
  1729. if (manager != null)
  1730. manager.postMessage(workerMessage);
  1731. }
  1732. },
  1733. $eq: function(_, other) {
  1734. if (other == null)
  1735. return false;
  1736. return other instanceof H._WorkerSendPort && J.$eq$(this._workerId, other._workerId) && J.$eq$(this._isolateId, other._isolateId) && J.$eq$(this._receivePortId, other._receivePortId);
  1737. },
  1738. get$hashCode: function(_) {
  1739. var t1, t2, t3;
  1740. t1 = this._workerId;
  1741. if (typeof t1 !== "number")
  1742. return t1.$shl();
  1743. t2 = this._isolateId;
  1744. if (typeof t2 !== "number")
  1745. return t2.$shl();
  1746. t3 = this._receivePortId;
  1747. if (typeof t3 !== "number")
  1748. return H.iae(t3);
  1749. return (t1 << 16 ^ t2 << 8 ^ t3) >>> 0;
  1750. }
  1751. },
  1752. RawReceivePortImpl: {
  1753. "^": "Object;_id<,_handler,_isClosed<",
  1754. _close$0: function() {
  1755. this._isClosed = true;
  1756. this._handler = null;
  1757. },
  1758. __isolate_helper$_add$1: function(dataEvent) {
  1759. if (this._isClosed)
  1760. return;
  1761. this._handler.call$1(dataEvent);
  1762. },
  1763. $isRawReceivePort: 1
  1764. },
  1765. TimerImpl: {
  1766. "^": "Object;_once,_inEventLoop,_handle",
  1767. TimerImpl$2: function(milliseconds, callback) {
  1768. var t1, t2;
  1769. if (milliseconds === 0)
  1770. t1 = self.setTimeout == null || init.globalState.isWorker === true;
  1771. else
  1772. t1 = false;
  1773. if (t1) {
  1774. this._handle = 1;
  1775. t1 = init.globalState.topEventLoop;
  1776. t2 = init.globalState.currentContext;
  1777. t1.events._add$1(new H._IsolateEvent(t2, new H.TimerImpl_internalCallback(this, callback), "timer"));
  1778. this._inEventLoop = true;
  1779. } else if (self.setTimeout != null) {
  1780. ++init.globalState.topEventLoop._activeJsAsyncCount;
  1781. this._handle = self.setTimeout(H.convertDartClosureToJS(new H.TimerImpl_internalCallback0(this, callback), 0), milliseconds);
  1782. } else
  1783. throw H.wrapException(new P.UnsupportedError("Timer greater than 0."));
  1784. },
  1785. static: {
  1786. TimerImpl$: function(milliseconds, callback) {
  1787. var t1 = new H.TimerImpl(true, false, null);
  1788. t1.TimerImpl$2(milliseconds, callback);
  1789. return t1;
  1790. }
  1791. }
  1792. },
  1793. TimerImpl_internalCallback: {
  1794. "^": "Closure:1;$this,callback",
  1795. call$0: function() {
  1796. this.$this._handle = null;
  1797. this.callback.call$0();
  1798. }
  1799. },
  1800. TimerImpl_internalCallback0: {
  1801. "^": "Closure:1;$this,callback",
  1802. call$0: function() {
  1803. this.$this._handle = null;
  1804. --init.globalState.topEventLoop._activeJsAsyncCount;
  1805. this.callback.call$0();
  1806. }
  1807. },
  1808. CapabilityImpl: {
  1809. "^": "Object;_id<",
  1810. get$hashCode: function(_) {
  1811. var hash = this._id;
  1812. if (typeof hash !== "number")
  1813. return hash.$shr();
  1814. hash = C.JSNumber_methods._shrOtherPositive$1(hash, 0) ^ C.JSNumber_methods._tdivFast$1(hash, 4294967296);
  1815. hash = (~hash >>> 0) + (hash << 15 >>> 0) & 4294967295;
  1816. hash = ((hash ^ hash >>> 12) >>> 0) * 5 & 4294967295;
  1817. hash = ((hash ^ hash >>> 4) >>> 0) * 2057 & 4294967295;
  1818. return (hash ^ hash >>> 16) >>> 0;
  1819. },
  1820. $eq: function(_, other) {
  1821. var t1, t2;
  1822. if (other == null)
  1823. return false;
  1824. if (other === this)
  1825. return true;
  1826. if (other instanceof H.CapabilityImpl) {
  1827. t1 = this._id;
  1828. t2 = other._id;
  1829. return t1 == null ? t2 == null : t1 === t2;
  1830. }
  1831. return false;
  1832. }
  1833. },
  1834. _Serializer: {
  1835. "^": "Object;_serializeSendPorts,serializedObjectIds",
  1836. serialize$1: [function(x) {
  1837. var t1, serializationId, serializeTearOff, t2, $name;
  1838. if (x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean")
  1839. return x;
  1840. t1 = this.serializedObjectIds;
  1841. serializationId = t1.$index(0, x);
  1842. if (serializationId != null)
  1843. return ["ref", serializationId];
  1844. t1.$indexSet(0, x, t1.get$length(t1));
  1845. t1 = J.getInterceptor(x);
  1846. if (!!t1.$isNativeByteBuffer)
  1847. return ["buffer", x];
  1848. if (!!t1.$isNativeTypedData)
  1849. return ["typed", x];
  1850. if (!!t1.$isJSIndexable)
  1851. return this.serializeJSIndexable$1(x);
  1852. if (!!t1.$isInternalMap) {
  1853. serializeTearOff = this.get$serialize();
  1854. t2 = x.get$keys();
  1855. t2 = H.MappedIterable_MappedIterable(t2, serializeTearOff, H.getRuntimeTypeArgument(t2, "Iterable", 0), null);
  1856. t2 = P.List_List$from(t2, true, H.getRuntimeTypeArgument(t2, "Iterable", 0));
  1857. t1 = t1.get$values(x);
  1858. t1 = H.MappedIterable_MappedIterable(t1, serializeTearOff, H.getRuntimeTypeArgument(t1, "Iterable", 0), null);
  1859. return ["map", t2, P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0))];
  1860. }
  1861. if (!!t1.$isJSObject)
  1862. return this.serializeJSObject$1(x);
  1863. if (!!t1.$isInterceptor)
  1864. this.unsupported$1(x);
  1865. if (!!t1.$isRawReceivePort)
  1866. this.unsupported$2(x, "RawReceivePorts can't be transmitted:");
  1867. if (!!t1.$is_NativeJsSendPort)
  1868. return this.serializeJsSendPort$1(x);
  1869. if (!!t1.$is_WorkerSendPort)
  1870. return this.serializeWorkerSendPort$1(x);
  1871. if (!!t1.$isClosure) {
  1872. $name = x.$static_name;
  1873. if ($name == null)
  1874. this.unsupported$2(x, "Closures can't be transmitted:");
  1875. return ["function", $name];
  1876. }
  1877. if (!!t1.$isCapabilityImpl)
  1878. return ["capability", x._id];
  1879. if (!(x instanceof P.Object))
  1880. this.unsupported$1(x);
  1881. return ["dart", init.classIdExtractor(x), this.serializeArrayInPlace$1(init.classFieldsExtractor(x))];
  1882. }, "call$1", "get$serialize", 2, 0, 2],
  1883. unsupported$2: function(x, message) {
  1884. throw H.wrapException(new P.UnsupportedError(H.S(message == null ? "Can't transmit:" : message) + " " + H.S(x)));
  1885. },
  1886. unsupported$1: function(x) {
  1887. return this.unsupported$2(x, null);
  1888. },
  1889. serializeJSIndexable$1: function(indexable) {
  1890. var serialized = this.serializeArray$1(indexable);
  1891. if (!!indexable.fixed$length)
  1892. return ["fixed", serialized];
  1893. if (!indexable.fixed$length)
  1894. return ["extendable", serialized];
  1895. if (!indexable.immutable$list)
  1896. return ["mutable", serialized];
  1897. if (indexable.constructor === Array)
  1898. return ["const", serialized];
  1899. this.unsupported$2(indexable, "Can't serialize indexable: ");
  1900. },
  1901. serializeArray$1: function(x) {
  1902. var serialized, i, t1;
  1903. serialized = [];
  1904. C.JSArray_methods.set$length(serialized, x.length);
  1905. for (i = 0; i < x.length; ++i) {
  1906. t1 = this.serialize$1(x[i]);
  1907. if (i >= serialized.length)
  1908. return H.ioore(serialized, i);
  1909. serialized[i] = t1;
  1910. }
  1911. return serialized;
  1912. },
  1913. serializeArrayInPlace$1: function(x) {
  1914. var i;
  1915. for (i = 0; i < x.length; ++i)
  1916. C.JSArray_methods.$indexSet(x, i, this.serialize$1(x[i]));
  1917. return x;
  1918. },
  1919. serializeJSObject$1: function(x) {
  1920. var keys, values, i, t1;
  1921. if (!!x.constructor && x.constructor !== Object)
  1922. this.unsupported$2(x, "Only plain JS Objects are supported:");
  1923. keys = Object.keys(x);
  1924. values = [];
  1925. C.JSArray_methods.set$length(values, keys.length);
  1926. for (i = 0; i < keys.length; ++i) {
  1927. t1 = this.serialize$1(x[keys[i]]);
  1928. if (i >= values.length)
  1929. return H.ioore(values, i);
  1930. values[i] = t1;
  1931. }
  1932. return ["js-object", keys, values];
  1933. },
  1934. serializeWorkerSendPort$1: function(x) {
  1935. if (this._serializeSendPorts)
  1936. return ["sendport", x._workerId, x._isolateId, x._receivePortId];
  1937. return ["raw sendport", x];
  1938. },
  1939. serializeJsSendPort$1: function(x) {
  1940. if (this._serializeSendPorts)
  1941. return ["sendport", init.globalState.currentManagerId, x._isolateId, x._receivePort.get$_id()];
  1942. return ["raw sendport", x];
  1943. }
  1944. },
  1945. _Deserializer: {
  1946. "^": "Object;_adjustSendPorts,deserializedObjects",
  1947. deserialize$1: [function(x) {
  1948. var serializationId, t1, result, classId, fields, emptyInstance;
  1949. if (x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean")
  1950. return x;
  1951. if (typeof x !== "object" || x === null || x.constructor !== Array)
  1952. throw H.wrapException(P.ArgumentError$("Bad serialized message: " + H.S(x)));
  1953. switch (C.JSArray_methods.get$first(x)) {
  1954. case "ref":
  1955. if (1 >= x.length)
  1956. return H.ioore(x, 1);
  1957. serializationId = x[1];
  1958. t1 = this.deserializedObjects;
  1959. if (serializationId >>> 0 !== serializationId || serializationId >= t1.length)
  1960. return H.ioore(t1, serializationId);
  1961. return t1[serializationId];
  1962. case "buffer":
  1963. if (1 >= x.length)
  1964. return H.ioore(x, 1);
  1965. result = x[1];
  1966. this.deserializedObjects.push(result);
  1967. return result;
  1968. case "typed":
  1969. if (1 >= x.length)
  1970. return H.ioore(x, 1);
  1971. result = x[1];
  1972. this.deserializedObjects.push(result);
  1973. return result;
  1974. case "fixed":
  1975. if (1 >= x.length)
  1976. return H.ioore(x, 1);
  1977. result = x[1];
  1978. this.deserializedObjects.push(result);
  1979. t1 = H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]);
  1980. t1.fixed$length = Array;
  1981. return t1;
  1982. case "extendable":
  1983. if (1 >= x.length)
  1984. return H.ioore(x, 1);
  1985. result = x[1];
  1986. this.deserializedObjects.push(result);
  1987. return H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]);
  1988. case "mutable":
  1989. if (1 >= x.length)
  1990. return H.ioore(x, 1);
  1991. result = x[1];
  1992. this.deserializedObjects.push(result);
  1993. return this.deserializeArrayInPlace$1(result);
  1994. case "const":
  1995. if (1 >= x.length)
  1996. return H.ioore(x, 1);
  1997. result = x[1];
  1998. this.deserializedObjects.push(result);
  1999. t1 = H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]);
  2000. t1.fixed$length = Array;
  2001. return t1;
  2002. case "map":
  2003. return this.deserializeMap$1(x);
  2004. case "sendport":
  2005. return this.deserializeSendPort$1(x);
  2006. case "raw sendport":
  2007. if (1 >= x.length)
  2008. return H.ioore(x, 1);
  2009. result = x[1];
  2010. this.deserializedObjects.push(result);
  2011. return result;
  2012. case "js-object":
  2013. return this.deserializeJSObject$1(x);
  2014. case "function":
  2015. if (1 >= x.length)
  2016. return H.ioore(x, 1);
  2017. result = init.globalFunctions[x[1]]();
  2018. this.deserializedObjects.push(result);
  2019. return result;
  2020. case "capability":
  2021. if (1 >= x.length)
  2022. return H.ioore(x, 1);
  2023. return new H.CapabilityImpl(x[1]);
  2024. case "dart":
  2025. t1 = x.length;
  2026. if (1 >= t1)
  2027. return H.ioore(x, 1);
  2028. classId = x[1];
  2029. if (2 >= t1)
  2030. return H.ioore(x, 2);
  2031. fields = x[2];
  2032. emptyInstance = init.instanceFromClassId(classId);
  2033. this.deserializedObjects.push(emptyInstance);
  2034. this.deserializeArrayInPlace$1(fields);
  2035. return init.initializeEmptyInstance(classId, emptyInstance, fields);
  2036. default:
  2037. throw H.wrapException("couldn't deserialize: " + H.S(x));
  2038. }
  2039. }, "call$1", "get$deserialize", 2, 0, 2],
  2040. deserializeArrayInPlace$1: function(x) {
  2041. var t1, i, t2;
  2042. t1 = J.getInterceptor$asx(x);
  2043. i = 0;
  2044. while (true) {
  2045. t2 = t1.get$length(x);
  2046. if (typeof t2 !== "number")
  2047. return H.iae(t2);
  2048. if (!(i < t2))
  2049. break;
  2050. t1.$indexSet(x, i, this.deserialize$1(t1.$index(x, i)));
  2051. ++i;
  2052. }
  2053. return x;
  2054. },
  2055. deserializeMap$1: function(x) {
  2056. var t1, keys, values, result, t2, i;
  2057. t1 = x.length;
  2058. if (1 >= t1)
  2059. return H.ioore(x, 1);
  2060. keys = x[1];
  2061. if (2 >= t1)
  2062. return H.ioore(x, 2);
  2063. values = x[2];
  2064. result = P.LinkedHashMap__makeEmpty();
  2065. this.deserializedObjects.push(result);
  2066. keys = J.map$1$ax(keys, this.get$deserialize()).toList$0(0);
  2067. for (t1 = J.getInterceptor$asx(keys), t2 = J.getInterceptor$asx(values), i = 0; i < t1.get$length(keys); ++i) {
  2068. if (i >= keys.length)
  2069. return H.ioore(keys, i);
  2070. result.$indexSet(0, keys[i], this.deserialize$1(t2.$index(values, i)));
  2071. }
  2072. return result;
  2073. },
  2074. deserializeSendPort$1: function(x) {
  2075. var t1, managerId, isolateId, receivePortId, isolate, receivePort, result;
  2076. t1 = x.length;
  2077. if (1 >= t1)
  2078. return H.ioore(x, 1);
  2079. managerId = x[1];
  2080. if (2 >= t1)
  2081. return H.ioore(x, 2);
  2082. isolateId = x[2];
  2083. if (3 >= t1)
  2084. return H.ioore(x, 3);
  2085. receivePortId = x[3];
  2086. if (J.$eq$(managerId, init.globalState.currentManagerId)) {
  2087. isolate = init.globalState.isolates.$index(0, isolateId);
  2088. if (isolate == null)
  2089. return;
  2090. receivePort = isolate.lookup$1(receivePortId);
  2091. if (receivePort == null)
  2092. return;
  2093. result = new H._NativeJsSendPort(receivePort, isolateId);
  2094. } else
  2095. result = new H._WorkerSendPort(managerId, receivePortId, isolateId);
  2096. this.deserializedObjects.push(result);
  2097. return result;
  2098. },
  2099. deserializeJSObject$1: function(x) {
  2100. var t1, keys, values, o, t2, i, t3;
  2101. t1 = x.length;
  2102. if (1 >= t1)
  2103. return H.ioore(x, 1);
  2104. keys = x[1];
  2105. if (2 >= t1)
  2106. return H.ioore(x, 2);
  2107. values = x[2];
  2108. o = {};
  2109. this.deserializedObjects.push(o);
  2110. t1 = J.getInterceptor$asx(keys);
  2111. t2 = J.getInterceptor$asx(values);
  2112. i = 0;
  2113. while (true) {
  2114. t3 = t1.get$length(keys);
  2115. if (typeof t3 !== "number")
  2116. return H.iae(t3);
  2117. if (!(i < t3))
  2118. break;
  2119. o[t1.$index(keys, i)] = this.deserialize$1(t2.$index(values, i));
  2120. ++i;
  2121. }
  2122. return o;
  2123. }
  2124. }
  2125. }], ["_js_helper", "dart:_js_helper",, H, {
  2126. "^": "",
  2127. jsConstructorNameToRti: function(constructorName) {
  2128. return init.getTypeFromName(constructorName);
  2129. },
  2130. getType: function(index) {
  2131. return init.types[index];
  2132. },
  2133. isJsIndexable: function(object, record) {
  2134. var result;
  2135. if (record != null) {
  2136. result = record.x;
  2137. if (result != null)
  2138. return result;
  2139. }
  2140. return !!J.getInterceptor(object).$isJavaScriptIndexingBehavior;
  2141. },
  2142. S: function(value) {
  2143. var res;
  2144. if (typeof value === "string")
  2145. return value;
  2146. if (typeof value === "number") {
  2147. if (value !== 0)
  2148. return "" + value;
  2149. } else if (true === value)
  2150. return "true";
  2151. else if (false === value)
  2152. return "false";
  2153. else if (value == null)
  2154. return "null";
  2155. res = J.toString$0$(value);
  2156. if (typeof res !== "string")
  2157. throw H.wrapException(H.argumentErrorValue(value));
  2158. return res;
  2159. },
  2160. Primitives_objectHashCode: function(object) {
  2161. var hash = object.$identityHash;
  2162. if (hash == null) {
  2163. hash = Math.random() * 0x3fffffff | 0;
  2164. object.$identityHash = hash;
  2165. }
  2166. return hash;
  2167. },
  2168. Primitives_objectTypeName: function(object) {
  2169. var interceptor, interceptorConstructor, interceptorConstructorName, $name, dispatchName, objectConstructor, match, decompiledName;
  2170. interceptor = J.getInterceptor(object);
  2171. interceptorConstructor = interceptor.constructor;
  2172. if (typeof interceptorConstructor == "function") {
  2173. interceptorConstructorName = interceptorConstructor.name;
  2174. $name = typeof interceptorConstructorName === "string" ? interceptorConstructorName : null;
  2175. } else
  2176. $name = null;
  2177. if ($name == null || interceptor === C.Interceptor_methods || !!J.getInterceptor(object).$isUnknownJavaScriptObject) {
  2178. dispatchName = C.JS_CONST_u2C(object);
  2179. if (dispatchName === "Object") {
  2180. objectConstructor = object.constructor;
  2181. if (typeof objectConstructor == "function") {
  2182. match = String(objectConstructor).match(/^\s*function\s*([\w$]*)\s*\(/);
  2183. decompiledName = match == null ? null : match[1];
  2184. if (typeof decompiledName === "string" && /^\w+$/.test(decompiledName))
  2185. $name = decompiledName;
  2186. }
  2187. if ($name == null)
  2188. $name = dispatchName;
  2189. } else
  2190. $name = dispatchName;
  2191. }
  2192. $name = $name;
  2193. if ($name.length > 1 && C.JSString_methods.codeUnitAt$1($name, 0) === 36)
  2194. $name = C.JSString_methods.substring$1($name, 1);
  2195. return function(str, names) {
  2196. return str.replace(/[^<,> ]+/g, function(m) {
  2197. return names[m] || m;
  2198. });
  2199. }($name + H.joinArguments(H.getRuntimeTypeInfo(object), 0, null), init.mangledGlobalNames);
  2200. },
  2201. Primitives_objectToHumanReadableString: function(object) {
  2202. return "Instance of '" + H.Primitives_objectTypeName(object) + "'";
  2203. },
  2204. Primitives_getProperty: function(object, key) {
  2205. if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string")
  2206. throw H.wrapException(H.argumentErrorValue(object));
  2207. return object[key];
  2208. },
  2209. Primitives_setProperty: function(object, key, value) {
  2210. if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string")
  2211. throw H.wrapException(H.argumentErrorValue(object));
  2212. object[key] = value;
  2213. },
  2214. iae: function(argument) {
  2215. throw H.wrapException(H.argumentErrorValue(argument));
  2216. },
  2217. ioore: function(receiver, index) {
  2218. if (receiver == null)
  2219. J.get$length$asx(receiver);
  2220. throw H.wrapException(H.diagnoseIndexError(receiver, index));
  2221. },
  2222. diagnoseIndexError: function(indexable, index) {
  2223. var $length, t1;
  2224. if (typeof index !== "number" || Math.floor(index) !== index)
  2225. return new P.ArgumentError(true, index, "index", null);
  2226. $length = J.get$length$asx(indexable);
  2227. if (!(index < 0)) {
  2228. if (typeof $length !== "number")
  2229. return H.iae($length);
  2230. t1 = index >= $length;
  2231. } else
  2232. t1 = true;
  2233. if (t1)
  2234. return P.IndexError$(index, indexable, "index", null, $length);
  2235. return P.RangeError$value(index, "index", null);
  2236. },
  2237. argumentErrorValue: function(object) {
  2238. return new P.ArgumentError(true, object, null, null);
  2239. },
  2240. checkInt: function(value) {
  2241. if (typeof value !== "number" || Math.floor(value) !== value)
  2242. throw H.wrapException(H.argumentErrorValue(value));
  2243. return value;
  2244. },
  2245. wrapException: function(ex) {
  2246. var wrapper;
  2247. if (ex == null)
  2248. ex = new P.NullThrownError();
  2249. wrapper = new Error();
  2250. wrapper.dartException = ex;
  2251. if ("defineProperty" in Object) {
  2252. Object.defineProperty(wrapper, "message", {get: H.toStringWrapper});
  2253. wrapper.name = "";
  2254. } else
  2255. wrapper.toString = H.toStringWrapper;
  2256. return wrapper;
  2257. },
  2258. toStringWrapper: function() {
  2259. return J.toString$0$(this.dartException);
  2260. },
  2261. throwExpression: function(ex) {
  2262. throw H.wrapException(ex);
  2263. },
  2264. throwConcurrentModificationError: function(collection) {
  2265. throw H.wrapException(new P.ConcurrentModificationError(collection));
  2266. },
  2267. unwrapException: function(ex) {
  2268. var t1, message, number, ieErrorCode, t2, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match;
  2269. t1 = new H.unwrapException_saveStackTrace(ex);
  2270. if (ex == null)
  2271. return;
  2272. if (typeof ex !== "object")
  2273. return ex;
  2274. if ("dartException" in ex)
  2275. return t1.call$1(ex.dartException);
  2276. else if (!("message" in ex))
  2277. return ex;
  2278. message = ex.message;
  2279. if ("number" in ex && typeof ex.number == "number") {
  2280. number = ex.number;
  2281. ieErrorCode = number & 65535;
  2282. if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10)
  2283. switch (ieErrorCode) {
  2284. case 438:
  2285. return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", null));
  2286. case 445:
  2287. case 5007:
  2288. t2 = H.S(message) + " (Error " + ieErrorCode + ")";
  2289. return t1.call$1(new H.NullError(t2, null));
  2290. }
  2291. }
  2292. if (ex instanceof TypeError) {
  2293. nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern();
  2294. notClosure = $.$get$TypeErrorDecoder_notClosurePattern();
  2295. nullCall = $.$get$TypeErrorDecoder_nullCallPattern();
  2296. nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern();
  2297. undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern();
  2298. undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern();
  2299. nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern();
  2300. $.$get$TypeErrorDecoder_nullLiteralPropertyPattern();
  2301. undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern();
  2302. undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern();
  2303. match = nsme.matchTypeError$1(message);
  2304. if (match != null)
  2305. return t1.call$1(H.JsNoSuchMethodError$(message, match));
  2306. else {
  2307. match = notClosure.matchTypeError$1(message);
  2308. if (match != null) {
  2309. match.method = "call";
  2310. return t1.call$1(H.JsNoSuchMethodError$(message, match));
  2311. } else {
  2312. match = nullCall.matchTypeError$1(message);
  2313. if (match == null) {
  2314. match = nullLiteralCall.matchTypeError$1(message);
  2315. if (match == null) {
  2316. match = undefCall.matchTypeError$1(message);
  2317. if (match == null) {
  2318. match = undefLiteralCall.matchTypeError$1(message);
  2319. if (match == null) {
  2320. match = nullProperty.matchTypeError$1(message);
  2321. if (match == null) {
  2322. match = nullLiteralCall.matchTypeError$1(message);
  2323. if (match == null) {
  2324. match = undefProperty.matchTypeError$1(message);
  2325. if (match == null) {
  2326. match = undefLiteralProperty.matchTypeError$1(message);
  2327. t2 = match != null;
  2328. } else
  2329. t2 = true;
  2330. } else
  2331. t2 = true;
  2332. } else
  2333. t2 = true;
  2334. } else
  2335. t2 = true;
  2336. } else
  2337. t2 = true;
  2338. } else
  2339. t2 = true;
  2340. } else
  2341. t2 = true;
  2342. if (t2)
  2343. return t1.call$1(new H.NullError(message, match == null ? null : match.method));
  2344. }
  2345. }
  2346. return t1.call$1(new H.UnknownJsTypeError(typeof message === "string" ? message : ""));
  2347. }
  2348. if (ex instanceof RangeError) {
  2349. if (typeof message === "string" && message.indexOf("call stack") !== -1)
  2350. return new P.StackOverflowError();
  2351. message = function(ex) {
  2352. try {
  2353. return String(ex);
  2354. } catch (e) {
  2355. }
  2356. return null;
  2357. }(ex);
  2358. return t1.call$1(new P.ArgumentError(false, null, null, typeof message === "string" ? message.replace(/^RangeError:\s*/, "") : message));
  2359. }
  2360. if (typeof InternalError == "function" && ex instanceof InternalError)
  2361. if (typeof message === "string" && message === "too much recursion")
  2362. return new P.StackOverflowError();
  2363. return ex;
  2364. },
  2365. getTraceFromException: function(exception) {
  2366. var trace;
  2367. if (exception == null)
  2368. return new H._StackTrace(exception, null);
  2369. trace = exception.$cachedTrace;
  2370. if (trace != null)
  2371. return trace;
  2372. return exception.$cachedTrace = new H._StackTrace(exception, null);
  2373. },
  2374. objectHashCode: function(object) {
  2375. if (object == null || typeof object != 'object')
  2376. return J.get$hashCode$(object);
  2377. else
  2378. return H.Primitives_objectHashCode(object);
  2379. },
  2380. fillLiteralMap: function(keyValuePairs, result) {
  2381. var $length, index, index0, index1;
  2382. $length = keyValuePairs.length;
  2383. for (index = 0; index < $length; index = index1) {
  2384. index0 = index + 1;
  2385. index1 = index0 + 1;
  2386. result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]);
  2387. }
  2388. return result;
  2389. },
  2390. invokeClosure: function(closure, isolate, numberOfArguments, arg1, arg2, arg3, arg4) {
  2391. switch (numberOfArguments) {
  2392. case 0:
  2393. return H._callInIsolate(isolate, new H.invokeClosure_closure(closure));
  2394. case 1:
  2395. return H._callInIsolate(isolate, new H.invokeClosure_closure0(closure, arg1));
  2396. case 2:
  2397. return H._callInIsolate(isolate, new H.invokeClosure_closure1(closure, arg1, arg2));
  2398. case 3:
  2399. return H._callInIsolate(isolate, new H.invokeClosure_closure2(closure, arg1, arg2, arg3));
  2400. case 4:
  2401. return H._callInIsolate(isolate, new H.invokeClosure_closure3(closure, arg1, arg2, arg3, arg4));
  2402. }
  2403. throw H.wrapException(P.Exception_Exception("Unsupported number of arguments for wrapped closure"));
  2404. },
  2405. convertDartClosureToJS: function(closure, arity) {
  2406. var $function;
  2407. if (closure == null)
  2408. return;
  2409. $function = closure.$identity;
  2410. if (!!$function)
  2411. return $function;
  2412. $function = function(closure, arity, context, invoke) {
  2413. return function(a1, a2, a3, a4) {
  2414. return invoke(closure, context, arity, a1, a2, a3, a4);
  2415. };
  2416. }(closure, arity, init.globalState.currentContext, H.invokeClosure);
  2417. closure.$identity = $function;
  2418. return $function;
  2419. },
  2420. Closure_fromTearOff: function(receiver, functions, reflectionInfo, isStatic, jsArguments, propertyName) {
  2421. var $function, callName, functionType, $prototype, $constructor, t1, isIntercepted, trampoline, signatureFunction, getReceiver, i, stub, stubCallName, t2;
  2422. $function = functions[0];
  2423. callName = $function.$callName;
  2424. if (!!J.getInterceptor(reflectionInfo).$isList) {
  2425. $function.$reflectionInfo = reflectionInfo;
  2426. functionType = H.ReflectionInfo_ReflectionInfo($function).functionType;
  2427. } else
  2428. functionType = reflectionInfo;
  2429. $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(null, null, null, null).constructor.prototype);
  2430. $prototype.$initialize = $prototype.constructor;
  2431. if (isStatic)
  2432. $constructor = function() {
  2433. this.$initialize();
  2434. };
  2435. else {
  2436. t1 = $.Closure_functionCounter;
  2437. $.Closure_functionCounter = J.$add$ns(t1, 1);
  2438. t1 = new Function("a,b,c,d" + t1, "this.$initialize(a,b,c,d" + t1 + ")");
  2439. $constructor = t1;
  2440. }
  2441. $prototype.constructor = $constructor;
  2442. $constructor.prototype = $prototype;
  2443. t1 = !isStatic;
  2444. if (t1) {
  2445. isIntercepted = jsArguments.length == 1 && true;
  2446. trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted);
  2447. trampoline.$reflectionInfo = reflectionInfo;
  2448. } else {
  2449. $prototype.$static_name = propertyName;
  2450. trampoline = $function;
  2451. isIntercepted = false;
  2452. }
  2453. if (typeof functionType == "number")
  2454. signatureFunction = function(getType, t) {
  2455. return function() {
  2456. return getType(t);
  2457. };
  2458. }(H.getType, functionType);
  2459. else if (t1 && typeof functionType == "function") {
  2460. getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_selfOf;
  2461. signatureFunction = function(f, r) {
  2462. return function() {
  2463. return f.apply({$receiver: r(this)}, arguments);
  2464. };
  2465. }(functionType, getReceiver);
  2466. } else
  2467. throw H.wrapException("Error in reflectionInfo.");
  2468. $prototype.$signature = signatureFunction;
  2469. $prototype[callName] = trampoline;
  2470. for (t1 = functions.length, i = 1; i < t1; ++i) {
  2471. stub = functions[i];
  2472. stubCallName = stub.$callName;
  2473. if (stubCallName != null) {
  2474. t2 = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isIntercepted);
  2475. $prototype[stubCallName] = t2;
  2476. }
  2477. }
  2478. $prototype["call*"] = trampoline;
  2479. $prototype.$requiredArgCount = $function.$requiredArgCount;
  2480. $prototype.$defaultValues = $function.$defaultValues;
  2481. return $constructor;
  2482. },
  2483. Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) {
  2484. var getSelf = H.BoundClosure_selfOf;
  2485. switch (isSuperCall ? -1 : arity) {
  2486. case 0:
  2487. return function(n, S) {
  2488. return function() {
  2489. return S(this)[n]();
  2490. };
  2491. }(stubName, getSelf);
  2492. case 1:
  2493. return function(n, S) {
  2494. return function(a) {
  2495. return S(this)[n](a);
  2496. };
  2497. }(stubName, getSelf);
  2498. case 2:
  2499. return function(n, S) {
  2500. return function(a, b) {
  2501. return S(this)[n](a, b);
  2502. };
  2503. }(stubName, getSelf);
  2504. case 3:
  2505. return function(n, S) {
  2506. return function(a, b, c) {
  2507. return S(this)[n](a, b, c);
  2508. };
  2509. }(stubName, getSelf);
  2510. case 4:
  2511. return function(n, S) {
  2512. return function(a, b, c, d) {
  2513. return S(this)[n](a, b, c, d);
  2514. };
  2515. }(stubName, getSelf);
  2516. case 5:
  2517. return function(n, S) {
  2518. return function(a, b, c, d, e) {
  2519. return S(this)[n](a, b, c, d, e);
  2520. };
  2521. }(stubName, getSelf);
  2522. default:
  2523. return function(f, s) {
  2524. return function() {
  2525. return f.apply(s(this), arguments);
  2526. };
  2527. }($function, getSelf);
  2528. }
  2529. },
  2530. Closure_forwardCallTo: function(receiver, $function, isIntercepted) {
  2531. var stubName, arity, lookedUpFunction, t1, t2, selfName, $arguments;
  2532. if (isIntercepted)
  2533. return H.Closure_forwardInterceptedCallTo(receiver, $function);
  2534. stubName = $function.$stubName;
  2535. arity = $function.length;
  2536. lookedUpFunction = receiver[stubName];
  2537. t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction;
  2538. t2 = !t1 || arity >= 27;
  2539. if (t2)
  2540. return H.Closure_cspForwardCall(arity, !t1, stubName, $function);
  2541. if (arity === 0) {
  2542. t1 = $.Closure_functionCounter;
  2543. $.Closure_functionCounter = J.$add$ns(t1, 1);
  2544. selfName = "self" + H.S(t1);
  2545. t1 = "return function(){var " + selfName + " = this.";
  2546. t2 = $.BoundClosure_selfFieldNameCache;
  2547. if (t2 == null) {
  2548. t2 = H.BoundClosure_computeFieldNamed("self");
  2549. $.BoundClosure_selfFieldNameCache = t2;
  2550. }
  2551. return new Function(t1 + H.S(t2) + ";return " + selfName + "." + H.S(stubName) + "();}")();
  2552. }
  2553. $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(",");
  2554. t1 = $.Closure_functionCounter;
  2555. $.Closure_functionCounter = J.$add$ns(t1, 1);
  2556. $arguments += H.S(t1);
  2557. t1 = "return function(" + $arguments + "){return this.";
  2558. t2 = $.BoundClosure_selfFieldNameCache;
  2559. if (t2 == null) {
  2560. t2 = H.BoundClosure_computeFieldNamed("self");
  2561. $.BoundClosure_selfFieldNameCache = t2;
  2562. }
  2563. return new Function(t1 + H.S(t2) + "." + H.S(stubName) + "(" + $arguments + ");}")();
  2564. },
  2565. Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) {
  2566. var getSelf, getReceiver;
  2567. getSelf = H.BoundClosure_selfOf;
  2568. getReceiver = H.BoundClosure_receiverOf;
  2569. switch (isSuperCall ? -1 : arity) {
  2570. case 0:
  2571. throw H.wrapException(new H.RuntimeError("Intercepted function with no arguments."));
  2572. case 1:
  2573. return function(n, s, r) {
  2574. return function() {
  2575. return s(this)[n](r(this));
  2576. };
  2577. }($name, getSelf, getReceiver);
  2578. case 2:
  2579. return function(n, s, r) {
  2580. return function(a) {
  2581. return s(this)[n](r(this), a);
  2582. };
  2583. }($name, getSelf, getReceiver);
  2584. case 3:
  2585. return function(n, s, r) {
  2586. return function(a, b) {
  2587. return s(this)[n](r(this), a, b);
  2588. };
  2589. }($name, getSelf, getReceiver);
  2590. case 4:
  2591. return function(n, s, r) {
  2592. return function(a, b, c) {
  2593. return s(this)[n](r(this), a, b, c);
  2594. };
  2595. }($name, getSelf, getReceiver);
  2596. case 5:
  2597. return function(n, s, r) {
  2598. return function(a, b, c, d) {
  2599. return s(this)[n](r(this), a, b, c, d);
  2600. };
  2601. }($name, getSelf, getReceiver);
  2602. case 6:
  2603. return function(n, s, r) {
  2604. return function(a, b, c, d, e) {
  2605. return s(this)[n](r(this), a, b, c, d, e);
  2606. };
  2607. }($name, getSelf, getReceiver);
  2608. default:
  2609. return function(f, s, r, a) {
  2610. return function() {
  2611. a = [r(this)];
  2612. Array.prototype.push.apply(a, arguments);
  2613. return f.apply(s(this), a);
  2614. };
  2615. }($function, getSelf, getReceiver);
  2616. }
  2617. },
  2618. Closure_forwardInterceptedCallTo: function(receiver, $function) {
  2619. var selfField, t1, stubName, arity, lookedUpFunction, t2, t3, $arguments;
  2620. selfField = H.BoundClosure_selfFieldName();
  2621. t1 = $.BoundClosure_receiverFieldNameCache;
  2622. if (t1 == null) {
  2623. t1 = H.BoundClosure_computeFieldNamed("receiver");
  2624. $.BoundClosure_receiverFieldNameCache = t1;
  2625. }
  2626. stubName = $function.$stubName;
  2627. arity = $function.length;
  2628. lookedUpFunction = receiver[stubName];
  2629. t2 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction;
  2630. t3 = !t2 || arity >= 28;
  2631. if (t3)
  2632. return H.Closure_cspForwardInterceptedCall(arity, !t2, stubName, $function);
  2633. if (arity === 1) {
  2634. t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + H.S(t1) + ");";
  2635. t2 = $.Closure_functionCounter;
  2636. $.Closure_functionCounter = J.$add$ns(t2, 1);
  2637. return new Function(t1 + H.S(t2) + "}")();
  2638. }
  2639. $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(",");
  2640. t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + H.S(t1) + ", " + $arguments + ");";
  2641. t2 = $.Closure_functionCounter;
  2642. $.Closure_functionCounter = J.$add$ns(t2, 1);
  2643. return new Function(t1 + H.S(t2) + "}")();
  2644. },
  2645. closureFromTearOff: function(receiver, functions, reflectionInfo, isStatic, jsArguments, $name) {
  2646. var t1;
  2647. functions.fixed$length = Array;
  2648. if (!!J.getInterceptor(reflectionInfo).$isList) {
  2649. reflectionInfo.fixed$length = Array;
  2650. t1 = reflectionInfo;
  2651. } else
  2652. t1 = reflectionInfo;
  2653. return H.Closure_fromTearOff(receiver, functions, t1, !!isStatic, jsArguments, $name);
  2654. },
  2655. throwCyclicInit: function(staticName) {
  2656. throw H.wrapException(new P.CyclicInitializationError("Cyclic initialization for static " + H.S(staticName)));
  2657. },
  2658. buildFunctionType: function(returnType, parameterTypes, optionalParameterTypes) {
  2659. return new H.RuntimeFunctionType(returnType, parameterTypes, optionalParameterTypes, null);
  2660. },
  2661. buildInterfaceType: function(rti, typeArguments) {
  2662. var jsConstructorName = rti.builtin$cls;
  2663. if (typeArguments == null || typeArguments.length === 0)
  2664. return new H.RuntimeTypePlain(jsConstructorName);
  2665. return new H.RuntimeTypeGeneric(jsConstructorName, typeArguments, null);
  2666. },
  2667. getDynamicRuntimeType: function() {
  2668. return C.C_DynamicRuntimeType;
  2669. },
  2670. random64: function() {
  2671. return (Math.random() * 0x100000000 >>> 0) + (Math.random() * 0x100000000 >>> 0) * 4294967296;
  2672. },
  2673. getIsolateAffinityTag: function($name) {
  2674. return init.getIsolateTag($name);
  2675. },
  2676. setRuntimeTypeInfo: function(target, rti) {
  2677. target.$ti = rti;
  2678. return target;
  2679. },
  2680. getRuntimeTypeInfo: function(target) {
  2681. if (target == null)
  2682. return;
  2683. return target.$ti;
  2684. },
  2685. getRuntimeTypeArguments: function(target, substitutionName) {
  2686. return H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target));
  2687. },
  2688. getRuntimeTypeArgument: function(target, substitutionName, index) {
  2689. var $arguments = H.getRuntimeTypeArguments(target, substitutionName);
  2690. return $arguments == null ? null : $arguments[index];
  2691. },
  2692. getTypeArgumentByIndex: function(target, index) {
  2693. var rti = H.getRuntimeTypeInfo(target);
  2694. return rti == null ? null : rti[index];
  2695. },
  2696. runtimeTypeToString: function(rti, onTypeVariable) {
  2697. if (rti == null)
  2698. return "dynamic";
  2699. else if (typeof rti === "object" && rti !== null && rti.constructor === Array)
  2700. return rti[0].builtin$cls + H.joinArguments(rti, 1, onTypeVariable);
  2701. else if (typeof rti == "function")
  2702. return rti.builtin$cls;
  2703. else if (typeof rti === "number" && Math.floor(rti) === rti)
  2704. return C.JSInt_methods.toString$0(rti);
  2705. else
  2706. return;
  2707. },
  2708. joinArguments: function(types, startIndex, onTypeVariable) {
  2709. var buffer, index, firstArgument, allDynamic, t1, argument;
  2710. if (types == null)
  2711. return "";
  2712. buffer = new P.StringBuffer("");
  2713. for (index = startIndex, firstArgument = true, allDynamic = true, t1 = ""; index < types.length; ++index) {
  2714. if (firstArgument)
  2715. firstArgument = false;
  2716. else
  2717. buffer._contents = t1 + ", ";
  2718. argument = types[index];
  2719. if (argument != null)
  2720. allDynamic = false;
  2721. t1 = buffer._contents += H.S(H.runtimeTypeToString(argument, onTypeVariable));
  2722. }
  2723. return allDynamic ? "" : "<" + buffer.toString$0(0) + ">";
  2724. },
  2725. substitute: function(substitution, $arguments) {
  2726. if (substitution == null)
  2727. return $arguments;
  2728. substitution = substitution.apply(null, $arguments);
  2729. if (substitution == null)
  2730. return;
  2731. if (typeof substitution === "object" && substitution !== null && substitution.constructor === Array)
  2732. return substitution;
  2733. if (typeof substitution == "function")
  2734. return substitution.apply(null, $arguments);
  2735. return $arguments;
  2736. },
  2737. areSubtypes: function(s, t) {
  2738. var len, i;
  2739. if (s == null || t == null)
  2740. return true;
  2741. len = s.length;
  2742. for (i = 0; i < len; ++i)
  2743. if (!H.isSubtype(s[i], t[i]))
  2744. return false;
  2745. return true;
  2746. },
  2747. computeSignature: function(signature, context, contextName) {
  2748. return signature.apply(context, H.getRuntimeTypeArguments(context, contextName));
  2749. },
  2750. isSubtype: function(s, t) {
  2751. var t1, typeOfS, t2, typeOfT, typeOfTString, substitution;
  2752. if (s === t)
  2753. return true;
  2754. if (s == null || t == null)
  2755. return true;
  2756. if ('func' in t)
  2757. return H.isFunctionSubtype(s, t);
  2758. if ('func' in s)
  2759. return t.builtin$cls === "Function";
  2760. t1 = typeof s === "object" && s !== null && s.constructor === Array;
  2761. typeOfS = t1 ? s[0] : s;
  2762. t2 = typeof t === "object" && t !== null && t.constructor === Array;
  2763. typeOfT = t2 ? t[0] : t;
  2764. if (typeOfT !== typeOfS) {
  2765. typeOfTString = H.runtimeTypeToString(typeOfT, null);
  2766. if (!('$is' + typeOfTString in typeOfS.prototype))
  2767. return false;
  2768. substitution = typeOfS.prototype["$as" + H.S(typeOfTString)];
  2769. } else
  2770. substitution = null;
  2771. if (!t1 && substitution == null || !t2)
  2772. return true;
  2773. t1 = t1 ? s.slice(1) : null;
  2774. t2 = t.slice(1);
  2775. return H.areSubtypes(H.substitute(substitution, t1), t2);
  2776. },
  2777. areAssignable: function(s, t, allowShorter) {
  2778. var t1, sLength, tLength, i, t2;
  2779. t1 = t == null;
  2780. if (t1 && s == null)
  2781. return true;
  2782. if (t1)
  2783. return allowShorter;
  2784. if (s == null)
  2785. return false;
  2786. sLength = s.length;
  2787. tLength = t.length;
  2788. if (allowShorter) {
  2789. if (sLength < tLength)
  2790. return false;
  2791. } else if (sLength !== tLength)
  2792. return false;
  2793. for (i = 0; i < tLength; ++i) {
  2794. t1 = s[i];
  2795. t2 = t[i];
  2796. if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
  2797. return false;
  2798. }
  2799. return true;
  2800. },
  2801. areAssignableMaps: function(s, t) {
  2802. var t1, names, i, $name, tType, sType;
  2803. if (t == null)
  2804. return true;
  2805. if (s == null)
  2806. return false;
  2807. t1 = Object.getOwnPropertyNames(t);
  2808. t1.fixed$length = Array;
  2809. names = t1;
  2810. for (t1 = names.length, i = 0; i < t1; ++i) {
  2811. $name = names[i];
  2812. if (!Object.hasOwnProperty.call(s, $name))
  2813. return false;
  2814. tType = t[$name];
  2815. sType = s[$name];
  2816. if (!(H.isSubtype(tType, sType) || H.isSubtype(sType, tType)))
  2817. return false;
  2818. }
  2819. return true;
  2820. },
  2821. isFunctionSubtype: function(s, t) {
  2822. var sReturnType, tReturnType, sParameterTypes, tParameterTypes, sOptionalParameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalParametersLen, tOptionalParametersLen, pos, t1, t2, tPos, sPos;
  2823. if (!('func' in s))
  2824. return false;
  2825. if ("v" in s) {
  2826. if (!("v" in t) && "ret" in t)
  2827. return false;
  2828. } else if (!("v" in t)) {
  2829. sReturnType = s.ret;
  2830. tReturnType = t.ret;
  2831. if (!(H.isSubtype(sReturnType, tReturnType) || H.isSubtype(tReturnType, sReturnType)))
  2832. return false;
  2833. }
  2834. sParameterTypes = s.args;
  2835. tParameterTypes = t.args;
  2836. sOptionalParameterTypes = s.opt;
  2837. tOptionalParameterTypes = t.opt;
  2838. sParametersLen = sParameterTypes != null ? sParameterTypes.length : 0;
  2839. tParametersLen = tParameterTypes != null ? tParameterTypes.length : 0;
  2840. sOptionalParametersLen = sOptionalParameterTypes != null ? sOptionalParameterTypes.length : 0;
  2841. tOptionalParametersLen = tOptionalParameterTypes != null ? tOptionalParameterTypes.length : 0;
  2842. if (sParametersLen > tParametersLen)
  2843. return false;
  2844. if (sParametersLen + sOptionalParametersLen < tParametersLen + tOptionalParametersLen)
  2845. return false;
  2846. if (sParametersLen === tParametersLen) {
  2847. if (!H.areAssignable(sParameterTypes, tParameterTypes, false))
  2848. return false;
  2849. if (!H.areAssignable(sOptionalParameterTypes, tOptionalParameterTypes, true))
  2850. return false;
  2851. } else {
  2852. for (pos = 0; pos < sParametersLen; ++pos) {
  2853. t1 = sParameterTypes[pos];
  2854. t2 = tParameterTypes[pos];
  2855. if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
  2856. return false;
  2857. }
  2858. for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) {
  2859. t1 = sOptionalParameterTypes[sPos];
  2860. t2 = tParameterTypes[tPos];
  2861. if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
  2862. return false;
  2863. }
  2864. for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) {
  2865. t1 = sOptionalParameterTypes[sPos];
  2866. t2 = tOptionalParameterTypes[tPos];
  2867. if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1)))
  2868. return false;
  2869. }
  2870. }
  2871. return H.areAssignableMaps(s.named, t.named);
  2872. },
  2873. toStringForNativeObject: function(obj) {
  2874. var t1 = $.getTagFunction;
  2875. return "Instance of " + (t1 == null ? "<Unknown>" : t1.call$1(obj));
  2876. },
  2877. hashCodeForNativeObject: function(object) {
  2878. return H.Primitives_objectHashCode(object);
  2879. },
  2880. defineProperty: function(obj, property, value) {
  2881. Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true});
  2882. },
  2883. lookupAndCacheInterceptor: function(obj) {
  2884. var tag, record, interceptor, interceptorClass, mark, t1;
  2885. tag = $.getTagFunction.call$1(obj);
  2886. record = $.dispatchRecordsForInstanceTags[tag];
  2887. if (record != null) {
  2888. Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
  2889. return record.i;
  2890. }
  2891. interceptor = $.interceptorsForUncacheableTags[tag];
  2892. if (interceptor != null)
  2893. return interceptor;
  2894. interceptorClass = init.interceptorsByTag[tag];
  2895. if (interceptorClass == null) {
  2896. tag = $.alternateTagFunction.call$2(obj, tag);
  2897. if (tag != null) {
  2898. record = $.dispatchRecordsForInstanceTags[tag];
  2899. if (record != null) {
  2900. Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
  2901. return record.i;
  2902. }
  2903. interceptor = $.interceptorsForUncacheableTags[tag];
  2904. if (interceptor != null)
  2905. return interceptor;
  2906. interceptorClass = init.interceptorsByTag[tag];
  2907. }
  2908. }
  2909. if (interceptorClass == null)
  2910. return;
  2911. interceptor = interceptorClass.prototype;
  2912. mark = tag[0];
  2913. if (mark === "!") {
  2914. record = H.makeLeafDispatchRecord(interceptor);
  2915. $.dispatchRecordsForInstanceTags[tag] = record;
  2916. Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
  2917. return record.i;
  2918. }
  2919. if (mark === "~") {
  2920. $.interceptorsForUncacheableTags[tag] = interceptor;
  2921. return interceptor;
  2922. }
  2923. if (mark === "-") {
  2924. t1 = H.makeLeafDispatchRecord(interceptor);
  2925. Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true});
  2926. return t1.i;
  2927. }
  2928. if (mark === "+")
  2929. return H.patchInteriorProto(obj, interceptor);
  2930. if (mark === "*")
  2931. throw H.wrapException(new P.UnimplementedError(tag));
  2932. if (init.leafTags[tag] === true) {
  2933. t1 = H.makeLeafDispatchRecord(interceptor);
  2934. Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true});
  2935. return t1.i;
  2936. } else
  2937. return H.patchInteriorProto(obj, interceptor);
  2938. },
  2939. patchInteriorProto: function(obj, interceptor) {
  2940. var proto = Object.getPrototypeOf(obj);
  2941. Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true});
  2942. return interceptor;
  2943. },
  2944. makeLeafDispatchRecord: function(interceptor) {
  2945. return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior);
  2946. },
  2947. makeDefaultDispatchRecord: function(tag, interceptorClass, proto) {
  2948. var interceptor = interceptorClass.prototype;
  2949. if (init.leafTags[tag] === true)
  2950. return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior);
  2951. else
  2952. return J.makeDispatchRecord(interceptor, proto, null, null);
  2953. },
  2954. initNativeDispatch: function() {
  2955. if (true === $.initNativeDispatchFlag)
  2956. return;
  2957. $.initNativeDispatchFlag = true;
  2958. H.initNativeDispatchContinue();
  2959. },
  2960. initNativeDispatchContinue: function() {
  2961. var map, tags, fun, i, tag, proto, record, interceptorClass;
  2962. $.dispatchRecordsForInstanceTags = Object.create(null);
  2963. $.interceptorsForUncacheableTags = Object.create(null);
  2964. H.initHooks();
  2965. map = init.interceptorsByTag;
  2966. tags = Object.getOwnPropertyNames(map);
  2967. if (typeof window != "undefined") {
  2968. window;
  2969. fun = function() {
  2970. };
  2971. for (i = 0; i < tags.length; ++i) {
  2972. tag = tags[i];
  2973. proto = $.prototypeForTagFunction.call$1(tag);
  2974. if (proto != null) {
  2975. record = H.makeDefaultDispatchRecord(tag, map[tag], proto);
  2976. if (record != null) {
  2977. Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
  2978. fun.prototype = proto;
  2979. }
  2980. }
  2981. }
  2982. }
  2983. for (i = 0; i < tags.length; ++i) {
  2984. tag = tags[i];
  2985. if (/^[A-Za-z_]/.test(tag)) {
  2986. interceptorClass = map[tag];
  2987. map["!" + tag] = interceptorClass;
  2988. map["~" + tag] = interceptorClass;
  2989. map["-" + tag] = interceptorClass;
  2990. map["+" + tag] = interceptorClass;
  2991. map["*" + tag] = interceptorClass;
  2992. }
  2993. }
  2994. },
  2995. initHooks: function() {
  2996. var hooks, transformers, i, transformer, getTag, getUnknownTag, prototypeForTag;
  2997. hooks = C.JS_CONST_bDt();
  2998. hooks = H.applyHooksTransformer(C.JS_CONST_0, H.applyHooksTransformer(C.JS_CONST_rr7, H.applyHooksTransformer(C.JS_CONST_Fs4, H.applyHooksTransformer(C.JS_CONST_Fs4, H.applyHooksTransformer(C.JS_CONST_gkc, H.applyHooksTransformer(C.JS_CONST_4hp, H.applyHooksTransformer(C.JS_CONST_QJm(C.JS_CONST_u2C), hooks)))))));
  2999. if (typeof dartNativeDispatchHooksTransformer != "undefined") {
  3000. transformers = dartNativeDispatchHooksTransformer;
  3001. if (typeof transformers == "function")
  3002. transformers = [transformers];
  3003. if (transformers.constructor == Array)
  3004. for (i = 0; i < transformers.length; ++i) {
  3005. transformer = transformers[i];
  3006. if (typeof transformer == "function")
  3007. hooks = transformer(hooks) || hooks;
  3008. }
  3009. }
  3010. getTag = hooks.getTag;
  3011. getUnknownTag = hooks.getUnknownTag;
  3012. prototypeForTag = hooks.prototypeForTag;
  3013. $.getTagFunction = new H.initHooks_closure(getTag);
  3014. $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag);
  3015. $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag);
  3016. },
  3017. applyHooksTransformer: function(transformer, hooks) {
  3018. return transformer(hooks) || hooks;
  3019. },
  3020. stringContainsUnchecked: function(receiver, other, startIndex) {
  3021. return receiver.indexOf(other, startIndex) >= 0;
  3022. },
  3023. ReflectionInfo: {
  3024. "^": "Object;jsFunction,data,isAccessor,requiredParameterCount,optionalParameterCount,areOptionalParametersNamed,functionType,cachedSortedIndices",
  3025. static: {
  3026. ReflectionInfo_ReflectionInfo: function(jsFunction) {
  3027. var data, requiredParametersInfo, optionalParametersInfo;
  3028. data = jsFunction.$reflectionInfo;
  3029. if (data == null)
  3030. return;
  3031. data.fixed$length = Array;
  3032. data = data;
  3033. requiredParametersInfo = data[0];
  3034. optionalParametersInfo = data[1];
  3035. return new H.ReflectionInfo(jsFunction, data, (requiredParametersInfo & 1) === 1, requiredParametersInfo >> 1, optionalParametersInfo >> 1, (optionalParametersInfo & 1) === 1, data[2], null);
  3036. }
  3037. }
  3038. },
  3039. TypeErrorDecoder: {
  3040. "^": "Object;_pattern,_arguments,_argumentsExpr,_expr,_method,_receiver",
  3041. matchTypeError$1: function(message) {
  3042. var match, result, t1;
  3043. match = new RegExp(this._pattern).exec(message);
  3044. if (match == null)
  3045. return;
  3046. result = Object.create(null);
  3047. t1 = this._arguments;
  3048. if (t1 !== -1)
  3049. result.arguments = match[t1 + 1];
  3050. t1 = this._argumentsExpr;
  3051. if (t1 !== -1)
  3052. result.argumentsExpr = match[t1 + 1];
  3053. t1 = this._expr;
  3054. if (t1 !== -1)
  3055. result.expr = match[t1 + 1];
  3056. t1 = this._method;
  3057. if (t1 !== -1)
  3058. result.method = match[t1 + 1];
  3059. t1 = this._receiver;
  3060. if (t1 !== -1)
  3061. result.receiver = match[t1 + 1];
  3062. return result;
  3063. },
  3064. static: {
  3065. TypeErrorDecoder_extractPattern: function(message) {
  3066. var match, $arguments, argumentsExpr, expr, method, receiver;
  3067. message = message.replace(String({}), '$receiver$').replace(/[[\]{}()*+?.\\^$|]/g, "\\$&");
  3068. match = message.match(/\\\$[a-zA-Z]+\\\$/g);
  3069. if (match == null)
  3070. match = [];
  3071. $arguments = match.indexOf("\\$arguments\\$");
  3072. argumentsExpr = match.indexOf("\\$argumentsExpr\\$");
  3073. expr = match.indexOf("\\$expr\\$");
  3074. method = match.indexOf("\\$method\\$");
  3075. receiver = match.indexOf("\\$receiver\\$");
  3076. 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);
  3077. },
  3078. TypeErrorDecoder_provokeCallErrorOn: function(expression) {
  3079. return function($expr$) {
  3080. var $argumentsExpr$ = '$arguments$';
  3081. try {
  3082. $expr$.$method$($argumentsExpr$);
  3083. } catch (e) {
  3084. return e.message;
  3085. }
  3086. }(expression);
  3087. },
  3088. TypeErrorDecoder_provokePropertyErrorOn: function(expression) {
  3089. return function($expr$) {
  3090. try {
  3091. $expr$.$method$;
  3092. } catch (e) {
  3093. return e.message;
  3094. }
  3095. }(expression);
  3096. }
  3097. }
  3098. },
  3099. NullError: {
  3100. "^": "Error;_message,_method",
  3101. toString$0: function(_) {
  3102. var t1 = this._method;
  3103. if (t1 == null)
  3104. return "NullError: " + H.S(this._message);
  3105. return "NullError: method not found: '" + H.S(t1) + "' on null";
  3106. }
  3107. },
  3108. JsNoSuchMethodError: {
  3109. "^": "Error;_message,_method,_receiver",
  3110. toString$0: function(_) {
  3111. var t1, t2;
  3112. t1 = this._method;
  3113. if (t1 == null)
  3114. return "NoSuchMethodError: " + H.S(this._message);
  3115. t2 = this._receiver;
  3116. if (t2 == null)
  3117. return "NoSuchMethodError: method not found: '" + H.S(t1) + "' (" + H.S(this._message) + ")";
  3118. return "NoSuchMethodError: method not found: '" + H.S(t1) + "' on '" + H.S(t2) + "' (" + H.S(this._message) + ")";
  3119. },
  3120. static: {
  3121. JsNoSuchMethodError$: function(_message, match) {
  3122. var t1, t2;
  3123. t1 = match == null;
  3124. t2 = t1 ? null : match.method;
  3125. return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver);
  3126. }
  3127. }
  3128. },
  3129. UnknownJsTypeError: {
  3130. "^": "Error;_message",
  3131. toString$0: function(_) {
  3132. var t1 = this._message;
  3133. return t1.length === 0 ? "Error" : "Error: " + t1;
  3134. }
  3135. },
  3136. unwrapException_saveStackTrace: {
  3137. "^": "Closure:2;ex",
  3138. call$1: function(error) {
  3139. if (!!J.getInterceptor(error).$isError)
  3140. if (error.$thrownJsError == null)
  3141. error.$thrownJsError = this.ex;
  3142. return error;
  3143. }
  3144. },
  3145. _StackTrace: {
  3146. "^": "Object;_exception,_trace",
  3147. toString$0: function(_) {
  3148. var t1, trace;
  3149. t1 = this._trace;
  3150. if (t1 != null)
  3151. return t1;
  3152. t1 = this._exception;
  3153. trace = t1 !== null && typeof t1 === "object" ? t1.stack : null;
  3154. t1 = trace == null ? "" : trace;
  3155. this._trace = t1;
  3156. return t1;
  3157. }
  3158. },
  3159. invokeClosure_closure: {
  3160. "^": "Closure:0;closure",
  3161. call$0: function() {
  3162. return this.closure.call$0();
  3163. }
  3164. },
  3165. invokeClosure_closure0: {
  3166. "^": "Closure:0;closure,arg1",
  3167. call$0: function() {
  3168. return this.closure.call$1(this.arg1);
  3169. }
  3170. },
  3171. invokeClosure_closure1: {
  3172. "^": "Closure:0;closure,arg1,arg2",
  3173. call$0: function() {
  3174. return this.closure.call$2(this.arg1, this.arg2);
  3175. }
  3176. },
  3177. invokeClosure_closure2: {
  3178. "^": "Closure:0;closure,arg1,arg2,arg3",
  3179. call$0: function() {
  3180. return this.closure.call$3(this.arg1, this.arg2, this.arg3);
  3181. }
  3182. },
  3183. invokeClosure_closure3: {
  3184. "^": "Closure:0;closure,arg1,arg2,arg3,arg4",
  3185. call$0: function() {
  3186. return this.closure.call$4(this.arg1, this.arg2, this.arg3, this.arg4);
  3187. }
  3188. },
  3189. Closure: {
  3190. "^": "Object;",
  3191. toString$0: function(_) {
  3192. return "Closure '" + H.Primitives_objectTypeName(this) + "'";
  3193. },
  3194. get$$call: function() {
  3195. return this;
  3196. },
  3197. get$$call: function() {
  3198. return this;
  3199. }
  3200. },
  3201. TearOffClosure: {
  3202. "^": "Closure;"
  3203. },
  3204. StaticClosure: {
  3205. "^": "TearOffClosure;",
  3206. toString$0: function(_) {
  3207. var $name = this.$static_name;
  3208. if ($name == null)
  3209. return "Closure of unknown static method";
  3210. return "Closure '" + $name + "'";
  3211. }
  3212. },
  3213. BoundClosure: {
  3214. "^": "TearOffClosure;_self,_target,_receiver,_name",
  3215. $eq: function(_, other) {
  3216. if (other == null)
  3217. return false;
  3218. if (this === other)
  3219. return true;
  3220. if (!(other instanceof H.BoundClosure))
  3221. return false;
  3222. return this._self === other._self && this._target === other._target && this._receiver === other._receiver;
  3223. },
  3224. get$hashCode: function(_) {
  3225. var t1, receiverHashCode;
  3226. t1 = this._receiver;
  3227. if (t1 == null)
  3228. receiverHashCode = H.Primitives_objectHashCode(this._self);
  3229. else
  3230. receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Primitives_objectHashCode(t1);
  3231. t1 = H.Primitives_objectHashCode(this._target);
  3232. if (typeof receiverHashCode !== "number")
  3233. return receiverHashCode.$xor();
  3234. return (receiverHashCode ^ t1) >>> 0;
  3235. },
  3236. toString$0: function(_) {
  3237. var receiver = this._receiver;
  3238. if (receiver == null)
  3239. receiver = this._self;
  3240. return "Closure '" + H.S(this._name) + "' of " + H.Primitives_objectToHumanReadableString(receiver);
  3241. },
  3242. static: {
  3243. BoundClosure_selfOf: function(closure) {
  3244. return closure._self;
  3245. },
  3246. BoundClosure_receiverOf: function(closure) {
  3247. return closure._receiver;
  3248. },
  3249. BoundClosure_selfFieldName: function() {
  3250. var t1 = $.BoundClosure_selfFieldNameCache;
  3251. if (t1 == null) {
  3252. t1 = H.BoundClosure_computeFieldNamed("self");
  3253. $.BoundClosure_selfFieldNameCache = t1;
  3254. }
  3255. return t1;
  3256. },
  3257. BoundClosure_computeFieldNamed: function(fieldName) {
  3258. var template, t1, names, i, $name;
  3259. template = new H.BoundClosure("self", "target", "receiver", "name");
  3260. t1 = Object.getOwnPropertyNames(template);
  3261. t1.fixed$length = Array;
  3262. names = t1;
  3263. for (t1 = names.length, i = 0; i < t1; ++i) {
  3264. $name = names[i];
  3265. if (template[$name] === fieldName)
  3266. return $name;
  3267. }
  3268. }
  3269. }
  3270. },
  3271. RuntimeError: {
  3272. "^": "Error;message",
  3273. toString$0: function(_) {
  3274. return "RuntimeError: " + H.S(this.message);
  3275. }
  3276. },
  3277. RuntimeType: {
  3278. "^": "Object;"
  3279. },
  3280. RuntimeFunctionType: {
  3281. "^": "RuntimeType;returnType,parameterTypes,optionalParameterTypes,namedParameters",
  3282. _isTest$1: function(expression) {
  3283. var functionTypeObject = this._extractFunctionTypeObjectFrom$1(expression);
  3284. return functionTypeObject == null ? false : H.isFunctionSubtype(functionTypeObject, this.toRti$0());
  3285. },
  3286. _extractFunctionTypeObjectFrom$1: function(o) {
  3287. var interceptor = J.getInterceptor(o);
  3288. return "$signature" in interceptor ? interceptor.$signature() : null;
  3289. },
  3290. toRti$0: function() {
  3291. var result, t1, t2, namedRti, keys, i, $name;
  3292. result = {func: "dynafunc"};
  3293. t1 = this.returnType;
  3294. t2 = J.getInterceptor(t1);
  3295. if (!!t2.$isVoidRuntimeType)
  3296. result.v = true;
  3297. else if (!t2.$isDynamicRuntimeType)
  3298. result.ret = t1.toRti$0();
  3299. t1 = this.parameterTypes;
  3300. if (t1 != null && t1.length !== 0)
  3301. result.args = H.RuntimeFunctionType_listToRti(t1);
  3302. t1 = this.optionalParameterTypes;
  3303. if (t1 != null && t1.length !== 0)
  3304. result.opt = H.RuntimeFunctionType_listToRti(t1);
  3305. t1 = this.namedParameters;
  3306. if (t1 != null) {
  3307. namedRti = Object.create(null);
  3308. keys = H.extractKeys(t1);
  3309. for (t2 = keys.length, i = 0; i < t2; ++i) {
  3310. $name = keys[i];
  3311. namedRti[$name] = t1[$name].toRti$0();
  3312. }
  3313. result.named = namedRti;
  3314. }
  3315. return result;
  3316. },
  3317. toString$0: function(_) {
  3318. var t1, t2, result, needsComma, i, type, keys, $name;
  3319. t1 = this.parameterTypes;
  3320. if (t1 != null)
  3321. for (t2 = t1.length, result = "(", needsComma = false, i = 0; i < t2; ++i, needsComma = true) {
  3322. type = t1[i];
  3323. if (needsComma)
  3324. result += ", ";
  3325. result += H.S(type);
  3326. }
  3327. else {
  3328. result = "(";
  3329. needsComma = false;
  3330. }
  3331. t1 = this.optionalParameterTypes;
  3332. if (t1 != null && t1.length !== 0) {
  3333. result = (needsComma ? result + ", " : result) + "[";
  3334. for (t2 = t1.length, needsComma = false, i = 0; i < t2; ++i, needsComma = true) {
  3335. type = t1[i];
  3336. if (needsComma)
  3337. result += ", ";
  3338. result += H.S(type);
  3339. }
  3340. result += "]";
  3341. } else {
  3342. t1 = this.namedParameters;
  3343. if (t1 != null) {
  3344. result = (needsComma ? result + ", " : result) + "{";
  3345. keys = H.extractKeys(t1);
  3346. for (t2 = keys.length, needsComma = false, i = 0; i < t2; ++i, needsComma = true) {
  3347. $name = keys[i];
  3348. if (needsComma)
  3349. result += ", ";
  3350. result += H.S(t1[$name].toRti$0()) + " " + $name;
  3351. }
  3352. result += "}";
  3353. }
  3354. }
  3355. return result + (") -> " + H.S(this.returnType));
  3356. },
  3357. static: {
  3358. RuntimeFunctionType_listToRti: function(list) {
  3359. var result, t1, i;
  3360. list = list;
  3361. result = [];
  3362. for (t1 = list.length, i = 0; i < t1; ++i)
  3363. result.push(list[i].toRti$0());
  3364. return result;
  3365. }
  3366. }
  3367. },
  3368. DynamicRuntimeType: {
  3369. "^": "RuntimeType;",
  3370. toString$0: function(_) {
  3371. return "dynamic";
  3372. },
  3373. toRti$0: function() {
  3374. return;
  3375. }
  3376. },
  3377. RuntimeTypePlain: {
  3378. "^": "RuntimeType;_jsConstructorName",
  3379. toRti$0: function() {
  3380. var t1, rti;
  3381. t1 = this._jsConstructorName;
  3382. rti = H.jsConstructorNameToRti(t1);
  3383. if (rti == null)
  3384. throw H.wrapException("no type for '" + t1 + "'");
  3385. return rti;
  3386. },
  3387. toString$0: function(_) {
  3388. return this._jsConstructorName;
  3389. }
  3390. },
  3391. RuntimeTypeGeneric: {
  3392. "^": "RuntimeType;_jsConstructorName,$arguments,rti",
  3393. toRti$0: function() {
  3394. var t1, result, t2, _i;
  3395. t1 = this.rti;
  3396. if (t1 != null)
  3397. return t1;
  3398. t1 = this._jsConstructorName;
  3399. result = [H.jsConstructorNameToRti(t1)];
  3400. if (0 >= result.length)
  3401. return H.ioore(result, 0);
  3402. if (result[0] == null)
  3403. throw H.wrapException("no type for '" + t1 + "<...>'");
  3404. for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
  3405. result.push(t1[_i].toRti$0());
  3406. this.rti = result;
  3407. return result;
  3408. },
  3409. toString$0: function(_) {
  3410. var t1 = this.$arguments;
  3411. return this._jsConstructorName + "<" + (t1 && C.JSArray_methods).join$1(t1, ", ") + ">";
  3412. }
  3413. },
  3414. JsLinkedHashMap: {
  3415. "^": "Object;_length,_strings,_nums,_rest,_first,_last,_modifications,$ti",
  3416. get$length: function(_) {
  3417. return this._length;
  3418. },
  3419. get$isEmpty: function(_) {
  3420. return this._length === 0;
  3421. },
  3422. get$keys: function() {
  3423. return new H.LinkedHashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]);
  3424. },
  3425. get$values: function(_) {
  3426. return H.MappedIterable_MappedIterable(this.get$keys(), new H.JsLinkedHashMap_values_closure(this), H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentByIndex(this, 1));
  3427. },
  3428. containsKey$1: function(key) {
  3429. var nums;
  3430. if ((key & 0x3ffffff) === key) {
  3431. nums = this._nums;
  3432. if (nums == null)
  3433. return false;
  3434. return this._containsTableEntry$2(nums, key);
  3435. } else
  3436. return this.internalContainsKey$1(key);
  3437. },
  3438. internalContainsKey$1: function(key) {
  3439. var rest = this._rest;
  3440. if (rest == null)
  3441. return false;
  3442. return this.internalFindBucketIndex$2(this._getTableBucket$2(rest, this.internalComputeHashCode$1(key)), key) >= 0;
  3443. },
  3444. $index: function(_, key) {
  3445. var strings, cell, nums;
  3446. if (typeof key === "string") {
  3447. strings = this._strings;
  3448. if (strings == null)
  3449. return;
  3450. cell = this._getTableCell$2(strings, key);
  3451. return cell == null ? null : cell.get$hashMapCellValue();
  3452. } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
  3453. nums = this._nums;
  3454. if (nums == null)
  3455. return;
  3456. cell = this._getTableCell$2(nums, key);
  3457. return cell == null ? null : cell.get$hashMapCellValue();
  3458. } else
  3459. return this.internalGet$1(key);
  3460. },
  3461. internalGet$1: function(key) {
  3462. var rest, bucket, index;
  3463. rest = this._rest;
  3464. if (rest == null)
  3465. return;
  3466. bucket = this._getTableBucket$2(rest, this.internalComputeHashCode$1(key));
  3467. index = this.internalFindBucketIndex$2(bucket, key);
  3468. if (index < 0)
  3469. return;
  3470. return bucket[index].get$hashMapCellValue();
  3471. },
  3472. $indexSet: function(_, key, value) {
  3473. var strings, nums, rest, hash, bucket, index;
  3474. if (typeof key === "string") {
  3475. strings = this._strings;
  3476. if (strings == null) {
  3477. strings = this._newHashTable$0();
  3478. this._strings = strings;
  3479. }
  3480. this._addHashTableEntry$3(strings, key, value);
  3481. } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
  3482. nums = this._nums;
  3483. if (nums == null) {
  3484. nums = this._newHashTable$0();
  3485. this._nums = nums;
  3486. }
  3487. this._addHashTableEntry$3(nums, key, value);
  3488. } else {
  3489. rest = this._rest;
  3490. if (rest == null) {
  3491. rest = this._newHashTable$0();
  3492. this._rest = rest;
  3493. }
  3494. hash = this.internalComputeHashCode$1(key);
  3495. bucket = this._getTableBucket$2(rest, hash);
  3496. if (bucket == null)
  3497. this._setTableEntry$3(rest, hash, [this._newLinkedCell$2(key, value)]);
  3498. else {
  3499. index = this.internalFindBucketIndex$2(bucket, key);
  3500. if (index >= 0)
  3501. bucket[index].set$hashMapCellValue(value);
  3502. else
  3503. bucket.push(this._newLinkedCell$2(key, value));
  3504. }
  3505. }
  3506. },
  3507. remove$1: function(_, key) {
  3508. if (typeof key === "string")
  3509. return this._removeHashTableEntry$2(this._strings, key);
  3510. else if (typeof key === "number" && (key & 0x3ffffff) === key)
  3511. return this._removeHashTableEntry$2(this._nums, key);
  3512. else
  3513. return this.internalRemove$1(key);
  3514. },
  3515. internalRemove$1: function(key) {
  3516. var rest, bucket, index, cell;
  3517. rest = this._rest;
  3518. if (rest == null)
  3519. return;
  3520. bucket = this._getTableBucket$2(rest, this.internalComputeHashCode$1(key));
  3521. index = this.internalFindBucketIndex$2(bucket, key);
  3522. if (index < 0)
  3523. return;
  3524. cell = bucket.splice(index, 1)[0];
  3525. this._unlinkCell$1(cell);
  3526. return cell.get$hashMapCellValue();
  3527. },
  3528. clear$0: function(_) {
  3529. if (this._length > 0) {
  3530. this._last = null;
  3531. this._first = null;
  3532. this._rest = null;
  3533. this._nums = null;
  3534. this._strings = null;
  3535. this._length = 0;
  3536. this._modifications = this._modifications + 1 & 67108863;
  3537. }
  3538. },
  3539. forEach$1: function(_, action) {
  3540. var cell, modifications;
  3541. cell = this._first;
  3542. modifications = this._modifications;
  3543. for (; cell != null;) {
  3544. action.call$2(cell.hashMapCellKey, cell.hashMapCellValue);
  3545. if (modifications !== this._modifications)
  3546. throw H.wrapException(new P.ConcurrentModificationError(this));
  3547. cell = cell._next;
  3548. }
  3549. },
  3550. _addHashTableEntry$3: function(table, key, value) {
  3551. var cell = this._getTableCell$2(table, key);
  3552. if (cell == null)
  3553. this._setTableEntry$3(table, key, this._newLinkedCell$2(key, value));
  3554. else
  3555. cell.set$hashMapCellValue(value);
  3556. },
  3557. _removeHashTableEntry$2: function(table, key) {
  3558. var cell;
  3559. if (table == null)
  3560. return;
  3561. cell = this._getTableCell$2(table, key);
  3562. if (cell == null)
  3563. return;
  3564. this._unlinkCell$1(cell);
  3565. this._deleteTableEntry$2(table, key);
  3566. return cell.get$hashMapCellValue();
  3567. },
  3568. _newLinkedCell$2: function(key, value) {
  3569. var cell, last;
  3570. cell = new H.LinkedHashMapCell(key, value, null, null);
  3571. if (this._first == null) {
  3572. this._last = cell;
  3573. this._first = cell;
  3574. } else {
  3575. last = this._last;
  3576. cell._previous = last;
  3577. last._next = cell;
  3578. this._last = cell;
  3579. }
  3580. ++this._length;
  3581. this._modifications = this._modifications + 1 & 67108863;
  3582. return cell;
  3583. },
  3584. _unlinkCell$1: function(cell) {
  3585. var previous, next;
  3586. previous = cell.get$_previous();
  3587. next = cell._next;
  3588. if (previous == null)
  3589. this._first = next;
  3590. else
  3591. previous._next = next;
  3592. if (next == null)
  3593. this._last = previous;
  3594. else
  3595. next._previous = previous;
  3596. --this._length;
  3597. this._modifications = this._modifications + 1 & 67108863;
  3598. },
  3599. internalComputeHashCode$1: function(key) {
  3600. return J.get$hashCode$(key) & 0x3ffffff;
  3601. },
  3602. internalFindBucketIndex$2: function(bucket, key) {
  3603. var $length, i;
  3604. if (bucket == null)
  3605. return -1;
  3606. $length = bucket.length;
  3607. for (i = 0; i < $length; ++i)
  3608. if (J.$eq$(bucket[i].get$hashMapCellKey(), key))
  3609. return i;
  3610. return -1;
  3611. },
  3612. toString$0: function(_) {
  3613. return P.Maps_mapToString(this);
  3614. },
  3615. _getTableCell$2: function(table, key) {
  3616. return table[key];
  3617. },
  3618. _getTableBucket$2: function(table, key) {
  3619. return table[key];
  3620. },
  3621. _setTableEntry$3: function(table, key, value) {
  3622. table[key] = value;
  3623. },
  3624. _deleteTableEntry$2: function(table, key) {
  3625. delete table[key];
  3626. },
  3627. _containsTableEntry$2: function(table, key) {
  3628. return this._getTableCell$2(table, key) != null;
  3629. },
  3630. _newHashTable$0: function() {
  3631. var table = Object.create(null);
  3632. this._setTableEntry$3(table, "<non-identifier-key>", table);
  3633. this._deleteTableEntry$2(table, "<non-identifier-key>");
  3634. return table;
  3635. },
  3636. $isInternalMap: 1
  3637. },
  3638. JsLinkedHashMap_values_closure: {
  3639. "^": "Closure:2;$this",
  3640. call$1: function(each) {
  3641. return this.$this.$index(0, each);
  3642. }
  3643. },
  3644. LinkedHashMapCell: {
  3645. "^": "Object;hashMapCellKey<,hashMapCellValue@,_next,_previous<"
  3646. },
  3647. LinkedHashMapKeyIterable: {
  3648. "^": "EfficientLengthIterable;_map,$ti",
  3649. get$length: function(_) {
  3650. return this._map._length;
  3651. },
  3652. get$iterator: function(_) {
  3653. var t1, t2;
  3654. t1 = this._map;
  3655. t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, null, null);
  3656. t2._cell = t1._first;
  3657. return t2;
  3658. }
  3659. },
  3660. LinkedHashMapKeyIterator: {
  3661. "^": "Object;_map,_modifications,_cell,__js_helper$_current",
  3662. get$current: function() {
  3663. return this.__js_helper$_current;
  3664. },
  3665. moveNext$0: function() {
  3666. var t1 = this._map;
  3667. if (this._modifications !== t1._modifications)
  3668. throw H.wrapException(new P.ConcurrentModificationError(t1));
  3669. else {
  3670. t1 = this._cell;
  3671. if (t1 == null) {
  3672. this.__js_helper$_current = null;
  3673. return false;
  3674. } else {
  3675. this.__js_helper$_current = t1.hashMapCellKey;
  3676. this._cell = t1._next;
  3677. return true;
  3678. }
  3679. }
  3680. }
  3681. },
  3682. initHooks_closure: {
  3683. "^": "Closure:2;getTag",
  3684. call$1: function(o) {
  3685. return this.getTag(o);
  3686. }
  3687. },
  3688. initHooks_closure0: {
  3689. "^": "Closure:7;getUnknownTag",
  3690. call$2: function(o, tag) {
  3691. return this.getUnknownTag(o, tag);
  3692. }
  3693. },
  3694. initHooks_closure1: {
  3695. "^": "Closure:8;prototypeForTag",
  3696. call$1: function(tag) {
  3697. return this.prototypeForTag(tag);
  3698. }
  3699. }
  3700. }], ["dart._js_names", "dart:_js_names",, H, {
  3701. "^": "",
  3702. extractKeys: function(victim) {
  3703. var t1 = H.setRuntimeTypeInfo(victim ? Object.keys(victim) : [], [null]);
  3704. t1.fixed$length = Array;
  3705. return t1;
  3706. }
  3707. }], ["dart2js._js_primitives", "dart:_js_primitives",, H, {
  3708. "^": "",
  3709. printString: function(string) {
  3710. if (typeof dartPrint == "function") {
  3711. dartPrint(string);
  3712. return;
  3713. }
  3714. if (typeof console == "object" && typeof console.log != "undefined") {
  3715. console.log(string);
  3716. return;
  3717. }
  3718. if (typeof window == "object")
  3719. return;
  3720. if (typeof print == "function") {
  3721. print(string);
  3722. return;
  3723. }
  3724. throw "Unable to print message: " + String(string);
  3725. }
  3726. }], ["dart.typed_data.implementation", "dart:_native_typed_data",, H, {
  3727. "^": "",
  3728. NativeByteBuffer: {
  3729. "^": "Interceptor;",
  3730. $isNativeByteBuffer: 1,
  3731. "%": "ArrayBuffer"
  3732. },
  3733. NativeTypedData: {
  3734. "^": "Interceptor;",
  3735. $isNativeTypedData: 1,
  3736. "%": "DataView;ArrayBufferView;NativeTypedArray|NativeTypedArray_ListMixin|NativeTypedArray_ListMixin_FixedLengthListMixin|NativeTypedArrayOfDouble|NativeTypedArray_ListMixin0|NativeTypedArray_ListMixin_FixedLengthListMixin0|NativeTypedArrayOfInt"
  3737. },
  3738. NativeTypedArray: {
  3739. "^": "NativeTypedData;",
  3740. get$length: function(receiver) {
  3741. return receiver.length;
  3742. },
  3743. $isJavaScriptIndexingBehavior: 1,
  3744. $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
  3745. $isJSIndexable: 1,
  3746. $asJSIndexable: Isolate.functionThatReturnsNull
  3747. },
  3748. NativeTypedArrayOfDouble: {
  3749. "^": "NativeTypedArray_ListMixin_FixedLengthListMixin;",
  3750. $index: function(receiver, index) {
  3751. if (index >>> 0 !== index || index >= receiver.length)
  3752. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3753. return receiver[index];
  3754. },
  3755. $indexSet: function(receiver, index, value) {
  3756. if (index >>> 0 !== index || index >= receiver.length)
  3757. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3758. receiver[index] = value;
  3759. }
  3760. },
  3761. NativeTypedArray_ListMixin: {
  3762. "^": "NativeTypedArray+ListMixin;",
  3763. $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
  3764. $asJSIndexable: Isolate.functionThatReturnsNull,
  3765. $asList: function() {
  3766. return [P.$double];
  3767. },
  3768. $asEfficientLengthIterable: function() {
  3769. return [P.$double];
  3770. },
  3771. $isList: 1,
  3772. $isEfficientLengthIterable: 1
  3773. },
  3774. NativeTypedArray_ListMixin_FixedLengthListMixin: {
  3775. "^": "NativeTypedArray_ListMixin+FixedLengthListMixin;",
  3776. $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
  3777. $asJSIndexable: Isolate.functionThatReturnsNull,
  3778. $asList: function() {
  3779. return [P.$double];
  3780. },
  3781. $asEfficientLengthIterable: function() {
  3782. return [P.$double];
  3783. }
  3784. },
  3785. NativeTypedArrayOfInt: {
  3786. "^": "NativeTypedArray_ListMixin_FixedLengthListMixin0;",
  3787. $indexSet: function(receiver, index, value) {
  3788. if (index >>> 0 !== index || index >= receiver.length)
  3789. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3790. receiver[index] = value;
  3791. },
  3792. $isList: 1,
  3793. $asList: function() {
  3794. return [P.$int];
  3795. },
  3796. $isEfficientLengthIterable: 1,
  3797. $asEfficientLengthIterable: function() {
  3798. return [P.$int];
  3799. }
  3800. },
  3801. NativeTypedArray_ListMixin0: {
  3802. "^": "NativeTypedArray+ListMixin;",
  3803. $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
  3804. $asJSIndexable: Isolate.functionThatReturnsNull,
  3805. $asList: function() {
  3806. return [P.$int];
  3807. },
  3808. $asEfficientLengthIterable: function() {
  3809. return [P.$int];
  3810. },
  3811. $isList: 1,
  3812. $isEfficientLengthIterable: 1
  3813. },
  3814. NativeTypedArray_ListMixin_FixedLengthListMixin0: {
  3815. "^": "NativeTypedArray_ListMixin0+FixedLengthListMixin;",
  3816. $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
  3817. $asJSIndexable: Isolate.functionThatReturnsNull,
  3818. $asList: function() {
  3819. return [P.$int];
  3820. },
  3821. $asEfficientLengthIterable: function() {
  3822. return [P.$int];
  3823. }
  3824. },
  3825. NativeFloat32List: {
  3826. "^": "NativeTypedArrayOfDouble;",
  3827. $isList: 1,
  3828. $asList: function() {
  3829. return [P.$double];
  3830. },
  3831. $isEfficientLengthIterable: 1,
  3832. $asEfficientLengthIterable: function() {
  3833. return [P.$double];
  3834. },
  3835. "%": "Float32Array"
  3836. },
  3837. NativeFloat64List: {
  3838. "^": "NativeTypedArrayOfDouble;",
  3839. $isList: 1,
  3840. $asList: function() {
  3841. return [P.$double];
  3842. },
  3843. $isEfficientLengthIterable: 1,
  3844. $asEfficientLengthIterable: function() {
  3845. return [P.$double];
  3846. },
  3847. "%": "Float64Array"
  3848. },
  3849. NativeInt16List: {
  3850. "^": "NativeTypedArrayOfInt;",
  3851. $index: function(receiver, index) {
  3852. if (index >>> 0 !== index || index >= receiver.length)
  3853. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3854. return receiver[index];
  3855. },
  3856. $isList: 1,
  3857. $asList: function() {
  3858. return [P.$int];
  3859. },
  3860. $isEfficientLengthIterable: 1,
  3861. $asEfficientLengthIterable: function() {
  3862. return [P.$int];
  3863. },
  3864. "%": "Int16Array"
  3865. },
  3866. NativeInt32List: {
  3867. "^": "NativeTypedArrayOfInt;",
  3868. $index: function(receiver, index) {
  3869. if (index >>> 0 !== index || index >= receiver.length)
  3870. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3871. return receiver[index];
  3872. },
  3873. $isList: 1,
  3874. $asList: function() {
  3875. return [P.$int];
  3876. },
  3877. $isEfficientLengthIterable: 1,
  3878. $asEfficientLengthIterable: function() {
  3879. return [P.$int];
  3880. },
  3881. "%": "Int32Array"
  3882. },
  3883. NativeInt8List: {
  3884. "^": "NativeTypedArrayOfInt;",
  3885. $index: function(receiver, index) {
  3886. if (index >>> 0 !== index || index >= receiver.length)
  3887. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3888. return receiver[index];
  3889. },
  3890. $isList: 1,
  3891. $asList: function() {
  3892. return [P.$int];
  3893. },
  3894. $isEfficientLengthIterable: 1,
  3895. $asEfficientLengthIterable: function() {
  3896. return [P.$int];
  3897. },
  3898. "%": "Int8Array"
  3899. },
  3900. NativeUint16List: {
  3901. "^": "NativeTypedArrayOfInt;",
  3902. $index: function(receiver, index) {
  3903. if (index >>> 0 !== index || index >= receiver.length)
  3904. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3905. return receiver[index];
  3906. },
  3907. $isList: 1,
  3908. $asList: function() {
  3909. return [P.$int];
  3910. },
  3911. $isEfficientLengthIterable: 1,
  3912. $asEfficientLengthIterable: function() {
  3913. return [P.$int];
  3914. },
  3915. "%": "Uint16Array"
  3916. },
  3917. NativeUint32List: {
  3918. "^": "NativeTypedArrayOfInt;",
  3919. $index: function(receiver, index) {
  3920. if (index >>> 0 !== index || index >= receiver.length)
  3921. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3922. return receiver[index];
  3923. },
  3924. $isList: 1,
  3925. $asList: function() {
  3926. return [P.$int];
  3927. },
  3928. $isEfficientLengthIterable: 1,
  3929. $asEfficientLengthIterable: function() {
  3930. return [P.$int];
  3931. },
  3932. "%": "Uint32Array"
  3933. },
  3934. NativeUint8ClampedList: {
  3935. "^": "NativeTypedArrayOfInt;",
  3936. get$length: function(receiver) {
  3937. return receiver.length;
  3938. },
  3939. $index: function(receiver, index) {
  3940. if (index >>> 0 !== index || index >= receiver.length)
  3941. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3942. return receiver[index];
  3943. },
  3944. $isList: 1,
  3945. $asList: function() {
  3946. return [P.$int];
  3947. },
  3948. $isEfficientLengthIterable: 1,
  3949. $asEfficientLengthIterable: function() {
  3950. return [P.$int];
  3951. },
  3952. "%": "CanvasPixelArray|Uint8ClampedArray"
  3953. },
  3954. NativeUint8List: {
  3955. "^": "NativeTypedArrayOfInt;",
  3956. get$length: function(receiver) {
  3957. return receiver.length;
  3958. },
  3959. $index: function(receiver, index) {
  3960. if (index >>> 0 !== index || index >= receiver.length)
  3961. H.throwExpression(H.diagnoseIndexError(receiver, index));
  3962. return receiver[index];
  3963. },
  3964. $isList: 1,
  3965. $asList: function() {
  3966. return [P.$int];
  3967. },
  3968. $isEfficientLengthIterable: 1,
  3969. $asEfficientLengthIterable: function() {
  3970. return [P.$int];
  3971. },
  3972. "%": ";Uint8Array"
  3973. }
  3974. }], ["dart.async", "dart:async",, P, {
  3975. "^": "",
  3976. _AsyncRun__initializeScheduleImmediate: function() {
  3977. var t1, div, span;
  3978. t1 = {};
  3979. if (self.scheduleImmediate != null)
  3980. return P.async__AsyncRun__scheduleImmediateJsOverride$closure();
  3981. if (self.MutationObserver != null && self.document != null) {
  3982. div = self.document.createElement("div");
  3983. span = self.document.createElement("span");
  3984. t1.storedCallback = null;
  3985. new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true});
  3986. return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span);
  3987. } else if (self.setImmediate != null)
  3988. return P.async__AsyncRun__scheduleImmediateWithSetImmediate$closure();
  3989. return P.async__AsyncRun__scheduleImmediateWithTimer$closure();
  3990. },
  3991. _AsyncRun__scheduleImmediateJsOverride: [function(callback) {
  3992. ++init.globalState.topEventLoop._activeJsAsyncCount;
  3993. self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(callback), 0));
  3994. }, "call$1", "async__AsyncRun__scheduleImmediateJsOverride$closure", 2, 0, 3],
  3995. _AsyncRun__scheduleImmediateWithSetImmediate: [function(callback) {
  3996. ++init.globalState.topEventLoop._activeJsAsyncCount;
  3997. self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(callback), 0));
  3998. }, "call$1", "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", 2, 0, 3],
  3999. _AsyncRun__scheduleImmediateWithTimer: [function(callback) {
  4000. P.Timer__createTimer(C.Duration_0, callback);
  4001. }, "call$1", "async__AsyncRun__scheduleImmediateWithTimer$closure", 2, 0, 3],
  4002. _registerErrorHandler: function(errorHandler, zone) {
  4003. var t1 = H.getDynamicRuntimeType();
  4004. if (H.buildFunctionType(t1, [t1, t1])._isTest$1(errorHandler)) {
  4005. zone.toString;
  4006. return errorHandler;
  4007. } else {
  4008. zone.toString;
  4009. return errorHandler;
  4010. }
  4011. },
  4012. _microtaskLoop: function() {
  4013. var t1, t2;
  4014. for (; t1 = $._nextCallback, t1 != null;) {
  4015. $._lastPriorityCallback = null;
  4016. t2 = t1.next;
  4017. $._nextCallback = t2;
  4018. if (t2 == null)
  4019. $._lastCallback = null;
  4020. t1.callback.call$0();
  4021. }
  4022. },
  4023. _startMicrotaskLoop: [function() {
  4024. $._isInCallbackLoop = true;
  4025. try {
  4026. P._microtaskLoop();
  4027. } finally {
  4028. $._lastPriorityCallback = null;
  4029. $._isInCallbackLoop = false;
  4030. if ($._nextCallback != null)
  4031. $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure());
  4032. }
  4033. }, "call$0", "async___startMicrotaskLoop$closure", 0, 0, 1],
  4034. _scheduleAsyncCallback: function(callback) {
  4035. var newEntry = new P._AsyncCallbackEntry(callback, null);
  4036. if ($._nextCallback == null) {
  4037. $._lastCallback = newEntry;
  4038. $._nextCallback = newEntry;
  4039. if (!$._isInCallbackLoop)
  4040. $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure());
  4041. } else {
  4042. $._lastCallback.next = newEntry;
  4043. $._lastCallback = newEntry;
  4044. }
  4045. },
  4046. _schedulePriorityAsyncCallback: function(callback) {
  4047. var t1, entry, t2;
  4048. t1 = $._nextCallback;
  4049. if (t1 == null) {
  4050. P._scheduleAsyncCallback(callback);
  4051. $._lastPriorityCallback = $._lastCallback;
  4052. return;
  4053. }
  4054. entry = new P._AsyncCallbackEntry(callback, null);
  4055. t2 = $._lastPriorityCallback;
  4056. if (t2 == null) {
  4057. entry.next = t1;
  4058. $._lastPriorityCallback = entry;
  4059. $._nextCallback = entry;
  4060. } else {
  4061. entry.next = t2.next;
  4062. t2.next = entry;
  4063. $._lastPriorityCallback = entry;
  4064. if (entry.next == null)
  4065. $._lastCallback = entry;
  4066. }
  4067. },
  4068. scheduleMicrotask: function(callback) {
  4069. var currentZone = $.Zone__current;
  4070. if (C.C__RootZone === currentZone) {
  4071. P._rootScheduleMicrotask(null, null, C.C__RootZone, callback);
  4072. return;
  4073. }
  4074. currentZone.toString;
  4075. P._rootScheduleMicrotask(null, null, currentZone, currentZone.bindCallback$2$runGuarded(callback, true));
  4076. },
  4077. _addErrorWithReplacement: function(sink, error, stackTrace) {
  4078. $.Zone__current.toString;
  4079. sink._addError$2(error, stackTrace);
  4080. },
  4081. Timer_Timer: function(duration, callback) {
  4082. var t1 = $.Zone__current;
  4083. if (t1 === C.C__RootZone) {
  4084. t1.toString;
  4085. return P.Timer__createTimer(duration, callback);
  4086. }
  4087. return P.Timer__createTimer(duration, t1.bindCallback$2$runGuarded(callback, true));
  4088. },
  4089. Timer__createTimer: function(duration, callback) {
  4090. var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000);
  4091. return H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback);
  4092. },
  4093. Zone_current: function() {
  4094. return $.Zone__current;
  4095. },
  4096. _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) {
  4097. var t1 = {};
  4098. t1.error = error;
  4099. P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(t1, stackTrace));
  4100. },
  4101. _rootRun: function($self, $parent, zone, f) {
  4102. var old, t1;
  4103. t1 = $.Zone__current;
  4104. if (t1 === zone)
  4105. return f.call$0();
  4106. $.Zone__current = zone;
  4107. old = t1;
  4108. try {
  4109. t1 = f.call$0();
  4110. return t1;
  4111. } finally {
  4112. $.Zone__current = old;
  4113. }
  4114. },
  4115. _rootRunUnary: function($self, $parent, zone, f, arg) {
  4116. var old, t1;
  4117. t1 = $.Zone__current;
  4118. if (t1 === zone)
  4119. return f.call$1(arg);
  4120. $.Zone__current = zone;
  4121. old = t1;
  4122. try {
  4123. t1 = f.call$1(arg);
  4124. return t1;
  4125. } finally {
  4126. $.Zone__current = old;
  4127. }
  4128. },
  4129. _rootRunBinary: function($self, $parent, zone, f, arg1, arg2) {
  4130. var old, t1;
  4131. t1 = $.Zone__current;
  4132. if (t1 === zone)
  4133. return f.call$2(arg1, arg2);
  4134. $.Zone__current = zone;
  4135. old = t1;
  4136. try {
  4137. t1 = f.call$2(arg1, arg2);
  4138. return t1;
  4139. } finally {
  4140. $.Zone__current = old;
  4141. }
  4142. },
  4143. _rootScheduleMicrotask: function($self, $parent, zone, f) {
  4144. var t1 = C.C__RootZone !== zone;
  4145. if (t1)
  4146. f = zone.bindCallback$2$runGuarded(f, !(!t1 || false));
  4147. P._scheduleAsyncCallback(f);
  4148. },
  4149. _AsyncRun__initializeScheduleImmediate_internalCallback: {
  4150. "^": "Closure:2;_box_0",
  4151. call$1: function(_) {
  4152. var t1, f;
  4153. --init.globalState.topEventLoop._activeJsAsyncCount;
  4154. t1 = this._box_0;
  4155. f = t1.storedCallback;
  4156. t1.storedCallback = null;
  4157. f.call$0();
  4158. }
  4159. },
  4160. _AsyncRun__initializeScheduleImmediate_closure: {
  4161. "^": "Closure:9;_box_0,div,span",
  4162. call$1: function(callback) {
  4163. var t1, t2;
  4164. ++init.globalState.topEventLoop._activeJsAsyncCount;
  4165. this._box_0.storedCallback = callback;
  4166. t1 = this.div;
  4167. t2 = this.span;
  4168. t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);
  4169. }
  4170. },
  4171. _AsyncRun__scheduleImmediateJsOverride_internalCallback: {
  4172. "^": "Closure:0;callback",
  4173. call$0: function() {
  4174. --init.globalState.topEventLoop._activeJsAsyncCount;
  4175. this.callback.call$0();
  4176. }
  4177. },
  4178. _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: {
  4179. "^": "Closure:0;callback",
  4180. call$0: function() {
  4181. --init.globalState.topEventLoop._activeJsAsyncCount;
  4182. this.callback.call$0();
  4183. }
  4184. },
  4185. Future: {
  4186. "^": "Object;$ti"
  4187. },
  4188. _FutureListener: {
  4189. "^": "Object;_nextListener<,result,state,callback,errorCallback",
  4190. get$_zone: function() {
  4191. return this.result._zone;
  4192. },
  4193. get$handlesValue: function() {
  4194. return (this.state & 1) !== 0;
  4195. },
  4196. get$handlesError: function() {
  4197. return (this.state & 2) !== 0;
  4198. },
  4199. get$handlesComplete: function() {
  4200. return this.state === 8;
  4201. },
  4202. handleValue$1: function(sourceResult) {
  4203. return this.result._zone.runUnary$2(this.callback, sourceResult);
  4204. },
  4205. matchesErrorTest$1: function(asyncError) {
  4206. if (this.state !== 6)
  4207. return true;
  4208. return this.result._zone.runUnary$2(this.callback, J.get$error$x(asyncError));
  4209. },
  4210. handleError$1: function(asyncError) {
  4211. var t1, t2, t3, t4;
  4212. t1 = this.errorCallback;
  4213. t2 = H.getDynamicRuntimeType();
  4214. t3 = J.getInterceptor$x(asyncError);
  4215. t4 = this.result._zone;
  4216. if (H.buildFunctionType(t2, [t2, t2])._isTest$1(t1))
  4217. return t4.runBinary$3(t1, t3.get$error(asyncError), asyncError.get$stackTrace());
  4218. else
  4219. return t4.runUnary$2(t1, t3.get$error(asyncError));
  4220. },
  4221. handleWhenComplete$0: function() {
  4222. return this.result._zone.run$1(this.callback);
  4223. }
  4224. },
  4225. _Future: {
  4226. "^": "Object;_state<,_zone,_resultOrListeners<,$ti",
  4227. get$_isChained: function() {
  4228. return this._state === 2;
  4229. },
  4230. get$_isComplete: function() {
  4231. return this._state >= 4;
  4232. },
  4233. then$2$onError: function(f, onError) {
  4234. var currentZone, result;
  4235. currentZone = $.Zone__current;
  4236. if (currentZone !== C.C__RootZone) {
  4237. currentZone.toString;
  4238. if (onError != null)
  4239. onError = P._registerErrorHandler(onError, currentZone);
  4240. }
  4241. result = new P._Future(0, currentZone, null, [null]);
  4242. this._addListener$1(new P._FutureListener(null, result, onError == null ? 1 : 3, f, onError));
  4243. return result;
  4244. },
  4245. then$1: function(f) {
  4246. return this.then$2$onError(f, null);
  4247. },
  4248. whenComplete$1: function(action) {
  4249. var t1, result;
  4250. t1 = $.Zone__current;
  4251. result = new P._Future(0, t1, null, this.$ti);
  4252. if (t1 !== C.C__RootZone)
  4253. t1.toString;
  4254. this._addListener$1(new P._FutureListener(null, result, 8, action, null));
  4255. return result;
  4256. },
  4257. _addListener$1: function(listener) {
  4258. var t1, source;
  4259. t1 = this._state;
  4260. if (t1 <= 1) {
  4261. listener._nextListener = this._resultOrListeners;
  4262. this._resultOrListeners = listener;
  4263. } else {
  4264. if (t1 === 2) {
  4265. source = this._resultOrListeners;
  4266. if (!source.get$_isComplete()) {
  4267. source._addListener$1(listener);
  4268. return;
  4269. }
  4270. this._state = source._state;
  4271. this._resultOrListeners = source._resultOrListeners;
  4272. }
  4273. t1 = this._zone;
  4274. t1.toString;
  4275. P._rootScheduleMicrotask(null, null, t1, new P._Future__addListener_closure(this, listener));
  4276. }
  4277. },
  4278. _prependListeners$1: function(listeners) {
  4279. var t1, t2, existingListeners, cursor, source;
  4280. t1 = {};
  4281. t1.listeners = listeners;
  4282. if (listeners == null)
  4283. return;
  4284. t2 = this._state;
  4285. if (t2 <= 1) {
  4286. existingListeners = this._resultOrListeners;
  4287. this._resultOrListeners = listeners;
  4288. if (existingListeners != null) {
  4289. for (cursor = listeners; cursor.get$_nextListener() != null;)
  4290. cursor = cursor._nextListener;
  4291. cursor._nextListener = existingListeners;
  4292. }
  4293. } else {
  4294. if (t2 === 2) {
  4295. source = this._resultOrListeners;
  4296. if (!source.get$_isComplete()) {
  4297. source._prependListeners$1(listeners);
  4298. return;
  4299. }
  4300. this._state = source._state;
  4301. this._resultOrListeners = source._resultOrListeners;
  4302. }
  4303. t1.listeners = this._reverseListeners$1(listeners);
  4304. t2 = this._zone;
  4305. t2.toString;
  4306. P._rootScheduleMicrotask(null, null, t2, new P._Future__prependListeners_closure(t1, this));
  4307. }
  4308. },
  4309. _removeListeners$0: function() {
  4310. var current = this._resultOrListeners;
  4311. this._resultOrListeners = null;
  4312. return this._reverseListeners$1(current);
  4313. },
  4314. _reverseListeners$1: function(listeners) {
  4315. var current, prev, next;
  4316. for (current = listeners, prev = null; current != null; prev = current, current = next) {
  4317. next = current.get$_nextListener();
  4318. current._nextListener = prev;
  4319. }
  4320. return prev;
  4321. },
  4322. _complete$1: function(value) {
  4323. var listeners;
  4324. if (!!J.getInterceptor(value).$isFuture)
  4325. P._Future__chainCoreFuture(value, this);
  4326. else {
  4327. listeners = this._removeListeners$0();
  4328. this._state = 4;
  4329. this._resultOrListeners = value;
  4330. P._Future__propagateToListeners(this, listeners);
  4331. }
  4332. },
  4333. _completeError$2: [function(error, stackTrace) {
  4334. var listeners = this._removeListeners$0();
  4335. this._state = 8;
  4336. this._resultOrListeners = new P.AsyncError(error, stackTrace);
  4337. P._Future__propagateToListeners(this, listeners);
  4338. }, function(error) {
  4339. return this._completeError$2(error, null);
  4340. }, "_completeError$1", "call$2", "call$1", "get$_completeError", 2, 2, 10, 0],
  4341. _asyncComplete$1: function(value) {
  4342. var t1;
  4343. if (!!J.getInterceptor(value).$isFuture) {
  4344. if (value._state === 8) {
  4345. this._state = 1;
  4346. t1 = this._zone;
  4347. t1.toString;
  4348. P._rootScheduleMicrotask(null, null, t1, new P._Future__asyncComplete_closure(this, value));
  4349. } else
  4350. P._Future__chainCoreFuture(value, this);
  4351. return;
  4352. }
  4353. this._state = 1;
  4354. t1 = this._zone;
  4355. t1.toString;
  4356. P._rootScheduleMicrotask(null, null, t1, new P._Future__asyncComplete_closure0(this, value));
  4357. },
  4358. _Future$immediate$1: function(value, $T) {
  4359. this._asyncComplete$1(value);
  4360. },
  4361. $isFuture: 1,
  4362. static: {
  4363. _Future__chainForeignFuture: function(source, target) {
  4364. var e, s, exception, t1;
  4365. target._state = 1;
  4366. try {
  4367. source.then$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target));
  4368. } catch (exception) {
  4369. t1 = H.unwrapException(exception);
  4370. e = t1;
  4371. s = H.getTraceFromException(exception);
  4372. P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s));
  4373. }
  4374. },
  4375. _Future__chainCoreFuture: function(source, target) {
  4376. var t1, current, listeners;
  4377. for (; source.get$_isChained();)
  4378. source = source._resultOrListeners;
  4379. t1 = source.get$_isComplete();
  4380. current = target._resultOrListeners;
  4381. if (t1) {
  4382. target._resultOrListeners = null;
  4383. listeners = target._reverseListeners$1(current);
  4384. target._state = source._state;
  4385. target._resultOrListeners = source._resultOrListeners;
  4386. P._Future__propagateToListeners(target, listeners);
  4387. } else {
  4388. target._state = 2;
  4389. target._resultOrListeners = source;
  4390. source._prependListeners$1(current);
  4391. }
  4392. },
  4393. _Future__propagateToListeners: function(source, listeners) {
  4394. var t1, t2, t3, hasError, asyncError, listeners0, sourceResult, zone, t4, oldZone, result, current;
  4395. t1 = {};
  4396. t1.source = source;
  4397. for (t2 = source; true;) {
  4398. t3 = {};
  4399. hasError = t2._state === 8;
  4400. if (listeners == null) {
  4401. if (hasError) {
  4402. asyncError = t2._resultOrListeners;
  4403. t1 = t2._zone;
  4404. t2 = J.get$error$x(asyncError);
  4405. t3 = asyncError.get$stackTrace();
  4406. t1.toString;
  4407. P._rootHandleUncaughtError(null, null, t1, t2, t3);
  4408. }
  4409. return;
  4410. }
  4411. for (; listeners.get$_nextListener() != null; listeners = listeners0) {
  4412. listeners0 = listeners._nextListener;
  4413. listeners._nextListener = null;
  4414. P._Future__propagateToListeners(t1.source, listeners);
  4415. }
  4416. sourceResult = t1.source._resultOrListeners;
  4417. t3.listenerHasError = hasError;
  4418. t3.listenerValueOrError = sourceResult;
  4419. t2 = !hasError;
  4420. if (!t2 || listeners.get$handlesValue() || listeners.get$handlesComplete()) {
  4421. zone = listeners.get$_zone();
  4422. if (hasError) {
  4423. t4 = t1.source._zone;
  4424. t4.toString;
  4425. t4 = t4 == null ? zone == null : t4 === zone;
  4426. if (!t4)
  4427. zone.toString;
  4428. else
  4429. t4 = true;
  4430. t4 = !t4;
  4431. } else
  4432. t4 = false;
  4433. if (t4) {
  4434. t2 = t1.source;
  4435. asyncError = t2._resultOrListeners;
  4436. t2 = t2._zone;
  4437. t3 = J.get$error$x(asyncError);
  4438. t4 = asyncError.get$stackTrace();
  4439. t2.toString;
  4440. P._rootHandleUncaughtError(null, null, t2, t3, t4);
  4441. return;
  4442. }
  4443. oldZone = $.Zone__current;
  4444. if (oldZone == null ? zone != null : oldZone !== zone)
  4445. $.Zone__current = zone;
  4446. else
  4447. oldZone = null;
  4448. if (listeners.get$handlesComplete())
  4449. new P._Future__propagateToListeners_handleWhenCompleteCallback(t1, t3, hasError, listeners).call$0();
  4450. else if (t2) {
  4451. if (listeners.get$handlesValue())
  4452. new P._Future__propagateToListeners_handleValueCallback(t3, listeners, sourceResult).call$0();
  4453. } else if (listeners.get$handlesError())
  4454. new P._Future__propagateToListeners_handleError(t1, t3, listeners).call$0();
  4455. if (oldZone != null)
  4456. $.Zone__current = oldZone;
  4457. t2 = t3.listenerValueOrError;
  4458. t4 = J.getInterceptor(t2);
  4459. if (!!t4.$isFuture) {
  4460. result = listeners.result;
  4461. if (!!t4.$is_Future)
  4462. if (t2._state >= 4) {
  4463. current = result._resultOrListeners;
  4464. result._resultOrListeners = null;
  4465. listeners = result._reverseListeners$1(current);
  4466. result._state = t2._state;
  4467. result._resultOrListeners = t2._resultOrListeners;
  4468. t1.source = t2;
  4469. continue;
  4470. } else
  4471. P._Future__chainCoreFuture(t2, result);
  4472. else
  4473. P._Future__chainForeignFuture(t2, result);
  4474. return;
  4475. }
  4476. }
  4477. result = listeners.result;
  4478. listeners = result._removeListeners$0();
  4479. t2 = t3.listenerHasError;
  4480. t3 = t3.listenerValueOrError;
  4481. if (!t2) {
  4482. result._state = 4;
  4483. result._resultOrListeners = t3;
  4484. } else {
  4485. result._state = 8;
  4486. result._resultOrListeners = t3;
  4487. }
  4488. t1.source = result;
  4489. t2 = result;
  4490. }
  4491. }
  4492. }
  4493. },
  4494. _Future__addListener_closure: {
  4495. "^": "Closure:0;$this,listener",
  4496. call$0: function() {
  4497. P._Future__propagateToListeners(this.$this, this.listener);
  4498. }
  4499. },
  4500. _Future__prependListeners_closure: {
  4501. "^": "Closure:0;_box_0,$this",
  4502. call$0: function() {
  4503. P._Future__propagateToListeners(this.$this, this._box_0.listeners);
  4504. }
  4505. },
  4506. _Future__chainForeignFuture_closure: {
  4507. "^": "Closure:2;target",
  4508. call$1: function(value) {
  4509. var t1 = this.target;
  4510. t1._state = 0;
  4511. t1._complete$1(value);
  4512. }
  4513. },
  4514. _Future__chainForeignFuture_closure0: {
  4515. "^": "Closure:11;target",
  4516. call$2: function(error, stackTrace) {
  4517. this.target._completeError$2(error, stackTrace);
  4518. },
  4519. call$1: function(error) {
  4520. return this.call$2(error, null);
  4521. }
  4522. },
  4523. _Future__chainForeignFuture_closure1: {
  4524. "^": "Closure:0;target,e,s",
  4525. call$0: function() {
  4526. this.target._completeError$2(this.e, this.s);
  4527. }
  4528. },
  4529. _Future__asyncComplete_closure: {
  4530. "^": "Closure:0;$this,coreFuture",
  4531. call$0: function() {
  4532. P._Future__chainCoreFuture(this.coreFuture, this.$this);
  4533. }
  4534. },
  4535. _Future__asyncComplete_closure0: {
  4536. "^": "Closure:0;$this,typedValue",
  4537. call$0: function() {
  4538. var t1, listeners;
  4539. t1 = this.$this;
  4540. listeners = t1._removeListeners$0();
  4541. t1._state = 4;
  4542. t1._resultOrListeners = this.typedValue;
  4543. P._Future__propagateToListeners(t1, listeners);
  4544. }
  4545. },
  4546. _Future__propagateToListeners_handleWhenCompleteCallback: {
  4547. "^": "Closure:1;_box_1,_box_0,hasError,listener",
  4548. call$0: function() {
  4549. var completeResult, e, s, exception, t1, t2, originalSource;
  4550. completeResult = null;
  4551. try {
  4552. completeResult = this.listener.handleWhenComplete$0();
  4553. } catch (exception) {
  4554. t1 = H.unwrapException(exception);
  4555. e = t1;
  4556. s = H.getTraceFromException(exception);
  4557. if (this.hasError) {
  4558. t1 = J.get$error$x(this._box_1.source._resultOrListeners);
  4559. t2 = e;
  4560. t2 = t1 == null ? t2 == null : t1 === t2;
  4561. t1 = t2;
  4562. } else
  4563. t1 = false;
  4564. t2 = this._box_0;
  4565. if (t1)
  4566. t2.listenerValueOrError = this._box_1.source._resultOrListeners;
  4567. else
  4568. t2.listenerValueOrError = new P.AsyncError(e, s);
  4569. t2.listenerHasError = true;
  4570. return;
  4571. }
  4572. if (!!J.getInterceptor(completeResult).$isFuture) {
  4573. if (completeResult instanceof P._Future && completeResult.get$_state() >= 4) {
  4574. if (completeResult.get$_state() === 8) {
  4575. t1 = this._box_0;
  4576. t1.listenerValueOrError = completeResult.get$_resultOrListeners();
  4577. t1.listenerHasError = true;
  4578. }
  4579. return;
  4580. }
  4581. originalSource = this._box_1.source;
  4582. t1 = this._box_0;
  4583. t1.listenerValueOrError = completeResult.then$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource));
  4584. t1.listenerHasError = false;
  4585. }
  4586. }
  4587. },
  4588. _Future__propagateToListeners_handleWhenCompleteCallback_closure: {
  4589. "^": "Closure:2;originalSource",
  4590. call$1: function(_) {
  4591. return this.originalSource;
  4592. }
  4593. },
  4594. _Future__propagateToListeners_handleValueCallback: {
  4595. "^": "Closure:1;_box_0,listener,sourceResult",
  4596. call$0: function() {
  4597. var e, s, exception, t1;
  4598. try {
  4599. this._box_0.listenerValueOrError = this.listener.handleValue$1(this.sourceResult);
  4600. } catch (exception) {
  4601. t1 = H.unwrapException(exception);
  4602. e = t1;
  4603. s = H.getTraceFromException(exception);
  4604. t1 = this._box_0;
  4605. t1.listenerValueOrError = new P.AsyncError(e, s);
  4606. t1.listenerHasError = true;
  4607. }
  4608. }
  4609. },
  4610. _Future__propagateToListeners_handleError: {
  4611. "^": "Closure:1;_box_1,_box_0,listener",
  4612. call$0: function() {
  4613. var asyncError, e, s, t1, t2, exception, t3, t4;
  4614. try {
  4615. asyncError = this._box_1.source._resultOrListeners;
  4616. t1 = this.listener;
  4617. if (t1.matchesErrorTest$1(asyncError) === true && t1.errorCallback != null) {
  4618. t2 = this._box_0;
  4619. t2.listenerValueOrError = t1.handleError$1(asyncError);
  4620. t2.listenerHasError = false;
  4621. }
  4622. } catch (exception) {
  4623. t1 = H.unwrapException(exception);
  4624. e = t1;
  4625. s = H.getTraceFromException(exception);
  4626. t1 = this._box_1;
  4627. t2 = J.get$error$x(t1.source._resultOrListeners);
  4628. t3 = e;
  4629. t4 = this._box_0;
  4630. if (t2 == null ? t3 == null : t2 === t3)
  4631. t4.listenerValueOrError = t1.source._resultOrListeners;
  4632. else
  4633. t4.listenerValueOrError = new P.AsyncError(e, s);
  4634. t4.listenerHasError = true;
  4635. }
  4636. }
  4637. },
  4638. _AsyncCallbackEntry: {
  4639. "^": "Object;callback,next"
  4640. },
  4641. Stream: {
  4642. "^": "Object;$ti",
  4643. map$1: function(_, convert) {
  4644. return new P._MapStream(convert, this, [H.getRuntimeTypeArgument(this, "Stream", 0), null]);
  4645. },
  4646. get$length: function(_) {
  4647. var t1, future;
  4648. t1 = {};
  4649. future = new P._Future(0, $.Zone__current, null, [P.$int]);
  4650. t1.count = 0;
  4651. this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1), true, new P.Stream_length_closure0(t1, future), future.get$_completeError());
  4652. return future;
  4653. },
  4654. toList$0: function(_) {
  4655. var t1, result, future;
  4656. t1 = H.getRuntimeTypeArgument(this, "Stream", 0);
  4657. result = H.setRuntimeTypeInfo([], [t1]);
  4658. future = new P._Future(0, $.Zone__current, null, [[P.List, t1]]);
  4659. this.listen$4$cancelOnError$onDone$onError(new P.Stream_toList_closure(this, result), true, new P.Stream_toList_closure0(result, future), future.get$_completeError());
  4660. return future;
  4661. }
  4662. },
  4663. Stream_length_closure: {
  4664. "^": "Closure:2;_box_0",
  4665. call$1: function(_) {
  4666. ++this._box_0.count;
  4667. }
  4668. },
  4669. Stream_length_closure0: {
  4670. "^": "Closure:0;_box_0,future",
  4671. call$0: function() {
  4672. this.future._complete$1(this._box_0.count);
  4673. }
  4674. },
  4675. Stream_toList_closure: {
  4676. "^": "Closure;$this,result",
  4677. call$1: function(data) {
  4678. this.result.push(data);
  4679. },
  4680. $signature: function() {
  4681. return H.computeSignature(function(T) {
  4682. return {func: 1, args: [T]};
  4683. }, this.$this, "Stream");
  4684. }
  4685. },
  4686. Stream_toList_closure0: {
  4687. "^": "Closure:0;result,future",
  4688. call$0: function() {
  4689. this.future._complete$1(this.result);
  4690. }
  4691. },
  4692. StreamSubscription: {
  4693. "^": "Object;"
  4694. },
  4695. _EventSink: {
  4696. "^": "Object;"
  4697. },
  4698. _BufferingStreamSubscription: {
  4699. "^": "Object;_state<",
  4700. pause$1: function(_, resumeSignal) {
  4701. var t1 = this._state;
  4702. if ((t1 & 8) !== 0)
  4703. return;
  4704. this._state = (t1 + 128 | 4) >>> 0;
  4705. if (t1 < 128 && this._pending != null)
  4706. this._pending.cancelSchedule$0();
  4707. if ((t1 & 4) === 0 && (this._state & 32) === 0)
  4708. this._guardCallback$1(this.get$_onPause());
  4709. },
  4710. pause$0: function($receiver) {
  4711. return this.pause$1($receiver, null);
  4712. },
  4713. resume$0: function() {
  4714. var t1 = this._state;
  4715. if ((t1 & 8) !== 0)
  4716. return;
  4717. if (t1 >= 128) {
  4718. t1 -= 128;
  4719. this._state = t1;
  4720. if (t1 < 128) {
  4721. if ((t1 & 64) !== 0) {
  4722. t1 = this._pending;
  4723. t1 = !t1.get$isEmpty(t1);
  4724. } else
  4725. t1 = false;
  4726. if (t1)
  4727. this._pending.schedule$1(this);
  4728. else {
  4729. t1 = (this._state & 4294967291) >>> 0;
  4730. this._state = t1;
  4731. if ((t1 & 32) === 0)
  4732. this._guardCallback$1(this.get$_onResume());
  4733. }
  4734. }
  4735. }
  4736. },
  4737. cancel$0: function() {
  4738. var t1 = (this._state & 4294967279) >>> 0;
  4739. this._state = t1;
  4740. if ((t1 & 8) === 0)
  4741. this._cancel$0();
  4742. t1 = this._cancelFuture;
  4743. return t1 == null ? $.$get$Future__nullFuture() : t1;
  4744. },
  4745. _cancel$0: function() {
  4746. var t1 = (this._state | 8) >>> 0;
  4747. this._state = t1;
  4748. if ((t1 & 64) !== 0)
  4749. this._pending.cancelSchedule$0();
  4750. if ((this._state & 32) === 0)
  4751. this._pending = null;
  4752. this._cancelFuture = this._onCancel$0();
  4753. },
  4754. _async$_add$1: ["super$_BufferingStreamSubscription$_add", function(data) {
  4755. var t1 = this._state;
  4756. if ((t1 & 8) !== 0)
  4757. return;
  4758. if (t1 < 32)
  4759. this._sendData$1(data);
  4760. else
  4761. this._addPending$1(new P._DelayedData(data, null, [null]));
  4762. }],
  4763. _addError$2: ["super$_BufferingStreamSubscription$_addError", function(error, stackTrace) {
  4764. var t1 = this._state;
  4765. if ((t1 & 8) !== 0)
  4766. return;
  4767. if (t1 < 32)
  4768. this._sendError$2(error, stackTrace);
  4769. else
  4770. this._addPending$1(new P._DelayedError(error, stackTrace, null));
  4771. }],
  4772. _async$_close$0: function() {
  4773. var t1 = this._state;
  4774. if ((t1 & 8) !== 0)
  4775. return;
  4776. t1 = (t1 | 2) >>> 0;
  4777. this._state = t1;
  4778. if (t1 < 32)
  4779. this._sendDone$0();
  4780. else
  4781. this._addPending$1(C.C__DelayedDone);
  4782. },
  4783. _onPause$0: [function() {
  4784. }, "call$0", "get$_onPause", 0, 0, 1],
  4785. _onResume$0: [function() {
  4786. }, "call$0", "get$_onResume", 0, 0, 1],
  4787. _onCancel$0: function() {
  4788. return;
  4789. },
  4790. _addPending$1: function($event) {
  4791. var pending, t1;
  4792. pending = this._pending;
  4793. if (pending == null) {
  4794. pending = new P._StreamImplEvents(null, null, 0, [null]);
  4795. this._pending = pending;
  4796. }
  4797. pending.add$1(0, $event);
  4798. t1 = this._state;
  4799. if ((t1 & 64) === 0) {
  4800. t1 = (t1 | 64) >>> 0;
  4801. this._state = t1;
  4802. if (t1 < 128)
  4803. this._pending.schedule$1(this);
  4804. }
  4805. },
  4806. _sendData$1: function(data) {
  4807. var t1 = this._state;
  4808. this._state = (t1 | 32) >>> 0;
  4809. this._zone.runUnaryGuarded$2(this._async$_onData, data);
  4810. this._state = (this._state & 4294967263) >>> 0;
  4811. this._checkState$1((t1 & 4) !== 0);
  4812. },
  4813. _sendError$2: function(error, stackTrace) {
  4814. var t1, t2, t3;
  4815. t1 = this._state;
  4816. t2 = new P._BufferingStreamSubscription__sendError_sendError(this, error, stackTrace);
  4817. if ((t1 & 1) !== 0) {
  4818. this._state = (t1 | 16) >>> 0;
  4819. this._cancel$0();
  4820. t1 = this._cancelFuture;
  4821. if (!!J.getInterceptor(t1).$isFuture) {
  4822. t3 = $.$get$Future__nullFuture();
  4823. t3 = t1 == null ? t3 != null : t1 !== t3;
  4824. } else
  4825. t3 = false;
  4826. if (t3)
  4827. t1.whenComplete$1(t2);
  4828. else
  4829. t2.call$0();
  4830. } else {
  4831. t2.call$0();
  4832. this._checkState$1((t1 & 4) !== 0);
  4833. }
  4834. },
  4835. _sendDone$0: function() {
  4836. var t1, t2, t3;
  4837. t1 = new P._BufferingStreamSubscription__sendDone_sendDone(this);
  4838. this._cancel$0();
  4839. this._state = (this._state | 16) >>> 0;
  4840. t2 = this._cancelFuture;
  4841. if (!!J.getInterceptor(t2).$isFuture) {
  4842. t3 = $.$get$Future__nullFuture();
  4843. t3 = t2 == null ? t3 != null : t2 !== t3;
  4844. } else
  4845. t3 = false;
  4846. if (t3)
  4847. t2.whenComplete$1(t1);
  4848. else
  4849. t1.call$0();
  4850. },
  4851. _guardCallback$1: function(callback) {
  4852. var t1 = this._state;
  4853. this._state = (t1 | 32) >>> 0;
  4854. callback.call$0();
  4855. this._state = (this._state & 4294967263) >>> 0;
  4856. this._checkState$1((t1 & 4) !== 0);
  4857. },
  4858. _checkState$1: function(wasInputPaused) {
  4859. var t1, isInputPaused;
  4860. if ((this._state & 64) !== 0) {
  4861. t1 = this._pending;
  4862. t1 = t1.get$isEmpty(t1);
  4863. } else
  4864. t1 = false;
  4865. if (t1) {
  4866. t1 = (this._state & 4294967231) >>> 0;
  4867. this._state = t1;
  4868. if ((t1 & 4) !== 0)
  4869. if (t1 < 128) {
  4870. t1 = this._pending;
  4871. t1 = t1 == null || t1.get$isEmpty(t1);
  4872. } else
  4873. t1 = false;
  4874. else
  4875. t1 = false;
  4876. if (t1)
  4877. this._state = (this._state & 4294967291) >>> 0;
  4878. }
  4879. for (; true; wasInputPaused = isInputPaused) {
  4880. t1 = this._state;
  4881. if ((t1 & 8) !== 0) {
  4882. this._pending = null;
  4883. return;
  4884. }
  4885. isInputPaused = (t1 & 4) !== 0;
  4886. if (wasInputPaused === isInputPaused)
  4887. break;
  4888. this._state = (t1 ^ 32) >>> 0;
  4889. if (isInputPaused)
  4890. this._onPause$0();
  4891. else
  4892. this._onResume$0();
  4893. this._state = (this._state & 4294967263) >>> 0;
  4894. }
  4895. t1 = this._state;
  4896. if ((t1 & 64) !== 0 && t1 < 128)
  4897. this._pending.schedule$1(this);
  4898. },
  4899. _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError) {
  4900. var t1 = this._zone;
  4901. t1.toString;
  4902. this._async$_onData = onData;
  4903. this._onError = P._registerErrorHandler(onError, t1);
  4904. this._onDone = onDone;
  4905. }
  4906. },
  4907. _BufferingStreamSubscription__sendError_sendError: {
  4908. "^": "Closure:1;$this,error,stackTrace",
  4909. call$0: function() {
  4910. var t1, t2, t3, t4, t5, t6;
  4911. t1 = this.$this;
  4912. t2 = t1._state;
  4913. if ((t2 & 8) !== 0 && (t2 & 16) === 0)
  4914. return;
  4915. t1._state = (t2 | 32) >>> 0;
  4916. t2 = t1._onError;
  4917. t3 = H.buildFunctionType(H.getDynamicRuntimeType(), [H.buildInterfaceType(P.Object), H.buildInterfaceType(P.StackTrace)])._isTest$1(t2);
  4918. t4 = t1._zone;
  4919. t5 = this.error;
  4920. t6 = t1._onError;
  4921. if (t3)
  4922. t4.runBinaryGuarded$3(t6, t5, this.stackTrace);
  4923. else
  4924. t4.runUnaryGuarded$2(t6, t5);
  4925. t1._state = (t1._state & 4294967263) >>> 0;
  4926. }
  4927. },
  4928. _BufferingStreamSubscription__sendDone_sendDone: {
  4929. "^": "Closure:1;$this",
  4930. call$0: function() {
  4931. var t1, t2;
  4932. t1 = this.$this;
  4933. t2 = t1._state;
  4934. if ((t2 & 16) === 0)
  4935. return;
  4936. t1._state = (t2 | 42) >>> 0;
  4937. t1._zone.runGuarded$1(t1._onDone);
  4938. t1._state = (t1._state & 4294967263) >>> 0;
  4939. }
  4940. },
  4941. _DelayedEvent: {
  4942. "^": "Object;next@"
  4943. },
  4944. _DelayedData: {
  4945. "^": "_DelayedEvent;value,next,$ti",
  4946. perform$1: function(dispatch) {
  4947. dispatch._sendData$1(this.value);
  4948. }
  4949. },
  4950. _DelayedError: {
  4951. "^": "_DelayedEvent;error>,stackTrace<,next",
  4952. perform$1: function(dispatch) {
  4953. dispatch._sendError$2(this.error, this.stackTrace);
  4954. }
  4955. },
  4956. _DelayedDone: {
  4957. "^": "Object;",
  4958. perform$1: function(dispatch) {
  4959. dispatch._sendDone$0();
  4960. },
  4961. get$next: function() {
  4962. return;
  4963. },
  4964. set$next: function(_) {
  4965. throw H.wrapException(new P.StateError("No events after a done."));
  4966. }
  4967. },
  4968. _PendingEvents: {
  4969. "^": "Object;_state<",
  4970. schedule$1: function(dispatch) {
  4971. var t1 = this._state;
  4972. if (t1 === 1)
  4973. return;
  4974. if (t1 >= 1) {
  4975. this._state = 1;
  4976. return;
  4977. }
  4978. P.scheduleMicrotask(new P._PendingEvents_schedule_closure(this, dispatch));
  4979. this._state = 1;
  4980. },
  4981. cancelSchedule$0: function() {
  4982. if (this._state === 1)
  4983. this._state = 3;
  4984. }
  4985. },
  4986. _PendingEvents_schedule_closure: {
  4987. "^": "Closure:0;$this,dispatch",
  4988. call$0: function() {
  4989. var t1, oldState, $event, t2;
  4990. t1 = this.$this;
  4991. oldState = t1._state;
  4992. t1._state = 0;
  4993. if (oldState === 3)
  4994. return;
  4995. $event = t1.firstPendingEvent;
  4996. t2 = $event.get$next();
  4997. t1.firstPendingEvent = t2;
  4998. if (t2 == null)
  4999. t1.lastPendingEvent = null;
  5000. $event.perform$1(this.dispatch);
  5001. }
  5002. },
  5003. _StreamImplEvents: {
  5004. "^": "_PendingEvents;firstPendingEvent,lastPendingEvent,_state,$ti",
  5005. get$isEmpty: function(_) {
  5006. return this.lastPendingEvent == null;
  5007. },
  5008. add$1: function(_, $event) {
  5009. var t1 = this.lastPendingEvent;
  5010. if (t1 == null) {
  5011. this.lastPendingEvent = $event;
  5012. this.firstPendingEvent = $event;
  5013. } else {
  5014. t1.set$next($event);
  5015. this.lastPendingEvent = $event;
  5016. }
  5017. }
  5018. },
  5019. _ForwardingStream: {
  5020. "^": "Stream;$ti",
  5021. listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
  5022. return this._createSubscription$4(onData, onError, onDone, true === cancelOnError);
  5023. },
  5024. listen$3$onDone$onError: function(onData, onDone, onError) {
  5025. return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
  5026. },
  5027. _createSubscription$4: function(onData, onError, onDone, cancelOnError) {
  5028. return P._ForwardingStreamSubscription$(this, onData, onError, onDone, cancelOnError, H.getRuntimeTypeArgument(this, "_ForwardingStream", 0), H.getRuntimeTypeArgument(this, "_ForwardingStream", 1));
  5029. },
  5030. _handleData$2: function(data, sink) {
  5031. sink._async$_add$1(data);
  5032. },
  5033. _handleError$3: function(error, stackTrace, sink) {
  5034. sink._addError$2(error, stackTrace);
  5035. },
  5036. $asStream: function($S, $T) {
  5037. return [$T];
  5038. }
  5039. },
  5040. _ForwardingStreamSubscription: {
  5041. "^": "_BufferingStreamSubscription;_stream,_subscription,_async$_onData,_onError,_onDone,_zone,_state,_cancelFuture,_pending,$ti",
  5042. _async$_add$1: function(data) {
  5043. if ((this._state & 2) !== 0)
  5044. return;
  5045. this.super$_BufferingStreamSubscription$_add(data);
  5046. },
  5047. _addError$2: function(error, stackTrace) {
  5048. if ((this._state & 2) !== 0)
  5049. return;
  5050. this.super$_BufferingStreamSubscription$_addError(error, stackTrace);
  5051. },
  5052. _onPause$0: [function() {
  5053. var t1 = this._subscription;
  5054. if (t1 == null)
  5055. return;
  5056. t1.pause$0(0);
  5057. }, "call$0", "get$_onPause", 0, 0, 1],
  5058. _onResume$0: [function() {
  5059. var t1 = this._subscription;
  5060. if (t1 == null)
  5061. return;
  5062. t1.resume$0();
  5063. }, "call$0", "get$_onResume", 0, 0, 1],
  5064. _onCancel$0: function() {
  5065. var t1 = this._subscription;
  5066. if (t1 != null) {
  5067. this._subscription = null;
  5068. return t1.cancel$0();
  5069. }
  5070. return;
  5071. },
  5072. _handleData$1: [function(data) {
  5073. this._stream._handleData$2(data, this);
  5074. }, "call$1", "get$_handleData", 2, 0, function() {
  5075. return H.computeSignature(function(S, T) {
  5076. return {func: 1, v: true, args: [S]};
  5077. }, this.$receiver, "_ForwardingStreamSubscription");
  5078. }],
  5079. _handleError$2: [function(error, stackTrace) {
  5080. this._stream._handleError$3(error, stackTrace, this);
  5081. }, "call$2", "get$_handleError", 4, 0, 12],
  5082. _handleDone$0: [function() {
  5083. this._async$_close$0();
  5084. }, "call$0", "get$_handleDone", 0, 0, 1],
  5085. _ForwardingStreamSubscription$5: function(_stream, onData, onError, onDone, cancelOnError, $S, $T) {
  5086. this._subscription = this._stream._async$_source.listen$3$onDone$onError(this.get$_handleData(), this.get$_handleDone(), this.get$_handleError());
  5087. },
  5088. static: {
  5089. _ForwardingStreamSubscription$: function(_stream, onData, onError, onDone, cancelOnError, $S, $T) {
  5090. var t1, t2;
  5091. t1 = $.Zone__current;
  5092. t2 = cancelOnError ? 1 : 0;
  5093. t2 = new P._ForwardingStreamSubscription(_stream, null, null, null, null, t1, t2, null, null, [$S, $T]);
  5094. t2._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError);
  5095. t2._ForwardingStreamSubscription$5(_stream, onData, onError, onDone, cancelOnError, $S, $T);
  5096. return t2;
  5097. }
  5098. }
  5099. },
  5100. _MapStream: {
  5101. "^": "_ForwardingStream;_transform,_async$_source,$ti",
  5102. _handleData$2: function(inputEvent, sink) {
  5103. var outputEvent, e, s, exception, t1;
  5104. outputEvent = null;
  5105. try {
  5106. outputEvent = this._transform.call$1(inputEvent);
  5107. } catch (exception) {
  5108. t1 = H.unwrapException(exception);
  5109. e = t1;
  5110. s = H.getTraceFromException(exception);
  5111. P._addErrorWithReplacement(sink, e, s);
  5112. return;
  5113. }
  5114. sink._async$_add$1(outputEvent);
  5115. }
  5116. },
  5117. AsyncError: {
  5118. "^": "Object;error>,stackTrace<",
  5119. toString$0: function(_) {
  5120. return H.S(this.error);
  5121. },
  5122. $isError: 1
  5123. },
  5124. _Zone: {
  5125. "^": "Object;"
  5126. },
  5127. _rootHandleUncaughtError_closure: {
  5128. "^": "Closure:0;_box_0,stackTrace",
  5129. call$0: function() {
  5130. var t1, t2, error;
  5131. t1 = this._box_0;
  5132. t2 = t1.error;
  5133. if (t2 == null) {
  5134. error = new P.NullThrownError();
  5135. t1.error = error;
  5136. t1 = error;
  5137. } else
  5138. t1 = t2;
  5139. t2 = this.stackTrace;
  5140. if (t2 == null)
  5141. throw H.wrapException(t1);
  5142. error = H.wrapException(t1);
  5143. error.stack = J.toString$0$(t2);
  5144. throw error;
  5145. }
  5146. },
  5147. _RootZone: {
  5148. "^": "_Zone;",
  5149. runGuarded$1: function(f) {
  5150. var e, s, t1, exception;
  5151. try {
  5152. if (C.C__RootZone === $.Zone__current) {
  5153. t1 = f.call$0();
  5154. return t1;
  5155. }
  5156. t1 = P._rootRun(null, null, this, f);
  5157. return t1;
  5158. } catch (exception) {
  5159. t1 = H.unwrapException(exception);
  5160. e = t1;
  5161. s = H.getTraceFromException(exception);
  5162. return P._rootHandleUncaughtError(null, null, this, e, s);
  5163. }
  5164. },
  5165. runUnaryGuarded$2: function(f, arg) {
  5166. var e, s, t1, exception;
  5167. try {
  5168. if (C.C__RootZone === $.Zone__current) {
  5169. t1 = f.call$1(arg);
  5170. return t1;
  5171. }
  5172. t1 = P._rootRunUnary(null, null, this, f, arg);
  5173. return t1;
  5174. } catch (exception) {
  5175. t1 = H.unwrapException(exception);
  5176. e = t1;
  5177. s = H.getTraceFromException(exception);
  5178. return P._rootHandleUncaughtError(null, null, this, e, s);
  5179. }
  5180. },
  5181. runBinaryGuarded$3: function(f, arg1, arg2) {
  5182. var e, s, t1, exception;
  5183. try {
  5184. if (C.C__RootZone === $.Zone__current) {
  5185. t1 = f.call$2(arg1, arg2);
  5186. return t1;
  5187. }
  5188. t1 = P._rootRunBinary(null, null, this, f, arg1, arg2);
  5189. return t1;
  5190. } catch (exception) {
  5191. t1 = H.unwrapException(exception);
  5192. e = t1;
  5193. s = H.getTraceFromException(exception);
  5194. return P._rootHandleUncaughtError(null, null, this, e, s);
  5195. }
  5196. },
  5197. bindCallback$2$runGuarded: function(f, runGuarded) {
  5198. if (runGuarded)
  5199. return new P._RootZone_bindCallback_closure(this, f);
  5200. else
  5201. return new P._RootZone_bindCallback_closure0(this, f);
  5202. },
  5203. bindUnaryCallback$2$runGuarded: function(f, runGuarded) {
  5204. return new P._RootZone_bindUnaryCallback_closure(this, f);
  5205. },
  5206. $index: function(_, key) {
  5207. return;
  5208. },
  5209. run$1: function(f) {
  5210. if ($.Zone__current === C.C__RootZone)
  5211. return f.call$0();
  5212. return P._rootRun(null, null, this, f);
  5213. },
  5214. runUnary$2: function(f, arg) {
  5215. if ($.Zone__current === C.C__RootZone)
  5216. return f.call$1(arg);
  5217. return P._rootRunUnary(null, null, this, f, arg);
  5218. },
  5219. runBinary$3: function(f, arg1, arg2) {
  5220. if ($.Zone__current === C.C__RootZone)
  5221. return f.call$2(arg1, arg2);
  5222. return P._rootRunBinary(null, null, this, f, arg1, arg2);
  5223. }
  5224. },
  5225. _RootZone_bindCallback_closure: {
  5226. "^": "Closure:0;$this,f",
  5227. call$0: function() {
  5228. return this.$this.runGuarded$1(this.f);
  5229. }
  5230. },
  5231. _RootZone_bindCallback_closure0: {
  5232. "^": "Closure:0;$this,f",
  5233. call$0: function() {
  5234. return this.$this.run$1(this.f);
  5235. }
  5236. },
  5237. _RootZone_bindUnaryCallback_closure: {
  5238. "^": "Closure:2;$this,f",
  5239. call$1: function(arg) {
  5240. return this.$this.runUnaryGuarded$2(this.f, arg);
  5241. }
  5242. }
  5243. }], ["dart.collection", "dart:collection",, P, {
  5244. "^": "",
  5245. LinkedHashMap__makeEmpty: function() {
  5246. return new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [null, null]);
  5247. },
  5248. LinkedHashMap__makeLiteral: function(keyValuePairs) {
  5249. return H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [null, null]));
  5250. },
  5251. IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) {
  5252. var parts, t1;
  5253. if (P._isToStringVisiting(iterable)) {
  5254. if (leftDelimiter === "(" && rightDelimiter === ")")
  5255. return "(...)";
  5256. return leftDelimiter + "..." + rightDelimiter;
  5257. }
  5258. parts = [];
  5259. t1 = $.$get$_toStringVisiting();
  5260. t1.push(iterable);
  5261. try {
  5262. P._iterablePartsToStrings(iterable, parts);
  5263. } finally {
  5264. if (0 >= t1.length)
  5265. return H.ioore(t1, -1);
  5266. t1.pop();
  5267. }
  5268. t1 = P.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter;
  5269. return t1.charCodeAt(0) == 0 ? t1 : t1;
  5270. },
  5271. IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) {
  5272. var buffer, t1, t2;
  5273. if (P._isToStringVisiting(iterable))
  5274. return leftDelimiter + "..." + rightDelimiter;
  5275. buffer = new P.StringBuffer(leftDelimiter);
  5276. t1 = $.$get$_toStringVisiting();
  5277. t1.push(iterable);
  5278. try {
  5279. t2 = buffer;
  5280. t2._contents = P.StringBuffer__writeAll(t2.get$_contents(), iterable, ", ");
  5281. } finally {
  5282. if (0 >= t1.length)
  5283. return H.ioore(t1, -1);
  5284. t1.pop();
  5285. }
  5286. t1 = buffer;
  5287. t1._contents = t1.get$_contents() + rightDelimiter;
  5288. t1 = buffer.get$_contents();
  5289. return t1.charCodeAt(0) == 0 ? t1 : t1;
  5290. },
  5291. _isToStringVisiting: function(o) {
  5292. var i, t1;
  5293. for (i = 0; t1 = $.$get$_toStringVisiting(), i < t1.length; ++i)
  5294. if (o === t1[i])
  5295. return true;
  5296. return false;
  5297. },
  5298. _iterablePartsToStrings: function(iterable, parts) {
  5299. var it, $length, count, next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision;
  5300. it = iterable.get$iterator(iterable);
  5301. $length = 0;
  5302. count = 0;
  5303. while (true) {
  5304. if (!($length < 80 || count < 3))
  5305. break;
  5306. if (!it.moveNext$0())
  5307. return;
  5308. next = H.S(it.get$current());
  5309. parts.push(next);
  5310. $length += next.length + 2;
  5311. ++count;
  5312. }
  5313. if (!it.moveNext$0()) {
  5314. if (count <= 5)
  5315. return;
  5316. if (0 >= parts.length)
  5317. return H.ioore(parts, -1);
  5318. ultimateString = parts.pop();
  5319. if (0 >= parts.length)
  5320. return H.ioore(parts, -1);
  5321. penultimateString = parts.pop();
  5322. } else {
  5323. penultimate = it.get$current();
  5324. ++count;
  5325. if (!it.moveNext$0()) {
  5326. if (count <= 4) {
  5327. parts.push(H.S(penultimate));
  5328. return;
  5329. }
  5330. ultimateString = H.S(penultimate);
  5331. if (0 >= parts.length)
  5332. return H.ioore(parts, -1);
  5333. penultimateString = parts.pop();
  5334. $length += ultimateString.length + 2;
  5335. } else {
  5336. ultimate = it.get$current();
  5337. ++count;
  5338. for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) {
  5339. ultimate0 = it.get$current();
  5340. ++count;
  5341. if (count > 100) {
  5342. while (true) {
  5343. if (!($length > 75 && count > 3))
  5344. break;
  5345. if (0 >= parts.length)
  5346. return H.ioore(parts, -1);
  5347. $length -= parts.pop().length + 2;
  5348. --count;
  5349. }
  5350. parts.push("...");
  5351. return;
  5352. }
  5353. }
  5354. penultimateString = H.S(penultimate);
  5355. ultimateString = H.S(ultimate);
  5356. $length += ultimateString.length + penultimateString.length + 4;
  5357. }
  5358. }
  5359. if (count > parts.length + 2) {
  5360. $length += 5;
  5361. elision = "...";
  5362. } else
  5363. elision = null;
  5364. while (true) {
  5365. if (!($length > 80 && parts.length > 3))
  5366. break;
  5367. if (0 >= parts.length)
  5368. return H.ioore(parts, -1);
  5369. $length -= parts.pop().length + 2;
  5370. if (elision == null) {
  5371. $length += 5;
  5372. elision = "...";
  5373. }
  5374. }
  5375. if (elision != null)
  5376. parts.push(elision);
  5377. parts.push(penultimateString);
  5378. parts.push(ultimateString);
  5379. },
  5380. LinkedHashSet_LinkedHashSet: function(equals, hashCode, isValidKey, $E) {
  5381. return new P._LinkedHashSet(0, null, null, null, null, null, 0, [$E]);
  5382. },
  5383. LinkedHashSet_LinkedHashSet$from: function(elements, $E) {
  5384. var result, t1, _i;
  5385. result = P.LinkedHashSet_LinkedHashSet(null, null, null, $E);
  5386. for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, H.throwConcurrentModificationError)(elements), ++_i)
  5387. result.add$1(0, elements[_i]);
  5388. return result;
  5389. },
  5390. Maps_mapToString: function(m) {
  5391. var t1, result, t2;
  5392. t1 = {};
  5393. if (P._isToStringVisiting(m))
  5394. return "{...}";
  5395. result = new P.StringBuffer("");
  5396. try {
  5397. $.$get$_toStringVisiting().push(m);
  5398. t2 = result;
  5399. t2._contents = t2.get$_contents() + "{";
  5400. t1.first = true;
  5401. m.forEach$1(0, new P.Maps_mapToString_closure(t1, result));
  5402. t1 = result;
  5403. t1._contents = t1.get$_contents() + "}";
  5404. } finally {
  5405. t1 = $.$get$_toStringVisiting();
  5406. if (0 >= t1.length)
  5407. return H.ioore(t1, -1);
  5408. t1.pop();
  5409. }
  5410. t1 = result.get$_contents();
  5411. return t1.charCodeAt(0) == 0 ? t1 : t1;
  5412. },
  5413. _LinkedIdentityHashMap: {
  5414. "^": "JsLinkedHashMap;_length,_strings,_nums,_rest,_first,_last,_modifications,$ti",
  5415. internalComputeHashCode$1: function(key) {
  5416. return H.objectHashCode(key) & 0x3ffffff;
  5417. },
  5418. internalFindBucketIndex$2: function(bucket, key) {
  5419. var $length, i, t1;
  5420. if (bucket == null)
  5421. return -1;
  5422. $length = bucket.length;
  5423. for (i = 0; i < $length; ++i) {
  5424. t1 = bucket[i].get$hashMapCellKey();
  5425. if (t1 == null ? key == null : t1 === key)
  5426. return i;
  5427. }
  5428. return -1;
  5429. },
  5430. static: {
  5431. _LinkedIdentityHashMap__LinkedIdentityHashMap$es6: function($K, $V) {
  5432. return new P._LinkedIdentityHashMap(0, null, null, null, null, null, 0, [$K, $V]);
  5433. }
  5434. }
  5435. },
  5436. _LinkedHashSet: {
  5437. "^": "_HashSetBase;_collection$_length,_collection$_strings,_collection$_nums,_collection$_rest,_collection$_first,_collection$_last,_collection$_modifications,$ti",
  5438. get$iterator: function(_) {
  5439. var t1 = new P._LinkedHashSetIterator(this, this._collection$_modifications, null, null);
  5440. t1._collection$_cell = this._collection$_first;
  5441. return t1;
  5442. },
  5443. get$length: function(_) {
  5444. return this._collection$_length;
  5445. },
  5446. contains$1: function(_, object) {
  5447. var strings, nums;
  5448. if (typeof object === "string" && object !== "__proto__") {
  5449. strings = this._collection$_strings;
  5450. if (strings == null)
  5451. return false;
  5452. return strings[object] != null;
  5453. } else if (typeof object === "number" && (object & 0x3ffffff) === object) {
  5454. nums = this._collection$_nums;
  5455. if (nums == null)
  5456. return false;
  5457. return nums[object] != null;
  5458. } else
  5459. return this._contains$1(object);
  5460. },
  5461. _contains$1: function(object) {
  5462. var rest = this._collection$_rest;
  5463. if (rest == null)
  5464. return false;
  5465. return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0;
  5466. },
  5467. lookup$1: function(object) {
  5468. var t1;
  5469. if (!(typeof object === "string" && object !== "__proto__"))
  5470. t1 = typeof object === "number" && (object & 0x3ffffff) === object;
  5471. else
  5472. t1 = true;
  5473. if (t1)
  5474. return this.contains$1(0, object) ? object : null;
  5475. else
  5476. return this._lookup$1(object);
  5477. },
  5478. _lookup$1: function(object) {
  5479. var rest, bucket, index;
  5480. rest = this._collection$_rest;
  5481. if (rest == null)
  5482. return;
  5483. bucket = rest[this._computeHashCode$1(object)];
  5484. index = this._findBucketIndex$2(bucket, object);
  5485. if (index < 0)
  5486. return;
  5487. return J.$index$asx(bucket, index).get$_element();
  5488. },
  5489. add$1: function(_, element) {
  5490. var strings, table, nums;
  5491. if (typeof element === "string" && element !== "__proto__") {
  5492. strings = this._collection$_strings;
  5493. if (strings == null) {
  5494. table = Object.create(null);
  5495. table["<non-identifier-key>"] = table;
  5496. delete table["<non-identifier-key>"];
  5497. this._collection$_strings = table;
  5498. strings = table;
  5499. }
  5500. return this._collection$_addHashTableEntry$2(strings, element);
  5501. } else if (typeof element === "number" && (element & 0x3ffffff) === element) {
  5502. nums = this._collection$_nums;
  5503. if (nums == null) {
  5504. table = Object.create(null);
  5505. table["<non-identifier-key>"] = table;
  5506. delete table["<non-identifier-key>"];
  5507. this._collection$_nums = table;
  5508. nums = table;
  5509. }
  5510. return this._collection$_addHashTableEntry$2(nums, element);
  5511. } else
  5512. return this._add$1(element);
  5513. },
  5514. _add$1: function(element) {
  5515. var rest, hash, bucket;
  5516. rest = this._collection$_rest;
  5517. if (rest == null) {
  5518. rest = P._LinkedHashSet__newHashTable();
  5519. this._collection$_rest = rest;
  5520. }
  5521. hash = this._computeHashCode$1(element);
  5522. bucket = rest[hash];
  5523. if (bucket == null)
  5524. rest[hash] = [this._collection$_newLinkedCell$1(element)];
  5525. else {
  5526. if (this._findBucketIndex$2(bucket, element) >= 0)
  5527. return false;
  5528. bucket.push(this._collection$_newLinkedCell$1(element));
  5529. }
  5530. return true;
  5531. },
  5532. remove$1: function(_, object) {
  5533. if (typeof object === "string" && object !== "__proto__")
  5534. return this._collection$_removeHashTableEntry$2(this._collection$_strings, object);
  5535. else if (typeof object === "number" && (object & 0x3ffffff) === object)
  5536. return this._collection$_removeHashTableEntry$2(this._collection$_nums, object);
  5537. else
  5538. return this._remove$1(object);
  5539. },
  5540. _remove$1: function(object) {
  5541. var rest, bucket, index;
  5542. rest = this._collection$_rest;
  5543. if (rest == null)
  5544. return false;
  5545. bucket = rest[this._computeHashCode$1(object)];
  5546. index = this._findBucketIndex$2(bucket, object);
  5547. if (index < 0)
  5548. return false;
  5549. this._collection$_unlinkCell$1(bucket.splice(index, 1)[0]);
  5550. return true;
  5551. },
  5552. clear$0: function(_) {
  5553. if (this._collection$_length > 0) {
  5554. this._collection$_last = null;
  5555. this._collection$_first = null;
  5556. this._collection$_rest = null;
  5557. this._collection$_nums = null;
  5558. this._collection$_strings = null;
  5559. this._collection$_length = 0;
  5560. this._collection$_modifications = this._collection$_modifications + 1 & 67108863;
  5561. }
  5562. },
  5563. _collection$_addHashTableEntry$2: function(table, element) {
  5564. if (table[element] != null)
  5565. return false;
  5566. table[element] = this._collection$_newLinkedCell$1(element);
  5567. return true;
  5568. },
  5569. _collection$_removeHashTableEntry$2: function(table, element) {
  5570. var cell;
  5571. if (table == null)
  5572. return false;
  5573. cell = table[element];
  5574. if (cell == null)
  5575. return false;
  5576. this._collection$_unlinkCell$1(cell);
  5577. delete table[element];
  5578. return true;
  5579. },
  5580. _collection$_newLinkedCell$1: function(element) {
  5581. var cell, last;
  5582. cell = new P._LinkedHashSetCell(element, null, null);
  5583. if (this._collection$_first == null) {
  5584. this._collection$_last = cell;
  5585. this._collection$_first = cell;
  5586. } else {
  5587. last = this._collection$_last;
  5588. cell._collection$_previous = last;
  5589. last._collection$_next = cell;
  5590. this._collection$_last = cell;
  5591. }
  5592. ++this._collection$_length;
  5593. this._collection$_modifications = this._collection$_modifications + 1 & 67108863;
  5594. return cell;
  5595. },
  5596. _collection$_unlinkCell$1: function(cell) {
  5597. var previous, next;
  5598. previous = cell.get$_collection$_previous();
  5599. next = cell._collection$_next;
  5600. if (previous == null)
  5601. this._collection$_first = next;
  5602. else
  5603. previous._collection$_next = next;
  5604. if (next == null)
  5605. this._collection$_last = previous;
  5606. else
  5607. next._collection$_previous = previous;
  5608. --this._collection$_length;
  5609. this._collection$_modifications = this._collection$_modifications + 1 & 67108863;
  5610. },
  5611. _computeHashCode$1: function(element) {
  5612. return J.get$hashCode$(element) & 0x3ffffff;
  5613. },
  5614. _findBucketIndex$2: function(bucket, element) {
  5615. var $length, i;
  5616. if (bucket == null)
  5617. return -1;
  5618. $length = bucket.length;
  5619. for (i = 0; i < $length; ++i)
  5620. if (J.$eq$(bucket[i].get$_element(), element))
  5621. return i;
  5622. return -1;
  5623. },
  5624. $isEfficientLengthIterable: 1,
  5625. $asEfficientLengthIterable: null,
  5626. static: {
  5627. _LinkedHashSet__newHashTable: function() {
  5628. var table = Object.create(null);
  5629. table["<non-identifier-key>"] = table;
  5630. delete table["<non-identifier-key>"];
  5631. return table;
  5632. }
  5633. }
  5634. },
  5635. _LinkedHashSetCell: {
  5636. "^": "Object;_element<,_collection$_next,_collection$_previous<"
  5637. },
  5638. _LinkedHashSetIterator: {
  5639. "^": "Object;_set,_collection$_modifications,_collection$_cell,_collection$_current",
  5640. get$current: function() {
  5641. return this._collection$_current;
  5642. },
  5643. moveNext$0: function() {
  5644. var t1 = this._set;
  5645. if (this._collection$_modifications !== t1._collection$_modifications)
  5646. throw H.wrapException(new P.ConcurrentModificationError(t1));
  5647. else {
  5648. t1 = this._collection$_cell;
  5649. if (t1 == null) {
  5650. this._collection$_current = null;
  5651. return false;
  5652. } else {
  5653. this._collection$_current = t1._element;
  5654. this._collection$_cell = t1._collection$_next;
  5655. return true;
  5656. }
  5657. }
  5658. }
  5659. },
  5660. _HashSetBase: {
  5661. "^": "SetBase;$ti"
  5662. },
  5663. ListBase: {
  5664. "^": "Object_ListMixin;$ti"
  5665. },
  5666. Object_ListMixin: {
  5667. "^": "Object+ListMixin;",
  5668. $asList: null,
  5669. $asEfficientLengthIterable: null,
  5670. $isList: 1,
  5671. $isEfficientLengthIterable: 1
  5672. },
  5673. ListMixin: {
  5674. "^": "Object;$ti",
  5675. get$iterator: function(receiver) {
  5676. return new H.ListIterator(receiver, this.get$length(receiver), 0, null);
  5677. },
  5678. elementAt$1: function(receiver, index) {
  5679. return this.$index(receiver, index);
  5680. },
  5681. map$1: function(receiver, f) {
  5682. return new H.MappedListIterable(receiver, f, [null, null]);
  5683. },
  5684. toString$0: function(receiver) {
  5685. return P.IterableBase_iterableToFullString(receiver, "[", "]");
  5686. },
  5687. $isList: 1,
  5688. $asList: null,
  5689. $isEfficientLengthIterable: 1,
  5690. $asEfficientLengthIterable: null
  5691. },
  5692. Maps_mapToString_closure: {
  5693. "^": "Closure:13;_box_0,result",
  5694. call$2: function(k, v) {
  5695. var t1, t2;
  5696. t1 = this._box_0;
  5697. if (!t1.first)
  5698. this.result._contents += ", ";
  5699. t1.first = false;
  5700. t1 = this.result;
  5701. t2 = t1._contents += H.S(k);
  5702. t1._contents = t2 + ": ";
  5703. t1._contents += H.S(v);
  5704. }
  5705. },
  5706. ListQueue: {
  5707. "^": "ListIterable;_table,_head,_tail,_modificationCount,$ti",
  5708. get$iterator: function(_) {
  5709. return new P._ListQueueIterator(this, this._tail, this._modificationCount, this._head, null);
  5710. },
  5711. get$isEmpty: function(_) {
  5712. return this._head === this._tail;
  5713. },
  5714. get$length: function(_) {
  5715. return (this._tail - this._head & this._table.length - 1) >>> 0;
  5716. },
  5717. elementAt$1: function(_, index) {
  5718. var $length, t1, t2, t3;
  5719. $length = (this._tail - this._head & this._table.length - 1) >>> 0;
  5720. if (0 > index || index >= $length)
  5721. H.throwExpression(P.IndexError$(index, this, "index", null, $length));
  5722. t1 = this._table;
  5723. t2 = t1.length;
  5724. t3 = (this._head + index & t2 - 1) >>> 0;
  5725. if (t3 < 0 || t3 >= t2)
  5726. return H.ioore(t1, t3);
  5727. return t1[t3];
  5728. },
  5729. clear$0: function(_) {
  5730. var i, t1, t2, t3, t4;
  5731. i = this._head;
  5732. t1 = this._tail;
  5733. if (i !== t1) {
  5734. for (t2 = this._table, t3 = t2.length, t4 = t3 - 1; i !== t1; i = (i + 1 & t4) >>> 0) {
  5735. if (i < 0 || i >= t3)
  5736. return H.ioore(t2, i);
  5737. t2[i] = null;
  5738. }
  5739. this._tail = 0;
  5740. this._head = 0;
  5741. ++this._modificationCount;
  5742. }
  5743. },
  5744. toString$0: function(_) {
  5745. return P.IterableBase_iterableToFullString(this, "{", "}");
  5746. },
  5747. removeFirst$0: function() {
  5748. var t1, t2, t3, result;
  5749. t1 = this._head;
  5750. if (t1 === this._tail)
  5751. throw H.wrapException(H.IterableElementError_noElement());
  5752. ++this._modificationCount;
  5753. t2 = this._table;
  5754. t3 = t2.length;
  5755. if (t1 >= t3)
  5756. return H.ioore(t2, t1);
  5757. result = t2[t1];
  5758. t2[t1] = null;
  5759. this._head = (t1 + 1 & t3 - 1) >>> 0;
  5760. return result;
  5761. },
  5762. _add$1: function(element) {
  5763. var t1, t2, t3;
  5764. t1 = this._table;
  5765. t2 = this._tail;
  5766. t3 = t1.length;
  5767. if (t2 < 0 || t2 >= t3)
  5768. return H.ioore(t1, t2);
  5769. t1[t2] = element;
  5770. t3 = (t2 + 1 & t3 - 1) >>> 0;
  5771. this._tail = t3;
  5772. if (this._head === t3)
  5773. this._grow$0();
  5774. ++this._modificationCount;
  5775. },
  5776. _grow$0: function() {
  5777. var t1, newTable, t2, split;
  5778. t1 = new Array(this._table.length * 2);
  5779. t1.fixed$length = Array;
  5780. newTable = H.setRuntimeTypeInfo(t1, this.$ti);
  5781. t1 = this._table;
  5782. t2 = this._head;
  5783. split = t1.length - t2;
  5784. C.JSArray_methods.setRange$4(newTable, 0, split, t1, t2);
  5785. C.JSArray_methods.setRange$4(newTable, split, split + this._head, this._table, 0);
  5786. this._head = 0;
  5787. this._tail = this._table.length;
  5788. this._table = newTable;
  5789. },
  5790. ListQueue$1: function(initialCapacity, $E) {
  5791. var t1 = new Array(8);
  5792. t1.fixed$length = Array;
  5793. this._table = H.setRuntimeTypeInfo(t1, [$E]);
  5794. },
  5795. $asEfficientLengthIterable: null,
  5796. static: {
  5797. ListQueue$: function(initialCapacity, $E) {
  5798. var t1 = new P.ListQueue(null, 0, 0, 0, [$E]);
  5799. t1.ListQueue$1(initialCapacity, $E);
  5800. return t1;
  5801. }
  5802. }
  5803. },
  5804. _ListQueueIterator: {
  5805. "^": "Object;_queue,_end,_modificationCount,_collection$_position,_collection$_current",
  5806. get$current: function() {
  5807. return this._collection$_current;
  5808. },
  5809. moveNext$0: function() {
  5810. var t1, t2, t3;
  5811. t1 = this._queue;
  5812. if (this._modificationCount !== t1._modificationCount)
  5813. H.throwExpression(new P.ConcurrentModificationError(t1));
  5814. t2 = this._collection$_position;
  5815. if (t2 === this._end) {
  5816. this._collection$_current = null;
  5817. return false;
  5818. }
  5819. t1 = t1._table;
  5820. t3 = t1.length;
  5821. if (t2 >= t3)
  5822. return H.ioore(t1, t2);
  5823. this._collection$_current = t1[t2];
  5824. this._collection$_position = (t2 + 1 & t3 - 1) >>> 0;
  5825. return true;
  5826. }
  5827. },
  5828. SetMixin: {
  5829. "^": "Object;$ti",
  5830. addAll$1: function(_, elements) {
  5831. var t1;
  5832. for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();)
  5833. this.add$1(0, t1.get$current());
  5834. },
  5835. map$1: function(_, f) {
  5836. return new H.EfficientLengthMappedIterable(this, f, [H.getTypeArgumentByIndex(this, 0), null]);
  5837. },
  5838. toString$0: function(_) {
  5839. return P.IterableBase_iterableToFullString(this, "{", "}");
  5840. },
  5841. $isEfficientLengthIterable: 1,
  5842. $asEfficientLengthIterable: null
  5843. },
  5844. SetBase: {
  5845. "^": "SetMixin;$ti"
  5846. }
  5847. }], ["dart.core", "dart:core",, P, {
  5848. "^": "",
  5849. Error_safeToString: function(object) {
  5850. if (typeof object === "number" || typeof object === "boolean" || null == object)
  5851. return J.toString$0$(object);
  5852. if (typeof object === "string")
  5853. return JSON.stringify(object);
  5854. return P.Error__objectToString(object);
  5855. },
  5856. Error__objectToString: function(object) {
  5857. var t1 = J.getInterceptor(object);
  5858. if (!!t1.$isClosure)
  5859. return t1.toString$0(object);
  5860. return H.Primitives_objectToHumanReadableString(object);
  5861. },
  5862. Exception_Exception: function(message) {
  5863. return new P._Exception(message);
  5864. },
  5865. List_List$from: function(elements, growable, $E) {
  5866. var list, t1;
  5867. list = H.setRuntimeTypeInfo([], [$E]);
  5868. for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();)
  5869. list.push(t1.get$current());
  5870. return list;
  5871. },
  5872. print: function(object) {
  5873. var line = H.S(object);
  5874. H.printString(line);
  5875. },
  5876. bool: {
  5877. "^": "Object;"
  5878. },
  5879. "+bool": 0,
  5880. DateTime: {
  5881. "^": "Object;"
  5882. },
  5883. $double: {
  5884. "^": "num;"
  5885. },
  5886. "+double": 0,
  5887. Duration: {
  5888. "^": "Object;_duration",
  5889. $add: function(_, other) {
  5890. return new P.Duration(C.JSInt_methods.$add(this._duration, other.get$_duration()));
  5891. },
  5892. $lt: function(_, other) {
  5893. return C.JSInt_methods.$lt(this._duration, other.get$_duration());
  5894. },
  5895. $eq: function(_, other) {
  5896. if (other == null)
  5897. return false;
  5898. if (!(other instanceof P.Duration))
  5899. return false;
  5900. return this._duration === other._duration;
  5901. },
  5902. get$hashCode: function(_) {
  5903. return this._duration & 0x1FFFFFFF;
  5904. },
  5905. toString$0: function(_) {
  5906. var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs;
  5907. t1 = new P.Duration_toString_twoDigits();
  5908. t2 = this._duration;
  5909. if (t2 < 0)
  5910. return "-" + new P.Duration(-t2).toString$0(0);
  5911. twoDigitMinutes = t1.call$1(C.JSInt_methods.remainder$1(C.JSInt_methods._tdivFast$1(t2, 60000000), 60));
  5912. twoDigitSeconds = t1.call$1(C.JSInt_methods.remainder$1(C.JSInt_methods._tdivFast$1(t2, 1000000), 60));
  5913. sixDigitUs = new P.Duration_toString_sixDigits().call$1(C.JSInt_methods.remainder$1(t2, 1000000));
  5914. return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDigitMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs);
  5915. }
  5916. },
  5917. Duration_toString_sixDigits: {
  5918. "^": "Closure:4;",
  5919. call$1: function(n) {
  5920. if (n >= 100000)
  5921. return "" + n;
  5922. if (n >= 10000)
  5923. return "0" + n;
  5924. if (n >= 1000)
  5925. return "00" + n;
  5926. if (n >= 100)
  5927. return "000" + n;
  5928. if (n >= 10)
  5929. return "0000" + n;
  5930. return "00000" + n;
  5931. }
  5932. },
  5933. Duration_toString_twoDigits: {
  5934. "^": "Closure:4;",
  5935. call$1: function(n) {
  5936. if (n >= 10)
  5937. return "" + n;
  5938. return "0" + n;
  5939. }
  5940. },
  5941. Error: {
  5942. "^": "Object;",
  5943. get$stackTrace: function() {
  5944. return H.getTraceFromException(this.$thrownJsError);
  5945. }
  5946. },
  5947. NullThrownError: {
  5948. "^": "Error;",
  5949. toString$0: function(_) {
  5950. return "Throw of null.";
  5951. }
  5952. },
  5953. ArgumentError: {
  5954. "^": "Error;_hasValue,invalidValue,name,message",
  5955. get$_errorName: function() {
  5956. return "Invalid argument" + (!this._hasValue ? "(s)" : "");
  5957. },
  5958. get$_errorExplanation: function() {
  5959. return "";
  5960. },
  5961. toString$0: function(_) {
  5962. var t1, nameString, message, prefix, explanation, errorValue;
  5963. t1 = this.name;
  5964. nameString = t1 != null ? " (" + H.S(t1) + ")" : "";
  5965. t1 = this.message;
  5966. message = t1 == null ? "" : ": " + H.S(t1);
  5967. prefix = this.get$_errorName() + nameString + message;
  5968. if (!this._hasValue)
  5969. return prefix;
  5970. explanation = this.get$_errorExplanation();
  5971. errorValue = P.Error_safeToString(this.invalidValue);
  5972. return prefix + explanation + ": " + H.S(errorValue);
  5973. },
  5974. static: {
  5975. ArgumentError$: function(message) {
  5976. return new P.ArgumentError(false, null, null, message);
  5977. },
  5978. ArgumentError$value: function(value, $name, message) {
  5979. return new P.ArgumentError(true, value, $name, message);
  5980. }
  5981. }
  5982. },
  5983. RangeError: {
  5984. "^": "ArgumentError;start,end,_hasValue,invalidValue,name,message",
  5985. get$_errorName: function() {
  5986. return "RangeError";
  5987. },
  5988. get$_errorExplanation: function() {
  5989. var t1, explanation, t2;
  5990. t1 = this.start;
  5991. if (t1 == null) {
  5992. t1 = this.end;
  5993. explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : "";
  5994. } else {
  5995. t2 = this.end;
  5996. if (t2 == null)
  5997. explanation = ": Not greater than or equal to " + H.S(t1);
  5998. else {
  5999. if (typeof t2 !== "number")
  6000. return t2.$gt();
  6001. if (typeof t1 !== "number")
  6002. return H.iae(t1);
  6003. if (t2 > t1)
  6004. explanation = ": Not in range " + t1 + ".." + t2 + ", inclusive";
  6005. else
  6006. explanation = t2 < t1 ? ": Valid value range is empty" : ": Only valid value is " + t1;
  6007. }
  6008. }
  6009. return explanation;
  6010. },
  6011. static: {
  6012. RangeError$: function(message) {
  6013. return new P.RangeError(null, null, false, null, null, message);
  6014. },
  6015. RangeError$value: function(value, $name, message) {
  6016. return new P.RangeError(null, null, true, value, $name, "Value not in range");
  6017. },
  6018. RangeError$range: function(invalidValue, minValue, maxValue, $name, message) {
  6019. return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value");
  6020. },
  6021. RangeError_checkValidRange: function(start, end, $length, startName, endName, message) {
  6022. if (0 > start || start > $length)
  6023. throw H.wrapException(P.RangeError$range(start, 0, $length, "start", message));
  6024. if (start > end || end > $length)
  6025. throw H.wrapException(P.RangeError$range(end, start, $length, "end", message));
  6026. return end;
  6027. }
  6028. }
  6029. },
  6030. IndexError: {
  6031. "^": "ArgumentError;indexable,length>,_hasValue,invalidValue,name,message",
  6032. get$_errorName: function() {
  6033. return "RangeError";
  6034. },
  6035. get$_errorExplanation: function() {
  6036. if (J.$lt$n(this.invalidValue, 0))
  6037. return ": index must not be negative";
  6038. var t1 = this.length;
  6039. if (t1 === 0)
  6040. return ": no indices are valid";
  6041. return ": index should be less than " + H.S(t1);
  6042. },
  6043. static: {
  6044. IndexError$: function(invalidValue, indexable, $name, message, $length) {
  6045. var t1 = $length != null ? $length : J.get$length$asx(indexable);
  6046. return new P.IndexError(indexable, t1, true, invalidValue, $name, "Index out of range");
  6047. }
  6048. }
  6049. },
  6050. UnsupportedError: {
  6051. "^": "Error;message",
  6052. toString$0: function(_) {
  6053. return "Unsupported operation: " + this.message;
  6054. }
  6055. },
  6056. UnimplementedError: {
  6057. "^": "Error;message",
  6058. toString$0: function(_) {
  6059. var t1 = this.message;
  6060. return t1 != null ? "UnimplementedError: " + H.S(t1) : "UnimplementedError";
  6061. }
  6062. },
  6063. StateError: {
  6064. "^": "Error;message",
  6065. toString$0: function(_) {
  6066. return "Bad state: " + this.message;
  6067. }
  6068. },
  6069. ConcurrentModificationError: {
  6070. "^": "Error;modifiedObject",
  6071. toString$0: function(_) {
  6072. var t1 = this.modifiedObject;
  6073. if (t1 == null)
  6074. return "Concurrent modification during iteration.";
  6075. return "Concurrent modification during iteration: " + H.S(P.Error_safeToString(t1)) + ".";
  6076. }
  6077. },
  6078. OutOfMemoryError: {
  6079. "^": "Object;",
  6080. toString$0: function(_) {
  6081. return "Out of Memory";
  6082. },
  6083. get$stackTrace: function() {
  6084. return;
  6085. },
  6086. $isError: 1
  6087. },
  6088. StackOverflowError: {
  6089. "^": "Object;",
  6090. toString$0: function(_) {
  6091. return "Stack Overflow";
  6092. },
  6093. get$stackTrace: function() {
  6094. return;
  6095. },
  6096. $isError: 1
  6097. },
  6098. CyclicInitializationError: {
  6099. "^": "Error;variableName",
  6100. toString$0: function(_) {
  6101. return "Reading static variable '" + this.variableName + "' during its initialization";
  6102. }
  6103. },
  6104. _Exception: {
  6105. "^": "Object;message",
  6106. toString$0: function(_) {
  6107. var t1 = this.message;
  6108. if (t1 == null)
  6109. return "Exception";
  6110. return "Exception: " + H.S(t1);
  6111. }
  6112. },
  6113. Expando: {
  6114. "^": "Object;name,_jsWeakMapOrKey",
  6115. toString$0: function(_) {
  6116. return "Expando:" + H.S(this.name);
  6117. },
  6118. $index: function(_, object) {
  6119. var t1, values;
  6120. t1 = this._jsWeakMapOrKey;
  6121. if (typeof t1 !== "string") {
  6122. if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string")
  6123. H.throwExpression(P.ArgumentError$value(object, "Expandos are not allowed on strings, numbers, booleans or null", null));
  6124. return t1.get(object);
  6125. }
  6126. values = H.Primitives_getProperty(object, "expando$values");
  6127. return values == null ? null : H.Primitives_getProperty(values, t1);
  6128. },
  6129. $indexSet: function(_, object, value) {
  6130. var t1, values;
  6131. t1 = this._jsWeakMapOrKey;
  6132. if (typeof t1 !== "string")
  6133. t1.set(object, value);
  6134. else {
  6135. values = H.Primitives_getProperty(object, "expando$values");
  6136. if (values == null) {
  6137. values = new P.Object();
  6138. H.Primitives_setProperty(object, "expando$values", values);
  6139. }
  6140. H.Primitives_setProperty(values, t1, value);
  6141. }
  6142. }
  6143. },
  6144. $int: {
  6145. "^": "num;"
  6146. },
  6147. "+int": 0,
  6148. Iterable: {
  6149. "^": "Object;$ti",
  6150. map$1: function(_, f) {
  6151. return H.MappedIterable_MappedIterable(this, f, H.getRuntimeTypeArgument(this, "Iterable", 0), null);
  6152. },
  6153. where$1: ["super$Iterable$where", function(_, test) {
  6154. return new H.WhereIterable(this, test, [H.getRuntimeTypeArgument(this, "Iterable", 0)]);
  6155. }],
  6156. toList$1$growable: function(_, growable) {
  6157. return P.List_List$from(this, true, H.getRuntimeTypeArgument(this, "Iterable", 0));
  6158. },
  6159. toList$0: function($receiver) {
  6160. return this.toList$1$growable($receiver, true);
  6161. },
  6162. get$length: function(_) {
  6163. var it, count;
  6164. it = this.get$iterator(this);
  6165. for (count = 0; it.moveNext$0();)
  6166. ++count;
  6167. return count;
  6168. },
  6169. get$single: function(_) {
  6170. var it, result;
  6171. it = this.get$iterator(this);
  6172. if (!it.moveNext$0())
  6173. throw H.wrapException(H.IterableElementError_noElement());
  6174. result = it.get$current();
  6175. if (it.moveNext$0())
  6176. throw H.wrapException(H.IterableElementError_tooMany());
  6177. return result;
  6178. },
  6179. elementAt$1: function(_, index) {
  6180. var t1, elementIndex, element;
  6181. if (index < 0)
  6182. H.throwExpression(P.RangeError$range(index, 0, null, "index", null));
  6183. for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) {
  6184. element = t1.get$current();
  6185. if (index === elementIndex)
  6186. return element;
  6187. ++elementIndex;
  6188. }
  6189. throw H.wrapException(P.IndexError$(index, this, "index", null, elementIndex));
  6190. },
  6191. toString$0: function(_) {
  6192. return P.IterableBase_iterableToShortString(this, "(", ")");
  6193. }
  6194. },
  6195. Iterator: {
  6196. "^": "Object;"
  6197. },
  6198. List: {
  6199. "^": "Object;$ti",
  6200. $asList: null,
  6201. $isEfficientLengthIterable: 1,
  6202. $asEfficientLengthIterable: null
  6203. },
  6204. "+List": 0,
  6205. Null: {
  6206. "^": "Object;",
  6207. toString$0: function(_) {
  6208. return "null";
  6209. }
  6210. },
  6211. "+Null": 0,
  6212. num: {
  6213. "^": "Object;"
  6214. },
  6215. "+num": 0,
  6216. Object: {
  6217. "^": ";",
  6218. $eq: function(_, other) {
  6219. return this === other;
  6220. },
  6221. get$hashCode: function(_) {
  6222. return H.Primitives_objectHashCode(this);
  6223. },
  6224. toString$0: function(_) {
  6225. return H.Primitives_objectToHumanReadableString(this);
  6226. },
  6227. toString: function() {
  6228. return this.toString$0(this);
  6229. }
  6230. },
  6231. StackTrace: {
  6232. "^": "Object;"
  6233. },
  6234. String: {
  6235. "^": "Object;"
  6236. },
  6237. "+String": 0,
  6238. StringBuffer: {
  6239. "^": "Object;_contents<",
  6240. get$length: function(_) {
  6241. return this._contents.length;
  6242. },
  6243. toString$0: function(_) {
  6244. var t1 = this._contents;
  6245. return t1.charCodeAt(0) == 0 ? t1 : t1;
  6246. },
  6247. static: {
  6248. StringBuffer__writeAll: function(string, objects, separator) {
  6249. var iterator = J.get$iterator$ax(objects);
  6250. if (!iterator.moveNext$0())
  6251. return string;
  6252. if (separator.length === 0) {
  6253. do
  6254. string += H.S(iterator.get$current());
  6255. while (iterator.moveNext$0());
  6256. } else {
  6257. string += H.S(iterator.get$current());
  6258. for (; iterator.moveNext$0();)
  6259. string = string + separator + H.S(iterator.get$current());
  6260. }
  6261. return string;
  6262. }
  6263. }
  6264. }
  6265. }], ["dart.dom.html", "dart:html",, W, {
  6266. "^": "",
  6267. CssStyleDeclaration__camelCase: function(hyphenated) {
  6268. return hyphenated.replace(/^-ms-/, "ms-").replace(/-([\da-z])/ig, C.JS_CONST_s8I);
  6269. },
  6270. Element_Element$html: function(html, treeSanitizer, validator) {
  6271. var t1, fragment;
  6272. t1 = document.body;
  6273. fragment = (t1 && C.BodyElement_methods).createFragment$3$treeSanitizer$validator(t1, html, treeSanitizer, validator);
  6274. fragment.toString;
  6275. t1 = new H.WhereIterable(new W._ChildNodeListLazy(fragment), new W.closure(), [W.Node]);
  6276. return t1.get$single(t1);
  6277. },
  6278. Element__safeTagName: function(element) {
  6279. var result, t1, exception;
  6280. result = "element tag unavailable";
  6281. try {
  6282. t1 = J.get$tagName$x(element);
  6283. if (typeof t1 === "string")
  6284. result = element.tagName;
  6285. } catch (exception) {
  6286. H.unwrapException(exception);
  6287. }
  6288. return result;
  6289. },
  6290. _wrapZone: function(callback) {
  6291. var t1 = $.Zone__current;
  6292. if (t1 === C.C__RootZone)
  6293. return callback;
  6294. return t1.bindUnaryCallback$2$runGuarded(callback, true);
  6295. },
  6296. HtmlElement: {
  6297. "^": "Element;",
  6298. "%": "HTMLAppletElement|HTMLBRElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLImageElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMenuItemElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLOptGroupElement|HTMLOptionElement|HTMLParagraphElement|HTMLPictureElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement|HTMLTableRowElement|HTMLTableSectionElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement|PluginPlaceholderElement;HTMLElement"
  6299. },
  6300. AnchorElement: {
  6301. "^": "HtmlElement;hostname=,href},port=,protocol=",
  6302. toString$0: function(receiver) {
  6303. return String(receiver);
  6304. },
  6305. $isInterceptor: 1,
  6306. "%": "HTMLAnchorElement"
  6307. },
  6308. AreaElement: {
  6309. "^": "HtmlElement;hostname=,href},port=,protocol=",
  6310. toString$0: function(receiver) {
  6311. return String(receiver);
  6312. },
  6313. $isInterceptor: 1,
  6314. "%": "HTMLAreaElement"
  6315. },
  6316. BaseElement: {
  6317. "^": "HtmlElement;href}",
  6318. "%": "HTMLBaseElement"
  6319. },
  6320. BodyElement: {
  6321. "^": "HtmlElement;",
  6322. $isBodyElement: 1,
  6323. $isInterceptor: 1,
  6324. "%": "HTMLBodyElement"
  6325. },
  6326. ButtonElement: {
  6327. "^": "HtmlElement;name=",
  6328. "%": "HTMLButtonElement"
  6329. },
  6330. CharacterData: {
  6331. "^": "Node;length=",
  6332. $isInterceptor: 1,
  6333. "%": "CDATASection|CharacterData|Comment|ProcessingInstruction|Text"
  6334. },
  6335. CssFontFaceRule: {
  6336. "^": "CssRule;style=",
  6337. "%": "CSSFontFaceRule"
  6338. },
  6339. CssKeyframeRule: {
  6340. "^": "CssRule;style=",
  6341. "%": "CSSKeyframeRule|MozCSSKeyframeRule|WebKitCSSKeyframeRule"
  6342. },
  6343. CssPageRule: {
  6344. "^": "CssRule;style=",
  6345. "%": "CSSPageRule"
  6346. },
  6347. CssRule: {
  6348. "^": "Interceptor;",
  6349. $isObject: 1,
  6350. "%": "CSSCharsetRule|CSSGroupingRule|CSSImportRule|CSSKeyframesRule|CSSMediaRule|CSSSupportsRule|MozCSSKeyframesRule|WebKitCSSKeyframesRule;CSSRule"
  6351. },
  6352. CssStyleDeclaration: {
  6353. "^": "Interceptor_CssStyleDeclarationBase;length=",
  6354. getPropertyValue$1: function(receiver, propertyName) {
  6355. var propValue = this._getPropertyValueHelper$1(receiver, propertyName);
  6356. return propValue != null ? propValue : "";
  6357. },
  6358. _getPropertyValueHelper$1: function(receiver, propertyName) {
  6359. if (W.CssStyleDeclaration__camelCase(propertyName) in receiver)
  6360. return receiver.getPropertyValue(propertyName);
  6361. else
  6362. return receiver.getPropertyValue(P.Device_cssPrefix() + propertyName);
  6363. },
  6364. _browserPropertyName$1: function(receiver, propertyName) {
  6365. var t1, $name;
  6366. t1 = $.$get$CssStyleDeclaration__propertyCache();
  6367. $name = t1[propertyName];
  6368. if (typeof $name === "string")
  6369. return $name;
  6370. $name = W.CssStyleDeclaration__camelCase(propertyName) in receiver ? propertyName : P.Device_cssPrefix() + propertyName;
  6371. t1[propertyName] = $name;
  6372. return $name;
  6373. },
  6374. _setPropertyHelper$3: function(receiver, propertyName, value, priority) {
  6375. receiver.setProperty(propertyName, value, priority);
  6376. },
  6377. "%": "CSS2Properties|CSSStyleDeclaration|MSStyleCSSProperties"
  6378. },
  6379. Interceptor_CssStyleDeclarationBase: {
  6380. "^": "Interceptor+CssStyleDeclarationBase;"
  6381. },
  6382. CssStyleDeclarationBase: {
  6383. "^": "Object;",
  6384. get$page: function(receiver) {
  6385. return this.getPropertyValue$1(receiver, "page");
  6386. }
  6387. },
  6388. CssStyleRule: {
  6389. "^": "CssRule;style=",
  6390. "%": "CSSStyleRule"
  6391. },
  6392. CssStyleSheet: {
  6393. "^": "StyleSheet;cssRules=",
  6394. "%": "CSSStyleSheet"
  6395. },
  6396. CssViewportRule: {
  6397. "^": "CssRule;style=",
  6398. "%": "CSSViewportRule"
  6399. },
  6400. DocumentFragment: {
  6401. "^": "Node;",
  6402. $isInterceptor: 1,
  6403. "%": "DocumentFragment|ShadowRoot"
  6404. },
  6405. DomException: {
  6406. "^": "Interceptor;",
  6407. toString$0: function(receiver) {
  6408. return String(receiver);
  6409. },
  6410. "%": "DOMException"
  6411. },
  6412. Element: {
  6413. "^": "Node;style=,tagName=",
  6414. get$attributes: function(receiver) {
  6415. return new W._ElementAttributeMap(receiver);
  6416. },
  6417. toString$0: function(receiver) {
  6418. return receiver.localName;
  6419. },
  6420. createFragment$3$treeSanitizer$validator: function(receiver, html, treeSanitizer, validator) {
  6421. var t1, t2, base, contextElement, fragment;
  6422. if (treeSanitizer == null) {
  6423. t1 = $.Element__defaultValidator;
  6424. if (t1 == null) {
  6425. t1 = H.setRuntimeTypeInfo([], [W.NodeValidator]);
  6426. t2 = new W.NodeValidatorBuilder(t1);
  6427. t1.push(W._Html5NodeValidator$(null));
  6428. t1.push(W._TemplatingNodeValidator$());
  6429. $.Element__defaultValidator = t2;
  6430. validator = t2;
  6431. } else
  6432. validator = t1;
  6433. t1 = $.Element__defaultSanitizer;
  6434. if (t1 == null) {
  6435. t1 = new W._ValidatingTreeSanitizer(validator);
  6436. $.Element__defaultSanitizer = t1;
  6437. treeSanitizer = t1;
  6438. } else {
  6439. t1.validator = validator;
  6440. treeSanitizer = t1;
  6441. }
  6442. }
  6443. if ($.Element__parseDocument == null) {
  6444. t1 = document;
  6445. t2 = t1.implementation.createHTMLDocument("");
  6446. $.Element__parseDocument = t2;
  6447. $.Element__parseRange = t2.createRange();
  6448. t2 = $.Element__parseDocument;
  6449. t2.toString;
  6450. base = t2.createElement("base");
  6451. J.set$href$x(base, t1.baseURI);
  6452. $.Element__parseDocument.head.appendChild(base);
  6453. }
  6454. t1 = $.Element__parseDocument;
  6455. if (!!this.$isBodyElement)
  6456. contextElement = t1.body;
  6457. else {
  6458. t2 = receiver.tagName;
  6459. t1.toString;
  6460. contextElement = t1.createElement(t2);
  6461. $.Element__parseDocument.body.appendChild(contextElement);
  6462. }
  6463. if ("createContextualFragment" in window.Range.prototype && !C.JSArray_methods.contains$1(C.List_ego, receiver.tagName)) {
  6464. $.Element__parseRange.selectNodeContents(contextElement);
  6465. fragment = $.Element__parseRange.createContextualFragment(html);
  6466. } else {
  6467. contextElement.innerHTML = html;
  6468. fragment = $.Element__parseDocument.createDocumentFragment();
  6469. for (; t1 = contextElement.firstChild, t1 != null;)
  6470. fragment.appendChild(t1);
  6471. }
  6472. t1 = $.Element__parseDocument.body;
  6473. if (contextElement == null ? t1 != null : contextElement !== t1)
  6474. J.remove$0$ax(contextElement);
  6475. treeSanitizer.sanitizeTree$1(fragment);
  6476. document.adoptNode(fragment);
  6477. return fragment;
  6478. },
  6479. $isElement: 1,
  6480. $isNode: 1,
  6481. $isObject: 1,
  6482. $isInterceptor: 1,
  6483. "%": ";Element"
  6484. },
  6485. closure: {
  6486. "^": "Closure:2;",
  6487. call$1: function(e) {
  6488. return !!J.getInterceptor(e).$isElement;
  6489. }
  6490. },
  6491. EmbedElement: {
  6492. "^": "HtmlElement;name=",
  6493. "%": "HTMLEmbedElement"
  6494. },
  6495. ErrorEvent: {
  6496. "^": "Event;error=",
  6497. "%": "ErrorEvent"
  6498. },
  6499. Event: {
  6500. "^": "Interceptor;",
  6501. "%": "AnimationEvent|AnimationPlayerEvent|ApplicationCacheErrorEvent|AudioProcessingEvent|AutocompleteErrorEvent|BeforeInstallPromptEvent|BeforeUnloadEvent|ClipboardEvent|CloseEvent|CrossOriginConnectEvent|CustomEvent|DefaultSessionStartEvent|DeviceLightEvent|DeviceMotionEvent|DeviceOrientationEvent|ExtendableEvent|FetchEvent|FontFaceSetLoadEvent|GamepadEvent|GeofencingEvent|HashChangeEvent|IDBVersionChangeEvent|MIDIConnectionEvent|MIDIMessageEvent|MediaEncryptedEvent|MediaKeyEvent|MediaKeyMessageEvent|MediaQueryListEvent|MediaStreamEvent|MediaStreamTrackEvent|MessageEvent|NotificationEvent|OfflineAudioCompletionEvent|PageTransitionEvent|PeriodicSyncEvent|PopStateEvent|ProgressEvent|PromiseRejectionEvent|PushEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|RTCPeerConnectionIceEvent|RelatedEvent|ResourceProgressEvent|SecurityPolicyViolationEvent|ServicePortConnectEvent|ServiceWorkerMessageEvent|SpeechRecognitionEvent|SpeechSynthesisEvent|StorageEvent|SyncEvent|TrackEvent|TransitionEvent|WebGLContextEvent|WebKitTransitionEvent|XMLHttpRequestProgressEvent;Event|InputEvent"
  6502. },
  6503. EventTarget: {
  6504. "^": "Interceptor;",
  6505. _addEventListener$3: function(receiver, type, listener, capture) {
  6506. return receiver.addEventListener(type, H.convertDartClosureToJS(listener, 1), false);
  6507. },
  6508. _removeEventListener$3: function(receiver, type, listener, capture) {
  6509. return receiver.removeEventListener(type, H.convertDartClosureToJS(listener, 1), false);
  6510. },
  6511. "%": "MediaStream;EventTarget"
  6512. },
  6513. FieldSetElement: {
  6514. "^": "HtmlElement;name=",
  6515. "%": "HTMLFieldSetElement"
  6516. },
  6517. FormElement: {
  6518. "^": "HtmlElement;length=,name=",
  6519. "%": "HTMLFormElement"
  6520. },
  6521. IFrameElement: {
  6522. "^": "HtmlElement;name=",
  6523. "%": "HTMLIFrameElement"
  6524. },
  6525. InputElement: {
  6526. "^": "HtmlElement;name=",
  6527. $isElement: 1,
  6528. $isInterceptor: 1,
  6529. "%": "HTMLInputElement"
  6530. },
  6531. KeyboardEvent: {
  6532. "^": "UIEvent;",
  6533. get$keyCode: function(receiver) {
  6534. return receiver.keyCode;
  6535. },
  6536. "%": "KeyboardEvent"
  6537. },
  6538. KeygenElement: {
  6539. "^": "HtmlElement;name=",
  6540. "%": "HTMLKeygenElement"
  6541. },
  6542. LinkElement: {
  6543. "^": "HtmlElement;href},sheet=",
  6544. "%": "HTMLLinkElement"
  6545. },
  6546. Location: {
  6547. "^": "Interceptor;",
  6548. toString$0: function(receiver) {
  6549. return String(receiver);
  6550. },
  6551. "%": "Location"
  6552. },
  6553. MapElement: {
  6554. "^": "HtmlElement;name=",
  6555. "%": "HTMLMapElement"
  6556. },
  6557. MediaElement: {
  6558. "^": "HtmlElement;error=",
  6559. "%": "HTMLAudioElement|HTMLMediaElement|HTMLVideoElement"
  6560. },
  6561. MetaElement: {
  6562. "^": "HtmlElement;name=",
  6563. "%": "HTMLMetaElement"
  6564. },
  6565. MidiOutput: {
  6566. "^": "MidiPort;",
  6567. send$2: function(receiver, data, timestamp) {
  6568. return receiver.send(data, timestamp);
  6569. },
  6570. send$1: function($receiver, data) {
  6571. return $receiver.send(data);
  6572. },
  6573. "%": "MIDIOutput"
  6574. },
  6575. MidiPort: {
  6576. "^": "EventTarget;",
  6577. "%": "MIDIInput;MIDIPort"
  6578. },
  6579. MouseEvent: {
  6580. "^": "UIEvent;",
  6581. get$page: function(receiver) {
  6582. return new P.Point(receiver.pageX, receiver.pageY, [null]);
  6583. },
  6584. $isMouseEvent: 1,
  6585. $isObject: 1,
  6586. "%": "DragEvent|MouseEvent|PointerEvent|WheelEvent"
  6587. },
  6588. Navigator: {
  6589. "^": "Interceptor;",
  6590. $isInterceptor: 1,
  6591. "%": "Navigator"
  6592. },
  6593. _ChildNodeListLazy: {
  6594. "^": "ListBase;_this",
  6595. $indexSet: function(_, index, value) {
  6596. var t1, t2;
  6597. t1 = this._this;
  6598. t2 = t1.childNodes;
  6599. if (index >>> 0 !== index || index >= t2.length)
  6600. return H.ioore(t2, index);
  6601. t1.replaceChild(value, t2[index]);
  6602. },
  6603. get$iterator: function(_) {
  6604. var t1 = this._this.childNodes;
  6605. return new W.FixedSizeListIterator(t1, t1.length, -1, null);
  6606. },
  6607. get$length: function(_) {
  6608. return this._this.childNodes.length;
  6609. },
  6610. $index: function(_, index) {
  6611. var t1 = this._this.childNodes;
  6612. if (index >>> 0 !== index || index >= t1.length)
  6613. return H.ioore(t1, index);
  6614. return t1[index];
  6615. },
  6616. $asListBase: function() {
  6617. return [W.Node];
  6618. },
  6619. $asList: function() {
  6620. return [W.Node];
  6621. },
  6622. $asEfficientLengthIterable: function() {
  6623. return [W.Node];
  6624. }
  6625. },
  6626. Node: {
  6627. "^": "EventTarget;parentNode=,previousNode:previousSibling=",
  6628. remove$0: function(receiver) {
  6629. var t1 = receiver.parentNode;
  6630. if (t1 != null)
  6631. t1.removeChild(receiver);
  6632. },
  6633. toString$0: function(receiver) {
  6634. var value = receiver.nodeValue;
  6635. return value == null ? this.super$Interceptor$toString(receiver) : value;
  6636. },
  6637. $isNode: 1,
  6638. $isObject: 1,
  6639. "%": "Document|HTMLDocument|XMLDocument;Node"
  6640. },
  6641. NodeList: {
  6642. "^": "Interceptor_ListMixin_ImmutableListMixin;",
  6643. get$length: function(receiver) {
  6644. return receiver.length;
  6645. },
  6646. $index: function(receiver, index) {
  6647. if (index >>> 0 !== index || index >= receiver.length)
  6648. throw H.wrapException(P.IndexError$(index, receiver, null, null, null));
  6649. return receiver[index];
  6650. },
  6651. $indexSet: function(receiver, index, value) {
  6652. throw H.wrapException(new P.UnsupportedError("Cannot assign element of immutable List."));
  6653. },
  6654. elementAt$1: function(receiver, index) {
  6655. if (index < 0 || index >= receiver.length)
  6656. return H.ioore(receiver, index);
  6657. return receiver[index];
  6658. },
  6659. $isList: 1,
  6660. $asList: function() {
  6661. return [W.Node];
  6662. },
  6663. $isEfficientLengthIterable: 1,
  6664. $asEfficientLengthIterable: function() {
  6665. return [W.Node];
  6666. },
  6667. $isJavaScriptIndexingBehavior: 1,
  6668. $asJavaScriptIndexingBehavior: function() {
  6669. return [W.Node];
  6670. },
  6671. $isJSIndexable: 1,
  6672. $asJSIndexable: function() {
  6673. return [W.Node];
  6674. },
  6675. "%": "NodeList|RadioNodeList"
  6676. },
  6677. Interceptor_ListMixin: {
  6678. "^": "Interceptor+ListMixin;",
  6679. $asList: function() {
  6680. return [W.Node];
  6681. },
  6682. $asEfficientLengthIterable: function() {
  6683. return [W.Node];
  6684. },
  6685. $isList: 1,
  6686. $isEfficientLengthIterable: 1
  6687. },
  6688. Interceptor_ListMixin_ImmutableListMixin: {
  6689. "^": "Interceptor_ListMixin+ImmutableListMixin;",
  6690. $asList: function() {
  6691. return [W.Node];
  6692. },
  6693. $asEfficientLengthIterable: function() {
  6694. return [W.Node];
  6695. },
  6696. $isList: 1,
  6697. $isEfficientLengthIterable: 1
  6698. },
  6699. ObjectElement: {
  6700. "^": "HtmlElement;name=",
  6701. "%": "HTMLObjectElement"
  6702. },
  6703. OutputElement: {
  6704. "^": "HtmlElement;name=",
  6705. "%": "HTMLOutputElement"
  6706. },
  6707. ParamElement: {
  6708. "^": "HtmlElement;name=",
  6709. "%": "HTMLParamElement"
  6710. },
  6711. SelectElement: {
  6712. "^": "HtmlElement;length=,name=",
  6713. "%": "HTMLSelectElement"
  6714. },
  6715. SpeechRecognitionError: {
  6716. "^": "Event;error=",
  6717. "%": "SpeechRecognitionError"
  6718. },
  6719. StyleElement: {
  6720. "^": "HtmlElement;sheet=",
  6721. "%": "HTMLStyleElement"
  6722. },
  6723. StyleSheet: {
  6724. "^": "Interceptor;",
  6725. "%": ";StyleSheet"
  6726. },
  6727. TemplateElement: {
  6728. "^": "HtmlElement;",
  6729. $isTemplateElement: 1,
  6730. "%": "HTMLTemplateElement"
  6731. },
  6732. TextAreaElement: {
  6733. "^": "HtmlElement;name=",
  6734. "%": "HTMLTextAreaElement"
  6735. },
  6736. UIEvent: {
  6737. "^": "Event;",
  6738. "%": "CompositionEvent|FocusEvent|SVGZoomEvent|TextEvent|TouchEvent;UIEvent"
  6739. },
  6740. Window: {
  6741. "^": "EventTarget;",
  6742. $isInterceptor: 1,
  6743. "%": "DOMWindow|Window"
  6744. },
  6745. _Attr: {
  6746. "^": "Node;name=",
  6747. "%": "Attr"
  6748. },
  6749. _CssRuleList: {
  6750. "^": "Interceptor_ListMixin_ImmutableListMixin0;",
  6751. get$length: function(receiver) {
  6752. return receiver.length;
  6753. },
  6754. $index: function(receiver, index) {
  6755. if (index >>> 0 !== index || index >= receiver.length)
  6756. throw H.wrapException(P.IndexError$(index, receiver, null, null, null));
  6757. return receiver[index];
  6758. },
  6759. $indexSet: function(receiver, index, value) {
  6760. throw H.wrapException(new P.UnsupportedError("Cannot assign element of immutable List."));
  6761. },
  6762. elementAt$1: function(receiver, index) {
  6763. if (index < 0 || index >= receiver.length)
  6764. return H.ioore(receiver, index);
  6765. return receiver[index];
  6766. },
  6767. $isList: 1,
  6768. $asList: function() {
  6769. return [W.CssRule];
  6770. },
  6771. $isEfficientLengthIterable: 1,
  6772. $asEfficientLengthIterable: function() {
  6773. return [W.CssRule];
  6774. },
  6775. $isJavaScriptIndexingBehavior: 1,
  6776. $asJavaScriptIndexingBehavior: function() {
  6777. return [W.CssRule];
  6778. },
  6779. $isJSIndexable: 1,
  6780. $asJSIndexable: function() {
  6781. return [W.CssRule];
  6782. },
  6783. "%": "CSSRuleList"
  6784. },
  6785. Interceptor_ListMixin0: {
  6786. "^": "Interceptor+ListMixin;",
  6787. $asList: function() {
  6788. return [W.CssRule];
  6789. },
  6790. $asEfficientLengthIterable: function() {
  6791. return [W.CssRule];
  6792. },
  6793. $isList: 1,
  6794. $isEfficientLengthIterable: 1
  6795. },
  6796. Interceptor_ListMixin_ImmutableListMixin0: {
  6797. "^": "Interceptor_ListMixin0+ImmutableListMixin;",
  6798. $asList: function() {
  6799. return [W.CssRule];
  6800. },
  6801. $asEfficientLengthIterable: function() {
  6802. return [W.CssRule];
  6803. },
  6804. $isList: 1,
  6805. $isEfficientLengthIterable: 1
  6806. },
  6807. _DocumentType: {
  6808. "^": "Node;",
  6809. $isInterceptor: 1,
  6810. "%": "DocumentType"
  6811. },
  6812. _HTMLFrameSetElement: {
  6813. "^": "HtmlElement;",
  6814. $isInterceptor: 1,
  6815. "%": "HTMLFrameSetElement"
  6816. },
  6817. _NamedNodeMap: {
  6818. "^": "Interceptor_ListMixin_ImmutableListMixin1;",
  6819. get$length: function(receiver) {
  6820. return receiver.length;
  6821. },
  6822. $index: function(receiver, index) {
  6823. if (index >>> 0 !== index || index >= receiver.length)
  6824. throw H.wrapException(P.IndexError$(index, receiver, null, null, null));
  6825. return receiver[index];
  6826. },
  6827. $indexSet: function(receiver, index, value) {
  6828. throw H.wrapException(new P.UnsupportedError("Cannot assign element of immutable List."));
  6829. },
  6830. elementAt$1: function(receiver, index) {
  6831. if (index < 0 || index >= receiver.length)
  6832. return H.ioore(receiver, index);
  6833. return receiver[index];
  6834. },
  6835. $isList: 1,
  6836. $asList: function() {
  6837. return [W.Node];
  6838. },
  6839. $isEfficientLengthIterable: 1,
  6840. $asEfficientLengthIterable: function() {
  6841. return [W.Node];
  6842. },
  6843. $isJavaScriptIndexingBehavior: 1,
  6844. $asJavaScriptIndexingBehavior: function() {
  6845. return [W.Node];
  6846. },
  6847. $isJSIndexable: 1,
  6848. $asJSIndexable: function() {
  6849. return [W.Node];
  6850. },
  6851. "%": "MozNamedAttrMap|NamedNodeMap"
  6852. },
  6853. Interceptor_ListMixin1: {
  6854. "^": "Interceptor+ListMixin;",
  6855. $asList: function() {
  6856. return [W.Node];
  6857. },
  6858. $asEfficientLengthIterable: function() {
  6859. return [W.Node];
  6860. },
  6861. $isList: 1,
  6862. $isEfficientLengthIterable: 1
  6863. },
  6864. Interceptor_ListMixin_ImmutableListMixin1: {
  6865. "^": "Interceptor_ListMixin1+ImmutableListMixin;",
  6866. $asList: function() {
  6867. return [W.Node];
  6868. },
  6869. $asEfficientLengthIterable: function() {
  6870. return [W.Node];
  6871. },
  6872. $isList: 1,
  6873. $isEfficientLengthIterable: 1
  6874. },
  6875. _AttributeMap: {
  6876. "^": "Object;_html$_element<",
  6877. get$keys: function() {
  6878. var attributes, keys, len, i, attr;
  6879. attributes = this._html$_element.attributes;
  6880. keys = H.setRuntimeTypeInfo([], [P.String]);
  6881. for (len = attributes.length, i = 0; i < len; ++i) {
  6882. if (i >= attributes.length)
  6883. return H.ioore(attributes, i);
  6884. attr = attributes[i];
  6885. if (attr.namespaceURI == null)
  6886. keys.push(J.get$name$x(attr));
  6887. }
  6888. return keys;
  6889. }
  6890. },
  6891. _ElementAttributeMap: {
  6892. "^": "_AttributeMap;_html$_element",
  6893. $index: function(_, key) {
  6894. return this._html$_element.getAttribute(key);
  6895. },
  6896. $indexSet: function(_, key, value) {
  6897. this._html$_element.setAttribute(key, value);
  6898. },
  6899. get$length: function(_) {
  6900. return this.get$keys().length;
  6901. }
  6902. },
  6903. _EventStream: {
  6904. "^": "Stream;_html$_target,_eventType,_useCapture,$ti",
  6905. listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
  6906. var t1 = new W._EventStreamSubscription(0, this._html$_target, this._eventType, W._wrapZone(onData), false, this.$ti);
  6907. t1._tryResume$0();
  6908. return t1;
  6909. },
  6910. listen$3$onDone$onError: function(onData, onDone, onError) {
  6911. return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
  6912. }
  6913. },
  6914. _EventStreamSubscription: {
  6915. "^": "StreamSubscription;_pauseCount,_html$_target,_eventType,_onData,_useCapture,$ti",
  6916. cancel$0: function() {
  6917. if (this._html$_target == null)
  6918. return;
  6919. this._unlisten$0();
  6920. this._html$_target = null;
  6921. this._onData = null;
  6922. return;
  6923. },
  6924. pause$1: function(_, resumeSignal) {
  6925. if (this._html$_target == null)
  6926. return;
  6927. ++this._pauseCount;
  6928. this._unlisten$0();
  6929. },
  6930. pause$0: function($receiver) {
  6931. return this.pause$1($receiver, null);
  6932. },
  6933. resume$0: function() {
  6934. if (this._html$_target == null || this._pauseCount <= 0)
  6935. return;
  6936. --this._pauseCount;
  6937. this._tryResume$0();
  6938. },
  6939. _tryResume$0: function() {
  6940. var t1, t2, t3;
  6941. t1 = this._onData;
  6942. t2 = t1 != null;
  6943. if (t2 && this._pauseCount <= 0) {
  6944. t3 = this._html$_target;
  6945. t3.toString;
  6946. if (t2)
  6947. J._addEventListener$3$x(t3, this._eventType, t1, false);
  6948. }
  6949. },
  6950. _unlisten$0: function() {
  6951. var t1, t2, t3;
  6952. t1 = this._onData;
  6953. t2 = t1 != null;
  6954. if (t2) {
  6955. t3 = this._html$_target;
  6956. t3.toString;
  6957. if (t2)
  6958. J._removeEventListener$3$x(t3, this._eventType, t1, false);
  6959. }
  6960. }
  6961. },
  6962. _Html5NodeValidator: {
  6963. "^": "Object;uriPolicy<",
  6964. allowsElement$1: function(element) {
  6965. return $.$get$_Html5NodeValidator__allowedElements().contains$1(0, W.Element__safeTagName(element));
  6966. },
  6967. allowsAttribute$3: function(element, attributeName, value) {
  6968. var tagName, t1, validator;
  6969. tagName = W.Element__safeTagName(element);
  6970. t1 = $.$get$_Html5NodeValidator__attributeValidators();
  6971. validator = t1.$index(0, H.S(tagName) + "::" + attributeName);
  6972. if (validator == null)
  6973. validator = t1.$index(0, "*::" + attributeName);
  6974. if (validator == null)
  6975. return false;
  6976. return validator.call$4(element, attributeName, value, this);
  6977. },
  6978. _Html5NodeValidator$1$uriPolicy: function(uriPolicy) {
  6979. var t1, _i;
  6980. t1 = $.$get$_Html5NodeValidator__attributeValidators();
  6981. if (t1.get$isEmpty(t1)) {
  6982. for (_i = 0; _i < 262; ++_i)
  6983. t1.$indexSet(0, C.List_2Zi[_i], W.html__Html5NodeValidator__standardAttributeValidator$closure());
  6984. for (_i = 0; _i < 12; ++_i)
  6985. t1.$indexSet(0, C.List_yrN[_i], W.html__Html5NodeValidator__uriAttributeValidator$closure());
  6986. }
  6987. },
  6988. $isNodeValidator: 1,
  6989. static: {
  6990. _Html5NodeValidator$: function(uriPolicy) {
  6991. var t1, e;
  6992. t1 = document;
  6993. e = t1.createElement("a");
  6994. t1 = new W._SameOriginUriPolicy(e, window.location);
  6995. t1 = new W._Html5NodeValidator(t1);
  6996. t1._Html5NodeValidator$1$uriPolicy(uriPolicy);
  6997. return t1;
  6998. },
  6999. _Html5NodeValidator__standardAttributeValidator: [function(element, attributeName, value, context) {
  7000. return true;
  7001. }, "call$4", "html__Html5NodeValidator__standardAttributeValidator$closure", 8, 0, 6],
  7002. _Html5NodeValidator__uriAttributeValidator: [function(element, attributeName, value, context) {
  7003. var t1, t2, t3, t4, t5;
  7004. t1 = context.get$uriPolicy();
  7005. t2 = t1._hiddenAnchor;
  7006. t3 = J.getInterceptor$x(t2);
  7007. t3.set$href(t2, value);
  7008. t4 = t3.get$hostname(t2);
  7009. t1 = t1._loc;
  7010. t5 = t1.hostname;
  7011. if (t4 == null ? t5 == null : t4 === t5) {
  7012. t4 = t3.get$port(t2);
  7013. t5 = t1.port;
  7014. if (t4 == null ? t5 == null : t4 === t5) {
  7015. t4 = t3.get$protocol(t2);
  7016. t1 = t1.protocol;
  7017. t1 = t4 == null ? t1 == null : t4 === t1;
  7018. } else
  7019. t1 = false;
  7020. } else
  7021. t1 = false;
  7022. if (!t1)
  7023. if (t3.get$hostname(t2) === "")
  7024. if (t3.get$port(t2) === "")
  7025. t1 = t3.get$protocol(t2) === ":" || t3.get$protocol(t2) === "";
  7026. else
  7027. t1 = false;
  7028. else
  7029. t1 = false;
  7030. else
  7031. t1 = true;
  7032. return t1;
  7033. }, "call$4", "html__Html5NodeValidator__uriAttributeValidator$closure", 8, 0, 6]
  7034. }
  7035. },
  7036. ImmutableListMixin: {
  7037. "^": "Object;$ti",
  7038. get$iterator: function(receiver) {
  7039. return new W.FixedSizeListIterator(receiver, this.get$length(receiver), -1, null);
  7040. },
  7041. $isList: 1,
  7042. $asList: null,
  7043. $isEfficientLengthIterable: 1,
  7044. $asEfficientLengthIterable: null
  7045. },
  7046. NodeValidatorBuilder: {
  7047. "^": "Object;_validators",
  7048. allowsElement$1: function(element) {
  7049. return C.JSArray_methods.any$1(this._validators, new W.NodeValidatorBuilder_allowsElement_closure(element));
  7050. },
  7051. allowsAttribute$3: function(element, attributeName, value) {
  7052. return C.JSArray_methods.any$1(this._validators, new W.NodeValidatorBuilder_allowsAttribute_closure(element, attributeName, value));
  7053. }
  7054. },
  7055. NodeValidatorBuilder_allowsElement_closure: {
  7056. "^": "Closure:2;element",
  7057. call$1: function(v) {
  7058. return v.allowsElement$1(this.element);
  7059. }
  7060. },
  7061. NodeValidatorBuilder_allowsAttribute_closure: {
  7062. "^": "Closure:2;element,attributeName,value",
  7063. call$1: function(v) {
  7064. return v.allowsAttribute$3(this.element, this.attributeName, this.value);
  7065. }
  7066. },
  7067. _SimpleNodeValidator: {
  7068. "^": "Object;uriPolicy<",
  7069. allowsElement$1: function(element) {
  7070. return this.allowedElements.contains$1(0, W.Element__safeTagName(element));
  7071. },
  7072. allowsAttribute$3: ["super$_SimpleNodeValidator$allowsAttribute", function(element, attributeName, value) {
  7073. var tagName, t1;
  7074. tagName = W.Element__safeTagName(element);
  7075. t1 = this.allowedUriAttributes;
  7076. if (t1.contains$1(0, H.S(tagName) + "::" + attributeName))
  7077. return this.uriPolicy.allowsUri$1(value);
  7078. else if (t1.contains$1(0, "*::" + attributeName))
  7079. return this.uriPolicy.allowsUri$1(value);
  7080. else {
  7081. t1 = this.allowedAttributes;
  7082. if (t1.contains$1(0, H.S(tagName) + "::" + attributeName))
  7083. return true;
  7084. else if (t1.contains$1(0, "*::" + attributeName))
  7085. return true;
  7086. else if (t1.contains$1(0, H.S(tagName) + "::*"))
  7087. return true;
  7088. else if (t1.contains$1(0, "*::*"))
  7089. return true;
  7090. }
  7091. return false;
  7092. }],
  7093. _SimpleNodeValidator$4$allowedAttributes$allowedElements$allowedUriAttributes: function(uriPolicy, allowedAttributes, allowedElements, allowedUriAttributes) {
  7094. var legalAttributes, extraUriAttributes, t1;
  7095. this.allowedElements.addAll$1(0, allowedElements);
  7096. legalAttributes = allowedAttributes.where$1(0, new W._SimpleNodeValidator_closure());
  7097. extraUriAttributes = allowedAttributes.where$1(0, new W._SimpleNodeValidator_closure0());
  7098. this.allowedAttributes.addAll$1(0, legalAttributes);
  7099. t1 = this.allowedUriAttributes;
  7100. t1.addAll$1(0, C.List_empty);
  7101. t1.addAll$1(0, extraUriAttributes);
  7102. }
  7103. },
  7104. _SimpleNodeValidator_closure: {
  7105. "^": "Closure:2;",
  7106. call$1: function(x) {
  7107. return !C.JSArray_methods.contains$1(C.List_yrN, x);
  7108. }
  7109. },
  7110. _SimpleNodeValidator_closure0: {
  7111. "^": "Closure:2;",
  7112. call$1: function(x) {
  7113. return C.JSArray_methods.contains$1(C.List_yrN, x);
  7114. }
  7115. },
  7116. _TemplatingNodeValidator: {
  7117. "^": "_SimpleNodeValidator;_templateAttrs,allowedElements,allowedAttributes,allowedUriAttributes,uriPolicy",
  7118. allowsAttribute$3: function(element, attributeName, value) {
  7119. if (this.super$_SimpleNodeValidator$allowsAttribute(element, attributeName, value))
  7120. return true;
  7121. if (attributeName === "template" && value === "")
  7122. return true;
  7123. if (J.get$attributes$x(element)._html$_element.getAttribute("template") === "")
  7124. return this._templateAttrs.contains$1(0, attributeName);
  7125. return false;
  7126. },
  7127. static: {
  7128. _TemplatingNodeValidator$: function() {
  7129. var t1 = P.String;
  7130. t1 = new W._TemplatingNodeValidator(P.LinkedHashSet_LinkedHashSet$from(C.List_wSV, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), null);
  7131. t1._SimpleNodeValidator$4$allowedAttributes$allowedElements$allowedUriAttributes(null, new H.MappedListIterable(C.List_wSV, new W._TemplatingNodeValidator_closure(), [null, null]), ["TEMPLATE"], null);
  7132. return t1;
  7133. }
  7134. }
  7135. },
  7136. _TemplatingNodeValidator_closure: {
  7137. "^": "Closure:2;",
  7138. call$1: function(attr) {
  7139. return "TEMPLATE::" + H.S(attr);
  7140. }
  7141. },
  7142. FixedSizeListIterator: {
  7143. "^": "Object;_array,_html$_length,_position,_current",
  7144. moveNext$0: function() {
  7145. var nextPosition, t1;
  7146. nextPosition = this._position + 1;
  7147. t1 = this._html$_length;
  7148. if (nextPosition < t1) {
  7149. this._current = J.$index$asx(this._array, nextPosition);
  7150. this._position = nextPosition;
  7151. return true;
  7152. }
  7153. this._current = null;
  7154. this._position = t1;
  7155. return false;
  7156. },
  7157. get$current: function() {
  7158. return this._current;
  7159. }
  7160. },
  7161. KeyEvent: {
  7162. "^": "_WrappedEvent;",
  7163. $isInterceptor: 1
  7164. },
  7165. _WrappedEvent: {
  7166. "^": "Object;",
  7167. $isInterceptor: 1
  7168. },
  7169. NodeValidator: {
  7170. "^": "Object;"
  7171. },
  7172. _SameOriginUriPolicy: {
  7173. "^": "Object;_hiddenAnchor,_loc"
  7174. },
  7175. _ValidatingTreeSanitizer: {
  7176. "^": "Object;validator",
  7177. sanitizeTree$1: function(node) {
  7178. new W._ValidatingTreeSanitizer_sanitizeTree_walk(this).call$2(node, null);
  7179. },
  7180. _removeNode$2: function(node, $parent) {
  7181. var t1;
  7182. if ($parent == null) {
  7183. t1 = node.parentNode;
  7184. if (t1 != null)
  7185. t1.removeChild(node);
  7186. } else
  7187. $parent.removeChild(node);
  7188. },
  7189. _sanitizeUntrustedElement$2: function(element, $parent) {
  7190. var corrupted, attrs, isAttr, corruptedTest1, elementText, elementTagName, exception, t1;
  7191. corrupted = true;
  7192. attrs = null;
  7193. isAttr = null;
  7194. try {
  7195. attrs = J.get$attributes$x(element);
  7196. isAttr = attrs.get$_html$_element().getAttribute("is");
  7197. corruptedTest1 = function(element) {
  7198. if (!(element.attributes instanceof NamedNodeMap))
  7199. return true;
  7200. var childNodes = element.childNodes;
  7201. if (element.lastChild && element.lastChild !== childNodes[childNodes.length - 1])
  7202. return true;
  7203. if (element.children)
  7204. if (!(element.children instanceof HTMLCollection || element.children instanceof NodeList))
  7205. return true;
  7206. var length = 0;
  7207. if (element.children)
  7208. length = element.children.length;
  7209. for (var i = 0; i < length; i++) {
  7210. var child = element.children[i];
  7211. if (child.id == 'attributes' || child.name == 'attributes' || child.id == 'lastChild' || child.name == 'lastChild' || child.id == 'children' || child.name == 'children')
  7212. return true;
  7213. }
  7214. return false;
  7215. }(element);
  7216. corrupted = corruptedTest1 === true ? true : !(element.attributes instanceof NamedNodeMap);
  7217. } catch (exception) {
  7218. H.unwrapException(exception);
  7219. }
  7220. elementText = "element unprintable";
  7221. try {
  7222. elementText = J.toString$0$(element);
  7223. } catch (exception) {
  7224. H.unwrapException(exception);
  7225. }
  7226. try {
  7227. elementTagName = W.Element__safeTagName(element);
  7228. this._sanitizeElement$7(element, $parent, corrupted, elementText, elementTagName, attrs, isAttr);
  7229. } catch (exception) {
  7230. if (H.unwrapException(exception) instanceof P.ArgumentError)
  7231. throw exception;
  7232. else {
  7233. this._removeNode$2(element, $parent);
  7234. window;
  7235. t1 = "Removing corrupted element " + H.S(elementText);
  7236. if (typeof console != "undefined")
  7237. console.warn(t1);
  7238. }
  7239. }
  7240. },
  7241. _sanitizeElement$7: function(element, $parent, corrupted, text, tag, attrs, isAttr) {
  7242. var t1, keys, i, $name, t2;
  7243. if (corrupted) {
  7244. this._removeNode$2(element, $parent);
  7245. window;
  7246. t1 = "Removing element due to corrupted attributes on <" + text + ">";
  7247. if (typeof console != "undefined")
  7248. console.warn(t1);
  7249. return;
  7250. }
  7251. if (!this.validator.allowsElement$1(element)) {
  7252. this._removeNode$2(element, $parent);
  7253. window;
  7254. t1 = "Removing disallowed element <" + H.S(tag) + "> from " + J.toString$0$($parent);
  7255. if (typeof console != "undefined")
  7256. console.warn(t1);
  7257. return;
  7258. }
  7259. if (isAttr != null)
  7260. if (!this.validator.allowsAttribute$3(element, "is", isAttr)) {
  7261. this._removeNode$2(element, $parent);
  7262. window;
  7263. t1 = "Removing disallowed type extension <" + H.S(tag) + ' is="' + isAttr + '">';
  7264. if (typeof console != "undefined")
  7265. console.warn(t1);
  7266. return;
  7267. }
  7268. t1 = attrs.get$keys();
  7269. keys = H.setRuntimeTypeInfo(t1.slice(), [H.getTypeArgumentByIndex(t1, 0)]);
  7270. for (i = attrs.get$keys().length - 1, t1 = attrs._html$_element; i >= 0; --i) {
  7271. if (i >= keys.length)
  7272. return H.ioore(keys, i);
  7273. $name = keys[i];
  7274. if (!this.validator.allowsAttribute$3(element, J.toLowerCase$0$s($name), t1.getAttribute($name))) {
  7275. window;
  7276. t2 = "Removing disallowed attribute <" + H.S(tag) + " " + $name + '="' + H.S(t1.getAttribute($name)) + '">';
  7277. if (typeof console != "undefined")
  7278. console.warn(t2);
  7279. t1.getAttribute($name);
  7280. t1.removeAttribute($name);
  7281. }
  7282. }
  7283. if (!!J.getInterceptor(element).$isTemplateElement)
  7284. this.sanitizeTree$1(element.content);
  7285. }
  7286. },
  7287. _ValidatingTreeSanitizer_sanitizeTree_walk: {
  7288. "^": "Closure:14;$this",
  7289. call$2: function(node, $parent) {
  7290. var child, nextChild, t1, exception, t2;
  7291. t1 = this.$this;
  7292. switch (node.nodeType) {
  7293. case 1:
  7294. t1._sanitizeUntrustedElement$2(node, $parent);
  7295. break;
  7296. case 8:
  7297. case 11:
  7298. case 3:
  7299. case 4:
  7300. break;
  7301. default:
  7302. t1._removeNode$2(node, $parent);
  7303. }
  7304. child = node.lastChild;
  7305. for (t1 = node == null; null != child;) {
  7306. nextChild = null;
  7307. try {
  7308. nextChild = J.get$previousNode$x(child);
  7309. } catch (exception) {
  7310. H.unwrapException(exception);
  7311. t2 = child;
  7312. if (t1) {
  7313. if (J.get$parentNode$x(t2) != null)
  7314. t2.parentNode.removeChild(t2);
  7315. } else
  7316. node.removeChild(t2);
  7317. child = null;
  7318. nextChild = node.lastChild;
  7319. }
  7320. if (child != null)
  7321. this.call$2(child, node);
  7322. child = nextChild;
  7323. }
  7324. }
  7325. }
  7326. }], ["html_common", "dart:html_common",, P, {
  7327. "^": "",
  7328. Device_isOpera: function() {
  7329. var t1 = $.Device__isOpera;
  7330. if (t1 == null) {
  7331. t1 = J.contains$2$asx(window.navigator.userAgent, "Opera", 0);
  7332. $.Device__isOpera = t1;
  7333. }
  7334. return t1;
  7335. },
  7336. Device_cssPrefix: function() {
  7337. var prefix, t1;
  7338. prefix = $.Device__cachedCssPrefix;
  7339. if (prefix != null)
  7340. return prefix;
  7341. t1 = $.Device__isFirefox;
  7342. if (t1 == null) {
  7343. t1 = J.contains$2$asx(window.navigator.userAgent, "Firefox", 0);
  7344. $.Device__isFirefox = t1;
  7345. }
  7346. if (t1 === true)
  7347. prefix = "-moz-";
  7348. else {
  7349. t1 = $.Device__isIE;
  7350. if (t1 == null) {
  7351. t1 = P.Device_isOpera() !== true && J.contains$2$asx(window.navigator.userAgent, "Trident/", 0);
  7352. $.Device__isIE = t1;
  7353. }
  7354. if (t1 === true)
  7355. prefix = "-ms-";
  7356. else
  7357. prefix = P.Device_isOpera() === true ? "-o-" : "-webkit-";
  7358. }
  7359. $.Device__cachedCssPrefix = prefix;
  7360. return prefix;
  7361. }
  7362. }], ["dart.dom.indexed_db", "dart:indexed_db",, P, {
  7363. "^": ""
  7364. }], ["dart.math", "dart:math",, P, {
  7365. "^": "",
  7366. _JenkinsSmiHash_combine: function(hash, value) {
  7367. hash = 536870911 & hash + value;
  7368. hash = 536870911 & hash + ((524287 & hash) << 10);
  7369. return hash ^ hash >>> 6;
  7370. },
  7371. _JSRandom: {
  7372. "^": "Object;",
  7373. nextInt$1: function(max) {
  7374. if (max <= 0 || max > 4294967296)
  7375. throw H.wrapException(P.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max));
  7376. return Math.random() * max >>> 0;
  7377. }
  7378. },
  7379. Point: {
  7380. "^": "Object;x>,y>,$ti",
  7381. toString$0: function(_) {
  7382. return "Point(" + H.S(this.x) + ", " + H.S(this.y) + ")";
  7383. },
  7384. $eq: function(_, other) {
  7385. var t1, t2;
  7386. if (other == null)
  7387. return false;
  7388. if (!(other instanceof P.Point))
  7389. return false;
  7390. t1 = this.x;
  7391. t2 = other.x;
  7392. if (t1 == null ? t2 == null : t1 === t2) {
  7393. t1 = this.y;
  7394. t2 = other.y;
  7395. t2 = t1 == null ? t2 == null : t1 === t2;
  7396. t1 = t2;
  7397. } else
  7398. t1 = false;
  7399. return t1;
  7400. },
  7401. get$hashCode: function(_) {
  7402. var t1, t2, hash;
  7403. t1 = J.get$hashCode$(this.x);
  7404. t2 = J.get$hashCode$(this.y);
  7405. t2 = P._JenkinsSmiHash_combine(P._JenkinsSmiHash_combine(0, t1), t2);
  7406. hash = 536870911 & t2 + ((67108863 & t2) << 3);
  7407. hash ^= hash >>> 11;
  7408. return 536870911 & hash + ((16383 & hash) << 15);
  7409. },
  7410. $add: function(_, other) {
  7411. var t1, t2, t3;
  7412. t1 = this.x;
  7413. t2 = J.getInterceptor$x(other);
  7414. t3 = t2.get$x(other);
  7415. if (typeof t1 !== "number")
  7416. return t1.$add();
  7417. t3 = C.JSNumber_methods.$add(t1, t3);
  7418. t1 = this.y;
  7419. t2 = t2.get$y(other);
  7420. if (typeof t1 !== "number")
  7421. return t1.$add();
  7422. return new P.Point(t3, C.JSNumber_methods.$add(t1, t2), this.$ti);
  7423. },
  7424. static: {
  7425. Point$: function(x, y, $T) {
  7426. return new P.Point(x, y, [$T]);
  7427. }
  7428. }
  7429. }
  7430. }], ["dart.dom.svg", "dart:svg",, P, {
  7431. "^": "",
  7432. AElement: {
  7433. "^": "GraphicsElement;",
  7434. $isInterceptor: 1,
  7435. "%": "SVGAElement"
  7436. },
  7437. AnimationElement: {
  7438. "^": "SvgElement;",
  7439. $isInterceptor: 1,
  7440. "%": "SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGSetElement"
  7441. },
  7442. FEBlendElement: {
  7443. "^": "SvgElement;",
  7444. $isInterceptor: 1,
  7445. "%": "SVGFEBlendElement"
  7446. },
  7447. FEColorMatrixElement: {
  7448. "^": "SvgElement;",
  7449. $isInterceptor: 1,
  7450. "%": "SVGFEColorMatrixElement"
  7451. },
  7452. FEComponentTransferElement: {
  7453. "^": "SvgElement;",
  7454. $isInterceptor: 1,
  7455. "%": "SVGFEComponentTransferElement"
  7456. },
  7457. FECompositeElement: {
  7458. "^": "SvgElement;",
  7459. $isInterceptor: 1,
  7460. "%": "SVGFECompositeElement"
  7461. },
  7462. FEConvolveMatrixElement: {
  7463. "^": "SvgElement;",
  7464. $isInterceptor: 1,
  7465. "%": "SVGFEConvolveMatrixElement"
  7466. },
  7467. FEDiffuseLightingElement: {
  7468. "^": "SvgElement;",
  7469. $isInterceptor: 1,
  7470. "%": "SVGFEDiffuseLightingElement"
  7471. },
  7472. FEDisplacementMapElement: {
  7473. "^": "SvgElement;",
  7474. $isInterceptor: 1,
  7475. "%": "SVGFEDisplacementMapElement"
  7476. },
  7477. FEFloodElement: {
  7478. "^": "SvgElement;",
  7479. $isInterceptor: 1,
  7480. "%": "SVGFEFloodElement"
  7481. },
  7482. FEGaussianBlurElement: {
  7483. "^": "SvgElement;",
  7484. $isInterceptor: 1,
  7485. "%": "SVGFEGaussianBlurElement"
  7486. },
  7487. FEImageElement: {
  7488. "^": "SvgElement;",
  7489. $isInterceptor: 1,
  7490. "%": "SVGFEImageElement"
  7491. },
  7492. FEMergeElement: {
  7493. "^": "SvgElement;",
  7494. $isInterceptor: 1,
  7495. "%": "SVGFEMergeElement"
  7496. },
  7497. FEMorphologyElement: {
  7498. "^": "SvgElement;",
  7499. $isInterceptor: 1,
  7500. "%": "SVGFEMorphologyElement"
  7501. },
  7502. FEOffsetElement: {
  7503. "^": "SvgElement;",
  7504. $isInterceptor: 1,
  7505. "%": "SVGFEOffsetElement"
  7506. },
  7507. FESpecularLightingElement: {
  7508. "^": "SvgElement;",
  7509. $isInterceptor: 1,
  7510. "%": "SVGFESpecularLightingElement"
  7511. },
  7512. FETileElement: {
  7513. "^": "SvgElement;",
  7514. $isInterceptor: 1,
  7515. "%": "SVGFETileElement"
  7516. },
  7517. FETurbulenceElement: {
  7518. "^": "SvgElement;",
  7519. $isInterceptor: 1,
  7520. "%": "SVGFETurbulenceElement"
  7521. },
  7522. FilterElement: {
  7523. "^": "SvgElement;",
  7524. $isInterceptor: 1,
  7525. "%": "SVGFilterElement"
  7526. },
  7527. GraphicsElement: {
  7528. "^": "SvgElement;",
  7529. $isInterceptor: 1,
  7530. "%": "SVGCircleElement|SVGClipPathElement|SVGDefsElement|SVGEllipseElement|SVGForeignObjectElement|SVGGElement|SVGGeometryElement|SVGLineElement|SVGPathElement|SVGPolygonElement|SVGPolylineElement|SVGRectElement|SVGSwitchElement;SVGGraphicsElement"
  7531. },
  7532. ImageElement0: {
  7533. "^": "GraphicsElement;",
  7534. $isInterceptor: 1,
  7535. "%": "SVGImageElement"
  7536. },
  7537. MarkerElement: {
  7538. "^": "SvgElement;",
  7539. $isInterceptor: 1,
  7540. "%": "SVGMarkerElement"
  7541. },
  7542. MaskElement: {
  7543. "^": "SvgElement;",
  7544. $isInterceptor: 1,
  7545. "%": "SVGMaskElement"
  7546. },
  7547. PatternElement: {
  7548. "^": "SvgElement;",
  7549. $isInterceptor: 1,
  7550. "%": "SVGPatternElement"
  7551. },
  7552. ScriptElement0: {
  7553. "^": "SvgElement;",
  7554. $isInterceptor: 1,
  7555. "%": "SVGScriptElement"
  7556. },
  7557. StyleElement0: {
  7558. "^": "SvgElement;sheet=",
  7559. "%": "SVGStyleElement"
  7560. },
  7561. SvgElement: {
  7562. "^": "Element;",
  7563. $isInterceptor: 1,
  7564. "%": "SVGComponentTransferFunctionElement|SVGDescElement|SVGDiscardElement|SVGFEDistantLightElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEMergeNodeElement|SVGFEPointLightElement|SVGFESpotLightElement|SVGMetadataElement|SVGStopElement|SVGTitleElement;SVGElement"
  7565. },
  7566. SvgSvgElement: {
  7567. "^": "GraphicsElement;",
  7568. $isInterceptor: 1,
  7569. "%": "SVGSVGElement"
  7570. },
  7571. SymbolElement: {
  7572. "^": "SvgElement;",
  7573. $isInterceptor: 1,
  7574. "%": "SVGSymbolElement"
  7575. },
  7576. TextContentElement: {
  7577. "^": "GraphicsElement;",
  7578. "%": "SVGTSpanElement|SVGTextElement|SVGTextPositioningElement;SVGTextContentElement"
  7579. },
  7580. TextPathElement: {
  7581. "^": "TextContentElement;",
  7582. $isInterceptor: 1,
  7583. "%": "SVGTextPathElement"
  7584. },
  7585. UseElement: {
  7586. "^": "GraphicsElement;",
  7587. $isInterceptor: 1,
  7588. "%": "SVGUseElement"
  7589. },
  7590. ViewElement: {
  7591. "^": "SvgElement;",
  7592. $isInterceptor: 1,
  7593. "%": "SVGViewElement"
  7594. },
  7595. _GradientElement: {
  7596. "^": "SvgElement;",
  7597. $isInterceptor: 1,
  7598. "%": "SVGGradientElement|SVGLinearGradientElement|SVGRadialGradientElement"
  7599. },
  7600. _SVGCursorElement: {
  7601. "^": "SvgElement;",
  7602. $isInterceptor: 1,
  7603. "%": "SVGCursorElement"
  7604. },
  7605. _SVGFEDropShadowElement: {
  7606. "^": "SvgElement;",
  7607. $isInterceptor: 1,
  7608. "%": "SVGFEDropShadowElement"
  7609. },
  7610. _SVGMPathElement: {
  7611. "^": "SvgElement;",
  7612. $isInterceptor: 1,
  7613. "%": "SVGMPathElement"
  7614. }
  7615. }], ["dart.dom.web_audio", "dart:web_audio",, P, {
  7616. "^": ""
  7617. }], ["dart.dom.web_gl", "dart:web_gl",, P, {
  7618. "^": ""
  7619. }], ["dart.dom.web_sql", "dart:web_sql",, P, {
  7620. "^": ""
  7621. }], ["", "../src/index.dart",, E, {
  7622. "^": "",
  7623. main: [function() {
  7624. E.injectStyles();
  7625. var t1 = [W.MouseEvent];
  7626. new W._EventStreamSubscription(0, window, "mousemove", W._wrapZone(new E.main_closure()), false, t1)._tryResume$0();
  7627. new W._EventStreamSubscription(0, window, "keyup", W._wrapZone(new E.main_closure0()), false, [W.KeyboardEvent])._tryResume$0();
  7628. new W._EventStreamSubscription(0, window, "click", W._wrapZone(new E.main_closure1()), false, t1)._tryResume$0();
  7629. }, "call$0", "index__main$closure", 0, 0, 1],
  7630. clickHandler: function($event) {
  7631. var t1, x, y, ele, t2, t3;
  7632. t1 = J.getInterceptor$x($event);
  7633. x = J.get$x$x(t1.get$page($event));
  7634. y = J.get$y$x(t1.get$page($event));
  7635. ele = W.Element_Element$html('<span class="ripple"></span>', null, null);
  7636. t1 = J.getInterceptor$x(ele);
  7637. t2 = t1.get$style(ele);
  7638. t2.width = "200px";
  7639. t2 = t1.get$style(ele);
  7640. t2.height = "200px";
  7641. t2 = t1.get$style(ele);
  7642. if (typeof x !== "number")
  7643. return x.$sub();
  7644. t3 = H.S(x - 100) + "px";
  7645. t2.left = t3;
  7646. t1 = t1.get$style(ele);
  7647. if (typeof y !== "number")
  7648. return y.$sub();
  7649. t2 = H.S(y - 100) + "px";
  7650. t1.top = t2;
  7651. document.body.appendChild(ele);
  7652. P.Timer_Timer(C.Duration_750000, new E.clickHandler_closure(ele));
  7653. },
  7654. createElement: function(color, key, x, y) {
  7655. var ele, t1, t2, t3;
  7656. ele = W.Element_Element$html("<div>" + key + "</div>", null, null);
  7657. t1 = J.getInterceptor$x(ele);
  7658. t2 = t1.get$style(ele);
  7659. t2.position = "absolute";
  7660. t2 = t1.get$style(ele);
  7661. t2.zIndex = "999999999";
  7662. t2 = t1.get$style(ele);
  7663. t3 = H.S(y) + "px";
  7664. t2.top = t3;
  7665. t2 = t1.get$style(ele);
  7666. t3 = H.S(x) + "px";
  7667. t2.left = t3;
  7668. t2 = t1.get$style(ele);
  7669. t2.display = "inline-block";
  7670. t2 = t1.get$style(ele);
  7671. t2.padding = "3px 5px";
  7672. t2 = t1.get$style(ele);
  7673. t2.fontSize = "11px";
  7674. t2 = t1.get$style(ele);
  7675. t2.lineHeight = "10px";
  7676. t2 = t1.get$style(ele);
  7677. t2.color = color;
  7678. t2 = t1.get$style(ele);
  7679. t2.verticalAlign = "middle";
  7680. t2 = t1.get$style(ele);
  7681. t2.backgroundColor = "#fcfcfc";
  7682. t2 = t1.get$style(ele);
  7683. t2.border = "solid 1px #ccc";
  7684. t2 = t1.get$style(ele);
  7685. t2.borderBottomColor = "#bbb";
  7686. t2 = t1.get$style(ele);
  7687. C.CssStyleDeclaration_methods._setPropertyHelper$3(t2, (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "border-radius"), "3px", "");
  7688. t1 = t1.get$style(ele);
  7689. C.CssStyleDeclaration_methods._setPropertyHelper$3(t1, (t1 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t1, "box-shadow"), "inset 0 -1px 0 #bbb", "");
  7690. t1 = document;
  7691. if (t1.querySelector("style#type-up") == null)
  7692. E.injectStyles();
  7693. t1.body.appendChild(ele);
  7694. P.Timer_Timer(C.Duration_500000, new E.createElement_closure(ele));
  7695. },
  7696. injectStyles: function() {
  7697. var t1, styleElement, sheet;
  7698. t1 = document;
  7699. styleElement = t1.createElement("style");
  7700. styleElement.id = "type-up";
  7701. t1.head.appendChild(styleElement);
  7702. sheet = J.get$sheet$x(styleElement);
  7703. sheet.insertRule("@keyframes ripple {\n to {\n transform: scale(2);\n opacity: 0;\n }\n}\n ", J.get$cssRules$x(sheet).length);
  7704. sheet.insertRule(".ripple {\n position: absolute;\n z-index:99999999;\n background: rgba(0,0,0,.15);\n border-radius: 100%;\n transform: scale(0);\n pointer-events: none;\n animation: ripple .75s ease-out;\n}", sheet.cssRules.length);
  7705. },
  7706. main_closure: {
  7707. "^": "Closure:5;",
  7708. call$1: function($event) {
  7709. var t1 = J.getInterceptor$x($event);
  7710. $.mousePoint = new P.Point(J.get$x$x(t1.get$page($event)), J.get$y$x(t1.get$page($event)), [null]);
  7711. }
  7712. },
  7713. main_closure0: {
  7714. "^": "Closure:15;",
  7715. call$1: function($event) {
  7716. var key, t1, x, y, radius, angle, t2;
  7717. key = C.JSString_methods.$add(J.toString$0$(J.get$keyCode$x($event)), $event.key);
  7718. t1 = $.$get$mousePoint();
  7719. x = t1.x;
  7720. y = t1.y;
  7721. radius = 50 + C.C__JSRandom.nextInt$1(50);
  7722. angle = C.C__JSRandom.nextInt$1(360);
  7723. if (angle >= 0 && angle < 90) {
  7724. t1 = angle * 2 * 3.141592653589793 / 360;
  7725. t2 = Math.sin(t1);
  7726. t1 = Math.cos(t1);
  7727. if (typeof x !== "number")
  7728. return x.$add();
  7729. x += radius * t1;
  7730. if (typeof y !== "number")
  7731. return y.$sub();
  7732. y -= radius * t2;
  7733. } else if (angle >= 90 && angle < 180) {
  7734. t1 = Math.sin((180 - angle) * 2 * 3.141592653589793 / 360);
  7735. t2 = Math.cos(180 * angle * 2 * 3.141592653589793 / 360);
  7736. if (typeof x !== "number")
  7737. return x.$sub();
  7738. x -= radius * t2;
  7739. if (typeof y !== "number")
  7740. return y.$sub();
  7741. y -= radius * t1;
  7742. } else if (angle >= 180 && angle < 270) {
  7743. t1 = Math.cos((270 - angle) * 2 * 3.141592653589793 / 360);
  7744. t2 = Math.sin(270 * angle * 2 * 3.141592653589793 / 360);
  7745. if (typeof x !== "number")
  7746. return x.$sub();
  7747. x -= radius * t2;
  7748. if (typeof y !== "number")
  7749. return y.$add();
  7750. y += radius * t1;
  7751. } else if (angle >= 270 && angle <= 360) {
  7752. t1 = (angle - 270) * 2 * 3.141592653589793 / 360;
  7753. t2 = Math.cos(t1);
  7754. t1 = Math.sin(t1);
  7755. if (typeof x !== "number")
  7756. return x.$add();
  7757. x += radius * t1;
  7758. if (typeof y !== "number")
  7759. return y.$add();
  7760. y += radius * t2;
  7761. }
  7762. t1 = $.$get$keyboardMap();
  7763. t2 = $event.keyCode;
  7764. if (t2 >>> 0 !== t2 || t2 >= 256)
  7765. return H.ioore(t1, t2);
  7766. t2 = t1[t2];
  7767. E.createElement(X.stringToColor(key + " " + key), t2, x, y);
  7768. return;
  7769. }
  7770. },
  7771. main_closure1: {
  7772. "^": "Closure:5;",
  7773. call$1: function($event) {
  7774. return E.clickHandler($event);
  7775. }
  7776. },
  7777. clickHandler_closure: {
  7778. "^": "Closure:0;ele",
  7779. call$0: function() {
  7780. J.remove$0$ax(this.ele);
  7781. }
  7782. },
  7783. createElement_closure: {
  7784. "^": "Closure:0;ele",
  7785. call$0: function() {
  7786. J.remove$0$ax(this.ele);
  7787. }
  7788. }
  7789. }, 1], ["", "../src/keyBordMaps.dart",, E, {}], ["", "../src/stringToColor.dart",, X, {
  7790. "^": "",
  7791. stringToColor: function(str) {
  7792. var t1, hash, i, colour, x;
  7793. for (t1 = str.length, hash = 0, i = 0; i < t1; ++i)
  7794. hash = C.JSString_methods.codeUnitAt$1(str, i) + ((hash << 5 >>> 0) - hash);
  7795. for (colour = "#", x = 0; x < 3; ++x) {
  7796. str = "00" + C.JSInt_methods.toRadixString$1(C.JSInt_methods._shrOtherPositive$1(hash, x * 8) & 255, 16);
  7797. colour += C.JSString_methods.substring$1(str, str.length - 2);
  7798. }
  7799. return colour;
  7800. }
  7801. }]];
  7802. setupProgram(dart, 0);
  7803. // getInterceptor methods
  7804. J.getInterceptor = function(receiver) {
  7805. if (typeof receiver == "number") {
  7806. if (Math.floor(receiver) == receiver)
  7807. return J.JSInt.prototype;
  7808. return J.JSDouble.prototype;
  7809. }
  7810. if (typeof receiver == "string")
  7811. return J.JSString.prototype;
  7812. if (receiver == null)
  7813. return J.JSNull.prototype;
  7814. if (typeof receiver == "boolean")
  7815. return J.JSBool.prototype;
  7816. if (receiver.constructor == Array)
  7817. return J.JSArray.prototype;
  7818. if (typeof receiver != "object") {
  7819. if (typeof receiver == "function")
  7820. return J.JavaScriptFunction.prototype;
  7821. return receiver;
  7822. }
  7823. if (receiver instanceof P.Object)
  7824. return receiver;
  7825. return J.getNativeInterceptor(receiver);
  7826. };
  7827. J.getInterceptor$asx = function(receiver) {
  7828. if (typeof receiver == "string")
  7829. return J.JSString.prototype;
  7830. if (receiver == null)
  7831. return receiver;
  7832. if (receiver.constructor == Array)
  7833. return J.JSArray.prototype;
  7834. if (typeof receiver != "object") {
  7835. if (typeof receiver == "function")
  7836. return J.JavaScriptFunction.prototype;
  7837. return receiver;
  7838. }
  7839. if (receiver instanceof P.Object)
  7840. return receiver;
  7841. return J.getNativeInterceptor(receiver);
  7842. };
  7843. J.getInterceptor$ax = function(receiver) {
  7844. if (receiver == null)
  7845. return receiver;
  7846. if (receiver.constructor == Array)
  7847. return J.JSArray.prototype;
  7848. if (typeof receiver != "object") {
  7849. if (typeof receiver == "function")
  7850. return J.JavaScriptFunction.prototype;
  7851. return receiver;
  7852. }
  7853. if (receiver instanceof P.Object)
  7854. return receiver;
  7855. return J.getNativeInterceptor(receiver);
  7856. };
  7857. J.getInterceptor$n = function(receiver) {
  7858. if (typeof receiver == "number")
  7859. return J.JSNumber.prototype;
  7860. if (receiver == null)
  7861. return receiver;
  7862. if (!(receiver instanceof P.Object))
  7863. return J.UnknownJavaScriptObject.prototype;
  7864. return receiver;
  7865. };
  7866. J.getInterceptor$ns = function(receiver) {
  7867. if (typeof receiver == "number")
  7868. return J.JSNumber.prototype;
  7869. if (typeof receiver == "string")
  7870. return J.JSString.prototype;
  7871. if (receiver == null)
  7872. return receiver;
  7873. if (!(receiver instanceof P.Object))
  7874. return J.UnknownJavaScriptObject.prototype;
  7875. return receiver;
  7876. };
  7877. J.getInterceptor$s = function(receiver) {
  7878. if (typeof receiver == "string")
  7879. return J.JSString.prototype;
  7880. if (receiver == null)
  7881. return receiver;
  7882. if (!(receiver instanceof P.Object))
  7883. return J.UnknownJavaScriptObject.prototype;
  7884. return receiver;
  7885. };
  7886. J.getInterceptor$x = function(receiver) {
  7887. if (receiver == null)
  7888. return receiver;
  7889. if (typeof receiver != "object") {
  7890. if (typeof receiver == "function")
  7891. return J.JavaScriptFunction.prototype;
  7892. return receiver;
  7893. }
  7894. if (receiver instanceof P.Object)
  7895. return receiver;
  7896. return J.getNativeInterceptor(receiver);
  7897. };
  7898. J.set$href$x = function(receiver, value) {
  7899. return J.getInterceptor$x(receiver).set$href(receiver, value);
  7900. };
  7901. J.get$attributes$x = function(receiver) {
  7902. return J.getInterceptor$x(receiver).get$attributes(receiver);
  7903. };
  7904. J.get$cssRules$x = function(receiver) {
  7905. return J.getInterceptor$x(receiver).get$cssRules(receiver);
  7906. };
  7907. J.get$error$x = function(receiver) {
  7908. return J.getInterceptor$x(receiver).get$error(receiver);
  7909. };
  7910. J.get$iterator$ax = function(receiver) {
  7911. return J.getInterceptor$ax(receiver).get$iterator(receiver);
  7912. };
  7913. J.get$keyCode$x = function(receiver) {
  7914. return J.getInterceptor$x(receiver).get$keyCode(receiver);
  7915. };
  7916. J.get$length$asx = function(receiver) {
  7917. return J.getInterceptor$asx(receiver).get$length(receiver);
  7918. };
  7919. J.get$name$x = function(receiver) {
  7920. return J.getInterceptor$x(receiver).get$name(receiver);
  7921. };
  7922. J.get$parentNode$x = function(receiver) {
  7923. return J.getInterceptor$x(receiver).get$parentNode(receiver);
  7924. };
  7925. J.get$previousNode$x = function(receiver) {
  7926. return J.getInterceptor$x(receiver).get$previousNode(receiver);
  7927. };
  7928. J.get$sheet$x = function(receiver) {
  7929. return J.getInterceptor$x(receiver).get$sheet(receiver);
  7930. };
  7931. J.get$tagName$x = function(receiver) {
  7932. return J.getInterceptor$x(receiver).get$tagName(receiver);
  7933. };
  7934. J.get$x$x = function(receiver) {
  7935. return J.getInterceptor$x(receiver).get$x(receiver);
  7936. };
  7937. J.get$y$x = function(receiver) {
  7938. return J.getInterceptor$x(receiver).get$y(receiver);
  7939. };
  7940. J.$add$ns = function(receiver, a0) {
  7941. if (typeof receiver == "number" && typeof a0 == "number")
  7942. return receiver + a0;
  7943. return J.getInterceptor$ns(receiver).$add(receiver, a0);
  7944. };
  7945. J.$index$asx = function(receiver, a0) {
  7946. if (typeof a0 === "number")
  7947. if (receiver.constructor == Array || typeof receiver == "string" || H.isJsIndexable(receiver, receiver[init.dispatchPropertyName]))
  7948. if (a0 >>> 0 === a0 && a0 < receiver.length)
  7949. return receiver[a0];
  7950. return J.getInterceptor$asx(receiver).$index(receiver, a0);
  7951. };
  7952. J.$lt$n = function(receiver, a0) {
  7953. if (typeof receiver == "number" && typeof a0 == "number")
  7954. return receiver < a0;
  7955. return J.getInterceptor$n(receiver).$lt(receiver, a0);
  7956. };
  7957. J._addEventListener$3$x = function(receiver, a0, a1, a2) {
  7958. return J.getInterceptor$x(receiver)._addEventListener$3(receiver, a0, a1, a2);
  7959. };
  7960. J._removeEventListener$3$x = function(receiver, a0, a1, a2) {
  7961. return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2);
  7962. };
  7963. J.contains$2$asx = function(receiver, a0, a1) {
  7964. return J.getInterceptor$asx(receiver).contains$2(receiver, a0, a1);
  7965. };
  7966. J.elementAt$1$ax = function(receiver, a0) {
  7967. return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0);
  7968. };
  7969. J.map$1$ax = function(receiver, a0) {
  7970. return J.getInterceptor$ax(receiver).map$1(receiver, a0);
  7971. };
  7972. J.remove$0$ax = function(receiver) {
  7973. return J.getInterceptor$ax(receiver).remove$0(receiver);
  7974. };
  7975. J.send$1$x = function(receiver, a0) {
  7976. return J.getInterceptor$x(receiver).send$1(receiver, a0);
  7977. };
  7978. J.toLowerCase$0$s = function(receiver) {
  7979. return J.getInterceptor$s(receiver).toLowerCase$0(receiver);
  7980. };
  7981. J.get$hashCode$ = function(receiver) {
  7982. return J.getInterceptor(receiver).get$hashCode(receiver);
  7983. };
  7984. J.$eq$ = function(receiver, a0) {
  7985. if (receiver == null)
  7986. return a0 == null;
  7987. if (typeof receiver != "object")
  7988. return a0 != null && receiver === a0;
  7989. return J.getInterceptor(receiver).$eq(receiver, a0);
  7990. };
  7991. J.toString$0$ = function(receiver) {
  7992. return J.getInterceptor(receiver).toString$0(receiver);
  7993. };
  7994. Isolate.makeConstantList = function(list) {
  7995. list.immutable$list = Array;
  7996. list.fixed$length = Array;
  7997. return list;
  7998. };
  7999. var $ = Isolate.$isolateProperties;
  8000. C.BodyElement_methods = W.BodyElement.prototype;
  8001. C.CssStyleDeclaration_methods = W.CssStyleDeclaration.prototype;
  8002. C.Interceptor_methods = J.Interceptor.prototype;
  8003. C.JSArray_methods = J.JSArray.prototype;
  8004. C.JSInt_methods = J.JSInt.prototype;
  8005. C.JSNumber_methods = J.JSNumber.prototype;
  8006. C.JSString_methods = J.JSString.prototype;
  8007. C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype;
  8008. C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype;
  8009. C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype;
  8010. C.C_DynamicRuntimeType = new H.DynamicRuntimeType();
  8011. C.C_OutOfMemoryError = new P.OutOfMemoryError();
  8012. C.C__DelayedDone = new P._DelayedDone();
  8013. C.C__JSRandom = new P._JSRandom();
  8014. C.C__RootZone = new P._RootZone();
  8015. C.Duration_0 = new P.Duration(0);
  8016. C.Duration_500000 = new P.Duration(500000);
  8017. C.Duration_750000 = new P.Duration(750000);
  8018. C.JS_CONST_0 = function(hooks) {
  8019. if (typeof dartExperimentalFixupGetTag != "function") return hooks;
  8020. hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);
  8021. };
  8022. C.JS_CONST_4hp = function(hooks) {
  8023. var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
  8024. if (userAgent.indexOf("Firefox") == -1) return hooks;
  8025. var getTag = hooks.getTag;
  8026. var quickMap = {
  8027. "BeforeUnloadEvent": "Event",
  8028. "DataTransfer": "Clipboard",
  8029. "GeoGeolocation": "Geolocation",
  8030. "Location": "!Location",
  8031. "WorkerMessageEvent": "MessageEvent",
  8032. "XMLDocument": "!Document"};
  8033. function getTagFirefox(o) {
  8034. var tag = getTag(o);
  8035. return quickMap[tag] || tag;
  8036. }
  8037. hooks.getTag = getTagFirefox;
  8038. };
  8039. C.JS_CONST_Fs4 = function(hooks) { return hooks; }
  8040. ;
  8041. C.JS_CONST_QJm = function(getTagFallback) {
  8042. return function(hooks) {
  8043. if (typeof navigator != "object") return hooks;
  8044. var ua = navigator.userAgent;
  8045. if (ua.indexOf("DumpRenderTree") >= 0) return hooks;
  8046. if (ua.indexOf("Chrome") >= 0) {
  8047. function confirm(p) {
  8048. return typeof window == "object" && window[p] && window[p].name == p;
  8049. }
  8050. if (confirm("Window") && confirm("HTMLElement")) return hooks;
  8051. }
  8052. hooks.getTag = getTagFallback;
  8053. };
  8054. };
  8055. C.JS_CONST_bDt = function() {
  8056. var toStringFunction = Object.prototype.toString;
  8057. function getTag(o) {
  8058. var s = toStringFunction.call(o);
  8059. return s.substring(8, s.length - 1);
  8060. }
  8061. function getUnknownTag(object, tag) {
  8062. if (/^HTML[A-Z].*Element$/.test(tag)) {
  8063. var name = toStringFunction.call(object);
  8064. if (name == "[object Object]") return null;
  8065. return "HTMLElement";
  8066. }
  8067. }
  8068. function getUnknownTagGenericBrowser(object, tag) {
  8069. if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement";
  8070. return getUnknownTag(object, tag);
  8071. }
  8072. function prototypeForTag(tag) {
  8073. if (typeof window == "undefined") return null;
  8074. if (typeof window[tag] == "undefined") return null;
  8075. var constructor = window[tag];
  8076. if (typeof constructor != "function") return null;
  8077. return constructor.prototype;
  8078. }
  8079. function discriminator(tag) { return null; }
  8080. var isBrowser = typeof navigator == "object";
  8081. return {
  8082. getTag: getTag,
  8083. getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,
  8084. prototypeForTag: prototypeForTag,
  8085. discriminator: discriminator };
  8086. };
  8087. C.JS_CONST_gkc = function(hooks) {
  8088. var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
  8089. if (userAgent.indexOf("Trident/") == -1) return hooks;
  8090. var getTag = hooks.getTag;
  8091. var quickMap = {
  8092. "BeforeUnloadEvent": "Event",
  8093. "DataTransfer": "Clipboard",
  8094. "HTMLDDElement": "HTMLElement",
  8095. "HTMLDTElement": "HTMLElement",
  8096. "HTMLPhraseElement": "HTMLElement",
  8097. "Position": "Geoposition"
  8098. };
  8099. function getTagIE(o) {
  8100. var tag = getTag(o);
  8101. var newTag = quickMap[tag];
  8102. if (newTag) return newTag;
  8103. if (tag == "Object") {
  8104. if (window.DataView && (o instanceof window.DataView)) return "DataView";
  8105. }
  8106. return tag;
  8107. }
  8108. function prototypeForTagIE(tag) {
  8109. var constructor = window[tag];
  8110. if (constructor == null) return null;
  8111. return constructor.prototype;
  8112. }
  8113. hooks.getTag = getTagIE;
  8114. hooks.prototypeForTag = prototypeForTagIE;
  8115. };
  8116. C.JS_CONST_rr7 = function(hooks) {
  8117. var getTag = hooks.getTag;
  8118. var prototypeForTag = hooks.prototypeForTag;
  8119. function getTagFixed(o) {
  8120. var tag = getTag(o);
  8121. if (tag == "Document") {
  8122. if (!!o.xmlVersion) return "!Document";
  8123. return "!HTMLDocument";
  8124. }
  8125. return tag;
  8126. }
  8127. function prototypeForTagFixed(tag) {
  8128. if (tag == "Document") return null;
  8129. return prototypeForTag(tag);
  8130. }
  8131. hooks.getTag = getTagFixed;
  8132. hooks.prototypeForTag = prototypeForTagFixed;
  8133. };
  8134. C.JS_CONST_s8I = function(_, letter) { return letter.toUpperCase(); };
  8135. C.JS_CONST_u2C = function getTagFallback(o) {
  8136. var s = Object.prototype.toString.call(o);
  8137. return s.substring(8, s.length - 1);
  8138. };
  8139. C.List_2Zi = H.setRuntimeTypeInfo(Isolate.makeConstantList(["*::class", "*::dir", "*::draggable", "*::hidden", "*::id", "*::inert", "*::itemprop", "*::itemref", "*::itemscope", "*::lang", "*::spellcheck", "*::title", "*::translate", "A::accesskey", "A::coords", "A::hreflang", "A::name", "A::shape", "A::tabindex", "A::target", "A::type", "AREA::accesskey", "AREA::alt", "AREA::coords", "AREA::nohref", "AREA::shape", "AREA::tabindex", "AREA::target", "AUDIO::controls", "AUDIO::loop", "AUDIO::mediagroup", "AUDIO::muted", "AUDIO::preload", "BDO::dir", "BODY::alink", "BODY::bgcolor", "BODY::link", "BODY::text", "BODY::vlink", "BR::clear", "BUTTON::accesskey", "BUTTON::disabled", "BUTTON::name", "BUTTON::tabindex", "BUTTON::type", "BUTTON::value", "CANVAS::height", "CANVAS::width", "CAPTION::align", "COL::align", "COL::char", "COL::charoff", "COL::span", "COL::valign", "COL::width", "COLGROUP::align", "COLGROUP::char", "COLGROUP::charoff", "COLGROUP::span", "COLGROUP::valign", "COLGROUP::width", "COMMAND::checked", "COMMAND::command", "COMMAND::disabled", "COMMAND::label", "COMMAND::radiogroup", "COMMAND::type", "DATA::value", "DEL::datetime", "DETAILS::open", "DIR::compact", "DIV::align", "DL::compact", "FIELDSET::disabled", "FONT::color", "FONT::face", "FONT::size", "FORM::accept", "FORM::autocomplete", "FORM::enctype", "FORM::method", "FORM::name", "FORM::novalidate", "FORM::target", "FRAME::name", "H1::align", "H2::align", "H3::align", "H4::align", "H5::align", "H6::align", "HR::align", "HR::noshade", "HR::size", "HR::width", "HTML::version", "IFRAME::align", "IFRAME::frameborder", "IFRAME::height", "IFRAME::marginheight", "IFRAME::marginwidth", "IFRAME::width", "IMG::align", "IMG::alt", "IMG::border", "IMG::height", "IMG::hspace", "IMG::ismap", "IMG::name", "IMG::usemap", "IMG::vspace", "IMG::width", "INPUT::accept", "INPUT::accesskey", "INPUT::align", "INPUT::alt", "INPUT::autocomplete", "INPUT::autofocus", "INPUT::checked", "INPUT::disabled", "INPUT::inputmode", "INPUT::ismap", "INPUT::list", "INPUT::max", "INPUT::maxlength", "INPUT::min", "INPUT::multiple", "INPUT::name", "INPUT::placeholder", "INPUT::readonly", "INPUT::required", "INPUT::size", "INPUT::step", "INPUT::tabindex", "INPUT::type", "INPUT::usemap", "INPUT::value", "INS::datetime", "KEYGEN::disabled", "KEYGEN::keytype", "KEYGEN::name", "LABEL::accesskey", "LABEL::for", "LEGEND::accesskey", "LEGEND::align", "LI::type", "LI::value", "LINK::sizes", "MAP::name", "MENU::compact", "MENU::label", "MENU::type", "METER::high", "METER::low", "METER::max", "METER::min", "METER::value", "OBJECT::typemustmatch", "OL::compact", "OL::reversed", "OL::start", "OL::type", "OPTGROUP::disabled", "OPTGROUP::label", "OPTION::disabled", "OPTION::label", "OPTION::selected", "OPTION::value", "OUTPUT::for", "OUTPUT::name", "P::align", "PRE::width", "PROGRESS::max", "PROGRESS::min", "PROGRESS::value", "SELECT::autocomplete", "SELECT::disabled", "SELECT::multiple", "SELECT::name", "SELECT::required", "SELECT::size", "SELECT::tabindex", "SOURCE::type", "TABLE::align", "TABLE::bgcolor", "TABLE::border", "TABLE::cellpadding", "TABLE::cellspacing", "TABLE::frame", "TABLE::rules", "TABLE::summary", "TABLE::width", "TBODY::align", "TBODY::char", "TBODY::charoff", "TBODY::valign", "TD::abbr", "TD::align", "TD::axis", "TD::bgcolor", "TD::char", "TD::charoff", "TD::colspan", "TD::headers", "TD::height", "TD::nowrap", "TD::rowspan", "TD::scope", "TD::valign", "TD::width", "TEXTAREA::accesskey", "TEXTAREA::autocomplete", "TEXTAREA::cols", "TEXTAREA::disabled", "TEXTAREA::inputmode", "TEXTAREA::name", "TEXTAREA::placeholder", "TEXTAREA::readonly", "TEXTAREA::required", "TEXTAREA::rows", "TEXTAREA::tabindex", "TEXTAREA::wrap", "TFOOT::align", "TFOOT::char", "TFOOT::charoff", "TFOOT::valign", "TH::abbr", "TH::align", "TH::axis", "TH::bgcolor", "TH::char", "TH::charoff", "TH::colspan", "TH::headers", "TH::height", "TH::nowrap", "TH::rowspan", "TH::scope", "TH::valign", "TH::width", "THEAD::align", "THEAD::char", "THEAD::charoff", "THEAD::valign", "TR::align", "TR::bgcolor", "TR::char", "TR::charoff", "TR::valign", "TRACK::default", "TRACK::kind", "TRACK::label", "TRACK::srclang", "UL::compact", "UL::type", "VIDEO::controls", "VIDEO::height", "VIDEO::loop", "VIDEO::mediagroup", "VIDEO::muted", "VIDEO::preload", "VIDEO::width"]), [P.String]);
  8140. C.List_ego = Isolate.makeConstantList(["HEAD", "AREA", "BASE", "BASEFONT", "BR", "COL", "COLGROUP", "EMBED", "FRAME", "FRAMESET", "HR", "IMAGE", "IMG", "INPUT", "ISINDEX", "LINK", "META", "PARAM", "SOURCE", "STYLE", "TITLE", "WBR"]);
  8141. C.List_empty = Isolate.makeConstantList([]);
  8142. C.List_wSV = H.setRuntimeTypeInfo(Isolate.makeConstantList(["bind", "if", "ref", "repeat", "syntax"]), [P.String]);
  8143. C.List_yrN = H.setRuntimeTypeInfo(Isolate.makeConstantList(["A::href", "AREA::href", "BLOCKQUOTE::cite", "BODY::background", "COMMAND::icon", "DEL::cite", "FORM::action", "IMG::src", "INPUT::src", "INS::cite", "Q::cite", "VIDEO::poster"]), [P.String]);
  8144. $.Primitives_mirrorFunctionCacheName = "$cachedFunction";
  8145. $.Primitives_mirrorInvokeCacheName = "$cachedInvocation";
  8146. $.Closure_functionCounter = 0;
  8147. $.BoundClosure_selfFieldNameCache = null;
  8148. $.BoundClosure_receiverFieldNameCache = null;
  8149. $.getTagFunction = null;
  8150. $.alternateTagFunction = null;
  8151. $.prototypeForTagFunction = null;
  8152. $.dispatchRecordsForInstanceTags = null;
  8153. $.interceptorsForUncacheableTags = null;
  8154. $.initNativeDispatchFlag = null;
  8155. $._nextCallback = null;
  8156. $._lastCallback = null;
  8157. $._lastPriorityCallback = null;
  8158. $._isInCallbackLoop = false;
  8159. $.Zone__current = C.C__RootZone;
  8160. $.Expando__keyCount = 0;
  8161. $.Element__parseDocument = null;
  8162. $.Element__parseRange = null;
  8163. $.Element__defaultValidator = null;
  8164. $.Element__defaultSanitizer = null;
  8165. $.Device__isOpera = null;
  8166. $.Device__isIE = null;
  8167. $.Device__isFirefox = null;
  8168. $.Device__cachedCssPrefix = null;
  8169. $ = null;
  8170. init.isHunkLoaded = function(hunkHash) {
  8171. return !!$dart_deferred_initializers$[hunkHash];
  8172. };
  8173. init.deferredInitialized = new Object(null);
  8174. init.isHunkInitialized = function(hunkHash) {
  8175. return init.deferredInitialized[hunkHash];
  8176. };
  8177. init.initializeLoadedHunk = function(hunkHash) {
  8178. $dart_deferred_initializers$[hunkHash]($globals$, $);
  8179. init.deferredInitialized[hunkHash] = true;
  8180. };
  8181. init.deferredLibraryUris = {};
  8182. init.deferredLibraryHashes = {};
  8183. // Empty type-to-interceptor map.
  8184. (function(lazies) {
  8185. for (var i = 0; i < lazies.length;) {
  8186. var fieldName = lazies[i++];
  8187. var getterName = lazies[i++];
  8188. var lazyValue = lazies[i++];
  8189. var staticName = lazies[i++];
  8190. Isolate.$lazy(fieldName, getterName, lazyValue, staticName);
  8191. }
  8192. })(["DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() {
  8193. return H.getIsolateAffinityTag("_$dart_dartClosure");
  8194. }, "DART_CLOSURE_PROPERTY_NAME", "JS_INTEROP_INTERCEPTOR_TAG", "$get$JS_INTEROP_INTERCEPTOR_TAG", function() {
  8195. return H.getIsolateAffinityTag("_$dart_js");
  8196. }, "JS_INTEROP_INTERCEPTOR_TAG", "IsolateNatives_thisScript", "$get$IsolateNatives_thisScript", function() {
  8197. return H.IsolateNatives_computeThisScript();
  8198. }, "IsolateNatives_thisScript", "IsolateNatives_workerIds", "$get$IsolateNatives_workerIds", function() {
  8199. if (typeof WeakMap == "function")
  8200. var t1 = new WeakMap();
  8201. else {
  8202. t1 = $.Expando__keyCount;
  8203. $.Expando__keyCount = t1 + 1;
  8204. t1 = "expando$key$" + t1;
  8205. }
  8206. return new P.Expando(null, t1);
  8207. }, "IsolateNatives_workerIds", "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() {
  8208. return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({
  8209. toString: function() {
  8210. return "$receiver$";
  8211. }
  8212. }));
  8213. }, "TypeErrorDecoder_noSuchMethodPattern", "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() {
  8214. return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null,
  8215. toString: function() {
  8216. return "$receiver$";
  8217. }
  8218. }));
  8219. }, "TypeErrorDecoder_notClosurePattern", "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() {
  8220. return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null));
  8221. }, "TypeErrorDecoder_nullCallPattern", "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() {
  8222. return H.TypeErrorDecoder_extractPattern(function() {
  8223. var $argumentsExpr$ = '$arguments$';
  8224. try {
  8225. null.$method$($argumentsExpr$);
  8226. } catch (e) {
  8227. return e.message;
  8228. }
  8229. }());
  8230. }, "TypeErrorDecoder_nullLiteralCallPattern", "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() {
  8231. return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0));
  8232. }, "TypeErrorDecoder_undefinedCallPattern", "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() {
  8233. return H.TypeErrorDecoder_extractPattern(function() {
  8234. var $argumentsExpr$ = '$arguments$';
  8235. try {
  8236. (void 0).$method$($argumentsExpr$);
  8237. } catch (e) {
  8238. return e.message;
  8239. }
  8240. }());
  8241. }, "TypeErrorDecoder_undefinedLiteralCallPattern", "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() {
  8242. return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null));
  8243. }, "TypeErrorDecoder_nullPropertyPattern", "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() {
  8244. return H.TypeErrorDecoder_extractPattern(function() {
  8245. try {
  8246. null.$method$;
  8247. } catch (e) {
  8248. return e.message;
  8249. }
  8250. }());
  8251. }, "TypeErrorDecoder_nullLiteralPropertyPattern", "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() {
  8252. return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0));
  8253. }, "TypeErrorDecoder_undefinedPropertyPattern", "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() {
  8254. return H.TypeErrorDecoder_extractPattern(function() {
  8255. try {
  8256. (void 0).$method$;
  8257. } catch (e) {
  8258. return e.message;
  8259. }
  8260. }());
  8261. }, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() {
  8262. return P._AsyncRun__initializeScheduleImmediate();
  8263. }, "_AsyncRun__scheduleImmediateClosure", "Future__nullFuture", "$get$Future__nullFuture", function() {
  8264. var t1 = new P._Future(0, P.Zone_current(), null, [null]);
  8265. t1._Future$immediate$1(null, null);
  8266. return t1;
  8267. }, "Future__nullFuture", "_toStringVisiting", "$get$_toStringVisiting", function() {
  8268. return [];
  8269. }, "_toStringVisiting", "CssStyleDeclaration__propertyCache", "$get$CssStyleDeclaration__propertyCache", function() {
  8270. return {};
  8271. }, "CssStyleDeclaration__propertyCache", "_Html5NodeValidator__allowedElements", "$get$_Html5NodeValidator__allowedElements", function() {
  8272. return P.LinkedHashSet_LinkedHashSet$from(["A", "ABBR", "ACRONYM", "ADDRESS", "AREA", "ARTICLE", "ASIDE", "AUDIO", "B", "BDI", "BDO", "BIG", "BLOCKQUOTE", "BR", "BUTTON", "CANVAS", "CAPTION", "CENTER", "CITE", "CODE", "COL", "COLGROUP", "COMMAND", "DATA", "DATALIST", "DD", "DEL", "DETAILS", "DFN", "DIR", "DIV", "DL", "DT", "EM", "FIELDSET", "FIGCAPTION", "FIGURE", "FONT", "FOOTER", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HEADER", "HGROUP", "HR", "I", "IFRAME", "IMG", "INPUT", "INS", "KBD", "LABEL", "LEGEND", "LI", "MAP", "MARK", "MENU", "METER", "NAV", "NOBR", "OL", "OPTGROUP", "OPTION", "OUTPUT", "P", "PRE", "PROGRESS", "Q", "S", "SAMP", "SECTION", "SELECT", "SMALL", "SOURCE", "SPAN", "STRIKE", "STRONG", "SUB", "SUMMARY", "SUP", "TABLE", "TBODY", "TD", "TEXTAREA", "TFOOT", "TH", "THEAD", "TIME", "TR", "TRACK", "TT", "U", "UL", "VAR", "VIDEO", "WBR"], null);
  8273. }, "_Html5NodeValidator__allowedElements", "_Html5NodeValidator__attributeValidators", "$get$_Html5NodeValidator__attributeValidators", function() {
  8274. return P.LinkedHashMap__makeEmpty();
  8275. }, "_Html5NodeValidator__attributeValidators", "mousePoint", "$get$mousePoint", function() {
  8276. return P.Point$(0, 0, null);
  8277. }, "mousePoint", "keyboardMap", "$get$keyboardMap", function() {
  8278. return ["", "", "", "CANCEL", "", "", "HELP", "", "BACK SPACE", "TAB", "", "", "CLEAR", "ENTER", "ENTER SPECIAL", "", "SHIFT", "CONTROL", "ALT", "PAUSE", "CAPS LOCK", "KANA", "EISU", "JUNJA", "FINAL", "HANJA", "", "ESCAPE", "CONVERT", "NONCONVERT", "ACCEPT", "MODECHANGE", "SPACE", "PAGE UP", "PAGE DOWN", "END", "HOME", "LEFT", "UP", "RIGHT", "DOWN", "SELECT", "PRINT", "EXECUTE", "PRINTSCREEN", "INSERT", "DELETE", "", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "COLON", "SEMICOLON", "LESS THAN", "EQUALS", "GREATER THAN", "QUESTION MARK", "AT", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "OS KEY", "", "CONTEXT MENU", "", "SLEEP", "NUMPAD0", "NUMPAD1", "NUMPAD2", "NUMPAD3", "NUMPAD4", "NUMPAD5", "NUMPAD6", "NUMPAD7", "NUMPAD8", "NUMPAD9", "MULTIPLY", "ADD", "SEPARATOR", "SUBTRACT", "DECIMAL", "DIVIDE", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "", "", "", "", "", "", "", "", "NUM LOCK", "SCROLL LOCK", "WIN OEM FJ JISHO", "WIN OEM FJ MASSHOU", "WIN OEM FJ TOUROKU", "WIN OEM FJ LOYA", "WIN OEM FJ ROYA", "", "", "", "", "", "", "", "", "", "CIRCUMFLEX", "EXCLAMATION", "DOUBLE QUOTE", "HASH", "DOLLAR", "PERCENT", "AMPERSAND", "UNDERSCORE", "OPEN PAREN", "CLOSE PAREN", "ASTERISK", "PLUS", "PIPE", "HYPHEN MINUS", "OPEN CURLY BRACKET", "CLOSE CURLY BRACKET", "TILDE", "", "", "", "", "VOLUME MUTE", "VOLUME DOWN", "VOLUME UP", "", "", "SEMICOLON", "EQUALS", "COMMA", "MINUS", "PERIOD", "SLASH", "BACK QUOTE", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "OPEN BRACKET", "BACK SLASH", "CLOSE BRACKET", "QUOTE", "", "META", "ALTGR", "", "WIN ICO HELP", "WIN ICO 00", "", "WIN ICO CLEAR", "", "", "WIN OEM RESET", "WIN OEM JUMP", "WIN OEM PA1", "WIN OEM PA2", "WIN OEM PA3", "WIN OEM WSCTRL", "WIN OEM CUSEL", "WIN OEM ATTN", "WIN OEM FINISH", "WIN OEM COPY", "WIN OEM AUTO", "WIN OEM ENLW", "WIN OEM BACKTAB", "ATTN", "CRSEL", "EXSEL", "EREOF", "PLAY", "ZOOM", "", "PA1", "WIN OEM CLEAR", ""];
  8279. }, "keyboardMap"]);
  8280. Isolate = Isolate.$finishIsolateConstructor(Isolate);
  8281. $ = new Isolate();
  8282. init.metadata = [null];
  8283. init.types = [{func: 1}, {func: 1, v: true}, {func: 1, args: [,]}, {func: 1, v: true, args: [{func: 1, v: true}]}, {func: 1, ret: P.String, args: [P.$int]}, {func: 1, args: [W.MouseEvent]}, {func: 1, ret: P.bool, args: [W.Element, P.String, P.String, W._Html5NodeValidator]}, {func: 1, args: [, P.String]}, {func: 1, args: [P.String]}, {func: 1, args: [{func: 1, v: true}]}, {func: 1, v: true, args: [,], opt: [P.StackTrace]}, {func: 1, args: [,], opt: [,]}, {func: 1, v: true, args: [, P.StackTrace]}, {func: 1, args: [,,]}, {func: 1, v: true, args: [W.Node, W.Node]}, {func: 1, args: [W.KeyEvent]}];
  8284. function convertToFastObject(properties) {
  8285. function MyClass() {
  8286. }
  8287. MyClass.prototype = properties;
  8288. new MyClass();
  8289. return properties;
  8290. }
  8291. function convertToSlowObject(properties) {
  8292. properties.__MAGIC_SLOW_PROPERTY = 1;
  8293. delete properties.__MAGIC_SLOW_PROPERTY;
  8294. return properties;
  8295. }
  8296. A = convertToFastObject(A);
  8297. B = convertToFastObject(B);
  8298. C = convertToFastObject(C);
  8299. D = convertToFastObject(D);
  8300. E = convertToFastObject(E);
  8301. F = convertToFastObject(F);
  8302. G = convertToFastObject(G);
  8303. H = convertToFastObject(H);
  8304. J = convertToFastObject(J);
  8305. K = convertToFastObject(K);
  8306. L = convertToFastObject(L);
  8307. M = convertToFastObject(M);
  8308. N = convertToFastObject(N);
  8309. O = convertToFastObject(O);
  8310. P = convertToFastObject(P);
  8311. Q = convertToFastObject(Q);
  8312. R = convertToFastObject(R);
  8313. S = convertToFastObject(S);
  8314. T = convertToFastObject(T);
  8315. U = convertToFastObject(U);
  8316. V = convertToFastObject(V);
  8317. W = convertToFastObject(W);
  8318. X = convertToFastObject(X);
  8319. Y = convertToFastObject(Y);
  8320. Z = convertToFastObject(Z);
  8321. function init() {
  8322. Isolate.$isolateProperties = Object.create(null);
  8323. init.allClasses = map();
  8324. init.getTypeFromName = function(name) {
  8325. return init.allClasses[name];
  8326. };
  8327. init.interceptorsByTag = map();
  8328. init.leafTags = map();
  8329. init.finishedClasses = map();
  8330. Isolate.$lazy = function(fieldName, getterName, lazyValue, staticName, prototype) {
  8331. if (!init.lazies)
  8332. init.lazies = Object.create(null);
  8333. init.lazies[fieldName] = getterName;
  8334. prototype = prototype || Isolate.$isolateProperties;
  8335. var sentinelUndefined = {};
  8336. var sentinelInProgress = {};
  8337. prototype[fieldName] = sentinelUndefined;
  8338. prototype[getterName] = function() {
  8339. var result = this[fieldName];
  8340. try {
  8341. if (result === sentinelUndefined) {
  8342. this[fieldName] = sentinelInProgress;
  8343. try {
  8344. result = this[fieldName] = lazyValue();
  8345. } finally {
  8346. if (result === sentinelUndefined)
  8347. this[fieldName] = null;
  8348. }
  8349. } else
  8350. if (result === sentinelInProgress)
  8351. H.throwCyclicInit(staticName || fieldName);
  8352. return result;
  8353. } finally {
  8354. this[getterName] = function() {
  8355. return this[fieldName];
  8356. };
  8357. }
  8358. };
  8359. };
  8360. Isolate.$finishIsolateConstructor = function(oldIsolate) {
  8361. var isolateProperties = oldIsolate.$isolateProperties;
  8362. function Isolate() {
  8363. var staticNames = Object.keys(isolateProperties);
  8364. for (var i = 0; i < staticNames.length; i++) {
  8365. var staticName = staticNames[i];
  8366. this[staticName] = isolateProperties[staticName];
  8367. }
  8368. var lazies = init.lazies;
  8369. var lazyInitializers = lazies ? Object.keys(lazies) : [];
  8370. for (var i = 0; i < lazyInitializers.length; i++)
  8371. this[lazies[lazyInitializers[i]]] = null;
  8372. function ForceEfficientMap() {
  8373. }
  8374. ForceEfficientMap.prototype = this;
  8375. new ForceEfficientMap();
  8376. for (var i = 0; i < lazyInitializers.length; i++) {
  8377. var lazyInitName = lazies[lazyInitializers[i]];
  8378. this[lazyInitName] = isolateProperties[lazyInitName];
  8379. }
  8380. }
  8381. Isolate.prototype = oldIsolate.prototype;
  8382. Isolate.prototype.constructor = Isolate;
  8383. Isolate.$isolateProperties = isolateProperties;
  8384. Isolate.makeConstantList = oldIsolate.makeConstantList;
  8385. Isolate.functionThatReturnsNull = oldIsolate.functionThatReturnsNull;
  8386. return Isolate;
  8387. };
  8388. }
  8389. !function() {
  8390. var intern = function(s) {
  8391. var o = {};
  8392. o[s] = 1;
  8393. return Object.keys(convertToFastObject(o))[0];
  8394. };
  8395. init.getIsolateTag = function(name) {
  8396. return intern("___dart_" + name + init.isolateTag);
  8397. };
  8398. var tableProperty = "___dart_isolate_tags_";
  8399. var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null));
  8400. var rootProperty = "_ZxYxX";
  8401. for (var i = 0;; i++) {
  8402. var property = intern(rootProperty + "_" + i + "_");
  8403. if (!(property in usedProperties)) {
  8404. usedProperties[property] = 1;
  8405. init.isolateTag = property;
  8406. break;
  8407. }
  8408. }
  8409. init.dispatchPropertyName = init.getIsolateTag("dispatch_record");
  8410. }();
  8411. // BEGIN invoke [main].
  8412. (function(callback) {
  8413. if (typeof document === "undefined") {
  8414. callback(null);
  8415. return;
  8416. }
  8417. if (typeof document.currentScript != 'undefined') {
  8418. callback(document.currentScript);
  8419. return;
  8420. }
  8421. var scripts = document.scripts;
  8422. function onLoad(event) {
  8423. for (var i = 0; i < scripts.length; ++i)
  8424. scripts[i].removeEventListener("load", onLoad, false);
  8425. callback(event.target);
  8426. }
  8427. for (var i = 0; i < scripts.length; ++i)
  8428. scripts[i].addEventListener("load", onLoad, false);
  8429. })(function(currentScript) {
  8430. init.currentScript = currentScript;
  8431. if (typeof dartMainRunner === "function")
  8432. dartMainRunner(function(a) {
  8433. H.startRootIsolate(E.index__main$closure(), a);
  8434. }, []);
  8435. else
  8436. (function(a) {
  8437. H.startRootIsolate(E.index__main$closure(), a);
  8438. })([]);
  8439. });
  8440. // END invoke [main].
  8441. })();
  8442.  
  8443. //# sourceMappingURL=index.dart.js.map