From 24a47dfa9d25c943bf1b51a1daf87140f76b3fbb Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 6 Jun 2018 03:38:41 +0200 Subject: displaying these gray ass thumbnails --- public/assets/css/css.css | 15 + public/bundle.js | 85971 +++++++++++++++++++++++++++++++++----------- public/bundle.js.map | 2 +- 3 files changed, 65329 insertions(+), 20659 deletions(-) (limited to 'public') diff --git a/public/assets/css/css.css b/public/assets/css/css.css index 5fcc1af..8e92070 100644 --- a/public/assets/css/css.css +++ b/public/assets/css/css.css @@ -141,6 +141,10 @@ section { .group h3 { margin-bottom: 3px; } +.group p { + width: 250px; + line-height: 1.5; +} .gray { color: #888; opacity: 0.5; @@ -494,6 +498,17 @@ section { cursor: pointer; } +/* pix2wav spectrogram builder */ +.fileMetadata .param > span:nth-child(1) { + width: 100px; +} +.spectrogramBuilder { + min-height: 300px; + border-bottom: 1px solid #888; + padding-bottom: 10px; + margin-bottom: 10px; +} + .opaque { background: white; padding: 10px; diff --git a/public/bundle.js b/public/bundle.js index 58dd026..340fd3a 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -321,13 +321,17 @@ var as_type = exports.as_type = function as_type(a, b) { return [a, b].join('_').toUpperCase(); }; -var crud_type = exports.crud_type = function crud_type(type) { - var actions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - return actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort']).reduce(function (a, b) { +var with_type = exports.with_type = function with_type(type, actions) { + return actions.reduce(function (a, b) { return (a[b] = as_type(type, b)) && a; }, {}); }; +var crud_type = exports.crud_type = function crud_type(type) { + var actions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + return with_type(type, actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort'])); +}; + /***/ }), /***/ "./app/client/api/crud.upload.js": @@ -857,6 +861,977 @@ function parseTumblrPost(media_list, post) { /***/ }), +/***/ "./app/client/audio/lib/draw.js": +/*!**************************************!*\ + !*** ./app/client/audio/lib/draw.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.spectrum = spectrum; +exports.raw_spectrum = raw_spectrum; + +var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js"); + +var _util2 = _interopRequireDefault(_util); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var scratch = document.createElement('canvas'); +var scratchCtx = scratch.getContext('2d-lodpi'); + +var w = 256; +var h = 256; + +function spectrum(spec, x0, y0, ww, hh) { + var data = spec.data; + var fft_size = spec.fft_size; + var half_fft_size = spec.fft_size / 2; + var spec_len = data.length; + + scratch.width = data.length; + scratch.height = half_fft_size; + + var imageData = ctx.createImageData(scratch.width, scratch.height); + var pixels = imageData.data; + + var i = void 0, + j = void 0, + u = void 0, + v = void 0, + _r = void 0, + _i = void 0, + col = void 0, + hsl = void 0; + + for (i = 0; i < spec_len; i++) { + col = data[i]; + + for (j = 0; j < half_fft_size; j++) { + u = ((half_fft_size - j) * spec_len + i) * 4; + v = j * 2; + _r = col[v]; + _i = mod(col[v + 1], Math.PI * 2) / (Math.PI * 2); + hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10)); + // red - real part + // pixels[u] = _r * 127 + 127 + // // green - imag part + // pixels[u+1] = _i * 127 + 127 + // // blue - magnitude + // pixels[u+2] = Math.sqrt(Math.pow(_r, 2) + Math.pow(_i, 2)) * 128 + 127 + // pixels[u+3] = 255 + pixels[u] = hsl[0]; + pixels[u + 1] = hsl[1]; + pixels[u + 2] = hsl[2]; + pixels[u + 3] = 255; + } + } + + scratchCtx.putImageData(imageData, 0, 0); + + var pcm_length = spec.fft_overlap * spec_len; + + x0 = x0 * devicePixelRatio || 0; + y0 = y0 * devicePixelRatio || Math.floor(h / 4); + ww = ww * devicePixelRatio || w; + hh = hh * devicePixelRatio || h / 4; + + var width = Math.round(pcm_length / spec.sr * pixels_per_second); + var height = Math.floor(hh); + + ctx.save(); + clear(1, x0, y0, w, height); + ctx.drawImage(scratch, x0, y0, width, height); + ctx.restore(); +} + +function raw_spectrum(spec, x0, y0, ww, hh, def_min_r, def_min_i) { + var data = spec.data; + var fft_size = spec.fft_size; + var half_fft_size = spec.fft_size / 2; + var spec_len = data.length; + + var _scratch = document.createElement('canvas'); + var _scratchCtx = _scratch.getContext('2d-lodpi'); + _scratch.width = data.length; + _scratch.height = half_fft_size; + // console.log("spectrum w/h:", _scratch.width, _scratch.height) + + var imageData = _scratchCtx.createImageData(_scratch.width, _scratch.height); + var pixels = imageData.data; + + var i = void 0, + j = void 0, + u = void 0, + v = void 0, + _r = void 0, + _i = void 0, + col = void 0, + hsl = void 0; + // let min_r = Infinity, max_r = -Infinity + // let min_i = Infinity, max_i = -Infinity + + // determined empirically.. + // let min_r = -60.4894057005308 + // let max_r = 107.23800966675353 + // let min_i = -59.4894057005308 + // let max_i = 108.23800966675353 + var min_r = -def_min_r; + var max_r = def_min_r; + var min_i = -def_min_i; + var max_i = def_min_i; + var delta_r = max_r - min_r; + var delta_i = max_i - min_i; + var mean_r = 0; + var mean_i = 0; + var sum_mean_r = 0, + sum_mean_i = 0; + var real = void 0, + imag = void 0; + + for (i = 0; i < spec_len; i++) { + col = data[i]; + mean_r = 0; + mean_i = 0; + + for (j = 0; j < half_fft_size; j++) { + u = (j * spec_len + i) * 4; + v = j * 2; + real = col[v]; + imag = col[v + 1]; + mean_r += real; + mean_i += imag; + _r = _util2.default.clamp((real - min_r) / delta_r * 255, 0, 255); + _i = _util2.default.clamp((imag - min_i) / delta_i * 255, 0, 255); + + // hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10)) + pixels[u + 0] = _r; + pixels[u + 1] = _i; + pixels[u + 2] = 127; // hsl[2] + pixels[u + 3] = 255; + + // min_r = Math.min(min_r, col[v]) + // max_r = Math.max(max_r, col[v]) + // min_i = Math.min(min_i, col[v]+1) + // max_i = Math.max(max_i, col[v]+1) + } + mean_r /= half_fft_size; + mean_i /= half_fft_size; + sum_mean_r += mean_r; + sum_mean_i += mean_i; + } + + sum_mean_r /= spec_len; + sum_mean_i /= spec_len; + // console.log(sum_mean_r, sum_mean_i) + // console.log("r:", min_r, max_r) + // console.log("i:", min_i, max_i) + _scratchCtx.putImageData(imageData, 0, 0); + + return { canvas: _scratch, imageData: imageData }; +} + +/***/ }), + +/***/ "./app/client/audio/lib/index.js": +/*!***************************************!*\ + !*** ./app/client/audio/lib/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.requestAudioContext = requestAudioContext; + +var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js"); + +var _tone2 = _interopRequireDefault(_tone); + +var _startAudioContext = __webpack_require__(/*! ./startAudioContext */ "./app/client/audio/lib/startAudioContext.js"); + +var _startAudioContext2 = _interopRequireDefault(_startAudioContext); + +var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function requestAudioContext(fn) { + if (_util.is_mobile) { + var container = document.createElement('div'); + var button = document.createElement('div'); + button.innerHTML = 'Tap to start - please unmute your phone'; + Object.assign(container.style, { + display: 'block', + position: 'absolute', + width: '100%', + height: '100%', + zIndex: '10000', + top: '0px', + left: '0px', + backgroundColor: 'rgba(0, 0, 0, 0.8)' + }); + Object.assign(button.style, { + display: 'block', + position: 'absolute', + left: '50%', + top: '50%', + padding: '20px', + backgroundColor: '#7F33ED', + color: 'white', + fontFamily: 'monospace', + borderRadius: '3px', + transform: 'translate3D(-50%,-50%,0)', + textAlign: 'center', + lineHeight: '1.5', + width: '150px' + }); + container.appendChild(button); + document.body.appendChild(container); + _startAudioContext2.default.setContext(_tone2.default.context); + _startAudioContext2.default.on(button); + _startAudioContext2.default.onStarted(function (_) { + container.remove(); + fn(); + }); + } else { + fn(); + } +} + +/***/ }), + +/***/ "./app/client/audio/lib/output.js": +/*!****************************************!*\ + !*** ./app/client/audio/lib/output.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js"); + +var _tone2 = _interopRequireDefault(_tone); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// const compressor = new Tone.Compressor(-30, 3).toMaster() + +var compressor = new _tone2.default.Compressor(-30, 3).toMaster(); +var gain = new _tone2.default.Gain(1).connect(compressor); + +exports.default = gain; + +/***/ }), + +/***/ "./app/client/audio/lib/spectrum.js": +/*!******************************************!*\ + !*** ./app/client/audio/lib/spectrum.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js"); + +var _tone2 = _interopRequireDefault(_tone); + +var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js"); + +var _signalWindows = __webpack_require__(/*! signal-windows */ "./node_modules/signal-windows/index.js"); + +var _fft = __webpack_require__(/*! fft.js */ "./node_modules/fft.js/lib/fft.js"); + +var _fft2 = _interopRequireDefault(_fft); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var fft_size = 512; +var fft_overlap = fft_size / 4; + +var fft = new _fft2.default(fft_size); + +function toSpectrum(pcm, sr) { + sr = sr || 44100; + var ham = _signalWindows.windows.construct('ham', fft_size); + var pcm_in = new Array(fft_size); + var pcm_length = pcm.length; + var pcm_q_length = Math.ceil(pcm_length / fft_size) * fft_size; + var i = void 0, + j = void 0, + fft_out = void 0, + data = []; + for (i = -fft_size; i < pcm_q_length; i += fft_overlap) { + for (j = 0; j < fft_size; j++) { + pcm_in[j] = pcm[i + j] * ham[j] || 0; + } + fft_out = fft.createComplexArray(); + fft.realTransform(fft_out, pcm_in); + fft.completeSpectrum(fft_out); + data.push(fft_out); + } + return { + data: data, + sr: sr, + fft_size: fft_size, + fft_overlap: fft_overlap + }; +} + +function fromSpectrum(spec) { + var data = spec.data; + var sr = spec.sr; + var fft_size = spec.fft_size; + var fft_overlap = spec.fft_overlap; + var spec_len = data.length; + + var ham = _signalWindows.windows.construct('ham', fft_size); + var out = fft.createComplexArray(); + var pcm_length = fft_overlap * spec_len; + + var audioBuffer = _tone2.default.context.createBuffer(1, pcm_length, sr); + var pcm = audioBuffer.getChannelData(0); + + var i = void 0, + j = void 0, + u = void 0, + col = void 0; + + for (i = 0; i < spec_len; i++) { + col = data[i]; + // for (j = fft_size; j < fft_size << 1; j++) { + // col[j] = 0 + // } + // if (i == 0) console.log(col) + fft.inverseTransform(out, col); + u = i * fft_overlap; + for (j = 0; j < fft_size; j++) { + pcm[u + j] += out[j * 2] * ham[j] || 0; + } + } + + fadeInOut(pcm, fft_size); + // console.log(pcm) + return audioBuffer; +} + +function fromImageData(imageData, sr, _r, _i) { + var pixels = imageData.data; + var w = imageData.width; + var h = imageData.height; + var data = new Array(w); + var x = void 0, + y = void 0, + u = void 0, + v = void 0, + v2 = void 0; + for (y = 0; y < h; y++) { + var col = data[y] = new Float32Array(h * 4); + for (x = 0; x < w; x++) { + u = (x * w + y) * 4; + v = x * 2; + col[v] = (pixels[u] / 255 - 0.5) * _r; + col[v + 1] = (pixels[u + 1] / 255 - 0.5) * _i; + v2 = (h - y + h) * 2; + col[v2] = col[v]; + col[v2 + 1] = 0; // col[v+1] + } + col[h * 2] = col[h * 2 + 1] = col[h * 2 - 1] = col[h * 2 - 2] = 0; + } + var spec = { + data: data, + sr: sr, + fft_size: fft_size, fft_overlap: fft_overlap + }; + return spec; +} + +function binToHz(spec, i) { + return i / spec.fft_size * spec.sr; +} + +function fadeInOut(pcm, fade_size) { + var pcm_length = pcm.length; + var fade = 0, + i = void 0; + for (i = 0; i < fade_size; i++) { + fade = i / fade_size; + fade *= fade; + pcm[i] *= fade; + pcm[pcm_length - i] *= fade; + } +} +function rotatePhase(spec, theta) { + var data = spec.data, + fft_size = spec.fft_size; + + var i = void 0, + j = void 0, + col = void 0, + len = data.length; + for (i = 0; i < len; i++) { + col = data[i]; + for (j = 0; j < fft_size; j++) { + col[j * 2 + 1] += theta; + } + } + return spec; +} + +function linearBins(spec, n) { + n = n || 1; + + var bins = [], + i = void 0, + q_i = void 0; + for (q_i = 0; q_i < n; q_i++) { + bins[q_i] = []; + } + var step = Math.floor(spec.fft_size / n); + var len_quantize_n = (0, _util.quantize)(spec.fft_size, n); + for (i = 0; i < len_quantize_n; i++) { + q_i = Math.floor(i / step); + bins[q_i] = bins[q_i] || []; + bins[q_i].push(i); + } + // leftover bins get put at end + for (; i < spec.fft_size; i++) { + bins[q_i].push(i); + } + return bins; +} +function logarithmicBins(spec) { + var bins = [], + i = void 0, + j = void 0, + q_i = void 0; + var binCount = Math.log2(spec.fft_size) - 1; + for (i = 0, q_i = 0, j = 0; i < binCount; i++) { + j += 1 << i; + bins[i] = []; + for (; q_i < j; q_i++) { + bins[i].push(q_i); + } + } + return bins; +} +function concatBins(bins) { + return bins.reduce(function (acc, cv) { + return acc.concat(cv); + }, []); +} +function reverseBins(bins) { + return bins.map(function (bin) { + return bin.reverse(); + }); +} +function minBins(bins) { + return bins.map(function (bin) { + var b = bin[0]; + return bin.map(function () { + return b; + }); + }); +} +function maxBins(bins) { + return bins.map(function (bin) { + var b = bin[bin.length - 1]; + return bin.map(function () { + return b; + }); + }); +} +function rotateSpectrum(spec, n) { + var fft_size = spec.fft_size; + + if (n && n < 1) { + n -= 0.5; + n *= fft_size; + } + n = Math.floor(n); + var order = new Array(fft_size), + i = void 0; + for (i = 0; i < fft_size; i++) { + order[i] = (0, _util.mod)(i + n, fft_size / 2); + } + return reorderBins(spec, order); +} +function cloneSpectrum(spec) { + var data = spec.data, + fft_size = spec.fft_size, + sr = spec.sr, + fft_overlap = spec.fft_overlap; + + var spec_len = data.length; + + var new_data = new Array(spec_len); + var i = void 0; + for (i = 0; i < spec_len; i++) { + new_data[i] = data[i].concat(); + new_data[i][2] = 0; + } + + return { + data: new_data, + fft_size: fft_size, + sr: sr, fft_overlap: fft_overlap + }; +} +function reverseSpectrum(spec) { + var new_spec = cloneSpectrum(spec); + new_spec.data = new_spec.data.reverse(); + return new_spec; +} +function shuffleSpectrum(spec) { + var fft_size = spec.fft_size; + + var order = new Array(fft_size), + i = void 0; + for (i = 0; i < fft_size; i++) { + order[i] = i; + } + (0, _util.shuffle)(order); + return reorderBins(spec, order); +} +function invertSpectrum(spec) { + var fft_size = spec.fft_size; + + var order = new Array(fft_size), + i = void 0; + for (i = 0; i < fft_size; i++) { + order[i] = fft_size - i - 1; + } + return reorderBins(spec, order); +} +function reorderBins(spec, order) { + var new_spec = cloneSpectrum(spec); + var data = spec.data, + sr = spec.sr, + fft_size = spec.fft_size, + fft_overlap = spec.fft_overlap; + + var spec_len = data.length; + var new_data = new_spec.data; + + + var i = void 0, + j = void 0, + col = void 0, + new_col = void 0; + for (j = order.length; j < fft_size; j++) { + order[j] = j; + } + + for (i = 0; i < spec_len; i++) { + col = data[i]; + new_col = new_data[i] = data[i].concat(); + col[0] = 0; + col[2] = 0; + col[4] = 0; + for (j = 0; j < fft_size / 2; j++) { + new_col[j * 2] = col[order[j] * 2]; + new_col[j * 2 + 1] = col[order[j] * 2 + 1]; + } + for (; j < fft_size; j++) { + new_col[j * 2] = 0; + new_col[j * 2 + 1] = 0; + } + } + + return { + data: new_data, + sr: sr, fft_size: fft_size, fft_overlap: fft_overlap + }; +} + +exports.default = { + toSpectrum: toSpectrum, fromSpectrum: fromSpectrum, fromImageData: fromImageData, binToHz: binToHz, + fadeInOut: fadeInOut, + cloneSpectrum: cloneSpectrum, + reverseSpectrum: reverseSpectrum, shuffleSpectrum: shuffleSpectrum, invertSpectrum: invertSpectrum, rotateSpectrum: rotateSpectrum, + reorderBins: reorderBins, + linearBins: linearBins, logarithmicBins: logarithmicBins, + concatBins: concatBins, + reverseBins: reverseBins, minBins: minBins, maxBins: maxBins, + rotatePhase: rotatePhase +}; + +/***/ }), + +/***/ "./app/client/audio/lib/startAudioContext.js": +/*!***************************************************!*\ + !*** ./app/client/audio/lib/startAudioContext.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; + +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; }; + +/** + * StartAudioContext.js + * @author Yotam Mann + * @license http://opensource.org/licenses/MIT MIT License + * @copyright 2016 Yotam Mann + */ +(function (root, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +})(undefined, function () { + + /** + * The StartAudioContext object + */ + var StartAudioContext = { + /** + * The audio context passed in by the user + * @type {AudioContext} + */ + context: null, + /** + * The TapListeners bound to the elements + * @type {Array} + * @private + */ + _tapListeners: [], + /** + * Callbacks to invoke when the audio context is started + * @type {Array} + * @private + */ + _onStarted: [] + }; + + /** + * Set the context + * @param {AudioContext} ctx + * @returns {StartAudioContext} + */ + StartAudioContext.setContext = function (ctx) { + StartAudioContext.context = ctx; + return StartAudioContext; + }; + + /** + * Add a tap listener to the audio context + * @param {Array|Element|String|jQuery} element + * @returns {StartAudioContext} + */ + StartAudioContext.on = function (element) { + if (Array.isArray(element) || NodeList && element instanceof NodeList) { + for (var i = 0; i < element.length; i++) { + StartAudioContext.on(element[i]); + } + } else if (typeof element === "string") { + StartAudioContext.on(document.querySelectorAll(element)); + } else if (element.jquery && typeof element.toArray === "function") { + StartAudioContext.on(element.toArray()); + } else if (Element && element instanceof Element) { + //if it's an element, create a TapListener + var tap = new TapListener(element, onTap); + StartAudioContext._tapListeners.push(tap); + } + return StartAudioContext; + }; + + /** + * Bind a callback to when the audio context is started. + * @param {Function} cb + * @return {StartAudioContext} + */ + StartAudioContext.onStarted = function (cb) { + //if it's already started, invoke the callback + if (StartAudioContext.isStarted()) { + cb(); + } else { + StartAudioContext._onStarted.push(cb); + } + return StartAudioContext; + }; + + /** + * returns true if the context is started + * @return {Boolean} + */ + StartAudioContext.isStarted = function () { + return StartAudioContext.context !== null && StartAudioContext.context.state === "running"; + }; + + /** + * @class Listens for non-dragging tap ends on the given element + * @param {Element} element + * @internal + */ + var TapListener = function TapListener(element) { + + this._dragged = false; + + this._element = element; + + this._bindedMove = this._moved.bind(this); + this._bindedEnd = this._ended.bind(this); + + element.addEventListener("touchmove", this._bindedMove); + element.addEventListener("touchend", this._bindedEnd); + element.addEventListener("mouseup", this._bindedEnd); + }; + + /** + * drag move event + */ + TapListener.prototype._moved = function (e) { + this._dragged = true; + }; + + /** + * tap ended listener + */ + TapListener.prototype._ended = function (e) { + if (!this._dragged) { + onTap(); + } + this._dragged = false; + }; + + /** + * remove all the bound events + */ + TapListener.prototype.dispose = function () { + this._element.removeEventListener("touchmove", this._bindedMove); + this._element.removeEventListener("touchend", this._bindedEnd); + this._element.removeEventListener("mouseup", this._bindedEnd); + this._bindedMove = null; + this._bindedEnd = null; + this._element = null; + }; + + /** + * Invoked the first time of the elements is tapped. + * Creates a silent oscillator when a non-dragging touchend + * event has been triggered. + */ + function onTap() { + //start the audio context with a silent oscillator + if (StartAudioContext.context && !StartAudioContext.isStarted()) { + var osc = StartAudioContext.context.createOscillator(); + var silent = StartAudioContext.context.createGain(); + silent.gain.value = 0; + osc.connect(silent); + silent.connect(StartAudioContext.context.destination); + var now = StartAudioContext.context.currentTime; + osc.start(now); + osc.stop(now + 0.5); + } + + //dispose all the tap listeners + if (StartAudioContext._tapListeners) { + for (var i = 0; i < StartAudioContext._tapListeners.length; i++) { + StartAudioContext._tapListeners[i].dispose(); + } + StartAudioContext._tapListeners = null; + } + //the onstarted callbacks + if (StartAudioContext._onStarted) { + for (var j = 0; j < StartAudioContext._onStarted.length; j++) { + StartAudioContext._onStarted[j](); + } + StartAudioContext._onStarted = null; + } + } + + return StartAudioContext; +}); + +/***/ }), + +/***/ "./app/client/audio/wav2pix.js": +/*!*************************************!*\ + !*** ./app/client/audio/wav2pix.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.buildZip = exports.renderFrames = exports.loadPCM = exports.loadBuffer = undefined; + +var _types = __webpack_require__(/*! ../types */ "./app/client/types.js"); + +var _types2 = _interopRequireDefault(_types); + +var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js"); + +var _tone2 = _interopRequireDefault(_tone); + +var _jszip = __webpack_require__(/*! jszip */ "./node_modules/jszip/lib/index.js"); + +var _jszip2 = _interopRequireDefault(_jszip); + +var _fileSaver = __webpack_require__(/*! file-saver */ "./node_modules/file-saver/FileSaver.js"); + +var _fileSaver2 = _interopRequireDefault(_fileSaver); + +var _draw = __webpack_require__(/*! ./lib/draw */ "./app/client/audio/lib/draw.js"); + +var draw = _interopRequireWildcard(_draw); + +var _output = __webpack_require__(/*! ./lib/output */ "./app/client/audio/lib/output.js"); + +var _output2 = _interopRequireDefault(_output); + +var _spectrum = __webpack_require__(/*! ./lib/spectrum */ "./app/client/audio/lib/spectrum.js"); + +var _spectrum2 = _interopRequireDefault(_spectrum); + +var _lib = __webpack_require__(/*! ./lib */ "./app/client/audio/lib/index.js"); + +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; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var FRAME_LENGTH = 126 * 255; +var FRAME_OFFSET = FRAME_LENGTH / 4; + +var _r = 8; +var _i = 8; + +// requestAudioContext(() => {}) + +var loadBuffer = exports.loadBuffer = function loadBuffer(file) { + return new Promise(function (resolve, reject) { + var url = URL.createObjectURL(file); + var buffer = new _tone2.default.Buffer(url, loadBuffer, function (err) { + console.error('err', err); + reject(err); + }); + function loadBuffer() { + URL.revokeObjectURL(url); + resolve(buffer); + } + }); +}; + +var loadPCM = exports.loadPCM = function loadPCM(file) { + return new Promise(function (resolve, reject) { + loadBuffer(file).then(function (buffer) { + var pcm = buffer._buffer.getChannelData(0); + var sr = buffer._buffer.sampleRate; + if (!pcm) return reject(); + console.log(buffer, pcm, sr); + resolve({ buffer: buffer, pcm: pcm, sr: sr }); + }); + }); +}; + +var renderFrames = exports.renderFrames = function renderFrames(file, _ref) { + var _ref$frame_offset = _ref.frame_offset, + frame_offset = _ref$frame_offset === undefined ? FRAME_OFFSET : _ref$frame_offset, + _ref$max = _ref.max, + max = _ref$max === undefined ? 10 : _ref$max; + return function (dispatch) { + return new Promise(function (resolve, reject) { + loadPCM(file).then(function (_ref2) { + var buffer = _ref2.buffer, + pcm = _ref2.pcm, + sr = _ref2.sr; + + dispatch({ type: _types2.default.wav2pix.loaded_buffer }); + var canvases = []; + for (var offset = 0, count = 0, _len = pcm.length - FRAME_LENGTH; offset < _len && count < max; offset += frame_offset, count += 1) { + canvases.push(render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count)); + } + dispatch({ type: _types2.default.wav2pix.draw_finish }); + resolve(canvases); + }); + }); + }; +}; + +var buildZip = exports.buildZip = function buildZip(name, file, opt) { + return function (dispatch) { + return new Promise(function (resolve, reject) { + var frame_offset = opt.frame_offset || FRAME_OFFSET; + loadPCM(file).then(function (_ref3) { + var buffer = _ref3.buffer, + pcm = _ref3.pcm, + sr = _ref3.sr; + + dispatch({ type: _types2.default.wav2pix.loaded_buffer }); + + var zip = new _jszip2.default(); + var zip_folder = zip.folder("wav2pix_" + name); + + for (var offset = 0, count = 0, _len = pcm.length - FRAME_LENGTH; offset < _len; offset += frame_offset, count += 1) { + if (count % 100 === 0) { + dispatch({ type: _types2.default.wav2pix.draw_progress, count: count }); + } + render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count, zip_folder); + } + + // dispatch event + dispatch({ type: _types2.default.wav2pix.draw_finish }); + zip.generateAsync({ type: "blob" }).then(function (content) { + dispatch({ type: _types2.default.wav2pix.load_zip }); + // FileSaver.saveAs(content, "wav2pix_" + name + ".zip") + resolve(content); + }); + }); + }); + }; +}; + +function render(pcm, sr, count, zip) { + var fft = _spectrum2.default.toSpectrum(pcm, sr); + // console.log('render', fft) + // const pcm_rev = pcm.slice().reverse() + // const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr) + + var _draw$raw_spectrum = draw.raw_spectrum(fft, 0, 256, 0, 256, _r, _i), + canvas = _draw$raw_spectrum.canvas, + imageData = _draw$raw_spectrum.imageData; + + if (zip) { + var name = sprintf('frame_%05d.png', count); + var dataURL = canvas.toDataURL("image/png"); + zip.file(name, dataURL.split(',')[1], { base64: true }); + } + return { fft: fft, canvas: canvas, imageData: imageData }; +} + +/***/ }), + /***/ "./app/client/common/audioPlayer/audioPlayer.actions.js": /*!**************************************************************!*\ !*** ./app/client/common/audioPlayer/audioPlayer.actions.js ***! @@ -1687,6 +2662,95 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)( /***/ }), +/***/ "./app/client/common/index.js": +/*!************************************!*\ + !*** ./app/client/common/index.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Button = exports.Select = exports.Slider = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Player = exports.Gallery = exports.FileUpload = exports.FileRow = exports.FileList = exports.Header = exports.Progress = exports.Loading = undefined; + +var _button = __webpack_require__(/*! ./button.component */ "./app/client/common/button.component.js"); + +var _button2 = _interopRequireDefault(_button); + +var _fileList = __webpack_require__(/*! ./fileList.component */ "./app/client/common/fileList.component.js"); + +var _fileUpload = __webpack_require__(/*! ./fileUpload.component */ "./app/client/common/fileUpload.component.js"); + +var _fileUpload2 = _interopRequireDefault(_fileUpload); + +var _gallery = __webpack_require__(/*! ./gallery.component */ "./app/client/common/gallery.component.js"); + +var _gallery2 = _interopRequireDefault(_gallery); + +var _group = __webpack_require__(/*! ./group.component */ "./app/client/common/group.component.js"); + +var _group2 = _interopRequireDefault(_group); + +var _header = __webpack_require__(/*! ./header.component */ "./app/client/common/header.component.js"); + +var _header2 = _interopRequireDefault(_header); + +var _loading = __webpack_require__(/*! ./loading.component */ "./app/client/common/loading.component.js"); + +var _loading2 = _interopRequireDefault(_loading); + +var _param = __webpack_require__(/*! ./param.component */ "./app/client/common/param.component.js"); + +var _param2 = _interopRequireDefault(_param); + +var _paramGroup = __webpack_require__(/*! ./paramGroup.component */ "./app/client/common/paramGroup.component.js"); + +var _paramGroup2 = _interopRequireDefault(_paramGroup); + +var _player = __webpack_require__(/*! ./player.component */ "./app/client/common/player.component.js"); + +var _player2 = _interopRequireDefault(_player); + +var _progress = __webpack_require__(/*! ./progress.component */ "./app/client/common/progress.component.js"); + +var _progress2 = _interopRequireDefault(_progress); + +var _select = __webpack_require__(/*! ./select.component */ "./app/client/common/select.component.js"); + +var _select2 = _interopRequireDefault(_select); + +var _slider = __webpack_require__(/*! ./slider.component */ "./app/client/common/slider.component.js"); + +var _slider2 = _interopRequireDefault(_slider); + +var _textInput = __webpack_require__(/*! ./textInput.component */ "./app/client/common/textInput.component.js"); + +var _textInput2 = _interopRequireDefault(_textInput); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Loading = _loading2.default; +exports.Progress = _progress2.default; +exports.Header = _header2.default; +exports.FileList = _fileList.FileList; +exports.FileRow = _fileList.FileRow; +exports.FileUpload = _fileUpload2.default; +exports.Gallery = _gallery2.default; +exports.Player = _player2.default; +exports.Group = _group2.default; +exports.ParamGroup = _paramGroup2.default; +exports.Param = _param2.default; +exports.TextInput = _textInput2.default; +exports.Slider = _slider2.default; +exports.Select = _select2.default; +exports.Button = _button2.default; + +/***/ }), + /***/ "./app/client/common/loading.component.js": /*!************************************************!*\ !*** ./app/client/common/loading.component.js ***! @@ -1943,6 +3007,8 @@ var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/prea function Progress(_ref) { var progress = _ref.progress; + + if (!progress) return; var i = progress.i, n = progress.n; @@ -3568,7 +4634,7 @@ function NewDatasetForm(props) { } var mapStateToProps = function mapStateToProps(state) { - return state; + return {}; }; var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { @@ -5794,6 +6860,8 @@ var Pix2pixShow = function (_Component) { if (!pix2pix.folder || pix2pix.folder.id !== id) { actions.load_directories(id); } + } else { + this.props.history.push('/pix2pix/new/'); } } }, { @@ -6160,6 +7228,8 @@ 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 _types = __webpack_require__(/*! ../../types */ "./app/client/types.js"); var _types2 = _interopRequireDefault(_types); @@ -6173,6 +7243,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var pix2wavInitialState = { loading: true, progress: { i: 0, n: 0 }, + status: '', error: null, folder_id: 0, data: null @@ -6187,6 +7258,23 @@ var pix2wavReducer = function pix2wavReducer() { } switch (action.type) { + case _types2.default.wav2pix.loaded_buffer: + return _extends({}, state, { + status: 'Loaded buffer' + }); + case _types2.default.wav2pix.draw_progress: + console.log(action); + return _extends({}, state, { + status: 'Rendering frame /' + }); + case _types2.default.wav2pix.draw_finish: + return _extends({}, state, { + status: 'Render complete' + }); + case _types2.default.wav2pix.load_zip: + return _extends({}, state, { + status: 'Built zip file' + }); default: return state; } @@ -6317,6 +7405,10 @@ var _upload2 = _interopRequireDefault(_upload); var _fileList = __webpack_require__(/*! ../../../common/fileList.component */ "./app/client/common/fileList.component.js"); +var _spectrogram = __webpack_require__(/*! ./spectrogram.upload */ "./app/client/modules/pix2wav/views/spectrogram.upload.js"); + +var _spectrogram2 = _interopRequireDefault(_spectrogram); + var _dataset5 = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js"); var _dataset6 = _interopRequireDefault(_dataset5); @@ -6363,6 +7455,8 @@ var Pix2wavShow = function (_Component) { if (!pix2wav.folder || pix2wav.folder.id !== id) { actions.load_directories(id); } + } else { + this.props.history.push('/pix2wav/new/'); } } }, { @@ -6395,6 +7489,14 @@ var Pix2wavShow = function (_Component) { (0, _preact.h)(_upload2.default, null) ) ), + (0, _preact.h)(_spectrogram2.default, { + loading: pix2wav.loading, + progress: pix2wav.progress, + id: pix2wav.folder_id, + module: _pix2wav4.default, + data: pix2wav.data, + folder: folder + }), (0, _preact.h)(_dataset6.default, { loading: pix2wav.loading, progress: pix2wav.progress, @@ -6516,6 +7618,266 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)( /***/ }), +/***/ "./app/client/modules/pix2wav/views/spectrogram.upload.js": +/*!****************************************************************!*\ + !*** ./app/client/modules/pix2wav/views/spectrogram.upload.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (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 _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js"); + +var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); + +var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); + +var _moment = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); + +var _moment2 = _interopRequireDefault(_moment); + +var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js"); + +var _util2 = _interopRequireDefault(_util); + +var _pix2wav = __webpack_require__(/*! ../pix2wav.actions */ "./app/client/modules/pix2wav/pix2wav.actions.js"); + +var pix2wavActions = _interopRequireWildcard(_pix2wav); + +var _pix2wav2 = __webpack_require__(/*! ../pix2wav.tasks */ "./app/client/modules/pix2wav/pix2wav.tasks.js"); + +var pix2wavTasks = _interopRequireWildcard(_pix2wav2); + +var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js"); + +var _wav2pix = __webpack_require__(/*! ../../../audio/wav2pix */ "./app/client/audio/wav2pix.js"); + +var wav2pixActions = _interopRequireWildcard(_wav2pix); + +var _pix2wav3 = __webpack_require__(/*! ../pix2wav.module */ "./app/client/modules/pix2wav/pix2wav.module.js"); + +var _pix2wav4 = _interopRequireDefault(_pix2wav3); + +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; } } + +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 SpectrogramUpload = function (_Component) { + _inherits(SpectrogramUpload, _Component); + + function SpectrogramUpload(props) { + _classCallCheck(this, SpectrogramUpload); + + var _this = _possibleConstructorReturn(this, (SpectrogramUpload.__proto__ || Object.getPrototypeOf(SpectrogramUpload)).call(this, props)); + + _this.state = { + file: null, + name: "", + frames: [] + }; + var audioElement = document.createElement('audio'); + audioElement.addEventListener('loadedmetadata', function () { + _this.setState({ duration: audioElement.duration }); + }); + _this.audioElement = audioElement; + return _this; + } + + _createClass(SpectrogramUpload, [{ + key: 'pickFile', + value: function pickFile(file) { + var _this2 = this; + + var name = file.name.split('.')[0].replace(/\s+/g, '_').replace(/-/g, '_').replace(/_+/g, '_'); + this.setState({ file: file, name: name }); + this.audioElement.src = URL.createObjectURL(file); + console.log(file.size); + if (file.size < 2 << 20) { + console.log('booooooooo'); + this.props.wav2pix.renderFrames(file, {}).then(function (frames) { + console.log(frames); + _this2.setState(_extends({}, _this2.state, { frames: frames + })); + }); + } + console.log(file); + // get info on the file... size, etc + } + }, { + key: 'buildZip', + value: function buildZip() { + var file = this.state.file; + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + // loading={pix2wav.loading} + // progress={pix2wav.progress} + // id={pix2wav.folder_id} + // module={pix2wavModule} + // data={pix2wav.data} + // folder={folder} + var _state = this.state, + file = _state.file, + frames = _state.frames; + + return (0, _preact.h)( + 'div', + { className: 'row' }, + (0, _preact.h)( + 'div', + { className: 'col spectrogramBuilder' }, + (0, _preact.h)( + _common.Group, + { title: 'Spectrogram Builder' }, + (0, _preact.h)( + 'p', + null, + "Convert your sounds into spectrograms. ", + "Sound files can be WAV, MP3, AIFF, or FLAC. ", + (0, _preact.h)( + 'b', + null, + '2 minutes max.' + ) + ), + (0, _preact.h)(_common.FileUpload, { + title: 'Choose a sound file', + mime: 'image.*', + onUpload: function onUpload(file) { + return _this3.pickFile(file); + } + }), + (0, _preact.h)(_common.TextInput, { + title: 'Dataset name', + onChange: function onChange(e) { + return _this3.setState({ name: e.target.value }); + }, + value: this.state.name + }), + (0, _preact.h)( + _common.Button, + { + onClick: function onClick() { + return _this3.buildZip(); + } + }, + 'Build Zip' + ), + (0, _preact.h)(_common.Progress, null), + file && this.renderMetadata(file) + ) + ), + (0, _preact.h)('div', { ref: function ref(c) { + _this3.canvases = c; + }, id: 'pix2wav_canvases' }) + ); + } + }, { + key: 'renderMetadata', + value: function renderMetadata(file) { + var duration = this.state.duration; + + var size = _util2.default.hush_size(file.size); + return (0, _preact.h)( + 'div', + { className: 'fileMetadata' }, + file.size > 2 << 20 && (0, _preact.h)( + 'p', + null, + (0, _preact.h)( + 'i', + null, + 'Careful, your file is larger than 2 MB.' + ) + ), + (0, _preact.h)( + _common.Param, + { title: 'Name' }, + file.name + ), + (0, _preact.h)( + _common.Param, + { title: 'Type' }, + file.type + ), + (0, _preact.h)( + _common.Param, + { title: 'Size' }, + (0, _preact.h)( + 'span', + { className: size[0] }, + size[1] + ) + ), + (0, _preact.h)( + _common.Param, + { title: 'Date' }, + (0, _moment2.default)(file.lastModifiedDate).format("YYYY-MM-DD h:mm a") + ), + (0, _preact.h)( + _common.Param, + { title: 'Duration' }, + Math.floor(duration) + ' s.' + ), + (0, _preact.h)('br', null), + (0, _preact.h)( + _common.Param, + { title: 'Status' }, + this.props.pix2wav.status + ) + ); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + var _this4 = this; + + var canvases = (this.state.frames || []).map(function (c) { + _this4.canvases.append(c.canvas); + }); + } + }]); + + return SpectrogramUpload; +}(_preact.Component); + +var mapStateToProps = function mapStateToProps(state) { + return { + pix2wav: state.module.pix2wav + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return { + actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch), + remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch), + wav2pix: (0, _redux.bindActionCreators)(wav2pixActions, dispatch) + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SpectrogramUpload); + +/***/ }), + /***/ "./app/client/modules/samplernn/index.js": /*!***********************************************!*\ !*** ./app/client/modules/samplernn/index.js ***! @@ -7898,6 +9260,8 @@ var SampleRNNShow = function (_Component) { console.log('looooooooooad', id); actions.load_directories(id); } + } else { + this.props.history.push('/samplernn/new/'); } } }, { @@ -9751,7 +11115,6 @@ exports.default = { // update checkpoint settings // reset checkpoint settings // queue new checkpoint - // }, pix2pix: { init: 'PIX2PIX_INIT', @@ -9760,7 +11123,8 @@ exports.default = { pix2wav: { init: 'PIX2WAV_INIT', set_folder: 'PIX2WAV_SET_FOLDER' - } + }, + wav2pix: (0, _crud.with_type)('wav2pix', ['loaded_buffer', 'draw_progress', 'draw_finish', 'load_zip', 'rendered_frames']) }; /***/ }), @@ -10370,1703 +11734,3472 @@ var orderByFn = exports.orderByFn = function orderByFn() { /***/ }), -/***/ "./node_modules/fbjs/lib/emptyFunction.js": -/*!************************************************!*\ - !*** ./node_modules/fbjs/lib/emptyFunction.js ***! - \************************************************/ +/***/ "./node_modules/base64-js/index.js": +/*!*****************************************!*\ + !*** ./node_modules/base64-js/index.js ***! + \*****************************************/ /*! no static exports found */ /***/ (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. - * - * - */ +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray -function makeEmptyFunction(arg) { - return function () { - return arg; - }; +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i } -/** - * 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() {}; +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 -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; -}; +function getLens (b64) { + var len = b64.length -module.exports = emptyFunction; + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } -/***/ }), + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len -/***/ "./node_modules/fbjs/lib/invariant.js": -/*!********************************************!*\ - !*** ./node_modules/fbjs/lib/invariant.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) -"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. - * - */ + return [validLen, placeHoldersLen] +} +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} -/** - * 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. - */ +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + for (var i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } -var validateFormat = function validateFormat(format) {}; + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } -if (true) { - validateFormat = function validateFormat(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - }; + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr } -function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} - 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'; - } +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) } + + return parts.join('') } -module.exports = invariant; /***/ }), -/***/ "./node_modules/fbjs/lib/warning.js": -/*!******************************************!*\ - !*** ./node_modules/fbjs/lib/warning.js ***! - \******************************************/ +/***/ "./node_modules/buffer/index.js": +/*!**************************************!*\ + !*** ./node_modules/buffer/index.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * 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. +/* WEBPACK VAR INJECTION */(function(global) {/*! + * The buffer module from node.js, for the browser. * + * @author Feross Aboukhadijeh + * @license MIT */ +/* eslint-disable no-proto */ -var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/fbjs/lib/emptyFunction.js"); +var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js") +var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js") +var isArray = __webpack_require__(/*! isarray */ "./node_modules/buffer/node_modules/isarray/index.js") + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 /** - * 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. + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. */ +Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined + ? global.TYPED_ARRAY_SUPPORT + : typedArraySupport() -var warning = emptyFunction; +/* + * Export kMaxLength after typed array support is determined. + */ +exports.kMaxLength = kMaxLength() -if (true) { - 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]; - } +function typedArraySupport () { + try { + var arr = new Uint8Array(1) + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +} - 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) {} - }; +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length) + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length) } + that.length = length + } - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } + return that +} - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ - printWarning.apply(undefined, [format].concat(args)); +function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) } - }; + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) } -module.exports = warning; +Buffer.poolSize = 8192 // not used by this implementation -/***/ }), +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype + return arr +} -/***/ "./node_modules/fetch-jsonp/build/fetch-jsonp.js": -/*!*******************************************************!*\ - !*** ./node_modules/fetch-jsonp/build/fetch-jsonp.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else { var mod; } -})(this, function (exports, module) { - 'use strict'; + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } - var defaultOptions = { - timeout: 5000, - jsonpCallback: 'callback', - jsonpCallbackFunction: null - }; + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } - function generateCallbackFunction() { - return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000); + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +} + +if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype + Buffer.__proto__ = Uint8Array + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true + }) + } +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') } +} - function clearFunction(functionName) { - // IE8 throws an exception when you try to delete a property on window - // http://stackoverflow.com/a/1824228/751089 - try { - delete window[functionName]; - } catch (e) { - window[functionName] = undefined; - } +function alloc (that, size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) } + return createBuffer(that, size) +} - function removeScript(scriptId) { - var script = document.getElementById(scriptId); - if (script) { - document.getElementsByTagName('head')[0].removeChild(script); +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +} + +function allocUnsafe (that, size) { + assertSize(size) + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0 } } + return that +} - function fetchJsonp(_url) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +} - // to avoid param reassign - var url = _url; - var timeout = options.timeout || defaultOptions.timeout; - var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback; +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } - var timeoutId = undefined; + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } - return new Promise(function (resolve, reject) { - var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction(); - var scriptId = jsonpCallback + '_' + callbackFunction; + var length = byteLength(string, encoding) | 0 + that = createBuffer(that, length) - window[callbackFunction] = function (response) { - resolve({ - ok: true, - // keep consistent with fetch API - json: function json() { - return Promise.resolve(response); - } - }); + var actual = that.write(string, encoding) - if (timeoutId) clearTimeout(timeoutId); + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual) + } - removeScript(scriptId); + return that +} - clearFunction(callbackFunction); - }; +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + that = createBuffer(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} - // Check if the user set their own params, and if not add a ? to start a list of params - url += url.indexOf('?') === -1 ? '?' : '&'; +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength // this throws if `array` is not a valid ArrayBuffer - var jsonpScript = document.createElement('script'); - jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction); - if (options.charset) { - jsonpScript.setAttribute('charset', options.charset); - } - jsonpScript.id = scriptId; - document.getElementsByTagName('head')[0].appendChild(jsonpScript); + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } - timeoutId = setTimeout(function () { - reject(new Error('JSONP request to ' + _url + ' timed out')); + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } - clearFunction(callbackFunction); - removeScript(scriptId); - window[callbackFunction] = function () { - clearFunction(callbackFunction); - }; - }, timeout); + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array) + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset) + } else { + array = new Uint8Array(array, byteOffset, length) + } - // Caught if got 404/500 - jsonpScript.onerror = function () { - reject(new Error('JSONP request to ' + _url + ' failed')); + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array + that.__proto__ = Buffer.prototype + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array) + } + return that +} - clearFunction(callbackFunction); - removeScript(scriptId); - if (timeoutId) clearTimeout(timeoutId); - }; - }); +function fromObject (that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + that = createBuffer(that, len) + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len) + return that } - // export as global function - /* - let local; - if (typeof global !== 'undefined') { - local = global; - } else if (typeof self !== 'undefined') { - local = self; - } else { - try { - local = Function('return this')(); - } catch (e) { - throw new Error('polyfill failed because global object is unavailable in this environment'); + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data) } } - local.fetchJsonp = fetchJsonp; - */ - module.exports = fetchJsonp; -}); + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} -/***/ }), +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} -/***/ "./node_modules/file-saver/FileSaver.js": -/*!**********************************************!*\ - !*** ./node_modules/file-saver/FileSaver.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} -var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js - * A saveAs() FileSaver implementation. - * 1.3.2 - * 2016-06-16 18:25:19 - * - * By Eli Grey, http://eligrey.com - * License: MIT - * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md - */ +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} -/*global self */ -/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } -/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ + if (a === b) return 0 -var saveAs = saveAs || (function(view) { - "use strict"; - // IE <10 is explicitly unsupported - if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { - return; - } - var - doc = view.document - // only get URL when necessary in case Blob.js hasn't overridden it yet - , get_URL = function() { - return view.URL || view.webkitURL || view; - } - , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") - , can_use_save_link = "download" in save_link - , click = function(node) { - var event = new MouseEvent("click"); - node.dispatchEvent(event); - } - , is_safari = /constructor/i.test(view.HTMLElement) || view.safari - , is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent) - , throw_outside = function(ex) { - (view.setImmediate || view.setTimeout)(function() { - throw ex; - }, 0); - } - , force_saveable_type = "application/octet-stream" - // the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to - , arbitrary_revoke_timeout = 1000 * 40 // in ms - , revoke = function(file) { - var revoker = function() { - if (typeof file === "string") { // file is an object URL - get_URL().revokeObjectURL(file); - } else { // file is a File - file.remove(); - } - }; - setTimeout(revoker, arbitrary_revoke_timeout); - } - , dispatch = function(filesaver, event_types, event) { - event_types = [].concat(event_types); - var i = event_types.length; - while (i--) { - var listener = filesaver["on" + event_types[i]]; - if (typeof listener === "function") { - try { - listener.call(filesaver, event || filesaver); - } catch (ex) { - throw_outside(ex); - } - } - } - } - , auto_bom = function(blob) { - // prepend BOM for UTF-8 XML and text/* types (including HTML) - // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF - if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { - return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type}); - } - return blob; - } - , FileSaver = function(blob, name, no_auto_bom) { - if (!no_auto_bom) { - blob = auto_bom(blob); - } - // First try a.download, then web filesystem, then object URLs - var - filesaver = this - , type = blob.type - , force = type === force_saveable_type - , object_url - , dispatch_all = function() { - dispatch(filesaver, "writestart progress write writeend".split(" ")); - } - // on any filesys errors revert to saving with object URLs - , fs_error = function() { - if ((is_chrome_ios || (force && is_safari)) && view.FileReader) { - // Safari doesn't allow downloading of blob urls - var reader = new FileReader(); - reader.onloadend = function() { - var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;'); - var popup = view.open(url, '_blank'); - if(!popup) view.location.href = url; - url=undefined; // release reference before dispatching - filesaver.readyState = filesaver.DONE; - dispatch_all(); - }; - reader.readAsDataURL(blob); - filesaver.readyState = filesaver.INIT; - return; - } - // don't create more object URLs than needed - if (!object_url) { - object_url = get_URL().createObjectURL(blob); - } - if (force) { - view.location.href = object_url; - } else { - var opened = view.open(object_url, "_blank"); - if (!opened) { - // Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html - view.location.href = object_url; - } - } - filesaver.readyState = filesaver.DONE; - dispatch_all(); - revoke(object_url); - } - ; - filesaver.readyState = filesaver.INIT; + var x = a.length + var y = b.length - if (can_use_save_link) { - object_url = get_URL().createObjectURL(blob); - setTimeout(function() { - save_link.href = object_url; - save_link.download = name; - click(save_link); - dispatch_all(); - revoke(object_url); - filesaver.readyState = filesaver.DONE; - }); - return; - } + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } - fs_error(); - } - , FS_proto = FileSaver.prototype - , saveAs = function(blob, name, no_auto_bom) { - return new FileSaver(blob, name || blob.name || "download", no_auto_bom); - } - ; - // IE 10+ (native saveAs) - if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { - return function(blob, name, no_auto_bom) { - name = name || blob.name || "download"; + if (x < y) return -1 + if (y < x) return 1 + return 0 +} - if (!no_auto_bom) { - blob = auto_bom(blob); - } - return navigator.msSaveOrOpenBlob(blob, name); - }; - } +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} - FS_proto.abort = function(){}; - FS_proto.readyState = FS_proto.INIT = 0; - FS_proto.WRITING = 1; - FS_proto.DONE = 2; +Buffer.concat = function concat (list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } - FS_proto.error = - FS_proto.onwritestart = - FS_proto.onprogress = - FS_proto.onwrite = - FS_proto.onabort = - FS_proto.onerror = - FS_proto.onwriteend = - null; + if (list.length === 0) { + return Buffer.alloc(0) + } - return saveAs; -}( - typeof self !== "undefined" && self - || typeof window !== "undefined" && window - || this.content -)); -// `self` is undefined in Firefox for Android content script context -// while `this` is nsIContentFrameMessageManager -// with an attribute `content` that corresponds to the window + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } -if (typeof module !== "undefined" && module.exports) { - module.exports.saveAs = saveAs; -} else if (("function" !== "undefined" && __webpack_require__(/*! !webpack amd define */ "./node_modules/webpack/buildin/amd-define.js") !== null) && (__webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js") !== null)) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return saveAs; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer } +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string + } -/***/ }), + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength -/***/ "./node_modules/history/DOMUtils.js": -/*!******************************************!*\ - !*** ./node_modules/history/DOMUtils.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function slowToString (encoding, start, end) { + var loweredCase = false -"use strict"; + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } -exports.__esModule = true; -var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + if (end === undefined || end > this.length) { + end = this.length + } -var addEventListener = exports.addEventListener = function addEventListener(node, event, listener) { - return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener); -}; + if (end <= 0) { + return '' + } -var removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) { - return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener); -}; + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 -var getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) { - return callback(window.confirm(message)); -}; // eslint-disable-line no-alert + if (end <= start) { + return '' + } -/** - * Returns true if the HTML5 history API is supported. Taken from Modernizr. - * - * https://github.com/Modernizr/Modernizr/blob/master/LICENSE - * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js - * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 - */ -var supportsHistory = exports.supportsHistory = function supportsHistory() { - var ua = window.navigator.userAgent; + if (!encoding) encoding = 'utf8' - if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) - return window.history && 'pushState' in window.history; -}; + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) -/** - * Returns true if browser fires popstate on hash change. - * IE10 and IE11 do not. - */ -var supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() { - return window.navigator.userAgent.indexOf('Trident') === -1; -}; + case 'ascii': + return asciiSlice(this, start, end) -/** - * Returns false if using go(n) with hash history causes a full page reload. - */ -var supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() { - return window.navigator.userAgent.indexOf('Firefox') === -1; -}; + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) -/** - * Returns true if a given popstate event is an extraneous WebKit event. - * Accounts for the fact that Chrome on iOS fires real popstate events - * containing undefined state when pressing the back button. - */ -var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { - return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; -}; + case 'base64': + return base64Slice(this, start, end) -/***/ }), + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) -/***/ "./node_modules/history/LocationUtils.js": -/*!***********************************************!*\ - !*** ./node_modules/history/LocationUtils.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} -"use strict"; +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer.prototype._isBuffer = true +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} -exports.__esModule = true; -exports.locationsAreEqual = exports.createLocation = undefined; +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} -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; }; +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} -var _resolvePathname = __webpack_require__(/*! resolve-pathname */ "./node_modules/resolve-pathname/index.js"); +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} -var _resolvePathname2 = _interopRequireDefault(_resolvePathname); +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} -var _valueEqual = __webpack_require__(/*! value-equal */ "./node_modules/value-equal/index.js"); +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} -var _valueEqual2 = _interopRequireDefault(_valueEqual); +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} -var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } -var createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) { - var location = void 0; - if (typeof path === 'string') { - // Two-arg form: push(path, state) - location = (0, _PathUtils.parsePath)(path); - location.state = state; - } else { - // One-arg form: push(location) - location = _extends({}, path); + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } - if (location.pathname === undefined) location.pathname = ''; + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } - if (location.search) { - if (location.search.charAt(0) !== '?') location.search = '?' + location.search; - } else { - location.search = ''; + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break } + } - if (location.hash) { - if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash; - } else { - location.hash = ''; + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } - if (state !== undefined && location.state === undefined) location.state = state; + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } } - try { - location.pathname = decodeURI(location.pathname); - } catch (e) { - if (e instanceof URIError) { - throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.'); + function read (buf, i) { + if (indexSize === 1) { + return buf[i] } else { - throw e; + return buf.readUInt16BE(i * indexSize) } } - if (key) location.key = key; - - if (currentLocation) { - // Resolve incomplete/relative pathname relative to current location. - if (!location.pathname) { - location.pathname = currentLocation.pathname; - } else if (location.pathname.charAt(0) !== '/') { - location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname); + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } } } else { - // When there is no prior location and pathname is empty, set it to / - if (!location.pathname) { - location.pathname = '/'; + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i } } - return location; -}; + return -1 +} -var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) { - return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state); -}; +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} -/***/ }), +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} -/***/ "./node_modules/history/PathUtils.js": -/*!*******************************************!*\ - !*** ./node_modules/history/PathUtils.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} -"use strict"; +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') -exports.__esModule = true; -var addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) { - return path.charAt(0) === '/' ? path : '/' + path; -}; + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} -var stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) { - return path.charAt(0) === '/' ? path.substr(1) : path; -}; +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} -var hasBasename = exports.hasBasename = function hasBasename(path, prefix) { - return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); -}; +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} -var stripBasename = exports.stripBasename = function stripBasename(path, prefix) { - return hasBasename(path, prefix) ? path.substr(prefix.length) : path; -}; +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} -var stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) { - return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; -}; +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} -var parsePath = exports.parsePath = function parsePath(path) { - var pathname = path || '/'; - var search = ''; - var hash = ''; +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} - var hashIndex = pathname.indexOf('#'); - if (hashIndex !== -1) { - hash = pathname.substr(hashIndex); - pathname = pathname.substr(0, hashIndex); +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) } - var searchIndex = pathname.indexOf('?'); - if (searchIndex !== -1) { - search = pathname.substr(searchIndex); - pathname = pathname.substr(0, searchIndex); + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') } - return { - pathname: pathname, - search: search === '?' ? '' : search, - hash: hash === '#' ? '' : hash - }; -}; + if (!encoding) encoding = 'utf8' -var createPath = exports.createPath = function createPath(location) { - var pathname = location.pathname, - search = location.search, - hash = location.hash; + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) - var path = pathname || '/'; + case 'ascii': + return asciiWrite(this, string, offset, length) - if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) - if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) - return path; -}; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) -/***/ }), + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} -/***/ "./node_modules/history/createBrowserHistory.js": -/*!******************************************************!*\ - !*** ./node_modules/history/createBrowserHistory.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} -"use strict"; +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } -exports.__esModule = true; + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } -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; }; + res.push(codePoint) + i += bytesPerSequence + } -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; }; + return decodeCodePointsArray(res) +} -var _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 -var _warning2 = _interopRequireDefault(_warning); +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } -var _invariant = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} -var _invariant2 = _interopRequireDefault(_invariant); +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) -var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/LocationUtils.js"); + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} -var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) -var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/createTransitionManager.js"); + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} -var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); +function hexSlice (buf, start, end) { + var len = buf.length -var _DOMUtils = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/DOMUtils.js"); + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} -var PopStateEvent = 'popstate'; -var HashChangeEvent = 'hashchange'; +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} -var getHistoryState = function getHistoryState() { - try { - return window.history.state || {}; - } catch (e) { - // IE 11 sometimes throws when accessing window.history.state - // See https://github.com/ReactTraining/history/pull/289 - return {}; +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len } -}; -/** - * Creates a history object that uses the HTML5 history API including - * pushState, replaceState, and the popstate event. + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end) + newBuf.__proto__ = Buffer.prototype + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start] + } + } + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. */ -var createBrowserHistory = function createBrowserHistory() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} - (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM'); +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) - var globalHistory = window.history; - var canUseHistory = (0, _DOMUtils.supportsHistory)(); - var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)(); + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } - var _props$forceRefresh = props.forceRefresh, - forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh, - _props$getUserConfirm = props.getUserConfirmation, - getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm, - _props$keyLength = props.keyLength, - keyLength = _props$keyLength === undefined ? 6 : _props$keyLength; + return val +} - var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : ''; +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } - var getDOMLocation = function getDOMLocation(historyState) { - var _ref = historyState || {}, - key = _ref.key, - state = _ref.state; + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } - var _window$location = window.location, - pathname = _window$location.pathname, - search = _window$location.search, - hash = _window$location.hash; + return val +} +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} - var path = pathname + search + hash; +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} - (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} - if (basename) path = (0, _PathUtils.stripBasename)(path, basename); +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - return (0, _LocationUtils.createLocation)(path, state, key); - }; + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} - var createKey = function createKey() { - return Math.random().toString(36).substr(2, keyLength); - }; +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - var transitionManager = (0, _createTransitionManager2.default)(); + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} - var setState = function setState(nextState) { - _extends(history, nextState); +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) - history.length = globalHistory.length; + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 - transitionManager.notifyListeners(history.location, history.action); - }; + if (val >= mul) val -= Math.pow(2, 8 * byteLength) - var handlePopState = function handlePopState(event) { - // Ignore extraneous popstate events in WebKit. - if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return; + return val +} - handlePop(getDOMLocation(event.state)); - }; +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) - var handleHashChange = function handleHashChange() { - handlePop(getDOMLocation(getHistoryState())); - }; + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 - var forceNextPop = false; + if (val >= mul) val -= Math.pow(2, 8 * byteLength) - var handlePop = function handlePop(location) { - if (forceNextPop) { - forceNextPop = false; - setState(); - } else { - var action = 'POP'; + return val +} - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (ok) { - setState({ action: action, location: location }); - } else { - revertPop(location); - } - }); - } - }; +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} - var revertPop = function revertPop(fromLocation) { - var toLocation = history.location; +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} - // TODO: We could probably make this more reliable by - // keeping a list of keys we've seen in sessionStorage. - // Instead, we just default to 0 for keys we don't know. +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} - var toIndex = allKeys.indexOf(toLocation.key); +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - if (toIndex === -1) toIndex = 0; + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} - var fromIndex = allKeys.indexOf(fromLocation.key); +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - if (fromIndex === -1) fromIndex = 0; + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} - var delta = toIndex - fromIndex; +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} - if (delta) { - forceNextPop = true; - go(delta); - } - }; +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} - var initialLocation = getDOMLocation(getHistoryState()); - var allKeys = [initialLocation.key]; +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} - // Public interface +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} - var createHref = function createHref(location) { - return basename + (0, _PathUtils.createPath)(location); - }; +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} - var push = function push(path, state) { - (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } - var action = 'PUSH'; - var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; + return offset + byteLength +} - var href = createHref(location); - var key = location.key, - state = location.state; +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } - if (canUseHistory) { - globalHistory.pushState({ key: key, state: state }, null, href); + return offset + byteLength +} - if (forceRefresh) { - window.location.href = href; - } else { - var prevIndex = allKeys.indexOf(history.location.key); - var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = (value & 0xff) + return offset + 1 +} - nextKeys.push(location.key); - allKeys = nextKeys; +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} - setState({ action: action, location: location }); - } - } else { - (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history'); +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} - window.location.href = href; - } - }); - }; +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} - var replace = function replace(path, state) { - (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} - var action = 'REPLACE'; - var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} - var href = createHref(location); - var key = location.key, - state = location.state; +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } - if (canUseHistory) { - globalHistory.replaceState({ key: key, state: state }, null, href); + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } - if (forceRefresh) { - window.location.replace(href); - } else { - var prevIndex = allKeys.indexOf(history.location.key); + return offset + byteLength +} - if (prevIndex !== -1) allKeys[prevIndex] = location.key; +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) - setState({ action: action, location: location }); - } - } else { - (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history'); + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } - window.location.replace(href); - } - }); - }; + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } - var go = function go(n) { - globalHistory.go(n); - }; + return offset + byteLength +} - var goBack = function goBack() { - return go(-1); - }; +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} - var goForward = function goForward() { - return go(1); - }; +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} - var listenerCount = 0; +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} - var checkDOMListeners = function checkDOMListeners(delta) { - listenerCount += delta; +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} - if (listenerCount === 1) { - (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} - if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); - } else if (listenerCount === 0) { - (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} - if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); - } - }; +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} - var isBlocked = false; +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} - var block = function block() { - var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} - var unblock = transitionManager.setPrompt(prompt); +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} - if (!isBlocked) { - checkDOMListeners(1); - isBlocked = true; +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start] } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) + } - return function () { - if (isBlocked) { - isBlocked = false; - checkDOMListeners(-1); + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if (code < 256) { + val = code } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255 + } - return unblock(); - }; - }; + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } - var listen = function listen(listener) { - var unlisten = transitionManager.appendListener(listener); - checkDOMListeners(1); + if (end <= start) { + return this + } - return function () { - checkDOMListeners(-1); - unlisten(); - }; - }; + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 - var history = { - length: globalHistory.length, - action: 'POP', - location: initialLocation, - createHref: createHref, - push: push, - replace: replace, - go: go, - goBack: goBack, - goForward: goForward, - block: block, - listen: listen - }; + if (!val) val = 0 - return history; -}; + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : utf8ToBytes(new Buffer(val, encoding).toString()) + var len = bytes.length + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } -exports.default = createBrowserHistory; + return this +} -/***/ }), +// HELPER FUNCTIONS +// ================ -/***/ "./node_modules/history/createHashHistory.js": -/*!***************************************************!*\ - !*** ./node_modules/history/createHashHistory.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g -"use strict"; +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} -exports.__esModule = true; +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} -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 utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } -var _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); + // valid lead + leadSurrogate = codePoint -var _warning2 = _interopRequireDefault(_warning); + continue + } -var _invariant = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } -var _invariant2 = _interopRequireDefault(_invariant); + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } -var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/LocationUtils.js"); + leadSurrogate = null -var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } -var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/createTransitionManager.js"); + return bytes +} -var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} -var _DOMUtils = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/DOMUtils.js"); +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + return byteArray +} -var HashChangeEvent = 'hashchange'; +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} -var HashPathCoders = { - hashbang: { - encodePath: function encodePath(path) { - return path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path); - }, - decodePath: function decodePath(path) { - return path.charAt(0) === '!' ? path.substr(1) : path; - } - }, - noslash: { - encodePath: _PathUtils.stripLeadingSlash, - decodePath: _PathUtils.addLeadingSlash - }, - slash: { - encodePath: _PathUtils.addLeadingSlash, - decodePath: _PathUtils.addLeadingSlash +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] } -}; + return i +} -var getHashPath = function getHashPath() { - // We can't use window.location.hash here because it's not - // consistent across browsers - Firefox will pre-decode it! - var href = window.location.href; - var hashIndex = href.indexOf('#'); - return hashIndex === -1 ? '' : href.substring(hashIndex + 1); -}; +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} -var pushHashPath = function pushHashPath(path) { - return window.location.hash = path; -}; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) -var replaceHashPath = function replaceHashPath(path) { - var hashIndex = window.location.href.indexOf('#'); +/***/ }), - window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); +/***/ "./node_modules/buffer/node_modules/isarray/index.js": +/*!***********************************************************!*\ + !*** ./node_modules/buffer/node_modules/isarray/index.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; }; -var createHashHistory = function createHashHistory() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Hash history needs a DOM'); +/***/ }), - var globalHistory = window.history; - var canGoWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); +/***/ "./node_modules/core-util-is/lib/util.js": +/*!***********************************************!*\ + !*** ./node_modules/core-util-is/lib/util.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var _props$getUserConfirm = props.getUserConfirmation, - getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm, - _props$hashType = props.hashType, - hashType = _props$hashType === undefined ? 'slash' : _props$hashType; +/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; - var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : ''; +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; - var _HashPathCoders$hashT = HashPathCoders[hashType], - encodePath = _HashPathCoders$hashT.encodePath, - decodePath = _HashPathCoders$hashT.decodePath; +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; - var getDOMLocation = function getDOMLocation() { - var path = decodePath(getHashPath()); +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; - (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; - if (basename) path = (0, _PathUtils.stripBasename)(path, basename); +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; - return (0, _LocationUtils.createLocation)(path); - }; +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; - var transitionManager = (0, _createTransitionManager2.default)(); +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; - var setState = function setState(nextState) { - _extends(history, nextState); +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; - history.length = globalHistory.length; +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; - transitionManager.notifyListeners(history.location, history.action); - }; +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; - var forceNextPop = false; - var ignorePath = null; +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; - var handleHashChange = function handleHashChange() { - var path = getHashPath(); - var encodedPath = encodePath(path); +exports.isBuffer = Buffer.isBuffer; - if (path !== encodedPath) { - // Ensure we always have a properly-encoded hash. - replaceHashPath(encodedPath); - } else { - var location = getDOMLocation(); - var prevLocation = history.location; +function objectToString(o) { + return Object.prototype.toString.call(o); +} - if (!forceNextPop && (0, _LocationUtils.locationsAreEqual)(prevLocation, location)) return; // A hashchange doesn't always == location change. +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) - if (ignorePath === (0, _PathUtils.createPath)(location)) return; // Ignore this change; we already setState in push/replace. +/***/ }), - ignorePath = null; +/***/ "./node_modules/events/events.js": +/*!***************************************!*\ + !*** ./node_modules/events/events.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - handlePop(location); - } - }; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; - var handlePop = function handlePop(location) { - if (forceNextPop) { - forceNextPop = false; - setState(); - } else { - var action = 'POP'; - - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (ok) { - setState({ action: action, location: location }); - } else { - revertPop(location); - } - }); - } - }; +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; - var revertPop = function revertPop(fromLocation) { - var toLocation = history.location; - - // TODO: We could probably make this more reliable by - // keeping a list of paths we've seen in sessionStorage. - // Instead, we just default to 0 for paths we don't know. - - var toIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(toLocation)); +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; - if (toIndex === -1) toIndex = 0; +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; - var fromIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(fromLocation)); +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; +}; - if (fromIndex === -1) fromIndex = 0; +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; - var delta = toIndex - fromIndex; + if (!this._events) + this._events = {}; - if (delta) { - forceNextPop = true; - go(delta); + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; + } } - }; - - // Ensure the hash is encoded properly before doing anything else. - var path = getHashPath(); - var encodedPath = encodePath(path); + } - if (path !== encodedPath) replaceHashPath(encodedPath); + handler = this._events[type]; - var initialLocation = getDOMLocation(); - var allPaths = [(0, _PathUtils.createPath)(initialLocation)]; + if (isUndefined(handler)) + return false; - // Public interface + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + } else if (isObject(handler)) { + args = Array.prototype.slice.call(arguments, 1); + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } - var createHref = function createHref(location) { - return '#' + encodePath(basename + (0, _PathUtils.createPath)(location)); - }; + return true; +}; - var push = function push(path, state) { - (0, _warning2.default)(state === undefined, 'Hash history cannot push state; it is ignored'); +EventEmitter.prototype.addListener = function(type, listener) { + var m; - var action = 'PUSH'; - var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location); + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } + } + } - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; + return this; +}; - var path = (0, _PathUtils.createPath)(location); - var encodedPath = encodePath(basename + path); - var hashChanged = getHashPath() !== encodedPath; +EventEmitter.prototype.on = EventEmitter.prototype.addListener; - if (hashChanged) { - // We cannot tell if a hashchange was caused by a PUSH, so we'd - // rather setState here and ignore the hashchange. The caveat here - // is that other hash histories in the page will consider it a POP. - ignorePath = path; - pushHashPath(encodedPath); +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); - var prevIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(history.location)); - var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); + var fired = false; - nextPaths.push(path); - allPaths = nextPaths; + function g() { + this.removeListener(type, g); - setState({ action: action, location: location }); - } else { - (0, _warning2.default)(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack'); + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } - setState(); - } - }); - }; + g.listener = listener; + this.on(type, g); - var replace = function replace(path, state) { - (0, _warning2.default)(state === undefined, 'Hash history cannot replace state; it is ignored'); + return this; +}; - var action = 'REPLACE'; - var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location); +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; + if (!isFunction(listener)) + throw TypeError('listener must be a function'); - var path = (0, _PathUtils.createPath)(location); - var encodedPath = encodePath(basename + path); - var hashChanged = getHashPath() !== encodedPath; + if (!this._events || !this._events[type]) + return this; - if (hashChanged) { - // We cannot tell if a hashchange was caused by a REPLACE, so we'd - // rather setState here and ignore the hashchange. The caveat here - // is that other hash histories in the page will consider it a POP. - ignorePath = path; - replaceHashPath(encodedPath); - } + list = this._events[type]; + length = list.length; + position = -1; - var prevIndex = allPaths.indexOf((0, _PathUtils.createPath)(history.location)); + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); - if (prevIndex !== -1) allPaths[prevIndex] = path; + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } - setState({ action: action, location: location }); - }); - }; + if (position < 0) + return this; - var go = function go(n) { - (0, _warning2.default)(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser'); + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } - globalHistory.go(n); - }; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } - var goBack = function goBack() { - return go(-1); - }; + return this; +}; - var goForward = function goForward() { - return go(1); - }; +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; - var listenerCount = 0; + if (!this._events) + return this; - var checkDOMListeners = function checkDOMListeners(delta) { - listenerCount += delta; + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } - if (listenerCount === 1) { - (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); - } else if (listenerCount === 0) { - (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); } - }; + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } - var isBlocked = false; + listeners = this._events[type]; - var block = function block() { - var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else if (listeners) { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; - var unblock = transitionManager.setPrompt(prompt); + return this; +}; - if (!isBlocked) { - checkDOMListeners(1); - isBlocked = true; - } +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; +}; - return function () { - if (isBlocked) { - isBlocked = false; - checkDOMListeners(-1); - } +EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; - return unblock(); - }; - }; + if (isFunction(evlistener)) + return 1; + else if (evlistener) + return evlistener.length; + } + return 0; +}; - var listen = function listen(listener) { - var unlisten = transitionManager.appendListener(listener); - checkDOMListeners(1); +EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); +}; - return function () { - checkDOMListeners(-1); - unlisten(); - }; - }; +function isFunction(arg) { + return typeof arg === 'function'; +} - var history = { - length: globalHistory.length, - action: 'POP', - location: initialLocation, - createHref: createHref, - push: push, - replace: replace, - go: go, - goBack: goBack, - goForward: goForward, - block: block, - listen: listen - }; +function isNumber(arg) { + return typeof arg === 'number'; +} - return history; -}; +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} -exports.default = createHashHistory; /***/ }), -/***/ "./node_modules/history/createMemoryHistory.js": -/*!*****************************************************!*\ - !*** ./node_modules/history/createMemoryHistory.js ***! - \*****************************************************/ +/***/ "./node_modules/fbjs/lib/emptyFunction.js": +/*!************************************************!*\ + !*** ./node_modules/fbjs/lib/emptyFunction.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -exports.__esModule = true; - -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; }; - -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 _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); - -var _warning2 = _interopRequireDefault(_warning); +/** + * 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 _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} -var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/LocationUtils.js"); +/** + * 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() {}; -var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/createTransitionManager.js"); +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; +}; -var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); +module.exports = emptyFunction; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/***/ }), -var clamp = function clamp(n, lowerBound, upperBound) { - return Math.min(Math.max(n, lowerBound), upperBound); -}; +/***/ "./node_modules/fbjs/lib/invariant.js": +/*!********************************************!*\ + !*** ./node_modules/fbjs/lib/invariant.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * Creates a history object that stores locations in memory. + * 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 createMemoryHistory = function createMemoryHistory() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var getUserConfirmation = props.getUserConfirmation, - _props$initialEntries = props.initialEntries, - initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries, - _props$initialIndex = props.initialIndex, - initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex, - _props$keyLength = props.keyLength, - keyLength = _props$keyLength === undefined ? 6 : _props$keyLength; - - var transitionManager = (0, _createTransitionManager2.default)(); - var setState = function setState(nextState) { - _extends(history, nextState); - history.length = history.entries.length; +/** + * 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. + */ - transitionManager.notifyListeners(history.location, history.action); - }; +var validateFormat = function validateFormat(format) {}; - var createKey = function createKey() { - return Math.random().toString(36).substr(2, keyLength); +if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } }; +} - var index = clamp(initialIndex, 0, initialEntries.length - 1); - var entries = initialEntries.map(function (entry) { - return typeof entry === 'string' ? (0, _LocationUtils.createLocation)(entry, undefined, createKey()) : (0, _LocationUtils.createLocation)(entry, undefined, entry.key || createKey()); - }); +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); - // Public interface + 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'; + } - var createHref = _PathUtils.createPath; + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} - var push = function push(path, state) { - (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); +module.exports = invariant; - var action = 'PUSH'; - var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); +/***/ }), - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; +/***/ "./node_modules/fbjs/lib/warning.js": +/*!******************************************!*\ + !*** ./node_modules/fbjs/lib/warning.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var prevIndex = history.index; - var nextIndex = prevIndex + 1; +"use strict"; +/** + * 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 nextEntries = history.entries.slice(0); - if (nextEntries.length > nextIndex) { - nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location); - } else { - nextEntries.push(location); - } - setState({ - action: action, - location: location, - index: nextIndex, - entries: nextEntries - }); - }); - }; - var replace = function replace(path, state) { - (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); +var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/fbjs/lib/emptyFunction.js"); - var action = 'REPLACE'; - var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); +/** + * 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. + */ - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (!ok) return; +var warning = emptyFunction; - history.entries[history.index] = location; +if (true) { + 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]; + } - setState({ action: action, location: location }); + 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) {} }; - var go = function go(n) { - var nextIndex = clamp(history.index + n, 0, history.entries.length - 1); + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } - var action = 'POP'; - var location = history.entries[nextIndex]; + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } - transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { - if (ok) { - setState({ - action: action, - location: location, - index: nextIndex - }); - } else { - // Mimic the behavior of DOM histories by - // causing a render after a cancelled POP. - setState(); + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; } - }); - }; - var goBack = function goBack() { - return go(-1); + printWarning.apply(undefined, [format].concat(args)); + } }; +} - var goForward = function goForward() { - return go(1); - }; +module.exports = warning; - var canGo = function canGo(n) { - var nextIndex = history.index + n; - return nextIndex >= 0 && nextIndex < history.entries.length; - }; +/***/ }), - var block = function block() { - var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - return transitionManager.setPrompt(prompt); - }; +/***/ "./node_modules/fetch-jsonp/build/fetch-jsonp.js": +/*!*******************************************************!*\ + !*** ./node_modules/fetch-jsonp/build/fetch-jsonp.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var listen = function listen(listener) { - return transitionManager.appendListener(listener); - }; +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (exports, module) { + 'use strict'; - var history = { - length: entries.length, - action: 'POP', - location: entries[index], - index: index, - entries: entries, - createHref: createHref, - push: push, - replace: replace, - go: go, - goBack: goBack, - goForward: goForward, - canGo: canGo, - block: block, - listen: listen + var defaultOptions = { + timeout: 5000, + jsonpCallback: 'callback', + jsonpCallbackFunction: null }; - return history; -}; + function generateCallbackFunction() { + return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000); + } -exports.default = createMemoryHistory; + function clearFunction(functionName) { + // IE8 throws an exception when you try to delete a property on window + // http://stackoverflow.com/a/1824228/751089 + try { + delete window[functionName]; + } catch (e) { + window[functionName] = undefined; + } + } -/***/ }), + function removeScript(scriptId) { + var script = document.getElementById(scriptId); + if (script) { + document.getElementsByTagName('head')[0].removeChild(script); + } + } -/***/ "./node_modules/history/createTransitionManager.js": -/*!*********************************************************!*\ - !*** ./node_modules/history/createTransitionManager.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + function fetchJsonp(_url) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; -"use strict"; + // to avoid param reassign + var url = _url; + var timeout = options.timeout || defaultOptions.timeout; + var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback; + var timeoutId = undefined; -exports.__esModule = true; + return new Promise(function (resolve, reject) { + var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction(); + var scriptId = jsonpCallback + '_' + callbackFunction; -var _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); + window[callbackFunction] = function (response) { + resolve({ + ok: true, + // keep consistent with fetch API + json: function json() { + return Promise.resolve(response); + } + }); -var _warning2 = _interopRequireDefault(_warning); + if (timeoutId) clearTimeout(timeoutId); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + removeScript(scriptId); -var createTransitionManager = function createTransitionManager() { - var prompt = null; + clearFunction(callbackFunction); + }; - var setPrompt = function setPrompt(nextPrompt) { - (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time'); + // Check if the user set their own params, and if not add a ? to start a list of params + url += url.indexOf('?') === -1 ? '?' : '&'; - prompt = nextPrompt; + var jsonpScript = document.createElement('script'); + jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction); + if (options.charset) { + jsonpScript.setAttribute('charset', options.charset); + } + jsonpScript.id = scriptId; + document.getElementsByTagName('head')[0].appendChild(jsonpScript); - return function () { - if (prompt === nextPrompt) prompt = null; - }; - }; + timeoutId = setTimeout(function () { + reject(new Error('JSONP request to ' + _url + ' timed out')); - var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) { - // TODO: If another transition starts while we're still confirming - // the previous one, we may end up in a weird state. Figure out the - // best way to handle this. - if (prompt != null) { - var result = typeof prompt === 'function' ? prompt(location, action) : prompt; + clearFunction(callbackFunction); + removeScript(scriptId); + window[callbackFunction] = function () { + clearFunction(callbackFunction); + }; + }, timeout); - if (typeof result === 'string') { - if (typeof getUserConfirmation === 'function') { - getUserConfirmation(result, callback); - } else { - (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message'); + // Caught if got 404/500 + jsonpScript.onerror = function () { + reject(new Error('JSONP request to ' + _url + ' failed')); - callback(true); - } - } else { - // Return false from a transition hook to cancel the transition. - callback(result !== false); + clearFunction(callbackFunction); + removeScript(scriptId); + if (timeoutId) clearTimeout(timeoutId); + }; + }); + } + + // export as global function + /* + let local; + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + local.fetchJsonp = fetchJsonp; + */ + + module.exports = fetchJsonp; +}); + +/***/ }), + +/***/ "./node_modules/fft.js/lib/fft.js": +/*!****************************************!*\ + !*** ./node_modules/fft.js/lib/fft.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function FFT(size) { + this.size = size | 0; + if (this.size <= 1 || (this.size & (this.size - 1)) !== 0) + throw new Error('FFT size must be a power of two and bigger than 1'); + + this._csize = size << 1; + + // NOTE: Use of `var` is intentional for old V8 versions + var table = new Array(this.size * 2); + for (var i = 0; i < table.length; i += 2) { + const angle = Math.PI * i / this.size; + table[i] = Math.cos(angle); + table[i + 1] = -Math.sin(angle); + } + this.table = table; + + // Find size's power of two + var power = 0; + for (var t = 1; this.size > t; t <<= 1) + power++; + + // Calculate initial step's width: + // * If we are full radix-4 - it is 2x smaller to give inital len=8 + // * Otherwise it is the same as `power` to give len=4 + this._width = power % 2 === 0 ? power - 1 : power; + + // Pre-compute bit-reversal patterns + this._bitrev = new Array(1 << this._width); + for (var j = 0; j < this._bitrev.length; j++) { + this._bitrev[j] = 0; + for (var shift = 0; shift < this._width; shift += 2) { + var revShift = this._width - shift - 2; + this._bitrev[j] |= ((j >>> shift) & 3) << revShift; + } + } + + this._out = null; + this._data = null; + this._inv = 0; +} +module.exports = FFT; + +FFT.prototype.fromComplexArray = function fromComplexArray(complex, storage) { + var res = storage || new Array(complex.length >>> 1); + for (var i = 0; i < complex.length; i += 2) + res[i >>> 1] = complex[i]; + return res; +}; + +FFT.prototype.createComplexArray = function createComplexArray() { + const res = new Array(this._csize); + for (var i = 0; i < res.length; i++) + res[i] = 0; + return res; +}; + +FFT.prototype.toComplexArray = function toComplexArray(input, storage) { + var res = storage || this.createComplexArray(); + for (var i = 0; i < res.length; i += 2) { + res[i] = input[i >>> 1]; + res[i + 1] = 0; + } + return res; +}; + +FFT.prototype.completeSpectrum = function completeSpectrum(spectrum) { + var size = this._csize; + var half = size >>> 1; + for (var i = 2; i < half; i += 2) { + spectrum[size - i] = spectrum[i]; + spectrum[size - i + 1] = -spectrum[i + 1]; + } +}; + +FFT.prototype.transform = function transform(out, data) { + if (out === data) + throw new Error('Input and output buffers must be different'); + + this._out = out; + this._data = data; + this._inv = 0; + this._transform4(); + this._out = null; + this._data = null; +}; + +FFT.prototype.realTransform = function realTransform(out, data) { + if (out === data) + throw new Error('Input and output buffers must be different'); + + this._out = out; + this._data = data; + this._inv = 0; + this._realTransform4(); + this._out = null; + this._data = null; +}; + +FFT.prototype.inverseTransform = function inverseTransform(out, data) { + if (out === data) + throw new Error('Input and output buffers must be different'); + + this._out = out; + this._data = data; + this._inv = 1; + this._transform4(); + for (var i = 0; i < out.length; i++) + out[i] /= this.size; + this._out = null; + this._data = null; +}; + +// radix-4 implementation +// +// NOTE: Uses of `var` are intentional for older V8 version that do not +// support both `let compound assignments` and `const phi` +FFT.prototype._transform4 = function _transform4() { + var out = this._out; + var size = this._csize; + + // Initial step (permute and transform) + var width = this._width; + var step = 1 << width; + var len = (size / step) << 1; + + var outOff; + var t; + var bitrev = this._bitrev; + if (len === 4) { + for (outOff = 0, t = 0; outOff < size; outOff += len, t++) { + const off = bitrev[t]; + this._singleTransform2(outOff, off, step); + } + } else { + // len === 8 + for (outOff = 0, t = 0; outOff < size; outOff += len, t++) { + const off = bitrev[t]; + this._singleTransform4(outOff, off, step); + } + } + + // Loop through steps in decreasing order + var inv = this._inv ? -1 : 1; + var table = this.table; + for (step >>= 2; step >= 2; step >>= 2) { + len = (size / step) << 1; + var quarterLen = len >>> 2; + + // Loop through offsets in the data + for (outOff = 0; outOff < size; outOff += len) { + // Full case + var limit = outOff + quarterLen; + for (var i = outOff, k = 0; i < limit; i += 2, k += step) { + const A = i; + const B = A + quarterLen; + const C = B + quarterLen; + const D = C + quarterLen; + + // Original values + const Ar = out[A]; + const Ai = out[A + 1]; + const Br = out[B]; + const Bi = out[B + 1]; + const Cr = out[C]; + const Ci = out[C + 1]; + const Dr = out[D]; + const Di = out[D + 1]; + + // Middle values + const MAr = Ar; + const MAi = Ai; + + const tableBr = table[k]; + const tableBi = inv * table[k + 1]; + const MBr = Br * tableBr - Bi * tableBi; + const MBi = Br * tableBi + Bi * tableBr; + + const tableCr = table[2 * k]; + const tableCi = inv * table[2 * k + 1]; + const MCr = Cr * tableCr - Ci * tableCi; + const MCi = Cr * tableCi + Ci * tableCr; + + const tableDr = table[3 * k]; + const tableDi = inv * table[3 * k + 1]; + const MDr = Dr * tableDr - Di * tableDi; + const MDi = Dr * tableDi + Di * tableDr; + + // Pre-Final values + const T0r = MAr + MCr; + const T0i = MAi + MCi; + const T1r = MAr - MCr; + const T1i = MAi - MCi; + const T2r = MBr + MDr; + const T2i = MBi + MDi; + const T3r = inv * (MBr - MDr); + const T3i = inv * (MBi - MDi); + + // Final values + const FAr = T0r + T2r; + const FAi = T0i + T2i; + + const FCr = T0r - T2r; + const FCi = T0i - T2i; + + const FBr = T1r + T3i; + const FBi = T1i - T3r; + + const FDr = T1r - T3i; + const FDi = T1i + T3r; + + out[A] = FAr; + out[A + 1] = FAi; + out[B] = FBr; + out[B + 1] = FBi; + out[C] = FCr; + out[C + 1] = FCi; + out[D] = FDr; + out[D + 1] = FDi; } - } else { - callback(true); } - }; + } +}; - var listeners = []; +// radix-2 implementation +// +// NOTE: Only called for len=4 +FFT.prototype._singleTransform2 = function _singleTransform2(outOff, off, + step) { + const out = this._out; + const data = this._data; + + const evenR = data[off]; + const evenI = data[off + 1]; + const oddR = data[off + step]; + const oddI = data[off + step + 1]; + + const leftR = evenR + oddR; + const leftI = evenI + oddI; + const rightR = evenR - oddR; + const rightI = evenI - oddI; + + out[outOff] = leftR; + out[outOff + 1] = leftI; + out[outOff + 2] = rightR; + out[outOff + 3] = rightI; +}; - var appendListener = function appendListener(fn) { - var isActive = true; +// radix-4 +// +// NOTE: Only called for len=8 +FFT.prototype._singleTransform4 = function _singleTransform4(outOff, off, + step) { + const out = this._out; + const data = this._data; + const inv = this._inv ? -1 : 1; + const step2 = step * 2; + const step3 = step * 3; + + // Original values + const Ar = data[off]; + const Ai = data[off + 1]; + const Br = data[off + step]; + const Bi = data[off + step + 1]; + const Cr = data[off + step2]; + const Ci = data[off + step2 + 1]; + const Dr = data[off + step3]; + const Di = data[off + step3 + 1]; + + // Pre-Final values + const T0r = Ar + Cr; + const T0i = Ai + Ci; + const T1r = Ar - Cr; + const T1i = Ai - Ci; + const T2r = Br + Dr; + const T2i = Bi + Di; + const T3r = inv * (Br - Dr); + const T3i = inv * (Bi - Di); + + // Final values + const FAr = T0r + T2r; + const FAi = T0i + T2i; + + const FBr = T1r + T3i; + const FBi = T1i - T3r; + + const FCr = T0r - T2r; + const FCi = T0i - T2i; + + const FDr = T1r - T3i; + const FDi = T1i + T3r; + + out[outOff] = FAr; + out[outOff + 1] = FAi; + out[outOff + 2] = FBr; + out[outOff + 3] = FBi; + out[outOff + 4] = FCr; + out[outOff + 5] = FCi; + out[outOff + 6] = FDr; + out[outOff + 7] = FDi; +}; - var listener = function listener() { - if (isActive) fn.apply(undefined, arguments); - }; +// Real input radix-4 implementation +FFT.prototype._realTransform4 = function _realTransform4() { + var out = this._out; + var size = this._csize; - listeners.push(listener); + // Initial step (permute and transform) + var width = this._width; + var step = 1 << width; + var len = (size / step) << 1; - return function () { - isActive = false; - listeners = listeners.filter(function (item) { - return item !== listener; - }); - }; - }; + var outOff; + var t; + var bitrev = this._bitrev; + if (len === 4) { + for (outOff = 0, t = 0; outOff < size; outOff += len, t++) { + const off = bitrev[t]; + this._singleRealTransform2(outOff, off >>> 1, step >>> 1); + } + } else { + // len === 8 + for (outOff = 0, t = 0; outOff < size; outOff += len, t++) { + const off = bitrev[t]; + this._singleRealTransform4(outOff, off >>> 1, step >>> 1); + } + } - var notifyListeners = function notifyListeners() { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + // Loop through steps in decreasing order + var inv = this._inv ? -1 : 1; + var table = this.table; + for (step >>= 2; step >= 2; step >>= 2) { + len = (size / step) << 1; + var halfLen = len >>> 1; + var quarterLen = halfLen >>> 1; + var hquarterLen = quarterLen >>> 1; + + // Loop through offsets in the data + for (outOff = 0; outOff < size; outOff += len) { + for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) { + var A = outOff + i; + var B = A + quarterLen; + var C = B + quarterLen; + var D = C + quarterLen; + + // Original values + var Ar = out[A]; + var Ai = out[A + 1]; + var Br = out[B]; + var Bi = out[B + 1]; + var Cr = out[C]; + var Ci = out[C + 1]; + var Dr = out[D]; + var Di = out[D + 1]; + + // Middle values + var MAr = Ar; + var MAi = Ai; + + var tableBr = table[k]; + var tableBi = inv * table[k + 1]; + var MBr = Br * tableBr - Bi * tableBi; + var MBi = Br * tableBi + Bi * tableBr; + + var tableCr = table[2 * k]; + var tableCi = inv * table[2 * k + 1]; + var MCr = Cr * tableCr - Ci * tableCi; + var MCi = Cr * tableCi + Ci * tableCr; + + var tableDr = table[3 * k]; + var tableDi = inv * table[3 * k + 1]; + var MDr = Dr * tableDr - Di * tableDi; + var MDi = Dr * tableDi + Di * tableDr; + + // Pre-Final values + var T0r = MAr + MCr; + var T0i = MAi + MCi; + var T1r = MAr - MCr; + var T1i = MAi - MCi; + var T2r = MBr + MDr; + var T2i = MBi + MDi; + var T3r = inv * (MBr - MDr); + var T3i = inv * (MBi - MDi); + + // Final values + var FAr = T0r + T2r; + var FAi = T0i + T2i; + + var FBr = T1r + T3i; + var FBi = T1i - T3r; + + out[A] = FAr; + out[A + 1] = FAi; + out[B] = FBr; + out[B + 1] = FBi; + + // Output final middle point + if (i === 0) { + var FCr = T0r - T2r; + var FCi = T0i - T2i; + out[C] = FCr; + out[C + 1] = FCi; + continue; + } + + // Do not overwrite ourselves + if (i === hquarterLen) + continue; + + // In the flipped case: + // MAi = -MAi + // MBr=-MBi, MBi=-MBr + // MCr=-MCr + // MDr=MDi, MDi=MDr + var ST0r = T1r; + var ST0i = -T1i; + var ST1r = T0r; + var ST1i = -T0i; + var ST2r = -inv * T3i; + var ST2i = -inv * T3r; + var ST3r = -inv * T2i; + var ST3i = -inv * T2r; + + var SFAr = ST0r + ST2r; + var SFAi = ST0i + ST2i; + + var SFBr = ST1r + ST3i; + var SFBi = ST1i - ST3r; + + var SA = outOff + quarterLen - i; + var SB = outOff + halfLen - i; + + out[SA] = SFAr; + out[SA + 1] = SFAi; + out[SB] = SFBr; + out[SB + 1] = SFBi; + } } + } +}; - listeners.forEach(function (listener) { - return listener.apply(undefined, args); - }); - }; +// radix-2 implementation +// +// NOTE: Only called for len=4 +FFT.prototype._singleRealTransform2 = function _singleRealTransform2(outOff, + off, + step) { + const out = this._out; + const data = this._data; + + const evenR = data[off]; + const oddR = data[off + step]; + + const leftR = evenR + oddR; + const rightR = evenR - oddR; + + out[outOff] = leftR; + out[outOff + 1] = 0; + out[outOff + 2] = rightR; + out[outOff + 3] = 0; +}; - return { - setPrompt: setPrompt, - confirmTransitionTo: confirmTransitionTo, - appendListener: appendListener, - notifyListeners: notifyListeners - }; +// radix-4 +// +// NOTE: Only called for len=8 +FFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff, + off, + step) { + const out = this._out; + const data = this._data; + const inv = this._inv ? -1 : 1; + const step2 = step * 2; + const step3 = step * 3; + + // Original values + const Ar = data[off]; + const Br = data[off + step]; + const Cr = data[off + step2]; + const Dr = data[off + step3]; + + // Pre-Final values + const T0r = Ar + Cr; + const T1r = Ar - Cr; + const T2r = Br + Dr; + const T3r = inv * (Br - Dr); + + // Final values + const FAr = T0r + T2r; + + const FBr = T1r; + const FBi = -T3r; + + const FCr = T0r - T2r; + + const FDr = T1r; + const FDi = T3r; + + out[outOff] = FAr; + out[outOff + 1] = 0; + out[outOff + 2] = FBr; + out[outOff + 3] = FBi; + out[outOff + 4] = FCr; + out[outOff + 5] = 0; + out[outOff + 6] = FDr; + out[outOff + 7] = FDi; }; -exports.default = createTransitionManager; /***/ }), -/***/ "./node_modules/history/es/DOMUtils.js": -/*!*********************************************!*\ - !*** ./node_modules/history/es/DOMUtils.js ***! - \*********************************************/ -/*! exports provided: canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, supportsGoWithoutReloadUsingHash, isExtraneousPopstateEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/file-saver/FileSaver.js": +/*!**********************************************!*\ + !*** ./node_modules/file-saver/FileSaver.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js + * A saveAs() FileSaver implementation. + * 1.3.2 + * 2016-06-16 18:25:19 + * + * By Eli Grey, http://eligrey.com + * License: MIT + * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md + */ + +/*global self */ +/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ + +/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ + +var saveAs = saveAs || (function(view) { + "use strict"; + // IE <10 is explicitly unsupported + if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { + return; + } + var + doc = view.document + // only get URL when necessary in case Blob.js hasn't overridden it yet + , get_URL = function() { + return view.URL || view.webkitURL || view; + } + , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") + , can_use_save_link = "download" in save_link + , click = function(node) { + var event = new MouseEvent("click"); + node.dispatchEvent(event); + } + , is_safari = /constructor/i.test(view.HTMLElement) || view.safari + , is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent) + , throw_outside = function(ex) { + (view.setImmediate || view.setTimeout)(function() { + throw ex; + }, 0); + } + , force_saveable_type = "application/octet-stream" + // the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to + , arbitrary_revoke_timeout = 1000 * 40 // in ms + , revoke = function(file) { + var revoker = function() { + if (typeof file === "string") { // file is an object URL + get_URL().revokeObjectURL(file); + } else { // file is a File + file.remove(); + } + }; + setTimeout(revoker, arbitrary_revoke_timeout); + } + , dispatch = function(filesaver, event_types, event) { + event_types = [].concat(event_types); + var i = event_types.length; + while (i--) { + var listener = filesaver["on" + event_types[i]]; + if (typeof listener === "function") { + try { + listener.call(filesaver, event || filesaver); + } catch (ex) { + throw_outside(ex); + } + } + } + } + , auto_bom = function(blob) { + // prepend BOM for UTF-8 XML and text/* types (including HTML) + // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF + if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { + return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type}); + } + return blob; + } + , FileSaver = function(blob, name, no_auto_bom) { + if (!no_auto_bom) { + blob = auto_bom(blob); + } + // First try a.download, then web filesystem, then object URLs + var + filesaver = this + , type = blob.type + , force = type === force_saveable_type + , object_url + , dispatch_all = function() { + dispatch(filesaver, "writestart progress write writeend".split(" ")); + } + // on any filesys errors revert to saving with object URLs + , fs_error = function() { + if ((is_chrome_ios || (force && is_safari)) && view.FileReader) { + // Safari doesn't allow downloading of blob urls + var reader = new FileReader(); + reader.onloadend = function() { + var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;'); + var popup = view.open(url, '_blank'); + if(!popup) view.location.href = url; + url=undefined; // release reference before dispatching + filesaver.readyState = filesaver.DONE; + dispatch_all(); + }; + reader.readAsDataURL(blob); + filesaver.readyState = filesaver.INIT; + return; + } + // don't create more object URLs than needed + if (!object_url) { + object_url = get_URL().createObjectURL(blob); + } + if (force) { + view.location.href = object_url; + } else { + var opened = view.open(object_url, "_blank"); + if (!opened) { + // Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html + view.location.href = object_url; + } + } + filesaver.readyState = filesaver.DONE; + dispatch_all(); + revoke(object_url); + } + ; + filesaver.readyState = filesaver.INIT; + + if (can_use_save_link) { + object_url = get_URL().createObjectURL(blob); + setTimeout(function() { + save_link.href = object_url; + save_link.download = name; + click(save_link); + dispatch_all(); + revoke(object_url); + filesaver.readyState = filesaver.DONE; + }); + return; + } + + fs_error(); + } + , FS_proto = FileSaver.prototype + , saveAs = function(blob, name, no_auto_bom) { + return new FileSaver(blob, name || blob.name || "download", no_auto_bom); + } + ; + // IE 10+ (native saveAs) + if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { + return function(blob, name, no_auto_bom) { + name = name || blob.name || "download"; + + if (!no_auto_bom) { + blob = auto_bom(blob); + } + return navigator.msSaveOrOpenBlob(blob, name); + }; + } + + FS_proto.abort = function(){}; + FS_proto.readyState = FS_proto.INIT = 0; + FS_proto.WRITING = 1; + FS_proto.DONE = 2; + + FS_proto.error = + FS_proto.onwritestart = + FS_proto.onprogress = + FS_proto.onwrite = + FS_proto.onabort = + FS_proto.onerror = + FS_proto.onwriteend = + null; + + return saveAs; +}( + typeof self !== "undefined" && self + || typeof window !== "undefined" && window + || this.content +)); +// `self` is undefined in Firefox for Android content script context +// while `this` is nsIContentFrameMessageManager +// with an attribute `content` that corresponds to the window + +if (typeof module !== "undefined" && module.exports) { + module.exports.saveAs = saveAs; +} else if (("function" !== "undefined" && __webpack_require__(/*! !webpack amd define */ "./node_modules/webpack/buildin/amd-define.js") !== null) && (__webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js") !== null)) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return saveAs; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} + + +/***/ }), + +/***/ "./node_modules/history/DOMUtils.js": +/*!******************************************!*\ + !*** ./node_modules/history/DOMUtils.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canUseDOM", function() { return canUseDOM; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEventListener", function() { return addEventListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeEventListener", function() { return removeEventListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfirmation", function() { return getConfirmation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsHistory", function() { return supportsHistory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsPopStateOnHashChange", function() { return supportsPopStateOnHashChange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsGoWithoutReloadUsingHash", function() { return supportsGoWithoutReloadUsingHash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isExtraneousPopstateEvent", function() { return isExtraneousPopstateEvent; }); -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -var addEventListener = function addEventListener(node, event, listener) { + +exports.__esModule = true; +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +var addEventListener = exports.addEventListener = function addEventListener(node, event, listener) { return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener); }; -var removeEventListener = function removeEventListener(node, event, listener) { +var removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) { return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener); }; -var getConfirmation = function getConfirmation(message, callback) { +var getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) { return callback(window.confirm(message)); }; // eslint-disable-line no-alert @@ -12077,7 +15210,7 @@ var getConfirmation = function getConfirmation(message, callback) { * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 */ -var supportsHistory = function supportsHistory() { +var supportsHistory = exports.supportsHistory = function supportsHistory() { var ua = window.navigator.userAgent; if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; @@ -12089,14 +15222,14 @@ var supportsHistory = function supportsHistory() { * Returns true if browser fires popstate on hash change. * IE10 and IE11 do not. */ -var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() { +var supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() { return window.navigator.userAgent.indexOf('Trident') === -1; }; /** * Returns false if using go(n) with hash history causes a full page reload. */ -var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() { +var supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() { return window.navigator.userAgent.indexOf('Firefox') === -1; }; @@ -12105,37 +15238,44 @@ var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash * Accounts for the fact that Chrome on iOS fires real popstate events * containing undefined state when pressing the back button. */ -var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { +var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; }; /***/ }), -/***/ "./node_modules/history/es/LocationUtils.js": -/*!**************************************************!*\ - !*** ./node_modules/history/es/LocationUtils.js ***! - \**************************************************/ -/*! exports provided: createLocation, locationsAreEqual */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/history/LocationUtils.js": +/*!***********************************************!*\ + !*** ./node_modules/history/LocationUtils.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLocation", function() { return createLocation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locationsAreEqual", function() { return locationsAreEqual; }); -/* harmony import */ var resolve_pathname__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! resolve-pathname */ "./node_modules/resolve-pathname/index.js"); -/* harmony import */ var value_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! value-equal */ "./node_modules/value-equal/index.js"); -/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); + + +exports.__esModule = true; +exports.locationsAreEqual = exports.createLocation = 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 _resolvePathname = __webpack_require__(/*! resolve-pathname */ "./node_modules/resolve-pathname/index.js"); + +var _resolvePathname2 = _interopRequireDefault(_resolvePathname); +var _valueEqual = __webpack_require__(/*! value-equal */ "./node_modules/value-equal/index.js"); +var _valueEqual2 = _interopRequireDefault(_valueEqual); +var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); -var createLocation = function createLocation(path, state, key, currentLocation) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) { var location = void 0; if (typeof path === 'string') { // Two-arg form: push(path, state) - location = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_2__["parsePath"])(path); + location = (0, _PathUtils.parsePath)(path); location.state = state; } else { // One-arg form: push(location) @@ -12175,7 +15315,7 @@ var createLocation = function createLocation(path, state, key, currentLocation) if (!location.pathname) { location.pathname = currentLocation.pathname; } else if (location.pathname.charAt(0) !== '/') { - location.pathname = Object(resolve_pathname__WEBPACK_IMPORTED_MODULE_0__["default"])(location.pathname, currentLocation.pathname); + location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname); } } else { // When there is no prior location and pathname is empty, set it to / @@ -12187,49 +15327,44 @@ var createLocation = function createLocation(path, state, key, currentLocation) return location; }; -var locationsAreEqual = function locationsAreEqual(a, b) { - return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(value_equal__WEBPACK_IMPORTED_MODULE_1__["default"])(a.state, b.state); +var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) { + return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state); }; /***/ }), -/***/ "./node_modules/history/es/PathUtils.js": -/*!**********************************************!*\ - !*** ./node_modules/history/es/PathUtils.js ***! - \**********************************************/ -/*! exports provided: addLeadingSlash, stripLeadingSlash, hasBasename, stripBasename, stripTrailingSlash, parsePath, createPath */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/history/PathUtils.js": +/*!*******************************************!*\ + !*** ./node_modules/history/PathUtils.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLeadingSlash", function() { return addLeadingSlash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripLeadingSlash", function() { return stripLeadingSlash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasBasename", function() { return hasBasename; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripBasename", function() { return stripBasename; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripTrailingSlash", function() { return stripTrailingSlash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return parsePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return createPath; }); -var addLeadingSlash = function addLeadingSlash(path) { + + +exports.__esModule = true; +var addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) { return path.charAt(0) === '/' ? path : '/' + path; }; -var stripLeadingSlash = function stripLeadingSlash(path) { +var stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) { return path.charAt(0) === '/' ? path.substr(1) : path; }; -var hasBasename = function hasBasename(path, prefix) { +var hasBasename = exports.hasBasename = function hasBasename(path, prefix) { return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); }; -var stripBasename = function stripBasename(path, prefix) { +var stripBasename = exports.stripBasename = function stripBasename(path, prefix) { return hasBasename(path, prefix) ? path.substr(prefix.length) : path; }; -var stripTrailingSlash = function stripTrailingSlash(path) { +var stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) { return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; }; -var parsePath = function parsePath(path) { +var parsePath = exports.parsePath = function parsePath(path) { var pathname = path || '/'; var search = ''; var hash = ''; @@ -12253,7 +15388,7 @@ var parsePath = function parsePath(path) { }; }; -var createPath = function createPath(location) { +var createPath = exports.createPath = function createPath(location) { var pathname = location.pathname, search = location.search, hash = location.hash; @@ -12270,33 +15405,41 @@ var createPath = function createPath(location) { /***/ }), -/***/ "./node_modules/history/es/createBrowserHistory.js": -/*!*********************************************************!*\ - !*** ./node_modules/history/es/createBrowserHistory.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); -/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); -/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); -/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/es/createTransitionManager.js"); -/* harmony import */ var _DOMUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/es/DOMUtils.js"); +/***/ "./node_modules/history/createBrowserHistory.js": +/*!******************************************************!*\ + !*** ./node_modules/history/createBrowserHistory.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + 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; }; 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 _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); + +var _warning2 = _interopRequireDefault(_warning); + +var _invariant = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); + +var _invariant2 = _interopRequireDefault(_invariant); +var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/LocationUtils.js"); +var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); +var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/createTransitionManager.js"); +var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); +var _DOMUtils = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/DOMUtils.js"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PopStateEvent = 'popstate'; var HashChangeEvent = 'hashchange'; @@ -12318,20 +15461,20 @@ var getHistoryState = function getHistoryState() { var createBrowserHistory = function createBrowserHistory() { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - invariant__WEBPACK_IMPORTED_MODULE_1___default()(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["canUseDOM"], 'Browser history needs a DOM'); + (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM'); var globalHistory = window.history; - var canUseHistory = Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsHistory"])(); - var needsHashChangeListener = !Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsPopStateOnHashChange"])(); + var canUseHistory = (0, _DOMUtils.supportsHistory)(); + var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)(); var _props$forceRefresh = props.forceRefresh, forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh, _props$getUserConfirm = props.getUserConfirmation, - getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils__WEBPACK_IMPORTED_MODULE_5__["getConfirmation"] : _props$getUserConfirm, + getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm, _props$keyLength = props.keyLength, keyLength = _props$keyLength === undefined ? 6 : _props$keyLength; - var basename = props.basename ? Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripTrailingSlash"])(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"])(props.basename)) : ''; + var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : ''; var getDOMLocation = function getDOMLocation(historyState) { var _ref = historyState || {}, @@ -12346,18 +15489,18 @@ var createBrowserHistory = function createBrowserHistory() { var path = pathname + search + hash; - warning__WEBPACK_IMPORTED_MODULE_0___default()(!basename || Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["hasBasename"])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); + (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); - if (basename) path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripBasename"])(path, basename); + if (basename) path = (0, _PathUtils.stripBasename)(path, basename); - return Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, key); + return (0, _LocationUtils.createLocation)(path, state, key); }; var createKey = function createKey() { return Math.random().toString(36).substr(2, keyLength); }; - var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_4__["default"])(); + var transitionManager = (0, _createTransitionManager2.default)(); var setState = function setState(nextState) { _extends(history, nextState); @@ -12369,7 +15512,7 @@ var createBrowserHistory = function createBrowserHistory() { var handlePopState = function handlePopState(event) { // Ignore extraneous popstate events in WebKit. - if (Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["isExtraneousPopstateEvent"])(event)) return; + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return; handlePop(getDOMLocation(event.state)); }; @@ -12426,14 +15569,14 @@ var createBrowserHistory = function createBrowserHistory() { // Public interface var createHref = function createHref(location) { - return basename + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location); + return basename + (0, _PathUtils.createPath)(location); }; var push = function push(path, state) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); var action = 'PUSH'; - var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); + var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; @@ -12458,7 +15601,7 @@ var createBrowserHistory = function createBrowserHistory() { setState({ action: action, location: location }); } } else { - warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history'); + (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history'); window.location.href = href; } @@ -12466,10 +15609,10 @@ var createBrowserHistory = function createBrowserHistory() { }; var replace = function replace(path, state) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); var action = 'REPLACE'; - var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); + var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; @@ -12492,7 +15635,7 @@ var createBrowserHistory = function createBrowserHistory() { setState({ action: action, location: location }); } } else { - warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history'); + (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history'); window.location.replace(href); } @@ -12517,13 +15660,13 @@ var createBrowserHistory = function createBrowserHistory() { listenerCount += delta; if (listenerCount === 1) { - Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, PopStateEvent, handlePopState); + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); - if (needsHashChangeListener) Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, HashChangeEvent, handleHashChange); + if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); } else if (listenerCount === 0) { - Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, PopStateEvent, handlePopState); + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); - if (needsHashChangeListener) Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, HashChangeEvent, handleHashChange); + if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); } }; @@ -12576,54 +15719,62 @@ var createBrowserHistory = function createBrowserHistory() { return history; }; -/* harmony default export */ __webpack_exports__["default"] = (createBrowserHistory); +exports.default = createBrowserHistory; /***/ }), -/***/ "./node_modules/history/es/createHashHistory.js": -/*!******************************************************!*\ - !*** ./node_modules/history/es/createHashHistory.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/history/createHashHistory.js": +/*!***************************************************!*\ + !*** ./node_modules/history/createHashHistory.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); -/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); -/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); -/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/es/createTransitionManager.js"); -/* harmony import */ var _DOMUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/es/DOMUtils.js"); + + +exports.__esModule = 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 _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); + +var _warning2 = _interopRequireDefault(_warning); + +var _invariant = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); + +var _invariant2 = _interopRequireDefault(_invariant); +var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/LocationUtils.js"); +var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); +var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/createTransitionManager.js"); +var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); +var _DOMUtils = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/DOMUtils.js"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var HashChangeEvent = 'hashchange'; var HashPathCoders = { hashbang: { encodePath: function encodePath(path) { - return path.charAt(0) === '!' ? path : '!/' + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripLeadingSlash"])(path); + return path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path); }, decodePath: function decodePath(path) { return path.charAt(0) === '!' ? path.substr(1) : path; } }, noslash: { - encodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripLeadingSlash"], - decodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"] + encodePath: _PathUtils.stripLeadingSlash, + decodePath: _PathUtils.addLeadingSlash }, slash: { - encodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"], - decodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"] + encodePath: _PathUtils.addLeadingSlash, + decodePath: _PathUtils.addLeadingSlash } }; @@ -12648,17 +15799,17 @@ var replaceHashPath = function replaceHashPath(path) { var createHashHistory = function createHashHistory() { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - invariant__WEBPACK_IMPORTED_MODULE_1___default()(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["canUseDOM"], 'Hash history needs a DOM'); + (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Hash history needs a DOM'); var globalHistory = window.history; - var canGoWithoutReload = Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsGoWithoutReloadUsingHash"])(); + var canGoWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); var _props$getUserConfirm = props.getUserConfirmation, - getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils__WEBPACK_IMPORTED_MODULE_5__["getConfirmation"] : _props$getUserConfirm, + getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm, _props$hashType = props.hashType, hashType = _props$hashType === undefined ? 'slash' : _props$hashType; - var basename = props.basename ? Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripTrailingSlash"])(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"])(props.basename)) : ''; + var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : ''; var _HashPathCoders$hashT = HashPathCoders[hashType], encodePath = _HashPathCoders$hashT.encodePath, @@ -12668,14 +15819,14 @@ var createHashHistory = function createHashHistory() { var getDOMLocation = function getDOMLocation() { var path = decodePath(getHashPath()); - warning__WEBPACK_IMPORTED_MODULE_0___default()(!basename || Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["hasBasename"])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); + (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); - if (basename) path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripBasename"])(path, basename); + if (basename) path = (0, _PathUtils.stripBasename)(path, basename); - return Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path); + return (0, _LocationUtils.createLocation)(path); }; - var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_4__["default"])(); + var transitionManager = (0, _createTransitionManager2.default)(); var setState = function setState(nextState) { _extends(history, nextState); @@ -12699,9 +15850,9 @@ var createHashHistory = function createHashHistory() { var location = getDOMLocation(); var prevLocation = history.location; - if (!forceNextPop && Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["locationsAreEqual"])(prevLocation, location)) return; // A hashchange doesn't always == location change. + if (!forceNextPop && (0, _LocationUtils.locationsAreEqual)(prevLocation, location)) return; // A hashchange doesn't always == location change. - if (ignorePath === Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location)) return; // Ignore this change; we already setState in push/replace. + if (ignorePath === (0, _PathUtils.createPath)(location)) return; // Ignore this change; we already setState in push/replace. ignorePath = null; @@ -12733,11 +15884,11 @@ var createHashHistory = function createHashHistory() { // keeping a list of paths we've seen in sessionStorage. // Instead, we just default to 0 for paths we don't know. - var toIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(toLocation)); + var toIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(toLocation)); if (toIndex === -1) toIndex = 0; - var fromIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(fromLocation)); + var fromIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(fromLocation)); if (fromIndex === -1) fromIndex = 0; @@ -12756,24 +15907,24 @@ var createHashHistory = function createHashHistory() { if (path !== encodedPath) replaceHashPath(encodedPath); var initialLocation = getDOMLocation(); - var allPaths = [Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(initialLocation)]; + var allPaths = [(0, _PathUtils.createPath)(initialLocation)]; // Public interface var createHref = function createHref(location) { - return '#' + encodePath(basename + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location)); + return '#' + encodePath(basename + (0, _PathUtils.createPath)(location)); }; var push = function push(path, state) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Hash history cannot push state; it is ignored'); + (0, _warning2.default)(state === undefined, 'Hash history cannot push state; it is ignored'); var action = 'PUSH'; - var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, undefined, undefined, history.location); + var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; - var path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location); + var path = (0, _PathUtils.createPath)(location); var encodedPath = encodePath(basename + path); var hashChanged = getHashPath() !== encodedPath; @@ -12784,7 +15935,7 @@ var createHashHistory = function createHashHistory() { ignorePath = path; pushHashPath(encodedPath); - var prevIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(history.location)); + var prevIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(history.location)); var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); nextPaths.push(path); @@ -12792,7 +15943,7 @@ var createHashHistory = function createHashHistory() { setState({ action: action, location: location }); } else { - warning__WEBPACK_IMPORTED_MODULE_0___default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack'); + (0, _warning2.default)(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack'); setState(); } @@ -12800,15 +15951,15 @@ var createHashHistory = function createHashHistory() { }; var replace = function replace(path, state) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Hash history cannot replace state; it is ignored'); + (0, _warning2.default)(state === undefined, 'Hash history cannot replace state; it is ignored'); var action = 'REPLACE'; - var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, undefined, undefined, history.location); + var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; - var path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location); + var path = (0, _PathUtils.createPath)(location); var encodedPath = encodePath(basename + path); var hashChanged = getHashPath() !== encodedPath; @@ -12820,7 +15971,7 @@ var createHashHistory = function createHashHistory() { replaceHashPath(encodedPath); } - var prevIndex = allPaths.indexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(history.location)); + var prevIndex = allPaths.indexOf((0, _PathUtils.createPath)(history.location)); if (prevIndex !== -1) allPaths[prevIndex] = path; @@ -12829,7 +15980,7 @@ var createHashHistory = function createHashHistory() { }; var go = function go(n) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser'); + (0, _warning2.default)(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser'); globalHistory.go(n); }; @@ -12848,9 +15999,9 @@ var createHashHistory = function createHashHistory() { listenerCount += delta; if (listenerCount === 1) { - Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, HashChangeEvent, handleHashChange); + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); } else if (listenerCount === 0) { - Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, HashChangeEvent, handleHashChange); + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); } }; @@ -12903,32 +16054,39 @@ var createHashHistory = function createHashHistory() { return history; }; -/* harmony default export */ __webpack_exports__["default"] = (createHashHistory); +exports.default = createHashHistory; /***/ }), -/***/ "./node_modules/history/es/createMemoryHistory.js": -/*!********************************************************!*\ - !*** ./node_modules/history/es/createMemoryHistory.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/history/createMemoryHistory.js": +/*!*****************************************************!*\ + !*** ./node_modules/history/createMemoryHistory.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); -/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); -/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/es/createTransitionManager.js"); + + +exports.__esModule = true; + 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; }; 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 _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); + +var _warning2 = _interopRequireDefault(_warning); + +var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js"); +var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/LocationUtils.js"); +var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/createTransitionManager.js"); +var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var clamp = function clamp(n, lowerBound, upperBound) { return Math.min(Math.max(n, lowerBound), upperBound); @@ -12948,7 +16106,7 @@ var createMemoryHistory = function createMemoryHistory() { keyLength = _props$keyLength === undefined ? 6 : _props$keyLength; - var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_3__["default"])(); + var transitionManager = (0, _createTransitionManager2.default)(); var setState = function setState(nextState) { _extends(history, nextState); @@ -12964,18 +16122,18 @@ var createMemoryHistory = function createMemoryHistory() { var index = clamp(initialIndex, 0, initialEntries.length - 1); var entries = initialEntries.map(function (entry) { - return typeof entry === 'string' ? Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(entry, undefined, createKey()) : Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(entry, undefined, entry.key || createKey()); + return typeof entry === 'string' ? (0, _LocationUtils.createLocation)(entry, undefined, createKey()) : (0, _LocationUtils.createLocation)(entry, undefined, entry.key || createKey()); }); // Public interface - var createHref = _PathUtils__WEBPACK_IMPORTED_MODULE_1__["createPath"]; + var createHref = _PathUtils.createPath; var push = function push(path, state) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); var action = 'PUSH'; - var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); + var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; @@ -13000,10 +16158,10 @@ var createMemoryHistory = function createMemoryHistory() { }; var replace = function replace(path, state) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); var action = 'REPLACE'; - var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); + var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; @@ -13077,28 +16235,33 @@ var createMemoryHistory = function createMemoryHistory() { return history; }; -/* harmony default export */ __webpack_exports__["default"] = (createMemoryHistory); +exports.default = createMemoryHistory; /***/ }), -/***/ "./node_modules/history/es/createTransitionManager.js": -/*!************************************************************!*\ - !*** ./node_modules/history/es/createTransitionManager.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/history/createTransitionManager.js": +/*!*********************************************************!*\ + !*** ./node_modules/history/createTransitionManager.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); -/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); +exports.__esModule = true; + +var _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var createTransitionManager = function createTransitionManager() { var prompt = null; var setPrompt = function setPrompt(nextPrompt) { - warning__WEBPACK_IMPORTED_MODULE_0___default()(prompt == null, 'A history supports only one prompt at a time'); + (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time'); prompt = nextPrompt; @@ -13118,7 +16281,7 @@ var createTransitionManager = function createTransitionManager() { if (typeof getUserConfirmation === 'function') { getUserConfirmation(result, callback); } else { - warning__WEBPACK_IMPORTED_MODULE_0___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message'); + (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message'); callback(true); } @@ -13168,844 +16331,13919 @@ var createTransitionManager = function createTransitionManager() { }; }; -/* harmony default export */ __webpack_exports__["default"] = (createTransitionManager); +exports.default = createTransitionManager; /***/ }), -/***/ "./node_modules/history/es/index.js": -/*!******************************************!*\ - !*** ./node_modules/history/es/index.js ***! - \******************************************/ -/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */ +/***/ "./node_modules/history/es/DOMUtils.js": +/*!*********************************************!*\ + !*** ./node_modules/history/es/DOMUtils.js ***! + \*********************************************/ +/*! exports provided: canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, supportsGoWithoutReloadUsingHash, isExtraneousPopstateEvent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _createBrowserHistory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createBrowserHistory */ "./node_modules/history/es/createBrowserHistory.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createBrowserHistory", function() { return _createBrowserHistory__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _createHashHistory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createHashHistory */ "./node_modules/history/es/createHashHistory.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createHashHistory", function() { return _createHashHistory__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _createMemoryHistory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createMemoryHistory */ "./node_modules/history/es/createMemoryHistory.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return _createMemoryHistory__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createLocation", function() { return _LocationUtils__WEBPACK_IMPORTED_MODULE_3__["createLocation"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "locationsAreEqual", function() { return _LocationUtils__WEBPACK_IMPORTED_MODULE_3__["locationsAreEqual"]; }); - -/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return _PathUtils__WEBPACK_IMPORTED_MODULE_4__["parsePath"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return _PathUtils__WEBPACK_IMPORTED_MODULE_4__["createPath"]; }); - - - - - - - - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canUseDOM", function() { return canUseDOM; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEventListener", function() { return addEventListener; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeEventListener", function() { return removeEventListener; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfirmation", function() { return getConfirmation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsHistory", function() { return supportsHistory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsPopStateOnHashChange", function() { return supportsPopStateOnHashChange; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsGoWithoutReloadUsingHash", function() { return supportsGoWithoutReloadUsingHash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isExtraneousPopstateEvent", function() { return isExtraneousPopstateEvent; }); +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +var addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener); +}; -/***/ }), +var removeEventListener = function removeEventListener(node, event, listener) { + return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener); +}; -/***/ "./node_modules/hoist-non-react-statics/index.js": -/*!*******************************************************!*\ - !*** ./node_modules/hoist-non-react-statics/index.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var getConfirmation = function getConfirmation(message, callback) { + return callback(window.confirm(message)); +}; // eslint-disable-line no-alert /** - * Copyright 2015, Yahoo! Inc. - * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 */ -(function (global, factory) { - true ? module.exports = factory() : - undefined; -}(this, (function () { - 'use strict'; - - var REACT_STATICS = { - childContextTypes: true, - contextTypes: true, - defaultProps: true, - displayName: true, - getDefaultProps: true, - getDerivedStateFromProps: true, - mixins: true, - propTypes: true, - type: true - }; - - var KNOWN_STATICS = { - name: true, - length: true, - prototype: true, - caller: true, - callee: true, - arguments: true, - arity: true - }; - - var defineProperty = Object.defineProperty; - var getOwnPropertyNames = Object.getOwnPropertyNames; - var getOwnPropertySymbols = Object.getOwnPropertySymbols; - var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var getPrototypeOf = Object.getPrototypeOf; - var objectPrototype = getPrototypeOf && getPrototypeOf(Object); - - return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { - if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components - - if (objectPrototype) { - var inheritedComponent = getPrototypeOf(sourceComponent); - if (inheritedComponent && inheritedComponent !== objectPrototype) { - hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); - } - } - - var keys = getOwnPropertyNames(sourceComponent); - - if (getOwnPropertySymbols) { - keys = keys.concat(getOwnPropertySymbols(sourceComponent)); - } - - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { - var descriptor = getOwnPropertyDescriptor(sourceComponent, key); - try { // Avoid failures from read-only properties - defineProperty(targetComponent, key, descriptor); - } catch (e) {} - } - } - - return targetComponent; - } - - return targetComponent; - }; -}))); - +var supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; -/***/ }), + if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; -/***/ "./node_modules/invariant/browser.js": -/*!*******************************************!*\ - !*** ./node_modules/invariant/browser.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return window.history && 'pushState' in window.history; +}; -"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. + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. */ - - +var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() { + return window.navigator.userAgent.indexOf('Trident') === -1; +}; /** - * 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. + * Returns false if using go(n) with hash history causes a full page reload. */ - -var invariant = function(condition, format, a, b, c, d, e, f) { - if (true) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - 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; - } +var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; }; -module.exports = invariant; - +/** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ +var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; +}; /***/ }), -/***/ "./node_modules/lodash-es/_Symbol.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash-es/_Symbol.js ***! - \*******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/history/es/LocationUtils.js": +/*!**************************************************!*\ + !*** ./node_modules/history/es/LocationUtils.js ***! + \**************************************************/ +/*! exports provided: createLocation, locationsAreEqual */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_root.js */ "./node_modules/lodash-es/_root.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLocation", function() { return createLocation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locationsAreEqual", function() { return locationsAreEqual; }); +/* harmony import */ var resolve_pathname__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! resolve-pathname */ "./node_modules/resolve-pathname/index.js"); +/* harmony import */ var value_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! value-equal */ "./node_modules/value-equal/index.js"); +/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); +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; }; -/** Built-in value references. */ -var Symbol = _root_js__WEBPACK_IMPORTED_MODULE_0__["default"].Symbol; -/* harmony default export */ __webpack_exports__["default"] = (Symbol); -/***/ }), -/***/ "./node_modules/lodash-es/_baseGetTag.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash-es/_baseGetTag.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var createLocation = function createLocation(path, state, key, currentLocation) { + var location = void 0; + if (typeof path === 'string') { + // Two-arg form: push(path, state) + location = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_2__["parsePath"])(path); + location.state = state; + } else { + // One-arg form: push(location) + location = _extends({}, path); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/lodash-es/_Symbol.js"); -/* harmony import */ var _getRawTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_getRawTag.js */ "./node_modules/lodash-es/_getRawTag.js"); -/* harmony import */ var _objectToString_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_objectToString.js */ "./node_modules/lodash-es/_objectToString.js"); + if (location.pathname === undefined) location.pathname = ''; + if (location.search) { + if (location.search.charAt(0) !== '?') location.search = '?' + location.search; + } else { + location.search = ''; + } + if (location.hash) { + if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash; + } else { + location.hash = ''; + } + if (state !== undefined && location.state === undefined) location.state = state; + } -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; + try { + location.pathname = decodeURI(location.pathname); + } catch (e) { + if (e instanceof URIError) { + throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.'); + } else { + throw e; + } + } -/** Built-in value references. */ -var symToStringTag = _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"].toStringTag : undefined; + if (key) location.key = key; -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; + if (currentLocation) { + // Resolve incomplete/relative pathname relative to current location. + if (!location.pathname) { + location.pathname = currentLocation.pathname; + } else if (location.pathname.charAt(0) !== '/') { + location.pathname = Object(resolve_pathname__WEBPACK_IMPORTED_MODULE_0__["default"])(location.pathname, currentLocation.pathname); + } + } else { + // When there is no prior location and pathname is empty, set it to / + if (!location.pathname) { + location.pathname = '/'; + } } - return (symToStringTag && symToStringTag in Object(value)) - ? Object(_getRawTag_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value) - : Object(_objectToString_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value); -} -/* harmony default export */ __webpack_exports__["default"] = (baseGetTag); + return location; +}; +var locationsAreEqual = function locationsAreEqual(a, b) { + return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(value_equal__WEBPACK_IMPORTED_MODULE_1__["default"])(a.state, b.state); +}; /***/ }), -/***/ "./node_modules/lodash-es/_freeGlobal.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash-es/_freeGlobal.js ***! - \***********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/history/es/PathUtils.js": +/*!**********************************************!*\ + !*** ./node_modules/history/es/PathUtils.js ***! + \**********************************************/ +/*! exports provided: addLeadingSlash, stripLeadingSlash, hasBasename, stripBasename, stripTrailingSlash, parsePath, createPath */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLeadingSlash", function() { return addLeadingSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripLeadingSlash", function() { return stripLeadingSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasBasename", function() { return hasBasename; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripBasename", function() { return stripBasename; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripTrailingSlash", function() { return stripTrailingSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return parsePath; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return createPath; }); +var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; +}; -/* harmony default export */ __webpack_exports__["default"] = (freeGlobal); +var stripLeadingSlash = function stripLeadingSlash(path) { + return path.charAt(0) === '/' ? path.substr(1) : path; +}; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) +var hasBasename = function hasBasename(path, prefix) { + return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); +}; -/***/ }), +var stripBasename = function stripBasename(path, prefix) { + return hasBasename(path, prefix) ? path.substr(prefix.length) : path; +}; -/***/ "./node_modules/lodash-es/_getPrototype.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash-es/_getPrototype.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var stripTrailingSlash = function stripTrailingSlash(path) { + return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; +}; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _overArg_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_overArg.js */ "./node_modules/lodash-es/_overArg.js"); +var parsePath = function parsePath(path) { + var pathname = path || '/'; + var search = ''; + var hash = ''; + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substr(hashIndex); + pathname = pathname.substr(0, hashIndex); + } -/** Built-in value references. */ -var getPrototype = Object(_overArg_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object.getPrototypeOf, Object); + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substr(searchIndex); + pathname = pathname.substr(0, searchIndex); + } -/* harmony default export */ __webpack_exports__["default"] = (getPrototype); + return { + pathname: pathname, + search: search === '?' ? '' : search, + hash: hash === '#' ? '' : hash + }; +}; + +var createPath = function createPath(location) { + var pathname = location.pathname, + search = location.search, + hash = location.hash; + var path = pathname || '/'; + + if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; + + if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; + + return path; +}; + /***/ }), -/***/ "./node_modules/lodash-es/_getRawTag.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash-es/_getRawTag.js ***! - \**********************************************/ +/***/ "./node_modules/history/es/createBrowserHistory.js": +/*!*********************************************************!*\ + !*** ./node_modules/history/es/createBrowserHistory.js ***! + \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/lodash-es/_Symbol.js"); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); +/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); +/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/es/createTransitionManager.js"); +/* harmony import */ var _DOMUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/es/DOMUtils.js"); +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; }; +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; }; -/** Used for built-in method references. */ -var objectProto = Object.prototype; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; -/** Built-in value references. */ -var symToStringTag = _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"].toStringTag : undefined; + + + + +var PopStateEvent = 'popstate'; +var HashChangeEvent = 'hashchange'; + +var getHistoryState = function getHistoryState() { + try { + return window.history.state || {}; + } catch (e) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + return {}; + } +}; /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. + * Creates a history object that uses the HTML5 history API including + * pushState, replaceState, and the popstate event. */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; +var createBrowserHistory = function createBrowserHistory() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} + invariant__WEBPACK_IMPORTED_MODULE_1___default()(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["canUseDOM"], 'Browser history needs a DOM'); - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} + var globalHistory = window.history; + var canUseHistory = Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsHistory"])(); + var needsHashChangeListener = !Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsPopStateOnHashChange"])(); -/* harmony default export */ __webpack_exports__["default"] = (getRawTag); + var _props$forceRefresh = props.forceRefresh, + forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh, + _props$getUserConfirm = props.getUserConfirmation, + getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils__WEBPACK_IMPORTED_MODULE_5__["getConfirmation"] : _props$getUserConfirm, + _props$keyLength = props.keyLength, + keyLength = _props$keyLength === undefined ? 6 : _props$keyLength; + var basename = props.basename ? Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripTrailingSlash"])(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"])(props.basename)) : ''; -/***/ }), + var getDOMLocation = function getDOMLocation(historyState) { + var _ref = historyState || {}, + key = _ref.key, + state = _ref.state; -/***/ "./node_modules/lodash-es/_objectToString.js": -/*!***************************************************!*\ - !*** ./node_modules/lodash-es/_objectToString.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _window$location = window.location, + pathname = _window$location.pathname, + search = _window$location.search, + hash = _window$location.hash; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** Used for built-in method references. */ -var objectProto = Object.prototype; -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; + var path = pathname + search + hash; -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} + warning__WEBPACK_IMPORTED_MODULE_0___default()(!basename || Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["hasBasename"])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); -/* harmony default export */ __webpack_exports__["default"] = (objectToString); + if (basename) path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripBasename"])(path, basename); + return Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, key); + }; -/***/ }), + var createKey = function createKey() { + return Math.random().toString(36).substr(2, keyLength); + }; -/***/ "./node_modules/lodash-es/_overArg.js": -/*!********************************************!*\ - !*** ./node_modules/lodash-es/_overArg.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_4__["default"])(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); + var setState = function setState(nextState) { + _extends(history, nextState); + + history.length = globalHistory.length; + + transitionManager.notifyListeners(history.location, history.action); }; -} -/* harmony default export */ __webpack_exports__["default"] = (overArg); + var handlePopState = function handlePopState(event) { + // Ignore extraneous popstate events in WebKit. + if (Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["isExtraneousPopstateEvent"])(event)) return; + handlePop(getDOMLocation(event.state)); + }; -/***/ }), + var handleHashChange = function handleHashChange() { + handlePop(getDOMLocation(getHistoryState())); + }; -/***/ "./node_modules/lodash-es/_root.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash-es/_root.js ***! - \*****************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var forceNextPop = false; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_freeGlobal.js */ "./node_modules/lodash-es/_freeGlobal.js"); + var handlePop = function handlePop(location) { + if (forceNextPop) { + forceNextPop = false; + setState(); + } else { + var action = 'POP'; + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (ok) { + setState({ action: action, location: location }); + } else { + revertPop(location); + } + }); + } + }; -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + var revertPop = function revertPop(fromLocation) { + var toLocation = history.location; -/** Used as a reference to the global object. */ -var root = _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__["default"] || freeSelf || Function('return this')(); + // TODO: We could probably make this more reliable by + // keeping a list of keys we've seen in sessionStorage. + // Instead, we just default to 0 for keys we don't know. -/* harmony default export */ __webpack_exports__["default"] = (root); + var toIndex = allKeys.indexOf(toLocation.key); + if (toIndex === -1) toIndex = 0; -/***/ }), + var fromIndex = allKeys.indexOf(fromLocation.key); -/***/ "./node_modules/lodash-es/isObjectLike.js": -/*!************************************************!*\ - !*** ./node_modules/lodash-es/isObjectLike.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (fromIndex === -1) fromIndex = 0; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} + var delta = toIndex - fromIndex; -/* harmony default export */ __webpack_exports__["default"] = (isObjectLike); + if (delta) { + forceNextPop = true; + go(delta); + } + }; + var initialLocation = getDOMLocation(getHistoryState()); + var allKeys = [initialLocation.key]; -/***/ }), + // Public interface -/***/ "./node_modules/lodash-es/isPlainObject.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash-es/isPlainObject.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var createHref = function createHref(location) { + return basename + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_baseGetTag.js */ "./node_modules/lodash-es/_baseGetTag.js"); -/* harmony import */ var _getPrototype_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_getPrototype.js */ "./node_modules/lodash-es/_getPrototype.js"); -/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isObjectLike.js */ "./node_modules/lodash-es/isObjectLike.js"); + var push = function push(path, state) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + var action = 'PUSH'; + var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + var href = createHref(location); + var key = location.key, + state = location.state; -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; + if (canUseHistory) { + globalHistory.pushState({ key: key, state: state }, null, href); -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; + if (forceRefresh) { + window.location.href = href; + } else { + var prevIndex = allKeys.indexOf(history.location.key); + var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + nextKeys.push(location.key); + allKeys = nextKeys; -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); + setState({ action: action, location: location }); + } + } else { + warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history'); -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!Object(_isObjectLike_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value) || Object(_baseGetTag_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) != objectTag) { - return false; - } - var proto = Object(_getPrototype_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} + window.location.href = href; + } + }); + }; -/* harmony default export */ __webpack_exports__["default"] = (isPlainObject); + var replace = function replace(path, state) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + var action = 'REPLACE'; + var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); -/***/ }), + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; -/***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$": -/*!**************************************************!*\ - !*** ./node_modules/moment/locale sync ^\.\/.*$ ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var href = createHref(location); + var key = location.key, + state = location.state; -var map = { - "./af": "./node_modules/moment/locale/af.js", - "./af.js": "./node_modules/moment/locale/af.js", - "./ar": "./node_modules/moment/locale/ar.js", - "./ar-dz": "./node_modules/moment/locale/ar-dz.js", - "./ar-dz.js": "./node_modules/moment/locale/ar-dz.js", - "./ar-kw": "./node_modules/moment/locale/ar-kw.js", - "./ar-kw.js": "./node_modules/moment/locale/ar-kw.js", - "./ar-ly": "./node_modules/moment/locale/ar-ly.js", - "./ar-ly.js": "./node_modules/moment/locale/ar-ly.js", - "./ar-ma": "./node_modules/moment/locale/ar-ma.js", - "./ar-ma.js": "./node_modules/moment/locale/ar-ma.js", - "./ar-sa": "./node_modules/moment/locale/ar-sa.js", - "./ar-sa.js": "./node_modules/moment/locale/ar-sa.js", - "./ar-tn": "./node_modules/moment/locale/ar-tn.js", - "./ar-tn.js": "./node_modules/moment/locale/ar-tn.js", - "./ar.js": "./node_modules/moment/locale/ar.js", - "./az": "./node_modules/moment/locale/az.js", - "./az.js": "./node_modules/moment/locale/az.js", - "./be": "./node_modules/moment/locale/be.js", - "./be.js": "./node_modules/moment/locale/be.js", - "./bg": "./node_modules/moment/locale/bg.js", - "./bg.js": "./node_modules/moment/locale/bg.js", - "./bm": "./node_modules/moment/locale/bm.js", - "./bm.js": "./node_modules/moment/locale/bm.js", - "./bn": "./node_modules/moment/locale/bn.js", - "./bn.js": "./node_modules/moment/locale/bn.js", - "./bo": "./node_modules/moment/locale/bo.js", - "./bo.js": "./node_modules/moment/locale/bo.js", - "./br": "./node_modules/moment/locale/br.js", - "./br.js": "./node_modules/moment/locale/br.js", - "./bs": "./node_modules/moment/locale/bs.js", - "./bs.js": "./node_modules/moment/locale/bs.js", - "./ca": "./node_modules/moment/locale/ca.js", - "./ca.js": "./node_modules/moment/locale/ca.js", - "./cs": "./node_modules/moment/locale/cs.js", - "./cs.js": "./node_modules/moment/locale/cs.js", - "./cv": "./node_modules/moment/locale/cv.js", - "./cv.js": "./node_modules/moment/locale/cv.js", - "./cy": "./node_modules/moment/locale/cy.js", - "./cy.js": "./node_modules/moment/locale/cy.js", - "./da": "./node_modules/moment/locale/da.js", - "./da.js": "./node_modules/moment/locale/da.js", - "./de": "./node_modules/moment/locale/de.js", - "./de-at": "./node_modules/moment/locale/de-at.js", - "./de-at.js": "./node_modules/moment/locale/de-at.js", - "./de-ch": "./node_modules/moment/locale/de-ch.js", - "./de-ch.js": "./node_modules/moment/locale/de-ch.js", - "./de.js": "./node_modules/moment/locale/de.js", - "./dv": "./node_modules/moment/locale/dv.js", - "./dv.js": "./node_modules/moment/locale/dv.js", - "./el": "./node_modules/moment/locale/el.js", - "./el.js": "./node_modules/moment/locale/el.js", - "./en-au": "./node_modules/moment/locale/en-au.js", - "./en-au.js": "./node_modules/moment/locale/en-au.js", - "./en-ca": "./node_modules/moment/locale/en-ca.js", - "./en-ca.js": "./node_modules/moment/locale/en-ca.js", - "./en-gb": "./node_modules/moment/locale/en-gb.js", - "./en-gb.js": "./node_modules/moment/locale/en-gb.js", - "./en-ie": "./node_modules/moment/locale/en-ie.js", - "./en-ie.js": "./node_modules/moment/locale/en-ie.js", - "./en-il": "./node_modules/moment/locale/en-il.js", - "./en-il.js": "./node_modules/moment/locale/en-il.js", - "./en-nz": "./node_modules/moment/locale/en-nz.js", - "./en-nz.js": "./node_modules/moment/locale/en-nz.js", - "./eo": "./node_modules/moment/locale/eo.js", - "./eo.js": "./node_modules/moment/locale/eo.js", - "./es": "./node_modules/moment/locale/es.js", - "./es-do": "./node_modules/moment/locale/es-do.js", - "./es-do.js": "./node_modules/moment/locale/es-do.js", - "./es-us": "./node_modules/moment/locale/es-us.js", - "./es-us.js": "./node_modules/moment/locale/es-us.js", - "./es.js": "./node_modules/moment/locale/es.js", - "./et": "./node_modules/moment/locale/et.js", - "./et.js": "./node_modules/moment/locale/et.js", - "./eu": "./node_modules/moment/locale/eu.js", - "./eu.js": "./node_modules/moment/locale/eu.js", - "./fa": "./node_modules/moment/locale/fa.js", - "./fa.js": "./node_modules/moment/locale/fa.js", - "./fi": "./node_modules/moment/locale/fi.js", - "./fi.js": "./node_modules/moment/locale/fi.js", - "./fo": "./node_modules/moment/locale/fo.js", - "./fo.js": "./node_modules/moment/locale/fo.js", - "./fr": "./node_modules/moment/locale/fr.js", - "./fr-ca": "./node_modules/moment/locale/fr-ca.js", - "./fr-ca.js": "./node_modules/moment/locale/fr-ca.js", - "./fr-ch": "./node_modules/moment/locale/fr-ch.js", - "./fr-ch.js": "./node_modules/moment/locale/fr-ch.js", - "./fr.js": "./node_modules/moment/locale/fr.js", - "./fy": "./node_modules/moment/locale/fy.js", - "./fy.js": "./node_modules/moment/locale/fy.js", - "./gd": "./node_modules/moment/locale/gd.js", - "./gd.js": "./node_modules/moment/locale/gd.js", - "./gl": "./node_modules/moment/locale/gl.js", - "./gl.js": "./node_modules/moment/locale/gl.js", - "./gom-latn": "./node_modules/moment/locale/gom-latn.js", - "./gom-latn.js": "./node_modules/moment/locale/gom-latn.js", - "./gu": "./node_modules/moment/locale/gu.js", - "./gu.js": "./node_modules/moment/locale/gu.js", - "./he": "./node_modules/moment/locale/he.js", - "./he.js": "./node_modules/moment/locale/he.js", - "./hi": "./node_modules/moment/locale/hi.js", - "./hi.js": "./node_modules/moment/locale/hi.js", - "./hr": "./node_modules/moment/locale/hr.js", - "./hr.js": "./node_modules/moment/locale/hr.js", - "./hu": "./node_modules/moment/locale/hu.js", - "./hu.js": "./node_modules/moment/locale/hu.js", - "./hy-am": "./node_modules/moment/locale/hy-am.js", - "./hy-am.js": "./node_modules/moment/locale/hy-am.js", - "./id": "./node_modules/moment/locale/id.js", - "./id.js": "./node_modules/moment/locale/id.js", - "./is": "./node_modules/moment/locale/is.js", - "./is.js": "./node_modules/moment/locale/is.js", - "./it": "./node_modules/moment/locale/it.js", - "./it.js": "./node_modules/moment/locale/it.js", - "./ja": "./node_modules/moment/locale/ja.js", - "./ja.js": "./node_modules/moment/locale/ja.js", - "./jv": "./node_modules/moment/locale/jv.js", - "./jv.js": "./node_modules/moment/locale/jv.js", - "./ka": "./node_modules/moment/locale/ka.js", - "./ka.js": "./node_modules/moment/locale/ka.js", - "./kk": "./node_modules/moment/locale/kk.js", - "./kk.js": "./node_modules/moment/locale/kk.js", - "./km": "./node_modules/moment/locale/km.js", - "./km.js": "./node_modules/moment/locale/km.js", - "./kn": "./node_modules/moment/locale/kn.js", - "./kn.js": "./node_modules/moment/locale/kn.js", - "./ko": "./node_modules/moment/locale/ko.js", - "./ko.js": "./node_modules/moment/locale/ko.js", - "./ky": "./node_modules/moment/locale/ky.js", - "./ky.js": "./node_modules/moment/locale/ky.js", - "./lb": "./node_modules/moment/locale/lb.js", - "./lb.js": "./node_modules/moment/locale/lb.js", - "./lo": "./node_modules/moment/locale/lo.js", - "./lo.js": "./node_modules/moment/locale/lo.js", - "./lt": "./node_modules/moment/locale/lt.js", - "./lt.js": "./node_modules/moment/locale/lt.js", - "./lv": "./node_modules/moment/locale/lv.js", - "./lv.js": "./node_modules/moment/locale/lv.js", - "./me": "./node_modules/moment/locale/me.js", - "./me.js": "./node_modules/moment/locale/me.js", - "./mi": "./node_modules/moment/locale/mi.js", - "./mi.js": "./node_modules/moment/locale/mi.js", - "./mk": "./node_modules/moment/locale/mk.js", - "./mk.js": "./node_modules/moment/locale/mk.js", - "./ml": "./node_modules/moment/locale/ml.js", - "./ml.js": "./node_modules/moment/locale/ml.js", - "./mn": "./node_modules/moment/locale/mn.js", - "./mn.js": "./node_modules/moment/locale/mn.js", - "./mr": "./node_modules/moment/locale/mr.js", - "./mr.js": "./node_modules/moment/locale/mr.js", - "./ms": "./node_modules/moment/locale/ms.js", - "./ms-my": "./node_modules/moment/locale/ms-my.js", - "./ms-my.js": "./node_modules/moment/locale/ms-my.js", - "./ms.js": "./node_modules/moment/locale/ms.js", - "./mt": "./node_modules/moment/locale/mt.js", - "./mt.js": "./node_modules/moment/locale/mt.js", - "./my": "./node_modules/moment/locale/my.js", - "./my.js": "./node_modules/moment/locale/my.js", - "./nb": "./node_modules/moment/locale/nb.js", - "./nb.js": "./node_modules/moment/locale/nb.js", - "./ne": "./node_modules/moment/locale/ne.js", - "./ne.js": "./node_modules/moment/locale/ne.js", - "./nl": "./node_modules/moment/locale/nl.js", - "./nl-be": "./node_modules/moment/locale/nl-be.js", - "./nl-be.js": "./node_modules/moment/locale/nl-be.js", - "./nl.js": "./node_modules/moment/locale/nl.js", - "./nn": "./node_modules/moment/locale/nn.js", - "./nn.js": "./node_modules/moment/locale/nn.js", - "./pa-in": "./node_modules/moment/locale/pa-in.js", - "./pa-in.js": "./node_modules/moment/locale/pa-in.js", - "./pl": "./node_modules/moment/locale/pl.js", - "./pl.js": "./node_modules/moment/locale/pl.js", - "./pt": "./node_modules/moment/locale/pt.js", - "./pt-br": "./node_modules/moment/locale/pt-br.js", - "./pt-br.js": "./node_modules/moment/locale/pt-br.js", - "./pt.js": "./node_modules/moment/locale/pt.js", - "./ro": "./node_modules/moment/locale/ro.js", - "./ro.js": "./node_modules/moment/locale/ro.js", - "./ru": "./node_modules/moment/locale/ru.js", - "./ru.js": "./node_modules/moment/locale/ru.js", - "./sd": "./node_modules/moment/locale/sd.js", - "./sd.js": "./node_modules/moment/locale/sd.js", - "./se": "./node_modules/moment/locale/se.js", - "./se.js": "./node_modules/moment/locale/se.js", - "./si": "./node_modules/moment/locale/si.js", - "./si.js": "./node_modules/moment/locale/si.js", - "./sk": "./node_modules/moment/locale/sk.js", - "./sk.js": "./node_modules/moment/locale/sk.js", - "./sl": "./node_modules/moment/locale/sl.js", - "./sl.js": "./node_modules/moment/locale/sl.js", - "./sq": "./node_modules/moment/locale/sq.js", - "./sq.js": "./node_modules/moment/locale/sq.js", - "./sr": "./node_modules/moment/locale/sr.js", - "./sr-cyrl": "./node_modules/moment/locale/sr-cyrl.js", - "./sr-cyrl.js": "./node_modules/moment/locale/sr-cyrl.js", - "./sr.js": "./node_modules/moment/locale/sr.js", - "./ss": "./node_modules/moment/locale/ss.js", - "./ss.js": "./node_modules/moment/locale/ss.js", - "./sv": "./node_modules/moment/locale/sv.js", - "./sv.js": "./node_modules/moment/locale/sv.js", - "./sw": "./node_modules/moment/locale/sw.js", - "./sw.js": "./node_modules/moment/locale/sw.js", - "./ta": "./node_modules/moment/locale/ta.js", - "./ta.js": "./node_modules/moment/locale/ta.js", - "./te": "./node_modules/moment/locale/te.js", - "./te.js": "./node_modules/moment/locale/te.js", - "./tet": "./node_modules/moment/locale/tet.js", - "./tet.js": "./node_modules/moment/locale/tet.js", - "./tg": "./node_modules/moment/locale/tg.js", - "./tg.js": "./node_modules/moment/locale/tg.js", - "./th": "./node_modules/moment/locale/th.js", - "./th.js": "./node_modules/moment/locale/th.js", - "./tl-ph": "./node_modules/moment/locale/tl-ph.js", - "./tl-ph.js": "./node_modules/moment/locale/tl-ph.js", - "./tlh": "./node_modules/moment/locale/tlh.js", - "./tlh.js": "./node_modules/moment/locale/tlh.js", - "./tr": "./node_modules/moment/locale/tr.js", - "./tr.js": "./node_modules/moment/locale/tr.js", - "./tzl": "./node_modules/moment/locale/tzl.js", - "./tzl.js": "./node_modules/moment/locale/tzl.js", - "./tzm": "./node_modules/moment/locale/tzm.js", - "./tzm-latn": "./node_modules/moment/locale/tzm-latn.js", - "./tzm-latn.js": "./node_modules/moment/locale/tzm-latn.js", - "./tzm.js": "./node_modules/moment/locale/tzm.js", - "./ug-cn": "./node_modules/moment/locale/ug-cn.js", - "./ug-cn.js": "./node_modules/moment/locale/ug-cn.js", - "./uk": "./node_modules/moment/locale/uk.js", - "./uk.js": "./node_modules/moment/locale/uk.js", - "./ur": "./node_modules/moment/locale/ur.js", - "./ur.js": "./node_modules/moment/locale/ur.js", - "./uz": "./node_modules/moment/locale/uz.js", - "./uz-latn": "./node_modules/moment/locale/uz-latn.js", - "./uz-latn.js": "./node_modules/moment/locale/uz-latn.js", - "./uz.js": "./node_modules/moment/locale/uz.js", - "./vi": "./node_modules/moment/locale/vi.js", - "./vi.js": "./node_modules/moment/locale/vi.js", - "./x-pseudo": "./node_modules/moment/locale/x-pseudo.js", - "./x-pseudo.js": "./node_modules/moment/locale/x-pseudo.js", - "./yo": "./node_modules/moment/locale/yo.js", - "./yo.js": "./node_modules/moment/locale/yo.js", - "./zh-cn": "./node_modules/moment/locale/zh-cn.js", - "./zh-cn.js": "./node_modules/moment/locale/zh-cn.js", - "./zh-hk": "./node_modules/moment/locale/zh-hk.js", - "./zh-hk.js": "./node_modules/moment/locale/zh-hk.js", - "./zh-tw": "./node_modules/moment/locale/zh-tw.js", - "./zh-tw.js": "./node_modules/moment/locale/zh-tw.js" + + if (canUseHistory) { + globalHistory.replaceState({ key: key, state: state }, null, href); + + if (forceRefresh) { + window.location.replace(href); + } else { + var prevIndex = allKeys.indexOf(history.location.key); + + if (prevIndex !== -1) allKeys[prevIndex] = location.key; + + setState({ action: action, location: location }); + } + } else { + warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history'); + + window.location.replace(href); + } + }); + }; + + var go = function go(n) { + globalHistory.go(n); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var listenerCount = 0; + + var checkDOMListeners = function checkDOMListeners(delta) { + listenerCount += delta; + + if (listenerCount === 1) { + Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, PopStateEvent, handlePopState); + + if (needsHashChangeListener) Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, HashChangeEvent, handleHashChange); + } else if (listenerCount === 0) { + Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, PopStateEvent, handlePopState); + + if (needsHashChangeListener) Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, HashChangeEvent, handleHashChange); + } + }; + + var isBlocked = false; + + var block = function block() { + var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + var unblock = transitionManager.setPrompt(prompt); + + if (!isBlocked) { + checkDOMListeners(1); + isBlocked = true; + } + + return function () { + if (isBlocked) { + isBlocked = false; + checkDOMListeners(-1); + } + + return unblock(); + }; + }; + + var listen = function listen(listener) { + var unlisten = transitionManager.appendListener(listener); + checkDOMListeners(1); + + return function () { + checkDOMListeners(-1); + unlisten(); + }; + }; + + var history = { + length: globalHistory.length, + action: 'POP', + location: initialLocation, + createHref: createHref, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + block: block, + listen: listen + }; + + return history; +}; + +/* harmony default export */ __webpack_exports__["default"] = (createBrowserHistory); + +/***/ }), + +/***/ "./node_modules/history/es/createHashHistory.js": +/*!******************************************************!*\ + !*** ./node_modules/history/es/createHashHistory.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); +/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); +/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/es/createTransitionManager.js"); +/* harmony import */ var _DOMUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/es/DOMUtils.js"); +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 HashChangeEvent = 'hashchange'; + +var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!/' + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripLeadingSlash"])(path); + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substr(1) : path; + } + }, + noslash: { + encodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripLeadingSlash"], + decodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"] + }, + slash: { + encodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"], + decodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"] + } +}; + +var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); +}; + +var pushHashPath = function pushHashPath(path) { + return window.location.hash = path; }; +var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); +}; + +var createHashHistory = function createHashHistory() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + invariant__WEBPACK_IMPORTED_MODULE_1___default()(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["canUseDOM"], 'Hash history needs a DOM'); + + var globalHistory = window.history; + var canGoWithoutReload = Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsGoWithoutReloadUsingHash"])(); + + var _props$getUserConfirm = props.getUserConfirmation, + getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils__WEBPACK_IMPORTED_MODULE_5__["getConfirmation"] : _props$getUserConfirm, + _props$hashType = props.hashType, + hashType = _props$hashType === undefined ? 'slash' : _props$hashType; + + var basename = props.basename ? Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripTrailingSlash"])(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"])(props.basename)) : ''; + + var _HashPathCoders$hashT = HashPathCoders[hashType], + encodePath = _HashPathCoders$hashT.encodePath, + decodePath = _HashPathCoders$hashT.decodePath; + + + var getDOMLocation = function getDOMLocation() { + var path = decodePath(getHashPath()); + + warning__WEBPACK_IMPORTED_MODULE_0___default()(!basename || Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["hasBasename"])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'); + + if (basename) path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripBasename"])(path, basename); + + return Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path); + }; + + var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_4__["default"])(); + + var setState = function setState(nextState) { + _extends(history, nextState); + + history.length = globalHistory.length; + + transitionManager.notifyListeners(history.location, history.action); + }; + + var forceNextPop = false; + var ignorePath = null; + + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = encodePath(path); + + if (path !== encodedPath) { + // Ensure we always have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var location = getDOMLocation(); + var prevLocation = history.location; + + if (!forceNextPop && Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["locationsAreEqual"])(prevLocation, location)) return; // A hashchange doesn't always == location change. + + if (ignorePath === Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location)) return; // Ignore this change; we already setState in push/replace. + + ignorePath = null; + + handlePop(location); + } + }; + + var handlePop = function handlePop(location) { + if (forceNextPop) { + forceNextPop = false; + setState(); + } else { + var action = 'POP'; + + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (ok) { + setState({ action: action, location: location }); + } else { + revertPop(location); + } + }); + } + }; + + var revertPop = function revertPop(fromLocation) { + var toLocation = history.location; + + // TODO: We could probably make this more reliable by + // keeping a list of paths we've seen in sessionStorage. + // Instead, we just default to 0 for paths we don't know. + + var toIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(toLocation)); + + if (toIndex === -1) toIndex = 0; + + var fromIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(fromLocation)); + + if (fromIndex === -1) fromIndex = 0; + + var delta = toIndex - fromIndex; + + if (delta) { + forceNextPop = true; + go(delta); + } + }; + + // Ensure the hash is encoded properly before doing anything else. + var path = getHashPath(); + var encodedPath = encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + var initialLocation = getDOMLocation(); + var allPaths = [Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(initialLocation)]; + + // Public interface + + var createHref = function createHref(location) { + return '#' + encodePath(basename + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location)); + }; + + var push = function push(path, state) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Hash history cannot push state; it is ignored'); + + var action = 'PUSH'; + var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, undefined, undefined, history.location); + + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + + var path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location); + var encodedPath = encodePath(basename + path); + var hashChanged = getHashPath() !== encodedPath; + + if (hashChanged) { + // We cannot tell if a hashchange was caused by a PUSH, so we'd + // rather setState here and ignore the hashchange. The caveat here + // is that other hash histories in the page will consider it a POP. + ignorePath = path; + pushHashPath(encodedPath); + + var prevIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(history.location)); + var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); + + nextPaths.push(path); + allPaths = nextPaths; + + setState({ action: action, location: location }); + } else { + warning__WEBPACK_IMPORTED_MODULE_0___default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack'); + + setState(); + } + }); + }; + + var replace = function replace(path, state) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Hash history cannot replace state; it is ignored'); + + var action = 'REPLACE'; + var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, undefined, undefined, history.location); + + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + + var path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location); + var encodedPath = encodePath(basename + path); + var hashChanged = getHashPath() !== encodedPath; + + if (hashChanged) { + // We cannot tell if a hashchange was caused by a REPLACE, so we'd + // rather setState here and ignore the hashchange. The caveat here + // is that other hash histories in the page will consider it a POP. + ignorePath = path; + replaceHashPath(encodedPath); + } + + var prevIndex = allPaths.indexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(history.location)); + + if (prevIndex !== -1) allPaths[prevIndex] = path; + + setState({ action: action, location: location }); + }); + }; + + var go = function go(n) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser'); + + globalHistory.go(n); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var listenerCount = 0; + + var checkDOMListeners = function checkDOMListeners(delta) { + listenerCount += delta; + + if (listenerCount === 1) { + Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, HashChangeEvent, handleHashChange); + } else if (listenerCount === 0) { + Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, HashChangeEvent, handleHashChange); + } + }; + + var isBlocked = false; + + var block = function block() { + var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + var unblock = transitionManager.setPrompt(prompt); + + if (!isBlocked) { + checkDOMListeners(1); + isBlocked = true; + } + + return function () { + if (isBlocked) { + isBlocked = false; + checkDOMListeners(-1); + } + + return unblock(); + }; + }; + + var listen = function listen(listener) { + var unlisten = transitionManager.appendListener(listener); + checkDOMListeners(1); + + return function () { + checkDOMListeners(-1); + unlisten(); + }; + }; + + var history = { + length: globalHistory.length, + action: 'POP', + location: initialLocation, + createHref: createHref, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + block: block, + listen: listen + }; + + return history; +}; + +/* harmony default export */ __webpack_exports__["default"] = (createHashHistory); + +/***/ }), + +/***/ "./node_modules/history/es/createMemoryHistory.js": +/*!********************************************************!*\ + !*** ./node_modules/history/es/createMemoryHistory.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); +/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); +/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/es/createTransitionManager.js"); +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; }; + +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 clamp = function clamp(n, lowerBound, upperBound) { + return Math.min(Math.max(n, lowerBound), upperBound); +}; + +/** + * Creates a history object that stores locations in memory. + */ +var createMemoryHistory = function createMemoryHistory() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getUserConfirmation = props.getUserConfirmation, + _props$initialEntries = props.initialEntries, + initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries, + _props$initialIndex = props.initialIndex, + initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex, + _props$keyLength = props.keyLength, + keyLength = _props$keyLength === undefined ? 6 : _props$keyLength; + + + var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_3__["default"])(); + + var setState = function setState(nextState) { + _extends(history, nextState); + + history.length = history.entries.length; + + transitionManager.notifyListeners(history.location, history.action); + }; + + var createKey = function createKey() { + return Math.random().toString(36).substr(2, keyLength); + }; + + var index = clamp(initialIndex, 0, initialEntries.length - 1); + var entries = initialEntries.map(function (entry) { + return typeof entry === 'string' ? Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(entry, undefined, createKey()) : Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(entry, undefined, entry.key || createKey()); + }); + + // Public interface + + var createHref = _PathUtils__WEBPACK_IMPORTED_MODULE_1__["createPath"]; + + var push = function push(path, state) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + + var action = 'PUSH'; + var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); + + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + + var prevIndex = history.index; + var nextIndex = prevIndex + 1; + + var nextEntries = history.entries.slice(0); + if (nextEntries.length > nextIndex) { + nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location); + } else { + nextEntries.push(location); + } + + setState({ + action: action, + location: location, + index: nextIndex, + entries: nextEntries + }); + }); + }; + + var replace = function replace(path, state) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored'); + + var action = 'REPLACE'; + var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location); + + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (!ok) return; + + history.entries[history.index] = location; + + setState({ action: action, location: location }); + }); + }; + + var go = function go(n) { + var nextIndex = clamp(history.index + n, 0, history.entries.length - 1); + + var action = 'POP'; + var location = history.entries[nextIndex]; + + transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { + if (ok) { + setState({ + action: action, + location: location, + index: nextIndex + }); + } else { + // Mimic the behavior of DOM histories by + // causing a render after a cancelled POP. + setState(); + } + }); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var canGo = function canGo(n) { + var nextIndex = history.index + n; + return nextIndex >= 0 && nextIndex < history.entries.length; + }; + + var block = function block() { + var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + return transitionManager.setPrompt(prompt); + }; + + var listen = function listen(listener) { + return transitionManager.appendListener(listener); + }; + + var history = { + length: entries.length, + action: 'POP', + location: entries[index], + index: index, + entries: entries, + createHref: createHref, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + canGo: canGo, + block: block, + listen: listen + }; + + return history; +}; + +/* harmony default export */ __webpack_exports__["default"] = (createMemoryHistory); + +/***/ }), + +/***/ "./node_modules/history/es/createTransitionManager.js": +/*!************************************************************!*\ + !*** ./node_modules/history/es/createTransitionManager.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js"); +/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__); + + +var createTransitionManager = function createTransitionManager() { + var prompt = null; + + var setPrompt = function setPrompt(nextPrompt) { + warning__WEBPACK_IMPORTED_MODULE_0___default()(prompt == null, 'A history supports only one prompt at a time'); + + prompt = nextPrompt; + + return function () { + if (prompt === nextPrompt) prompt = null; + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) { + // TODO: If another transition starts while we're still confirming + // the previous one, we may end up in a weird state. Figure out the + // best way to handle this. + if (prompt != null) { + var result = typeof prompt === 'function' ? prompt(location, action) : prompt; + + if (typeof result === 'string') { + if (typeof getUserConfirmation === 'function') { + getUserConfirmation(result, callback); + } else { + warning__WEBPACK_IMPORTED_MODULE_0___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message'); + + callback(true); + } + } else { + // Return false from a transition hook to cancel the transition. + callback(result !== false); + } + } else { + callback(true); + } + }; + + var listeners = []; + + var appendListener = function appendListener(fn) { + var isActive = true; + + var listener = function listener() { + if (isActive) fn.apply(undefined, arguments); + }; + + listeners.push(listener); + + return function () { + isActive = false; + listeners = listeners.filter(function (item) { + return item !== listener; + }); + }; + }; + + var notifyListeners = function notifyListeners() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + listeners.forEach(function (listener) { + return listener.apply(undefined, args); + }); + }; + + return { + setPrompt: setPrompt, + confirmTransitionTo: confirmTransitionTo, + appendListener: appendListener, + notifyListeners: notifyListeners + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (createTransitionManager); + +/***/ }), + +/***/ "./node_modules/history/es/index.js": +/*!******************************************!*\ + !*** ./node_modules/history/es/index.js ***! + \******************************************/ +/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _createBrowserHistory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createBrowserHistory */ "./node_modules/history/es/createBrowserHistory.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createBrowserHistory", function() { return _createBrowserHistory__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _createHashHistory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createHashHistory */ "./node_modules/history/es/createHashHistory.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createHashHistory", function() { return _createHashHistory__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _createMemoryHistory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createMemoryHistory */ "./node_modules/history/es/createMemoryHistory.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return _createMemoryHistory__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/es/LocationUtils.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createLocation", function() { return _LocationUtils__WEBPACK_IMPORTED_MODULE_3__["createLocation"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "locationsAreEqual", function() { return _LocationUtils__WEBPACK_IMPORTED_MODULE_3__["locationsAreEqual"]; }); + +/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/es/PathUtils.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return _PathUtils__WEBPACK_IMPORTED_MODULE_4__["parsePath"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return _PathUtils__WEBPACK_IMPORTED_MODULE_4__["createPath"]; }); + + + + + + + + + + + +/***/ }), + +/***/ "./node_modules/hoist-non-react-statics/index.js": +/*!*******************************************************!*\ + !*** ./node_modules/hoist-non-react-statics/index.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +(function (global, factory) { + true ? module.exports = factory() : + undefined; +}(this, (function () { + 'use strict'; + + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true + }; + + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true + }; + + var defineProperty = Object.defineProperty; + var getOwnPropertyNames = Object.getOwnPropertyNames; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var getPrototypeOf = Object.getPrototypeOf; + var objectPrototype = getPrototypeOf && getPrototypeOf(Object); + + return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components + + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } + + var keys = getOwnPropertyNames(sourceComponent); + + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); + try { // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } + } + + return targetComponent; + } + + return targetComponent; + }; +}))); + + +/***/ }), + +/***/ "./node_modules/ieee754/index.js": +/*!***************************************!*\ + !*** ./node_modules/ieee754/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + + +/***/ }), + +/***/ "./node_modules/immediate/lib/browser.js": +/*!***********************************************!*\ + !*** ./node_modules/immediate/lib/browser.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { +var Mutation = global.MutationObserver || global.WebKitMutationObserver; + +var scheduleDrain; + +{ + if (Mutation) { + var called = 0; + var observer = new Mutation(nextTick); + var element = global.document.createTextNode(''); + observer.observe(element, { + characterData: true + }); + scheduleDrain = function () { + element.data = (called = ++called % 2); + }; + } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { + var channel = new global.MessageChannel(); + channel.port1.onmessage = nextTick; + scheduleDrain = function () { + channel.port2.postMessage(0); + }; + } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { + scheduleDrain = function () { + + // Create a