| OLD | NEW |
| 1 var convert; | 1 var convert; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 let ASCII = new AsciiCodec(); | 4 let ASCII = new AsciiCodec(); |
| 5 let _ASCII_MASK = 127; | 5 let _ASCII_MASK = 127; |
| 6 let _allowInvalid = Symbol('_allowInvalid'); | 6 let _allowInvalid = Symbol('_allowInvalid'); |
| 7 let _nameToEncoding = Symbol('_nameToEncoding'); | 7 let _nameToEncoding = Symbol('_nameToEncoding'); |
| 8 let Codec$ = dart.generic(function(S, T) { | 8 let Codec$ = dart.generic(function(S, T) { |
| 9 class Codec extends core.Object { | 9 class Codec extends core.Object { |
| 10 Codec() { | 10 Codec() { |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 this[_sink] = sink; | 327 this[_sink] = sink; |
| 328 super.ByteConversionSinkBase(); | 328 super.ByteConversionSinkBase(); |
| 329 } | 329 } |
| 330 add(chunk) { | 330 add(chunk) { |
| 331 return this[_sink].add(chunk); | 331 return this[_sink].add(chunk); |
| 332 } | 332 } |
| 333 close() { | 333 close() { |
| 334 return this[_sink].close(); | 334 return this[_sink].close(); |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 let _INITIAL_BUFFER_SIZE = Symbol('_INITIAL_BUFFER_SIZE'); |
| 337 let _buffer = Symbol('_buffer'); | 338 let _buffer = Symbol('_buffer'); |
| 338 let _INITIAL_BUFFER_SIZE = Symbol('_INITIAL_BUFFER_SIZE'); | |
| 339 let _callback = Symbol('_callback'); | 339 let _callback = Symbol('_callback'); |
| 340 let _bufferIndex = Symbol('_bufferIndex'); | 340 let _bufferIndex = Symbol('_bufferIndex'); |
| 341 let _roundToPowerOf2 = Symbol('_roundToPowerOf2'); | 341 let _roundToPowerOf2 = Symbol('_roundToPowerOf2'); |
| 342 class _ByteCallbackSink extends ByteConversionSinkBase { | 342 class _ByteCallbackSink extends ByteConversionSinkBase { |
| 343 _ByteCallbackSink(callback) { | 343 _ByteCallbackSink(callback) { |
| 344 this[_buffer] = new typed_data.Uint8List(_ByteCallbackSink[_INITIAL_BUFFER
_SIZE]); | 344 this[_buffer] = new typed_data.Uint8List(_ByteCallbackSink[_INITIAL_BUFFER
_SIZE]); |
| 345 this[_callback] = callback; | 345 this[_callback] = callback; |
| 346 this[_bufferIndex] = 0; | 346 this[_bufferIndex] = 0; |
| 347 super.ByteConversionSinkBase(); | 347 super.ByteConversionSinkBase(); |
| 348 } | 348 } |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 491 } |
| 492 } | 492 } |
| 493 return _FusedConverter; | 493 return _FusedConverter; |
| 494 }); | 494 }); |
| 495 let _FusedConverter = _FusedConverter$(); | 495 let _FusedConverter = _FusedConverter$(); |
| 496 let HTML_ESCAPE = new HtmlEscape(); | 496 let HTML_ESCAPE = new HtmlEscape(); |
| 497 let _ = Symbol('_'); | 497 let _ = Symbol('_'); |
| 498 let _name = Symbol('_name'); | 498 let _name = Symbol('_name'); |
| 499 class HtmlEscapeMode extends core.Object { | 499 class HtmlEscapeMode extends core.Object { |
| 500 [_](name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) { | 500 [_](name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) { |
| 501 this[_name] = name; | 501 dart.initField(HtmlEscapeMode, this, _name, name); |
| 502 this.escapeLtGt = escapeLtGt; | 502 dart.initField(HtmlEscapeMode, this, 'escapeLtGt', escapeLtGt); |
| 503 this.escapeQuot = escapeQuot; | 503 dart.initField(HtmlEscapeMode, this, 'escapeQuot', escapeQuot); |
| 504 this.escapeApos = escapeApos; | 504 dart.initField(HtmlEscapeMode, this, 'escapeApos', escapeApos); |
| 505 this.escapeSlash = escapeSlash; | 505 dart.initField(HtmlEscapeMode, this, 'escapeSlash', escapeSlash); |
| 506 } | 506 } |
| 507 toString() { | 507 toString() { |
| 508 return this[_name]; | 508 return this[_name]; |
| 509 } | 509 } |
| 510 } | 510 } |
| 511 dart.defineNamedConstructor(HtmlEscapeMode, _); | 511 dart.defineNamedConstructor(HtmlEscapeMode, _); |
| 512 HtmlEscapeMode.UNKNOWN = new HtmlEscapeMode[_]('unknown', true, true, true, tr
ue); | 512 HtmlEscapeMode.UNKNOWN = new HtmlEscapeMode[_]('unknown', true, true, true, tr
ue); |
| 513 HtmlEscapeMode.ATTRIBUTE = new HtmlEscapeMode[_]('attribute', false, true, fal
se, false); | 513 HtmlEscapeMode.ATTRIBUTE = new HtmlEscapeMode[_]('attribute', false, true, fal
se, false); |
| 514 HtmlEscapeMode.ELEMENT = new HtmlEscapeMode[_]('element', true, false, false,
true); | 514 HtmlEscapeMode.ELEMENT = new HtmlEscapeMode[_]('element', true, false, false,
true); |
| 515 let _convert = Symbol('_convert'); | 515 let _convert = Symbol('_convert'); |
| 516 class HtmlEscape extends Converter$(core.String, core.String) { | 516 class HtmlEscape extends Converter$(core.String, core.String) { |
| 517 HtmlEscape(mode) { | 517 HtmlEscape(mode) { |
| 518 if (mode === void 0) | 518 if (mode === void 0) |
| 519 mode = HtmlEscapeMode.UNKNOWN; | 519 mode = HtmlEscapeMode.UNKNOWN; |
| 520 this.mode = mode; | 520 dart.initField(HtmlEscape, this, 'mode', mode); |
| 521 super.Converter(); | 521 super.Converter(); |
| 522 } | 522 } |
| 523 convert(text) { | 523 convert(text) { |
| 524 let val = this[_convert](text, 0, text.length); | 524 let val = this[_convert](text, 0, text.length); |
| 525 return val == null ? text : val; | 525 return val == null ? text : val; |
| 526 } | 526 } |
| 527 [_convert](text, start, end) { | 527 [_convert](text, start, end) { |
| 528 let result = null; | 528 let result = null; |
| 529 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(
i) + 1) { | 529 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(
i) + 1) { |
| 530 let ch = core.String.get(text, i); | 530 let ch = core.String.get(text, i); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 this[_sink].close(); | 605 this[_sink].close(); |
| 606 } | 606 } |
| 607 } | 607 } |
| 608 close() { | 608 close() { |
| 609 return this[_sink].close(); | 609 return this[_sink].close(); |
| 610 } | 610 } |
| 611 } | 611 } |
| 612 class JsonUnsupportedObjectError extends core.Error { | 612 class JsonUnsupportedObjectError extends core.Error { |
| 613 JsonUnsupportedObjectError(unsupportedObject, opts) { | 613 JsonUnsupportedObjectError(unsupportedObject, opts) { |
| 614 let cause = opts && 'cause' in opts ? opts.cause : null; | 614 let cause = opts && 'cause' in opts ? opts.cause : null; |
| 615 this.unsupportedObject = unsupportedObject; | 615 dart.initField(JsonUnsupportedObjectError, this, 'unsupportedObject', unsu
pportedObject); |
| 616 this.cause = cause; | 616 dart.initField(JsonUnsupportedObjectError, this, 'cause', cause); |
| 617 super.Error(); | 617 super.Error(); |
| 618 } | 618 } |
| 619 toString() { | 619 toString() { |
| 620 if (this.cause != null) { | 620 if (this.cause != null) { |
| 621 return "Converting object to an encodable object failed."; | 621 return "Converting object to an encodable object failed."; |
| 622 } else { | 622 } else { |
| 623 return "Converting object did not return an encodable object."; | 623 return "Converting object did not return an encodable object."; |
| 624 } | 624 } |
| 625 } | 625 } |
| 626 } | 626 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 return new JsonDecoder(); | 674 return new JsonDecoder(); |
| 675 return new JsonDecoder(this[_reviver]); | 675 return new JsonDecoder(this[_reviver]); |
| 676 } | 676 } |
| 677 } | 677 } |
| 678 dart.defineNamedConstructor(JsonCodec, 'withReviver'); | 678 dart.defineNamedConstructor(JsonCodec, 'withReviver'); |
| 679 let _utf8Encode = Symbol('_utf8Encode'); | 679 let _utf8Encode = Symbol('_utf8Encode'); |
| 680 class JsonEncoder extends Converter$(core.Object, core.String) { | 680 class JsonEncoder extends Converter$(core.Object, core.String) { |
| 681 JsonEncoder(toEncodable) { | 681 JsonEncoder(toEncodable) { |
| 682 if (toEncodable === void 0) | 682 if (toEncodable === void 0) |
| 683 toEncodable = null; | 683 toEncodable = null; |
| 684 this.indent = null; | 684 dart.initField(JsonEncoder, this, 'indent', null); |
| 685 this[_toEncodable$] = toEncodable; | 685 this[_toEncodable$] = toEncodable; |
| 686 super.Converter(); | 686 super.Converter(); |
| 687 } | 687 } |
| 688 withIndent(indent, toEncodable) { | 688 withIndent(indent, toEncodable) { |
| 689 if (toEncodable === void 0) | 689 if (toEncodable === void 0) |
| 690 toEncodable = null; | 690 toEncodable = null; |
| 691 this.indent = indent; | 691 dart.initField(JsonEncoder, this, 'indent', indent); |
| 692 this[_toEncodable$] = toEncodable; | 692 this[_toEncodable$] = toEncodable; |
| 693 super.Converter(); | 693 super.Converter(); |
| 694 } | 694 } |
| 695 convert(object) { | 695 convert(object) { |
| 696 return _JsonStringStringifier.stringify(object, dart.as(this[_toEncodable$
], dart.functionType(dart.dynamic, [dart.dynamic])), this.indent); | 696 return _JsonStringStringifier.stringify(object, dart.as(this[_toEncodable$
], dart.functionType(dart.dynamic, [dart.dynamic])), this.indent); |
| 697 } | 697 } |
| 698 startChunkedConversion(sink) { | 698 startChunkedConversion(sink) { |
| 699 if (!dart.is(sink, StringConversionSink)) { | 699 if (!dart.is(sink, StringConversionSink)) { |
| 700 sink = new StringConversionSink.from(sink); | 700 sink = new StringConversionSink.from(sink); |
| 701 } else if (dart.is(sink, _Utf8EncoderSink)) { | 701 } else if (dart.is(sink, _Utf8EncoderSink)) { |
| (...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2434 exports.LineSplitter = LineSplitter; | 2434 exports.LineSplitter = LineSplitter; |
| 2435 exports.StringConversionSink = StringConversionSink; | 2435 exports.StringConversionSink = StringConversionSink; |
| 2436 exports.ClosableStringSink = ClosableStringSink; | 2436 exports.ClosableStringSink = ClosableStringSink; |
| 2437 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; | 2437 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; |
| 2438 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; | 2438 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; |
| 2439 exports.UTF8 = UTF8; | 2439 exports.UTF8 = UTF8; |
| 2440 exports.Utf8Codec = Utf8Codec; | 2440 exports.Utf8Codec = Utf8Codec; |
| 2441 exports.Utf8Encoder = Utf8Encoder; | 2441 exports.Utf8Encoder = Utf8Encoder; |
| 2442 exports.Utf8Decoder = Utf8Decoder; | 2442 exports.Utf8Decoder = Utf8Decoder; |
| 2443 })(convert || (convert = {})); | 2443 })(convert || (convert = {})); |
| OLD | NEW |