(window["webpackjsonp"] = window["webpackjsonp"] || []).push([[14],{ /***/ 15: /***/ (function(module, exports) { var g; // this works in non-strict mode g = (function() { return this; })(); try { // this works if eval is allowed (see csp) g = g || new function("return 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; /***/ }), /***/ 175: /***/ (function(module, exports) { module.exports = function(module) { if (!module.webpackpolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if (!module.children) module.children = []; object.defineproperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); object.defineproperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackpolyfill = 1; } return module; }; /***/ }), /***/ 336: /***/ (function(module, exports) { /* webpack var injection */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */ module.exports = __webpack_amd_options__; /* webpack var injection */}.call(this, {})) /***/ }), /***/ 62: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* webpack var injection */(function(global) {/* unused harmony export store */ /* unused harmony export createlogger */ /* unused harmony export createnamespacedhelpers */ /* unused harmony export install */ /* unused harmony export mapactions */ /* unused harmony export mapgetters */ /* unused harmony export mapmutations */ /* unused harmony export mapstate */ /*! * vuex v3.6.2 * (c) 2021 evan you * @license mit */ function applymixin (vue) { var version = number(vue.version.split('.')[0]); if (version >= 2) { vue.mixin({ beforecreate: vuexinit }); } else { // override init and inject vuex init procedure // for 1.x backwards compatibility. var _init = vue.prototype._init; vue.prototype._init = function (options) { if ( options === void 0 ) options = {}; options.init = options.init ? [vuexinit].concat(options.init) : vuexinit; _init.call(this, options); }; } /** * vuex init hook, injected into each instances init hooks list. */ function vuexinit () { var options = this.$options; // store injection if (options.store) { this.$store = typeof options.store === 'function' ? options.store() : options.store; } else if (options.parent && options.parent.$store) { this.$store = options.parent.$store; } } } var target = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {}; var devtoolhook = target.__vue_devtools_global_hook__; function devtoolplugin (store) { if (!devtoolhook) { return } store._devtoolhook = devtoolhook; devtoolhook.emit('vuex:init', store); devtoolhook.on('vuex:travel-to-state', function (targetstate) { store.replacestate(targetstate); }); store.subscribe(function (mutation, state) { devtoolhook.emit('vuex:mutation', mutation, state); }, { prepend: true }); store.subscribeaction(function (action, state) { devtoolhook.emit('vuex:action', action, state); }, { prepend: true }); } /** * get the first item that pass the test * by second argument function * * @param {array} list * @param {function} f * @return {*} */ function find (list, f) { return list.filter(f)[0] } /** * deep copy the given object considering circular structure. * this function caches all nested objects and its copies. * if it detects circular structure, use cached copy to avoid infinite loop. * * @param {*} obj * @param {array} cache * @return {*} */ function deepcopy (obj, cache) { if ( cache === void 0 ) cache = []; // just return if obj is immutable value if (obj === null || typeof obj !== 'object') { return obj } // if obj is hit, it is in circular structure var hit = find(cache, function (c) { return c.original === obj; }); if (hit) { return hit.copy } var copy = array.isarray(obj) ? [] : {}; // put the copy into cache at first // because we want to refer it in recursive deepcopy cache.push({ original: obj, copy: copy }); object.keys(obj).foreach(function (key) { copy[key] = deepcopy(obj[key], cache); }); return copy } /** * foreach for object */ function foreachvalue (obj, fn) { object.keys(obj).foreach(function (key) { return fn(obj[key], key); }); } function isobject (obj) { return obj !== null && typeof obj === 'object' } function ispromise (val) { return val && typeof val.then === 'function' } function assert (condition, msg) { if (!condition) { throw new error(("[vuex] " + msg)) } } function partial (fn, arg) { return function () { return fn(arg) } } // base data struct for store's module, package with some attribute and method var module = function module (rawmodule, runtime) { this.runtime = runtime; // store some children item this._children = object.create(null); // store the origin module object which passed by programmer this._rawmodule = rawmodule; var rawstate = rawmodule.state; // store the origin module's state this.state = (typeof rawstate === 'function' ? rawstate() : rawstate) || {}; }; var prototypeaccessors = { namespaced: { configurable: true } }; prototypeaccessors.namespaced.get = function () { return !!this._rawmodule.namespaced }; module.prototype.addchild = function addchild (key, module) { this._children[key] = module; }; module.prototype.removechild = function removechild (key) { delete this._children[key]; }; module.prototype.getchild = function getchild (key) { return this._children[key] }; module.prototype.haschild = function haschild (key) { return key in this._children }; module.prototype.update = function update (rawmodule) { this._rawmodule.namespaced = rawmodule.namespaced; if (rawmodule.actions) { this._rawmodule.actions = rawmodule.actions; } if (rawmodule.mutations) { this._rawmodule.mutations = rawmodule.mutations; } if (rawmodule.getters) { this._rawmodule.getters = rawmodule.getters; } }; module.prototype.foreachchild = function foreachchild (fn) { foreachvalue(this._children, fn); }; module.prototype.foreachgetter = function foreachgetter (fn) { if (this._rawmodule.getters) { foreachvalue(this._rawmodule.getters, fn); } }; module.prototype.foreachaction = function foreachaction (fn) { if (this._rawmodule.actions) { foreachvalue(this._rawmodule.actions, fn); } }; module.prototype.foreachmutation = function foreachmutation (fn) { if (this._rawmodule.mutations) { foreachvalue(this._rawmodule.mutations, fn); } }; object.defineproperties( module.prototype, prototypeaccessors ); var modulecollection = function modulecollection (rawrootmodule) { // register root module (vuex.store options) this.register([], rawrootmodule, false); }; modulecollection.prototype.get = function get (path) { return path.reduce(function (module, key) { return module.getchild(key) }, this.root) }; modulecollection.prototype.getnamespace = function getnamespace (path) { var module = this.root; return path.reduce(function (namespace, key) { module = module.getchild(key); return namespace + (module.namespaced ? key + '/' : '') }, '') }; modulecollection.prototype.update = function update$1 (rawrootmodule) { update([], this.root, rawrootmodule); }; modulecollection.prototype.register = function register (path, rawmodule, runtime) { var this$1 = this; if ( runtime === void 0 ) runtime = true; if ((false)) {} var newmodule = new module(rawmodule, runtime); if (path.length === 0) { this.root = newmodule; } else { var parent = this.get(path.slice(0, -1)); parent.addchild(path[path.length - 1], newmodule); } // register nested modules if (rawmodule.modules) { foreachvalue(rawmodule.modules, function (rawchildmodule, key) { this$1.register(path.concat(key), rawchildmodule, runtime); }); } }; modulecollection.prototype.unregister = function unregister (path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; var child = parent.getchild(key); if (!child) { if ((false)) {} return } if (!child.runtime) { return } parent.removechild(key); }; modulecollection.prototype.isregistered = function isregistered (path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; if (parent) { return parent.haschild(key) } return false }; function update (path, targetmodule, newmodule) { if ((false)) {} // update target module targetmodule.update(newmodule); // update nested modules if (newmodule.modules) { for (var key in newmodule.modules) { if (!targetmodule.getchild(key)) { if ((false)) {} return } update( path.concat(key), targetmodule.getchild(key), newmodule.modules[key] ); } } } var functionassert = { assert: function (value) { return typeof value === 'function'; }, expected: 'function' }; var objectassert = { assert: function (value) { return typeof value === 'function' || (typeof value === 'object' && typeof value.handler === 'function'); }, expected: 'function or object with "handler" function' }; var asserttypes = { getters: functionassert, mutations: functionassert, actions: objectassert }; function assertrawmodule (path, rawmodule) { object.keys(asserttypes).foreach(function (key) { if (!rawmodule[key]) { return } var assertoptions = asserttypes[key]; foreachvalue(rawmodule[key], function (value, type) { assert( assertoptions.assert(value), makeassertionmessage(path, key, type, value, assertoptions.expected) ); }); }); } function makeassertionmessage (path, key, type, value, expected) { var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; if (path.length > 0) { buf += " in module \"" + (path.join('.')) + "\""; } buf += " is " + (json.stringify(value)) + "."; return buf } var vue; // bind on install var store = function store (options) { var this$1 = this; if ( options === void 0 ) options = {}; // auto install if it is not done yet and `window` has `vue`. // to allow users to avoid auto-installation in some cases, // this code should be placed here. see #731 if (!vue && typeof window !== 'undefined' && window.vue) { install(window.vue); } if ((false)) {} var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; var strict = options.strict; if ( strict === void 0 ) strict = false; // store internal state this._committing = false; this._actions = object.create(null); this._actionsubscribers = []; this._mutations = object.create(null); this._wrappedgetters = object.create(null); this._modules = new modulecollection(options); this._modulesnamespacemap = object.create(null); this._subscribers = []; this._watchervm = new vue(); this._makelocalgetterscache = object.create(null); // bind commit and dispatch to self var store = this; var ref = this; var dispatch = ref.dispatch; var commit = ref.commit; this.dispatch = function bounddispatch (type, payload) { return dispatch.call(store, type, payload) }; this.commit = function boundcommit (type, payload, options) { return commit.call(store, type, payload, options) }; // strict mode this.strict = strict; var state = this._modules.root.state; // init root module. // this also recursively registers all sub-modules // and collects all module getters inside this._wrappedgetters installmodule(this, state, [], this._modules.root); // initialize the store vm, which is responsible for the reactivity // (also registers _wrappedgetters as computed properties) resetstorevm(this, state); // apply plugins plugins.foreach(function (plugin) { return plugin(this$1); }); var usedevtools = options.devtools !== undefined ? options.devtools : vue.config.devtools; if (usedevtools) { devtoolplugin(this); } }; var prototypeaccessors$1 = { state: { configurable: true } }; prototypeaccessors$1.state.get = function () { return this._vm._data.$$state }; prototypeaccessors$1.state.set = function (v) { if ((false)) {} }; store.prototype.commit = function commit (_type, _payload, _options) { var this$1 = this; // check object-style commit var ref = unifyobjectstyle(_type, _payload, _options); var type = ref.type; var payload = ref.payload; var options = ref.options; var mutation = { type: type, payload: payload }; var entry = this._mutations[type]; if (!entry) { if ((false)) {} return } this._withcommit(function () { entry.foreach(function commititerator (handler) { handler(payload); }); }); this._subscribers .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .foreach(function (sub) { return sub(mutation, this$1.state); }); if ( false ) {} }; store.prototype.dispatch = function dispatch (_type, _payload) { var this$1 = this; // check object-style dispatch var ref = unifyobjectstyle(_type, _payload); var type = ref.type; var payload = ref.payload; var action = { type: type, payload: payload }; var entry = this._actions[type]; if (!entry) { if ((false)) {} return } try { this._actionsubscribers .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .filter(function (sub) { return sub.before; }) .foreach(function (sub) { return sub.before(action, this$1.state); }); } catch (e) { if ((false)) {} } var result = entry.length > 1 ? promise.all(entry.map(function (handler) { return handler(payload); })) : entry[0](payload); return new promise(function (resolve, reject) { result.then(function (res) { try { this$1._actionsubscribers .filter(function (sub) { return sub.after; }) .foreach(function (sub) { return sub.after(action, this$1.state); }); } catch (e) { if ((false)) {} } resolve(res); }, function (error) { try { this$1._actionsubscribers .filter(function (sub) { return sub.error; }) .foreach(function (sub) { return sub.error(action, this$1.state, error); }); } catch (e) { if ((false)) {} } reject(error); }); }) }; store.prototype.subscribe = function subscribe (fn, options) { return genericsubscribe(fn, this._subscribers, options) }; store.prototype.subscribeaction = function subscribeaction (fn, options) { var subs = typeof fn === 'function' ? { before: fn } : fn; return genericsubscribe(subs, this._actionsubscribers, options) }; store.prototype.watch = function watch (getter, cb, options) { var this$1 = this; if ((false)) {} return this._watchervm.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options) }; store.prototype.replacestate = function replacestate (state) { var this$1 = this; this._withcommit(function () { this$1._vm._data.$$state = state; }); }; store.prototype.registermodule = function registermodule (path, rawmodule, options) { if ( options === void 0 ) options = {}; if (typeof path === 'string') { path = [path]; } if ((false)) {} this._modules.register(path, rawmodule); installmodule(this, this.state, path, this._modules.get(path), options.preservestate); // reset store to update getters... resetstorevm(this, this.state); }; store.prototype.unregistermodule = function unregistermodule (path) { var this$1 = this; if (typeof path === 'string') { path = [path]; } if ((false)) {} this._modules.unregister(path); this._withcommit(function () { var parentstate = getnestedstate(this$1.state, path.slice(0, -1)); vue.delete(parentstate, path[path.length - 1]); }); resetstore(this); }; store.prototype.hasmodule = function hasmodule (path) { if (typeof path === 'string') { path = [path]; } if ((false)) {} return this._modules.isregistered(path) }; store.prototype.hotupdate = function hotupdate (newoptions) { this._modules.update(newoptions); resetstore(this, true); }; store.prototype._withcommit = function _withcommit (fn) { var committing = this._committing; this._committing = true; fn(); this._committing = committing; }; object.defineproperties( store.prototype, prototypeaccessors$1 ); function genericsubscribe (fn, subs, options) { if (subs.indexof(fn) < 0) { options && options.prepend ? subs.unshift(fn) : subs.push(fn); } return function () { var i = subs.indexof(fn); if (i > -1) { subs.splice(i, 1); } } } function resetstore (store, hot) { store._actions = object.create(null); store._mutations = object.create(null); store._wrappedgetters = object.create(null); store._modulesnamespacemap = object.create(null); var state = store.state; // init all modules installmodule(store, state, [], store._modules.root, true); // reset vm resetstorevm(store, state, hot); } function resetstorevm (store, state, hot) { var oldvm = store._vm; // bind store public getters store.getters = {}; // reset local getters cache store._makelocalgetterscache = object.create(null); var wrappedgetters = store._wrappedgetters; var computed = {}; foreachvalue(wrappedgetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism // direct inline function use will lead to closure preserving oldvm. // using partial to return function with only arguments preserved in closure environment. computed[key] = partial(fn, store); object.defineproperty(store.getters, key, { get: function () { return store._vm[key]; }, enumerable: true // for local getters }); }); // use a vue instance to store the state tree // suppress warnings just in case the user has added // some funky global mixins var silent = vue.config.silent; vue.config.silent = true; store._vm = new vue({ data: { $$state: state }, computed: computed }); vue.config.silent = silent; // enable strict mode for new vm if (store.strict) { enablestrictmode(store); } if (oldvm) { if (hot) { // dispatch changes in all subscribed watchers // to force getter re-evaluation for hot reloading. store._withcommit(function () { oldvm._data.$$state = null; }); } vue.nexttick(function () { return oldvm.$destroy(); }); } } function installmodule (store, rootstate, path, module, hot) { var isroot = !path.length; var namespace = store._modules.getnamespace(path); // register in namespace map if (module.namespaced) { if (store._modulesnamespacemap[namespace] && ("production" !== 'production')) { console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/')))); } store._modulesnamespacemap[namespace] = module; } // set state if (!isroot && !hot) { var parentstate = getnestedstate(rootstate, path.slice(0, -1)); var modulename = path[path.length - 1]; store._withcommit(function () { if ((false)) {} vue.set(parentstate, modulename, module.state); }); } var local = module.context = makelocalcontext(store, namespace, path); module.foreachmutation(function (mutation, key) { var namespacedtype = namespace + key; registermutation(store, namespacedtype, mutation, local); }); module.foreachaction(function (action, key) { var type = action.root ? key : namespace + key; var handler = action.handler || action; registeraction(store, type, handler, local); }); module.foreachgetter(function (getter, key) { var namespacedtype = namespace + key; registergetter(store, namespacedtype, getter, local); }); module.foreachchild(function (child, key) { installmodule(store, rootstate, path.concat(key), child, hot); }); } /** * make localized dispatch, commit, getters and state * if there is no namespace, just use root ones */ function makelocalcontext (store, namespace, path) { var nonamespace = namespace === ''; var local = { dispatch: nonamespace ? store.dispatch : function (_type, _payload, _options) { var args = unifyobjectstyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type = args.type; if (!options || !options.root) { type = namespace + type; if (false) {} } return store.dispatch(type, payload) }, commit: nonamespace ? store.commit : function (_type, _payload, _options) { var args = unifyobjectstyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type = args.type; if (!options || !options.root) { type = namespace + type; if (false) {} } store.commit(type, payload, options); } }; // getters and state object must be gotten lazily // because they will be changed by vm update object.defineproperties(local, { getters: { get: nonamespace ? function () { return store.getters; } : function () { return makelocalgetters(store, namespace); } }, state: { get: function () { return getnestedstate(store.state, path); } } }); return local } function makelocalgetters (store, namespace) { if (!store._makelocalgetterscache[namespace]) { var gettersproxy = {}; var splitpos = namespace.length; object.keys(store.getters).foreach(function (type) { // skip if the target getter is not match this namespace if (type.slice(0, splitpos) !== namespace) { return } // extract local getter type var localtype = type.slice(splitpos); // add a port to the getters proxy. // define as getter property because // we do not want to evaluate the getters in this time. object.defineproperty(gettersproxy, localtype, { get: function () { return store.getters[type]; }, enumerable: true }); }); store._makelocalgetterscache[namespace] = gettersproxy; } return store._makelocalgetterscache[namespace] } function registermutation (store, type, handler, local) { var entry = store._mutations[type] || (store._mutations[type] = []); entry.push(function wrappedmutationhandler (payload) { handler.call(store, local.state, payload); }); } function registeraction (store, type, handler, local) { var entry = store._actions[type] || (store._actions[type] = []); entry.push(function wrappedactionhandler (payload) { var res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, getters: local.getters, state: local.state, rootgetters: store.getters, rootstate: store.state }, payload); if (!ispromise(res)) { res = promise.resolve(res); } if (store._devtoolhook) { return res.catch(function (err) { store._devtoolhook.emit('vuex:error', err); throw err }) } else { return res } }); } function registergetter (store, type, rawgetter, local) { if (store._wrappedgetters[type]) { if ((false)) {} return } store._wrappedgetters[type] = function wrappedgetter (store) { return rawgetter( local.state, // local state local.getters, // local getters store.state, // root state store.getters // root getters ) }; } function enablestrictmode (store) { store._vm.$watch(function () { return this._data.$$state }, function () { if ((false)) {} }, { deep: true, sync: true }); } function getnestedstate (state, path) { return path.reduce(function (state, key) { return state[key]; }, state) } function unifyobjectstyle (type, payload, options) { if (isobject(type) && type.type) { options = payload; payload = type; type = type.type; } if ((false)) {} return { type: type, payload: payload, options: options } } function install (_vue) { if (vue && _vue === vue) { if ((false)) {} return } vue = _vue; applymixin(vue); } /** * reduce the code which written in vue.js for getting the state. * @param {string} [namespace] - module's namespace * @param {object|array} states # object's item can be a function which accept state and getters for param, you can do something for state and getters in it. * @param {object} */ var mapstate = normalizenamespace(function (namespace, states) { var res = {}; if (false) {} normalizemap(states).foreach(function (ref) { var key = ref.key; var val = ref.val; res[key] = function mappedstate () { var state = this.$store.state; var getters = this.$store.getters; if (namespace) { var module = getmodulebynamespace(this.$store, 'mapstate', namespace); if (!module) { return } state = module.context.state; getters = module.context.getters; } return typeof val === 'function' ? val.call(this, state, getters) : state[val] }; // mark vuex getter for devtools res[key].vuex = true; }); return res }); /** * reduce the code which written in vue.js for committing the mutation * @param {string} [namespace] - module's namespace * @param {object|array} mutations # object's item can be a function which accept `commit` function as the first param, it can accept another params. you can commit mutation and do any other things in this function. specially, you need to pass anthor params from the mapped function. * @return {object} */ var mapmutations = normalizenamespace(function (namespace, mutations) { var res = {}; if (false) {} normalizemap(mutations).foreach(function (ref) { var key = ref.key; var val = ref.val; res[key] = function mappedmutation () { var args = [], len = arguments.length; while ( len-- ) args[ len ] = arguments[ len ]; // get the commit method from store var commit = this.$store.commit; if (namespace) { var module = getmodulebynamespace(this.$store, 'mapmutations', namespace); if (!module) { return } commit = module.context.commit; } return typeof val === 'function' ? val.apply(this, [commit].concat(args)) : commit.apply(this.$store, [val].concat(args)) }; }); return res }); /** * reduce the code which written in vue.js for getting the getters * @param {string} [namespace] - module's namespace * @param {object|array} getters * @return {object} */ var mapgetters = normalizenamespace(function (namespace, getters) { var res = {}; if (false) {} normalizemap(getters).foreach(function (ref) { var key = ref.key; var val = ref.val; // the namespace has been mutated by normalizenamespace val = namespace + val; res[key] = function mappedgetter () { if (namespace && !getmodulebynamespace(this.$store, 'mapgetters', namespace)) { return } if (false) {} return this.$store.getters[val] }; // mark vuex getter for devtools res[key].vuex = true; }); return res }); /** * reduce the code which written in vue.js for dispatch the action * @param {string} [namespace] - module's namespace * @param {object|array} actions # object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. you can dispatch action and do any other things in this function. specially, you need to pass anthor params from the mapped function. * @return {object} */ var mapactions = normalizenamespace(function (namespace, actions) { var res = {}; if (false) {} normalizemap(actions).foreach(function (ref) { var key = ref.key; var val = ref.val; res[key] = function mappedaction () { var args = [], len = arguments.length; while ( len-- ) args[ len ] = arguments[ len ]; // get dispatch function from store var dispatch = this.$store.dispatch; if (namespace) { var module = getmodulebynamespace(this.$store, 'mapactions', namespace); if (!module) { return } dispatch = module.context.dispatch; } return typeof val === 'function' ? val.apply(this, [dispatch].concat(args)) : dispatch.apply(this.$store, [val].concat(args)) }; }); return res }); /** * rebinding namespace param for mapxxx function in special scoped, and return them by simple object * @param {string} namespace * @return {object} */ var createnamespacedhelpers = function (namespace) { return ({ mapstate: mapstate.bind(null, namespace), mapgetters: mapgetters.bind(null, namespace), mapmutations: mapmutations.bind(null, namespace), mapactions: mapactions.bind(null, namespace) }); }; /** * normalize the map * normalizemap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ] * normalizemap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ] * @param {array|object} map * @return {object} */ function normalizemap (map) { if (!isvalidmap(map)) { return [] } return array.isarray(map) ? map.map(function (key) { return ({ key: key, val: key }); }) : object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) } /** * validate whether given map is valid or not * @param {*} map * @return {boolean} */ function isvalidmap (map) { return array.isarray(map) || isobject(map) } /** * return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. * @param {function} fn * @return {function} */ function normalizenamespace (fn) { return function (namespace, map) { if (typeof namespace !== 'string') { map = namespace; namespace = ''; } else if (namespace.charat(namespace.length - 1) !== '/') { namespace += '/'; } return fn(namespace, map) } } /** * search a special module from store by namespace. if module not exist, print error message. * @param {object} store * @param {string} helper * @param {string} namespace * @return {object} */ function getmodulebynamespace (store, helper, namespace) { var module = store._modulesnamespacemap[namespace]; if (false) {} return module } // credits: borrowed code from fcomb/redux-logger function createlogger (ref) { if ( ref === void 0 ) ref = {}; var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true; var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, statebefore, stateafter) { return true; }; var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; }; var mutationtransformer = ref.mutationtransformer; if ( mutationtransformer === void 0 ) mutationtransformer = function (mut) { return mut; }; var actionfilter = ref.actionfilter; if ( actionfilter === void 0 ) actionfilter = function (action, state) { return true; }; var actiontransformer = ref.actiontransformer; if ( actiontransformer === void 0 ) actiontransformer = function (act) { return act; }; var logmutations = ref.logmutations; if ( logmutations === void 0 ) logmutations = true; var logactions = ref.logactions; if ( logactions === void 0 ) logactions = true; var logger = ref.logger; if ( logger === void 0 ) logger = console; return function (store) { var prevstate = deepcopy(store.state); if (typeof logger === 'undefined') { return } if (logmutations) { store.subscribe(function (mutation, state) { var nextstate = deepcopy(state); if (filter(mutation, prevstate, nextstate)) { var formattedtime = getformattedtime(); var formattedmutation = mutationtransformer(mutation); var message = "mutation " + (mutation.type) + formattedtime; startmessage(logger, message, collapsed); logger.log('%c prev state', 'color: #9e9e9e; font-weight: bold', transformer(prevstate)); logger.log('%c mutation', 'color: #03a9f4; font-weight: bold', formattedmutation); logger.log('%c next state', 'color: #4caf50; font-weight: bold', transformer(nextstate)); endmessage(logger); } prevstate = nextstate; }); } if (logactions) { store.subscribeaction(function (action, state) { if (actionfilter(action, state)) { var formattedtime = getformattedtime(); var formattedaction = actiontransformer(action); var message = "action " + (action.type) + formattedtime; startmessage(logger, message, collapsed); logger.log('%c action', 'color: #03a9f4; font-weight: bold', formattedaction); endmessage(logger); } }); } } } function startmessage (logger, message, collapsed) { var startmessage = collapsed ? logger.groupcollapsed : logger.group; // render try { startmessage.call(logger, message); } catch (e) { logger.log(message); } } function endmessage (logger) { try { logger.groupend(); } catch (e) { logger.log('—— log end ——'); } } function getformattedtime () { var time = new date(); return (" @ " + (pad(time.gethours(), 2)) + ":" + (pad(time.getminutes(), 2)) + ":" + (pad(time.getseconds(), 2)) + "." + (pad(time.getmilliseconds(), 3))) } function repeat (str, times) { return (new array(times + 1)).join(str) } function pad (num, maxlength) { return repeat('0', maxlength - num.tostring().length) + num } var index = { store: store, install: install, version: '3.6.2', mapstate: mapstate, mapmutations: mapmutations, mapgetters: mapgetters, mapactions: mapactions, createnamespacedhelpers: createnamespacedhelpers, createlogger: createlogger }; /* harmony default export */ __webpack_exports__["a"] = (index); /* webpack var injection */}.call(this, __webpack_require__(15))) /***/ }) }]);