diff --git a/dist/js/field.js b/dist/js/field.js index 001ec92..5e83d3d 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 3); +/******/ return __webpack_require__(__webpack_require__.s = 6); /******/ }) /************************************************************************/ /******/ ([ @@ -173,1096 +173,721 @@ module.exports = function normalizeComponent ( /***/ }), -/* 1 */, -/* 2 */, -/* 3 */ +/* 1 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(4); -module.exports = __webpack_require__(20); +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["laravel-nova"] = factory(); + else + root["laravel-nova"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 47); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { -function getParameterByName(name, url) { - if (!url) url = window.location.href; - name = name.replace(/[\[\]]/g, '\\$&'); - var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), - results = regex.exec(url); - if (!results) return null; - if (!results[2]) return ''; - return decodeURIComponent(results[2].replace(/\+/g, ' ')); -} +var bind = __webpack_require__(46); +var isBuffer = __webpack_require__(156); -Nova.booting(function (Vue, router) { - Vue.component('index-multilingual-nova', __webpack_require__(5)); - Vue.component('detail-multilingual-nova', __webpack_require__(11)); - Vue.component('form-multilingual-nova', __webpack_require__(16)); +/*global toString:true*/ - var lang = getParameterByName('lang'); - if (lang) { - Nova.request().defaults.headers['lang'] = lang; - } -}); +// utils is a library of generic helper functions non-specific to axios -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { +var toString = Object.prototype.toString; -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(9) -/* template */ -var __vue_template__ = __webpack_require__(10) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/IndexField.vue" +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ +function isArray(val) { + return toString.call(val) === '[object Array]'; +} -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-9e63f81a", Component.options) +/** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; +} + +/** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ +function isFormData(val) { + return (typeof FormData !== 'undefined') && (val instanceof FormData); +} + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); } else { - hotAPI.reload("data-v-9e63f81a", Component.options) + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports + return result; +} +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} -/***/ }), -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LanguageUI__ = __webpack_require__(24); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LanguageUI___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__LanguageUI__); -// -// -// -// +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} +/** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ +function isObject(val) { + return val !== null && typeof val === 'object'; +} +/** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ +function isDate(val) { + return toString.call(val) === '[object Date]'; +} -/* harmony default export */ __webpack_exports__["default"] = ({ +/** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ +function isFile(val) { + return toString.call(val) === '[object File]'; +} - props: ['resourceName', 'field'], - components: { - LanguageUI: __WEBPACK_IMPORTED_MODULE_0__LanguageUI___default.a - }, - methods: { - redirect: function redirect(locale) { - console.log(locale); - window.location = Nova.config.base + "/resources/" + this.resourceName + "/" + this.field.value.id + "/edit" + "?lang=" + locale; - } - }, - mounted: function mounted() { - if (this.field.value.style == 'list' || this.field.value.style == 'mix' && this.field.value.locales.length > this.field.value.convert_to_list_after) { - var locales = this.field.value.locales; - locales.map(function (item) { - if (item.translated) item.label += " -translated"; - return item; - }); - Object.assign(this.field, { "options": this.field.value.locales }); - } - } -}); +/** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ +function isBlob(val) { + return toString.call(val) === '[object Blob]'; +} -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +function isFunction(val) { + return toString.call(val) === '[object Function]'; +} -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("language-u-i", { - attrs: { field: _vm.field }, - on: { change: _vm.redirect } - }) +/** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ +function isStream(val) { + return isObject(val) && isFunction(val.pipe); } -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-9e63f81a", module.exports) + +/** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; +} + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ +function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); +} + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ +function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); } -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ +function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(14) -/* template */ -var __vue_template__ = __webpack_require__(15) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/DetailField.vue" + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-0224618e", Component.options) + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } } else { - hotAPI.reload("data-v-0224618e", Component.options) + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } } - module.hot.dispose(function (data) { - disposed = true - }) -})()} +} -module.exports = Component.exports +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (typeof result[key] === 'object' && typeof val === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ +function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; +} + +module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim +}; /***/ }), -/* 12 */, -/* 13 */, -/* 14 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 1 */ +/***/ (function(module, exports) { -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LanguageUI__ = __webpack_require__(24); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LanguageUI___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__LanguageUI__); -// -// -// -// -// -// -// -// - - - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['resource', 'resourceName', 'resourceId', 'field'], - components: { - LanguageUI: __WEBPACK_IMPORTED_MODULE_0__LanguageUI___default.a - }, - methods: { - redirect: function redirect(locale) { - window.location = this.field.value.id + "?lang=" + locale; - } - }, - mounted: function mounted() { - if (this.field.value.style == 'list' || this.field.value.style == 'mix' && this.field.value.locales.length > this.field.value.convert_to_list_after) { - var locales = this.field.value.locales; - locales.map(function (item) { - if (item.translated) item.label += " -translated"; - return item; - }); - Object.assign(this.field, { "options": this.field.value.locales }); - } - } -}); - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("panel-item", { attrs: { field: _vm.field } }, [ - _c( - "div", - { attrs: { slot: "value" }, slot: "value" }, - [ - _c("language-u-i", { - attrs: { field: _vm.field }, - on: { change: _vm.redirect } - }) - ], - 1 - ) - ]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-0224618e", module.exports) - } -} /***/ }), -/* 16 */ +/* 2 */ /***/ (function(module, exports, __webpack_require__) { -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(17) -/* template */ -var __vue_template__ = __webpack_require__(19) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/FormField.vue" +var store = __webpack_require__(60)('wks'); +var uid = __webpack_require__(65); +var Symbol = __webpack_require__(1).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-c023248a", Component.options) - } else { - hotAPI.reload("data-v-c023248a", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; -module.exports = Component.exports +$exports.store = store; /***/ }), -/* 17 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 3 */ +/***/ (function(module, exports) { -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova__ = __webpack_require__(18); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_laravel_nova__); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = ({ - mixins: [__WEBPACK_IMPORTED_MODULE_0_laravel_nova__["FormField"], __WEBPACK_IMPORTED_MODULE_0_laravel_nova__["HandlesValidationErrors"]], +var isObject = __webpack_require__(9); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; - props: ['resourceName', 'resourceId', 'field'], - methods: { - /* - * Set the initial, internal value for the field. - */ - setInitialValue: function setInitialValue() { - this.value = this.field.value || ''; - }, +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(29)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); - /** - * Fill the given FormData object with the field's internal value. - */ - fill: function fill(formData) { - formData.append(this.field.attribute, this.value || ''); - }, +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Update the field's internal value. - */ - handleChange: function handleChange(value) { - this.value = value; +var global = __webpack_require__(1); +var core = __webpack_require__(3); +var ctx = __webpack_require__(16); +var hide = __webpack_require__(7); +var has = __webpack_require__(17); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } -}); +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + /***/ }), -/* 18 */ +/* 7 */ /***/ (function(module, exports, __webpack_require__) { -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["laravel-nova"] = factory(); - else - root["laravel-nova"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 47); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__(46); -var isBuffer = __webpack_require__(158); - -/*global toString:true*/ +var dP = __webpack_require__(11); +var createDesc = __webpack_require__(59); +module.exports = __webpack_require__(5) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; -// utils is a library of generic helper functions non-specific to axios -var toString = Object.prototype.toString; +/***/ }), +/* 8 */ +/***/ (function(module, exports) { /** - * Determine if a value is an Array + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return toString.call(val) === '[object Array]'; -} - -/** - * Determine if a value is an ArrayBuffer + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData + * _.isObject({}); + * // => true * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); -} - -/** - * Determine if a value is a view on an ArrayBuffer + * _.isObject([1, 2, 3]); + * // => true * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; -} - -/** - * Determine if a value is a String + * _.isObject(_.noop); + * // => true * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false + * _.isObject(null); + * // => false */ -function isString(val) { - return typeof val === 'string'; +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); } -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} +module.exports = isObject; -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} +/***/ }), +/* 9 */ +/***/ (function(module, exports) { -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} +/***/ }), +/* 10 */ +/***/ (function(module, exports) { -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} +module.exports = {}; -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; -} +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); -} +var anObject = __webpack_require__(4); +var IE8_DOM_DEFINE = __webpack_require__(122); +var toPrimitive = __webpack_require__(142); +var dP = Object.defineProperty; -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} +exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} +var freeGlobal = __webpack_require__(68); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { /** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. + * Checks if `value` is classified as an `Array` object. * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example * - * Example: + * _.isArray([1, 2, 3]); + * // => true * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` + * _.isArray(document.body.children); + * // => false * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = merge(result[key], val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. + * _.isArray('abc'); + * // => false * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a + * _.isArray(_.noop); + * // => false */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} +var isArray = Array.isArray; -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim -}; +module.exports = isArray; /***/ }), -/* 1 */ +/* 14 */ /***/ (function(module, exports) { -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__(58)('wks'); -var uid = __webpack_require__(63); -var Symbol = __webpack_require__(1).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; }; -$exports.store = store; - /***/ }), -/* 3 */ +/* 15 */ /***/ (function(module, exports) { -var core = module.exports = { version: '2.5.7' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; /***/ }), -/* 4 */ +/* 16 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(9); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; +// optional / simple context binding +var aFunction = __webpack_require__(14); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; }; /***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { +/* 17 */ +/***/ (function(module, exports) { -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(29)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; /***/ }), -/* 6 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(1); -var core = __webpack_require__(3); -var ctx = __webpack_require__(16); -var hide = __webpack_require__(7); -var has = __webpack_require__(17); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && has(exports, key)) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(11); -var createDesc = __webpack_require__(57); -module.exports = __webpack_require__(5) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(4); -var IE8_DOM_DEFINE = __webpack_require__(124); -var toPrimitive = __webpack_require__(144); -var dP = Object.defineProperty; - -exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -var freeGlobal = __webpack_require__(66); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(14); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -var eq = __webpack_require__(38); +var eq = __webpack_require__(38); /** * Gets the index at which the `key` is found in `array` of key-value pairs. @@ -1290,8 +915,8 @@ module.exports = assocIndexOf; /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(36), - getRawTag = __webpack_require__(190), - objectToString = __webpack_require__(215); + getRawTag = __webpack_require__(188), + objectToString = __webpack_require__(213); /** `Object#toString` result references. */ var nullTag = '[object Null]', @@ -1323,7 +948,7 @@ module.exports = baseGetTag; /* 20 */ /***/ (function(module, exports, __webpack_require__) { -var isKeyable = __webpack_require__(199); +var isKeyable = __webpack_require__(197); /** * Gets the data for `map`. @@ -1359,8 +984,8 @@ module.exports = nativeCreate; /* 22 */ /***/ (function(module, exports, __webpack_require__) { -var isFunction = __webpack_require__(70), - isLength = __webpack_require__(71); +var isFunction = __webpack_require__(72), + isLength = __webpack_require__(73); /** * Checks if `value` is array-like. A value is considered array-like if it's @@ -1472,7 +1097,7 @@ module.exports = isSymbol; /* WEBPACK VAR INJECTION */(function(process) { var utils = __webpack_require__(0); -var normalizeHeaderName = __webpack_require__(107); +var normalizeHeaderName = __webpack_require__(109); var DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' @@ -1566,7 +1191,7 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { module.exports = defaults; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(73))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(75))) /***/ }), /* 26 */ @@ -1577,7 +1202,7 @@ module.exports = defaults; exports.__esModule = true; -var _defineProperty = __webpack_require__(112); +var _defineProperty = __webpack_require__(113); var _defineProperty2 = _interopRequireDefault(_defineProperty); @@ -1684,8 +1309,8 @@ module.exports = function (it, tag, stat) { /* 33 */ /***/ (function(module, exports, __webpack_require__) { -var shared = __webpack_require__(58)('keys'); -var uid = __webpack_require__(63); +var shared = __webpack_require__(60)('keys'); +var uid = __webpack_require__(65); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; @@ -1708,7 +1333,7 @@ module.exports = function (it) { /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(52); +var IObject = __webpack_require__(54); var defined = __webpack_require__(27); module.exports = function (it) { return IObject(defined(it)); @@ -1731,8 +1356,8 @@ module.exports = Symbol; /* 37 */ /***/ (function(module, exports, __webpack_require__) { -var baseIsNative = __webpack_require__(172), - getValue = __webpack_require__(191); +var baseIsNative = __webpack_require__(170), + getValue = __webpack_require__(189); /** * Gets the native function at `key` of `object`. @@ -1843,7 +1468,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _Form = __webpack_require__(156); +var _Form = __webpack_require__(154); Object.defineProperty(exports, 'default', { enumerable: true, @@ -1858,7 +1483,7 @@ Object.defineProperty(exports, 'Form', { } }); -var _Errors = __webpack_require__(64); +var _Errors = __webpack_require__(66); Object.defineProperty(exports, 'Errors', { enumerable: true, @@ -1877,12 +1502,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /* WEBPACK VAR INJECTION */(function(process) { var utils = __webpack_require__(0); -var settle = __webpack_require__(99); -var buildURL = __webpack_require__(102); -var parseHeaders = __webpack_require__(108); -var isURLSameOrigin = __webpack_require__(106); +var settle = __webpack_require__(101); +var buildURL = __webpack_require__(104); +var parseHeaders = __webpack_require__(110); +var isURLSameOrigin = __webpack_require__(108); var createError = __webpack_require__(45); -var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(101); +var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(103); module.exports = function xhrAdapter(config) { return new Promise(function dispatchXhrRequest(resolve, reject) { @@ -1979,7 +1604,7 @@ module.exports = function xhrAdapter(config) { // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (utils.isStandardBrowserEnv()) { - var cookies = __webpack_require__(104); + var cookies = __webpack_require__(106); // Add xsrf header var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? @@ -2055,7 +1680,7 @@ module.exports = function xhrAdapter(config) { }); }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(73))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(75))) /***/ }), /* 43 */ @@ -2102,7 +1727,7 @@ module.exports = function isCancel(value) { "use strict"; -var enhanceError = __webpack_require__(98); +var enhanceError = __webpack_require__(100); /** * Create an Error with the specified message, config, error code, request and response. @@ -2150,59 +1775,59 @@ Object.defineProperty(exports, "__esModule", { }); exports.CardSizes = exports.SingularOrPlural = exports.Minimum = exports.Capitalize = exports.Inflector = exports.Errors = exports.TogglesTrashed = exports.PerPageable = exports.PerformsSearches = exports.Paginatable = exports.InteractsWithResourceInformation = exports.InteractsWithQueryString = exports.InteractsWithDates = exports.HasCards = exports.HandlesValidationErrors = exports.FormField = exports.Filterable = exports.Deletable = exports.BehavesAsPanel = undefined; -var _BehavesAsPanel = __webpack_require__(75); +var _BehavesAsPanel = __webpack_require__(77); var _BehavesAsPanel2 = _interopRequireDefault(_BehavesAsPanel); -var _Deletable = __webpack_require__(76); +var _Deletable = __webpack_require__(78); var _Deletable2 = _interopRequireDefault(_Deletable); -var _Filterable = __webpack_require__(77); +var _Filterable = __webpack_require__(79); var _Filterable2 = _interopRequireDefault(_Filterable); -var _FormField = __webpack_require__(78); +var _FormField = __webpack_require__(80); var _FormField2 = _interopRequireDefault(_FormField); -var _HandlesValidationErrors = __webpack_require__(79); +var _HandlesValidationErrors = __webpack_require__(81); var _HandlesValidationErrors2 = _interopRequireDefault(_HandlesValidationErrors); -var _HasCards = __webpack_require__(80); +var _HasCards = __webpack_require__(82); var _HasCards2 = _interopRequireDefault(_HasCards); -var _InteractsWithDates = __webpack_require__(81); +var _InteractsWithDates = __webpack_require__(83); var _InteractsWithDates2 = _interopRequireDefault(_InteractsWithDates); -var _InteractsWithQueryString = __webpack_require__(82); +var _InteractsWithQueryString = __webpack_require__(84); var _InteractsWithQueryString2 = _interopRequireDefault(_InteractsWithQueryString); -var _InteractsWithResourceInformation = __webpack_require__(83); +var _InteractsWithResourceInformation = __webpack_require__(85); var _InteractsWithResourceInformation2 = _interopRequireDefault(_InteractsWithResourceInformation); -var _Paginatable = __webpack_require__(84); +var _Paginatable = __webpack_require__(86); var _Paginatable2 = _interopRequireDefault(_Paginatable); -var _PerformsSearches = __webpack_require__(86); +var _PerformsSearches = __webpack_require__(88); var _PerformsSearches2 = _interopRequireDefault(_PerformsSearches); -var _PerPageable = __webpack_require__(85); +var _PerPageable = __webpack_require__(87); var _PerPageable2 = _interopRequireDefault(_PerPageable); -var _TogglesTrashed = __webpack_require__(87); +var _TogglesTrashed = __webpack_require__(89); var _TogglesTrashed2 = _interopRequireDefault(_TogglesTrashed); -var _inflectorJs = __webpack_require__(91); +var _inflectorJs = __webpack_require__(93); var _inflectorJs2 = _interopRequireDefault(_inflectorJs); @@ -2210,17 +1835,17 @@ var _cardSizes = __webpack_require__(40); var _cardSizes2 = _interopRequireDefault(_cardSizes); -var _capitalize = __webpack_require__(88); +var _capitalize = __webpack_require__(90); var _capitalize2 = _interopRequireDefault(_capitalize); -var _minimum = __webpack_require__(89); +var _minimum = __webpack_require__(91); var _minimum2 = _interopRequireDefault(_minimum); var _formBackendValidation = __webpack_require__(41); -var _singularOrPlural = __webpack_require__(90); +var _singularOrPlural = __webpack_require__(92); var _singularOrPlural2 = _interopRequireDefault(_singularOrPlural); @@ -2251,19 +1876,70 @@ exports.CardSizes = _cardSizes2.default; // Mixins /* 48 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(119), __esModule: true }; +module.exports = { "default": __webpack_require__(117), __esModule: true }; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(15); -var TAG = __webpack_require__(2)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; +"use strict"; -// fallback for IE11 Script Access Denied error + +exports.__esModule = true; + +var _promise = __webpack_require__(48); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(239); + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(15); +var TAG = __webpack_require__(2)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; @@ -2283,7 +1959,7 @@ module.exports = function (it) { /***/ }), -/* 50 */ +/* 52 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys @@ -2293,7 +1969,7 @@ module.exports = ( /***/ }), -/* 51 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(1).document; @@ -2301,7 +1977,7 @@ module.exports = document && document.documentElement; /***/ }), -/* 52 */ +/* 54 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings @@ -2313,19 +1989,19 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { /***/ }), -/* 53 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(30); var $export = __webpack_require__(6); -var redefine = __webpack_require__(140); +var redefine = __webpack_require__(138); var hide = __webpack_require__(7); var Iterators = __webpack_require__(10); -var $iterCreate = __webpack_require__(128); +var $iterCreate = __webpack_require__(126); var setToStringTag = __webpack_require__(32); -var getPrototypeOf = __webpack_require__(136); +var getPrototypeOf = __webpack_require__(134); var ITERATOR = __webpack_require__(2)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; @@ -2389,12 +2065,12 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE /***/ }), -/* 54 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(137); -var enumBugKeys = __webpack_require__(50); +var $keys = __webpack_require__(135); +var enumBugKeys = __webpack_require__(52); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); @@ -2402,7 +2078,7 @@ module.exports = Object.keys || function keys(O) { /***/ }), -/* 55 */ +/* 57 */ /***/ (function(module, exports) { module.exports = function (exec) { @@ -2415,7 +2091,7 @@ module.exports = function (exec) { /***/ }), -/* 56 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(4); @@ -2433,7 +2109,7 @@ module.exports = function (C, x) { /***/ }), -/* 57 */ +/* 59 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { @@ -2447,7 +2123,7 @@ module.exports = function (bitmap, value) { /***/ }), -/* 58 */ +/* 60 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(3); @@ -2465,7 +2141,7 @@ var store = global[SHARED] || (global[SHARED] = {}); /***/ }), -/* 59 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) @@ -2480,12 +2156,12 @@ module.exports = function (O, D) { /***/ }), -/* 60 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(16); -var invoke = __webpack_require__(125); -var html = __webpack_require__(51); +var invoke = __webpack_require__(123); +var html = __webpack_require__(53); var cel = __webpack_require__(28); var global = __webpack_require__(1); var process = global.process; @@ -2570,7 +2246,7 @@ module.exports = { /***/ }), -/* 61 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength @@ -2582,7 +2258,7 @@ module.exports = function (it) { /***/ }), -/* 62 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) @@ -2593,7 +2269,7 @@ module.exports = function (it) { /***/ }), -/* 63 */ +/* 65 */ /***/ (function(module, exports) { var id = 0; @@ -2604,7 +2280,7 @@ module.exports = function (key) { /***/ }), -/* 64 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2732,15 +2408,15 @@ var Errors = function () { exports.default = Errors; /***/ }), -/* 65 */ +/* 67 */ /***/ (function(module, exports, __webpack_require__) { -var baseTimes = __webpack_require__(179), - isArguments = __webpack_require__(231), +var baseTimes = __webpack_require__(177), + isArguments = __webpack_require__(229), isArray = __webpack_require__(13), - isBuffer = __webpack_require__(232), - isIndex = __webpack_require__(68), - isTypedArray = __webpack_require__(233); + isBuffer = __webpack_require__(230), + isIndex = __webpack_require__(70), + isTypedArray = __webpack_require__(231); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -2787,7 +2463,7 @@ module.exports = arrayLikeKeys; /***/ }), -/* 66 */ +/* 68 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ @@ -2795,10 +2471,10 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object module.exports = freeGlobal; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(243))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(241))) /***/ }), -/* 67 */ +/* 69 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ @@ -2830,7 +2506,7 @@ module.exports = hasUnicode; /***/ }), -/* 68 */ +/* 70 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ @@ -2861,7 +2537,7 @@ module.exports = isIndex; /***/ }), -/* 69 */ +/* 71 */ /***/ (function(module, exports) { /** Used for built-in method references. */ @@ -2885,7 +2561,7 @@ module.exports = isPrototype; /***/ }), -/* 70 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(19), @@ -2928,7 +2604,7 @@ module.exports = isFunction; /***/ }), -/* 71 */ +/* 73 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ @@ -2969,10 +2645,10 @@ module.exports = isLength; /***/ }), -/* 72 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { -var baseToString = __webpack_require__(180); +var baseToString = __webpack_require__(178); /** * Converts `value` to a string. An empty string is returned for `null` @@ -3003,7 +2679,7 @@ module.exports = toString; /***/ }), -/* 73 */ +/* 75 */ /***/ (function(module, exports) { // shim for using process in browser @@ -3193,7 +2869,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 74 */ +/* 76 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -3221,7 +2897,7 @@ module.exports = function(module) { /***/ }), -/* 75 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3244,7 +2920,7 @@ exports.default = { }; /***/ }), -/* 76 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3507,7 +3183,7 @@ function mapResources(resources) { } /***/ }), -/* 77 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3517,96 +3193,186 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _regenerator = __webpack_require__(50); + +var _regenerator2 = _interopRequireDefault(_regenerator); + var _defineProperty2 = __webpack_require__(26); var _defineProperty3 = _interopRequireDefault(_defineProperty2); -var _stringify = __webpack_require__(110); +var _asyncToGenerator2 = __webpack_require__(49); -var _stringify2 = _interopRequireDefault(_stringify); +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); -var _each = __webpack_require__(228); +var _each = __webpack_require__(226); var _each2 = _interopRequireDefault(_each); -var _get = __webpack_require__(230); +var _get = __webpack_require__(228); var _get2 = _interopRequireDefault(_get); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { - data: function data() { - return { - filters: [], - currentFilters: [] - }; - }, - - methods: { /** - * Initialize the current filter values from the decoded query string. + * Clear filters and reset the resource table */ - initializeFilterValuesFromQueryString: function initializeFilterValuesFromQueryString() { - this.clearAllFilters(); + clearSelectedFilters: function () { + var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(lens) { + var _updateQueryString; + + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!lens) { + _context.next = 5; + break; + } - if (this.encodedFilters) { - this.currentFilters = JSON.parse(atob(this.encodedFilters)); + _context.next = 3; + return this.$store.dispatch(this.resourceName + '/resetFilterState', { + resourceName: this.resourceName, + lens: lens + }); + + case 3: + _context.next = 7; + break; + + case 5: + _context.next = 7; + return this.$store.dispatch(this.resourceName + '/resetFilterState', { + resourceName: this.resourceName + }); + + case 7: + + this.updateQueryString((_updateQueryString = {}, (0, _defineProperty3.default)(_updateQueryString, this.pageParameter, 1), (0, _defineProperty3.default)(_updateQueryString, this.filterParameter, ''), _updateQueryString)); - this.syncFilterValues(); + case 8: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + function clearSelectedFilters(_x) { + return _ref.apply(this, arguments); } - }, + + return clearSelectedFilters; + }(), /** - * Reset all of the current filters. + * Handle a filter state change. */ - clearAllFilters: function clearAllFilters() { - this.currentFilters = []; + filterChanged: function filterChanged() { + var _updateQueryString2; - (0, _each2.default)(this.filters, function (filter) { - filter.currentValue = ''; - }); + this.updateQueryString((_updateQueryString2 = {}, (0, _defineProperty3.default)(_updateQueryString2, this.pageParameter, 1), (0, _defineProperty3.default)(_updateQueryString2, this.filterParameter, this.$store.getters[this.resourceName + '/currentEncodedFilters']), _updateQueryString2)); }, /** - * Sync the current filter values with the decoded filter query string values. + * Set up filters for the current view */ - syncFilterValues: function syncFilterValues() { - var _this = this; + initializeFilters: function () { + var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(lens) { + return _regenerator2.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + // Clear out the filters from the store first + this.$store.commit(this.resourceName + '/clearFilters'); - (0, _each2.default)(this.filters, function (filter) { - filter.currentValue = (0, _get2.default)(_(_this.currentFilters).find(function (decoded) { - return filter.class == decoded.class; - }), 'value', filter.currentValue); - }); - }, + _context2.next = 3; + return this.$store.dispatch(this.resourceName + '/fetchFilters', { + resourceName: this.resourceName, + lens: lens + }); + + case 3: + _context2.next = 5; + return this.initializeState(lens); + + case 5: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function initializeFilters(_x2) { + return _ref2.apply(this, arguments); + } + + return initializeFilters; + }(), /** - * Handle a filter state change. + * Initialize the filter state */ - filterChanged: function filterChanged() { - var _updateQueryString; + initializeState: function () { + var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(lens) { + return _regenerator2.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (!this.initialEncodedFilters) { + _context3.next = 5; + break; + } - this.updateQueryString((_updateQueryString = {}, (0, _defineProperty3.default)(_updateQueryString, this.pageParameter, 1), (0, _defineProperty3.default)(_updateQueryString, this.filterParameter, btoa((0, _stringify2.default)(this.currentFilters))), _updateQueryString)); - } + _context3.next = 3; + return this.$store.dispatch(this.resourceName + '/initializeCurrentFilterValuesFromQueryString', this.initialEncodedFilters); + + case 3: + _context3.next = 7; + break; + + case 5: + _context3.next = 7; + return this.$store.dispatch(this.resourceName + '/resetFilterState', { + resourceName: this.resourceName, + lens: lens + }); + + case 7: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function initializeState(_x3) { + return _ref3.apply(this, arguments); + } + + return initializeState; + }() }, computed: { /** - * Get the encoded filters from the query string. + * Get the name of the filter query string variable. */ - encodedFilters: function encodedFilters() { - return this.$route.query[this.filterParameter] || ''; + filterParameter: function filterParameter() { + return this.resourceName + '_filter'; } } }; /***/ }), -/* 78 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3650,7 +3416,7 @@ exports.default = { * Set the initial value for the field */ setInitialValue: function setInitialValue() { - this.value = this.field.value || ''; + this.value = !(this.field.value === undefined || this.field.value === null) ? this.field.value : ''; }, @@ -3659,7 +3425,7 @@ exports.default = { * field's internal value attribute */ fill: function fill(formData) { - formData.append(this.field.attribute, this.value || ''); + formData.append(this.field.attribute, String(this.value)); }, @@ -3673,7 +3439,7 @@ exports.default = { }; /***/ }), -/* 79 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3719,7 +3485,7 @@ exports.default = { }; /***/ }), -/* 80 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3729,11 +3495,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _regenerator = __webpack_require__(115); +var _regenerator = __webpack_require__(50); var _regenerator2 = _interopRequireDefault(_regenerator); -var _asyncToGenerator2 = __webpack_require__(113); +var _asyncToGenerator2 = __webpack_require__(49); var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); @@ -3763,6 +3529,12 @@ exports.default = { }, + watch: { + cardsEndpoint: function cardsEndpoint() { + this.fetchCards(); + } + }, + methods: { fetchCards: function () { var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() { @@ -3833,7 +3605,7 @@ exports.default = { }; /***/ }), -/* 81 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3848,7 +3620,7 @@ exports.default = { * Convert the given localized date time string to the application's timezone. */ toAppTimezone: function toAppTimezone(value) { - return value ? moment.tz(value, this.userTimezone).clone().tz(Nova.config.timezone).format('YYYY-MM-DD kk:mm:ss') : value; + return value ? moment.tz(value, this.userTimezone).clone().tz(Nova.config.timezone).format('YYYY-MM-DD HH:mm:ss') : value; }, @@ -3860,7 +3632,7 @@ exports.default = { return value; } - return moment.tz(value, Nova.config.timezone).clone().tz(this.userTimezone).format('YYYY-MM-DD kk:mm:ss'); + return moment.tz(value, Nova.config.timezone).clone().tz(this.userTimezone).format('YYYY-MM-DD HH:mm:ss'); }, @@ -3878,7 +3650,7 @@ exports.default = { return localized.format(field.format); } - return this.usesTwelveHourTime ? localized.format('YYYY-MM-DD h:mm:ss A') : localized.format('YYYY-MM-DD kk:mm:ss'); + return this.usesTwelveHourTime ? localized.format('YYYY-MM-DD h:mm:ss A') : localized.format('YYYY-MM-DD HH:mm:ss'); }, @@ -3919,7 +3691,7 @@ exports.default = { }; /***/ }), -/* 82 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3929,7 +3701,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _defaults = __webpack_require__(227); +var _defaults = __webpack_require__(225); var _defaults2 = _interopRequireDefault(_defaults); @@ -3947,7 +3719,7 @@ exports.default = { }; /***/ }), -/* 83 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3996,7 +3768,7 @@ exports.default = { }; /***/ }), -/* 84 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4041,7 +3813,7 @@ exports.default = { }; /***/ }), -/* 85 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4090,7 +3862,7 @@ exports.default = { }; /***/ }), -/* 86 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4100,7 +3872,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _debounce = __webpack_require__(226); +var _debounce = __webpack_require__(224); var _debounce2 = _interopRequireDefault(_debounce); @@ -4176,7 +3948,7 @@ exports.default = { }; /***/ }), -/* 87 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4219,7 +3991,7 @@ exports.default = { }; /***/ }), -/* 88 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4233,14 +4005,14 @@ exports.default = function (string) { return (0, _upperFirst2.default)(string); }; -var _upperFirst = __webpack_require__(240); +var _upperFirst = __webpack_require__(238); var _upperFirst2 = _interopRequireDefault(_upperFirst); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/* 89 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4269,7 +4041,7 @@ exports.default = function (originalPromise) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/* 90 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4288,7 +4060,7 @@ function singularOrPlural(value, suffix) { } /***/ }), -/* 91 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4614,13 +4386,13 @@ if (true) { /***/ }), -/* 92 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(93); +module.exports = __webpack_require__(95); /***/ }), -/* 93 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4628,7 +4400,7 @@ module.exports = __webpack_require__(93); var utils = __webpack_require__(0); var bind = __webpack_require__(46); -var Axios = __webpack_require__(95); +var Axios = __webpack_require__(97); var defaults = __webpack_require__(25); /** @@ -4663,14 +4435,14 @@ axios.create = function create(instanceConfig) { // Expose Cancel & CancelToken axios.Cancel = __webpack_require__(43); -axios.CancelToken = __webpack_require__(94); +axios.CancelToken = __webpack_require__(96); axios.isCancel = __webpack_require__(44); // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; -axios.spread = __webpack_require__(109); +axios.spread = __webpack_require__(111); module.exports = axios; @@ -4679,7 +4451,7 @@ module.exports.default = axios; /***/ }), -/* 94 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4743,7 +4515,7 @@ module.exports = CancelToken; /***/ }), -/* 95 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4751,8 +4523,8 @@ module.exports = CancelToken; var defaults = __webpack_require__(25); var utils = __webpack_require__(0); -var InterceptorManager = __webpack_require__(96); -var dispatchRequest = __webpack_require__(97); +var InterceptorManager = __webpack_require__(98); +var dispatchRequest = __webpack_require__(99); /** * Create a new instance of Axios @@ -4829,7 +4601,7 @@ module.exports = Axios; /***/ }), -/* 96 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4888,18 +4660,18 @@ module.exports = InterceptorManager; /***/ }), -/* 97 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(0); -var transformData = __webpack_require__(100); +var transformData = __webpack_require__(102); var isCancel = __webpack_require__(44); var defaults = __webpack_require__(25); -var isAbsoluteURL = __webpack_require__(105); -var combineURLs = __webpack_require__(103); +var isAbsoluteURL = __webpack_require__(107); +var combineURLs = __webpack_require__(105); /** * Throws a `Cancel` if cancellation has been requested. @@ -4981,7 +4753,7 @@ module.exports = function dispatchRequest(config) { /***/ }), -/* 98 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5009,7 +4781,7 @@ module.exports = function enhanceError(error, config, code, request, response) { /***/ }), -/* 99 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5042,7 +4814,7 @@ module.exports = function settle(resolve, reject, response) { /***/ }), -/* 100 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5069,7 +4841,7 @@ module.exports = function transformData(data, headers, fns) { /***/ }), -/* 101 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5112,7 +4884,7 @@ module.exports = btoa; /***/ }), -/* 102 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5185,7 +4957,7 @@ module.exports = function buildURL(url, params, paramsSerializer) { /***/ }), -/* 103 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5206,7 +4978,7 @@ module.exports = function combineURLs(baseURL, relativeURL) { /***/ }), -/* 104 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5266,7 +5038,7 @@ module.exports = ( /***/ }), -/* 105 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5287,7 +5059,7 @@ module.exports = function isAbsoluteURL(url) { /***/ }), -/* 106 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5362,7 +5134,7 @@ module.exports = ( /***/ }), -/* 107 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5381,7 +5153,7 @@ module.exports = function normalizeHeaderName(headers, normalizedName) { /***/ }), -/* 108 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5441,7 +5213,7 @@ module.exports = function parseHeaders(headers) { /***/ }), -/* 109 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5475,66 +5247,16 @@ module.exports = function spread(callback) { /***/ }), -/* 110 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(116), __esModule: true }; +module.exports = { "default": __webpack_require__(115), __esModule: true }; /***/ }), -/* 111 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(117), __esModule: true }; - -/***/ }), -/* 112 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(118), __esModule: true }; - -/***/ }), -/* 113 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _promise = __webpack_require__(48); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new _promise2.default(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return _promise2.default.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}; +module.exports = { "default": __webpack_require__(116), __esModule: true }; /***/ }), /* 114 */ @@ -5545,7 +5267,7 @@ exports.default = function (fn) { exports.__esModule = true; -var _assign = __webpack_require__(111); +var _assign = __webpack_require__(112); var _assign2 = _interopRequireDefault(_assign); @@ -5569,33 +5291,15 @@ exports.default = _assign2.default || function (target) { /* 115 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(241); - - -/***/ }), -/* 116 */ -/***/ (function(module, exports, __webpack_require__) { - -var core = __webpack_require__(3); -var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); -module.exports = function stringify(it) { // eslint-disable-line no-unused-vars - return $JSON.stringify.apply($JSON, arguments); -}; - - -/***/ }), -/* 117 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(148); +__webpack_require__(146); module.exports = __webpack_require__(3).Object.assign; /***/ }), -/* 118 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(149); +__webpack_require__(147); var $Object = __webpack_require__(3).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); @@ -5603,27 +5307,27 @@ module.exports = function defineProperty(it, key, desc) { /***/ }), -/* 119 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { +__webpack_require__(148); __webpack_require__(150); -__webpack_require__(152); -__webpack_require__(155); -__webpack_require__(151); __webpack_require__(153); -__webpack_require__(154); +__webpack_require__(149); +__webpack_require__(151); +__webpack_require__(152); module.exports = __webpack_require__(3).Promise; /***/ }), -/* 120 */ +/* 118 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), -/* 121 */ +/* 119 */ /***/ (function(module, exports) { module.exports = function (it, Constructor, name, forbiddenField) { @@ -5634,14 +5338,14 @@ module.exports = function (it, Constructor, name, forbiddenField) { /***/ }), -/* 122 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(35); -var toLength = __webpack_require__(61); -var toAbsoluteIndex = __webpack_require__(143); +var toLength = __webpack_require__(63); +var toAbsoluteIndex = __webpack_require__(141); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); @@ -5663,15 +5367,15 @@ module.exports = function (IS_INCLUDES) { /***/ }), -/* 123 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(16); -var call = __webpack_require__(127); -var isArrayIter = __webpack_require__(126); +var call = __webpack_require__(125); +var isArrayIter = __webpack_require__(124); var anObject = __webpack_require__(4); -var toLength = __webpack_require__(61); -var getIterFn = __webpack_require__(146); +var toLength = __webpack_require__(63); +var getIterFn = __webpack_require__(144); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { @@ -5694,7 +5398,7 @@ exports.RETURN = RETURN; /***/ }), -/* 124 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(5) && !__webpack_require__(29)(function () { @@ -5703,7 +5407,7 @@ module.exports = !__webpack_require__(5) && !__webpack_require__(29)(function () /***/ }), -/* 125 */ +/* 123 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 @@ -5725,7 +5429,7 @@ module.exports = function (fn, args, that) { /***/ }), -/* 126 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator @@ -5739,7 +5443,7 @@ module.exports = function (it) { /***/ }), -/* 127 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error @@ -5757,13 +5461,13 @@ module.exports = function (iterator, fn, value, entries) { /***/ }), -/* 128 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var create = __webpack_require__(133); -var descriptor = __webpack_require__(57); +var create = __webpack_require__(131); +var descriptor = __webpack_require__(59); var setToStringTag = __webpack_require__(32); var IteratorPrototype = {}; @@ -5777,7 +5481,7 @@ module.exports = function (Constructor, NAME, next) { /***/ }), -/* 129 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(2)('iterator'); @@ -5805,7 +5509,7 @@ module.exports = function (exec, skipClosing) { /***/ }), -/* 130 */ +/* 128 */ /***/ (function(module, exports) { module.exports = function (done, value) { @@ -5814,11 +5518,11 @@ module.exports = function (done, value) { /***/ }), -/* 131 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(1); -var macrotask = __webpack_require__(60).set; +var macrotask = __webpack_require__(62).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; @@ -5889,17 +5593,17 @@ module.exports = function () { /***/ }), -/* 132 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) -var getKeys = __webpack_require__(54); -var gOPS = __webpack_require__(135); -var pIE = __webpack_require__(138); -var toObject = __webpack_require__(62); -var IObject = __webpack_require__(52); +var getKeys = __webpack_require__(56); +var gOPS = __webpack_require__(133); +var pIE = __webpack_require__(136); +var toObject = __webpack_require__(64); +var IObject = __webpack_require__(54); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) @@ -5930,13 +5634,13 @@ module.exports = !$assign || __webpack_require__(29)(function () { /***/ }), -/* 133 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(4); -var dPs = __webpack_require__(134); -var enumBugKeys = __webpack_require__(50); +var dPs = __webpack_require__(132); +var enumBugKeys = __webpack_require__(52); var IE_PROTO = __webpack_require__(33)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; @@ -5950,7 +5654,7 @@ var createDict = function () { var gt = '>'; var iframeDocument; iframe.style.display = 'none'; - __webpack_require__(51).appendChild(iframe); + __webpack_require__(53).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -5977,12 +5681,12 @@ module.exports = Object.create || function create(O, Properties) { /***/ }), -/* 134 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(11); var anObject = __webpack_require__(4); -var getKeys = __webpack_require__(54); +var getKeys = __webpack_require__(56); module.exports = __webpack_require__(5) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); @@ -5996,19 +5700,19 @@ module.exports = __webpack_require__(5) ? Object.defineProperties : function def /***/ }), -/* 135 */ +/* 133 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), -/* 136 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(17); -var toObject = __webpack_require__(62); +var toObject = __webpack_require__(64); var IE_PROTO = __webpack_require__(33)('IE_PROTO'); var ObjectProto = Object.prototype; @@ -6022,12 +5726,12 @@ module.exports = Object.getPrototypeOf || function (O) { /***/ }), -/* 137 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(17); var toIObject = __webpack_require__(35); -var arrayIndexOf = __webpack_require__(122)(false); +var arrayIndexOf = __webpack_require__(120)(false); var IE_PROTO = __webpack_require__(33)('IE_PROTO'); module.exports = function (object, names) { @@ -6045,14 +5749,14 @@ module.exports = function (object, names) { /***/ }), -/* 138 */ +/* 136 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), -/* 139 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { var hide = __webpack_require__(7); @@ -6065,14 +5769,14 @@ module.exports = function (target, src, safe) { /***/ }), -/* 140 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(7); /***/ }), -/* 141 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6093,7 +5797,7 @@ module.exports = function (KEY) { /***/ }), -/* 142 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(34); @@ -6116,7 +5820,7 @@ module.exports = function (TO_STRING) { /***/ }), -/* 143 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(34); @@ -6129,7 +5833,7 @@ module.exports = function (index, length) { /***/ }), -/* 144 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) @@ -6147,7 +5851,7 @@ module.exports = function (it, S) { /***/ }), -/* 145 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(1); @@ -6157,10 +5861,10 @@ module.exports = navigator && navigator.userAgent || ''; /***/ }), -/* 146 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(49); +var classof = __webpack_require__(51); var ITERATOR = __webpack_require__(2)('iterator'); var Iterators = __webpack_require__(10); module.exports = __webpack_require__(3).getIteratorMethod = function (it) { @@ -6171,13 +5875,13 @@ module.exports = __webpack_require__(3).getIteratorMethod = function (it) { /***/ }), -/* 147 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var addToUnscopables = __webpack_require__(120); -var step = __webpack_require__(130); +var addToUnscopables = __webpack_require__(118); +var step = __webpack_require__(128); var Iterators = __webpack_require__(10); var toIObject = __webpack_require__(35); @@ -6185,7 +5889,7 @@ var toIObject = __webpack_require__(35); // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(53)(Array, 'Array', function (iterated, kind) { +module.exports = __webpack_require__(55)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind @@ -6212,17 +5916,17 @@ addToUnscopables('entries'); /***/ }), -/* 148 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(6); -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(132) }); +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(130) }); /***/ }), -/* 149 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); @@ -6231,13 +5935,13 @@ $export($export.S + $export.F * !__webpack_require__(5), 'Object', { definePrope /***/ }), -/* 150 */ +/* 148 */ /***/ (function(module, exports) { /***/ }), -/* 151 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6245,19 +5949,19 @@ $export($export.S + $export.F * !__webpack_require__(5), 'Object', { definePrope var LIBRARY = __webpack_require__(30); var global = __webpack_require__(1); var ctx = __webpack_require__(16); -var classof = __webpack_require__(49); +var classof = __webpack_require__(51); var $export = __webpack_require__(6); var isObject = __webpack_require__(9); var aFunction = __webpack_require__(14); -var anInstance = __webpack_require__(121); -var forOf = __webpack_require__(123); -var speciesConstructor = __webpack_require__(59); -var task = __webpack_require__(60).set; -var microtask = __webpack_require__(131)(); +var anInstance = __webpack_require__(119); +var forOf = __webpack_require__(121); +var speciesConstructor = __webpack_require__(61); +var task = __webpack_require__(62).set; +var microtask = __webpack_require__(129)(); var newPromiseCapabilityModule = __webpack_require__(31); -var perform = __webpack_require__(55); -var userAgent = __webpack_require__(145); -var promiseResolve = __webpack_require__(56); +var perform = __webpack_require__(57); +var userAgent = __webpack_require__(143); +var promiseResolve = __webpack_require__(58); var PROMISE = 'Promise'; var TypeError = global.TypeError; var process = global.process; @@ -6432,7 +6136,7 @@ if (!USE_NATIVE) { this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; - Internal.prototype = __webpack_require__(139)($Promise.prototype, { + Internal.prototype = __webpack_require__(137)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected) { var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); @@ -6462,1584 +6166,2988 @@ if (!USE_NATIVE) { }; } -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -__webpack_require__(32)($Promise, PROMISE); -__webpack_require__(141)(PROMISE); -Wrapper = __webpack_require__(3)[PROMISE]; +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(32)($Promise, PROMISE); +__webpack_require__(139)(PROMISE); +Wrapper = __webpack_require__(3)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(127)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(140)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(55)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(6); +var core = __webpack_require__(3); +var global = __webpack_require__(1); +var speciesConstructor = __webpack_require__(61); +var promiseResolve = __webpack_require__(58); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(6); +var newPromiseCapability = __webpack_require__(31); +var perform = __webpack_require__(57); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(145); +var global = __webpack_require__(1); +var hide = __webpack_require__(7); +var Iterators = __webpack_require__(10); +var TO_STRING_TAG = __webpack_require__(2)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +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 _Errors = __webpack_require__(66); + +var _Errors2 = _interopRequireDefault(_Errors); + +var _util = __webpack_require__(155); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Form = function () { + /** + * Create a new Form instance. + * + * @param {object} data + * @param {object} options + */ + function Form() { + var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Form); + + this.processing = false; + this.successful = false; + + this.withData(data).withOptions(options).withErrors({}); + } + + _createClass(Form, [{ + key: 'withData', + value: function withData(data) { + if ((0, _util.isArray)(data)) { + data = data.reduce(function (carry, element) { + carry[element] = ''; + return carry; + }, {}); + } + + this.setInitialValues(data); + + this.errors = new _Errors2.default(); + this.processing = false; + this.successful = false; + + for (var field in data) { + (0, _util.guardAgainstReservedFieldName)(field); + + this[field] = data[field]; + } + + return this; + } + }, { + key: 'withErrors', + value: function withErrors(errors) { + this.errors = new _Errors2.default(errors); + + return this; + } + }, { + key: 'withOptions', + value: function withOptions(options) { + this.__options = { + resetOnSuccess: true + }; + + if (options.hasOwnProperty('resetOnSuccess')) { + this.__options.resetOnSuccess = options.resetOnSuccess; + } + + if (options.hasOwnProperty('onSuccess')) { + this.onSuccess = options.onSuccess; + } + + if (options.hasOwnProperty('onFail')) { + this.onFail = options.onFail; + } + + this.__http = options.http || window.axios || __webpack_require__(94); + + if (!this.__http) { + throw new Error('No http library provided. Either pass an http option, or install axios.'); + } + + return this; + } + + /** + * Fetch all relevant data for the form. + */ + + }, { + key: 'data', + value: function data() { + var data = {}; + + for (var property in this.initial) { + data[property] = this[property]; + } + + return data; + } + + /** + * Fetch specific data for the form. + * + * @param {array} fields + * @return {object} + */ + + }, { + key: 'only', + value: function only(fields) { + var _this = this; + + return fields.reduce(function (filtered, field) { + filtered[field] = _this[field]; + return filtered; + }, {}); + } + + /** + * Reset the form fields. + */ + + }, { + key: 'reset', + value: function reset() { + (0, _util.merge)(this, this.initial); + + this.errors.clear(); + } + }, { + key: 'setInitialValues', + value: function setInitialValues(values) { + this.initial = {}; + + (0, _util.merge)(this.initial, values); + } + }, { + key: 'populate', + value: function populate(data) { + var _this2 = this; + + Object.keys(data).forEach(function (field) { + (0, _util.guardAgainstReservedFieldName)(field); + + if (_this2.hasOwnProperty(field)) { + (0, _util.merge)(_this2, _defineProperty({}, field, data[field])); + } + }); + + return this; + } + + /** + * Clear the form fields. + */ + + }, { + key: 'clear', + value: function clear() { + for (var field in this.initial) { + this[field] = ''; + } + + this.errors.clear(); + } + + /** + * Send a POST request to the given URL. + * + * @param {string} url + */ + + }, { + key: 'post', + value: function post(url) { + return this.submit('post', url); + } + + /** + * Send a PUT request to the given URL. + * + * @param {string} url + */ + + }, { + key: 'put', + value: function put(url) { + return this.submit('put', url); + } + + /** + * Send a PATCH request to the given URL. + * + * @param {string} url + */ + + }, { + key: 'patch', + value: function patch(url) { + return this.submit('patch', url); + } + + /** + * Send a DELETE request to the given URL. + * + * @param {string} url + */ + + }, { + key: 'delete', + value: function _delete(url) { + return this.submit('delete', url); + } + + /** + * Submit the form. + * + * @param {string} requestType + * @param {string} url + */ + + }, { + key: 'submit', + value: function submit(requestType, url) { + var _this3 = this; + + this.__validateRequestType(requestType); + this.errors.clear(); + this.processing = true; + this.successful = false; + + return new Promise(function (resolve, reject) { + _this3.__http[requestType](url, _this3.hasFiles() ? (0, _util.objectToFormData)(_this3.data()) : _this3.data()).then(function (response) { + _this3.processing = false; + _this3.onSuccess(response.data); + + resolve(response.data); + }).catch(function (error) { + _this3.processing = false; + _this3.onFail(error); + + reject(error); + }); + }); + } + }, { + key: 'hasFiles', + value: function hasFiles() { + for (var property in this.initial) { + if (this[property] instanceof File || this[property] instanceof FileList) { + return true; + } + } + + return false; + } + + /** + * Handle a successful form submission. + * + * @param {object} data + */ + + }, { + key: 'onSuccess', + value: function onSuccess(data) { + this.successful = true; + + if (this.__options.resetOnSuccess) { + this.reset(); + } + } + + /** + * Handle a failed form submission. + * + * @param {object} data + */ + + }, { + key: 'onFail', + value: function onFail(error) { + this.successful = false; + + if (error.response && error.response.data.errors) { + this.errors.record(error.response.data.errors); + } + } + + /** + * Get the error message(s) for the given field. + * + * @param field + */ + + }, { + key: 'hasError', + value: function hasError(field) { + return this.errors.has(field); + } + + /** + * Get the first error message for the given field. + * + * @param {string} field + * @return {string} + */ + + }, { + key: 'getError', + value: function getError(field) { + return this.errors.first(field); + } + + /** + * Get the error messages for the given field. + * + * @param {string} field + * @return {array} + */ + + }, { + key: 'getErrors', + value: function getErrors(field) { + return this.errors.get(field); + } + }, { + key: '__validateRequestType', + value: function __validateRequestType(requestType) { + var requestTypes = ['get', 'delete', 'head', 'post', 'put', 'patch']; + + if (requestTypes.indexOf(requestType) === -1) { + throw new Error('`' + requestType + '` is not a valid request type, ' + ('must be one of: `' + requestTypes.join('`, `') + '`.')); + } + } + }], [{ + key: 'create', + value: function create() { + var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return new Form().withData(data); + } + }]); + + return Form; +}(); + +exports.default = Form; + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: 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; }; + +exports.isArray = isArray; +exports.guardAgainstReservedFieldName = guardAgainstReservedFieldName; +exports.merge = merge; +exports.cloneDeep = cloneDeep; +exports.objectToFormData = objectToFormData; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function isArray(object) { + return Object.prototype.toString.call(object) === '[object Array]'; +} + +var reservedFieldNames = exports.reservedFieldNames = ['__http', '__options', '__validateRequestType', 'clear', 'data', 'delete', 'errors', 'getError', 'getErrors', 'hasError', 'initial', 'onFail', 'only', 'onSuccess', 'patch', 'populate', 'post', 'processing', 'successful', 'put', 'reset', 'submit', 'withData', 'withErrors', 'withOptions']; + +function guardAgainstReservedFieldName(fieldName) { + if (reservedFieldNames.indexOf(fieldName) !== -1) { + throw new Error('Field name ' + fieldName + ' isn\'t allowed to be used in a Form or Errors instance.'); + } +} + +function merge(a, b) { + for (var key in b) { + a[key] = cloneDeep(b[key]); + } +} + +function cloneDeep(object) { + if (object === null) { + return null; + } + + if (Array.isArray(object)) { + return [].concat(_toConsumableArray(object)); + } + + if ((typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object') { + var clone = {}; + + for (var key in object) { + clone[key] = cloneDeep(object[key]); + } + + return clone; + } + + return object; +} + +function objectToFormData(object) { + var formData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new FormData(); + var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + for (var property in object) { + _appendToFormData(formData, _getKey(parent, property), object[property]); + } + + return formData; +} + +function _getKey(parent, property) { + return parent ? parent + '[' + property + ']' : property; +} + +function _appendToFormData(formData, key, value) { + if (value instanceof Date) { + return formData.append(key, value.toISOString()); + } + + if (value instanceof File) { + return formData.append(key, value, value.name); + } + + if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object') { + return formData.append(key, value); + } + + objectToFormData(value, formData, key); +} + +/***/ }), +/* 156 */ +/***/ (function(module, exports) { + +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +var hashClear = __webpack_require__(190), + hashDelete = __webpack_require__(191), + hashGet = __webpack_require__(192), + hashHas = __webpack_require__(193), + hashSet = __webpack_require__(194); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +var listCacheClear = __webpack_require__(199), + listCacheDelete = __webpack_require__(200), + listCacheGet = __webpack_require__(201), + listCacheHas = __webpack_require__(202), + listCacheSet = __webpack_require__(203); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(37), + root = __webpack_require__(12); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +var mapCacheClear = __webpack_require__(204), + mapCacheDelete = __webpack_require__(205), + mapCacheGet = __webpack_require__(206), + mapCacheHas = __webpack_require__(207), + mapCacheSet = __webpack_require__(208); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports) { + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports) { + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports) { + +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseForOwn = __webpack_require__(167), + createBaseEach = __webpack_require__(184); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +var createBaseFor = __webpack_require__(185); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseFor = __webpack_require__(166), + keys = __webpack_require__(232); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(181), + toKey = __webpack_require__(220); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(19), + isObjectLike = __webpack_require__(23); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; + + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +var isFunction = __webpack_require__(72), + isMasked = __webpack_require__(198), + isObject = __webpack_require__(8), + toSource = __webpack_require__(221); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(19), + isLength = __webpack_require__(73), + isObjectLike = __webpack_require__(23); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; -// statics -$export($export.S + $export.F * !USE_NATIVE, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } -}); -$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { - return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +var isPrototype = __webpack_require__(71), + nativeKeys = __webpack_require__(210); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); } -}); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(129)(function (iter) { - $Promise.all(iter)['catch'](empty); -})), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } } -}); + return result; +} + +module.exports = baseKeys; /***/ }), -/* 152 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var isObject = __webpack_require__(8), + isPrototype = __webpack_require__(71), + nativeKeysIn = __webpack_require__(211); -var $at = __webpack_require__(142)(true); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -// 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(53)(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; /***/ }), -/* 153 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -// https://github.com/tc39/proposal-promise-finally +var identity = __webpack_require__(39), + overRest = __webpack_require__(215), + setToString = __webpack_require__(216); -var $export = __webpack_require__(6); -var core = __webpack_require__(3); -var global = __webpack_require__(1); -var speciesConstructor = __webpack_require__(59); -var promiseResolve = __webpack_require__(56); +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} -$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then( - isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { return x; }); - } : onFinally, - isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { throw e; }); - } : onFinally - ); -} }); +module.exports = baseRest; /***/ }), -/* 154 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var constant = __webpack_require__(223), + defineProperty = __webpack_require__(187), + identity = __webpack_require__(39); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; + + +/***/ }), +/* 176 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + + +/***/ }), +/* 177 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); -// https://github.com/tc39/proposal-promise-try -var $export = __webpack_require__(6); -var newPromiseCapability = __webpack_require__(31); -var perform = __webpack_require__(55); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} -$export($export.S, 'Promise', { 'try': function (callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; -} }); +module.exports = baseTimes; /***/ }), -/* 155 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(147); -var global = __webpack_require__(1); -var hide = __webpack_require__(7); -var Iterators = __webpack_require__(10); -var TO_STRING_TAG = __webpack_require__(2)('toStringTag'); - -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); +var Symbol = __webpack_require__(36), + arrayMap = __webpack_require__(163), + isArray = __webpack_require__(13), + isSymbol = __webpack_require__(24); -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; -/***/ }), -/* 156 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} -"use strict"; +module.exports = baseToString; -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ }), +/* 179 */ +/***/ (function(module, exports) { -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; }; }(); +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} -var _Errors = __webpack_require__(64); +module.exports = baseUnary; -var _Errors2 = _interopRequireDefault(_Errors); -var _util = __webpack_require__(157); +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var identity = __webpack_require__(39); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +module.exports = castFunction; -var Form = function () { - /** - * Create a new Form instance. - * - * @param {object} data - * @param {object} options - */ - function Form() { - var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - _classCallCheck(this, Form); +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { - this.processing = false; - this.successful = false; +var isArray = __webpack_require__(13), + isKey = __webpack_require__(196), + stringToPath = __webpack_require__(219), + toString = __webpack_require__(74); - this.withData(data).withOptions(options).withErrors({}); - } +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} - _createClass(Form, [{ - key: 'withData', - value: function withData(data) { - if ((0, _util.isArray)(data)) { - data = data.reduce(function (carry, element) { - carry[element] = ''; - return carry; - }, {}); - } +module.exports = castPath; - this.setInitialValues(data); - this.errors = new _Errors2.default(); - this.processing = false; - this.successful = false; +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { - for (var field in data) { - (0, _util.guardAgainstReservedFieldName)(field); +var baseSlice = __webpack_require__(176); - this[field] = data[field]; - } +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} - return this; - } - }, { - key: 'withErrors', - value: function withErrors(errors) { - this.errors = new _Errors2.default(errors); +module.exports = castSlice; - return this; - } - }, { - key: 'withOptions', - value: function withOptions(options) { - this.__options = { - resetOnSuccess: true - }; - if (options.hasOwnProperty('resetOnSuccess')) { - this.__options.resetOnSuccess = options.resetOnSuccess; - } +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { - if (options.hasOwnProperty('onSuccess')) { - this.onSuccess = options.onSuccess; - } +var root = __webpack_require__(12); - if (options.hasOwnProperty('onFail')) { - this.onFail = options.onFail; - } +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; - this.__http = options.http || window.axios || __webpack_require__(92); +module.exports = coreJsData; - if (!this.__http) { - throw new Error('No http library provided. Either pass an http option, or install axios.'); - } - return this; - } +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Fetch all relevant data for the form. - */ +var isArrayLike = __webpack_require__(22); - }, { - key: 'data', - value: function data() { - var data = {}; +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); - for (var property in this.initial) { - data[property] = this[property]; - } + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} - return data; - } +module.exports = createBaseEach; - /** - * Fetch specific data for the form. - * - * @param {array} fields - * @return {object} - */ - }, { - key: 'only', - value: function only(fields) { - var _this = this; +/***/ }), +/* 185 */ +/***/ (function(module, exports) { - return fields.reduce(function (filtered, field) { - filtered[field] = _this[field]; - return filtered; - }, {}); - } +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; - /** - * Reset the form fields. - */ + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} - }, { - key: 'reset', - value: function reset() { - (0, _util.merge)(this, this.initial); +module.exports = createBaseFor; - this.errors.clear(); - } - }, { - key: 'setInitialValues', - value: function setInitialValues(values) { - this.initial = {}; - (0, _util.merge)(this.initial, values); - } - }, { - key: 'populate', - value: function populate(data) { - var _this2 = this; +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { - Object.keys(data).forEach(function (field) { - (0, _util.guardAgainstReservedFieldName)(field); +var castSlice = __webpack_require__(182), + hasUnicode = __webpack_require__(69), + stringToArray = __webpack_require__(218), + toString = __webpack_require__(74); - if (_this2.hasOwnProperty(field)) { - (0, _util.merge)(_this2, _defineProperty({}, field, data[field])); - } - }); +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); - return this; - } + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; - /** - * Clear the form fields. - */ + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); - }, { - key: 'clear', - value: function clear() { - for (var field in this.initial) { - this[field] = ''; - } + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); - this.errors.clear(); - } + return chr[methodName]() + trailing; + }; +} - /** - * Send a POST request to the given URL. - * - * @param {string} url - */ +module.exports = createCaseFirst; - }, { - key: 'post', - value: function post(url) { - return this.submit('post', url); - } - /** - * Send a PUT request to the given URL. - * - * @param {string} url - */ +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { - }, { - key: 'put', - value: function put(url) { - return this.submit('put', url); - } +var getNative = __webpack_require__(37); - /** - * Send a PATCH request to the given URL. - * - * @param {string} url - */ +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); - }, { - key: 'patch', - value: function patch(url) { - return this.submit('patch', url); - } +module.exports = defineProperty; - /** - * Send a DELETE request to the given URL. - * - * @param {string} url - */ - }, { - key: 'delete', - value: function _delete(url) { - return this.submit('delete', url); - } +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Submit the form. - * - * @param {string} requestType - * @param {string} url - */ +var Symbol = __webpack_require__(36); - }, { - key: 'submit', - value: function submit(requestType, url) { - var _this3 = this; +/** Used for built-in method references. */ +var objectProto = Object.prototype; - this.__validateRequestType(requestType); - this.errors.clear(); - this.processing = true; - this.successful = false; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - return new Promise(function (resolve, reject) { - _this3.__http[requestType](url, _this3.hasFiles() ? (0, _util.objectToFormData)(_this3.data()) : _this3.data()).then(function (response) { - _this3.processing = false; - _this3.onSuccess(response.data); +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; - resolve(response.data); - }).catch(function (error) { - _this3.processing = false; - _this3.onFail(error); +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - reject(error); - }); - }); - } - }, { - key: 'hasFiles', - value: function hasFiles() { - for (var property in this.initial) { - if (this[property] instanceof File || this[property] instanceof FileList) { - return true; - } - } +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; - return false; - } + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} - /** - * Handle a successful form submission. - * - * @param {object} data - */ + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} - }, { - key: 'onSuccess', - value: function onSuccess(data) { - this.successful = true; +module.exports = getRawTag; - if (this.__options.resetOnSuccess) { - this.reset(); - } - } - /** - * Handle a failed form submission. - * - * @param {object} data - */ +/***/ }), +/* 189 */ +/***/ (function(module, exports) { - }, { - key: 'onFail', - value: function onFail(error) { - this.successful = false; +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} - if (error.response && error.response.data.errors) { - this.errors.record(error.response.data.errors); - } - } +module.exports = getValue; - /** - * Get the error message(s) for the given field. - * - * @param field - */ - }, { - key: 'hasError', - value: function hasError(field) { - return this.errors.has(field); - } +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Get the first error message for the given field. - * - * @param {string} field - * @return {string} - */ +var nativeCreate = __webpack_require__(21); - }, { - key: 'getError', - value: function getError(field) { - return this.errors.first(field); - } +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} - /** - * Get the error messages for the given field. - * - * @param {string} field - * @return {array} - */ +module.exports = hashClear; - }, { - key: 'getErrors', - value: function getErrors(field) { - return this.errors.get(field); - } - }, { - key: '__validateRequestType', - value: function __validateRequestType(requestType) { - var requestTypes = ['get', 'delete', 'head', 'post', 'put', 'patch']; - if (requestTypes.indexOf(requestType) === -1) { - throw new Error('`' + requestType + '` is not a valid request type, ' + ('must be one of: `' + requestTypes.join('`, `') + '`.')); - } - } - }], [{ - key: 'create', - value: function create() { - var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; +/***/ }), +/* 191 */ +/***/ (function(module, exports) { - return new Form().withData(data); - } - }]); +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} - return Form; -}(); +module.exports = hashDelete; -exports.default = Form; /***/ }), -/* 157 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var nativeCreate = __webpack_require__(21); +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -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; }; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -exports.isArray = isArray; -exports.guardAgainstReservedFieldName = guardAgainstReservedFieldName; -exports.merge = merge; -exports.cloneDeep = cloneDeep; -exports.objectToFormData = objectToFormData; +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +module.exports = hashGet; -function isArray(object) { - return Object.prototype.toString.call(object) === '[object Array]'; -} -var reservedFieldNames = exports.reservedFieldNames = ['__http', '__options', '__validateRequestType', 'clear', 'data', 'delete', 'errors', 'getError', 'getErrors', 'hasError', 'initial', 'onFail', 'only', 'onSuccess', 'patch', 'populate', 'post', 'processing', 'successful', 'put', 'reset', 'submit', 'withData', 'withErrors', 'withOptions']; +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { -function guardAgainstReservedFieldName(fieldName) { - if (reservedFieldNames.indexOf(fieldName) !== -1) { - throw new Error('Field name ' + fieldName + ' isn\'t allowed to be used in a Form or Errors instance.'); - } -} +var nativeCreate = __webpack_require__(21); -function merge(a, b) { - for (var key in b) { - a[key] = cloneDeep(b[key]); - } +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } -function cloneDeep(object) { - if (object === null) { - return null; - } +module.exports = hashHas; - if (Array.isArray(object)) { - return [].concat(_toConsumableArray(object)); - } - if ((typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object') { - var clone = {}; +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { - for (var key in object) { - clone[key] = cloneDeep(object[key]); - } +var nativeCreate = __webpack_require__(21); - return clone; - } +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - return object; +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; } -function objectToFormData(object) { - var formData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new FormData(); - var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; +module.exports = hashSet; - for (var property in object) { - _appendToFormData(formData, _getKey(parent, property), object[property]); - } - return formData; +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__(38), + isArrayLike = __webpack_require__(22), + isIndex = __webpack_require__(70), + isObject = __webpack_require__(8); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; } -function _getKey(parent, property) { - return parent ? parent + '[' + property + ']' : property; -} +module.exports = isIterateeCall; -function _appendToFormData(formData, key, value) { - if (value instanceof Date) { - return formData.append(key, value.toISOString()); - } - if (value instanceof File) { - return formData.append(key, value, value.name); - } +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { - if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object') { - return formData.append(key, value); - } +var isArray = __webpack_require__(13), + isSymbol = __webpack_require__(24); - objectToFormData(value, formData, key); +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } +module.exports = isKey; + + /***/ }), -/* 158 */ +/* 197 */ /***/ (function(module, exports) { -/*! - * Determine if an object is a Buffer +/** + * Checks if `value` is suitable for use as unique object key. * - * @author Feross Aboukhadijeh - * @license MIT + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -module.exports = function (obj) { - return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) -} - -function isBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) -} +module.exports = isKeyable; /***/ }), -/* 159 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { -var hashClear = __webpack_require__(192), - hashDelete = __webpack_require__(193), - hashGet = __webpack_require__(194), - hashHas = __webpack_require__(195), - hashSet = __webpack_require__(196); +var coreJsData = __webpack_require__(183); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); /** - * Creates a hash object. + * Checks if `func` has its source masked. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; +module.exports = isMasked; -module.exports = Hash; + +/***/ }), +/* 199 */ +/***/ (function(module, exports) { + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; /***/ }), -/* 160 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { -var listCacheClear = __webpack_require__(201), - listCacheDelete = __webpack_require__(202), - listCacheGet = __webpack_require__(203), - listCacheHas = __webpack_require__(204), - listCacheSet = __webpack_require__(205); +var assocIndexOf = __webpack_require__(18); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; /** - * Creates an list cache object. + * Removes `key` and its value from the list cache. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); } + --this.size; + return true; } -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; +module.exports = listCacheDelete; /***/ }), -/* 161 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(37), - root = __webpack_require__(12); +var assocIndexOf = __webpack_require__(18); -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); -module.exports = Map; + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; /***/ }), -/* 162 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { -var mapCacheClear = __webpack_require__(206), - mapCacheDelete = __webpack_require__(207), - mapCacheGet = __webpack_require__(208), - mapCacheHas = __webpack_require__(209), - mapCacheSet = __webpack_require__(210); +var assocIndexOf = __webpack_require__(18); /** - * Creates a map cache object to store key-value pairs. + * Checks if a list cache value for `key` exists. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; } -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -module.exports = MapCache; +module.exports = listCacheHas; /***/ }), -/* 163 */ -/***/ (function(module, exports) { +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(18); /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. + * Sets the list cache `key` to `value`. * * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; } - return func.apply(thisArg, args); + return this; } -module.exports = apply; +module.exports = listCacheSet; /***/ }), -/* 164 */ -/***/ (function(module, exports) { +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +var Hash = __webpack_require__(157), + ListCache = __webpack_require__(158), + Map = __webpack_require__(159); /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. + * Removes all key-value entries from the map. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. + * @name clear + * @memberOf MapCache */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; } -module.exports = arrayEach; +module.exports = mapCacheClear; /***/ }), -/* 165 */ -/***/ (function(module, exports) { +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(20); /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. + * Removes `key` and its value from the map. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; return result; } -module.exports = arrayMap; +module.exports = mapCacheDelete; /***/ }), -/* 166 */ -/***/ (function(module, exports) { +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(20); /** - * Converts an ASCII `string` to an array. + * Gets the map value for `key`. * * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function asciiToArray(string) { - return string.split(''); +function mapCacheGet(key) { + return getMapData(this, key).get(key); } -module.exports = asciiToArray; +module.exports = mapCacheGet; /***/ }), -/* 167 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { -var baseForOwn = __webpack_require__(169), - createBaseEach = __webpack_require__(186); +var getMapData = __webpack_require__(20); /** - * The base implementation of `_.forEach` without support for iteratee shorthands. + * Checks if a map value for `key` exists. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -var baseEach = createBaseEach(baseForOwn); +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} -module.exports = baseEach; +module.exports = mapCacheHas; /***/ }), -/* 168 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { -var createBaseFor = __webpack_require__(187); +var getMapData = __webpack_require__(20); /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. + * Sets the map `key` to `value`. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. */ -var baseFor = createBaseFor(); +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; -module.exports = baseFor; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; /***/ }), -/* 169 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { -var baseFor = __webpack_require__(168), - keys = __webpack_require__(234); +var memoize = __webpack_require__(234); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; } -module.exports = baseForOwn; +module.exports = memoizeCapped; /***/ }), -/* 170 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { -var castPath = __webpack_require__(183), - toKey = __webpack_require__(222); +var overArg = __webpack_require__(214); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; + + +/***/ }), +/* 211 */ +/***/ (function(module, exports) { /** - * The base implementation of `_.get` without support for default values. + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. + * @returns {Array} Returns the array of property names. */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } } - return (index && index == length) ? object : undefined; + return result; } -module.exports = baseGet; +module.exports = nativeKeysIn; /***/ }), -/* 171 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(19), - isObjectLike = __webpack_require__(23); +/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(68); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; -module.exports = baseIsArguments; +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); +module.exports = nodeUtil; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)(module))) /***/ }), -/* 172 */ -/***/ (function(module, exports, __webpack_require__) { +/* 213 */ +/***/ (function(module, exports) { -var isFunction = __webpack_require__(70), - isMasked = __webpack_require__(200), - isObject = __webpack_require__(8), - toSource = __webpack_require__(223); +/** 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; /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; +function objectToString(value) { + return nativeObjectToString.call(value); +} -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; +module.exports = objectToString; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); +/***/ }), +/* 214 */ +/***/ (function(module, exports) { /** - * The base implementation of `_.isNative` without bad shim checks. + * Creates a unary function that invokes `func` with its argument transformed. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; } -module.exports = baseIsNative; +module.exports = overArg; /***/ }), -/* 173 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(19), - isLength = __webpack_require__(71), - isObjectLike = __webpack_require__(23); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; +var apply = __webpack_require__(161); -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. + * A specialized version of `baseRest` which transforms the rest array. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; } -module.exports = baseIsTypedArray; +module.exports = overRest; /***/ }), -/* 174 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { -var isPrototype = __webpack_require__(69), - nativeKeys = __webpack_require__(212); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var baseSetToString = __webpack_require__(175), + shortOut = __webpack_require__(217); /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * Sets the `toString` method of `func` to return `string`. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} +var setToString = shortOut(baseSetToString); -module.exports = baseKeys; +module.exports = setToString; /***/ }), -/* 175 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(8), - isPrototype = __webpack_require__(69), - nativeKeysIn = __webpack_require__(213); +/* 217 */ +/***/ (function(module, exports) { -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; /** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; +function shortOut(func) { + var count = 0, + lastCalled = 0; - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; } - } - return result; + return func.apply(undefined, arguments); + }; } -module.exports = baseKeysIn; +module.exports = shortOut; /***/ }), -/* 176 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { -var identity = __webpack_require__(39), - overRest = __webpack_require__(217), - setToString = __webpack_require__(218); +var asciiToArray = __webpack_require__(164), + hasUnicode = __webpack_require__(69), + unicodeToArray = __webpack_require__(222); /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * Converts `string` to an array. * * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); } -module.exports = baseRest; +module.exports = stringToArray; /***/ }), -/* 177 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { -var constant = __webpack_require__(225), - defineProperty = __webpack_require__(189), - identity = __webpack_require__(39); +var memoizeCapped = __webpack_require__(209); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; /** - * The base implementation of `setToString` without support for hot loop shorting. + * Converts `string` to a property path array. * * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); -}; + return result; +}); -module.exports = baseSetToString; +module.exports = stringToPath; /***/ }), -/* 178 */ -/***/ (function(module, exports) { +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +var isSymbol = __webpack_require__(24); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; /** - * The base implementation of `_.slice` without an iteratee call guard. + * Converts `value` to a string key if it's not a string or symbol. * * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; } - return result; + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -module.exports = baseSlice; +module.exports = toKey; /***/ }), -/* 179 */ +/* 221 */ /***/ (function(module, exports) { +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. + * Converts `func` to its source code. * * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} } - return result; + return ''; } -module.exports = baseTimes; +module.exports = toSource; /***/ }), -/* 180 */ -/***/ (function(module, exports, __webpack_require__) { +/* 222 */ +/***/ (function(module, exports) { -var Symbol = __webpack_require__(36), - arrayMap = __webpack_require__(165), - isArray = __webpack_require__(13), - isSymbol = __webpack_require__(24); +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. + * Converts a Unicode `string` to an array. * * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +function unicodeToArray(string) { + return string.match(reUnicode) || []; } -module.exports = baseToString; +module.exports = unicodeToArray; /***/ }), -/* 181 */ +/* 223 */ /***/ (function(module, exports) { /** - * The base implementation of `_.unary` without support for storing metadata. + * Creates a function that returns `value`. * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true */ -function baseUnary(func) { - return function(value) { - return func(value); +function constant(value) { + return function() { + return value; }; } -module.exports = baseUnary; +module.exports = constant; + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(8), + now = __webpack_require__(235), + toNumber = __webpack_require__(237); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; -/***/ }), -/* 182 */ -/***/ (function(module, exports, __webpack_require__) { + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } -var identity = __webpack_require__(39); + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : identity; -} + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; -module.exports = castFunction; + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; -/***/ }), -/* 183 */ -/***/ (function(module, exports, __webpack_require__) { + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } -var isArray = __webpack_require__(13), - isKey = __webpack_require__(198), - stringToPath = __webpack_require__(221), - toString = __webpack_require__(72); + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (isArray(value)) { - return value; + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; } - return isKey(value, object) ? [value] : stringToPath(toString(value)); -} -module.exports = castPath; + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } -/***/ }), -/* 184 */ -/***/ (function(module, exports, __webpack_require__) { + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); -var baseSlice = __webpack_require__(178); + lastArgs = arguments; + lastThis = this; + lastCallTime = time; -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; } -module.exports = castSlice; +module.exports = debounce; /***/ }), -/* 185 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(12); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; - +var baseRest = __webpack_require__(174), + eq = __webpack_require__(38), + isIterateeCall = __webpack_require__(195), + keysIn = __webpack_require__(233); -/***/ }), -/* 186 */ -/***/ (function(module, exports, __webpack_require__) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; -var isArrayLike = __webpack_require__(22); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Creates a `baseEach` or `baseEachRight` function. + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} +var defaults = baseRest(function(object, sources) { + object = Object(object); -module.exports = createBaseEach; + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } -/***/ }), -/* 187 */ -/***/ (function(module, exports) { + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; } } - return object; - }; -} + } + + return object; +}); -module.exports = createBaseFor; +module.exports = defaults; /***/ }), -/* 188 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { -var castSlice = __webpack_require__(184), - hasUnicode = __webpack_require__(67), - stringToArray = __webpack_require__(220), - toString = __webpack_require__(72); - -/** - * Creates a function like `_.lowerFirst`. - * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. - */ -function createCaseFirst(methodName) { - return function(string) { - string = toString(string); +module.exports = __webpack_require__(227); - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); +var arrayEach = __webpack_require__(162), + baseEach = __webpack_require__(165), + castFunction = __webpack_require__(180), + isArray = __webpack_require__(13); - return chr[methodName]() + trailing; - }; +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); } -module.exports = createCaseFirst; +module.exports = forEach; /***/ }), -/* 189 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(37); +var baseGet = __webpack_require__(168); -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} -module.exports = defineProperty; +module.exports = get; /***/ }), -/* 190 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(36); +var baseIsArguments = __webpack_require__(169), + isObjectLike = __webpack_require__(23); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -8047,1832 +9155,2427 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false */ -var nativeObjectToString = objectProto.toString; +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(12), + stubFalse = __webpack_require__(236); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * Checks if `value` is a buffer. * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; +var isBuffer = nativeIsBuffer || stubFalse; - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} +module.exports = isBuffer; - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)(module))) -module.exports = getRawTag; +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsTypedArray = __webpack_require__(171), + baseUnary = __webpack_require__(179), + nodeUtil = __webpack_require__(212); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; /***/ }), -/* 191 */ -/***/ (function(module, exports) { +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(67), + baseKeys = __webpack_require__(172), + isArrayLike = __webpack_require__(22); /** - * Gets the value at `key` of `object`. + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. + * _.keys('hi'); + * // => ['0', '1'] */ -function getValue(object, key) { - return object == null ? undefined : object[key]; +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } -module.exports = getValue; +module.exports = keys; /***/ }), -/* 192 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(21); +var arrayLikeKeys = __webpack_require__(67), + baseKeysIn = __webpack_require__(173), + isArrayLike = __webpack_require__(22); /** - * Removes all key-value entries from the hash. + * Creates an array of the own and inherited enumerable property names of `object`. * - * @private - * @name clear - * @memberOf Hash + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } -module.exports = hashClear; +module.exports = keysIn; /***/ }), -/* 193 */ -/***/ (function(module, exports) { +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +var MapCache = __webpack_require__(160); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; /** - * Removes `key` and its value from the hash. + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; } -module.exports = hashDelete; +// Expose `MapCache`. +memoize.Cache = MapCache; + +module.exports = memoize; /***/ }), -/* 194 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(21); +var root = __webpack_require__(12); -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +module.exports = now; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + +/***/ }), +/* 236 */ +/***/ (function(module, exports) { /** - * Gets the hash value for `key`. + * This method returns `false`. * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; +function stubFalse() { + return false; } -module.exports = hashGet; +module.exports = stubFalse; /***/ }), -/* 195 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(21); +var isObject = __webpack_require__(8), + isSymbol = __webpack_require__(24); -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; /** - * Checks if a hash value for `key` exists. + * Converts `value` to a number. * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); } -module.exports = hashHas; +module.exports = toNumber; /***/ }), -/* 196 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(21); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +var createCaseFirst = __webpack_require__(186); /** - * Sets the hash `key` to `value`. + * Converts the first character of `string` to upper case. * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} +var upperFirst = createCaseFirst('toUpperCase'); -module.exports = hashSet; +module.exports = upperFirst; /***/ }), -/* 197 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { -var eq = __webpack_require__(38), - isArrayLike = __webpack_require__(22), - isIndex = __webpack_require__(68), - isObject = __webpack_require__(8); - /** - * Checks if the given arguments are from an iteratee call. + * Copyright (c) 2014-present, Facebook, Inc. * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} -module.exports = isIterateeCall; +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { return this })() || Function("return this")(); +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; -/***/ }), -/* 198 */ -/***/ (function(module, exports, __webpack_require__) { +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; -var isArray = __webpack_require__(13), - isSymbol = __webpack_require__(24); +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; +module.exports = __webpack_require__(240); -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); } -module.exports = isKey; - /***/ }), -/* 199 */ +/* 240 */ /***/ (function(module, exports) { /** - * Checks if `value` is suitable for use as unique object key. + * Copyright (c) 2014-present, Facebook, Inc. * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} -module.exports = isKeyable; +!(function(global) { + "use strict"; + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; -/***/ }), -/* 200 */ -/***/ (function(module, exports, __webpack_require__) { + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } -var coreJsData = __webpack_require__(185); + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); -module.exports = isMasked; + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; -/***/ }), -/* 201 */ -/***/ (function(module, exports) { + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; -module.exports = listCacheClear; + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } -var assocIndexOf = __webpack_require__(18); + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } -/** Used for built-in method references. */ -var arrayProto = Array.prototype; + var previousPromise; -/** Built-in value references. */ -var splice = arrayProto.splice; + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; } - --this.size; - return true; -} -module.exports = listCacheDelete; + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); -/***/ }), -/* 203 */ -/***/ (function(module, exports, __webpack_require__) { + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; -var assocIndexOf = __webpack_require__(18); + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } - return index < 0 ? undefined : data[index][1]; -} + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } -module.exports = listCacheGet; + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + context.method = method; + context.arg = arg; -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } -var assocIndexOf = __webpack_require__(18); + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } -module.exports = listCacheHas; + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + state = GenStateExecuting; -/***/ }), -/* 205 */ -/***/ (function(module, exports, __webpack_require__) { + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; -var assocIndexOf = __webpack_require__(18); + if (record.arg === ContinueSentinel) { + continue; + } -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); + return { + value: record.arg, + done: context.done + }; - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; } - return this; -} -module.exports = listCacheSet; + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } -/***/ }), -/* 206 */ -/***/ (function(module, exports, __webpack_require__) { + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } -var Hash = __webpack_require__(159), - ListCache = __webpack_require__(160), - Map = __webpack_require__(161); + return ContinueSentinel; + } -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} + var record = tryCatch(method, delegate.iterator, context.arg); -module.exports = mapCacheClear; + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + var info = record.arg; -/***/ }), -/* 207 */ -/***/ (function(module, exports, __webpack_require__) { + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } -var getMapData = __webpack_require__(20); + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; -module.exports = mapCacheDelete; + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } -/***/ }), -/* 208 */ -/***/ (function(module, exports, __webpack_require__) { + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } -var getMapData = __webpack_require__(20); + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} + Gp[toStringTagSymbol] = "Generator"; -module.exports = mapCacheGet; + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + Gp.toString = function() { + return "[object Generator]"; + }; -/***/ }), -/* 209 */ -/***/ (function(module, exports, __webpack_require__) { + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; -var getMapData = __webpack_require__(20); + if (1 in locs) { + entry.catchLoc = locs[1]; + } -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } -module.exports = mapCacheHas; + this.tryEntries.push(entry); + } + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } -/***/ }), -/* 210 */ -/***/ (function(module, exports, __webpack_require__) { + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } -var getMapData = __webpack_require__(20); + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; -module.exports = mapCacheSet; + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + if (typeof iterable.next === "function") { + return iterable; + } -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } -var memoize = __webpack_require__(236); + next.value = undefined; + next.done = true; -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; + return next; + }; -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); + return next.next = next; + } } - return key; - }); - var cache = result.cache; - return result; -} + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; -module.exports = memoizeCapped; + function doneResult() { + return { value: undefined, done: true }; + } + Context.prototype = { + constructor: Context, -/***/ }), -/* 212 */ -/***/ (function(module, exports, __webpack_require__) { + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; -var overArg = __webpack_require__(216); + this.method = "next"; + this.arg = undefined; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); + this.tryEntries.forEach(resetTryEntry); -module.exports = nativeKeys; + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function() { + this.done = true; -/***/ }), -/* 213 */ -/***/ (function(module, exports) { + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} + return this.rval; + }, -module.exports = nativeKeysIn; + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; -/***/ }), -/* 214 */ -/***/ (function(module, exports, __webpack_require__) { + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } -/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(66); + return !! caught; + } -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } - if (types) { - return types; - } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, -module.exports = nodeUtil; + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(74)(module))) + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } -/***/ }), -/* 215 */ -/***/ (function(module, exports) { + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; -/** Used for built-in method references. */ -var objectProto = Object.prototype; + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; + return this.complete(record); + }, -/** - * 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); -} + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } -module.exports = objectToString; + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + return ContinueSentinel; + }, -/***/ }), -/* 216 */ -/***/ (function(module, exports) { + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, -/** - * 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)); - }; -} + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } -module.exports = overArg; + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; -/***/ }), -/* 217 */ -/***/ (function(module, exports, __webpack_require__) { + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } -var apply = __webpack_require__(163); + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); +/***/ }), +/* 241 */ +/***/ (function(module, exports) { - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; -} +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; -module.exports = overRest; +/***/ }) +/******/ ]); +}); /***/ }), -/* 218 */ +/* 2 */ /***/ (function(module, exports, __webpack_require__) { -var baseSetToString = __webpack_require__(177), - shortOut = __webpack_require__(219); +var disposed = false +var normalizeComponent = __webpack_require__(0) +/* script */ +var __vue_script__ = __webpack_require__(10) +/* template */ +var __vue_template__ = __webpack_require__(11) +/* template functional */ +var __vue_template_functional__ = false +/* styles */ +var __vue_styles__ = null +/* scopeId */ +var __vue_scopeId__ = null +/* moduleIdentifier (server only) */ +var __vue_module_identifier__ = null +var Component = normalizeComponent( + __vue_script__, + __vue_template__, + __vue_template_functional__, + __vue_styles__, + __vue_scopeId__, + __vue_module_identifier__ +) +Component.options.__file = "resources/js/components/LanguageUI.vue" -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); +/* hot reload */ +if (false) {(function () { + var hotAPI = require("vue-hot-reload-api") + hotAPI.install(require("vue"), false) + if (!hotAPI.compatible) return + module.hot.accept() + if (!module.hot.data) { + hotAPI.createRecord("data-v-7e56fe97", Component.options) + } else { + hotAPI.reload("data-v-7e56fe97", Component.options) + } + module.hot.dispose(function (data) { + disposed = true + }) +})()} -module.exports = setToString; +module.exports = Component.exports /***/ }), -/* 219 */ +/* 3 */ /***/ (function(module, exports) { -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +module.exports = function(useSourceMap) { + var list = []; + + // return the list of modules as css string + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item, useSourceMap); + if(item[2]) { + return "@media " + item[2] + "{" + content + "}"; + } else { + return content; + } + }).join(""); + }; + + // import a list of modules into the list + list.i = function(modules, mediaQuery) { + if(typeof modules === "string") + modules = [[null, modules, ""]]; + var alreadyImportedModules = {}; + for(var i = 0; i < this.length; i++) { + var id = this[i][0]; + if(typeof id === "number") + alreadyImportedModules[id] = true; + } + for(i = 0; i < modules.length; i++) { + var item = modules[i]; + // skip already imported module + // this implementation is not 100% perfect for weird media query combinations + // when a module is imported multiple times with different media queries. + // I hope this will never occur (Hey this way we have smaller bundles) + if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { + if(mediaQuery && !item[2]) { + item[2] = mediaQuery; + } else if(mediaQuery) { + item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; + } + list.push(item); + } + } + }; + return list; +}; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; +function cssWithMappingToString(item, useSourceMap) { + var content = item[1] || ''; + var cssMapping = item[3]; + if (!cssMapping) { + return content; + } -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; + if (useSourceMap && typeof btoa === 'function') { + var sourceMapping = toComment(cssMapping); + var sourceURLs = cssMapping.sources.map(function (source) { + return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' + }); - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); + return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); + } - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; + return [content].join('\n'); } -module.exports = shortOut; +// Adapted from convert-source-map (MIT) +function toComment(sourceMap) { + // eslint-disable-next-line no-undef + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + + return '/*# ' + data + ' */'; +} /***/ }), -/* 220 */ +/* 4 */ /***/ (function(module, exports, __webpack_require__) { -var asciiToArray = __webpack_require__(166), - hasUnicode = __webpack_require__(67), - unicodeToArray = __webpack_require__(224); - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); -} - -module.exports = stringToArray; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra + Modified by Evan You @yyx990803 +*/ +var hasDocument = typeof document !== 'undefined' -/***/ }), -/* 221 */ -/***/ (function(module, exports, __webpack_require__) { +if (typeof DEBUG !== 'undefined' && DEBUG) { + if (!hasDocument) { + throw new Error( + 'vue-style-loader cannot be used in a non-browser environment. ' + + "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." + ) } +} -var memoizeCapped = __webpack_require__(211); +var listToStyles = __webpack_require__(22) -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +/* +type StyleObject = { + id: number; + parts: Array +} -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; +type StyleObjectPart = { + css: string; + media: string; + sourceMap: ?string +} +*/ -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); +var stylesInDom = {/* + [id: number]: { + id: number, + refs: number, + parts: Array<(obj?: StyleObjectPart) => void> } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); +*/} -module.exports = stringToPath; +var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) +var singletonElement = null +var singletonCounter = 0 +var isProduction = false +var noop = function () {} +var options = null +var ssrIdKey = 'data-vue-ssr-id' +// Force single-tag solution on IE6-9, which has a hard limit on the # of diff --git a/resources/js/components/Tool.vue b/resources/js/components/Tool.vue new file mode 100644 index 0000000..a725e0a --- /dev/null +++ b/resources/js/components/Tool.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/resources/js/field.js b/resources/js/field.js index 289e435..c61eaca 100644 --- a/resources/js/field.js +++ b/resources/js/field.js @@ -13,6 +13,16 @@ Nova.booting((Vue, router) => { Vue.component('detail-multilingual-nova', require('./components/DetailField')); Vue.component('form-multilingual-nova', require('./components/FormField')); + Vue.component('language-selector', require('./components/LanguageSelector')); + + router.addRoutes([ + { + name: 'nova-language-tool', + path: '/nova-language-tool', + component: require('./components/Tool'), + }, + ]) + let lang = getParameterByName('lang'); if (lang) { Nova.request().defaults.headers['lang'] = lang; diff --git a/resources/views/navigation.blade.php b/resources/views/navigation.blade.php new file mode 100644 index 0000000..7ea6a12 --- /dev/null +++ b/resources/views/navigation.blade.php @@ -0,0 +1,6 @@ + + + + Language + + diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 0000000..619b745 --- /dev/null +++ b/routes/api.php @@ -0,0 +1,17 @@ +loadViewsFrom(__DIR__.'/../resources/views', 'nova-language-tool'); + $lang = request('lang', request()->header('lang')); if ($lang) app()->setLocale($lang); Nova::serving(function (ServingNova $event) { + Nova::provideToScript(['locals' => $this->getSupportLocales(), 'currentLocal' => App::getLocale()]); Nova::script('multilingual-nova', __DIR__ . '/../dist/js/field.js'); Nova::style('multilingual-nova', __DIR__ . '/../dist/css/field.css'); }); @@ -28,6 +34,11 @@ public function boot() $this->publishes([ __DIR__ . '/../config/multilingual.php' => config_path('multilingual.php'), ], 'multilingual-nova'); + + $this->app->booted(function () { + $this->routes(); + }); + } /** @@ -38,4 +49,34 @@ public function boot() public function register() { } + + protected function routes() + { + if ($this->app->routesAreCached()) { + return; + } + + Route::middleware(['nova', Authorize::class]) + ->prefix('nova-vendor/multilingual-nova') + ->group(__DIR__.'/../routes/api.php'); + } + + + private function getSupportLocales() + { + if (config('multilingual.source') == 'array') return config('multilingual.locales'); + + if (config('multilingual.source') == 'database') { + $model = config('multilingual.database.model'); + $code = config('multilingual.database.code_field'); + $label = config('multilingual.database.label_field'); + + $locales = ($model)::all()->mapWithKeys(function ($item) use ($code, $label) { + return [$item->$code => $item->$label]; + }); + return $locales->toArray(); + } + + return ['en' => 'EN']; + } } diff --git a/src/Http/Controllers/Controller.php b/src/Http/Controllers/Controller.php new file mode 100644 index 0000000..0c2b57c --- /dev/null +++ b/src/Http/Controllers/Controller.php @@ -0,0 +1,13 @@ +authorize($request) ? $next($request) : abort(403); + } +} diff --git a/src/Multilingual.php b/src/Multilingual.php index 1c27db7..e342f19 100644 --- a/src/Multilingual.php +++ b/src/Multilingual.php @@ -3,6 +3,7 @@ namespace Digitalcloud\MultilingualNova; use Laravel\Nova\Fields\Field; +use Laravel\Nova\Http\Requests\NovaRequest; class Multilingual extends Field { @@ -13,9 +14,6 @@ class Multilingual extends Field */ public $component = 'multilingual-nova'; - public $showOnCreation = false; - public $showOnUpdate = false; - public function __construct($name, $attribute = null, $resolveCallback = null) { parent::__construct($name, $attribute, $resolveCallback); @@ -28,6 +26,11 @@ public function __construct($name, $attribute = null, $resolveCallback = null) } + public function fill(NovaRequest $request, $model) + { + return ; + } + protected function resolveAttribute($resource, $attribute) { $locales = $this->getLocales(); diff --git a/src/NovaLanguageTool.php b/src/NovaLanguageTool.php new file mode 100644 index 0000000..756ba58 --- /dev/null +++ b/src/NovaLanguageTool.php @@ -0,0 +1,34 @@ +