Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: lib/runtime/dart/core.js

Issue 1030063004: more care around generated names, fixes #60 #82 and #97 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 var core; 1 var core;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class Object { 4 class Object {
5 constructor() { 5 constructor() {
6 var name = this.constructor.name; 6 var name = this.constructor.name;
7 var init = this[name]; 7 var init = this[name];
8 var result = void 0; 8 var result = void 0;
9 if (init) 9 if (init)
10 result = init.apply(this, arguments); 10 result = init.apply(this, arguments);
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 } 40 }
41 let deprecated = new Deprecated("next release"); 41 let deprecated = new Deprecated("next release");
42 let override = new _Override(); 42 let override = new _Override();
43 class _Proxy extends Object { 43 class _Proxy extends Object {
44 _Proxy() { 44 _Proxy() {
45 } 45 }
46 } 46 }
47 let proxy = new _Proxy(); 47 let proxy = new _Proxy();
48 class bool extends Object { 48 class bool extends Object {
49 bool$fromEnvironment(name, opt$) { 49 bool$fromEnvironment(name, opts) {
50 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : fa lse; 50 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : fa lse;
51 throw new UnsupportedError('bool.fromEnvironment can only be used as a con st constructor'); 51 throw new UnsupportedError('bool.fromEnvironment can only be used as a con st constructor');
52 } 52 }
53 toString() { 53 toString() {
54 return this ? "true" : "false"; 54 return this ? "true" : "false";
55 } 55 }
56 } 56 }
57 dart.defineNamedConstructor(bool, 'fromEnvironment'); 57 dart.defineNamedConstructor(bool, 'fromEnvironment');
58 let Comparable$ = dart.generic(function(T) { 58 let Comparable$ = dart.generic(function(T) {
59 class Comparable extends Object { 59 class Comparable extends Object {
60 static compare(a, b) { 60 static compare(a, b) {
61 return a.compareTo(b); 61 return a.compareTo(b);
62 } 62 }
63 } 63 }
64 return Comparable; 64 return Comparable;
65 }); 65 });
66 let Comparable = Comparable$(dart.dynamic); 66 let Comparable = Comparable$(dart.dynamic);
67 let _fourDigits = dart.JsSymbol('_fourDigits'); 67 let _fourDigits$ = dart.JsSymbol('_fourDigits');
68 let _sixDigits = dart.JsSymbol('_sixDigits'); 68 let _sixDigits$ = dart.JsSymbol('_sixDigits');
69 let _threeDigits = dart.JsSymbol('_threeDigits'); 69 let _threeDigits$ = dart.JsSymbol('_threeDigits');
70 let _twoDigits = dart.JsSymbol('_twoDigits'); 70 let _twoDigits$ = dart.JsSymbol('_twoDigits');
71 let _brokenDownDateToMillisecondsSinceEpoch = dart.JsSymbol('_brokenDownDateTo MillisecondsSinceEpoch'); 71 let _brokenDownDateToMillisecondsSinceEpoch$ = dart.JsSymbol('_brokenDownDateT oMillisecondsSinceEpoch');
72 class DateTime extends Object { 72 class DateTime extends Object {
73 DateTime(year, month, day, hour, minute, second, millisecond) { 73 DateTime(year, month, day, hour, minute, second, millisecond) {
74 if (month === void 0) 74 if (month === void 0)
75 month = 1; 75 month = 1;
76 if (day === void 0) 76 if (day === void 0)
77 day = 1; 77 day = 1;
78 if (hour === void 0) 78 if (hour === void 0)
79 hour = 0; 79 hour = 0;
80 if (minute === void 0) 80 if (minute === void 0)
81 minute = 0; 81 minute = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (millisecondsSinceEpoch === null) { 146 if (millisecondsSinceEpoch === null) {
147 throw new FormatException("Time out of range", formattedString); 147 throw new FormatException("Time out of range", formattedString);
148 } 148 }
149 if (addOneMillisecond) 149 if (addOneMillisecond)
150 millisecondsSinceEpoch = dart.notNull(millisecondsSinceEpoch) + 1; 150 millisecondsSinceEpoch = dart.notNull(millisecondsSinceEpoch) + 1;
151 return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, { isUtc: isUtc}); 151 return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, { isUtc: isUtc});
152 } else { 152 } else {
153 throw new FormatException("Invalid date format", formattedString); 153 throw new FormatException("Invalid date format", formattedString);
154 } 154 }
155 } 155 }
156 DateTime$fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opt$) { 156 DateTime$fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opts) {
157 let isUtc = opt$ && 'isUtc' in opt$ ? opt$.isUtc : false; 157 let isUtc = opts && 'isUtc' in opts ? opts.isUtc : false;
158 this.millisecondsSinceEpoch = millisecondsSinceEpoch; 158 this.millisecondsSinceEpoch = millisecondsSinceEpoch;
159 this.isUtc = isUtc; 159 this.isUtc = isUtc;
160 if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime._MA X_MILLISECONDS_SINCE_EPOCH)) { 160 if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime._MA X_MILLISECONDS_SINCE_EPOCH)) {
161 throw new ArgumentError(millisecondsSinceEpoch); 161 throw new ArgumentError(millisecondsSinceEpoch);
162 } 162 }
163 if (isUtc === null) 163 if (isUtc === null)
164 throw new ArgumentError(isUtc); 164 throw new ArgumentError(isUtc);
165 } 165 }
166 ['=='](other) { 166 ['=='](other) {
167 if (!dart.notNull(dart.is(other, DateTime))) 167 if (!dart.notNull(dart.is(other, DateTime)))
(...skipping 19 matching lines...) Expand all
187 if (this.isUtc) { 187 if (this.isUtc) {
188 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpo ch, {isUtc: false}); 188 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpo ch, {isUtc: false});
189 } 189 }
190 return this; 190 return this;
191 } 191 }
192 toUtc() { 192 toUtc() {
193 if (this.isUtc) 193 if (this.isUtc)
194 return this; 194 return this;
195 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch , {isUtc: true}); 195 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch , {isUtc: true});
196 } 196 }
197 static [_fourDigits](n) { 197 static [_fourDigits$](n) {
198 let absN = n.abs(); 198 let absN = n.abs();
199 let sign = dart.notNull(n) < 0 ? "-" : ""; 199 let sign = dart.notNull(n) < 0 ? "-" : "";
200 if (dart.notNull(absN) >= 1000) 200 if (dart.notNull(absN) >= 1000)
201 return `${n}`; 201 return `${n}`;
202 if (dart.notNull(absN) >= 100) 202 if (dart.notNull(absN) >= 100)
203 return `${sign}0${absN}`; 203 return `${sign}0${absN}`;
204 if (dart.notNull(absN) >= 10) 204 if (dart.notNull(absN) >= 10)
205 return `${sign}00${absN}`; 205 return `${sign}00${absN}`;
206 return `${sign}000${absN}`; 206 return `${sign}000${absN}`;
207 } 207 }
208 static [_sixDigits](n) { 208 static [_sixDigits$](n) {
209 dart.assert(dart.notNull(n) < -9999 || dart.notNull(n) > 9999); 209 dart.assert(dart.notNull(n) < -9999 || dart.notNull(n) > 9999);
210 let absN = n.abs(); 210 let absN = n.abs();
211 let sign = dart.notNull(n) < 0 ? "-" : "+"; 211 let sign = dart.notNull(n) < 0 ? "-" : "+";
212 if (dart.notNull(absN) >= 100000) 212 if (dart.notNull(absN) >= 100000)
213 return `${sign}${absN}`; 213 return `${sign}${absN}`;
214 return `${sign}0${absN}`; 214 return `${sign}0${absN}`;
215 } 215 }
216 static [_threeDigits](n) { 216 static [_threeDigits$](n) {
217 if (dart.notNull(n) >= 100) 217 if (dart.notNull(n) >= 100)
218 return `${n}`; 218 return `${n}`;
219 if (dart.notNull(n) >= 10) 219 if (dart.notNull(n) >= 10)
220 return `0${n}`; 220 return `0${n}`;
221 return `00${n}`; 221 return `00${n}`;
222 } 222 }
223 static [_twoDigits](n) { 223 static [_twoDigits$](n) {
224 if (dart.notNull(n) >= 10) 224 if (dart.notNull(n) >= 10)
225 return `${n}`; 225 return `${n}`;
226 return `0${n}`; 226 return `0${n}`;
227 } 227 }
228 toString() { 228 toString() {
229 let y = _fourDigits(this.year); 229 let y = _fourDigits(this.year);
230 let m = _twoDigits(this.month); 230 let m = _twoDigits(this.month);
231 let d = _twoDigits(this.day); 231 let d = _twoDigits(this.day);
232 let h = _twoDigits(this.hour); 232 let h = _twoDigits(this.hour);
233 let min = _twoDigits(this.minute); 233 let min = _twoDigits(this.minute);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 return new Duration({milliseconds: dart.notNull(ms) - dart.notNull(otherMs )}); 267 return new Duration({milliseconds: dart.notNull(ms) - dart.notNull(otherMs )});
268 } 268 }
269 DateTime$_internal(year, month, day, hour, minute, second, millisecond, isUt c) { 269 DateTime$_internal(year, month, day, hour, minute, second, millisecond, isUt c) {
270 this.isUtc = typeof isUtc == boolean ? isUtc : dart.throw_(new ArgumentErr or(isUtc)); 270 this.isUtc = typeof isUtc == boolean ? isUtc : dart.throw_(new ArgumentErr or(isUtc));
271 this.millisecondsSinceEpoch = dart.as(_js_helper.checkInt(_js_helper.Primi tives.valueFromDecomposedDate(year, month, day, hour, minute, second, millisecon d, isUtc)), int); 271 this.millisecondsSinceEpoch = dart.as(_js_helper.checkInt(_js_helper.Primi tives.valueFromDecomposedDate(year, month, day, hour, minute, second, millisecon d, isUtc)), int);
272 } 272 }
273 DateTime$_now() { 273 DateTime$_now() {
274 this.isUtc = false; 274 this.isUtc = false;
275 this.millisecondsSinceEpoch = _js_helper.Primitives.dateNow(); 275 this.millisecondsSinceEpoch = _js_helper.Primitives.dateNow();
276 } 276 }
277 static [_brokenDownDateToMillisecondsSinceEpoch](year, month, day, hour, min ute, second, millisecond, isUtc) { 277 static [_brokenDownDateToMillisecondsSinceEpoch$](year, month, day, hour, mi nute, second, millisecond, isUtc) {
278 return dart.as(_js_helper.Primitives.valueFromDecomposedDate(year, month, day, hour, minute, second, millisecond, isUtc), int); 278 return dart.as(_js_helper.Primitives.valueFromDecomposedDate(year, month, day, hour, minute, second, millisecond, isUtc), int);
279 } 279 }
280 get timeZoneName() { 280 get timeZoneName() {
281 if (this.isUtc) 281 if (this.isUtc)
282 return "UTC"; 282 return "UTC";
283 return _js_helper.Primitives.getTimeZoneName(this); 283 return _js_helper.Primitives.getTimeZoneName(this);
284 } 284 }
285 get timeZoneOffset() { 285 get timeZoneOffset() {
286 if (this.isUtc) 286 if (this.isUtc)
287 return new Duration(); 287 return new Duration();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 DateTime.MAY = 5; 332 DateTime.MAY = 5;
333 DateTime.JUNE = 6; 333 DateTime.JUNE = 6;
334 DateTime.JULY = 7; 334 DateTime.JULY = 7;
335 DateTime.AUGUST = 8; 335 DateTime.AUGUST = 8;
336 DateTime.SEPTEMBER = 9; 336 DateTime.SEPTEMBER = 9;
337 DateTime.OCTOBER = 10; 337 DateTime.OCTOBER = 10;
338 DateTime.NOVEMBER = 11; 338 DateTime.NOVEMBER = 11;
339 DateTime.DECEMBER = 12; 339 DateTime.DECEMBER = 12;
340 DateTime.MONTHS_PER_YEAR = 12; 340 DateTime.MONTHS_PER_YEAR = 12;
341 DateTime._MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000; 341 DateTime._MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000;
342 let _onParseErrorInt = dart.JsSymbol('_onParseErrorInt'); 342 let _onParseErrorInt$ = dart.JsSymbol('_onParseErrorInt');
343 let _onParseErrorDouble = dart.JsSymbol('_onParseErrorDouble'); 343 let _onParseErrorDouble$ = dart.JsSymbol('_onParseErrorDouble');
344 class num extends Object { 344 class num extends Object {
345 static parse(input, onError) { 345 static parse(input, onError) {
346 if (onError === void 0) 346 if (onError === void 0)
347 onError = null; 347 onError = null;
348 let source = input.trim(); 348 let source = input.trim();
349 _parseError = false; 349 _parseError = false;
350 let result = int.parse(source, {onError: _onParseErrorInt}); 350 let result = int.parse(source, {onError: _onParseErrorInt});
351 if (!dart.notNull(_parseError)) 351 if (!dart.notNull(_parseError))
352 return result; 352 return result;
353 _parseError = false; 353 _parseError = false;
354 result = double.parse(source, _onParseErrorDouble); 354 result = double.parse(source, _onParseErrorDouble);
355 if (!dart.notNull(_parseError)) 355 if (!dart.notNull(_parseError))
356 return result; 356 return result;
357 if (onError === null) 357 if (onError === null)
358 throw new FormatException(input); 358 throw new FormatException(input);
359 return onError(input); 359 return onError(input);
360 } 360 }
361 static [_onParseErrorInt](_) { 361 static [_onParseErrorInt$](_) {
362 _parseError = true; 362 _parseError = true;
363 return 0; 363 return 0;
364 } 364 }
365 static [_onParseErrorDouble](_) { 365 static [_onParseErrorDouble$](_) {
366 _parseError = true; 366 _parseError = true;
367 return 0.0; 367 return 0.0;
368 } 368 }
369 } 369 }
370 num._parseError = false; 370 num._parseError = false;
371 class double extends num { 371 class double extends num {
372 static parse(source, onError) { 372 static parse(source, onError) {
373 if (onError === void 0) 373 if (onError === void 0)
374 onError = null; 374 onError = null;
375 return _js_helper.Primitives.parseDouble(source, onError); 375 return _js_helper.Primitives.parseDouble(source, onError);
376 } 376 }
377 } 377 }
378 double.NAN = 0.0 / 0.0; 378 double.NAN = 0.0 / 0.0;
379 double.INFINITY = 1.0 / 0.0; 379 double.INFINITY = 1.0 / 0.0;
380 double.NEGATIVE_INFINITY = -dart.notNull(double.INFINITY); 380 double.NEGATIVE_INFINITY = -dart.notNull(double.INFINITY);
381 double.MIN_POSITIVE = 5e-324; 381 double.MIN_POSITIVE = 5e-324;
382 double.MAX_FINITE = 1.7976931348623157e+308; 382 double.MAX_FINITE = 1.7976931348623157e+308;
383 let _duration = dart.JsSymbol('_duration'); 383 let _duration = dart.JsSymbol('_duration');
384 class Duration extends Object { 384 class Duration extends Object {
385 Duration(opt$) { 385 Duration(opts) {
386 let days = opt$ && 'days' in opt$ ? opt$.days : 0; 386 let days = opts && 'days' in opts ? opts.days : 0;
387 let hours = opt$ && 'hours' in opt$ ? opt$.hours : 0; 387 let hours = opts && 'hours' in opts ? opts.hours : 0;
388 let minutes = opt$ && 'minutes' in opt$ ? opt$.minutes : 0; 388 let minutes = opts && 'minutes' in opts ? opts.minutes : 0;
389 let seconds = opt$ && 'seconds' in opt$ ? opt$.seconds : 0; 389 let seconds = opts && 'seconds' in opts ? opts.seconds : 0;
390 let milliseconds = opt$ && 'milliseconds' in opt$ ? opt$.milliseconds : 0; 390 let milliseconds = opts && 'milliseconds' in opts ? opts.milliseconds : 0;
391 let microseconds = opt$ && 'microseconds' in opt$ ? opt$.microseconds : 0; 391 let microseconds = opts && 'microseconds' in opts ? opts.microseconds : 0;
392 this.Duration$_microseconds(dart.notNull(days) * dart.notNull(Duration.MIC ROSECONDS_PER_DAY) + dart.notNull(hours) * dart.notNull(Duration.MICROSECONDS_PE R_HOUR) + dart.notNull(minutes) * dart.notNull(Duration.MICROSECONDS_PER_MINUTE) + dart.notNull(seconds) * dart.notNull(Duration.MICROSECONDS_PER_SECOND) + dart .notNull(milliseconds) * dart.notNull(Duration.MICROSECONDS_PER_MILLISECOND) + d art.notNull(microseconds)); 392 this.Duration$_microseconds(dart.notNull(days) * dart.notNull(Duration.MIC ROSECONDS_PER_DAY) + dart.notNull(hours) * dart.notNull(Duration.MICROSECONDS_PE R_HOUR) + dart.notNull(minutes) * dart.notNull(Duration.MICROSECONDS_PER_MINUTE) + dart.notNull(seconds) * dart.notNull(Duration.MICROSECONDS_PER_SECOND) + dart .notNull(milliseconds) * dart.notNull(Duration.MICROSECONDS_PER_MILLISECOND) + d art.notNull(microseconds));
393 } 393 }
394 Duration$_microseconds($_duration) { 394 Duration$_microseconds(duration$) {
395 this[_duration] = $_duration; 395 this[_duration] = duration$;
396 } 396 }
397 ['+'](other) { 397 ['+'](other) {
398 return new Duration._microseconds(dart.notNull(this[_duration]) + dart.not Null(other[_duration])); 398 return new Duration._microseconds(dart.notNull(this[_duration]) + dart.not Null(other[_duration]));
399 } 399 }
400 ['-'](other) { 400 ['-'](other) {
401 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not Null(other[_duration])); 401 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not Null(other[_duration]));
402 } 402 }
403 ['*'](factor) { 403 ['*'](factor) {
404 return new Duration._microseconds((dart.notNull(this[_duration]) * dart.no tNull(factor)).round()); 404 return new Duration._microseconds((dart.notNull(this[_duration]) * dart.no tNull(factor)).round());
405 } 405 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); 498 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE);
499 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR); 499 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR);
500 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY); 500 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY);
501 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); 501 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE);
502 Duration.MILLISECONDS_PER_HOUR = dart.notNull(Duration.MILLISECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR); 502 Duration.MILLISECONDS_PER_HOUR = dart.notNull(Duration.MILLISECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR);
503 Duration.MILLISECONDS_PER_DAY = dart.notNull(Duration.MILLISECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY); 503 Duration.MILLISECONDS_PER_DAY = dart.notNull(Duration.MILLISECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY);
504 Duration.SECONDS_PER_HOUR = dart.notNull(Duration.SECONDS_PER_MINUTE) * dart.n otNull(Duration.MINUTES_PER_HOUR); 504 Duration.SECONDS_PER_HOUR = dart.notNull(Duration.SECONDS_PER_MINUTE) * dart.n otNull(Duration.MINUTES_PER_HOUR);
505 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY); 505 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY);
506 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY); 506 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY);
507 Duration.ZERO = new Duration({seconds: 0}); 507 Duration.ZERO = new Duration({seconds: 0});
508 let _stringToSafeString = dart.JsSymbol('_stringToSafeString'); 508 let _stringToSafeString$ = dart.JsSymbol('_stringToSafeString');
509 let _objectToString = dart.JsSymbol('_objectToString'); 509 let _objectToString$ = dart.JsSymbol('_objectToString');
510 class Error extends Object { 510 class Error extends Object {
511 Error() { 511 Error() {
512 } 512 }
513 static safeToString(object) { 513 static safeToString(object) {
514 if (dart.notNull(dart.is(object, num)) || dart.notNull(typeof object == bo olean) || dart.notNull(null === object)) { 514 if (dart.notNull(dart.is(object, num)) || dart.notNull(typeof object == bo olean) || dart.notNull(null === object)) {
515 return object.toString(); 515 return object.toString();
516 } 516 }
517 if (typeof object == string) { 517 if (typeof object == string) {
518 return _stringToSafeString(object); 518 return _stringToSafeString(object);
519 } 519 }
520 return _objectToString(object); 520 return _objectToString(object);
521 } 521 }
522 static [_stringToSafeString](string) { 522 static [_stringToSafeString$](string) {
523 return _js_helper.jsonEncodeNative(string); 523 return _js_helper.jsonEncodeNative(string);
524 } 524 }
525 static [_objectToString](object) { 525 static [_objectToString$](object) {
526 return _js_helper.Primitives.objectToString(object); 526 return _js_helper.Primitives.objectToString(object);
527 } 527 }
528 get stackTrace() { 528 get stackTrace() {
529 return _js_helper.Primitives.extractStackTrace(this); 529 return _js_helper.Primitives.extractStackTrace(this);
530 } 530 }
531 } 531 }
532 class AssertionError extends Error { 532 class AssertionError extends Error {
533 } 533 }
534 class TypeError extends AssertionError { 534 class TypeError extends AssertionError {
535 } 535 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e xplanation}`; 713 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e xplanation}`;
714 } 714 }
715 } 715 }
716 class FallThroughError extends Error { 716 class FallThroughError extends Error {
717 FallThroughError() { 717 FallThroughError() {
718 super.Error(); 718 super.Error();
719 } 719 }
720 } 720 }
721 let _className = dart.JsSymbol('_className'); 721 let _className = dart.JsSymbol('_className');
722 class AbstractClassInstantiationError extends Error { 722 class AbstractClassInstantiationError extends Error {
723 AbstractClassInstantiationError($_className) { 723 AbstractClassInstantiationError(className) {
724 this[_className] = $_className; 724 this[_className] = className;
725 super.Error(); 725 super.Error();
726 } 726 }
727 toString() { 727 toString() {
728 return `Cannot instantiate abstract class: '${this[_className]}'`; 728 return `Cannot instantiate abstract class: '${this[_className]}'`;
729 } 729 }
730 } 730 }
731 let _receiver = dart.JsSymbol('_receiver'); 731 let _receiver = dart.JsSymbol('_receiver');
732 let _memberName = dart.JsSymbol('_memberName'); 732 let _memberName = dart.JsSymbol('_memberName');
733 let _arguments = dart.JsSymbol('_arguments'); 733 let _arguments = dart.JsSymbol('_arguments');
734 let _namedArguments = dart.JsSymbol('_namedArguments'); 734 let _namedArguments = dart.JsSymbol('_namedArguments');
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 let values = _js_helper.Primitives.getProperty(object, Expando._EXPANDO_ PROPERTY_NAME); 989 let values = _js_helper.Primitives.getProperty(object, Expando._EXPANDO_ PROPERTY_NAME);
990 if (values === null) { 990 if (values === null) {
991 values = new Object(); 991 values = new Object();
992 _js_helper.Primitives.setProperty(object, Expando._EXPANDO_PROPERTY_NA ME, values); 992 _js_helper.Primitives.setProperty(object, Expando._EXPANDO_PROPERTY_NA ME, values);
993 } 993 }
994 _js_helper.Primitives.setProperty(values, this[_getKey](), value); 994 _js_helper.Primitives.setProperty(values, this[_getKey](), value);
995 } 995 }
996 [_getKey]() { 996 [_getKey]() {
997 let key = dart.as(_js_helper.Primitives.getProperty(this, Expando._KEY_P ROPERTY_NAME), String); 997 let key = dart.as(_js_helper.Primitives.getProperty(this, Expando._KEY_P ROPERTY_NAME), String);
998 if (key === null) { 998 if (key === null) {
999 key = `expando$key$${(($tmp) => _keyCount = dart.notNull($tmp) + 1, $t mp)(_keyCount)}`; 999 key = `expando$key$${((x) => _keyCount = dart.notNull(x$) + 1, x$)(_ke yCount)}`;
1000 _js_helper.Primitives.setProperty(this, Expando._KEY_PROPERTY_NAME, ke y); 1000 _js_helper.Primitives.setProperty(this, Expando._KEY_PROPERTY_NAME, ke y);
1001 } 1001 }
1002 return key; 1002 return key;
1003 } 1003 }
1004 } 1004 }
1005 Expando._KEY_PROPERTY_NAME = 'expando$key'; 1005 Expando._KEY_PROPERTY_NAME = 'expando$key';
1006 Expando._EXPANDO_PROPERTY_NAME = 'expando$values'; 1006 Expando._EXPANDO_PROPERTY_NAME = 'expando$values';
1007 Expando._keyCount = 0; 1007 Expando._keyCount = 0;
1008 return Expando; 1008 return Expando;
1009 }); 1009 });
1010 let Expando = Expando$(dart.dynamic); 1010 let Expando = Expando$(dart.dynamic);
1011 let _toMangledNames = dart.JsSymbol('_toMangledNames'); 1011 let _toMangledNames$ = dart.JsSymbol('_toMangledNames');
1012 class Function extends Object { 1012 class Function extends Object {
1013 static apply(f, positionalArguments, namedArguments) { 1013 static apply(f, positionalArguments, namedArguments) {
1014 if (namedArguments === void 0) 1014 if (namedArguments === void 0)
1015 namedArguments = null; 1015 namedArguments = null;
1016 return _js_helper.Primitives.applyFunction(f, positionalArguments, namedAr guments === null ? null : _toMangledNames(namedArguments)); 1016 return _js_helper.Primitives.applyFunction(f, positionalArguments, namedAr guments === null ? null : _toMangledNames(namedArguments));
1017 } 1017 }
1018 static [_toMangledNames](namedArguments) { 1018 static [_toMangledNames$](namedArguments) {
1019 let result = dart.as(dart.map(), Map$(String, dynamic)); 1019 let result = dart.as(dart.map(), Map$(String, dynamic));
1020 namedArguments.forEach(dart.closureWrap((symbol, value) => { 1020 namedArguments.forEach(dart.closureWrap((symbol, value) => {
1021 result.set(_symbolToString(dart.as(symbol, Symbol)), value); 1021 result.set(_symbolToString(dart.as(symbol, Symbol)), value);
1022 }, "(Symbol, dynamic) → void")); 1022 }, "(Symbol, dynamic) → void"));
1023 return result; 1023 return result;
1024 } 1024 }
1025 } 1025 }
1026 // Function identical: (Object, Object) → bool 1026 // Function identical: (Object, Object) → bool
1027 function identical(a, b) { 1027 function identical(a, b) {
1028 return _js_helper.Primitives.identicalImplementation(a, b); 1028 return _js_helper.Primitives.identicalImplementation(a, b);
1029 } 1029 }
1030 // Function identityHashCode: (Object) → int 1030 // Function identityHashCode: (Object) → int
1031 function identityHashCode(object) { 1031 function identityHashCode(object) {
1032 return _js_helper.objectHashCode(object); 1032 return _js_helper.objectHashCode(object);
1033 } 1033 }
1034 class int extends num { 1034 class int extends num {
1035 int$fromEnvironment(name, opt$) { 1035 int$fromEnvironment(name, opts) {
1036 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : nu ll; 1036 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : nu ll;
1037 throw new UnsupportedError('int.fromEnvironment can only be used as a cons t constructor'); 1037 throw new UnsupportedError('int.fromEnvironment can only be used as a cons t constructor');
1038 } 1038 }
1039 static parse(source, opt$) { 1039 static parse(source, opts) {
1040 let radix = opt$ && 'radix' in opt$ ? opt$.radix : null; 1040 let radix = opts && 'radix' in opts ? opts.radix : null;
1041 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; 1041 let onError = opts && 'onError' in opts ? opts.onError : null;
1042 return Number(source); 1042 return Number(source);
1043 } 1043 }
1044 } 1044 }
1045 dart.defineNamedConstructor(int, 'fromEnvironment'); 1045 dart.defineNamedConstructor(int, 'fromEnvironment');
1046 class Invocation extends Object { 1046 class Invocation extends Object {
1047 get isAccessor() { 1047 get isAccessor() {
1048 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter); 1048 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter);
1049 } 1049 }
1050 } 1050 }
1051 let Iterable$ = dart.generic(function(E) { 1051 let Iterable$ = dart.generic(function(E) {
(...skipping 24 matching lines...) Expand all
1076 }; 1076 };
1077 } 1077 }
1078 } 1078 }
1079 dart.defineNamedConstructor(Iterable, 'generate'); 1079 dart.defineNamedConstructor(Iterable, 'generate');
1080 return Iterable; 1080 return Iterable;
1081 }); 1081 });
1082 let Iterable = Iterable$(dart.dynamic); 1082 let Iterable = Iterable$(dart.dynamic);
1083 let _end = dart.JsSymbol('_end'); 1083 let _end = dart.JsSymbol('_end');
1084 let _start = dart.JsSymbol('_start'); 1084 let _start = dart.JsSymbol('_start');
1085 let _generator = dart.JsSymbol('_generator'); 1085 let _generator = dart.JsSymbol('_generator');
1086 let _id = dart.JsSymbol('_id'); 1086 let _id$ = dart.JsSymbol('_id');
1087 let _GeneratorIterable$ = dart.generic(function(E) { 1087 let _GeneratorIterable$ = dart.generic(function(E) {
1088 class _GeneratorIterable extends collection.IterableBase$(E) { 1088 class _GeneratorIterable extends collection.IterableBase$(E) {
1089 _GeneratorIterable($_end, generator) { 1089 _GeneratorIterable(end$, generator) {
1090 this[_end] = $_end; 1090 this[_end] = end$;
1091 this[_start] = 0; 1091 this[_start] = 0;
1092 this[_generator] = dart.as(generator !== null ? generator : _id, _Genera tor); 1092 this[_generator] = dart.as(generator !== null ? generator : _id, _Genera tor);
1093 super.IterableBase(); 1093 super.IterableBase();
1094 } 1094 }
1095 _GeneratorIterable$slice($_start, $_end, $_generator) { 1095 _GeneratorIterable$slice(start$, end$, generator$) {
1096 this[_start] = $_start; 1096 this[_start] = start$;
1097 this[_end] = $_end; 1097 this[_end] = end$;
1098 this[_generator] = $_generator; 1098 this[_generator] = generator$;
1099 super.IterableBase(); 1099 super.IterableBase();
1100 } 1100 }
1101 get iterator() { 1101 get iterator() {
1102 return new _GeneratorIterator(this[_start], this[_end], this[_generator] ); 1102 return new _GeneratorIterator(this[_start], this[_end], this[_generator] );
1103 } 1103 }
1104 get length() { 1104 get length() {
1105 return dart.notNull(this[_end]) - dart.notNull(this[_start]); 1105 return dart.notNull(this[_end]) - dart.notNull(this[_start]);
1106 } 1106 }
1107 skip(count) { 1107 skip(count) {
1108 RangeError.checkNotNegative(count, "count"); 1108 RangeError.checkNotNegative(count, "count");
1109 if (count === 0) 1109 if (count === 0)
1110 return this; 1110 return this;
1111 let newStart = dart.notNull(this[_start]) + dart.notNull(count); 1111 let newStart = dart.notNull(this[_start]) + dart.notNull(count);
1112 if (dart.notNull(newStart) >= dart.notNull(this[_end])) 1112 if (dart.notNull(newStart) >= dart.notNull(this[_end]))
1113 return new _internal.EmptyIterable(); 1113 return new _internal.EmptyIterable();
1114 return new _GeneratorIterable.slice(newStart, this[_end], this[_generato r]); 1114 return new _GeneratorIterable.slice(newStart, this[_end], this[_generato r]);
1115 } 1115 }
1116 take(count) { 1116 take(count) {
1117 RangeError.checkNotNegative(count, "count"); 1117 RangeError.checkNotNegative(count, "count");
1118 if (count === 0) 1118 if (count === 0)
1119 return new _internal.EmptyIterable(); 1119 return new _internal.EmptyIterable();
1120 let newEnd = dart.notNull(this[_start]) + dart.notNull(count); 1120 let newEnd = dart.notNull(this[_start]) + dart.notNull(count);
1121 if (dart.notNull(newEnd) >= dart.notNull(this[_end])) 1121 if (dart.notNull(newEnd) >= dart.notNull(this[_end]))
1122 return this; 1122 return this;
1123 return new _GeneratorIterable.slice(this[_start], newEnd, this[_generato r]); 1123 return new _GeneratorIterable.slice(this[_start], newEnd, this[_generato r]);
1124 } 1124 }
1125 static [_id](n) { 1125 static [_id$](n) {
1126 return n; 1126 return n;
1127 } 1127 }
1128 } 1128 }
1129 dart.defineNamedConstructor(_GeneratorIterable, 'slice'); 1129 dart.defineNamedConstructor(_GeneratorIterable, 'slice');
1130 return _GeneratorIterable; 1130 return _GeneratorIterable;
1131 }); 1131 });
1132 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte rable$}); 1132 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte rable$});
1133 let _index = dart.JsSymbol('_index'); 1133 let _index = dart.JsSymbol('_index');
1134 let _current = dart.JsSymbol('_current'); 1134 let _current = dart.JsSymbol('_current');
1135 let _GeneratorIterator$ = dart.generic(function(E) { 1135 let _GeneratorIterator$ = dart.generic(function(E) {
1136 class _GeneratorIterator extends Object { 1136 class _GeneratorIterator extends Object {
1137 _GeneratorIterator($_index, $_end, $_generator) { 1137 _GeneratorIterator(index$, end$, generator$) {
1138 this[_index] = $_index; 1138 this[_index] = index$;
1139 this[_end] = $_end; 1139 this[_end] = end$;
1140 this[_generator] = $_generator; 1140 this[_generator] = generator$;
1141 this[_current] = null; 1141 this[_current] = null;
1142 } 1142 }
1143 moveNext() { 1143 moveNext() {
1144 if (dart.notNull(this[_index]) < dart.notNull(this[_end])) { 1144 if (dart.notNull(this[_index]) < dart.notNull(this[_end])) {
1145 this[_current] = this[_generator](this[_index]); 1145 this[_current] = this[_generator](this[_index]);
1146 this[_index] = dart.notNull(this[_index]) + 1; 1146 this[_index] = dart.notNull(this[_index]) + 1;
1147 return true; 1147 return true;
1148 } else { 1148 } else {
1149 this[_current] = null; 1149 this[_current] = null;
1150 return false; 1150 return false;
(...skipping 30 matching lines...) Expand all
1181 } 1181 }
1182 List$filled(length, fill) { 1182 List$filled(length, fill) {
1183 let result = new _interceptors.JSArray.fixed(length); 1183 let result = new _interceptors.JSArray.fixed(length);
1184 if (length !== 0 && dart.notNull(fill !== null)) { 1184 if (length !== 0 && dart.notNull(fill !== null)) {
1185 for (let i = 0; dart.notNull(i) < dart.notNull(result.length); i = dar t.notNull(i) + 1) { 1185 for (let i = 0; dart.notNull(i) < dart.notNull(result.length); i = dar t.notNull(i) + 1) {
1186 result.set(i, fill); 1186 result.set(i, fill);
1187 } 1187 }
1188 } 1188 }
1189 return dart.as(result, List$(E)); 1189 return dart.as(result, List$(E));
1190 } 1190 }
1191 List$from(elements, opt$) { 1191 List$from(elements, opts) {
1192 let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; 1192 let growable = opts && 'growable' in opts ? opts.growable : true;
1193 return null; 1193 return null;
1194 } 1194 }
1195 List$generate(length, generator, opt$) { 1195 List$generate(length, generator, opts) {
1196 let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; 1196 let growable = opts && 'growable' in opts ? opts.growable : true;
1197 let result = null; 1197 let result = null;
1198 if (growable) { 1198 if (growable) {
1199 result = ((_) => { 1199 result = ((_$) => {
1200 _.length = length; 1200 _$.length = length;
1201 return _; 1201 return _$;
1202 }).bind(this)(new List.from([])); 1202 }).bind(this)(new List.from([]));
1203 } else { 1203 } else {
1204 result = new List(length); 1204 result = new List(length);
1205 } 1205 }
1206 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1206 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1207 result.set(i, generator(i)); 1207 result.set(i, generator(i));
1208 } 1208 }
1209 return result; 1209 return result;
1210 } 1210 }
1211 } 1211 }
1212 dart.defineNamedConstructor(List, 'filled'); 1212 dart.defineNamedConstructor(List, 'filled');
1213 dart.defineNamedConstructor(List, 'from'); 1213 dart.defineNamedConstructor(List, 'from');
1214 dart.defineNamedConstructor(List, 'generate'); 1214 dart.defineNamedConstructor(List, 'generate');
1215 return List; 1215 return List;
1216 }); 1216 });
1217 let List = List$(dart.dynamic); 1217 let List = List$(dart.dynamic);
1218 let Map$ = dart.generic(function(K, V) { 1218 let Map$ = dart.generic(function(K, V) {
1219 class Map extends Object { 1219 class Map extends Object {
1220 Map() { 1220 Map() {
1221 return new collection.LinkedHashMap(); 1221 return new collection.LinkedHashMap();
1222 } 1222 }
1223 Map$from(other) { 1223 Map$from(other) {
1224 return new collection.LinkedHashMap.from(other); 1224 return new collection.LinkedHashMap.from(other);
1225 } 1225 }
1226 Map$identity() { 1226 Map$identity() {
1227 return new collection.LinkedHashMap.identity(); 1227 return new collection.LinkedHashMap.identity();
1228 } 1228 }
1229 Map$fromIterable(iterable, opt$) { 1229 Map$fromIterable(iterable, opts) {
1230 return new collection.LinkedHashMap.fromIterable(iterable, opt$); 1230 return new collection.LinkedHashMap.fromIterable(iterable, opts);
1231 } 1231 }
1232 Map$fromIterables(keys, values) { 1232 Map$fromIterables(keys, values) {
1233 return new collection.LinkedHashMap.fromIterables(keys, values); 1233 return new collection.LinkedHashMap.fromIterables(keys, values);
1234 } 1234 }
1235 } 1235 }
1236 dart.defineNamedConstructor(Map, 'from'); 1236 dart.defineNamedConstructor(Map, 'from');
1237 dart.defineNamedConstructor(Map, 'identity'); 1237 dart.defineNamedConstructor(Map, 'identity');
1238 dart.defineNamedConstructor(Map, 'fromIterable'); 1238 dart.defineNamedConstructor(Map, 'fromIterable');
1239 dart.defineNamedConstructor(Map, 'fromIterables'); 1239 dart.defineNamedConstructor(Map, 'fromIterables');
1240 return Map; 1240 return Map;
(...skipping 15 matching lines...) Expand all
1256 let line = `${object}`; 1256 let line = `${object}`;
1257 if (_internal.printToZone === null) { 1257 if (_internal.printToZone === null) {
1258 _internal.printToConsole(line); 1258 _internal.printToConsole(line);
1259 } else { 1259 } else {
1260 dart.dinvokef(_internal.printToZone, line); 1260 dart.dinvokef(_internal.printToZone, line);
1261 } 1261 }
1262 } 1262 }
1263 class Match extends Object { 1263 class Match extends Object {
1264 } 1264 }
1265 class RegExp extends Object { 1265 class RegExp extends Object {
1266 RegExp(source, opt$) { 1266 RegExp(source, opts) {
1267 let multiLine = opt$ && 'multiLine' in opt$ ? opt$.multiLine : false; 1267 let multiLine = opts && 'multiLine' in opts ? opts.multiLine : false;
1268 let caseSensitive = opt$ && 'caseSensitive' in opt$ ? opt$.caseSensitive : true; 1268 let caseSensitive = opts && 'caseSensitive' in opts ? opts.caseSensitive : true;
1269 return new _js_helper.JSSyntaxRegExp(source, {multiLine: multiLine, caseSe nsitive: caseSensitive}); 1269 return new _js_helper.JSSyntaxRegExp(source, {multiLine: multiLine, caseSe nsitive: caseSensitive});
1270 } 1270 }
1271 } 1271 }
1272 let Set$ = dart.generic(function(E) { 1272 let Set$ = dart.generic(function(E) {
1273 class Set extends collection.IterableBase$(E) { 1273 class Set extends collection.IterableBase$(E) {
1274 Set() { 1274 Set() {
1275 return new collection.LinkedHashSet(); 1275 return new collection.LinkedHashSet();
1276 } 1276 }
1277 Set$identity() { 1277 Set$identity() {
1278 return new collection.LinkedHashSet.identity(); 1278 return new collection.LinkedHashSet.identity();
1279 } 1279 }
1280 Set$from(elements) { 1280 Set$from(elements) {
1281 return new collection.LinkedHashSet.from(elements); 1281 return new collection.LinkedHashSet.from(elements);
1282 } 1282 }
1283 } 1283 }
1284 dart.defineNamedConstructor(Set, 'identity'); 1284 dart.defineNamedConstructor(Set, 'identity');
1285 dart.defineNamedConstructor(Set, 'from'); 1285 dart.defineNamedConstructor(Set, 'from');
1286 return Set; 1286 return Set;
1287 }); 1287 });
1288 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$}); 1288 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$});
1289 let Sink$ = dart.generic(function(T) { 1289 let Sink$ = dart.generic(function(T) {
1290 class Sink extends Object { 1290 class Sink extends Object {
1291 } 1291 }
1292 return Sink; 1292 return Sink;
1293 }); 1293 });
1294 let Sink = Sink$(dart.dynamic); 1294 let Sink = Sink$(dart.dynamic);
1295 class StackTrace extends Object { 1295 class StackTrace extends Object {
1296 } 1296 }
1297 let _stop = dart.JsSymbol('_stop'); 1297 let _stop = dart.JsSymbol('_stop');
1298 let _initTicker = dart.JsSymbol('_initTicker'); 1298 let _initTicker$ = dart.JsSymbol('_initTicker');
1299 let _now = dart.JsSymbol('_now'); 1299 let _now$ = dart.JsSymbol('_now');
1300 class Stopwatch extends Object { 1300 class Stopwatch extends Object {
1301 get frequency() { 1301 get frequency() {
1302 return _frequency; 1302 return _frequency;
1303 } 1303 }
1304 Stopwatch() { 1304 Stopwatch() {
1305 this[_start] = null; 1305 this[_start] = null;
1306 this[_stop] = null; 1306 this[_stop] = null;
1307 _initTicker(); 1307 _initTicker();
1308 } 1308 }
1309 start() { 1309 start() {
(...skipping 30 matching lines...) Expand all
1340 } 1340 }
1341 get elapsedMicroseconds() { 1341 get elapsedMicroseconds() {
1342 return (dart.notNull(this.elapsedTicks) * 1000000 / dart.notNull(this.freq uency)).truncate(); 1342 return (dart.notNull(this.elapsedTicks) * 1000000 / dart.notNull(this.freq uency)).truncate();
1343 } 1343 }
1344 get elapsedMilliseconds() { 1344 get elapsedMilliseconds() {
1345 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen cy)).truncate(); 1345 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen cy)).truncate();
1346 } 1346 }
1347 get isRunning() { 1347 get isRunning() {
1348 return this[_start] !== null && this[_stop] === null; 1348 return this[_start] !== null && this[_stop] === null;
1349 } 1349 }
1350 static [_initTicker]() { 1350 static [_initTicker$]() {
1351 _js_helper.Primitives.initTicker(); 1351 _js_helper.Primitives.initTicker();
1352 _frequency = _js_helper.Primitives.timerFrequency; 1352 _frequency = _js_helper.Primitives.timerFrequency;
1353 } 1353 }
1354 static [_now]() { 1354 static [_now$]() {
1355 return dart.as(dart.dinvoke(_js_helper.Primitives, 'timerTicks'), int); 1355 return dart.as(dart.dinvoke(_js_helper.Primitives, 'timerTicks'), int);
1356 } 1356 }
1357 } 1357 }
1358 Stopwatch._frequency = null; 1358 Stopwatch._frequency = null;
1359 let _stringFromIterable = dart.JsSymbol('_stringFromIterable'); 1359 let _stringFromIterable$ = dart.JsSymbol('_stringFromIterable');
1360 class String extends Object { 1360 class String extends Object {
1361 String$fromCharCodes(charCodes, start, end) { 1361 String$fromCharCodes(charCodes, start, end) {
1362 if (start === void 0) 1362 if (start === void 0)
1363 start = 0; 1363 start = 0;
1364 if (end === void 0) 1364 if (end === void 0)
1365 end = null; 1365 end = null;
1366 if (!dart.is(charCodes, _interceptors.JSArray)) { 1366 if (!dart.is(charCodes, _interceptors.JSArray)) {
1367 return _stringFromIterable(charCodes, start, end); 1367 return _stringFromIterable(charCodes, start, end);
1368 } 1368 }
1369 let list = dart.as(charCodes, List); 1369 let list = dart.as(charCodes, List);
1370 let len = list.length; 1370 let len = list.length;
1371 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(len)) { 1371 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(len)) {
1372 throw new RangeError.range(start, 0, len); 1372 throw new RangeError.range(start, 0, len);
1373 } 1373 }
1374 if (end === null) { 1374 if (end === null) {
1375 end = len; 1375 end = len;
1376 } else if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart.notNull(len)) { 1376 } else if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart.notNull(len)) {
1377 throw new RangeError.range(end, start, len); 1377 throw new RangeError.range(end, start, len);
1378 } 1378 }
1379 if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(len)) { 1379 if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(len)) {
1380 list = list.sublist(start, end); 1380 list = list.sublist(start, end);
1381 } 1381 }
1382 return _js_helper.Primitives.stringFromCharCodes(list); 1382 return _js_helper.Primitives.stringFromCharCodes(list);
1383 } 1383 }
1384 String$fromCharCode(charCode) { 1384 String$fromCharCode(charCode) {
1385 return _js_helper.Primitives.stringFromCharCode(charCode); 1385 return _js_helper.Primitives.stringFromCharCode(charCode);
1386 } 1386 }
1387 String$fromEnvironment(name, opt$) { 1387 String$fromEnvironment(name, opts) {
1388 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : nu ll; 1388 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : nu ll;
1389 throw new UnsupportedError('String.fromEnvironment can only be used as a c onst constructor'); 1389 throw new UnsupportedError('String.fromEnvironment can only be used as a c onst constructor');
1390 } 1390 }
1391 static [_stringFromIterable](charCodes, start, end) { 1391 static [_stringFromIterable$](charCodes, start, end) {
1392 if (dart.notNull(start) < 0) 1392 if (dart.notNull(start) < 0)
1393 throw new RangeError.range(start, 0, charCodes.length); 1393 throw new RangeError.range(start, 0, charCodes.length);
1394 if (end !== null && dart.notNull(end) < dart.notNull(start)) { 1394 if (end !== null && dart.notNull(end) < dart.notNull(start)) {
1395 throw new RangeError.range(end, start, charCodes.length); 1395 throw new RangeError.range(end, start, charCodes.length);
1396 } 1396 }
1397 let it = charCodes.iterator; 1397 let it = charCodes.iterator;
1398 for (let i = 0; dart.notNull(i) < dart.notNull(start); i = dart.notNull(i) + 1) { 1398 for (let i = 0; dart.notNull(i) < dart.notNull(start); i = dart.notNull(i) + 1) {
1399 if (!dart.notNull(it.moveNext())) { 1399 if (!dart.notNull(it.moveNext())) {
1400 throw new RangeError.range(start, 0, i); 1400 throw new RangeError.range(start, 0, i);
1401 } 1401 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 Symbol(name) { 1616 Symbol(name) {
1617 return new _internal.Symbol(name); 1617 return new _internal.Symbol(name);
1618 } 1618 }
1619 } 1619 }
1620 class Type extends Object { 1620 class Type extends Object {
1621 } 1621 }
1622 let _writeAuthority = dart.JsSymbol('_writeAuthority'); 1622 let _writeAuthority = dart.JsSymbol('_writeAuthority');
1623 let _userInfo = dart.JsSymbol('_userInfo'); 1623 let _userInfo = dart.JsSymbol('_userInfo');
1624 let _host = dart.JsSymbol('_host'); 1624 let _host = dart.JsSymbol('_host');
1625 let _port = dart.JsSymbol('_port'); 1625 let _port = dart.JsSymbol('_port');
1626 let _defaultPort = dart.JsSymbol('_defaultPort'); 1626 let _defaultPort$ = dart.JsSymbol('_defaultPort');
1627 let _path = dart.JsSymbol('_path'); 1627 let _path = dart.JsSymbol('_path');
1628 let _query = dart.JsSymbol('_query'); 1628 let _query = dart.JsSymbol('_query');
1629 let _fragment = dart.JsSymbol('_fragment'); 1629 let _fragment = dart.JsSymbol('_fragment');
1630 let _fail = dart.JsSymbol('_fail'); 1630 let _fail$ = dart.JsSymbol('_fail');
1631 let _pathSegments = dart.JsSymbol('_pathSegments'); 1631 let _pathSegments = dart.JsSymbol('_pathSegments');
1632 let _queryParameters = dart.JsSymbol('_queryParameters'); 1632 let _queryParameters = dart.JsSymbol('_queryParameters');
1633 let _makeHttpUri = dart.JsSymbol('_makeHttpUri'); 1633 let _makeHttpUri$ = dart.JsSymbol('_makeHttpUri');
1634 let _isWindows = dart.JsSymbol('_isWindows'); 1634 let _isWindows$ = dart.JsSymbol('_isWindows');
1635 let _checkNonWindowsPathReservedCharacters = dart.JsSymbol('_checkNonWindowsPa thReservedCharacters'); 1635 let _checkNonWindowsPathReservedCharacters$ = dart.JsSymbol('_checkNonWindowsP athReservedCharacters');
1636 let _checkWindowsPathReservedCharacters = dart.JsSymbol('_checkWindowsPathRese rvedCharacters'); 1636 let _checkWindowsPathReservedCharacters$ = dart.JsSymbol('_checkWindowsPathRes ervedCharacters');
1637 let _checkWindowsDriveLetter = dart.JsSymbol('_checkWindowsDriveLetter'); 1637 let _checkWindowsDriveLetter$ = dart.JsSymbol('_checkWindowsDriveLetter');
1638 let _makeFileUri = dart.JsSymbol('_makeFileUri'); 1638 let _makeFileUri$ = dart.JsSymbol('_makeFileUri');
1639 let _makeWindowsFileUrl = dart.JsSymbol('_makeWindowsFileUrl'); 1639 let _makeWindowsFileUrl$ = dart.JsSymbol('_makeWindowsFileUrl');
1640 let _makePort = dart.JsSymbol('_makePort'); 1640 let _makePort$ = dart.JsSymbol('_makePort');
1641 let _makeHost = dart.JsSymbol('_makeHost'); 1641 let _makeHost$ = dart.JsSymbol('_makeHost');
1642 let _isRegNameChar = dart.JsSymbol('_isRegNameChar'); 1642 let _isRegNameChar$ = dart.JsSymbol('_isRegNameChar');
1643 let _normalizeRegName = dart.JsSymbol('_normalizeRegName'); 1643 let _normalizeRegName$ = dart.JsSymbol('_normalizeRegName');
1644 let _makeScheme = dart.JsSymbol('_makeScheme'); 1644 let _makeScheme$ = dart.JsSymbol('_makeScheme');
1645 let _makeUserInfo = dart.JsSymbol('_makeUserInfo'); 1645 let _makeUserInfo$ = dart.JsSymbol('_makeUserInfo');
1646 let _makePath = dart.JsSymbol('_makePath'); 1646 let _makePath$ = dart.JsSymbol('_makePath');
1647 let _makeQuery = dart.JsSymbol('_makeQuery'); 1647 let _makeQuery$ = dart.JsSymbol('_makeQuery');
1648 let _makeFragment = dart.JsSymbol('_makeFragment'); 1648 let _makeFragment$ = dart.JsSymbol('_makeFragment');
1649 let _stringOrNullLength = dart.JsSymbol('_stringOrNullLength'); 1649 let _stringOrNullLength$ = dart.JsSymbol('_stringOrNullLength');
1650 let _isHexDigit = dart.JsSymbol('_isHexDigit'); 1650 let _isHexDigit$ = dart.JsSymbol('_isHexDigit');
1651 let _hexValue = dart.JsSymbol('_hexValue'); 1651 let _hexValue$ = dart.JsSymbol('_hexValue');
1652 let _normalizeEscape = dart.JsSymbol('_normalizeEscape'); 1652 let _normalizeEscape$ = dart.JsSymbol('_normalizeEscape');
1653 let _isUnreservedChar = dart.JsSymbol('_isUnreservedChar'); 1653 let _isUnreservedChar$ = dart.JsSymbol('_isUnreservedChar');
1654 let _escapeChar = dart.JsSymbol('_escapeChar'); 1654 let _escapeChar$ = dart.JsSymbol('_escapeChar');
1655 let _normalize = dart.JsSymbol('_normalize'); 1655 let _normalize$ = dart.JsSymbol('_normalize');
1656 let _isSchemeCharacter = dart.JsSymbol('_isSchemeCharacter'); 1656 let _isSchemeCharacter$ = dart.JsSymbol('_isSchemeCharacter');
1657 let _isGeneralDelimiter = dart.JsSymbol('_isGeneralDelimiter'); 1657 let _isGeneralDelimiter$ = dart.JsSymbol('_isGeneralDelimiter');
1658 let _merge = dart.JsSymbol('_merge'); 1658 let _merge = dart.JsSymbol('_merge');
1659 let _hasDotSegments = dart.JsSymbol('_hasDotSegments'); 1659 let _hasDotSegments = dart.JsSymbol('_hasDotSegments');
1660 let _removeDotSegments = dart.JsSymbol('_removeDotSegments'); 1660 let _removeDotSegments = dart.JsSymbol('_removeDotSegments');
1661 let _toWindowsFilePath = dart.JsSymbol('_toWindowsFilePath'); 1661 let _toWindowsFilePath = dart.JsSymbol('_toWindowsFilePath');
1662 let _toFilePath = dart.JsSymbol('_toFilePath'); 1662 let _toFilePath = dart.JsSymbol('_toFilePath');
1663 let _isPathAbsolute = dart.JsSymbol('_isPathAbsolute'); 1663 let _isPathAbsolute = dart.JsSymbol('_isPathAbsolute');
1664 let _addIfNonEmpty = dart.JsSymbol('_addIfNonEmpty'); 1664 let _addIfNonEmpty$ = dart.JsSymbol('_addIfNonEmpty');
1665 let _uriEncode = dart.JsSymbol('_uriEncode'); 1665 let _uriEncode$ = dart.JsSymbol('_uriEncode');
1666 let _hexCharPairToByte = dart.JsSymbol('_hexCharPairToByte'); 1666 let _hexCharPairToByte$ = dart.JsSymbol('_hexCharPairToByte');
1667 let _uriDecode = dart.JsSymbol('_uriDecode'); 1667 let _uriDecode$ = dart.JsSymbol('_uriDecode');
1668 let _isAlphabeticCharacter = dart.JsSymbol('_isAlphabeticCharacter'); 1668 let _isAlphabeticCharacter$ = dart.JsSymbol('_isAlphabeticCharacter');
1669 class Uri extends Object { 1669 class Uri extends Object {
1670 get authority() { 1670 get authority() {
1671 if (!dart.notNull(this.hasAuthority)) 1671 if (!dart.notNull(this.hasAuthority))
1672 return ""; 1672 return "";
1673 let sb = new StringBuffer(); 1673 let sb = new StringBuffer();
1674 this[_writeAuthority](sb); 1674 this[_writeAuthority](sb);
1675 return sb.toString(); 1675 return sb.toString();
1676 } 1676 }
1677 get userInfo() { 1677 get userInfo() {
1678 return this[_userInfo]; 1678 return this[_userInfo];
1679 } 1679 }
1680 get host() { 1680 get host() {
1681 if (this[_host] === null) 1681 if (this[_host] === null)
1682 return ""; 1682 return "";
1683 if (this[_host].startsWith('[')) { 1683 if (this[_host].startsWith('[')) {
1684 return this[_host].substring(1, dart.notNull(this[_host].length) - 1); 1684 return this[_host].substring(1, dart.notNull(this[_host].length) - 1);
1685 } 1685 }
1686 return this[_host]; 1686 return this[_host];
1687 } 1687 }
1688 get port() { 1688 get port() {
1689 if (this[_port] === null) 1689 if (this[_port] === null)
1690 return _defaultPort(this.scheme); 1690 return _defaultPort(this.scheme);
1691 return this[_port]; 1691 return this[_port];
1692 } 1692 }
1693 static [_defaultPort](scheme) { 1693 static [_defaultPort$](scheme) {
1694 if (dart.equals(scheme, "http")) 1694 if (dart.equals(scheme, "http"))
1695 return 80; 1695 return 80;
1696 if (dart.equals(scheme, "https")) 1696 if (dart.equals(scheme, "https"))
1697 return 443; 1697 return 443;
1698 return 0; 1698 return 0;
1699 } 1699 }
1700 get path() { 1700 get path() {
1701 return this[_path]; 1701 return this[_path];
1702 } 1702 }
1703 get query() { 1703 get query() {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 query = _makeQuery(uri, dart.notNull(index) + 1, uri.length, null); 1863 query = _makeQuery(uri, dart.notNull(index) + 1, uri.length, null);
1864 } else { 1864 } else {
1865 query = _makeQuery(uri, dart.notNull(index) + 1, numberSignIndex, null ); 1865 query = _makeQuery(uri, dart.notNull(index) + 1, numberSignIndex, null );
1866 fragment = _makeFragment(uri, dart.notNull(numberSignIndex) + 1, uri.l ength); 1866 fragment = _makeFragment(uri, dart.notNull(numberSignIndex) + 1, uri.l ength);
1867 } 1867 }
1868 } else if (char === Uri._NUMBER_SIGN) { 1868 } else if (char === Uri._NUMBER_SIGN) {
1869 fragment = _makeFragment(uri, dart.notNull(index) + 1, uri.length); 1869 fragment = _makeFragment(uri, dart.notNull(index) + 1, uri.length);
1870 } 1870 }
1871 return new Uri._internal(scheme, userinfo, host, port, path, query, fragme nt); 1871 return new Uri._internal(scheme, userinfo, host, port, path, query, fragme nt);
1872 } 1872 }
1873 static [_fail](uri, index, message) { 1873 static [_fail$](uri, index, message) {
1874 throw new FormatException(message, uri, index); 1874 throw new FormatException(message, uri, index);
1875 } 1875 }
1876 Uri$_internal(scheme, $_userInfo, $_host, $_port, $_path, $_query, $_fragmen t) { 1876 Uri$_internal(scheme, userInfo$, host$, port$, path$, query$, fragment$) {
1877 this.scheme = scheme; 1877 this.scheme = scheme;
1878 this[_userInfo] = $_userInfo; 1878 this[_userInfo] = userInfo$;
1879 this[_host] = $_host; 1879 this[_host] = host$;
1880 this[_port] = $_port; 1880 this[_port] = port$;
1881 this[_path] = $_path; 1881 this[_path] = path$;
1882 this[_query] = $_query; 1882 this[_query] = query$;
1883 this[_fragment] = $_fragment; 1883 this[_fragment] = fragment$;
1884 this[_pathSegments] = null; 1884 this[_pathSegments] = null;
1885 this[_queryParameters] = null; 1885 this[_queryParameters] = null;
1886 } 1886 }
1887 Uri(opt$) { 1887 Uri(opts) {
1888 let scheme = opt$ && 'scheme' in opt$ ? opt$.scheme : ""; 1888 let scheme = opts && 'scheme' in opts ? opts.scheme : "";
1889 let userInfo = opt$ && 'userInfo' in opt$ ? opt$.userInfo : ""; 1889 let userInfo = opts && 'userInfo' in opts ? opts.userInfo : "";
1890 let host = opt$ && 'host' in opt$ ? opt$.host : null; 1890 let host = opts && 'host' in opts ? opts.host : null;
1891 let port = opt$ && 'port' in opt$ ? opt$.port : null; 1891 let port = opts && 'port' in opts ? opts.port : null;
1892 let path = opt$ && 'path' in opt$ ? opt$.path : null; 1892 let path = opts && 'path' in opts ? opts.path : null;
1893 let pathSegments = opt$ && 'pathSegments' in opt$ ? opt$.pathSegments : nu ll; 1893 let pathSegments = opts && 'pathSegments' in opts ? opts.pathSegments : nu ll;
1894 let query = opt$ && 'query' in opt$ ? opt$.query : null; 1894 let query = opts && 'query' in opts ? opts.query : null;
1895 let queryParameters = opt$ && 'queryParameters' in opt$ ? opt$.queryParame ters : null; 1895 let queryParameters = opts && 'queryParameters' in opts ? opts.queryParame ters : null;
1896 let fragment = opt$ && 'fragment' in opt$ ? opt$.fragment : null; 1896 let fragment = opts && 'fragment' in opts ? opts.fragment : null;
1897 scheme = _makeScheme(scheme, _stringOrNullLength(scheme)); 1897 scheme = _makeScheme(scheme, _stringOrNullLength(scheme));
1898 userInfo = _makeUserInfo(userInfo, 0, _stringOrNullLength(userInfo)); 1898 userInfo = _makeUserInfo(userInfo, 0, _stringOrNullLength(userInfo));
1899 host = _makeHost(host, 0, _stringOrNullLength(host), false); 1899 host = _makeHost(host, 0, _stringOrNullLength(host), false);
1900 if (dart.equals(query, "")) 1900 if (dart.equals(query, ""))
1901 query = null; 1901 query = null;
1902 query = _makeQuery(query, 0, _stringOrNullLength(query), queryParameters); 1902 query = _makeQuery(query, 0, _stringOrNullLength(query), queryParameters);
1903 fragment = _makeFragment(fragment, 0, _stringOrNullLength(fragment)); 1903 fragment = _makeFragment(fragment, 0, _stringOrNullLength(fragment));
1904 port = _makePort(port, scheme); 1904 port = _makePort(port, scheme);
1905 let isFile = dart.equals(scheme, "file"); 1905 let isFile = dart.equals(scheme, "file");
1906 if (dart.notNull(host === null) && (dart.notNull(userInfo.isNotEmpty) || p ort !== null || dart.notNull(isFile))) { 1906 if (dart.notNull(host === null) && (dart.notNull(userInfo.isNotEmpty) || p ort !== null || dart.notNull(isFile))) {
1907 host = ""; 1907 host = "";
1908 } 1908 }
1909 let ensureLeadingSlash = host !== null; 1909 let ensureLeadingSlash = host !== null;
1910 path = _makePath(path, 0, _stringOrNullLength(path), pathSegments, ensureL eadingSlash, isFile); 1910 path = _makePath(path, 0, _stringOrNullLength(path), pathSegments, ensureL eadingSlash, isFile);
1911 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt); 1911 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt);
1912 } 1912 }
1913 Uri$http(authority, unencodedPath, queryParameters) { 1913 Uri$http(authority, unencodedPath, queryParameters) {
1914 if (queryParameters === void 0) 1914 if (queryParameters === void 0)
1915 queryParameters = null; 1915 queryParameters = null;
1916 return _makeHttpUri("http", authority, unencodedPath, queryParameters); 1916 return _makeHttpUri("http", authority, unencodedPath, queryParameters);
1917 } 1917 }
1918 Uri$https(authority, unencodedPath, queryParameters) { 1918 Uri$https(authority, unencodedPath, queryParameters) {
1919 if (queryParameters === void 0) 1919 if (queryParameters === void 0)
1920 queryParameters = null; 1920 queryParameters = null;
1921 return _makeHttpUri("https", authority, unencodedPath, queryParameters); 1921 return _makeHttpUri("https", authority, unencodedPath, queryParameters);
1922 } 1922 }
1923 static [_makeHttpUri](scheme, authority, unencodedPath, queryParameters) { 1923 static [_makeHttpUri$](scheme, authority, unencodedPath, queryParameters) {
1924 let userInfo = ""; 1924 let userInfo = "";
1925 let host = null; 1925 let host = null;
1926 let port = null; 1926 let port = null;
1927 if (dart.notNull(authority !== null) && dart.notNull(authority.isNotEmpty) ) { 1927 if (dart.notNull(authority !== null) && dart.notNull(authority.isNotEmpty) ) {
1928 let hostStart = 0; 1928 let hostStart = 0;
1929 let hasUserInfo = false; 1929 let hasUserInfo = false;
1930 for (let i = 0; dart.notNull(i) < dart.notNull(authority.length); i = da rt.notNull(i) + 1) { 1930 for (let i = 0; dart.notNull(i) < dart.notNull(authority.length); i = da rt.notNull(i) + 1) {
1931 if (authority.codeUnitAt(i) === Uri._AT_SIGN) { 1931 if (authority.codeUnitAt(i) === Uri._AT_SIGN) {
1932 hasUserInfo = true; 1932 hasUserInfo = true;
1933 userInfo = authority.substring(0, i); 1933 userInfo = authority.substring(0, i);
(...skipping 22 matching lines...) Expand all
1956 let portString = authority.substring(dart.notNull(hostEnd) + 1); 1956 let portString = authority.substring(dart.notNull(hostEnd) + 1);
1957 if (portString.isNotEmpty) 1957 if (portString.isNotEmpty)
1958 port = int.parse(portString); 1958 port = int.parse(portString);
1959 break; 1959 break;
1960 } 1960 }
1961 } 1961 }
1962 host = authority.substring(hostStart, hostEnd); 1962 host = authority.substring(hostStart, hostEnd);
1963 } 1963 }
1964 return new Uri({scheme: scheme, userInfo: userInfo, host: dart.as(host, St ring), port: dart.as(port, int), pathSegments: unencodedPath.split("/"), queryPa rameters: queryParameters}); 1964 return new Uri({scheme: scheme, userInfo: userInfo, host: dart.as(host, St ring), port: dart.as(port, int), pathSegments: unencodedPath.split("/"), queryPa rameters: queryParameters});
1965 } 1965 }
1966 Uri$file(path, opt$) { 1966 Uri$file(path, opts) {
1967 let windows = opt$ && 'windows' in opt$ ? opt$.windows : null; 1967 let windows = opts && 'windows' in opts ? opts.windows : null;
1968 windows = windows === null ? Uri[_isWindows] : windows; 1968 windows = windows === null ? Uri[_isWindows$] : windows;
1969 return dart.as(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path), U ri); 1969 return dart.as(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path), U ri);
1970 } 1970 }
1971 static get base() { 1971 static get base() {
1972 let uri = _js_helper.Primitives.currentUri(); 1972 let uri = _js_helper.Primitives.currentUri();
1973 if (uri !== null) 1973 if (uri !== null)
1974 return Uri.parse(uri); 1974 return Uri.parse(uri);
1975 throw new UnsupportedError("'Uri.base' is not supported"); 1975 throw new UnsupportedError("'Uri.base' is not supported");
1976 } 1976 }
1977 static get [_isWindows]() { 1977 static get [_isWindows$]() {
1978 return false; 1978 return false;
1979 } 1979 }
1980 static [_checkNonWindowsPathReservedCharacters](segments, argumentError) { 1980 static [_checkNonWindowsPathReservedCharacters$](segments, argumentError) {
1981 segments.forEach(dart.closureWrap((segment) => { 1981 segments.forEach(dart.closureWrap((segment) => {
1982 if (dart.dinvoke(segment, 'contains', "/")) { 1982 if (dart.dinvoke(segment, 'contains', "/")) {
1983 if (argumentError) { 1983 if (argumentError) {
1984 throw new ArgumentError(`Illegal path character ${segment}`); 1984 throw new ArgumentError(`Illegal path character ${segment}`);
1985 } else { 1985 } else {
1986 throw new UnsupportedError(`Illegal path character ${segment}`); 1986 throw new UnsupportedError(`Illegal path character ${segment}`);
1987 } 1987 }
1988 } 1988 }
1989 }, "(String) → void")); 1989 }, "(String) → void"));
1990 } 1990 }
1991 static [_checkWindowsPathReservedCharacters](segments, argumentError, firstS egment) { 1991 static [_checkWindowsPathReservedCharacters$](segments, argumentError, first Segment) {
1992 if (firstSegment === void 0) 1992 if (firstSegment === void 0)
1993 firstSegment = 0; 1993 firstSegment = 0;
1994 segments.skip(firstSegment).forEach(dart.closureWrap((segment) => { 1994 segments.skip(firstSegment).forEach(dart.closureWrap((segment) => {
1995 if (dart.dinvoke(segment, 'contains', new RegExp('["*/:<>?\\\\|]'))) { 1995 if (dart.dinvoke(segment, 'contains', new RegExp('["*/:<>?\\\\|]'))) {
1996 if (argumentError) { 1996 if (argumentError) {
1997 throw new ArgumentError("Illegal character in path"); 1997 throw new ArgumentError("Illegal character in path");
1998 } else { 1998 } else {
1999 throw new UnsupportedError("Illegal character in path"); 1999 throw new UnsupportedError("Illegal character in path");
2000 } 2000 }
2001 } 2001 }
2002 }, "(String) → void")); 2002 }, "(String) → void"));
2003 } 2003 }
2004 static [_checkWindowsDriveLetter](charCode, argumentError) { 2004 static [_checkWindowsDriveLetter$](charCode, argumentError) {
2005 if (dart.notNull(Uri._UPPER_CASE_A) <= dart.notNull(charCode) && dart.notN ull(charCode) <= dart.notNull(Uri._UPPER_CASE_Z) || dart.notNull(Uri._LOWER_CASE _A) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri._LOW ER_CASE_Z)) { 2005 if (dart.notNull(Uri._UPPER_CASE_A) <= dart.notNull(charCode) && dart.notN ull(charCode) <= dart.notNull(Uri._UPPER_CASE_Z) || dart.notNull(Uri._LOWER_CASE _A) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri._LOW ER_CASE_Z)) {
2006 return; 2006 return;
2007 } 2007 }
2008 if (argumentError) { 2008 if (argumentError) {
2009 throw new ArgumentError(String['+']("Illegal drive letter ", new String. fromCharCode(charCode))); 2009 throw new ArgumentError(String['+']("Illegal drive letter ", new String. fromCharCode(charCode)));
2010 } else { 2010 } else {
2011 throw new UnsupportedError(String['+']("Illegal drive letter ", new Stri ng.fromCharCode(charCode))); 2011 throw new UnsupportedError(String['+']("Illegal drive letter ", new Stri ng.fromCharCode(charCode)));
2012 } 2012 }
2013 } 2013 }
2014 static [_makeFileUri](path) { 2014 static [_makeFileUri$](path) {
2015 let sep = "/"; 2015 let sep = "/";
2016 if (path.startsWith(sep)) { 2016 if (path.startsWith(sep)) {
2017 return new Uri({scheme: "file", pathSegments: path.split(sep)}); 2017 return new Uri({scheme: "file", pathSegments: path.split(sep)});
2018 } else { 2018 } else {
2019 return new Uri({pathSegments: path.split(sep)}); 2019 return new Uri({pathSegments: path.split(sep)});
2020 } 2020 }
2021 } 2021 }
2022 static [_makeWindowsFileUrl](path) { 2022 static [_makeWindowsFileUrl$](path) {
2023 if (path.startsWith("\\\\?\\")) { 2023 if (path.startsWith("\\\\?\\")) {
2024 if (path.startsWith("\\\\?\\UNC\\")) { 2024 if (path.startsWith("\\\\?\\UNC\\")) {
2025 path = `\\${path.substring(7)}`; 2025 path = `\\${path.substring(7)}`;
2026 } else { 2026 } else {
2027 path = path.substring(4); 2027 path = path.substring(4);
2028 if (dart.notNull(path.length) < 3 || path.codeUnitAt(1) !== Uri._COLON || path.codeUnitAt(2) !== Uri._BACKSLASH) { 2028 if (dart.notNull(path.length) < 3 || path.codeUnitAt(1) !== Uri._COLON || path.codeUnitAt(2) !== Uri._BACKSLASH) {
2029 throw new ArgumentError("Windows paths with \\\\?\\ prefix must be a bsolute"); 2029 throw new ArgumentError("Windows paths with \\\\?\\ prefix must be a bsolute");
2030 } 2030 }
2031 } 2031 }
2032 } else { 2032 } else {
(...skipping 21 matching lines...) Expand all
2054 let pathSegments = path.split(sep); 2054 let pathSegments = path.split(sep);
2055 _checkWindowsPathReservedCharacters(pathSegments, true); 2055 _checkWindowsPathReservedCharacters(pathSegments, true);
2056 return new Uri({scheme: "file", pathSegments: pathSegments}); 2056 return new Uri({scheme: "file", pathSegments: pathSegments});
2057 } 2057 }
2058 } else { 2058 } else {
2059 let pathSegments = path.split(sep); 2059 let pathSegments = path.split(sep);
2060 _checkWindowsPathReservedCharacters(pathSegments, true); 2060 _checkWindowsPathReservedCharacters(pathSegments, true);
2061 return new Uri({pathSegments: pathSegments}); 2061 return new Uri({pathSegments: pathSegments});
2062 } 2062 }
2063 } 2063 }
2064 replace(opt$) { 2064 replace(opts) {
2065 let scheme = opt$ && 'scheme' in opt$ ? opt$.scheme : null; 2065 let scheme = opts && 'scheme' in opts ? opts.scheme : null;
2066 let userInfo = opt$ && 'userInfo' in opt$ ? opt$.userInfo : null; 2066 let userInfo = opts && 'userInfo' in opts ? opts.userInfo : null;
2067 let host = opt$ && 'host' in opt$ ? opt$.host : null; 2067 let host = opts && 'host' in opts ? opts.host : null;
2068 let port = opt$ && 'port' in opt$ ? opt$.port : null; 2068 let port = opts && 'port' in opts ? opts.port : null;
2069 let path = opt$ && 'path' in opt$ ? opt$.path : null; 2069 let path = opts && 'path' in opts ? opts.path : null;
2070 let pathSegments = opt$ && 'pathSegments' in opt$ ? opt$.pathSegments : nu ll; 2070 let pathSegments = opts && 'pathSegments' in opts ? opts.pathSegments : nu ll;
2071 let query = opt$ && 'query' in opt$ ? opt$.query : null; 2071 let query = opts && 'query' in opts ? opts.query : null;
2072 let queryParameters = opt$ && 'queryParameters' in opt$ ? opt$.queryParame ters : null; 2072 let queryParameters = opts && 'queryParameters' in opts ? opts.queryParame ters : null;
2073 let fragment = opt$ && 'fragment' in opt$ ? opt$.fragment : null; 2073 let fragment = opts && 'fragment' in opts ? opts.fragment : null;
2074 let schemeChanged = false; 2074 let schemeChanged = false;
2075 if (scheme !== null) { 2075 if (scheme !== null) {
2076 scheme = _makeScheme(scheme, scheme.length); 2076 scheme = _makeScheme(scheme, scheme.length);
2077 schemeChanged = true; 2077 schemeChanged = true;
2078 } else { 2078 } else {
2079 scheme = this.scheme; 2079 scheme = this.scheme;
2080 } 2080 }
2081 let isFile = dart.equals(scheme, "file"); 2081 let isFile = dart.equals(scheme, "file");
2082 if (userInfo !== null) { 2082 if (userInfo !== null) {
2083 userInfo = _makeUserInfo(userInfo, 0, userInfo.length); 2083 userInfo = _makeUserInfo(userInfo, 0, userInfo.length);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 this[_pathSegments] = dart.as(new collection.UnmodifiableListView(dart.e quals(pathToSplit, "") ? /* Unimplemented const */new List.from([]) : pathToSpli t.split("/").map(Uri.decodeComponent).toList({growable: false})), List$(String)) ; 2126 this[_pathSegments] = dart.as(new collection.UnmodifiableListView(dart.e quals(pathToSplit, "") ? /* Unimplemented const */new List.from([]) : pathToSpli t.split("/").map(Uri.decodeComponent).toList({growable: false})), List$(String)) ;
2127 } 2127 }
2128 return this[_pathSegments]; 2128 return this[_pathSegments];
2129 } 2129 }
2130 get queryParameters() { 2130 get queryParameters() {
2131 if (this[_queryParameters] === null) { 2131 if (this[_queryParameters] === null) {
2132 this[_queryParameters] = dart.as(new collection.UnmodifiableMapView(spli tQueryString(this.query)), Map$(String, String)); 2132 this[_queryParameters] = dart.as(new collection.UnmodifiableMapView(spli tQueryString(this.query)), Map$(String, String));
2133 } 2133 }
2134 return this[_queryParameters]; 2134 return this[_queryParameters];
2135 } 2135 }
2136 static [_makePort](port, scheme) { 2136 static [_makePort$](port, scheme) {
2137 if (port !== null && port === _defaultPort(scheme)) 2137 if (port !== null && port === _defaultPort(scheme))
2138 return null; 2138 return null;
2139 return port; 2139 return port;
2140 } 2140 }
2141 static [_makeHost](host, start, end, strictIPv6) { 2141 static [_makeHost$](host, start, end, strictIPv6) {
2142 if (host === null) 2142 if (host === null)
2143 return null; 2143 return null;
2144 if (start === end) 2144 if (start === end)
2145 return ""; 2145 return "";
2146 if (host.codeUnitAt(start) === Uri._LEFT_BRACKET) { 2146 if (host.codeUnitAt(start) === Uri._LEFT_BRACKET) {
2147 if (host.codeUnitAt(dart.notNull(end) - 1) !== Uri._RIGHT_BRACKET) { 2147 if (host.codeUnitAt(dart.notNull(end) - 1) !== Uri._RIGHT_BRACKET) {
2148 _fail(host, start, 'Missing end `]` to match `[` in host'); 2148 _fail(host, start, 'Missing end `]` to match `[` in host');
2149 } 2149 }
2150 parseIPv6Address(host, dart.notNull(start) + 1, dart.notNull(end) - 1); 2150 parseIPv6Address(host, dart.notNull(start) + 1, dart.notNull(end) - 1);
2151 return host.substring(start, end).toLowerCase(); 2151 return host.substring(start, end).toLowerCase();
2152 } 2152 }
2153 if (!dart.notNull(strictIPv6)) { 2153 if (!dart.notNull(strictIPv6)) {
2154 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) { 2154 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) {
2155 if (host.codeUnitAt(i) === Uri._COLON) { 2155 if (host.codeUnitAt(i) === Uri._COLON) {
2156 parseIPv6Address(host, start, end); 2156 parseIPv6Address(host, start, end);
2157 return `[${host}]`; 2157 return `[${host}]`;
2158 } 2158 }
2159 } 2159 }
2160 } 2160 }
2161 return _normalizeRegName(host, start, end); 2161 return _normalizeRegName(host, start, end);
2162 } 2162 }
2163 static [_isRegNameChar](char) { 2163 static [_isRegNameChar$](char) {
2164 return dart.notNull(char) < 127 && dart.notNull(!dart.equals(dart.dbinary( Uri._regNameTable.get(dart.notNull(char) >> 4), '&', 1 << (dart.notNull(char) & 15)), 0)); 2164 return dart.notNull(char) < 127 && dart.notNull(!dart.equals(dart.dbinary( Uri._regNameTable.get(dart.notNull(char) >> 4), '&', 1 << (dart.notNull(char) & 15)), 0));
2165 } 2165 }
2166 static [_normalizeRegName](host, start, end) { 2166 static [_normalizeRegName$](host, start, end) {
2167 let buffer = null; 2167 let buffer = null;
2168 let sectionStart = start; 2168 let sectionStart = start;
2169 let index = start; 2169 let index = start;
2170 let isNormalized = true; 2170 let isNormalized = true;
2171 while (dart.notNull(index) < dart.notNull(end)) { 2171 while (dart.notNull(index) < dart.notNull(end)) {
2172 let char = host.codeUnitAt(index); 2172 let char = host.codeUnitAt(index);
2173 if (char === Uri._PERCENT) { 2173 if (char === Uri._PERCENT) {
2174 let replacement = _normalizeEscape(host, index, true); 2174 let replacement = _normalizeEscape(host, index, true);
2175 if (dart.notNull(replacement === null) && dart.notNull(isNormalized)) { 2175 if (dart.notNull(replacement === null) && dart.notNull(isNormalized)) {
2176 index = 3; 2176 index = 3;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 if (buffer === null) 2229 if (buffer === null)
2230 return host.substring(start, end); 2230 return host.substring(start, end);
2231 if (dart.notNull(sectionStart) < dart.notNull(end)) { 2231 if (dart.notNull(sectionStart) < dart.notNull(end)) {
2232 let slice = host.substring(sectionStart, end); 2232 let slice = host.substring(sectionStart, end);
2233 if (!dart.notNull(isNormalized)) 2233 if (!dart.notNull(isNormalized))
2234 slice = slice.toLowerCase(); 2234 slice = slice.toLowerCase();
2235 buffer.write(slice); 2235 buffer.write(slice);
2236 } 2236 }
2237 return buffer.toString(); 2237 return buffer.toString();
2238 } 2238 }
2239 static [_makeScheme](scheme, end) { 2239 static [_makeScheme$](scheme, end) {
2240 if (end === 0) 2240 if (end === 0)
2241 return ""; 2241 return "";
2242 let firstCodeUnit = scheme.codeUnitAt(0); 2242 let firstCodeUnit = scheme.codeUnitAt(0);
2243 if (!dart.notNull(_isAlphabeticCharacter(firstCodeUnit))) { 2243 if (!dart.notNull(_isAlphabeticCharacter(firstCodeUnit))) {
2244 _fail(scheme, 0, "Scheme not starting with alphabetic character"); 2244 _fail(scheme, 0, "Scheme not starting with alphabetic character");
2245 } 2245 }
2246 let allLowercase = dart.notNull(firstCodeUnit) >= dart.notNull(Uri._LOWER_ CASE_A); 2246 let allLowercase = dart.notNull(firstCodeUnit) >= dart.notNull(Uri._LOWER_ CASE_A);
2247 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) { 2247 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
2248 let codeUnit = scheme.codeUnitAt(i); 2248 let codeUnit = scheme.codeUnitAt(i);
2249 if (!dart.notNull(_isSchemeCharacter(codeUnit))) { 2249 if (!dart.notNull(_isSchemeCharacter(codeUnit))) {
2250 _fail(scheme, i, "Illegal scheme character"); 2250 _fail(scheme, i, "Illegal scheme character");
2251 } 2251 }
2252 if (dart.notNull(codeUnit) < dart.notNull(Uri._LOWER_CASE_A) || dart.not Null(codeUnit) > dart.notNull(Uri._LOWER_CASE_Z)) { 2252 if (dart.notNull(codeUnit) < dart.notNull(Uri._LOWER_CASE_A) || dart.not Null(codeUnit) > dart.notNull(Uri._LOWER_CASE_Z)) {
2253 allLowercase = false; 2253 allLowercase = false;
2254 } 2254 }
2255 } 2255 }
2256 scheme = scheme.substring(0, end); 2256 scheme = scheme.substring(0, end);
2257 if (!dart.notNull(allLowercase)) 2257 if (!dart.notNull(allLowercase))
2258 scheme = scheme.toLowerCase(); 2258 scheme = scheme.toLowerCase();
2259 return scheme; 2259 return scheme;
2260 } 2260 }
2261 static [_makeUserInfo](userInfo, start, end) { 2261 static [_makeUserInfo$](userInfo, start, end) {
2262 if (userInfo === null) 2262 if (userInfo === null)
2263 return ""; 2263 return "";
2264 return _normalize(userInfo, start, end, dart.as(Uri._userinfoTable, List$( int))); 2264 return _normalize(userInfo, start, end, dart.as(Uri._userinfoTable, List$( int)));
2265 } 2265 }
2266 static [_makePath](path, start, end, pathSegments, ensureLeadingSlash, isFil e) { 2266 static [_makePath$](path, start, end, pathSegments, ensureLeadingSlash, isFi le) {
2267 if (dart.notNull(path === null) && dart.notNull(pathSegments === null)) 2267 if (dart.notNull(path === null) && dart.notNull(pathSegments === null))
2268 return isFile ? "/" : ""; 2268 return isFile ? "/" : "";
2269 if (dart.notNull(path !== null) && dart.notNull(pathSegments !== null)) { 2269 if (dart.notNull(path !== null) && dart.notNull(pathSegments !== null)) {
2270 throw new ArgumentError('Both path and pathSegments specified'); 2270 throw new ArgumentError('Both path and pathSegments specified');
2271 } 2271 }
2272 let result = null; 2272 let result = null;
2273 if (path !== null) { 2273 if (path !== null) {
2274 result = _normalize(path, start, end, dart.as(Uri._pathCharOrSlashTable, List$(int))); 2274 result = _normalize(path, start, end, dart.as(Uri._pathCharOrSlashTable, List$(int)));
2275 } else { 2275 } else {
2276 result = pathSegments.map(dart.closureWrap((s) => _uriEncode(dart.as(Uri ._pathCharTable, List$(int)), dart.as(s, String)), "(String) → dynamic")).join(" /"); 2276 result = pathSegments.map(dart.closureWrap((s) => _uriEncode(dart.as(Uri ._pathCharTable, List$(int)), dart.as(s, String)), "(String) → dynamic")).join(" /");
2277 } 2277 }
2278 if (dart.dload(result, 'isEmpty')) { 2278 if (dart.dload(result, 'isEmpty')) {
2279 if (isFile) 2279 if (isFile)
2280 return "/"; 2280 return "/";
2281 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dinvoke(result, 'codeUnitAt', 0), Uri._SLASH))) { 2281 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dinvoke(result, 'codeUnitAt', 0), Uri._SLASH))) {
2282 return `/${result}`; 2282 return `/${result}`;
2283 } 2283 }
2284 return dart.as(result, String); 2284 return dart.as(result, String);
2285 } 2285 }
2286 static [_makeQuery](query, start, end, queryParameters) { 2286 static [_makeQuery$](query, start, end, queryParameters) {
2287 if (dart.notNull(query === null) && dart.notNull(queryParameters === null) ) 2287 if (dart.notNull(query === null) && dart.notNull(queryParameters === null) )
2288 return null; 2288 return null;
2289 if (dart.notNull(query !== null) && dart.notNull(queryParameters !== null) ) { 2289 if (dart.notNull(query !== null) && dart.notNull(queryParameters !== null) ) {
2290 throw new ArgumentError('Both query and queryParameters specified'); 2290 throw new ArgumentError('Both query and queryParameters specified');
2291 } 2291 }
2292 if (query !== null) 2292 if (query !== null)
2293 return _normalize(query, start, end, dart.as(Uri._queryCharTable, List$( int))); 2293 return _normalize(query, start, end, dart.as(Uri._queryCharTable, List$( int)));
2294 let result = new StringBuffer(); 2294 let result = new StringBuffer();
2295 let first = true; 2295 let first = true;
2296 queryParameters.forEach(dart.closureWrap(((key, value) => { 2296 queryParameters.forEach(dart.closureWrap(((key, value) => {
2297 if (!dart.notNull(first)) { 2297 if (!dart.notNull(first)) {
2298 result.write("&"); 2298 result.write("&");
2299 } 2299 }
2300 first = false; 2300 first = false;
2301 result.write(Uri.encodeQueryComponent(dart.as(key, String))); 2301 result.write(Uri.encodeQueryComponent(dart.as(key, String)));
2302 if (dart.notNull(value !== null) && dart.notNull(dart.dunary('!', dart.d load(value, 'isEmpty')))) { 2302 if (dart.notNull(value !== null) && dart.notNull(dart.dunary('!', dart.d load(value, 'isEmpty')))) {
2303 result.write("="); 2303 result.write("=");
2304 result.write(Uri.encodeQueryComponent(dart.as(value, String))); 2304 result.write(Uri.encodeQueryComponent(dart.as(value, String)));
2305 } 2305 }
2306 }).bind(this), "(String, String) → void")); 2306 }).bind(this), "(String, String) → void"));
2307 return result.toString(); 2307 return result.toString();
2308 } 2308 }
2309 static [_makeFragment](fragment, start, end) { 2309 static [_makeFragment$](fragment, start, end) {
2310 if (fragment === null) 2310 if (fragment === null)
2311 return null; 2311 return null;
2312 return _normalize(fragment, start, end, dart.as(Uri._queryCharTable, List$ (int))); 2312 return _normalize(fragment, start, end, dart.as(Uri._queryCharTable, List$ (int)));
2313 } 2313 }
2314 static [_stringOrNullLength](s) { 2314 static [_stringOrNullLength$](s) {
2315 return s === null ? 0 : s.length; 2315 return s === null ? 0 : s.length;
2316 } 2316 }
2317 static [_isHexDigit](char) { 2317 static [_isHexDigit$](char) {
2318 if (dart.notNull(Uri._NINE) >= dart.notNull(char)) 2318 if (dart.notNull(Uri._NINE) >= dart.notNull(char))
2319 return dart.notNull(Uri._ZERO) <= dart.notNull(char); 2319 return dart.notNull(Uri._ZERO) <= dart.notNull(char);
2320 char = 32; 2320 char = 32;
2321 return dart.notNull(Uri._LOWER_CASE_A) <= dart.notNull(char) && dart.notNu ll(Uri._LOWER_CASE_F) >= dart.notNull(char); 2321 return dart.notNull(Uri._LOWER_CASE_A) <= dart.notNull(char) && dart.notNu ll(Uri._LOWER_CASE_F) >= dart.notNull(char);
2322 } 2322 }
2323 static [_hexValue](char) { 2323 static [_hexValue$](char) {
2324 dart.assert(_isHexDigit(char)); 2324 dart.assert(_isHexDigit(char));
2325 if (dart.notNull(Uri._NINE) >= dart.notNull(char)) 2325 if (dart.notNull(Uri._NINE) >= dart.notNull(char))
2326 return dart.notNull(char) - dart.notNull(Uri._ZERO); 2326 return dart.notNull(char) - dart.notNull(Uri._ZERO);
2327 char = 32; 2327 char = 32;
2328 return dart.notNull(char) - (dart.notNull(Uri._LOWER_CASE_A) - 10); 2328 return dart.notNull(char) - (dart.notNull(Uri._LOWER_CASE_A) - 10);
2329 } 2329 }
2330 static [_normalizeEscape](source, index, lowerCase) { 2330 static [_normalizeEscape$](source, index, lowerCase) {
2331 dart.assert(source.codeUnitAt(index) === Uri._PERCENT); 2331 dart.assert(source.codeUnitAt(index) === Uri._PERCENT);
2332 if (dart.notNull(index) + 2 >= dart.notNull(source.length)) { 2332 if (dart.notNull(index) + 2 >= dart.notNull(source.length)) {
2333 return "%"; 2333 return "%";
2334 } 2334 }
2335 let firstDigit = source.codeUnitAt(dart.notNull(index) + 1); 2335 let firstDigit = source.codeUnitAt(dart.notNull(index) + 1);
2336 let secondDigit = source.codeUnitAt(dart.notNull(index) + 2); 2336 let secondDigit = source.codeUnitAt(dart.notNull(index) + 2);
2337 if (!dart.notNull(_isHexDigit(firstDigit)) || !dart.notNull(_isHexDigit(se condDigit))) { 2337 if (!dart.notNull(_isHexDigit(firstDigit)) || !dart.notNull(_isHexDigit(se condDigit))) {
2338 return "%"; 2338 return "%";
2339 } 2339 }
2340 let value = dart.notNull(_hexValue(firstDigit)) * 16 + dart.notNull(_hexVa lue(secondDigit)); 2340 let value = dart.notNull(_hexValue(firstDigit)) * 16 + dart.notNull(_hexVa lue(secondDigit));
2341 if (_isUnreservedChar(value)) { 2341 if (_isUnreservedChar(value)) {
2342 if (dart.notNull(lowerCase) && dart.notNull(Uri._UPPER_CASE_A) <= dart.n otNull(value) && dart.notNull(Uri._UPPER_CASE_Z) >= dart.notNull(value)) { 2342 if (dart.notNull(lowerCase) && dart.notNull(Uri._UPPER_CASE_A) <= dart.n otNull(value) && dart.notNull(Uri._UPPER_CASE_Z) >= dart.notNull(value)) {
2343 value = 32; 2343 value = 32;
2344 } 2344 }
2345 return new String.fromCharCode(value); 2345 return new String.fromCharCode(value);
2346 } 2346 }
2347 if (dart.notNull(firstDigit) >= dart.notNull(Uri._LOWER_CASE_A) || dart.no tNull(secondDigit) >= dart.notNull(Uri._LOWER_CASE_A)) { 2347 if (dart.notNull(firstDigit) >= dart.notNull(Uri._LOWER_CASE_A) || dart.no tNull(secondDigit) >= dart.notNull(Uri._LOWER_CASE_A)) {
2348 return source.substring(index, dart.notNull(index) + 3).toUpperCase(); 2348 return source.substring(index, dart.notNull(index) + 3).toUpperCase();
2349 } 2349 }
2350 return null; 2350 return null;
2351 } 2351 }
2352 static [_isUnreservedChar](ch) { 2352 static [_isUnreservedChar$](ch) {
2353 return dart.notNull(ch) < 127 && dart.notNull(!dart.equals(dart.dbinary(Ur i._unreservedTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15) ), 0)); 2353 return dart.notNull(ch) < 127 && dart.notNull(!dart.equals(dart.dbinary(Ur i._unreservedTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15) ), 0));
2354 } 2354 }
2355 static [_escapeChar](char) { 2355 static [_escapeChar$](char) {
2356 dart.assert(dart.dbinary(char, '<=', 1114111)); 2356 dart.assert(dart.dbinary(char, '<=', 1114111));
2357 let hexDigits = "0123456789ABCDEF"; 2357 let hexDigits = "0123456789ABCDEF";
2358 let codeUnits = null; 2358 let codeUnits = null;
2359 if (dart.dbinary(char, '<', 128)) { 2359 if (dart.dbinary(char, '<', 128)) {
2360 codeUnits = new List(3); 2360 codeUnits = new List(3);
2361 codeUnits.set(0, Uri._PERCENT); 2361 codeUnits.set(0, Uri._PERCENT);
2362 codeUnits.set(1, hexDigits.codeUnitAt(dart.as(dart.dbinary(char, '>>', 4 ), int))); 2362 codeUnits.set(1, hexDigits.codeUnitAt(dart.as(dart.dbinary(char, '>>', 4 ), int)));
2363 codeUnits.set(2, hexDigits.codeUnitAt(dart.as(dart.dbinary(char, '&', 15 ), int))); 2363 codeUnits.set(2, hexDigits.codeUnitAt(dart.as(dart.dbinary(char, '&', 15 ), int)));
2364 } else { 2364 } else {
2365 let flag = 192; 2365 let flag = 192;
(...skipping 12 matching lines...) Expand all
2378 let byte = dart.as(dart.dbinary(dart.dbinary(dart.dbinary(char, '>>', 6 * dart.notNull(encodedBytes)), '&', 63), '|', flag), int); 2378 let byte = dart.as(dart.dbinary(dart.dbinary(dart.dbinary(char, '>>', 6 * dart.notNull(encodedBytes)), '&', 63), '|', flag), int);
2379 codeUnits.set(index, Uri._PERCENT); 2379 codeUnits.set(index, Uri._PERCENT);
2380 codeUnits.set(dart.notNull(index) + 1, hexDigits.codeUnitAt(dart.notNu ll(byte) >> 4)); 2380 codeUnits.set(dart.notNull(index) + 1, hexDigits.codeUnitAt(dart.notNu ll(byte) >> 4));
2381 codeUnits.set(dart.notNull(index) + 2, hexDigits.codeUnitAt(dart.notNu ll(byte) & 15)); 2381 codeUnits.set(dart.notNull(index) + 2, hexDigits.codeUnitAt(dart.notNu ll(byte) & 15));
2382 index = 3; 2382 index = 3;
2383 flag = 128; 2383 flag = 128;
2384 } 2384 }
2385 } 2385 }
2386 return new String.fromCharCodes(dart.as(codeUnits, Iterable$(int))); 2386 return new String.fromCharCodes(dart.as(codeUnits, Iterable$(int)));
2387 } 2387 }
2388 static [_normalize](component, start, end, charTable) { 2388 static [_normalize$](component, start, end, charTable) {
2389 let buffer = null; 2389 let buffer = null;
2390 let sectionStart = start; 2390 let sectionStart = start;
2391 let index = start; 2391 let index = start;
2392 while (dart.notNull(index) < dart.notNull(end)) { 2392 while (dart.notNull(index) < dart.notNull(end)) {
2393 let char = component.codeUnitAt(index); 2393 let char = component.codeUnitAt(index);
2394 if (dart.notNull(char) < 127 && (dart.notNull(charTable.get(dart.notNull (char) >> 4)) & 1 << (dart.notNull(char) & 15)) !== 0) { 2394 if (dart.notNull(char) < 127 && (dart.notNull(charTable.get(dart.notNull (char) >> 4)) & 1 << (dart.notNull(char) & 15)) !== 0) {
2395 index = dart.notNull(index) + 1; 2395 index = dart.notNull(index) + 1;
2396 } else { 2396 } else {
2397 let replacement = null; 2397 let replacement = null;
2398 let sourceLength = null; 2398 let sourceLength = null;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 } 2432 }
2433 } 2433 }
2434 if (buffer === null) { 2434 if (buffer === null) {
2435 return component.substring(start, end); 2435 return component.substring(start, end);
2436 } 2436 }
2437 if (dart.notNull(sectionStart) < dart.notNull(end)) { 2437 if (dart.notNull(sectionStart) < dart.notNull(end)) {
2438 buffer.write(component.substring(sectionStart, end)); 2438 buffer.write(component.substring(sectionStart, end));
2439 } 2439 }
2440 return buffer.toString(); 2440 return buffer.toString();
2441 } 2441 }
2442 static [_isSchemeCharacter](ch) { 2442 static [_isSchemeCharacter$](ch) {
2443 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dbinary(Ur i._schemeTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0 )); 2443 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dbinary(Ur i._schemeTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0 ));
2444 } 2444 }
2445 static [_isGeneralDelimiter](ch) { 2445 static [_isGeneralDelimiter$](ch) {
2446 return dart.notNull(ch) <= dart.notNull(Uri._RIGHT_BRACKET) && dart.notNul l(!dart.equals(dart.dbinary(Uri._genDelimitersTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0)); 2446 return dart.notNull(ch) <= dart.notNull(Uri._RIGHT_BRACKET) && dart.notNul l(!dart.equals(dart.dbinary(Uri._genDelimitersTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0));
2447 } 2447 }
2448 get isAbsolute() { 2448 get isAbsolute() {
2449 return dart.notNull(!dart.equals(this.scheme, "")) && dart.notNull(dart.eq uals(this.fragment, "")); 2449 return dart.notNull(!dart.equals(this.scheme, "")) && dart.notNull(dart.eq uals(this.fragment, ""));
2450 } 2450 }
2451 [_merge](base, reference) { 2451 [_merge](base, reference) {
2452 if (base.isEmpty) 2452 if (base.isEmpty)
2453 return `/${reference}`; 2453 return `/${reference}`;
2454 let backCount = 0; 2454 let backCount = 0;
2455 let refStart = 0; 2455 let refStart = 0;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 if (dart.notNull(dart.equals(this.scheme, "")) || dart.notNull(this[_host] === null) || dart.notNull(dart.equals(this[_host], ""))) { 2570 if (dart.notNull(dart.equals(this.scheme, "")) || dart.notNull(this[_host] === null) || dart.notNull(dart.equals(this[_host], ""))) {
2571 throw new StateError(`Cannot use origin without a scheme: ${this}`); 2571 throw new StateError(`Cannot use origin without a scheme: ${this}`);
2572 } 2572 }
2573 if (dart.notNull(!dart.equals(this.scheme, "http")) && dart.notNull(!dart. equals(this.scheme, "https"))) { 2573 if (dart.notNull(!dart.equals(this.scheme, "http")) && dart.notNull(!dart. equals(this.scheme, "https"))) {
2574 throw new StateError(`Origin is only applicable schemes http and https: ${this}`); 2574 throw new StateError(`Origin is only applicable schemes http and https: ${this}`);
2575 } 2575 }
2576 if (this[_port] === null) 2576 if (this[_port] === null)
2577 return `${this.scheme}://${this[_host]}`; 2577 return `${this.scheme}://${this[_host]}`;
2578 return `${this.scheme}://${this[_host]}:${this[_port]}`; 2578 return `${this.scheme}://${this[_host]}:${this[_port]}`;
2579 } 2579 }
2580 toFilePath(opt$) { 2580 toFilePath(opts) {
2581 let windows = opt$ && 'windows' in opt$ ? opt$.windows : null; 2581 let windows = opts && 'windows' in opts ? opts.windows : null;
2582 if (dart.notNull(!dart.equals(this.scheme, "")) && dart.notNull(!dart.equa ls(this.scheme, "file"))) { 2582 if (dart.notNull(!dart.equals(this.scheme, "")) && dart.notNull(!dart.equa ls(this.scheme, "file"))) {
2583 throw new UnsupportedError(`Cannot extract a file path from a ${this.sch eme} URI`); 2583 throw new UnsupportedError(`Cannot extract a file path from a ${this.sch eme} URI`);
2584 } 2584 }
2585 if (!dart.equals(this.query, "")) { 2585 if (!dart.equals(this.query, "")) {
2586 throw new UnsupportedError("Cannot extract a file path from a URI with a query component"); 2586 throw new UnsupportedError("Cannot extract a file path from a URI with a query component");
2587 } 2587 }
2588 if (!dart.equals(this.fragment, "")) { 2588 if (!dart.equals(this.fragment, "")) {
2589 throw new UnsupportedError("Cannot extract a file path from a URI with a fragment component"); 2589 throw new UnsupportedError("Cannot extract a file path from a URI with a fragment component");
2590 } 2590 }
2591 if (windows === null) 2591 if (windows === null)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
2667 let uri = dart.as(other, Uri); 2667 let uri = dart.as(other, Uri);
2668 return dart.notNull(dart.equals(this.scheme, uri.scheme)) && this.hasAutho rity === uri.hasAuthority && dart.notNull(dart.equals(this.userInfo, uri.userInf o)) && dart.notNull(dart.equals(this.host, uri.host)) && this.port === uri.port && dart.notNull(dart.equals(this.path, uri.path)) && this.hasQuery === uri.hasQu ery && dart.notNull(dart.equals(this.query, uri.query)) && this.hasFragment === uri.hasFragment && dart.notNull(dart.equals(this.fragment, uri.fragment)); 2668 return dart.notNull(dart.equals(this.scheme, uri.scheme)) && this.hasAutho rity === uri.hasAuthority && dart.notNull(dart.equals(this.userInfo, uri.userInf o)) && dart.notNull(dart.equals(this.host, uri.host)) && this.port === uri.port && dart.notNull(dart.equals(this.path, uri.path)) && this.hasQuery === uri.hasQu ery && dart.notNull(dart.equals(this.query, uri.query)) && this.hasFragment === uri.hasFragment && dart.notNull(dart.equals(this.fragment, uri.fragment));
2669 } 2669 }
2670 get hashCode() { 2670 get hashCode() {
2671 // Function combine: (dynamic, dynamic) → int 2671 // Function combine: (dynamic, dynamic) → int
2672 function combine(part, current) { 2672 function combine(part, current) {
2673 return dart.as(dart.dbinary(dart.dbinary(dart.dbinary(current, '*', 31), '+', dart.dload(part, 'hashCode')), '&', 1073741823), int); 2673 return dart.as(dart.dbinary(dart.dbinary(dart.dbinary(current, '*', 31), '+', dart.dload(part, 'hashCode')), '&', 1073741823), int);
2674 } 2674 }
2675 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1)) ))))); 2675 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1)) )))));
2676 } 2676 }
2677 static [_addIfNonEmpty](sb, test, first, second) { 2677 static [_addIfNonEmpty$](sb, test, first, second) {
2678 if (!dart.equals("", test)) { 2678 if (!dart.equals("", test)) {
2679 sb.write(first); 2679 sb.write(first);
2680 sb.write(second); 2680 sb.write(second);
2681 } 2681 }
2682 } 2682 }
2683 static encodeComponent(component) { 2683 static encodeComponent(component) {
2684 return _uriEncode(dart.as(Uri._unreserved2396Table, List$(int)), component ); 2684 return _uriEncode(dart.as(Uri._unreserved2396Table, List$(int)), component );
2685 } 2685 }
2686 static encodeQueryComponent(component, opt$) { 2686 static encodeQueryComponent(component, opts) {
2687 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; 2687 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
2688 return _uriEncode(dart.as(Uri._unreservedTable, List$(int)), component, {e ncoding: encoding, spaceToPlus: true}); 2688 return _uriEncode(dart.as(Uri._unreservedTable, List$(int)), component, {e ncoding: encoding, spaceToPlus: true});
2689 } 2689 }
2690 static decodeComponent(encodedComponent) { 2690 static decodeComponent(encodedComponent) {
2691 return _uriDecode(encodedComponent); 2691 return _uriDecode(encodedComponent);
2692 } 2692 }
2693 static decodeQueryComponent(encodedComponent, opt$) { 2693 static decodeQueryComponent(encodedComponent, opts) {
2694 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; 2694 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
2695 return _uriDecode(encodedComponent, {plusToSpace: true, encoding: encoding }); 2695 return _uriDecode(encodedComponent, {plusToSpace: true, encoding: encoding });
2696 } 2696 }
2697 static encodeFull(uri) { 2697 static encodeFull(uri) {
2698 return _uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri); 2698 return _uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri);
2699 } 2699 }
2700 static decodeFull(uri) { 2700 static decodeFull(uri) {
2701 return _uriDecode(uri); 2701 return _uriDecode(uri);
2702 } 2702 }
2703 static splitQueryString(query, opt$) { 2703 static splitQueryString(query, opts) {
2704 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; 2704 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
2705 return dart.as(query.split("&").fold(dart.map(), dart.closureWrap((map, el ement) => { 2705 return dart.as(query.split("&").fold(dart.map(), dart.closureWrap((map, el ement) => {
2706 let index = dart.as(dart.dinvoke(element, 'indexOf', "="), int); 2706 let index = dart.as(dart.dinvoke(element, 'indexOf', "="), int);
2707 if (index === -1) { 2707 if (index === -1) {
2708 if (!dart.equals(element, "")) { 2708 if (!dart.equals(element, "")) {
2709 dart.dsetindex(map, decodeQueryComponent(dart.as(element, String), { encoding: encoding}), ""); 2709 dart.dsetindex(map, decodeQueryComponent(dart.as(element, String), { encoding: encoding}), "");
2710 } 2710 }
2711 } else if (index !== 0) { 2711 } else if (index !== 0) {
2712 let key = dart.dinvoke(element, 'substring', 0, index); 2712 let key = dart.dinvoke(element, 'substring', 0, index);
2713 let value = dart.dinvoke(element, 'substring', dart.notNull(index) + 1 ); 2713 let value = dart.dinvoke(element, 'substring', dart.notNull(index) + 1 );
2714 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), decodeQueryComponent(dart.as(value, String), {encoding: enco ding})); 2714 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), decodeQueryComponent(dart.as(value, String), {encoding: enco ding}));
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2823 index = 2; 2823 index = 2;
2824 } 2824 }
2825 } else { 2825 } else {
2826 bytes.set(index, dart.notNull(value) >> 8); 2826 bytes.set(index, dart.notNull(value) >> 8);
2827 bytes.set(dart.notNull(index) + 1, dart.notNull(value) & 255); 2827 bytes.set(dart.notNull(index) + 1, dart.notNull(value) & 255);
2828 index = 2; 2828 index = 2;
2829 } 2829 }
2830 } 2830 }
2831 return dart.as(bytes, List$(int)); 2831 return dart.as(bytes, List$(int));
2832 } 2832 }
2833 static [_uriEncode](canonicalTable, text, opt$) { 2833 static [_uriEncode$](canonicalTable, text, opts) {
2834 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; 2834 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
2835 let spaceToPlus = opt$ && 'spaceToPlus' in opt$ ? opt$.spaceToPlus : false ; 2835 let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false ;
2836 // Function byteToHex: (dynamic, dynamic) → dynamic 2836 // Function byteToHex: (dynamic, dynamic) → dynamic
2837 function byteToHex(byte, buffer) { 2837 function byteToHex(byte, buffer) {
2838 let hex = '0123456789ABCDEF'; 2838 let hex = '0123456789ABCDEF';
2839 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar y(byte, '>>', 4), int))); 2839 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar y(byte, '>>', 4), int)));
2840 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar y(byte, '&', 15), int))); 2840 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar y(byte, '&', 15), int)));
2841 } 2841 }
2842 let result = new StringBuffer(); 2842 let result = new StringBuffer();
2843 let bytes = encoding.encode(text); 2843 let bytes = encoding.encode(text);
2844 for (let i = 0; dart.notNull(i) < dart.notNull(bytes.length); i = dart.not Null(i) + 1) { 2844 for (let i = 0; dart.notNull(i) < dart.notNull(bytes.length); i = dart.not Null(i) + 1) {
2845 let byte = bytes.get(i); 2845 let byte = bytes.get(i);
2846 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable.get(dart.no tNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) !== 0) { 2846 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable.get(dart.no tNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) !== 0) {
2847 result.writeCharCode(byte); 2847 result.writeCharCode(byte);
2848 } else if (dart.notNull(spaceToPlus) && byte === Uri._SPACE) { 2848 } else if (dart.notNull(spaceToPlus) && byte === Uri._SPACE) {
2849 result.writeCharCode(Uri._PLUS); 2849 result.writeCharCode(Uri._PLUS);
2850 } else { 2850 } else {
2851 result.writeCharCode(Uri._PERCENT); 2851 result.writeCharCode(Uri._PERCENT);
2852 byteToHex(byte, result); 2852 byteToHex(byte, result);
2853 } 2853 }
2854 } 2854 }
2855 return result.toString(); 2855 return result.toString();
2856 } 2856 }
2857 static [_hexCharPairToByte](s, pos) { 2857 static [_hexCharPairToByte$](s, pos) {
2858 let byte = 0; 2858 let byte = 0;
2859 for (let i = 0; dart.notNull(i) < 2; i = dart.notNull(i) + 1) { 2859 for (let i = 0; dart.notNull(i) < 2; i = dart.notNull(i) + 1) {
2860 let charCode = s.codeUnitAt(dart.notNull(pos) + dart.notNull(i)); 2860 let charCode = s.codeUnitAt(dart.notNull(pos) + dart.notNull(i));
2861 if (48 <= dart.notNull(charCode) && dart.notNull(charCode) <= 57) { 2861 if (48 <= dart.notNull(charCode) && dart.notNull(charCode) <= 57) {
2862 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 48; 2862 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 48;
2863 } else { 2863 } else {
2864 charCode = 32; 2864 charCode = 32;
2865 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) { 2865 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) {
2866 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 87; 2866 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 87;
2867 } else { 2867 } else {
2868 throw new ArgumentError("Invalid URL encoding"); 2868 throw new ArgumentError("Invalid URL encoding");
2869 } 2869 }
2870 } 2870 }
2871 } 2871 }
2872 return byte; 2872 return byte;
2873 } 2873 }
2874 static [_uriDecode](text, opt$) { 2874 static [_uriDecode$](text, opts) {
2875 let plusToSpace = opt$ && 'plusToSpace' in opt$ ? opt$.plusToSpace : false ; 2875 let plusToSpace = opts && 'plusToSpace' in opts ? opts.plusToSpace : false ;
2876 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; 2876 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
2877 let simple = true; 2877 let simple = true;
2878 for (let i = 0; dart.notNull(i) < dart.notNull(text.length) && dart.notNul l(simple); i = dart.notNull(i) + 1) { 2878 for (let i = 0; dart.notNull(i) < dart.notNull(text.length) && dart.notNul l(simple); i = dart.notNull(i) + 1) {
2879 let codeUnit = text.codeUnitAt(i); 2879 let codeUnit = text.codeUnitAt(i);
2880 simple = codeUnit !== Uri._PERCENT && codeUnit !== Uri._PLUS; 2880 simple = codeUnit !== Uri._PERCENT && codeUnit !== Uri._PLUS;
2881 } 2881 }
2882 let bytes = null; 2882 let bytes = null;
2883 if (simple) { 2883 if (simple) {
2884 if (dart.notNull(dart.equals(encoding, convert.UTF8)) || dart.notNull(da rt.equals(encoding, convert.LATIN1))) { 2884 if (dart.notNull(dart.equals(encoding, convert.UTF8)) || dart.notNull(da rt.equals(encoding, convert.LATIN1))) {
2885 return text; 2885 return text;
2886 } else { 2886 } else {
(...skipping 14 matching lines...) Expand all
2901 i = 2; 2901 i = 2;
2902 } else if (dart.notNull(plusToSpace) && codeUnit === Uri._PLUS) { 2902 } else if (dart.notNull(plusToSpace) && codeUnit === Uri._PLUS) {
2903 bytes.add(Uri._SPACE); 2903 bytes.add(Uri._SPACE);
2904 } else { 2904 } else {
2905 bytes.add(codeUnit); 2905 bytes.add(codeUnit);
2906 } 2906 }
2907 } 2907 }
2908 } 2908 }
2909 return encoding.decode(bytes); 2909 return encoding.decode(bytes);
2910 } 2910 }
2911 static [_isAlphabeticCharacter](codeUnit) { 2911 static [_isAlphabeticCharacter$](codeUnit) {
2912 return dart.notNull(codeUnit) >= dart.notNull(Uri._LOWER_CASE_A) && dart.n otNull(codeUnit) <= dart.notNull(Uri._LOWER_CASE_Z) || dart.notNull(codeUnit) >= dart.notNull(Uri._UPPER_CASE_A) && dart.notNull(codeUnit) <= dart.notNull(Uri._ UPPER_CASE_Z); 2912 return dart.notNull(codeUnit) >= dart.notNull(Uri._LOWER_CASE_A) && dart.n otNull(codeUnit) <= dart.notNull(Uri._LOWER_CASE_Z) || dart.notNull(codeUnit) >= dart.notNull(Uri._UPPER_CASE_A) && dart.notNull(codeUnit) <= dart.notNull(Uri._ UPPER_CASE_Z);
2913 } 2913 }
2914 } 2914 }
2915 dart.defineNamedConstructor(Uri, '_internal'); 2915 dart.defineNamedConstructor(Uri, '_internal');
2916 dart.defineNamedConstructor(Uri, 'http'); 2916 dart.defineNamedConstructor(Uri, 'http');
2917 dart.defineNamedConstructor(Uri, 'https'); 2917 dart.defineNamedConstructor(Uri, 'https');
2918 dart.defineNamedConstructor(Uri, 'file'); 2918 dart.defineNamedConstructor(Uri, 'file');
2919 Uri._SPACE = 32; 2919 Uri._SPACE = 32;
2920 Uri._DOUBLE_QUOTE = 34; 2920 Uri._DOUBLE_QUOTE = 34;
2921 Uri._NUMBER_SIGN = 35; 2921 Uri._NUMBER_SIGN = 35;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3032 exports.StackTrace = StackTrace; 3032 exports.StackTrace = StackTrace;
3033 exports.Stopwatch = Stopwatch; 3033 exports.Stopwatch = Stopwatch;
3034 exports.String = String; 3034 exports.String = String;
3035 exports.RuneIterator = RuneIterator; 3035 exports.RuneIterator = RuneIterator;
3036 exports.StringBuffer = StringBuffer; 3036 exports.StringBuffer = StringBuffer;
3037 exports.StringSink = StringSink; 3037 exports.StringSink = StringSink;
3038 exports.Symbol = Symbol; 3038 exports.Symbol = Symbol;
3039 exports.Type = Type; 3039 exports.Type = Type;
3040 exports.Uri = Uri; 3040 exports.Uri = Uri;
3041 })(core || (core = {})); 3041 })(core || (core = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698