diff --git a/pandora_console/general/pandora_help.php b/pandora_console/general/pandora_help.php
index 23e4582948..aa15e3107e 100644
--- a/pandora_console/general/pandora_help.php
+++ b/pandora_console/general/pandora_help.php
@@ -32,12 +32,12 @@ require_once ("../include/functions_html.php");
$id = get_parameter ('id');
-if (! isset($_SESSION[$config['homeurl_static']]['id_usuario'])) {
+if (! isset($_SESSION['id_usuario'])) {
session_start();
session_write_close();
}
-$user_language = get_user_language ($_SESSION[$config['homeurl_static']]['id_usuario']);
+$user_language = get_user_language ($_SESSION['id_usuario']);
if (file_exists ('../include/languages/'.$user_language.'.mo')) {
$l10n = new gettext_reader (new CachedFileReader ('../include/languages/'.$user_language.'.mo'));
diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index 7df30ede70..17960c12e8 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -1084,7 +1084,7 @@ if ($update_module || $create_module) {
$throw_unknown_events = (bool)get_parameter('throw_unknown_events', false);
//Set the event type that can show.
- $disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
+ $disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
$disabled_types_event = io_json_mb_encode($disabled_types_event);
$module_macro_names = (array) get_parameter('module_macro_names', array());
diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php
index a00ba50f3b..04814ed1b6 100755
--- a/pandora_console/godmode/massive/massive_delete_modules.php
+++ b/pandora_console/godmode/massive/massive_delete_modules.php
@@ -394,9 +394,9 @@ $table->style[2] = 'font-weight: bold';
$table->data['selection_mode'][0] = __('Selection mode');
-$table->data['selection_mode'][1] = __('Select modules first') . ' ' .
+$table->data['selection_mode'][1] = ''.__('Select modules first ') . '' .
html_print_radio_button_extended ("selection_mode", 'modules', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true).'
';
-$table->data['selection_mode'][1] .= __('Select agents first') . ' ' .
+$table->data['selection_mode'][1] .= ''.__('Select agents first ') . '' .
html_print_radio_button_extended ("selection_mode", 'agents', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true);
diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php
index 308f462e97..bfc3aab6de 100755
--- a/pandora_console/godmode/massive/massive_edit_modules.php
+++ b/pandora_console/godmode/massive/massive_edit_modules.php
@@ -237,9 +237,9 @@ $table->data = array ();
$table->data['selection_mode'][0] = __('Selection mode');
-$table->data['selection_mode'][1] = __('Select modules first') . ' ' .
+$table->data['selection_mode'][1] = ''.__('Select modules first ') . '' .
html_print_radio_button_extended ("selection_mode", 'modules', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true).'
';
-$table->data['selection_mode'][1] .= __('Select agents first') . ' ' .
+$table->data['selection_mode'][1] .= ''.__('Select agents first ') . '' .
html_print_radio_button_extended ("selection_mode", 'agents', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true);
diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
index 25a4660e1e..828800fca7 100755
--- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php
+++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
@@ -142,6 +142,7 @@ switch ($action) {
case 'general':
case 'network_interfaces_report':
case 'availability':
+ case 'event_report_log':
case 'availability_graph':
case 'agent_module':
$get_data_editor = true;
@@ -193,7 +194,9 @@ switch ($action) {
$idAgentModule = $item['id_agent_module'];
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule));
break;
-
+ case 'event_report_log':
+ $period = $item['period'];
+ $description = $item['description'];
case 'simple_graph':
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
$percentil = isset($style['percentil']) ? $config['percentil'] : 0;
@@ -569,6 +572,7 @@ switch ($action) {
case 'MTBF':
case 'MTTR':
case 'simple_baseline_graph':
+ case 'event_report_log':
$label = (isset($style['label'])) ? $style['label'] : '';
break;
default:
@@ -632,7 +636,12 @@ You can of course remove the warnings, that's why we include the source and do n
echo '';
}
?>
+ ' . html_print_image ("images/tip.png", true, array('title' => $text)) . '';
+ ?>
+
|
@@ -2534,6 +2544,7 @@ function chooseType() {
$("#row_last_value").hide();
$("#row_filter_search").hide();
$("#row_percentil").hide();
+ $("#log_help_tip").css("visibility", "hidden");
$("#agents_row").hide();
$("#select_agent_modules").hide();
$("#modules_row").hide();
@@ -2556,6 +2567,30 @@ function chooseType() {
$('#agent_autocomplete_events').show();
switch (type) {
+ case 'event_report_group':
+ $("#row_description").show();
+ $("#row_period").show();
+ $("#row_servers").show();
+ $("#row_group").show();
+ $("#row_show_in_two_columns").show();
+ $("#row_event_filter").show();
+ $("#row_event_graphs").show();
+
+ $("#row_event_graph_by_agent").show();
+ $("#row_event_graph_by_user").show();
+ $("#row_event_graph_by_criticity").show();
+ $("#row_event_graph_by_validated").show();
+
+ $("#row_filter_search").show();
+ break;
+
+ case 'event_report_log':
+ $("#log_help_tip").css("visibility", "visible");
+ $("#row_description").show();
+ $("#row_period").show();
+ $("#row_agent").show();
+ break;
+
case 'simple_graph':
$("#row_time_compare_overlapped").show();
$("#row_only_avg").show();
diff --git a/pandora_console/include/ehorus/bundle.js b/pandora_console/include/ehorus/bundle.js
index afd424e8f2..5336b4c2ae 100644
--- a/pandora_console/include/ehorus/bundle.js
+++ b/pandora_console/include/ehorus/bundle.js
@@ -1,34 +1,36 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0) continue;
+ if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
+ target[i] = obj[i];
+ }
+
+ return target;
+};
+
+exports.__esModule = true;
+},{}],26:[function(require,module,exports){
"use strict";
var _getIterator = require("babel-runtime/core-js/get-iterator")["default"];
@@ -209,7 +268,7 @@ exports["default"] = (function () {
})();
exports.__esModule = true;
-},{"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/is-iterable":3}],23:[function(require,module,exports){
+},{"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/is-iterable":3}],27:[function(require,module,exports){
"use strict";
var _Array$from = require("babel-runtime/core-js/array/from")["default"];
@@ -225,133 +284,7 @@ exports["default"] = function (arr) {
};
exports.__esModule = true;
-},{"babel-runtime/core-js/array/from":1}],24:[function(require,module,exports){
-var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-
-;(function (exports) {
- 'use strict';
-
- var Arr = (typeof Uint8Array !== 'undefined')
- ? Uint8Array
- : Array
-
- var PLUS = '+'.charCodeAt(0)
- var SLASH = '/'.charCodeAt(0)
- var NUMBER = '0'.charCodeAt(0)
- var LOWER = 'a'.charCodeAt(0)
- var UPPER = 'A'.charCodeAt(0)
- var PLUS_URL_SAFE = '-'.charCodeAt(0)
- var SLASH_URL_SAFE = '_'.charCodeAt(0)
-
- function decode (elt) {
- var code = elt.charCodeAt(0)
- if (code === PLUS ||
- code === PLUS_URL_SAFE)
- return 62 // '+'
- if (code === SLASH ||
- code === SLASH_URL_SAFE)
- return 63 // '/'
- if (code < NUMBER)
- return -1 //no match
- if (code < NUMBER + 10)
- return code - NUMBER + 26 + 26
- if (code < UPPER + 26)
- return code - UPPER
- if (code < LOWER + 26)
- return code - LOWER + 26
- }
-
- function b64ToByteArray (b64) {
- var i, j, l, tmp, placeHolders, arr
-
- if (b64.length % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4')
- }
-
- // the number of equal signs (place holders)
- // if there are two placeholders, than the two characters before it
- // represent one byte
- // if there is only one, then the three characters before it represent 2 bytes
- // this is just a cheap hack to not do indexOf twice
- var len = b64.length
- placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
-
- // base64 is 4/3 + up to two characters of the original data
- arr = new Arr(b64.length * 3 / 4 - placeHolders)
-
- // if there are placeholders, only get up to the last complete 4 chars
- l = placeHolders > 0 ? b64.length - 4 : b64.length
-
- var L = 0
-
- function push (v) {
- arr[L++] = v
- }
-
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
- tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
- push((tmp & 0xFF0000) >> 16)
- push((tmp & 0xFF00) >> 8)
- push(tmp & 0xFF)
- }
-
- if (placeHolders === 2) {
- tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
- push(tmp & 0xFF)
- } else if (placeHolders === 1) {
- tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
- push((tmp >> 8) & 0xFF)
- push(tmp & 0xFF)
- }
-
- return arr
- }
-
- function uint8ToBase64 (uint8) {
- var i,
- extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
- output = "",
- temp, length
-
- function encode (num) {
- return lookup.charAt(num)
- }
-
- function tripletToBase64 (num) {
- return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
- }
-
- // go through the array every three bytes, we'll deal with trailing stuff later
- for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
- temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
- output += tripletToBase64(temp)
- }
-
- // pad the end with zeros, but make sure to not forget the extra bytes
- switch (extraBytes) {
- case 1:
- temp = uint8[uint8.length - 1]
- output += encode(temp >> 2)
- output += encode((temp << 4) & 0x3F)
- output += '=='
- break
- case 2:
- temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
- output += encode(temp >> 10)
- output += encode((temp >> 4) & 0x3F)
- output += encode((temp << 2) & 0x3F)
- output += '='
- break
- }
-
- return output
- }
-
- exports.toByteArray = b64ToByteArray
- exports.fromByteArray = uint8ToBase64
-}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
-
-},{}],25:[function(require,module,exports){
+},{"babel-runtime/core-js/array/from":1}],28:[function(require,module,exports){
/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
@@ -629,1569 +562,45 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
return bowser
});
-},{}],26:[function(require,module,exports){
-
-},{}],27:[function(require,module,exports){
-(function (global){
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh
- * @license MIT
- */
-/* eslint-disable no-proto */
-
-'use strict'
-
-var base64 = require('base64-js')
-var ieee754 = require('ieee754')
-var isArray = require('isarray')
-
-exports.Buffer = Buffer
-exports.SlowBuffer = SlowBuffer
-exports.INSPECT_MAX_BYTES = 50
-Buffer.poolSize = 8192 // not used by this implementation
-
-var rootParent = {}
-
-/**
- * If `Buffer.TYPED_ARRAY_SUPPORT`:
- * === true Use Uint8Array implementation (fastest)
- * === false Use Object implementation (most compatible, even IE6)
- *
- * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
- * Opera 11.6+, iOS 4.2+.
- *
- * Due to various browser bugs, sometimes the Object implementation will be used even
- * when the browser supports typed arrays.
- *
- * Note:
- *
- * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
- * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
- *
- * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property
- * on objects.
- *
- * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
- *
- * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
- * incorrect length in some situations.
-
- * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
- * get the Object implementation, which is slower but behaves correctly.
- */
-Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
- ? global.TYPED_ARRAY_SUPPORT
- : typedArraySupport()
-
-function typedArraySupport () {
- function Bar () {}
- try {
- var arr = new Uint8Array(1)
- arr.foo = function () { return 42 }
- arr.constructor = Bar
- return arr.foo() === 42 && // typed array instances can be augmented
- arr.constructor === Bar && // constructor can be set
- typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
- arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
- } catch (e) {
- return false
- }
-}
-
-function kMaxLength () {
- return Buffer.TYPED_ARRAY_SUPPORT
- ? 0x7fffffff
- : 0x3fffffff
-}
-
-/**
- * Class: Buffer
- * =============
- *
- * The Buffer constructor returns instances of `Uint8Array` that are augmented
- * with function properties for all the node `Buffer` API functions. We use
- * `Uint8Array` so that square bracket notation works as expected -- it returns
- * a single octet.
- *
- * By augmenting the instances, we can avoid modifying the `Uint8Array`
- * prototype.
- */
-function Buffer (arg) {
- if (!(this instanceof Buffer)) {
- // Avoid going through an ArgumentsAdaptorTrampoline in the common case.
- if (arguments.length > 1) return new Buffer(arg, arguments[1])
- return new Buffer(arg)
- }
-
- if (!Buffer.TYPED_ARRAY_SUPPORT) {
- this.length = 0
- this.parent = undefined
- }
-
- // Common case.
- if (typeof arg === 'number') {
- return fromNumber(this, arg)
- }
-
- // Slightly less common case.
- if (typeof arg === 'string') {
- return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')
- }
-
- // Unusual.
- return fromObject(this, arg)
-}
-
-function fromNumber (that, length) {
- that = allocate(that, length < 0 ? 0 : checked(length) | 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < length; i++) {
- that[i] = 0
- }
- }
- return that
-}
-
-function fromString (that, string, encoding) {
- if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'
-
- // Assumption: byteLength() return value is always < kMaxLength.
- var length = byteLength(string, encoding) | 0
- that = allocate(that, length)
-
- that.write(string, encoding)
- return that
-}
-
-function fromObject (that, object) {
- if (Buffer.isBuffer(object)) return fromBuffer(that, object)
-
- if (isArray(object)) return fromArray(that, object)
-
- if (object == null) {
- throw new TypeError('must start with number, buffer, array or string')
- }
-
- if (typeof ArrayBuffer !== 'undefined') {
- if (object.buffer instanceof ArrayBuffer) {
- return fromTypedArray(that, object)
- }
- if (object instanceof ArrayBuffer) {
- return fromArrayBuffer(that, object)
- }
- }
-
- if (object.length) return fromArrayLike(that, object)
-
- return fromJsonObject(that, object)
-}
-
-function fromBuffer (that, buffer) {
- var length = checked(buffer.length) | 0
- that = allocate(that, length)
- buffer.copy(that, 0, 0, length)
- return that
-}
-
-function fromArray (that, array) {
- var length = checked(array.length) | 0
- that = allocate(that, length)
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255
- }
- return that
-}
-
-// Duplicate of fromArray() to keep fromArray() monomorphic.
-function fromTypedArray (that, array) {
- var length = checked(array.length) | 0
- that = allocate(that, length)
- // Truncating the elements is probably not what people expect from typed
- // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior
- // of the old Buffer constructor.
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255
- }
- return that
-}
-
-function fromArrayBuffer (that, array) {
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- array.byteLength
- that = Buffer._augment(new Uint8Array(array))
- } else {
- // Fallback: Return an object instance of the Buffer class
- that = fromTypedArray(that, new Uint8Array(array))
- }
- return that
-}
-
-function fromArrayLike (that, array) {
- var length = checked(array.length) | 0
- that = allocate(that, length)
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255
- }
- return that
-}
-
-// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.
-// Returns a zero-length buffer for inputs that don't conform to the spec.
-function fromJsonObject (that, object) {
- var array
- var length = 0
-
- if (object.type === 'Buffer' && isArray(object.data)) {
- array = object.data
- length = checked(array.length) | 0
- }
- that = allocate(that, length)
-
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255
- }
- return that
-}
-
-if (Buffer.TYPED_ARRAY_SUPPORT) {
- Buffer.prototype.__proto__ = Uint8Array.prototype
- Buffer.__proto__ = Uint8Array
-} else {
- // pre-set for values that may exist in the future
- Buffer.prototype.length = undefined
- Buffer.prototype.parent = undefined
-}
-
-function allocate (that, length) {
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = Buffer._augment(new Uint8Array(length))
- that.__proto__ = Buffer.prototype
- } else {
- // Fallback: Return an object instance of the Buffer class
- that.length = length
- that._isBuffer = true
- }
-
- var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1
- if (fromPool) that.parent = rootParent
-
- return that
-}
-
-function checked (length) {
- // Note: cannot use `length < kMaxLength` here because that fails when
- // length is NaN (which is otherwise coerced to zero.)
- if (length >= kMaxLength()) {
- throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
- 'size: 0x' + kMaxLength().toString(16) + ' bytes')
- }
- return length | 0
-}
-
-function SlowBuffer (subject, encoding) {
- if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)
-
- var buf = new Buffer(subject, encoding)
- delete buf.parent
- return buf
-}
-
-Buffer.isBuffer = function isBuffer (b) {
- return !!(b != null && b._isBuffer)
-}
-
-Buffer.compare = function compare (a, b) {
- if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
- throw new TypeError('Arguments must be Buffers')
- }
-
- if (a === b) return 0
-
- var x = a.length
- var y = b.length
-
- var i = 0
- var len = Math.min(x, y)
- while (i < len) {
- if (a[i] !== b[i]) break
-
- ++i
- }
-
- if (i !== len) {
- x = a[i]
- y = b[i]
- }
-
- if (x < y) return -1
- if (y < x) return 1
- return 0
-}
-
-Buffer.isEncoding = function isEncoding (encoding) {
- switch (String(encoding).toLowerCase()) {
- case 'hex':
- case 'utf8':
- case 'utf-8':
- case 'ascii':
- case 'binary':
- case 'base64':
- case 'raw':
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return true
- default:
- return false
- }
-}
-
-Buffer.concat = function concat (list, length) {
- if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')
-
- if (list.length === 0) {
- return new Buffer(0)
- }
-
- var i
- if (length === undefined) {
- length = 0
- for (i = 0; i < list.length; i++) {
- length += list[i].length
- }
- }
-
- var buf = new Buffer(length)
- var pos = 0
- for (i = 0; i < list.length; i++) {
- var item = list[i]
- item.copy(buf, pos)
- pos += item.length
- }
- return buf
-}
-
-function byteLength (string, encoding) {
- if (typeof string !== 'string') string = '' + string
-
- var len = string.length
- if (len === 0) return 0
-
- // Use a for loop to avoid recursion
- var loweredCase = false
- for (;;) {
- switch (encoding) {
- case 'ascii':
- case 'binary':
- // Deprecated
- case 'raw':
- case 'raws':
- return len
- case 'utf8':
- case 'utf-8':
- return utf8ToBytes(string).length
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return len * 2
- case 'hex':
- return len >>> 1
- case 'base64':
- return base64ToBytes(string).length
- default:
- if (loweredCase) return utf8ToBytes(string).length // assume utf8
- encoding = ('' + encoding).toLowerCase()
- loweredCase = true
- }
- }
-}
-Buffer.byteLength = byteLength
-
-function slowToString (encoding, start, end) {
- var loweredCase = false
-
- start = start | 0
- end = end === undefined || end === Infinity ? this.length : end | 0
-
- if (!encoding) encoding = 'utf8'
- if (start < 0) start = 0
- if (end > this.length) end = this.length
- if (end <= start) return ''
-
- while (true) {
- switch (encoding) {
- case 'hex':
- return hexSlice(this, start, end)
-
- case 'utf8':
- case 'utf-8':
- return utf8Slice(this, start, end)
-
- case 'ascii':
- return asciiSlice(this, start, end)
-
- case 'binary':
- return binarySlice(this, start, end)
-
- case 'base64':
- return base64Slice(this, start, end)
-
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return utf16leSlice(this, start, end)
-
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
- encoding = (encoding + '').toLowerCase()
- loweredCase = true
- }
- }
-}
-
-Buffer.prototype.toString = function toString () {
- var length = this.length | 0
- if (length === 0) return ''
- if (arguments.length === 0) return utf8Slice(this, 0, length)
- return slowToString.apply(this, arguments)
-}
-
-Buffer.prototype.equals = function equals (b) {
- if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
- if (this === b) return true
- return Buffer.compare(this, b) === 0
-}
-
-Buffer.prototype.inspect = function inspect () {
- var str = ''
- var max = exports.INSPECT_MAX_BYTES
- if (this.length > 0) {
- str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
- if (this.length > max) str += ' ... '
- }
- return ''
-}
-
-Buffer.prototype.compare = function compare (b) {
- if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
- if (this === b) return 0
- return Buffer.compare(this, b)
-}
-
-Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
- if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
- else if (byteOffset < -0x80000000) byteOffset = -0x80000000
- byteOffset >>= 0
-
- if (this.length === 0) return -1
- if (byteOffset >= this.length) return -1
-
- // Negative offsets start from the end of the buffer
- if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
-
- if (typeof val === 'string') {
- if (val.length === 0) return -1 // special case: looking for empty string always fails
- return String.prototype.indexOf.call(this, val, byteOffset)
- }
- if (Buffer.isBuffer(val)) {
- return arrayIndexOf(this, val, byteOffset)
- }
- if (typeof val === 'number') {
- if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
- return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
- }
- return arrayIndexOf(this, [ val ], byteOffset)
- }
-
- function arrayIndexOf (arr, val, byteOffset) {
- var foundIndex = -1
- for (var i = 0; byteOffset + i < arr.length; i++) {
- if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {
- if (foundIndex === -1) foundIndex = i
- if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex
- } else {
- foundIndex = -1
- }
- }
- return -1
- }
-
- throw new TypeError('val must be string, number or Buffer')
-}
-
-// `get` is deprecated
-Buffer.prototype.get = function get (offset) {
- console.log('.get() is deprecated. Access using array indexes instead.')
- return this.readUInt8(offset)
-}
-
-// `set` is deprecated
-Buffer.prototype.set = function set (v, offset) {
- console.log('.set() is deprecated. Access using array indexes instead.')
- return this.writeUInt8(v, offset)
-}
-
-function hexWrite (buf, string, offset, length) {
- offset = Number(offset) || 0
- var remaining = buf.length - offset
- if (!length) {
- length = remaining
- } else {
- length = Number(length)
- if (length > remaining) {
- length = remaining
- }
- }
-
- // must be an even number of digits
- var strLen = string.length
- if (strLen % 2 !== 0) throw new Error('Invalid hex string')
-
- if (length > strLen / 2) {
- length = strLen / 2
- }
- for (var i = 0; i < length; i++) {
- var parsed = parseInt(string.substr(i * 2, 2), 16)
- if (isNaN(parsed)) throw new Error('Invalid hex string')
- buf[offset + i] = parsed
- }
- return i
-}
-
-function utf8Write (buf, string, offset, length) {
- return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
-}
-
-function asciiWrite (buf, string, offset, length) {
- return blitBuffer(asciiToBytes(string), buf, offset, length)
-}
-
-function binaryWrite (buf, string, offset, length) {
- return asciiWrite(buf, string, offset, length)
-}
-
-function base64Write (buf, string, offset, length) {
- return blitBuffer(base64ToBytes(string), buf, offset, length)
-}
-
-function ucs2Write (buf, string, offset, length) {
- return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
-}
-
-Buffer.prototype.write = function write (string, offset, length, encoding) {
- // Buffer#write(string)
- if (offset === undefined) {
- encoding = 'utf8'
- length = this.length
- offset = 0
- // Buffer#write(string, encoding)
- } else if (length === undefined && typeof offset === 'string') {
- encoding = offset
- length = this.length
- offset = 0
- // Buffer#write(string, offset[, length][, encoding])
- } else if (isFinite(offset)) {
- offset = offset | 0
- if (isFinite(length)) {
- length = length | 0
- if (encoding === undefined) encoding = 'utf8'
- } else {
- encoding = length
- length = undefined
- }
- // legacy write(string, encoding, offset, length) - remove in v0.13
- } else {
- var swap = encoding
- encoding = offset
- offset = length | 0
- length = swap
- }
-
- var remaining = this.length - offset
- if (length === undefined || length > remaining) length = remaining
-
- if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
- throw new RangeError('attempt to write outside buffer bounds')
- }
-
- if (!encoding) encoding = 'utf8'
-
- var loweredCase = false
- for (;;) {
- switch (encoding) {
- case 'hex':
- return hexWrite(this, string, offset, length)
-
- case 'utf8':
- case 'utf-8':
- return utf8Write(this, string, offset, length)
-
- case 'ascii':
- return asciiWrite(this, string, offset, length)
-
- case 'binary':
- return binaryWrite(this, string, offset, length)
-
- case 'base64':
- // Warning: maxLength not taken into account in base64Write
- return base64Write(this, string, offset, length)
-
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return ucs2Write(this, string, offset, length)
-
- default:
- if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
- encoding = ('' + encoding).toLowerCase()
- loweredCase = true
- }
- }
-}
-
-Buffer.prototype.toJSON = function toJSON () {
- return {
- type: 'Buffer',
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
-}
-
-function base64Slice (buf, start, end) {
- if (start === 0 && end === buf.length) {
- return base64.fromByteArray(buf)
- } else {
- return base64.fromByteArray(buf.slice(start, end))
- }
-}
-
-function utf8Slice (buf, start, end) {
- end = Math.min(buf.length, end)
- var res = []
-
- var i = start
- while (i < end) {
- var firstByte = buf[i]
- var codePoint = null
- var bytesPerSequence = (firstByte > 0xEF) ? 4
- : (firstByte > 0xDF) ? 3
- : (firstByte > 0xBF) ? 2
- : 1
-
- if (i + bytesPerSequence <= end) {
- var secondByte, thirdByte, fourthByte, tempCodePoint
-
- switch (bytesPerSequence) {
- case 1:
- if (firstByte < 0x80) {
- codePoint = firstByte
- }
- break
- case 2:
- secondByte = buf[i + 1]
- if ((secondByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
- if (tempCodePoint > 0x7F) {
- codePoint = tempCodePoint
- }
- }
- break
- case 3:
- secondByte = buf[i + 1]
- thirdByte = buf[i + 2]
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
- if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
- codePoint = tempCodePoint
- }
- }
- break
- case 4:
- secondByte = buf[i + 1]
- thirdByte = buf[i + 2]
- fourthByte = buf[i + 3]
- if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
- tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
- if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
- codePoint = tempCodePoint
- }
- }
- }
- }
-
- if (codePoint === null) {
- // we did not generate a valid codePoint so insert a
- // replacement char (U+FFFD) and advance only 1 byte
- codePoint = 0xFFFD
- bytesPerSequence = 1
- } else if (codePoint > 0xFFFF) {
- // encode to utf16 (surrogate pair dance)
- codePoint -= 0x10000
- res.push(codePoint >>> 10 & 0x3FF | 0xD800)
- codePoint = 0xDC00 | codePoint & 0x3FF
- }
-
- res.push(codePoint)
- i += bytesPerSequence
- }
-
- return decodeCodePointsArray(res)
-}
-
-// Based on http://stackoverflow.com/a/22747272/680742, the browser with
-// the lowest limit is Chrome, with 0x10000 args.
-// We go 1 magnitude less, for safety
-var MAX_ARGUMENTS_LENGTH = 0x1000
-
-function decodeCodePointsArray (codePoints) {
- var len = codePoints.length
- if (len <= MAX_ARGUMENTS_LENGTH) {
- return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
- }
-
- // Decode in chunks to avoid "call stack size exceeded".
- var res = ''
- var i = 0
- while (i < len) {
- res += String.fromCharCode.apply(
- String,
- codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
- )
- }
- return res
-}
-
-function asciiSlice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
-
- for (var i = start; i < end; i++) {
- ret += String.fromCharCode(buf[i] & 0x7F)
- }
- return ret
-}
-
-function binarySlice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
-
- for (var i = start; i < end; i++) {
- ret += String.fromCharCode(buf[i])
- }
- return ret
-}
-
-function hexSlice (buf, start, end) {
- var len = buf.length
-
- if (!start || start < 0) start = 0
- if (!end || end < 0 || end > len) end = len
-
- var out = ''
- for (var i = start; i < end; i++) {
- out += toHex(buf[i])
- }
- return out
-}
-
-function utf16leSlice (buf, start, end) {
- var bytes = buf.slice(start, end)
- var res = ''
- for (var i = 0; i < bytes.length; i += 2) {
- res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
- }
- return res
-}
-
-Buffer.prototype.slice = function slice (start, end) {
- var len = this.length
- start = ~~start
- end = end === undefined ? len : ~~end
-
- if (start < 0) {
- start += len
- if (start < 0) start = 0
- } else if (start > len) {
- start = len
- }
-
- if (end < 0) {
- end += len
- if (end < 0) end = 0
- } else if (end > len) {
- end = len
- }
-
- if (end < start) end = start
-
- var newBuf
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- newBuf = Buffer._augment(this.subarray(start, end))
- } else {
- var sliceLen = end - start
- newBuf = new Buffer(sliceLen, undefined)
- for (var i = 0; i < sliceLen; i++) {
- newBuf[i] = this[i + start]
- }
- }
-
- if (newBuf.length) newBuf.parent = this.parent || this
-
- return newBuf
-}
-
-/*
- * Need to make sure that buffer isn't trying to write out of bounds.
- */
-function checkOffset (offset, ext, length) {
- if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
- if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
-}
-
-Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
-
- var val = this[offset]
- var mul = 1
- var i = 0
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul
- }
-
- return val
-}
-
-Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) {
- checkOffset(offset, byteLength, this.length)
- }
-
- var val = this[offset + --byteLength]
- var mul = 1
- while (byteLength > 0 && (mul *= 0x100)) {
- val += this[offset + --byteLength] * mul
- }
-
- return val
-}
-
-Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length)
- return this[offset]
-}
-
-Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- return this[offset] | (this[offset + 1] << 8)
-}
-
-Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- return (this[offset] << 8) | this[offset + 1]
-}
-
-Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
-
- return ((this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16)) +
- (this[offset + 3] * 0x1000000)
-}
-
-Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
-
- return (this[offset] * 0x1000000) +
- ((this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- this[offset + 3])
-}
-
-Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
-
- var val = this[offset]
- var mul = 1
- var i = 0
- while (++i < byteLength && (mul *= 0x100)) {
- val += this[offset + i] * mul
- }
- mul *= 0x80
-
- if (val >= mul) val -= Math.pow(2, 8 * byteLength)
-
- return val
-}
-
-Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkOffset(offset, byteLength, this.length)
-
- var i = byteLength
- var mul = 1
- var val = this[offset + --i]
- while (i > 0 && (mul *= 0x100)) {
- val += this[offset + --i] * mul
- }
- mul *= 0x80
-
- if (val >= mul) val -= Math.pow(2, 8 * byteLength)
-
- return val
-}
-
-Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 1, this.length)
- if (!(this[offset] & 0x80)) return (this[offset])
- return ((0xff - this[offset] + 1) * -1)
-}
-
-Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- var val = this[offset] | (this[offset + 1] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
-}
-
-Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 2, this.length)
- var val = this[offset + 1] | (this[offset] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
-}
-
-Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
-
- return (this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16) |
- (this[offset + 3] << 24)
-}
-
-Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
-
- return (this[offset] << 24) |
- (this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- (this[offset + 3])
-}
-
-Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, true, 23, 4)
-}
-
-Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, false, 23, 4)
-}
-
-Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, true, 52, 8)
-}
-
-Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
- if (!noAssert) checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, false, 52, 8)
-}
-
-function checkInt (buf, value, offset, ext, max, min) {
- if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
- if (value > max || value < min) throw new RangeError('value is out of bounds')
- if (offset + ext > buf.length) throw new RangeError('index out of range')
-}
-
-Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
-
- var mul = 1
- var i = 0
- this[offset] = value & 0xFF
- while (++i < byteLength && (mul *= 0x100)) {
- this[offset + i] = (value / mul) & 0xFF
- }
-
- return offset + byteLength
-}
-
-Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- byteLength = byteLength | 0
- if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
-
- var i = byteLength - 1
- var mul = 1
- this[offset + i] = value & 0xFF
- while (--i >= 0 && (mul *= 0x100)) {
- this[offset + i] = (value / mul) & 0xFF
- }
-
- return offset + byteLength
-}
-
-Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- this[offset] = (value & 0xff)
- return offset + 1
-}
-
-function objectWriteUInt16 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
- buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
- (littleEndian ? i : 1 - i) * 8
- }
-}
-
-Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- } else {
- objectWriteUInt16(this, value, offset, true)
- }
- return offset + 2
-}
-
-Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
- } else {
- objectWriteUInt16(this, value, offset, false)
- }
- return offset + 2
-}
-
-function objectWriteUInt32 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffffffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
- buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
- }
-}
-
-Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset + 3] = (value >>> 24)
- this[offset + 2] = (value >>> 16)
- this[offset + 1] = (value >>> 8)
- this[offset] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, true)
- }
- return offset + 4
-}
-
-Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, false)
- }
- return offset + 4
-}
-
-Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1)
-
- checkInt(this, value, offset, byteLength, limit - 1, -limit)
- }
-
- var i = 0
- var mul = 1
- var sub = value < 0 ? 1 : 0
- this[offset] = value & 0xFF
- while (++i < byteLength && (mul *= 0x100)) {
- this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
- }
-
- return offset + byteLength
-}
-
-Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) {
- var limit = Math.pow(2, 8 * byteLength - 1)
-
- checkInt(this, value, offset, byteLength, limit - 1, -limit)
- }
-
- var i = byteLength - 1
- var mul = 1
- var sub = value < 0 ? 1 : 0
- this[offset + i] = value & 0xFF
- while (--i >= 0 && (mul *= 0x100)) {
- this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
- }
-
- return offset + byteLength
-}
-
-Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- if (value < 0) value = 0xff + value + 1
- this[offset] = (value & 0xff)
- return offset + 1
-}
-
-Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- } else {
- objectWriteUInt16(this, value, offset, true)
- }
- return offset + 2
-}
-
-Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
- } else {
- objectWriteUInt16(this, value, offset, false)
- }
- return offset + 2
-}
-
-Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
- this[offset + 1] = (value >>> 8)
- this[offset + 2] = (value >>> 16)
- this[offset + 3] = (value >>> 24)
- } else {
- objectWriteUInt32(this, value, offset, true)
- }
- return offset + 4
-}
-
-Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
- value = +value
- offset = offset | 0
- if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (value < 0) value = 0xffffffff + value + 1
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
- } else {
- objectWriteUInt32(this, value, offset, false)
- }
- return offset + 4
-}
-
-function checkIEEE754 (buf, value, offset, ext, max, min) {
- if (value > max || value < min) throw new RangeError('value is out of bounds')
- if (offset + ext > buf.length) throw new RangeError('index out of range')
- if (offset < 0) throw new RangeError('index out of range')
-}
-
-function writeFloat (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
- }
- ieee754.write(buf, value, offset, littleEndian, 23, 4)
- return offset + 4
-}
-
-Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
- return writeFloat(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
- return writeFloat(this, value, offset, false, noAssert)
-}
-
-function writeDouble (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
- }
- ieee754.write(buf, value, offset, littleEndian, 52, 8)
- return offset + 8
-}
-
-Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
- return writeDouble(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
- return writeDouble(this, value, offset, false, noAssert)
-}
-
-// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
-Buffer.prototype.copy = function copy (target, targetStart, start, end) {
- if (!start) start = 0
- if (!end && end !== 0) end = this.length
- if (targetStart >= target.length) targetStart = target.length
- if (!targetStart) targetStart = 0
- if (end > 0 && end < start) end = start
-
- // Copy 0 bytes; we're done
- if (end === start) return 0
- if (target.length === 0 || this.length === 0) return 0
-
- // Fatal error conditions
- if (targetStart < 0) {
- throw new RangeError('targetStart out of bounds')
- }
- if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
- if (end < 0) throw new RangeError('sourceEnd out of bounds')
-
- // Are we oob?
- if (end > this.length) end = this.length
- if (target.length - targetStart < end - start) {
- end = target.length - targetStart + start
- }
-
- var len = end - start
- var i
-
- if (this === target && start < targetStart && targetStart < end) {
- // descending copy from end
- for (i = len - 1; i >= 0; i--) {
- target[i + targetStart] = this[i + start]
- }
- } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
- // ascending copy from start
- for (i = 0; i < len; i++) {
- target[i + targetStart] = this[i + start]
- }
- } else {
- target._set(this.subarray(start, start + len), targetStart)
- }
-
- return len
-}
-
-// fill(value, start=0, end=buffer.length)
-Buffer.prototype.fill = function fill (value, start, end) {
- if (!value) value = 0
- if (!start) start = 0
- if (!end) end = this.length
-
- if (end < start) throw new RangeError('end < start')
-
- // Fill 0 bytes; we're done
- if (end === start) return
- if (this.length === 0) return
-
- if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
- if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
-
- var i
- if (typeof value === 'number') {
- for (i = start; i < end; i++) {
- this[i] = value
- }
- } else {
- var bytes = utf8ToBytes(value.toString())
- var len = bytes.length
- for (i = start; i < end; i++) {
- this[i] = bytes[i % len]
- }
- }
-
- return this
-}
-
-/**
- * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
- * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
- */
-Buffer.prototype.toArrayBuffer = function toArrayBuffer () {
- if (typeof Uint8Array !== 'undefined') {
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- return (new Buffer(this)).buffer
- } else {
- var buf = new Uint8Array(this.length)
- for (var i = 0, len = buf.length; i < len; i += 1) {
- buf[i] = this[i]
- }
- return buf.buffer
- }
- } else {
- throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
- }
-}
-
-// HELPER FUNCTIONS
-// ================
-
-var BP = Buffer.prototype
-
-/**
- * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
- */
-Buffer._augment = function _augment (arr) {
- arr.constructor = Buffer
- arr._isBuffer = true
-
- // save reference to original Uint8Array set method before overwriting
- arr._set = arr.set
-
- // deprecated
- arr.get = BP.get
- arr.set = BP.set
-
- arr.write = BP.write
- arr.toString = BP.toString
- arr.toLocaleString = BP.toString
- arr.toJSON = BP.toJSON
- arr.equals = BP.equals
- arr.compare = BP.compare
- arr.indexOf = BP.indexOf
- arr.copy = BP.copy
- arr.slice = BP.slice
- arr.readUIntLE = BP.readUIntLE
- arr.readUIntBE = BP.readUIntBE
- arr.readUInt8 = BP.readUInt8
- arr.readUInt16LE = BP.readUInt16LE
- arr.readUInt16BE = BP.readUInt16BE
- arr.readUInt32LE = BP.readUInt32LE
- arr.readUInt32BE = BP.readUInt32BE
- arr.readIntLE = BP.readIntLE
- arr.readIntBE = BP.readIntBE
- arr.readInt8 = BP.readInt8
- arr.readInt16LE = BP.readInt16LE
- arr.readInt16BE = BP.readInt16BE
- arr.readInt32LE = BP.readInt32LE
- arr.readInt32BE = BP.readInt32BE
- arr.readFloatLE = BP.readFloatLE
- arr.readFloatBE = BP.readFloatBE
- arr.readDoubleLE = BP.readDoubleLE
- arr.readDoubleBE = BP.readDoubleBE
- arr.writeUInt8 = BP.writeUInt8
- arr.writeUIntLE = BP.writeUIntLE
- arr.writeUIntBE = BP.writeUIntBE
- arr.writeUInt16LE = BP.writeUInt16LE
- arr.writeUInt16BE = BP.writeUInt16BE
- arr.writeUInt32LE = BP.writeUInt32LE
- arr.writeUInt32BE = BP.writeUInt32BE
- arr.writeIntLE = BP.writeIntLE
- arr.writeIntBE = BP.writeIntBE
- arr.writeInt8 = BP.writeInt8
- arr.writeInt16LE = BP.writeInt16LE
- arr.writeInt16BE = BP.writeInt16BE
- arr.writeInt32LE = BP.writeInt32LE
- arr.writeInt32BE = BP.writeInt32BE
- arr.writeFloatLE = BP.writeFloatLE
- arr.writeFloatBE = BP.writeFloatBE
- arr.writeDoubleLE = BP.writeDoubleLE
- arr.writeDoubleBE = BP.writeDoubleBE
- arr.fill = BP.fill
- arr.inspect = BP.inspect
- arr.toArrayBuffer = BP.toArrayBuffer
-
- return arr
-}
-
-var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
-
-function base64clean (str) {
- // Node strips out invalid characters like \n and \t from the string, base64-js does not
- str = stringtrim(str).replace(INVALID_BASE64_RE, '')
- // Node converts strings with length < 2 to ''
- if (str.length < 2) return ''
- // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
- while (str.length % 4 !== 0) {
- str = str + '='
- }
- return str
-}
-
-function stringtrim (str) {
- if (str.trim) return str.trim()
- return str.replace(/^\s+|\s+$/g, '')
-}
-
-function toHex (n) {
- if (n < 16) return '0' + n.toString(16)
- return n.toString(16)
-}
-
-function utf8ToBytes (string, units) {
- units = units || Infinity
- var codePoint
- var length = string.length
- var leadSurrogate = null
- var bytes = []
-
- for (var i = 0; i < length; i++) {
- codePoint = string.charCodeAt(i)
-
- // is surrogate component
- if (codePoint > 0xD7FF && codePoint < 0xE000) {
- // last char was a lead
- if (!leadSurrogate) {
- // no lead yet
- if (codePoint > 0xDBFF) {
- // unexpected trail
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- continue
- } else if (i + 1 === length) {
- // unpaired lead
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- continue
- }
-
- // valid lead
- leadSurrogate = codePoint
-
- continue
- }
-
- // 2 leads in a row
- if (codePoint < 0xDC00) {
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- leadSurrogate = codePoint
- continue
- }
-
- // valid surrogate pair
- codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
- } else if (leadSurrogate) {
- // valid bmp char, but last char was a lead
- if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
- }
-
- leadSurrogate = null
-
- // encode utf8
- if (codePoint < 0x80) {
- if ((units -= 1) < 0) break
- bytes.push(codePoint)
- } else if (codePoint < 0x800) {
- if ((units -= 2) < 0) break
- bytes.push(
- codePoint >> 0x6 | 0xC0,
- codePoint & 0x3F | 0x80
- )
- } else if (codePoint < 0x10000) {
- if ((units -= 3) < 0) break
- bytes.push(
- codePoint >> 0xC | 0xE0,
- codePoint >> 0x6 & 0x3F | 0x80,
- codePoint & 0x3F | 0x80
- )
- } else if (codePoint < 0x110000) {
- if ((units -= 4) < 0) break
- bytes.push(
- codePoint >> 0x12 | 0xF0,
- codePoint >> 0xC & 0x3F | 0x80,
- codePoint >> 0x6 & 0x3F | 0x80,
- codePoint & 0x3F | 0x80
- )
- } else {
- throw new Error('Invalid code point')
- }
- }
-
- return bytes
-}
-
-function asciiToBytes (str) {
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- // Node's code seems to be doing this and not & 0x7F..
- byteArray.push(str.charCodeAt(i) & 0xFF)
- }
- return byteArray
-}
-
-function utf16leToBytes (str, units) {
- var c, hi, lo
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- if ((units -= 2) < 0) break
-
- c = str.charCodeAt(i)
- hi = c >> 8
- lo = c % 256
- byteArray.push(lo)
- byteArray.push(hi)
- }
-
- return byteArray
-}
-
-function base64ToBytes (str) {
- return base64.toByteArray(base64clean(str))
-}
-
-function blitBuffer (src, dst, offset, length) {
- for (var i = 0; i < length; i++) {
- if ((i + offset >= dst.length) || (i >= src.length)) break
- dst[i + offset] = src[i]
- }
- return i
-}
-
-}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-
-},{"base64-js":24,"ieee754":177,"isarray":28}],28:[function(require,module,exports){
-var toString = {}.toString;
-
-module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
-
},{}],29:[function(require,module,exports){
+
+},{}],30:[function(require,module,exports){
+module.exports = function (uri) {
+ var mime = uri.split(',')[0].split(':')[1].split(';')[0];
+ var bytes = atob(uri.split(',')[1]);
+ var len = bytes.length;
+ var buffer = new window.ArrayBuffer(len);
+ var arr = new window.Uint8Array(buffer);
+
+ for (var i = 0; i < len; i++) {
+ arr[i] = bytes.charCodeAt(i);
+ }
+
+ return new Blob([arr], { type: mime });
+}
+
+// IE >= 10, most modern browsers
+// The Blob type can't be polyfilled, which is why there aren't any polyfills for TypedArrays for older IE's
+module.exports.supported = (
+ typeof window.HTMLCanvasElement !== 'undefined' &&
+ typeof window.atob !== 'undefined' &&
+ typeof window.Blob !== 'undefined' &&
+ typeof window.ArrayBuffer !== 'undefined' &&
+ typeof window.Uint8Array !== 'undefined'
+);
+
+module.exports.init = function () {
+ if (!module.exports.supported) return;
+ var CanvasPrototype = window.HTMLCanvasElement.prototype;
+
+ if (!CanvasPrototype.toBlob && CanvasPrototype.toDataURL) {
+ CanvasPrototype.toBlob = function (callback, type, quality) {
+ callback(module.exports(this.toDataURL(type, quality)));
+ }
+ }
+}
+
+},{}],31:[function(require,module,exports){
/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
@@ -2241,86 +650,86 @@ module.exports = Array.isArray || function (arr) {
}
}());
-},{}],30:[function(require,module,exports){
+},{}],32:[function(require,module,exports){
require('../../modules/es6.string.iterator');
require('../../modules/es6.array.from');
module.exports = require('../../modules/$.core').Array.from;
-},{"../../modules/$.core":54,"../../modules/es6.array.from":106,"../../modules/es6.string.iterator":118}],31:[function(require,module,exports){
+},{"../../modules/$.core":56,"../../modules/es6.array.from":108,"../../modules/es6.string.iterator":120}],33:[function(require,module,exports){
require('../modules/web.dom.iterable');
require('../modules/es6.string.iterator');
module.exports = require('../modules/core.get-iterator');
-},{"../modules/core.get-iterator":104,"../modules/es6.string.iterator":118,"../modules/web.dom.iterable":121}],32:[function(require,module,exports){
+},{"../modules/core.get-iterator":106,"../modules/es6.string.iterator":120,"../modules/web.dom.iterable":123}],34:[function(require,module,exports){
require('../modules/web.dom.iterable');
require('../modules/es6.string.iterator');
module.exports = require('../modules/core.is-iterable');
-},{"../modules/core.is-iterable":105,"../modules/es6.string.iterator":118,"../modules/web.dom.iterable":121}],33:[function(require,module,exports){
+},{"../modules/core.is-iterable":107,"../modules/es6.string.iterator":120,"../modules/web.dom.iterable":123}],35:[function(require,module,exports){
require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.map');
require('../modules/es7.map.to-json');
module.exports = require('../modules/$.core').Map;
-},{"../modules/$.core":54,"../modules/es6.map":108,"../modules/es6.object.to-string":116,"../modules/es6.string.iterator":118,"../modules/es7.map.to-json":120,"../modules/web.dom.iterable":121}],34:[function(require,module,exports){
+},{"../modules/$.core":56,"../modules/es6.map":110,"../modules/es6.object.to-string":118,"../modules/es6.string.iterator":120,"../modules/es7.map.to-json":122,"../modules/web.dom.iterable":123}],36:[function(require,module,exports){
require('../../modules/es6.number.is-nan');
module.exports = require('../../modules/$.core').Number.isNaN;
-},{"../../modules/$.core":54,"../../modules/es6.number.is-nan":109}],35:[function(require,module,exports){
+},{"../../modules/$.core":56,"../../modules/es6.number.is-nan":111}],37:[function(require,module,exports){
require('../../modules/es6.number.parse-float');
module.exports = parseFloat;
-},{"../../modules/es6.number.parse-float":110}],36:[function(require,module,exports){
+},{"../../modules/es6.number.parse-float":112}],38:[function(require,module,exports){
require('../../modules/es6.number.parse-int');
module.exports = parseInt;
-},{"../../modules/es6.number.parse-int":111}],37:[function(require,module,exports){
+},{"../../modules/es6.number.parse-int":113}],39:[function(require,module,exports){
require('../../modules/es6.object.assign');
module.exports = require('../../modules/$.core').Object.assign;
-},{"../../modules/$.core":54,"../../modules/es6.object.assign":112}],38:[function(require,module,exports){
+},{"../../modules/$.core":56,"../../modules/es6.object.assign":114}],40:[function(require,module,exports){
var $ = require('../../modules/$');
module.exports = function create(P, D){
return $.create(P, D);
};
-},{"../../modules/$":79}],39:[function(require,module,exports){
+},{"../../modules/$":81}],41:[function(require,module,exports){
var $ = require('../../modules/$');
module.exports = function defineProperty(it, key, desc){
return $.setDesc(it, key, desc);
};
-},{"../../modules/$":79}],40:[function(require,module,exports){
+},{"../../modules/$":81}],42:[function(require,module,exports){
var $ = require('../../modules/$');
require('../../modules/es6.object.get-own-property-descriptor');
module.exports = function getOwnPropertyDescriptor(it, key){
return $.getDesc(it, key);
};
-},{"../../modules/$":79,"../../modules/es6.object.get-own-property-descriptor":113}],41:[function(require,module,exports){
+},{"../../modules/$":81,"../../modules/es6.object.get-own-property-descriptor":115}],43:[function(require,module,exports){
require('../../modules/es6.object.keys');
module.exports = require('../../modules/$.core').Object.keys;
-},{"../../modules/$.core":54,"../../modules/es6.object.keys":114}],42:[function(require,module,exports){
+},{"../../modules/$.core":56,"../../modules/es6.object.keys":116}],44:[function(require,module,exports){
require('../../modules/es6.object.set-prototype-of');
module.exports = require('../../modules/$.core').Object.setPrototypeOf;
-},{"../../modules/$.core":54,"../../modules/es6.object.set-prototype-of":115}],43:[function(require,module,exports){
+},{"../../modules/$.core":56,"../../modules/es6.object.set-prototype-of":117}],45:[function(require,module,exports){
require('../modules/es6.object.to-string');
require('../modules/es6.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/es6.promise');
module.exports = require('../modules/$.core').Promise;
-},{"../modules/$.core":54,"../modules/es6.object.to-string":116,"../modules/es6.promise":117,"../modules/es6.string.iterator":118,"../modules/web.dom.iterable":121}],44:[function(require,module,exports){
+},{"../modules/$.core":56,"../modules/es6.object.to-string":118,"../modules/es6.promise":119,"../modules/es6.string.iterator":120,"../modules/web.dom.iterable":123}],46:[function(require,module,exports){
require('../../modules/es6.symbol');
module.exports = require('../../modules/$.core').Symbol['for'];
-},{"../../modules/$.core":54,"../../modules/es6.symbol":119}],45:[function(require,module,exports){
+},{"../../modules/$.core":56,"../../modules/es6.symbol":121}],47:[function(require,module,exports){
require('../../modules/es6.string.iterator');
require('../../modules/web.dom.iterable');
module.exports = require('../../modules/$.wks')('iterator');
-},{"../../modules/$.wks":102,"../../modules/es6.string.iterator":118,"../../modules/web.dom.iterable":121}],46:[function(require,module,exports){
+},{"../../modules/$.wks":104,"../../modules/es6.string.iterator":120,"../../modules/web.dom.iterable":123}],48:[function(require,module,exports){
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};
-},{}],47:[function(require,module,exports){
+},{}],49:[function(require,module,exports){
module.exports = function(){ /* empty */ };
-},{}],48:[function(require,module,exports){
+},{}],50:[function(require,module,exports){
var isObject = require('./$.is-object');
module.exports = function(it){
if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
};
-},{"./$.is-object":72}],49:[function(require,module,exports){
+},{"./$.is-object":74}],51:[function(require,module,exports){
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = require('./$.cof')
, TAG = require('./$.wks')('toStringTag')
@@ -2337,13 +746,13 @@ module.exports = function(it){
// ES3 arguments fallback
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
-},{"./$.cof":50,"./$.wks":102}],50:[function(require,module,exports){
+},{"./$.cof":52,"./$.wks":104}],52:[function(require,module,exports){
var toString = {}.toString;
module.exports = function(it){
return toString.call(it).slice(8, -1);
};
-},{}],51:[function(require,module,exports){
+},{}],53:[function(require,module,exports){
'use strict';
var $ = require('./$')
, hide = require('./$.hide')
@@ -2503,7 +912,7 @@ module.exports = {
setSpecies(NAME);
}
};
-},{"./$":79,"./$.ctx":55,"./$.defined":56,"./$.descriptors":57,"./$.for-of":62,"./$.has":65,"./$.hide":66,"./$.is-object":72,"./$.iter-define":75,"./$.iter-step":77,"./$.redefine-all":86,"./$.set-species":90,"./$.strict-new":94,"./$.uid":101}],52:[function(require,module,exports){
+},{"./$":81,"./$.ctx":57,"./$.defined":58,"./$.descriptors":59,"./$.for-of":64,"./$.has":67,"./$.hide":68,"./$.is-object":74,"./$.iter-define":77,"./$.iter-step":79,"./$.redefine-all":88,"./$.set-species":92,"./$.strict-new":96,"./$.uid":103}],54:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var forOf = require('./$.for-of')
, classof = require('./$.classof');
@@ -2515,7 +924,7 @@ module.exports = function(NAME){
return arr;
};
};
-},{"./$.classof":49,"./$.for-of":62}],53:[function(require,module,exports){
+},{"./$.classof":51,"./$.for-of":64}],55:[function(require,module,exports){
'use strict';
var $ = require('./$')
, global = require('./$.global')
@@ -2571,10 +980,10 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
return C;
};
-},{"./$":79,"./$.descriptors":57,"./$.export":60,"./$.fails":61,"./$.for-of":62,"./$.global":64,"./$.hide":66,"./$.is-object":72,"./$.redefine-all":86,"./$.set-to-string-tag":91,"./$.strict-new":94}],54:[function(require,module,exports){
+},{"./$":81,"./$.descriptors":59,"./$.export":62,"./$.fails":63,"./$.for-of":64,"./$.global":66,"./$.hide":68,"./$.is-object":74,"./$.redefine-all":88,"./$.set-to-string-tag":93,"./$.strict-new":96}],56:[function(require,module,exports){
var core = module.exports = {version: '1.2.6'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
-},{}],55:[function(require,module,exports){
+},{}],57:[function(require,module,exports){
// optional / simple context binding
var aFunction = require('./$.a-function');
module.exports = function(fn, that, length){
@@ -2595,18 +1004,18 @@ module.exports = function(fn, that, length){
return fn.apply(that, arguments);
};
};
-},{"./$.a-function":46}],56:[function(require,module,exports){
+},{"./$.a-function":48}],58:[function(require,module,exports){
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function(it){
if(it == undefined)throw TypeError("Can't call method on " + it);
return it;
};
-},{}],57:[function(require,module,exports){
+},{}],59:[function(require,module,exports){
// Thank's IE8 for his funny defineProperty
module.exports = !require('./$.fails')(function(){
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
-},{"./$.fails":61}],58:[function(require,module,exports){
+},{"./$.fails":63}],60:[function(require,module,exports){
var isObject = require('./$.is-object')
, document = require('./$.global').document
// in old IE typeof document.createElement is 'object'
@@ -2614,7 +1023,7 @@ var isObject = require('./$.is-object')
module.exports = function(it){
return is ? document.createElement(it) : {};
};
-},{"./$.global":64,"./$.is-object":72}],59:[function(require,module,exports){
+},{"./$.global":66,"./$.is-object":74}],61:[function(require,module,exports){
// all enumerable object keys, includes symbols
var $ = require('./$');
module.exports = function(it){
@@ -2629,7 +1038,7 @@ module.exports = function(it){
}
return keys;
};
-},{"./$":79}],60:[function(require,module,exports){
+},{"./$":81}],62:[function(require,module,exports){
var global = require('./$.global')
, core = require('./$.core')
, ctx = require('./$.ctx')
@@ -2676,7 +1085,7 @@ $export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
module.exports = $export;
-},{"./$.core":54,"./$.ctx":55,"./$.global":64}],61:[function(require,module,exports){
+},{"./$.core":56,"./$.ctx":57,"./$.global":66}],63:[function(require,module,exports){
module.exports = function(exec){
try {
return !!exec();
@@ -2684,7 +1093,7 @@ module.exports = function(exec){
return true;
}
};
-},{}],62:[function(require,module,exports){
+},{}],64:[function(require,module,exports){
var ctx = require('./$.ctx')
, call = require('./$.iter-call')
, isArrayIter = require('./$.is-array-iter')
@@ -2704,7 +1113,7 @@ module.exports = function(iterable, entries, fn, that){
call(iterator, f, step.value, entries);
}
};
-},{"./$.an-object":48,"./$.ctx":55,"./$.is-array-iter":70,"./$.iter-call":73,"./$.to-length":99,"./core.get-iterator-method":103}],63:[function(require,module,exports){
+},{"./$.an-object":50,"./$.ctx":57,"./$.is-array-iter":72,"./$.iter-call":75,"./$.to-length":101,"./core.get-iterator-method":105}],65:[function(require,module,exports){
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = require('./$.to-iobject')
, getNames = require('./$').getNames
@@ -2725,17 +1134,17 @@ module.exports.get = function getOwnPropertyNames(it){
if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
return getNames(toIObject(it));
};
-},{"./$":79,"./$.to-iobject":98}],64:[function(require,module,exports){
+},{"./$":81,"./$.to-iobject":100}],66:[function(require,module,exports){
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
-},{}],65:[function(require,module,exports){
+},{}],67:[function(require,module,exports){
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key){
return hasOwnProperty.call(it, key);
};
-},{}],66:[function(require,module,exports){
+},{}],68:[function(require,module,exports){
var $ = require('./$')
, createDesc = require('./$.property-desc');
module.exports = require('./$.descriptors') ? function(object, key, value){
@@ -2744,9 +1153,9 @@ module.exports = require('./$.descriptors') ? function(object, key, value){
object[key] = value;
return object;
};
-},{"./$":79,"./$.descriptors":57,"./$.property-desc":85}],67:[function(require,module,exports){
+},{"./$":81,"./$.descriptors":59,"./$.property-desc":87}],69:[function(require,module,exports){
module.exports = require('./$.global').document && document.documentElement;
-},{"./$.global":64}],68:[function(require,module,exports){
+},{"./$.global":66}],70:[function(require,module,exports){
// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function(fn, args, that){
var un = that === undefined;
@@ -2763,13 +1172,13 @@ module.exports = function(fn, args, that){
: fn.call(that, args[0], args[1], args[2], args[3]);
} return fn.apply(that, args);
};
-},{}],69:[function(require,module,exports){
+},{}],71:[function(require,module,exports){
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = require('./$.cof');
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
return cof(it) == 'String' ? it.split('') : Object(it);
};
-},{"./$.cof":50}],70:[function(require,module,exports){
+},{"./$.cof":52}],72:[function(require,module,exports){
// check on default Array iterator
var Iterators = require('./$.iterators')
, ITERATOR = require('./$.wks')('iterator')
@@ -2778,17 +1187,17 @@ var Iterators = require('./$.iterators')
module.exports = function(it){
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
-},{"./$.iterators":78,"./$.wks":102}],71:[function(require,module,exports){
+},{"./$.iterators":80,"./$.wks":104}],73:[function(require,module,exports){
// 7.2.2 IsArray(argument)
var cof = require('./$.cof');
module.exports = Array.isArray || function(arg){
return cof(arg) == 'Array';
};
-},{"./$.cof":50}],72:[function(require,module,exports){
+},{"./$.cof":52}],74:[function(require,module,exports){
module.exports = function(it){
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
-},{}],73:[function(require,module,exports){
+},{}],75:[function(require,module,exports){
// call something on iterator step with safe closing on error
var anObject = require('./$.an-object');
module.exports = function(iterator, fn, value, entries){
@@ -2801,7 +1210,7 @@ module.exports = function(iterator, fn, value, entries){
throw e;
}
};
-},{"./$.an-object":48}],74:[function(require,module,exports){
+},{"./$.an-object":50}],76:[function(require,module,exports){
'use strict';
var $ = require('./$')
, descriptor = require('./$.property-desc')
@@ -2815,7 +1224,7 @@ module.exports = function(Constructor, NAME, next){
Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
setToStringTag(Constructor, NAME + ' Iterator');
};
-},{"./$":79,"./$.hide":66,"./$.property-desc":85,"./$.set-to-string-tag":91,"./$.wks":102}],75:[function(require,module,exports){
+},{"./$":81,"./$.hide":68,"./$.property-desc":87,"./$.set-to-string-tag":93,"./$.wks":104}],77:[function(require,module,exports){
'use strict';
var LIBRARY = require('./$.library')
, $export = require('./$.export')
@@ -2882,7 +1291,7 @@ module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED
}
return methods;
};
-},{"./$":79,"./$.export":60,"./$.has":65,"./$.hide":66,"./$.iter-create":74,"./$.iterators":78,"./$.library":81,"./$.redefine":87,"./$.set-to-string-tag":91,"./$.wks":102}],76:[function(require,module,exports){
+},{"./$":81,"./$.export":62,"./$.has":67,"./$.hide":68,"./$.iter-create":76,"./$.iterators":80,"./$.library":83,"./$.redefine":89,"./$.set-to-string-tag":93,"./$.wks":104}],78:[function(require,module,exports){
var ITERATOR = require('./$.wks')('iterator')
, SAFE_CLOSING = false;
@@ -2898,19 +1307,19 @@ module.exports = function(exec, skipClosing){
try {
var arr = [7]
, iter = arr[ITERATOR]();
- iter.next = function(){ safe = true; };
+ iter.next = function(){ return {done: safe = true}; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
return safe;
};
-},{"./$.wks":102}],77:[function(require,module,exports){
+},{"./$.wks":104}],79:[function(require,module,exports){
module.exports = function(done, value){
return {value: value, done: !!done};
};
-},{}],78:[function(require,module,exports){
+},{}],80:[function(require,module,exports){
module.exports = {};
-},{}],79:[function(require,module,exports){
+},{}],81:[function(require,module,exports){
var $Object = Object;
module.exports = {
create: $Object.create,
@@ -2924,7 +1333,7 @@ module.exports = {
getSymbols: $Object.getOwnPropertySymbols,
each: [].forEach
};
-},{}],80:[function(require,module,exports){
+},{}],82:[function(require,module,exports){
var $ = require('./$')
, toIObject = require('./$.to-iobject');
module.exports = function(object, el){
@@ -2935,9 +1344,9 @@ module.exports = function(object, el){
, key;
while(length > index)if(O[key = keys[index++]] === el)return key;
};
-},{"./$":79,"./$.to-iobject":98}],81:[function(require,module,exports){
+},{"./$":81,"./$.to-iobject":100}],83:[function(require,module,exports){
module.exports = true;
-},{}],82:[function(require,module,exports){
+},{}],84:[function(require,module,exports){
var global = require('./$.global')
, macrotask = require('./$.task').set
, Observer = global.MutationObserver || global.WebKitMutationObserver
@@ -3002,7 +1411,7 @@ module.exports = function asap(fn){
notify();
} last = task;
};
-},{"./$.cof":50,"./$.global":64,"./$.task":96}],83:[function(require,module,exports){
+},{"./$.cof":52,"./$.global":66,"./$.task":98}],85:[function(require,module,exports){
// 19.1.2.1 Object.assign(target, source, ...)
var $ = require('./$')
, toObject = require('./$.to-object')
@@ -3036,7 +1445,7 @@ module.exports = require('./$.fails')(function(){
}
return T;
} : Object.assign;
-},{"./$":79,"./$.fails":61,"./$.iobject":69,"./$.to-object":100}],84:[function(require,module,exports){
+},{"./$":81,"./$.fails":63,"./$.iobject":71,"./$.to-object":102}],86:[function(require,module,exports){
// most Object methods by ES6 should accept primitives
var $export = require('./$.export')
, core = require('./$.core')
@@ -3047,7 +1456,7 @@ module.exports = function(KEY, exec){
exp[KEY] = exec(fn);
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
};
-},{"./$.core":54,"./$.export":60,"./$.fails":61}],85:[function(require,module,exports){
+},{"./$.core":56,"./$.export":62,"./$.fails":63}],87:[function(require,module,exports){
module.exports = function(bitmap, value){
return {
enumerable : !(bitmap & 1),
@@ -3056,20 +1465,20 @@ module.exports = function(bitmap, value){
value : value
};
};
-},{}],86:[function(require,module,exports){
+},{}],88:[function(require,module,exports){
var redefine = require('./$.redefine');
module.exports = function(target, src){
for(var key in src)redefine(target, key, src[key]);
return target;
};
-},{"./$.redefine":87}],87:[function(require,module,exports){
+},{"./$.redefine":89}],89:[function(require,module,exports){
module.exports = require('./$.hide');
-},{"./$.hide":66}],88:[function(require,module,exports){
+},{"./$.hide":68}],90:[function(require,module,exports){
// 7.2.9 SameValue(x, y)
module.exports = Object.is || function is(x, y){
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
-},{}],89:[function(require,module,exports){
+},{}],91:[function(require,module,exports){
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var getDesc = require('./$').getDesc
@@ -3096,7 +1505,7 @@ module.exports = {
}({}, false) : undefined),
check: check
};
-},{"./$":79,"./$.an-object":48,"./$.ctx":55,"./$.is-object":72}],90:[function(require,module,exports){
+},{"./$":81,"./$.an-object":50,"./$.ctx":57,"./$.is-object":74}],92:[function(require,module,exports){
'use strict';
var core = require('./$.core')
, $ = require('./$')
@@ -3110,7 +1519,7 @@ module.exports = function(KEY){
get: function(){ return this; }
});
};
-},{"./$":79,"./$.core":54,"./$.descriptors":57,"./$.wks":102}],91:[function(require,module,exports){
+},{"./$":81,"./$.core":56,"./$.descriptors":59,"./$.wks":104}],93:[function(require,module,exports){
var def = require('./$').setDesc
, has = require('./$.has')
, TAG = require('./$.wks')('toStringTag');
@@ -3118,14 +1527,14 @@ var def = require('./$').setDesc
module.exports = function(it, tag, stat){
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};
-},{"./$":79,"./$.has":65,"./$.wks":102}],92:[function(require,module,exports){
+},{"./$":81,"./$.has":67,"./$.wks":104}],94:[function(require,module,exports){
var global = require('./$.global')
, SHARED = '__core-js_shared__'
, store = global[SHARED] || (global[SHARED] = {});
module.exports = function(key){
return store[key] || (store[key] = {});
};
-},{"./$.global":64}],93:[function(require,module,exports){
+},{"./$.global":66}],95:[function(require,module,exports){
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = require('./$.an-object')
, aFunction = require('./$.a-function')
@@ -3134,12 +1543,12 @@ module.exports = function(O, D){
var C = anObject(O).constructor, S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
-},{"./$.a-function":46,"./$.an-object":48,"./$.wks":102}],94:[function(require,module,exports){
+},{"./$.a-function":48,"./$.an-object":50,"./$.wks":104}],96:[function(require,module,exports){
module.exports = function(it, Constructor, name){
if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
return it;
};
-},{}],95:[function(require,module,exports){
+},{}],97:[function(require,module,exports){
var toInteger = require('./$.to-integer')
, defined = require('./$.defined');
// true -> String#at
@@ -3157,7 +1566,7 @@ module.exports = function(TO_STRING){
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
};
};
-},{"./$.defined":56,"./$.to-integer":97}],96:[function(require,module,exports){
+},{"./$.defined":58,"./$.to-integer":99}],98:[function(require,module,exports){
var ctx = require('./$.ctx')
, invoke = require('./$.invoke')
, html = require('./$.html')
@@ -3233,40 +1642,40 @@ module.exports = {
set: setTask,
clear: clearTask
};
-},{"./$.cof":50,"./$.ctx":55,"./$.dom-create":58,"./$.global":64,"./$.html":67,"./$.invoke":68}],97:[function(require,module,exports){
+},{"./$.cof":52,"./$.ctx":57,"./$.dom-create":60,"./$.global":66,"./$.html":69,"./$.invoke":70}],99:[function(require,module,exports){
// 7.1.4 ToInteger
var ceil = Math.ceil
, floor = Math.floor;
module.exports = function(it){
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
-},{}],98:[function(require,module,exports){
+},{}],100:[function(require,module,exports){
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = require('./$.iobject')
, defined = require('./$.defined');
module.exports = function(it){
return IObject(defined(it));
};
-},{"./$.defined":56,"./$.iobject":69}],99:[function(require,module,exports){
+},{"./$.defined":58,"./$.iobject":71}],101:[function(require,module,exports){
// 7.1.15 ToLength
var toInteger = require('./$.to-integer')
, min = Math.min;
module.exports = function(it){
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
-},{"./$.to-integer":97}],100:[function(require,module,exports){
+},{"./$.to-integer":99}],102:[function(require,module,exports){
// 7.1.13 ToObject(argument)
var defined = require('./$.defined');
module.exports = function(it){
return Object(defined(it));
};
-},{"./$.defined":56}],101:[function(require,module,exports){
+},{"./$.defined":58}],103:[function(require,module,exports){
var id = 0
, px = Math.random();
module.exports = function(key){
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
-},{}],102:[function(require,module,exports){
+},{}],104:[function(require,module,exports){
var store = require('./$.shared')('wks')
, uid = require('./$.uid')
, Symbol = require('./$.global').Symbol;
@@ -3274,7 +1683,7 @@ module.exports = function(name){
return store[name] || (store[name] =
Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
};
-},{"./$.global":64,"./$.shared":92,"./$.uid":101}],103:[function(require,module,exports){
+},{"./$.global":66,"./$.shared":94,"./$.uid":103}],105:[function(require,module,exports){
var classof = require('./$.classof')
, ITERATOR = require('./$.wks')('iterator')
, Iterators = require('./$.iterators');
@@ -3283,7 +1692,7 @@ module.exports = require('./$.core').getIteratorMethod = function(it){
|| it['@@iterator']
|| Iterators[classof(it)];
};
-},{"./$.classof":49,"./$.core":54,"./$.iterators":78,"./$.wks":102}],104:[function(require,module,exports){
+},{"./$.classof":51,"./$.core":56,"./$.iterators":80,"./$.wks":104}],106:[function(require,module,exports){
var anObject = require('./$.an-object')
, get = require('./core.get-iterator-method');
module.exports = require('./$.core').getIterator = function(it){
@@ -3291,7 +1700,7 @@ module.exports = require('./$.core').getIterator = function(it){
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
};
-},{"./$.an-object":48,"./$.core":54,"./core.get-iterator-method":103}],105:[function(require,module,exports){
+},{"./$.an-object":50,"./$.core":56,"./core.get-iterator-method":105}],107:[function(require,module,exports){
var classof = require('./$.classof')
, ITERATOR = require('./$.wks')('iterator')
, Iterators = require('./$.iterators');
@@ -3301,7 +1710,7 @@ module.exports = require('./$.core').isIterable = function(it){
|| '@@iterator' in O
|| Iterators.hasOwnProperty(classof(O));
};
-},{"./$.classof":49,"./$.core":54,"./$.iterators":78,"./$.wks":102}],106:[function(require,module,exports){
+},{"./$.classof":51,"./$.core":56,"./$.iterators":80,"./$.wks":104}],108:[function(require,module,exports){
'use strict';
var ctx = require('./$.ctx')
, $export = require('./$.export')
@@ -3339,7 +1748,7 @@ $export($export.S + $export.F * !require('./$.iter-detect')(function(iter){ Arra
}
});
-},{"./$.ctx":55,"./$.export":60,"./$.is-array-iter":70,"./$.iter-call":73,"./$.iter-detect":76,"./$.to-length":99,"./$.to-object":100,"./core.get-iterator-method":103}],107:[function(require,module,exports){
+},{"./$.ctx":57,"./$.export":62,"./$.is-array-iter":72,"./$.iter-call":75,"./$.iter-detect":78,"./$.to-length":101,"./$.to-object":102,"./core.get-iterator-method":105}],109:[function(require,module,exports){
'use strict';
var addToUnscopables = require('./$.add-to-unscopables')
, step = require('./$.iter-step')
@@ -3374,7 +1783,7 @@ Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
-},{"./$.add-to-unscopables":47,"./$.iter-define":75,"./$.iter-step":77,"./$.iterators":78,"./$.to-iobject":98}],108:[function(require,module,exports){
+},{"./$.add-to-unscopables":49,"./$.iter-define":77,"./$.iter-step":79,"./$.iterators":80,"./$.to-iobject":100}],110:[function(require,module,exports){
'use strict';
var strong = require('./$.collection-strong');
@@ -3392,7 +1801,7 @@ require('./$.collection')('Map', function(get){
return strong.def(this, key === 0 ? 0 : key, value);
}
}, strong, true);
-},{"./$.collection":53,"./$.collection-strong":51}],109:[function(require,module,exports){
+},{"./$.collection":55,"./$.collection-strong":53}],111:[function(require,module,exports){
// 20.1.2.4 Number.isNaN(number)
var $export = require('./$.export');
@@ -3401,22 +1810,22 @@ $export($export.S, 'Number', {
return number != number;
}
});
-},{"./$.export":60}],110:[function(require,module,exports){
+},{"./$.export":62}],112:[function(require,module,exports){
// 20.1.2.12 Number.parseFloat(string)
var $export = require('./$.export');
$export($export.S, 'Number', {parseFloat: parseFloat});
-},{"./$.export":60}],111:[function(require,module,exports){
+},{"./$.export":62}],113:[function(require,module,exports){
// 20.1.2.13 Number.parseInt(string, radix)
var $export = require('./$.export');
$export($export.S, 'Number', {parseInt: parseInt});
-},{"./$.export":60}],112:[function(require,module,exports){
+},{"./$.export":62}],114:[function(require,module,exports){
// 19.1.3.1 Object.assign(target, source)
var $export = require('./$.export');
$export($export.S + $export.F, 'Object', {assign: require('./$.object-assign')});
-},{"./$.export":60,"./$.object-assign":83}],113:[function(require,module,exports){
+},{"./$.export":62,"./$.object-assign":85}],115:[function(require,module,exports){
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = require('./$.to-iobject');
@@ -3425,7 +1834,7 @@ require('./$.object-sap')('getOwnPropertyDescriptor', function($getOwnPropertyDe
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
-},{"./$.object-sap":84,"./$.to-iobject":98}],114:[function(require,module,exports){
+},{"./$.object-sap":86,"./$.to-iobject":100}],116:[function(require,module,exports){
// 19.1.2.14 Object.keys(O)
var toObject = require('./$.to-object');
@@ -3434,13 +1843,13 @@ require('./$.object-sap')('keys', function($keys){
return $keys(toObject(it));
};
});
-},{"./$.object-sap":84,"./$.to-object":100}],115:[function(require,module,exports){
+},{"./$.object-sap":86,"./$.to-object":102}],117:[function(require,module,exports){
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = require('./$.export');
$export($export.S, 'Object', {setPrototypeOf: require('./$.set-proto').set});
-},{"./$.export":60,"./$.set-proto":89}],116:[function(require,module,exports){
-arguments[4][26][0].apply(exports,arguments)
-},{"dup":26}],117:[function(require,module,exports){
+},{"./$.export":62,"./$.set-proto":91}],118:[function(require,module,exports){
+arguments[4][29][0].apply(exports,arguments)
+},{"dup":29}],119:[function(require,module,exports){
'use strict';
var $ = require('./$')
, LIBRARY = require('./$.library')
@@ -3462,12 +1871,16 @@ var $ = require('./$')
, process = global.process
, isNode = classof(process) == 'process'
, P = global[PROMISE]
+ , empty = function(){ /* empty */ }
, Wrapper;
var testResolve = function(sub){
- var test = new P(function(){});
- if(sub)test.constructor = Object;
- return P.resolve(test) === test;
+ var test = new P(empty), promise;
+ if(sub)test.constructor = function(exec){
+ exec(empty, empty);
+ };
+ (promise = P.resolve(test))['catch'](empty);
+ return promise === test;
};
var USE_NATIVE = function(){
@@ -3730,7 +2143,7 @@ $export($export.S + $export.F * !(USE_NATIVE && require('./$.iter-detect')(funct
return capability.promise;
}
});
-},{"./$":79,"./$.a-function":46,"./$.an-object":48,"./$.classof":49,"./$.core":54,"./$.ctx":55,"./$.descriptors":57,"./$.export":60,"./$.for-of":62,"./$.global":64,"./$.is-object":72,"./$.iter-detect":76,"./$.library":81,"./$.microtask":82,"./$.redefine-all":86,"./$.same-value":88,"./$.set-proto":89,"./$.set-species":90,"./$.set-to-string-tag":91,"./$.species-constructor":93,"./$.strict-new":94,"./$.wks":102}],118:[function(require,module,exports){
+},{"./$":81,"./$.a-function":48,"./$.an-object":50,"./$.classof":51,"./$.core":56,"./$.ctx":57,"./$.descriptors":59,"./$.export":62,"./$.for-of":64,"./$.global":66,"./$.is-object":74,"./$.iter-detect":78,"./$.library":83,"./$.microtask":84,"./$.redefine-all":88,"./$.same-value":90,"./$.set-proto":91,"./$.set-species":92,"./$.set-to-string-tag":93,"./$.species-constructor":95,"./$.strict-new":96,"./$.wks":104}],120:[function(require,module,exports){
'use strict';
var $at = require('./$.string-at')(true);
@@ -3748,7 +2161,7 @@ require('./$.iter-define')(String, 'String', function(iterated){
this._i += point.length;
return {value: point, done: false};
});
-},{"./$.iter-define":75,"./$.string-at":95}],119:[function(require,module,exports){
+},{"./$.iter-define":77,"./$.string-at":97}],121:[function(require,module,exports){
'use strict';
// ECMAScript 6 symbols shim
var $ = require('./$')
@@ -3976,16 +2389,16 @@ setToStringTag($Symbol, 'Symbol');
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
-},{"./$":79,"./$.an-object":48,"./$.descriptors":57,"./$.enum-keys":59,"./$.export":60,"./$.fails":61,"./$.get-names":63,"./$.global":64,"./$.has":65,"./$.is-array":71,"./$.keyof":80,"./$.library":81,"./$.property-desc":85,"./$.redefine":87,"./$.set-to-string-tag":91,"./$.shared":92,"./$.to-iobject":98,"./$.uid":101,"./$.wks":102}],120:[function(require,module,exports){
+},{"./$":81,"./$.an-object":50,"./$.descriptors":59,"./$.enum-keys":61,"./$.export":62,"./$.fails":63,"./$.get-names":65,"./$.global":66,"./$.has":67,"./$.is-array":73,"./$.keyof":82,"./$.library":83,"./$.property-desc":87,"./$.redefine":89,"./$.set-to-string-tag":93,"./$.shared":94,"./$.to-iobject":100,"./$.uid":103,"./$.wks":104}],122:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = require('./$.export');
$export($export.P, 'Map', {toJSON: require('./$.collection-to-json')('Map')});
-},{"./$.collection-to-json":52,"./$.export":60}],121:[function(require,module,exports){
+},{"./$.collection-to-json":54,"./$.export":62}],123:[function(require,module,exports){
require('./es6.array.iterator');
var Iterators = require('./$.iterators');
Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
-},{"./$.iterators":78,"./es6.array.iterator":107}],122:[function(require,module,exports){
+},{"./$.iterators":80,"./es6.array.iterator":109}],124:[function(require,module,exports){
!function() {
var d3 = {
version: "3.5.16"
@@ -13540,8 +11953,8 @@ Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
});
if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3;
}();
-},{}],123:[function(require,module,exports){
-
+},{}],125:[function(require,module,exports){
+(function (process){
/**
* This is the web browser implementation of `debug()`.
*
@@ -13581,13 +11994,23 @@ exports.colors = [
*/
function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {
+ return true;
+ }
+
// is webkit? http://stackoverflow.com/a/16459606/376773
- return ('WebkitAppearance' in document.documentElement.style) ||
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||
// is firebug? http://stackoverflow.com/a/398120/376773
- (window.console && (console.firebug || (console.exception && console.table))) ||
+ (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||
// is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+ (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}
/**
@@ -13595,7 +12018,11 @@ function useColors() {
*/
exports.formatters.j = function(v) {
- return JSON.stringify(v);
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
};
@@ -13605,8 +12032,7 @@ exports.formatters.j = function(v) {
* @api public
*/
-function formatArgs() {
- var args = arguments;
+function formatArgs(args) {
var useColors = this.useColors;
args[0] = (useColors ? '%c' : '')
@@ -13616,17 +12042,17 @@ function formatArgs() {
+ (useColors ? '%c ' : ' ')
+ '+' + exports.humanize(this.diff);
- if (!useColors) return args;
+ if (!useColors) return;
var c = 'color: ' + this.color;
- args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+ args.splice(1, 0, c, 'color: inherit')
// the final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
- args[0].replace(/%[a-z%]/g, function(match) {
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
if ('%%' === match) return;
index++;
if ('%c' === match) {
@@ -13637,7 +12063,6 @@ function formatArgs() {
});
args.splice(lastC, 0, c);
- return args;
}
/**
@@ -13680,11 +12105,14 @@ function save(namespaces) {
*/
function load() {
- var r;
try {
- r = exports.storage.debug;
+ return exports.storage.debug;
} catch(e) {}
- return r;
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (typeof process !== 'undefined' && 'env' in process) {
+ return process.env.DEBUG;
+ }
}
/**
@@ -13704,13 +12132,15 @@ exports.enable(load());
* @api private
*/
-function localstorage(){
+function localstorage() {
try {
return window.localStorage;
} catch (e) {}
}
-},{"./debug":124}],124:[function(require,module,exports){
+}).call(this,require('_process'))
+
+},{"./debug":126,"_process":295}],126:[function(require,module,exports){
/**
* This is the common logic for both the Node.js and web browser
@@ -13719,7 +12149,7 @@ function localstorage(){
* Expose `debug()` as the module.
*/
-exports = module.exports = debug;
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
@@ -13736,17 +12166,11 @@ exports.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
- * Valid key names are a single, lowercased letter, i.e. "n".
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
exports.formatters = {};
-/**
- * Previously assigned color.
- */
-
-var prevColor = 0;
-
/**
* Previous log timestamp.
*/
@@ -13755,13 +12179,20 @@ var prevTime;
/**
* Select a color.
- *
+ * @param {String} namespace
* @return {Number}
* @api private
*/
-function selectColor() {
- return exports.colors[prevColor++ % exports.colors.length];
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
}
/**
@@ -13772,17 +12203,13 @@ function selectColor() {
* @api public
*/
-function debug(namespace) {
+function createDebug(namespace) {
- // define the `disabled` version
- function disabled() {
- }
- disabled.enabled = false;
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
- // define the `enabled` version
- function enabled() {
-
- var self = enabled;
+ var self = debug;
// set `diff` timestamp
var curr = +new Date();
@@ -13792,22 +12219,22 @@ function debug(namespace) {
self.curr = curr;
prevTime = curr;
- // add the `color` if not set
- if (null == self.useColors) self.useColors = exports.useColors();
- if (null == self.color && self.useColors) self.color = selectColor();
-
- var args = Array.prototype.slice.call(arguments);
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
args[0] = exports.coerce(args[0]);
if ('string' !== typeof args[0]) {
- // anything else let's inspect with %o
- args = ['%o'].concat(args);
+ // anything else let's inspect with %O
+ args.unshift('%O');
}
// apply any `formatters` transformations
var index = 0;
- args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
// if we encounter an escaped % then don't increase the array index
if (match === '%%') return match;
index++;
@@ -13823,19 +12250,24 @@ function debug(namespace) {
return match;
});
- if ('function' === typeof exports.formatArgs) {
- args = exports.formatArgs.apply(self, args);
- }
- var logFn = enabled.log || exports.log || console.log.bind(console);
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
logFn.apply(self, args);
}
- enabled.enabled = true;
- var fn = exports.enabled(namespace) ? enabled : disabled;
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
- fn.namespace = namespace;
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
- return fn;
+ return debug;
}
/**
@@ -13849,6 +12281,9 @@ function debug(namespace) {
function enable(namespaces) {
exports.save(namespaces);
+ exports.names = [];
+ exports.skips = [];
+
var split = (namespaces || '').split(/[\s,]+/);
var len = split.length;
@@ -13909,7 +12344,7 @@ function coerce(val) {
return val;
}
-},{"ms":255}],125:[function(require,module,exports){
+},{"ms":280}],127:[function(require,module,exports){
'use strict';
var babelHelpers = require('./util/babelHelpers.js');
@@ -13934,19 +12369,19 @@ function activeElement() {
}
module.exports = exports['default'];
-},{"./ownerDocument":134,"./util/babelHelpers.js":147}],126:[function(require,module,exports){
+},{"./ownerDocument":136,"./util/babelHelpers.js":149}],128:[function(require,module,exports){
'use strict';
var hasClass = require('./hasClass');
module.exports = function addClass(element, className) {
if (element.classList) element.classList.add(className);else if (!hasClass(element)) element.className = element.className + ' ' + className;
};
-},{"./hasClass":127}],127:[function(require,module,exports){
+},{"./hasClass":129}],129:[function(require,module,exports){
'use strict';
module.exports = function hasClass(element, className) {
if (element.classList) return !!className && element.classList.contains(className);else return (' ' + element.className + ' ').indexOf(' ' + className + ' ') !== -1;
};
-},{}],128:[function(require,module,exports){
+},{}],130:[function(require,module,exports){
'use strict';
module.exports = {
@@ -13954,13 +12389,13 @@ module.exports = {
removeClass: require('./removeClass'),
hasClass: require('./hasClass')
};
-},{"./addClass":126,"./hasClass":127,"./removeClass":129}],129:[function(require,module,exports){
+},{"./addClass":128,"./hasClass":129,"./removeClass":131}],131:[function(require,module,exports){
'use strict';
module.exports = function removeClass(element, className) {
if (element.classList) element.classList.remove(className);else element.className = element.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
};
-},{}],130:[function(require,module,exports){
+},{}],132:[function(require,module,exports){
'use strict';
var contains = require('../query/contains'),
@@ -13977,14 +12412,14 @@ module.exports = function (selector, handler) {
})) handler.call(this, e);
};
};
-},{"../query/contains":135,"../query/querySelectorAll":140}],131:[function(require,module,exports){
+},{"../query/contains":137,"../query/querySelectorAll":142}],133:[function(require,module,exports){
'use strict';
var on = require('./on'),
off = require('./off'),
filter = require('./filter');
module.exports = { on: on, off: off, filter: filter };
-},{"./filter":130,"./off":132,"./on":133}],132:[function(require,module,exports){
+},{"./filter":132,"./off":134,"./on":135}],134:[function(require,module,exports){
'use strict';
var canUseDOM = require('../util/inDOM');
var off = function off() {};
@@ -14002,7 +12437,7 @@ if (canUseDOM) {
}
module.exports = off;
-},{"../util/inDOM":152}],133:[function(require,module,exports){
+},{"../util/inDOM":154}],135:[function(require,module,exports){
'use strict';
var canUseDOM = require('../util/inDOM');
var on = function on() {};
@@ -14019,7 +12454,7 @@ if (canUseDOM) {
}
module.exports = on;
-},{"../util/inDOM":152}],134:[function(require,module,exports){
+},{"../util/inDOM":154}],136:[function(require,module,exports){
"use strict";
exports.__esModule = true;
@@ -14030,7 +12465,7 @@ function ownerDocument(node) {
}
module.exports = exports["default"];
-},{}],135:[function(require,module,exports){
+},{}],137:[function(require,module,exports){
'use strict';
var canUseDOM = require('../util/inDOM');
@@ -14051,13 +12486,13 @@ var contains = (function () {
})();
module.exports = contains;
-},{"../util/inDOM":152}],136:[function(require,module,exports){
+},{"../util/inDOM":154}],138:[function(require,module,exports){
'use strict';
module.exports = function getWindow(node) {
return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;
};
-},{}],137:[function(require,module,exports){
+},{}],139:[function(require,module,exports){
'use strict';
var contains = require('./contains'),
getWindow = require('./isWindow'),
@@ -14088,7 +12523,7 @@ module.exports = function offset(node) {
return box;
};
-},{"../ownerDocument":134,"./contains":135,"./isWindow":136}],138:[function(require,module,exports){
+},{"../ownerDocument":136,"./contains":137,"./isWindow":138}],140:[function(require,module,exports){
'use strict';
var babelHelpers = require('../util/babelHelpers.js');
@@ -14120,7 +12555,7 @@ function offsetParent(node) {
}
module.exports = exports['default'];
-},{"../ownerDocument":134,"../style":144,"../util/babelHelpers.js":147}],139:[function(require,module,exports){
+},{"../ownerDocument":136,"../style":146,"../util/babelHelpers.js":149}],141:[function(require,module,exports){
'use strict';
var babelHelpers = require('../util/babelHelpers.js');
@@ -14178,7 +12613,7 @@ function position(node, offsetParent) {
}
module.exports = exports['default'];
-},{"../style":144,"../util/babelHelpers.js":147,"./offset":137,"./offsetParent":138,"./scrollLeft":141,"./scrollTop":142}],140:[function(require,module,exports){
+},{"../style":146,"../util/babelHelpers.js":149,"./offset":139,"./offsetParent":140,"./scrollLeft":143,"./scrollTop":144}],142:[function(require,module,exports){
'use strict';
// Zepto.js
// (c) 2010-2015 Thomas Fuchs
@@ -14206,7 +12641,7 @@ module.exports = function qsa(element, selector) {
return toArray(element.querySelectorAll(selector));
};
-},{}],141:[function(require,module,exports){
+},{}],143:[function(require,module,exports){
'use strict';
var getWindow = require('./isWindow');
@@ -14217,7 +12652,7 @@ module.exports = function scrollTop(node, val) {
if (win) win.scrollTo(val, 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop);else node.scrollLeft = val;
};
-},{"./isWindow":136}],142:[function(require,module,exports){
+},{"./isWindow":138}],144:[function(require,module,exports){
'use strict';
var getWindow = require('./isWindow');
@@ -14228,7 +12663,7 @@ module.exports = function scrollTop(node, val) {
if (win) win.scrollTo('pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft, val);else node.scrollTop = val;
};
-},{"./isWindow":136}],143:[function(require,module,exports){
+},{"./isWindow":138}],145:[function(require,module,exports){
'use strict';
var babelHelpers = require('../util/babelHelpers.js');
@@ -14277,7 +12712,7 @@ module.exports = function _getComputedStyle(node) {
}
};
};
-},{"../util/babelHelpers.js":147,"../util/camelizeStyle":149}],144:[function(require,module,exports){
+},{"../util/babelHelpers.js":149,"../util/camelizeStyle":151}],146:[function(require,module,exports){
'use strict';
var camelize = require('../util/camelizeStyle'),
@@ -14302,13 +12737,13 @@ module.exports = function style(node, property, value) {
node.style.cssText += ';' + css;
};
-},{"../util/camelizeStyle":149,"../util/hyphenateStyle":151,"./getComputedStyle":143,"./removeStyle":145}],145:[function(require,module,exports){
+},{"../util/camelizeStyle":151,"../util/hyphenateStyle":153,"./getComputedStyle":145,"./removeStyle":147}],147:[function(require,module,exports){
'use strict';
module.exports = function removeStyle(node, key) {
return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key);
};
-},{}],146:[function(require,module,exports){
+},{}],148:[function(require,module,exports){
'use strict';
var canUseDOM = require('../util/inDOM');
@@ -14364,7 +12799,7 @@ function getTransitionProperties() {
return { end: endEvent, prefix: prefix };
}
-},{"../util/inDOM":152}],147:[function(require,module,exports){
+},{"../util/inDOM":154}],149:[function(require,module,exports){
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
@@ -14396,7 +12831,7 @@ function getTransitionProperties() {
return target;
};
})
-},{}],148:[function(require,module,exports){
+},{}],150:[function(require,module,exports){
"use strict";
var rHyphen = /-(.)/g;
@@ -14406,7 +12841,7 @@ module.exports = function camelize(string) {
return chr.toUpperCase();
});
};
-},{}],149:[function(require,module,exports){
+},{}],151:[function(require,module,exports){
/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
@@ -14420,7 +12855,7 @@ var msPattern = /^-ms-/;
module.exports = function camelizeStyleName(string) {
return camelize(string.replace(msPattern, 'ms-'));
};
-},{"./camelize":148}],150:[function(require,module,exports){
+},{"./camelize":150}],152:[function(require,module,exports){
'use strict';
var rUpper = /([A-Z])/g;
@@ -14428,7 +12863,7 @@ var rUpper = /([A-Z])/g;
module.exports = function hyphenate(string) {
return string.replace(rUpper, '-$1').toLowerCase();
};
-},{}],151:[function(require,module,exports){
+},{}],153:[function(require,module,exports){
/**
* Copyright 2013-2014, Facebook, Inc.
* All rights reserved.
@@ -14443,10 +12878,10 @@ var msPattern = /^ms-/;
module.exports = function hyphenateStyleName(string) {
return hyphenate(string).replace(msPattern, "-ms-");
};
-},{"./hyphenate":150}],152:[function(require,module,exports){
+},{"./hyphenate":152}],154:[function(require,module,exports){
'use strict';
module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-},{}],153:[function(require,module,exports){
+},{}],155:[function(require,module,exports){
'use strict';
var canUseDOM = require('./inDOM');
@@ -14472,7 +12907,7 @@ module.exports = function (recalc) {
return size;
};
-},{"./inDOM":152}],154:[function(require,module,exports){
+},{"./inDOM":154}],156:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -14775,9 +13210,9 @@ function isUndefined(arg) {
return arg === void 0;
}
-},{}],155:[function(require,module,exports){
+},{}],157:[function(require,module,exports){
/**
- * Copyright (c) 2014-2015, Facebook, Inc.
+ * Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
@@ -14786,15 +13221,16 @@ function isUndefined(arg) {
*/
var fbemitter = {
- EventEmitter: require('./lib/BaseEventEmitter')
+ EventEmitter: require('./lib/BaseEventEmitter'),
+ EmitterSubscription : require('./lib/EmitterSubscription')
};
module.exports = fbemitter;
-},{"./lib/BaseEventEmitter":156}],156:[function(require,module,exports){
+},{"./lib/BaseEventEmitter":158,"./lib/EmitterSubscription":159}],158:[function(require,module,exports){
(function (process){
/**
- * Copyright (c) 2014-2015, Facebook, Inc.
+ * Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
@@ -14986,9 +13422,9 @@ var BaseEventEmitter = (function () {
module.exports = BaseEventEmitter;
}).call(this,require('_process'))
-},{"./EmitterSubscription":157,"./EventSubscriptionVendor":159,"_process":269,"fbjs/lib/emptyFunction":160,"fbjs/lib/invariant":161}],157:[function(require,module,exports){
+},{"./EmitterSubscription":159,"./EventSubscriptionVendor":161,"_process":295,"fbjs/lib/emptyFunction":162,"fbjs/lib/invariant":163}],159:[function(require,module,exports){
/**
- * Copyright (c) 2014-2015, Facebook, Inc.
+ * Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
@@ -15035,9 +13471,9 @@ var EmitterSubscription = (function (_EventSubscription) {
})(EventSubscription);
module.exports = EmitterSubscription;
-},{"./EventSubscription":158}],158:[function(require,module,exports){
+},{"./EventSubscription":160}],160:[function(require,module,exports){
/**
- * Copyright (c) 2014-2015, Facebook, Inc.
+ * Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
@@ -15085,10 +13521,10 @@ var EventSubscription = (function () {
})();
module.exports = EventSubscription;
-},{}],159:[function(require,module,exports){
+},{}],161:[function(require,module,exports){
(function (process){
/**
- * Copyright (c) 2014-2015, Facebook, Inc.
+ * Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
@@ -15192,19 +13628,20 @@ var EventSubscriptionVendor = (function () {
module.exports = EventSubscriptionVendor;
}).call(this,require('_process'))
-},{"_process":269,"fbjs/lib/invariant":161}],160:[function(require,module,exports){
+},{"_process":295,"fbjs/lib/invariant":163}],162:[function(require,module,exports){
+"use strict";
+
/**
- * Copyright 2013-2015, Facebook, Inc.
+ * Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
+ *
*/
-"use strict";
-
function makeEmptyFunction(arg) {
return function () {
return arg;
@@ -15216,7 +13653,7 @@ function makeEmptyFunction(arg) {
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
-function emptyFunction() {}
+var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
@@ -15230,9 +13667,9 @@ emptyFunction.thatReturnsArgument = function (arg) {
};
module.exports = emptyFunction;
-},{}],161:[function(require,module,exports){
+},{}],163:[function(require,module,exports){
/**
- * Copyright 2013-2015, Facebook, Inc.
+ * Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
@@ -15254,12 +13691,18 @@ module.exports = emptyFunction;
* will remain to ensure logic does not differ in production.
*/
-function invariant(condition, format, a, b, c, d, e, f) {
- if ("development" !== 'production') {
+var validateFormat = function validateFormat(format) {};
+
+if ("development" !== 'production') {
+ validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
- }
+ };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+ validateFormat(format);
if (!condition) {
var error;
@@ -15280,7 +13723,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
}
module.exports = invariant;
-},{}],162:[function(require,module,exports){
+},{}],164:[function(require,module,exports){
(function (process){
/**
* Copyright 2013-2015, Facebook, Inc.
@@ -15333,7 +13776,7 @@ var invariant = function (condition, format, a, b, c, d, e, f) {
module.exports = invariant;
}).call(this,require('_process'))
-},{"_process":269}],163:[function(require,module,exports){
+},{"_process":295}],165:[function(require,module,exports){
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
@@ -15384,7 +13827,7 @@ function shallowEqual(objA, objB) {
}
module.exports = shallowEqual;
-},{}],164:[function(require,module,exports){
+},{}],166:[function(require,module,exports){
/* FileSaver.js
* A saveAs() FileSaver implementation.
* 1.1.20150716
@@ -15642,7 +14085,7 @@ if (typeof module !== "undefined" && module.exports) {
});
}
-},{}],165:[function(require,module,exports){
+},{}],167:[function(require,module,exports){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
@@ -15654,7 +14097,7 @@ if (typeof module !== "undefined" && module.exports) {
module.exports.Dispatcher = require('./lib/Dispatcher');
-},{"./lib/Dispatcher":166}],166:[function(require,module,exports){
+},{"./lib/Dispatcher":168}],168:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -15889,7 +14332,7 @@ var Dispatcher = (function () {
module.exports = Dispatcher;
}).call(this,require('_process'))
-},{"_process":269,"fbjs/lib/invariant":162}],167:[function(require,module,exports){
+},{"_process":295,"fbjs/lib/invariant":164}],169:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -16070,7 +14513,7 @@ function enforceInterface(o) {
module.exports = { create: create };
}).call(this,require('_process'))
-},{"./FluxStoreGroup":172,"_process":269,"fbjs/lib/invariant":162,"fbjs/lib/shallowEqual":163}],168:[function(require,module,exports){
+},{"./FluxStoreGroup":174,"_process":295,"fbjs/lib/invariant":164,"fbjs/lib/shallowEqual":165}],170:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -16218,7 +14661,7 @@ var FluxMapStore = (function (_FluxReduceStore) {
module.exports = FluxMapStore;
}).call(this,require('_process'))
-},{"./FluxReduceStore":170,"_process":269,"fbjs/lib/invariant":162,"immutable":178}],169:[function(require,module,exports){
+},{"./FluxReduceStore":172,"_process":295,"fbjs/lib/invariant":164,"immutable":179}],171:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -16339,7 +14782,7 @@ function enforceInterface(o) {
module.exports = FluxMixinLegacy;
}).call(this,require('_process'))
-},{"./FluxStoreGroup":172,"_process":269,"fbjs/lib/invariant":162}],170:[function(require,module,exports){
+},{"./FluxStoreGroup":174,"_process":295,"fbjs/lib/invariant":164}],172:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -16444,7 +14887,7 @@ var FluxReduceStore = (function (_FluxStore) {
module.exports = FluxReduceStore;
}).call(this,require('_process'))
-},{"./FluxStore":171,"./abstractMethod":173,"_process":269,"fbjs/lib/invariant":162}],171:[function(require,module,exports){
+},{"./FluxStore":173,"./abstractMethod":175,"_process":295,"fbjs/lib/invariant":164}],173:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -16625,7 +15068,7 @@ module.exports = FluxStore;
// protected, available to subclasses
}).call(this,require('_process'))
-},{"_process":269,"fbemitter":155,"fbjs/lib/invariant":162}],172:[function(require,module,exports){
+},{"_process":295,"fbemitter":157,"fbjs/lib/invariant":164}],174:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -16704,7 +15147,7 @@ function _getUniformDispatcher(stores) {
module.exports = FluxStoreGroup;
}).call(this,require('_process'))
-},{"_process":269,"fbjs/lib/invariant":162}],173:[function(require,module,exports){
+},{"_process":295,"fbjs/lib/invariant":164}],175:[function(require,module,exports){
(function (process){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@@ -16729,7 +15172,7 @@ function abstractMethod(className, methodName) {
module.exports = abstractMethod;
}).call(this,require('_process'))
-},{"_process":269,"fbjs/lib/invariant":162}],174:[function(require,module,exports){
+},{"_process":295,"fbjs/lib/invariant":164}],176:[function(require,module,exports){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
@@ -16745,7 +15188,7 @@ module.exports.Mixin = require('./lib/FluxMixinLegacy');
module.exports.ReduceStore = require('./lib/FluxReduceStore');
module.exports.Store = require('./lib/FluxStore');
-},{"./lib/FluxContainer":167,"./lib/FluxMapStore":168,"./lib/FluxMixinLegacy":169,"./lib/FluxReduceStore":170,"./lib/FluxStore":171}],175:[function(require,module,exports){
+},{"./lib/FluxContainer":169,"./lib/FluxMapStore":170,"./lib/FluxMixinLegacy":171,"./lib/FluxReduceStore":172,"./lib/FluxStore":173}],177:[function(require,module,exports){
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
@@ -16772,14 +15215,24 @@ var KNOWN_STATICS = {
arity: true
};
-module.exports = function hoistNonReactStatics(targetComponent, sourceComponent) {
- var keys = Object.getOwnPropertyNames(sourceComponent);
- for (var i=0; i> 1
- var nBits = -7
- var i = isLE ? (nBytes - 1) : 0
- var d = isLE ? -1 : 1
- var s = buffer[offset + i]
-
- i += d
-
- e = s & ((1 << (-nBits)) - 1)
- s >>= (-nBits)
- nBits += eLen
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- m = e & ((1 << (-nBits)) - 1)
- e >>= (-nBits)
- nBits += mLen
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- if (e === 0) {
- e = 1 - eBias
- } else if (e === eMax) {
- return m ? NaN : ((s ? -1 : 1) * Infinity)
- } else {
- m = m + Math.pow(2, mLen)
- e = e - eBias
- }
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
-}
-
-exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c
- var eLen = nBytes * 8 - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
- var i = isLE ? 0 : (nBytes - 1)
- var d = isLE ? 1 : -1
- var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
-
- value = Math.abs(value)
-
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0
- e = eMax
- } else {
- e = Math.floor(Math.log(value) / Math.LN2)
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--
- c *= 2
- }
- if (e + eBias >= 1) {
- value += rt / c
- } else {
- value += rt * Math.pow(2, 1 - eBias)
- }
- if (value * c >= 2) {
- e++
- c /= 2
- }
-
- if (e + eBias >= eMax) {
- m = 0
- e = eMax
- } else if (e + eBias >= 1) {
- m = (value * c - 1) * Math.pow(2, mLen)
- e = e + eBias
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
- e = 0
- }
- }
-
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
-
- e = (e << mLen) | m
- eLen += mLen
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
-
- buffer[offset + i - d] |= s * 128
-}
-
-},{}],178:[function(require,module,exports){
+},{}],179:[function(require,module,exports){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
@@ -17362,7 +15729,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
- global.Immutable = factory();
+ (global.Immutable = factory());
}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;
function createClass(ctor, superClass) {
@@ -18257,7 +16624,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
}
return 'Range [ ' +
this._start + '...' + this._end +
- (this._step > 1 ? ' by ' + this._step : '') +
+ (this._step !== 1 ? ' by ' + this._step : '') +
' ]';
};
@@ -18389,6 +16756,9 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
}
var type = typeof o;
if (type === 'number') {
+ if (o !== o || o === Infinity) {
+ return 0;
+ }
var h = o | 0;
if (h !== o) {
h ^= o * 0xFFFFFFFF;
@@ -18574,6 +16944,17 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
});
}
+ Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);
+ return emptyMap().withMutations(function(map ) {
+ for (var i = 0; i < keyValues.length; i += 2) {
+ if (i + 1 >= keyValues.length) {
+ throw new Error('Missing value for key: ' + keyValues[i]);
+ }
+ map.set(keyValues[i], keyValues[i + 1]);
+ }
+ });
+ };
+
Map.prototype.toString = function() {
return this.__toString('Map {', '}');
};
@@ -20486,7 +18867,11 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
begin = begin | 0;
}
if (end !== undefined) {
- end = end | 0;
+ if (end === Infinity) {
+ end = originalSize;
+ } else {
+ end = end | 0;
+ }
}
if (wholeSlice(begin, end, originalSize)) {
@@ -21023,6 +19408,12 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
if (!this.has(k)) {
throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this));
}
+ if (this._map && !this._map.has(k)) {
+ var defaultVal = this._defaultValues[k];
+ if (v === defaultVal) {
+ return this;
+ }
+ }
var newMap = this._map && this._map.set(k, v);
if (this.__ownerID || newMap === this._map) {
return this;
@@ -21706,21 +20097,6 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
return entry ? entry[1] : notSetValue;
},
- findEntry: function(predicate, context) {
- var found;
- this.__iterate(function(v, k, c) {
- if (predicate.call(context, v, k, c)) {
- found = [k, v];
- return false;
- }
- });
- return found;
- },
-
- findLastEntry: function(predicate, context) {
- return this.toSeq().reverse().findEntry(predicate, context);
- },
-
forEach: function(sideEffect, context) {
assertNotInfinite(this.size);
return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
@@ -21831,10 +20207,34 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
return this.filter(not(predicate), context);
},
+ findEntry: function(predicate, context, notSetValue) {
+ var found = notSetValue;
+ this.__iterate(function(v, k, c) {
+ if (predicate.call(context, v, k, c)) {
+ found = [k, v];
+ return false;
+ }
+ });
+ return found;
+ },
+
+ findKey: function(predicate, context) {
+ var entry = this.findEntry(predicate, context);
+ return entry && entry[0];
+ },
+
findLast: function(predicate, context, notSetValue) {
return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
},
+ findLastEntry: function(predicate, context, notSetValue) {
+ return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);
+ },
+
+ findLastKey: function(predicate, context) {
+ return this.toKeyedSeq().reverse().findKey(predicate, context);
+ },
+
first: function() {
return this.find(returnTrue);
},
@@ -21893,6 +20293,10 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
return iter.isSubset(this);
},
+ keyOf: function(searchValue) {
+ return this.findKey(function(value ) {return is(value, searchValue)});
+ },
+
keySeq: function() {
return this.toSeq().map(keyMapper).toIndexedSeq();
},
@@ -21901,6 +20305,10 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
return this.toSeq().reverse().first();
},
+ lastKeyOf: function(searchValue) {
+ return this.toKeyedSeq().reverse().keyOf(searchValue);
+ },
+
max: function(comparator) {
return maxFactory(this, comparator);
},
@@ -21991,35 +20399,6 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
IterablePrototype.chain = IterablePrototype.flatMap;
IterablePrototype.contains = IterablePrototype.includes;
- // Temporary warning about using length
- (function () {
- try {
- Object.defineProperty(IterablePrototype, 'length', {
- get: function () {
- if (!Iterable.noLengthWarning) {
- var stack;
- try {
- throw new Error();
- } catch (error) {
- stack = error.stack;
- }
- if (stack.indexOf('_wrapObject') === -1) {
- console && console.warn && console.warn(
- 'iterable.length has been deprecated, '+
- 'use iterable.size or iterable.count(). '+
- 'This warning will become a silent error in a future version. ' +
- stack
- );
- return this.size;
- }
- }
- }
- });
- } catch (e) {}
- })();
-
-
-
mixin(KeyedIterable, {
// ### More sequential methods
@@ -22028,23 +20407,6 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
return reify(this, flipFactory(this));
},
- findKey: function(predicate, context) {
- var entry = this.findEntry(predicate, context);
- return entry && entry[0];
- },
-
- findLastKey: function(predicate, context) {
- return this.toSeq().reverse().findKey(predicate, context);
- },
-
- keyOf: function(searchValue) {
- return this.findKey(function(value ) {return is(value, searchValue)});
- },
-
- lastKeyOf: function(searchValue) {
- return this.findLastKey(function(value ) {return is(value, searchValue)});
- },
-
mapEntries: function(mapper, context) {var this$0 = this;
var iterations = 0;
return reify(this,
@@ -22093,16 +20455,13 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
},
indexOf: function(searchValue) {
- var key = this.toKeyedSeq().keyOf(searchValue);
+ var key = this.keyOf(searchValue);
return key === undefined ? -1 : key;
},
lastIndexOf: function(searchValue) {
- var key = this.toKeyedSeq().reverse().keyOf(searchValue);
+ var key = this.lastKeyOf(searchValue);
return key === undefined ? -1 : key;
-
- // var index =
- // return this.toSeq().reverse().indexOf(searchValue);
},
reverse: function() {
@@ -22136,8 +20495,8 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
// ### More collection methods
findLastIndex: function(predicate, context) {
- var key = this.toKeyedSeq().findLastKey(predicate, context);
- return key === undefined ? -1 : key;
+ var entry = this.findLastEntry(predicate, context);
+ return entry ? entry[0] : -1;
},
first: function() {
@@ -22178,6 +20537,10 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
return reify(this, interleaved);
},
+ keySeq: function() {
+ return Range(0, this.size);
+ },
+
last: function() {
return this.get(-1);
},
@@ -22226,6 +20589,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
});
SetIterable.prototype.has = IterablePrototype.includes;
+ SetIterable.prototype.contains = SetIterable.prototype.includes;
// Mixin subclasses
@@ -22262,7 +20626,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
}
function quoteString(value) {
- return typeof value === 'string' ? JSON.stringify(value) : value;
+ return typeof value === 'string' ? JSON.stringify(value) : String(value);
}
function defaultZipper() {
@@ -22332,7 +20696,2574 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
return Immutable;
}));
-},{}],179:[function(require,module,exports){
+},{}],180:[function(require,module,exports){
+'use strict';
+
+exports = module.exports = require('./lib/memoizer')['default'];
+exports['default'] = exports;
+
+},{"./lib/memoizer":182}],181:[function(require,module,exports){
+"use strict";
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+// Function.prototype.bind implementation from Mozilla Developer Network:
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill
+
+var bind = Function.prototype.bind || function (oThis) {
+ if (typeof this !== 'function') {
+ // closest thing possible to the ECMAScript 5
+ // internal IsCallable function
+ throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
+ }
+
+ var aArgs = Array.prototype.slice.call(arguments, 1),
+ fToBind = this,
+ fNOP = function() {},
+ fBound = function() {
+ return fToBind.apply(this instanceof fNOP
+ ? this
+ : oThis,
+ aArgs.concat(Array.prototype.slice.call(arguments)));
+ };
+
+ if (this.prototype) {
+ // native functions don't have a prototype
+ fNOP.prototype = this.prototype;
+ }
+ fBound.prototype = new fNOP();
+
+ return fBound;
+};
+
+// Purposely using the same implementation as the Intl.js `Intl` polyfill.
+// Copyright 2013 Andy Earnshaw, MIT License
+
+var hop = Object.prototype.hasOwnProperty;
+
+var realDefineProp = (function () {
+ try { return !!Object.defineProperty({}, 'a', {}); }
+ catch (e) { return false; }
+})();
+
+var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
+
+var defineProperty = realDefineProp ? Object.defineProperty :
+ function (obj, name, desc) {
+
+ if ('get' in desc && obj.__defineGetter__) {
+ obj.__defineGetter__(name, desc.get);
+ } else if (!hop.call(obj, name) || 'value' in desc) {
+ obj[name] = desc.value;
+ }
+};
+
+var objCreate = Object.create || function (proto, props) {
+ var obj, k;
+
+ function F() {}
+ F.prototype = proto;
+ obj = new F();
+
+ for (k in props) {
+ if (hop.call(props, k)) {
+ defineProperty(obj, k, props[k]);
+ }
+ }
+
+ return obj;
+};
+
+exports.bind = bind, exports.defineProperty = defineProperty, exports.objCreate = objCreate;
+
+
+},{}],182:[function(require,module,exports){
+"use strict";
+var src$es5$$ = require("./es5");
+exports["default"] = createFormatCache;
+
+// -----------------------------------------------------------------------------
+
+function createFormatCache(FormatConstructor) {
+ var cache = src$es5$$.objCreate(null);
+
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ var cacheId = getCacheId(args);
+ var format = cacheId && cache[cacheId];
+
+ if (!format) {
+ format = new (src$es5$$.bind.apply(FormatConstructor, [null].concat(args)))();
+
+ if (cacheId) {
+ cache[cacheId] = format;
+ }
+ }
+
+ return format;
+ };
+}
+
+// -- Utilities ----------------------------------------------------------------
+
+function getCacheId(inputs) {
+ // When JSON is not available in the runtime, we will not create a cache id.
+ if (typeof JSON === 'undefined') { return; }
+
+ var cacheId = [];
+
+ var i, len, input;
+
+ for (i = 0, len = inputs.length; i < len; i += 1) {
+ input = inputs[i];
+
+ if (input && typeof input === 'object') {
+ cacheId.push(orderedProps(input));
+ } else {
+ cacheId.push(input);
+ }
+ }
+
+ return JSON.stringify(cacheId);
+}
+
+function orderedProps(obj) {
+ var props = [],
+ keys = [];
+
+ var key, i, len, prop;
+
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ keys.push(key);
+ }
+ }
+
+ var orderedKeys = keys.sort();
+
+ for (i = 0, len = orderedKeys.length; i < len; i += 1) {
+ key = orderedKeys[i];
+ prop = {};
+
+ prop[key] = obj[key];
+ props[i] = prop;
+ }
+
+ return props;
+}
+
+
+},{"./es5":181}],183:[function(require,module,exports){
+'use strict';
+
+exports = module.exports = require('./lib/parser')['default'];
+exports['default'] = exports;
+
+},{"./lib/parser":184}],184:[function(require,module,exports){
+"use strict";
+
+exports["default"] = (function() {
+ /*
+ * Generated by PEG.js 0.8.0.
+ *
+ * http://pegjs.majda.cz/
+ */
+
+ function peg$subclass(child, parent) {
+ function ctor() { this.constructor = child; }
+ ctor.prototype = parent.prototype;
+ child.prototype = new ctor();
+ }
+
+ function SyntaxError(message, expected, found, offset, line, column) {
+ this.message = message;
+ this.expected = expected;
+ this.found = found;
+ this.offset = offset;
+ this.line = line;
+ this.column = column;
+
+ this.name = "SyntaxError";
+ }
+
+ peg$subclass(SyntaxError, Error);
+
+ function parse(input) {
+ var options = arguments.length > 1 ? arguments[1] : {},
+
+ peg$FAILED = {},
+
+ peg$startRuleFunctions = { start: peg$parsestart },
+ peg$startRuleFunction = peg$parsestart,
+
+ peg$c0 = [],
+ peg$c1 = function(elements) {
+ return {
+ type : 'messageFormatPattern',
+ elements: elements
+ };
+ },
+ peg$c2 = peg$FAILED,
+ peg$c3 = function(text) {
+ var string = '',
+ i, j, outerLen, inner, innerLen;
+
+ for (i = 0, outerLen = text.length; i < outerLen; i += 1) {
+ inner = text[i];
+
+ for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {
+ string += inner[j];
+ }
+ }
+
+ return string;
+ },
+ peg$c4 = function(messageText) {
+ return {
+ type : 'messageTextElement',
+ value: messageText
+ };
+ },
+ peg$c5 = /^[^ \t\n\r,.+={}#]/,
+ peg$c6 = { type: "class", value: "[^ \\t\\n\\r,.+={}#]", description: "[^ \\t\\n\\r,.+={}#]" },
+ peg$c7 = "{",
+ peg$c8 = { type: "literal", value: "{", description: "\"{\"" },
+ peg$c9 = null,
+ peg$c10 = ",",
+ peg$c11 = { type: "literal", value: ",", description: "\",\"" },
+ peg$c12 = "}",
+ peg$c13 = { type: "literal", value: "}", description: "\"}\"" },
+ peg$c14 = function(id, format) {
+ return {
+ type : 'argumentElement',
+ id : id,
+ format: format && format[2]
+ };
+ },
+ peg$c15 = "number",
+ peg$c16 = { type: "literal", value: "number", description: "\"number\"" },
+ peg$c17 = "date",
+ peg$c18 = { type: "literal", value: "date", description: "\"date\"" },
+ peg$c19 = "time",
+ peg$c20 = { type: "literal", value: "time", description: "\"time\"" },
+ peg$c21 = function(type, style) {
+ return {
+ type : type + 'Format',
+ style: style && style[2]
+ };
+ },
+ peg$c22 = "plural",
+ peg$c23 = { type: "literal", value: "plural", description: "\"plural\"" },
+ peg$c24 = function(pluralStyle) {
+ return {
+ type : pluralStyle.type,
+ ordinal: false,
+ offset : pluralStyle.offset || 0,
+ options: pluralStyle.options
+ };
+ },
+ peg$c25 = "selectordinal",
+ peg$c26 = { type: "literal", value: "selectordinal", description: "\"selectordinal\"" },
+ peg$c27 = function(pluralStyle) {
+ return {
+ type : pluralStyle.type,
+ ordinal: true,
+ offset : pluralStyle.offset || 0,
+ options: pluralStyle.options
+ }
+ },
+ peg$c28 = "select",
+ peg$c29 = { type: "literal", value: "select", description: "\"select\"" },
+ peg$c30 = function(options) {
+ return {
+ type : 'selectFormat',
+ options: options
+ };
+ },
+ peg$c31 = "=",
+ peg$c32 = { type: "literal", value: "=", description: "\"=\"" },
+ peg$c33 = function(selector, pattern) {
+ return {
+ type : 'optionalFormatPattern',
+ selector: selector,
+ value : pattern
+ };
+ },
+ peg$c34 = "offset:",
+ peg$c35 = { type: "literal", value: "offset:", description: "\"offset:\"" },
+ peg$c36 = function(number) {
+ return number;
+ },
+ peg$c37 = function(offset, options) {
+ return {
+ type : 'pluralFormat',
+ offset : offset,
+ options: options
+ };
+ },
+ peg$c38 = { type: "other", description: "whitespace" },
+ peg$c39 = /^[ \t\n\r]/,
+ peg$c40 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" },
+ peg$c41 = { type: "other", description: "optionalWhitespace" },
+ peg$c42 = /^[0-9]/,
+ peg$c43 = { type: "class", value: "[0-9]", description: "[0-9]" },
+ peg$c44 = /^[0-9a-f]/i,
+ peg$c45 = { type: "class", value: "[0-9a-f]i", description: "[0-9a-f]i" },
+ peg$c46 = "0",
+ peg$c47 = { type: "literal", value: "0", description: "\"0\"" },
+ peg$c48 = /^[1-9]/,
+ peg$c49 = { type: "class", value: "[1-9]", description: "[1-9]" },
+ peg$c50 = function(digits) {
+ return parseInt(digits, 10);
+ },
+ peg$c51 = /^[^{}\\\0-\x1F \t\n\r]/,
+ peg$c52 = { type: "class", value: "[^{}\\\\\\0-\\x1F \\t\\n\\r]", description: "[^{}\\\\\\0-\\x1F \\t\\n\\r]" },
+ peg$c53 = "\\\\",
+ peg$c54 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" },
+ peg$c55 = function() { return '\\'; },
+ peg$c56 = "\\#",
+ peg$c57 = { type: "literal", value: "\\#", description: "\"\\\\#\"" },
+ peg$c58 = function() { return '\\#'; },
+ peg$c59 = "\\{",
+ peg$c60 = { type: "literal", value: "\\{", description: "\"\\\\{\"" },
+ peg$c61 = function() { return '\u007B'; },
+ peg$c62 = "\\}",
+ peg$c63 = { type: "literal", value: "\\}", description: "\"\\\\}\"" },
+ peg$c64 = function() { return '\u007D'; },
+ peg$c65 = "\\u",
+ peg$c66 = { type: "literal", value: "\\u", description: "\"\\\\u\"" },
+ peg$c67 = function(digits) {
+ return String.fromCharCode(parseInt(digits, 16));
+ },
+ peg$c68 = function(chars) { return chars.join(''); },
+
+ peg$currPos = 0,
+ peg$reportedPos = 0,
+ peg$cachedPos = 0,
+ peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },
+ peg$maxFailPos = 0,
+ peg$maxFailExpected = [],
+ peg$silentFails = 0,
+
+ peg$result;
+
+ if ("startRule" in options) {
+ if (!(options.startRule in peg$startRuleFunctions)) {
+ throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
+ }
+
+ peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
+ }
+
+ function text() {
+ return input.substring(peg$reportedPos, peg$currPos);
+ }
+
+ function offset() {
+ return peg$reportedPos;
+ }
+
+ function line() {
+ return peg$computePosDetails(peg$reportedPos).line;
+ }
+
+ function column() {
+ return peg$computePosDetails(peg$reportedPos).column;
+ }
+
+ function expected(description) {
+ throw peg$buildException(
+ null,
+ [{ type: "other", description: description }],
+ peg$reportedPos
+ );
+ }
+
+ function error(message) {
+ throw peg$buildException(message, null, peg$reportedPos);
+ }
+
+ function peg$computePosDetails(pos) {
+ function advance(details, startPos, endPos) {
+ var p, ch;
+
+ for (p = startPos; p < endPos; p++) {
+ ch = input.charAt(p);
+ if (ch === "\n") {
+ if (!details.seenCR) { details.line++; }
+ details.column = 1;
+ details.seenCR = false;
+ } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") {
+ details.line++;
+ details.column = 1;
+ details.seenCR = true;
+ } else {
+ details.column++;
+ details.seenCR = false;
+ }
+ }
+ }
+
+ if (peg$cachedPos !== pos) {
+ if (peg$cachedPos > pos) {
+ peg$cachedPos = 0;
+ peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };
+ }
+ advance(peg$cachedPosDetails, peg$cachedPos, pos);
+ peg$cachedPos = pos;
+ }
+
+ return peg$cachedPosDetails;
+ }
+
+ function peg$fail(expected) {
+ if (peg$currPos < peg$maxFailPos) { return; }
+
+ if (peg$currPos > peg$maxFailPos) {
+ peg$maxFailPos = peg$currPos;
+ peg$maxFailExpected = [];
+ }
+
+ peg$maxFailExpected.push(expected);
+ }
+
+ function peg$buildException(message, expected, pos) {
+ function cleanupExpected(expected) {
+ var i = 1;
+
+ expected.sort(function(a, b) {
+ if (a.description < b.description) {
+ return -1;
+ } else if (a.description > b.description) {
+ return 1;
+ } else {
+ return 0;
+ }
+ });
+
+ while (i < expected.length) {
+ if (expected[i - 1] === expected[i]) {
+ expected.splice(i, 1);
+ } else {
+ i++;
+ }
+ }
+ }
+
+ function buildMessage(expected, found) {
+ function stringEscape(s) {
+ function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }
+
+ return s
+ .replace(/\\/g, '\\\\')
+ .replace(/"/g, '\\"')
+ .replace(/\x08/g, '\\b')
+ .replace(/\t/g, '\\t')
+ .replace(/\n/g, '\\n')
+ .replace(/\f/g, '\\f')
+ .replace(/\r/g, '\\r')
+ .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
+ .replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); })
+ .replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); })
+ .replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); });
+ }
+
+ var expectedDescs = new Array(expected.length),
+ expectedDesc, foundDesc, i;
+
+ for (i = 0; i < expected.length; i++) {
+ expectedDescs[i] = expected[i].description;
+ }
+
+ expectedDesc = expected.length > 1
+ ? expectedDescs.slice(0, -1).join(", ")
+ + " or "
+ + expectedDescs[expected.length - 1]
+ : expectedDescs[0];
+
+ foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input";
+
+ return "Expected " + expectedDesc + " but " + foundDesc + " found.";
+ }
+
+ var posDetails = peg$computePosDetails(pos),
+ found = pos < input.length ? input.charAt(pos) : null;
+
+ if (expected !== null) {
+ cleanupExpected(expected);
+ }
+
+ return new SyntaxError(
+ message !== null ? message : buildMessage(expected, found),
+ expected,
+ found,
+ pos,
+ posDetails.line,
+ posDetails.column
+ );
+ }
+
+ function peg$parsestart() {
+ var s0;
+
+ s0 = peg$parsemessageFormatPattern();
+
+ return s0;
+ }
+
+ function peg$parsemessageFormatPattern() {
+ var s0, s1, s2;
+
+ s0 = peg$currPos;
+ s1 = [];
+ s2 = peg$parsemessageFormatElement();
+ while (s2 !== peg$FAILED) {
+ s1.push(s2);
+ s2 = peg$parsemessageFormatElement();
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c1(s1);
+ }
+ s0 = s1;
+
+ return s0;
+ }
+
+ function peg$parsemessageFormatElement() {
+ var s0;
+
+ s0 = peg$parsemessageTextElement();
+ if (s0 === peg$FAILED) {
+ s0 = peg$parseargumentElement();
+ }
+
+ return s0;
+ }
+
+ function peg$parsemessageText() {
+ var s0, s1, s2, s3, s4, s5;
+
+ s0 = peg$currPos;
+ s1 = [];
+ s2 = peg$currPos;
+ s3 = peg$parse_();
+ if (s3 !== peg$FAILED) {
+ s4 = peg$parsechars();
+ if (s4 !== peg$FAILED) {
+ s5 = peg$parse_();
+ if (s5 !== peg$FAILED) {
+ s3 = [s3, s4, s5];
+ s2 = s3;
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ if (s2 !== peg$FAILED) {
+ while (s2 !== peg$FAILED) {
+ s1.push(s2);
+ s2 = peg$currPos;
+ s3 = peg$parse_();
+ if (s3 !== peg$FAILED) {
+ s4 = peg$parsechars();
+ if (s4 !== peg$FAILED) {
+ s5 = peg$parse_();
+ if (s5 !== peg$FAILED) {
+ s3 = [s3, s4, s5];
+ s2 = s3;
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ }
+ } else {
+ s1 = peg$c2;
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c3(s1);
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ s1 = peg$parsews();
+ if (s1 !== peg$FAILED) {
+ s1 = input.substring(s0, peg$currPos);
+ }
+ s0 = s1;
+ }
+
+ return s0;
+ }
+
+ function peg$parsemessageTextElement() {
+ var s0, s1;
+
+ s0 = peg$currPos;
+ s1 = peg$parsemessageText();
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c4(s1);
+ }
+ s0 = s1;
+
+ return s0;
+ }
+
+ function peg$parseargument() {
+ var s0, s1, s2;
+
+ s0 = peg$parsenumber();
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ s1 = [];
+ if (peg$c5.test(input.charAt(peg$currPos))) {
+ s2 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s2 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c6); }
+ }
+ if (s2 !== peg$FAILED) {
+ while (s2 !== peg$FAILED) {
+ s1.push(s2);
+ if (peg$c5.test(input.charAt(peg$currPos))) {
+ s2 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s2 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c6); }
+ }
+ }
+ } else {
+ s1 = peg$c2;
+ }
+ if (s1 !== peg$FAILED) {
+ s1 = input.substring(s0, peg$currPos);
+ }
+ s0 = s1;
+ }
+
+ return s0;
+ }
+
+ function peg$parseargumentElement() {
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8;
+
+ s0 = peg$currPos;
+ if (input.charCodeAt(peg$currPos) === 123) {
+ s1 = peg$c7;
+ peg$currPos++;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c8); }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parse_();
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseargument();
+ if (s3 !== peg$FAILED) {
+ s4 = peg$parse_();
+ if (s4 !== peg$FAILED) {
+ s5 = peg$currPos;
+ if (input.charCodeAt(peg$currPos) === 44) {
+ s6 = peg$c10;
+ peg$currPos++;
+ } else {
+ s6 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c11); }
+ }
+ if (s6 !== peg$FAILED) {
+ s7 = peg$parse_();
+ if (s7 !== peg$FAILED) {
+ s8 = peg$parseelementFormat();
+ if (s8 !== peg$FAILED) {
+ s6 = [s6, s7, s8];
+ s5 = s6;
+ } else {
+ peg$currPos = s5;
+ s5 = peg$c2;
+ }
+ } else {
+ peg$currPos = s5;
+ s5 = peg$c2;
+ }
+ } else {
+ peg$currPos = s5;
+ s5 = peg$c2;
+ }
+ if (s5 === peg$FAILED) {
+ s5 = peg$c9;
+ }
+ if (s5 !== peg$FAILED) {
+ s6 = peg$parse_();
+ if (s6 !== peg$FAILED) {
+ if (input.charCodeAt(peg$currPos) === 125) {
+ s7 = peg$c12;
+ peg$currPos++;
+ } else {
+ s7 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c13); }
+ }
+ if (s7 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c14(s3, s5);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parseelementFormat() {
+ var s0;
+
+ s0 = peg$parsesimpleFormat();
+ if (s0 === peg$FAILED) {
+ s0 = peg$parsepluralFormat();
+ if (s0 === peg$FAILED) {
+ s0 = peg$parseselectOrdinalFormat();
+ if (s0 === peg$FAILED) {
+ s0 = peg$parseselectFormat();
+ }
+ }
+ }
+
+ return s0;
+ }
+
+ function peg$parsesimpleFormat() {
+ var s0, s1, s2, s3, s4, s5, s6;
+
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 6) === peg$c15) {
+ s1 = peg$c15;
+ peg$currPos += 6;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c16); }
+ }
+ if (s1 === peg$FAILED) {
+ if (input.substr(peg$currPos, 4) === peg$c17) {
+ s1 = peg$c17;
+ peg$currPos += 4;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c18); }
+ }
+ if (s1 === peg$FAILED) {
+ if (input.substr(peg$currPos, 4) === peg$c19) {
+ s1 = peg$c19;
+ peg$currPos += 4;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c20); }
+ }
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parse_();
+ if (s2 !== peg$FAILED) {
+ s3 = peg$currPos;
+ if (input.charCodeAt(peg$currPos) === 44) {
+ s4 = peg$c10;
+ peg$currPos++;
+ } else {
+ s4 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c11); }
+ }
+ if (s4 !== peg$FAILED) {
+ s5 = peg$parse_();
+ if (s5 !== peg$FAILED) {
+ s6 = peg$parsechars();
+ if (s6 !== peg$FAILED) {
+ s4 = [s4, s5, s6];
+ s3 = s4;
+ } else {
+ peg$currPos = s3;
+ s3 = peg$c2;
+ }
+ } else {
+ peg$currPos = s3;
+ s3 = peg$c2;
+ }
+ } else {
+ peg$currPos = s3;
+ s3 = peg$c2;
+ }
+ if (s3 === peg$FAILED) {
+ s3 = peg$c9;
+ }
+ if (s3 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c21(s1, s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parsepluralFormat() {
+ var s0, s1, s2, s3, s4, s5;
+
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 6) === peg$c22) {
+ s1 = peg$c22;
+ peg$currPos += 6;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c23); }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parse_();
+ if (s2 !== peg$FAILED) {
+ if (input.charCodeAt(peg$currPos) === 44) {
+ s3 = peg$c10;
+ peg$currPos++;
+ } else {
+ s3 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c11); }
+ }
+ if (s3 !== peg$FAILED) {
+ s4 = peg$parse_();
+ if (s4 !== peg$FAILED) {
+ s5 = peg$parsepluralStyle();
+ if (s5 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c24(s5);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parseselectOrdinalFormat() {
+ var s0, s1, s2, s3, s4, s5;
+
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 13) === peg$c25) {
+ s1 = peg$c25;
+ peg$currPos += 13;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c26); }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parse_();
+ if (s2 !== peg$FAILED) {
+ if (input.charCodeAt(peg$currPos) === 44) {
+ s3 = peg$c10;
+ peg$currPos++;
+ } else {
+ s3 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c11); }
+ }
+ if (s3 !== peg$FAILED) {
+ s4 = peg$parse_();
+ if (s4 !== peg$FAILED) {
+ s5 = peg$parsepluralStyle();
+ if (s5 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c27(s5);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parseselectFormat() {
+ var s0, s1, s2, s3, s4, s5, s6;
+
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 6) === peg$c28) {
+ s1 = peg$c28;
+ peg$currPos += 6;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c29); }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parse_();
+ if (s2 !== peg$FAILED) {
+ if (input.charCodeAt(peg$currPos) === 44) {
+ s3 = peg$c10;
+ peg$currPos++;
+ } else {
+ s3 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c11); }
+ }
+ if (s3 !== peg$FAILED) {
+ s4 = peg$parse_();
+ if (s4 !== peg$FAILED) {
+ s5 = [];
+ s6 = peg$parseoptionalFormatPattern();
+ if (s6 !== peg$FAILED) {
+ while (s6 !== peg$FAILED) {
+ s5.push(s6);
+ s6 = peg$parseoptionalFormatPattern();
+ }
+ } else {
+ s5 = peg$c2;
+ }
+ if (s5 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c30(s5);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parseselector() {
+ var s0, s1, s2, s3;
+
+ s0 = peg$currPos;
+ s1 = peg$currPos;
+ if (input.charCodeAt(peg$currPos) === 61) {
+ s2 = peg$c31;
+ peg$currPos++;
+ } else {
+ s2 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c32); }
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parsenumber();
+ if (s3 !== peg$FAILED) {
+ s2 = [s2, s3];
+ s1 = s2;
+ } else {
+ peg$currPos = s1;
+ s1 = peg$c2;
+ }
+ } else {
+ peg$currPos = s1;
+ s1 = peg$c2;
+ }
+ if (s1 !== peg$FAILED) {
+ s1 = input.substring(s0, peg$currPos);
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$parsechars();
+ }
+
+ return s0;
+ }
+
+ function peg$parseoptionalFormatPattern() {
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8;
+
+ s0 = peg$currPos;
+ s1 = peg$parse_();
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parseselector();
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parse_();
+ if (s3 !== peg$FAILED) {
+ if (input.charCodeAt(peg$currPos) === 123) {
+ s4 = peg$c7;
+ peg$currPos++;
+ } else {
+ s4 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c8); }
+ }
+ if (s4 !== peg$FAILED) {
+ s5 = peg$parse_();
+ if (s5 !== peg$FAILED) {
+ s6 = peg$parsemessageFormatPattern();
+ if (s6 !== peg$FAILED) {
+ s7 = peg$parse_();
+ if (s7 !== peg$FAILED) {
+ if (input.charCodeAt(peg$currPos) === 125) {
+ s8 = peg$c12;
+ peg$currPos++;
+ } else {
+ s8 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c13); }
+ }
+ if (s8 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c33(s2, s6);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parseoffset() {
+ var s0, s1, s2, s3;
+
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 7) === peg$c34) {
+ s1 = peg$c34;
+ peg$currPos += 7;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c35); }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parse_();
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parsenumber();
+ if (s3 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c36(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parsepluralStyle() {
+ var s0, s1, s2, s3, s4;
+
+ s0 = peg$currPos;
+ s1 = peg$parseoffset();
+ if (s1 === peg$FAILED) {
+ s1 = peg$c9;
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$parse_();
+ if (s2 !== peg$FAILED) {
+ s3 = [];
+ s4 = peg$parseoptionalFormatPattern();
+ if (s4 !== peg$FAILED) {
+ while (s4 !== peg$FAILED) {
+ s3.push(s4);
+ s4 = peg$parseoptionalFormatPattern();
+ }
+ } else {
+ s3 = peg$c2;
+ }
+ if (s3 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c37(s1, s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+
+ return s0;
+ }
+
+ function peg$parsews() {
+ var s0, s1;
+
+ peg$silentFails++;
+ s0 = [];
+ if (peg$c39.test(input.charAt(peg$currPos))) {
+ s1 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c40); }
+ }
+ if (s1 !== peg$FAILED) {
+ while (s1 !== peg$FAILED) {
+ s0.push(s1);
+ if (peg$c39.test(input.charAt(peg$currPos))) {
+ s1 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c40); }
+ }
+ }
+ } else {
+ s0 = peg$c2;
+ }
+ peg$silentFails--;
+ if (s0 === peg$FAILED) {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c38); }
+ }
+
+ return s0;
+ }
+
+ function peg$parse_() {
+ var s0, s1, s2;
+
+ peg$silentFails++;
+ s0 = peg$currPos;
+ s1 = [];
+ s2 = peg$parsews();
+ while (s2 !== peg$FAILED) {
+ s1.push(s2);
+ s2 = peg$parsews();
+ }
+ if (s1 !== peg$FAILED) {
+ s1 = input.substring(s0, peg$currPos);
+ }
+ s0 = s1;
+ peg$silentFails--;
+ if (s0 === peg$FAILED) {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c41); }
+ }
+
+ return s0;
+ }
+
+ function peg$parsedigit() {
+ var s0;
+
+ if (peg$c42.test(input.charAt(peg$currPos))) {
+ s0 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s0 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c43); }
+ }
+
+ return s0;
+ }
+
+ function peg$parsehexDigit() {
+ var s0;
+
+ if (peg$c44.test(input.charAt(peg$currPos))) {
+ s0 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s0 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c45); }
+ }
+
+ return s0;
+ }
+
+ function peg$parsenumber() {
+ var s0, s1, s2, s3, s4, s5;
+
+ s0 = peg$currPos;
+ if (input.charCodeAt(peg$currPos) === 48) {
+ s1 = peg$c46;
+ peg$currPos++;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c47); }
+ }
+ if (s1 === peg$FAILED) {
+ s1 = peg$currPos;
+ s2 = peg$currPos;
+ if (peg$c48.test(input.charAt(peg$currPos))) {
+ s3 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s3 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c49); }
+ }
+ if (s3 !== peg$FAILED) {
+ s4 = [];
+ s5 = peg$parsedigit();
+ while (s5 !== peg$FAILED) {
+ s4.push(s5);
+ s5 = peg$parsedigit();
+ }
+ if (s4 !== peg$FAILED) {
+ s3 = [s3, s4];
+ s2 = s3;
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ } else {
+ peg$currPos = s2;
+ s2 = peg$c2;
+ }
+ if (s2 !== peg$FAILED) {
+ s2 = input.substring(s1, peg$currPos);
+ }
+ s1 = s2;
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c50(s1);
+ }
+ s0 = s1;
+
+ return s0;
+ }
+
+ function peg$parsechar() {
+ var s0, s1, s2, s3, s4, s5, s6, s7;
+
+ if (peg$c51.test(input.charAt(peg$currPos))) {
+ s0 = input.charAt(peg$currPos);
+ peg$currPos++;
+ } else {
+ s0 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c52); }
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c53) {
+ s1 = peg$c53;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c54); }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c55();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c56) {
+ s1 = peg$c56;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c57); }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c58();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c59) {
+ s1 = peg$c59;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c60); }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c61();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c62) {
+ s1 = peg$c62;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c63); }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c64();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c65) {
+ s1 = peg$c65;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) { peg$fail(peg$c66); }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = peg$currPos;
+ s3 = peg$currPos;
+ s4 = peg$parsehexDigit();
+ if (s4 !== peg$FAILED) {
+ s5 = peg$parsehexDigit();
+ if (s5 !== peg$FAILED) {
+ s6 = peg$parsehexDigit();
+ if (s6 !== peg$FAILED) {
+ s7 = peg$parsehexDigit();
+ if (s7 !== peg$FAILED) {
+ s4 = [s4, s5, s6, s7];
+ s3 = s4;
+ } else {
+ peg$currPos = s3;
+ s3 = peg$c2;
+ }
+ } else {
+ peg$currPos = s3;
+ s3 = peg$c2;
+ }
+ } else {
+ peg$currPos = s3;
+ s3 = peg$c2;
+ }
+ } else {
+ peg$currPos = s3;
+ s3 = peg$c2;
+ }
+ if (s3 !== peg$FAILED) {
+ s3 = input.substring(s2, peg$currPos);
+ }
+ s2 = s3;
+ if (s2 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c67(s2);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$c2;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return s0;
+ }
+
+ function peg$parsechars() {
+ var s0, s1, s2;
+
+ s0 = peg$currPos;
+ s1 = [];
+ s2 = peg$parsechar();
+ if (s2 !== peg$FAILED) {
+ while (s2 !== peg$FAILED) {
+ s1.push(s2);
+ s2 = peg$parsechar();
+ }
+ } else {
+ s1 = peg$c2;
+ }
+ if (s1 !== peg$FAILED) {
+ peg$reportedPos = s0;
+ s1 = peg$c68(s1);
+ }
+ s0 = s1;
+
+ return s0;
+ }
+
+ peg$result = peg$startRuleFunction();
+
+ if (peg$result !== peg$FAILED && peg$currPos === input.length) {
+ return peg$result;
+ } else {
+ if (peg$result !== peg$FAILED && peg$currPos < input.length) {
+ peg$fail({ type: "end", description: "end of input" });
+ }
+
+ throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
+ }
+ }
+
+ return {
+ SyntaxError: SyntaxError,
+ parse: parse
+ };
+})();
+
+
+},{}],185:[function(require,module,exports){
+/* jshint node:true */
+
+'use strict';
+
+var IntlMessageFormat = require('./lib/main')['default'];
+
+// Add all locale data to `IntlMessageFormat`. This module will be ignored when
+// bundling for the browser with Browserify/Webpack.
+require('./lib/locales');
+
+// Re-export `IntlMessageFormat` as the CommonJS default exports with all the
+// locale data registered, and with English set as the default locale. Define
+// the `default` prop for use with other compiled ES6 Modules.
+exports = module.exports = IntlMessageFormat;
+exports['default'] = exports;
+
+},{"./lib/locales":29,"./lib/main":190}],186:[function(require,module,exports){
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+"use strict";
+exports["default"] = Compiler;
+
+function Compiler(locales, formats, pluralFn) {
+ this.locales = locales;
+ this.formats = formats;
+ this.pluralFn = pluralFn;
+}
+
+Compiler.prototype.compile = function (ast) {
+ this.pluralStack = [];
+ this.currentPlural = null;
+ this.pluralNumberFormat = null;
+
+ return this.compileMessage(ast);
+};
+
+Compiler.prototype.compileMessage = function (ast) {
+ if (!(ast && ast.type === 'messageFormatPattern')) {
+ throw new Error('Message AST is not of type: "messageFormatPattern"');
+ }
+
+ var elements = ast.elements,
+ pattern = [];
+
+ var i, len, element;
+
+ for (i = 0, len = elements.length; i < len; i += 1) {
+ element = elements[i];
+
+ switch (element.type) {
+ case 'messageTextElement':
+ pattern.push(this.compileMessageText(element));
+ break;
+
+ case 'argumentElement':
+ pattern.push(this.compileArgument(element));
+ break;
+
+ default:
+ throw new Error('Message element does not have a valid type');
+ }
+ }
+
+ return pattern;
+};
+
+Compiler.prototype.compileMessageText = function (element) {
+ // When this `element` is part of plural sub-pattern and its value contains
+ // an unescaped '#', use a `PluralOffsetString` helper to properly output
+ // the number with the correct offset in the string.
+ if (this.currentPlural && /(^|[^\\])#/g.test(element.value)) {
+ // Create a cache a NumberFormat instance that can be reused for any
+ // PluralOffsetString instance in this message.
+ if (!this.pluralNumberFormat) {
+ this.pluralNumberFormat = new Intl.NumberFormat(this.locales);
+ }
+
+ return new PluralOffsetString(
+ this.currentPlural.id,
+ this.currentPlural.format.offset,
+ this.pluralNumberFormat,
+ element.value);
+ }
+
+ // Unescape the escaped '#'s in the message text.
+ return element.value.replace(/\\#/g, '#');
+};
+
+Compiler.prototype.compileArgument = function (element) {
+ var format = element.format;
+
+ if (!format) {
+ return new StringFormat(element.id);
+ }
+
+ var formats = this.formats,
+ locales = this.locales,
+ pluralFn = this.pluralFn,
+ options;
+
+ switch (format.type) {
+ case 'numberFormat':
+ options = formats.number[format.style];
+ return {
+ id : element.id,
+ format: new Intl.NumberFormat(locales, options).format
+ };
+
+ case 'dateFormat':
+ options = formats.date[format.style];
+ return {
+ id : element.id,
+ format: new Intl.DateTimeFormat(locales, options).format
+ };
+
+ case 'timeFormat':
+ options = formats.time[format.style];
+ return {
+ id : element.id,
+ format: new Intl.DateTimeFormat(locales, options).format
+ };
+
+ case 'pluralFormat':
+ options = this.compileOptions(element);
+ return new PluralFormat(
+ element.id, format.ordinal, format.offset, options, pluralFn
+ );
+
+ case 'selectFormat':
+ options = this.compileOptions(element);
+ return new SelectFormat(element.id, options);
+
+ default:
+ throw new Error('Message element does not have a valid format type');
+ }
+};
+
+Compiler.prototype.compileOptions = function (element) {
+ var format = element.format,
+ options = format.options,
+ optionsHash = {};
+
+ // Save the current plural element, if any, then set it to a new value when
+ // compiling the options sub-patterns. This conforms the spec's algorithm
+ // for handling `"#"` syntax in message text.
+ this.pluralStack.push(this.currentPlural);
+ this.currentPlural = format.type === 'pluralFormat' ? element : null;
+
+ var i, len, option;
+
+ for (i = 0, len = options.length; i < len; i += 1) {
+ option = options[i];
+
+ // Compile the sub-pattern and save it under the options's selector.
+ optionsHash[option.selector] = this.compileMessage(option.value);
+ }
+
+ // Pop the plural stack to put back the original current plural value.
+ this.currentPlural = this.pluralStack.pop();
+
+ return optionsHash;
+};
+
+// -- Compiler Helper Classes --------------------------------------------------
+
+function StringFormat(id) {
+ this.id = id;
+}
+
+StringFormat.prototype.format = function (value) {
+ if (!value) {
+ return '';
+ }
+
+ return typeof value === 'string' ? value : String(value);
+};
+
+function PluralFormat(id, useOrdinal, offset, options, pluralFn) {
+ this.id = id;
+ this.useOrdinal = useOrdinal;
+ this.offset = offset;
+ this.options = options;
+ this.pluralFn = pluralFn;
+}
+
+PluralFormat.prototype.getOption = function (value) {
+ var options = this.options;
+
+ var option = options['=' + value] ||
+ options[this.pluralFn(value - this.offset, this.useOrdinal)];
+
+ return option || options.other;
+};
+
+function PluralOffsetString(id, offset, numberFormat, string) {
+ this.id = id;
+ this.offset = offset;
+ this.numberFormat = numberFormat;
+ this.string = string;
+}
+
+PluralOffsetString.prototype.format = function (value) {
+ var number = this.numberFormat.format(value - this.offset);
+
+ return this.string
+ .replace(/(^|[^\\])#/g, '$1' + number)
+ .replace(/\\#/g, '#');
+};
+
+function SelectFormat(id, options) {
+ this.id = id;
+ this.options = options;
+}
+
+SelectFormat.prototype.getOption = function (value) {
+ var options = this.options;
+ return options[value] || options.other;
+};
+
+
+},{}],187:[function(require,module,exports){
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+"use strict";
+var src$utils$$ = require("./utils"), src$es5$$ = require("./es5"), src$compiler$$ = require("./compiler"), intl$messageformat$parser$$ = require("intl-messageformat-parser");
+exports["default"] = MessageFormat;
+
+// -- MessageFormat --------------------------------------------------------
+
+function MessageFormat(message, locales, formats) {
+ // Parse string messages into an AST.
+ var ast = typeof message === 'string' ?
+ MessageFormat.__parse(message) : message;
+
+ if (!(ast && ast.type === 'messageFormatPattern')) {
+ throw new TypeError('A message must be provided as a String or AST.');
+ }
+
+ // Creates a new object with the specified `formats` merged with the default
+ // formats.
+ formats = this._mergeFormats(MessageFormat.formats, formats);
+
+ // Defined first because it's used to build the format pattern.
+ src$es5$$.defineProperty(this, '_locale', {value: this._resolveLocale(locales)});
+
+ // Compile the `ast` to a pattern that is highly optimized for repeated
+ // `format()` invocations. **Note:** This passes the `locales` set provided
+ // to the constructor instead of just the resolved locale.
+ var pluralFn = this._findPluralRuleFunction(this._locale);
+ var pattern = this._compilePattern(ast, locales, formats, pluralFn);
+
+ // "Bind" `format()` method to `this` so it can be passed by reference like
+ // the other `Intl` APIs.
+ var messageFormat = this;
+ this.format = function (values) {
+ return messageFormat._format(pattern, values);
+ };
+}
+
+// Default format options used as the prototype of the `formats` provided to the
+// constructor. These are used when constructing the internal Intl.NumberFormat
+// and Intl.DateTimeFormat instances.
+src$es5$$.defineProperty(MessageFormat, 'formats', {
+ enumerable: true,
+
+ value: {
+ number: {
+ 'currency': {
+ style: 'currency'
+ },
+
+ 'percent': {
+ style: 'percent'
+ }
+ },
+
+ date: {
+ 'short': {
+ month: 'numeric',
+ day : 'numeric',
+ year : '2-digit'
+ },
+
+ 'medium': {
+ month: 'short',
+ day : 'numeric',
+ year : 'numeric'
+ },
+
+ 'long': {
+ month: 'long',
+ day : 'numeric',
+ year : 'numeric'
+ },
+
+ 'full': {
+ weekday: 'long',
+ month : 'long',
+ day : 'numeric',
+ year : 'numeric'
+ }
+ },
+
+ time: {
+ 'short': {
+ hour : 'numeric',
+ minute: 'numeric'
+ },
+
+ 'medium': {
+ hour : 'numeric',
+ minute: 'numeric',
+ second: 'numeric'
+ },
+
+ 'long': {
+ hour : 'numeric',
+ minute : 'numeric',
+ second : 'numeric',
+ timeZoneName: 'short'
+ },
+
+ 'full': {
+ hour : 'numeric',
+ minute : 'numeric',
+ second : 'numeric',
+ timeZoneName: 'short'
+ }
+ }
+ }
+});
+
+// Define internal private properties for dealing with locale data.
+src$es5$$.defineProperty(MessageFormat, '__localeData__', {value: src$es5$$.objCreate(null)});
+src$es5$$.defineProperty(MessageFormat, '__addLocaleData', {value: function (data) {
+ if (!(data && data.locale)) {
+ throw new Error(
+ 'Locale data provided to IntlMessageFormat is missing a ' +
+ '`locale` property'
+ );
+ }
+
+ MessageFormat.__localeData__[data.locale.toLowerCase()] = data;
+}});
+
+// Defines `__parse()` static method as an exposed private.
+src$es5$$.defineProperty(MessageFormat, '__parse', {value: intl$messageformat$parser$$["default"].parse});
+
+// Define public `defaultLocale` property which defaults to English, but can be
+// set by the developer.
+src$es5$$.defineProperty(MessageFormat, 'defaultLocale', {
+ enumerable: true,
+ writable : true,
+ value : undefined
+});
+
+MessageFormat.prototype.resolvedOptions = function () {
+ // TODO: Provide anything else?
+ return {
+ locale: this._locale
+ };
+};
+
+MessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {
+ var compiler = new src$compiler$$["default"](locales, formats, pluralFn);
+ return compiler.compile(ast);
+};
+
+MessageFormat.prototype._findPluralRuleFunction = function (locale) {
+ var localeData = MessageFormat.__localeData__;
+ var data = localeData[locale.toLowerCase()];
+
+ // The locale data is de-duplicated, so we have to traverse the locale's
+ // hierarchy until we find a `pluralRuleFunction` to return.
+ while (data) {
+ if (data.pluralRuleFunction) {
+ return data.pluralRuleFunction;
+ }
+
+ data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];
+ }
+
+ throw new Error(
+ 'Locale data added to IntlMessageFormat is missing a ' +
+ '`pluralRuleFunction` for :' + locale
+ );
+};
+
+MessageFormat.prototype._format = function (pattern, values) {
+ var result = '',
+ i, len, part, id, value;
+
+ for (i = 0, len = pattern.length; i < len; i += 1) {
+ part = pattern[i];
+
+ // Exist early for string parts.
+ if (typeof part === 'string') {
+ result += part;
+ continue;
+ }
+
+ id = part.id;
+
+ // Enforce that all required values are provided by the caller.
+ if (!(values && src$utils$$.hop.call(values, id))) {
+ throw new Error('A value must be provided for: ' + id);
+ }
+
+ value = values[id];
+
+ // Recursively format plural and select parts' option — which can be a
+ // nested pattern structure. The choosing of the option to use is
+ // abstracted-by and delegated-to the part helper object.
+ if (part.options) {
+ result += this._format(part.getOption(value), values);
+ } else {
+ result += part.format(value);
+ }
+ }
+
+ return result;
+};
+
+MessageFormat.prototype._mergeFormats = function (defaults, formats) {
+ var mergedFormats = {},
+ type, mergedType;
+
+ for (type in defaults) {
+ if (!src$utils$$.hop.call(defaults, type)) { continue; }
+
+ mergedFormats[type] = mergedType = src$es5$$.objCreate(defaults[type]);
+
+ if (formats && src$utils$$.hop.call(formats, type)) {
+ src$utils$$.extend(mergedType, formats[type]);
+ }
+ }
+
+ return mergedFormats;
+};
+
+MessageFormat.prototype._resolveLocale = function (locales) {
+ if (typeof locales === 'string') {
+ locales = [locales];
+ }
+
+ // Create a copy of the array so we can push on the default locale.
+ locales = (locales || []).concat(MessageFormat.defaultLocale);
+
+ var localeData = MessageFormat.__localeData__;
+ var i, len, localeParts, data;
+
+ // Using the set of locales + the default locale, we look for the first one
+ // which that has been registered. When data does not exist for a locale, we
+ // traverse its ancestors to find something that's been registered within
+ // its hierarchy of locales. Since we lack the proper `parentLocale` data
+ // here, we must take a naive approach to traversal.
+ for (i = 0, len = locales.length; i < len; i += 1) {
+ localeParts = locales[i].toLowerCase().split('-');
+
+ while (localeParts.length) {
+ data = localeData[localeParts.join('-')];
+ if (data) {
+ // Return the normalized locale string; e.g., we return "en-US",
+ // instead of "en-us".
+ return data.locale;
+ }
+
+ localeParts.pop();
+ }
+ }
+
+ var defaultLocale = locales.pop();
+ throw new Error(
+ 'No locale data has been added to IntlMessageFormat for: ' +
+ locales.join(', ') + ', or the default locale: ' + defaultLocale
+ );
+};
+
+
+},{"./compiler":186,"./es5":189,"./utils":191,"intl-messageformat-parser":183}],188:[function(require,module,exports){
+// GENERATED FILE
+"use strict";
+exports["default"] = {"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}};
+
+
+},{}],189:[function(require,module,exports){
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+"use strict";
+var src$utils$$ = require("./utils");
+
+// Purposely using the same implementation as the Intl.js `Intl` polyfill.
+// Copyright 2013 Andy Earnshaw, MIT License
+
+var realDefineProp = (function () {
+ try { return !!Object.defineProperty({}, 'a', {}); }
+ catch (e) { return false; }
+})();
+
+var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
+
+var defineProperty = realDefineProp ? Object.defineProperty :
+ function (obj, name, desc) {
+
+ if ('get' in desc && obj.__defineGetter__) {
+ obj.__defineGetter__(name, desc.get);
+ } else if (!src$utils$$.hop.call(obj, name) || 'value' in desc) {
+ obj[name] = desc.value;
+ }
+};
+
+var objCreate = Object.create || function (proto, props) {
+ var obj, k;
+
+ function F() {}
+ F.prototype = proto;
+ obj = new F();
+
+ for (k in props) {
+ if (src$utils$$.hop.call(props, k)) {
+ defineProperty(obj, k, props[k]);
+ }
+ }
+
+ return obj;
+};
+exports.defineProperty = defineProperty, exports.objCreate = objCreate;
+
+
+},{"./utils":191}],190:[function(require,module,exports){
+/* jslint esnext: true */
+
+"use strict";
+var src$core$$ = require("./core"), src$en$$ = require("./en");
+
+src$core$$["default"].__addLocaleData(src$en$$["default"]);
+src$core$$["default"].defaultLocale = 'en';
+
+exports["default"] = src$core$$["default"];
+
+
+},{"./core":187,"./en":188}],191:[function(require,module,exports){
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+"use strict";
+exports.extend = extend;
+var hop = Object.prototype.hasOwnProperty;
+
+function extend(obj) {
+ var sources = Array.prototype.slice.call(arguments, 1),
+ i, len, source, key;
+
+ for (i = 0, len = sources.length; i < len; i += 1) {
+ source = sources[i];
+ if (!source) { continue; }
+
+ for (key in source) {
+ if (hop.call(source, key)) {
+ obj[key] = source[key];
+ }
+ }
+ }
+
+ return obj;
+}
+exports.hop = hop;
+
+
+},{}],192:[function(require,module,exports){
+/* jshint node:true */
+
+'use strict';
+
+var IntlRelativeFormat = require('./lib/main')['default'];
+
+// Add all locale data to `IntlRelativeFormat`. This module will be ignored when
+// bundling for the browser with Browserify/Webpack.
+require('./lib/locales');
+
+// Re-export `IntlRelativeFormat` as the CommonJS default exports with all the
+// locale data registered, and with English set as the default locale. Define
+// the `default` prop for use with other compiled ES6 Modules.
+exports = module.exports = IntlRelativeFormat;
+exports['default'] = exports;
+
+},{"./lib/locales":29,"./lib/main":197}],193:[function(require,module,exports){
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+"use strict";
+var intl$messageformat$$ = require("intl-messageformat"), src$diff$$ = require("./diff"), src$es5$$ = require("./es5");
+exports["default"] = RelativeFormat;
+
+// -----------------------------------------------------------------------------
+
+var FIELDS = ['second', 'minute', 'hour', 'day', 'month', 'year'];
+var STYLES = ['best fit', 'numeric'];
+
+// -- RelativeFormat -----------------------------------------------------------
+
+function RelativeFormat(locales, options) {
+ options = options || {};
+
+ // Make a copy of `locales` if it's an array, so that it doesn't change
+ // since it's used lazily.
+ if (src$es5$$.isArray(locales)) {
+ locales = locales.concat();
+ }
+
+ src$es5$$.defineProperty(this, '_locale', {value: this._resolveLocale(locales)});
+ src$es5$$.defineProperty(this, '_options', {value: {
+ style: this._resolveStyle(options.style),
+ units: this._isValidUnits(options.units) && options.units
+ }});
+
+ src$es5$$.defineProperty(this, '_locales', {value: locales});
+ src$es5$$.defineProperty(this, '_fields', {value: this._findFields(this._locale)});
+ src$es5$$.defineProperty(this, '_messages', {value: src$es5$$.objCreate(null)});
+
+ // "Bind" `format()` method to `this` so it can be passed by reference like
+ // the other `Intl` APIs.
+ var relativeFormat = this;
+ this.format = function format(date, options) {
+ return relativeFormat._format(date, options);
+ };
+}
+
+// Define internal private properties for dealing with locale data.
+src$es5$$.defineProperty(RelativeFormat, '__localeData__', {value: src$es5$$.objCreate(null)});
+src$es5$$.defineProperty(RelativeFormat, '__addLocaleData', {value: function (data) {
+ if (!(data && data.locale)) {
+ throw new Error(
+ 'Locale data provided to IntlRelativeFormat is missing a ' +
+ '`locale` property value'
+ );
+ }
+
+ RelativeFormat.__localeData__[data.locale.toLowerCase()] = data;
+
+ // Add data to IntlMessageFormat.
+ intl$messageformat$$["default"].__addLocaleData(data);
+}});
+
+// Define public `defaultLocale` property which can be set by the developer, or
+// it will be set when the first RelativeFormat instance is created by
+// leveraging the resolved locale from `Intl`.
+src$es5$$.defineProperty(RelativeFormat, 'defaultLocale', {
+ enumerable: true,
+ writable : true,
+ value : undefined
+});
+
+// Define public `thresholds` property which can be set by the developer, and
+// defaults to relative time thresholds from moment.js.
+src$es5$$.defineProperty(RelativeFormat, 'thresholds', {
+ enumerable: true,
+
+ value: {
+ second: 45, // seconds to minute
+ minute: 45, // minutes to hour
+ hour : 22, // hours to day
+ day : 26, // days to month
+ month : 11 // months to year
+ }
+});
+
+RelativeFormat.prototype.resolvedOptions = function () {
+ return {
+ locale: this._locale,
+ style : this._options.style,
+ units : this._options.units
+ };
+};
+
+RelativeFormat.prototype._compileMessage = function (units) {
+ // `this._locales` is the original set of locales the user specified to the
+ // constructor, while `this._locale` is the resolved root locale.
+ var locales = this._locales;
+ var resolvedLocale = this._locale;
+
+ var field = this._fields[units];
+ var relativeTime = field.relativeTime;
+ var future = '';
+ var past = '';
+ var i;
+
+ for (i in relativeTime.future) {
+ if (relativeTime.future.hasOwnProperty(i)) {
+ future += ' ' + i + ' {' +
+ relativeTime.future[i].replace('{0}', '#') + '}';
+ }
+ }
+
+ for (i in relativeTime.past) {
+ if (relativeTime.past.hasOwnProperty(i)) {
+ past += ' ' + i + ' {' +
+ relativeTime.past[i].replace('{0}', '#') + '}';
+ }
+ }
+
+ var message = '{when, select, future {{0, plural, ' + future + '}}' +
+ 'past {{0, plural, ' + past + '}}}';
+
+ // Create the synthetic IntlMessageFormat instance using the original
+ // locales value specified by the user when constructing the the parent
+ // IntlRelativeFormat instance.
+ return new intl$messageformat$$["default"](message, locales);
+};
+
+RelativeFormat.prototype._getMessage = function (units) {
+ var messages = this._messages;
+
+ // Create a new synthetic message based on the locale data from CLDR.
+ if (!messages[units]) {
+ messages[units] = this._compileMessage(units);
+ }
+
+ return messages[units];
+};
+
+RelativeFormat.prototype._getRelativeUnits = function (diff, units) {
+ var field = this._fields[units];
+
+ if (field.relative) {
+ return field.relative[diff];
+ }
+};
+
+RelativeFormat.prototype._findFields = function (locale) {
+ var localeData = RelativeFormat.__localeData__;
+ var data = localeData[locale.toLowerCase()];
+
+ // The locale data is de-duplicated, so we have to traverse the locale's
+ // hierarchy until we find `fields` to return.
+ while (data) {
+ if (data.fields) {
+ return data.fields;
+ }
+
+ data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];
+ }
+
+ throw new Error(
+ 'Locale data added to IntlRelativeFormat is missing `fields` for :' +
+ locale
+ );
+};
+
+RelativeFormat.prototype._format = function (date, options) {
+ var now = options && options.now !== undefined ? options.now : src$es5$$.dateNow();
+
+ if (date === undefined) {
+ date = now;
+ }
+
+ // Determine if the `date` and optional `now` values are valid, and throw a
+ // similar error to what `Intl.DateTimeFormat#format()` would throw.
+ if (!isFinite(now)) {
+ throw new RangeError(
+ 'The `now` option provided to IntlRelativeFormat#format() is not ' +
+ 'in valid range.'
+ );
+ }
+
+ if (!isFinite(date)) {
+ throw new RangeError(
+ 'The date value provided to IntlRelativeFormat#format() is not ' +
+ 'in valid range.'
+ );
+ }
+
+ var diffReport = src$diff$$["default"](now, date);
+ var units = this._options.units || this._selectUnits(diffReport);
+ var diffInUnits = diffReport[units];
+
+ if (this._options.style !== 'numeric') {
+ var relativeUnits = this._getRelativeUnits(diffInUnits, units);
+ if (relativeUnits) {
+ return relativeUnits;
+ }
+ }
+
+ return this._getMessage(units).format({
+ '0' : Math.abs(diffInUnits),
+ when: diffInUnits < 0 ? 'past' : 'future'
+ });
+};
+
+RelativeFormat.prototype._isValidUnits = function (units) {
+ if (!units || src$es5$$.arrIndexOf.call(FIELDS, units) >= 0) {
+ return true;
+ }
+
+ if (typeof units === 'string') {
+ var suggestion = /s$/.test(units) && units.substr(0, units.length - 1);
+ if (suggestion && src$es5$$.arrIndexOf.call(FIELDS, suggestion) >= 0) {
+ throw new Error(
+ '"' + units + '" is not a valid IntlRelativeFormat `units` ' +
+ 'value, did you mean: ' + suggestion
+ );
+ }
+ }
+
+ throw new Error(
+ '"' + units + '" is not a valid IntlRelativeFormat `units` value, it ' +
+ 'must be one of: "' + FIELDS.join('", "') + '"'
+ );
+};
+
+RelativeFormat.prototype._resolveLocale = function (locales) {
+ if (typeof locales === 'string') {
+ locales = [locales];
+ }
+
+ // Create a copy of the array so we can push on the default locale.
+ locales = (locales || []).concat(RelativeFormat.defaultLocale);
+
+ var localeData = RelativeFormat.__localeData__;
+ var i, len, localeParts, data;
+
+ // Using the set of locales + the default locale, we look for the first one
+ // which that has been registered. When data does not exist for a locale, we
+ // traverse its ancestors to find something that's been registered within
+ // its hierarchy of locales. Since we lack the proper `parentLocale` data
+ // here, we must take a naive approach to traversal.
+ for (i = 0, len = locales.length; i < len; i += 1) {
+ localeParts = locales[i].toLowerCase().split('-');
+
+ while (localeParts.length) {
+ data = localeData[localeParts.join('-')];
+ if (data) {
+ // Return the normalized locale string; e.g., we return "en-US",
+ // instead of "en-us".
+ return data.locale;
+ }
+
+ localeParts.pop();
+ }
+ }
+
+ var defaultLocale = locales.pop();
+ throw new Error(
+ 'No locale data has been added to IntlRelativeFormat for: ' +
+ locales.join(', ') + ', or the default locale: ' + defaultLocale
+ );
+};
+
+RelativeFormat.prototype._resolveStyle = function (style) {
+ // Default to "best fit" style.
+ if (!style) {
+ return STYLES[0];
+ }
+
+ if (src$es5$$.arrIndexOf.call(STYLES, style) >= 0) {
+ return style;
+ }
+
+ throw new Error(
+ '"' + style + '" is not a valid IntlRelativeFormat `style` value, it ' +
+ 'must be one of: "' + STYLES.join('", "') + '"'
+ );
+};
+
+RelativeFormat.prototype._selectUnits = function (diffReport) {
+ var i, l, units;
+
+ for (i = 0, l = FIELDS.length; i < l; i += 1) {
+ units = FIELDS[i];
+
+ if (Math.abs(diffReport[units]) < RelativeFormat.thresholds[units]) {
+ break;
+ }
+ }
+
+ return units;
+};
+
+
+},{"./diff":194,"./es5":196,"intl-messageformat":185}],194:[function(require,module,exports){
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+"use strict";
+
+var round = Math.round;
+
+function daysToYears(days) {
+ // 400 years have 146097 days (taking into account leap year rules)
+ return days * 400 / 146097;
+}
+
+exports["default"] = function (from, to) {
+ // Convert to ms timestamps.
+ from = +from;
+ to = +to;
+
+ var millisecond = round(to - from),
+ second = round(millisecond / 1000),
+ minute = round(second / 60),
+ hour = round(minute / 60),
+ day = round(hour / 24),
+ week = round(day / 7);
+
+ var rawYears = daysToYears(day),
+ month = round(rawYears * 12),
+ year = round(rawYears);
+
+ return {
+ millisecond: millisecond,
+ second : second,
+ minute : minute,
+ hour : hour,
+ day : day,
+ week : week,
+ month : month,
+ year : year
+ };
+};
+
+
+},{}],195:[function(require,module,exports){
+// GENERATED FILE
+"use strict";
+exports["default"] = {"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"},"fields":{"year":{"displayName":"year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"in {0} year","other":"in {0} years"},"past":{"one":"{0} year ago","other":"{0} years ago"}}},"month":{"displayName":"month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"in {0} month","other":"in {0} months"},"past":{"one":"{0} month ago","other":"{0} months ago"}}},"day":{"displayName":"day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"one":"in {0} day","other":"in {0} days"},"past":{"one":"{0} day ago","other":"{0} days ago"}}},"hour":{"displayName":"hour","relativeTime":{"future":{"one":"in {0} hour","other":"in {0} hours"},"past":{"one":"{0} hour ago","other":"{0} hours ago"}}},"minute":{"displayName":"minute","relativeTime":{"future":{"one":"in {0} minute","other":"in {0} minutes"},"past":{"one":"{0} minute ago","other":"{0} minutes ago"}}},"second":{"displayName":"second","relative":{"0":"now"},"relativeTime":{"future":{"one":"in {0} second","other":"in {0} seconds"},"past":{"one":"{0} second ago","other":"{0} seconds ago"}}}}};
+
+
+},{}],196:[function(require,module,exports){
+/*
+Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+Copyrights licensed under the New BSD License.
+See the accompanying LICENSE file for terms.
+*/
+
+/* jslint esnext: true */
+
+"use strict";
+
+// Purposely using the same implementation as the Intl.js `Intl` polyfill.
+// Copyright 2013 Andy Earnshaw, MIT License
+
+var hop = Object.prototype.hasOwnProperty;
+var toString = Object.prototype.toString;
+
+var realDefineProp = (function () {
+ try { return !!Object.defineProperty({}, 'a', {}); }
+ catch (e) { return false; }
+})();
+
+var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
+
+var defineProperty = realDefineProp ? Object.defineProperty :
+ function (obj, name, desc) {
+
+ if ('get' in desc && obj.__defineGetter__) {
+ obj.__defineGetter__(name, desc.get);
+ } else if (!hop.call(obj, name) || 'value' in desc) {
+ obj[name] = desc.value;
+ }
+};
+
+var objCreate = Object.create || function (proto, props) {
+ var obj, k;
+
+ function F() {}
+ F.prototype = proto;
+ obj = new F();
+
+ for (k in props) {
+ if (hop.call(props, k)) {
+ defineProperty(obj, k, props[k]);
+ }
+ }
+
+ return obj;
+};
+
+var arrIndexOf = Array.prototype.indexOf || function (search, fromIndex) {
+ /*jshint validthis:true */
+ var arr = this;
+ if (!arr.length) {
+ return -1;
+ }
+
+ for (var i = fromIndex || 0, max = arr.length; i < max; i++) {
+ if (arr[i] === search) {
+ return i;
+ }
+ }
+
+ return -1;
+};
+
+var isArray = Array.isArray || function (obj) {
+ return toString.call(obj) === '[object Array]';
+};
+
+var dateNow = Date.now || function () {
+ return new Date().getTime();
+};
+exports.defineProperty = defineProperty, exports.objCreate = objCreate, exports.arrIndexOf = arrIndexOf, exports.isArray = isArray, exports.dateNow = dateNow;
+
+
+},{}],197:[function(require,module,exports){
+arguments[4][190][0].apply(exports,arguments)
+},{"./core":193,"./en":195,"dup":190}],198:[function(require,module,exports){
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
@@ -22385,7 +23316,7 @@ var invariant = function(condition, format, a, b, c, d, e, f) {
module.exports = invariant;
-},{}],180:[function(require,module,exports){
+},{}],199:[function(require,module,exports){
// Source: http://jsfiddle.net/vWx8V/
// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes
@@ -22452,7 +23383,8 @@ var codes = exports.code = exports.codes = {
'insert': 45,
'delete': 46,
'command': 91,
- 'right click': 93,
+ 'left command': 91,
+ 'right command': 93,
'numpad *': 106,
'numpad +': 107,
'numpad -': 109,
@@ -22493,7 +23425,7 @@ var aliases = exports.aliases = {
'escape': 27,
'spc': 32,
'pgup': 33,
- 'pgdn': 33,
+ 'pgdn': 34,
'ins': 45,
'del': 46,
'cmd': 91
@@ -22532,7 +23464,7 @@ for (var alias in aliases) {
codes[alias] = aliases[alias]
}
-},{}],181:[function(require,module,exports){
+},{}],200:[function(require,module,exports){
/**
* Gets the last element of `array`.
*
@@ -22553,7 +23485,7 @@ function last(array) {
module.exports = last;
-},{}],182:[function(require,module,exports){
+},{}],201:[function(require,module,exports){
var baseEach = require('../internal/baseEach'),
createFind = require('../internal/createFind');
@@ -22611,7 +23543,7 @@ var find = createFind(baseEach);
module.exports = find;
-},{"../internal/baseEach":191,"../internal/createFind":215}],183:[function(require,module,exports){
+},{"../internal/baseEach":210,"../internal/createFind":234}],202:[function(require,module,exports){
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
@@ -22671,7 +23603,7 @@ function restParam(func, start) {
module.exports = restParam;
-},{}],184:[function(require,module,exports){
+},{}],203:[function(require,module,exports){
(function (global){
var cachePush = require('./cachePush'),
getNative = require('./getNative');
@@ -22705,7 +23637,7 @@ module.exports = SetCache;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./cachePush":211,"./getNative":221}],185:[function(require,module,exports){
+},{"./cachePush":230,"./getNative":240}],204:[function(require,module,exports){
/**
* A specialized version of `_.forEach` for arrays without support for callback
* shorthands and `this` binding.
@@ -22729,7 +23661,7 @@ function arrayEach(array, iteratee) {
module.exports = arrayEach;
-},{}],186:[function(require,module,exports){
+},{}],205:[function(require,module,exports){
/**
* A specialized version of `_.map` for arrays without support for callback
* shorthands and `this` binding.
@@ -22752,7 +23684,7 @@ function arrayMap(array, iteratee) {
module.exports = arrayMap;
-},{}],187:[function(require,module,exports){
+},{}],206:[function(require,module,exports){
/**
* Appends the elements of `values` to `array`.
*
@@ -22774,7 +23706,7 @@ function arrayPush(array, values) {
module.exports = arrayPush;
-},{}],188:[function(require,module,exports){
+},{}],207:[function(require,module,exports){
/**
* A specialized version of `_.some` for arrays without support for callback
* shorthands and `this` binding.
@@ -22799,7 +23731,7 @@ function arraySome(array, predicate) {
module.exports = arraySome;
-},{}],189:[function(require,module,exports){
+},{}],208:[function(require,module,exports){
var baseMatches = require('./baseMatches'),
baseMatchesProperty = require('./baseMatchesProperty'),
bindCallback = require('./bindCallback'),
@@ -22836,7 +23768,7 @@ function baseCallback(func, thisArg, argCount) {
module.exports = baseCallback;
-},{"../utility/identity":248,"../utility/property":249,"./baseMatches":203,"./baseMatchesProperty":204,"./bindCallback":209}],190:[function(require,module,exports){
+},{"../utility/identity":267,"../utility/property":268,"./baseMatches":222,"./baseMatchesProperty":223,"./bindCallback":228}],209:[function(require,module,exports){
var baseIndexOf = require('./baseIndexOf'),
cacheIndexOf = require('./cacheIndexOf'),
createCache = require('./createCache');
@@ -22893,7 +23825,7 @@ function baseDifference(array, values) {
module.exports = baseDifference;
-},{"./baseIndexOf":199,"./cacheIndexOf":210,"./createCache":214}],191:[function(require,module,exports){
+},{"./baseIndexOf":218,"./cacheIndexOf":229,"./createCache":233}],210:[function(require,module,exports){
var baseForOwn = require('./baseForOwn'),
createBaseEach = require('./createBaseEach');
@@ -22910,7 +23842,7 @@ var baseEach = createBaseEach(baseForOwn);
module.exports = baseEach;
-},{"./baseForOwn":197,"./createBaseEach":212}],192:[function(require,module,exports){
+},{"./baseForOwn":216,"./createBaseEach":231}],211:[function(require,module,exports){
/**
* The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,
* without support for callback shorthands and `this` binding, which iterates
@@ -22937,7 +23869,7 @@ function baseFind(collection, predicate, eachFunc, retKey) {
module.exports = baseFind;
-},{}],193:[function(require,module,exports){
+},{}],212:[function(require,module,exports){
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for callback shorthands and `this` binding.
@@ -22962,7 +23894,7 @@ function baseFindIndex(array, predicate, fromRight) {
module.exports = baseFindIndex;
-},{}],194:[function(require,module,exports){
+},{}],213:[function(require,module,exports){
var arrayPush = require('./arrayPush'),
isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
@@ -23005,7 +23937,7 @@ function baseFlatten(array, isDeep, isStrict, result) {
module.exports = baseFlatten;
-},{"../lang/isArguments":235,"../lang/isArray":236,"./arrayPush":187,"./isArrayLike":223,"./isObjectLike":228}],195:[function(require,module,exports){
+},{"../lang/isArguments":254,"../lang/isArray":255,"./arrayPush":206,"./isArrayLike":242,"./isObjectLike":247}],214:[function(require,module,exports){
var createBaseFor = require('./createBaseFor');
/**
@@ -23024,7 +23956,7 @@ var baseFor = createBaseFor();
module.exports = baseFor;
-},{"./createBaseFor":213}],196:[function(require,module,exports){
+},{"./createBaseFor":232}],215:[function(require,module,exports){
var baseFor = require('./baseFor'),
keysIn = require('../object/keysIn');
@@ -23043,7 +23975,7 @@ function baseForIn(object, iteratee) {
module.exports = baseForIn;
-},{"../object/keysIn":243,"./baseFor":195}],197:[function(require,module,exports){
+},{"../object/keysIn":262,"./baseFor":214}],216:[function(require,module,exports){
var baseFor = require('./baseFor'),
keys = require('../object/keys');
@@ -23062,7 +23994,7 @@ function baseForOwn(object, iteratee) {
module.exports = baseForOwn;
-},{"../object/keys":242,"./baseFor":195}],198:[function(require,module,exports){
+},{"../object/keys":261,"./baseFor":214}],217:[function(require,module,exports){
var toObject = require('./toObject');
/**
@@ -23094,7 +24026,7 @@ function baseGet(object, path, pathKey) {
module.exports = baseGet;
-},{"./toObject":233}],199:[function(require,module,exports){
+},{"./toObject":252}],218:[function(require,module,exports){
var indexOfNaN = require('./indexOfNaN');
/**
@@ -23123,7 +24055,7 @@ function baseIndexOf(array, value, fromIndex) {
module.exports = baseIndexOf;
-},{"./indexOfNaN":222}],200:[function(require,module,exports){
+},{"./indexOfNaN":241}],219:[function(require,module,exports){
var baseIsEqualDeep = require('./baseIsEqualDeep'),
isObject = require('../lang/isObject'),
isObjectLike = require('./isObjectLike');
@@ -23153,7 +24085,7 @@ function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
module.exports = baseIsEqual;
-},{"../lang/isObject":239,"./baseIsEqualDeep":201,"./isObjectLike":228}],201:[function(require,module,exports){
+},{"../lang/isObject":258,"./baseIsEqualDeep":220,"./isObjectLike":247}],220:[function(require,module,exports){
var equalArrays = require('./equalArrays'),
equalByTag = require('./equalByTag'),
equalObjects = require('./equalObjects'),
@@ -23258,7 +24190,7 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA,
module.exports = baseIsEqualDeep;
-},{"../lang/isArray":236,"../lang/isTypedArray":241,"./equalArrays":216,"./equalByTag":217,"./equalObjects":218,"./isHostObject":224}],202:[function(require,module,exports){
+},{"../lang/isArray":255,"../lang/isTypedArray":260,"./equalArrays":235,"./equalByTag":236,"./equalObjects":237,"./isHostObject":243}],221:[function(require,module,exports){
var baseIsEqual = require('./baseIsEqual'),
toObject = require('./toObject');
@@ -23312,7 +24244,7 @@ function baseIsMatch(object, matchData, customizer) {
module.exports = baseIsMatch;
-},{"./baseIsEqual":200,"./toObject":233}],203:[function(require,module,exports){
+},{"./baseIsEqual":219,"./toObject":252}],222:[function(require,module,exports){
var baseIsMatch = require('./baseIsMatch'),
getMatchData = require('./getMatchData'),
toObject = require('./toObject');
@@ -23345,7 +24277,7 @@ function baseMatches(source) {
module.exports = baseMatches;
-},{"./baseIsMatch":202,"./getMatchData":220,"./toObject":233}],204:[function(require,module,exports){
+},{"./baseIsMatch":221,"./getMatchData":239,"./toObject":252}],223:[function(require,module,exports){
var baseGet = require('./baseGet'),
baseIsEqual = require('./baseIsEqual'),
baseSlice = require('./baseSlice'),
@@ -23392,7 +24324,7 @@ function baseMatchesProperty(path, srcValue) {
module.exports = baseMatchesProperty;
-},{"../array/last":181,"../lang/isArray":236,"./baseGet":198,"./baseIsEqual":200,"./baseSlice":207,"./isKey":226,"./isStrictComparable":229,"./toObject":233,"./toPath":234}],205:[function(require,module,exports){
+},{"../array/last":200,"../lang/isArray":255,"./baseGet":217,"./baseIsEqual":219,"./baseSlice":226,"./isKey":245,"./isStrictComparable":248,"./toObject":252,"./toPath":253}],224:[function(require,module,exports){
var toObject = require('./toObject');
/**
@@ -23410,7 +24342,7 @@ function baseProperty(key) {
module.exports = baseProperty;
-},{"./toObject":233}],206:[function(require,module,exports){
+},{"./toObject":252}],225:[function(require,module,exports){
var baseGet = require('./baseGet'),
toPath = require('./toPath');
@@ -23431,7 +24363,7 @@ function basePropertyDeep(path) {
module.exports = basePropertyDeep;
-},{"./baseGet":198,"./toPath":234}],207:[function(require,module,exports){
+},{"./baseGet":217,"./toPath":253}],226:[function(require,module,exports){
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
@@ -23465,7 +24397,7 @@ function baseSlice(array, start, end) {
module.exports = baseSlice;
-},{}],208:[function(require,module,exports){
+},{}],227:[function(require,module,exports){
/**
* Converts `value` to a string if it's not one. An empty string is returned
* for `null` or `undefined` values.
@@ -23480,7 +24412,7 @@ function baseToString(value) {
module.exports = baseToString;
-},{}],209:[function(require,module,exports){
+},{}],228:[function(require,module,exports){
var identity = require('../utility/identity');
/**
@@ -23521,7 +24453,7 @@ function bindCallback(func, thisArg, argCount) {
module.exports = bindCallback;
-},{"../utility/identity":248}],210:[function(require,module,exports){
+},{"../utility/identity":267}],229:[function(require,module,exports){
var isObject = require('../lang/isObject');
/**
@@ -23542,7 +24474,7 @@ function cacheIndexOf(cache, value) {
module.exports = cacheIndexOf;
-},{"../lang/isObject":239}],211:[function(require,module,exports){
+},{"../lang/isObject":258}],230:[function(require,module,exports){
var isObject = require('../lang/isObject');
/**
@@ -23564,7 +24496,7 @@ function cachePush(value) {
module.exports = cachePush;
-},{"../lang/isObject":239}],212:[function(require,module,exports){
+},{"../lang/isObject":258}],231:[function(require,module,exports){
var getLength = require('./getLength'),
isLength = require('./isLength'),
toObject = require('./toObject');
@@ -23597,7 +24529,7 @@ function createBaseEach(eachFunc, fromRight) {
module.exports = createBaseEach;
-},{"./getLength":219,"./isLength":227,"./toObject":233}],213:[function(require,module,exports){
+},{"./getLength":238,"./isLength":246,"./toObject":252}],232:[function(require,module,exports){
var toObject = require('./toObject');
/**
@@ -23626,7 +24558,7 @@ function createBaseFor(fromRight) {
module.exports = createBaseFor;
-},{"./toObject":233}],214:[function(require,module,exports){
+},{"./toObject":252}],233:[function(require,module,exports){
(function (global){
var SetCache = require('./SetCache'),
getNative = require('./getNative');
@@ -23652,7 +24584,7 @@ module.exports = createCache;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./SetCache":184,"./getNative":221}],215:[function(require,module,exports){
+},{"./SetCache":203,"./getNative":240}],234:[function(require,module,exports){
var baseCallback = require('./baseCallback'),
baseFind = require('./baseFind'),
baseFindIndex = require('./baseFindIndex'),
@@ -23679,7 +24611,7 @@ function createFind(eachFunc, fromRight) {
module.exports = createFind;
-},{"../lang/isArray":236,"./baseCallback":189,"./baseFind":192,"./baseFindIndex":193}],216:[function(require,module,exports){
+},{"../lang/isArray":255,"./baseCallback":208,"./baseFind":211,"./baseFindIndex":212}],235:[function(require,module,exports){
var arraySome = require('./arraySome');
/**
@@ -23732,7 +24664,7 @@ function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stack
module.exports = equalArrays;
-},{"./arraySome":188}],217:[function(require,module,exports){
+},{"./arraySome":207}],236:[function(require,module,exports){
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
@@ -23782,7 +24714,7 @@ function equalByTag(object, other, tag) {
module.exports = equalByTag;
-},{}],218:[function(require,module,exports){
+},{}],237:[function(require,module,exports){
var keys = require('../object/keys');
/** Used for native method references. */
@@ -23851,7 +24783,7 @@ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, sta
module.exports = equalObjects;
-},{"../object/keys":242}],219:[function(require,module,exports){
+},{"../object/keys":261}],238:[function(require,module,exports){
var baseProperty = require('./baseProperty');
/**
@@ -23868,7 +24800,7 @@ var getLength = baseProperty('length');
module.exports = getLength;
-},{"./baseProperty":205}],220:[function(require,module,exports){
+},{"./baseProperty":224}],239:[function(require,module,exports){
var isStrictComparable = require('./isStrictComparable'),
pairs = require('../object/pairs');
@@ -23891,7 +24823,7 @@ function getMatchData(object) {
module.exports = getMatchData;
-},{"../object/pairs":245,"./isStrictComparable":229}],221:[function(require,module,exports){
+},{"../object/pairs":264,"./isStrictComparable":248}],240:[function(require,module,exports){
var isNative = require('../lang/isNative');
/**
@@ -23909,7 +24841,7 @@ function getNative(object, key) {
module.exports = getNative;
-},{"../lang/isNative":238}],222:[function(require,module,exports){
+},{"../lang/isNative":257}],241:[function(require,module,exports){
/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
*
@@ -23934,7 +24866,7 @@ function indexOfNaN(array, fromIndex, fromRight) {
module.exports = indexOfNaN;
-},{}],223:[function(require,module,exports){
+},{}],242:[function(require,module,exports){
var getLength = require('./getLength'),
isLength = require('./isLength');
@@ -23951,7 +24883,7 @@ function isArrayLike(value) {
module.exports = isArrayLike;
-},{"./getLength":219,"./isLength":227}],224:[function(require,module,exports){
+},{"./getLength":238,"./isLength":246}],243:[function(require,module,exports){
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -23974,7 +24906,7 @@ var isHostObject = (function() {
module.exports = isHostObject;
-},{}],225:[function(require,module,exports){
+},{}],244:[function(require,module,exports){
/** Used to detect unsigned integer values. */
var reIsUint = /^\d+$/;
@@ -24000,7 +24932,7 @@ function isIndex(value, length) {
module.exports = isIndex;
-},{}],226:[function(require,module,exports){
+},{}],245:[function(require,module,exports){
var isArray = require('../lang/isArray'),
toObject = require('./toObject');
@@ -24030,7 +24962,7 @@ function isKey(value, object) {
module.exports = isKey;
-},{"../lang/isArray":236,"./toObject":233}],227:[function(require,module,exports){
+},{"../lang/isArray":255,"./toObject":252}],246:[function(require,module,exports){
/**
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
* of an array-like value.
@@ -24052,7 +24984,7 @@ function isLength(value) {
module.exports = isLength;
-},{}],228:[function(require,module,exports){
+},{}],247:[function(require,module,exports){
/**
* Checks if `value` is object-like.
*
@@ -24066,7 +24998,7 @@ function isObjectLike(value) {
module.exports = isObjectLike;
-},{}],229:[function(require,module,exports){
+},{}],248:[function(require,module,exports){
var isObject = require('../lang/isObject');
/**
@@ -24083,7 +25015,7 @@ function isStrictComparable(value) {
module.exports = isStrictComparable;
-},{"../lang/isObject":239}],230:[function(require,module,exports){
+},{"../lang/isObject":258}],249:[function(require,module,exports){
var toObject = require('./toObject');
/**
@@ -24113,7 +25045,7 @@ function pickByArray(object, props) {
module.exports = pickByArray;
-},{"./toObject":233}],231:[function(require,module,exports){
+},{"./toObject":252}],250:[function(require,module,exports){
var baseForIn = require('./baseForIn');
/**
@@ -24137,7 +25069,7 @@ function pickByCallback(object, predicate) {
module.exports = pickByCallback;
-},{"./baseForIn":196}],232:[function(require,module,exports){
+},{"./baseForIn":215}],251:[function(require,module,exports){
var isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
isIndex = require('./isIndex'),
@@ -24181,7 +25113,7 @@ function shimKeys(object) {
module.exports = shimKeys;
-},{"../lang/isArguments":235,"../lang/isArray":236,"../lang/isString":240,"../object/keysIn":243,"./isIndex":225,"./isLength":227}],233:[function(require,module,exports){
+},{"../lang/isArguments":254,"../lang/isArray":255,"../lang/isString":259,"../object/keysIn":262,"./isIndex":244,"./isLength":246}],252:[function(require,module,exports){
var isObject = require('../lang/isObject'),
isString = require('../lang/isString'),
support = require('../support');
@@ -24209,7 +25141,7 @@ function toObject(value) {
module.exports = toObject;
-},{"../lang/isObject":239,"../lang/isString":240,"../support":247}],234:[function(require,module,exports){
+},{"../lang/isObject":258,"../lang/isString":259,"../support":266}],253:[function(require,module,exports){
var baseToString = require('./baseToString'),
isArray = require('../lang/isArray');
@@ -24239,7 +25171,7 @@ function toPath(value) {
module.exports = toPath;
-},{"../lang/isArray":236,"./baseToString":208}],235:[function(require,module,exports){
+},{"../lang/isArray":255,"./baseToString":227}],254:[function(require,module,exports){
var isArrayLike = require('../internal/isArrayLike'),
isObjectLike = require('../internal/isObjectLike');
@@ -24275,7 +25207,7 @@ function isArguments(value) {
module.exports = isArguments;
-},{"../internal/isArrayLike":223,"../internal/isObjectLike":228}],236:[function(require,module,exports){
+},{"../internal/isArrayLike":242,"../internal/isObjectLike":247}],255:[function(require,module,exports){
var getNative = require('../internal/getNative'),
isLength = require('../internal/isLength'),
isObjectLike = require('../internal/isObjectLike');
@@ -24317,7 +25249,7 @@ var isArray = nativeIsArray || function(value) {
module.exports = isArray;
-},{"../internal/getNative":221,"../internal/isLength":227,"../internal/isObjectLike":228}],237:[function(require,module,exports){
+},{"../internal/getNative":240,"../internal/isLength":246,"../internal/isObjectLike":247}],256:[function(require,module,exports){
var isObject = require('./isObject');
/** `Object#toString` result references. */
@@ -24357,7 +25289,7 @@ function isFunction(value) {
module.exports = isFunction;
-},{"./isObject":239}],238:[function(require,module,exports){
+},{"./isObject":258}],257:[function(require,module,exports){
var isFunction = require('./isFunction'),
isHostObject = require('../internal/isHostObject'),
isObjectLike = require('../internal/isObjectLike');
@@ -24408,7 +25340,7 @@ function isNative(value) {
module.exports = isNative;
-},{"../internal/isHostObject":224,"../internal/isObjectLike":228,"./isFunction":237}],239:[function(require,module,exports){
+},{"../internal/isHostObject":243,"../internal/isObjectLike":247,"./isFunction":256}],258:[function(require,module,exports){
/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
@@ -24438,7 +25370,7 @@ function isObject(value) {
module.exports = isObject;
-},{}],240:[function(require,module,exports){
+},{}],259:[function(require,module,exports){
var isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
@@ -24475,7 +25407,7 @@ function isString(value) {
module.exports = isString;
-},{"../internal/isObjectLike":228}],241:[function(require,module,exports){
+},{"../internal/isObjectLike":247}],260:[function(require,module,exports){
var isLength = require('../internal/isLength'),
isObjectLike = require('../internal/isObjectLike');
@@ -24551,7 +25483,7 @@ function isTypedArray(value) {
module.exports = isTypedArray;
-},{"../internal/isLength":227,"../internal/isObjectLike":228}],242:[function(require,module,exports){
+},{"../internal/isLength":246,"../internal/isObjectLike":247}],261:[function(require,module,exports){
var getNative = require('../internal/getNative'),
isArrayLike = require('../internal/isArrayLike'),
isObject = require('../lang/isObject'),
@@ -24599,7 +25531,7 @@ var keys = !nativeKeys ? shimKeys : function(object) {
module.exports = keys;
-},{"../internal/getNative":221,"../internal/isArrayLike":223,"../internal/shimKeys":232,"../lang/isObject":239,"../support":247}],243:[function(require,module,exports){
+},{"../internal/getNative":240,"../internal/isArrayLike":242,"../internal/shimKeys":251,"../lang/isObject":258,"../support":266}],262:[function(require,module,exports){
var arrayEach = require('../internal/arrayEach'),
isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
@@ -24737,7 +25669,7 @@ function keysIn(object) {
module.exports = keysIn;
-},{"../internal/arrayEach":185,"../internal/isIndex":225,"../internal/isLength":227,"../lang/isArguments":235,"../lang/isArray":236,"../lang/isFunction":237,"../lang/isObject":239,"../lang/isString":240,"../support":247}],244:[function(require,module,exports){
+},{"../internal/arrayEach":204,"../internal/isIndex":244,"../internal/isLength":246,"../lang/isArguments":254,"../lang/isArray":255,"../lang/isFunction":256,"../lang/isObject":258,"../lang/isString":259,"../support":266}],263:[function(require,module,exports){
var arrayMap = require('../internal/arrayMap'),
baseDifference = require('../internal/baseDifference'),
baseFlatten = require('../internal/baseFlatten'),
@@ -24786,7 +25718,7 @@ var omit = restParam(function(object, props) {
module.exports = omit;
-},{"../function/restParam":183,"../internal/arrayMap":186,"../internal/baseDifference":190,"../internal/baseFlatten":194,"../internal/bindCallback":209,"../internal/pickByArray":230,"../internal/pickByCallback":231,"./keysIn":243}],245:[function(require,module,exports){
+},{"../function/restParam":202,"../internal/arrayMap":205,"../internal/baseDifference":209,"../internal/baseFlatten":213,"../internal/bindCallback":228,"../internal/pickByArray":249,"../internal/pickByCallback":250,"./keysIn":262}],264:[function(require,module,exports){
var keys = require('./keys'),
toObject = require('../internal/toObject');
@@ -24821,7 +25753,7 @@ function pairs(object) {
module.exports = pairs;
-},{"../internal/toObject":233,"./keys":242}],246:[function(require,module,exports){
+},{"../internal/toObject":252,"./keys":261}],265:[function(require,module,exports){
var baseFlatten = require('../internal/baseFlatten'),
bindCallback = require('../internal/bindCallback'),
pickByArray = require('../internal/pickByArray'),
@@ -24865,7 +25797,7 @@ var pick = restParam(function(object, props) {
module.exports = pick;
-},{"../function/restParam":183,"../internal/baseFlatten":194,"../internal/bindCallback":209,"../internal/pickByArray":230,"../internal/pickByCallback":231}],247:[function(require,module,exports){
+},{"../function/restParam":202,"../internal/baseFlatten":213,"../internal/bindCallback":228,"../internal/pickByArray":249,"../internal/pickByCallback":250}],266:[function(require,module,exports){
/** Used for native method references. */
var arrayProto = Array.prototype,
errorProto = Error.prototype,
@@ -24963,7 +25895,7 @@ var support = {};
module.exports = support;
-},{}],248:[function(require,module,exports){
+},{}],267:[function(require,module,exports){
/**
* This method returns the first argument provided to it.
*
@@ -24985,7 +25917,7 @@ function identity(value) {
module.exports = identity;
-},{}],249:[function(require,module,exports){
+},{}],268:[function(require,module,exports){
var baseProperty = require('../internal/baseProperty'),
basePropertyDeep = require('../internal/basePropertyDeep'),
isKey = require('../internal/isKey');
@@ -25018,46 +25950,162 @@ function property(path) {
module.exports = property;
-},{"../internal/baseProperty":205,"../internal/basePropertyDeep":206,"../internal/isKey":226}],250:[function(require,module,exports){
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeGetPrototype = Object.getPrototypeOf;
+},{"../internal/baseProperty":224,"../internal/basePropertyDeep":225,"../internal/isKey":245}],269:[function(require,module,exports){
+var root = require('./_root');
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+module.exports = Symbol;
+
+},{"./_root":276}],270:[function(require,module,exports){
+var Symbol = require('./_Symbol'),
+ getRawTag = require('./_getRawTag'),
+ objectToString = require('./_objectToString');
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
- * Gets the `[[Prototype]]` of `value`.
+ * The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
- * @returns {null|Object} Returns the `[[Prototype]]`.
+ * @returns {string} Returns the `toStringTag`.
*/
-function getPrototype(value) {
- return nativeGetPrototype(Object(value));
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
}
+module.exports = baseGetTag;
+
+},{"./_Symbol":269,"./_getRawTag":273,"./_objectToString":274}],271:[function(require,module,exports){
+(function (global){
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+module.exports = freeGlobal;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+
+},{}],272:[function(require,module,exports){
+var overArg = require('./_overArg');
+
+/** Built-in value references. */
+var getPrototype = overArg(Object.getPrototypeOf, Object);
+
module.exports = getPrototype;
-},{}],251:[function(require,module,exports){
+},{"./_overArg":275}],273:[function(require,module,exports){
+var Symbol = require('./_Symbol');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
/**
- * Checks if `value` is a host object in IE < 9.
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
*/
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
}
return result;
}
-module.exports = isHostObject;
+module.exports = getRawTag;
-},{}],252:[function(require,module,exports){
+},{"./_Symbol":269}],274:[function(require,module,exports){
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+ return nativeObjectToString.call(value);
+}
+
+module.exports = objectToString;
+
+},{}],275:[function(require,module,exports){
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+module.exports = overArg;
+
+},{}],276:[function(require,module,exports){
+var freeGlobal = require('./_freeGlobal');
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+module.exports = root;
+
+},{"./_freeGlobal":271}],277:[function(require,module,exports){
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
@@ -25083,24 +26131,25 @@ module.exports = isHostObject;
* // => false
*/
function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
-},{}],253:[function(require,module,exports){
-var getPrototype = require('./_getPrototype'),
- isHostObject = require('./_isHostObject'),
+},{}],278:[function(require,module,exports){
+var baseGetTag = require('./_baseGetTag'),
+ getPrototype = require('./_getPrototype'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
-var objectProto = Object.prototype;
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
+var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -25108,13 +26157,6 @@ var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
@@ -25124,8 +26166,7 @@ var objectToString = objectProto.toString;
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
@@ -25145,8 +26186,7 @@ var objectToString = objectProto.toString;
* // => true
*/
function isPlainObject(value) {
- if (!isObjectLike(value) ||
- objectToString.call(value) != objectTag || isHostObject(value)) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
@@ -25154,13 +26194,13 @@ function isPlainObject(value) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
- return (typeof Ctor == 'function' &&
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
}
module.exports = isPlainObject;
-},{"./_getPrototype":250,"./_isHostObject":251,"./isObjectLike":252}],254:[function(require,module,exports){
+},{"./_baseGetTag":270,"./_getPrototype":272,"./isObjectLike":277}],279:[function(require,module,exports){
// THIS FILE IS GENERATED - DO NOT EDIT!
/*global module:false, define:false*/
@@ -26134,16 +27174,16 @@ define(function () {
throw new Error('unknown environment');
}
})());
-},{}],255:[function(require,module,exports){
+},{}],280:[function(require,module,exports){
/**
* Helpers.
*/
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var y = d * 365.25;
+var s = 1000
+var m = s * 60
+var h = m * 60
+var d = h * 24
+var y = d * 365.25
/**
* Parse or format the given `val`.
@@ -26154,17 +27194,23 @@ var y = d * 365.25;
*
* @param {String|Number} val
* @param {Object} options
+ * @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
-module.exports = function(val, options){
- options = options || {};
- if ('string' == typeof val) return parse(val);
- return options.long
- ? long(val)
- : short(val);
-};
+module.exports = function (val, options) {
+ options = options || {}
+ var type = typeof val
+ if (type === 'string' && val.length > 0) {
+ return parse(val)
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ?
+ fmtLong(val) :
+ fmtShort(val)
+ }
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
+}
/**
* Parse the given `str` and return milliseconds.
@@ -26175,47 +27221,53 @@ module.exports = function(val, options){
*/
function parse(str) {
- str = '' + str;
- if (str.length > 10000) return;
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
- if (!match) return;
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
+ str = String(str)
+ if (str.length > 10000) {
+ return
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)
+ if (!match) {
+ return
+ }
+ var n = parseFloat(match[1])
+ var type = (match[2] || 'ms').toLowerCase()
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
- return n * y;
+ return n * y
case 'days':
case 'day':
case 'd':
- return n * d;
+ return n * d
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
- return n * h;
+ return n * h
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
- return n * m;
+ return n * m
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
- return n * s;
+ return n * s
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
- return n;
+ return n
+ default:
+ return undefined
}
}
@@ -26227,12 +27279,20 @@ function parse(str) {
* @api private
*/
-function short(ms) {
- if (ms >= d) return Math.round(ms / d) + 'd';
- if (ms >= h) return Math.round(ms / h) + 'h';
- if (ms >= m) return Math.round(ms / m) + 'm';
- if (ms >= s) return Math.round(ms / s) + 's';
- return ms + 'ms';
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd'
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h'
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm'
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's'
+ }
+ return ms + 'ms'
}
/**
@@ -26243,12 +27303,12 @@ function short(ms) {
* @api private
*/
-function long(ms) {
- return plural(ms, d, 'day')
- || plural(ms, h, 'hour')
- || plural(ms, m, 'minute')
- || plural(ms, s, 'second')
- || ms + ' ms';
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms'
}
/**
@@ -26256,12 +27316,16 @@ function long(ms) {
*/
function plural(ms, n, name) {
- if (ms < n) return;
- if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
- return Math.ceil(ms / n) + ' ' + name + 's';
+ if (ms < n) {
+ return
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's'
}
-},{}],256:[function(require,module,exports){
+},{}],281:[function(require,module,exports){
/**
* Dependencies.
*/
@@ -26294,7 +27358,7 @@ var noVNC = {
module.exports = noVNC;
-},{"./lib/base64":257,"./lib/des":258,"./lib/display":259,"./lib/input":260,"./lib/kbdutil":261,"./lib/keys":262,"./lib/rfb":263,"./lib/tinf":264,"./lib/util":265,"./lib/websock":266}],257:[function(require,module,exports){
+},{"./lib/base64":282,"./lib/des":283,"./lib/display":284,"./lib/input":285,"./lib/kbdutil":286,"./lib/keys":287,"./lib/rfb":288,"./lib/tinf":289,"./lib/util":290,"./lib/websock":291}],282:[function(require,module,exports){
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -26409,7 +27473,7 @@ module.exports = {
}
};
-},{"debug":123}],258:[function(require,module,exports){
+},{"debug":125}],283:[function(require,module,exports){
/*
* Ported from Flashlight VNC ActionScript implementation:
* http://www.wizhelp.com/flashlight-vnc/
@@ -26699,7 +27763,7 @@ function encrypt(t) {
return enc8(t.slice(0, 8)).concat(enc8(t.slice(8, 16)));
}
-},{}],259:[function(require,module,exports){
+},{}],284:[function(require,module,exports){
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2012 Joel Martin
@@ -27500,7 +28564,7 @@ Display.changeCursor = function (target, pixels, mask, hotx, hoty, w0, h0, cmap)
target.style.cursor = 'url(' + url + ')' + hotx + ' ' + hoty + ', default';
};
-},{"./base64":257,"./util":265,"bowser":25,"debug":123}],260:[function(require,module,exports){
+},{"./base64":282,"./util":290,"bowser":28,"debug":125}],285:[function(require,module,exports){
(function (global){
/*
* noVNC: HTML5 VNC client
@@ -27912,7 +28976,7 @@ Input.Mouse = Mouse;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./kbdutil":261,"./util":265,"bowser":25,"debug":123}],261:[function(require,module,exports){
+},{"./kbdutil":286,"./util":290,"bowser":28,"debug":125}],286:[function(require,module,exports){
/**
* Dependencies.
*/
@@ -28516,7 +29580,7 @@ function isLinux() {
return navigator && !!(/linux/i).exec(navigator.platform);
}
-},{"./keys":262,"debug":123}],262:[function(require,module,exports){
+},{"./keys":287,"debug":125}],287:[function(require,module,exports){
/**
* The Object to be exposed.
*/
@@ -28931,7 +29995,7 @@ Keys.fromUnicode = fromUnicode;
*/
module.exports = Keys;
-},{}],263:[function(require,module,exports){
+},{}],288:[function(require,module,exports){
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2012 Joel Martin
@@ -30957,7 +32021,7 @@ function extract_data_uri (arr) {
return ';base64,' + Base64.encode(arr);
}
-},{"./base64":257,"./des":258,"./display":259,"./input":260,"./keys":262,"./tinf":264,"./util":265,"./websock":266,"debug":123}],264:[function(require,module,exports){
+},{"./base64":282,"./des":283,"./display":284,"./input":285,"./keys":287,"./tinf":289,"./util":290,"./websock":291,"debug":125}],289:[function(require,module,exports){
/*
* tinflate - tiny inflate
*
@@ -31467,7 +32531,7 @@ function read_bits_direct(source, bitcount, tag, idx, num) {
return [bitcount, tag, idx, val];
}
-},{}],265:[function(require,module,exports){
+},{}],290:[function(require,module,exports){
(function (global){
/*
* noVNC: HTML5 VNC client
@@ -31772,7 +32836,7 @@ function make_property (proto, name, mode, type) {
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"debug":123}],266:[function(require,module,exports){
+},{"debug":125}],291:[function(require,module,exports){
(function (global){
/*
* Websock: high-performance binary WebSockets
@@ -32134,7 +33198,99 @@ Websock.prototype = {
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./base64":257,"bowser":25,"debug":123}],267:[function(require,module,exports){
+},{"./base64":282,"bowser":28,"debug":125}],292:[function(require,module,exports){
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+'use strict';
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
+
+},{}],293:[function(require,module,exports){
(function (process){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -32363,7 +33519,7 @@ var substr = 'ab'.substr(-1) === 'b'
}).call(this,require('_process'))
-},{"_process":269}],268:[function(require,module,exports){
+},{"_process":295}],294:[function(require,module,exports){
(function (process){
'use strict';
@@ -32461,16 +33617,105 @@ module.exports.win32 = win32.parse;
}).call(this,require('_process'))
-},{"_process":269}],269:[function(require,module,exports){
+},{"_process":295}],295:[function(require,module,exports){
// shim for using process in browser
-
var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things. But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals. It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+}
+(function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+} ())
+function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+}
+function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
@@ -32486,7 +33731,7 @@ function drainQueue() {
if (draining) {
return;
}
- var timeout = setTimeout(cleanUpNextTick);
+ var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
@@ -32503,7 +33748,7 @@ function drainQueue() {
}
currentQueue = null;
draining = false;
- clearTimeout(timeout);
+ runClearTimeout(timeout);
}
process.nextTick = function (fun) {
@@ -32515,7 +33760,7 @@ process.nextTick = function (fun) {
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
- setTimeout(drainQueue, 0);
+ runTimeout(drainQueue);
}
};
@@ -32554,7 +33799,7 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],270:[function(require,module,exports){
+},{}],296:[function(require,module,exports){
(function (global){
/*! https://mths.be/punycode v1.4.1 by @mathias */
;(function(root) {
@@ -33092,7 +34337,7 @@ process.umask = function() { return 0; };
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],271:[function(require,module,exports){
+},{}],297:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -33178,7 +34423,7 @@ var isArray = Array.isArray || function (xs) {
return Object.prototype.toString.call(xs) === '[object Array]';
};
-},{}],272:[function(require,module,exports){
+},{}],298:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -33265,13 +34510,13 @@ var objectKeys = Object.keys || function (obj) {
return res;
};
-},{}],273:[function(require,module,exports){
+},{}],299:[function(require,module,exports){
'use strict';
exports.decode = exports.parse = require('./decode');
exports.encode = exports.stringify = require('./encode');
-},{"./decode":271,"./encode":272}],274:[function(require,module,exports){
+},{"./decode":297,"./encode":298}],300:[function(require,module,exports){
'use strict';
var _extends = require('babel-runtime/helpers/extends')['default'];
@@ -33302,7 +34547,7 @@ var Accordion = _react2['default'].createClass({
exports['default'] = Accordion;
module.exports = exports['default'];
-},{"./PanelGroup":347,"babel-runtime/helpers/extends":382,"babel-runtime/helpers/interop-require-default":384,"react":581}],275:[function(require,module,exports){
+},{"./PanelGroup":373,"babel-runtime/helpers/extends":20,"babel-runtime/helpers/interop-require-default":23,"react":599}],301:[function(require,module,exports){
'use strict';
var _extends = require('babel-runtime/helpers/extends')['default'];
@@ -33406,7 +34651,7 @@ var Alert = _react2['default'].createClass({
exports['default'] = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values(), _styleMaps.State.INFO, _utilsBootstrapUtils.bsClass('alert', Alert));
module.exports = exports['default'];
-},{"./styleMaps":366,"./utils/bootstrapUtils":370,"babel-runtime/helpers/extends":382,"babel-runtime/helpers/interop-require-default":384,"classnames":29,"react":581,"react-prop-types/lib/deprecated":408}],276:[function(require,module,exports){
+},{"./styleMaps":392,"./utils/bootstrapUtils":396,"babel-runtime/helpers/extends":20,"babel-runtime/helpers/interop-require-default":23,"classnames":31,"react":599,"react-prop-types/lib/deprecated":427}],302:[function(require,module,exports){
'use strict';
var _extends = require('babel-runtime/helpers/extends')['default'];
@@ -33467,7 +34712,7 @@ var Badge = _react2['default'].createClass({
exports['default'] = Badge;
module.exports = exports['default'];
-},{"./utils/ValidComponentChildren":369,"./utils/bootstrapUtils":370,"babel-runtime/helpers/extends":382,"babel-runtime/helpers/interop-require-default":384,"classnames":29,"react":581}],277:[function(require,module,exports){
+},{"./utils/ValidComponentChildren":395,"./utils/bootstrapUtils":396,"babel-runtime/helpers/extends":20,"babel-runtime/helpers/interop-require-default":23,"classnames":31,"react":599}],303:[function(require,module,exports){
'use strict';
var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default'];
@@ -33536,7 +34781,7 @@ Breadcrumb.Item = _BreadcrumbItem2['default'];
exports['default'] = Breadcrumb;
module.exports = exports['default'];
-},{"./BreadcrumbItem":278,"./utils/ValidComponentChildren":369,"babel-runtime/helpers/extends":382,"babel-runtime/helpers/interop-require-default":384,"babel-runtime/helpers/object-without-properties":386,"classnames":29,"react":581}],278:[function(require,module,exports){
+},{"./BreadcrumbItem":304,"./utils/ValidComponentChildren":395,"babel-runtime/helpers/extends":20,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/object-without-properties":25,"classnames":31,"react":599}],304:[function(require,module,exports){
'use strict';
var _objectWithoutProperties = require('babel-runtime/helpers/object-without-properties')['default'];
@@ -33633,7 +34878,7 @@ var BreadcrumbItem = _react2['default'].createClass({
exports['default'] = BreadcrumbItem;
module.exports = exports['default'];
-},{"./SafeAnchor":353,"babel-runtime/helpers/extends":382,"babel-runtime/helpers/interop-require-default":384,"babel-runtime/helpers/object-without-properties":386,"classnames":29,"react":581}],279:[function(require,module,exports){
+},{"./SafeAnchor":379,"babel-runtime/helpers/extends":20,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/object-without-properties":25,"classnames":31,"react":599}],305:[function(require,module,exports){
'use strict';
var _inherits = require('babel-runtime/helpers/inherits')['default'];
@@ -33777,7 +35022,7 @@ Button.types = types;
exports['default'] = _utilsBootstrapUtils.bsStyles(ButtonStyles, _styleMaps.DEFAULT, _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL, _styleMaps.Sizes.XSMALL], _utilsBootstrapUtils.bsClass('btn', Button)));
module.exports = exports['default'];
-},{"./SafeAnchor":353,"./styleMaps":366,"./utils/bootstrapUtils":370,"babel-runtime/helpers/class-call-check":381,"babel-runtime/helpers/extends":382,"babel-runtime/helpers/inherits":383,"babel-runtime/helpers/interop-require-default":384,"classnames":29,"react":581,"react-prop-types/lib/elementType":409}],280:[function(require,module,exports){
+},{"./SafeAnchor":379,"./styleMaps":392,"./utils/bootstrapUtils":396,"babel-runtime/helpers/class-call-check":17,"babel-runtime/helpers/extends":20,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"classnames":31,"react":599,"react-prop-types/lib/elementType":428}],306:[function(require,module,exports){
'use strict';
var _extends = require('babel-runtime/helpers/extends')['default'];
@@ -33851,7 +35096,7 @@ var ButtonGroup = _react2['default'].createClass({
exports['default'] = _utilsBootstrapUtils.bsClass('btn-group', ButtonGroup);
module.exports = exports['default'];
-},{"./Button":279,"./utils/bootstrapUtils":370,"babel-runtime/helpers/extends":382,"babel-runtime/helpers/interop-require-default":384,"classnames":29,"react":581,"react-prop-types/lib/all":406}],281:[function(require,module,exports){
+},{"./Button":305,"./utils/bootstrapUtils":396,"babel-runtime/helpers/extends":20,"babel-runtime/helpers/interop-require-default":23,"classnames":31,"react":599,"react-prop-types/lib/all":425}],307:[function(require,module,exports){
'use strict';
var _inherits = require('babel-runtime/helpers/inherits')['default'];
@@ -33945,7 +35190,7 @@ ButtonInput.propTypes = {
exports['default'] = _utilsDeprecationWarning2['default'].wrapper(ButtonInput, '``', '` |