diff --git a/mopidy_iris/core.py b/mopidy_iris/core.py index 1ab7dfe22..1b89aa3b1 100755 --- a/mopidy_iris/core.py +++ b/mopidy_iris/core.py @@ -1,7 +1,7 @@ from __future__ import unicode_literals -import random, string, logging, json, pykka, pylast, urllib, urllib2, os, sys, mopidy_iris, subprocess +import random, string, logging, json, pykka, urllib, urllib2, os, sys, mopidy_iris, subprocess import tornado.web import tornado.ioloop import tornado.httpclient diff --git a/mopidy_iris/static/app.js b/mopidy_iris/static/app.js index 692ff09d1..d3d2a9078 100644 --- a/mopidy_iris/static/app.js +++ b/mopidy_iris/static/app.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 117); +/******/ return __webpack_require__(__webpack_require__.s = 114); /******/ }) /************************************************************************/ /******/ ([ @@ -71,12 +71,12 @@ /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(118); + module.exports = __webpack_require__(115); } else { - module.exports = __webpack_require__(119); + module.exports = __webpack_require__(116); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), /* 1 */ @@ -2587,7 +2587,7 @@ if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(6))) /***/ }), /* 3 */ @@ -2947,8 +2947,8 @@ function processFinished(key) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(128); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(92); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_Context__ = __webpack_require__(64); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(87); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_Context__ = __webpack_require__(58); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__connect_connect__ = __webpack_require__(138); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__["a"]; }); @@ -2977,7 +2977,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactFontawesome = __webpack_require__(233); +var _reactFontawesome = __webpack_require__(242); var _reactFontawesome2 = _interopRequireDefault(_reactFontawesome); @@ -3017,13 +3017,13 @@ var Icon = function (_React$Component) { switch (this.props.type) { case 'svg': - var src = __webpack_require__(235)("./" + this.props.name + '.svg'); + var src = __webpack_require__(244)("./" + this.props.name + '.svg'); return _react2.default.createElement('img', { className: className, src: src, onClick: function onClick(e) { return _this2.handleClick(e); } }); case 'gif': - var src = __webpack_require__(272)("./" + this.props.name + '.gif'); + var src = __webpack_require__(281)("./" + this.props.name + '.gif'); return _react2.default.createElement('img', { className: className, src: src, onClick: function onClick(e) { return _this2.handleClick(e); } }); @@ -3064,6 +3064,196 @@ exports.default = Icon; /***/ }), /* 6 */ +/***/ (function(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); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3645,7 +3835,7 @@ function getQueueHistory() { } /***/ }), -/* 7 */ +/* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3713,7 +3903,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr var coreActions = __webpack_require__(10); var uiActions = __webpack_require__(3); -var mopidyActions = __webpack_require__(6); +var mopidyActions = __webpack_require__(7); var lastfmActions = __webpack_require__(19); var helpers = __webpack_require__(1); @@ -5384,7 +5574,7 @@ function getLibraryAlbumsProcessor(data) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17), __webpack_require__(11))) /***/ }), -/* 8 */ +/* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5400,7 +5590,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactRouterDom = __webpack_require__(34); +var _reactRouterDom = __webpack_require__(33); var _helpers = __webpack_require__(1); @@ -5480,196 +5670,6 @@ var _class = function (_React$Component) { exports.default = _class; -/***/ }), -/* 9 */ -/***/ (function(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); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { @@ -5721,8 +5721,8 @@ var helpers = _interopRequireWildcard(_helpers); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -var spotifyActions = __webpack_require__(7); -var mopidyActions = __webpack_require__(6); +var spotifyActions = __webpack_require__(8); +var mopidyActions = __webpack_require__(7); function getBroadcasts() { return function (dispatch, getState) { @@ -6144,7 +6144,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Link = __webpack_require__(8); +var _Link = __webpack_require__(9); var _Link2 = _interopRequireDefault(_Link); @@ -6238,7 +6238,7 @@ var Thumbnail = function (_React$Component) { return _react2.default.createElement( 'div', { className: class_name }, - _react2.default.createElement('div', { className: 'thumbnail__image', style: { backgroundImage: 'url("' + (image ? image : __webpack_require__(276)) + '")' } }), + _react2.default.createElement('div', { className: 'thumbnail__image', style: { backgroundImage: 'url("' + (image ? image : __webpack_require__(285)) + '")' } }), zoom_icon ); } @@ -6679,224 +6679,104 @@ exports.default = Header; /***/ }), /* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(__webpack_require__(0), __webpack_require__(35)); - else if(typeof define === 'function' && define.amd) - define(["react", "prop-types"], factory); - else { - var a = typeof exports === 'object' ? factory(require("react"), require("prop-types")) : factory(root["react"], root["prop-types"]); - for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; - } -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 2); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = warn; -function warn(s) { - console.warn('[react-ga]', s); -} - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = trim; -// GA strings need to have leading/trailing whitespace trimmed, and not all -// browsers have String.prototoype.trim(). - -function trim(s) { - return s.replace(/^\s+|\s+$/g, ''); -} - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (immutable) */ __webpack_exports__["initialize"] = initialize; +/* harmony export (immutable) */ __webpack_exports__["ga"] = ga; +/* harmony export (immutable) */ __webpack_exports__["set"] = set; +/* harmony export (immutable) */ __webpack_exports__["send"] = send; +/* harmony export (immutable) */ __webpack_exports__["pageview"] = pageview; +/* harmony export (immutable) */ __webpack_exports__["modalview"] = modalview; +/* harmony export (immutable) */ __webpack_exports__["timing"] = timing; +/* harmony export (immutable) */ __webpack_exports__["event"] = event; +/* harmony export (immutable) */ __webpack_exports__["exception"] = exception; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plugin", function() { return plugin; }); +/* harmony export (immutable) */ __webpack_exports__["outboundLink"] = outboundLink; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutboundLink", function() { return OutboundLink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "testModeAPI", function() { return testModeAPI; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_format__ = __webpack_require__(186); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_removeLeadingSlash__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_trim__ = __webpack_require__(97); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_loadGA__ = __webpack_require__(190); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_console_warn__ = __webpack_require__(68); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_console_log__ = __webpack_require__(191); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__ = __webpack_require__(192); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_OutboundLink__ = __webpack_require__(193); +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.testModeAPI = exports.OutboundLink = exports.plugin = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -exports.initialize = initialize; -exports.ga = ga; -exports.set = set; -exports.send = send; -exports.pageview = pageview; -exports.modalview = modalview; -exports.timing = timing; -exports.event = event; -exports.exception = exception; -exports.outboundLink = outboundLink; - -var _format2 = __webpack_require__(3); - -var _format3 = _interopRequireDefault(_format2); - -var _removeLeadingSlash = __webpack_require__(6); - -var _removeLeadingSlash2 = _interopRequireDefault(_removeLeadingSlash); - -var _trim = __webpack_require__(1); - -var _trim2 = _interopRequireDefault(_trim); +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } -var _loadGA = __webpack_require__(7); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var _loadGA2 = _interopRequireDefault(_loadGA); +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -var _warn = __webpack_require__(0); +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } -var _warn2 = _interopRequireDefault(_warn); +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } -var _log = __webpack_require__(8); +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } -var _log2 = _interopRequireDefault(_log); +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } -var _testModeAPI = __webpack_require__(9); +/** + * React Google Analytics Module + * + * @package react-ga + * @author Adam Lofting + * Atul Varma + */ -var _testModeAPI2 = _interopRequireDefault(_testModeAPI); +/** + * Utilities + */ -var _OutboundLink = __webpack_require__(10); -var _OutboundLink2 = _interopRequireDefault(_OutboundLink); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /** - * React Google Analytics Module - * - * @package react-ga - * @author Adam Lofting - * Atul Varma - */ -/** - * Utilities - */ var _debug = false; var _titleCase = true; var _testMode = false; +var _alwaysSendToDefaultTracker = true; var internalGa = function internalGa() { var _window; - if (_testMode) return _testModeAPI2.default.ga.apply(_testModeAPI2.default, arguments); - if (!window.ga) return (0, _warn2.default)('ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually'); + if (_testMode) return __WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__["a" /* default */].ga.apply(__WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__["a" /* default */], arguments); + if (typeof window === 'undefined') return false; + if (!window.ga) return Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually'); return (_window = window).ga.apply(_window, arguments); }; function _format(s) { - return (0, _format3.default)(s, _titleCase); + return Object(__WEBPACK_IMPORTED_MODULE_0__utils_format__["a" /* default */])(s, _titleCase); } function _gaCommand(trackerNames) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var command = args[0]; + if (typeof internalGa === 'function') { if (typeof command !== 'string') { - (0, _warn2.default)('ga command must be a string'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('ga command must be a string'); return; } - internalGa.apply(undefined, args); + if (_alwaysSendToDefaultTracker || !Array.isArray(trackerNames)) internalGa.apply(void 0, args); + if (Array.isArray(trackerNames)) { trackerNames.forEach(function (name) { - internalGa.apply(undefined, _toConsumableArray([name + '.' + command].concat(args.slice(1)))); + internalGa.apply(void 0, _toConsumableArray(["".concat(name, ".").concat(command)].concat(args.slice(1)))); }); } } @@ -6904,7 +6784,7 @@ function _gaCommand(trackerNames) { function _initialize(gaTrackingID, options) { if (!gaTrackingID) { - (0, _warn2.default)('gaTrackingID is required in initialize()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('gaTrackingID is required in initialize()'); return; } @@ -6933,72 +6813,76 @@ function initialize(configsOrTrackingId, options) { return false; } - (0, _loadGA2.default)(options); + Object(__WEBPACK_IMPORTED_MODULE_3__utils_loadGA__["a" /* default */])(options); } + _alwaysSendToDefaultTracker = options && typeof options.alwaysSendToDefaultTracker === 'boolean' ? options.alwaysSendToDefaultTracker : true; + if (Array.isArray(configsOrTrackingId)) { configsOrTrackingId.forEach(function (config) { - if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) !== 'object') { - (0, _warn2.default)('All configs must be an object'); + if (_typeof(config) !== 'object') { + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('All configs must be an object'); return; } + _initialize(config.trackingId, config); }); } else { _initialize(configsOrTrackingId, options); } + return true; } - /** * ga: * Returns the original GA object. */ + function ga() { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } if (args.length > 0) { - internalGa.apply(undefined, args); + internalGa.apply(void 0, args); + if (_debug) { - (0, _log2.default)('called ga(\'arguments\');'); - (0, _log2.default)('with arguments: ' + JSON.stringify(args)); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])('called ga(\'arguments\');'); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("with arguments: ".concat(JSON.stringify(args))); } } return window.ga; } - /** * set: * GA tracker set method * @param {Object} fieldsObject - a field/value pair or a group of field/value pairs on the tracker * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on */ + function set(fieldsObject, trackerNames) { if (!fieldsObject) { - (0, _warn2.default)('`fieldsObject` is required in .set()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('`fieldsObject` is required in .set()'); return; } - if ((typeof fieldsObject === 'undefined' ? 'undefined' : _typeof(fieldsObject)) !== 'object') { - (0, _warn2.default)('Expected `fieldsObject` arg to be an Object'); + if (_typeof(fieldsObject) !== 'object') { + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('Expected `fieldsObject` arg to be an Object'); return; } if (Object.keys(fieldsObject).length === 0) { - (0, _warn2.default)('empty `fieldsObject` given to .set()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('empty `fieldsObject` given to .set()'); } _gaCommand(trackerNames, 'set', fieldsObject); if (_debug) { - (0, _log2.default)('called ga(\'set\', fieldsObject);'); - (0, _log2.default)('with fieldsObject: ' + JSON.stringify(fieldsObject)); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])('called ga(\'set\', fieldsObject);'); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("with fieldsObject: ".concat(JSON.stringify(fieldsObject))); } } - /** * send: * Clone of the low level `ga.send` method @@ -7007,15 +6891,16 @@ function set(fieldsObject, trackerNames) { * @param {Array} trackerNames - trackers to send the command to * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on */ + function send(fieldObject, trackerNames) { _gaCommand(trackerNames, 'send', fieldObject); + if (_debug) { - (0, _log2.default)('called ga(\'send\', fieldObject);'); - (0, _log2.default)('with fieldObject: ' + JSON.stringify(fieldObject)); - (0, _log2.default)('with trackers: ' + JSON.stringify(trackerNames)); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])('called ga(\'send\', fieldObject);'); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("with fieldObject: ".concat(JSON.stringify(fieldObject))); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("with trackers: ".concat(JSON.stringify(trackerNames))); } } - /** * pageview: * Basic GA pageview tracking @@ -7023,40 +6908,44 @@ function send(fieldObject, trackerNames) { * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on * @param {String} title - (optional) the page title e. g. 'My Website' */ + function pageview(rawPath, trackerNames, title) { if (!rawPath) { - (0, _warn2.default)('path is required in .pageview()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('path is required in .pageview()'); return; } - var path = (0, _trim2.default)(rawPath); + var path = Object(__WEBPACK_IMPORTED_MODULE_2__utils_trim__["a" /* default */])(rawPath); + if (path === '') { - (0, _warn2.default)('path cannot be an empty string in .pageview()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('path cannot be an empty string in .pageview()'); return; } var extraFields = {}; + if (title) { extraFields.title = title; } if (typeof ga === 'function') { - _gaCommand(trackerNames, 'send', _extends({ + _gaCommand(trackerNames, 'send', _objectSpread({ hitType: 'pageview', page: path }, extraFields)); if (_debug) { - (0, _log2.default)('called ga(\'send\', \'pageview\', path);'); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])('called ga(\'send\', \'pageview\', path);'); var extraLog = ''; + if (title) { - extraLog = ' and title: ' + title; + extraLog = " and title: ".concat(title); } - (0, _log2.default)('with path: ' + path + extraLog); + + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("with path: ".concat(path).concat(extraLog)); } } } - /** * modalview: * a proxy to basic GA pageview tracking to consistently track @@ -7064,30 +6953,31 @@ function pageview(rawPath, trackerNames, title) { * @param {String} modalName e.g. 'add-or-edit-club' * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on */ + function modalview(rawModalName, trackerNames) { if (!rawModalName) { - (0, _warn2.default)('modalName is required in .modalview(modalName)'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('modalName is required in .modalview(modalName)'); return; } - var modalName = (0, _removeLeadingSlash2.default)((0, _trim2.default)(rawModalName)); + var modalName = Object(__WEBPACK_IMPORTED_MODULE_1__utils_removeLeadingSlash__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__utils_trim__["a" /* default */])(rawModalName)); if (modalName === '') { - (0, _warn2.default)('modalName cannot be an empty string or a single / in .modalview()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('modalName cannot be an empty string or a single / in .modalview()'); return; } if (typeof ga === 'function') { - var path = '/modal/' + modalName; + var path = "/modal/".concat(modalName); + _gaCommand(trackerNames, 'send', 'pageview', path); if (_debug) { - (0, _log2.default)('called ga(\'send\', \'pageview\', path);'); - (0, _log2.default)('with path: ' + path); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])('called ga(\'send\', \'pageview\', path);'); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("with path: ".concat(path)); } } } - /** * timing: * GA timing @@ -7097,6 +6987,7 @@ function modalview(rawModalName, trackerNames) { * @param args.label {String} required * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on */ + function timing() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, category = _ref.category, @@ -7104,15 +6995,15 @@ function timing() { value = _ref.value, label = _ref.label; - var trackerNames = arguments[1]; + var trackerNames = arguments.length > 1 ? arguments[1] : undefined; if (typeof ga === 'function') { if (!category || !variable || !value || typeof value !== 'number') { - (0, _warn2.default)('args.category, args.variable ' + 'AND args.value are required in timing() ' + 'AND args.value has to be a number'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('args.category, args.variable ' + 'AND args.value are required in timing() ' + 'AND args.value has to be a number'); return; - } + } // Required Fields + - // Required Fields var fieldObject = { hitType: 'timing', timingCategory: _format(category), @@ -7127,7 +7018,6 @@ function timing() { send(fieldObject, trackerNames); } } - /** * event: * GA event tracking @@ -7136,43 +7026,43 @@ function timing() { * @param args.label {String} optional * @param args.value {Int} optional * @param args.nonInteraction {boolean} optional + * @param args.transport {string} optional * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on */ -function event() { - var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var trackerNames = arguments[1]; - var category = _ref2.category, +function event() { + var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + category = _ref2.category, action = _ref2.action, label = _ref2.label, value = _ref2.value, nonInteraction = _ref2.nonInteraction, transport = _ref2.transport, - args = _objectWithoutProperties(_ref2, ['category', 'action', 'label', 'value', 'nonInteraction', 'transport']); + args = _objectWithoutProperties(_ref2, ["category", "action", "label", "value", "nonInteraction", "transport"]); + + var trackerNames = arguments.length > 1 ? arguments[1] : undefined; if (typeof ga === 'function') { // Simple Validation if (!category || !action) { - (0, _warn2.default)('args.category AND args.action are required in event()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('args.category AND args.action are required in event()'); return; - } + } // Required Fields + - // Required Fields var fieldObject = { hitType: 'event', eventCategory: _format(category), eventAction: _format(action) - }; + }; // Optional Fields - // Optional Fields if (label) { fieldObject.eventLabel = _format(label); } if (typeof value !== 'undefined') { if (typeof value !== 'number') { - (0, _warn2.default)('Expected `args.value` arg to be a Number.'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('Expected `args.value` arg to be a Number.'); } else { fieldObject.eventValue = value; } @@ -7180,7 +7070,7 @@ function event() { if (typeof nonInteraction !== 'undefined') { if (typeof nonInteraction !== 'boolean') { - (0, _warn2.default)('`args.nonInteraction` must be a boolean.'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('`args.nonInteraction` must be a boolean.'); } else { fieldObject.nonInteraction = nonInteraction; } @@ -7188,10 +7078,10 @@ function event() { if (typeof transport !== 'undefined') { if (typeof transport !== 'string') { - (0, _warn2.default)('`args.transport` must be a string.'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('`args.transport` must be a string.'); } else { if (['beacon', 'xhr', 'image'].indexOf(transport) === -1) { - (0, _warn2.default)('`args.transport` must be either one of these values: `beacon`, `xhr` or `image`'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('`args.transport` must be either one of these values: `beacon`, `xhr` or `image`'); } fieldObject.transport = transport; @@ -7203,18 +7093,15 @@ function event() { }).forEach(function (key) { fieldObject[key] = args[key]; }); - Object.keys(args).filter(function (key) { return key.substr(0, 'metric'.length) === 'metric'; }).forEach(function (key) { fieldObject[key] = args[key]; - }); + }); // Send to GA - // Send to GA send(fieldObject, trackerNames); } } - /** * exception: * GA exception tracking @@ -7222,6 +7109,7 @@ function event() { * @param args.fatal {boolean} optional * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on */ + function exception(_ref3, trackerNames) { var description = _ref3.description, fatal = _ref3.fatal; @@ -7230,27 +7118,25 @@ function exception(_ref3, trackerNames) { // Required Fields var fieldObject = { hitType: 'exception' - }; + }; // Optional Fields - // Optional Fields if (description) { fieldObject.exDescription = _format(description); } if (typeof fatal !== 'undefined') { if (typeof fatal !== 'boolean') { - (0, _warn2.default)('`args.fatal` must be a boolean.'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('`args.fatal` must be a boolean.'); } else { fieldObject.exFatal = fatal; } - } + } // Send to GA + - // Send to GA send(fieldObject, trackerNames); } } - -var plugin = exports.plugin = { +var plugin = { /** * require: * GA requires a plugin @@ -7261,37 +7147,38 @@ var plugin = exports.plugin = { if (typeof ga === 'function') { // Required Fields if (!rawName) { - (0, _warn2.default)('`name` is required in .require()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('`name` is required in .require()'); return; } - var name = (0, _trim2.default)(rawName); + var name = Object(__WEBPACK_IMPORTED_MODULE_2__utils_trim__["a" /* default */])(rawName); + if (name === '') { - (0, _warn2.default)('`name` cannot be an empty string in .require()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('`name` cannot be an empty string in .require()'); return; - } + } // Optional Fields + - // Optional Fields if (options) { - if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') { - (0, _warn2.default)('Expected `options` arg to be an Object'); + if (_typeof(options) !== 'object') { + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('Expected `options` arg to be an Object'); return; } if (Object.keys(options).length === 0) { - (0, _warn2.default)('Empty `options` given to .require()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('Empty `options` given to .require()'); } ga('require', name, options); if (_debug) { - (0, _log2.default)('called ga(\'require\', \'' + name + '\', ' + JSON.stringify(options)); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("called ga('require', '".concat(name, "', ").concat(JSON.stringify(options))); } } else { ga('require', name); if (_debug) { - (0, _log2.default)('called ga(\'require\', \'' + name + '\');'); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("called ga('require', '".concat(name, "');")); } } } @@ -7307,8 +7194,8 @@ var plugin = exports.plugin = { * @param payload {Object} optional e.g { id: '1x5e', name : 'My product to track' } */ execute: function execute(pluginName, action) { - var payload = void 0; - var actionType = void 0; + var payload; + var actionType; if ((arguments.length <= 2 ? 0 : arguments.length - 2) === 1) { payload = arguments.length <= 2 ? undefined : arguments[2]; @@ -7319,88 +7206,90 @@ var plugin = exports.plugin = { if (typeof ga === 'function') { if (typeof pluginName !== 'string') { - (0, _warn2.default)('Expected `pluginName` arg to be a String.'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('Expected `pluginName` arg to be a String.'); } else if (typeof action !== 'string') { - (0, _warn2.default)('Expected `action` arg to be a String.'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('Expected `action` arg to be a String.'); } else { - var command = pluginName + ':' + action; + var command = "".concat(pluginName, ":").concat(action); payload = payload || null; + if (actionType && payload) { ga(command, actionType, payload); + if (_debug) { - (0, _log2.default)('called ga(\'' + command + '\');'); - (0, _log2.default)('actionType: "' + actionType + '" with payload: ' + JSON.stringify(payload)); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("called ga('".concat(command, "');")); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("actionType: \"".concat(actionType, "\" with payload: ").concat(JSON.stringify(payload))); } } else if (payload) { ga(command, payload); + if (_debug) { - (0, _log2.default)('called ga(\'' + command + '\');'); - (0, _log2.default)('with payload: ' + JSON.stringify(payload)); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("called ga('".concat(command, "');")); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("with payload: ".concat(JSON.stringify(payload))); } } else { ga(command); + if (_debug) { - (0, _log2.default)('called ga(\'' + command + '\');'); + Object(__WEBPACK_IMPORTED_MODULE_5__utils_console_log__["a" /* default */])("called ga('".concat(command, "');")); } } } } } }; - /** * outboundLink: * GA outboundLink tracking * @param args.label {String} e.g. url, or 'Create an Account' * @param {function} hitCallback - Called after processing a hit. */ + function outboundLink(args, hitCallback, trackerNames) { if (typeof hitCallback !== 'function') { - (0, _warn2.default)('hitCallback function is required'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('hitCallback function is required'); return; } if (typeof ga === 'function') { // Simple Validation if (!args || !args.label) { - (0, _warn2.default)('args.label is required in outboundLink()'); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_console_warn__["a" /* default */])('args.label is required in outboundLink()'); return; - } + } // Required Fields + - // Required Fields var fieldObject = { hitType: 'event', eventCategory: 'Outbound', eventAction: 'Click', eventLabel: _format(args.label) }; - var safetyCallbackCalled = false; + var safetyCallback = function safetyCallback() { // This prevents a delayed response from GA // causing hitCallback from being fired twice safetyCallbackCalled = true; - hitCallback(); - }; - - // Using a timeout to ensure the execution of critical application code + }; // Using a timeout to ensure the execution of critical application code // in the case when the GA server might be down // or an ad blocker prevents sending the data - // register safety net timeout: + + var t = setTimeout(safetyCallback, 250); var clearableCallbackForGA = function clearableCallbackForGA() { clearTimeout(t); + if (!safetyCallbackCalled) { hitCallback(); } }; - fieldObject.hitCallback = clearableCallbackForGA; + fieldObject.hitCallback = clearableCallbackForGA; // Send to GA - // Send to GA send(fieldObject, trackerNames); } else { // if ga is not defined, return the callback so the application @@ -7408,13 +7297,11 @@ function outboundLink(args, hitCallback, trackerNames) { setTimeout(hitCallback, 0); } } - -_OutboundLink2.default.origTrackLink = _OutboundLink2.default.trackLink; -_OutboundLink2.default.trackLink = outboundLink; -var OutboundLink = exports.OutboundLink = _OutboundLink2.default; -var testModeAPI = exports.testModeAPI = _testModeAPI2.default; - -exports.default = { +__WEBPACK_IMPORTED_MODULE_7__components_OutboundLink__["a" /* default */].origTrackLink = __WEBPACK_IMPORTED_MODULE_7__components_OutboundLink__["a" /* default */].trackLink; +__WEBPACK_IMPORTED_MODULE_7__components_OutboundLink__["a" /* default */].trackLink = outboundLink; +var OutboundLink = __WEBPACK_IMPORTED_MODULE_7__components_OutboundLink__["a" /* default */]; +var testModeAPI = __WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__["a" /* default */]; +/* harmony default export */ __webpack_exports__["default"] = ({ initialize: initialize, ga: ga, set: set, @@ -7427,316 +7314,7 @@ exports.default = { plugin: plugin, outboundLink: outboundLink, OutboundLink: OutboundLink, - testModeAPI: _testModeAPI2.default -}; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = format; - -var _mightBeEmail = __webpack_require__(4); - -var _mightBeEmail2 = _interopRequireDefault(_mightBeEmail); - -var _toTitleCase = __webpack_require__(5); - -var _toTitleCase2 = _interopRequireDefault(_toTitleCase); - -var _warn = __webpack_require__(0); - -var _warn2 = _interopRequireDefault(_warn); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var redacted = 'REDACTED (Potential Email Address)'; - -function format(s, titleCase) { - if ((0, _mightBeEmail2.default)(s)) { - (0, _warn2.default)('This arg looks like an email address, redacting.'); - return redacted; - } - - if (titleCase) { - return (0, _toTitleCase2.default)(s); - } - - return s; -} - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mightBeEmail; -// See if s could be an email address. We don't want to send personal data like email. -// https://support.google.com/analytics/answer/2795983?hl=en -function mightBeEmail(s) { - // There's no point trying to validate rfc822 fully, just look for ...@... - return (/[^@]+@[^@]+/.test(s) - ); -} - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toTitleCase; - -var _trim = __webpack_require__(1); - -var _trim2 = _interopRequireDefault(_trim); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i; /** - * To Title Case 2.1 - http://individed.com/code/to-title-case/ - * Copyright 2008-2013 David Gouch. Licensed under the MIT License. - * https://github.com/gouch/to-title-case - */ - -function toTitleCase(string) { - return (0, _trim2.default)(string).replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function (match, index, title) { - if (index > 0 && index + match.length !== title.length && match.search(smallWords) > -1 && title.charAt(index - 2) !== ':' && (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && title.charAt(index - 1).search(/[^\s-]/) < 0) { - return match.toLowerCase(); - } - - if (match.substr(1).search(/[A-Z]|\../) > -1) { - return match; - } - - return match.charAt(0).toUpperCase() + match.substr(1); - }); -} - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeLeadingSlash; -function removeLeadingSlash(string) { - if (string.substring(0, 1) === '/') { - return string.substring(1); - } - - return string; -} - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (options) { - // https://developers.google.com/analytics/devguides/collection/analyticsjs/ - /* eslint-disable */ - (function (i, s, o, g, r, a, m) { - i['GoogleAnalyticsObject'] = r; - i[r] = i[r] || function () { - (i[r].q = i[r].q || []).push(arguments); - }, i[r].l = 1 * new Date(); - a = s.createElement(o), m = s.getElementsByTagName(o)[0]; - a.async = 1; - a.src = g; - m.parentNode.insertBefore(a, m); - })(window, document, 'script', options && options.gaAddress ? options.gaAddress : 'https://www.google-analytics.com/analytics.js', 'ga'); - /* eslint-enable */ -}; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = log; -function log(s) { - console.info('[react-ga]', s); -} - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var gaCalls = exports.gaCalls = []; - -exports.default = { - calls: gaCalls, - ga: function ga() { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - gaCalls.push([].concat(args)); - } -}; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(11); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(12); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _warn = __webpack_require__(0); - -var _warn2 = _interopRequireDefault(_warn); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var NEWTAB = '_blank'; -var MIDDLECLICK = 1; - -var OutboundLink = function (_Component) { - _inherits(OutboundLink, _Component); - - function OutboundLink() { - var _ref; - - var _temp, _this, _ret; - - _classCallCheck(this, OutboundLink); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = OutboundLink.__proto__ || Object.getPrototypeOf(OutboundLink)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) { - var _this$props = _this.props, - target = _this$props.target, - eventLabel = _this$props.eventLabel, - to = _this$props.to, - onClick = _this$props.onClick; - - var eventMeta = { label: eventLabel }; - var sameTarget = target !== NEWTAB; - var normalClick = !(event.ctrlKey || event.shiftKey || event.metaKey || event.button === MIDDLECLICK); - - if (sameTarget && normalClick) { - event.preventDefault(); - OutboundLink.trackLink(eventMeta, function () { - window.location.href = to; - }); - } else { - OutboundLink.trackLink(eventMeta, function () {}); - } - - if (onClick) { - onClick(event); - } - }, _temp), _possibleConstructorReturn(_this, _ret); - } - - _createClass(OutboundLink, [{ - key: 'render', - value: function render() { - var props = _extends({}, this.props, { - href: this.props.to, - onClick: this.handleClick - }); - delete props.eventLabel; - return _react2.default.createElement('a', props); - } - }]); - - return OutboundLink; -}(_react.Component); - -OutboundLink.propTypes = { - eventLabel: _propTypes2.default.string.isRequired, - target: _propTypes2.default.string, - to: _propTypes2.default.string, - onClick: _propTypes2.default.func -}; -OutboundLink.defaultProps = { - target: null, - to: null, - onClick: null -}; - -OutboundLink.trackLink = function () { - (0, _warn2.default)('ga tracking not enabled'); -}; - -exports.default = OutboundLink; - -/***/ }), -/* 11 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_11__; - -/***/ }), -/* 12 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_12__; - -/***/ }) -/******/ ]); + testModeAPI: __WEBPACK_IMPORTED_MODULE_6__utils_testModeAPI__["a" /* default */] }); /***/ }), @@ -18136,7 +17714,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _Link = __webpack_require__(8); +var _Link = __webpack_require__(9); var _Link2 = _interopRequireDefault(_Link); @@ -18666,7 +18244,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Track = __webpack_require__(281); +var _Track = __webpack_require__(290); var _Track2 = _interopRequireDefault(_Track); @@ -18678,7 +18256,7 @@ var _helpers = __webpack_require__(1); var helpers = _interopRequireWildcard(_helpers); -var _actions = __webpack_require__(6); +var _actions = __webpack_require__(7); var mopidyActions = _interopRequireWildcard(_actions); @@ -19237,7 +18815,7 @@ if (process.env.NODE_ENV !== 'production') { module.exports = __webpack_require__(152)(); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), /* 22 */ @@ -19694,7 +19272,7 @@ var invariant = function(condition, format, a, b, c, d, e, f) { module.exports = invariant; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), /* 27 */ @@ -20084,103 +19662,6 @@ exports.default = DropdownField; /* 29 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - - -/* 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; -}; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2014-present, Facebook, Inc. @@ -20245,10 +19726,10 @@ if (__DEV__) { module.exports = warning; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 31 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -20273,17 +19754,17 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(221)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(230)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(223)(); + module.exports = __webpack_require__(232)(); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 32 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20401,49 +19882,104 @@ var Parallax = function (_React$Component) { exports.default = Parallax; /***/ }), -/* 33 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - */ +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; -function makeEmptyFunction(arg) { - return function () { - return arg; - }; +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); } -/** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ -var emptyFunction = function emptyFunction() {}; +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; + // 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; }; -module.exports = emptyFunction; /***/ }), -/* 34 */ +/* 33 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20452,7 +19988,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(156); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(98); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(93); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(157); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__["a"]; }); @@ -20462,9 +19998,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_5__Prompt__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(163); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(99); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(94); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(71); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(65); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_8__Router__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(165); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__StaticRouter__["a"]; }); @@ -20506,14 +20042,16 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), -/* 35 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * 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. */ if (process.env.NODE_ENV !== 'production') { @@ -20531,17 +20069,17 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(186)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(194)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(187)(); + module.exports = __webpack_require__(196)(); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 36 */ +/* 35 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20551,10 +20089,10 @@ if (process.env.NODE_ENV !== 'production') { /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__createHashHistory__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(155); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(51); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(43); /* unused harmony reexport parsePath */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__["b"]; }); @@ -20568,7 +20106,7 @@ if (process.env.NODE_ENV !== 'production') { /***/ }), -/* 37 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20801,7 +20339,7 @@ function findTrackLyrics(track) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17))) /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20969,7 +20507,7 @@ function streamsLoaded(streams) { } /***/ }), -/* 39 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21036,10 +20574,10 @@ if (__DEV__) { module.exports = warning; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 40 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21104,10 +20642,10 @@ if (process.env.NODE_ENV !== 'production') { module.exports = warning; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 41 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21161,10 +20699,10 @@ var invariant = function(condition, format, a, b, c, d, e, f) { module.exports = invariant; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 42 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21188,7 +20726,7 @@ var _Thumbnail = __webpack_require__(12); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _GridItem = __webpack_require__(43); +var _GridItem = __webpack_require__(42); var _GridItem2 = _interopRequireDefault(_GridItem); @@ -21300,7 +20838,7 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)( /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11))) /***/ }), -/* 43 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21316,11 +20854,11 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(53); +var _reactDom = __webpack_require__(49); var _reactDom2 = _interopRequireDefault(_reactDom); -var _reactRouterDom = __webpack_require__(34); +var _reactRouterDom = __webpack_require__(33); var _helpers = __webpack_require__(1); @@ -21504,67 +21042,7 @@ exports.default = GridItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11))) /***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - - - -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - -var validateFormat = function validateFormat(format) {}; - -if (process.env.NODE_ENV !== '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; - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -} - -module.exports = invariant; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) - -/***/ }), -/* 45 */ +/* 43 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21635,7 +21113,7 @@ var createPath = function createPath(location) { }; /***/ }), -/* 46 */ +/* 44 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21706,7 +21184,7 @@ var createPath = function createPath(location) { }; /***/ }), -/* 47 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21726,7 +21204,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _Link = __webpack_require__(8); +var _Link = __webpack_require__(9); var _Link2 = _interopRequireDefault(_Link); @@ -21738,7 +21216,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(7); +var _actions2 = __webpack_require__(8); var spotifyActions = _interopRequireWildcard(_actions2); @@ -21833,7 +21311,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(FollowButton); /***/ }), -/* 48 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21853,7 +21331,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _history = __webpack_require__(287); +var _history = __webpack_require__(296); var _history2 = _interopRequireDefault(_history); @@ -21865,7 +21343,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _GridItem = __webpack_require__(43); +var _GridItem = __webpack_require__(42); var _GridItem2 = _interopRequireDefault(_GridItem); @@ -21951,7 +21429,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AlbumGrid); /***/ }), -/* 49 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21979,7 +21457,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _GridItem = __webpack_require__(43); +var _GridItem = __webpack_require__(42); var _GridItem2 = _interopRequireDefault(_GridItem); @@ -22065,7 +21543,7 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)( /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11))) /***/ }), -/* 50 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22085,7 +21563,7 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouter = __webpack_require__(57); +var _reactRouter = __webpack_require__(53); var _ArtistSentence = __webpack_require__(22); @@ -22111,7 +21589,7 @@ var _Thumbnail = __webpack_require__(12); var _Thumbnail2 = _interopRequireDefault(_Thumbnail); -var _Popularity = __webpack_require__(84); +var _Popularity = __webpack_require__(82); var _Popularity2 = _interopRequireDefault(_Popularity); @@ -22345,100 +21823,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRouter.withRouter)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(List)); /***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - - - -var emptyObject = {}; - -if (process.env.NODE_ENV !== 'production') { - Object.freeze(emptyObject); -} - -module.exports = emptyObject; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - - - -var emptyFunction = __webpack_require__(33); - -/** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var warning = emptyFunction; - -if (process.env.NODE_ENV !== 'production') { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; - - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; -} - -module.exports = warning; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) - -/***/ }), -/* 53 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22476,15 +21861,15 @@ if (process.env.NODE_ENV === 'production') { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); - module.exports = __webpack_require__(120); + module.exports = __webpack_require__(119); } else { - module.exports = __webpack_require__(123); + module.exports = __webpack_require__(122); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 54 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22549,18 +21934,18 @@ if (process.env.NODE_ENV !== 'production') { module.exports = warning; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 55 */ +/* 51 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return locationsAreEqual; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(68); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(62); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(63); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(43); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -22628,7 +22013,7 @@ var locationsAreEqual = function locationsAreEqual(a, b) { }; /***/ }), -/* 56 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { var isarray = __webpack_require__(160) @@ -23060,30 +22445,30 @@ function pathToRegexp (path, keys, options) { /***/ }), -/* 57 */ +/* 53 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(220); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(229); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(227); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(236); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_1__Prompt__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(228); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(237); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_2__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(106); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_3__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(80); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(78); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_4__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(229); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(238); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_5__StaticRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(230); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(239); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_6__Switch__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__generatePath__ = __webpack_require__(108); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__generatePath__ = __webpack_require__(105); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "generatePath", function() { return __WEBPACK_IMPORTED_MODULE_7__generatePath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__matchPath__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__matchPath__ = __webpack_require__(79); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_8__matchPath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__withRouter__ = __webpack_require__(231); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__withRouter__ = __webpack_require__(240); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__withRouter__["a"]; }); @@ -23107,15 +22492,15 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), -/* 58 */ +/* 54 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return locationsAreEqual; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(68); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_resolve_pathname__ = __webpack_require__(62); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_value_equal__ = __webpack_require__(63); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PathUtils__ = __webpack_require__(44); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -23183,7 +22568,7 @@ var locationsAreEqual = function locationsAreEqual(a, b) { }; /***/ }), -/* 59 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23267,7 +22652,7 @@ var ErrorBoundary = function (_React$Component) { exports.default = ErrorBoundary; /***/ }), -/* 60 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23277,7 +22662,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _captialize = __webpack_require__(316); +var _captialize = __webpack_require__(325); Object.defineProperty(exports, 'captialize', { enumerable: true, @@ -23286,7 +22671,7 @@ Object.defineProperty(exports, 'captialize', { } }); -var _clamp = __webpack_require__(317); +var _clamp = __webpack_require__(326); Object.defineProperty(exports, 'clamp', { enumerable: true, @@ -23295,7 +22680,7 @@ Object.defineProperty(exports, 'clamp', { } }); -var _distanceTo = __webpack_require__(318); +var _distanceTo = __webpack_require__(327); Object.defineProperty(exports, 'distanceTo', { enumerable: true, @@ -23304,7 +22689,7 @@ Object.defineProperty(exports, 'distanceTo', { } }); -var _isDefined = __webpack_require__(319); +var _isDefined = __webpack_require__(328); Object.defineProperty(exports, 'isDefined', { enumerable: true, @@ -23313,7 +22698,7 @@ Object.defineProperty(exports, 'isDefined', { } }); -var _isNumber = __webpack_require__(320); +var _isNumber = __webpack_require__(329); Object.defineProperty(exports, 'isNumber', { enumerable: true, @@ -23322,7 +22707,7 @@ Object.defineProperty(exports, 'isNumber', { } }); -var _isObject = __webpack_require__(321); +var _isObject = __webpack_require__(330); Object.defineProperty(exports, 'isObject', { enumerable: true, @@ -23331,7 +22716,7 @@ Object.defineProperty(exports, 'isObject', { } }); -var _length = __webpack_require__(322); +var _length = __webpack_require__(331); Object.defineProperty(exports, 'length', { enumerable: true, @@ -23344,93 +22729,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de //# sourceMappingURL=index.js.map /***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -if (process.env.NODE_ENV !== 'production') { - var invariant = __webpack_require__(44); - var warning = __webpack_require__(52); - var ReactPropTypesSecret = __webpack_require__(62); - var loggedTypeFailures = {}; -} - -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. - * @private - */ -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (process.env.NODE_ENV !== 'production') { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]); - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; - - var stack = getStack ? getStack() : ''; - - warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); - } - } - } - } -} - -module.exports = checkPropTypes; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; - -module.exports = ReactPropTypesSecret; - - -/***/ }), -/* 63 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23449,7 +22748,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 64 */ +/* 58 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23461,7 +22760,7 @@ var ReactReduxContext = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createCont /* unused harmony default export */ var _unused_webpack_default_export = (ReactReduxContext); /***/ }), -/* 65 */ +/* 59 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23485,7 +22784,7 @@ function _extends() { } /***/ }), -/* 66 */ +/* 60 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23506,7 +22805,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { } /***/ }), -/* 67 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23525,7 +22824,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 68 */ +/* 62 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23602,7 +22901,7 @@ function resolvePathname(to) { /* harmony default export */ __webpack_exports__["default"] = (resolvePathname); /***/ }), -/* 69 */ +/* 63 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23647,11 +22946,11 @@ function valueEqual(a, b) { /* harmony default export */ __webpack_exports__["default"] = (valueEqual); /***/ }), -/* 70 */ +/* 64 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(50); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); @@ -23732,22 +23031,22 @@ var createTransitionManager = function createTransitionManager() { /* harmony default export */ __webpack_exports__["a"] = (createTransitionManager); /***/ }), -/* 71 */ +/* 65 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(72); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(66); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__["a" /* default */]); /***/ }), -/* 72 */ +/* 66 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); @@ -23862,11 +23161,11 @@ Router.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Router); /***/ }), -/* 73 */ +/* 67 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -23942,7 +23241,144 @@ var matchPath = function matchPath(pathname) { /* harmony default export */ __webpack_exports__["a"] = (matchPath); /***/ }), -/* 74 */ +/* 68 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = warn; +function warn(s) { + console.warn('[react-ga]', s); +} + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * 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 invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (process.env.NODE_ENV !== '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; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 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. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), +/* 72 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_RESULT__;var require;/** @license MIT License (c) copyright 2010-2014 original author or authors */ @@ -23976,7 +23412,7 @@ var matchPath = function matchPath(pathname) { } else if (!capturedSetTimeout) { // vert.x var vertxRequire = require; - var vertx = __webpack_require__(197); + var vertx = __webpack_require__(206); setTimer = function (f, ms) { return vertx.setTimer(ms, f); }; clearTimer = vertx.cancelTimer; asap = vertx.runOnLoop || vertx.runOnContext; @@ -24020,10 +23456,10 @@ var matchPath = function matchPath(pathname) { __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }(__webpack_require__(16))); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 75 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24069,7 +23505,7 @@ function clearLibraryAlbums() { } /***/ }), -/* 76 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24088,20 +23524,20 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 77 */ +/* 75 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(224); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBrowserHistory__ = __webpack_require__(233); /* unused harmony reexport createBrowserHistory */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(225); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createHashHistory__ = __webpack_require__(234); /* unused harmony reexport createHashHistory */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(226); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(235); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(58); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__LocationUtils__ = __webpack_require__(54); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__LocationUtils__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PathUtils__ = __webpack_require__(44); /* unused harmony reexport parsePath */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__PathUtils__["b"]; }); @@ -24115,7 +23551,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 78 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24171,14 +23607,14 @@ var invariant = function(condition, format, a, b, c, d, e, f) { module.exports = invariant; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 79 */ +/* 77 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); @@ -24259,17 +23695,17 @@ var createTransitionManager = function createTransitionManager() { /* harmony default export */ __webpack_exports__["a"] = (createTransitionManager); /***/ }), -/* 80 */ +/* 78 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(41); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(30); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -24378,11 +23814,11 @@ Router.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Router); /***/ }), -/* 81 */ +/* 79 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -24458,7 +23894,7 @@ var matchPath = function matchPath(pathname) { /* harmony default export */ __webpack_exports__["a"] = (matchPath); /***/ }), -/* 82 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24546,7 +23982,7 @@ var VolumeControl = function (_React$Component) { exports.default = VolumeControl; /***/ }), -/* 83 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24630,7 +24066,7 @@ var MuteControl = function (_React$Component) { exports.default = MuteControl; /***/ }), -/* 84 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24708,7 +24144,7 @@ var Popularity = function (_React$Component) { exports.default = Popularity; /***/ }), -/* 85 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24818,7 +24254,7 @@ module.exports = exports['default']; /***/ }), -/* 86 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24834,7 +24270,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _Link = __webpack_require__(8); +var _Link = __webpack_require__(9); var _Link2 = _interopRequireDefault(_Link); @@ -24952,202 +24388,22 @@ var FilterField = function (_React$Component) { exports.default = FilterField; /***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - - - -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -/** - * Simple, lightweight module assisting with the detection and context of - * Worker. Helps avoid circular dependencies and allows code to reason about - * whether or not they are in a Worker, even if they never include the main - * `ReactWorker` dependency. - */ -var ExecutionEnvironment = { - - canUseDOM: canUseDOM, - - canUseWorkers: typeof Worker !== 'undefined', - - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), - - canUseViewport: canUseDOM && !!window.screen, - - isInWorker: !canUseDOM // For now, this is true - might change in the future. - -}; - -module.exports = ExecutionEnvironment; - -/***/ }), -/* 88 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @typechecks - */ - -/* eslint-disable fb-www/typeof-undefined */ - -/** - * Same as document.activeElement but wraps in a try-catch block. In IE it is - * not safe to call document.activeElement if there is nothing focused. - * - * The activeElement will be null only if the document or document body is not - * yet defined. - * - * @param {?DOMDocument} doc Defaults to current document. - * @return {?DOMElement} - */ -function getActiveElement(doc) /*?DOMElement*/{ - doc = doc || (typeof document !== 'undefined' ? document : undefined); - if (typeof doc === 'undefined') { - return null; - } - try { - return doc.activeElement || doc.body; - } catch (e) { - return doc.body; - } -} - -module.exports = getActiveElement; - -/***/ }), -/* 89 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @typechecks - * - */ - -/*eslint-disable no-self-compare */ - - - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ -function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - // Added the nonzero y check to make Flow happy, but it is redundant - return x !== 0 || y !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } -} - -/** - * Performs equality by iterating through keys on an object and returning false - * when any key has values which are not strictly equal between the arguments. - * Returns true when the values of all keys are strictly equal. - */ -function shallowEqual(objA, objB) { - if (is(objA, objB)) { - return true; - } - - if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { - return false; - } - - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); - - if (keysA.length !== keysB.length) { - return false; - } - - // Test for A's keys different from B. - for (var i = 0; i < keysA.length; i++) { - if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { - return false; - } - } - - return true; -} - -module.exports = shallowEqual; - -/***/ }), -/* 90 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) { - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - */ - -var isTextNode = __webpack_require__(121); - -/*eslint-disable no-bitwise */ - -/** - * Checks if a given DOM node contains or is another DOM node. - */ -function containsNode(outerNode, innerNode) { - if (!outerNode || !innerNode) { - return false; - } else if (outerNode === innerNode) { - return true; - } else if (isTextNode(outerNode)) { - return false; - } else if (isTextNode(innerNode)) { - return containsNode(outerNode, innerNode.parentNode); - } else if ('contains' in outerNode) { - return outerNode.contains(innerNode); - } else if (outerNode.compareDocumentPosition) { - return !!(outerNode.compareDocumentPosition(innerNode) & 16); - } else { - return false; - } +if (process.env.NODE_ENV === 'production') { + module.exports = __webpack_require__(120); +} else { + module.exports = __webpack_require__(121); } -module.exports = containsNode; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 91 */ +/* 86 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25159,24 +24415,24 @@ function _inheritsLoose(subClass, superClass) { } /***/ }), -/* 92 */ +/* 87 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = connectAdvanced; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(91); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(86); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(133); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = __webpack_require__(65); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(66); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = __webpack_require__(134); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(137); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(93); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(88); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_is__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Context__ = __webpack_require__(64); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Context__ = __webpack_require__(58); @@ -25364,10 +24620,10 @@ _ref) { return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent); }; } -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(6))) /***/ }), -/* 93 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25379,17 +24635,17 @@ if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(136); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 94 */ +/* 89 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = wrapMapToPropsConstant; /* unused harmony export getDependsOnOwnProps */ /* harmony export (immutable) */ __webpack_exports__["b"] = wrapMapToPropsFunc; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(95); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(90); function wrapMapToPropsConstant(getConstant) { return function initConstantSelector(dispatch, options) { @@ -25454,16 +24710,16 @@ function wrapMapToPropsFunc(mapToProps, methodName) { return proxy; }; } -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(6))) /***/ }), -/* 95 */ +/* 90 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = verifyPlainObject; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(144); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(96); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(91); function verifyPlainObject(value, displayName, methodName) { @@ -25473,7 +24729,7 @@ function verifyPlainObject(value, displayName, methodName) { } /***/ }), -/* 96 */ +/* 91 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25504,7 +24760,7 @@ function warning(message) { } /***/ }), -/* 97 */ +/* 92 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25570,7 +24826,7 @@ var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { }; /***/ }), -/* 98 */ +/* 93 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25580,7 +24836,7 @@ var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(35); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -25687,22 +24943,22 @@ Link.contextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Link); /***/ }), -/* 99 */ +/* 94 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(100); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__ = __webpack_require__(95); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Route__["a" /* default */]); /***/ }), -/* 100 */ +/* 95 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); @@ -25710,7 +24966,7 @@ Link.contextTypes = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(21); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(67); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -25852,11 +25108,11 @@ Route.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), -/* 101 */ +/* 96 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -25897,7 +25153,90 @@ var generatePath = function generatePath() { /* harmony default export */ __webpack_exports__["a"] = (generatePath); /***/ }), -/* 102 */ +/* 97 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = trim; +// GA strings need to have leading/trailing whitespace trimmed, and not all +// browsers have String.prototoype.trim(). +function trim(s) { + return s.replace(/^\s+|\s+$/g, ''); +} + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-2015, 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. + * + */ + + + +var emptyFunction = __webpack_require__(69); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if (process.env.NODE_ENV !== 'production') { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = warning; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) + +/***/ }), +/* 99 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ @@ -25930,7 +25269,7 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-20 }(__webpack_require__(16))); /***/ }), -/* 103 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ @@ -25972,7 +25311,7 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-20 /***/ }), -/* 104 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-2014 original author or authors */ @@ -26034,14 +25373,14 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-20 /***/ }), -/* 105 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { (function(){ - var crypt = __webpack_require__(210), - utf8 = __webpack_require__(106).utf8, - isBuffer = __webpack_require__(211), - bin = __webpack_require__(106).bin, + var crypt = __webpack_require__(219), + utf8 = __webpack_require__(103).utf8, + isBuffer = __webpack_require__(220), + bin = __webpack_require__(103).bin, // The core md5 = function (message, options) { @@ -26200,7 +25539,7 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/** @license MIT License (c) copyright 2010-20 /***/ }), -/* 106 */ +/* 103 */ /***/ (function(module, exports) { var charenc = { @@ -26239,7 +25578,7 @@ module.exports = charenc; /***/ }), -/* 107 */ +/* 104 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -26305,11 +25644,11 @@ var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { }; /***/ }), -/* 108 */ +/* 105 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -26350,19 +25689,19 @@ var generatePath = function generatePath() { /* harmony default export */ __webpack_exports__["a"] = (generatePath); /***/ }), -/* 109 */ +/* 106 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(41); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(30); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(79); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -26504,7 +25843,7 @@ Route.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), -/* 110 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26528,7 +25867,7 @@ var _helpers = __webpack_require__(1); var helpers = _interopRequireWildcard(_helpers); -var _actions = __webpack_require__(6); +var _actions = __webpack_require__(7); var mopidyActions = _interopRequireWildcard(_actions); @@ -26622,7 +25961,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ProgressSlider); /***/ }), -/* 111 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26689,7 +26028,7 @@ var createPath = exports.createPath = function createPath(location) { }; /***/ }), -/* 112 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26779,7 +26118,7 @@ var RelatedArtists = function (_React$Component) { exports.default = RelatedArtists; /***/ }), -/* 113 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26903,7 +26242,7 @@ var ConfirmationButton = function (_React$Component) { exports.default = ConfirmationButton; /***/ }), -/* 114 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26935,7 +26274,7 @@ var _actions = __webpack_require__(3); var uiActions = _interopRequireWildcard(_actions); -var _actions2 = __webpack_require__(7); +var _actions2 = __webpack_require__(8); var spotifyActions = _interopRequireWildcard(_actions2); @@ -27091,7 +26430,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SpotifyAuthenticationFrame); /***/ }), -/* 115 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27278,7 +26617,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LastfmAuthenticationFrame); /***/ }), -/* 116 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27293,7 +26632,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(35); +var _propTypes = __webpack_require__(34); var _propTypes2 = _interopRequireDefault(_propTypes); @@ -27337,7 +26676,7 @@ module.exports = exports['default']; //# sourceMappingURL=label.js.map /***/ }), -/* 117 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27347,7 +26686,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(53); +var _reactDom = __webpack_require__(49); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -27355,13 +26694,13 @@ var _reactRedux = __webpack_require__(4); var _redux = __webpack_require__(2); -var _reactRouterDom = __webpack_require__(34); +var _reactRouterDom = __webpack_require__(33); var _bootstrap = __webpack_require__(174); var _bootstrap2 = _interopRequireDefault(_bootstrap); -var _App = __webpack_require__(218); +var _App = __webpack_require__(227); var _App2 = _interopRequireDefault(_App); @@ -27374,7 +26713,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de ; //import { Router, Route, Link, IndexRoute, hashHistory } from 'react-router'; -__webpack_require__(353); +__webpack_require__(362); global.baseURL = '/'; @@ -27390,43 +26729,45 @@ _reactDom2.default.render(_react2.default.createElement( /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11))) /***/ }), -/* 118 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** @license React v16.3.0 +/** @license React v16.7.0 * react.production.min.js * - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var m=__webpack_require__(29),n=__webpack_require__(51),p=__webpack_require__(33),q="function"===typeof Symbol&&Symbol["for"],r=q?Symbol["for"]("react.element"):60103,t=q?Symbol["for"]("react.portal"):60106,u=q?Symbol["for"]("react.fragment"):60107,v=q?Symbol["for"]("react.strict_mode"):60108,w=q?Symbol["for"]("react.provider"):60109,x=q?Symbol["for"]("react.context"):60110,y=q?Symbol["for"]("react.async_mode"):60111,z=q?Symbol["for"]("react.forward_ref"):60112,A="function"=== -typeof Symbol&&Symbol.iterator;function B(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,c=0;cN.length&&N.push(a)} -function Q(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case r:case t:g=!0}}if(g)return e(c,a,""===b?"."+R(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;hQ.length&&Q.push(a)} +function T(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return e(c,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { @@ -27540,6 +26958,56 @@ var lowPriorityWarning = function () {}; var lowPriorityWarning$1 = lowPriorityWarning; +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warningWithoutStack = function () {}; + +{ + warningWithoutStack = function (condition, format) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument'); + } + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + if (condition) { + return; + } + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); + + // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; +} + +var warningWithoutStack$1 = warningWithoutStack; + var didWarnStateUpdateForUnmountedComponent = {}; function warnNoop(publicInstance, callerName) { @@ -27550,7 +27018,7 @@ function warnNoop(publicInstance, callerName) { if (didWarnStateUpdateForUnmountedComponent[warningKey]) { return; } - warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName); + warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); didWarnStateUpdateForUnmountedComponent[warningKey] = true; } } @@ -27623,12 +27091,18 @@ var ReactNoopUpdateQueue = { } }; +var emptyObject = {}; +{ + Object.freeze(emptyObject); +} + /** * Base class helpers for the updating state of a component. */ function Component(props, context, updater) { this.props = props; this.context = context; + // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. @@ -27719,6 +27193,7 @@ ComponentDummy.prototype = Component.prototype; function PureComponent(props, context, updater) { this.props = props; this.context = context; + // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; } @@ -27751,9 +27226,181 @@ var ReactCurrentOwner = { * @internal * @type {ReactComponent} */ - current: null + current: null, + currentDispatcher: null +}; + +var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + +var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + if (match) { + var pathBeforeSlash = match[1]; + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + return '\n in ' + (name || 'Unknown') + sourceInfo; +}; + +var Resolved = 1; + + +function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; +} + +function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName); +} + +function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + { + if (typeof type.tag === 'number') { + warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); + } + } + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + if (typeof type === 'string') { + return type; + } + switch (type) { + case REACT_CONCURRENT_MODE_TYPE: + return 'ConcurrentMode'; + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + case REACT_PORTAL_TYPE: + return 'Portal'; + case REACT_PROFILER_TYPE: + return 'Profiler'; + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + } + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_LAZY_TYPE: + { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + } + } + } + return null; +} + +var ReactDebugCurrentFrame = {}; + +var currentlyValidatingElement = null; + +function setCurrentlyValidatingElement(element) { + { + currentlyValidatingElement = element; + } +} + +{ + // Stack implementation injected by the current renderer. + ReactDebugCurrentFrame.getCurrentStack = null; + + ReactDebugCurrentFrame.getStackAddendum = function () { + var stack = ''; + + // Add an extra top frame while an element is being validated + if (currentlyValidatingElement) { + var name = getComponentName(currentlyValidatingElement.type); + var owner = currentlyValidatingElement._owner; + stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type)); + } + + // Delegate to the injected renderer-specific implementation + var impl = ReactDebugCurrentFrame.getCurrentStack; + if (impl) { + stack += impl() || ''; + } + + return stack; + }; +} + +var ReactSharedInternals = { + ReactCurrentOwner: ReactCurrentOwner, + // Used by renderers to avoid bundling object-assign twice in UMD bundles: + assign: _assign }; +{ + _assign(ReactSharedInternals, { + // These should not be included in production. + ReactDebugCurrentFrame: ReactDebugCurrentFrame, + // Shim for React DOM 16.0.0 which still destructured (but not used) this. + // TODO: remove in React 17.0. + ReactComponentTreeHook: {} + }); +} + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = warningWithoutStack$1; + +{ + warning = function (condition, format) { + if (condition) { + return; + } + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + // eslint-disable-next-line react-internal/warning-and-invariant-args + + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack])); + }; +} + +var warning$1 = warning; + var hasOwnProperty = Object.prototype.hasOwnProperty; var RESERVED_PROPS = { @@ -27794,7 +27441,7 @@ function defineKeyPropWarningGetter(props, displayName) { var warnAboutAccessingKey = function () { if (!specialPropKeyWarningShown) { specialPropKeyWarningShown = true; - warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); + warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } }; warnAboutAccessingKey.isReactWarning = true; @@ -27808,7 +27455,7 @@ function defineRefPropWarningGetter(props, displayName) { var warnAboutAccessingRef = function () { if (!specialPropRefWarningShown) { specialPropRefWarningShown = true; - warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); + warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName); } }; warnAboutAccessingRef.isReactWarning = true; @@ -27956,14 +27603,12 @@ function createElement(type, config, children) { } { if (key || ref) { - if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); } } } @@ -27987,6 +27632,8 @@ function cloneAndReplaceKey(oldElement, newKey) { * See https://reactjs.org/docs/react-api.html#cloneelement */ function cloneElement(element, config, children) { + !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0; + var propName = void 0; // Original props are copied @@ -28052,28 +27699,13 @@ function cloneElement(element, config, children) { * Verifies the object is a ReactElement. * See https://reactjs.org/docs/react-api.html#isvalidelement * @param {?object} object - * @return {boolean} True if `object` is a valid component. + * @return {boolean} True if `object` is a ReactElement. * @final */ function isValidElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } -var ReactDebugCurrentFrame = {}; - -{ - // Component that is being worked on - ReactDebugCurrentFrame.getCurrentStack = null; - - ReactDebugCurrentFrame.getStackAddendum = function () { - var impl = ReactDebugCurrentFrame.getCurrentStack; - if (impl) { - return impl(); - } - return null; - }; -} - var SEPARATOR = '.'; var SUBSEPARATOR = ':'; @@ -28201,7 +27833,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { // Warn about using Maps as children if (iteratorFn === children.entries) { - warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum()); + !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0; didWarnAboutMaps = true; } } @@ -28279,7 +27911,7 @@ function forEachSingleChild(bookKeeping, child, name) { /** * Iterates through children that are typically specified as `props.children`. * - * See https://reactjs.org/docs/react-api.html#react.children.foreach + * See https://reactjs.org/docs/react-api.html#reactchildrenforeach * * The provided forEachFunc(child, index) will be called for each * leaf child. @@ -28306,7 +27938,9 @@ function mapSingleChildIntoContext(bookKeeping, child, childKey) { var mappedChild = func.call(context, child, bookKeeping.count++); if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { + return c; + }); } else if (mappedChild != null) { if (isValidElement(mappedChild)) { mappedChild = cloneAndReplaceKey(mappedChild, @@ -28331,7 +27965,7 @@ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { /** * Maps children that are typically specified as `props.children`. * - * See https://reactjs.org/docs/react-api.html#react.children.map + * See https://reactjs.org/docs/react-api.html#reactchildrenmap * * The provided mapFunction(child, key, index) will be called for each * leaf child. @@ -28354,24 +27988,28 @@ function mapChildren(children, func, context) { * Count the number of children that are typically specified as * `props.children`. * - * See https://reactjs.org/docs/react-api.html#react.children.count + * See https://reactjs.org/docs/react-api.html#reactchildrencount * * @param {?*} children Children tree container. * @return {number} The number of children. */ -function countChildren(children, context) { - return traverseAllChildren(children, emptyFunction.thatReturnsNull, null); +function countChildren(children) { + return traverseAllChildren(children, function () { + return null; + }, null); } /** * Flatten a children object (typically specified as `props.children`) and * return an array with appropriately re-keyed children. * - * See https://reactjs.org/docs/react-api.html#react.children.toarray + * See https://reactjs.org/docs/react-api.html#reactchildrentoarray */ function toArray(children) { var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + mapIntoWithKeyPrefixInternal(children, result, null, function (child) { + return child; + }); return result; } @@ -28379,7 +28017,7 @@ function toArray(children) { * Returns the first child in a collection of children and verifies that there * is only one child in the collection. * - * See https://reactjs.org/docs/react-api.html#react.children.only + * See https://reactjs.org/docs/react-api.html#reactchildrenonly * * The current implementation of this function assumes that a single child gets * passed without a wrapper, but the purpose of this helper function is to @@ -28399,16 +28037,23 @@ function createContext(defaultValue, calculateChangedBits) { calculateChangedBits = null; } else { { - warning(calculateChangedBits === null || typeof calculateChangedBits === 'function', 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits); + !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0; } } var context = { $$typeof: REACT_CONTEXT_TYPE, _calculateChangedBits: calculateChangedBits, - _defaultValue: defaultValue, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. _currentValue: defaultValue, - _changedBits: 0, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, // These are circular Provider: null, Consumer: null @@ -28416,20 +28061,144 @@ function createContext(defaultValue, calculateChangedBits) { context.Provider = { $$typeof: REACT_PROVIDER_TYPE, - context: context + _context: context }; - context.Consumer = context; + + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + + { + // A separate object, but proxies back to the original context object for + // backwards compatibility. It has a different $$typeof, so we can properly + // warn for the incorrect usage of Context as a Consumer. + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits + }; + // $FlowFixMe: Flow complains about not setting a value, which is intentional here + Object.defineProperties(Consumer, { + Provider: { + get: function () { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + warning$1(false, 'Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?'); + } + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function () { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + warning$1(false, 'Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?'); + } + return context.Consumer; + } + } + }); + // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty + context.Consumer = Consumer; + } { context._currentRenderer = null; + context._currentRenderer2 = null; } return context; } +function lazy(ctor) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _ctor: ctor, + // React uses these fields to store the result. + _status: -1, + _result: null + }; + + { + // In production, this would just set it on the object. + var defaultProps = void 0; + var propTypes = void 0; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function () { + return defaultProps; + }, + set: function (newDefaultProps) { + warning$1(false, 'React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); + defaultProps = newDefaultProps; + // Match production behavior more closely: + Object.defineProperty(lazyType, 'defaultProps', { + enumerable: true + }); + } + }, + propTypes: { + configurable: true, + get: function () { + return propTypes; + }, + set: function (newPropTypes) { + warning$1(false, 'React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); + propTypes = newPropTypes; + // Match production behavior more closely: + Object.defineProperty(lazyType, 'propTypes', { + enumerable: true + }); + } + } + }); + } + + return lazyType; +} + function forwardRef(render) { { - warning(typeof render === 'function', 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + warningWithoutStack$1(false, 'forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).'); + } else if (typeof render !== 'function') { + warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); + } else { + !( + // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object + render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0; + } + + if (render != null) { + !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0; + } } return { @@ -28438,36 +28207,87 @@ function forwardRef(render) { }; } -var describeComponentFrame = function (name, source, ownerName) { - return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); -}; - function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE); } -function getComponentName(fiber) { - var type = fiber.type; - - if (typeof type === 'function') { - return type.displayName || type.name; - } - if (typeof type === 'string') { - return type; +function memo(type, compare) { + { + if (!isValidElementType(type)) { + warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type); + } } - switch (type) { - case REACT_FRAGMENT_TYPE: - return 'ReactFragment'; - case REACT_PORTAL_TYPE: - return 'ReactPortal'; - case REACT_CALL_TYPE: - return 'ReactCall'; - case REACT_RETURN_TYPE: - return 'ReactReturn'; + return { + $$typeof: REACT_MEMO_TYPE, + type: type, + compare: compare === undefined ? null : compare + }; +} + +function resolveDispatcher() { + var dispatcher = ReactCurrentOwner.currentDispatcher; + !(dispatcher !== null) ? invariant(false, 'Hooks can only be called inside the body of a function component.') : void 0; + return dispatcher; +} + +function useContext(Context, observedBits) { + var dispatcher = resolveDispatcher(); + { + // TODO: add a more generic warning for invalid values. + if (Context._context !== undefined) { + var realContext = Context._context; + // Don't deduplicate because this legitimately causes bugs + // and nobody should be using this in existing code. + if (realContext.Consumer === Context) { + warning$1(false, 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?'); + } else if (realContext.Provider === Context) { + warning$1(false, 'Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?'); + } + } } - return null; + return dispatcher.useContext(Context, observedBits); +} + +function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); +} + +function useReducer(reducer, initialState, initialAction) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialState, initialAction); +} + +function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); +} + +function useEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, inputs); +} + +function useLayoutEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, inputs); +} + +function useCallback(callback, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, inputs); +} + +function useMemo(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, inputs); +} + +function useImperativeMethods(ref, create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeMethods(ref, create, inputs); } /** @@ -28477,50 +28297,15 @@ function getComponentName(fiber) { * that support it. */ -var currentlyValidatingElement = void 0; var propTypesMisspellWarningShown = void 0; -var getDisplayName = function () {}; -var getStackAddendum = function () {}; - -var VALID_FRAGMENT_PROPS = void 0; - { - currentlyValidatingElement = null; - propTypesMisspellWarningShown = false; - - getDisplayName = function (element) { - if (element == null) { - return '#empty'; - } else if (typeof element === 'string' || typeof element === 'number') { - return '#text'; - } else if (typeof element.type === 'string') { - return element.type; - } else if (element.type === REACT_FRAGMENT_TYPE) { - return 'React.Fragment'; - } else { - return element.type.displayName || element.type.name || 'Unknown'; - } - }; - - getStackAddendum = function () { - var stack = ''; - if (currentlyValidatingElement) { - var name = getDisplayName(currentlyValidatingElement); - var owner = currentlyValidatingElement._owner; - stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner)); - } - stack += ReactDebugCurrentFrame.getStackAddendum() || ''; - return stack; - }; - - VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]); } function getDeclarationErrorAddendum() { if (ReactCurrentOwner.current) { - var name = getComponentName(ReactCurrentOwner.current); + var name = getComponentName(ReactCurrentOwner.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } @@ -28586,14 +28371,14 @@ function validateExplicitKey(element, parentType) { var childOwner = ''; if (element && element._owner && element._owner !== ReactCurrentOwner.current) { // Give the component that originally created this child. - childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.'; + childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.'; } - currentlyValidatingElement = element; + setCurrentlyValidatingElement(element); { - warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum()); + warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner); } - currentlyValidatingElement = null; + setCurrentlyValidatingElement(null); } /** @@ -28646,22 +28431,32 @@ function validateChildKeys(node, parentType) { * @param {ReactElement} element */ function validatePropTypes(element) { - var componentClass = element.type; - if (typeof componentClass !== 'function') { + var type = element.type; + if (type === null || type === undefined || typeof type === 'string') { + return; + } + var name = getComponentName(type); + var propTypes = void 0; + if (typeof type === 'function') { + propTypes = type.propTypes; + } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || + // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { return; } - var name = componentClass.displayName || componentClass.name; - var propTypes = componentClass.propTypes; if (propTypes) { - currentlyValidatingElement = element; - checkPropTypes(propTypes, element.props, 'prop', name, getStackAddendum); - currentlyValidatingElement = null; - } else if (componentClass.PropTypes !== undefined && !propTypesMisspellWarningShown) { + setCurrentlyValidatingElement(element); + checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); + setCurrentlyValidatingElement(null); + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { propTypesMisspellWarningShown = true; - warning(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); + warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); } - if (typeof componentClass.getDefaultProps === 'function') { - warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); + if (typeof type.getDefaultProps === 'function') { + !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; } } @@ -28670,22 +28465,22 @@ function validatePropTypes(element) { * @param {ReactElement} fragment */ function validateFragmentProps(fragment) { - currentlyValidatingElement = fragment; + setCurrentlyValidatingElement(fragment); var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; - if (!VALID_FRAGMENT_PROPS.has(key)) { - warning(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum()); + if (key !== 'children' && key !== 'key') { + warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); break; } } if (fragment.ref !== null) { - warning(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum()); + warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.'); } - currentlyValidatingElement = null; + setCurrentlyValidatingElement(null); } function createElementWithValidation(type, props, children) { @@ -28706,18 +28501,19 @@ function createElementWithValidation(type, props, children) { info += getDeclarationErrorAddendum(); } - info += getStackAddendum() || ''; - var typeString = void 0; if (type === null) { typeString = 'null'; } else if (Array.isArray(type)) { typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; } else { typeString = typeof type; } - warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); + warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); } var element = createElement.apply(this, arguments); @@ -28792,10 +28588,12 @@ var React = { createContext: createContext, forwardRef: forwardRef, + lazy: lazy, + memo: memo, Fragment: REACT_FRAGMENT_TYPE, StrictMode: REACT_STRICT_MODE_TYPE, - unstable_AsyncMode: REACT_ASYNC_MODE_TYPE, + Suspense: REACT_SUSPENSE_TYPE, createElement: createElementWithValidation, cloneElement: cloneElementWithValidation, @@ -28804,21 +28602,34 @@ var React = { version: ReactVersion, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { - ReactCurrentOwner: ReactCurrentOwner, - // Used by renderers to avoid bundling object-assign twice in UMD bundles: - assign: _assign - } + unstable_ConcurrentMode: REACT_CONCURRENT_MODE_TYPE, + unstable_Profiler: REACT_PROFILER_TYPE, + + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals }; -{ - _assign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, { - // These should not be included in production. - ReactDebugCurrentFrame: ReactDebugCurrentFrame, - // Shim for React DOM 16.0.0 which still destructured (but not used) this. - // TODO: remove in React 17.0. - ReactComponentTreeHook: {} - }); +// Note: some APIs are added with feature flags. +// Make sure that stable builds for open source +// don't modify the React object to avoid deopts. +// Also let's not expose their names in stable builds. + +if (enableStableConcurrentModeAPIs) { + React.ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + React.Profiler = REACT_PROFILER_TYPE; + React.unstable_ConcurrentMode = undefined; + React.unstable_Profiler = undefined; +} + +if (enableHooks) { + React.useCallback = useCallback; + React.useContext = useContext; + React.useEffect = useEffect; + React.useImperativeMethods = useImperativeMethods; + React.useLayoutEffect = useLayoutEffect; + React.useMemo = useMemo; + React.useReducer = useReducer; + React.useRef = useRef; + React.useState = useState; } @@ -28831,331 +28642,426 @@ var React$3 = ( React$2 && React ) || React$2; // TODO: decide on the top-level export form. // This is hacky but makes it work with both Rollup and Jest. -var react = React$3['default'] ? React$3['default'] : React$3; +var react = React$3.default || React$3; module.exports = react; })(); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6))) /***/ }), -/* 120 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** @license React v16.3.0 - * react-dom.production.min.js - * +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -/* - Modernizr 3.0.0pre (Custom Build) | MIT -*/ -var ba=__webpack_require__(0),m=__webpack_require__(87),A=__webpack_require__(29),C=__webpack_require__(33),ea=__webpack_require__(88),fa=__webpack_require__(89),ha=__webpack_require__(90),ja=__webpack_require__(51); -function D(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;dthis.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=N.extend({data:null}),ub=N.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&"CompositionEvent"in window,xb=null;m.canUseDOM&&"documentMode"in document&&(xb=document.documentMode); -var yb=m.canUseDOM&&"TextEvent"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8=xb),Ab=String.fromCharCode(32),Eb={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart", -captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Kb=!1; -function Lb(a,b){switch(a){case "topKeyUp":return-1!==vb.indexOf(b.keyCode);case "topKeyDown":return 229!==b.keyCode;case "topKeyPress":case "topMouseDown":case "topBlur":return!0;default:return!1}}function Mb(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Nb=!1;function Ob(a,b){switch(a){case "topCompositionEnd":return Mb(b);case "topKeyPress":if(32!==b.which)return null;Kb=!0;return Ab;case "topTextInput":return a=b.data,a===Ab&&Kb?null:a;default:return null}} -function Pb(a,b){if(Nb)return"topCompositionEnd"===a||!wb&&Lb(a,b)?(a=mb(),M._root=null,M._startText=null,M._fallbackText=null,Nb=!1,a):null;switch(a){case "topPaste":return null;case "topKeyPress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1} -function U(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var V={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){V[a]=new U(a,0,!1,a,null)}); -[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];V[b]=new U(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){V[a]=new U(a,2,!1,a.toLowerCase(),null)});["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(a){V[a]=new U(a,2,!1,a,null)}); -"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){V[a]=new U(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){V[a]=new U(a,3,!0,a.toLowerCase(),null)});["capture","download"].forEach(function(a){V[a]=new U(a,4,!1,a.toLowerCase(),null)}); -["cols","rows","size","span"].forEach(function(a){V[a]=new U(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){V[a]=new U(a,5,!1,a.toLowerCase(),null)});var Hc=/[\-\:]([a-z])/g;function Sc(a){return a[1].toUpperCase()} -"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Hc, -Sc);V[b]=new U(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Hc,Sc);V[b]=new U(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Hc,Sc);V[b]=new U(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});V.tabIndex=new U("tabIndex",1,!1,"tabindex",null); -function Tc(a,b,c,d){var e=V.hasOwnProperty(b)?V[b]:null;var f=null!==e?0===e.type:d?!1:!(2Sd.length&&Sd.push(a)}}} -var Zd=Object.freeze({get _enabled(){return Ud},setEnabled:Vd,isEnabled:function(){return Ud},trapBubbledEvent:W,trapCapturedEvent:Yd,dispatchEvent:Xd});function $d(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;c["ms"+a]="MS"+b;c["O"+a]="o"+b.toLowerCase();return c} -var ae={animationend:$d("Animation","AnimationEnd"),animationiteration:$d("Animation","AnimationIteration"),animationstart:$d("Animation","AnimationStart"),transitionend:$d("Transition","TransitionEnd")},be={},ce={};m.canUseDOM&&(ce=document.createElement("div").style,"AnimationEvent"in window||(delete ae.animationend.animation,delete ae.animationiteration.animation,delete ae.animationstart.animation),"TransitionEvent"in window||delete ae.transitionend.transition); -function de(a){if(be[a])return be[a];if(!ae[a])return a;var b=ae[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in ce)return be[a]=b[c];return a} -var ee={topAnimationEnd:de("animationend"),topAnimationIteration:de("animationiteration"),topAnimationStart:de("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave", -topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove", -topTouchStart:"touchstart",topTransitionEnd:de("transitionend"),topWheel:"wheel"},fe={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking", -topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ge={},he=0,ie="_reactListenersID"+(""+Math.random()).slice(2);function je(a){Object.prototype.hasOwnProperty.call(a,ie)||(a[ie]=he++,ge[a[ie]]={});return ge[a[ie]]}function ke(a){for(;a&&a.firstChild;)a=a.firstChild;return a} -function le(a,b){var c=ke(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ke(c)}}function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&"text"===a.type||"textarea"===b||"true"===a.contentEditable)} -var ne=m.canUseDOM&&"documentMode"in document&&11>=document.documentMode,oe={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},pe=null,qe=null,re=null,se=!1; -function ue(a,b){if(se||null==pe||pe!==ea())return null;var c=pe;"selectionStart"in c&&me(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return re&&fa(re,c)?null:(re=c,a=N.getPooled(oe.select,qe,a,b),a.type="select",a.target=pe,hb(a),a)} -var we={eventTypes:oe,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=je(e);f=ua.onSelect;for(var h=0;hb.expirationTime)a.expirationTime=b.expirationTime}var Le=void 0,Me=void 0; -function Ne(a){Le=Me=null;var b=a.alternate,c=a.updateQueue;null===c&&(c=a.updateQueue=Je(null));null!==b?(a=b.updateQueue,null===a&&(a=b.updateQueue=Je(null))):a=null;Le=c;Me=a!==c?a:null}function Oe(a,b){Ne(a);a=Le;var c=Me;null===c?Ke(a,b):null===a.last||null===c.last?(Ke(a,b),Ke(c,b)):(Ke(a,b),c.last=b)}function Pe(a,b,c,d){a=a.partialState;return"function"===typeof a?a.call(b,c,d):a} -function Qe(a,b,c,d,e,f){null!==a&&a.updateQueue===c&&(c=b.updateQueue={baseState:c.baseState,expirationTime:c.expirationTime,first:c.first,last:c.last,isInitialized:c.isInitialized,capturedValues:c.capturedValues,callbackList:null,hasForceUpdate:!1});c.expirationTime=0;c.isInitialized?a=c.baseState:(a=c.baseState=b.memoizedState,c.isInitialized=!0);for(var h=!0,g=c.first,k=!1;null!==g;){var v=g.expirationTime;if(v>f){var l=c.expirationTime;if(0===l||l>v)c.expirationTime=v;k||(k=!0,c.baseState=a)}else{k|| -(c.first=g.next,null===c.first&&(c.last=null));if(g.isReplace)a=Pe(g,d,a,e),h=!0;else if(v=Pe(g,d,a,e))a=h?A({},a,v):A(a,v),h=!1;g.isForced&&(c.hasForceUpdate=!0);null!==g.callback&&(v=c.callbackList,null===v&&(v=c.callbackList=[]),v.push(g));null!==g.capturedValue&&(v=c.capturedValues,null===v?c.capturedValues=[g.capturedValue]:v.push(g.capturedValue))}g=g.next}null!==c.callbackList?b.effectTag|=32:null!==c.first||c.hasForceUpdate||null!==c.capturedValues||(b.updateQueue=null);k||(c.baseState=a); -return a}function Re(a,b){var c=a.callbackList;if(null!==c)for(a.callbackList=null,a=0;at?(u=q,q=null):u=q.sibling;var n=y(e,q,l[t],h);if(null===n){null===q&&(q=u);break}a&&q&&null=== -n.alternate&&b(e,q);g=f(n,g,t);null===k?r=n:k.sibling=n;k=n;q=u}if(t===l.length)return c(e,q),r;if(null===q){for(;tt?(u=q,q=null):u=q.sibling;var H=y(e,q,n.value,h);if(null===H){q||(q=u);break}a&&q&&null===H.alternate&&b(e,q);g=f(H,g,t);null===k?r=H:k.sibling=H;k=H;q=u}if(n.done)return c(e,q),r;if(null===q){for(;!n.done;t++,n=l.next())n=p(e,n.value,h),null!==n&&(g=f(n,g,t),null===k?r=n:k.sibling=n,k=n);return r}for(q=d(e,q);!n.done;t++,n=l.next())if(n=B(q,e,t,n.value,h),null!==n){if(a&&null!==n.alternate)q["delete"](null===n.key?t:n.key); -g=f(n,g,t);null===k?r=n:k.sibling=n;k=n}a&&q.forEach(function(a){return b(e,a)});return r}return function(a,d,f,g){"object"===typeof f&&null!==f&&f.type===rc&&null===f.key&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case nc:a:{var k=f.key;for(l=d;null!==l;){if(l.key===k)if(10===l.tag?f.type===rc:l.type===f.type){c(a,l.sibling);d=e(l,f.type===rc?f.props.children:f.props,g);d.ref=Ue(a,l,f);d["return"]=a;a=d;break a}else{c(a,l);break}else b(a,l);l=l.sibling}f.type=== -rc?(d=Ae(f.props.children,a.mode,g,f.key),d["return"]=a,a=d):(g=ze(f,a.mode,g),g.ref=Ue(a,d,f),g["return"]=a,a=g)}return h(a);case qc:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],g);d["return"]=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Ce(f,a.mode,g);d["return"]=a;a=d}return h(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&& -6===d.tag?(c(a,d.sibling),d=e(d,f,g)):(c(a,d),d=Be(f,a.mode,g)),d["return"]=a,a=d,h(a);if(Te(f))return r(a,d,f,g);if(yc(f))return Q(a,d,f,g);l&&Ve(a,f);if("undefined"===typeof f)switch(a.tag){case 2:case 1:g=a.type,D("152",g.displayName||g.name||"Component")}return c(a,d)}}var Xe=We(!0),Ye=We(!1); -function Ze(a,b,c,d,e,f,h){function g(a,b,c){k(a,b,c,b.expirationTime)}function k(a,b,c,d){b.child=null===a?Ye(b,null,c,d):Xe(b,a.child,c,d)}function v(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function l(a,b,c,d,e,f){v(a,b);if(!c&&!e)return d&&z(b,!1),r(a,b);c=b.stateNode;mc.current=b;var g=e?null:c.render();b.effectTag|=1;e&&(k(a,b,null,f),b.child=null);k(a,b,g,f);b.memoizedState=c.state;b.memoizedProps=c.props;d&&z(b,!0);return b.child}function p(a){var b=a.stateNode; -b.pendingContext?u(a,b.pendingContext,b.pendingContext!==b.context):b.context&&u(a,b.context,!1);Y(a,b.containerInfo)}function y(a,b,c,d){var e=a.child;for(null!==e&&(e["return"]=a);null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime= -d;else break;f=f["return"]}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=e.child}if(null!==f)f["return"]=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){f=e;break}f=f["return"]}e=f}}function B(a,b,c){var d=b.type.context,e=b.pendingProps,f=b.memoizedProps;if(!q()&&f===e)return b.stateNode=0,G(b),r(a,b);var l=e.value;b.memoizedProps=e;if(null===f)l=1073741823;else if(f.value===e.value){if(f.children===e.children)return b.stateNode=0,G(b), -r(a,b);l=0}else{var t=f.value;if(t===l&&(0!==t||1/t===1/l)||t!==t&&l!==l){if(f.children===e.children)return b.stateNode=0,G(b),r(a,b);l=0}else if(l="function"===typeof d._calculateChangedBits?d._calculateChangedBits(t,l):1073741823,l|=0,0===l){if(f.children===e.children)return b.stateNode=0,G(b),r(a,b)}else y(b,d,l,c)}b.stateNode=l;G(b);g(a,b,e.children);return b.child}function r(a,b){null!==a&&b.child!==a.child?D("153"):void 0;if(null!==b.child){a=b.child;var c=ye(a,a.pendingProps,a.expirationTime); -b.child=c;for(c["return"]=b;null!==a.sibling;)a=a.sibling,c=c.sibling=ye(a,a.pendingProps,a.expirationTime),c["return"]=b;c.sibling=null}return b.child}var Q=a.shouldSetTextContent,n=a.shouldDeprioritizeSubtree,x=b.pushHostContext,Y=b.pushHostContainer,G=d.pushProvider,R=c.getMaskedContext,S=c.getUnmaskedContext,q=c.hasContextChanged,t=c.pushContextProvider,u=c.pushTopLevelContextObject,z=c.invalidateContextProvider,H=e.enterHydrationState,Wa=e.resetHydrationState,Bb=e.tryToClaimNextHydratableInstance; -a=Se(c,f,h,function(a,b){a.memoizedProps=b},function(a,b){a.memoizedState=b});var Jc=a.adoptClassInstance,Kc=a.callGetDerivedStateFromProps,Lc=a.constructClassInstance,Cb=a.mountClassInstance,Mc=a.resumeMountClassInstance,Db=a.updateClassInstance;return{beginWork:function(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:p(b);break;case 2:t(b);break;case 4:Y(b,b.stateNode.containerInfo);break;case 13:G(b)}return null}switch(b.tag){case 0:null!==a?D("155"):void 0;var d=b.type, -e=b.pendingProps,f=S(b);f=R(b,f);d=d(e,f);b.effectTag|=1;"object"===typeof d&&null!==d&&"function"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,"function"===typeof f.getDerivedStateFromProps&&(e=Kc(b,d,e,b.memoizedState),null!==e&&void 0!==e&&(b.memoizedState=A({},b.memoizedState,e))),e=t(b),Jc(b,d),Cb(b,c),a=l(a,b,!0,e,!1,c)):(b.tag=1,g(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,q()|| -b.memoizedProps!==c?(d=S(b),d=R(b,d),e=e(c,d),b.effectTag|=1,g(a,b,e),b.memoizedProps=c,a=b.child):a=r(a,b),a;case 2:e=t(b);null===a?null===b.stateNode?(Lc(b,b.pendingProps),Cb(b,c),d=!0):d=Mc(b,c):d=Db(a,b,c);f=!1;var h=b.updateQueue;null!==h&&null!==h.capturedValues&&(f=d=!0);return l(a,b,d,e,f,c);case 3:a:if(p(b),d=b.updateQueue,null!==d){f=b.memoizedState;e=Qe(a,b,d,null,null,c);b.memoizedState=e;d=b.updateQueue;if(null!==d&&null!==d.capturedValues)d=null;else if(f===e){Wa();a=r(a,b);break a}else d= -e.element;f=b.stateNode;(null===a||null===a.child)&&f.hydrate&&H(b)?(b.effectTag|=2,b.child=Ye(b,null,d,c)):(Wa(),g(a,b,d));b.memoizedState=e;a=b.child}else Wa(),a=r(a,b);return a;case 5:a:{x(b);null===a&&Bb(b);e=b.type;h=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!q()&&h===d){if(h=b.mode&1&&n(e,d))b.expirationTime=1073741823;if(!h||1073741823!==c){a=r(a,b);break a}}h=d.children;Q(e,d)?h=null:f&&Q(e,f)&&(b.effectTag|=16);v(a,b);1073741823!==c&&b.mode&1&&n(e,d)?(b.expirationTime= -1073741823,b.memoizedProps=d,a=null):(g(a,b,h),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Bb(b),b.memoizedProps=b.pendingProps,null;case 8:b.tag=7;case 7:return e=b.pendingProps,q()||b.memoizedProps!==e||(e=b.memoizedProps),d=e.children,b.stateNode=null===a?Ye(b,b.stateNode,d,c):Xe(b,a.stateNode,d,c),b.memoizedProps=e,b.stateNode;case 9:return null;case 4:return Y(b,b.stateNode.containerInfo),e=b.pendingProps,q()||b.memoizedProps!==e?(null===a?b.child=Xe(b,null,e,c):g(a,b,e),b.memoizedProps= -e,a=b.child):a=r(a,b),a;case 14:return c=b.type.render,c=c(b.pendingProps,b.ref),g(a,b,c),b.memoizedProps=c,b.child;case 10:return c=b.pendingProps,q()||b.memoizedProps!==c?(g(a,b,c),b.memoizedProps=c,a=b.child):a=r(a,b),a;case 11:return c=b.pendingProps.children,q()||null!==c&&b.memoizedProps!==c?(g(a,b,c),b.memoizedProps=c,a=b.child):a=r(a,b),a;case 13:return B(a,b,c);case 12:d=b.type;f=b.pendingProps;var u=b.memoizedProps;e=d._currentValue;h=d._changedBits;if(q()||0!==h||u!==f){b.memoizedProps= -f;u=f.unstable_observedBits;if(void 0===u||null===u)u=1073741823;b.stateNode=u;0!==(h&u)&&y(b,d,h,c);c=f.children;c=c(e);g(a,b,c);a=b.child}else a=r(a,b);return a;default:D("156")}}}} -function $e(a,b,c,d,e){function f(a){a.effectTag|=4}var h=a.createInstance,g=a.createTextInstance,k=a.appendInitialChild,v=a.finalizeInitialChildren,l=a.prepareUpdate,p=a.persistence,y=b.getRootHostContainer,B=b.popHostContext,r=b.getHostContext,Q=b.popHostContainer,n=c.popContextProvider,x=c.popTopLevelContextObject,Y=d.popProvider,G=e.prepareToHydrateHostInstance,R=e.prepareToHydrateHostTextInstance,S=e.popHydrationState,q=void 0,t=void 0,u=void 0;a.mutation?(q=function(){},t=function(a,b,c){(b.updateQueue= -c)&&f(b)},u=function(a,b,c,d){c!==d&&f(b)}):p?D("235"):D("236");return{completeWork:function(a,b,c){var d=b.pendingProps;switch(b.tag){case 1:return null;case 2:return n(b),a=b.stateNode,d=b.updateQueue,null!==d&&null!==d.capturedValues&&(b.effectTag&=-65,"function"===typeof a.componentDidCatch?b.effectTag|=256:d.capturedValues=null),null;case 3:Q(b);x(b);d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)S(b),b.effectTag&=-3;q(b);a=b.updateQueue; -null!==a&&null!==a.capturedValues&&(b.effectTag|=256);return null;case 5:B(b);c=y();var e=b.type;if(null!==a&&null!=b.stateNode){var p=a.memoizedProps,H=b.stateNode,z=r();H=l(H,e,p,d,c,z);t(a,b,H,e,p,d,c,z);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!d)return null===b.stateNode?D("166"):void 0,null;a=r();if(S(b))G(b,c,a)&&f(b);else{p=h(e,d,c,a,b);a:for(z=b.child;null!==z;){if(5===z.tag||6===z.tag)k(p,z.stateNode);else if(4!==z.tag&&null!==z.child){z.child["return"]=z;z=z.child;continue}if(z===b)break; -for(;null===z.sibling;){if(null===z["return"]||z["return"]===b)break a;z=z["return"]}z.sibling["return"]=z["return"];z=z.sibling}v(p,e,d,c,a)&&f(b);b.stateNode=p}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)u(a,b,a.memoizedProps,d);else{if("string"!==typeof d)return null===b.stateNode?D("166"):void 0,null;a=y();c=r();S(b)?R(b)&&f(b):b.stateNode=g(d,a,c,b)}return null;case 7:(d=b.memoizedProps)?void 0:D("165");b.tag=8;e=[];a:for((p=b.stateNode)&&(p["return"]=b);null!== -p;){if(5===p.tag||6===p.tag||4===p.tag)D("247");else if(9===p.tag)e.push(p.pendingProps.value);else if(null!==p.child){p.child["return"]=p;p=p.child;continue}for(;null===p.sibling;){if(null===p["return"]||p["return"]===b)break a;p=p["return"]}p.sibling["return"]=p["return"];p=p.sibling}p=d.handler;d=p(d.props,e);b.child=Xe(b,null!==a?a.child:null,d,c);return b.child;case 8:return b.tag=7,null;case 9:return null;case 14:return null;case 10:return null;case 11:return null;case 4:return Q(b),q(b),null; -case 13:return Y(b),null;case 12:return null;case 0:D("167");default:D("156")}}}} -function af(a,b,c,d,e){var f=a.popHostContainer,h=a.popHostContext,g=b.popContextProvider,k=b.popTopLevelContextObject,v=c.popProvider;return{throwException:function(a,b,c){b.effectTag|=512;b.firstEffect=b.lastEffect=null;b={value:c,source:b,stack:Ac(b)};do{switch(a.tag){case 3:Ne(a);a.updateQueue.capturedValues=[b];a.effectTag|=1024;return;case 2:if(c=a.stateNode,0===(a.effectTag&64)&&null!==c&&"function"===typeof c.componentDidCatch&&!e(c)){Ne(a);c=a.updateQueue;var d=c.capturedValues;null===d? -c.capturedValues=[b]:d.push(b);a.effectTag|=1024;return}}a=a["return"]}while(null!==a)},unwindWork:function(a){switch(a.tag){case 2:g(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return f(a),k(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return h(a),null;case 4:return f(a),null;case 13:return v(a),null;default:return null}},unwindInterruptedWork:function(a){switch(a.tag){case 2:g(a);break;case 3:f(a);k(a);break;case 5:h(a);break;case 4:f(a);break;case 13:v(a)}}}} -function bf(a,b){var c=b.source;null===b.stack&&Ac(c);null!==c&&zc(c);b=b.value;null!==a&&2===a.tag&&zc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}} -function cf(a,b,c,d,e){function f(a){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(u){b(a,u)}else c.current=null}function h(a){"function"===typeof Ie&&Ie(a);switch(a.tag){case 2:f(a);var c=a.stateNode;if("function"===typeof c.componentWillUnmount)try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(u){b(a,u)}break;case 5:f(a);break;case 7:g(a.stateNode);break;case 4:p&&v(a)}}function g(a){for(var b=a;;)if(h(b),null===b.child||p&&4===b.tag){if(b=== -a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}else b.child["return"]=b,b=b.child}function k(a){return 5===a.tag||3===a.tag||4===a.tag}function v(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b["return"];a:for(;;){null===c?D("160"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c["return"]}c=!0}if(5=== -b.tag||6===b.tag)g(b),e?S(d,b.stateNode):R(d,b.stateNode);else if(4===b.tag?d=b.stateNode.containerInfo:h(b),null!==b.child){b.child["return"]=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"];4===b.tag&&(c=!1)}b.sibling["return"]=b["return"];b=b.sibling}}var l=a.getPublicInstance,p=a.mutation;a=a.persistence;p||(a?D("235"):D("236"));var y=p.commitMount,B=p.commitUpdate,r=p.resetTextContent,Q=p.commitTextUpdate,n=p.appendChild, -x=p.appendChildToContainer,Y=p.insertBefore,G=p.insertInContainerBefore,R=p.removeChild,S=p.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(a,b){switch(b.tag){case 2:if(b.effectTag&2048&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;a.props=b.memoizedProps;a.state=b.memoizedState;b=a.getSnapshotBeforeUpdate(c,d);a.__reactInternalSnapshotBeforeUpdate=b}break;case 3:case 5:case 6:case 4:break;default:D("163")}},commitResetTextContent:function(a){r(a.stateNode)}, -commitPlacement:function(a){a:{for(var b=a["return"];null!==b;){if(k(b)){var c=b;break a}b=b["return"]}D("160");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:D("161")}c.effectTag&16&&(r(b),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c["return"]||k(c["return"])){c=null;break a}c=c["return"]}c.sibling["return"]=c["return"];for(c=c.sibling;5!==c.tag&&6!== -c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child["return"]=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)c?d?G(b,e.stateNode,c):Y(b,e.stateNode,c):d?x(b,e.stateNode):n(b,e.stateNode);else if(4!==e.tag&&null!==e.child){e.child["return"]=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e["return"]||e["return"]===a)return;e=e["return"]}e.sibling["return"]=e["return"];e=e.sibling}},commitDeletion:function(a){v(a); -a["return"]=null;a.child=null;a.alternate&&(a.alternate.child=null,a.alternate["return"]=null)},commitWork:function(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&B(c,f,e,a,d,b)}break;case 6:null===b.stateNode?D("162"):void 0;c=b.memoizedProps;Q(b.stateNode,null!==a?a.memoizedProps:c,c);break;case 3:break;default:D("163")}},commitLifeCycles:function(a,b,c){switch(c.tag){case 2:a= -c.stateNode;if(c.effectTag&4)if(null===b)a.props=c.memoizedProps,a.state=c.memoizedState,a.componentDidMount();else{var d=b.memoizedProps;b=b.memoizedState;a.props=c.memoizedProps;a.state=c.memoizedState;a.componentDidUpdate(d,b,a.__reactInternalSnapshotBeforeUpdate)}c=c.updateQueue;null!==c&&Re(c,a);break;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=l(c.child.stateNode);break;case 2:a=c.child.stateNode}Re(b,a)}break;case 5:a=c.stateNode;null===b&&c.effectTag& -4&&y(a,c.type,c.memoizedProps,c);break;case 6:break;case 4:break;default:D("163")}},commitErrorLogging:function(a,b){switch(a.tag){case 2:var c=a.type;b=a.stateNode;var d=a.updateQueue;null===d||null===d.capturedValues?D("264"):void 0;var f=d.capturedValues;d.capturedValues=null;"function"!==typeof c.getDerivedStateFromCatch&&e(b);b.props=a.memoizedProps;b.state=a.memoizedState;for(c=0;cb||(c.current=a[b],a[b]=null,b--)},push:function(c,d){b++;a[b]=c.current;c.current=d},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}} -function kf(a){function b(){if(null!==I)for(var a=I["return"];null!==a;)Lc(a),a=a["return"];Xa=null;Z=0;I=null;Nc=!1}function c(a){return null!==ya&&ya.has(a)}function d(a){for(;;){var b=a.alternate,c=a["return"],d=a.sibling;if(0===(a.effectTag&512)){b=Bb(b,a,Z);var e=a;if(1073741823===Z||1073741823!==e.expirationTime){b:switch(e.tag){case 3:case 2:var f=e.updateQueue;f=null===f?0:f.expirationTime;break b;default:f=0}for(var g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f= -g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1da)&&(da=a);return a}function v(a,c){a:{for(;null!==a;){if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>c)&&(a.alternate.expirationTime=c);if(null===a["return"])if(3===a.tag){var d= -a.stateNode;!ca&&0!==Z&&cwg&&D("185")}else{c=void 0;break a}a=a["return"]}c=void 0}return c}function l(){ve=Ic()-Pc;return xg=(ve/10|0)+2}function p(a,b,c,d,e){var f=ia;ia=1;try{return a(b,c,d,e)}finally{ia=f}}function y(a){if(0!==Gb){if(a>Gb)return;yg(Qc)}var b=Ic()-Pc;Gb=a;Qc=lg(Q,{timeout:10*(a-2)-b})}function B(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===K?(la=K=a,a.nextScheduledRoot=a):(K=K.nextScheduledRoot=a,K.nextScheduledRoot=la); -else{var c=a.remainingExpirationTime;if(0===c||b=P)&&(!Ib||l()>=P);)G(aa,P,!Ib),r();else for(;null!==aa&&0!==P&&(0===a||a>=P);)G(aa,P,!1),r();null!==Za&&(Gb=0,Qc=-1);0!==P&&y(P);Za=null;Ib=!1;Y()}function Y(){Fb=0;if(null!==Aa){var a=Aa;Aa=null;for(var b= -0;bBg?!1:Ib=!0}function q(a){null===aa?D("246"):void 0;aa.remainingExpirationTime=0;Ba||(Ba=!0,Jb=a)}var t=jf(),u=ef(a,t),z=gf(t);t=hf(t);var H=ff(a), -Wa=Ze(a,u,z,t,H,v,k).beginWork,Bb=$e(a,u,z,t,H).completeWork;u=af(u,z,t,v,c);var Jc=u.throwException,Kc=u.unwindWork,Lc=u.unwindInterruptedWork;u=cf(a,g,v,k,function(a){null===ya?ya=new Set([a]):ya.add(a)},l);var Cb=u.commitBeforeMutationLifeCycles,Mc=u.commitResetTextContent,Db=u.commitPlacement,gg=u.commitDeletion,te=u.commitWork,hg=u.commitLifeCycles,ig=u.commitErrorLogging,jg=u.commitAttachRef,kg=u.commitDetachRef,Ic=a.now,lg=a.scheduleDeferredCallback,yg=a.cancelDeferredCallback,zg=a.prepareForCommit, -Ag=a.resetAfterCommit,Pc=Ic(),xg=2,ve=Pc,Rc=0,ia=0,ca=!1,I=null,Xa=null,Z=0,w=null,Ya=!1,Nc=!1,ya=null,la=null,K=null,Gb=0,Qc=-1,T=!1,aa=null,P=0,da=0,Ib=!1,Ba=!1,Jb=null,Za=null,J=!1,Hb=!1,za=!1,Aa=null,wg=1E3,Fb=0,Bg=1;return{recalculateCurrentTime:l,computeExpirationForFiber:k,scheduleWork:v,requestWork:B,flushRoot:function(a,b){T?D("253"):void 0;aa=a;P=b;G(a,b,!1);n();Y()},batchedUpdates:function(a,b){var c=J;J=!0;try{return a(b)}finally{(J=c)||T||n()}},unbatchedUpdates:function(a,b){if(J&&!Hb){Hb= -!0;try{return a(b)}finally{Hb=!1}}return a(b)},flushSync:function(a,b){T?D("187"):void 0;var c=J;J=!0;try{return p(a,b)}finally{J=c,n()}},flushControlled:function(a){var b=J;J=!0;try{p(a)}finally{(J=b)||T||x(1,!1,null)}},deferredUpdates:function(a){var b=ia;ia=25*(((l()+500)/25|0)+1);try{return a()}finally{ia=b}},syncUpdates:p,interactiveUpdates:function(a,b,c){if(za)return a(b,c);J||T||0===da||(x(da,!1,null),da=0);var d=za,e=J;J=za=!0;try{return a(b,c)}finally{za=d,(J=e)||T||n()}},flushInteractiveUpdates:function(){T|| -0===da||(x(da,!1,null),da=0)},computeUniqueAsyncExpiration:function(){var a=25*(((l()+500)/25|0)+1);a<=Rc&&(a=Rc+1);return Rc=a},legacyContext:z}} -function lf(a){function b(a,b,c,d,e,f){d=b.current;if(c){c=c._reactInternalFiber;var g=k(c);c=v(c)?l(c,g):g}else c=ja;null===b.context?b.context=c:b.pendingContext=c;b=f;Oe(d,{expirationTime:e,partialState:{element:a},callback:void 0===b?null:b,isReplace:!1,isForced:!1,capturedValue:null,next:null});h(d,e);return e}function c(a){a=Ad(a);return null===a?null:a.stateNode}var d=a.getPublicInstance;a=kf(a);var e=a.recalculateCurrentTime,f=a.computeExpirationForFiber,h=a.scheduleWork,g=a.legacyContext, -k=g.findCurrentUnmaskedContext,v=g.isContextProvider,l=g.processChildContext;return{createContainer:function(a,b,c){b=new xe(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a},updateContainer:function(a,c,d,g){var h=c.current,k=e();h=f(h);return b(a,c,d,k,h,g)},updateContainerAtExpirationTime:function(a, -c,d,f,g){var h=e();return b(a,c,d,h,f,g)},flushRoot:a.flushRoot,requestWork:a.requestWork,computeUniqueAsyncExpiration:a.computeUniqueAsyncExpiration,batchedUpdates:a.batchedUpdates,unbatchedUpdates:a.unbatchedUpdates,deferredUpdates:a.deferredUpdates,syncUpdates:a.syncUpdates,interactiveUpdates:a.interactiveUpdates,flushInteractiveUpdates:a.flushInteractiveUpdates,flushControlled:a.flushControlled,flushSync:a.flushSync,getPublicRootInstance:function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return d(a.child.stateNode); -default:return a.child.stateNode}},findHostInstance:c,findHostInstanceWithNoPortals:function(a){a=Bd(a);return null===a?null:a.stateNode},injectIntoDevTools:function(a){var b=a.findFiberByHostInstance;return Ge(A({},a,{findHostInstanceByFiber:function(a){return c(a)},findFiberByHostInstance:function(a){return b?b(a):null}}))}}}var mf=Object.freeze({default:lf}),nf=mf&&lf||mf,of=nf["default"]?nf["default"]:nf; -function pf(a,b,c){var d=3=yf-a)if(-1!== -wf&&wf<=a)Bf.didTimeout=!0;else{xf||(xf=!0,requestAnimationFrame(Df));return}else Bf.didTimeout=!1;wf=-1;a=uf;uf=null;null!==a&&a(Bf)}},!1);var Df=function(a){xf=!1;var b=a-yf+Af;bb&&(b=8),Af=b=b.length?void 0:D("93"),b=b[0]),c=""+b),null==c&&(c=""));a._wrapperState={initialValue:""+c}} -function Kf(a,b){var c=b.value;null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Lf(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Mf={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}; -function Nf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Of(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Nf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} -var Pf=void 0,Qf=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mf.svg||"innerHTML"in a)a.innerHTML=b;else{Pf=Pf||document.createElement("div");Pf.innerHTML="\x3csvg\x3e"+b+"\x3c/svg\x3e";for(b=Pf.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); -function Rf(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} -var Sf={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0, -stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Tf=["Webkit","ms","Moz","O"];Object.keys(Sf).forEach(function(a){Tf.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Sf[b]=Sf[a]})}); -function Uf(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--");var e=c;var f=b[c];e=null==f||"boolean"===typeof f||""===f?"":d||"number"!==typeof f||0===f||Sf.hasOwnProperty(e)&&Sf[e]?(""+f).trim():f+"px";"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Vf=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); -function Wf(a,b,c){b&&(Vf[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?D("137",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?D("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:D("61")),null!=b.style&&"object"!==typeof b.style?D("62",c()):void 0)} -function Xf(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var Yf=Mf.html,Zf=C.thatReturns(""); -function $f(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=je(a);b=ua[b];for(var d=0;d -d&&(e=d,d=a,a=e);e=le(c,a);var f=le(c,d);if(e&&f&&(1!==b.rangeCount||b.anchorNode!==e.node||b.anchorOffset!==e.offset||b.focusNode!==f.node||b.focusOffset!==f.offset)){var h=document.createRange();h.setStart(e.node,e.offset);b.removeAllRanges();a>d?(b.addRange(h),b.extend(f.node,f.offset)):(h.setEnd(f.node,f.offset),b.addRange(h))}}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});c.focus();for(c=0;cthis.eventPool.length&&this.eventPool.push(a)} +function jb(a){a.eventPool=[];a.getPooled=kb;a.release=lb}var mb=z.extend({data:null}),nb=z.extend({data:null}),ob=[9,13,27,32],pb=Sa&&"CompositionEvent"in window,qb=null;Sa&&"documentMode"in document&&(qb=document.documentMode); +var rb=Sa&&"TextEvent"in window&&!qb,sb=Sa&&(!pb||qb&&8=qb),tb=String.fromCharCode(32),ub={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart", +captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},vb=!1; +function wb(a,b){switch(a){case "keyup":return-1!==ob.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function xb(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var yb=!1;function zb(a,b){switch(a){case "compositionend":return xb(b);case "keypress":if(32!==b.which)return null;vb=!0;return tb;case "textInput":return a=b.data,a===tb&&vb?null:a;default:return null}} +function Ab(a,b){if(yb)return"compositionend"===a||!pb&&wb(a,b)?(a=gb(),fb=eb=cb=null,yb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1b}return!1}function E(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var F={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){F[a]=new E(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];F[b]=new E(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){F[a]=new E(a,2,!1,a.toLowerCase(),null)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){F[a]=new E(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){F[a]=new E(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){F[a]=new E(a,3,!0,a,null)}); +["capture","download"].forEach(function(a){F[a]=new E(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){F[a]=new E(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){F[a]=new E(a,5,!1,a.toLowerCase(),null)});var vc=/[\-:]([a-z])/g;function wc(a){return a[1].toUpperCase()} +"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(vc, +wc);F[b]=new E(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(vc,wc);F[b]=new E(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(vc,wc);F[b]=new E(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});F.tabIndex=new E("tabIndex",1,!1,"tabindex",null); +function xc(a,b,c,d){var e=F.hasOwnProperty(b)?F[b]:null;var f=null!==e?0===e.type:d?!1:!(2Fd.length&&Fd.push(a)}}}var Ld={},Md=0,Nd="_reactListenersID"+(""+Math.random()).slice(2); +function Od(a){Object.prototype.hasOwnProperty.call(a,Nd)||(a[Nd]=Md++,Ld[a[Nd]]={});return Ld[a[Nd]]}function Pd(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Qd(a){for(;a&&a.firstChild;)a=a.firstChild;return a} +function Rd(a,b){var c=Qd(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Qd(c)}}function Sd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Sd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} +function Td(){for(var a=window,b=Pd();b instanceof a.HTMLIFrameElement;){try{a=b.contentDocument.defaultView}catch(c){break}b=Pd(a.document)}return b}function Ud(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} +var Vd=Sa&&"documentMode"in document&&11>=document.documentMode,Wd={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Xd=null,Yd=null,Zd=null,$d=!1; +function ae(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if($d||null==Xd||Xd!==Pd(c))return null;c=Xd;"selectionStart"in c&&Ud(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return Zd&&jd(Zd,c)?null:(Zd=c,a=z.getPooled(Wd.select,Yd,a,b),a.type="select",a.target=Xd,Ra(a),a)} +var be={eventTypes:Wd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Od(e);f=ta.onSelect;for(var g=0;g=b.length?void 0:t("93"),b=b[0]),c=b),null==c&&(c=""));a._wrapperState={initialValue:yc(c)}} +function ie(a,b){var c=yc(b.value),d=yc(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function je(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var ke={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}; +function le(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?le(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} +var ne=void 0,oe=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==ke.svg||"innerHTML"in a)a.innerHTML=b;else{ne=ne||document.createElement("div");ne.innerHTML=""+b+"";for(b=ne.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); +function pe(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} +var qe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0, +floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},re=["Webkit","ms","Moz","O"];Object.keys(qe).forEach(function(a){re.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qe[b]=qe[a]})});function se(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||qe.hasOwnProperty(a)&&qe[a]?(""+b).trim():b+"px"} +function te(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=se(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var ue=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); +function ve(a,b){b&&(ue[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?t("137",a,""):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?t("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:t("61")),null!=b.style&&"object"!==typeof b.style?t("62",""):void 0)} +function we(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}} +function xe(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Od(a);b=ta[b];for(var d=0;dJe||(a.current=Ie[Je],Ie[Je]=null,Je--)}function J(a,b){Je++;Ie[Je]=a.current;a.current=b}var Ke={},K={current:Ke},L={current:!1},Le=Ke; +function Me(a,b){var c=a.type.contextTypes;if(!c)return Ke;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function M(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Ne(a){I(L,a);I(K,a)}function Oe(a){I(L,a);I(K,a)} +function Pe(a,b,c){K.current!==Ke?t("168"):void 0;J(K,b,a);J(L,c,a)}function Qe(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)e in a?void 0:t("108",mc(b)||"Unknown",e);return n({},c,d)}function Re(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||Ke;Le=K.current;J(K,b,a);J(L,L.current,a);return!0} +function Se(a,b,c){var d=a.stateNode;d?void 0:t("169");c?(b=Qe(a,b,Le),d.__reactInternalMemoizedMergedChildContext=b,I(L,a),I(K,a),J(K,b,a)):I(L,a);J(L,c,a)}var Te=null,Ue=null;function Ve(a){return function(b){try{return a(b)}catch(c){}}} +function We(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Te=Ve(function(a){return b.onCommitFiberRoot(c,a)});Ue=Ve(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0} +function Xe(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.firstContextDependency=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function N(a,b,c,d){return new Xe(a,b,c,d)} +function Ye(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Ze(a){if("function"===typeof a)return Ye(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===gc)return 11;if(a===ic)return 14}return 2} +function $e(a,b){var c=a.alternate;null===c?(c=N(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;c.firstContextDependency=a.firstContextDependency;c.sibling=a.sibling; +c.index=a.index;c.ref=a.ref;return c} +function af(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Ye(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ac:return bf(c.children,e,f,b);case fc:return cf(c,e|3,f,b);case bc:return cf(c,e|2,f,b);case cc:return a=N(12,c,b,e|4),a.elementType=cc,a.type=cc,a.expirationTime=f,a;case hc:return a=N(13,c,b,e),a.elementType=hc,a.type=hc,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case dc:g=10;break a;case ec:g=9;break a;case gc:g=11;break a;case ic:g= +14;break a;case jc:g=16;d=null;break a}t("130",null==a?a:typeof a,"")}b=N(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function bf(a,b,c,d){a=N(7,a,d,b);a.expirationTime=c;return a}function cf(a,b,c,d){a=N(8,a,d,b);b=0===(b&1)?bc:fc;a.elementType=b;a.type=b;a.expirationTime=c;return a}function df(a,b,c){a=N(6,a,null,b);a.expirationTime=c;return a} +function ef(a,b,c){b=N(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function ff(a,b){a.didError=!1;var c=a.earliestPendingTime;0===c?a.earliestPendingTime=a.latestPendingTime=b:cb&&(a.latestPendingTime=b);gf(b,a)} +function hf(a,b){a.didError=!1;a.latestPingedTime>=b&&(a.latestPingedTime=0);var c=a.earliestPendingTime,d=a.latestPendingTime;c===b?a.earliestPendingTime=d===b?a.latestPendingTime=0:d:d===b&&(a.latestPendingTime=c);c=a.earliestSuspendedTime;d=a.latestSuspendedTime;0===c?a.earliestSuspendedTime=a.latestSuspendedTime=b:cb&&(a.latestSuspendedTime=b);gf(b,a)}function jf(a,b){var c=a.earliestPendingTime;a=a.earliestSuspendedTime;c>b&&(b=c);a>b&&(b=a);return b} +function gf(a,b){var c=b.earliestSuspendedTime,d=b.latestSuspendedTime,e=b.earliestPendingTime,f=b.latestPingedTime;e=0!==e?e:f;0===e&&(0===a||da&&(a=c);b.nextExpirationTimeToWorkOn=e;b.expirationTime=a}var kf=!1;function lf(a){return{baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}} +function mf(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function nf(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function of(a,b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)} +function pf(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=lf(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=lf(a.memoizedState),e=c.updateQueue=lf(c.memoizedState)):d=a.updateQueue=mf(e):null===e&&(e=c.updateQueue=mf(d));null===e||d===e?of(d,b):null===d.lastUpdate||null===e.lastUpdate?(of(d,b),of(e,b)):(of(d,b),e.lastUpdate=b)} +function qf(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=lf(a.memoizedState):rf(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function rf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=mf(b));return b} +function sf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-2049|64;case 0:a=c.payload;e="function"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return n({},d,e);case 2:kf=!0}return d} +function tf(a,b,c,d,e){kf=!1;b=rf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,l=f;null!==k;){var m=k.expirationTime;mu?(p=m,m=null):p=m.sibling;var v=w(e,m,h[u],k);if(null===v){null===m&&(m=p);break}a&& +m&&null===v.alternate&&b(e,m);g=f(v,g,u);null===q?l=v:q.sibling=v;q=v;m=p}if(u===h.length)return c(e,m),l;if(null===m){for(;uu?(p=q,q=null):p=q.sibling;var A=w(e,q,v.value,k);if(null===A){q||(q=p);break}a&&q&&null===A.alternate&&b(e,q);g=f(A,g,u);null===m?l=A:m.sibling=A;m=A;q=p}if(v.done)return c(e,q),l;if(null===q){for(;!v.done;u++,v=h.next())v=r(e,v.value,k),null!==v&&(g=f(v,g,u),null===m?l=v:m.sibling=v,m=v);return l}for(q=d(e,q);!v.done;u++,v=h.next())v=y(q,e,u,v.value,k),null!==v&&(a&&null!==v.alternate&&q.delete(null===v.key?u: +v.key),g=f(v,g,u),null===m?l=v:m.sibling=v,m=v);a&&q.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ac&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Zb:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===ac:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===ac?f.props.children:f.props,h);d.ref=bg(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k= +k.sibling}f.type===ac?(d=bf(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=af(f.type,f.key,f.props,null,a.mode,h),h.ref=bg(a,d,f),h.return=a,a=h)}return g(a);case $b:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=ef(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f= +""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=df(f,a.mode,h),d.return=a,a=d),g(a);if(ag(f))return B(a,d,f,h);if(lc(f))return R(a,d,f,h);l&&cg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:h=a.type,t("152",h.displayName||h.name||"Component")}return c(a,d)}}var eg=dg(!0),fg=dg(!1),gg=null,hg=null,ig=!1; +function jg(a,b){var c=N(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function kg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}} +function lg(a){if(ig){var b=hg;if(b){var c=b;if(!kg(a,b)){b=Ge(c);if(!b||!kg(a,b)){a.effectTag|=2;ig=!1;gg=a;return}jg(gg,c)}gg=a;hg=He(b)}else a.effectTag|=2,ig=!1,gg=a}}function mg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;gg=a}function ng(a){if(a!==gg)return!1;if(!ig)return mg(a),ig=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Ce(b,a.memoizedProps))for(b=hg;b;)jg(a,b),b=Ge(b);mg(a);hg=gg?Ge(a.stateNode):null;return!0}function og(){hg=gg=null;ig=!1}var pg=Xb.ReactCurrentOwner; +function Q(a,b,c,d){b.child=null===a?fg(b,null,c,d):eg(b,a.child,c,d)}function qg(a,b,c,d,e){c=c.render;var f=b.ref;Df(b,e);d=c(d,f);b.effectTag|=1;Q(a,b,d,e);return b.child} +function rg(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Ye(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,sg(a,b,g,d,e,f);a=af(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e=c)return zg(a,b,c);b=tg(a,b,c);return null!==b?b.sibling:null}}return tg(a,b,c)}b.expirationTime=0;switch(b.tag){case 2:d=b.elementType;null!== +a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;var e=Me(b,K.current);Df(b,c);e=d(a,e);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;if(M(d)){var f=!0;Re(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;"function"===typeof g&&Qf(b,d,g,a);e.updater=Vf;b.stateNode=e;e._reactInternalFiber=b;$f(b,d,a,c);b=xg(null,b,d,!0,f,c)}else b.tag=0,Q(null,b,e,c),b=b.child; +return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);f=b.pendingProps;a=Nf(e);b.type=a;e=b.tag=Ze(a);f=P(a,f);g=void 0;switch(e){case 0:g=ug(null,b,a,f,c);break;case 1:g=wg(null,b,a,f,c);break;case 11:g=qg(null,b,a,f,c);break;case 14:g=rg(null,b,a,P(a.type,f),d,c);break;default:t("306",a,"")}return g;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),ug(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),wg(a,b, +d,e,c);case 3:yg(b);d=b.updateQueue;null===d?t("282"):void 0;e=b.memoizedState;e=null!==e?e.element:null;tf(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)og(),b=tg(a,b,c);else{e=b.stateNode;if(e=(null===a||null===a.child)&&e.hydrate)hg=He(b.stateNode.containerInfo),gg=b,e=ig=!0;e?(b.effectTag|=2,b.child=fg(b,null,d,c)):(Q(a,b,d,c),og());b=b.child}return b;case 5:return Lf(b),null===a&&lg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ce(d,e)?g=null:null!== +f&&Ce(d,f)&&(b.effectTag|=16),vg(a,b),1!==c&&b.mode&1&&e.hidden?(b.expirationTime=1,b=null):(Q(a,b,g,c),b=b.child),b;case 6:return null===a&&lg(b),null;case 13:return zg(a,b,c);case 4:return Jf(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=eg(b,null,d,c):Q(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:P(d,e),qg(a,b,d,e,c);case 7:return Q(a,b,b.pendingProps,c),b.child;case 8:return Q(a,b,b.pendingProps.children,c),b.child;case 12:return Q(a,b,b.pendingProps.children, +c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;Bf(b,f);if(null!==g){var h=g.value;f=h===f&&(0!==h||1/h===1/f)||h!==h&&f!==f?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!L.current){b=tg(a,b,c);break a}}else for(g=b.child,null!==g&&(g.return=b);null!==g;){h=g.firstContextDependency;if(null!==h){do{if(h.context===d&&0!==(h.observedBits&f)){if(1===g.tag){var k=nf(c);k.tag=2;pf(g,k)}g.expirationTime< +c&&(g.expirationTime=c);k=g.alternate;null!==k&&k.expirationTime\x3c/script>",l=e.removeChild(e.firstChild)):"string"===typeof r.is?l=l.createElement(e,{is:r.is}):(l=l.createElement(e),"select"===e&&r.multiple&&(l.multiple=!0)):l=l.createElementNS(k,e);e=l;e[Ga]=m;e[Ha]=g;Cg(e,b,!1,!1);r=e;l=f;m=g;var w=h,y=we(l,m);switch(l){case "iframe":case "object":H("load", +r);h=m;break;case "video":case "audio":for(h=0;hg&&(g=e),h>g&&(g=h),f=f.sibling;b.childExpirationTime=g}if(null!==S)return S;null!==c&&0===(c.effectTag&1024)&&(null=== +c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1=y)r=0;else if(-1===r||y component higher in the tree to provide a loading indicator or placeholder to display."+ +nc(k))}fh=!0;l=wf(l,k);g=h;do{switch(g.tag){case 3:g.effectTag|=2048;g.expirationTime=f;f=Vg(g,l,f);qf(g,f);break a;case 1:if(m=l,r=g.type,w=g.stateNode,0===(g.effectTag&64)&&("function"===typeof r.getDerivedStateFromError||null!==w&&"function"===typeof w.componentDidCatch&&(null===Yg||!Yg.has(w)))){g.effectTag|=2048;g.expirationTime=f;f=Xg(g,m,f);qf(g,f);break a}}g=g.return}while(null!==g)}S=kh(e);continue}}}break}while(1);dh=!1;Af=zf=yf=ah.currentDispatcher=null;if(d)T=null,a.finishedWork=null; +else if(null!==S)a.finishedWork=null;else{d=a.current.alternate;null===d?t("281"):void 0;T=null;if(fh){e=a.latestPendingTime;f=a.latestSuspendedTime;g=a.latestPingedTime;if(0!==e&&eb?0:b)):(a.pendingCommitExpirationTime= +c,a.finishedWork=d)}}function Mg(a,b){for(var c=a.return;null!==c;){switch(c.tag){case 1:var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Yg||!Yg.has(d))){a=wf(b,a);a=Xg(c,a,1073741823);pf(c,a);Uf(c,1073741823);return}break;case 3:a=wf(b,a);a=Vg(c,a,1073741823);pf(c,a);Uf(c,1073741823);return}c=c.return}3===a.tag&&(c=wf(b,a),c=Vg(a,c,1073741823),pf(a,c),Uf(a,1073741823))} +function Sf(a,b){0!==ch?a=ch:dh?a=gh?1073741823:U:b.mode&1?(a=qh?1073741822-10*(((1073741822-a+15)/10|0)+1):1073741822-25*(((1073741822-a+500)/25|0)+1),null!==T&&a===U&&--a):a=1073741823;qh&&(0===rh||a=d){a.didError=!1;b=a.latestPingedTime;if(0===b||b>c)a.latestPingedTime=c;gf(c,a);c=a.expirationTime;0!==c&&sh(a,c)}} +function Tg(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=Rf();b=Sf(b,a);a=th(a,b);null!==a&&(ff(a,b),b=a.expirationTime,0!==b&&sh(a,b))} +function th(a,b){a.expirationTimeU&&jh(),ff(a,b),dh&&!gh&&T===a||sh(a,a.expirationTime),uh>vh&&(uh=0,t("185")))}function wh(a,b,c,d,e){var f=ch;ch=1073741823;try{return a(b,c,d,e)}finally{ch=f}}var xh=null,W=null,yh=0,zh=void 0,X=!1,Ah=null,Y=0,rh=0,Bh=!1,Ch=null,Z=!1,Dh=!1,qh=!1,Eh=null,Fh=ba.unstable_now(),Gh=1073741822-(Fh/10|0),Hh=Gh,vh=50,uh=0,Ih=null;function Jh(){Gh=1073741822-((ba.unstable_now()-Fh)/10|0)} +function Kh(a,b){if(0!==yh){if(ba.expirationTime&&(a.expirationTime=b);X||(Z?Dh&&(Ah=a,Y=1073741823,Ph(a,1073741823,!1)):1073741823===b?Qh(1073741823,!1):Kh(a,b))} +function Oh(){var a=0,b=null;if(null!==W)for(var c=W,d=xh;null!==d;){var e=d.expirationTime;if(0===e){null===c||null===W?t("244"):void 0;if(d===d.nextScheduledRoot){xh=W=d.nextScheduledRoot=null;break}else if(d===xh)xh=e=d.nextScheduledRoot,W.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===W){W=c;W.nextScheduledRoot=xh;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{e>a&&(a=e,b=d);if(d===W)break;if(1073741823=== +a)break;c=d;d=d.nextScheduledRoot}}Ah=b;Y=a}var Rh=!1;function nh(){return Rh?!0:ba.unstable_shouldYield()?Rh=!0:!1}function Lh(){try{if(!nh()&&null!==xh){Jh();var a=xh;do{var b=a.expirationTime;0!==b&&Gh<=b&&(a.nextExpirationTimeToWorkOn=Gh);a=a.nextScheduledRoot}while(a!==xh)}Qh(0,!0)}finally{Rh=!1}} +function Qh(a,b){Oh();if(b)for(Jh(),Hh=Gh;null!==Ah&&0!==Y&&a<=Y&&!(Rh&&Gh>Y);)Ph(Ah,Y,Gh>Y),Oh(),Jh(),Hh=Gh;else for(;null!==Ah&&0!==Y&&a<=Y;)Ph(Ah,Y,!1),Oh();b&&(yh=0,zh=null);0!==Y&&Kh(Ah,Y);uh=0;Ih=null;if(null!==Eh)for(a=Eh,Eh=null,b=0;b=c&&(null===Eh?Eh=[d]:Eh.push(d),d._defer)){a.finishedWork=b;a.expirationTime=0;return}a.finishedWork=null;a===Ih?uh++:(Ih=a,uh=0);gh=dh=!0;a.current===b?t("177"):void 0;c=a.pendingCommitExpirationTime;0===c?t("261"):void 0;a.pendingCommitExpirationTime=0;d=b.expirationTime;var e=b.childExpirationTime;d=e>d?e:d;a.didError=!1;0===d?(a.earliestPendingTime=0,a.latestPendingTime=0,a.earliestSuspendedTime=0,a.latestSuspendedTime=0,a.latestPingedTime= +0):(dd?a.earliestPendingTime=a.latestPendingTime=0:a.earliestPendingTime>d&&(a.earliestPendingTime=a.latestPendingTime)),e=a.earliestSuspendedTime,0===e?ff(a,d):de&&ff(a,d));gf(0,a);ah.current=null;1q&&(u=q,q=G,G=u),u=Rd(x,G),A=Rd(x,q),u&&A&&(1!==p.rangeCount||p.anchorNode!==u.node||p.anchorOffset!==u.offset||p.focusNode!==A.node||p.focusOffset!==A.offset)&&(C=C.createRange(),C.setStart(u.node,u.offset),p.removeAllRanges(), +G>q?(p.addRange(C),p.extend(A.node,A.offset)):(C.setEnd(A.node,A.offset),p.addRange(C))))));C=[];for(p=x;p=p.parentNode;)1===p.nodeType&&C.push({element:p,left:p.scrollLeft,top:p.scrollTop});"function"===typeof x.focus&&x.focus();for(x=0;xFb?b:Fb;0===b&&(Yg= +null);a.expirationTime=b;a.finishedWork=null}function Wg(a){null===Ah?t("246"):void 0;Ah.expirationTime=0;Bh||(Bh=!0,Ch=a)}function Th(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||X||Qh(1073741823,!1)}}function Uh(a,b){if(Z&&!Dh){Dh=!0;try{return a(b)}finally{Dh=!1}}return a(b)}function Wh(a,b,c){if(qh)return a(b,c);Z||X||0===rh||(Qh(rh,!1),rh=0);var d=qh,e=Z;Z=qh=!0;try{return a(b,c)}finally{qh=d,(Z=e)||X||Qh(1073741823,!1)}} +function Xh(a,b,c,d,e){var f=b.current;a:if(c){c=c._reactInternalFiber;b:{2===kd(c)&&1===c.tag?void 0:t("170");var g=c;do{switch(g.tag){case 3:g=g.stateNode.context;break b;case 1:if(M(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}}g=g.return}while(null!==g);t("171");g=void 0}if(1===c.tag){var h=c.type;if(M(h)){c=Qe(c,h,g);break a}}c=g}else c=Ke;null===b.context?b.context=c:b.pendingContext=c;b=e;e=nf(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b); +Tf();pf(f,e);Uf(f,d);return d}function Yh(a,b,c,d){var e=b.current,f=Rf();e=Sf(f,e);return Xh(a,b,c,e,d)}function Zh(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function $h(a,b,c){var d=3=bh&&(b=bh-1);this._expirationTime=bh=b;this._root=a;this._callbacks=this._next=null;this._hasChildren=this._didComplete=!1;this._children=null;this._defer=!0}ai.prototype.render=function(a){this._defer?void 0:t("250");this._hasChildren=!0;this._children=a;var b=this._root._internalRoot,c=this._expirationTime,d=new bi;Xh(a,b,null,c,d._onCommit);return d}; +ai.prototype.then=function(a){if(this._didComplete)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}}; +ai.prototype.commit=function(){var a=this._root._internalRoot,b=a.firstBatch;this._defer&&null!==b?void 0:t("251");if(this._hasChildren){var c=this._expirationTime;if(b!==this){this._hasChildren&&(c=this._expirationTime=b._expirationTime,this.render(this._children));for(var d=null,e=b;e!==this;)d=e,e=e._next;null===d?t("251"):void 0;d._next=e._next;this._next=b;a.firstBatch=this}this._defer=!1;Nh(a,c);b=this._next;this._next=null;b=a.firstBatch=b;null!==b&&b._hasChildren&&b.render(b._children)}else this._next= +null,this._defer=!1};ai.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var a=this._callbacks;if(null!==a)for(var b=0;b=b;)c=d,d=d._next;a._next=d;null!==c&&(c._next=a)}return a};function di(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}Kb=Th;Lb=Wh;Mb=function(){X||0===rh||(Qh(rh,!1),rh=0)}; +function ei(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new ci(a,!1,b)} +function fi(a,b,c,d,e){di(c)?void 0:t("200");var f=c._reactRootContainer;if(f){if("function"===typeof e){var g=e;e=function(){var a=Zh(f._internalRoot);g.call(a)}}null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)}else{f=c._reactRootContainer=ei(c,d);if("function"===typeof e){var h=e;e=function(){var a=Zh(f._internalRoot);h.call(a)}}Uh(function(){null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)})}return Zh(f._internalRoot)} +function gi(a,b){var c=2=b){d=a;break}a=a.next}while(a!==c);null===d?d=c:d===c&&(c=g,p());b=d.previous;b.next=d.previous=g;g.next=d;g.previous= +b}}function v(){if(-1===k&&null!==c&&1===c.priorityLevel){m=!0;try{do u();while(null!==c&&1===c.priorityLevel)}finally{m=!1,null!==c?p():n=!1}}}function t(a){m=!0;var b=f;f=a;try{if(a)for(;null!==c;){var d=exports.unstable_now();if(c.expirationTime<=d){do u();while(null!==c&&c.expirationTime<=d)}else break}else if(null!==c){do u();while(null!==c&&!w())}}finally{m=!1,f=b,null!==c?p():n=!1,v()}} +var x=Date,y="function"===typeof setTimeout?setTimeout:void 0,z="function"===typeof clearTimeout?clearTimeout:void 0,A="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,B="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,C,D;function E(a){C=A(function(b){z(D);a(b)});D=y(function(){B(C);a(exports.unstable_now())},100)} +if("object"===typeof performance&&"function"===typeof performance.now){var F=performance;exports.unstable_now=function(){return F.now()}}else exports.unstable_now=function(){return x.now()};var r,q,w,G=null;"undefined"!==typeof window?G=window:"undefined"!==typeof global&&(G=global); +if(G&&G._schedMock){var H=G._schedMock;r=H[0];q=H[1];w=H[2];exports.unstable_now=H[3]}else if("undefined"===typeof window||"function"!==typeof MessageChannel){var I=null,J=function(a){if(null!==I)try{I(a)}finally{I=null}};r=function(a){null!==I?setTimeout(r,0,a):(I=a,setTimeout(J,0,!1))};q=function(){I=null};w=function(){return!1}}else{"undefined"!==typeof console&&("function"!==typeof A&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"), +"function"!==typeof B&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var K=null,L=!1,M=-1,N=!1,O=!1,P=0,R=33,S=33;w=function(){return P<=exports.unstable_now()};var T=new MessageChannel,U=T.port2;T.port1.onmessage=function(){L=!1;var a=K,b=M;K=null;M=-1;var d=exports.unstable_now(),e=!1;if(0>=P-d)if(-1!==b&&b<=d)e=!0;else{N||(N=!0,E(V));K=a;M=b;return}if(null!==a){O=!0;try{a(e)}finally{O=!1}}}; +var V=function(a){if(null!==K){E(V);var b=a-P+S;bb&&(b=8),S=bb?U.postMessage(void 0):N||(N=!0,E(V))};q=function(){K=null;L=!1;M=-1}}exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4; +exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var d=h,e=k;h=a;k=exports.unstable_now();try{return b()}finally{h=d,k=e,v()}}; +exports.unstable_scheduleCallback=function(a,b){var d=-1!==k?k:exports.unstable_now();if("object"===typeof b&&null!==b&&"number"===typeof b.timeout)b=d+b.timeout;else switch(h){case 1:b=d+-1;break;case 2:b=d+250;break;case 5:b=d+1073741823;break;case 4:b=d+1E4;break;default:b=d+5E3}a={callback:a,priorityLevel:h,expirationTime:b,next:null,previous:null};if(null===c)c=a.next=a.previous=a,p();else{d=null;var e=c;do{if(e.expirationTime>b){d=e;break}e=e.next}while(e!==c);null===d?d=c:d===c&&(c=a,p()); +b=d.previous;b.next=d.previous=a;a.next=d;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)c=null;else{a===c&&(c=b);var d=a.previous;d.next=b;b.previous=d}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=h;return function(){var d=h,e=k;h=b;k=exports.unstable_now();try{return a.apply(this,arguments)}finally{h=d,k=e,v()}}};exports.unstable_getCurrentPriorityLevel=function(){return h}; +exports.unstable_shouldYield=function(){return!f&&(null!==c&&c.expirationTime -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0; - if (plugins[pluginIndex]) { - continue; - } - !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0; - plugins[pluginIndex] = pluginModule; - var publishedEvents = pluginModule.eventTypes; - for (var eventName in publishedEvents) { - !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0; - } + // Schedule the host callback using the earliest expiration in the list. + var expirationTime = firstCallbackNode.expirationTime; + if (!isHostCallbackScheduled) { + isHostCallbackScheduled = true; + } else { + // Cancel the existing host callback. + cancelHostCallback(); } + requestHostCallback(flushWork, expirationTime); } -/** - * Publishes an event so that it can be dispatched by the supplied plugin. - * - * @param {object} dispatchConfig Dispatch configuration for the event. - * @param {object} PluginModule Plugin publishing the event. - * @return {boolean} True if the event was successfully published. - * @private - */ -function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { - !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0; - eventNameDispatchConfigs[eventName] = dispatchConfig; +function flushFirstCallback() { + var flushedNode = firstCallbackNode; - var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; - if (phasedRegistrationNames) { - for (var phaseName in phasedRegistrationNames) { - if (phasedRegistrationNames.hasOwnProperty(phaseName)) { - var phasedRegistrationName = phasedRegistrationNames[phaseName]; - publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + // Remove the node from the list before calling the callback. That way the + // list is in a consistent state even if the callback throws. + var next = firstCallbackNode.next; + if (firstCallbackNode === next) { + // This is the last callback in the list. + firstCallbackNode = null; + next = null; + } else { + var lastCallbackNode = firstCallbackNode.previous; + firstCallbackNode = lastCallbackNode.next = next; + next.previous = lastCallbackNode; + } + + flushedNode.next = flushedNode.previous = null; + + // Now it's safe to call the callback. + var callback = flushedNode.callback; + var expirationTime = flushedNode.expirationTime; + var priorityLevel = flushedNode.priorityLevel; + var previousPriorityLevel = currentPriorityLevel; + var previousExpirationTime = currentExpirationTime; + currentPriorityLevel = priorityLevel; + currentExpirationTime = expirationTime; + var continuationCallback; + try { + continuationCallback = callback(); + } finally { + currentPriorityLevel = previousPriorityLevel; + currentExpirationTime = previousExpirationTime; + } + + // A callback may return a continuation. The continuation should be scheduled + // with the same priority and expiration as the just-finished callback. + if (typeof continuationCallback === 'function') { + var continuationNode = { + callback: continuationCallback, + priorityLevel: priorityLevel, + expirationTime: expirationTime, + next: null, + previous: null + }; + + // Insert the new callback into the list, sorted by its expiration. This is + // almost the same as the code in `scheduleCallback`, except the callback + // is inserted into the list *before* callbacks of equal expiration instead + // of after. + if (firstCallbackNode === null) { + // This is the first callback in the list. + firstCallbackNode = continuationNode.next = continuationNode.previous = continuationNode; + } else { + var nextAfterContinuation = null; + var node = firstCallbackNode; + do { + if (node.expirationTime >= expirationTime) { + // This callback expires at or after the continuation. We will insert + // the continuation *before* this callback. + nextAfterContinuation = node; + break; + } + node = node.next; + } while (node !== firstCallbackNode); + + if (nextAfterContinuation === null) { + // No equal or lower priority callback was found, which means the new + // callback is the lowest priority callback in the list. + nextAfterContinuation = firstCallbackNode; + } else if (nextAfterContinuation === firstCallbackNode) { + // The new callback is the highest priority callback in the list. + firstCallbackNode = continuationNode; + ensureHostCallbackIsScheduled(); } + + var previous = nextAfterContinuation.previous; + previous.next = nextAfterContinuation.previous = continuationNode; + continuationNode.next = nextAfterContinuation; + continuationNode.previous = previous; } - return true; - } else if (dispatchConfig.registrationName) { - publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); - return true; } - return false; } -/** - * Publishes a registration name that is used to identify dispatched events. - * - * @param {string} registrationName Registration name to add. - * @param {object} PluginModule Plugin publishing the event. - * @private - */ -function publishRegistrationName(registrationName, pluginModule, eventName) { - !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0; - registrationNameModules[registrationName] = pluginModule; - registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; - - { - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - - if (registrationName === 'onDoubleClick') { - possibleRegistrationNames.ondblclick = registrationName; +function flushImmediateWork() { + if ( + // Confirm we've exited the outer most event handler + currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) { + isExecutingCallback = true; + try { + do { + flushFirstCallback(); + } while ( + // Keep flushing until there are no more immediate callbacks + firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority); + } finally { + isExecutingCallback = false; + if (firstCallbackNode !== null) { + // There's still work remaining. Request another callback. + ensureHostCallbackIsScheduled(); + } else { + isHostCallbackScheduled = false; + } } } } -/** - * Registers plugins so that they can extract and dispatch events. - * - * @see {EventPluginHub} - */ +function flushWork(didTimeout) { + // Exit right away if we're currently paused + + if (enableSchedulerDebugging && isSchedulerPaused) { + return; + } + + isExecutingCallback = true; + var previousDidTimeout = currentDidTimeout; + currentDidTimeout = didTimeout; + try { + if (didTimeout) { + // Flush all the expired callbacks without yielding. + while (firstCallbackNode !== null && !(enableSchedulerDebugging && isSchedulerPaused)) { + // TODO Wrap i nfeature flag + // Read the current time. Flush all the callbacks that expire at or + // earlier than that time. Then read the current time again and repeat. + // This optimizes for as few performance.now calls as possible. + var currentTime = exports.unstable_now(); + if (firstCallbackNode.expirationTime <= currentTime) { + do { + flushFirstCallback(); + } while (firstCallbackNode !== null && firstCallbackNode.expirationTime <= currentTime && !(enableSchedulerDebugging && isSchedulerPaused)); + continue; + } + break; + } + } else { + // Keep flushing callbacks until we run out of time in the frame. + if (firstCallbackNode !== null) { + do { + if (enableSchedulerDebugging && isSchedulerPaused) { + break; + } + flushFirstCallback(); + } while (firstCallbackNode !== null && !shouldYieldToHost()); + } + } + } finally { + isExecutingCallback = false; + currentDidTimeout = previousDidTimeout; + if (firstCallbackNode !== null) { + // There's still work remaining. Request another callback. + ensureHostCallbackIsScheduled(); + } else { + isHostCallbackScheduled = false; + } + // Before exiting, flush all the immediate work that was scheduled. + flushImmediateWork(); + } +} + +function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + default: + priorityLevel = NormalPriority; + } + + var previousPriorityLevel = currentPriorityLevel; + var previousEventStartTime = currentEventStartTime; + currentPriorityLevel = priorityLevel; + currentEventStartTime = exports.unstable_now(); + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + currentEventStartTime = previousEventStartTime; + + // Before exiting, flush all the immediate work that was scheduled. + flushImmediateWork(); + } +} + +function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function () { + // This is a fork of runWithPriority, inlined for performance. + var previousPriorityLevel = currentPriorityLevel; + var previousEventStartTime = currentEventStartTime; + currentPriorityLevel = parentPriorityLevel; + currentEventStartTime = exports.unstable_now(); + + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + currentEventStartTime = previousEventStartTime; + flushImmediateWork(); + } + }; +} + +function unstable_scheduleCallback(callback, deprecated_options) { + var startTime = currentEventStartTime !== -1 ? currentEventStartTime : exports.unstable_now(); + + var expirationTime; + if (typeof deprecated_options === 'object' && deprecated_options !== null && typeof deprecated_options.timeout === 'number') { + // FIXME: Remove this branch once we lift expiration times out of React. + expirationTime = startTime + deprecated_options.timeout; + } else { + switch (currentPriorityLevel) { + case ImmediatePriority: + expirationTime = startTime + IMMEDIATE_PRIORITY_TIMEOUT; + break; + case UserBlockingPriority: + expirationTime = startTime + USER_BLOCKING_PRIORITY; + break; + case IdlePriority: + expirationTime = startTime + IDLE_PRIORITY; + break; + case LowPriority: + expirationTime = startTime + LOW_PRIORITY_TIMEOUT; + break; + case NormalPriority: + default: + expirationTime = startTime + NORMAL_PRIORITY_TIMEOUT; + } + } + + var newNode = { + callback: callback, + priorityLevel: currentPriorityLevel, + expirationTime: expirationTime, + next: null, + previous: null + }; + + // Insert the new callback into the list, ordered first by expiration, then + // by insertion. So the new callback is inserted any other callback with + // equal expiration. + if (firstCallbackNode === null) { + // This is the first callback in the list. + firstCallbackNode = newNode.next = newNode.previous = newNode; + ensureHostCallbackIsScheduled(); + } else { + var next = null; + var node = firstCallbackNode; + do { + if (node.expirationTime > expirationTime) { + // The new callback expires before this one. + next = node; + break; + } + node = node.next; + } while (node !== firstCallbackNode); + + if (next === null) { + // No callback with a later expiration was found, which means the new + // callback has the latest expiration in the list. + next = firstCallbackNode; + } else if (next === firstCallbackNode) { + // The new callback has the earliest expiration in the entire list. + firstCallbackNode = newNode; + ensureHostCallbackIsScheduled(); + } + + var previous = next.previous; + previous.next = next.previous = newNode; + newNode.next = next; + newNode.previous = previous; + } + + return newNode; +} + +function unstable_pauseExecution() { + isSchedulerPaused = true; +} + +function unstable_continueExecution() { + isSchedulerPaused = false; + if (firstCallbackNode !== null) { + ensureHostCallbackIsScheduled(); + } +} + +function unstable_getFirstCallbackNode() { + return firstCallbackNode; +} + +function unstable_cancelCallback(callbackNode) { + var next = callbackNode.next; + if (next === null) { + // Already cancelled. + return; + } + + if (next === callbackNode) { + // This is the only scheduled callback. Clear the list. + firstCallbackNode = null; + } else { + // Remove the callback from its position in the list. + if (callbackNode === firstCallbackNode) { + firstCallbackNode = next; + } + var previous = callbackNode.previous; + previous.next = next; + next.previous = previous; + } + + callbackNode.next = callbackNode.previous = null; +} + +function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; +} + +function unstable_shouldYield() { + return !currentDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost()); +} + +// The remaining code is essentially a polyfill for requestIdleCallback. It +// works by scheduling a requestAnimationFrame, storing the time for the start +// of the frame, then scheduling a postMessage which gets scheduled after paint. +// Within the postMessage handler do as much work as possible until time + frame +// rate. By separating the idle call into a separate event tick we ensure that +// layout, paint and other browser work is counted against the available time. +// The frame rate is dynamically adjusted. + +// We capture a local reference to any global, in case it gets polyfilled after +// this module is initially evaluated. We want to be using a +// consistent implementation. +var localDate = Date; + +// This initialization code may run even on server environments if a component +// just imports ReactDOM (e.g. for findDOMNode). Some environments might not +// have setTimeout or clearTimeout. However, we always expect them to be defined +// on the client. https://github.com/facebook/react/pull/13088 +var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; +var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; + +// We don't expect either of these to necessarily be defined, but we will error +// later if they are missing on the client. +var localRequestAnimationFrame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined; +var localCancelAnimationFrame = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : undefined; + +// requestAnimationFrame does not run when the tab is in the background. If +// we're backgrounded we prefer for that work to happen so that the page +// continues to load in the background. So we also schedule a 'setTimeout' as +// a fallback. +// TODO: Need a better heuristic for backgrounded work. +var ANIMATION_FRAME_TIMEOUT = 100; +var rAFID; +var rAFTimeoutID; +var requestAnimationFrameWithTimeout = function (callback) { + // schedule rAF and also a setTimeout + rAFID = localRequestAnimationFrame(function (timestamp) { + // cancel the setTimeout + localClearTimeout(rAFTimeoutID); + callback(timestamp); + }); + rAFTimeoutID = localSetTimeout(function () { + // cancel the requestAnimationFrame + localCancelAnimationFrame(rAFID); + callback(exports.unstable_now()); + }, ANIMATION_FRAME_TIMEOUT); +}; + +if (hasNativePerformanceNow) { + var Performance = performance; + exports.unstable_now = function () { + return Performance.now(); + }; +} else { + exports.unstable_now = function () { + return localDate.now(); + }; +} + +var requestHostCallback; +var cancelHostCallback; +var shouldYieldToHost; + +var globalValue = null; +if (typeof window !== 'undefined') { + globalValue = window; +} else if (typeof global !== 'undefined') { + globalValue = global; +} + +if (globalValue && globalValue._schedMock) { + // Dynamic injection, only for testing purposes. + var globalImpl = globalValue._schedMock; + requestHostCallback = globalImpl[0]; + cancelHostCallback = globalImpl[1]; + shouldYieldToHost = globalImpl[2]; + exports.unstable_now = globalImpl[3]; +} else if ( +// If Scheduler runs in a non-DOM environment, it falls back to a naive +// implementation using setTimeout. +typeof window === 'undefined' || +// Check if MessageChannel is supported, too. +typeof MessageChannel !== 'function') { + // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore, + // fallback to a naive implementation. + var _callback = null; + var _flushCallback = function (didTimeout) { + if (_callback !== null) { + try { + _callback(didTimeout); + } finally { + _callback = null; + } + } + }; + requestHostCallback = function (cb, ms) { + if (_callback !== null) { + // Protect against re-entrancy. + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0, false); + } + }; + cancelHostCallback = function () { + _callback = null; + }; + shouldYieldToHost = function () { + return false; + }; +} else { + if (typeof console !== 'undefined') { + // TODO: Remove fb.me link + if (typeof localRequestAnimationFrame !== 'function') { + console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills'); + } + if (typeof localCancelAnimationFrame !== 'function') { + console.error("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills'); + } + } + + var scheduledHostCallback = null; + var isMessageEventScheduled = false; + var timeoutTime = -1; + + var isAnimationFrameScheduled = false; + + var isFlushingHostCallback = false; + + var frameDeadline = 0; + // We start out assuming that we run at 30fps but then the heuristic tracking + // will adjust this value to a faster fps if we get more frequent animation + // frames. + var previousFrameTime = 33; + var activeFrameTime = 33; + + shouldYieldToHost = function () { + return frameDeadline <= exports.unstable_now(); + }; + + // We use the postMessage trick to defer idle work until after the repaint. + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = function (event) { + isMessageEventScheduled = false; + + var prevScheduledCallback = scheduledHostCallback; + var prevTimeoutTime = timeoutTime; + scheduledHostCallback = null; + timeoutTime = -1; + + var currentTime = exports.unstable_now(); + + var didTimeout = false; + if (frameDeadline - currentTime <= 0) { + // There's no time left in this idle period. Check if the callback has + // a timeout and whether it's been exceeded. + if (prevTimeoutTime !== -1 && prevTimeoutTime <= currentTime) { + // Exceeded the timeout. Invoke the callback even though there's no + // time left. + didTimeout = true; + } else { + // No timeout. + if (!isAnimationFrameScheduled) { + // Schedule another animation callback so we retry later. + isAnimationFrameScheduled = true; + requestAnimationFrameWithTimeout(animationTick); + } + // Exit without invoking the callback. + scheduledHostCallback = prevScheduledCallback; + timeoutTime = prevTimeoutTime; + return; + } + } + + if (prevScheduledCallback !== null) { + isFlushingHostCallback = true; + try { + prevScheduledCallback(didTimeout); + } finally { + isFlushingHostCallback = false; + } + } + }; + + var animationTick = function (rafTime) { + if (scheduledHostCallback !== null) { + // Eagerly schedule the next animation callback at the beginning of the + // frame. If the scheduler queue is not empty at the end of the frame, it + // will continue flushing inside that callback. If the queue *is* empty, + // then it will exit immediately. Posting the callback at the start of the + // frame ensures it's fired within the earliest possible frame. If we + // waited until the end of the frame to post the callback, we risk the + // browser skipping a frame and not firing the callback until the frame + // after that. + requestAnimationFrameWithTimeout(animationTick); + } else { + // No pending work. Exit. + isAnimationFrameScheduled = false; + return; + } + + var nextFrameTime = rafTime - frameDeadline + activeFrameTime; + if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) { + if (nextFrameTime < 8) { + // Defensive coding. We don't support higher frame rates than 120hz. + // If the calculated frame time gets lower than 8, it is probably a bug. + nextFrameTime = 8; + } + // If one frame goes long, then the next one can be short to catch up. + // If two frames are short in a row, then that's an indication that we + // actually have a higher frame rate than what we're currently optimizing. + // We adjust our heuristic dynamically accordingly. For example, if we're + // running on 120hz display or 90hz VR display. + // Take the max of the two in case one of them was an anomaly due to + // missed frame deadlines. + activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime; + } else { + previousFrameTime = nextFrameTime; + } + frameDeadline = rafTime + activeFrameTime; + if (!isMessageEventScheduled) { + isMessageEventScheduled = true; + port.postMessage(undefined); + } + }; + + requestHostCallback = function (callback, absoluteTimeout) { + scheduledHostCallback = callback; + timeoutTime = absoluteTimeout; + if (isFlushingHostCallback || absoluteTimeout < 0) { + // Don't wait for the next frame. Continue working ASAP, in a new event. + port.postMessage(undefined); + } else if (!isAnimationFrameScheduled) { + // If rAF didn't already schedule one, we need to schedule a frame. + // TODO: If this rAF doesn't materialize because the browser throttles, we + // might want to still have setTimeout trigger rIC as a backup to ensure + // that we keep performing work. + isAnimationFrameScheduled = true; + requestAnimationFrameWithTimeout(animationTick); + } + }; + + cancelHostCallback = function () { + scheduledHostCallback = null; + isMessageEventScheduled = false; + timeoutTime = -1; + }; +} + +exports.unstable_ImmediatePriority = ImmediatePriority; +exports.unstable_UserBlockingPriority = UserBlockingPriority; +exports.unstable_NormalPriority = NormalPriority; +exports.unstable_IdlePriority = IdlePriority; +exports.unstable_LowPriority = LowPriority; +exports.unstable_runWithPriority = unstable_runWithPriority; +exports.unstable_scheduleCallback = unstable_scheduleCallback; +exports.unstable_cancelCallback = unstable_cancelCallback; +exports.unstable_wrapCallback = unstable_wrapCallback; +exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; +exports.unstable_shouldYield = unstable_shouldYield; +exports.unstable_continueExecution = unstable_continueExecution; +exports.unstable_pauseExecution = unstable_pauseExecution; +exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + })(); +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(11))) + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.7.0 + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + + + +if (process.env.NODE_ENV !== "production") { + (function() { +'use strict'; + +var React = __webpack_require__(0); +var _assign = __webpack_require__(32); +var checkPropTypes = __webpack_require__(123); +var scheduler = __webpack_require__(85); +var tracing = __webpack_require__(125); + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function () {}; + +{ + validateFormat = function (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 = void 0; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +// Relying on the `invariant()` implementation lets us +// preserve the format and params in the www builds. + +!React ? invariant(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0; + +var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) { + var funcArgs = Array.prototype.slice.call(arguments, 3); + try { + func.apply(context, funcArgs); + } catch (error) { + this.onError(error); + } +}; + +{ + // In DEV mode, we swap out invokeGuardedCallback for a special version + // that plays more nicely with the browser's DevTools. The idea is to preserve + // "Pause on exceptions" behavior. Because React wraps all user-provided + // functions in invokeGuardedCallback, and the production version of + // invokeGuardedCallback uses a try-catch, all user exceptions are treated + // like caught exceptions, and the DevTools won't pause unless the developer + // takes the extra step of enabling pause on caught exceptions. This is + // untintuitive, though, because even though React has caught the error, from + // the developer's perspective, the error is uncaught. + // + // To preserve the expected "Pause on exceptions" behavior, we don't use a + // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake + // DOM node, and call the user-provided callback from inside an event handler + // for that fake event. If the callback throws, the error is "captured" using + // a global event handler. But because the error happens in a different + // event loop context, it does not interrupt the normal program flow. + // Effectively, this gives us try-catch behavior without actually using + // try-catch. Neat! + + // Check that the browser supports the APIs we need to implement our special + // DEV version of invokeGuardedCallback + if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { + var fakeNode = document.createElement('react'); + + var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) { + // If document doesn't exist we know for sure we will crash in this method + // when we call document.createEvent(). However this can cause confusing + // errors: https://github.com/facebookincubator/create-react-app/issues/3482 + // So we preemptively throw with a better message instead. + !(typeof document !== 'undefined') ? invariant(false, 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.') : void 0; + var evt = document.createEvent('Event'); + + // Keeps track of whether the user-provided callback threw an error. We + // set this to true at the beginning, then set it to false right after + // calling the function. If the function errors, `didError` will never be + // set to false. This strategy works even if the browser is flaky and + // fails to call our global error handler, because it doesn't rely on + // the error event at all. + var didError = true; + + // Keeps track of the value of window.event so that we can reset it + // during the callback to let user code access window.event in the + // browsers that support it. + var windowEvent = window.event; + + // Keeps track of the descriptor of window.event to restore it after event + // dispatching: https://github.com/facebook/react/issues/13688 + var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); + + // Create an event handler for our fake event. We will synchronously + // dispatch our fake event using `dispatchEvent`. Inside the handler, we + // call the user-provided callback. + var funcArgs = Array.prototype.slice.call(arguments, 3); + function callCallback() { + // We immediately remove the callback from event listeners so that + // nested `invokeGuardedCallback` calls do not clash. Otherwise, a + // nested call would trigger the fake event handlers of any call higher + // in the stack. + fakeNode.removeEventListener(evtType, callCallback, false); + + // We check for window.hasOwnProperty('event') to prevent the + // window.event assignment in both IE <= 10 as they throw an error + // "Member not found" in strict mode, and in Firefox which does not + // support window.event. + if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { + window.event = windowEvent; + } + + func.apply(context, funcArgs); + didError = false; + } + + // Create a global error event handler. We use this to capture the value + // that was thrown. It's possible that this error handler will fire more + // than once; for example, if non-React code also calls `dispatchEvent` + // and a handler for that event throws. We should be resilient to most of + // those cases. Even if our error event handler fires more than once, the + // last error event is always used. If the callback actually does error, + // we know that the last error event is the correct one, because it's not + // possible for anything else to have happened in between our callback + // erroring and the code that follows the `dispatchEvent` call below. If + // the callback doesn't error, but the error event was fired, we know to + // ignore it because `didError` will be false, as described above. + var error = void 0; + // Use this to track whether the error event is ever called. + var didSetError = false; + var isCrossOriginError = false; + + function handleWindowError(event) { + error = event.error; + didSetError = true; + if (error === null && event.colno === 0 && event.lineno === 0) { + isCrossOriginError = true; + } + if (event.defaultPrevented) { + // Some other error handler has prevented default. + // Browsers silence the error report if this happens. + // We'll remember this to later decide whether to log it or not. + if (error != null && typeof error === 'object') { + try { + error._suppressLogging = true; + } catch (inner) { + // Ignore. + } + } + } + } + + // Create a fake event type. + var evtType = 'react-' + (name ? name : 'invokeguardedcallback'); + + // Attach our event handlers + window.addEventListener('error', handleWindowError); + fakeNode.addEventListener(evtType, callCallback, false); + + // Synchronously dispatch our fake event. If the user-provided function + // errors, it will trigger our global error handler. + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + + if (windowEventDescriptor) { + Object.defineProperty(window, 'event', windowEventDescriptor); + } + + if (didError) { + if (!didSetError) { + // The callback errored, but the error event never fired. + error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.'); + } else if (isCrossOriginError) { + error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.'); + } + this.onError(error); + } + + // Remove our event listeners + window.removeEventListener('error', handleWindowError); + }; + + invokeGuardedCallbackImpl = invokeGuardedCallbackDev; + } +} + +var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; + +// Used by Fiber to simulate a try-catch. +var hasError = false; +var caughtError = null; + +// Used by event system to capture/rethrow the first error. +var hasRethrowError = false; +var rethrowError = null; + +var reporter = { + onError: function (error) { + hasError = true; + caughtError = error; + } +}; + +/** + * Call a function while guarding against errors that happens within it. + * Returns an error if it throws, otherwise null. + * + * In production, this is implemented using a try-catch. The reason we don't + * use a try-catch directly is so that we can swap out a different + * implementation in DEV mode. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ +function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { + hasError = false; + caughtError = null; + invokeGuardedCallbackImpl$1.apply(reporter, arguments); +} + +/** + * Same as invokeGuardedCallback, but instead of returning an error, it stores + * it in a global so it can be rethrown by `rethrowCaughtError` later. + * TODO: See if caughtError and rethrowError can be unified. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ +function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { + invokeGuardedCallback.apply(this, arguments); + if (hasError) { + var error = clearCaughtError(); + if (!hasRethrowError) { + hasRethrowError = true; + rethrowError = error; + } + } +} + +/** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ +function rethrowCaughtError() { + if (hasRethrowError) { + var error = rethrowError; + hasRethrowError = false; + rethrowError = null; + throw error; + } +} + +function hasCaughtError() { + return hasError; +} + +function clearCaughtError() { + if (hasError) { + var error = caughtError; + hasError = false; + caughtError = null; + return error; + } else { + invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.'); + } +} + +/** + * Injectable ordering of event plugins. + */ +var eventPluginOrder = null; + +/** + * Injectable mapping from names to event plugin modules. + */ +var namesToPlugins = {}; + +/** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ +function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0; + if (plugins[pluginIndex]) { + continue; + } + !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0; + plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + for (var eventName in publishedEvents) { + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0; + } + } +} + +/** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ +function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0; + eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + return false; +} + +/** + * Publishes a registration name that is used to identify dispatched events. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ +function publishRegistrationName(registrationName, pluginModule, eventName) { + !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0; + registrationNameModules[registrationName] = pluginModule; + registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + possibleRegistrationNames.ondblclick = registrationName; + } + } +} + +/** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ /** * Ordered list of injected plugins. @@ -29564,36 +30241,68 @@ function injectEventPluginsByName(injectedNamesToPlugins) { } } -var EventPluginRegistry = Object.freeze({ - plugins: plugins, - eventNameDispatchConfigs: eventNameDispatchConfigs, - registrationNameModules: registrationNameModules, - registrationNameDependencies: registrationNameDependencies, - possibleRegistrationNames: possibleRegistrationNames, - injectEventPluginOrder: injectEventPluginOrder, - injectEventPluginsByName: injectEventPluginsByName -}); - -var getFiberCurrentPropsFromNode = null; -var getInstanceFromNode = null; -var getNodeFromInstance = null; - -var injection$1 = { - injectComponentTree: function (Injected) { - getFiberCurrentPropsFromNode = Injected.getFiberCurrentPropsFromNode; - getInstanceFromNode = Injected.getInstanceFromNode; - getNodeFromInstance = Injected.getNodeFromInstance; +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ - { - warning(getNodeFromInstance && getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.'); +var warningWithoutStack = function () {}; + +{ + warningWithoutStack = function (condition, format) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; } - } -}; + if (format === undefined) { + throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument'); + } + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + if (condition) { + return; + } + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); + // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; +} +var warningWithoutStack$1 = warningWithoutStack; +var getFiberCurrentPropsFromNode = null; +var getInstanceFromNode = null; +var getNodeFromInstance = null; +function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) { + getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl; + getInstanceFromNode = getInstanceFromNodeImpl; + getNodeFromInstance = getNodeFromInstanceImpl; + { + !(getNodeFromInstance && getInstanceFromNode) ? warningWithoutStack$1(false, 'EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; + } +} var validateEventDispatches = void 0; { @@ -29607,28 +30316,27 @@ var validateEventDispatches = void 0; var instancesIsArr = Array.isArray(dispatchInstances); var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; - warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.'); + !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') : void 0; }; } /** * Dispatch the event to the listener. * @param {SyntheticEvent} event SyntheticEvent to handle - * @param {boolean} simulated If the event is simulated (changes exn behavior) * @param {function} listener Application-level callback * @param {*} inst Internal component instance */ -function executeDispatch(event, simulated, listener, inst) { +function executeDispatch(event, listener, inst) { var type = event.type || 'unknown-event'; event.currentTarget = getNodeFromInstance(inst); - ReactErrorUtils.invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); + invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); event.currentTarget = null; } /** * Standard/simple iteration through an event's collected dispatches. */ -function executeDispatchesInOrder(event, simulated) { +function executeDispatchesInOrder(event) { var dispatchListeners = event._dispatchListeners; var dispatchInstances = event._dispatchInstances; { @@ -29640,10 +30348,10 @@ function executeDispatchesInOrder(event, simulated) { break; } // Listeners and Instances are two parallel arrays that are always in sync. - executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); + executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); } } else if (dispatchListeners) { - executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + executeDispatch(event, dispatchListeners, dispatchInstances); } event._dispatchListeners = null; event._dispatchInstances = null; @@ -29736,23 +30444,19 @@ var eventQueue = null; * Dispatches an event and releases it back into the pool, unless persistent. * * @param {?object} event Synthetic event to be dispatched. - * @param {boolean} simulated If the event is simulated (changes exn behavior) * @private */ -var executeDispatchesAndRelease = function (event, simulated) { +var executeDispatchesAndRelease = function (event) { if (event) { - executeDispatchesInOrder(event, simulated); + executeDispatchesInOrder(event); if (!event.isPersistent()) { event.constructor.release(event); } } }; -var executeDispatchesAndReleaseSimulated = function (e) { - return executeDispatchesAndRelease(e, true); -}; var executeDispatchesAndReleaseTopLevel = function (e) { - return executeDispatchesAndRelease(e, false); + return executeDispatchesAndRelease(e); }; function isInteractive(tag) { @@ -29866,7 +30570,7 @@ function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) return events; } -function runEventsInBatch(events, simulated) { +function runEventsInBatch(events) { if (events !== null) { eventQueue = accumulateInto(eventQueue, events); } @@ -29880,49 +30584,41 @@ function runEventsInBatch(events, simulated) { return; } - if (simulated) { - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); - } else { - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); - } + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0; // This would be a good time to rethrow if any of the event handlers threw. - ReactErrorUtils.rethrowCaughtError(); + rethrowCaughtError(); } function runExtractedEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget) { var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); - runEventsInBatch(events, false); + runEventsInBatch(events); } -var EventPluginHub = Object.freeze({ - injection: injection, - getListener: getListener, - runEventsInBatch: runEventsInBatch, - runExtractedEventsInBatch: runExtractedEventsInBatch -}); - -var IndeterminateComponent = 0; // Before we know whether it is functional or class -var FunctionalComponent = 1; -var ClassComponent = 2; +var FunctionComponent = 0; +var ClassComponent = 1; +var IndeterminateComponent = 2; // Before we know whether it is function or class var HostRoot = 3; // Root of a host tree. Could be nested inside another node. var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. var HostComponent = 5; var HostText = 6; -var CallComponent = 7; -var CallHandlerPhase = 8; -var ReturnComponent = 9; -var Fragment = 10; -var Mode = 11; -var ContextConsumer = 12; -var ContextProvider = 13; -var ForwardRef = 14; +var Fragment = 7; +var Mode = 8; +var ContextConsumer = 9; +var ContextProvider = 10; +var ForwardRef = 11; +var Profiler = 12; +var SuspenseComponent = 13; +var MemoComponent = 14; +var SimpleMemoComponent = 15; +var LazyComponent = 16; +var IncompleteClassComponent = 17; var randomKey = Math.random().toString(36).slice(2); var internalInstanceKey = '__reactInternalInstance$' + randomKey; var internalEventHandlersKey = '__reactEventHandlers$' + randomKey; -function precacheFiberNode$1(hostInst, node) { +function precacheFiberNode(hostInst, node) { node[internalInstanceKey] = hostInst; } @@ -29990,22 +30686,13 @@ function getFiberCurrentPropsFromNode$1(node) { return node[internalEventHandlersKey] || null; } -function updateFiberProps$1(node, props) { +function updateFiberProps(node, props) { node[internalEventHandlersKey] = props; } -var ReactDOMComponentTree = Object.freeze({ - precacheFiberNode: precacheFiberNode$1, - getClosestInstanceFromNode: getClosestInstanceFromNode, - getInstanceFromNode: getInstanceFromNode$1, - getNodeFromInstance: getNodeFromInstance$1, - getFiberCurrentPropsFromNode: getFiberCurrentPropsFromNode$1, - updateFiberProps: updateFiberProps$1 -}); - function getParent(inst) { do { - inst = inst['return']; + inst = inst.return; // TODO: If this is a HostRoot we might want to bail out. // That is depending on if we want nested subtrees (layers) to bubble // events to their parent. We could also go through parentNode on the @@ -30064,9 +30751,7 @@ function getLowestCommonAncestor(instA, instB) { /** * Return the parent instance of the passed-in instance. */ -function getParentInstance(inst) { - return getParent(inst); -} + /** * Simulates the traversal of a two-phase, capture/bubble event dispatch. @@ -30160,7 +30845,7 @@ function listenerAtPhase(inst, event, propagationPhase) { */ function accumulateDirectionalDispatches(inst, phase, event) { { - warning(inst, 'Dispatching inst must not be null'); + !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0; } var listener = listenerAtPhase(inst, event, phase); if (listener) { @@ -30182,17 +30867,6 @@ function accumulateTwoPhaseDispatchesSingle(event) { } } -/** - * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. - */ -function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { - if (event && event.dispatchConfig.phasedRegistrationNames) { - var targetInst = event._targetInst; - var parentInst = targetInst ? getParentInstance(targetInst) : null; - traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); - } -} - /** * Accumulates without regard to direction, does not look for phased * registration names. Same as `accumulateDirectDispatchesSingle` but without @@ -30224,9 +30898,7 @@ function accumulateTwoPhaseDispatches(events) { forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); } -function accumulateTwoPhaseDispatchesSkipTarget(events) { - forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); -} + function accumulateEnterLeaveDispatches(leave, enter, from, to) { traverseEnterLeave(from, to, accumulateDispatches, leave, enter); @@ -30236,32 +30908,204 @@ function accumulateDirectDispatches(events) { forEachAccumulated(events, accumulateDirectDispatchesSingle); } -var EventPropagators = Object.freeze({ - accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, - accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, - accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches, - accumulateDirectDispatches: accumulateDirectDispatches -}); +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -var contentKey = null; +// Do not uses the below two methods directly! +// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. +// (It is the only module that is allowed to access these methods.) + +function unsafeCastStringToDOMTopLevelType(topLevelType) { + return topLevelType; +} + +function unsafeCastDOMTopLevelTypeToString(topLevelType) { + return topLevelType; +} /** - * Gets the key used to access text content on a DOM node. + * Generate a mapping of standard vendor prefixes using the defined style property and event name. * - * @return {?string} Key used to access text content. - * @internal + * @param {string} styleProp + * @param {string} eventName + * @returns {object} */ -function getTextContentAccessor() { - if (!contentKey && ExecutionEnvironment.canUseDOM) { - // Prefer textContent to innerText because many browsers support both but - // SVG elements don't support innerText even when
does. - contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; +function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + + return prefixes; +} + +/** + * A list of event names to a configurable list of vendor prefixes. + */ +var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd') +}; + +/** + * Event names that have already been detected and prefixed (if applicable). + */ +var prefixedEventNames = {}; + +/** + * Element to check for prefixes on. + */ +var style = {}; + +/** + * Bootstrap if a DOM exists. + */ +if (canUseDOM) { + style = document.createElement('div').style; + + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } + + // Same as above + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } +} + +/** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ +function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return prefixedEventNames[eventName] = prefixMap[styleProp]; + } } - return contentKey; + + return eventName; } /** - * This helper object stores information about text content of a target node, + * To identify top level events in ReactDOM, we use constants defined by this + * module. This is the only module that uses the unsafe* methods to express + * that the constants actually correspond to the browser event names. This lets + * us save some bundle size by avoiding a top level type -> event name map. + * The rest of ReactDOM code should import top level types from this file. + */ +var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort'); +var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend')); +var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration')); +var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart')); +var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur'); +var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay'); +var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough'); +var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel'); +var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change'); +var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click'); +var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close'); +var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend'); +var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart'); +var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate'); +var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu'); +var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy'); +var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut'); +var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick'); +var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick'); +var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag'); +var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend'); +var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter'); +var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit'); +var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave'); +var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover'); +var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart'); +var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop'); +var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange'); +var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied'); +var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted'); +var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended'); +var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error'); +var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus'); +var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture'); +var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input'); +var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid'); +var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown'); +var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress'); +var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup'); +var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load'); +var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart'); +var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata'); +var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata'); +var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture'); +var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown'); +var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove'); +var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout'); +var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover'); +var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup'); +var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste'); +var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause'); +var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play'); +var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing'); +var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel'); +var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown'); + + +var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove'); +var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout'); +var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover'); +var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup'); +var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress'); +var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange'); +var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset'); +var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll'); +var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked'); +var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking'); +var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange'); +var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled'); +var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit'); +var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend'); +var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput'); +var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate'); +var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle'); +var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel'); +var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend'); +var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove'); +var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart'); +var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend')); +var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange'); +var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting'); +var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); + +// List of events that need to be individually attached to media elements. +// Note that events in this list will *not* be listened to at the top level +// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`. +var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING]; + +function getRawEventName(topLevelType) { + return unsafeCastDOMTopLevelTypeToString(topLevelType); +} + +/** + * These variables store information about text content of a target node, * allowing comparison of content before and after a given event. * * Identify the node where selection currently begins, then observe @@ -30271,31 +31115,30 @@ function getTextContentAccessor() { * * */ -var compositionState = { - _root: null, - _startText: null, - _fallbackText: null -}; + +var root = null; +var startText = null; +var fallbackText = null; function initialize(nativeEventTarget) { - compositionState._root = nativeEventTarget; - compositionState._startText = getText(); + root = nativeEventTarget; + startText = getText(); return true; } function reset() { - compositionState._root = null; - compositionState._startText = null; - compositionState._fallbackText = null; + root = null; + startText = null; + fallbackText = null; } function getData() { - if (compositionState._fallbackText) { - return compositionState._fallbackText; + if (fallbackText) { + return fallbackText; } var start = void 0; - var startValue = compositionState._startText; + var startValue = startText; var startLength = startValue.length; var end = void 0; var endValue = getText(); @@ -30315,24 +31158,21 @@ function getData() { } var sliceTail = end > 1 ? 1 - end : undefined; - compositionState._fallbackText = endValue.slice(start, sliceTail); - return compositionState._fallbackText; + fallbackText = endValue.slice(start, sliceTail); + return fallbackText; } function getText() { - if ('value' in compositionState._root) { - return compositionState._root.value; + if ('value' in root) { + return root.value; } - return compositionState._root[getTextContentAccessor()]; + return root.textContent; } /* eslint valid-typeof: 0 */ -var didWarnForAddedNewProperty = false; var EVENT_POOL_SIZE = 10; -var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; - /** * @interface Event * @see http://www.w3.org/TR/DOM-Level-3-Events/ @@ -30341,7 +31181,9 @@ var EventInterface = { type: null, target: null, // currentTarget is set when dispatching; no use in copying it here - currentTarget: emptyFunction.thatReturnsNull, + currentTarget: function () { + return null; + }, eventPhase: null, bubbles: null, cancelable: null, @@ -30352,6 +31194,14 @@ var EventInterface = { isTrusted: null }; +function functionThatReturnsTrue() { + return true; +} + +function functionThatReturnsFalse() { + return false; +} + /** * Synthetic events are dispatched by event plugins, typically in response to a * top-level event delegation handler. @@ -30376,6 +31226,8 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg delete this.nativeEvent; delete this.preventDefault; delete this.stopPropagation; + delete this.isDefaultPrevented; + delete this.isPropagationStopped; } this.dispatchConfig = dispatchConfig; @@ -30404,11 +31256,11 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; if (defaultPrevented) { - this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + this.isDefaultPrevented = functionThatReturnsTrue; } else { - this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + this.isDefaultPrevented = functionThatReturnsFalse; } - this.isPropagationStopped = emptyFunction.thatReturnsFalse; + this.isPropagationStopped = functionThatReturnsFalse; return this; } @@ -30425,7 +31277,7 @@ _assign(SyntheticEvent.prototype, { } else if (typeof event.returnValue !== 'unknown') { event.returnValue = false; } - this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + this.isDefaultPrevented = functionThatReturnsTrue; }, stopPropagation: function () { @@ -30445,7 +31297,7 @@ _assign(SyntheticEvent.prototype, { event.cancelBubble = true; } - this.isPropagationStopped = emptyFunction.thatReturnsTrue; + this.isPropagationStopped = functionThatReturnsTrue; }, /** @@ -30454,7 +31306,7 @@ _assign(SyntheticEvent.prototype, { * won't be added back into the pool. */ persist: function () { - this.isPersistent = emptyFunction.thatReturnsTrue; + this.isPersistent = functionThatReturnsTrue; }, /** @@ -30462,7 +31314,7 @@ _assign(SyntheticEvent.prototype, { * * @return {boolean} True if this should not be released, false otherwise. */ - isPersistent: emptyFunction.thatReturnsFalse, + isPersistent: functionThatReturnsFalse, /** * `PooledClass` looks for `destructor` on each instance it releases. @@ -30474,13 +31326,19 @@ _assign(SyntheticEvent.prototype, { Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName])); } } - for (var i = 0; i < shouldBeReleasedProperties.length; i++) { - this[shouldBeReleasedProperties[i]] = null; - } + this.dispatchConfig = null; + this._targetInst = null; + this.nativeEvent = null; + this.isDefaultPrevented = functionThatReturnsFalse; + this.isPropagationStopped = functionThatReturnsFalse; + this._dispatchListeners = null; + this._dispatchInstances = null; { Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); - Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); - Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); + Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse)); + Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse)); + Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {})); + Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {})); } } }); @@ -30511,38 +31369,6 @@ SyntheticEvent.extend = function (Interface) { return Class; }; -/** Proxying after everything set on SyntheticEvent - * to resolve Proxy issue on some WebKit browsers - * in which some Event properties are set to undefined (GH#10010) - */ -{ - var isProxySupported = typeof Proxy === 'function' && - // https://github.com/facebook/react/issues/12011 - !Object.isSealed(new Proxy({}, {})); - - if (isProxySupported) { - /*eslint-disable no-func-assign */ - SyntheticEvent = new Proxy(SyntheticEvent, { - construct: function (target, args) { - return this.apply(target, Object.create(target.prototype), args); - }, - apply: function (constructor, that, args) { - return new Proxy(constructor.apply(that, args), { - set: function (target, prop, value) { - if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { - warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.'); - didWarnForAddedNewProperty = true; - } - target[prop] = value; - return true; - } - }); - } - }); - /*eslint-enable no-func-assign */ - } -} - addEventPoolingTo(SyntheticEvent); /** @@ -30575,7 +31401,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) { function warn(action, result) { var warningCondition = false; - warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result); + !warningCondition ? warningWithoutStack$1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; } } @@ -30591,7 +31417,7 @@ function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) { function releasePooledEvent(event) { var EventConstructor = this; - !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0; + !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0; event.destructor(); if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) { EventConstructor.eventPool.push(event); @@ -30604,13 +31430,11 @@ function addEventPoolingTo(EventConstructor) { EventConstructor.release = releasePooledEvent; } -var SyntheticEvent$1 = SyntheticEvent; - /** * @interface Event * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents */ -var SyntheticCompositionEvent = SyntheticEvent$1.extend({ +var SyntheticCompositionEvent = SyntheticEvent.extend({ data: null }); @@ -30619,29 +31443,29 @@ var SyntheticCompositionEvent = SyntheticEvent$1.extend({ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 * /#events-inputevents */ -var SyntheticInputEvent = SyntheticEvent$1.extend({ +var SyntheticInputEvent = SyntheticEvent.extend({ data: null }); var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space var START_KEYCODE = 229; -var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; +var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window; var documentMode = null; -if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { +if (canUseDOM && 'documentMode' in document) { documentMode = document.documentMode; } // Webkit offers a very useful `textInput` event that can be used to // directly represent `beforeInput`. The IE `textinput` event is not as // useful, so we don't use it. -var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode; +var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied // by the native compositionend event may be incorrect. Japanese ideographic // spaces, for instance (\u3000) are not recorded correctly. -var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); +var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); var SPACEBAR_CODE = 32; var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); @@ -30653,28 +31477,28 @@ var eventTypes = { bubbled: 'onBeforeInput', captured: 'onBeforeInputCapture' }, - dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] + dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE] }, compositionEnd: { phasedRegistrationNames: { bubbled: 'onCompositionEnd', captured: 'onCompositionEndCapture' }, - dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN] }, compositionStart: { phasedRegistrationNames: { bubbled: 'onCompositionStart', captured: 'onCompositionStartCapture' }, - dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN] }, compositionUpdate: { phasedRegistrationNames: { bubbled: 'onCompositionUpdate', captured: 'onCompositionUpdateCapture' }, - dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN] } }; @@ -30700,11 +31524,11 @@ function isKeypressCommand(nativeEvent) { */ function getCompositionEventType(topLevelType) { switch (topLevelType) { - case 'topCompositionStart': + case TOP_COMPOSITION_START: return eventTypes.compositionStart; - case 'topCompositionEnd': + case TOP_COMPOSITION_END: return eventTypes.compositionEnd; - case 'topCompositionUpdate': + case TOP_COMPOSITION_UPDATE: return eventTypes.compositionUpdate; } } @@ -30718,7 +31542,7 @@ function getCompositionEventType(topLevelType) { * @return {boolean} */ function isFallbackCompositionStart(topLevelType, nativeEvent) { - return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; + return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE; } /** @@ -30730,16 +31554,16 @@ function isFallbackCompositionStart(topLevelType, nativeEvent) { */ function isFallbackCompositionEnd(topLevelType, nativeEvent) { switch (topLevelType) { - case 'topKeyUp': + case TOP_KEY_UP: // Command keys insert or clear IME input. return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; - case 'topKeyDown': + case TOP_KEY_DOWN: // Expect IME keyCode on each keydown. If we get any other // code we must have exited earlier. return nativeEvent.keyCode !== START_KEYCODE; - case 'topKeyPress': - case 'topMouseDown': - case 'topBlur': + case TOP_KEY_PRESS: + case TOP_MOUSE_DOWN: + case TOP_BLUR: // Events are not possible without cancelling IME. return true; default: @@ -30764,6 +31588,20 @@ function getDataFromCustomEvent(nativeEvent) { return null; } +/** + * Check if a composition event was triggered by Korean IME. + * Our fallback mode does not work well with IE's Korean IME, + * so just use native composition events when Korean IME is used. + * Although CompositionEvent.locale property is deprecated, + * it is available in IE, where our fallback mode is enabled. + * + * @param {object} nativeEvent + * @return {boolean} + */ +function isUsingKoreanIME(nativeEvent) { + return nativeEvent.locale === 'ko'; +} + // Track the current IME composition status, if any. var isComposing = false; @@ -30788,7 +31626,7 @@ function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEv return null; } - if (useFallbackCompositionData) { + if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) { // The current composition is stored statically and must not be // overwritten while composition continues. if (!isComposing && eventType === eventTypes.compositionStart) { @@ -30818,15 +31656,15 @@ function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEv } /** - * @param {TopLevelTypes} topLevelType Record from `BrowserEventConstants`. + * @param {TopLevelType} topLevelType Number from `TopLevelType`. * @param {object} nativeEvent Native browser event. * @return {?string} The string corresponding to this `beforeInput` event. */ function getNativeBeforeInputChars(topLevelType, nativeEvent) { switch (topLevelType) { - case 'topCompositionEnd': + case TOP_COMPOSITION_END: return getDataFromCustomEvent(nativeEvent); - case 'topKeyPress': + case TOP_KEY_PRESS: /** * If native `textInput` events are available, our goal is to make * use of them. However, there is a special case: the spacebar key. @@ -30849,13 +31687,13 @@ function getNativeBeforeInputChars(topLevelType, nativeEvent) { hasSpaceKeypress = true; return SPACEBAR_CHAR; - case 'topTextInput': + case TOP_TEXT_INPUT: // Record the characters to be added to the DOM. var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled // it at the keypress level and bail immediately. Android Chrome - // doesn't give us keycodes, so we need to blacklist it. + // doesn't give us keycodes, so we need to ignore it. if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { return null; } @@ -30872,7 +31710,7 @@ function getNativeBeforeInputChars(topLevelType, nativeEvent) { * For browsers that do not provide the `textInput` event, extract the * appropriate string to use for SyntheticInputEvent. * - * @param {string} topLevelType Record from `BrowserEventConstants`. + * @param {number} topLevelType Number from `TopLevelEventTypes`. * @param {object} nativeEvent Native browser event. * @return {?string} The fallback string for this `beforeInput` event. */ @@ -30882,7 +31720,7 @@ function getFallbackBeforeInputChars(topLevelType, nativeEvent) { // If composition event is available, we extract a string only at // compositionevent, otherwise extract it at fallback events. if (isComposing) { - if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { + if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { var chars = getData(); reset(); isComposing = false; @@ -30892,11 +31730,11 @@ function getFallbackBeforeInputChars(topLevelType, nativeEvent) { } switch (topLevelType) { - case 'topPaste': + case TOP_PASTE: // If a paste event occurs after a keypress, throw out the input // chars. Paste events should not lead to BeforeInput events. return null; - case 'topKeyPress': + case TOP_KEY_PRESS: /** * As of v27, Firefox may fire keypress events even when no character * will be inserted. A few possibilities: @@ -30927,8 +31765,8 @@ function getFallbackBeforeInputChars(topLevelType, nativeEvent) { } } return null; - case 'topCompositionEnd': - return useFallbackCompositionData ? null : nativeEvent.data; + case TOP_COMPOSITION_END: + return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data; default: return null; } @@ -31002,16 +31840,7 @@ var BeforeInputEventPlugin = { // Use to restore controlled state after a change event has fired. -var fiberHostComponent = null; - -var ReactControlledComponentInjection = { - injectFiberControlledHostComponent: function (hostComponentImpl) { - // The fiber implementation doesn't use dynamic dispatch so we need to - // inject the implementation. - fiberHostComponent = hostComponentImpl; - } -}; - +var restoreImpl = null; var restoreTarget = null; var restoreQueue = null; @@ -31023,12 +31852,14 @@ function restoreStateOfTarget(target) { // Unmounted return; } - !(fiberHostComponent && typeof fiberHostComponent.restoreControlledState === 'function') ? invariant(false, 'Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0; + !(typeof restoreImpl === 'function') ? invariant(false, 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0; var props = getFiberCurrentPropsFromNode(internalInstance.stateNode); - fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props); + restoreImpl(internalInstance.stateNode, internalInstance.type, props); } -var injection$2 = ReactControlledComponentInjection; +function setRestoreImplementation(impl) { + restoreImpl = impl; +} function enqueueStateRestore(target) { if (restoreTarget) { @@ -31063,13 +31894,6 @@ function restoreStateIfNeeded() { } } -var ReactControlledComponent = Object.freeze({ - injection: injection$2, - enqueueStateRestore: enqueueStateRestore, - needsStateRestore: needsStateRestore, - restoreStateIfNeeded: restoreStateIfNeeded -}); - // Used as a way to call batchedUpdates when we don't have a reference to // the renderer. Such as when we're dispatching events or if third party // libraries need to call batchedUpdates. Eventually, this API will go away when @@ -31077,13 +31901,13 @@ var ReactControlledComponent = Object.freeze({ // scheduled work and instead do synchronous work. // Defaults -var _batchedUpdates = function (fn, bookkeeping) { +var _batchedUpdatesImpl = function (fn, bookkeeping) { return fn(bookkeeping); }; -var _interactiveUpdates = function (fn, a, b) { +var _interactiveUpdatesImpl = function (fn, a, b) { return fn(a, b); }; -var _flushInteractiveUpdates = function () {}; +var _flushInteractiveUpdatesImpl = function () {}; var isBatching = false; function batchedUpdates(fn, bookkeeping) { @@ -31094,7 +31918,7 @@ function batchedUpdates(fn, bookkeeping) { } isBatching = true; try { - return _batchedUpdates(fn, bookkeeping); + return _batchedUpdatesImpl(fn, bookkeeping); } finally { // Here we wait until all updates have propagated, which is important // when using controlled components within layers: @@ -31106,25 +31930,23 @@ function batchedUpdates(fn, bookkeeping) { // If a controlled event was fired, we may need to restore the state of // the DOM node back to the controlled value. This is necessary when React // bails out of the update without touching the DOM. - _flushInteractiveUpdates(); + _flushInteractiveUpdatesImpl(); restoreStateIfNeeded(); } } } function interactiveUpdates(fn, a, b) { - return _interactiveUpdates(fn, a, b); + return _interactiveUpdatesImpl(fn, a, b); } -var injection$3 = { - injectRenderer: function (renderer) { - _batchedUpdates = renderer.batchedUpdates; - _interactiveUpdates = renderer.interactiveUpdates; - _flushInteractiveUpdates = renderer.flushInteractiveUpdates; - } -}; +function setBatchingImplementation(batchedUpdatesImpl, interactiveUpdatesImpl, flushInteractiveUpdatesImpl) { + _batchedUpdatesImpl = batchedUpdatesImpl; + _interactiveUpdatesImpl = interactiveUpdatesImpl; + _flushInteractiveUpdatesImpl = flushInteractiveUpdatesImpl; +} /** * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary @@ -31179,7 +32001,9 @@ var DOCUMENT_FRAGMENT_NODE = 11; * @return {DOMEventTarget} Target node. */ function getEventTarget(nativeEvent) { - var target = nativeEvent.target || window; + // Fallback to nativeEvent.srcElement for IE9 + // https://github.com/facebook/react/issues/12506 + var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG element events #4963 if (target.correspondingUseElement) { @@ -31200,13 +32024,12 @@ function getEventTarget(nativeEvent) { * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". - * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ -function isEventSupported(eventNameSuffix, capture) { - if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { +function isEventSupported(eventNameSuffix) { + if (!canUseDOM) { return false; } @@ -31261,18 +32084,20 @@ function trackValueOnNode(node) { // and don't track value will cause over reporting of changes, // but it's better then a hard failure // (needed for certain tests that spyOn input values and Safari) - if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { + if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { return; } + var get = descriptor.get, + set = descriptor.set; Object.defineProperty(node, valueField, { configurable: true, get: function () { - return descriptor.get.call(this); + return get.call(this); }, set: function (value) { currentValue = '' + value; - descriptor.set.call(this, value); + set.call(this, value); } }); // We could've passed this the first time @@ -31328,35 +32153,59 @@ function updateValueIfChanged(node) { return false; } -var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; -var ReactCurrentOwner = ReactInternals.ReactCurrentOwner; -var ReactDebugCurrentFrame = ReactInternals.ReactDebugCurrentFrame; +var BEFORE_SLASH_RE = /^(.*)[\\\/]/; var describeComponentFrame = function (name, source, ownerName) { - return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); + var sourceInfo = ''; + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + if (match) { + var pathBeforeSlash = match[1]; + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + return '\n in ' + (name || 'Unknown') + sourceInfo; }; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. -var hasSymbol = typeof Symbol === 'function' && Symbol['for']; - -var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7; -var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8; -var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9; -var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca; -var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb; -var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol['for']('react.strict_mode') : 0xeacc; -var REACT_PROVIDER_TYPE = hasSymbol ? Symbol['for']('react.provider') : 0xeacd; -var REACT_CONTEXT_TYPE = hasSymbol ? Symbol['for']('react.context') : 0xeace; -var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol['for']('react.async_mode') : 0xeacf; -var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol['for']('react.forward_ref') : 0xead0; +var hasSymbol = typeof Symbol === 'function' && Symbol.for; + +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; +var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; +var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; +var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; +var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; +var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; + +var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; +var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; +var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; +var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; +var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable === 'undefined') { + if (maybeIterable === null || typeof maybeIterable !== 'object') { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; @@ -31366,113 +32215,182 @@ function getIteratorFn(maybeIterable) { return null; } -function getComponentName(fiber) { - var type = fiber.type; +var Pending = 0; +var Resolved = 1; +var Rejected = 2; +function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; +} + +function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName); +} + +function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + { + if (typeof type.tag === 'number') { + warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); + } + } if (typeof type === 'function') { - return type.displayName || type.name; + return type.displayName || type.name || null; } if (typeof type === 'string') { return type; } switch (type) { + case REACT_CONCURRENT_MODE_TYPE: + return 'ConcurrentMode'; case REACT_FRAGMENT_TYPE: - return 'ReactFragment'; + return 'Fragment'; case REACT_PORTAL_TYPE: - return 'ReactPortal'; - case REACT_CALL_TYPE: - return 'ReactCall'; - case REACT_RETURN_TYPE: - return 'ReactReturn'; + return 'Portal'; + case REACT_PROFILER_TYPE: + return 'Profiler'; + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + } + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_LAZY_TYPE: + { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + } + } } return null; } +var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + function describeFiber(fiber) { switch (fiber.tag) { - case IndeterminateComponent: - case FunctionalComponent: - case ClassComponent: - case HostComponent: + case HostRoot: + case HostPortal: + case HostText: + case Fragment: + case ContextProvider: + case ContextConsumer: + return ''; + default: var owner = fiber._debugOwner; var source = fiber._debugSource; - var name = getComponentName(fiber); + var name = getComponentName(fiber.type); var ownerName = null; if (owner) { - ownerName = getComponentName(owner); + ownerName = getComponentName(owner.type); } return describeComponentFrame(name, source, ownerName); - default: - return ''; } } -// This function can only be called with a work-in-progress fiber and -// only during begin or complete phase. Do not call it under any other -// circumstances. -function getStackAddendumByWorkInProgressFiber(workInProgress) { +function getStackByFiberInDevAndProd(workInProgress) { var info = ''; var node = workInProgress; do { info += describeFiber(node); - // Otherwise this return pointer might point to the wrong tree: - node = node['return']; + node = node.return; } while (node); return info; } -function getCurrentFiberOwnerName$1() { +var current = null; +var phase = null; + +function getCurrentFiberOwnerNameInDevOrNull() { { - var fiber = ReactDebugCurrentFiber.current; - if (fiber === null) { + if (current === null) { return null; } - var owner = fiber._debugOwner; + var owner = current._debugOwner; if (owner !== null && typeof owner !== 'undefined') { - return getComponentName(owner); + return getComponentName(owner.type); } } return null; } -function getCurrentFiberStackAddendum$1() { +function getCurrentFiberStackInDev() { { - var fiber = ReactDebugCurrentFiber.current; - if (fiber === null) { - return null; + if (current === null) { + return ''; } // Safe because if current fiber exists, we are reconciling, // and it is guaranteed to be the work-in-progress version. - return getStackAddendumByWorkInProgressFiber(fiber); + return getStackByFiberInDevAndProd(current); } - return null; + return ''; } function resetCurrentFiber() { - ReactDebugCurrentFrame.getCurrentStack = null; - ReactDebugCurrentFiber.current = null; - ReactDebugCurrentFiber.phase = null; + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + phase = null; + } } function setCurrentFiber(fiber) { - ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum$1; - ReactDebugCurrentFiber.current = fiber; - ReactDebugCurrentFiber.phase = null; + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + phase = null; + } } -function setCurrentPhase(phase) { - ReactDebugCurrentFiber.phase = phase; +function setCurrentPhase(lifeCyclePhase) { + { + phase = lifeCyclePhase; + } } -var ReactDebugCurrentFiber = { - current: null, - phase: null, - resetCurrentFiber: resetCurrentFiber, - setCurrentFiber: setCurrentFiber, - setCurrentPhase: setCurrentPhase, - getCurrentFiberOwnerName: getCurrentFiberOwnerName$1, - getCurrentFiberStackAddendum: getCurrentFiberStackAddendum$1 -}; +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = warningWithoutStack$1; + +{ + warning = function (condition, format) { + if (condition) { + return; + } + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + // eslint-disable-next-line react-internal/warning-and-invariant-args + + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack])); + }; +} + +var warning$1 = warning; // A reserved attribute. // It is handled by React separately and shouldn't be written to the DOM. @@ -31516,14 +32434,15 @@ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); +var hasOwnProperty = Object.prototype.hasOwnProperty; var illegalAttributeNameCache = {}; var validatedAttributeNameCache = {}; function isAttributeNameSafe(attributeName) { - if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { return true; } - if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { return false; } if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { @@ -31532,7 +32451,7 @@ function isAttributeNameSafe(attributeName) { } illegalAttributeNameCache[attributeName] = true; { - warning(false, 'Invalid attribute name: `%s`', attributeName); + warning$1(false, 'Invalid attribute name: `%s`', attributeName); } return false; } @@ -31584,6 +32503,9 @@ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { return true; } + if (isCustomComponentTag) { + return false; + } if (propertyInfo !== null) { switch (propertyInfo.type) { case BOOLEAN: @@ -31626,7 +32548,8 @@ var properties = {}; properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty name, // attributeName null); -}); +} // attributeNamespace +); // A few React string attributes have a different name. // This is a mapping from React prop names to the attribute names. @@ -31637,7 +32560,8 @@ var properties = {}; properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty attributeName, // attributeName null); -}); +} // attributeNamespace +); // These are "enumerated" HTML attributes that accept "true" and "false". // In React, we let users pass `true` and `false` even though technically @@ -31646,17 +32570,19 @@ var properties = {}; properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty name.toLowerCase(), // attributeName null); -}); +} // attributeNamespace +); // These are "enumerated" SVG attributes that accept "true" and "false". // In React, we let users pass `true` and `false` even though technically // these aren't boolean attributes (they are coerced to strings). // Since these are SVG attributes, their attribute names are case-sensitive. -['autoReverse', 'externalResourcesRequired', 'preserveAlpha'].forEach(function (name) { +['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty name, // attributeName null); -}); +} // attributeNamespace +); // These are HTML boolean attributes. ['allowFullScreen', 'async', @@ -31668,7 +32594,8 @@ var properties = {}; properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty name.toLowerCase(), // attributeName null); -}); +} // attributeNamespace +); // These are the few React props that we set as DOM properties // rather than attributes. These are all booleans. @@ -31677,31 +32604,35 @@ var properties = {}; // disabled with `removeAttribute`. We have special logic for handling this. 'multiple', 'muted', 'selected'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty - name.toLowerCase(), // attributeName + name, // attributeName null); -}); +} // attributeNamespace +); // These are HTML attributes that are "overloaded booleans": they behave like // booleans, but can also accept a string value. ['capture', 'download'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty - name.toLowerCase(), // attributeName + name, // attributeName null); -}); +} // attributeNamespace +); // These are HTML attributes that must be positive numbers. ['cols', 'rows', 'size', 'span'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty - name.toLowerCase(), // attributeName + name, // attributeName null); -}); +} // attributeNamespace +); // These are HTML attributes that must be numbers. ['rowSpan', 'start'].forEach(function (name) { properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty name.toLowerCase(), // attributeName null); -}); +} // attributeNamespace +); var CAMELIZE = /[\-\:]([a-z])/g; var capitalize = function (token) { @@ -31717,7 +32648,8 @@ var capitalize = function (token) { var name = attributeName.replace(CAMELIZE, capitalize); properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty attributeName, null); -}); +} // attributeNamespace +); // String SVG attributes with the xlink namespace. ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function (attributeName) { @@ -31888,11 +32820,36 @@ function setValueForProperty(node, name, value, isCustomComponentTag) { } } +// Flow does not allow string concatenation of most non-string types. To work +// around this limitation, we use an opaque type that can only be obtained by +// passing the value through getToStringValue first. +function toString(value) { + return '' + value; +} + +function getToStringValue(value) { + switch (typeof value) { + case 'boolean': + case 'number': + case 'object': + case 'string': + case 'undefined': + return value; + default: + // function, symbol are assigned as empty strings + return ''; + } +} + +var ReactDebugCurrentFrame$1 = null; + var ReactControlledValuePropTypes = { checkPropTypes: null }; { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { button: true, checkbox: true, @@ -31905,13 +32862,13 @@ var ReactControlledValuePropTypes = { var propTypes = { value: function (props, propName, componentName) { - if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { + if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null) { return null; } return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); }, checked: function (props, propName, componentName) { - if (!props[propName] || props.onChange || props.readOnly || props.disabled) { + if (props.onChange || props.readOnly || props.disabled || props[propName] == null) { return null; } return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); @@ -31922,15 +32879,56 @@ var ReactControlledValuePropTypes = { * Provide a linked `value` attribute for controlled forms. You should not use * this outside of the ReactDOM controlled form components. */ - ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) { - checkPropTypes(propTypes, props, 'prop', tagName, getStack); + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$1.getStackAddendum); }; } -// TODO: direct imports like some-package/src/* are bad. Fix me. -var getCurrentFiberOwnerName = ReactDebugCurrentFiber.getCurrentFiberOwnerName; -var getCurrentFiberStackAddendum = ReactDebugCurrentFiber.getCurrentFiberStackAddendum; +var enableUserTimingAPI = true; + +var enableHooks = false; +// Helps identify side effects in begin-phase lifecycle hooks and setState reducers: +var debugRenderPhaseSideEffects = false; + +// In some cases, StrictMode should also double-render lifecycles. +// This can be confusing for tests though, +// And it can be bad for performance in production. +// This feature flag can be used to control the behavior: +var debugRenderPhaseSideEffectsForStrictMode = true; + +// To preserve the "Pause on caught exceptions" behavior of the debugger, we +// replay the begin phase of a failed component inside invokeGuardedCallback. +var replayFailedUnitOfWorkWithInvokeGuardedCallback = true; + +// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: +var warnAboutDeprecatedLifecycles = false; + +// Gather advanced timing metrics for Profiler subtrees. +var enableProfilerTimer = true; + +// Trace which interactions trigger each commit. +var enableSchedulerTracing = true; + +// Only used in www builds. + // TODO: true? Here it might just be false. + +// Only used in www builds. + + +// Only used in www builds. + + +// React Fire: prevent the value and checked attributes from syncing +// with their related DOM properties +var disableInputAttributeSyncing = false; + +// These APIs will no longer be "unstable" in the upcoming 16.7 release, +// Control this behavior with a flag to support 16.6 minor releases in the meanwhile. +var enableStableConcurrentModeAPIs = false; + +var warnAboutShorthandPropertyCollision = false; +// TODO: direct imports like some-package/src/* are bad. Fix me. var didWarnValueDefaultValue = false; var didWarnCheckedDefaultChecked = false; var didWarnControlledToUncontrolled = false; @@ -31974,14 +32972,14 @@ function getHostProps(element, props) { function initWrapperState(element, props) { { - ReactControlledValuePropTypes.checkPropTypes('input', props, getCurrentFiberStackAddendum); + ReactControlledValuePropTypes.checkPropTypes('input', props); if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { - warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName() || 'A component', props.type); + warning$1(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); didWarnCheckedDefaultChecked = true; } if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { - warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName() || 'A component', props.type); + warning$1(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); didWarnValueDefaultValue = true; } } @@ -31991,7 +32989,7 @@ function initWrapperState(element, props) { node._wrapperState = { initialChecked: props.checked != null ? props.checked : props.defaultChecked, - initialValue: getSafeValue(props.value != null ? props.value : defaultValue), + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), controlled: isControlled(props) }; } @@ -32010,56 +33008,140 @@ function updateWrapper(element, props) { var _controlled = isControlled(props); if (!node._wrapperState.controlled && _controlled && !didWarnUncontrolledToControlled) { - warning(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum()); + warning$1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type); didWarnUncontrolledToControlled = true; } if (node._wrapperState.controlled && !_controlled && !didWarnControlledToUncontrolled) { - warning(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum()); + warning$1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type); didWarnControlledToUncontrolled = true; } } updateChecked(element, props); - var value = getSafeValue(props.value); + var value = getToStringValue(props.value); + var type = props.type; if (value != null) { - if (props.type === 'number') { + if (type === 'number') { if (value === 0 && node.value === '' || + // We explicitly want to coerce to number here if possible. // eslint-disable-next-line node.value != value) { - node.value = '' + value; + node.value = toString(value); } - } else if (node.value !== '' + value) { - node.value = '' + value; + } else if (node.value !== toString(value)) { + node.value = toString(value); } + } else if (type === 'submit' || type === 'reset') { + // Submit/reset inputs need the attribute removed completely to avoid + // blank-text buttons. + node.removeAttribute('value'); + return; } - if (props.hasOwnProperty('value')) { - setDefaultValue(node, props.type, value); - } else if (props.hasOwnProperty('defaultValue')) { - setDefaultValue(node, props.type, getSafeValue(props.defaultValue)); - } - - if (props.checked == null && props.defaultChecked != null) { - node.defaultChecked = !!props.defaultChecked; + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, React only assigns a new value + // whenever the defaultValue React prop has changed. When not present, + // React does nothing + if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } else { + // When syncing the value attribute, the value comes from a cascade of + // properties: + // 1. The value React property + // 2. The defaultValue React property + // 3. Otherwise there should be no change + if (props.hasOwnProperty('value')) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the attribute is directly + // controllable from the defaultValue React property. It needs to be + // updated as new props come in. + if (props.defaultChecked == null) { + node.removeAttribute('checked'); + } else { + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, it only changes when it needs + // to be removed, such as transitioning from a checkbox into a text input + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } } } -function postMountWrapper(element, props) { +function postMountWrapper(element, props, isHydrating) { var node = element; + // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { + var type = props.type; + var isButton = type === 'submit' || type === 'reset'; + + // Avoid setting value attribute on submit/reset inputs as it overrides the + // default value provided by the browser. See: #12872 + if (isButton && (props.value === undefined || props.value === null)) { + return; + } + + var _initialValue = toString(node._wrapperState.initialValue); + // Do not assign value if it is already set. This prevents user text input // from being lost during SSR hydration. - if (node.value === '') { - node.value = '' + node._wrapperState.initialValue; + if (!isHydrating) { + if (disableInputAttributeSyncing) { + var value = getToStringValue(props.value); + + // When not syncing the value attribute, the value property points + // directly to the React prop. Only assign it if it exists. + if (value != null) { + // Always assign on buttons so that it is possible to assign an + // empty string to clear button text. + // + // Otherwise, do not re-assign the value property if is empty. This + // potentially avoids a DOM write and prevents Firefox (~60.0.1) from + // prematurely marking required inputs as invalid. Equality is compared + // to the current value in case the browser provided value is not an + // empty string. + if (isButton || value !== node.value) { + node.value = toString(value); + } + } + } else { + // When syncing the value attribute, the value property should use + // the wrapperState._initialValue property. This uses: + // + // 1. The value React property when present + // 2. The defaultValue React property when present + // 3. An empty string + if (_initialValue !== node.value) { + node.value = _initialValue; + } + } } - // value must be assigned before defaultValue. This fixes an issue where the - // visually displayed value of date inputs disappears on mobile Safari and Chrome: - // https://github.com/facebook/react/issues/7233 - node.defaultValue = '' + node._wrapperState.initialValue; + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, assign the value attribute + // directly from the defaultValue React property (when present) + var defaultValue = getToStringValue(props.defaultValue); + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } else { + // Otherwise, the value attribute is synchronized to the property, + // so we assign defaultValue to the same thing as the value property + // assignment step above. + node.defaultValue = _initialValue; + } } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug @@ -32071,8 +33153,34 @@ function postMountWrapper(element, props) { if (name !== '') { node.name = ''; } - node.defaultChecked = !node.defaultChecked; - node.defaultChecked = !node.defaultChecked; + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the checked property + // never gets assigned. It must be manually set. We don't want + // to do this when hydrating so that existing user input isn't + // modified + if (!isHydrating) { + updateChecked(element, props); + } + + // Only assign the checked attribute if it is defined. This saves + // a DOM write when controlling the checked attribute isn't needed + // (text inputs, submit/reset) + if (props.hasOwnProperty('defaultChecked')) { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, both the checked property and + // attribute are assigned at the same time using defaultChecked. This uses: + // + // 1. The checked React property when present + // 2. The defaultChecked React property when present + // 3. Otherwise, false + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + if (name !== '') { node.name = name; } @@ -32139,39 +33247,25 @@ function setDefaultValue(node, type, value) { // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || node.ownerDocument.activeElement !== node) { if (value == null) { - node.defaultValue = '' + node._wrapperState.initialValue; - } else if (node.defaultValue !== '' + value) { - node.defaultValue = '' + value; + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); } } } -function getSafeValue(value) { - switch (typeof value) { - case 'boolean': - case 'number': - case 'object': - case 'string': - case 'undefined': - return value; - default: - // function, symbol are assigned as empty strings - return ''; - } -} - var eventTypes$1 = { change: { phasedRegistrationNames: { bubbled: 'onChange', captured: 'onChangeCapture' }, - dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] + dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE] } }; function createAndAccumulateChangeEvent(inst, nativeEvent, target) { - var event = SyntheticEvent$1.getPooled(eventTypes$1.change, inst, nativeEvent, target); + var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target); event.type = 'change'; // Flag this event loop as needing state restore. enqueueStateRestore(target); @@ -32210,7 +33304,7 @@ function manualDispatchChangeEvent(nativeEvent) { } function runEventInBatch(event) { - runEventsInBatch(event, false); + runEventsInBatch(event); } function getInstIfValueChanged(targetInst) { @@ -32221,7 +33315,7 @@ function getInstIfValueChanged(targetInst) { } function getTargetInstForChangeEvent(topLevelType, targetInst) { - if (topLevelType === 'topChange') { + if (topLevelType === TOP_CHANGE) { return targetInst; } } @@ -32230,7 +33324,7 @@ function getTargetInstForChangeEvent(topLevelType, targetInst) { * SECTION: handle `input` event */ var isInputEventSupported = false; -if (ExecutionEnvironment.canUseDOM) { +if (canUseDOM) { // IE9 claims to support the input event but fails to trigger it when // deleting text, so we ignore its input events. isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9); @@ -32274,7 +33368,7 @@ function handlePropertyChange(nativeEvent) { } function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { - if (topLevelType === 'topFocus') { + if (topLevelType === TOP_FOCUS) { // In IE9, propertychange fires for most input events but is buggy and // doesn't fire when text is deleted, but conveniently, selectionchange // appears to fire in all of the remaining cases so we catch those and @@ -32287,14 +33381,14 @@ function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { // missed a blur event somehow. stopWatchingForValueChange(); startWatchingForValueChange(target, targetInst); - } else if (topLevelType === 'topBlur') { + } else if (topLevelType === TOP_BLUR) { stopWatchingForValueChange(); } } // For IE8 and IE9. function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { - if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { + if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. // @@ -32321,32 +33415,28 @@ function shouldUseClickEvent(elem) { } function getTargetInstForClickEvent(topLevelType, targetInst) { - if (topLevelType === 'topClick') { + if (topLevelType === TOP_CLICK) { return getInstIfValueChanged(targetInst); } } function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) { - if (topLevelType === 'topInput' || topLevelType === 'topChange') { + if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) { return getInstIfValueChanged(targetInst); } } -function handleControlledInputBlur(inst, node) { - // TODO: In IE, inst is occasionally null. Why? - if (inst == null) { - return; - } - - // Fiber and ReactDOM keep wrapper state in separate places - var state = inst._wrapperState || node._wrapperState; +function handleControlledInputBlur(node) { + var state = node._wrapperState; if (!state || !state.controlled || node.type !== 'number') { return; } - // If controlled, assign the value attribute to the current value on blur - setDefaultValue(node, 'number', node.value); + if (!disableInputAttributeSyncing) { + // If controlled, assign the value attribute to the current value on blur + setDefaultValue(node, 'number', node.value); + } } /** @@ -32395,8 +33485,8 @@ var ChangeEventPlugin = { } // When blurring, set the value attribute for number inputs - if (topLevelType === 'topBlur') { - handleControlledInputBlur(targetInst, targetNode); + if (topLevelType === TOP_BLUR) { + handleControlledInputBlur(targetNode); } } }; @@ -32410,18 +33500,13 @@ var ChangeEventPlugin = { * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that * preventing default on events is convenient in `SimpleEventPlugin` handlers. */ -var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; +var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; -var SyntheticUIEvent = SyntheticEvent$1.extend({ +var SyntheticUIEvent = SyntheticEvent.extend({ view: null, detail: null }); -/** - * Translation from modifier key to the associated property in the event. - * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers - */ - var modifierKeyToProp = { Alt: 'altKey', Control: 'ctrlKey', @@ -32429,9 +33514,14 @@ var modifierKeyToProp = { Shift: 'shiftKey' }; -// IE8 does not implement getModifierState so we simply map it to the only -// modifier keys exposed by the event itself, does not support Lock-keys. -// Currently, all major browsers except Chrome seems to support Lock-keys. +// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support +// getModifierState. If getModifierState is not supported, we map it to a set of +// modifier keys exposed by the event. In this case, Lock-keys are not supported. +/** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + function modifierStateGetter(keyArg) { var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; @@ -32446,6 +33536,12 @@ function getEventModifierState(nativeEvent) { return modifierStateGetter; } +var previousScreenX = 0; +var previousScreenY = 0; +// Use flags to signal movementX/Y has already been set +var isMovementXSet = false; +var isMovementYSet = false; + /** * @interface MouseEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ @@ -32466,17 +33562,72 @@ var SyntheticMouseEvent = SyntheticUIEvent.extend({ buttons: null, relatedTarget: function (event) { return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); + }, + movementX: function (event) { + if ('movementX' in event) { + return event.movementX; + } + + var screenX = previousScreenX; + previousScreenX = event.screenX; + + if (!isMovementXSet) { + isMovementXSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenX - screenX : 0; + }, + movementY: function (event) { + if ('movementY' in event) { + return event.movementY; + } + + var screenY = previousScreenY; + previousScreenY = event.screenY; + + if (!isMovementYSet) { + isMovementYSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenY - screenY : 0; } }); +/** + * @interface PointerEvent + * @see http://www.w3.org/TR/pointerevents/ + */ +var SyntheticPointerEvent = SyntheticMouseEvent.extend({ + pointerId: null, + width: null, + height: null, + pressure: null, + tangentialPressure: null, + tiltX: null, + tiltY: null, + twist: null, + pointerType: null, + isPrimary: null +}); + var eventTypes$2 = { mouseEnter: { registrationName: 'onMouseEnter', - dependencies: ['topMouseOut', 'topMouseOver'] + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER] }, mouseLeave: { registrationName: 'onMouseLeave', - dependencies: ['topMouseOut', 'topMouseOver'] + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER] + }, + pointerEnter: { + registrationName: 'onPointerEnter', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER] + }, + pointerLeave: { + registrationName: 'onPointerLeave', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER] } }; @@ -32491,11 +33642,15 @@ var EnterLeaveEventPlugin = { * the `mouseover` top-level event. */ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER; + var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT; + + if (isOverEvent && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { return null; } - if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { - // Must not be a mouse in or mouse out - ignoring. + + if (!isOutEvent && !isOverEvent) { + // Must not be a mouse or pointer in or out - ignoring. return null; } @@ -32515,7 +33670,7 @@ var EnterLeaveEventPlugin = { var from = void 0; var to = void 0; - if (topLevelType === 'topMouseOut') { + if (isOutEvent) { from = targetInst; var related = nativeEvent.relatedTarget || nativeEvent.toElement; to = related ? getClosestInstanceFromNode(related) : null; @@ -32530,16 +33685,33 @@ var EnterLeaveEventPlugin = { return null; } + var eventInterface = void 0, + leaveEventType = void 0, + enterEventType = void 0, + eventTypePrefix = void 0; + + if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) { + eventInterface = SyntheticMouseEvent; + leaveEventType = eventTypes$2.mouseLeave; + enterEventType = eventTypes$2.mouseEnter; + eventTypePrefix = 'mouse'; + } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) { + eventInterface = SyntheticPointerEvent; + leaveEventType = eventTypes$2.pointerLeave; + enterEventType = eventTypes$2.pointerEnter; + eventTypePrefix = 'pointer'; + } + var fromNode = from == null ? win : getNodeFromInstance$1(from); var toNode = to == null ? win : getNodeFromInstance$1(to); - var leave = SyntheticMouseEvent.getPooled(eventTypes$2.mouseLeave, from, nativeEvent, nativeEventTarget); - leave.type = 'mouseleave'; + var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget); + leave.type = eventTypePrefix + 'leave'; leave.target = fromNode; leave.relatedTarget = toNode; - var enter = SyntheticMouseEvent.getPooled(eventTypes$2.mouseEnter, to, nativeEvent, nativeEventTarget); - enter.type = 'mouseenter'; + var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget); + enter.type = eventTypePrefix + 'enter'; enter.target = toNode; enter.relatedTarget = fromNode; @@ -32549,6 +33721,58 @@ var EnterLeaveEventPlugin = { } }; +/*eslint-disable no-self-compare */ + +var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + +/** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ +function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + // Added the nonzero y check to make Flow happy, but it is redundant + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } +} + +/** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ +function shallowEqual(objA, objB) { + if (is(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + /** * `ReactInstanceMap` maintains a mapping from a public facing stateful * instance (key) and the internal representation (value). This allows public @@ -32591,14 +33815,19 @@ var ContentReset = /* */16; var Callback = /* */32; var DidCapture = /* */64; var Ref = /* */128; -var ErrLog = /* */256; -var Snapshot = /* */2048; +var Snapshot = /* */256; +var Passive = /* */512; + +// Passive & Update & Callback & Ref & Snapshot +var LifecycleEffectMask = /* */932; // Union of all host effects -var HostEffectMask = /* */2559; +var HostEffectMask = /* */1023; -var Incomplete = /* */512; -var ShouldCapture = /* */1024; +var Incomplete = /* */1024; +var ShouldCapture = /* */2048; + +var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; var MOUNTING = 1; var MOUNTED = 2; @@ -32612,15 +33841,15 @@ function isFiberMountedImpl(fiber) { if ((node.effectTag & Placement) !== NoEffect) { return MOUNTING; } - while (node['return']) { - node = node['return']; + while (node.return) { + node = node.return; if ((node.effectTag & Placement) !== NoEffect) { return MOUNTING; } } } else { - while (node['return']) { - node = node['return']; + while (node.return) { + node = node.return; } } if (node.tag === HostRoot) { @@ -32639,11 +33868,11 @@ function isFiberMounted(fiber) { function isMounted(component) { { - var owner = ReactCurrentOwner.current; + var owner = ReactCurrentOwner$1.current; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; var instance = ownerFiber.stateNode; - warning(instance._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber) || 'A component'); + !instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0; instance._warnedAboutRefsInRender = true; } } @@ -32676,7 +33905,7 @@ function findCurrentFiberUsingSlowPath(fiber) { var a = fiber; var b = alternate; while (true) { - var parentA = a['return']; + var parentA = a.return; var parentB = parentA ? parentA.alternate : null; if (!parentA || !parentB) { // We're at the root. @@ -32706,7 +33935,7 @@ function findCurrentFiberUsingSlowPath(fiber) { invariant(false, 'Unable to find node on an unmounted component.'); } - if (a['return'] !== b['return']) { + if (a.return !== b.return) { // The return pointer of A and the return pointer of B point to different // fibers. We assume that return pointers never criss-cross, so A must // belong to the child set of A.return, and B must belong to the child @@ -32783,7 +34012,7 @@ function findCurrentHostFiber(parent) { if (node.tag === HostComponent || node.tag === HostText) { return node; } else if (node.child) { - node.child['return'] = node; + node.child.return = node; node = node.child; continue; } @@ -32791,12 +34020,12 @@ function findCurrentHostFiber(parent) { return null; } while (!node.sibling) { - if (!node['return'] || node['return'] === currentParent) { + if (!node.return || node.return === currentParent) { return null; } - node = node['return']; + node = node.return; } - node.sibling['return'] = node['return']; + node.sibling.return = node.return; node = node.sibling; } // Flow needs the return null here, but ESLint complains about it. @@ -32816,7 +34045,7 @@ function findCurrentHostFiberWithNoPortals(parent) { if (node.tag === HostComponent || node.tag === HostText) { return node; } else if (node.child && node.tag !== HostPortal) { - node.child['return'] = node; + node.child.return = node; node = node.child; continue; } @@ -32824,12 +34053,12 @@ function findCurrentHostFiberWithNoPortals(parent) { return null; } while (!node.sibling) { - if (!node['return'] || node['return'] === currentParent) { + if (!node.return || node.return === currentParent) { return null; } - node = node['return']; + node = node.return; } - node.sibling['return'] = node['return']; + node.sibling.return = node.return; node = node.sibling; } // Flow needs the return null here, but ESLint complains about it. @@ -32850,7 +34079,7 @@ function addEventCaptureListener(element, eventType, listener) { * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent */ -var SyntheticAnimationEvent = SyntheticEvent$1.extend({ +var SyntheticAnimationEvent = SyntheticEvent.extend({ animationName: null, elapsedTime: null, pseudoElement: null @@ -32860,7 +34089,7 @@ var SyntheticAnimationEvent = SyntheticEvent$1.extend({ * @interface Event * @see http://www.w3.org/TR/clipboard-apis/ */ -var SyntheticClipboardEvent = SyntheticEvent$1.extend({ +var SyntheticClipboardEvent = SyntheticEvent.extend({ clipboardData: function (event) { return 'clipboardData' in event ? event.clipboardData : window.clipboardData; } @@ -33091,7 +34320,7 @@ var SyntheticTouchEvent = SyntheticUIEvent.extend({ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent */ -var SyntheticTransitionEvent = SyntheticEvent$1.extend({ +var SyntheticTransitionEvent = SyntheticEvent.extend({ propertyName: null, elapsedTime: null, pseudoElement: null @@ -33131,24 +34360,27 @@ var SyntheticWheelEvent = SyntheticMouseEvent.extend({ * bubbled: 'onAbort', * captured: 'onAbortCapture', * }, - * dependencies: ['topAbort'], + * dependencies: [TOP_ABORT], * }, * ... * }; - * topLevelEventsToDispatchConfig = { - * 'topAbort': { sameConfig } - * }; + * topLevelEventsToDispatchConfig = new Map([ + * [TOP_ABORT, { sameConfig }], + * ]); */ -var interactiveEventTypeNames = ['blur', 'cancel', 'click', 'close', 'contextMenu', 'copy', 'cut', 'doubleClick', 'dragEnd', 'dragStart', 'drop', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'mouseDown', 'mouseUp', 'paste', 'pause', 'play', 'rateChange', 'reset', 'seeked', 'submit', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange']; -var nonInteractiveEventTypeNames = ['abort', 'animationEnd', 'animationIteration', 'animationStart', 'canPlay', 'canPlayThrough', 'drag', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseMove', 'mouseOut', 'mouseOver', 'playing', 'progress', 'scroll', 'seeking', 'stalled', 'suspend', 'timeUpdate', 'toggle', 'touchMove', 'transitionEnd', 'waiting', 'wheel']; + +var interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_AUX_CLICK, 'auxClick'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']]; +var nonInteractiveEventTypeNames = [[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_DRAG, 'drag'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_LOAD_START, 'loadStart'], [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_PLAYING, 'playing'], [TOP_POINTER_MOVE, 'pointerMove'], [TOP_POINTER_OUT, 'pointerOut'], [TOP_POINTER_OVER, 'pointerOver'], [TOP_PROGRESS, 'progress'], [TOP_SCROLL, 'scroll'], [TOP_SEEKING, 'seeking'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']]; var eventTypes$4 = {}; var topLevelEventsToDispatchConfig = {}; -function addEventTypeNameToConfig(event, isInteractive) { +function addEventTypeNameToConfig(_ref, isInteractive) { + var topEvent = _ref[0], + event = _ref[1]; + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); var onEvent = 'on' + capitalizedEvent; - var topEvent = 'top' + capitalizedEvent; var type = { phasedRegistrationNames: { @@ -33162,15 +34394,15 @@ function addEventTypeNameToConfig(event, isInteractive) { topLevelEventsToDispatchConfig[topEvent] = type; } -interactiveEventTypeNames.forEach(function (eventTypeName) { - addEventTypeNameToConfig(eventTypeName, true); +interactiveEventTypeNames.forEach(function (eventTuple) { + addEventTypeNameToConfig(eventTuple, true); }); -nonInteractiveEventTypeNames.forEach(function (eventTypeName) { - addEventTypeNameToConfig(eventTypeName, false); +nonInteractiveEventTypeNames.forEach(function (eventTuple) { + addEventTypeNameToConfig(eventTuple, false); }); // Only used in DEV for exhaustiveness validation. -var knownHTMLTopLevelTypes = ['topAbort', 'topCancel', 'topCanPlay', 'topCanPlayThrough', 'topClose', 'topDurationChange', 'topEmptied', 'topEncrypted', 'topEnded', 'topError', 'topInput', 'topInvalid', 'topLoad', 'topLoadedData', 'topLoadedMetadata', 'topLoadStart', 'topPause', 'topPlay', 'topPlaying', 'topProgress', 'topRateChange', 'topReset', 'topSeeked', 'topSeeking', 'topStalled', 'topSubmit', 'topSuspend', 'topTimeUpdate', 'topToggle', 'topVolumeChange', 'topWaiting']; +var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING]; var SimpleEventPlugin = { eventTypes: eventTypes$4, @@ -33188,7 +34420,7 @@ var SimpleEventPlugin = { } var EventConstructor = void 0; switch (topLevelType) { - case 'topKeyPress': + case TOP_KEY_PRESS: // Firefox creates a keypress event for function keys too. This removes // the unwanted keypress events. Enter is however both printable and // non-printable. One would expect Tab to be as well (but it isn't). @@ -33196,76 +34428,87 @@ var SimpleEventPlugin = { return null; } /* falls through */ - case 'topKeyDown': - case 'topKeyUp': + case TOP_KEY_DOWN: + case TOP_KEY_UP: EventConstructor = SyntheticKeyboardEvent; break; - case 'topBlur': - case 'topFocus': + case TOP_BLUR: + case TOP_FOCUS: EventConstructor = SyntheticFocusEvent; break; - case 'topClick': + case TOP_CLICK: // Firefox creates a click event on right mouse clicks. This removes the // unwanted click events. if (nativeEvent.button === 2) { return null; } /* falls through */ - case 'topDoubleClick': - case 'topMouseDown': - case 'topMouseMove': - case 'topMouseUp': + case TOP_AUX_CLICK: + case TOP_DOUBLE_CLICK: + case TOP_MOUSE_DOWN: + case TOP_MOUSE_MOVE: + case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events /* falls through */ - case 'topMouseOut': - case 'topMouseOver': - case 'topContextMenu': + case TOP_MOUSE_OUT: + case TOP_MOUSE_OVER: + case TOP_CONTEXT_MENU: EventConstructor = SyntheticMouseEvent; break; - case 'topDrag': - case 'topDragEnd': - case 'topDragEnter': - case 'topDragExit': - case 'topDragLeave': - case 'topDragOver': - case 'topDragStart': - case 'topDrop': + case TOP_DRAG: + case TOP_DRAG_END: + case TOP_DRAG_ENTER: + case TOP_DRAG_EXIT: + case TOP_DRAG_LEAVE: + case TOP_DRAG_OVER: + case TOP_DRAG_START: + case TOP_DROP: EventConstructor = SyntheticDragEvent; break; - case 'topTouchCancel': - case 'topTouchEnd': - case 'topTouchMove': - case 'topTouchStart': + case TOP_TOUCH_CANCEL: + case TOP_TOUCH_END: + case TOP_TOUCH_MOVE: + case TOP_TOUCH_START: EventConstructor = SyntheticTouchEvent; break; - case 'topAnimationEnd': - case 'topAnimationIteration': - case 'topAnimationStart': + case TOP_ANIMATION_END: + case TOP_ANIMATION_ITERATION: + case TOP_ANIMATION_START: EventConstructor = SyntheticAnimationEvent; break; - case 'topTransitionEnd': + case TOP_TRANSITION_END: EventConstructor = SyntheticTransitionEvent; break; - case 'topScroll': + case TOP_SCROLL: EventConstructor = SyntheticUIEvent; break; - case 'topWheel': + case TOP_WHEEL: EventConstructor = SyntheticWheelEvent; break; - case 'topCopy': - case 'topCut': - case 'topPaste': + case TOP_COPY: + case TOP_CUT: + case TOP_PASTE: EventConstructor = SyntheticClipboardEvent; break; + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: + case TOP_POINTER_CANCEL: + case TOP_POINTER_DOWN: + case TOP_POINTER_MOVE: + case TOP_POINTER_OUT: + case TOP_POINTER_OVER: + case TOP_POINTER_UP: + EventConstructor = SyntheticPointerEvent; + break; default: { if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) { - warning(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType); + warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType); } } // HTML Events // @see http://www.w3.org/TR/html5/index.html#events-0 - EventConstructor = SyntheticEvent$1; + EventConstructor = SyntheticEvent; break; } var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); @@ -33289,8 +34532,8 @@ function findRootContainerNode(inst) { // TODO: It may be a good idea to cache this to prevent unnecessary DOM // traversal, but caching is difficult to do correctly without using a // mutation observer to listen for all DOM changes. - while (inst['return']) { - inst = inst['return']; + while (inst.return) { + inst = inst.return; } if (inst.tag !== HostRoot) { // This can happen if we're in a detached tree. @@ -33367,20 +34610,19 @@ function isEnabled() { /** * Traps top-level events by using event bubbling. * - * @param {string} topLevelType Record from `BrowserEventConstants`. - * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {number} topLevelType Number from `TopLevelEventTypes`. * @param {object} element Element on which to attach listener. * @return {?object} An object with a remove function which will forcefully * remove the listener. * @internal */ -function trapBubbledEvent(topLevelType, handlerBaseName, element) { +function trapBubbledEvent(topLevelType, element) { if (!element) { return null; } var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent; - addEventBubbleListener(element, handlerBaseName, + addEventBubbleListener(element, getRawEventName(topLevelType), // Check if interactive and wrap in interactiveUpdates dispatch.bind(null, topLevelType)); } @@ -33388,20 +34630,19 @@ function trapBubbledEvent(topLevelType, handlerBaseName, element) { /** * Traps a top-level event by using event capturing. * - * @param {string} topLevelType Record from `BrowserEventConstants`. - * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {number} topLevelType Number from `TopLevelEventTypes`. * @param {object} element Element on which to attach listener. * @return {?object} An object with a remove function which will forcefully * remove the listener. * @internal */ -function trapCapturedEvent(topLevelType, handlerBaseName, element) { +function trapCapturedEvent(topLevelType, element) { if (!element) { return null; } var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent; - addEventCaptureListener(element, handlerBaseName, + addEventCaptureListener(element, getRawEventName(topLevelType), // Check if interactive and wrap in interactiveUpdates dispatch.bind(null, topLevelType)); } @@ -33436,187 +34677,6 @@ function dispatchEvent(topLevelType, nativeEvent) { } } -var ReactDOMEventListener = Object.freeze({ - get _enabled () { return _enabled; }, - setEnabled: setEnabled, - isEnabled: isEnabled, - trapBubbledEvent: trapBubbledEvent, - trapCapturedEvent: trapCapturedEvent, - dispatchEvent: dispatchEvent -}); - -/** - * Generate a mapping of standard vendor prefixes using the defined style property and event name. - * - * @param {string} styleProp - * @param {string} eventName - * @returns {object} - */ -function makePrefixMap(styleProp, eventName) { - var prefixes = {}; - - prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); - prefixes['Webkit' + styleProp] = 'webkit' + eventName; - prefixes['Moz' + styleProp] = 'moz' + eventName; - prefixes['ms' + styleProp] = 'MS' + eventName; - prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); - - return prefixes; -} - -/** - * A list of event names to a configurable list of vendor prefixes. - */ -var vendorPrefixes = { - animationend: makePrefixMap('Animation', 'AnimationEnd'), - animationiteration: makePrefixMap('Animation', 'AnimationIteration'), - animationstart: makePrefixMap('Animation', 'AnimationStart'), - transitionend: makePrefixMap('Transition', 'TransitionEnd') -}; - -/** - * Event names that have already been detected and prefixed (if applicable). - */ -var prefixedEventNames = {}; - -/** - * Element to check for prefixes on. - */ -var style = {}; - -/** - * Bootstrap if a DOM exists. - */ -if (ExecutionEnvironment.canUseDOM) { - style = document.createElement('div').style; - - // On some platforms, in particular some releases of Android 4.x, - // the un-prefixed "animation" and "transition" properties are defined on the - // style object but the events that fire will still be prefixed, so we need - // to check if the un-prefixed events are usable, and if not remove them from the map. - if (!('AnimationEvent' in window)) { - delete vendorPrefixes.animationend.animation; - delete vendorPrefixes.animationiteration.animation; - delete vendorPrefixes.animationstart.animation; - } - - // Same as above - if (!('TransitionEvent' in window)) { - delete vendorPrefixes.transitionend.transition; - } -} - -/** - * Attempts to determine the correct vendor prefixed event name. - * - * @param {string} eventName - * @returns {string} - */ -function getVendorPrefixedEventName(eventName) { - if (prefixedEventNames[eventName]) { - return prefixedEventNames[eventName]; - } else if (!vendorPrefixes[eventName]) { - return eventName; - } - - var prefixMap = vendorPrefixes[eventName]; - - for (var styleProp in prefixMap) { - if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { - return prefixedEventNames[eventName] = prefixMap[styleProp]; - } - } - - return eventName; -} - -/** - * Types of raw signals from the browser caught at the top level. - * - * For events like 'submit' or audio/video events which don't consistently - * bubble (which we trap at a lower node than `document`), binding - * at `document` would cause duplicate events so we don't include them here. - */ -var topLevelTypes = { - topAnimationEnd: getVendorPrefixedEventName('animationend'), - topAnimationIteration: getVendorPrefixedEventName('animationiteration'), - topAnimationStart: getVendorPrefixedEventName('animationstart'), - topBlur: 'blur', - topCancel: 'cancel', - topChange: 'change', - topClick: 'click', - topClose: 'close', - topCompositionEnd: 'compositionend', - topCompositionStart: 'compositionstart', - topCompositionUpdate: 'compositionupdate', - topContextMenu: 'contextmenu', - topCopy: 'copy', - topCut: 'cut', - topDoubleClick: 'dblclick', - topDrag: 'drag', - topDragEnd: 'dragend', - topDragEnter: 'dragenter', - topDragExit: 'dragexit', - topDragLeave: 'dragleave', - topDragOver: 'dragover', - topDragStart: 'dragstart', - topDrop: 'drop', - topFocus: 'focus', - topInput: 'input', - topKeyDown: 'keydown', - topKeyPress: 'keypress', - topKeyUp: 'keyup', - topLoad: 'load', - topLoadStart: 'loadstart', - topMouseDown: 'mousedown', - topMouseMove: 'mousemove', - topMouseOut: 'mouseout', - topMouseOver: 'mouseover', - topMouseUp: 'mouseup', - topPaste: 'paste', - topScroll: 'scroll', - topSelectionChange: 'selectionchange', - topTextInput: 'textInput', - topToggle: 'toggle', - topTouchCancel: 'touchcancel', - topTouchEnd: 'touchend', - topTouchMove: 'touchmove', - topTouchStart: 'touchstart', - topTransitionEnd: getVendorPrefixedEventName('transitionend'), - topWheel: 'wheel' -}; - -// There are so many media events, it makes sense to just -// maintain a list of them. Note these aren't technically -// "top-level" since they don't bubble. We should come up -// with a better naming convention if we come to refactoring -// the event system. -var mediaEventTypes = { - topAbort: 'abort', - topCanPlay: 'canplay', - topCanPlayThrough: 'canplaythrough', - topDurationChange: 'durationchange', - topEmptied: 'emptied', - topEncrypted: 'encrypted', - topEnded: 'ended', - topError: 'error', - topLoadedData: 'loadeddata', - topLoadedMetadata: 'loadedmetadata', - topLoadStart: 'loadstart', - topPause: 'pause', - topPlay: 'play', - topPlaying: 'playing', - topProgress: 'progress', - topRateChange: 'ratechange', - topSeeked: 'seeked', - topSeeking: 'seeking', - topStalled: 'stalled', - topSuspend: 'suspend', - topTimeUpdate: 'timeupdate', - topVolumeChange: 'volumechange', - topWaiting: 'waiting' -}; - /** * Summary of `ReactBrowserEventEmitter` event handling: * @@ -33710,39 +34770,49 @@ function getListeningForDocument(mountAt) { * they bubble to document. * * @param {string} registrationName Name of listener (e.g. `onClick`). - * @param {object} contentDocumentHandle Document which owns the container + * @param {object} mountAt Container where to mount the listener */ -function listenTo(registrationName, contentDocumentHandle) { - var mountAt = contentDocumentHandle; +function listenTo(registrationName, mountAt) { var isListening = getListeningForDocument(mountAt); var dependencies = registrationNameDependencies[registrationName]; for (var i = 0; i < dependencies.length; i++) { var dependency = dependencies[i]; if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { - if (dependency === 'topScroll') { - trapCapturedEvent('topScroll', 'scroll', mountAt); - } else if (dependency === 'topFocus' || dependency === 'topBlur') { - trapCapturedEvent('topFocus', 'focus', mountAt); - trapCapturedEvent('topBlur', 'blur', mountAt); - - // to make sure blur and focus event listeners are only attached once - isListening.topBlur = true; - isListening.topFocus = true; - } else if (dependency === 'topCancel') { - if (isEventSupported('cancel', true)) { - trapCapturedEvent('topCancel', 'cancel', mountAt); - } - isListening.topCancel = true; - } else if (dependency === 'topClose') { - if (isEventSupported('close', true)) { - trapCapturedEvent('topClose', 'close', mountAt); - } - isListening.topClose = true; - } else if (topLevelTypes.hasOwnProperty(dependency)) { - trapBubbledEvent(dependency, topLevelTypes[dependency], mountAt); + switch (dependency) { + case TOP_SCROLL: + trapCapturedEvent(TOP_SCROLL, mountAt); + break; + case TOP_FOCUS: + case TOP_BLUR: + trapCapturedEvent(TOP_FOCUS, mountAt); + trapCapturedEvent(TOP_BLUR, mountAt); + // We set the flag for a single dependency later in this function, + // but this ensures we mark both as attached rather than just one. + isListening[TOP_BLUR] = true; + isListening[TOP_FOCUS] = true; + break; + case TOP_CANCEL: + case TOP_CLOSE: + if (isEventSupported(getRawEventName(dependency))) { + trapCapturedEvent(dependency, mountAt); + } + break; + case TOP_INVALID: + case TOP_SUBMIT: + case TOP_RESET: + // We listen to them on the target DOM elements. + // Some of them bubble so we don't want them to fire twice. + break; + default: + // By default, listen on the top level to all non-media events. + // Media events don't bubble so adding the listener wouldn't do anything. + var isMediaEvent = mediaEventTypes.indexOf(dependency) !== -1; + if (!isMediaEvent) { + trapBubbledEvent(dependency, mountAt); + } + break; } - isListening[dependency] = true; } } @@ -33760,6 +34830,18 @@ function isListeningToAllDependencies(registrationName, mountAt) { return true; } +function getActiveElement(doc) { + doc = doc || (typeof document !== 'undefined' ? document : undefined); + if (typeof doc === 'undefined') { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } +} + /** * Given any node return the first leaf node without children. * @@ -33824,7 +34906,10 @@ function getNodeForCharacterOffset(root, offset) { * @return {?object} */ function getOffsets(outerNode) { - var selection = window.getSelection && window.getSelection(); + var ownerDocument = outerNode.ownerDocument; + + var win = ownerDocument && ownerDocument.defaultView || window; + var selection = win.getSelection && win.getSelection(); if (!selection || selection.rangeCount === 0) { return null; @@ -33946,12 +35031,18 @@ function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNo * @param {object} offsets */ function setOffsets(node, offsets) { - if (!window.getSelection) { + var doc = node.ownerDocument || document; + var win = doc && doc.defaultView || window; + + // Edge fails with "Object expected" in some scenarios. + // (For instance: TinyMCE editor used in a list component that supports pasting to add more, + // fails when pasting 100+ items) + if (!win.getSelection) { return; } - var selection = window.getSelection(); - var length = node[getTextContentAccessor()].length; + var selection = win.getSelection(); + var length = node.textContent.length; var start = Math.min(offsets.start, length); var end = offsets.end === undefined ? start : Math.min(offsets.end, length); @@ -33970,7 +35061,7 @@ function setOffsets(node, offsets) { if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) { return; } - var range = document.createRange(); + var range = doc.createRange(); range.setStart(startMarker.node, startMarker.offset); selection.removeAllRanges(); @@ -33984,8 +35075,46 @@ function setOffsets(node, offsets) { } } +function isTextNode(node) { + return node && node.nodeType === TEXT_NODE; +} + +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + function isInDocument(node) { - return containsNode(document.documentElement, node); + return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); +} + +function getActiveElementDeep() { + var win = window; + var element = getActiveElement(); + while (element instanceof win.HTMLIFrameElement) { + // Accessing the contentDocument of a HTMLIframeElement can cause the browser + // to throw, e.g. if it has a cross-origin src attribute + try { + win = element.contentDocument.defaultView; + } catch (e) { + return element; + } + element = getActiveElement(win.document); + } + return element; } /** @@ -33995,13 +35124,18 @@ function isInDocument(node) { * Input selection module for React. */ +/** + * @hasSelectionCapabilities: we get the element types that support selection + * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` + * and `selectionEnd` rows. + */ function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); - return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); + return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true'); } function getSelectionInformation() { - var focusedElem = getActiveElement(); + var focusedElem = getActiveElementDeep(); return { focusedElem: focusedElem, selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null @@ -34014,11 +35148,11 @@ function getSelectionInformation() { * nodes and place them back in, resulting in focus being lost. */ function restoreSelection(priorSelectionInformation) { - var curFocusedElem = getActiveElement(); + var curFocusedElem = getActiveElementDeep(); var priorFocusedElem = priorSelectionInformation.focusedElem; var priorSelectionRange = priorSelectionInformation.selectionRange; if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { - if (hasSelectionCapabilities(priorFocusedElem)) { + if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { setSelection(priorFocusedElem, priorSelectionRange); } @@ -34035,7 +35169,9 @@ function restoreSelection(priorSelectionInformation) { } } - priorFocusedElem.focus(); + if (typeof priorFocusedElem.focus === 'function') { + priorFocusedElem.focus(); + } for (var i = 0; i < ancestors.length; i++) { var info = ancestors[i]; @@ -34090,7 +35226,7 @@ function setSelection(input, offsets) { } } -var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; +var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11; var eventTypes$3 = { select: { @@ -34098,7 +35234,7 @@ var eventTypes$3 = { bubbled: 'onSelect', captured: 'onSelectCapture' }, - dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] + dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE] } }; @@ -34122,8 +35258,9 @@ function getSelection(node) { start: node.selectionStart, end: node.selectionEnd }; - } else if (window.getSelection) { - var selection = window.getSelection(); + } else { + var win = node.ownerDocument && node.ownerDocument.defaultView || window; + var selection = win.getSelection(); return { anchorNode: selection.anchorNode, anchorOffset: selection.anchorOffset, @@ -34133,10 +35270,21 @@ function getSelection(node) { } } +/** + * Get document associated with the event target. + * + * @param {object} nativeEventTarget + * @return {Document} + */ +function getEventTargetDocument(eventTarget) { + return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument; +} + /** * Poll selection to see whether it's changed. * * @param {object} nativeEvent + * @param {object} nativeEventTarget * @return {?SyntheticEvent} */ function constructSelectEvent(nativeEvent, nativeEventTarget) { @@ -34144,7 +35292,9 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) { // selection (this matches native `select` event behavior). In HTML5, select // fires only on input and textarea thus if there's no focused element we // won't dispatch. - if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement()) { + var doc = getEventTargetDocument(nativeEventTarget); + + if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { return null; } @@ -34153,7 +35303,7 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) { if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { lastSelection = currentSelection; - var syntheticEvent = SyntheticEvent$1.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget); + var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget); syntheticEvent.type = 'select'; syntheticEvent.target = activeElement$1; @@ -34184,7 +35334,7 @@ var SelectEventPlugin = { eventTypes: eventTypes$3, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : nativeEventTarget.nodeType === DOCUMENT_NODE ? nativeEventTarget : nativeEventTarget.ownerDocument; + var doc = getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do // not extract events. See #3639. if (!doc || !isListeningToAllDependencies('onSelect', doc)) { @@ -34195,25 +35345,26 @@ var SelectEventPlugin = { switch (topLevelType) { // Track the input node that has focus. - case 'topFocus': + case TOP_FOCUS: if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { activeElement$1 = targetNode; activeElementInst$1 = targetInst; lastSelection = null; } break; - case 'topBlur': + case TOP_BLUR: activeElement$1 = null; activeElementInst$1 = null; lastSelection = null; break; // Don't fire the event while the user is dragging. This matches the // semantics of the native select event. - case 'topMouseDown': + case TOP_MOUSE_DOWN: mouseDown = true; break; - case 'topContextMenu': - case 'topMouseUp': + case TOP_CONTEXT_MENU: + case TOP_MOUSE_UP: + case TOP_DRAG_END: mouseDown = false; return constructSelectEvent(nativeEvent, nativeEventTarget); // Chrome and IE fire non-standard event when selection is changed (and @@ -34225,13 +35376,13 @@ var SelectEventPlugin = { // keyup, but we check on keydown as well in the case of holding down a // key, when multiple keydown events are fired but only one keyup is. // This is also our approach for IE handling, for the reason above. - case 'topSelectionChange': + case TOP_SELECTION_CHANGE: if (skipSelectionChangeEvent) { break; } // falls through - case 'topKeyDown': - case 'topKeyUp': + case TOP_KEY_DOWN: + case TOP_KEY_UP: return constructSelectEvent(nativeEvent, nativeEventTarget); } @@ -34243,7 +35394,7 @@ var SelectEventPlugin = { * Inject modules for resolving DOM hierarchy and plugin ordering. */ injection.injectEventPluginOrder(DOMEventPluginOrder); -injection$1.injectComponentTree(ReactDOMComponentTree); +setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1); /** * Some important event plugins included by default (without having to require @@ -34257,10650 +35408,13967 @@ injection.injectEventPluginsByName({ BeforeInputEventPlugin: BeforeInputEventPlugin }); -// Max 31 bit integer. The max integer size in V8 for 32-bit systems. -// Math.pow(2, 30) - 1 -// 0b111111111111111111111111111111 -var MAX_SIGNED_31_BIT_INT = 1073741823; - -// TODO: Use an opaque type once ESLint et al support the syntax - +var didWarnSelectedSetOnOption = false; +var didWarnInvalidChild = false; -var NoWork = 0; -var Sync = 1; -var Never = MAX_SIGNED_31_BIT_INT; +function flattenChildren(children) { + var content = ''; -var UNIT_SIZE = 10; -var MAGIC_NUMBER_OFFSET = 2; + // Flatten children. We'll warn if they are invalid + // during validateProps() which runs for hydration too. + // Note that this would throw on non-element objects. + // Elements are stringified (which is normally irrelevant + // but matters for ). + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + content += child; + // Note: we don't warn about invalid children here. + // Instead, this is done separately below so that + // it happens during the hydration codepath too. + }); -// 1 unit of expiration time represents 10ms. -function msToExpirationTime(ms) { - // Always add an offset so that we don't clash with the magic number for NoWork. - return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET; + return content; } -function expirationTimeToMs(expirationTime) { - return (expirationTime - MAGIC_NUMBER_OFFSET) * UNIT_SIZE; -} +/** + * Implements an