552 lines
2.2 MiB
552 lines
2.2 MiB
/******/ (function(modules) { // webpackBootstrap
|
||
/******/ // The module cache
|
||
/******/ var installedModules = {};
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __webpack_require__(moduleId) {
|
||
/******/
|
||
/******/ // Check if module is in cache
|
||
/******/ if(installedModules[moduleId]) {
|
||
/******/ return installedModules[moduleId].exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = installedModules[moduleId] = {
|
||
/******/ i: moduleId,
|
||
/******/ l: false,
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
/******/
|
||
/******/ // Flag the module as loaded
|
||
/******/ module.l = true;
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __webpack_require__.m = modules;
|
||
/******/
|
||
/******/ // expose the module cache
|
||
/******/ __webpack_require__.c = installedModules;
|
||
/******/
|
||
/******/ // define getter function for harmony exports
|
||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||
/******/ Object.defineProperty(exports, name, {
|
||
/******/ configurable: false,
|
||
/******/ enumerable: true,
|
||
/******/ get: getter
|
||
/******/ });
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
/******/ __webpack_require__.n = function(module) {
|
||
/******/ var getter = module && module.__esModule ?
|
||
/******/ function getDefault() { return module['default']; } :
|
||
/******/ function getModuleExports() { return module; };
|
||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||
/******/ return getter;
|
||
/******/ };
|
||
/******/
|
||
/******/ // Object.prototype.hasOwnProperty.call
|
||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||
/******/
|
||
/******/ // __webpack_public_path__
|
||
/******/ __webpack_require__.p = "/dist/";
|
||
/******/
|
||
/******/ // Load entry module and return exports
|
||
/******/ return __webpack_require__(__webpack_require__.s = 23);
|
||
/******/ })
|
||
/************************************************************************/
|
||
/******/ ([
|
||
/* 0 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar bind = __webpack_require__(18);\nvar isBuffer = __webpack_require__(48);\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL3V0aWxzLmpzPzcwNjEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsYUFBYSxRQUFRO0FBQ3JCO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQixhQUFhLFFBQVE7QUFDckI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsYUFBYSxRQUFRO0FBQ3JCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FB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VJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n");
|
||
|
||
/***/ }),
|
||
/* 1 */
|
||
/***/ (function(module, exports) {
|
||
|
||
eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvcHJvY2Vzcy9icm93c2VyLmpzPzViNjkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQSxDQUFDO0FBQ0Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7O0FBSUE7QUFDQTtBQUNBO0FB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5vb3A7XG5wcm9jZXNzLmVtaXQgPSBub29wO1xucHJvY2Vzcy5wcmVwZW5kTGlzdGVuZXIgPSBub29wO1xucHJvY2Vzcy5wcmVwZW5kT25jZUxpc3RlbmVyID0gbm9vcDtcblxucHJvY2Vzcy5saXN0ZW5lcnMgPSBmdW5jdGlvbiAobmFtZSkgeyByZXR1cm4gW10gfVxuXG5wcm9jZXNzLmJpbmRpbmcgPSBmdW5jdGlvbiAobmFtZSkge1xuICAgIHRocm93IG5ldyBFcnJvcigncHJvY2Vzcy5iaW5kaW5nIGlzIG5vdCBzdXBwb3J0ZWQnKTtcbn07XG5cbnByb2Nlc3MuY3dkID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gJy8nIH07XG5wcm9jZXNzLmNoZGlyID0gZnVuY3Rpb24gKGRpcikge1xuICAgIHRocm93IG5ldyBFcnJvcigncHJvY2Vzcy5jaGRpciBpcyBub3Qgc3VwcG9ydGVkJyk7XG59O1xucHJvY2Vzcy51bWFzayA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gMDsgfTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL3Byb2Nlc3MvYnJvd3Nlci5qc1xuLy8gbW9kdWxlIGlkID0gMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1\n");
|
||
|
||
/***/ }),
|
||
/* 2 */
|
||
/***/ (function(module, exports) {
|
||
|
||
eval("/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file.\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvY29tcG9uZW50LW5vc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FsaXplclxuICAgICAgb3B0aW9ucy5faW5qZWN0U3R5bGVzID0gaG9va1xuICAgICAgLy8gcmVnaXN0ZXIgZm9yIGZ1bmN0aW9hbCBjb21wb25lbnQgaW4gdnVlIGZpbGVcbiAgICAgIG9wdGlvbnMucmVuZGVyID0gZnVuY3Rpb24gcmVuZGVyV2l0aFN0eWxlSW5qZWN0aW9uIChoLCBjb250ZXh0KSB7XG4gICAgICAgIGhvb2suY2FsbChjb250ZXh0KVxuICAgICAgICByZXR1cm4gZXhpc3RpbmcoaCwgY29udGV4dClcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4ge1xuICAgIGVzTW9kdWxlOiBlc01vZHVsZSxcbiAgICBleHBvcnRzOiBzY3JpcHRFeHBvcnRzLFxuICAgIG9wdGlvbnM6IG9wdGlvbnNcbiAgfVxufVxuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvY29tcG9uZW50LW5vcm1hbGl6ZXIuanNcbi8vIG1vZHVsZSBpZCA9IDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///2\n");
|
||
|
||
/***/ }),
|
||
/* 3 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function(process, global, setImmediate) {/*!\n * Vue.js v2.5.16\n * (c) 2014-2018 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object.freeze({});\n\n// these helpers produces better vm code in JS engines due to their\n// explicitness and function inlining\nfunction isUndef (v) {\n return v === undefined || v === null\n}\n\nfunction isDef (v) {\n return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n return v === true\n}\n\nfunction isFalse (v) {\n return v === false\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n // $flow-disable-line\n typeof value === 'symbol' ||\n typeof value === 'boolean'\n )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value e.g. [object Object]\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n str,\n expectsLowerCase\n) {\n var map = Object.create(null);\n var list = str.split(',');\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase\n ? function (val) { return map[val.toLowerCase()]; }\n : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if a attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n var cache = Object.create(null);\n return (function cachedFn (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str))\n })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it... e.g.\n * PhantomJS 1.x. Technically we don't need this anymore since native bind is\n * now more performant in most browsers, but removing it would be breaking for\n * code that was able to run in PhantomJS 1.x, so this must be kept for\n * backwards compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n function boundFn (a) {\n var l = arguments.length;\n return l\n ? l > 1\n ? fn.apply(ctx, arguments)\n : fn.call(ctx, a)\n : fn.call(ctx)\n }\n\n boundFn._length = fn.length;\n return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n ? nativeBind\n : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n}\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\nfunction genStaticKeys (modules) {\n return modules.reduce(function (keys, m) {\n return keys.concat(m.staticKeys || [])\n }, []).join(',')\n}\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\nfunction looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\n\nvar ASSET_TYPES = [\n 'component',\n 'directive',\n 'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeDestroy',\n 'destroyed',\n 'activated',\n 'deactivated',\n 'errorCaptured'\n];\n\n/* */\n\nvar config = ({\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n\n /**\n * Show production mode tip message on boot?\n */\n productionTip: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to enable devtools\n */\n devtools: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to record perf\n */\n performance: false,\n\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n})\n\n/* */\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n if (bailRE.test(path)) {\n return\n }\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj) { return }\n obj = obj[segments[i]];\n }\n return obj\n }\n}\n\n/* */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\n\nvar supportsPassive = false;\nif (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', ({\n get: function get () {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n })); // https://github.com/facebook/flow/issues/285\n window.addEventListener('test-passive', null, opts);\n } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer = global['process'].env.VUE_ENV === 'server';\n } else {\n _isServer = false;\n }\n }\n return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n typeof Symbol !== 'undefined' && isNative(Symbol) &&\n typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n} else {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set = (function () {\n function Set () {\n this.set = Object.create(null);\n }\n Set.prototype.has = function has (key) {\n return this.set[key] === true\n };\n Set.prototype.add = function add (key) {\n this.set[key] = true;\n };\n Set.prototype.clear = function clear () {\n this.set = Object.create(null);\n };\n\n return Set;\n }());\n}\n\n/* */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (process.env.NODE_ENV !== 'production') {\n var hasConsole = typeof console !== 'undefined';\n var classifyRE = /(?:^|[-_])(\\w)/g;\n var classify = function (str) { return str\n .replace(classifyRE, function (c) { return c.toUpperCase(); })\n .replace(/[-_]/g, ''); };\n\n warn = function (msg, vm) {\n var trace = vm ? generateComponentTrace(vm) : '';\n\n if (config.warnHandler) {\n config.warnHandler.call(null, msg, vm, trace);\n } else if (hasConsole && (!config.silent)) {\n console.error((\"[Vue warn]: \" + msg + trace));\n }\n };\n\n tip = function (msg, vm) {\n if (hasConsole && (!config.silent)) {\n console.warn(\"[Vue tip]: \" + msg + (\n vm ? generateComponentTrace(vm) : ''\n ));\n }\n };\n\n formatComponentName = function (vm, includeFile) {\n if (vm.$root === vm) {\n return '<Root>'\n }\n var options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm || {};\n var name = options.name || options._componentTag;\n var file = options.__file;\n if (!name && file) {\n var match = file.match(/([^/\\\\]+)\\.vue$/);\n name = match && match[1];\n }\n\n return (\n (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n (file && includeFile !== false ? (\" at \" + file) : '')\n )\n };\n\n var repeat = function (str, n) {\n var res = '';\n while (n) {\n if (n % 2 === 1) { res += str; }\n if (n > 1) { str += str; }\n n >>= 1;\n }\n return res\n };\n\n generateComponentTrace = function (vm) {\n if (vm._isVue && vm.$parent) {\n var tree = [];\n var currentRecursiveSequence = 0;\n while (vm) {\n if (tree.length > 0) {\n var last = tree[tree.length - 1];\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent;\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n tree.push(vm);\n vm = vm.$parent;\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n : formatComponentName(vm))); })\n .join('\\n')\n } else {\n return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n }\n };\n}\n\n/* */\n\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n this.id = uid++;\n this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n if (Dep.target) {\n Dep.target.addDep(this);\n }\n};\n\nDep.prototype.notify = function notify () {\n // stabilize the subscriber list first\n var subs = this.subs.slice();\n for (var i = 0, l = subs.length; i < l; i++) {\n subs[i].update();\n }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n if (Dep.target) { targetStack.push(Dep.target); }\n Dep.target = _target;\n}\n\nfunction popTarget () {\n Dep.target = targetStack.pop();\n}\n\n/* */\n\nvar VNode = function VNode (\n tag,\n data,\n children,\n text,\n elm,\n context,\n componentOptions,\n asyncFactory\n) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n if ( text === void 0 ) text = '';\n\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node\n};\n\nfunction createTextVNode (val) {\n return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n 'push',\n 'pop',\n 'shift',\n 'unshift',\n 'splice',\n 'sort',\n 'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break\n case 'splice':\n inserted = args.slice(2);\n break\n }\n if (inserted) { ob.observeArray(inserted); }\n // notify change\n ob.dep.notify();\n return result\n });\n});\n\n/* */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (Array.isArray(value)) {\n var augment = hasProto\n ? protoAugment\n : copyAugment;\n augment(value, arrayMethods, arrayKeys);\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n defineReactive(obj, keys[i]);\n }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n for (var i = 0, l = items.length; i < l; i++) {\n observe(items[i]);\n }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n def(target, key, src[key]);\n }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n if (!getter && arguments.length === 2) {\n val = obj[key];\n }\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val\n }\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return val\n }\n if (!ob) {\n target[key] = val;\n return val\n }\n defineReactive(ob.value, key, val);\n ob.dep.notify();\n return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n}\n\n/* */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n strats.el = strats.propsData = function (parent, child, vm, key) {\n if (!vm) {\n warn(\n \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n 'creation with the `new` keyword.'\n );\n }\n return defaultStrat(parent, child)\n };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n // in a Vue.extend merge, both should be functions\n if (!childVal) {\n return parentVal\n }\n if (!parentVal) {\n return childVal\n }\n // when parentVal & childVal are both present,\n // we need to return a function that returns the\n // merged result of both functions... no need to\n // check if parentVal is a function here because\n // it has to be a function to pass previous merges.\n return function mergedDataFn () {\n return mergeData(\n typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n )\n }\n } else {\n return function mergedInstanceDataFn () {\n // instance merge\n var instanceData = typeof childVal === 'function'\n ? childVal.call(vm, vm)\n : childVal;\n var defaultData = typeof parentVal === 'function'\n ? parentVal.call(vm, vm)\n : parentVal;\n if (instanceData) {\n return mergeData(instanceData, defaultData)\n } else {\n return defaultData\n }\n }\n }\n}\n\nstrats.data = function (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n if (childVal && typeof childVal !== 'function') {\n process.env.NODE_ENV !== 'production' && warn(\n 'The \"data\" option should be a function ' +\n 'that returns a per-instance value in component ' +\n 'definitions.',\n vm\n );\n\n return parentVal\n }\n return mergeDataOrFn(parentVal, childVal)\n }\n\n return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n parentVal,\n childVal\n) {\n return childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}\n\nASSET_TYPES.forEach(function (type) {\n strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n // work around Firefox's Object.prototype.watch...\n if (parentVal === nativeWatch) { parentVal = undefined; }\n if (childVal === nativeWatch) { childVal = undefined; }\n /* istanbul ignore if */\n if (!childVal) { return Object.create(parentVal || null) }\n if (process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = {};\n extend(ret, parentVal);\n for (var key$1 in childVal) {\n var parent = ret[key$1];\n var child = childVal[key$1];\n if (parent && !Array.isArray(parent)) {\n parent = [parent];\n }\n ret[key$1] = parent\n ? parent.concat(child)\n : Array.isArray(child) ? child : [child];\n }\n return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n if (childVal && process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = Object.create(null);\n extend(ret, parentVal);\n if (childVal) { extend(ret, childVal); }\n return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n for (var key in options.components) {\n validateComponentName(key);\n }\n}\n\nfunction validateComponentName (name) {\n if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n warn(\n 'Invalid component name: \"' + name + '\". Component names ' +\n 'can only contain alphanumeric characters and the hyphen, ' +\n 'and must start with a letter.'\n );\n }\n if (isBuiltInTag(name) || config.isReservedTag(name)) {\n warn(\n 'Do not use built-in or reserved HTML elements as component ' +\n 'id: ' + name\n );\n }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n var dirs = options.directives;\n if (dirs) {\n for (var key in dirs) {\n var def = dirs[key];\n if (typeof def === 'function') {\n dirs[key] = { bind: def, update: def };\n }\n }\n }\n}\n\nfunction assertObjectType (name, value, vm) {\n if (!isPlainObject(value)) {\n warn(\n \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n \"but got \" + (toRawType(value)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n parent,\n child,\n vm\n) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}\n\n/* */\n\nfunction validateProp (\n key,\n propOptions,\n propsData,\n vm\n) {\n var prop = propOptions[key];\n var absent = !hasOwn(propsData, key);\n var value = propsData[key];\n // boolean casting\n var booleanIndex = getTypeIndex(Boolean, prop.type);\n if (booleanIndex > -1) {\n if (absent && !hasOwn(prop, 'default')) {\n value = false;\n } else if (value === '' || value === hyphenate(key)) {\n // only cast empty string / same name to boolean if\n // boolean has higher priority\n var stringIndex = getTypeIndex(String, prop.type);\n if (stringIndex < 0 || booleanIndex < stringIndex) {\n value = true;\n }\n }\n }\n // check default value\n if (value === undefined) {\n value = getPropDefaultValue(vm, prop, key);\n // since the default value is a fresh copy,\n // make sure to observe it.\n var prevShouldObserve = shouldObserve;\n toggleObserving(true);\n observe(value);\n toggleObserving(prevShouldObserve);\n }\n if (\n process.env.NODE_ENV !== 'production' &&\n // skip validation for weex recycle-list child component props\n !(false && isObject(value) && ('@binding' in value))\n ) {\n assertProp(prop, key, value, vm, absent);\n }\n return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\nfunction assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (simpleCheckRE.test(expectedType)) {\n var t = typeof value;\n valid = t === expectedType.toLowerCase();\n // for primitive wrapper objects\n if (!valid && t === 'object') {\n valid = value instanceof type;\n }\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n if (!Array.isArray(expectedTypes)) {\n return isSameType(expectedTypes, type) ? 0 : -1\n }\n for (var i = 0, len = expectedTypes.length; i < len; i++) {\n if (isSameType(expectedTypes[i], type)) {\n return i\n }\n }\n return -1\n}\n\n/* */\n\nfunction handleError (err, vm, info) {\n if (vm) {\n var cur = vm;\n while ((cur = cur.$parent)) {\n var hooks = cur.$options.errorCaptured;\n if (hooks) {\n for (var i = 0; i < hooks.length; i++) {\n try {\n var capture = hooks[i].call(cur, err, vm, info) === false;\n if (capture) { return }\n } catch (e) {\n globalHandleError(e, cur, 'errorCaptured hook');\n }\n }\n }\n }\n }\n globalHandleError(err, vm, info);\n}\n\nfunction globalHandleError (err, vm, info) {\n if (config.errorHandler) {\n try {\n return config.errorHandler.call(null, err, vm, info)\n } catch (e) {\n logError(e, null, 'config.errorHandler');\n }\n }\n logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n }\n /* istanbul ignore else */\n if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n console.error(err);\n } else {\n throw err\n }\n}\n\n/* */\n/* globals MessageChannel */\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks.length = 0;\n for (var i = 0; i < copies.length; i++) {\n copies[i]();\n }\n}\n\n// Here we have async deferring wrappers using both microtasks and (macro) tasks.\n// In < 2.4 we used microtasks everywhere, but there are some scenarios where\n// microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690) or even between bubbling of the same\n// event (#6566). However, using (macro) tasks everywhere also has subtle problems\n// when state is changed right before repaint (e.g. #6813, out-in transitions).\n// Here we use microtask by default, but expose a way to force (macro) task when\n// needed (e.g. in event handlers attached by v-on).\nvar microTimerFunc;\nvar macroTimerFunc;\nvar useMacroTask = false;\n\n// Determine (macro) task defer implementation.\n// Technically setImmediate should be the ideal choice, but it's only available\n// in IE. The only polyfill that consistently queues the callback after all DOM\n// events triggered in the same loop is by using MessageChannel.\n/* istanbul ignore if */\nif (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n macroTimerFunc = function () {\n setImmediate(flushCallbacks);\n };\n} else if (typeof MessageChannel !== 'undefined' && (\n isNative(MessageChannel) ||\n // PhantomJS\n MessageChannel.toString() === '[object MessageChannelConstructor]'\n)) {\n var channel = new MessageChannel();\n var port = channel.port2;\n channel.port1.onmessage = flushCallbacks;\n macroTimerFunc = function () {\n port.postMessage(1);\n };\n} else {\n /* istanbul ignore next */\n macroTimerFunc = function () {\n setTimeout(flushCallbacks, 0);\n };\n}\n\n// Determine microtask defer implementation.\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n var p = Promise.resolve();\n microTimerFunc = function () {\n p.then(flushCallbacks);\n // in problematic UIWebViews, Promise.then doesn't completely break, but\n // it can get stuck in a weird state where callbacks are pushed into the\n // microtask queue but the queue isn't being flushed, until the browser\n // needs to do some other work, e.g. handle a timer. Therefore we can\n // \"force\" the microtask queue to be flushed by adding an empty timer.\n if (isIOS) { setTimeout(noop); }\n };\n} else {\n // fallback to macro\n microTimerFunc = macroTimerFunc;\n}\n\n/**\n * Wrap a function so that if any code inside triggers state change,\n * the changes are queued using a (macro) task instead of a microtask.\n */\nfunction withMacroTask (fn) {\n return fn._withTask || (fn._withTask = function () {\n useMacroTask = true;\n var res = fn.apply(null, arguments);\n useMacroTask = false;\n return res\n })\n}\n\nfunction nextTick (cb, ctx) {\n var _resolve;\n callbacks.push(function () {\n if (cb) {\n try {\n cb.call(ctx);\n } catch (e) {\n handleError(e, ctx, 'nextTick');\n }\n } else if (_resolve) {\n _resolve(ctx);\n }\n });\n if (!pending) {\n pending = true;\n if (useMacroTask) {\n macroTimerFunc();\n } else {\n microTimerFunc();\n }\n }\n // $flow-disable-line\n if (!cb && typeof Promise !== 'undefined') {\n return new Promise(function (resolve) {\n _resolve = resolve;\n })\n }\n}\n\n/* */\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n var perf = inBrowser && window.performance;\n /* istanbul ignore if */\n if (\n perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n perf.clearMeasures\n ) {\n mark = function (tag) { return perf.mark(tag); };\n measure = function (name, startTag, endTag) {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n perf.clearMeasures(name);\n };\n }\n}\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n var allowedGlobals = makeMap(\n 'Infinity,undefined,NaN,isFinite,isNaN,' +\n 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n 'require' // for Webpack/Browserify\n );\n\n var warnNonPresent = function (target, key) {\n warn(\n \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n 'referenced during render. Make sure that this property is reactive, ' +\n 'either in the data option, or for class-based components, by ' +\n 'initializing the property. ' +\n 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n target\n );\n };\n\n var hasProxy =\n typeof Proxy !== 'undefined' && isNative(Proxy);\n\n if (hasProxy) {\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n config.keyCodes = new Proxy(config.keyCodes, {\n set: function set (target, key, value) {\n if (isBuiltInModifier(key)) {\n warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n return false\n } else {\n target[key] = value;\n return true\n }\n }\n });\n }\n\n var hasHandler = {\n has: function has (target, key) {\n var has = key in target;\n var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n if (!has && !isAllowed) {\n warnNonPresent(target, key);\n }\n return has || !isAllowed\n }\n };\n\n var getHandler = {\n get: function get (target, key) {\n if (typeof key === 'string' && !(key in target)) {\n warnNonPresent(target, key);\n }\n return target[key]\n }\n };\n\n initProxy = function initProxy (vm) {\n if (hasProxy) {\n // determine which proxy handler to use\n var options = vm.$options;\n var handlers = options.render && options.render._withStripped\n ? getHandler\n : hasHandler;\n vm._renderProxy = new Proxy(vm, handlers);\n } else {\n vm._renderProxy = vm;\n }\n };\n}\n\n/* */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n var i, keys;\n var isA = Array.isArray(val);\n if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n return\n }\n if (val.__ob__) {\n var depId = val.__ob__.dep.id;\n if (seen.has(depId)) {\n return\n }\n seen.add(depId);\n }\n if (isA) {\n i = val.length;\n while (i--) { _traverse(val[i], seen); }\n } else {\n keys = Object.keys(val);\n i = keys.length;\n while (i--) { _traverse(val[keys[i]], seen); }\n }\n}\n\n/* */\n\nvar normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n name = once$$1 ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once$$1,\n capture: capture,\n passive: passive\n }\n});\n\nfunction createFnInvoker (fns) {\n function invoker () {\n var arguments$1 = arguments;\n\n var fns = invoker.fns;\n if (Array.isArray(fns)) {\n var cloned = fns.slice();\n for (var i = 0; i < cloned.length; i++) {\n cloned[i].apply(null, arguments$1);\n }\n } else {\n // return handler return value for single handlers\n return fns.apply(null, arguments)\n }\n }\n invoker.fns = fns;\n return invoker\n}\n\nfunction updateListeners (\n on,\n oldOn,\n add,\n remove$$1,\n vm\n) {\n var name, def, cur, old, event;\n for (name in on) {\n def = cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n /* istanbul ignore if */\n if (isUndef(cur)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n vm\n );\n } else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur);\n }\n add(event.name, cur, event.once, event.capture, event.passive, event.params);\n } else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove$$1(event.name, oldOn[name], event.capture);\n }\n }\n}\n\n/* */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n if (def instanceof VNode) {\n def = def.data.hook || (def.data.hook = {});\n }\n var invoker;\n var oldHook = def[hookKey];\n\n function wrappedHook () {\n hook.apply(this, arguments);\n // important: remove merged hook to ensure it's called only once\n // and prevent memory leak\n remove(invoker.fns, wrappedHook);\n }\n\n if (isUndef(oldHook)) {\n // no existing hook\n invoker = createFnInvoker([wrappedHook]);\n } else {\n /* istanbul ignore if */\n if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n // already a merged invoker\n invoker = oldHook;\n invoker.fns.push(wrappedHook);\n } else {\n // existing plain hook\n invoker = createFnInvoker([oldHook, wrappedHook]);\n }\n }\n\n invoker.merged = true;\n def[hookKey] = invoker;\n}\n\n/* */\n\nfunction extractPropsFromVNodeData (\n data,\n Ctor,\n tag\n) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n if (isUndef(propOptions)) {\n return\n }\n var res = {};\n var attrs = data.attrs;\n var props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n if (process.env.NODE_ENV !== 'production') {\n var keyInLowerCase = key.toLowerCase();\n if (\n key !== keyInLowerCase &&\n attrs && hasOwn(attrs, keyInLowerCase)\n ) {\n tip(\n \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n \" \\\"\" + key + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and camelCased \" +\n \"props need to use their kebab-case equivalents when using in-DOM \" +\n \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n );\n }\n }\n checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n }\n }\n return res\n}\n\nfunction checkProp (\n res,\n hash,\n key,\n altKey,\n preserve\n) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n if (!preserve) {\n delete hash[key];\n }\n return true\n } else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n if (!preserve) {\n delete hash[altKey];\n }\n return true\n }\n }\n return false\n}\n\n/* */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}\n\nfunction isTextNode (node) {\n return isDef(node) && isDef(node.text) && isFalse(node.isComment)\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n var res = [];\n var i, c, lastIndex, last;\n for (i = 0; i < children.length; i++) {\n c = children[i];\n if (isUndef(c) || typeof c === 'boolean') { continue }\n lastIndex = res.length - 1;\n last = res[lastIndex];\n // nested\n if (Array.isArray(c)) {\n if (c.length > 0) {\n c = normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i));\n // merge adjacent text nodes\n if (isTextNode(c[0]) && isTextNode(last)) {\n res[lastIndex] = createTextVNode(last.text + (c[0]).text);\n c.shift();\n }\n res.push.apply(res, c);\n }\n } else if (isPrimitive(c)) {\n if (isTextNode(last)) {\n // merge adjacent text nodes\n // this is necessary for SSR hydration because text nodes are\n // essentially merged when rendered to HTML strings\n res[lastIndex] = createTextVNode(last.text + c);\n } else if (c !== '') {\n // convert primitive to vnode\n res.push(createTextVNode(c));\n }\n } else {\n if (isTextNode(c) && isTextNode(last)) {\n // merge adjacent text nodes\n res[lastIndex] = createTextVNode(last.text + c.text);\n } else {\n // default key for nested array children (likely generated by v-for)\n if (isTrue(children._isVList) &&\n isDef(c.tag) &&\n isUndef(c.key) &&\n isDef(nestedIndex)) {\n c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n }\n res.push(c);\n }\n }\n }\n return res\n}\n\n/* */\n\nfunction ensureCtor (comp, base) {\n if (\n comp.__esModule ||\n (hasSymbol && comp[Symbol.toStringTag] === 'Module')\n ) {\n comp = comp.default;\n }\n return isObject(comp)\n ? base.extend(comp)\n : comp\n}\n\nfunction createAsyncPlaceholder (\n factory,\n data,\n context,\n children,\n tag\n) {\n var node = createEmptyVNode();\n node.asyncFactory = factory;\n node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n return node\n}\n\nfunction resolveAsyncComponent (\n factory,\n baseCtor,\n context\n) {\n if (isTrue(factory.error) && isDef(factory.errorComp)) {\n return factory.errorComp\n }\n\n if (isDef(factory.resolved)) {\n return factory.resolved\n }\n\n if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n return factory.loadingComp\n }\n\n if (isDef(factory.contexts)) {\n // already pending\n factory.contexts.push(context);\n } else {\n var contexts = factory.contexts = [context];\n var sync = true;\n\n var forceRender = function () {\n for (var i = 0, l = contexts.length; i < l; i++) {\n contexts[i].$forceUpdate();\n }\n };\n\n var resolve = once(function (res) {\n // cache resolved\n factory.resolved = ensureCtor(res, baseCtor);\n // invoke callbacks only if this is not a synchronous resolve\n // (async resolves are shimmed as synchronous during SSR)\n if (!sync) {\n forceRender();\n }\n });\n\n var reject = once(function (reason) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Failed to resolve async component: \" + (String(factory)) +\n (reason ? (\"\\nReason: \" + reason) : '')\n );\n if (isDef(factory.errorComp)) {\n factory.error = true;\n forceRender();\n }\n });\n\n var res = factory(resolve, reject);\n\n if (isObject(res)) {\n if (typeof res.then === 'function') {\n // () => Promise\n if (isUndef(factory.resolved)) {\n res.then(resolve, reject);\n }\n } else if (isDef(res.component) && typeof res.component.then === 'function') {\n res.component.then(resolve, reject);\n\n if (isDef(res.error)) {\n factory.errorComp = ensureCtor(res.error, baseCtor);\n }\n\n if (isDef(res.loading)) {\n factory.loadingComp = ensureCtor(res.loading, baseCtor);\n if (res.delay === 0) {\n factory.loading = true;\n } else {\n setTimeout(function () {\n if (isUndef(factory.resolved) && isUndef(factory.error)) {\n factory.loading = true;\n forceRender();\n }\n }, res.delay || 200);\n }\n }\n\n if (isDef(res.timeout)) {\n setTimeout(function () {\n if (isUndef(factory.resolved)) {\n reject(\n process.env.NODE_ENV !== 'production'\n ? (\"timeout (\" + (res.timeout) + \"ms)\")\n : null\n );\n }\n }, res.timeout);\n }\n }\n }\n\n sync = false;\n // return in case resolved synchronously\n return factory.loading\n ? factory.loadingComp\n : factory.resolved\n }\n}\n\n/* */\n\nfunction isAsyncPlaceholder (node) {\n return node.isComment && node.asyncFactory\n}\n\n/* */\n\nfunction getFirstComponentChild (children) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n var c = children[i];\n if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n return c\n }\n }\n }\n}\n\n/* */\n\n/* */\n\nfunction initEvents (vm) {\n vm._events = Object.create(null);\n vm._hasHookEvent = false;\n // init parent attached events\n var listeners = vm.$options._parentListeners;\n if (listeners) {\n updateComponentListeners(vm, listeners);\n }\n}\n\nvar target;\n\nfunction add (event, fn, once) {\n if (once) {\n target.$once(event, fn);\n } else {\n target.$on(event, fn);\n }\n}\n\nfunction remove$1 (event, fn) {\n target.$off(event, fn);\n}\n\nfunction updateComponentListeners (\n vm,\n listeners,\n oldListeners\n) {\n target = vm;\n updateListeners(listeners, oldListeners || {}, add, remove$1, vm);\n target = undefined;\n}\n\nfunction eventsMixin (Vue) {\n var hookRE = /^hook:/;\n Vue.prototype.$on = function (event, fn) {\n var this$1 = this;\n\n var vm = this;\n if (Array.isArray(event)) {\n for (var i = 0, l = event.length; i < l; i++) {\n this$1.$on(event[i], fn);\n }\n } else {\n (vm._events[event] || (vm._events[event] = [])).push(fn);\n // optimize hook:event cost by using a boolean flag marked at registration\n // instead of a hash lookup\n if (hookRE.test(event)) {\n vm._hasHookEvent = true;\n }\n }\n return vm\n };\n\n Vue.prototype.$once = function (event, fn) {\n var vm = this;\n function on () {\n vm.$off(event, on);\n fn.apply(vm, arguments);\n }\n on.fn = fn;\n vm.$on(event, on);\n return vm\n };\n\n Vue.prototype.$off = function (event, fn) {\n var this$1 = this;\n\n var vm = this;\n // all\n if (!arguments.length) {\n vm._events = Object.create(null);\n return vm\n }\n // array of events\n if (Array.isArray(event)) {\n for (var i = 0, l = event.length; i < l; i++) {\n this$1.$off(event[i], fn);\n }\n return vm\n }\n // specific event\n var cbs = vm._events[event];\n if (!cbs) {\n return vm\n }\n if (!fn) {\n vm._events[event] = null;\n return vm\n }\n if (fn) {\n // specific handler\n var cb;\n var i$1 = cbs.length;\n while (i$1--) {\n cb = cbs[i$1];\n if (cb === fn || cb.fn === fn) {\n cbs.splice(i$1, 1);\n break\n }\n }\n }\n return vm\n };\n\n Vue.prototype.$emit = function (event) {\n var vm = this;\n if (process.env.NODE_ENV !== 'production') {\n var lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n tip(\n \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and you cannot use \" +\n \"v-on to listen to camelCase events when using in-DOM templates. \" +\n \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n );\n }\n }\n var cbs = vm._events[event];\n if (cbs) {\n cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n var args = toArray(arguments, 1);\n for (var i = 0, l = cbs.length; i < l; i++) {\n try {\n cbs[i].apply(vm, args);\n } catch (e) {\n handleError(e, vm, (\"event handler for \\\"\" + event + \"\\\"\"));\n }\n }\n }\n return vm\n };\n}\n\n/* */\n\n\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n children,\n context\n) {\n var slots = {};\n if (!children) {\n return slots\n }\n for (var i = 0, l = children.length; i < l; i++) {\n var child = children[i];\n var data = child.data;\n // remove slot attribute if the node is resolved as a Vue slot node\n if (data && data.attrs && data.attrs.slot) {\n delete data.attrs.slot;\n }\n // named slots should only be respected if the vnode was rendered in the\n // same context.\n if ((child.context === context || child.fnContext === context) &&\n data && data.slot != null\n ) {\n var name = data.slot;\n var slot = (slots[name] || (slots[name] = []));\n if (child.tag === 'template') {\n slot.push.apply(slot, child.children || []);\n } else {\n slot.push(child);\n }\n } else {\n (slots.default || (slots.default = [])).push(child);\n }\n }\n // ignore slots that contains only whitespace\n for (var name$1 in slots) {\n if (slots[name$1].every(isWhitespace)) {\n delete slots[name$1];\n }\n }\n return slots\n}\n\nfunction isWhitespace (node) {\n return (node.isComment && !node.asyncFactory) || node.text === ' '\n}\n\nfunction resolveScopedSlots (\n fns, // see flow/vnode\n res\n) {\n res = res || {};\n for (var i = 0; i < fns.length; i++) {\n if (Array.isArray(fns[i])) {\n resolveScopedSlots(fns[i], res);\n } else {\n res[fns[i].key] = fns[i].fn;\n }\n }\n return res\n}\n\n/* */\n\nvar activeInstance = null;\nvar isUpdatingChildComponent = false;\n\nfunction initLifecycle (vm) {\n var options = vm.$options;\n\n // locate first non-abstract parent\n var parent = options.parent;\n if (parent && !options.abstract) {\n while (parent.$options.abstract && parent.$parent) {\n parent = parent.$parent;\n }\n parent.$children.push(vm);\n }\n\n vm.$parent = parent;\n vm.$root = parent ? parent.$root : vm;\n\n vm.$children = [];\n vm.$refs = {};\n\n vm._watcher = null;\n vm._inactive = null;\n vm._directInactive = false;\n vm._isMounted = false;\n vm._isDestroyed = false;\n vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n Vue.prototype._update = function (vnode, hydrating) {\n var vm = this;\n if (vm._isMounted) {\n callHook(vm, 'beforeUpdate');\n }\n var prevEl = vm.$el;\n var prevVnode = vm._vnode;\n var prevActiveInstance = activeInstance;\n activeInstance = vm;\n vm._vnode = vnode;\n // Vue.prototype.__patch__ is injected in entry points\n // based on the rendering backend used.\n if (!prevVnode) {\n // initial render\n vm.$el = vm.__patch__(\n vm.$el, vnode, hydrating, false /* removeOnly */,\n vm.$options._parentElm,\n vm.$options._refElm\n );\n // no need for the ref nodes after initial patch\n // this prevents keeping a detached DOM tree in memory (#5851)\n vm.$options._parentElm = vm.$options._refElm = null;\n } else {\n // updates\n vm.$el = vm.__patch__(prevVnode, vnode);\n }\n activeInstance = prevActiveInstance;\n // update __vue__ reference\n if (prevEl) {\n prevEl.__vue__ = null;\n }\n if (vm.$el) {\n vm.$el.__vue__ = vm;\n }\n // if parent is an HOC, update its $el as well\n if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n vm.$parent.$el = vm.$el;\n }\n // updated hook is called by the scheduler to ensure that children are\n // updated in a parent's updated hook.\n };\n\n Vue.prototype.$forceUpdate = function () {\n var vm = this;\n if (vm._watcher) {\n vm._watcher.update();\n }\n };\n\n Vue.prototype.$destroy = function () {\n var vm = this;\n if (vm._isBeingDestroyed) {\n return\n }\n callHook(vm, 'beforeDestroy');\n vm._isBeingDestroyed = true;\n // remove self from parent\n var parent = vm.$parent;\n if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n remove(parent.$children, vm);\n }\n // teardown watchers\n if (vm._watcher) {\n vm._watcher.teardown();\n }\n var i = vm._watchers.length;\n while (i--) {\n vm._watchers[i].teardown();\n }\n // remove reference from data ob\n // frozen object may not have observer.\n if (vm._data.__ob__) {\n vm._data.__ob__.vmCount--;\n }\n // call the last hook...\n vm._isDestroyed = true;\n // invoke destroy hooks on current rendered tree\n vm.__patch__(vm._vnode, null);\n // fire destroyed hook\n callHook(vm, 'destroyed');\n // turn off all instance listeners.\n vm.$off();\n // remove __vue__ reference\n if (vm.$el) {\n vm.$el.__vue__ = null;\n }\n // release circular reference (#6759)\n if (vm.$vnode) {\n vm.$vnode.parent = null;\n }\n };\n}\n\nfunction mountComponent (\n vm,\n el,\n hydrating\n) {\n vm.$el = el;\n if (!vm.$options.render) {\n vm.$options.render = createEmptyVNode;\n if (process.env.NODE_ENV !== 'production') {\n /* istanbul ignore if */\n if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n vm.$options.el || el) {\n warn(\n 'You are using the runtime-only build of Vue where the template ' +\n 'compiler is not available. Either pre-compile the templates into ' +\n 'render functions, or use the compiler-included build.',\n vm\n );\n } else {\n warn(\n 'Failed to mount component: template or render function not defined.',\n vm\n );\n }\n }\n }\n callHook(vm, 'beforeMount');\n\n var updateComponent;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n updateComponent = function () {\n var name = vm._name;\n var id = vm._uid;\n var startTag = \"vue-perf-start:\" + id;\n var endTag = \"vue-perf-end:\" + id;\n\n mark(startTag);\n var vnode = vm._render();\n mark(endTag);\n measure((\"vue \" + name + \" render\"), startTag, endTag);\n\n mark(startTag);\n vm._update(vnode, hydrating);\n mark(endTag);\n measure((\"vue \" + name + \" patch\"), startTag, endTag);\n };\n } else {\n updateComponent = function () {\n vm._update(vm._render(), hydrating);\n };\n }\n\n // we set this to vm._watcher inside the watcher's constructor\n // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n // component's mounted hook), which relies on vm._watcher being already defined\n new Watcher(vm, updateComponent, noop, null, true /* isRenderWatcher */);\n hydrating = false;\n\n // manually mounted instance, call mounted on self\n // mounted is called for render-created child components in its inserted hook\n if (vm.$vnode == null) {\n vm._isMounted = true;\n callHook(vm, 'mounted');\n }\n return vm\n}\n\nfunction updateChildComponent (\n vm,\n propsData,\n listeners,\n parentVnode,\n renderChildren\n) {\n if (process.env.NODE_ENV !== 'production') {\n isUpdatingChildComponent = true;\n }\n\n // determine whether component has slot children\n // we need to do this before overwriting $options._renderChildren\n var hasChildren = !!(\n renderChildren || // has new static slots\n vm.$options._renderChildren || // has old static slots\n parentVnode.data.scopedSlots || // has new scoped slots\n vm.$scopedSlots !== emptyObject // has old scoped slots\n );\n\n vm.$options._parentVnode = parentVnode;\n vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n\n if (vm._vnode) { // update child tree's parent\n vm._vnode.parent = parentVnode;\n }\n vm.$options._renderChildren = renderChildren;\n\n // update $attrs and $listeners hash\n // these are also reactive so they may trigger child update if the child\n // used them during render\n vm.$attrs = parentVnode.data.attrs || emptyObject;\n vm.$listeners = listeners || emptyObject;\n\n // update props\n if (propsData && vm.$options.props) {\n toggleObserving(false);\n var props = vm._props;\n var propKeys = vm.$options._propKeys || [];\n for (var i = 0; i < propKeys.length; i++) {\n var key = propKeys[i];\n var propOptions = vm.$options.props; // wtf flow?\n props[key] = validateProp(key, propOptions, propsData, vm);\n }\n toggleObserving(true);\n // keep a copy of raw propsData\n vm.$options.propsData = propsData;\n }\n\n // update listeners\n listeners = listeners || emptyObject;\n var oldListeners = vm.$options._parentListeners;\n vm.$options._parentListeners = listeners;\n updateComponentListeners(vm, listeners, oldListeners);\n\n // resolve slots + force update if has children\n if (hasChildren) {\n vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n vm.$forceUpdate();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n isUpdatingChildComponent = false;\n }\n}\n\nfunction isInInactiveTree (vm) {\n while (vm && (vm = vm.$parent)) {\n if (vm._inactive) { return true }\n }\n return false\n}\n\nfunction activateChildComponent (vm, direct) {\n if (direct) {\n vm._directInactive = false;\n if (isInInactiveTree(vm)) {\n return\n }\n } else if (vm._directInactive) {\n return\n }\n if (vm._inactive || vm._inactive === null) {\n vm._inactive = false;\n for (var i = 0; i < vm.$children.length; i++) {\n activateChildComponent(vm.$children[i]);\n }\n callHook(vm, 'activated');\n }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n if (direct) {\n vm._directInactive = true;\n if (isInInactiveTree(vm)) {\n return\n }\n }\n if (!vm._inactive) {\n vm._inactive = true;\n for (var i = 0; i < vm.$children.length; i++) {\n deactivateChildComponent(vm.$children[i]);\n }\n callHook(vm, 'deactivated');\n }\n}\n\nfunction callHook (vm, hook) {\n // #7573 disable dep collection when invoking lifecycle hooks\n pushTarget();\n var handlers = vm.$options[hook];\n if (handlers) {\n for (var i = 0, j = handlers.length; i < j; i++) {\n try {\n handlers[i].call(vm);\n } catch (e) {\n handleError(e, vm, (hook + \" hook\"));\n }\n }\n }\n if (vm._hasHookEvent) {\n vm.$emit('hook:' + hook);\n }\n popTarget();\n}\n\n/* */\n\n\nvar MAX_UPDATE_COUNT = 100;\n\nvar queue = [];\nvar activatedChildren = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n flushing = true;\n var watcher, id;\n\n // Sort queue before flush.\n // This ensures that:\n // 1. Components are updated from parent to child. (because parent is always\n // created before the child)\n // 2. A component's user watchers are run before its render watcher (because\n // user watchers are created before the render watcher)\n // 3. If a component is destroyed during a parent component's watcher run,\n // its watchers can be skipped.\n queue.sort(function (a, b) { return a.id - b.id; });\n\n // do not cache length because more watchers might be pushed\n // as we run existing watchers\n for (index = 0; index < queue.length; index++) {\n watcher = queue[index];\n id = watcher.id;\n has[id] = null;\n watcher.run();\n // in dev build, check and stop circular updates.\n if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n circular[id] = (circular[id] || 0) + 1;\n if (circular[id] > MAX_UPDATE_COUNT) {\n warn(\n 'You may have an infinite update loop ' + (\n watcher.user\n ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n : \"in a component render function.\"\n ),\n watcher.vm\n );\n break\n }\n }\n }\n\n // keep copies of post queues before resetting state\n var activatedQueue = activatedChildren.slice();\n var updatedQueue = queue.slice();\n\n resetSchedulerState();\n\n // call component updated and activated hooks\n callActivatedHooks(activatedQueue);\n callUpdatedHooks(updatedQueue);\n\n // devtool hook\n /* istanbul ignore if */\n if (devtools && config.devtools) {\n devtools.emit('flush');\n }\n}\n\nfunction callUpdatedHooks (queue) {\n var i = queue.length;\n while (i--) {\n var watcher = queue[i];\n var vm = watcher.vm;\n if (vm._watcher === watcher && vm._isMounted) {\n callHook(vm, 'updated');\n }\n }\n}\n\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent (vm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n vm._inactive = false;\n activatedChildren.push(vm);\n}\n\nfunction callActivatedHooks (queue) {\n for (var i = 0; i < queue.length; i++) {\n queue[i]._inactive = true;\n activateChildComponent(queue[i], true /* true */);\n }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}\n\n/* */\n\nvar uid$1 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n vm,\n expOrFn,\n cb,\n options,\n isRenderWatcher\n) {\n this.vm = vm;\n if (isRenderWatcher) {\n vm._watcher = this;\n }\n vm._watchers.push(this);\n // options\n if (options) {\n this.deep = !!options.deep;\n this.user = !!options.user;\n this.lazy = !!options.lazy;\n this.sync = !!options.sync;\n } else {\n this.deep = this.user = this.lazy = this.sync = false;\n }\n this.cb = cb;\n this.id = ++uid$1; // uid for batching\n this.active = true;\n this.dirty = this.lazy; // for lazy watchers\n this.deps = [];\n this.newDeps = [];\n this.depIds = new _Set();\n this.newDepIds = new _Set();\n this.expression = process.env.NODE_ENV !== 'production'\n ? expOrFn.toString()\n : '';\n // parse expression for getter\n if (typeof expOrFn === 'function') {\n this.getter = expOrFn;\n } else {\n this.getter = parsePath(expOrFn);\n if (!this.getter) {\n this.getter = function () {};\n process.env.NODE_ENV !== 'production' && warn(\n \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n 'Watcher only accepts simple dot-delimited paths. ' +\n 'For full control, use a function instead.',\n vm\n );\n }\n }\n this.value = this.lazy\n ? undefined\n : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n pushTarget(this);\n var value;\n var vm = this.vm;\n try {\n value = this.getter.call(vm, vm);\n } catch (e) {\n if (this.user) {\n handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n } else {\n throw e\n }\n } finally {\n // \"touch\" every property so they are all tracked as\n // dependencies for deep watching\n if (this.deep) {\n traverse(value);\n }\n popTarget();\n this.cleanupDeps();\n }\n return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n var id = dep.id;\n if (!this.newDepIds.has(id)) {\n this.newDepIds.add(id);\n this.newDeps.push(dep);\n if (!this.depIds.has(id)) {\n dep.addSub(this);\n }\n }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n var this$1 = this;\n\n var i = this.deps.length;\n while (i--) {\n var dep = this$1.deps[i];\n if (!this$1.newDepIds.has(dep.id)) {\n dep.removeSub(this$1);\n }\n }\n var tmp = this.depIds;\n this.depIds = this.newDepIds;\n this.newDepIds = tmp;\n this.newDepIds.clear();\n tmp = this.deps;\n this.deps = this.newDeps;\n this.newDeps = tmp;\n this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n /* istanbul ignore else */\n if (this.lazy) {\n this.dirty = true;\n } else if (this.sync) {\n this.run();\n } else {\n queueWatcher(this);\n }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n if (this.active) {\n var value = this.get();\n if (\n value !== this.value ||\n // Deep watchers and watchers on Object/Arrays should fire even\n // when the value is the same, because the value may\n // have mutated.\n isObject(value) ||\n this.deep\n ) {\n // set new value\n var oldValue = this.value;\n this.value = value;\n if (this.user) {\n try {\n this.cb.call(this.vm, value, oldValue);\n } catch (e) {\n handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n }\n } else {\n this.cb.call(this.vm, value, oldValue);\n }\n }\n }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n this.value = this.get();\n this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n var this$1 = this;\n\n var i = this.deps.length;\n while (i--) {\n this$1.deps[i].depend();\n }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n var this$1 = this;\n\n if (this.active) {\n // remove self from vm's watcher list\n // this is a somewhat expensive operation so we skip it\n // if the vm is being destroyed.\n if (!this.vm._isBeingDestroyed) {\n remove(this.vm._watchers, this);\n }\n var i = this.deps.length;\n while (i--) {\n this$1.deps[i].removeSub(this$1);\n }\n this.active = false;\n }\n};\n\n/* */\n\nvar sharedPropertyDefinition = {\n enumerable: true,\n configurable: true,\n get: noop,\n set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n sharedPropertyDefinition.get = function proxyGetter () {\n return this[sourceKey][key]\n };\n sharedPropertyDefinition.set = function proxySetter (val) {\n this[sourceKey][key] = val;\n };\n Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n vm._watchers = [];\n var opts = vm.$options;\n if (opts.props) { initProps(vm, opts.props); }\n if (opts.methods) { initMethods(vm, opts.methods); }\n if (opts.data) {\n initData(vm);\n } else {\n observe(vm._data = {}, true /* asRootData */);\n }\n if (opts.computed) { initComputed(vm, opts.computed); }\n if (opts.watch && opts.watch !== nativeWatch) {\n initWatch(vm, opts.watch);\n }\n}\n\nfunction initProps (vm, propsOptions) {\n var propsData = vm.$options.propsData || {};\n var props = vm._props = {};\n // cache prop keys so that future props updates can iterate using Array\n // instead of dynamic object key enumeration.\n var keys = vm.$options._propKeys = [];\n var isRoot = !vm.$parent;\n // root instance props should be converted\n if (!isRoot) {\n toggleObserving(false);\n }\n var loop = function ( key ) {\n keys.push(key);\n var value = validateProp(key, propsOptions, propsData, vm);\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n var hyphenatedKey = hyphenate(key);\n if (isReservedAttribute(hyphenatedKey) ||\n config.isReservedAttr(hyphenatedKey)) {\n warn(\n (\"\\\"\" + hyphenatedKey + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n vm\n );\n }\n defineReactive(props, key, value, function () {\n if (vm.$parent && !isUpdatingChildComponent) {\n warn(\n \"Avoid mutating a prop directly since the value will be \" +\n \"overwritten whenever the parent component re-renders. \" +\n \"Instead, use a data or computed property based on the prop's \" +\n \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n vm\n );\n }\n });\n } else {\n defineReactive(props, key, value);\n }\n // static props are already proxied on the component's prototype\n // during Vue.extend(). We only need to proxy props defined at\n // instantiation here.\n if (!(key in vm)) {\n proxy(vm, \"_props\", key);\n }\n };\n\n for (var key in propsOptions) loop( key );\n toggleObserving(true);\n}\n\nfunction initData (vm) {\n var data = vm.$options.data;\n data = vm._data = typeof data === 'function'\n ? getData(data, vm)\n : data || {};\n if (!isPlainObject(data)) {\n data = {};\n process.env.NODE_ENV !== 'production' && warn(\n 'data functions should return an object:\\n' +\n 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n vm\n );\n }\n // proxy data on instance\n var keys = Object.keys(data);\n var props = vm.$options.props;\n var methods = vm.$options.methods;\n var i = keys.length;\n while (i--) {\n var key = keys[i];\n if (process.env.NODE_ENV !== 'production') {\n if (methods && hasOwn(methods, key)) {\n warn(\n (\"Method \\\"\" + key + \"\\\" has already been defined as a data property.\"),\n vm\n );\n }\n }\n if (props && hasOwn(props, key)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"The data property \\\"\" + key + \"\\\" is already declared as a prop. \" +\n \"Use prop default value instead.\",\n vm\n );\n } else if (!isReserved(key)) {\n proxy(vm, \"_data\", key);\n }\n }\n // observe data\n observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n // #7573 disable dep collection when invoking data getters\n pushTarget();\n try {\n return data.call(vm, vm)\n } catch (e) {\n handleError(e, vm, \"data()\");\n return {}\n } finally {\n popTarget();\n }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n // $flow-disable-line\n var watchers = vm._computedWatchers = Object.create(null);\n // computed properties are just getters during SSR\n var isSSR = isServerRendering();\n\n for (var key in computed) {\n var userDef = computed[key];\n var getter = typeof userDef === 'function' ? userDef : userDef.get;\n if (process.env.NODE_ENV !== 'production' && getter == null) {\n warn(\n (\"Getter is missing for computed property \\\"\" + key + \"\\\".\"),\n vm\n );\n }\n\n if (!isSSR) {\n // create internal watcher for the computed property.\n watchers[key] = new Watcher(\n vm,\n getter || noop,\n noop,\n computedWatcherOptions\n );\n }\n\n // component-defined computed properties are already defined on the\n // component prototype. We only need to define computed properties defined\n // at instantiation here.\n if (!(key in vm)) {\n defineComputed(vm, key, userDef);\n } else if (process.env.NODE_ENV !== 'production') {\n if (key in vm.$data) {\n warn((\"The computed property \\\"\" + key + \"\\\" is already defined in data.\"), vm);\n } else if (vm.$options.props && key in vm.$options.props) {\n warn((\"The computed property \\\"\" + key + \"\\\" is already defined as a prop.\"), vm);\n }\n }\n }\n}\n\nfunction defineComputed (\n target,\n key,\n userDef\n) {\n var shouldCache = !isServerRendering();\n if (typeof userDef === 'function') {\n sharedPropertyDefinition.get = shouldCache\n ? createComputedGetter(key)\n : userDef;\n sharedPropertyDefinition.set = noop;\n } else {\n sharedPropertyDefinition.get = userDef.get\n ? shouldCache && userDef.cache !== false\n ? createComputedGetter(key)\n : userDef.get\n : noop;\n sharedPropertyDefinition.set = userDef.set\n ? userDef.set\n : noop;\n }\n if (process.env.NODE_ENV !== 'production' &&\n sharedPropertyDefinition.set === noop) {\n sharedPropertyDefinition.set = function () {\n warn(\n (\"Computed property \\\"\" + key + \"\\\" was assigned to but it has no setter.\"),\n this\n );\n };\n }\n Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n return function computedGetter () {\n var watcher = this._computedWatchers && this._computedWatchers[key];\n if (watcher) {\n if (watcher.dirty) {\n watcher.evaluate();\n }\n if (Dep.target) {\n watcher.depend();\n }\n return watcher.value\n }\n }\n}\n\nfunction initMethods (vm, methods) {\n var props = vm.$options.props;\n for (var key in methods) {\n if (process.env.NODE_ENV !== 'production') {\n if (methods[key] == null) {\n warn(\n \"Method \\\"\" + key + \"\\\" has an undefined value in the component definition. \" +\n \"Did you reference the function correctly?\",\n vm\n );\n }\n if (props && hasOwn(props, key)) {\n warn(\n (\"Method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n vm\n );\n }\n if ((key in vm) && isReserved(key)) {\n warn(\n \"Method \\\"\" + key + \"\\\" conflicts with an existing Vue instance method. \" +\n \"Avoid defining component methods that start with _ or $.\"\n );\n }\n }\n vm[key] = methods[key] == null ? noop : bind(methods[key], vm);\n }\n}\n\nfunction initWatch (vm, watch) {\n for (var key in watch) {\n var handler = watch[key];\n if (Array.isArray(handler)) {\n for (var i = 0; i < handler.length; i++) {\n createWatcher(vm, key, handler[i]);\n }\n } else {\n createWatcher(vm, key, handler);\n }\n }\n}\n\nfunction createWatcher (\n vm,\n expOrFn,\n handler,\n options\n) {\n if (isPlainObject(handler)) {\n options = handler;\n handler = handler.handler;\n }\n if (typeof handler === 'string') {\n handler = vm[handler];\n }\n return vm.$watch(expOrFn, handler, options)\n}\n\nfunction stateMixin (Vue) {\n // flow somehow has problems with directly declared definition object\n // when using Object.defineProperty, so we have to procedurally build up\n // the object here.\n var dataDef = {};\n dataDef.get = function () { return this._data };\n var propsDef = {};\n propsDef.get = function () { return this._props };\n if (process.env.NODE_ENV !== 'production') {\n dataDef.set = function (newData) {\n warn(\n 'Avoid replacing instance root $data. ' +\n 'Use nested data properties instead.',\n this\n );\n };\n propsDef.set = function () {\n warn(\"$props is readonly.\", this);\n };\n }\n Object.defineProperty(Vue.prototype, '$data', dataDef);\n Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n Vue.prototype.$set = set;\n Vue.prototype.$delete = del;\n\n Vue.prototype.$watch = function (\n expOrFn,\n cb,\n options\n ) {\n var vm = this;\n if (isPlainObject(cb)) {\n return createWatcher(vm, expOrFn, cb, options)\n }\n options = options || {};\n options.user = true;\n var watcher = new Watcher(vm, expOrFn, cb, options);\n if (options.immediate) {\n cb.call(vm, watcher.value);\n }\n return function unwatchFn () {\n watcher.teardown();\n }\n };\n}\n\n/* */\n\nfunction initProvide (vm) {\n var provide = vm.$options.provide;\n if (provide) {\n vm._provided = typeof provide === 'function'\n ? provide.call(vm)\n : provide;\n }\n}\n\nfunction initInjections (vm) {\n var result = resolveInject(vm.$options.inject, vm);\n if (result) {\n toggleObserving(false);\n Object.keys(result).forEach(function (key) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n defineReactive(vm, key, result[key], function () {\n warn(\n \"Avoid mutating an injected value directly since the changes will be \" +\n \"overwritten whenever the provided component re-renders. \" +\n \"injection being mutated: \\\"\" + key + \"\\\"\",\n vm\n );\n });\n } else {\n defineReactive(vm, key, result[key]);\n }\n });\n toggleObserving(true);\n }\n}\n\nfunction resolveInject (inject, vm) {\n if (inject) {\n // inject is :any because flow is not smart enough to figure out cached\n var result = Object.create(null);\n var keys = hasSymbol\n ? Reflect.ownKeys(inject).filter(function (key) {\n /* istanbul ignore next */\n return Object.getOwnPropertyDescriptor(inject, key).enumerable\n })\n : Object.keys(inject);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var provideKey = inject[key].from;\n var source = vm;\n while (source) {\n if (source._provided && hasOwn(source._provided, provideKey)) {\n result[key] = source._provided[provideKey];\n break\n }\n source = source.$parent;\n }\n if (!source) {\n if ('default' in inject[key]) {\n var provideDefault = inject[key].default;\n result[key] = typeof provideDefault === 'function'\n ? provideDefault.call(vm)\n : provideDefault;\n } else if (process.env.NODE_ENV !== 'production') {\n warn((\"Injection \\\"\" + key + \"\\\" not found\"), vm);\n }\n }\n }\n return result\n }\n}\n\n/* */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n val,\n render\n) {\n var ret, i, l, keys, key;\n if (Array.isArray(val) || typeof val === 'string') {\n ret = new Array(val.length);\n for (i = 0, l = val.length; i < l; i++) {\n ret[i] = render(val[i], i);\n }\n } else if (typeof val === 'number') {\n ret = new Array(val);\n for (i = 0; i < val; i++) {\n ret[i] = render(i + 1, i);\n }\n } else if (isObject(val)) {\n keys = Object.keys(val);\n ret = new Array(keys.length);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n ret[i] = render(val[key], key, i);\n }\n }\n if (isDef(ret)) {\n (ret)._isVList = true;\n }\n return ret\n}\n\n/* */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n name,\n fallback,\n props,\n bindObject\n) {\n var scopedSlotFn = this.$scopedSlots[name];\n var nodes;\n if (scopedSlotFn) { // scoped slot\n props = props || {};\n if (bindObject) {\n if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {\n warn(\n 'slot v-bind without argument expects an Object',\n this\n );\n }\n props = extend(extend({}, bindObject), props);\n }\n nodes = scopedSlotFn(props) || fallback;\n } else {\n var slotNodes = this.$slots[name];\n // warn duplicate slot usage\n if (slotNodes) {\n if (process.env.NODE_ENV !== 'production' && slotNodes._rendered) {\n warn(\n \"Duplicate presence of slot \\\"\" + name + \"\\\" found in the same render tree \" +\n \"- this will likely cause render errors.\",\n this\n );\n }\n slotNodes._rendered = true;\n }\n nodes = slotNodes || fallback;\n }\n\n var target = props && props.slot;\n if (target) {\n return this.$createElement('template', { slot: target }, nodes)\n } else {\n return nodes\n }\n}\n\n/* */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/* */\n\nfunction isKeyNotMatch (expect, actual) {\n if (Array.isArray(expect)) {\n return expect.indexOf(actual) === -1\n } else {\n return expect !== actual\n }\n}\n\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes (\n eventKeyCode,\n key,\n builtInKeyCode,\n eventKeyName,\n builtInKeyName\n) {\n var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n return isKeyNotMatch(builtInKeyName, eventKeyName)\n } else if (mappedKeyCode) {\n return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n } else if (eventKeyName) {\n return hyphenate(eventKeyName) !== key\n }\n}\n\n/* */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n data,\n tag,\n value,\n asProp,\n isSync\n) {\n if (value) {\n if (!isObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-bind without argument expects an Object or Array value',\n this\n );\n } else {\n if (Array.isArray(value)) {\n value = toObject(value);\n }\n var hash;\n var loop = function ( key ) {\n if (\n key === 'class' ||\n key === 'style' ||\n isReservedAttribute(key)\n ) {\n hash = data;\n } else {\n var type = data.attrs && data.attrs.type;\n hash = asProp || config.mustUseProp(tag, type, key)\n ? data.domProps || (data.domProps = {})\n : data.attrs || (data.attrs = {});\n }\n if (!(key in hash)) {\n hash[key] = value[key];\n\n if (isSync) {\n var on = data.on || (data.on = {});\n on[(\"update:\" + key)] = function ($event) {\n value[key] = $event;\n };\n }\n }\n };\n\n for (var key in value) loop( key );\n }\n }\n return data\n}\n\n/* */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n index,\n isInFor\n) {\n var cached = this._staticTrees || (this._staticTrees = []);\n var tree = cached[index];\n // if has already-rendered static tree and not inside v-for,\n // we can reuse the same tree.\n if (tree && !isInFor) {\n return tree\n }\n // otherwise, render a fresh tree.\n tree = cached[index] = this.$options.staticRenderFns[index].call(\n this._renderProxy,\n null,\n this // for render fns generated for functional component templates\n );\n markStatic(tree, (\"__static__\" + index), false);\n return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n tree,\n index,\n key\n) {\n markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n return tree\n}\n\nfunction markStatic (\n tree,\n key,\n isOnce\n) {\n if (Array.isArray(tree)) {\n for (var i = 0; i < tree.length; i++) {\n if (tree[i] && typeof tree[i] !== 'string') {\n markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n }\n }\n } else {\n markStaticNode(tree, key, isOnce);\n }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n node.isStatic = true;\n node.key = key;\n node.isOnce = isOnce;\n}\n\n/* */\n\nfunction bindObjectListeners (data, value) {\n if (value) {\n if (!isPlainObject(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'v-on without argument expects an Object value',\n this\n );\n } else {\n var on = data.on = data.on ? extend({}, data.on) : {};\n for (var key in value) {\n var existing = on[key];\n var ours = value[key];\n on[key] = existing ? [].concat(existing, ours) : ours;\n }\n }\n }\n return data\n}\n\n/* */\n\nfunction installRenderHelpers (target) {\n target._o = markOnce;\n target._n = toNumber;\n target._s = toString;\n target._l = renderList;\n target._t = renderSlot;\n target._q = looseEqual;\n target._i = looseIndexOf;\n target._m = renderStatic;\n target._f = resolveFilter;\n target._k = checkKeyCodes;\n target._b = bindObjectProps;\n target._v = createTextVNode;\n target._e = createEmptyVNode;\n target._u = resolveScopedSlots;\n target._g = bindObjectListeners;\n}\n\n/* */\n\nfunction FunctionalRenderContext (\n data,\n props,\n children,\n parent,\n Ctor\n) {\n var options = Ctor.options;\n // ensure the createElement function in functional components\n // gets a unique context - this is necessary for correct named slot check\n var contextVm;\n if (hasOwn(parent, '_uid')) {\n contextVm = Object.create(parent);\n // $flow-disable-line\n contextVm._original = parent;\n } else {\n // the context vm passed in is a functional context as well.\n // in this case we want to make sure we are able to get a hold to the\n // real context instance.\n contextVm = parent;\n // $flow-disable-line\n parent = parent._original;\n }\n var isCompiled = isTrue(options._compiled);\n var needNormalization = !isCompiled;\n\n this.data = data;\n this.props = props;\n this.children = children;\n this.parent = parent;\n this.listeners = data.on || emptyObject;\n this.injections = resolveInject(options.inject, parent);\n this.slots = function () { return resolveSlots(children, parent); };\n\n // support for compiled functional template\n if (isCompiled) {\n // exposing $options for renderStatic()\n this.$options = options;\n // pre-resolve slots for renderSlot()\n this.$slots = this.slots();\n this.$scopedSlots = data.scopedSlots || emptyObject;\n }\n\n if (options._scopeId) {\n this._c = function (a, b, c, d) {\n var vnode = createElement(contextVm, a, b, c, d, needNormalization);\n if (vnode && !Array.isArray(vnode)) {\n vnode.fnScopeId = options._scopeId;\n vnode.fnContext = parent;\n }\n return vnode\n };\n } else {\n this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };\n }\n}\n\ninstallRenderHelpers(FunctionalRenderContext.prototype);\n\nfunction createFunctionalComponent (\n Ctor,\n propsData,\n data,\n contextVm,\n children\n) {\n var options = Ctor.options;\n var props = {};\n var propOptions = options.props;\n if (isDef(propOptions)) {\n for (var key in propOptions) {\n props[key] = validateProp(key, propOptions, propsData || emptyObject);\n }\n } else {\n if (isDef(data.attrs)) { mergeProps(props, data.attrs); }\n if (isDef(data.props)) { mergeProps(props, data.props); }\n }\n\n var renderContext = new FunctionalRenderContext(\n data,\n props,\n children,\n contextVm,\n Ctor\n );\n\n var vnode = options.render.call(null, renderContext._c, renderContext);\n\n if (vnode instanceof VNode) {\n return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options)\n } else if (Array.isArray(vnode)) {\n var vnodes = normalizeChildren(vnode) || [];\n var res = new Array(vnodes.length);\n for (var i = 0; i < vnodes.length; i++) {\n res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options);\n }\n return res\n }\n}\n\nfunction cloneAndMarkFunctionalResult (vnode, data, contextVm, options) {\n // #7817 clone node before setting fnContext, otherwise if the node is reused\n // (e.g. it was from a cached normal slot) the fnContext causes named slots\n // that should not be matched to match.\n var clone = cloneVNode(vnode);\n clone.fnContext = contextVm;\n clone.fnOptions = options;\n if (data.slot) {\n (clone.data || (clone.data = {})).slot = data.slot;\n }\n return clone\n}\n\nfunction mergeProps (to, from) {\n for (var key in from) {\n to[camelize(key)] = from[key];\n }\n}\n\n/* */\n\n\n\n\n// Register the component hook to weex native render engine.\n// The hook will be triggered by native, not javascript.\n\n\n// Updates the state of the component to weex native render engine.\n\n/* */\n\n// https://github.com/Hanks10100/weex-native-directive/tree/master/component\n\n// listening on native callback\n\n/* */\n\n/* */\n\n// inline hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n init: function init (\n vnode,\n hydrating,\n parentElm,\n refElm\n ) {\n if (\n vnode.componentInstance &&\n !vnode.componentInstance._isDestroyed &&\n vnode.data.keepAlive\n ) {\n // kept-alive components, treat as a patch\n var mountedNode = vnode; // work around flow\n componentVNodeHooks.prepatch(mountedNode, mountedNode);\n } else {\n var child = vnode.componentInstance = createComponentInstanceForVnode(\n vnode,\n activeInstance,\n parentElm,\n refElm\n );\n child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n }\n },\n\n prepatch: function prepatch (oldVnode, vnode) {\n var options = vnode.componentOptions;\n var child = vnode.componentInstance = oldVnode.componentInstance;\n updateChildComponent(\n child,\n options.propsData, // updated props\n options.listeners, // updated listeners\n vnode, // new parent vnode\n options.children // new children\n );\n },\n\n insert: function insert (vnode) {\n var context = vnode.context;\n var componentInstance = vnode.componentInstance;\n if (!componentInstance._isMounted) {\n componentInstance._isMounted = true;\n callHook(componentInstance, 'mounted');\n }\n if (vnode.data.keepAlive) {\n if (context._isMounted) {\n // vue-router#1212\n // During updates, a kept-alive component's child components may\n // change, so directly walking the tree here may call activated hooks\n // on incorrect children. Instead we push them into a queue which will\n // be processed after the whole patch process ended.\n queueActivatedComponent(componentInstance);\n } else {\n activateChildComponent(componentInstance, true /* direct */);\n }\n }\n },\n\n destroy: function destroy (vnode) {\n var componentInstance = vnode.componentInstance;\n if (!componentInstance._isDestroyed) {\n if (!vnode.data.keepAlive) {\n componentInstance.$destroy();\n } else {\n deactivateChildComponent(componentInstance, true /* direct */);\n }\n }\n }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n Ctor,\n data,\n context,\n children,\n tag\n) {\n if (isUndef(Ctor)) {\n return\n }\n\n var baseCtor = context.$options._base;\n\n // plain options object: turn it into a constructor\n if (isObject(Ctor)) {\n Ctor = baseCtor.extend(Ctor);\n }\n\n // if at this stage it's not a constructor or an async component factory,\n // reject.\n if (typeof Ctor !== 'function') {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n }\n return\n }\n\n // async component\n var asyncFactory;\n if (isUndef(Ctor.cid)) {\n asyncFactory = Ctor;\n Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context);\n if (Ctor === undefined) {\n // return a placeholder node for async component, which is rendered\n // as a comment node but preserves all the raw information for the node.\n // the information will be used for async server-rendering and hydration.\n return createAsyncPlaceholder(\n asyncFactory,\n data,\n context,\n children,\n tag\n )\n }\n }\n\n data = data || {};\n\n // resolve constructor options in case global mixins are applied after\n // component constructor creation\n resolveConstructorOptions(Ctor);\n\n // transform component v-model data into props & events\n if (isDef(data.model)) {\n transformModel(Ctor.options, data);\n }\n\n // extract props\n var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n\n // functional component\n if (isTrue(Ctor.options.functional)) {\n return createFunctionalComponent(Ctor, propsData, data, context, children)\n }\n\n // extract listeners, since these needs to be treated as\n // child component listeners instead of DOM listeners\n var listeners = data.on;\n // replace with listeners with .native modifier\n // so it gets processed during parent component patch.\n data.on = data.nativeOn;\n\n if (isTrue(Ctor.options.abstract)) {\n // abstract components do not keep anything\n // other than props & listeners & slot\n\n // work around flow\n var slot = data.slot;\n data = {};\n if (slot) {\n data.slot = slot;\n }\n }\n\n // install component management hooks onto the placeholder node\n installComponentHooks(data);\n\n // return a placeholder vnode\n var name = Ctor.options.name || tag;\n var vnode = new VNode(\n (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n data, undefined, undefined, undefined, context,\n { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },\n asyncFactory\n );\n\n // Weex specific: invoke recycle-list optimized @render function for\n // extracting cell-slot template.\n // https://github.com/Hanks10100/weex-native-directive/tree/master/component\n /* istanbul ignore if */\n return vnode\n}\n\nfunction createComponentInstanceForVnode (\n vnode, // we know it's MountedComponentVNode but flow doesn't\n parent, // activeInstance in lifecycle state\n parentElm,\n refElm\n) {\n var options = {\n _isComponent: true,\n parent: parent,\n _parentVnode: vnode,\n _parentElm: parentElm || null,\n _refElm: refElm || null\n };\n // check inline-template render functions\n var inlineTemplate = vnode.data.inlineTemplate;\n if (isDef(inlineTemplate)) {\n options.render = inlineTemplate.render;\n options.staticRenderFns = inlineTemplate.staticRenderFns;\n }\n return new vnode.componentOptions.Ctor(options)\n}\n\nfunction installComponentHooks (data) {\n var hooks = data.hook || (data.hook = {});\n for (var i = 0; i < hooksToMerge.length; i++) {\n var key = hooksToMerge[i];\n hooks[key] = componentVNodeHooks[key];\n }\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n var prop = (options.model && options.model.prop) || 'value';\n var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n var on = data.on || (data.on = {});\n if (isDef(on[event])) {\n on[event] = [data.model.callback].concat(on[event]);\n } else {\n on[event] = data.model.callback;\n }\n}\n\n/* */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n context,\n tag,\n data,\n children,\n normalizationType,\n alwaysNormalize\n) {\n if (Array.isArray(data) || isPrimitive(data)) {\n normalizationType = children;\n children = data;\n data = undefined;\n }\n if (isTrue(alwaysNormalize)) {\n normalizationType = ALWAYS_NORMALIZE;\n }\n return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n context,\n tag,\n data,\n children,\n normalizationType\n) {\n if (isDef(data) && isDef((data).__ob__)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n 'Always create fresh vnode data objects in each render!',\n context\n );\n return createEmptyVNode()\n }\n // object syntax in v-bind\n if (isDef(data) && isDef(data.is)) {\n tag = data.is;\n }\n if (!tag) {\n // in case of component :is set to falsy value\n return createEmptyVNode()\n }\n // warn against non-primitive key\n if (process.env.NODE_ENV !== 'production' &&\n isDef(data) && isDef(data.key) && !isPrimitive(data.key)\n ) {\n {\n warn(\n 'Avoid using non-primitive value as key, ' +\n 'use string/number value instead.',\n context\n );\n }\n }\n // support single function children as default scoped slot\n if (Array.isArray(children) &&\n typeof children[0] === 'function'\n ) {\n data = data || {};\n data.scopedSlots = { default: children[0] };\n children.length = 0;\n }\n if (normalizationType === ALWAYS_NORMALIZE) {\n children = normalizeChildren(children);\n } else if (normalizationType === SIMPLE_NORMALIZE) {\n children = simpleNormalizeChildren(children);\n }\n var vnode, ns;\n if (typeof tag === 'string') {\n var Ctor;\n ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n if (config.isReservedTag(tag)) {\n // platform built-in elements\n vnode = new VNode(\n config.parsePlatformTagName(tag), data, children,\n undefined, undefined, context\n );\n } else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {\n // component\n vnode = createComponent(Ctor, data, context, children, tag);\n } else {\n // unknown or unlisted namespaced elements\n // check at runtime because it may get assigned a namespace when its\n // parent normalizes children\n vnode = new VNode(\n tag, data, children,\n undefined, undefined, context\n );\n }\n } else {\n // direct component options / constructor\n vnode = createComponent(tag, data, context, children);\n }\n if (Array.isArray(vnode)) {\n return vnode\n } else if (isDef(vnode)) {\n if (isDef(ns)) { applyNS(vnode, ns); }\n if (isDef(data)) { registerDeepBindings(data); }\n return vnode\n } else {\n return createEmptyVNode()\n }\n}\n\nfunction applyNS (vnode, ns, force) {\n vnode.ns = ns;\n if (vnode.tag === 'foreignObject') {\n // use default namespace inside foreignObject\n ns = undefined;\n force = true;\n }\n if (isDef(vnode.children)) {\n for (var i = 0, l = vnode.children.length; i < l; i++) {\n var child = vnode.children[i];\n if (isDef(child.tag) && (\n isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n applyNS(child, ns, force);\n }\n }\n }\n}\n\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings (data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n if (isObject(data.class)) {\n traverse(data.class);\n }\n}\n\n/* */\n\nfunction initRender (vm) {\n vm._vnode = null; // the root of the child tree\n vm._staticTrees = null; // v-once cached trees\n var options = vm.$options;\n var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree\n var renderContext = parentVnode && parentVnode.context;\n vm.$slots = resolveSlots(options._renderChildren, renderContext);\n vm.$scopedSlots = emptyObject;\n // bind the createElement fn to this instance\n // so that we get proper render context inside it.\n // args order: tag, data, children, normalizationType, alwaysNormalize\n // internal version is used by render functions compiled from templates\n vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n // normalization is always applied for the public version, used in\n // user-written render functions.\n vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n\n // $attrs & $listeners are exposed for easier HOC creation.\n // they need to be reactive so that HOCs using them are always updated\n var parentData = parentVnode && parentVnode.data;\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {\n !isUpdatingChildComponent && warn(\"$attrs is readonly.\", vm);\n }, true);\n defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {\n !isUpdatingChildComponent && warn(\"$listeners is readonly.\", vm);\n }, true);\n } else {\n defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true);\n defineReactive(vm, '$listeners', options._parentListeners || emptyObject, null, true);\n }\n}\n\nfunction renderMixin (Vue) {\n // install runtime convenience helpers\n installRenderHelpers(Vue.prototype);\n\n Vue.prototype.$nextTick = function (fn) {\n return nextTick(fn, this)\n };\n\n Vue.prototype._render = function () {\n var vm = this;\n var ref = vm.$options;\n var render = ref.render;\n var _parentVnode = ref._parentVnode;\n\n // reset _rendered flag on slots for duplicate slot check\n if (process.env.NODE_ENV !== 'production') {\n for (var key in vm.$slots) {\n // $flow-disable-line\n vm.$slots[key]._rendered = false;\n }\n }\n\n if (_parentVnode) {\n vm.$scopedSlots = _parentVnode.data.scopedSlots || emptyObject;\n }\n\n // set parent vnode. this allows render functions to have access\n // to the data on the placeholder node.\n vm.$vnode = _parentVnode;\n // render self\n var vnode;\n try {\n vnode = render.call(vm._renderProxy, vm.$createElement);\n } catch (e) {\n handleError(e, vm, \"render\");\n // return error render result,\n // or previous vnode to prevent render error causing blank component\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n if (vm.$options.renderError) {\n try {\n vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n } catch (e) {\n handleError(e, vm, \"renderError\");\n vnode = vm._vnode;\n }\n } else {\n vnode = vm._vnode;\n }\n } else {\n vnode = vm._vnode;\n }\n }\n // return empty vnode in case the render function errored out\n if (!(vnode instanceof VNode)) {\n if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {\n warn(\n 'Multiple root nodes returned from render function. Render function ' +\n 'should return a single root node.',\n vm\n );\n }\n vnode = createEmptyVNode();\n }\n // set parent\n vnode.parent = _parentVnode;\n return vnode\n };\n}\n\n/* */\n\nvar uid$3 = 0;\n\nfunction initMixin (Vue) {\n Vue.prototype._init = function (options) {\n var vm = this;\n // a uid\n vm._uid = uid$3++;\n\n var startTag, endTag;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n startTag = \"vue-perf-start:\" + (vm._uid);\n endTag = \"vue-perf-end:\" + (vm._uid);\n mark(startTag);\n }\n\n // a flag to avoid this being observed\n vm._isVue = true;\n // merge options\n if (options && options._isComponent) {\n // optimize internal component instantiation\n // since dynamic options merging is pretty slow, and none of the\n // internal component options needs special treatment.\n initInternalComponent(vm, options);\n } else {\n vm.$options = mergeOptions(\n resolveConstructorOptions(vm.constructor),\n options || {},\n vm\n );\n }\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n initProxy(vm);\n } else {\n vm._renderProxy = vm;\n }\n // expose real self\n vm._self = vm;\n initLifecycle(vm);\n initEvents(vm);\n initRender(vm);\n callHook(vm, 'beforeCreate');\n initInjections(vm); // resolve injections before data/props\n initState(vm);\n initProvide(vm); // resolve provide after data/props\n callHook(vm, 'created');\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n vm._name = formatComponentName(vm, false);\n mark(endTag);\n measure((\"vue \" + (vm._name) + \" init\"), startTag, endTag);\n }\n\n if (vm.$options.el) {\n vm.$mount(vm.$options.el);\n }\n };\n}\n\nfunction initInternalComponent (vm, options) {\n var opts = vm.$options = Object.create(vm.constructor.options);\n // doing this because it's faster than dynamic enumeration.\n var parentVnode = options._parentVnode;\n opts.parent = options.parent;\n opts._parentVnode = parentVnode;\n opts._parentElm = options._parentElm;\n opts._refElm = options._refElm;\n\n var vnodeComponentOptions = parentVnode.componentOptions;\n opts.propsData = vnodeComponentOptions.propsData;\n opts._parentListeners = vnodeComponentOptions.listeners;\n opts._renderChildren = vnodeComponentOptions.children;\n opts._componentTag = vnodeComponentOptions.tag;\n\n if (options.render) {\n opts.render = options.render;\n opts.staticRenderFns = options.staticRenderFns;\n }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n var options = Ctor.options;\n if (Ctor.super) {\n var superOptions = resolveConstructorOptions(Ctor.super);\n var cachedSuperOptions = Ctor.superOptions;\n if (superOptions !== cachedSuperOptions) {\n // super option changed,\n // need to resolve new options.\n Ctor.superOptions = superOptions;\n // check if there are any late-modified/attached options (#4976)\n var modifiedOptions = resolveModifiedOptions(Ctor);\n // update base extend options\n if (modifiedOptions) {\n extend(Ctor.extendOptions, modifiedOptions);\n }\n options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n if (options.name) {\n options.components[options.name] = Ctor;\n }\n }\n }\n return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n var modified;\n var latest = Ctor.options;\n var extended = Ctor.extendOptions;\n var sealed = Ctor.sealedOptions;\n for (var key in latest) {\n if (latest[key] !== sealed[key]) {\n if (!modified) { modified = {}; }\n modified[key] = dedupe(latest[key], extended[key], sealed[key]);\n }\n }\n return modified\n}\n\nfunction dedupe (latest, extended, sealed) {\n // compare latest and sealed to ensure lifecycle hooks won't be duplicated\n // between merges\n if (Array.isArray(latest)) {\n var res = [];\n sealed = Array.isArray(sealed) ? sealed : [sealed];\n extended = Array.isArray(extended) ? extended : [extended];\n for (var i = 0; i < latest.length; i++) {\n // push original options and not sealed options to exclude duplicated options\n if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {\n res.push(latest[i]);\n }\n }\n return res\n } else {\n return latest\n }\n}\n\nfunction Vue (options) {\n if (process.env.NODE_ENV !== 'production' &&\n !(this instanceof Vue)\n ) {\n warn('Vue is a constructor and should be called with the `new` keyword');\n }\n this._init(options);\n}\n\ninitMixin(Vue);\nstateMixin(Vue);\neventsMixin(Vue);\nlifecycleMixin(Vue);\nrenderMixin(Vue);\n\n/* */\n\nfunction initUse (Vue) {\n Vue.use = function (plugin) {\n var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));\n if (installedPlugins.indexOf(plugin) > -1) {\n return this\n }\n\n // additional parameters\n var args = toArray(arguments, 1);\n args.unshift(this);\n if (typeof plugin.install === 'function') {\n plugin.install.apply(plugin, args);\n } else if (typeof plugin === 'function') {\n plugin.apply(null, args);\n }\n installedPlugins.push(plugin);\n return this\n };\n}\n\n/* */\n\nfunction initMixin$1 (Vue) {\n Vue.mixin = function (mixin) {\n this.options = mergeOptions(this.options, mixin);\n return this\n };\n}\n\n/* */\n\nfunction initExtend (Vue) {\n /**\n * Each instance constructor, including Vue, has a unique\n * cid. This enables us to create wrapped \"child\n * constructors\" for prototypal inheritance and cache them.\n */\n Vue.cid = 0;\n var cid = 1;\n\n /**\n * Class inheritance\n */\n Vue.extend = function (extendOptions) {\n extendOptions = extendOptions || {};\n var Super = this;\n var SuperId = Super.cid;\n var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n if (cachedCtors[SuperId]) {\n return cachedCtors[SuperId]\n }\n\n var name = extendOptions.name || Super.options.name;\n if (process.env.NODE_ENV !== 'production' && name) {\n validateComponentName(name);\n }\n\n var Sub = function VueComponent (options) {\n this._init(options);\n };\n Sub.prototype = Object.create(Super.prototype);\n Sub.prototype.constructor = Sub;\n Sub.cid = cid++;\n Sub.options = mergeOptions(\n Super.options,\n extendOptions\n );\n Sub['super'] = Super;\n\n // For props and computed properties, we define the proxy getters on\n // the Vue instances at extension time, on the extended prototype. This\n // avoids Object.defineProperty calls for each instance created.\n if (Sub.options.props) {\n initProps$1(Sub);\n }\n if (Sub.options.computed) {\n initComputed$1(Sub);\n }\n\n // allow further extension/mixin/plugin usage\n Sub.extend = Super.extend;\n Sub.mixin = Super.mixin;\n Sub.use = Super.use;\n\n // create asset registers, so extended classes\n // can have their private assets too.\n ASSET_TYPES.forEach(function (type) {\n Sub[type] = Super[type];\n });\n // enable recursive self-lookup\n if (name) {\n Sub.options.components[name] = Sub;\n }\n\n // keep a reference to the super options at extension time.\n // later at instantiation we can check if Super's options have\n // been updated.\n Sub.superOptions = Super.options;\n Sub.extendOptions = extendOptions;\n Sub.sealedOptions = extend({}, Sub.options);\n\n // cache constructor\n cachedCtors[SuperId] = Sub;\n return Sub\n };\n}\n\nfunction initProps$1 (Comp) {\n var props = Comp.options.props;\n for (var key in props) {\n proxy(Comp.prototype, \"_props\", key);\n }\n}\n\nfunction initComputed$1 (Comp) {\n var computed = Comp.options.computed;\n for (var key in computed) {\n defineComputed(Comp.prototype, key, computed[key]);\n }\n}\n\n/* */\n\nfunction initAssetRegisters (Vue) {\n /**\n * Create asset registration methods.\n */\n ASSET_TYPES.forEach(function (type) {\n Vue[type] = function (\n id,\n definition\n ) {\n if (!definition) {\n return this.options[type + 's'][id]\n } else {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && type === 'component') {\n validateComponentName(id);\n }\n if (type === 'component' && isPlainObject(definition)) {\n definition.name = definition.name || id;\n definition = this.options._base.extend(definition);\n }\n if (type === 'directive' && typeof definition === 'function') {\n definition = { bind: definition, update: definition };\n }\n this.options[type + 's'][id] = definition;\n return definition\n }\n };\n });\n}\n\n/* */\n\nfunction getComponentName (opts) {\n return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n if (Array.isArray(pattern)) {\n return pattern.indexOf(name) > -1\n } else if (typeof pattern === 'string') {\n return pattern.split(',').indexOf(name) > -1\n } else if (isRegExp(pattern)) {\n return pattern.test(name)\n }\n /* istanbul ignore next */\n return false\n}\n\nfunction pruneCache (keepAliveInstance, filter) {\n var cache = keepAliveInstance.cache;\n var keys = keepAliveInstance.keys;\n var _vnode = keepAliveInstance._vnode;\n for (var key in cache) {\n var cachedNode = cache[key];\n if (cachedNode) {\n var name = getComponentName(cachedNode.componentOptions);\n if (name && !filter(name)) {\n pruneCacheEntry(cache, key, keys, _vnode);\n }\n }\n }\n}\n\nfunction pruneCacheEntry (\n cache,\n key,\n keys,\n current\n) {\n var cached$$1 = cache[key];\n if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {\n cached$$1.componentInstance.$destroy();\n }\n cache[key] = null;\n remove(keys, key);\n}\n\nvar patternTypes = [String, RegExp, Array];\n\nvar KeepAlive = {\n name: 'keep-alive',\n abstract: true,\n\n props: {\n include: patternTypes,\n exclude: patternTypes,\n max: [String, Number]\n },\n\n created: function created () {\n this.cache = Object.create(null);\n this.keys = [];\n },\n\n destroyed: function destroyed () {\n var this$1 = this;\n\n for (var key in this$1.cache) {\n pruneCacheEntry(this$1.cache, key, this$1.keys);\n }\n },\n\n mounted: function mounted () {\n var this$1 = this;\n\n this.$watch('include', function (val) {\n pruneCache(this$1, function (name) { return matches(val, name); });\n });\n this.$watch('exclude', function (val) {\n pruneCache(this$1, function (name) { return !matches(val, name); });\n });\n },\n\n render: function render () {\n var slot = this.$slots.default;\n var vnode = getFirstComponentChild(slot);\n var componentOptions = vnode && vnode.componentOptions;\n if (componentOptions) {\n // check pattern\n var name = getComponentName(componentOptions);\n var ref = this;\n var include = ref.include;\n var exclude = ref.exclude;\n if (\n // not included\n (include && (!name || !matches(include, name))) ||\n // excluded\n (exclude && name && matches(exclude, name))\n ) {\n return vnode\n }\n\n var ref$1 = this;\n var cache = ref$1.cache;\n var keys = ref$1.keys;\n var key = vnode.key == null\n // same constructor may get registered as different local components\n // so cid alone is not enough (#3269)\n ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n : vnode.key;\n if (cache[key]) {\n vnode.componentInstance = cache[key].componentInstance;\n // make current key freshest\n remove(keys, key);\n keys.push(key);\n } else {\n cache[key] = vnode;\n keys.push(key);\n // prune oldest entry\n if (this.max && keys.length > parseInt(this.max)) {\n pruneCacheEntry(cache, keys[0], keys, this._vnode);\n }\n }\n\n vnode.data.keepAlive = true;\n }\n return vnode || (slot && slot[0])\n }\n}\n\nvar builtInComponents = {\n KeepAlive: KeepAlive\n}\n\n/* */\n\nfunction initGlobalAPI (Vue) {\n // config\n var configDef = {};\n configDef.get = function () { return config; };\n if (process.env.NODE_ENV !== 'production') {\n configDef.set = function () {\n warn(\n 'Do not replace the Vue.config object, set individual fields instead.'\n );\n };\n }\n Object.defineProperty(Vue, 'config', configDef);\n\n // exposed util methods.\n // NOTE: these are not considered part of the public API - avoid relying on\n // them unless you are aware of the risk.\n Vue.util = {\n warn: warn,\n extend: extend,\n mergeOptions: mergeOptions,\n defineReactive: defineReactive\n };\n\n Vue.set = set;\n Vue.delete = del;\n Vue.nextTick = nextTick;\n\n Vue.options = Object.create(null);\n ASSET_TYPES.forEach(function (type) {\n Vue.options[type + 's'] = Object.create(null);\n });\n\n // this is used to identify the \"base\" constructor to extend all plain-object\n // components with in Weex's multi-instance scenarios.\n Vue.options._base = Vue;\n\n extend(Vue.options.components, builtInComponents);\n\n initUse(Vue);\n initMixin$1(Vue);\n initExtend(Vue);\n initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\n\nObject.defineProperty(Vue.prototype, '$isServer', {\n get: isServerRendering\n});\n\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n get: function get () {\n /* istanbul ignore next */\n return this.$vnode && this.$vnode.ssrContext\n }\n});\n\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n value: FunctionalRenderContext\n});\n\nVue.version = '2.5.16';\n\n/* */\n\n// these are reserved for web because they are directly compiled away\n// during template compilation\nvar isReservedAttr = makeMap('style,class');\n\n// attributes that should be using props for binding\nvar acceptValue = makeMap('input,textarea,option,select,progress');\nvar mustUseProp = function (tag, type, attr) {\n return (\n (attr === 'value' && acceptValue(tag)) && type !== 'button' ||\n (attr === 'selected' && tag === 'option') ||\n (attr === 'checked' && tag === 'input') ||\n (attr === 'muted' && tag === 'video')\n )\n};\n\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\n\nvar isBooleanAttr = makeMap(\n 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\n 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\n 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\n 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\n 'required,reversed,scoped,seamless,selected,sortable,translate,' +\n 'truespeed,typemustmatch,visible'\n);\n\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\n\nvar isXlink = function (name) {\n return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\n};\n\nvar getXlinkProp = function (name) {\n return isXlink(name) ? name.slice(6, name.length) : ''\n};\n\nvar isFalsyAttrValue = function (val) {\n return val == null || val === false\n};\n\n/* */\n\nfunction genClassForVnode (vnode) {\n var data = vnode.data;\n var parentNode = vnode;\n var childNode = vnode;\n while (isDef(childNode.componentInstance)) {\n childNode = childNode.componentInstance._vnode;\n if (childNode && childNode.data) {\n data = mergeClassData(childNode.data, data);\n }\n }\n while (isDef(parentNode = parentNode.parent)) {\n if (parentNode && parentNode.data) {\n data = mergeClassData(data, parentNode.data);\n }\n }\n return renderClass(data.staticClass, data.class)\n}\n\nfunction mergeClassData (child, parent) {\n return {\n staticClass: concat(child.staticClass, parent.staticClass),\n class: isDef(child.class)\n ? [child.class, parent.class]\n : parent.class\n }\n}\n\nfunction renderClass (\n staticClass,\n dynamicClass\n) {\n if (isDef(staticClass) || isDef(dynamicClass)) {\n return concat(staticClass, stringifyClass(dynamicClass))\n }\n /* istanbul ignore next */\n return ''\n}\n\nfunction concat (a, b) {\n return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n if (Array.isArray(value)) {\n return stringifyArray(value)\n }\n if (isObject(value)) {\n return stringifyObject(value)\n }\n if (typeof value === 'string') {\n return value\n }\n /* istanbul ignore next */\n return ''\n}\n\nfunction stringifyArray (value) {\n var res = '';\n var stringified;\n for (var i = 0, l = value.length; i < l; i++) {\n if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {\n if (res) { res += ' '; }\n res += stringified;\n }\n }\n return res\n}\n\nfunction stringifyObject (value) {\n var res = '';\n for (var key in value) {\n if (value[key]) {\n if (res) { res += ' '; }\n res += key;\n }\n }\n return res\n}\n\n/* */\n\nvar namespaceMap = {\n svg: 'http://www.w3.org/2000/svg',\n math: 'http://www.w3.org/1998/Math/MathML'\n};\n\nvar isHTMLTag = makeMap(\n 'html,body,base,head,link,meta,style,title,' +\n 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\n 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +\n 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\n 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\n 'embed,object,param,source,canvas,script,noscript,del,ins,' +\n 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\n 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\n 'output,progress,select,textarea,' +\n 'details,dialog,menu,menuitem,summary,' +\n 'content,element,shadow,template,blockquote,iframe,tfoot'\n);\n\n// this map is intentionally selective, only covering SVG elements that may\n// contain child elements.\nvar isSVG = makeMap(\n 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +\n 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\n 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\n true\n);\n\nvar isPreTag = function (tag) { return tag === 'pre'; };\n\nvar isReservedTag = function (tag) {\n return isHTMLTag(tag) || isSVG(tag)\n};\n\nfunction getTagNamespace (tag) {\n if (isSVG(tag)) {\n return 'svg'\n }\n // basic support for MathML\n // note it doesn't support other MathML elements being component roots\n if (tag === 'math') {\n return 'math'\n }\n}\n\nvar unknownElementCache = Object.create(null);\nfunction isUnknownElement (tag) {\n /* istanbul ignore if */\n if (!inBrowser) {\n return true\n }\n if (isReservedTag(tag)) {\n return false\n }\n tag = tag.toLowerCase();\n /* istanbul ignore if */\n if (unknownElementCache[tag] != null) {\n return unknownElementCache[tag]\n }\n var el = document.createElement(tag);\n if (tag.indexOf('-') > -1) {\n // http://stackoverflow.com/a/28210364/1070244\n return (unknownElementCache[tag] = (\n el.constructor === window.HTMLUnknownElement ||\n el.constructor === window.HTMLElement\n ))\n } else {\n return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\n }\n}\n\nvar isTextInputType = makeMap('text,number,password,search,email,tel,url');\n\n/* */\n\n/**\n * Query an element selector if it's not an element already.\n */\nfunction query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}\n\n/* */\n\nfunction createElement$1 (tagName, vnode) {\n var elm = document.createElement(tagName);\n if (tagName !== 'select') {\n return elm\n }\n // false or null will remove the attribute but undefined will not\n if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {\n elm.setAttribute('multiple', 'multiple');\n }\n return elm\n}\n\nfunction createElementNS (namespace, tagName) {\n return document.createElementNS(namespaceMap[namespace], tagName)\n}\n\nfunction createTextNode (text) {\n return document.createTextNode(text)\n}\n\nfunction createComment (text) {\n return document.createComment(text)\n}\n\nfunction insertBefore (parentNode, newNode, referenceNode) {\n parentNode.insertBefore(newNode, referenceNode);\n}\n\nfunction removeChild (node, child) {\n node.removeChild(child);\n}\n\nfunction appendChild (node, child) {\n node.appendChild(child);\n}\n\nfunction parentNode (node) {\n return node.parentNode\n}\n\nfunction nextSibling (node) {\n return node.nextSibling\n}\n\nfunction tagName (node) {\n return node.tagName\n}\n\nfunction setTextContent (node, text) {\n node.textContent = text;\n}\n\nfunction setStyleScope (node, scopeId) {\n node.setAttribute(scopeId, '');\n}\n\n\nvar nodeOps = Object.freeze({\n\tcreateElement: createElement$1,\n\tcreateElementNS: createElementNS,\n\tcreateTextNode: createTextNode,\n\tcreateComment: createComment,\n\tinsertBefore: insertBefore,\n\tremoveChild: removeChild,\n\tappendChild: appendChild,\n\tparentNode: parentNode,\n\tnextSibling: nextSibling,\n\ttagName: tagName,\n\tsetTextContent: setTextContent,\n\tsetStyleScope: setStyleScope\n});\n\n/* */\n\nvar ref = {\n create: function create (_, vnode) {\n registerRef(vnode);\n },\n update: function update (oldVnode, vnode) {\n if (oldVnode.data.ref !== vnode.data.ref) {\n registerRef(oldVnode, true);\n registerRef(vnode);\n }\n },\n destroy: function destroy (vnode) {\n registerRef(vnode, true);\n }\n}\n\nfunction registerRef (vnode, isRemoval) {\n var key = vnode.data.ref;\n if (!isDef(key)) { return }\n\n var vm = vnode.context;\n var ref = vnode.componentInstance || vnode.elm;\n var refs = vm.$refs;\n if (isRemoval) {\n if (Array.isArray(refs[key])) {\n remove(refs[key], ref);\n } else if (refs[key] === ref) {\n refs[key] = undefined;\n }\n } else {\n if (vnode.data.refInFor) {\n if (!Array.isArray(refs[key])) {\n refs[key] = [ref];\n } else if (refs[key].indexOf(ref) < 0) {\n // $flow-disable-line\n refs[key].push(ref);\n }\n } else {\n refs[key] = ref;\n }\n }\n}\n\n/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\n *\n * modified by Evan You (@yyx990803)\n *\n * Not type-checking this because this file is perf-critical and the cost\n * of making flow understand it is not worth it.\n */\n\nvar emptyNode = new VNode('', {}, []);\n\nvar hooks = ['create', 'activate', 'update', 'remove', 'destroy'];\n\nfunction sameVnode (a, b) {\n return (\n a.key === b.key && (\n (\n a.tag === b.tag &&\n a.isComment === b.isComment &&\n isDef(a.data) === isDef(b.data) &&\n sameInputType(a, b)\n ) || (\n isTrue(a.isAsyncPlaceholder) &&\n a.asyncFactory === b.asyncFactory &&\n isUndef(b.asyncFactory.error)\n )\n )\n )\n}\n\nfunction sameInputType (a, b) {\n if (a.tag !== 'input') { return true }\n var i;\n var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;\n var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;\n return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)\n}\n\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\n var i, key;\n var map = {};\n for (i = beginIdx; i <= endIdx; ++i) {\n key = children[i].key;\n if (isDef(key)) { map[key] = i; }\n }\n return map\n}\n\nfunction createPatchFunction (backend) {\n var i, j;\n var cbs = {};\n\n var modules = backend.modules;\n var nodeOps = backend.nodeOps;\n\n for (i = 0; i < hooks.length; ++i) {\n cbs[hooks[i]] = [];\n for (j = 0; j < modules.length; ++j) {\n if (isDef(modules[j][hooks[i]])) {\n cbs[hooks[i]].push(modules[j][hooks[i]]);\n }\n }\n }\n\n function emptyNodeAt (elm) {\n return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\n }\n\n function createRmCb (childElm, listeners) {\n function remove () {\n if (--remove.listeners === 0) {\n removeNode(childElm);\n }\n }\n remove.listeners = listeners;\n return remove\n }\n\n function removeNode (el) {\n var parent = nodeOps.parentNode(el);\n // element may have already been removed due to v-html / v-text\n if (isDef(parent)) {\n nodeOps.removeChild(parent, el);\n }\n }\n\n function isUnknownElement$$1 (vnode, inVPre) {\n return (\n !inVPre &&\n !vnode.ns &&\n !(\n config.ignoredElements.length &&\n config.ignoredElements.some(function (ignore) {\n return isRegExp(ignore)\n ? ignore.test(vnode.tag)\n : ignore === vnode.tag\n })\n ) &&\n config.isUnknownElement(vnode.tag)\n )\n }\n\n var creatingElmInVPre = 0;\n\n function createElm (\n vnode,\n insertedVnodeQueue,\n parentElm,\n refElm,\n nested,\n ownerArray,\n index\n ) {\n if (isDef(vnode.elm) && isDef(ownerArray)) {\n // This vnode was used in a previous render!\n // now it's used as a new node, overwriting its elm would cause\n // potential patch errors down the road when it's used as an insertion\n // reference node. Instead, we clone the node on-demand before creating\n // associated DOM element for it.\n vnode = ownerArray[index] = cloneVNode(vnode);\n }\n\n vnode.isRootInsert = !nested; // for transition enter check\n if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\n return\n }\n\n var data = vnode.data;\n var children = vnode.children;\n var tag = vnode.tag;\n if (isDef(tag)) {\n if (process.env.NODE_ENV !== 'production') {\n if (data && data.pre) {\n creatingElmInVPre++;\n }\n if (isUnknownElement$$1(vnode, creatingElmInVPre)) {\n warn(\n 'Unknown custom element: <' + tag + '> - did you ' +\n 'register the component correctly? For recursive components, ' +\n 'make sure to provide the \"name\" option.',\n vnode.context\n );\n }\n }\n\n vnode.elm = vnode.ns\n ? nodeOps.createElementNS(vnode.ns, tag)\n : nodeOps.createElement(tag, vnode);\n setScope(vnode);\n\n /* istanbul ignore if */\n {\n createChildren(vnode, children, insertedVnodeQueue);\n if (isDef(data)) {\n invokeCreateHooks(vnode, insertedVnodeQueue);\n }\n insert(parentElm, vnode.elm, refElm);\n }\n\n if (process.env.NODE_ENV !== 'production' && data && data.pre) {\n creatingElmInVPre--;\n }\n } else if (isTrue(vnode.isComment)) {\n vnode.elm = nodeOps.createComment(vnode.text);\n insert(parentElm, vnode.elm, refElm);\n } else {\n vnode.elm = nodeOps.createTextNode(vnode.text);\n insert(parentElm, vnode.elm, refElm);\n }\n }\n\n function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n var i = vnode.data;\n if (isDef(i)) {\n var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;\n if (isDef(i = i.hook) && isDef(i = i.init)) {\n i(vnode, false /* hydrating */, parentElm, refElm);\n }\n // after calling the init hook, if the vnode is a child component\n // it should've created a child instance and mounted it. the child\n // component also has set the placeholder vnode's elm.\n // in that case we can just return the element and be done.\n if (isDef(vnode.componentInstance)) {\n initComponent(vnode, insertedVnodeQueue);\n if (isTrue(isReactivated)) {\n reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\n }\n return true\n }\n }\n }\n\n function initComponent (vnode, insertedVnodeQueue) {\n if (isDef(vnode.data.pendingInsert)) {\n insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\n vnode.data.pendingInsert = null;\n }\n vnode.elm = vnode.componentInstance.$el;\n if (isPatchable(vnode)) {\n invokeCreateHooks(vnode, insertedVnodeQueue);\n setScope(vnode);\n } else {\n // empty component root.\n // skip all element-related modules except for ref (#3455)\n registerRef(vnode);\n // make sure to invoke the insert hook\n insertedVnodeQueue.push(vnode);\n }\n }\n\n function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\n var i;\n // hack for #4339: a reactivated component with inner transition\n // does not trigger because the inner node's created hooks are not called\n // again. It's not ideal to involve module-specific logic in here but\n // there doesn't seem to be a better way to do it.\n var innerNode = vnode;\n while (innerNode.componentInstance) {\n innerNode = innerNode.componentInstance._vnode;\n if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\n for (i = 0; i < cbs.activate.length; ++i) {\n cbs.activate[i](emptyNode, innerNode);\n }\n insertedVnodeQueue.push(innerNode);\n break\n }\n }\n // unlike a newly created component,\n // a reactivated keep-alive component doesn't insert itself\n insert(parentElm, vnode.elm, refElm);\n }\n\n function insert (parent, elm, ref$$1) {\n if (isDef(parent)) {\n if (isDef(ref$$1)) {\n if (ref$$1.parentNode === parent) {\n nodeOps.insertBefore(parent, elm, ref$$1);\n }\n } else {\n nodeOps.appendChild(parent, elm);\n }\n }\n }\n\n function createChildren (vnode, children, insertedVnodeQueue) {\n if (Array.isArray(children)) {\n if (process.env.NODE_ENV !== 'production') {\n checkDuplicateKeys(children);\n }\n for (var i = 0; i < children.length; ++i) {\n createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);\n }\n } else if (isPrimitive(vnode.text)) {\n nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));\n }\n }\n\n function isPatchable (vnode) {\n while (vnode.componentInstance) {\n vnode = vnode.componentInstance._vnode;\n }\n return isDef(vnode.tag)\n }\n\n function invokeCreateHooks (vnode, insertedVnodeQueue) {\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n cbs.create[i$1](emptyNode, vnode);\n }\n i = vnode.data.hook; // Reuse variable\n if (isDef(i)) {\n if (isDef(i.create)) { i.create(emptyNode, vnode); }\n if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }\n }\n }\n\n // set scope id attribute for scoped CSS.\n // this is implemented as a special case to avoid the overhead\n // of going through the normal attribute patching process.\n function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }\n\n function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\n for (; startIdx <= endIdx; ++startIdx) {\n createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);\n }\n }\n\n function invokeDestroyHook (vnode) {\n var i, j;\n var data = vnode.data;\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\n for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\n }\n if (isDef(i = vnode.children)) {\n for (j = 0; j < vnode.children.length; ++j) {\n invokeDestroyHook(vnode.children[j]);\n }\n }\n }\n\n function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (isDef(ch)) {\n if (isDef(ch.tag)) {\n removeAndInvokeRemoveHook(ch);\n invokeDestroyHook(ch);\n } else { // Text node\n removeNode(ch.elm);\n }\n }\n }\n }\n\n function removeAndInvokeRemoveHook (vnode, rm) {\n if (isDef(rm) || isDef(vnode.data)) {\n var i;\n var listeners = cbs.remove.length + 1;\n if (isDef(rm)) {\n // we have a recursively passed down rm callback\n // increase the listeners count\n rm.listeners += listeners;\n } else {\n // directly removing\n rm = createRmCb(vnode.elm, listeners);\n }\n // recursively invoke hooks on child component root node\n if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {\n removeAndInvokeRemoveHook(i, rm);\n }\n for (i = 0; i < cbs.remove.length; ++i) {\n cbs.remove[i](vnode, rm);\n }\n if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\n i(vnode, rm);\n } else {\n rm();\n }\n } else {\n removeNode(vnode.elm);\n }\n }\n\n function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\n var oldStartIdx = 0;\n var newStartIdx = 0;\n var oldEndIdx = oldCh.length - 1;\n var oldStartVnode = oldCh[0];\n var oldEndVnode = oldCh[oldEndIdx];\n var newEndIdx = newCh.length - 1;\n var newStartVnode = newCh[0];\n var newEndVnode = newCh[newEndIdx];\n var oldKeyToIdx, idxInOld, vnodeToMove, refElm;\n\n // removeOnly is a special flag used only by <transition-group>\n // to ensure removed elements stay in correct relative positions\n // during leaving transitions\n var canMove = !removeOnly;\n\n if (process.env.NODE_ENV !== 'production') {\n checkDuplicateKeys(newCh);\n }\n\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (isUndef(oldStartVnode)) {\n oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\n } else if (isUndef(oldEndVnode)) {\n oldEndVnode = oldCh[--oldEndIdx];\n } else if (sameVnode(oldStartVnode, newStartVnode)) {\n patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n } else if (sameVnode(oldEndVnode, newEndVnode)) {\n patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\n patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\n canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\n patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\n canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n } else {\n if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\n idxInOld = isDef(newStartVnode.key)\n ? oldKeyToIdx[newStartVnode.key]\n : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);\n if (isUndef(idxInOld)) { // New element\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n } else {\n vnodeToMove = oldCh[idxInOld];\n if (sameVnode(vnodeToMove, newStartVnode)) {\n patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue);\n oldCh[idxInOld] = undefined;\n canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);\n } else {\n // same key but different element. treat as new element\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);\n }\n }\n newStartVnode = newCh[++newStartIdx];\n }\n }\n if (oldStartIdx > oldEndIdx) {\n refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\n addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\n } else if (newStartIdx > newEndIdx) {\n removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n }\n }\n\n function checkDuplicateKeys (children) {\n var seenKeys = {};\n for (var i = 0; i < children.length; i++) {\n var vnode = children[i];\n var key = vnode.key;\n if (isDef(key)) {\n if (seenKeys[key]) {\n warn(\n (\"Duplicate keys detected: '\" + key + \"'. This may cause an update error.\"),\n vnode.context\n );\n } else {\n seenKeys[key] = true;\n }\n }\n }\n }\n\n function findIdxInOld (node, oldCh, start, end) {\n for (var i = start; i < end; i++) {\n var c = oldCh[i];\n if (isDef(c) && sameVnode(node, c)) { return i }\n }\n }\n\n function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\n if (oldVnode === vnode) {\n return\n }\n\n var elm = vnode.elm = oldVnode.elm;\n\n if (isTrue(oldVnode.isAsyncPlaceholder)) {\n if (isDef(vnode.asyncFactory.resolved)) {\n hydrate(oldVnode.elm, vnode, insertedVnodeQueue);\n } else {\n vnode.isAsyncPlaceholder = true;\n }\n return\n }\n\n // reuse element for static trees.\n // note we only do this if the vnode is cloned -\n // if the new node is not cloned it means the render functions have been\n // reset by the hot-reload-api and we need to do a proper re-render.\n if (isTrue(vnode.isStatic) &&\n isTrue(oldVnode.isStatic) &&\n vnode.key === oldVnode.key &&\n (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))\n ) {\n vnode.componentInstance = oldVnode.componentInstance;\n return\n }\n\n var i;\n var data = vnode.data;\n if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {\n i(oldVnode, vnode);\n }\n\n var oldCh = oldVnode.children;\n var ch = vnode.children;\n if (isDef(data) && isPatchable(vnode)) {\n for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\n if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\n }\n if (isUndef(vnode.text)) {\n if (isDef(oldCh) && isDef(ch)) {\n if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\n } else if (isDef(ch)) {\n if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\n addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\n } else if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n } else if (isDef(oldVnode.text)) {\n nodeOps.setTextContent(elm, '');\n }\n } else if (oldVnode.text !== vnode.text) {\n nodeOps.setTextContent(elm, vnode.text);\n }\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\n }\n }\n\n function invokeInsertHook (vnode, queue, initial) {\n // delay insert hooks for component root nodes, invoke them after the\n // element is really inserted\n if (isTrue(initial) && isDef(vnode.parent)) {\n vnode.parent.data.pendingInsert = queue;\n } else {\n for (var i = 0; i < queue.length; ++i) {\n queue[i].data.hook.insert(queue[i]);\n }\n }\n }\n\n var hydrationBailed = false;\n // list of modules that can skip create hook during hydration because they\n // are already rendered on the client or has no need for initialization\n // Note: style is excluded because it relies on initial clone for future\n // deep updates (#7063).\n var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');\n\n // Note: this is a browser-only function so we can assume elms are DOM nodes.\n function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {\n var i;\n var tag = vnode.tag;\n var data = vnode.data;\n var children = vnode.children;\n inVPre = inVPre || (data && data.pre);\n vnode.elm = elm;\n\n if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {\n vnode.isAsyncPlaceholder = true;\n return true\n }\n // assert node match\n if (process.env.NODE_ENV !== 'production') {\n if (!assertNodeMatch(elm, vnode, inVPre)) {\n return false\n }\n }\n if (isDef(data)) {\n if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\n if (isDef(i = vnode.componentInstance)) {\n // child component. it should have hydrated its own tree.\n initComponent(vnode, insertedVnodeQueue);\n return true\n }\n }\n if (isDef(tag)) {\n if (isDef(children)) {\n // empty element, allow client to pick up and populate children\n if (!elm.hasChildNodes()) {\n createChildren(vnode, children, insertedVnodeQueue);\n } else {\n // v-html and domProps: innerHTML\n if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {\n if (i !== elm.innerHTML) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' &&\n typeof console !== 'undefined' &&\n !hydrationBailed\n ) {\n hydrationBailed = true;\n console.warn('Parent: ', elm);\n console.warn('server innerHTML: ', i);\n console.warn('client innerHTML: ', elm.innerHTML);\n }\n return false\n }\n } else {\n // iterate and compare children lists\n var childrenMatch = true;\n var childNode = elm.firstChild;\n for (var i$1 = 0; i$1 < children.length; i$1++) {\n if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {\n childrenMatch = false;\n break\n }\n childNode = childNode.nextSibling;\n }\n // if childNode is not null, it means the actual childNodes list is\n // longer than the virtual children list.\n if (!childrenMatch || childNode) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' &&\n typeof console !== 'undefined' &&\n !hydrationBailed\n ) {\n hydrationBailed = true;\n console.warn('Parent: ', elm);\n console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\n }\n return false\n }\n }\n }\n }\n if (isDef(data)) {\n var fullInvoke = false;\n for (var key in data) {\n if (!isRenderedModule(key)) {\n fullInvoke = true;\n invokeCreateHooks(vnode, insertedVnodeQueue);\n break\n }\n }\n if (!fullInvoke && data['class']) {\n // ensure collecting deps for deep class bindings for future updates\n traverse(data['class']);\n }\n }\n } else if (elm.data !== vnode.text) {\n elm.data = vnode.text;\n }\n return true\n }\n\n function assertNodeMatch (node, vnode, inVPre) {\n if (isDef(vnode.tag)) {\n return vnode.tag.indexOf('vue-component') === 0 || (\n !isUnknownElement$$1(vnode, inVPre) &&\n vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\n )\n } else {\n return node.nodeType === (vnode.isComment ? 8 : 3)\n }\n }\n\n return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\n if (isUndef(vnode)) {\n if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }\n return\n }\n\n var isInitialPatch = false;\n var insertedVnodeQueue = [];\n\n if (isUndef(oldVnode)) {\n // empty mount (likely as component), create new root element\n isInitialPatch = true;\n createElm(vnode, insertedVnodeQueue, parentElm, refElm);\n } else {\n var isRealElement = isDef(oldVnode.nodeType);\n if (!isRealElement && sameVnode(oldVnode, vnode)) {\n // patch existing root node\n patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\n } else {\n if (isRealElement) {\n // mounting to a real element\n // check if this is server-rendered content and if we can perform\n // a successful hydration.\n if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {\n oldVnode.removeAttribute(SSR_ATTR);\n hydrating = true;\n }\n if (isTrue(hydrating)) {\n if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\n invokeInsertHook(vnode, insertedVnodeQueue, true);\n return oldVnode\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n 'The client-side rendered virtual DOM tree is not matching ' +\n 'server-rendered content. This is likely caused by incorrect ' +\n 'HTML markup, for example nesting block-level elements inside ' +\n '<p>, or missing <tbody>. Bailing hydration and performing ' +\n 'full client-side render.'\n );\n }\n }\n // either not server-rendered, or hydration failed.\n // create an empty node and replace it\n oldVnode = emptyNodeAt(oldVnode);\n }\n\n // replacing existing element\n var oldElm = oldVnode.elm;\n var parentElm$1 = nodeOps.parentNode(oldElm);\n\n // create new node\n createElm(\n vnode,\n insertedVnodeQueue,\n // extremely rare edge case: do not insert if old element is in a\n // leaving transition. Only happens when combining transition +\n // keep-alive + HOCs. (#4590)\n oldElm._leaveCb ? null : parentElm$1,\n nodeOps.nextSibling(oldElm)\n );\n\n // update parent placeholder node element, recursively\n if (isDef(vnode.parent)) {\n var ancestor = vnode.parent;\n var patchable = isPatchable(vnode);\n while (ancestor) {\n for (var i = 0; i < cbs.destroy.length; ++i) {\n cbs.destroy[i](ancestor);\n }\n ancestor.elm = vnode.elm;\n if (patchable) {\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n cbs.create[i$1](emptyNode, ancestor);\n }\n // #6513\n // invoke insert hooks that may have been merged by create hooks.\n // e.g. for directives that uses the \"inserted\" hook.\n var insert = ancestor.data.hook.insert;\n if (insert.merged) {\n // start at index 1 to avoid re-invoking component mounted hook\n for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {\n insert.fns[i$2]();\n }\n }\n } else {\n registerRef(ancestor);\n }\n ancestor = ancestor.parent;\n }\n }\n\n // destroy old node\n if (isDef(parentElm$1)) {\n removeVnodes(parentElm$1, [oldVnode], 0, 0);\n } else if (isDef(oldVnode.tag)) {\n invokeDestroyHook(oldVnode);\n }\n }\n }\n\n invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n return vnode.elm\n }\n}\n\n/* */\n\nvar directives = {\n create: updateDirectives,\n update: updateDirectives,\n destroy: function unbindDirectives (vnode) {\n updateDirectives(vnode, emptyNode);\n }\n}\n\nfunction updateDirectives (oldVnode, vnode) {\n if (oldVnode.data.directives || vnode.data.directives) {\n _update(oldVnode, vnode);\n }\n}\n\nfunction _update (oldVnode, vnode) {\n var isCreate = oldVnode === emptyNode;\n var isDestroy = vnode === emptyNode;\n var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n var dirsWithInsert = [];\n var dirsWithPostpatch = [];\n\n var key, oldDir, dir;\n for (key in newDirs) {\n oldDir = oldDirs[key];\n dir = newDirs[key];\n if (!oldDir) {\n // new directive, bind\n callHook$1(dir, 'bind', vnode, oldVnode);\n if (dir.def && dir.def.inserted) {\n dirsWithInsert.push(dir);\n }\n } else {\n // existing directive, update\n dir.oldValue = oldDir.value;\n callHook$1(dir, 'update', vnode, oldVnode);\n if (dir.def && dir.def.componentUpdated) {\n dirsWithPostpatch.push(dir);\n }\n }\n }\n\n if (dirsWithInsert.length) {\n var callInsert = function () {\n for (var i = 0; i < dirsWithInsert.length; i++) {\n callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n }\n };\n if (isCreate) {\n mergeVNodeHook(vnode, 'insert', callInsert);\n } else {\n callInsert();\n }\n }\n\n if (dirsWithPostpatch.length) {\n mergeVNodeHook(vnode, 'postpatch', function () {\n for (var i = 0; i < dirsWithPostpatch.length; i++) {\n callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n }\n });\n }\n\n if (!isCreate) {\n for (key in oldDirs) {\n if (!newDirs[key]) {\n // no longer present, unbind\n callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n }\n }\n }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n dirs,\n vm\n) {\n var res = Object.create(null);\n if (!dirs) {\n // $flow-disable-line\n return res\n }\n var i, dir;\n for (i = 0; i < dirs.length; i++) {\n dir = dirs[i];\n if (!dir.modifiers) {\n // $flow-disable-line\n dir.modifiers = emptyModifiers;\n }\n res[getRawDirName(dir)] = dir;\n dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n }\n // $flow-disable-line\n return res\n}\n\nfunction getRawDirName (dir) {\n return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n var fn = dir.def && dir.def[hook];\n if (fn) {\n try {\n fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n } catch (e) {\n handleError(e, vnode.context, (\"directive \" + (dir.name) + \" \" + hook + \" hook\"));\n }\n }\n}\n\nvar baseModules = [\n ref,\n directives\n]\n\n/* */\n\nfunction updateAttrs (oldVnode, vnode) {\n var opts = vnode.componentOptions;\n if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n return\n }\n if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n return\n }\n var key, cur, old;\n var elm = vnode.elm;\n var oldAttrs = oldVnode.data.attrs || {};\n var attrs = vnode.data.attrs || {};\n // clone observed objects, as the user probably wants to mutate it\n if (isDef(attrs.__ob__)) {\n attrs = vnode.data.attrs = extend({}, attrs);\n }\n\n for (key in attrs) {\n cur = attrs[key];\n old = oldAttrs[key];\n if (old !== cur) {\n setAttr(elm, key, cur);\n }\n }\n // #4391: in IE9, setting type can reset value for input[type=radio]\n // #6666: IE/Edge forces progress value down to 1 before setting a max\n /* istanbul ignore if */\n if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n setAttr(elm, 'value', attrs.value);\n }\n for (key in oldAttrs) {\n if (isUndef(attrs[key])) {\n if (isXlink(key)) {\n elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n } else if (!isEnumeratedAttr(key)) {\n elm.removeAttribute(key);\n }\n }\n }\n}\n\nfunction setAttr (el, key, value) {\n if (el.tagName.indexOf('-') > -1) {\n baseSetAttr(el, key, value);\n } else if (isBooleanAttr(key)) {\n // set attribute for blank value\n // e.g. <option disabled>Select one</option>\n if (isFalsyAttrValue(value)) {\n el.removeAttribute(key);\n } else {\n // technically allowfullscreen is a boolean attribute for <iframe>,\n // but Flash expects a value of \"true\" when used on <embed> tag\n value = key === 'allowfullscreen' && el.tagName === 'EMBED'\n ? 'true'\n : key;\n el.setAttribute(key, value);\n }\n } else if (isEnumeratedAttr(key)) {\n el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\n } else if (isXlink(key)) {\n if (isFalsyAttrValue(value)) {\n el.removeAttributeNS(xlinkNS, getXlinkProp(key));\n } else {\n el.setAttributeNS(xlinkNS, key, value);\n }\n } else {\n baseSetAttr(el, key, value);\n }\n}\n\nfunction baseSetAttr (el, key, value) {\n if (isFalsyAttrValue(value)) {\n el.removeAttribute(key);\n } else {\n // #7138: IE10 & 11 fires input event when setting placeholder on\n // <textarea>... block the first input event and remove the blocker\n // immediately.\n /* istanbul ignore if */\n if (\n isIE && !isIE9 &&\n el.tagName === 'TEXTAREA' &&\n key === 'placeholder' && !el.__ieph\n ) {\n var blocker = function (e) {\n e.stopImmediatePropagation();\n el.removeEventListener('input', blocker);\n };\n el.addEventListener('input', blocker);\n // $flow-disable-line\n el.__ieph = true; /* IE placeholder patched */\n }\n el.setAttribute(key, value);\n }\n}\n\nvar attrs = {\n create: updateAttrs,\n update: updateAttrs\n}\n\n/* */\n\nfunction updateClass (oldVnode, vnode) {\n var el = vnode.elm;\n var data = vnode.data;\n var oldData = oldVnode.data;\n if (\n isUndef(data.staticClass) &&\n isUndef(data.class) && (\n isUndef(oldData) || (\n isUndef(oldData.staticClass) &&\n isUndef(oldData.class)\n )\n )\n ) {\n return\n }\n\n var cls = genClassForVnode(vnode);\n\n // handle transition classes\n var transitionClass = el._transitionClasses;\n if (isDef(transitionClass)) {\n cls = concat(cls, stringifyClass(transitionClass));\n }\n\n // set the class\n if (cls !== el._prevClass) {\n el.setAttribute('class', cls);\n el._prevClass = cls;\n }\n}\n\nvar klass = {\n create: updateClass,\n update: updateClass\n}\n\n/* */\n\nvar validDivisionCharRE = /[\\w).+\\-_$\\]]/;\n\nfunction parseFilters (exp) {\n var inSingle = false;\n var inDouble = false;\n var inTemplateString = false;\n var inRegex = false;\n var curly = 0;\n var square = 0;\n var paren = 0;\n var lastFilterIndex = 0;\n var c, prev, i, expression, filters;\n\n for (i = 0; i < exp.length; i++) {\n prev = c;\n c = exp.charCodeAt(i);\n if (inSingle) {\n if (c === 0x27 && prev !== 0x5C) { inSingle = false; }\n } else if (inDouble) {\n if (c === 0x22 && prev !== 0x5C) { inDouble = false; }\n } else if (inTemplateString) {\n if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }\n } else if (inRegex) {\n if (c === 0x2f && prev !== 0x5C) { inRegex = false; }\n } else if (\n c === 0x7C && // pipe\n exp.charCodeAt(i + 1) !== 0x7C &&\n exp.charCodeAt(i - 1) !== 0x7C &&\n !curly && !square && !paren\n ) {\n if (expression === undefined) {\n // first filter, end of expression\n lastFilterIndex = i + 1;\n expression = exp.slice(0, i).trim();\n } else {\n pushFilter();\n }\n } else {\n switch (c) {\n case 0x22: inDouble = true; break // \"\n case 0x27: inSingle = true; break // '\n case 0x60: inTemplateString = true; break // `\n case 0x28: paren++; break // (\n case 0x29: paren--; break // )\n case 0x5B: square++; break // [\n case 0x5D: square--; break // ]\n case 0x7B: curly++; break // {\n case 0x7D: curly--; break // }\n }\n if (c === 0x2f) { // /\n var j = i - 1;\n var p = (void 0);\n // find first non-whitespace prev char\n for (; j >= 0; j--) {\n p = exp.charAt(j);\n if (p !== ' ') { break }\n }\n if (!p || !validDivisionCharRE.test(p)) {\n inRegex = true;\n }\n }\n }\n }\n\n if (expression === undefined) {\n expression = exp.slice(0, i).trim();\n } else if (lastFilterIndex !== 0) {\n pushFilter();\n }\n\n function pushFilter () {\n (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\n lastFilterIndex = i + 1;\n }\n\n if (filters) {\n for (i = 0; i < filters.length; i++) {\n expression = wrapFilter(expression, filters[i]);\n }\n }\n\n return expression\n}\n\nfunction wrapFilter (exp, filter) {\n var i = filter.indexOf('(');\n if (i < 0) {\n // _f: resolveFilter\n return (\"_f(\\\"\" + filter + \"\\\")(\" + exp + \")\")\n } else {\n var name = filter.slice(0, i);\n var args = filter.slice(i + 1);\n return (\"_f(\\\"\" + name + \"\\\")(\" + exp + (args !== ')' ? ',' + args : args))\n }\n}\n\n/* */\n\nfunction baseWarn (msg) {\n console.error((\"[Vue compiler]: \" + msg));\n}\n\nfunction pluckModuleFunction (\n modules,\n key\n) {\n return modules\n ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })\n : []\n}\n\nfunction addProp (el, name, value) {\n (el.props || (el.props = [])).push({ name: name, value: value });\n el.plain = false;\n}\n\nfunction addAttr (el, name, value) {\n (el.attrs || (el.attrs = [])).push({ name: name, value: value });\n el.plain = false;\n}\n\n// add a raw attr (use this in preTransforms)\nfunction addRawAttr (el, name, value) {\n el.attrsMap[name] = value;\n el.attrsList.push({ name: name, value: value });\n}\n\nfunction addDirective (\n el,\n name,\n rawName,\n value,\n arg,\n modifiers\n) {\n (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });\n el.plain = false;\n}\n\nfunction addHandler (\n el,\n name,\n value,\n modifiers,\n important,\n warn\n) {\n modifiers = modifiers || emptyObject;\n // warn prevent and passive modifier\n /* istanbul ignore if */\n if (\n process.env.NODE_ENV !== 'production' && warn &&\n modifiers.prevent && modifiers.passive\n ) {\n warn(\n 'passive and prevent can\\'t be used together. ' +\n 'Passive handler can\\'t prevent default event.'\n );\n }\n\n // check capture modifier\n if (modifiers.capture) {\n delete modifiers.capture;\n name = '!' + name; // mark the event as captured\n }\n if (modifiers.once) {\n delete modifiers.once;\n name = '~' + name; // mark the event as once\n }\n /* istanbul ignore if */\n if (modifiers.passive) {\n delete modifiers.passive;\n name = '&' + name; // mark the event as passive\n }\n\n // normalize click.right and click.middle since they don't actually fire\n // this is technically browser-specific, but at least for now browsers are\n // the only target envs that have right/middle clicks.\n if (name === 'click') {\n if (modifiers.right) {\n name = 'contextmenu';\n delete modifiers.right;\n } else if (modifiers.middle) {\n name = 'mouseup';\n }\n }\n\n var events;\n if (modifiers.native) {\n delete modifiers.native;\n events = el.nativeEvents || (el.nativeEvents = {});\n } else {\n events = el.events || (el.events = {});\n }\n\n var newHandler = {\n value: value.trim()\n };\n if (modifiers !== emptyObject) {\n newHandler.modifiers = modifiers;\n }\n\n var handlers = events[name];\n /* istanbul ignore if */\n if (Array.isArray(handlers)) {\n important ? handlers.unshift(newHandler) : handlers.push(newHandler);\n } else if (handlers) {\n events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\n } else {\n events[name] = newHandler;\n }\n\n el.plain = false;\n}\n\nfunction getBindingAttr (\n el,\n name,\n getStatic\n) {\n var dynamicValue =\n getAndRemoveAttr(el, ':' + name) ||\n getAndRemoveAttr(el, 'v-bind:' + name);\n if (dynamicValue != null) {\n return parseFilters(dynamicValue)\n } else if (getStatic !== false) {\n var staticValue = getAndRemoveAttr(el, name);\n if (staticValue != null) {\n return JSON.stringify(staticValue)\n }\n }\n}\n\n// note: this only removes the attr from the Array (attrsList) so that it\n// doesn't get processed by processAttrs.\n// By default it does NOT remove it from the map (attrsMap) because the map is\n// needed during codegen.\nfunction getAndRemoveAttr (\n el,\n name,\n removeFromMap\n) {\n var val;\n if ((val = el.attrsMap[name]) != null) {\n var list = el.attrsList;\n for (var i = 0, l = list.length; i < l; i++) {\n if (list[i].name === name) {\n list.splice(i, 1);\n break\n }\n }\n }\n if (removeFromMap) {\n delete el.attrsMap[name];\n }\n return val\n}\n\n/* */\n\n/**\n * Cross-platform code generation for component v-model\n */\nfunction genComponentModel (\n el,\n value,\n modifiers\n) {\n var ref = modifiers || {};\n var number = ref.number;\n var trim = ref.trim;\n\n var baseValueExpression = '$$v';\n var valueExpression = baseValueExpression;\n if (trim) {\n valueExpression =\n \"(typeof \" + baseValueExpression + \" === 'string'\" +\n \"? \" + baseValueExpression + \".trim()\" +\n \": \" + baseValueExpression + \")\";\n }\n if (number) {\n valueExpression = \"_n(\" + valueExpression + \")\";\n }\n var assignment = genAssignmentCode(value, valueExpression);\n\n el.model = {\n value: (\"(\" + value + \")\"),\n expression: (\"\\\"\" + value + \"\\\"\"),\n callback: (\"function (\" + baseValueExpression + \") {\" + assignment + \"}\")\n };\n}\n\n/**\n * Cross-platform codegen helper for generating v-model value assignment code.\n */\nfunction genAssignmentCode (\n value,\n assignment\n) {\n var res = parseModel(value);\n if (res.key === null) {\n return (value + \"=\" + assignment)\n } else {\n return (\"$set(\" + (res.exp) + \", \" + (res.key) + \", \" + assignment + \")\")\n }\n}\n\n/**\n * Parse a v-model expression into a base path and a final key segment.\n * Handles both dot-path and possible square brackets.\n *\n * Possible cases:\n *\n * - test\n * - test[key]\n * - test[test1[key]]\n * - test[\"a\"][key]\n * - xxx.test[a[a].test1[key]]\n * - test.xxx.a[\"asa\"][test1[key]]\n *\n */\n\nvar len;\nvar str;\nvar chr;\nvar index$1;\nvar expressionPos;\nvar expressionEndPos;\n\n\n\nfunction parseModel (val) {\n // Fix https://github.com/vuejs/vue/pull/7730\n // allow v-model=\"obj.val \" (trailing whitespace)\n val = val.trim();\n len = val.length;\n\n if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\n index$1 = val.lastIndexOf('.');\n if (index$1 > -1) {\n return {\n exp: val.slice(0, index$1),\n key: '\"' + val.slice(index$1 + 1) + '\"'\n }\n } else {\n return {\n exp: val,\n key: null\n }\n }\n }\n\n str = val;\n index$1 = expressionPos = expressionEndPos = 0;\n\n while (!eof()) {\n chr = next();\n /* istanbul ignore if */\n if (isStringStart(chr)) {\n parseString(chr);\n } else if (chr === 0x5B) {\n parseBracket(chr);\n }\n }\n\n return {\n exp: val.slice(0, expressionPos),\n key: val.slice(expressionPos + 1, expressionEndPos)\n }\n}\n\nfunction next () {\n return str.charCodeAt(++index$1)\n}\n\nfunction eof () {\n return index$1 >= len\n}\n\nfunction isStringStart (chr) {\n return chr === 0x22 || chr === 0x27\n}\n\nfunction parseBracket (chr) {\n var inBracket = 1;\n expressionPos = index$1;\n while (!eof()) {\n chr = next();\n if (isStringStart(chr)) {\n parseString(chr);\n continue\n }\n if (chr === 0x5B) { inBracket++; }\n if (chr === 0x5D) { inBracket--; }\n if (inBracket === 0) {\n expressionEndPos = index$1;\n break\n }\n }\n}\n\nfunction parseString (chr) {\n var stringQuote = chr;\n while (!eof()) {\n chr = next();\n if (chr === stringQuote) {\n break\n }\n }\n}\n\n/* */\n\nvar warn$1;\n\n// in some cases, the event used has to be determined at runtime\n// so we used some reserved tokens during compile.\nvar RANGE_TOKEN = '__r';\nvar CHECKBOX_RADIO_TOKEN = '__c';\n\nfunction model (\n el,\n dir,\n _warn\n) {\n warn$1 = _warn;\n var value = dir.value;\n var modifiers = dir.modifiers;\n var tag = el.tag;\n var type = el.attrsMap.type;\n\n if (process.env.NODE_ENV !== 'production') {\n // inputs with type=\"file\" are read only and setting the input's\n // value will throw an error.\n if (tag === 'input' && type === 'file') {\n warn$1(\n \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\" type=\\\"file\\\">:\\n\" +\n \"File inputs are read only. Use a v-on:change listener instead.\"\n );\n }\n }\n\n if (el.component) {\n genComponentModel(el, value, modifiers);\n // component v-model doesn't need extra runtime\n return false\n } else if (tag === 'select') {\n genSelect(el, value, modifiers);\n } else if (tag === 'input' && type === 'checkbox') {\n genCheckboxModel(el, value, modifiers);\n } else if (tag === 'input' && type === 'radio') {\n genRadioModel(el, value, modifiers);\n } else if (tag === 'input' || tag === 'textarea') {\n genDefaultModel(el, value, modifiers);\n } else if (!config.isReservedTag(tag)) {\n genComponentModel(el, value, modifiers);\n // component v-model doesn't need extra runtime\n return false\n } else if (process.env.NODE_ENV !== 'production') {\n warn$1(\n \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n \"v-model is not supported on this element type. \" +\n 'If you are working with contenteditable, it\\'s recommended to ' +\n 'wrap a library dedicated for that purpose inside a custom component.'\n );\n }\n\n // ensure runtime directive metadata\n return true\n}\n\nfunction genCheckboxModel (\n el,\n value,\n modifiers\n) {\n var number = modifiers && modifiers.number;\n var valueBinding = getBindingAttr(el, 'value') || 'null';\n var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\n var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\n addProp(el, 'checked',\n \"Array.isArray(\" + value + \")\" +\n \"?_i(\" + value + \",\" + valueBinding + \")>-1\" + (\n trueValueBinding === 'true'\n ? (\":(\" + value + \")\")\n : (\":_q(\" + value + \",\" + trueValueBinding + \")\")\n )\n );\n addHandler(el, 'change',\n \"var $$a=\" + value + \",\" +\n '$$el=$event.target,' +\n \"$$c=$$el.checked?(\" + trueValueBinding + \"):(\" + falseValueBinding + \");\" +\n 'if(Array.isArray($$a)){' +\n \"var $$v=\" + (number ? '_n(' + valueBinding + ')' : valueBinding) + \",\" +\n '$$i=_i($$a,$$v);' +\n \"if($$el.checked){$$i<0&&(\" + (genAssignmentCode(value, '$$a.concat([$$v])')) + \")}\" +\n \"else{$$i>-1&&(\" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + \")}\" +\n \"}else{\" + (genAssignmentCode(value, '$$c')) + \"}\",\n null, true\n );\n}\n\nfunction genRadioModel (\n el,\n value,\n modifiers\n) {\n var number = modifiers && modifiers.number;\n var valueBinding = getBindingAttr(el, 'value') || 'null';\n valueBinding = number ? (\"_n(\" + valueBinding + \")\") : valueBinding;\n addProp(el, 'checked', (\"_q(\" + value + \",\" + valueBinding + \")\"));\n addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);\n}\n\nfunction genSelect (\n el,\n value,\n modifiers\n) {\n var number = modifiers && modifiers.number;\n var selectedVal = \"Array.prototype.filter\" +\n \".call($event.target.options,function(o){return o.selected})\" +\n \".map(function(o){var val = \\\"_value\\\" in o ? o._value : o.value;\" +\n \"return \" + (number ? '_n(val)' : 'val') + \"})\";\n\n var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';\n var code = \"var $$selectedVal = \" + selectedVal + \";\";\n code = code + \" \" + (genAssignmentCode(value, assignment));\n addHandler(el, 'change', code, null, true);\n}\n\nfunction genDefaultModel (\n el,\n value,\n modifiers\n) {\n var type = el.attrsMap.type;\n\n // warn if v-bind:value conflicts with v-model\n // except for inputs with v-bind:type\n if (process.env.NODE_ENV !== 'production') {\n var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];\n var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\n if (value$1 && !typeBinding) {\n var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';\n warn$1(\n binding + \"=\\\"\" + value$1 + \"\\\" conflicts with v-model on the same element \" +\n 'because the latter already expands to a value binding internally'\n );\n }\n }\n\n var ref = modifiers || {};\n var lazy = ref.lazy;\n var number = ref.number;\n var trim = ref.trim;\n var needCompositionGuard = !lazy && type !== 'range';\n var event = lazy\n ? 'change'\n : type === 'range'\n ? RANGE_TOKEN\n : 'input';\n\n var valueExpression = '$event.target.value';\n if (trim) {\n valueExpression = \"$event.target.value.trim()\";\n }\n if (number) {\n valueExpression = \"_n(\" + valueExpression + \")\";\n }\n\n var code = genAssignmentCode(value, valueExpression);\n if (needCompositionGuard) {\n code = \"if($event.target.composing)return;\" + code;\n }\n\n addProp(el, 'value', (\"(\" + value + \")\"));\n addHandler(el, event, code, null, true);\n if (trim || number) {\n addHandler(el, 'blur', '$forceUpdate()');\n }\n}\n\n/* */\n\n// normalize v-model event tokens that can only be determined at runtime.\n// it's important to place the event as the first in the array because\n// the whole point is ensuring the v-model callback gets called before\n// user-attached handlers.\nfunction normalizeEvents (on) {\n /* istanbul ignore if */\n if (isDef(on[RANGE_TOKEN])) {\n // IE input[type=range] only supports `change` event\n var event = isIE ? 'change' : 'input';\n on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n delete on[RANGE_TOKEN];\n }\n // This was originally intended to fix #4521 but no longer necessary\n // after 2.5. Keeping it for backwards compat with generated code from < 2.4\n /* istanbul ignore if */\n if (isDef(on[CHECKBOX_RADIO_TOKEN])) {\n on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);\n delete on[CHECKBOX_RADIO_TOKEN];\n }\n}\n\nvar target$1;\n\nfunction createOnceHandler (handler, event, capture) {\n var _target = target$1; // save current target element in closure\n return function onceHandler () {\n var res = handler.apply(null, arguments);\n if (res !== null) {\n remove$2(event, onceHandler, capture, _target);\n }\n }\n}\n\nfunction add$1 (\n event,\n handler,\n once$$1,\n capture,\n passive\n) {\n handler = withMacroTask(handler);\n if (once$$1) { handler = createOnceHandler(handler, event, capture); }\n target$1.addEventListener(\n event,\n handler,\n supportsPassive\n ? { capture: capture, passive: passive }\n : capture\n );\n}\n\nfunction remove$2 (\n event,\n handler,\n capture,\n _target\n) {\n (_target || target$1).removeEventListener(\n event,\n handler._withTask || handler,\n capture\n );\n}\n\nfunction updateDOMListeners (oldVnode, vnode) {\n if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {\n return\n }\n var on = vnode.data.on || {};\n var oldOn = oldVnode.data.on || {};\n target$1 = vnode.elm;\n normalizeEvents(on);\n updateListeners(on, oldOn, add$1, remove$2, vnode.context);\n target$1 = undefined;\n}\n\nvar events = {\n create: updateDOMListeners,\n update: updateDOMListeners\n}\n\n/* */\n\nfunction updateDOMProps (oldVnode, vnode) {\n if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {\n return\n }\n var key, cur;\n var elm = vnode.elm;\n var oldProps = oldVnode.data.domProps || {};\n var props = vnode.data.domProps || {};\n // clone observed objects, as the user probably wants to mutate it\n if (isDef(props.__ob__)) {\n props = vnode.data.domProps = extend({}, props);\n }\n\n for (key in oldProps) {\n if (isUndef(props[key])) {\n elm[key] = '';\n }\n }\n for (key in props) {\n cur = props[key];\n // ignore children if the node has textContent or innerHTML,\n // as these will throw away existing DOM nodes and cause removal errors\n // on subsequent patches (#3360)\n if (key === 'textContent' || key === 'innerHTML') {\n if (vnode.children) { vnode.children.length = 0; }\n if (cur === oldProps[key]) { continue }\n // #6601 work around Chrome version <= 55 bug where single textNode\n // replaced by innerHTML/textContent retains its parentNode property\n if (elm.childNodes.length === 1) {\n elm.removeChild(elm.childNodes[0]);\n }\n }\n\n if (key === 'value') {\n // store value as _value as well since\n // non-string values will be stringified\n elm._value = cur;\n // avoid resetting cursor position when value is the same\n var strCur = isUndef(cur) ? '' : String(cur);\n if (shouldUpdateValue(elm, strCur)) {\n elm.value = strCur;\n }\n } else {\n elm[key] = cur;\n }\n }\n}\n\n// check platforms/web/util/attrs.js acceptValue\n\n\nfunction shouldUpdateValue (elm, checkVal) {\n return (!elm.composing && (\n elm.tagName === 'OPTION' ||\n isNotInFocusAndDirty(elm, checkVal) ||\n isDirtyWithModifiers(elm, checkVal)\n ))\n}\n\nfunction isNotInFocusAndDirty (elm, checkVal) {\n // return true when textbox (.number and .trim) loses focus and its value is\n // not equal to the updated value\n var notInFocus = true;\n // #6157\n // work around IE bug when accessing document.activeElement in an iframe\n try { notInFocus = document.activeElement !== elm; } catch (e) {}\n return notInFocus && elm.value !== checkVal\n}\n\nfunction isDirtyWithModifiers (elm, newVal) {\n var value = elm.value;\n var modifiers = elm._vModifiers; // injected by v-model runtime\n if (isDef(modifiers)) {\n if (modifiers.lazy) {\n // inputs with lazy should only be updated when not in focus\n return false\n }\n if (modifiers.number) {\n return toNumber(value) !== toNumber(newVal)\n }\n if (modifiers.trim) {\n return value.trim() !== newVal.trim()\n }\n }\n return value !== newVal\n}\n\nvar domProps = {\n create: updateDOMProps,\n update: updateDOMProps\n}\n\n/* */\n\nvar parseStyleText = cached(function (cssText) {\n var res = {};\n var listDelimiter = /;(?![^(]*\\))/g;\n var propertyDelimiter = /:(.+)/;\n cssText.split(listDelimiter).forEach(function (item) {\n if (item) {\n var tmp = item.split(propertyDelimiter);\n tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return res\n});\n\n// merge static and dynamic style data on the same vnode\nfunction normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n : style\n}\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n if (Array.isArray(bindingStyle)) {\n return toObject(bindingStyle)\n }\n if (typeof bindingStyle === 'string') {\n return parseStyleText(bindingStyle)\n }\n return bindingStyle\n}\n\n/**\n * parent component style should be after child's\n * so that parent component's style could override it\n */\nfunction getStyle (vnode, checkChild) {\n var res = {};\n var styleData;\n\n if (checkChild) {\n var childNode = vnode;\n while (childNode.componentInstance) {\n childNode = childNode.componentInstance._vnode;\n if (\n childNode && childNode.data &&\n (styleData = normalizeStyleData(childNode.data))\n ) {\n extend(res, styleData);\n }\n }\n }\n\n if ((styleData = normalizeStyleData(vnode.data))) {\n extend(res, styleData);\n }\n\n var parentNode = vnode;\n while ((parentNode = parentNode.parent)) {\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\n extend(res, styleData);\n }\n }\n return res\n}\n\n/* */\n\nvar cssVarRE = /^--/;\nvar importantRE = /\\s*!important$/;\nvar setProp = function (el, name, val) {\n /* istanbul ignore if */\n if (cssVarRE.test(name)) {\n el.style.setProperty(name, val);\n } else if (importantRE.test(val)) {\n el.style.setProperty(name, val.replace(importantRE, ''), 'important');\n } else {\n var normalizedName = normalize(name);\n if (Array.isArray(val)) {\n // Support values array created by autoprefixer, e.g.\n // {display: [\"-webkit-box\", \"-ms-flexbox\", \"flex\"]}\n // Set them one by one, and the browser will only set those it can recognize\n for (var i = 0, len = val.length; i < len; i++) {\n el.style[normalizedName] = val[i];\n }\n } else {\n el.style[normalizedName] = val;\n }\n }\n};\n\nvar vendorNames = ['Webkit', 'Moz', 'ms'];\n\nvar emptyStyle;\nvar normalize = cached(function (prop) {\n emptyStyle = emptyStyle || document.createElement('div').style;\n prop = camelize(prop);\n if (prop !== 'filter' && (prop in emptyStyle)) {\n return prop\n }\n var capName = prop.charAt(0).toUpperCase() + prop.slice(1);\n for (var i = 0; i < vendorNames.length; i++) {\n var name = vendorNames[i] + capName;\n if (name in emptyStyle) {\n return name\n }\n }\n});\n\nfunction updateStyle (oldVnode, vnode) {\n var data = vnode.data;\n var oldData = oldVnode.data;\n\n if (isUndef(data.staticStyle) && isUndef(data.style) &&\n isUndef(oldData.staticStyle) && isUndef(oldData.style)\n ) {\n return\n }\n\n var cur, name;\n var el = vnode.elm;\n var oldStaticStyle = oldData.staticStyle;\n var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};\n\n // if static style exists, stylebinding already merged into it when doing normalizeStyleData\n var oldStyle = oldStaticStyle || oldStyleBinding;\n\n var style = normalizeStyleBinding(vnode.data.style) || {};\n\n // store normalized style under a different key for next diff\n // make sure to clone it if it's reactive, since the user likely wants\n // to mutate it.\n vnode.data.normalizedStyle = isDef(style.__ob__)\n ? extend({}, style)\n : style;\n\n var newStyle = getStyle(vnode, true);\n\n for (name in oldStyle) {\n if (isUndef(newStyle[name])) {\n setProp(el, name, '');\n }\n }\n for (name in newStyle) {\n cur = newStyle[name];\n if (cur !== oldStyle[name]) {\n // ie9 setting to null has no effect, must use empty string\n setProp(el, name, cur == null ? '' : cur);\n }\n }\n}\n\nvar style = {\n create: updateStyle,\n update: updateStyle\n}\n\n/* */\n\n/**\n * Add class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction addClass (el, cls) {\n /* istanbul ignore if */\n if (!cls || !(cls = cls.trim())) {\n return\n }\n\n /* istanbul ignore else */\n if (el.classList) {\n if (cls.indexOf(' ') > -1) {\n cls.split(/\\s+/).forEach(function (c) { return el.classList.add(c); });\n } else {\n el.classList.add(cls);\n }\n } else {\n var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n if (cur.indexOf(' ' + cls + ' ') < 0) {\n el.setAttribute('class', (cur + cls).trim());\n }\n }\n}\n\n/**\n * Remove class with compatibility for SVG since classList is not supported on\n * SVG elements in IE\n */\nfunction removeClass (el, cls) {\n /* istanbul ignore if */\n if (!cls || !(cls = cls.trim())) {\n return\n }\n\n /* istanbul ignore else */\n if (el.classList) {\n if (cls.indexOf(' ') > -1) {\n cls.split(/\\s+/).forEach(function (c) { return el.classList.remove(c); });\n } else {\n el.classList.remove(cls);\n }\n if (!el.classList.length) {\n el.removeAttribute('class');\n }\n } else {\n var cur = \" \" + (el.getAttribute('class') || '') + \" \";\n var tar = ' ' + cls + ' ';\n while (cur.indexOf(tar) >= 0) {\n cur = cur.replace(tar, ' ');\n }\n cur = cur.trim();\n if (cur) {\n el.setAttribute('class', cur);\n } else {\n el.removeAttribute('class');\n }\n }\n}\n\n/* */\n\nfunction resolveTransition (def) {\n if (!def) {\n return\n }\n /* istanbul ignore else */\n if (typeof def === 'object') {\n var res = {};\n if (def.css !== false) {\n extend(res, autoCssTransition(def.name || 'v'));\n }\n extend(res, def);\n return res\n } else if (typeof def === 'string') {\n return autoCssTransition(def)\n }\n}\n\nvar autoCssTransition = cached(function (name) {\n return {\n enterClass: (name + \"-enter\"),\n enterToClass: (name + \"-enter-to\"),\n enterActiveClass: (name + \"-enter-active\"),\n leaveClass: (name + \"-leave\"),\n leaveToClass: (name + \"-leave-to\"),\n leaveActiveClass: (name + \"-leave-active\")\n }\n});\n\nvar hasTransition = inBrowser && !isIE9;\nvar TRANSITION = 'transition';\nvar ANIMATION = 'animation';\n\n// Transition property/event sniffing\nvar transitionProp = 'transition';\nvar transitionEndEvent = 'transitionend';\nvar animationProp = 'animation';\nvar animationEndEvent = 'animationend';\nif (hasTransition) {\n /* istanbul ignore if */\n if (window.ontransitionend === undefined &&\n window.onwebkittransitionend !== undefined\n ) {\n transitionProp = 'WebkitTransition';\n transitionEndEvent = 'webkitTransitionEnd';\n }\n if (window.onanimationend === undefined &&\n window.onwebkitanimationend !== undefined\n ) {\n animationProp = 'WebkitAnimation';\n animationEndEvent = 'webkitAnimationEnd';\n }\n}\n\n// binding to window is necessary to make hot reload work in IE in strict mode\nvar raf = inBrowser\n ? window.requestAnimationFrame\n ? window.requestAnimationFrame.bind(window)\n : setTimeout\n : /* istanbul ignore next */ function (fn) { return fn(); };\n\nfunction nextFrame (fn) {\n raf(function () {\n raf(fn);\n });\n}\n\nfunction addTransitionClass (el, cls) {\n var transitionClasses = el._transitionClasses || (el._transitionClasses = []);\n if (transitionClasses.indexOf(cls) < 0) {\n transitionClasses.push(cls);\n addClass(el, cls);\n }\n}\n\nfunction removeTransitionClass (el, cls) {\n if (el._transitionClasses) {\n remove(el._transitionClasses, cls);\n }\n removeClass(el, cls);\n}\n\nfunction whenTransitionEnds (\n el,\n expectedType,\n cb\n) {\n var ref = getTransitionInfo(el, expectedType);\n var type = ref.type;\n var timeout = ref.timeout;\n var propCount = ref.propCount;\n if (!type) { return cb() }\n var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\n var ended = 0;\n var end = function () {\n el.removeEventListener(event, onEnd);\n cb();\n };\n var onEnd = function (e) {\n if (e.target === el) {\n if (++ended >= propCount) {\n end();\n }\n }\n };\n setTimeout(function () {\n if (ended < propCount) {\n end();\n }\n }, timeout + 1);\n el.addEventListener(event, onEnd);\n}\n\nvar transformRE = /\\b(transform|all)(,|$)/;\n\nfunction getTransitionInfo (el, expectedType) {\n var styles = window.getComputedStyle(el);\n var transitionDelays = styles[transitionProp + 'Delay'].split(', ');\n var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\n var transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n var animationDelays = styles[animationProp + 'Delay'].split(', ');\n var animationDurations = styles[animationProp + 'Duration'].split(', ');\n var animationTimeout = getTimeout(animationDelays, animationDurations);\n\n var type;\n var timeout = 0;\n var propCount = 0;\n /* istanbul ignore if */\n if (expectedType === TRANSITION) {\n if (transitionTimeout > 0) {\n type = TRANSITION;\n timeout = transitionTimeout;\n propCount = transitionDurations.length;\n }\n } else if (expectedType === ANIMATION) {\n if (animationTimeout > 0) {\n type = ANIMATION;\n timeout = animationTimeout;\n propCount = animationDurations.length;\n }\n } else {\n timeout = Math.max(transitionTimeout, animationTimeout);\n type = timeout > 0\n ? transitionTimeout > animationTimeout\n ? TRANSITION\n : ANIMATION\n : null;\n propCount = type\n ? type === TRANSITION\n ? transitionDurations.length\n : animationDurations.length\n : 0;\n }\n var hasTransform =\n type === TRANSITION &&\n transformRE.test(styles[transitionProp + 'Property']);\n return {\n type: type,\n timeout: timeout,\n propCount: propCount,\n hasTransform: hasTransform\n }\n}\n\nfunction getTimeout (delays, durations) {\n /* istanbul ignore next */\n while (delays.length < durations.length) {\n delays = delays.concat(delays);\n }\n\n return Math.max.apply(null, durations.map(function (d, i) {\n return toMs(d) + toMs(delays[i])\n }))\n}\n\nfunction toMs (s) {\n return Number(s.slice(0, -1)) * 1000\n}\n\n/* */\n\nfunction enter (vnode, toggleDisplay) {\n var el = vnode.elm;\n\n // call leave callback now\n if (isDef(el._leaveCb)) {\n el._leaveCb.cancelled = true;\n el._leaveCb();\n }\n\n var data = resolveTransition(vnode.data.transition);\n if (isUndef(data)) {\n return\n }\n\n /* istanbul ignore if */\n if (isDef(el._enterCb) || el.nodeType !== 1) {\n return\n }\n\n var css = data.css;\n var type = data.type;\n var enterClass = data.enterClass;\n var enterToClass = data.enterToClass;\n var enterActiveClass = data.enterActiveClass;\n var appearClass = data.appearClass;\n var appearToClass = data.appearToClass;\n var appearActiveClass = data.appearActiveClass;\n var beforeEnter = data.beforeEnter;\n var enter = data.enter;\n var afterEnter = data.afterEnter;\n var enterCancelled = data.enterCancelled;\n var beforeAppear = data.beforeAppear;\n var appear = data.appear;\n var afterAppear = data.afterAppear;\n var appearCancelled = data.appearCancelled;\n var duration = data.duration;\n\n // activeInstance will always be the <transition> component managing this\n // transition. One edge case to check is when the <transition> is placed\n // as the root node of a child component. In that case we need to check\n // <transition>'s parent for appear check.\n var context = activeInstance;\n var transitionNode = activeInstance.$vnode;\n while (transitionNode && transitionNode.parent) {\n transitionNode = transitionNode.parent;\n context = transitionNode.context;\n }\n\n var isAppear = !context._isMounted || !vnode.isRootInsert;\n\n if (isAppear && !appear && appear !== '') {\n return\n }\n\n var startClass = isAppear && appearClass\n ? appearClass\n : enterClass;\n var activeClass = isAppear && appearActiveClass\n ? appearActiveClass\n : enterActiveClass;\n var toClass = isAppear && appearToClass\n ? appearToClass\n : enterToClass;\n\n var beforeEnterHook = isAppear\n ? (beforeAppear || beforeEnter)\n : beforeEnter;\n var enterHook = isAppear\n ? (typeof appear === 'function' ? appear : enter)\n : enter;\n var afterEnterHook = isAppear\n ? (afterAppear || afterEnter)\n : afterEnter;\n var enterCancelledHook = isAppear\n ? (appearCancelled || enterCancelled)\n : enterCancelled;\n\n var explicitEnterDuration = toNumber(\n isObject(duration)\n ? duration.enter\n : duration\n );\n\n if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {\n checkDuration(explicitEnterDuration, 'enter', vnode);\n }\n\n var expectsCSS = css !== false && !isIE9;\n var userWantsControl = getHookArgumentsLength(enterHook);\n\n var cb = el._enterCb = once(function () {\n if (expectsCSS) {\n removeTransitionClass(el, toClass);\n removeTransitionClass(el, activeClass);\n }\n if (cb.cancelled) {\n if (expectsCSS) {\n removeTransitionClass(el, startClass);\n }\n enterCancelledHook && enterCancelledHook(el);\n } else {\n afterEnterHook && afterEnterHook(el);\n }\n el._enterCb = null;\n });\n\n if (!vnode.data.show) {\n // remove pending leave element on enter by injecting an insert hook\n mergeVNodeHook(vnode, 'insert', function () {\n var parent = el.parentNode;\n var pendingNode = parent && parent._pending && parent._pending[vnode.key];\n if (pendingNode &&\n pendingNode.tag === vnode.tag &&\n pendingNode.elm._leaveCb\n ) {\n pendingNode.elm._leaveCb();\n }\n enterHook && enterHook(el, cb);\n });\n }\n\n // start enter transition\n beforeEnterHook && beforeEnterHook(el);\n if (expectsCSS) {\n addTransitionClass(el, startClass);\n addTransitionClass(el, activeClass);\n nextFrame(function () {\n removeTransitionClass(el, startClass);\n if (!cb.cancelled) {\n addTransitionClass(el, toClass);\n if (!userWantsControl) {\n if (isValidDuration(explicitEnterDuration)) {\n setTimeout(cb, explicitEnterDuration);\n } else {\n whenTransitionEnds(el, type, cb);\n }\n }\n }\n });\n }\n\n if (vnode.data.show) {\n toggleDisplay && toggleDisplay();\n enterHook && enterHook(el, cb);\n }\n\n if (!expectsCSS && !userWantsControl) {\n cb();\n }\n}\n\nfunction leave (vnode, rm) {\n var el = vnode.elm;\n\n // call enter callback now\n if (isDef(el._enterCb)) {\n el._enterCb.cancelled = true;\n el._enterCb();\n }\n\n var data = resolveTransition(vnode.data.transition);\n if (isUndef(data) || el.nodeType !== 1) {\n return rm()\n }\n\n /* istanbul ignore if */\n if (isDef(el._leaveCb)) {\n return\n }\n\n var css = data.css;\n var type = data.type;\n var leaveClass = data.leaveClass;\n var leaveToClass = data.leaveToClass;\n var leaveActiveClass = data.leaveActiveClass;\n var beforeLeave = data.beforeLeave;\n var leave = data.leave;\n var afterLeave = data.afterLeave;\n var leaveCancelled = data.leaveCancelled;\n var delayLeave = data.delayLeave;\n var duration = data.duration;\n\n var expectsCSS = css !== false && !isIE9;\n var userWantsControl = getHookArgumentsLength(leave);\n\n var explicitLeaveDuration = toNumber(\n isObject(duration)\n ? duration.leave\n : duration\n );\n\n if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {\n checkDuration(explicitLeaveDuration, 'leave', vnode);\n }\n\n var cb = el._leaveCb = once(function () {\n if (el.parentNode && el.parentNode._pending) {\n el.parentNode._pending[vnode.key] = null;\n }\n if (expectsCSS) {\n removeTransitionClass(el, leaveToClass);\n removeTransitionClass(el, leaveActiveClass);\n }\n if (cb.cancelled) {\n if (expectsCSS) {\n removeTransitionClass(el, leaveClass);\n }\n leaveCancelled && leaveCancelled(el);\n } else {\n rm();\n afterLeave && afterLeave(el);\n }\n el._leaveCb = null;\n });\n\n if (delayLeave) {\n delayLeave(performLeave);\n } else {\n performLeave();\n }\n\n function performLeave () {\n // the delayed leave may have already been cancelled\n if (cb.cancelled) {\n return\n }\n // record leaving element\n if (!vnode.data.show) {\n (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;\n }\n beforeLeave && beforeLeave(el);\n if (expectsCSS) {\n addTransitionClass(el, leaveClass);\n addTransitionClass(el, leaveActiveClass);\n nextFrame(function () {\n removeTransitionClass(el, leaveClass);\n if (!cb.cancelled) {\n addTransitionClass(el, leaveToClass);\n if (!userWantsControl) {\n if (isValidDuration(explicitLeaveDuration)) {\n setTimeout(cb, explicitLeaveDuration);\n } else {\n whenTransitionEnds(el, type, cb);\n }\n }\n }\n });\n }\n leave && leave(el, cb);\n if (!expectsCSS && !userWantsControl) {\n cb();\n }\n }\n}\n\n// only used in dev mode\nfunction checkDuration (val, name, vnode) {\n if (typeof val !== 'number') {\n warn(\n \"<transition> explicit \" + name + \" duration is not a valid number - \" +\n \"got \" + (JSON.stringify(val)) + \".\",\n vnode.context\n );\n } else if (isNaN(val)) {\n warn(\n \"<transition> explicit \" + name + \" duration is NaN - \" +\n 'the duration expression might be incorrect.',\n vnode.context\n );\n }\n}\n\nfunction isValidDuration (val) {\n return typeof val === 'number' && !isNaN(val)\n}\n\n/**\n * Normalize a transition hook's argument length. The hook may be:\n * - a merged hook (invoker) with the original in .fns\n * - a wrapped component method (check ._length)\n * - a plain function (.length)\n */\nfunction getHookArgumentsLength (fn) {\n if (isUndef(fn)) {\n return false\n }\n var invokerFns = fn.fns;\n if (isDef(invokerFns)) {\n // invoker\n return getHookArgumentsLength(\n Array.isArray(invokerFns)\n ? invokerFns[0]\n : invokerFns\n )\n } else {\n return (fn._length || fn.length) > 1\n }\n}\n\nfunction _enter (_, vnode) {\n if (vnode.data.show !== true) {\n enter(vnode);\n }\n}\n\nvar transition = inBrowser ? {\n create: _enter,\n activate: _enter,\n remove: function remove$$1 (vnode, rm) {\n /* istanbul ignore else */\n if (vnode.data.show !== true) {\n leave(vnode, rm);\n } else {\n rm();\n }\n }\n} : {}\n\nvar platformModules = [\n attrs,\n klass,\n events,\n domProps,\n style,\n transition\n]\n\n/* */\n\n// the directive module should be applied last, after all\n// built-in modules have been applied.\nvar modules = platformModules.concat(baseModules);\n\nvar patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });\n\n/**\n * Not type checking this file because flow doesn't like attaching\n * properties to Elements.\n */\n\n/* istanbul ignore if */\nif (isIE9) {\n // http://www.matts411.com/post/internet-explorer-9-oninput/\n document.addEventListener('selectionchange', function () {\n var el = document.activeElement;\n if (el && el.vmodel) {\n trigger(el, 'input');\n }\n });\n}\n\nvar directive = {\n inserted: function inserted (el, binding, vnode, oldVnode) {\n if (vnode.tag === 'select') {\n // #6903\n if (oldVnode.elm && !oldVnode.elm._vOptions) {\n mergeVNodeHook(vnode, 'postpatch', function () {\n directive.componentUpdated(el, binding, vnode);\n });\n } else {\n setSelected(el, binding, vnode.context);\n }\n el._vOptions = [].map.call(el.options, getValue);\n } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {\n el._vModifiers = binding.modifiers;\n if (!binding.modifiers.lazy) {\n el.addEventListener('compositionstart', onCompositionStart);\n el.addEventListener('compositionend', onCompositionEnd);\n // Safari < 10.2 & UIWebView doesn't fire compositionend when\n // switching focus before confirming composition choice\n // this also fixes the issue where some browsers e.g. iOS Chrome\n // fires \"change\" instead of \"input\" on autocomplete.\n el.addEventListener('change', onCompositionEnd);\n /* istanbul ignore if */\n if (isIE9) {\n el.vmodel = true;\n }\n }\n }\n },\n\n componentUpdated: function componentUpdated (el, binding, vnode) {\n if (vnode.tag === 'select') {\n setSelected(el, binding, vnode.context);\n // in case the options rendered by v-for have changed,\n // it's possible that the value is out-of-sync with the rendered options.\n // detect such cases and filter out values that no longer has a matching\n // option in the DOM.\n var prevOptions = el._vOptions;\n var curOptions = el._vOptions = [].map.call(el.options, getValue);\n if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {\n // trigger change event if\n // no matching option found for at least one value\n var needReset = el.multiple\n ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })\n : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);\n if (needReset) {\n trigger(el, 'change');\n }\n }\n }\n }\n};\n\nfunction setSelected (el, binding, vm) {\n actuallySetSelected(el, binding, vm);\n /* istanbul ignore if */\n if (isIE || isEdge) {\n setTimeout(function () {\n actuallySetSelected(el, binding, vm);\n }, 0);\n }\n}\n\nfunction actuallySetSelected (el, binding, vm) {\n var value = binding.value;\n var isMultiple = el.multiple;\n if (isMultiple && !Array.isArray(value)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"<select multiple v-model=\\\"\" + (binding.expression) + \"\\\"> \" +\n \"expects an Array value for its binding, but got \" + (Object.prototype.toString.call(value).slice(8, -1)),\n vm\n );\n return\n }\n var selected, option;\n for (var i = 0, l = el.options.length; i < l; i++) {\n option = el.options[i];\n if (isMultiple) {\n selected = looseIndexOf(value, getValue(option)) > -1;\n if (option.selected !== selected) {\n option.selected = selected;\n }\n } else {\n if (looseEqual(getValue(option), value)) {\n if (el.selectedIndex !== i) {\n el.selectedIndex = i;\n }\n return\n }\n }\n }\n if (!isMultiple) {\n el.selectedIndex = -1;\n }\n}\n\nfunction hasNoMatchingOption (value, options) {\n return options.every(function (o) { return !looseEqual(o, value); })\n}\n\nfunction getValue (option) {\n return '_value' in option\n ? option._value\n : option.value\n}\n\nfunction onCompositionStart (e) {\n e.target.composing = true;\n}\n\nfunction onCompositionEnd (e) {\n // prevent triggering an input event for no reason\n if (!e.target.composing) { return }\n e.target.composing = false;\n trigger(e.target, 'input');\n}\n\nfunction trigger (el, type) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(type, true, true);\n el.dispatchEvent(e);\n}\n\n/* */\n\n// recursively search for possible transition defined inside the component root\nfunction locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}\n\nvar show = {\n bind: function bind (el, ref, vnode) {\n var value = ref.value;\n\n vnode = locateNode(vnode);\n var transition$$1 = vnode.data && vnode.data.transition;\n var originalDisplay = el.__vOriginalDisplay =\n el.style.display === 'none' ? '' : el.style.display;\n if (value && transition$$1) {\n vnode.data.show = true;\n enter(vnode, function () {\n el.style.display = originalDisplay;\n });\n } else {\n el.style.display = value ? originalDisplay : 'none';\n }\n },\n\n update: function update (el, ref, vnode) {\n var value = ref.value;\n var oldValue = ref.oldValue;\n\n /* istanbul ignore if */\n if (!value === !oldValue) { return }\n vnode = locateNode(vnode);\n var transition$$1 = vnode.data && vnode.data.transition;\n if (transition$$1) {\n vnode.data.show = true;\n if (value) {\n enter(vnode, function () {\n el.style.display = el.__vOriginalDisplay;\n });\n } else {\n leave(vnode, function () {\n el.style.display = 'none';\n });\n }\n } else {\n el.style.display = value ? el.__vOriginalDisplay : 'none';\n }\n },\n\n unbind: function unbind (\n el,\n binding,\n vnode,\n oldVnode,\n isDestroy\n ) {\n if (!isDestroy) {\n el.style.display = el.__vOriginalDisplay;\n }\n }\n}\n\nvar platformDirectives = {\n model: directive,\n show: show\n}\n\n/* */\n\n// Provides transition support for a single element/component.\n// supports transition mode (out-in / in-out)\n\nvar transitionProps = {\n name: String,\n appear: Boolean,\n css: Boolean,\n mode: String,\n type: String,\n enterClass: String,\n leaveClass: String,\n enterToClass: String,\n leaveToClass: String,\n enterActiveClass: String,\n leaveActiveClass: String,\n appearClass: String,\n appearActiveClass: String,\n appearToClass: String,\n duration: [Number, String, Object]\n};\n\n// in case the child is also an abstract component, e.g. <keep-alive>\n// we want to recursively retrieve the real component to be rendered\nfunction getRealChild (vnode) {\n var compOptions = vnode && vnode.componentOptions;\n if (compOptions && compOptions.Ctor.options.abstract) {\n return getRealChild(getFirstComponentChild(compOptions.children))\n } else {\n return vnode\n }\n}\n\nfunction extractTransitionData (comp) {\n var data = {};\n var options = comp.$options;\n // props\n for (var key in options.propsData) {\n data[key] = comp[key];\n }\n // events.\n // extract listeners and pass them directly to the transition methods\n var listeners = options._parentListeners;\n for (var key$1 in listeners) {\n data[camelize(key$1)] = listeners[key$1];\n }\n return data\n}\n\nfunction placeholder (h, rawChild) {\n if (/\\d-keep-alive$/.test(rawChild.tag)) {\n return h('keep-alive', {\n props: rawChild.componentOptions.propsData\n })\n }\n}\n\nfunction hasParentTransition (vnode) {\n while ((vnode = vnode.parent)) {\n if (vnode.data.transition) {\n return true\n }\n }\n}\n\nfunction isSameChild (child, oldChild) {\n return oldChild.key === child.key && oldChild.tag === child.tag\n}\n\nvar Transition = {\n name: 'transition',\n props: transitionProps,\n abstract: true,\n\n render: function render (h) {\n var this$1 = this;\n\n var children = this.$slots.default;\n if (!children) {\n return\n }\n\n // filter out text nodes (possible whitespaces)\n children = children.filter(function (c) { return c.tag || isAsyncPlaceholder(c); });\n /* istanbul ignore if */\n if (!children.length) {\n return\n }\n\n // warn multiple elements\n if (process.env.NODE_ENV !== 'production' && children.length > 1) {\n warn(\n '<transition> can only be used on a single element. Use ' +\n '<transition-group> for lists.',\n this.$parent\n );\n }\n\n var mode = this.mode;\n\n // warn invalid mode\n if (process.env.NODE_ENV !== 'production' &&\n mode && mode !== 'in-out' && mode !== 'out-in'\n ) {\n warn(\n 'invalid <transition> mode: ' + mode,\n this.$parent\n );\n }\n\n var rawChild = children[0];\n\n // if this is a component root node and the component's\n // parent container node also has transition, skip.\n if (hasParentTransition(this.$vnode)) {\n return rawChild\n }\n\n // apply transition data to child\n // use getRealChild() to ignore abstract components e.g. keep-alive\n var child = getRealChild(rawChild);\n /* istanbul ignore if */\n if (!child) {\n return rawChild\n }\n\n if (this._leaving) {\n return placeholder(h, rawChild)\n }\n\n // ensure a key that is unique to the vnode type and to this transition\n // component instance. This key will be used to remove pending leaving nodes\n // during entering.\n var id = \"__transition-\" + (this._uid) + \"-\";\n child.key = child.key == null\n ? child.isComment\n ? id + 'comment'\n : id + child.tag\n : isPrimitive(child.key)\n ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)\n : child.key;\n\n var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\n var oldRawChild = this._vnode;\n var oldChild = getRealChild(oldRawChild);\n\n // mark v-show\n // so that the transition module can hand over the control to the directive\n if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\n child.data.show = true;\n }\n\n if (\n oldChild &&\n oldChild.data &&\n !isSameChild(child, oldChild) &&\n !isAsyncPlaceholder(oldChild) &&\n // #6687 component root is a comment node\n !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)\n ) {\n // replace old child transition data with fresh one\n // important for dynamic transitions!\n var oldData = oldChild.data.transition = extend({}, data);\n // handle transition mode\n if (mode === 'out-in') {\n // return placeholder node and queue update when leave finishes\n this._leaving = true;\n mergeVNodeHook(oldData, 'afterLeave', function () {\n this$1._leaving = false;\n this$1.$forceUpdate();\n });\n return placeholder(h, rawChild)\n } else if (mode === 'in-out') {\n if (isAsyncPlaceholder(child)) {\n return oldRawChild\n }\n var delayedLeave;\n var performLeave = function () { delayedLeave(); };\n mergeVNodeHook(data, 'afterEnter', performLeave);\n mergeVNodeHook(data, 'enterCancelled', performLeave);\n mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });\n }\n }\n\n return rawChild\n }\n}\n\n/* */\n\n// Provides transition support for list items.\n// supports move transitions using the FLIP technique.\n\n// Because the vdom's children update algorithm is \"unstable\" - i.e.\n// it doesn't guarantee the relative positioning of removed elements,\n// we force transition-group to update its children into two passes:\n// in the first pass, we remove all nodes that need to be removed,\n// triggering their leaving transition; in the second pass, we insert/move\n// into the final desired state. This way in the second pass removed\n// nodes will remain where they should be.\n\nvar props = extend({\n tag: String,\n moveClass: String\n}, transitionProps);\n\ndelete props.mode;\n\nvar TransitionGroup = {\n props: props,\n\n render: function render (h) {\n var tag = this.tag || this.$vnode.data.tag || 'span';\n var map = Object.create(null);\n var prevChildren = this.prevChildren = this.children;\n var rawChildren = this.$slots.default || [];\n var children = this.children = [];\n var transitionData = extractTransitionData(this);\n\n for (var i = 0; i < rawChildren.length; i++) {\n var c = rawChildren[i];\n if (c.tag) {\n if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\n children.push(c);\n map[c.key] = c\n ;(c.data || (c.data = {})).transition = transitionData;\n } else if (process.env.NODE_ENV !== 'production') {\n var opts = c.componentOptions;\n var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;\n warn((\"<transition-group> children must be keyed: <\" + name + \">\"));\n }\n }\n }\n\n if (prevChildren) {\n var kept = [];\n var removed = [];\n for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\n var c$1 = prevChildren[i$1];\n c$1.data.transition = transitionData;\n c$1.data.pos = c$1.elm.getBoundingClientRect();\n if (map[c$1.key]) {\n kept.push(c$1);\n } else {\n removed.push(c$1);\n }\n }\n this.kept = h(tag, null, kept);\n this.removed = removed;\n }\n\n return h(tag, null, children)\n },\n\n beforeUpdate: function beforeUpdate () {\n // force removing pass\n this.__patch__(\n this._vnode,\n this.kept,\n false, // hydrating\n true // removeOnly (!important, avoids unnecessary moves)\n );\n this._vnode = this.kept;\n },\n\n updated: function updated () {\n var children = this.prevChildren;\n var moveClass = this.moveClass || ((this.name || 'v') + '-move');\n if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\n return\n }\n\n // we divide the work into three loops to avoid mixing DOM reads and writes\n // in each iteration - which helps prevent layout thrashing.\n children.forEach(callPendingCbs);\n children.forEach(recordPosition);\n children.forEach(applyTranslation);\n\n // force reflow to put everything in position\n // assign to this to avoid being removed in tree-shaking\n // $flow-disable-line\n this._reflow = document.body.offsetHeight;\n\n children.forEach(function (c) {\n if (c.data.moved) {\n var el = c.elm;\n var s = el.style;\n addTransitionClass(el, moveClass);\n s.transform = s.WebkitTransform = s.transitionDuration = '';\n el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\n if (!e || /transform$/.test(e.propertyName)) {\n el.removeEventListener(transitionEndEvent, cb);\n el._moveCb = null;\n removeTransitionClass(el, moveClass);\n }\n });\n }\n });\n },\n\n methods: {\n hasMove: function hasMove (el, moveClass) {\n /* istanbul ignore if */\n if (!hasTransition) {\n return false\n }\n /* istanbul ignore if */\n if (this._hasMove) {\n return this._hasMove\n }\n // Detect whether an element with the move class applied has\n // CSS transitions. Since the element may be inside an entering\n // transition at this very moment, we make a clone of it and remove\n // all other transition classes applied to ensure only the move class\n // is applied.\n var clone = el.cloneNode();\n if (el._transitionClasses) {\n el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });\n }\n addClass(clone, moveClass);\n clone.style.display = 'none';\n this.$el.appendChild(clone);\n var info = getTransitionInfo(clone);\n this.$el.removeChild(clone);\n return (this._hasMove = info.hasTransform)\n }\n }\n}\n\nfunction callPendingCbs (c) {\n /* istanbul ignore if */\n if (c.elm._moveCb) {\n c.elm._moveCb();\n }\n /* istanbul ignore if */\n if (c.elm._enterCb) {\n c.elm._enterCb();\n }\n}\n\nfunction recordPosition (c) {\n c.data.newPos = c.elm.getBoundingClientRect();\n}\n\nfunction applyTranslation (c) {\n var oldPos = c.data.pos;\n var newPos = c.data.newPos;\n var dx = oldPos.left - newPos.left;\n var dy = oldPos.top - newPos.top;\n if (dx || dy) {\n c.data.moved = true;\n var s = c.elm.style;\n s.transform = s.WebkitTransform = \"translate(\" + dx + \"px,\" + dy + \"px)\";\n s.transitionDuration = '0s';\n }\n}\n\nvar platformComponents = {\n Transition: Transition,\n TransitionGroup: TransitionGroup\n}\n\n/* */\n\n// install platform specific utils\nVue.config.mustUseProp = mustUseProp;\nVue.config.isReservedTag = isReservedTag;\nVue.config.isReservedAttr = isReservedAttr;\nVue.config.getTagNamespace = getTagNamespace;\nVue.config.isUnknownElement = isUnknownElement;\n\n// install platform runtime directives & components\nextend(Vue.options.directives, platformDirectives);\nextend(Vue.options.components, platformComponents);\n\n// install platform patch function\nVue.prototype.__patch__ = inBrowser ? patch : noop;\n\n// public mount method\nVue.prototype.$mount = function (\n el,\n hydrating\n) {\n el = el && inBrowser ? query(el) : undefined;\n return mountComponent(this, el, hydrating)\n};\n\n// devtools global hook\n/* istanbul ignore next */\nif (inBrowser) {\n setTimeout(function () {\n if (config.devtools) {\n if (devtools) {\n devtools.emit('init', Vue);\n } else if (\n process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test' &&\n isChrome\n ) {\n console[console.info ? 'info' : 'log'](\n 'Download the Vue Devtools extension for a better development experience:\\n' +\n 'https://github.com/vuejs/vue-devtools'\n );\n }\n }\n if (process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test' &&\n config.productionTip !== false &&\n typeof console !== 'undefined'\n ) {\n console[console.info ? 'info' : 'log'](\n \"You are running Vue in development mode.\\n\" +\n \"Make sure to turn on production mode when deploying for production.\\n\" +\n \"See more tips at https://vuejs.org/guide/deployment.html\"\n );\n }\n }, 0);\n}\n\n/* */\n\nvar defaultTagRE = /\\{\\{((?:.|\\n)+?)\\}\\}/g;\nvar regexEscapeRE = /[-.*+?^${}()|[\\]\\/\\\\]/g;\n\nvar buildRegex = cached(function (delimiters) {\n var open = delimiters[0].replace(regexEscapeRE, '\\\\$&');\n var close = delimiters[1].replace(regexEscapeRE, '\\\\$&');\n return new RegExp(open + '((?:.|\\\\n)+?)' + close, 'g')\n});\n\n\n\nfunction parseText (\n text,\n delimiters\n) {\n var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\n if (!tagRE.test(text)) {\n return\n }\n var tokens = [];\n var rawTokens = [];\n var lastIndex = tagRE.lastIndex = 0;\n var match, index, tokenValue;\n while ((match = tagRE.exec(text))) {\n index = match.index;\n // push text token\n if (index > lastIndex) {\n rawTokens.push(tokenValue = text.slice(lastIndex, index));\n tokens.push(JSON.stringify(tokenValue));\n }\n // tag token\n var exp = parseFilters(match[1].trim());\n tokens.push((\"_s(\" + exp + \")\"));\n rawTokens.push({ '@binding': exp });\n lastIndex = index + match[0].length;\n }\n if (lastIndex < text.length) {\n rawTokens.push(tokenValue = text.slice(lastIndex));\n tokens.push(JSON.stringify(tokenValue));\n }\n return {\n expression: tokens.join('+'),\n tokens: rawTokens\n }\n}\n\n/* */\n\nfunction transformNode (el, options) {\n var warn = options.warn || baseWarn;\n var staticClass = getAndRemoveAttr(el, 'class');\n if (process.env.NODE_ENV !== 'production' && staticClass) {\n var res = parseText(staticClass, options.delimiters);\n if (res) {\n warn(\n \"class=\\\"\" + staticClass + \"\\\": \" +\n 'Interpolation inside attributes has been removed. ' +\n 'Use v-bind or the colon shorthand instead. For example, ' +\n 'instead of <div class=\"{{ val }}\">, use <div :class=\"val\">.'\n );\n }\n }\n if (staticClass) {\n el.staticClass = JSON.stringify(staticClass);\n }\n var classBinding = getBindingAttr(el, 'class', false /* getStatic */);\n if (classBinding) {\n el.classBinding = classBinding;\n }\n}\n\nfunction genData (el) {\n var data = '';\n if (el.staticClass) {\n data += \"staticClass:\" + (el.staticClass) + \",\";\n }\n if (el.classBinding) {\n data += \"class:\" + (el.classBinding) + \",\";\n }\n return data\n}\n\nvar klass$1 = {\n staticKeys: ['staticClass'],\n transformNode: transformNode,\n genData: genData\n}\n\n/* */\n\nfunction transformNode$1 (el, options) {\n var warn = options.warn || baseWarn;\n var staticStyle = getAndRemoveAttr(el, 'style');\n if (staticStyle) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production') {\n var res = parseText(staticStyle, options.delimiters);\n if (res) {\n warn(\n \"style=\\\"\" + staticStyle + \"\\\": \" +\n 'Interpolation inside attributes has been removed. ' +\n 'Use v-bind or the colon shorthand instead. For example, ' +\n 'instead of <div style=\"{{ val }}\">, use <div :style=\"val\">.'\n );\n }\n }\n el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\n }\n\n var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\n if (styleBinding) {\n el.styleBinding = styleBinding;\n }\n}\n\nfunction genData$1 (el) {\n var data = '';\n if (el.staticStyle) {\n data += \"staticStyle:\" + (el.staticStyle) + \",\";\n }\n if (el.styleBinding) {\n data += \"style:(\" + (el.styleBinding) + \"),\";\n }\n return data\n}\n\nvar style$1 = {\n staticKeys: ['staticStyle'],\n transformNode: transformNode$1,\n genData: genData$1\n}\n\n/* */\n\nvar decoder;\n\nvar he = {\n decode: function decode (html) {\n decoder = decoder || document.createElement('div');\n decoder.innerHTML = html;\n return decoder.textContent\n }\n}\n\n/* */\n\nvar isUnaryTag = makeMap(\n 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n 'link,meta,param,source,track,wbr'\n);\n\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nvar canBeLeftOpenTag = makeMap(\n 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'\n);\n\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nvar isNonPhrasingTag = makeMap(\n 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n 'title,tr,track'\n);\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n\n/*!\n * HTML Parser By John Resig (ejohn.org)\n * Modified by Juriy \"kangax\" Zaytsev\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n */\n\n// Regular Expressions for parsing tags and attributes\nvar attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\n// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName\n// but for Vue templates we can enforce a simple charset\nvar ncname = '[a-zA-Z_][\\\\w\\\\-\\\\.]*';\nvar qnameCapture = \"((?:\" + ncname + \"\\\\:)?\" + ncname + \")\";\nvar startTagOpen = new RegExp((\"^<\" + qnameCapture));\nvar startTagClose = /^\\s*(\\/?)>/;\nvar endTag = new RegExp((\"^<\\\\/\" + qnameCapture + \"[^>]*>\"));\nvar doctype = /^<!DOCTYPE [^>]+>/i;\n// #7298: escape - to avoid being pased as HTML comment when inlined in page\nvar comment = /^<!\\--/;\nvar conditionalComment = /^<!\\[/;\n\nvar IS_REGEX_CAPTURING_BROKEN = false;\n'x'.replace(/x(.)?/g, function (m, g) {\n IS_REGEX_CAPTURING_BROKEN = g === '';\n});\n\n// Special Elements (can contain anything)\nvar isPlainTextElement = makeMap('script,style,textarea', true);\nvar reCache = {};\n\nvar decodingMap = {\n '<': '<',\n '>': '>',\n '"': '\"',\n '&': '&',\n ' ': '\\n',\n '	': '\\t'\n};\nvar encodedAttr = /&(?:lt|gt|quot|amp);/g;\nvar encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;\n\n// #5992\nvar isIgnoreNewlineTag = makeMap('pre,textarea', true);\nvar shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\\n'; };\n\nfunction decodeAttr (value, shouldDecodeNewlines) {\n var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n return value.replace(re, function (match) { return decodingMap[match]; })\n}\n\nfunction parseHTML (html, options) {\n var stack = [];\n var expectHTML = options.expectHTML;\n var isUnaryTag$$1 = options.isUnaryTag || no;\n var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;\n var index = 0;\n var last, lastTag;\n while (html) {\n last = html;\n // Make sure we're not in a plaintext content element like script/style\n if (!lastTag || !isPlainTextElement(lastTag)) {\n var textEnd = html.indexOf('<');\n if (textEnd === 0) {\n // Comment:\n if (comment.test(html)) {\n var commentEnd = html.indexOf('-->');\n\n if (commentEnd >= 0) {\n if (options.shouldKeepComment) {\n options.comment(html.substring(4, commentEnd));\n }\n advance(commentEnd + 3);\n continue\n }\n }\n\n // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n if (conditionalComment.test(html)) {\n var conditionalEnd = html.indexOf(']>');\n\n if (conditionalEnd >= 0) {\n advance(conditionalEnd + 2);\n continue\n }\n }\n\n // Doctype:\n var doctypeMatch = html.match(doctype);\n if (doctypeMatch) {\n advance(doctypeMatch[0].length);\n continue\n }\n\n // End tag:\n var endTagMatch = html.match(endTag);\n if (endTagMatch) {\n var curIndex = index;\n advance(endTagMatch[0].length);\n parseEndTag(endTagMatch[1], curIndex, index);\n continue\n }\n\n // Start tag:\n var startTagMatch = parseStartTag();\n if (startTagMatch) {\n handleStartTag(startTagMatch);\n if (shouldIgnoreFirstNewline(lastTag, html)) {\n advance(1);\n }\n continue\n }\n }\n\n var text = (void 0), rest = (void 0), next = (void 0);\n if (textEnd >= 0) {\n rest = html.slice(textEnd);\n while (\n !endTag.test(rest) &&\n !startTagOpen.test(rest) &&\n !comment.test(rest) &&\n !conditionalComment.test(rest)\n ) {\n // < in plain text, be forgiving and treat it as text\n next = rest.indexOf('<', 1);\n if (next < 0) { break }\n textEnd += next;\n rest = html.slice(textEnd);\n }\n text = html.substring(0, textEnd);\n advance(textEnd);\n }\n\n if (textEnd < 0) {\n text = html;\n html = '';\n }\n\n if (options.chars && text) {\n options.chars(text);\n }\n } else {\n var endTagLength = 0;\n var stackedTag = lastTag.toLowerCase();\n var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\n var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {\n endTagLength = endTag.length;\n if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {\n text = text\n .replace(/<!\\--([\\s\\S]*?)-->/g, '$1') // #7298\n .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n }\n if (shouldIgnoreFirstNewline(stackedTag, text)) {\n text = text.slice(1);\n }\n if (options.chars) {\n options.chars(text);\n }\n return ''\n });\n index += html.length - rest$1.length;\n html = rest$1;\n parseEndTag(stackedTag, index - endTagLength, index);\n }\n\n if (html === last) {\n options.chars && options.chars(html);\n if (process.env.NODE_ENV !== 'production' && !stack.length && options.warn) {\n options.warn((\"Mal-formatted tag at end of template: \\\"\" + html + \"\\\"\"));\n }\n break\n }\n }\n\n // Clean up any remaining tags\n parseEndTag();\n\n function advance (n) {\n index += n;\n html = html.substring(n);\n }\n\n function parseStartTag () {\n var start = html.match(startTagOpen);\n if (start) {\n var match = {\n tagName: start[1],\n attrs: [],\n start: index\n };\n advance(start[0].length);\n var end, attr;\n while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\n advance(attr[0].length);\n match.attrs.push(attr);\n }\n if (end) {\n match.unarySlash = end[1];\n advance(end[0].length);\n match.end = index;\n return match\n }\n }\n }\n\n function handleStartTag (match) {\n var tagName = match.tagName;\n var unarySlash = match.unarySlash;\n\n if (expectHTML) {\n if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n parseEndTag(lastTag);\n }\n if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {\n parseEndTag(tagName);\n }\n }\n\n var unary = isUnaryTag$$1(tagName) || !!unarySlash;\n\n var l = match.attrs.length;\n var attrs = new Array(l);\n for (var i = 0; i < l; i++) {\n var args = match.attrs[i];\n // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778\n if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('\"\"') === -1) {\n if (args[3] === '') { delete args[3]; }\n if (args[4] === '') { delete args[4]; }\n if (args[5] === '') { delete args[5]; }\n }\n var value = args[3] || args[4] || args[5] || '';\n var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'\n ? options.shouldDecodeNewlinesForHref\n : options.shouldDecodeNewlines;\n attrs[i] = {\n name: args[1],\n value: decodeAttr(value, shouldDecodeNewlines)\n };\n }\n\n if (!unary) {\n stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });\n lastTag = tagName;\n }\n\n if (options.start) {\n options.start(tagName, attrs, unary, match.start, match.end);\n }\n }\n\n function parseEndTag (tagName, start, end) {\n var pos, lowerCasedTagName;\n if (start == null) { start = index; }\n if (end == null) { end = index; }\n\n if (tagName) {\n lowerCasedTagName = tagName.toLowerCase();\n }\n\n // Find the closest opened tag of the same type\n if (tagName) {\n for (pos = stack.length - 1; pos >= 0; pos--) {\n if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n break\n }\n }\n } else {\n // If no tag name is provided, clean shop\n pos = 0;\n }\n\n if (pos >= 0) {\n // Close all the open elements, up the stack\n for (var i = stack.length - 1; i >= pos; i--) {\n if (process.env.NODE_ENV !== 'production' &&\n (i > pos || !tagName) &&\n options.warn\n ) {\n options.warn(\n (\"tag <\" + (stack[i].tag) + \"> has no matching end tag.\")\n );\n }\n if (options.end) {\n options.end(stack[i].tag, start, end);\n }\n }\n\n // Remove the open elements from the stack\n stack.length = pos;\n lastTag = pos && stack[pos - 1].tag;\n } else if (lowerCasedTagName === 'br') {\n if (options.start) {\n options.start(tagName, [], true, start, end);\n }\n } else if (lowerCasedTagName === 'p') {\n if (options.start) {\n options.start(tagName, [], false, start, end);\n }\n if (options.end) {\n options.end(tagName, start, end);\n }\n }\n }\n}\n\n/* */\n\nvar onRE = /^@|^v-on:/;\nvar dirRE = /^v-|^@|^:/;\nvar forAliasRE = /([^]*?)\\s+(?:in|of)\\s+([^]*)/;\nvar forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\nvar stripParensRE = /^\\(|\\)$/g;\n\nvar argRE = /:(.*)$/;\nvar bindRE = /^:|^v-bind:/;\nvar modifierRE = /\\.[^.]+/g;\n\nvar decodeHTMLCached = cached(he.decode);\n\n// configurable state\nvar warn$2;\nvar delimiters;\nvar transforms;\nvar preTransforms;\nvar postTransforms;\nvar platformIsPreTag;\nvar platformMustUseProp;\nvar platformGetTagNamespace;\n\n\n\nfunction createASTElement (\n tag,\n attrs,\n parent\n) {\n return {\n type: 1,\n tag: tag,\n attrsList: attrs,\n attrsMap: makeAttrsMap(attrs),\n parent: parent,\n children: []\n }\n}\n\n/**\n * Convert HTML string to AST.\n */\nfunction parse (\n template,\n options\n) {\n warn$2 = options.warn || baseWarn;\n\n platformIsPreTag = options.isPreTag || no;\n platformMustUseProp = options.mustUseProp || no;\n platformGetTagNamespace = options.getTagNamespace || no;\n\n transforms = pluckModuleFunction(options.modules, 'transformNode');\n preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\n postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\n\n delimiters = options.delimiters;\n\n var stack = [];\n var preserveWhitespace = options.preserveWhitespace !== false;\n var root;\n var currentParent;\n var inVPre = false;\n var inPre = false;\n var warned = false;\n\n function warnOnce (msg) {\n if (!warned) {\n warned = true;\n warn$2(msg);\n }\n }\n\n function closeElement (element) {\n // check pre state\n if (element.pre) {\n inVPre = false;\n }\n if (platformIsPreTag(element.tag)) {\n inPre = false;\n }\n // apply post-transforms\n for (var i = 0; i < postTransforms.length; i++) {\n postTransforms[i](element, options);\n }\n }\n\n parseHTML(template, {\n warn: warn$2,\n expectHTML: options.expectHTML,\n isUnaryTag: options.isUnaryTag,\n canBeLeftOpenTag: options.canBeLeftOpenTag,\n shouldDecodeNewlines: options.shouldDecodeNewlines,\n shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,\n shouldKeepComment: options.comments,\n start: function start (tag, attrs, unary) {\n // check namespace.\n // inherit parent ns if there is one\n var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\n\n // handle IE svg bug\n /* istanbul ignore if */\n if (isIE && ns === 'svg') {\n attrs = guardIESVGBug(attrs);\n }\n\n var element = createASTElement(tag, attrs, currentParent);\n if (ns) {\n element.ns = ns;\n }\n\n if (isForbiddenTag(element) && !isServerRendering()) {\n element.forbidden = true;\n process.env.NODE_ENV !== 'production' && warn$2(\n 'Templates should only be responsible for mapping the state to the ' +\n 'UI. Avoid placing tags with side-effects in your templates, such as ' +\n \"<\" + tag + \">\" + ', as they will not be parsed.'\n );\n }\n\n // apply pre-transforms\n for (var i = 0; i < preTransforms.length; i++) {\n element = preTransforms[i](element, options) || element;\n }\n\n if (!inVPre) {\n processPre(element);\n if (element.pre) {\n inVPre = true;\n }\n }\n if (platformIsPreTag(element.tag)) {\n inPre = true;\n }\n if (inVPre) {\n processRawAttrs(element);\n } else if (!element.processed) {\n // structural directives\n processFor(element);\n processIf(element);\n processOnce(element);\n // element-scope stuff\n processElement(element, options);\n }\n\n function checkRootConstraints (el) {\n if (process.env.NODE_ENV !== 'production') {\n if (el.tag === 'slot' || el.tag === 'template') {\n warnOnce(\n \"Cannot use <\" + (el.tag) + \"> as component root element because it may \" +\n 'contain multiple nodes.'\n );\n }\n if (el.attrsMap.hasOwnProperty('v-for')) {\n warnOnce(\n 'Cannot use v-for on stateful component root element because ' +\n 'it renders multiple elements.'\n );\n }\n }\n }\n\n // tree management\n if (!root) {\n root = element;\n checkRootConstraints(root);\n } else if (!stack.length) {\n // allow root elements with v-if, v-else-if and v-else\n if (root.if && (element.elseif || element.else)) {\n checkRootConstraints(element);\n addIfCondition(root, {\n exp: element.elseif,\n block: element\n });\n } else if (process.env.NODE_ENV !== 'production') {\n warnOnce(\n \"Component template should contain exactly one root element. \" +\n \"If you are using v-if on multiple elements, \" +\n \"use v-else-if to chain them instead.\"\n );\n }\n }\n if (currentParent && !element.forbidden) {\n if (element.elseif || element.else) {\n processIfConditions(element, currentParent);\n } else if (element.slotScope) { // scoped slot\n currentParent.plain = false;\n var name = element.slotTarget || '\"default\"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;\n } else {\n currentParent.children.push(element);\n element.parent = currentParent;\n }\n }\n if (!unary) {\n currentParent = element;\n stack.push(element);\n } else {\n closeElement(element);\n }\n },\n\n end: function end () {\n // remove trailing whitespace\n var element = stack[stack.length - 1];\n var lastNode = element.children[element.children.length - 1];\n if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {\n element.children.pop();\n }\n // pop stack\n stack.length -= 1;\n currentParent = stack[stack.length - 1];\n closeElement(element);\n },\n\n chars: function chars (text) {\n if (!currentParent) {\n if (process.env.NODE_ENV !== 'production') {\n if (text === template) {\n warnOnce(\n 'Component template requires a root element, rather than just text.'\n );\n } else if ((text = text.trim())) {\n warnOnce(\n (\"text \\\"\" + text + \"\\\" outside root element will be ignored.\")\n );\n }\n }\n return\n }\n // IE textarea placeholder bug\n /* istanbul ignore if */\n if (isIE &&\n currentParent.tag === 'textarea' &&\n currentParent.attrsMap.placeholder === text\n ) {\n return\n }\n var children = currentParent.children;\n text = inPre || text.trim()\n ? isTextTag(currentParent) ? text : decodeHTMLCached(text)\n // only preserve whitespace if its not right after a starting tag\n : preserveWhitespace && children.length ? ' ' : '';\n if (text) {\n var res;\n if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {\n children.push({\n type: 2,\n expression: res.expression,\n tokens: res.tokens,\n text: text\n });\n } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {\n children.push({\n type: 3,\n text: text\n });\n }\n }\n },\n comment: function comment (text) {\n currentParent.children.push({\n type: 3,\n text: text,\n isComment: true\n });\n }\n });\n return root\n}\n\nfunction processPre (el) {\n if (getAndRemoveAttr(el, 'v-pre') != null) {\n el.pre = true;\n }\n}\n\nfunction processRawAttrs (el) {\n var l = el.attrsList.length;\n if (l) {\n var attrs = el.attrs = new Array(l);\n for (var i = 0; i < l; i++) {\n attrs[i] = {\n name: el.attrsList[i].name,\n value: JSON.stringify(el.attrsList[i].value)\n };\n }\n } else if (!el.pre) {\n // non root node in pre blocks with no attributes\n el.plain = true;\n }\n}\n\nfunction processElement (element, options) {\n processKey(element);\n\n // determine whether this is a plain element after\n // removing structural attributes\n element.plain = !element.key && !element.attrsList.length;\n\n processRef(element);\n processSlot(element);\n processComponent(element);\n for (var i = 0; i < transforms.length; i++) {\n element = transforms[i](element, options) || element;\n }\n processAttrs(element);\n}\n\nfunction processKey (el) {\n var exp = getBindingAttr(el, 'key');\n if (exp) {\n if (process.env.NODE_ENV !== 'production' && el.tag === 'template') {\n warn$2(\"<template> cannot be keyed. Place the key on real elements instead.\");\n }\n el.key = exp;\n }\n}\n\nfunction processRef (el) {\n var ref = getBindingAttr(el, 'ref');\n if (ref) {\n el.ref = ref;\n el.refInFor = checkInFor(el);\n }\n}\n\nfunction processFor (el) {\n var exp;\n if ((exp = getAndRemoveAttr(el, 'v-for'))) {\n var res = parseFor(exp);\n if (res) {\n extend(el, res);\n } else if (process.env.NODE_ENV !== 'production') {\n warn$2(\n (\"Invalid v-for expression: \" + exp)\n );\n }\n }\n}\n\n\n\nfunction parseFor (exp) {\n var inMatch = exp.match(forAliasRE);\n if (!inMatch) { return }\n var res = {};\n res.for = inMatch[2].trim();\n var alias = inMatch[1].trim().replace(stripParensRE, '');\n var iteratorMatch = alias.match(forIteratorRE);\n if (iteratorMatch) {\n res.alias = alias.replace(forIteratorRE, '');\n res.iterator1 = iteratorMatch[1].trim();\n if (iteratorMatch[2]) {\n res.iterator2 = iteratorMatch[2].trim();\n }\n } else {\n res.alias = alias;\n }\n return res\n}\n\nfunction processIf (el) {\n var exp = getAndRemoveAttr(el, 'v-if');\n if (exp) {\n el.if = exp;\n addIfCondition(el, {\n exp: exp,\n block: el\n });\n } else {\n if (getAndRemoveAttr(el, 'v-else') != null) {\n el.else = true;\n }\n var elseif = getAndRemoveAttr(el, 'v-else-if');\n if (elseif) {\n el.elseif = elseif;\n }\n }\n}\n\nfunction processIfConditions (el, parent) {\n var prev = findPrevElement(parent.children);\n if (prev && prev.if) {\n addIfCondition(prev, {\n exp: el.elseif,\n block: el\n });\n } else if (process.env.NODE_ENV !== 'production') {\n warn$2(\n \"v-\" + (el.elseif ? ('else-if=\"' + el.elseif + '\"') : 'else') + \" \" +\n \"used on element <\" + (el.tag) + \"> without corresponding v-if.\"\n );\n }\n}\n\nfunction findPrevElement (children) {\n var i = children.length;\n while (i--) {\n if (children[i].type === 1) {\n return children[i]\n } else {\n if (process.env.NODE_ENV !== 'production' && children[i].text !== ' ') {\n warn$2(\n \"text \\\"\" + (children[i].text.trim()) + \"\\\" between v-if and v-else(-if) \" +\n \"will be ignored.\"\n );\n }\n children.pop();\n }\n }\n}\n\nfunction addIfCondition (el, condition) {\n if (!el.ifConditions) {\n el.ifConditions = [];\n }\n el.ifConditions.push(condition);\n}\n\nfunction processOnce (el) {\n var once$$1 = getAndRemoveAttr(el, 'v-once');\n if (once$$1 != null) {\n el.once = true;\n }\n}\n\nfunction processSlot (el) {\n if (el.tag === 'slot') {\n el.slotName = getBindingAttr(el, 'name');\n if (process.env.NODE_ENV !== 'production' && el.key) {\n warn$2(\n \"`key` does not work on <slot> because slots are abstract outlets \" +\n \"and can possibly expand into multiple elements. \" +\n \"Use the key on a wrapping element instead.\"\n );\n }\n } else {\n var slotScope;\n if (el.tag === 'template') {\n slotScope = getAndRemoveAttr(el, 'scope');\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && slotScope) {\n warn$2(\n \"the \\\"scope\\\" attribute for scoped slots have been deprecated and \" +\n \"replaced by \\\"slot-scope\\\" since 2.5. The new \\\"slot-scope\\\" attribute \" +\n \"can also be used on plain elements in addition to <template> to \" +\n \"denote scoped slots.\",\n true\n );\n }\n el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');\n } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && el.attrsMap['v-for']) {\n warn$2(\n \"Ambiguous combined usage of slot-scope and v-for on <\" + (el.tag) + \"> \" +\n \"(v-for takes higher priority). Use a wrapper <template> for the \" +\n \"scoped slot to make it clearer.\",\n true\n );\n }\n el.slotScope = slotScope;\n }\n var slotTarget = getBindingAttr(el, 'slot');\n if (slotTarget) {\n el.slotTarget = slotTarget === '\"\"' ? '\"default\"' : slotTarget;\n // preserve slot as an attribute for native shadow DOM compat\n // only for non-scoped slots.\n if (el.tag !== 'template' && !el.slotScope) {\n addAttr(el, 'slot', slotTarget);\n }\n }\n }\n}\n\nfunction processComponent (el) {\n var binding;\n if ((binding = getBindingAttr(el, 'is'))) {\n el.component = binding;\n }\n if (getAndRemoveAttr(el, 'inline-template') != null) {\n el.inlineTemplate = true;\n }\n}\n\nfunction processAttrs (el) {\n var list = el.attrsList;\n var i, l, name, rawName, value, modifiers, isProp;\n for (i = 0, l = list.length; i < l; i++) {\n name = rawName = list[i].name;\n value = list[i].value;\n if (dirRE.test(name)) {\n // mark element as dynamic\n el.hasBindings = true;\n // modifiers\n modifiers = parseModifiers(name);\n if (modifiers) {\n name = name.replace(modifierRE, '');\n }\n if (bindRE.test(name)) { // v-bind\n name = name.replace(bindRE, '');\n value = parseFilters(value);\n isProp = false;\n if (modifiers) {\n if (modifiers.prop) {\n isProp = true;\n name = camelize(name);\n if (name === 'innerHtml') { name = 'innerHTML'; }\n }\n if (modifiers.camel) {\n name = camelize(name);\n }\n if (modifiers.sync) {\n addHandler(\n el,\n (\"update:\" + (camelize(name))),\n genAssignmentCode(value, \"$event\")\n );\n }\n }\n if (isProp || (\n !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)\n )) {\n addProp(el, name, value);\n } else {\n addAttr(el, name, value);\n }\n } else if (onRE.test(name)) { // v-on\n name = name.replace(onRE, '');\n addHandler(el, name, value, modifiers, false, warn$2);\n } else { // normal directives\n name = name.replace(dirRE, '');\n // parse arg\n var argMatch = name.match(argRE);\n var arg = argMatch && argMatch[1];\n if (arg) {\n name = name.slice(0, -(arg.length + 1));\n }\n addDirective(el, name, rawName, value, arg, modifiers);\n if (process.env.NODE_ENV !== 'production' && name === 'model') {\n checkForAliasModel(el, value);\n }\n }\n } else {\n // literal attribute\n if (process.env.NODE_ENV !== 'production') {\n var res = parseText(value, delimiters);\n if (res) {\n warn$2(\n name + \"=\\\"\" + value + \"\\\": \" +\n 'Interpolation inside attributes has been removed. ' +\n 'Use v-bind or the colon shorthand instead. For example, ' +\n 'instead of <div id=\"{{ val }}\">, use <div :id=\"val\">.'\n );\n }\n }\n addAttr(el, name, JSON.stringify(value));\n // #6887 firefox doesn't update muted state if set via attribute\n // even immediately after element creation\n if (!el.component &&\n name === 'muted' &&\n platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n addProp(el, name, 'true');\n }\n }\n }\n}\n\nfunction checkInFor (el) {\n var parent = el;\n while (parent) {\n if (parent.for !== undefined) {\n return true\n }\n parent = parent.parent;\n }\n return false\n}\n\nfunction parseModifiers (name) {\n var match = name.match(modifierRE);\n if (match) {\n var ret = {};\n match.forEach(function (m) { ret[m.slice(1)] = true; });\n return ret\n }\n}\n\nfunction makeAttrsMap (attrs) {\n var map = {};\n for (var i = 0, l = attrs.length; i < l; i++) {\n if (\n process.env.NODE_ENV !== 'production' &&\n map[attrs[i].name] && !isIE && !isEdge\n ) {\n warn$2('duplicate attribute: ' + attrs[i].name);\n }\n map[attrs[i].name] = attrs[i].value;\n }\n return map\n}\n\n// for script (e.g. type=\"x/template\") or style, do not decode content\nfunction isTextTag (el) {\n return el.tag === 'script' || el.tag === 'style'\n}\n\nfunction isForbiddenTag (el) {\n return (\n el.tag === 'style' ||\n (el.tag === 'script' && (\n !el.attrsMap.type ||\n el.attrsMap.type === 'text/javascript'\n ))\n )\n}\n\nvar ieNSBug = /^xmlns:NS\\d+/;\nvar ieNSPrefix = /^NS\\d+:/;\n\n/* istanbul ignore next */\nfunction guardIESVGBug (attrs) {\n var res = [];\n for (var i = 0; i < attrs.length; i++) {\n var attr = attrs[i];\n if (!ieNSBug.test(attr.name)) {\n attr.name = attr.name.replace(ieNSPrefix, '');\n res.push(attr);\n }\n }\n return res\n}\n\nfunction checkForAliasModel (el, value) {\n var _el = el;\n while (_el) {\n if (_el.for && _el.alias === value) {\n warn$2(\n \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n \"You are binding v-model directly to a v-for iteration alias. \" +\n \"This will not be able to modify the v-for source array because \" +\n \"writing to the alias is like modifying a function local variable. \" +\n \"Consider using an array of objects and use v-model on an object property instead.\"\n );\n }\n _el = _el.parent;\n }\n}\n\n/* */\n\n/**\n * Expand input[v-model] with dyanmic type bindings into v-if-else chains\n * Turn this:\n * <input v-model=\"data[type]\" :type=\"type\">\n * into this:\n * <input v-if=\"type === 'checkbox'\" type=\"checkbox\" v-model=\"data[type]\">\n * <input v-else-if=\"type === 'radio'\" type=\"radio\" v-model=\"data[type]\">\n * <input v-else :type=\"type\" v-model=\"data[type]\">\n */\n\nfunction preTransformNode (el, options) {\n if (el.tag === 'input') {\n var map = el.attrsMap;\n if (!map['v-model']) {\n return\n }\n\n var typeBinding;\n if (map[':type'] || map['v-bind:type']) {\n typeBinding = getBindingAttr(el, 'type');\n }\n if (!map.type && !typeBinding && map['v-bind']) {\n typeBinding = \"(\" + (map['v-bind']) + \").type\";\n }\n\n if (typeBinding) {\n var ifCondition = getAndRemoveAttr(el, 'v-if', true);\n var ifConditionExtra = ifCondition ? (\"&&(\" + ifCondition + \")\") : \"\";\n var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;\n var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);\n // 1. checkbox\n var branch0 = cloneASTElement(el);\n // process for on the main node\n processFor(branch0);\n addRawAttr(branch0, 'type', 'checkbox');\n processElement(branch0, options);\n branch0.processed = true; // prevent it from double-processed\n branch0.if = \"(\" + typeBinding + \")==='checkbox'\" + ifConditionExtra;\n addIfCondition(branch0, {\n exp: branch0.if,\n block: branch0\n });\n // 2. add radio else-if condition\n var branch1 = cloneASTElement(el);\n getAndRemoveAttr(branch1, 'v-for', true);\n addRawAttr(branch1, 'type', 'radio');\n processElement(branch1, options);\n addIfCondition(branch0, {\n exp: \"(\" + typeBinding + \")==='radio'\" + ifConditionExtra,\n block: branch1\n });\n // 3. other\n var branch2 = cloneASTElement(el);\n getAndRemoveAttr(branch2, 'v-for', true);\n addRawAttr(branch2, ':type', typeBinding);\n processElement(branch2, options);\n addIfCondition(branch0, {\n exp: ifCondition,\n block: branch2\n });\n\n if (hasElse) {\n branch0.else = true;\n } else if (elseIfCondition) {\n branch0.elseif = elseIfCondition;\n }\n\n return branch0\n }\n }\n}\n\nfunction cloneASTElement (el) {\n return createASTElement(el.tag, el.attrsList.slice(), el.parent)\n}\n\nvar model$2 = {\n preTransformNode: preTransformNode\n}\n\nvar modules$1 = [\n klass$1,\n style$1,\n model$2\n]\n\n/* */\n\nfunction text (el, dir) {\n if (dir.value) {\n addProp(el, 'textContent', (\"_s(\" + (dir.value) + \")\"));\n }\n}\n\n/* */\n\nfunction html (el, dir) {\n if (dir.value) {\n addProp(el, 'innerHTML', (\"_s(\" + (dir.value) + \")\"));\n }\n}\n\nvar directives$1 = {\n model: model,\n text: text,\n html: html\n}\n\n/* */\n\nvar baseOptions = {\n expectHTML: true,\n modules: modules$1,\n directives: directives$1,\n isPreTag: isPreTag,\n isUnaryTag: isUnaryTag,\n mustUseProp: mustUseProp,\n canBeLeftOpenTag: canBeLeftOpenTag,\n isReservedTag: isReservedTag,\n getTagNamespace: getTagNamespace,\n staticKeys: genStaticKeys(modules$1)\n};\n\n/* */\n\nvar isStaticKey;\nvar isPlatformReservedTag;\n\nvar genStaticKeysCached = cached(genStaticKeys$1);\n\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n * create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize (root, options) {\n if (!root) { return }\n isStaticKey = genStaticKeysCached(options.staticKeys || '');\n isPlatformReservedTag = options.isReservedTag || no;\n // first pass: mark all non-static nodes.\n markStatic$1(root);\n // second pass: mark static roots.\n markStaticRoots(root, false);\n}\n\nfunction genStaticKeys$1 (keys) {\n return makeMap(\n 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +\n (keys ? ',' + keys : '')\n )\n}\n\nfunction markStatic$1 (node) {\n node.static = isStatic(node);\n if (node.type === 1) {\n // do not make component slot content static. this avoids\n // 1. components not able to mutate slot nodes\n // 2. static slot content fails for hot-reloading\n if (\n !isPlatformReservedTag(node.tag) &&\n node.tag !== 'slot' &&\n node.attrsMap['inline-template'] == null\n ) {\n return\n }\n for (var i = 0, l = node.children.length; i < l; i++) {\n var child = node.children[i];\n markStatic$1(child);\n if (!child.static) {\n node.static = false;\n }\n }\n if (node.ifConditions) {\n for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {\n var block = node.ifConditions[i$1].block;\n markStatic$1(block);\n if (!block.static) {\n node.static = false;\n }\n }\n }\n }\n}\n\nfunction markStaticRoots (node, isInFor) {\n if (node.type === 1) {\n if (node.static || node.once) {\n node.staticInFor = isInFor;\n }\n // For a node to qualify as a static root, it should have children that\n // are not just static text. Otherwise the cost of hoisting out will\n // outweigh the benefits and it's better off to just always render it fresh.\n if (node.static && node.children.length && !(\n node.children.length === 1 &&\n node.children[0].type === 3\n )) {\n node.staticRoot = true;\n return\n } else {\n node.staticRoot = false;\n }\n if (node.children) {\n for (var i = 0, l = node.children.length; i < l; i++) {\n markStaticRoots(node.children[i], isInFor || !!node.for);\n }\n }\n if (node.ifConditions) {\n for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {\n markStaticRoots(node.ifConditions[i$1].block, isInFor);\n }\n }\n }\n}\n\nfunction isStatic (node) {\n if (node.type === 2) { // expression\n return false\n }\n if (node.type === 3) { // text\n return true\n }\n return !!(node.pre || (\n !node.hasBindings && // no dynamic bindings\n !node.if && !node.for && // not v-if or v-for or v-else\n !isBuiltInTag(node.tag) && // not a built-in\n isPlatformReservedTag(node.tag) && // not a component\n !isDirectChildOfTemplateFor(node) &&\n Object.keys(node).every(isStaticKey)\n ))\n}\n\nfunction isDirectChildOfTemplateFor (node) {\n while (node.parent) {\n node = node.parent;\n if (node.tag !== 'template') {\n return false\n }\n if (node.for) {\n return true\n }\n }\n return false\n}\n\n/* */\n\nvar fnExpRE = /^([\\w$_]+|\\([^)]*?\\))\\s*=>|^function\\s*\\(/;\nvar simplePathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/;\n\n// KeyboardEvent.keyCode aliases\nvar keyCodes = {\n esc: 27,\n tab: 9,\n enter: 13,\n space: 32,\n up: 38,\n left: 37,\n right: 39,\n down: 40,\n 'delete': [8, 46]\n};\n\n// KeyboardEvent.key aliases\nvar keyNames = {\n esc: 'Escape',\n tab: 'Tab',\n enter: 'Enter',\n space: ' ',\n // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.\n up: ['Up', 'ArrowUp'],\n left: ['Left', 'ArrowLeft'],\n right: ['Right', 'ArrowRight'],\n down: ['Down', 'ArrowDown'],\n 'delete': ['Backspace', 'Delete']\n};\n\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nvar genGuard = function (condition) { return (\"if(\" + condition + \")return null;\"); };\n\nvar modifierCode = {\n stop: '$event.stopPropagation();',\n prevent: '$event.preventDefault();',\n self: genGuard(\"$event.target !== $event.currentTarget\"),\n ctrl: genGuard(\"!$event.ctrlKey\"),\n shift: genGuard(\"!$event.shiftKey\"),\n alt: genGuard(\"!$event.altKey\"),\n meta: genGuard(\"!$event.metaKey\"),\n left: genGuard(\"'button' in $event && $event.button !== 0\"),\n middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n right: genGuard(\"'button' in $event && $event.button !== 2\")\n};\n\nfunction genHandlers (\n events,\n isNative,\n warn\n) {\n var res = isNative ? 'nativeOn:{' : 'on:{';\n for (var name in events) {\n res += \"\\\"\" + name + \"\\\":\" + (genHandler(name, events[name])) + \",\";\n }\n return res.slice(0, -1) + '}'\n}\n\nfunction genHandler (\n name,\n handler\n) {\n if (!handler) {\n return 'function(){}'\n }\n\n if (Array.isArray(handler)) {\n return (\"[\" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + \"]\")\n }\n\n var isMethodPath = simplePathRE.test(handler.value);\n var isFunctionExpression = fnExpRE.test(handler.value);\n\n if (!handler.modifiers) {\n if (isMethodPath || isFunctionExpression) {\n return handler.value\n }\n /* istanbul ignore if */\n return (\"function($event){\" + (handler.value) + \"}\") // inline statement\n } else {\n var code = '';\n var genModifierCode = '';\n var keys = [];\n for (var key in handler.modifiers) {\n if (modifierCode[key]) {\n genModifierCode += modifierCode[key];\n // left/right\n if (keyCodes[key]) {\n keys.push(key);\n }\n } else if (key === 'exact') {\n var modifiers = (handler.modifiers);\n genModifierCode += genGuard(\n ['ctrl', 'shift', 'alt', 'meta']\n .filter(function (keyModifier) { return !modifiers[keyModifier]; })\n .map(function (keyModifier) { return (\"$event.\" + keyModifier + \"Key\"); })\n .join('||')\n );\n } else {\n keys.push(key);\n }\n }\n if (keys.length) {\n code += genKeyFilter(keys);\n }\n // Make sure modifiers like prevent and stop get executed after key filtering\n if (genModifierCode) {\n code += genModifierCode;\n }\n var handlerCode = isMethodPath\n ? (\"return \" + (handler.value) + \"($event)\")\n : isFunctionExpression\n ? (\"return (\" + (handler.value) + \")($event)\")\n : handler.value;\n /* istanbul ignore if */\n return (\"function($event){\" + code + handlerCode + \"}\")\n }\n}\n\nfunction genKeyFilter (keys) {\n return (\"if(!('button' in $event)&&\" + (keys.map(genFilterCode).join('&&')) + \")return null;\")\n}\n\nfunction genFilterCode (key) {\n var keyVal = parseInt(key, 10);\n if (keyVal) {\n return (\"$event.keyCode!==\" + keyVal)\n }\n var keyCode = keyCodes[key];\n var keyName = keyNames[key];\n return (\n \"_k($event.keyCode,\" +\n (JSON.stringify(key)) + \",\" +\n (JSON.stringify(keyCode)) + \",\" +\n \"$event.key,\" +\n \"\" + (JSON.stringify(keyName)) +\n \")\"\n )\n}\n\n/* */\n\nfunction on (el, dir) {\n if (process.env.NODE_ENV !== 'production' && dir.modifiers) {\n warn(\"v-on without argument does not support modifiers.\");\n }\n el.wrapListeners = function (code) { return (\"_g(\" + code + \",\" + (dir.value) + \")\"); };\n}\n\n/* */\n\nfunction bind$1 (el, dir) {\n el.wrapData = function (code) {\n return (\"_b(\" + code + \",'\" + (el.tag) + \"',\" + (dir.value) + \",\" + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + \")\")\n };\n}\n\n/* */\n\nvar baseDirectives = {\n on: on,\n bind: bind$1,\n cloak: noop\n}\n\n/* */\n\nvar CodegenState = function CodegenState (options) {\n this.options = options;\n this.warn = options.warn || baseWarn;\n this.transforms = pluckModuleFunction(options.modules, 'transformCode');\n this.dataGenFns = pluckModuleFunction(options.modules, 'genData');\n this.directives = extend(extend({}, baseDirectives), options.directives);\n var isReservedTag = options.isReservedTag || no;\n this.maybeComponent = function (el) { return !isReservedTag(el.tag); };\n this.onceId = 0;\n this.staticRenderFns = [];\n};\n\n\n\nfunction generate (\n ast,\n options\n) {\n var state = new CodegenState(options);\n var code = ast ? genElement(ast, state) : '_c(\"div\")';\n return {\n render: (\"with(this){return \" + code + \"}\"),\n staticRenderFns: state.staticRenderFns\n }\n}\n\nfunction genElement (el, state) {\n if (el.staticRoot && !el.staticProcessed) {\n return genStatic(el, state)\n } else if (el.once && !el.onceProcessed) {\n return genOnce(el, state)\n } else if (el.for && !el.forProcessed) {\n return genFor(el, state)\n } else if (el.if && !el.ifProcessed) {\n return genIf(el, state)\n } else if (el.tag === 'template' && !el.slotTarget) {\n return genChildren(el, state) || 'void 0'\n } else if (el.tag === 'slot') {\n return genSlot(el, state)\n } else {\n // component or element\n var code;\n if (el.component) {\n code = genComponent(el.component, el, state);\n } else {\n var data = el.plain ? undefined : genData$2(el, state);\n\n var children = el.inlineTemplate ? null : genChildren(el, state, true);\n code = \"_c('\" + (el.tag) + \"'\" + (data ? (\",\" + data) : '') + (children ? (\",\" + children) : '') + \")\";\n }\n // module transforms\n for (var i = 0; i < state.transforms.length; i++) {\n code = state.transforms[i](el, code);\n }\n return code\n }\n}\n\n// hoist static sub-trees out\nfunction genStatic (el, state) {\n el.staticProcessed = true;\n state.staticRenderFns.push((\"with(this){return \" + (genElement(el, state)) + \"}\"));\n return (\"_m(\" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + \")\")\n}\n\n// v-once\nfunction genOnce (el, state) {\n el.onceProcessed = true;\n if (el.if && !el.ifProcessed) {\n return genIf(el, state)\n } else if (el.staticInFor) {\n var key = '';\n var parent = el.parent;\n while (parent) {\n if (parent.for) {\n key = parent.key;\n break\n }\n parent = parent.parent;\n }\n if (!key) {\n process.env.NODE_ENV !== 'production' && state.warn(\n \"v-once can only be used inside v-for that is keyed. \"\n );\n return genElement(el, state)\n }\n return (\"_o(\" + (genElement(el, state)) + \",\" + (state.onceId++) + \",\" + key + \")\")\n } else {\n return genStatic(el, state)\n }\n}\n\nfunction genIf (\n el,\n state,\n altGen,\n altEmpty\n) {\n el.ifProcessed = true; // avoid recursion\n return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)\n}\n\nfunction genIfConditions (\n conditions,\n state,\n altGen,\n altEmpty\n) {\n if (!conditions.length) {\n return altEmpty || '_e()'\n }\n\n var condition = conditions.shift();\n if (condition.exp) {\n return (\"(\" + (condition.exp) + \")?\" + (genTernaryExp(condition.block)) + \":\" + (genIfConditions(conditions, state, altGen, altEmpty)))\n } else {\n return (\"\" + (genTernaryExp(condition.block)))\n }\n\n // v-if with v-once should generate code like (a)?_m(0):_m(1)\n function genTernaryExp (el) {\n return altGen\n ? altGen(el, state)\n : el.once\n ? genOnce(el, state)\n : genElement(el, state)\n }\n}\n\nfunction genFor (\n el,\n state,\n altGen,\n altHelper\n) {\n var exp = el.for;\n var alias = el.alias;\n var iterator1 = el.iterator1 ? (\",\" + (el.iterator1)) : '';\n var iterator2 = el.iterator2 ? (\",\" + (el.iterator2)) : '';\n\n if (process.env.NODE_ENV !== 'production' &&\n state.maybeComponent(el) &&\n el.tag !== 'slot' &&\n el.tag !== 'template' &&\n !el.key\n ) {\n state.warn(\n \"<\" + (el.tag) + \" v-for=\\\"\" + alias + \" in \" + exp + \"\\\">: component lists rendered with \" +\n \"v-for should have explicit keys. \" +\n \"See https://vuejs.org/guide/list.html#key for more info.\",\n true /* tip */\n );\n }\n\n el.forProcessed = true; // avoid recursion\n return (altHelper || '_l') + \"((\" + exp + \"),\" +\n \"function(\" + alias + iterator1 + iterator2 + \"){\" +\n \"return \" + ((altGen || genElement)(el, state)) +\n '})'\n}\n\nfunction genData$2 (el, state) {\n var data = '{';\n\n // directives first.\n // directives may mutate the el's other properties before they are generated.\n var dirs = genDirectives(el, state);\n if (dirs) { data += dirs + ','; }\n\n // key\n if (el.key) {\n data += \"key:\" + (el.key) + \",\";\n }\n // ref\n if (el.ref) {\n data += \"ref:\" + (el.ref) + \",\";\n }\n if (el.refInFor) {\n data += \"refInFor:true,\";\n }\n // pre\n if (el.pre) {\n data += \"pre:true,\";\n }\n // record original tag name for components using \"is\" attribute\n if (el.component) {\n data += \"tag:\\\"\" + (el.tag) + \"\\\",\";\n }\n // module data generation functions\n for (var i = 0; i < state.dataGenFns.length; i++) {\n data += state.dataGenFns[i](el);\n }\n // attributes\n if (el.attrs) {\n data += \"attrs:{\" + (genProps(el.attrs)) + \"},\";\n }\n // DOM props\n if (el.props) {\n data += \"domProps:{\" + (genProps(el.props)) + \"},\";\n }\n // event handlers\n if (el.events) {\n data += (genHandlers(el.events, false, state.warn)) + \",\";\n }\n if (el.nativeEvents) {\n data += (genHandlers(el.nativeEvents, true, state.warn)) + \",\";\n }\n // slot target\n // only for non-scoped slots\n if (el.slotTarget && !el.slotScope) {\n data += \"slot:\" + (el.slotTarget) + \",\";\n }\n // scoped slots\n if (el.scopedSlots) {\n data += (genScopedSlots(el.scopedSlots, state)) + \",\";\n }\n // component v-model\n if (el.model) {\n data += \"model:{value:\" + (el.model.value) + \",callback:\" + (el.model.callback) + \",expression:\" + (el.model.expression) + \"},\";\n }\n // inline-template\n if (el.inlineTemplate) {\n var inlineTemplate = genInlineTemplate(el, state);\n if (inlineTemplate) {\n data += inlineTemplate + \",\";\n }\n }\n data = data.replace(/,$/, '') + '}';\n // v-bind data wrap\n if (el.wrapData) {\n data = el.wrapData(data);\n }\n // v-on data wrap\n if (el.wrapListeners) {\n data = el.wrapListeners(data);\n }\n return data\n}\n\nfunction genDirectives (el, state) {\n var dirs = el.directives;\n if (!dirs) { return }\n var res = 'directives:[';\n var hasRuntime = false;\n var i, l, dir, needRuntime;\n for (i = 0, l = dirs.length; i < l; i++) {\n dir = dirs[i];\n needRuntime = true;\n var gen = state.directives[dir.name];\n if (gen) {\n // compile-time directive that manipulates AST.\n // returns true if it also needs a runtime counterpart.\n needRuntime = !!gen(el, dir, state.warn);\n }\n if (needRuntime) {\n hasRuntime = true;\n res += \"{name:\\\"\" + (dir.name) + \"\\\",rawName:\\\"\" + (dir.rawName) + \"\\\"\" + (dir.value ? (\",value:(\" + (dir.value) + \"),expression:\" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (\",arg:\\\"\" + (dir.arg) + \"\\\"\") : '') + (dir.modifiers ? (\",modifiers:\" + (JSON.stringify(dir.modifiers))) : '') + \"},\";\n }\n }\n if (hasRuntime) {\n return res.slice(0, -1) + ']'\n }\n}\n\nfunction genInlineTemplate (el, state) {\n var ast = el.children[0];\n if (process.env.NODE_ENV !== 'production' && (\n el.children.length !== 1 || ast.type !== 1\n )) {\n state.warn('Inline-template components must have exactly one child element.');\n }\n if (ast.type === 1) {\n var inlineRenderFns = generate(ast, state.options);\n return (\"inlineTemplate:{render:function(){\" + (inlineRenderFns.render) + \"},staticRenderFns:[\" + (inlineRenderFns.staticRenderFns.map(function (code) { return (\"function(){\" + code + \"}\"); }).join(',')) + \"]}\")\n }\n}\n\nfunction genScopedSlots (\n slots,\n state\n) {\n return (\"scopedSlots:_u([\" + (Object.keys(slots).map(function (key) {\n return genScopedSlot(key, slots[key], state)\n }).join(',')) + \"])\")\n}\n\nfunction genScopedSlot (\n key,\n el,\n state\n) {\n if (el.for && !el.forProcessed) {\n return genForScopedSlot(key, el, state)\n }\n var fn = \"function(\" + (String(el.slotScope)) + \"){\" +\n \"return \" + (el.tag === 'template'\n ? el.if\n ? ((el.if) + \"?\" + (genChildren(el, state) || 'undefined') + \":undefined\")\n : genChildren(el, state) || 'undefined'\n : genElement(el, state)) + \"}\";\n return (\"{key:\" + key + \",fn:\" + fn + \"}\")\n}\n\nfunction genForScopedSlot (\n key,\n el,\n state\n) {\n var exp = el.for;\n var alias = el.alias;\n var iterator1 = el.iterator1 ? (\",\" + (el.iterator1)) : '';\n var iterator2 = el.iterator2 ? (\",\" + (el.iterator2)) : '';\n el.forProcessed = true; // avoid recursion\n return \"_l((\" + exp + \"),\" +\n \"function(\" + alias + iterator1 + iterator2 + \"){\" +\n \"return \" + (genScopedSlot(key, el, state)) +\n '})'\n}\n\nfunction genChildren (\n el,\n state,\n checkSkip,\n altGenElement,\n altGenNode\n) {\n var children = el.children;\n if (children.length) {\n var el$1 = children[0];\n // optimize single v-for\n if (children.length === 1 &&\n el$1.for &&\n el$1.tag !== 'template' &&\n el$1.tag !== 'slot'\n ) {\n return (altGenElement || genElement)(el$1, state)\n }\n var normalizationType = checkSkip\n ? getNormalizationType(children, state.maybeComponent)\n : 0;\n var gen = altGenNode || genNode;\n return (\"[\" + (children.map(function (c) { return gen(c, state); }).join(',')) + \"]\" + (normalizationType ? (\",\" + normalizationType) : ''))\n }\n}\n\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType (\n children,\n maybeComponent\n) {\n var res = 0;\n for (var i = 0; i < children.length; i++) {\n var el = children[i];\n if (el.type !== 1) {\n continue\n }\n if (needsNormalization(el) ||\n (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\n res = 2;\n break\n }\n if (maybeComponent(el) ||\n (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {\n res = 1;\n }\n }\n return res\n}\n\nfunction needsNormalization (el) {\n return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'\n}\n\nfunction genNode (node, state) {\n if (node.type === 1) {\n return genElement(node, state)\n } if (node.type === 3 && node.isComment) {\n return genComment(node)\n } else {\n return genText(node)\n }\n}\n\nfunction genText (text) {\n return (\"_v(\" + (text.type === 2\n ? text.expression // no need for () because already wrapped in _s()\n : transformSpecialNewlines(JSON.stringify(text.text))) + \")\")\n}\n\nfunction genComment (comment) {\n return (\"_e(\" + (JSON.stringify(comment.text)) + \")\")\n}\n\nfunction genSlot (el, state) {\n var slotName = el.slotName || '\"default\"';\n var children = genChildren(el, state);\n var res = \"_t(\" + slotName + (children ? (\",\" + children) : '');\n var attrs = el.attrs && (\"{\" + (el.attrs.map(function (a) { return ((camelize(a.name)) + \":\" + (a.value)); }).join(',')) + \"}\");\n var bind$$1 = el.attrsMap['v-bind'];\n if ((attrs || bind$$1) && !children) {\n res += \",null\";\n }\n if (attrs) {\n res += \",\" + attrs;\n }\n if (bind$$1) {\n res += (attrs ? '' : ',null') + \",\" + bind$$1;\n }\n return res + ')'\n}\n\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent (\n componentName,\n el,\n state\n) {\n var children = el.inlineTemplate ? null : genChildren(el, state, true);\n return (\"_c(\" + componentName + \",\" + (genData$2(el, state)) + (children ? (\",\" + children) : '') + \")\")\n}\n\nfunction genProps (props) {\n var res = '';\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n /* istanbul ignore if */\n {\n res += \"\\\"\" + (prop.name) + \"\\\":\" + (transformSpecialNewlines(prop.value)) + \",\";\n }\n }\n return res.slice(0, -1)\n}\n\n// #3895, #4268\nfunction transformSpecialNewlines (text) {\n return text\n .replace(/\\u2028/g, '\\\\u2028')\n .replace(/\\u2029/g, '\\\\u2029')\n}\n\n/* */\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nvar prohibitedKeywordRE = new RegExp('\\\\b' + (\n 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n 'super,throw,while,yield,delete,export,import,return,switch,default,' +\n 'extends,finally,continue,debugger,function,arguments'\n).split(',').join('\\\\b|\\\\b') + '\\\\b');\n\n// these unary operators should not be used as property/method names\nvar unaryOperatorsRE = new RegExp('\\\\b' + (\n 'delete,typeof,void'\n).split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') + '\\\\s*\\\\([^\\\\)]*\\\\)');\n\n// strip strings in expressions\nvar stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n\n// detect problematic expressions in a template\nfunction detectErrors (ast) {\n var errors = [];\n if (ast) {\n checkNode(ast, errors);\n }\n return errors\n}\n\nfunction checkNode (node, errors) {\n if (node.type === 1) {\n for (var name in node.attrsMap) {\n if (dirRE.test(name)) {\n var value = node.attrsMap[name];\n if (value) {\n if (name === 'v-for') {\n checkFor(node, (\"v-for=\\\"\" + value + \"\\\"\"), errors);\n } else if (onRE.test(name)) {\n checkEvent(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n } else {\n checkExpression(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n }\n }\n }\n }\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n checkNode(node.children[i], errors);\n }\n }\n } else if (node.type === 2) {\n checkExpression(node.expression, node.text, errors);\n }\n}\n\nfunction checkEvent (exp, text, errors) {\n var stipped = exp.replace(stripStringRE, '');\n var keywordMatch = stipped.match(unaryOperatorsRE);\n if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {\n errors.push(\n \"avoid using JavaScript unary operator as property name: \" +\n \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n );\n }\n checkExpression(exp, text, errors);\n}\n\nfunction checkFor (node, text, errors) {\n checkExpression(node.for || '', text, errors);\n checkIdentifier(node.alias, 'v-for alias', text, errors);\n checkIdentifier(node.iterator1, 'v-for iterator', text, errors);\n checkIdentifier(node.iterator2, 'v-for iterator', text, errors);\n}\n\nfunction checkIdentifier (\n ident,\n type,\n text,\n errors\n) {\n if (typeof ident === 'string') {\n try {\n new Function((\"var \" + ident + \"=_\"));\n } catch (e) {\n errors.push((\"invalid \" + type + \" \\\"\" + ident + \"\\\" in expression: \" + (text.trim())));\n }\n }\n}\n\nfunction checkExpression (exp, text, errors) {\n try {\n new Function((\"return \" + exp));\n } catch (e) {\n var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);\n if (keywordMatch) {\n errors.push(\n \"avoid using JavaScript keyword as property name: \" +\n \"\\\"\" + (keywordMatch[0]) + \"\\\"\\n Raw expression: \" + (text.trim())\n );\n } else {\n errors.push(\n \"invalid expression: \" + (e.message) + \" in\\n\\n\" +\n \" \" + exp + \"\\n\\n\" +\n \" Raw expression: \" + (text.trim()) + \"\\n\"\n );\n }\n }\n}\n\n/* */\n\nfunction createFunction (code, errors) {\n try {\n return new Function(code)\n } catch (err) {\n errors.push({ err: err, code: code });\n return noop\n }\n}\n\nfunction createCompileToFunctionFn (compile) {\n var cache = Object.create(null);\n\n return function compileToFunctions (\n template,\n options,\n vm\n ) {\n options = extend({}, options);\n var warn$$1 = options.warn || warn;\n delete options.warn;\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production') {\n // detect possible CSP restriction\n try {\n new Function('return 1');\n } catch (e) {\n if (e.toString().match(/unsafe-eval|CSP/)) {\n warn$$1(\n 'It seems you are using the standalone build of Vue.js in an ' +\n 'environment with Content Security Policy that prohibits unsafe-eval. ' +\n 'The template compiler cannot work in this environment. Consider ' +\n 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n 'templates into render functions.'\n );\n }\n }\n }\n\n // check cache\n var key = options.delimiters\n ? String(options.delimiters) + template\n : template;\n if (cache[key]) {\n return cache[key]\n }\n\n // compile\n var compiled = compile(template, options);\n\n // check compilation errors/tips\n if (process.env.NODE_ENV !== 'production') {\n if (compiled.errors && compiled.errors.length) {\n warn$$1(\n \"Error compiling template:\\n\\n\" + template + \"\\n\\n\" +\n compiled.errors.map(function (e) { return (\"- \" + e); }).join('\\n') + '\\n',\n vm\n );\n }\n if (compiled.tips && compiled.tips.length) {\n compiled.tips.forEach(function (msg) { return tip(msg, vm); });\n }\n }\n\n // turn code into functions\n var res = {};\n var fnGenErrors = [];\n res.render = createFunction(compiled.render, fnGenErrors);\n res.staticRenderFns = compiled.staticRenderFns.map(function (code) {\n return createFunction(code, fnGenErrors)\n });\n\n // check function generation errors.\n // this should only happen if there is a bug in the compiler itself.\n // mostly for codegen development use\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production') {\n if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n warn$$1(\n \"Failed to generate render function:\\n\\n\" +\n fnGenErrors.map(function (ref) {\n var err = ref.err;\n var code = ref.code;\n\n return ((err.toString()) + \" in\\n\\n\" + code + \"\\n\");\n }).join('\\n'),\n vm\n );\n }\n }\n\n return (cache[key] = res)\n }\n}\n\n/* */\n\nfunction createCompilerCreator (baseCompile) {\n return function createCompiler (baseOptions) {\n function compile (\n template,\n options\n ) {\n var finalOptions = Object.create(baseOptions);\n var errors = [];\n var tips = [];\n finalOptions.warn = function (msg, tip) {\n (tip ? tips : errors).push(msg);\n };\n\n if (options) {\n // merge custom modules\n if (options.modules) {\n finalOptions.modules =\n (baseOptions.modules || []).concat(options.modules);\n }\n // merge custom directives\n if (options.directives) {\n finalOptions.directives = extend(\n Object.create(baseOptions.directives || null),\n options.directives\n );\n }\n // copy other options\n for (var key in options) {\n if (key !== 'modules' && key !== 'directives') {\n finalOptions[key] = options[key];\n }\n }\n }\n\n var compiled = baseCompile(template, finalOptions);\n if (process.env.NODE_ENV !== 'production') {\n errors.push.apply(errors, detectErrors(compiled.ast));\n }\n compiled.errors = errors;\n compiled.tips = tips;\n return compiled\n }\n\n return {\n compile: compile,\n compileToFunctions: createCompileToFunctionFn(compile)\n }\n }\n}\n\n/* */\n\n// `createCompilerCreator` allows creating compilers that use alternative\n// parser/optimizer/codegen, e.g the SSR optimizing compiler.\n// Here we just export a default compiler using the default parts.\nvar createCompiler = createCompilerCreator(function baseCompile (\n template,\n options\n) {\n var ast = parse(template.trim(), options);\n if (options.optimize !== false) {\n optimize(ast, options);\n }\n var code = generate(ast, options);\n return {\n ast: ast,\n render: code.render,\n staticRenderFns: code.staticRenderFns\n }\n});\n\n/* */\n\nvar ref$1 = createCompiler(baseOptions);\nvar compileToFunctions = ref$1.compileToFunctions;\n\n/* */\n\n// check whether current browser encodes a char inside attribute values\nvar div;\nfunction getShouldDecode (href) {\n div = div || document.createElement('div');\n div.innerHTML = href ? \"<a href=\\\"\\n\\\"/>\" : \"<div a=\\\"\\n\\\"/>\";\n return div.innerHTML.indexOf(' ') > 0\n}\n\n// #3663: IE encodes newlines inside attribute values while other browsers don't\nvar shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;\n// #6828: chrome encodes content in a[href]\nvar shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;\n\n/* */\n\nvar idToTemplate = cached(function (id) {\n var el = query(id);\n return el && el.innerHTML\n});\n\nvar mount = Vue.prototype.$mount;\nVue.prototype.$mount = function (\n el,\n hydrating\n) {\n el = el && query(el);\n\n /* istanbul ignore if */\n if (el === document.body || el === document.documentElement) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Do not mount Vue to <html> or <body> - mount to normal elements instead.\"\n );\n return this\n }\n\n var options = this.$options;\n // resolve template/el and convert to render function\n if (!options.render) {\n var template = options.template;\n if (template) {\n if (typeof template === 'string') {\n if (template.charAt(0) === '#') {\n template = idToTemplate(template);\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !template) {\n warn(\n (\"Template element not found or is empty: \" + (options.template)),\n this\n );\n }\n }\n } else if (template.nodeType) {\n template = template.innerHTML;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn('invalid template option:' + template, this);\n }\n return this\n }\n } else if (el) {\n template = getOuterHTML(el);\n }\n if (template) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n mark('compile');\n }\n\n var ref = compileToFunctions(template, {\n shouldDecodeNewlines: shouldDecodeNewlines,\n shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,\n delimiters: options.delimiters,\n comments: options.comments\n }, this);\n var render = ref.render;\n var staticRenderFns = ref.staticRenderFns;\n options.render = render;\n options.staticRenderFns = staticRenderFns;\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n mark('compile end');\n measure((\"vue \" + (this._name) + \" compile\"), 'compile', 'compile end');\n }\n }\n }\n return mount.call(this, el, hydrating)\n};\n\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML (el) {\n if (el.outerHTML) {\n return el.outerHTML\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML\n }\n}\n\nVue.compile = compileToFunctions;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Vue);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1), __webpack_require__(4), __webpack_require__(24).setImmediate))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdnVlL2Rpc3QvdnVlLmVzbS5qcz9lZmViIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxrQ0FBa0M7O0FBRWxDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQ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CkgPT4gUHJvbWlzZVxuICAgICAgICBpZiAoaXNVbmRlZihmYWN0b3J5LnJlc29sdmVkKSkge1xuICAgICAgICAgIHJlcy50aGVuKHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoaXNEZWYocmVzLmNvbXBvbmVudCkgJiYgdHlwZW9mIHJlcy5jb21wb25lbnQudGhlbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICByZXMuY29tcG9uZW50LnRoZW4ocmVzb2x2ZSwgcmVqZWN0KTtcblxuICAgICAgICBpZiAoaXNEZWYocmVzLmVycm9yKSkge1xuICAgICAgICAgIGZhY3RvcnkuZXJyb3JDb21wID0gZW5zdXJlQ3RvcihyZXMuZXJyb3IsIGJhc2VDdG9yKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0RlZihyZXMubG9hZGluZykpIHtcbiAgICAgICAgICBmYWN0b3J5LmxvYWRpbmdDb21wID0gZW5zdXJlQ3RvcihyZXMubG9hZGluZywgYmFzZUN0b3IpO1xuICAgICAgICAgIGlmIChyZXMuZGVsYXkgPT09IDApIHtcbiAgICAgICAgICAgIGZhY3RvcnkubG9hZGluZyA9IHRydWU7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICBpZiAoaXNVbmRlZihmYWN0b3J5LnJlc29sdmVkKSAmJiBpc1VuZGVmKGZhY3RvcnkuZXJyb3IpKSB7XG4gICAgICAgICAgICAgICAgZmFjdG9yeS5sb2FkaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBmb3JjZVJlbmRlcigpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCByZXMuZGVsYXkgfHwgMjAwKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaXNEZWYocmVzLnRpbWVvdXQpKSB7XG4gICAgICAgICAgc2V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gICAgLy8gdi1odG1sIGFuZCBkb21Qcm9wczogaW5uZXJIVE1MXG4gICAgICAgICAgaWYgKGlzRGVmKGkgPSBkYXRhKSAmJiBpc0RlZihpID0gaS5kb21Qcm9wcykgJiYgaXNEZWYoaSA9IGkuaW5uZXJIVE1MKSkge1xuICAgICAgICAgICAgaWYgKGkgIT09IGVsbS5pbm5lckhUTUwpIHtcbiAgICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nICYmXG4gICAgICAgICAgICAgICAgdHlwZW9mIGNvbnNvbGUgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICAgICAgIWh5ZHJhdGlvbkJhaWxlZFxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoeWRyYXRpb25CYWlsZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybignUGFyZW50OiAnLCBlbG0pO1xuICAgICAgICAgICAgICAgIGNvbnNvbGUud2Fybignc2VydmVyIGlubmVySFRNTDogJywgaSk7XG4gICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdjbGllbnQgaW5uZXJIVE1MOiAnLCBlbG0uaW5uZXJIVE1MKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gaXRlcmF0ZSBhbmQgY29tcGFyZSBjaGlsZHJlbiBsaXN0c1xuICAgICAgICAgICAgdmFyIGNoaWxkcmVuTWF0Y2ggPSB0cnVlO1xuICAgICAgICAgICAgdmFyIGNoaWxkTm9kZSA9IGVsbS5maXJzdENoaWxkO1xuICAgICAgICAgICAgZm9yICh2YXIgaSQxID0gMDsgaSQxIDwgY2hpbGRyZW4ubGVuZ3RoOyBpJDErKykge1xuICAgICAgICAgICAgICBpZiAoIWNoaWxkTm9kZSB8fCAhaHlkcmF0ZShjaGlsZE5vZGUsIGNoaWxkcmVuW2kkMV0sIGluc2VydGVkVm5vZGVRdWV1ZSwgaW5WUHJlKSkge1xuICAgICAgICAgICAgICAgIGNoaWxkcmVuTWF0Y2ggPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGNoaWxkTm9kZSA9IGNoaWxkTm9kZS5uZXh0U2libGluZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGlmIGNoaWxkTm9kZSBpcyBub3QgbnVsbCwgaXQgbWVhbnMgdGhlIGFjdHVhbCBjaGlsZE5vZGVzIGxpc3QgaXNcbiAgICAgICAgICAgIC8vIGxvbmdlciB0aGFuIHRoZSB2aXJ0dWFsIGNoaWxkcmVuIGxpc3QuXG4gICAgICAgICAgICBpZiAoIWNoaWxkcmVuTWF0Y2ggfHwgY2hpbGROb2RlKSB7XG4gICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICAgICAgICBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJyAmJlxuICAgICAgICAgICAgICAgIHR5cGVvZiBjb25zb2xlICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgICAgICAgICAgICFoeWRyYXRpb25CYWlsZWRcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaHlkcmF0aW9uQmFpbGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ1BhcmVudDogJywgZWxtKTtcbiAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ01pc21hdGNoaW5nIGNoaWxkTm9kZXMgdnMuIFZOb2RlczogJywgZWxtLmNoaWxkTm9kZXMsIGNoaWxkcmVuKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZXR1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W4rKzsgYnJlYWsgICAgICAgICAgICAgICAgIC8vIChcbiAgICAgICAgY2FzZSAweDI5OiBwYXJlbi0tOyBicmVhayAgICAgICAgICAgICAgICAgLy8gKVxuICAgICAgICBjYXNlIDB4NUI6IHNxdWFyZSsrOyBicmVhayAgICAgICAgICAgICAgICAvLyBbXG4gICAgICAgIGNhc2UgMHg1RDogc3F1YXJlLS07IGJyZWFrICAgICAgICAgICAgICAgIC8vIF1cbiAgICAgICAgY2FzZSAweDdCOiBjdXJseSsrOyBicmVhayAgICAgICAgICAgICAgICAgLy8ge1xuICAgICAgICBjYXNlIDB4N0Q6IGN1cmx5LS07IGJyZWFrICAgICAgICAgICAgICAgICAvLyB9XG4gICAgICB9XG4gICAgICBpZiAoYyA9PT0gMHgyZikgeyAvLyAvXG4gICAgICAgIHZhciBqID0gaSAtIDE7XG4gICAgICAgIHZhciBwID0gKHZvaWQgMCk7XG4gICAgICAgIC8vIGZpbmQgZmlyc3Qgbm9uLXdoaXRlc3BhY2UgcHJldiBjaGFyXG4gICAgICAgIGZvciAoOyBqID49IDA7IGotLSkge1xuICAgICAgICAgIHAgPSBleHAuY2hhckF0KGopO1xuICAgICAgICAgIGlmIChwICE9PSAnICcpIHsgYnJlYWsgfVxuICAgICAgICB9XG4gICAgICAgIGlmICghcCB8fCAhdmFsaWREaXZpc2lvbkNoYXJSRS50ZXN0KHApKSB7XG4gICAgICAgICAgaW5SZWdleCA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBpZiAoZXhwcmVzc2lvbiA9PT0gdW5kZWZpbmVkKSB7XG4gICAgZXhwcmVzc2lvbiA9IGV4cC5zbGljZSgwLCBpKS50cmltKCk7XG4gIH0gZWxzZSBpZiAobGFzdEZpbHRlckluZGV4ICE9PSAwKSB7XG4gICAgcHVzaEZpbHRlcigpO1xuICB9XG5cbiAgZnVuY3Rpb24gcHVzaEZpbHRlciAoKSB7XG4gICAgKGZpbHRlcnMgfHwgKG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IHtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnNob3VsZEtlZXBDb21tZW50KSB7XG4gICAgICAgICAgICAgIG9wdGlvbnMuY29tbWVudChodG1sLnN1YnN0cmluZyg0LCBjb21tZW50RW5kKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhZHZhbmNlKGNvbW1lbnRFbmQgKyAzKTtcbiAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gaHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Db25kaXRpb25hbF9jb21tZW50I0Rvd25sZXZlbC1yZXZlYWxlZF9jb25kaXRpb25hbF9jb21tZW50XG4gICAgICAgIGlmIChjb25kaXRpb25hbENvbW1lbnQudGVzdChodG1sKSkge1xuICAgICAgICAgIHZhciBjb25kaXRpb25hbEVuZCA9IGh0bWwuaW5kZXhPZignXT4nKTtcblxuICAgICAgICAgIGlmIChjb25kaXRpb25hbEVuZCA+PSAwKSB7XG4gICAgICAgICAgICBhZHZhbmNlKGNvbmRpdGlvbmFsRW5kICsgMik7XG4gICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIERvY3R5cGU6XG4gICAgICAgIHZhciBkb2N0eXBlTWF0Y2ggPSBodG1sLm1hdGNoKGRvY3R5cGUpO1xuICAgICAgICBpZiAoZG9jdHlwZU1hdGNoKSB7XG4gICAgICAgICAgYWR2YW5jZShkb2N0eXBlTWF0Y2hbMF0ubGVuZ3RoKTtcbiAgICAgICAgICBjb250aW51ZVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gRW5kIHRhZzpcbiAgICAgICAgdmFyIGVuZFRhZ01hdGNoID0gaHRtbC5tYXRjaChlbmRUYWcpO1xuICAgICAgICBpZiAoZW5kVGFnTWF0Y2gpIHtcbiAgICAgICAgICB2YXIgY3VySW5kZXggPSBpbmRleDtcbiAgICAgICAgICBhZHZhbmN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mIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgICAgICAgaWYgKGVsLnRhZyA9PT0gJ3Nsb3QnIHx8IGVsLnRhZyA9PT0gJ3RlbXBsYXRlJykge1xuICAgICAgICAgICAgd2Fybk9uY2UoXG4gICAgICAgICAgICAgIFwiQ2Fubm90IHVzZSA8XCIgKyAoZWwudGFnKSArIFwiPiBhcyBjb21wb25lbnQgcm9vdCBlbGVtZW50IGJlY2F1c2UgaXQgbWF5IFwiICtcbiAgICAgICAgICAgICAgJ2NvbnRhaW4gbXVsdGlwbGUgbm9kZXMuJ1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGVsLmF0dHJzTWFwLmhhc093blByb3BlcnR5KCd2LWZvcicpKSB7XG4gICAgICAgICAgICB3YXJuT25jZShcbiAgICAgICAgICAgICAgJ0Nhbm5vdCB1c2Ugdi1mb3Igb24gc3RhdGVmdWwgY29tcG9uZW50IHJvb3QgZWxlbWVudCBiZWNhdXNlICcgK1xuICAgICAgICAgICAgICAnaXQgcmVuZGVycyBtdWx0aXBsZSBlbGVtZW50cy4nXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyB0cmVlIG1hbmFnZW1lbnRcbiAgICAgIGlmICghcm9vdCkge1xuICAgICAgICByb290ID0gZWxlbWVudDtcbiAgICAgICAgY2hlY2tSb290Q29uc3RyYWludHMocm9vdCk7XG4gICAgICB9IGVsc2UgaWYgKCFzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgLy8gYWxsb3cgcm9vdCBlbGVtZW50cyB3aXRoIHYtaWYsIHYtZWxzZS1pZiBhbmQgdi1lbHNlXG4gICAgICAgIGlmIChyb290LmlmICYmIChlbGVtZW50LmVsc2VpZiB8fCBlbGVtZW50LmVsc2UpKSB7XG4gICAgICAgICAgY2hlY2tSb290Q29uc3RyYWludHMoZW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W5uZXJIVE1MJzsgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAobW9kaWZpZXJzLmNhbWVsKSB7XG4gICAgICAgICAgICBuYW1lID0gY2FtZWxpemUobmFtZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChtb2RpZmllcnMuc3luYykge1xuICAgICAgICAgICAgYWRkSGFuZGxlcihcbiAgICAgICAgICAgICAgZWwsXG4gICAgICAgICAgICAgIChcInVwZGF0ZTpcIiArIChjYW1lbGl6ZShuYW1lKSkpLFxuICAgICAgICAgICAgICBnZW5Bc3NpZ25tZW50Q29kZSh2YWx1ZSwgXCIkZXZlbnRcIilcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChpc1Byb3AgfHwgKFxuICAgICAgICAgICFlbC5jb21wb25lbnQgJiYgcGxhdGZvcm1NdXN0VXNlUHJvcChlbC50YWcsIGVsLmF0dHJzTWFwLnR5cGUsIG5hbWUpXG4gICAgICAgICkpIHtcbiAgICAgICAgICBhZGRQcm9wKGVsLCBuYW1lLCB2YWx1ZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgYWRkQXR0cihlbCwgbmFtZSwgdmFsdWUpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKG9uUkUudGVzdChuYW1lKSkgeyAvLyB2LW9uXG4gICAgICAgIG5hbWUgPSBuYW1lLnJlcGxhY2Uob25SRSwgJycpO1xuICAgICAgICBhZGRIYW5kbGVyKGVsLCBuYW1lLCB2YWx1ZSwgbW9kaWZpZXJzLCBmYWxzZSwgd2FybiQyKTtcbiAgICAgIH0gZWxzZSB7IC8vIG5vcm1hbCBkaXJlY3RpdmVzXG4gICAgICAgIG5hbWUgPSBuYW1lLnJlcGxhY2UoZGlyUkUsICcnKTtcbiAgICAgICAgLy8gcGFyc2UgYXJnXG4gICAgICAgIHZhciBhcmdNYXRjaCA9IG5hbWUubWF0Y2goYXJnUkUpO1xuICAg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RyBlbGVtZW50cyBpbiBJRSBhcyB3ZWxsLlxuICovXG5mdW5jdGlvbiBnZXRPdXRlckhUTUwgKGVsKSB7XG4gIGlmIChlbC5vdXRlckhUTUwpIHtcbiAgICByZXR1cm4gZWwub3V0ZXJIVE1MXG4gIH0gZWxzZSB7XG4gICAgdmFyIGNvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xuICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChlbC5jbG9uZU5vZGUodHJ1ZSkpO1xuICAgIHJldHVybiBjb250YWluZXIuaW5uZXJIVE1MXG4gIH1cbn1cblxuVnVlLmNvbXBpbGUgPSBjb21waWxlVG9GdW5jdGlvbnM7XG5cbmV4cG9ydCBkZWZhdWx0IFZ1ZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL3Z1ZS9kaXN0L3Z1ZS5lc20uanNcbi8vIG1vZHVsZSBpZCA9IDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3\n");
|
||
|
||
/***/ }),
|
||
/* 4 */
|
||
/***/ (function(module, exports) {
|
||
|
||
eval("var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vKHd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DSyBGT09URVJcbi8vICh3ZWJwYWNrKS9idWlsZGluL2dsb2JhbC5qc1xuLy8gbW9kdWxlIGlkID0gNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///4\n");
|
||
|
||
/***/ }),
|
||
/* 5 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios__ = __webpack_require__(46);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_axios__);\n\n\nvar requestToken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');\nvar tokenHeaders = { headers: { requesttoken: requestToken } };\n\nvar sanitize = function sanitize(url) {\n\treturn url.replace(/\\/$/, ''); // Remove last url slash\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\n\t/**\n * This Promise is used to chain a request that require an admin password confirmation\n * Since chaining Promise have a very precise behavior concerning catch and then,\n * you'll need to be careful when using it.\n * e.g\n * // store\n * \taction(context) {\n *\t\treturn api.requireAdmin().then((response) => {\n *\t\t\treturn api.get('url')\n *\t\t\t\t.then((response) => {API success})\n *\t\t\t\t.catch((error) => {API failure});\n *\t\t}).catch((error) => {requireAdmin failure});\n *\t}\n * // vue\n *\tthis.$store.dispatch('action').then(() => {always executed})\n *\n * Since Promise.then().catch().then() will always execute the last then\n * this.$store.dispatch('action').then will always be executed\n * \n * If you want requireAdmin failure to also catch the API request failure\n * you will need to throw a new error in the api.get.catch()\n * \n * e.g\n *\tapi.requireAdmin().then((response) => {\n *\t\tapi.get('url')\n *\t\t\t.then((response) => {API success})\n *\t\t\t.catch((error) => {throw error;});\n *\t}).catch((error) => {requireAdmin OR API failure});\n * \n * @returns {Promise}\n */\n\trequireAdmin: function requireAdmin() {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\t// TODO: migrate the OC.dialog to Vue and avoid this mess\n\t\t\t// wait for password confirmation\n\t\t\tvar passwordTimeout = void 0;\n\t\t\tvar waitForpassword = function waitForpassword() {\n\t\t\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\t\t\tpasswordTimeout = setTimeout(waitForpassword, 500);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tclearTimeout(passwordTimeout);\n\t\t\t\tclearTimeout(promiseTimeout);\n\t\t\t\tresolve();\n\t\t\t};\n\n\t\t\t// automatically reject after 5s if not resolved\n\t\t\tvar promiseTimeout = setTimeout(function () {\n\t\t\t\tclearTimeout(passwordTimeout);\n\t\t\t\t// close dialog\n\t\t\t\tif (document.getElementsByClassName('oc-dialog-close').length > 0) {\n\t\t\t\t\tdocument.getElementsByClassName('oc-dialog-close')[0].click();\n\t\t\t\t}\n\t\t\t\tOC.Notification.showTemporary(t('settings', 'You did not enter the password in time'));\n\t\t\t\treject('Password request cancelled');\n\t\t\t}, 7000);\n\n\t\t\t// request password\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation();\n\t\t\twaitForpassword();\n\t\t});\n\t},\n\tget: function get(url) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0_axios___default.a.get(sanitize(url), tokenHeaders).then(function (response) {\n\t\t\treturn Promise.resolve(response);\n\t\t}).catch(function (error) {\n\t\t\treturn Promise.reject(error);\n\t\t});\n\t},\n\tpost: function post(url, data) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0_axios___default.a.post(sanitize(url), data, tokenHeaders).then(function (response) {\n\t\t\treturn Promise.resolve(response);\n\t\t}).catch(function (error) {\n\t\t\treturn Promise.reject(error);\n\t\t});\n\t},\n\tpatch: function patch(url, data) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0_axios___default.a.patch(sanitize(url), data, tokenHeaders).then(function (response) {\n\t\t\treturn Promise.resolve(response);\n\t\t}).catch(function (error) {\n\t\t\treturn Promise.reject(error);\n\t\t});\n\t},\n\tput: function put(url, data) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0_axios___default.a.put(sanitize(url), data, tokenHeaders).then(function (response) {\n\t\t\treturn Promise.resolve(response);\n\t\t}).catch(function (error) {\n\t\t\treturn Promise.reject(error);\n\t\t});\n\t},\n\tdelete: function _delete(url, data) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0_axios___default.a.delete(sanitize(url), { data: data, headers: tokenHeaders.headers }).then(function (response) {\n\t\t\treturn Promise.resolve(response);\n\t\t}).catch(function (error) {\n\t\t\treturn Promise.reject(error);\n\t\t});\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc3RvcmUvYXBpLmpzP2JkOTMiXSwibmFtZXMiOlsicmVxdWVzdFRva2VuIiwiZG9jdW1lbnQiLCJnZXRFbGVtZW50c0J5VGFnTmFtZSIsImdldEF0dHJpYnV0ZSIsInRva2VuSGVhZGVycyIsImhlYWRlcnMiLCJyZXF1ZXN0dG9rZW4iLCJzYW5pdGl6ZSIsInVybCIsInJlcGxhY2UiLCJyZXF1aXJlQWRtaW4iLCJQcm9taXNlIiwicmVzb2x2ZSIsInJlamVjdCIsInBhc3N3b3JkVGltZW91dCIsIndhaXRGb3JwYXNzd29yZCIsIk9DIiwiUGFzc3dvcmRDb25maXJtYXRpb24iLCJyZXF1aXJlc1Bhc3N3b3JkQ29uZmlybWF0aW9uIiwic2V0VGltZW91dCIsImNsZWFyVGltZW91dCIsInByb21pc2VUaW1lb3V0IiwiZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSIsImxlbmd0aCIsImNsaWNrIiwiTm90aWZpY2F0aW9uIiwic2hvd1RlbXBvcmFyeSIsInQiLCJyZXF1aXJlUGFzc3dvcmRDb25maXJtYXRpb24iLCJnZXQiLCJheGlvcyIsInRoZW4iLCJyZXNwb25zZSIsImNhdGNoIiwiZXJyb3IiLCJwb3N0Ii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0Y2goKGVycm9yKSA9PiBQcm9taXNlLnJlamVjdChlcnJvcikpO1xuXHR9LFxuXHRwYXRjaCh1cmwsIGRhdGEpIHtcblx0XHRyZXR1cm4gYXhpb3MucGF0Y2goc2FuaXRpemUodXJsKSwgZGF0YSwgdG9rZW5IZWFkZXJzKVxuXHRcdFx0LnRoZW4oKHJlc3BvbnNlKSA9PiBQcm9taXNlLnJlc29sdmUocmVzcG9uc2UpKVxuXHRcdFx0LmNhdGNoKChlcnJvcikgPT4gUHJvbWlzZS5yZWplY3QoZXJyb3IpKTtcblx0fSxcblx0cHV0KHVybCwgZGF0YSkge1xuXHRcdHJldHVybiBheGlvcy5wdXQoc2FuaXRpemUodXJsKSwgZGF0YSwgdG9rZW5IZWFkZXJzKVxuXHRcdFx0LnRoZW4oKHJlc3BvbnNlKSA9PiBQcm9taXNlLnJlc29sdmUocmVzcG9uc2UpKVxuXHRcdFx0LmNhdGNoKChlcnJvcikgPT4gUHJvbWlzZS5yZWplY3QoZXJyb3IpKTtcblx0fSxcblx0ZGVsZXRlKHVybCwgZGF0YSkge1xuXHRcdHJldHVybiBheGlvcy5kZWxldGUoc2FuaXRpemUodXJsKSwgeyBkYXRhOiBkYXRhLCBoZWFkZXJzOiB0b2tlbkhlYWRlcnMuaGVhZGVycyB9KVxuXHRcdFx0LnRoZW4oKHJlc3BvbnNlKSA9PiBQcm9taXNlLnJlc29sdmUocmVzcG9uc2UpKVxuXHRcdFx0LmNhdGNoKChlcnJvcikgPT4gUHJvbWlzZS5yZWplY3QoZXJyb3IpKTtcblx0fVxufTtcblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvc3RvcmUvYXBpLmpzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///5\n");
|
||
|
||
/***/ }),
|
||
/* 6 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
eval("!function(t,e){ true?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.VueMultiselect=e():t.VueMultiselect=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,\"a\",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=\"/\",e(e.s=66)}([function(t,e){var n=t.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(10),r=n(43),o=n(31),s=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if(\"get\"in n||\"set\"in n)throw TypeError(\"Accessors not supported!\");return\"value\"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(77),r=n(21);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(9),r=n(52),o=n(18),s=n(55),u=n(53),a=function(t,e,n){var l,c,f,p,h=t&a.F,d=t&a.G,v=t&a.S,y=t&a.P,g=t&a.B,b=d?i:v?i[e]||(i[e]={}):(i[e]||{}).prototype,m=d?r:r[e]||(r[e]={}),_=m.prototype||(m.prototype={});d&&(n=e);for(l in n)c=!h&&b&&void 0!==b[l],f=(c?b:n)[l],p=g&&c?u(f,i):y&&\"function\"==typeof f?u(Function.call,f):f,b&&s(b,l,f,t&a.U),m[l]!=f&&o(m,l,p),y&&_[l]!=f&&(_[l]=f)};i.core=r,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var i=n(3),r=n(15);t.exports=n(1)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(29)(\"wks\"),r=n(16),o=n(0).Symbol,s=\"function\"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)(\"Symbol.\"+t))}).store=i},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=n)},function(t,e,n){var i=n(13);t.exports=function(t){if(!i(t))throw TypeError(t+\" is not an object!\");return t}},function(t,e){var n=t.exports={version:\"2.4.0\"};\"number\"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,e,n){var i=n(48),r=n(22);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return\"Symbol(\".concat(void 0===t?\"\":t,\")_\",(++n+i).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError(\"Can't call method on \"+t);return t}},function(t,e,n){var i=n(109),r=n(110);t.exports=n(35)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,e,n){var i=n(8);t.exports=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError(\"Can't call method on \"+t);return t}},function(t,e){t.exports=\"constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf\".split(\",\")},function(t,e,n){var i=n(0),r=n(11),o=n(74),s=n(6),u=function(t,e,n){var a,l,c,f=t&u.F,p=t&u.G,h=t&u.S,d=t&u.P,v=t&u.B,y=t&u.W,g=p?r:r[e]||(r[e]={}),b=g.prototype,m=p?i:h?i[e]:(i[e]||{}).prototype;p&&(n=e);for(a in n)(l=!f&&m&&void 0!==m[a])&&a in g||(c=l?m[a]:n[a],g[a]=p&&\"function\"!=typeof m[a]?n[a]:v&&l?o(c,i):y&&m[a]==c?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):d&&\"function\"==typeof c?o(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[a]=c,t&u.R&&b&&!b[a]&&s(b,a,c)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(3).f,r=n(2),o=n(7)(\"toStringTag\");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(29)(\"keys\"),r=n(16);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(0),r=i[\"__core-js_shared__\"]||(i[\"__core-js_shared__\"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(13);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&\"function\"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if(\"function\"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&\"function\"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")}},function(t,e,n){var i=n(0),r=n(11),o=n(25),s=n(33),u=n(3).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});\"_\"==t.charAt(0)||t in e||u(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(7)},function(t,e,n){var i=n(53),r=n(36),o=n(57),s=n(37),u=n(104);t.exports=function(t,e){var n=1==t,a=2==t,l=3==t,c=4==t,f=6==t,p=5==t||f,h=e||u;return function(e,u,d){for(var v,y,g=o(e),b=r(g),m=i(u,d,3),_=s(b.length),x=0,w=n?h(e,_):a?h(e,0):void 0;_>x;x++)if((p||x in b)&&(v=b[x],y=m(v,x,g),t))if(n)w[x]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(c)return!1;return f?-1:l||c?c:w}}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,e,n){var i=n(51);t.exports=Object(\"z\").propertyIsEnumerable(0)?Object:function(t){return\"String\"==i(t)?t.split(\"\"):Object(t)}},function(t,e,n){var i=n(56),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(111)(\"wks\"),r=n(58),o=n(9).Symbol,s=\"function\"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)(\"Symbol.\"+t))}).store=i},function(t,e,n){\"use strict\";function i(t){return 0!==t&&(!(!Array.isArray(t)||0!==t.length)||!t)}function r(t){return function(){return!t.apply(void 0,arguments)}}function o(t,e){return void 0===t&&(t=\"undefined\"),null===t&&(t=\"null\"),!1===t&&(t=\"false\"),-1!==t.toString().toLowerCase().indexOf(e.trim())}function s(t,e,n,i){return t.filter(function(t){return o(i(t,n),e)})}function u(t){return t.filter(function(t){return!t.$isLabel})}function a(t,e){return function(n){return n.reduce(function(n,i){return i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n},[])}}function l(t,e,n,i,r){return function(o){return o.map(function(o){var u;if(!o[n])return console.warn(\"Options passed to vue-multiselect do not contain groups, despite the config.\"),[];var a=s(o[n],t,e,r);return a.length?(u={},v()(u,i,o[i]),v()(u,n,a),u):[]})}}var c=n(65),f=n.n(c),p=n(59),h=(n.n(p),n(122)),d=(n.n(h),n(64)),v=n.n(d),y=n(120),g=(n.n(y),n(121)),b=(n.n(g),n(117)),m=(n.n(b),n(123)),_=(n.n(m),n(118)),x=(n.n(_),n(119)),w=(n.n(x),function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.reduce(function(t,e){return e(t)},t)}});e.a={data:function(){return{search:\"\",isOpen:!1,prefferedOpenDirection:\"below\",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},value:{type:null,default:function(){return[]}},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:\"Select option\"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default:function(t,e){return i(t)?\"\":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:\"Press enter to create a tag\"},tagPosition:{type:String,default:\"top\"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default:function(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1}},mounted:function(){this.multiple||this.clearOnSelect||console.warn(\"[Vue-Multiselect warn]: ClearOnSelect and Multiple props can’t be both set to false.\"),!this.multiple&&this.max&&console.warn(\"[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.\"),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue:function(){return this.value||0===this.value?Array.isArray(this.value)?this.value:[this.value]:[]},filteredOptions:function(){var t=this.search||\"\",e=t.toLowerCase().trim(),n=this.options.concat();return n=this.internalSearch?this.groupValues?this.filterAndFlat(n,e,this.label):s(n,e,this.label,this.customLabel):this.groupValues?a(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(r(this.isSelected)):n,this.taggable&&e.length&&!this.isExistingOption(e)&&(\"bottom\"===this.tagPosition?n.push({isTag:!0,label:t}):n.unshift({isTag:!0,label:t})),n.slice(0,this.optionsLimit)},valueKeys:function(){var t=this;return this.trackBy?this.internalValue.map(function(e){return e[t.trackBy]}):this.internalValue},optionKeys:function(){var t=this;return(this.groupValues?this.flatAndStrip(this.options):this.options).map(function(e){return t.customLabel(e,t.label).toString().toLowerCase()})},currentOptionLabel:function(){return this.multiple?this.searchable?\"\":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?\"\":this.placeholder}},watch:{internalValue:function(){this.resetAfter&&this.internalValue.length&&(this.search=\"\",this.$emit(\"input\",this.multiple?[]:null))},search:function(){this.$emit(\"search-change\",this.search,this.id)}},methods:{getValue:function(){return this.multiple?this.internalValue:0===this.internalValue.length?null:this.internalValue[0]},filterAndFlat:function(t,e,n){return w(l(e,n,this.groupValues,this.groupLabel,this.customLabel),a(this.groupValues,this.groupLabel))(t)},flatAndStrip:function(t){return w(a(this.groupValues,this.groupLabel),u)(t)},updateSearch:function(t){this.search=t},isExistingOption:function(t){return!!this.options&&this.optionKeys.indexOf(t)>-1},isSelected:function(t){var e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},getOptionLabel:function(t){if(i(t))return\"\";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;var e=this.customLabel(t,this.label);return i(e)?\"\":e},select:function(t,e){if(t.$isLabel&&this.groupSelect)return void this.selectGroup(t);if(!(-1!==this.blockKeys.indexOf(e)||this.disabled||t.$isDisabled||t.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&(\"Tab\"!==e||this.pointerDirty)){if(t.isTag)this.$emit(\"tag\",t.label,this.id),this.search=\"\",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t))return void(\"Tab\"!==e&&this.removeElement(t));this.$emit(\"select\",t,this.id),this.multiple?this.$emit(\"input\",this.internalValue.concat([t]),this.id):this.$emit(\"input\",t,this.id),this.clearOnSelect&&(this.search=\"\")}this.closeOnSelect&&this.deactivate()}},selectGroup:function(t){var e=this,n=this.options.find(function(n){return n[e.groupLabel]===t.$groupLabel});if(n)if(this.wholeGroupSelected(n)){this.$emit(\"remove\",n[this.groupValues],this.id);var i=this.internalValue.filter(function(t){return-1===n[e.groupValues].indexOf(t)});this.$emit(\"input\",i,this.id)}else{var o=n[this.groupValues].filter(r(this.isSelected));this.$emit(\"select\",o,this.id),this.$emit(\"input\",this.internalValue.concat(o),this.id)}},wholeGroupSelected:function(t){return t[this.groupValues].every(this.isSelected)},removeElement:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.disabled){if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();var n=\"object\"===f()(t)?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.$emit(\"remove\",t,this.id),this.multiple){var i=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit(\"input\",i,this.id)}else this.$emit(\"input\",null,this.id);this.closeOnSelect&&e&&this.deactivate()}},removeLastElement:function(){-1===this.blockKeys.indexOf(\"Delete\")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate:function(){var t=this;this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=\"\"),this.$nextTick(function(){return t.$refs.search.focus()})):this.$el.focus(),this.$emit(\"open\",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=\"\"),this.$emit(\"close\",this.getValue(),this.id))},toggle:function(){this.isOpen?this.deactivate():this.activate()},adjustPosition:function(){if(\"undefined\"!=typeof window){var t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||\"below\"===this.openDirection||\"bottom\"===this.openDirection?(this.prefferedOpenDirection=\"below\",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.prefferedOpenDirection=\"above\",this.optimizedHeight=Math.min(t-40,this.maxHeight))}}}}},function(t,e,n){\"use strict\";var i=n(59);n.n(i);e.a={data:function(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight},visibleElements:function(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()},isOpen:function(){this.pointerDirty=!1}},methods:{optionHighlight:function(t,e){return{\"multiselect__option--highlight\":t===this.pointer&&this.showPointer,\"multiselect__option--selected\":this.isSelected(e)}},groupHighlight:function(t,e){var n=this;if(!this.groupSelect)return[\"multiselect__option--disabled\"];var i=this.options.find(function(t){return t[n.groupLabel]===e.$groupLabel});return[this.groupSelect?\"multiselect__option--group\":\"multiselect__option--disabled\",{\"multiselect__option--highlight\":t===this.pointer&&this.showPointer},{\"multiselect__option--group-selected\":this.wholeGroupSelected(i)}]},addPointerElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"Enter\",e=t.key;this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward:function(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward:function(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet:function(t){this.pointer=t,this.pointerDirty=!0}}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(13),r=n(0).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){t.exports=!n(1)&&!n(12)(function(){return 7!=Object.defineProperty(n(42)(\"div\"),\"a\",{get:function(){return 7}}).a})},function(t,e,n){\"use strict\";var i=n(25),r=n(23),o=n(49),s=n(6),u=n(2),a=n(24),l=n(79),c=n(27),f=n(86),p=n(7)(\"iterator\"),h=!([].keys&&\"next\"in[].keys()),d=function(){return this};t.exports=function(t,e,n,v,y,g,b){l(n,e,v);var m,_,x,w=function(t){if(!h&&t in P)return P[t];switch(t){case\"keys\":case\"values\":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+\" Iterator\",O=\"values\"==y,L=!1,P=t.prototype,k=P[p]||P[\"@@iterator\"]||y&&P[y],E=k||w(y),j=y?O?w(\"entries\"):E:void 0,V=\"Array\"==e?P.entries||k:k;if(V&&(x=f(V.call(new t)))!==Object.prototype&&(c(x,S,!0),i||u(x,p)||s(x,p,d)),O&&k&&\"values\"!==k.name&&(L=!0,E=function(){return k.call(this)}),i&&!b||!h&&!L&&P[p]||s(P,p,E),a[e]=E,a[S]=d,y)if(m={values:O?E:w(\"values\"),keys:g?E:w(\"keys\"),entries:j},b)for(_ in m)_ in P||o(P,_,m[_]);else r(r.P+r.F*(h||L),e,m);return m}},function(t,e,n){var i=n(10),r=n(83),o=n(22),s=n(28)(\"IE_PROTO\"),u=function(){},a=function(){var t,e=n(42)(\"iframe\"),i=o.length;for(e.style.display=\"none\",n(76).appendChild(e),e.src=\"javascript:\",t=e.contentWindow.document,t.open(),t.write(\"<script>document.F=Object<\\/script>\"),t.close(),a=t.F;i--;)delete a.prototype[o[i]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=i(t),n=new u,u.prototype=null,n[s]=t):n=a(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(48),r=n(22).concat(\"length\",\"prototype\");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(2),r=n(4),o=n(73)(!1),s=n(28)(\"IE_PROTO\");t.exports=function(t,e){var n,u=r(t),a=0,l=[];for(n in u)n!=s&&i(u,n)&&l.push(n);for(;e.length>a;)i(u,n=e[a++])&&(~o(l,n)||l.push(n));return l}},function(t,e,n){t.exports=n(6)},function(t,e){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(t+\" is not a function!\");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=t.exports={version:\"2.4.0\"};\"number\"==typeof __e&&(__e=n)},function(t,e,n){var i=n(50);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(51);t.exports=Array.isArray||function(t){return\"Array\"==i(t)}},function(t,e,n){var i=n(9),r=n(18),o=n(107),s=n(58)(\"src\"),u=Function.toString,a=(\"\"+u).split(\"toString\");n(52).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var l=\"function\"==typeof n;l&&(o(n,\"name\")||r(n,\"name\",e)),t[e]!==n&&(l&&(o(n,s)||r(n,s,t[e]?\"\"+t[e]:a.join(String(e)))),t===i?t[e]=n:u?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,\"toString\",function(){return\"function\"==typeof this&&this[s]||u.call(this)})},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(17);t.exports=function(t){return Object(i(t))}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return\"Symbol(\".concat(void 0===t?\"\":t,\")_\",(++n+i).toString(36))}},function(t,e,n){\"use strict\";var i=n(5),r=n(34)(5),o=!0;\"find\"in[]&&Array(1).find(function(){o=!1}),i(i.P+i.F*o,\"Array\",{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(99)(\"find\")},function(t,e,n){\"use strict\";function i(t){n(124)}var r=n(67),o=n(126),s=n(125),u=i,a=s(r.a,o.a,!1,u,null,null);e.a=a.exports},function(t,e,n){t.exports=n(68)},function(t,e,n){t.exports=n(69)},function(t,e,n){t.exports=n(70)},function(t,e,n){function i(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r=n(61);t.exports=i},function(t,e,n){function i(t){return(i=\"function\"==typeof s&&\"symbol\"==typeof o?function(t){return typeof t}:function(t){return t&&\"function\"==typeof s&&t.constructor===s&&t!==s.prototype?\"symbol\":typeof t})(t)}function r(e){return\"function\"==typeof s&&\"symbol\"===i(o)?t.exports=r=function(t){return i(t)}:t.exports=r=function(t){return t&&\"function\"==typeof s&&t.constructor===s&&t!==s.prototype?\"symbol\":i(t)},r(e)}var o=n(63),s=n(62);t.exports=r},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(60),r=n(39),o=n(40);n.d(e,\"Multiselect\",function(){return i.a}),n.d(e,\"multiselectMixin\",function(){return r.a}),n.d(e,\"pointerMixin\",function(){return o.a}),e.default=i.a},function(t,e,n){\"use strict\";var i=n(39),r=n(40);e.a={name:\"vue-multiselect\",mixins:[i.a,r.a],props:{name:{type:String,default:\"\"},selectLabel:{type:String,default:\"Press enter to select\"},selectGroupLabel:{type:String,default:\"Press enter to select group\"},selectedLabel:{type:String,default:\"Selected\"},deselectLabel:{type:String,default:\"Press enter to remove\"},deselectGroupLabel:{type:String,default:\"Press enter to deselect group\"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:function(t){return\"and \".concat(t,\" more\")}},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:\"\"},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible:function(){return this.singleValue&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible:function(){return!(this.internalValue.length||this.searchable&&this.isOpen)},visibleValues:function(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue:function(){return this.internalValue[0]},deselectLabelText:function(){return this.showLabels?this.deselectLabel:\"\"},deselectGroupLabelText:function(){return this.showLabels?this.deselectGroupLabel:\"\"},selectLabelText:function(){return this.showLabels?this.selectLabel:\"\"},selectGroupLabelText:function(){return this.showLabels?this.selectGroupLabel:\"\"},selectedLabelText:function(){return this.showLabels?this.selectedLabel:\"\"},inputStyle:function(){if(this.multiple&&this.value&&this.value.length)return this.isOpen?{width:\"auto\"}:{width:\"0\",position:\"absolute\",padding:\"0\"}},contentStyle:function(){return this.options.length?{display:\"inline-block\"}:{display:\"block\"}},isAbove:function(){return\"above\"===this.openDirection||\"top\"===this.openDirection||\"below\"!==this.openDirection&&\"bottom\"!==this.openDirection&&\"above\"===this.prefferedOpenDirection},showSearchInput:function(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)}}}},function(t,e,n){n(92);var i=n(11).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){n(95),n(93),n(96),n(97),t.exports=n(11).Symbol},function(t,e,n){n(94),n(98),t.exports=n(33).f(\"iterator\")},function(t,e){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(t+\" is not a function!\");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(4),r=n(89),o=n(88);t.exports=function(t){return function(e,n,s){var u,a=i(e),l=r(a.length),c=o(s,l);if(t&&n!=n){for(;l>c;)if((u=a[c++])!=u)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(71);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(14),r=n(47),o=n(26);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,u=n(t),a=o.f,l=0;u.length>l;)a.call(t,s=u[l++])&&e.push(s);return e}},function(t,e,n){t.exports=n(0).document&&document.documentElement},function(t,e,n){var i=n(41);t.exports=Object(\"z\").propertyIsEnumerable(0)?Object:function(t){return\"String\"==i(t)?t.split(\"\"):Object(t)}},function(t,e,n){var i=n(41);t.exports=Array.isArray||function(t){return\"Array\"==i(t)}},function(t,e,n){\"use strict\";var i=n(45),r=n(15),o=n(27),s={};n(6)(s,n(7)(\"iterator\"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+\" Iterator\")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i=n(14),r=n(4);t.exports=function(t,e){for(var n,o=r(t),s=i(o),u=s.length,a=0;u>a;)if(o[n=s[a++]]===e)return n}},function(t,e,n){var i=n(16)(\"meta\"),r=n(13),o=n(2),s=n(3).f,u=0,a=Object.isExtensible||function(){return!0},l=!n(12)(function(){return a(Object.preventExtensions({}))}),c=function(t){s(t,i,{value:{i:\"O\"+ ++u,w:{}}})},f=function(t,e){if(!r(t))return\"symbol\"==typeof t?t:(\"string\"==typeof t?\"S\":\"P\")+t;if(!o(t,i)){if(!a(t))return\"F\";if(!e)return\"E\";c(t)}return t[i].i},p=function(t,e){if(!o(t,i)){if(!a(t))return!0;if(!e)return!1;c(t)}return t[i].w},h=function(t){return l&&d.NEED&&a(t)&&!o(t,i)&&c(t),t},d=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:p,onFreeze:h}},function(t,e,n){var i=n(3),r=n(10),o=n(14);t.exports=n(1)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),u=s.length,a=0;u>a;)i.f(t,n=s[a++],e[n]);return t}},function(t,e,n){var i=n(26),r=n(15),o=n(4),s=n(31),u=n(2),a=n(43),l=Object.getOwnPropertyDescriptor;e.f=n(1)?l:function(t,e){if(t=o(t),e=s(e,!0),a)try{return l(t,e)}catch(t){}if(u(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e,n){var i=n(4),r=n(46).f,o={}.toString,s=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return r(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&\"[object Window]\"==o.call(t)?u(t):r(i(t))}},function(t,e,n){var i=n(2),r=n(90),o=n(28)(\"IE_PROTO\"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:\"function\"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(30),r=n(21);t.exports=function(t){return function(e,n){var o,s,u=String(r(e)),a=i(n),l=u.length;return a<0||a>=l?t?\"\":void 0:(o=u.charCodeAt(a),o<55296||o>56319||a+1===l||(s=u.charCodeAt(a+1))<56320||s>57343?t?u.charAt(a):o:t?u.slice(a,a+2):s-56320+(o-55296<<10)+65536)}}},function(t,e,n){var i=n(30),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(30),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(21);t.exports=function(t){return Object(i(t))}},function(t,e,n){\"use strict\";var i=n(72),r=n(80),o=n(24),s=n(4);t.exports=n(44)(Array,\"Array\",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):\"keys\"==e?r(0,n):\"values\"==e?r(0,t[n]):r(0,[n,t[n]])},\"values\"),o.Arguments=o.Array,i(\"keys\"),i(\"values\"),i(\"entries\")},function(t,e,n){var i=n(23);i(i.S+i.F*!n(1),\"Object\",{defineProperty:n(3).f})},function(t,e){},function(t,e,n){\"use strict\";var i=n(87)(!0);n(44)(String,\"String\",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){\"use strict\";var i=n(0),r=n(2),o=n(1),s=n(23),u=n(49),a=n(82).KEY,l=n(12),c=n(29),f=n(27),p=n(16),h=n(7),d=n(33),v=n(32),y=n(81),g=n(75),b=n(78),m=n(10),_=n(4),x=n(31),w=n(15),S=n(45),O=n(85),L=n(84),P=n(3),k=n(14),E=L.f,j=P.f,V=O.f,C=i.Symbol,T=i.JSON,A=T&&T.stringify,$=h(\"_hidden\"),D=h(\"toPrimitive\"),F={}.propertyIsEnumerable,M=c(\"symbol-registry\"),B=c(\"symbols\"),N=c(\"op-symbols\"),R=Object.prototype,H=\"function\"==typeof C,G=i.QObject,I=!G||!G.prototype||!G.prototype.findChild,K=o&&l(function(){return 7!=S(j({},\"a\",{get:function(){return j(this,\"a\",{value:7}).a}})).a})?function(t,e,n){var i=E(R,e);i&&delete R[e],j(t,e,n),i&&t!==R&&j(R,e,i)}:j,z=function(t){var e=B[t]=S(C.prototype);return e._k=t,e},U=H&&\"symbol\"==typeof C.iterator?function(t){return\"symbol\"==typeof t}:function(t){return t instanceof C},W=function(t,e,n){return t===R&&W(N,e,n),m(t),e=x(e,!0),m(n),r(B,e)?(n.enumerable?(r(t,$)&&t[$][e]&&(t[$][e]=!1),n=S(n,{enumerable:w(0,!1)})):(r(t,$)||j(t,$,w(1,{})),t[$][e]=!0),K(t,e,n)):j(t,e,n)},J=function(t,e){m(t);for(var n,i=g(e=_(e)),r=0,o=i.length;o>r;)W(t,n=i[r++],e[n]);return t},q=function(t,e){return void 0===e?S(t):J(S(t),e)},X=function(t){var e=F.call(this,t=x(t,!0));return!(this===R&&r(B,t)&&!r(N,t))&&(!(e||!r(this,t)||!r(B,t)||r(this,$)&&this[$][t])||e)},Y=function(t,e){if(t=_(t),e=x(e,!0),t!==R||!r(B,e)||r(N,e)){var n=E(t,e);return!n||!r(B,e)||r(t,$)&&t[$][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=V(_(t)),i=[],o=0;n.length>o;)r(B,e=n[o++])||e==$||e==a||i.push(e);return i},Z=function(t){for(var e,n=t===R,i=V(n?N:_(t)),o=[],s=0;i.length>s;)!r(B,e=i[s++])||n&&!r(R,e)||o.push(B[e]);return o};H||(C=function(){if(this instanceof C)throw TypeError(\"Symbol is not a constructor!\");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===R&&e.call(N,n),r(this,$)&&r(this[$],t)&&(this[$][t]=!1),K(this,t,w(1,n))};return o&&I&&K(R,t,{configurable:!0,set:e}),z(t)},u(C.prototype,\"toString\",function(){return this._k}),L.f=Y,P.f=W,n(46).f=O.f=Q,n(26).f=X,n(47).f=Z,o&&!n(25)&&u(R,\"propertyIsEnumerable\",X,!0),d.f=function(t){return z(h(t))}),s(s.G+s.W+s.F*!H,{Symbol:C});for(var tt=\"hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables\".split(\",\"),et=0;tt.length>et;)h(tt[et++]);for(var tt=k(h.store),et=0;tt.length>et;)v(tt[et++]);s(s.S+s.F*!H,\"Symbol\",{for:function(t){return r(M,t+=\"\")?M[t]:M[t]=C(t)},keyFor:function(t){if(U(t))return y(M,t);throw TypeError(t+\" is not a symbol!\")},useSetter:function(){I=!0},useSimple:function(){I=!1}}),s(s.S+s.F*!H,\"Object\",{create:q,defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),T&&s(s.S+s.F*(!H||l(function(){var t=C();return\"[null]\"!=A([t])||\"{}\"!=A({a:t})||\"{}\"!=A(Object(t))})),\"JSON\",{stringify:function(t){if(void 0!==t&&!U(t)){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);return e=i[1],\"function\"==typeof e&&(n=e),!n&&b(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!U(e))return e}),i[1]=e,A.apply(T,i)}}}),C.prototype[D]||n(6)(C.prototype,D,C.prototype.valueOf),f(C,\"Symbol\"),f(Math,\"Math\",!0),f(i.JSON,\"JSON\",!0)},function(t,e,n){n(32)(\"asyncIterator\")},function(t,e,n){n(32)(\"observable\")},function(t,e,n){n(91);for(var i=n(0),r=n(6),o=n(24),s=n(7)(\"toStringTag\"),u=[\"NodeList\",\"DOMTokenList\",\"MediaList\",\"StyleSheetList\",\"CSSRuleList\"],a=0;a<5;a++){var l=u[a],c=i[l],f=c&&c.prototype;f&&!f[s]&&r(f,s,l),o[l]=o.Array}},function(t,e,n){var i=n(38)(\"unscopables\"),r=Array.prototype;void 0==r[i]&&n(18)(r,i,{}),t.exports=function(t){r[i][t]=!0}},function(t,e,n){var i=n(19);t.exports=function(t){if(!i(t))throw TypeError(t+\" is not an object!\");return t}},function(t,e,n){var i=n(115),r=n(37),o=n(114);t.exports=function(t){return function(e,n,s){var u,a=i(e),l=r(a.length),c=o(s,l);if(t&&n!=n){for(;l>c;)if((u=a[c++])!=u)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(50),r=n(57),o=n(36),s=n(37);t.exports=function(t,e,n,u,a){i(e);var l=r(t),c=o(l),f=s(l.length),p=a?f-1:0,h=a?-1:1;if(n<2)for(;;){if(p in c){u=c[p],p+=h;break}if(p+=h,a?p<0:f<=p)throw TypeError(\"Reduce of empty array with no initial value\")}for(;a?p>=0:f>p;p+=h)p in c&&(u=e(u,c[p],p,l));return u}},function(t,e,n){var i=n(19),r=n(54),o=n(38)(\"species\");t.exports=function(t){var e;return r(t)&&(e=t.constructor,\"function\"!=typeof e||e!==Array&&!r(e.prototype)||(e=void 0),i(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){var i=n(103);t.exports=function(t,e){return new(i(t))(e)}},function(t,e,n){var i=n(19),r=n(9).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){\"use strict\";var i=n(18),r=n(55),o=n(8),s=n(17),u=n(38);t.exports=function(t,e,n){var a=u(t),l=n(s,a,\"\"[t]),c=l[0],f=l[1];o(function(){var e={};return e[a]=function(){return 7},7!=\"\"[t](e)})&&(r(String.prototype,t,c),i(RegExp.prototype,a,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(35)&&!n(8)(function(){return 7!=Object.defineProperty(n(105)(\"div\"),\"a\",{get:function(){return 7}}).a})},function(t,e,n){var i=n(100),r=n(108),o=n(116),s=Object.defineProperty;e.f=n(35)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if(\"get\"in n||\"set\"in n)throw TypeError(\"Accessors not supported!\");return\"value\"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(9),r=i[\"__core-js_shared__\"]||(i[\"__core-js_shared__\"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e,n){var i=n(5),r=n(17),o=n(8),s=n(113),u=\"[\"+s+\"]\",a=\"
\",l=RegExp(\"^\"+u+u+\"*\"),c=RegExp(u+u+\"*$\"),f=function(t,e,n){var r={},u=o(function(){return!!s[t]()||a[t]()!=a}),l=r[t]=u?e(p):s[t];n&&(r[n]=l),i(i.P+i.F*u,\"String\",r)},p=f.trim=function(t,e){return t=String(r(t)),1&e&&(t=t.replace(l,\"\")),2&e&&(t=t.replace(c,\"\")),t};t.exports=f},function(t,e){t.exports=\"\\t\\n\\v\\f\\r \\u2028\\u2029\\ufeff\"},function(t,e,n){var i=n(56),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(36),r=n(17);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(19);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&\"function\"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if(\"function\"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&\"function\"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")}},function(t,e,n){\"use strict\";var i=n(5),r=n(34)(2);i(i.P+i.F*!n(20)([].filter,!0),\"Array\",{filter:function(t){return r(this,t,arguments[1])}})},function(t,e,n){\"use strict\";var i=n(5),r=n(101)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;i(i.P+i.F*(s||!n(20)(o)),\"Array\",{indexOf:function(t){return s?o.apply(this,arguments)||0:r(this,t,arguments[1])}})},function(t,e,n){var i=n(5);i(i.S,\"Array\",{isArray:n(54)})},function(t,e,n){\"use strict\";var i=n(5),r=n(34)(1);i(i.P+i.F*!n(20)([].map,!0),\"Array\",{map:function(t){return r(this,t,arguments[1])}})},function(t,e,n){\"use strict\";var i=n(5),r=n(102);i(i.P+i.F*!n(20)([].reduce,!0),\"Array\",{reduce:function(t){return r(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){n(106)(\"search\",1,function(t,e,n){return[function(n){\"use strict\";var i=t(this),r=void 0==n?void 0:n[e];return void 0!==r?r.call(n,i):new RegExp(n)[e](String(i))},n]})},function(t,e,n){\"use strict\";n(112)(\"trim\",function(t){return function(){return t(this,3)}})},function(t,e){},function(t,e){t.exports=function(t,e,n,i,r,o){var s,u=t=t||{},a=typeof t.default;\"object\"!==a&&\"function\"!==a||(s=t,u=t.default);var l=\"function\"==typeof u?u.options:u;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId=r);var c;if(o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||\"undefined\"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):i&&(c=i),c){var f=l.functional,p=f?l.render:l.beforeCreate;f?(l._injectStyles=c,l.render=function(t,e){return c.call(e),p(t,e)}):l.beforeCreate=p?[].concat(p,c):[c]}return{esModule:s,exports:u,options:l}}},function(t,e,n){\"use strict\";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(\"div\",{staticClass:\"multiselect\",class:{\"multiselect--active\":t.isOpen,\"multiselect--disabled\":t.disabled,\"multiselect--above\":t.isAbove},attrs:{tabindex:t.searchable?-1:t.tabindex},on:{focus:function(e){t.activate()},blur:function(e){!t.searchable&&t.deactivate()},keydown:[function(e){return\"button\"in e||!t._k(e.keyCode,\"down\",40,e.key,\"ArrowDown\")?e.target!==e.currentTarget?null:(e.preventDefault(),void t.pointerForward()):null},function(e){return\"button\"in e||!t._k(e.keyCode,\"up\",38,e.key,\"ArrowUp\")?e.target!==e.currentTarget?null:(e.preventDefault(),void t.pointerBackward()):null},function(e){return\"button\"in e||!t._k(e.keyCode,\"enter\",13,e.key,\"Enter\")||!t._k(e.keyCode,\"tab\",9,e.key,\"Tab\")?(e.stopPropagation(),e.target!==e.currentTarget?null:void t.addPointerElement(e)):null}],keyup:function(e){if(!(\"button\"in e)&&t._k(e.keyCode,\"esc\",27,e.key,\"Escape\"))return null;t.deactivate()}}},[t._t(\"caret\",[n(\"div\",{staticClass:\"multiselect__select\",on:{mousedown:function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}}})],{toggle:t.toggle}),t._v(\" \"),t._t(\"clear\",null,{search:t.search}),t._v(\" \"),n(\"div\",{ref:\"tags\",staticClass:\"multiselect__tags\"},[n(\"div\",{directives:[{name:\"show\",rawName:\"v-show\",value:t.visibleValues.length>0,expression:\"visibleValues.length > 0\"}],staticClass:\"multiselect__tags-wrap\"},[t._l(t.visibleValues,function(e){return[t._t(\"tag\",[n(\"span\",{staticClass:\"multiselect__tag\"},[n(\"span\",{domProps:{textContent:t._s(t.getOptionLabel(e))}}),t._v(\" \"),n(\"i\",{staticClass:\"multiselect__tag-icon\",attrs:{\"aria-hidden\":\"true\",tabindex:\"1\"},on:{keydown:function(n){if(!(\"button\"in n)&&t._k(n.keyCode,\"enter\",13,n.key,\"Enter\"))return null;n.preventDefault(),t.removeElement(e)},mousedown:function(n){n.preventDefault(),t.removeElement(e)}}})])],{option:e,search:t.search,remove:t.removeElement})]})],2),t._v(\" \"),t.internalValue&&t.internalValue.length>t.limit?[t._t(\"limit\",[n(\"strong\",{staticClass:\"multiselect__strong\",domProps:{textContent:t._s(t.limitText(t.internalValue.length-t.limit))}})])]:t._e(),t._v(\" \"),n(\"transition\",{attrs:{name:\"multiselect__loading\"}},[t._t(\"loading\",[n(\"div\",{directives:[{name:\"show\",rawName:\"v-show\",value:t.loading,expression:\"loading\"}],staticClass:\"multiselect__spinner\"})])],2),t._v(\" \"),n(\"input\",{directives:[{name:\"show\",rawName:\"v-show\",value:t.isOpen&&t.searchable,expression:\"isOpen && searchable\"}],ref:\"search\",staticClass:\"multiselect__input\",style:t.inputStyle,attrs:{name:t.name,id:t.id,type:\"text\",autocomplete:\"off\",placeholder:t.placeholder,disabled:t.disabled,tabindex:t.tabindex},domProps:{value:t.search},on:{input:function(e){t.updateSearch(e.target.value)},focus:function(e){e.preventDefault(),t.activate()},blur:function(e){e.preventDefault(),t.deactivate()},keyup:function(e){if(!(\"button\"in e)&&t._k(e.keyCode,\"esc\",27,e.key,\"Escape\"))return null;t.deactivate()},keydown:[function(e){if(!(\"button\"in e)&&t._k(e.keyCode,\"down\",40,e.key,\"ArrowDown\"))return null;e.preventDefault(),t.pointerForward()},function(e){if(!(\"button\"in e)&&t._k(e.keyCode,\"up\",38,e.key,\"ArrowUp\"))return null;e.preventDefault(),t.pointerBackward()},function(e){return\"button\"in e||!t._k(e.keyCode,\"enter\",13,e.key,\"Enter\")?(e.preventDefault(),e.stopPropagation(),e.target!==e.currentTarget?null:void t.addPointerElement(e)):null},function(e){if(!(\"button\"in e)&&t._k(e.keyCode,\"delete\",[8,46],e.key,[\"Backspace\",\"Delete\"]))return null;e.stopPropagation(),t.removeLastElement()}]}}),t._v(\" \"),t.isSingleLabelVisible?n(\"span\",{staticClass:\"multiselect__single\",on:{mousedown:function(e){return e.preventDefault(),t.toggle(e)}}},[t._t(\"singleLabel\",[[t._v(t._s(t.currentOptionLabel))]],{option:t.singleValue})],2):t._e(),t._v(\" \"),t.isPlaceholderVisible?n(\"span\",{on:{mousedown:function(e){return e.preventDefault(),t.toggle(e)}}},[t._t(\"placeholder\",[n(\"span\",{staticClass:\"multiselect__single\"},[t._v(\"\\n \"+t._s(t.placeholder)+\"\\n \")])])],2):t._e()],2),t._v(\" \"),n(\"transition\",{attrs:{name:\"multiselect\"}},[n(\"div\",{directives:[{name:\"show\",rawName:\"v-show\",value:t.isOpen,expression:\"isOpen\"}],ref:\"list\",staticClass:\"multiselect__content-wrapper\",style:{maxHeight:t.optimizedHeight+\"px\"},on:{focus:t.activate,mousedown:function(t){t.preventDefault()}}},[n(\"ul\",{staticClass:\"multiselect__content\",style:t.contentStyle},[t._t(\"beforeList\"),t._v(\" \"),t.multiple&&t.max===t.internalValue.length?n(\"li\",[n(\"span\",{staticClass:\"multiselect__option\"},[t._t(\"maxElements\",[t._v(\"Maximum of \"+t._s(t.max)+\" options selected. First remove a selected option to select another.\")])],2)]):t._e(),t._v(\" \"),!t.max||t.internalValue.length<t.max?t._l(t.filteredOptions,function(e,i){return n(\"li\",{key:i,staticClass:\"multiselect__element\"},[e&&(e.$isLabel||e.$isDisabled)?t._e():n(\"span\",{staticClass:\"multiselect__option\",class:t.optionHighlight(i,e),attrs:{\"data-select\":e&&e.isTag?t.tagPlaceholder:t.selectLabelText,\"data-selected\":t.selectedLabelText,\"data-deselect\":t.deselectLabelText},on:{click:function(n){n.stopPropagation(),t.select(e)},mouseenter:function(e){if(e.target!==e.currentTarget)return null;t.pointerSet(i)}}},[t._t(\"option\",[n(\"span\",[t._v(t._s(t.getOptionLabel(e)))])],{option:e,search:t.search})],2),t._v(\" \"),e&&(e.$isLabel||e.$isDisabled)?n(\"span\",{staticClass:\"multiselect__option\",class:t.groupHighlight(i,e),attrs:{\"data-select\":t.groupSelect&&t.selectGroupLabelText,\"data-deselect\":t.groupSelect&&t.deselectGroupLabelText},on:{mouseenter:function(e){if(e.target!==e.currentTarget)return null;t.groupSelect&&t.pointerSet(i)},mousedown:function(n){n.preventDefault(),t.selectGroup(e)}}},[t._t(\"option\",[n(\"span\",[t._v(t._s(t.getOptionLabel(e)))])],{option:e,search:t.search})],2):t._e()])}):t._e(),t._v(\" \"),n(\"li\",{directives:[{name:\"show\",rawName:\"v-show\",value:t.showNoResults&&0===t.filteredOptions.length&&t.search&&!t.loading,expression:\"showNoResults && (filteredOptions.length === 0 && search && !loading)\"}]},[n(\"span\",{staticClass:\"multiselect__option\"},[t._t(\"noResult\",[t._v(\"No elements found. Consider changing the search query.\")])],2)]),t._v(\" \"),t._t(\"afterList\")],2)])])],2)},r=[],o={render:i,staticRenderFns:r};e.a=o}])});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdnVlLW11bHRpc2VsZWN0L2Rpc3QvdnVlLW11bHRpc2VsZWN0Lm1pbi5qcz80NTRjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQWUscUpBQWlNLGlCQUFpQixtQkFBbUIsY0FBYyw0QkFBNEIsWUFBWSxxQkFBcUIsMkRBQTJELFNBQVMsbUNBQW1DLFNBQVMscUJBQXFCLHFDQUFxQyxvQ0FBb0MsRUFBRSxpQkFBaUIsaUNBQWlDLGlCQUFpQixZQUFZLFVBQVUsc0JBQXNCLG1CQUFtQixpREFBaUQsbUJBQW1CLGdCQUFnQiw4SUFBOEksOEJBQThCLGlCQUFpQiw0QkFBNEIsa0NBQWtDLE1BQU0sZUFBZSxVQUFVLElBQUksRUFBRSxlQUFlLFFBQVEsZ0JBQWdCLHdCQUF3QixvQkFBb0IsaUJBQWlCLG9EQUFvRCwrQ0FBK0MsNkJBQTZCLGdCQUFnQixVQUFVLG9FQUFvRSxxQ0FBcUMsaUJBQWlCLG9CQUFvQixzQkFBc0IsZ0JBQWdCLGlCQUFpQiw2REFBNkQsMEVBQTBFLFdBQVcsZ0NBQWdDLGdDQUFnQyxFQUFFLFNBQVMsb0tBQW9LLDBFQUEwRSxpQkFBaUIsbUJBQW1CLCtCQUErQix1QkFBdUIsaUJBQWlCLGlCQUFpQixpQkFBaUIsZ0VBQWdFLHVCQUF1QixrREFBa0QsVUFBVSxlQUFlLHNCQUFzQixJQUFJLFlBQVksU0FBUyxXQUFXLGVBQWUsOElBQThJLDhCQUE4QixpQkFBaUIs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aG93Tm9SZXN1bHRzJiYwPT09dC5maWx0ZXJlZE9wdGlvbnMubGVuZ3RoJiZ0LnNlYXJjaCYmIXQubG9hZGluZyxleHByZXNzaW9uOlwic2hvd05vUmVzdWx0cyAmJiAoZmlsdGVyZWRPcHRpb25zLmxlbmd0aCA9PT0gMCAmJiBzZWFyY2ggJiYgIWxvYWRpbmcpXCJ9XX0sW24oXCJzcGFuXCIse3N0YXRpY0NsYXNzOlwibXVsdGlzZWxlY3RfX29wdGlvblwifSxbdC5fdChcIm5vUmVzdWx0XCIsW3QuX3YoXCJObyBlbGVtZW50cyBmb3VuZC4gQ29uc2lkZXIgY2hhbmdpbmcgdGhlIHNlYXJjaCBxdWVyeS5cIildKV0sMildKSx0Ll92KFwiIFwiKSx0Ll90KFwiYWZ0ZXJMaXN0XCIpXSwyKV0pXSldLDIpfSxyPVtdLG89e3JlbmRlcjppLHN0YXRpY1JlbmRlckZuczpyfTtlLmE9b31dKX0pO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL3Z1ZS1tdWx0aXNlbGVjdC9kaXN0L3Z1ZS1tdWx0aXNlbGVjdC5taW4uanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///6\n");
|
||
|
||
/***/ }),
|
||
/* 7 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(0);\nvar normalizeHeaderName = __webpack_require__(50);\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(19);\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = __webpack_require__(19);\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uI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F1bHRzLmpzXG4vLyBtb2R1bGUgaWQgPSA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///7\n");
|
||
|
||
/***/ }),
|
||
/* 8 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tname: 'App',\n\tbeforeMount: function beforeMount() {\n\t\t// importing server data into the store\n\t\tvar serverDataElmt = document.getElementById('serverData');\n\t\tif (serverDataElmt !== null) {\n\t\t\tthis.$store.commit('setServerData', JSON.parse(document.getElementById('serverData').dataset.server));\n\t\t}\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL0FwcC52dWU/ZWE5OSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUtBO09BRUE7cUNBQ0E7QUFDQTsrQ0FDQTsrQkFDQTtnR0FDQTtBQUNBO0FBQ0E7QUFSQSIsImZpbGUiOiI4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiPHRlbXBsYXRlPlxuXHQ8cm91dGVyLXZpZXc+PC9yb3V0ZXItdmlldz5cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQ+XG5leHBvcnQgZGVmYXVsdCB7XG5cdG5hbWU6ICdBcHAnLFxuXHRiZWZvcmVNb3VudDogZnVuY3Rpb24oKSB7XG5cdFx0Ly8gaW1wb3J0aW5nIHNlcnZlciBkYXRhIGludG8gdGhlIHN0b3JlXG5cdFx0Y29uc3Qgc2VydmVyRGF0YUVsbXQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnc2VydmVyRGF0YScpO1xuXHRcdGlmIChzZXJ2ZXJEYXRhRWxtdCAhPT0gbnVsbCkge1xuXHRcdFx0dGhpcy4kc3RvcmUuY29tbWl0KCdzZXRTZXJ2ZXJEYXRhJywgSlNPTi5wYXJzZShkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnc2VydmVyRGF0YScpLmRhdGFzZXQuc2VydmVyKSk7XG5cdFx0fVxuXHR9XG59XG48L3NjcmlwdD5cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvQXBwLnZ1ZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n");
|
||
|
||
/***/ }),
|
||
/* 9 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_appNavigation__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_userList__ = __webpack_require__(39);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_localstorage__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_localstorage___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_vue_localstorage__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_vue_multiselect__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_vue_multiselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_vue_multiselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__store_api__ = __webpack_require__(5);\nvar _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; };\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_2_vue__[\"a\" /* default */].use(__WEBPACK_IMPORTED_MODULE_3_vue_localstorage___default.a);\n__WEBPACK_IMPORTED_MODULE_2_vue__[\"a\" /* default */].use(__WEBPACK_IMPORTED_MODULE_3_vue_localstorage___default.a);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tname: 'Users',\n\tprops: ['selectedGroup'],\n\tcomponents: {\n\t\tappNavigation: __WEBPACK_IMPORTED_MODULE_0__components_appNavigation__[\"a\" /* default */],\n\t\tuserList: __WEBPACK_IMPORTED_MODULE_1__components_userList__[\"a\" /* default */],\n\t\tMultiselect: __WEBPACK_IMPORTED_MODULE_4_vue_multiselect___default.a\n\t},\n\tbeforeMount: function beforeMount() {\n\t\tthis.$store.commit('initGroups', {\n\t\t\tgroups: this.$store.getters.getServerData.groups,\n\t\t\torderBy: this.$store.getters.getServerData.sortGroups,\n\t\t\tuserCount: this.$store.getters.getServerData.userCount\n\t\t});\n\t\tthis.$store.dispatch('getPasswordPolicyMinLength');\n\t},\n\tdata: function data() {\n\t\treturn {\n\t\t\t// default quota is unlimited\n\t\t\tunlimitedQuota: { id: 'default', label: t('settings', 'Unlimited') },\n\t\t\t// temporary value used for multiselect change\n\t\t\tselectedQuota: false,\n\t\t\tshowConfig: {\n\t\t\t\tshowStoragePath: false,\n\t\t\t\tshowUserBackend: false,\n\t\t\t\tshowLastLogin: false,\n\t\t\t\tshowNewUserForm: false,\n\t\t\t\tshowLanguages: false\n\t\t\t}\n\t\t};\n\t},\n\n\tmethods: {\n\t\tgetLocalstorage: function getLocalstorage(key) {\n\t\t\t// force initialization\n\t\t\tthis.showConfig[key] = this.$localStorage.get(key) === 'true';\n\t\t\treturn this.showConfig[key];\n\t\t},\n\t\tsetLocalStorage: function setLocalStorage(key, status) {\n\t\t\tthis.showConfig[key] = status;\n\t\t\tthis.$localStorage.set(key, status);\n\t\t\treturn status;\n\t\t},\n\t\tremoveGroup: function removeGroup(groupid) {\n\t\t\tvar self = this;\n\t\t\t// TODO migrate to a vue js confirm dialog component \n\t\t\tOC.dialogs.confirm(t('settings', 'You are about to remove the group {group}. The users will NOT be deleted.', { group: groupid }), t('settings', 'Please confirm the group removal '), function (success) {\n\t\t\t\tif (success) {\n\t\t\t\t\tself.$store.dispatch('removeGroup', groupid);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Dispatch default quota set request\n * \n * @param {string|Object} quota Quota in readable format '5 GB' or Object {id: '5 GB', label: '5GB'}\n * @returns {string}\n */\n\t\tsetDefaultQuota: function setDefaultQuota() {\n\t\t\tvar _this = this;\n\n\t\t\tvar quota = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'none';\n\n\t\t\tthis.$store.dispatch('setAppConfig', {\n\t\t\t\tapp: 'files',\n\t\t\t\tkey: 'default_quota',\n\t\t\t\t// ensure we only send the preset id\n\t\t\t\tvalue: quota.id ? quota.id : quota\n\t\t\t}).then(function () {\n\t\t\t\tif ((typeof quota === 'undefined' ? 'undefined' : _typeof(quota)) !== 'object') {\n\t\t\t\t\tquota = { id: quota, label: quota };\n\t\t\t\t}\n\t\t\t\t_this.defaultQuota = quota;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Validate quota string to make sure it's a valid human file size\n * \n * @param {string} quota Quota in readable format '5 GB'\n * @returns {Promise|boolean}\n */\n\t\tvalidateQuota: function validateQuota(quota) {\n\t\t\t// only used for new presets sent through @Tag\n\t\t\tvar validQuota = OC.Util.computerFileSize(quota);\n\t\t\tif (validQuota === 0) {\n\t\t\t\treturn this.setDefaultQuota('none');\n\t\t\t} else if (validQuota !== null) {\n\t\t\t\t// unify format output\n\t\t\t\treturn this.setDefaultQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota)));\n\t\t\t}\n\t\t\t// if no valid do not change\n\t\t\treturn false;\n\t\t}\n\t},\n\tcomputed: {\n\t\tusers: function users() {\n\t\t\treturn this.$store.getters.getUsers;\n\t\t},\n\t\tloading: function loading() {\n\t\t\treturn Object.keys(this.users).length === 0;\n\t\t},\n\t\tusersOffset: function usersOffset() {\n\t\t\treturn this.$store.getters.getUsersOffset;\n\t\t},\n\t\tusersLimit: function usersLimit() {\n\t\t\treturn this.$store.getters.getUsersLimit;\n\t\t},\n\n\n\t\t// Local settings\n\t\tshowLanguages: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.getLocalstorage('showLanguages');\n\t\t\t},\n\t\t\tset: function set(status) {\n\t\t\t\tthis.setLocalStorage('showLanguages', status);\n\t\t\t}\n\t\t},\n\t\tshowLastLogin: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.getLocalstorage('showLastLogin');\n\t\t\t},\n\t\t\tset: function set(status) {\n\t\t\t\tthis.setLocalStorage('showLastLogin', status);\n\t\t\t}\n\t\t},\n\t\tshowUserBackend: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.getLocalstorage('showUserBackend');\n\t\t\t},\n\t\t\tset: function set(status) {\n\t\t\t\tthis.setLocalStorage('showUserBackend', status);\n\t\t\t}\n\t\t},\n\t\tshowStoragePath: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.getLocalstorage('showStoragePath');\n\t\t\t},\n\t\t\tset: function set(status) {\n\t\t\t\tthis.setLocalStorage('showStoragePath', status);\n\t\t\t}\n\t\t},\n\n\t\tuserCount: function userCount() {\n\t\t\treturn this.$store.getters.getUserCount;\n\t\t},\n\t\tsettings: function settings() {\n\t\t\treturn this.$store.getters.getServerData;\n\t\t},\n\n\n\t\t// default quota\n\t\tquotaOptions: function quotaOptions() {\n\t\t\t// convert the preset array into objects\n\t\t\tvar quotaPreset = this.settings.quotaPreset.reduce(function (acc, cur) {\n\t\t\t\treturn acc.concat({ id: cur, label: cur });\n\t\t\t}, []);\n\t\t\t// add default presets\n\t\t\tquotaPreset.unshift(this.unlimitedQuota);\n\t\t\treturn quotaPreset;\n\t\t},\n\n\t\t// mapping saved values to objects\n\t\tdefaultQuota: {\n\t\t\tget: function get() {\n\t\t\t\tif (this.selectedQuota !== false) {\n\t\t\t\t\treturn this.selectedQuota;\n\t\t\t\t}\n\t\t\t\tif (OC.Util.computerFileSize(this.settings.defaultQuota) > 0) {\n\t\t\t\t\t// if value is valid, let's map the quotaOptions or return custom quota\n\t\t\t\t\treturn { id: this.settings.defaultQuota, label: this.settings.defaultQuota };\n\t\t\t\t}\n\t\t\t\treturn this.unlimitedQuota; // unlimited\n\t\t\t},\n\t\t\tset: function set(quota) {\n\t\t\t\tthis.selectedQuota = quota;\n\t\t\t}\n\n\t\t},\n\n\t\t// BUILD APP NAVIGATION MENU OBJECT\n\t\tmenu: function menu() {\n\t\t\tvar _this2 = this;\n\n\t\t\t// Data provided php side\n\t\t\tvar groups = this.$store.getters.getGroups;\n\t\t\tgroups = Array.isArray(groups) ? groups : [];\n\n\t\t\t// Map groups\n\t\t\tgroups = groups.map(function (group) {\n\t\t\t\tvar item = {};\n\t\t\t\titem.id = group.id.replace(' ', '_');\n\t\t\t\titem.classes = []; // empty classes, active will be set later\n\t\t\t\titem.router = { // router link to\n\t\t\t\t\tname: 'group',\n\t\t\t\t\tparams: { selectedGroup: group.id }\n\t\t\t\t};\n\t\t\t\titem.text = group.name; // group name\n\t\t\t\titem.utils = { counter: group.usercount }; // users count\n\n\t\t\t\tif (item.id !== 'admin' && item.id !== 'disabled') {\n\t\t\t\t\t// add delete button on real groups\n\t\t\t\t\tvar self = _this2;\n\t\t\t\t\titem.utils.actions = [{\n\t\t\t\t\t\ticon: 'icon-delete',\n\t\t\t\t\t\ttext: t('settings', 'Remove group'),\n\t\t\t\t\t\taction: function action() {\n\t\t\t\t\t\t\tself.removeGroup(group.id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}];\n\t\t\t\t};\n\t\t\t\treturn item;\n\t\t\t});\n\n\t\t\t// Adjust data\n\t\t\tvar adminGroup = groups.find(function (group) {\n\t\t\t\treturn group.id == 'admin';\n\t\t\t});\n\t\t\tvar disabledGroupIndex = groups.findIndex(function (group) {\n\t\t\t\treturn group.id == 'disabled';\n\t\t\t});\n\t\t\tvar disabledGroup = groups[disabledGroupIndex];\n\t\t\tif (adminGroup && adminGroup.text) {\n\t\t\t\tadminGroup.text = t('settings', 'Admins'); // rename admin group\n\t\t\t}\n\t\t\tif (disabledGroup && disabledGroup.text) {\n\t\t\t\tdisabledGroup.text = t('settings', 'Disabled users'); // rename disabled group\n\t\t\t\tif (disabledGroup.utils.counter === 0) {\n\t\t\t\t\tgroups.splice(disabledGroupIndex, 1); // remove disabled if empty\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add everyone group\n\t\t\tgroups.unshift({\n\t\t\t\tid: 'everyone',\n\t\t\t\tclasses: [],\n\t\t\t\trouter: { name: 'users' },\n\t\t\t\ttext: t('settings', 'Everyone'),\n\t\t\t\tutils: { counter: this.userCount }\n\t\t\t});\n\n\t\t\t// Set current group as active\n\t\t\tvar activeGroup = groups.findIndex(function (group) {\n\t\t\t\treturn group.id === _this2.selectedGroup;\n\t\t\t});\n\t\t\tif (activeGroup >= 0) {\n\t\t\t\tgroups[activeGroup].classes.push('active');\n\t\t\t} else {\n\t\t\t\tgroups[0].classes.push('active');\n\t\t\t}\n\n\t\t\t// Return\n\t\t\treturn {\n\t\t\t\tid: 'usergrouplist',\n\t\t\t\tnew: {\n\t\t\t\t\tid: 'new-user-button',\n\t\t\t\t\ttext: t('settings', 'New user'),\n\t\t\t\t\ticon: 'icon-add',\n\t\t\t\t\taction: function action() {\n\t\t\t\t\t\treturn _this2.showConfig.showNewUserForm = !_this2.showConfig.showNewUserForm;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\titems: groups\n\t\t\t};\n\t\t}\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL3ZpZXdzL1VzZXJzLnZ1ZT8wNzZmIl0sIm5hb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0aW9uOiAoKSA9PiB0aGlzLnNob3dDb25maWcuc2hvd05ld1VzZXJGb3JtPSF0aGlzLnNob3dDb25maWcuc2hvd05ld1VzZXJGb3JtXG5cdFx0XHRcdH0sXG5cdFx0XHRcdGl0ZW1zOiBncm91cHNcblx0XHRcdH1cblx0XHR9LFxuXHR9XG59XG48L3NjcmlwdD5cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvdmlld3MvVXNlcnMudnVlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///9\n");
|
||
|
||
/***/ }),
|
||
/* 10 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__appNavigation_navigationItem__ = __webpack_require__(33);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tname: 'appNavigation',\n\tprops: ['menu'],\n\tcomponents: {\n\t\tnavigationItem: __WEBPACK_IMPORTED_MODULE_0__appNavigation_navigationItem__[\"a\" /* default */]\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NvbXBvbmVudHMvYXBwTmF2aWdhdGlvbi52dWU/ZjYyYyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXNCQTs7QUFFQTtPQUVBO1NBQ0E7O0FBR0E7QUFGQTtBQUhBIiwiZmlsZSI6IjEwLmpzIiwic291cmNlc0NvbnRlbnQiOlsiPHRlbXBsYXRlPlxuXHQ8ZGl2IGlkPVwiYXBwLW5hdmlnYXRpb25cIiA6Y2xhc3M9XCJ7J2ljb24tbG9hZGluZyc6IG1lbnUubG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25JdGVtJztcblxuZXhwb3J0IGRlZmF1bHQge1xuXHRuYW1lOiAnYXBwTmF2aWdhdGlvbicsXG5cdHByb3BzOiBbJ21lbnUnXSxcblx0Y29tcG9uZW50czoge1xuXHRcdG5hdmlnYXRpb25JdGVtXG5cdH1cbn1cbjwvc2NyaXB0PlxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9jb21wb25lbnRzL2FwcE5hdmlnYXRpb24udnVlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///10\n");
|
||
|
||
/***/ }),
|
||
/* 11 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__popoverMenu__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_click_outside__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_click_outside___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_vue_click_outside__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue__ = __webpack_require__(3);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tname: 'navigationItem',\n\tprops: ['item'],\n\tcomponents: {\n\t\tpopoverMenu: __WEBPACK_IMPORTED_MODULE_0__popoverMenu__[\"a\" /* default */]\n\t},\n\tdirectives: {\n\t\tClickOutside: __WEBPACK_IMPORTED_MODULE_1_vue_click_outside___default.a\n\t},\n\tdata: function data() {\n\t\treturn {\n\t\t\topenedMenu: false\n\t\t};\n\t},\n\n\tmethods: {\n\t\tshowMenu: function showMenu() {\n\t\t\tthis.openedMenu = true;\n\t\t},\n\t\thideMenu: function hideMenu() {\n\t\t\tthis.openedMenu = false;\n\t\t},\n\t\ttoggleCollapse: function toggleCollapse() {\n\t\t\t// if item.opened isn't set, Vue won't trigger view updates https://vuejs.org/v2/api/#Vue-set\n\t\t\t// ternary is here to detect the undefined state of item.opened\n\t\t\t__WEBPACK_IMPORTED_MODULE_2_vue__[\"a\" /* default */].set(this.item, 'opened', this.item.opened ? !this.item.opened : true);\n\t\t},\n\t\tcancelEdit: function cancelEdit() {\n\t\t\t// remove the editing class\n\t\t\tif (Array.isArray(this.item.classes)) this.item.classes = this.item.classes.filter(function (item) {\n\t\t\t\treturn item !== 'editing';\n\t\t\t});\n\t\t}\n\t},\n\tmounted: function mounted() {\n\t\t// prevent click outside event with popupItem.\n\t\tthis.popupItem = this.$el;\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NvbXBvbmVudHMvYXBwTmF2aWdhdGlvbi9uYXZpZ2F0aW9uSXRlbS52dWU/OWVmZiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBMkVBO0FBQ0E7QUFDQTs7QUFFQTtPQUVBO1NBQ0E7O0FBR0E7QUFGQTs7QUFLQTtBQUZBO3VCQUdBOztlQUdBO0FBRkE7QUFHQTs7O2dDQUVBO3FCQUNBO0FBQ0E7Z0NBQ0E7cUJBQ0E7QUFDQTs0Q0FDQTtBQUNBO0FBQ0E7d0hBQ0E7QUFDQTtvQ0FDQ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KSB7XG5cdFx0Ly8gcHJldmVudCBjbGljayBvdXRzaWRlIGV2ZW50IHdpdGggcG9wdXBJdGVtLlxuXHRcdHRoaXMucG9wdXBJdGVtID0gdGhpcy4kZWw7XG5cdH0sXG59XG48L3NjcmlwdD5cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvY29tcG9uZW50cy9hcHBOYXZpZ2F0aW9uL25hdmlnYXRpb25JdGVtLnZ1ZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///11\n");
|
||
|
||
/***/ }),
|
||
/* 12 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_popoverMenu_vue__ = __webpack_require__(13);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_04ea21c4_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_popoverMenu_vue__ = __webpack_require__(36);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_popoverMenu_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_04ea21c4_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_popoverMenu_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/popoverMenu.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-04ea21c4\", Component.options)\n } else {\n hotAPI.reload(\"data-v-04ea21c4\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9wb3BvdmVyTWVudS52dWU/NTJhYSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ3dLO0FBQ3hLO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxZQUFpQjtBQUNqQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0gsQ0FBQzs7QUFFRCIsImZpbGUiOiIxMi5qcyIsInNvdXJjZXNDb250ZW50IjpbInZhciBkaXNwb3NlZCA9IGZhbHNlXG52YXIgbm9ybWFsaXplQ29tcG9uZW50ID0gcmVxdWlyZShcIiEuLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvY29tcG9uZW50LW5vcm1hbGl6ZXJcIilcbi8qIHNjcmlwdCAqL1xuZXhwb3J0ICogZnJvbSBcIiEhYmFiZWwtbG9hZGVyIS4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZG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
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__popoverMenu_popoverItem__ = __webpack_require__(34);\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tname: 'popoverMenu',\n\tprops: ['menu'],\n\tcomponents: {\n\t\tpopoverItem: __WEBPACK_IMPORTED_MODULE_0__popoverMenu_popoverItem__[\"a\" /* default */]\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NvbXBvbmVudHMvcG9wb3Zlck1lbnUudnVlPzY2NWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBUUE7O0FBRUE7T0FFQTtTQUNBOztBQUdBO0FBRkE7QUFIQSIsImZpbGUiOiIxMy5qcyIsInNvdXJjZXNDb250ZW50IjpbIjx0ZW1wbGF0ZT5cblx0PHVsPlxuXHRcdDxwb3BvdmVyLWl0ZW0gdi1mb3I9XCIoaXRlbSwga2V5KSBpbiBtZW51XCIgOml0ZW09XCJpdGVtXCIgOmtleT1cImtleVwiIC8+XG5cdDwvdWw+XG48L3RlbXBsYXRlPlxuXG5cbjxzY3JpcHQ+XG5pbXBvcnQgcG9wb3Zlckl0ZW0gZnJvbSAnLi9wb3BvdmVyTWVudS9wb3BvdmVySXRlbSc7XG5cbmV4cG9ydCBkZWZhdWx0IHtcblx0bmFtZTogJ3BvcG92ZXJNZW51Jyxcblx0cHJvcHM6IFsnbWVudSddLFxuXHRjb21wb25lbnRzOiB7XG5cdFx0cG9wb3Zlckl0ZW1cblx0fVxufVxuPC9zY3JpcHQ+XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL2NvbXBvbmVudHMvcG9wb3Zlck1lbnUudnVlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///13\n");
|
||
|
||
/***/ }),
|
||
/* 14 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tprops: ['item']\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NvbXBvbmVudHMvcG9wb3Zlck1lbnUvcG9wb3Zlckl0ZW0udnVlPzZkN2IiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFjQTtTQUVBO0FBREEiLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzQ29udGVudCI6WyI8dGVtcGxhdGU+XG5cdDxsaT5cblx0XHQ8YSBAY2xpY2s9XCJpdGVtLmFjdGlvblwiIHYtaWY9XCJpdGVtLmhyZWZcIiA6aHJlZj1cIihpdGVtLmhyZWYpID8gaXRlbS5ocmVmIDogJyMnIFwiPlxuXHRcdFx0PHNwYW4gOmNsYXNzPVwiaXRlbS5pY29uXCI+PC9zcGFuPlxuXHRcdFx0PHNwYW4+e3tpdGVtLnRleHR9fTwvc3Bhbj5cblx0XHQ8L2E+XG5cdFx0PGJ1dHRvbiBAY2xpY2s9XCJpdGVtLmFjdGlvblwiIHYtZWxzZT5cblx0XHRcdDxzcGFuIDpjbGFzcz1cIml0ZW0uaWNvblwiPjwvc3Bhbj5cblx0XHRcdDxzcGFuPnt7aXRlbS50ZXh0fX08L3NwYW4+XG5cdFx0PC9idXR0b24+XG5cdDwvbGk+XG48L3RlbXBsYXRlPlxuXG48c2NyaXB0PlxuZXhwb3J0IGRlZmF1bHQge1xuXHRwcm9wczogWydpdGVtJ11cbn1cbjwvc2NyaXB0PlxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9jb21wb25lbnRzL3BvcG92ZXJNZW51L3BvcG92ZXJJdGVtLnZ1ZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///14\n");
|
||
|
||
/***/ }),
|
||
/* 15 */
|
||
/***/ (function(module, exports) {
|
||
|
||
eval("function validate(binding) {\r\n if (typeof binding.value !== 'function') {\r\n console.warn('[Vue-click-outside:] provided expression', binding.expression, 'is not a function.')\r\n return false\r\n }\r\n\r\n return true\r\n}\r\n\r\nfunction isPopup(popupItem, elements) {\r\n if (!popupItem || !elements)\r\n return false\r\n\r\n for (var i = 0, len = elements.length; i < len; i++) {\r\n try {\r\n if (popupItem.contains(elements[i])) {\r\n return true\r\n }\r\n if (elements[i].contains(popupItem)) {\r\n return false\r\n }\r\n } catch(e) {\r\n return false\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\nfunction isServer(vNode) {\r\n return typeof vNode.componentInstance !== 'undefined' && vNode.componentInstance.$isServer\r\n}\r\n\r\nexports = module.exports = {\r\n bind: function (el, binding, vNode) {\r\n if (!validate(binding)) return\r\n\r\n // Define Handler and cache it on the element\r\n function handler(e) {\r\n if (!vNode.context) return\r\n\r\n // some components may have related popup item, on which we shall prevent the click outside event handler.\r\n var elements = e.path || (e.composedPath && e.composedPath())\r\n elements && elements.length > 0 && elements.unshift(e.target)\r\n \r\n if (el.contains(e.target) || isPopup(vNode.context.popupItem, elements)) return\r\n\r\n el.__vueClickOutside__.callback(e)\r\n }\r\n\r\n // add Event Listeners\r\n el.__vueClickOutside__ = {\r\n handler: handler,\r\n callback: binding.value\r\n }\r\n !isServer(vNode) && document.addEventListener('click', handler)\r\n },\r\n\r\n update: function (el, binding) {\r\n if (validate(binding)) el.__vueClickOutside__.callback = binding.value\r\n },\r\n \r\n unbind: function (el, binding, vNode) {\r\n // Remove Event Listeners\r\n !isServer(vNode) && document.removeEventListener('click', el.__vueClickOutside__.handler)\r\n delete el.__vueClickOutside__\r\n }\r\n}\r\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lbC5fX3Z1ZUNsaWNrT3V0c2lkZV9fLmhhbmRsZXIpXHJcbiAgICBkZWxldGUgZWwuX192dWVDbGlja091dHNpZGVfX1xyXG4gIH1cclxufVxyXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWUtY2xpY2stb3V0c2lkZS9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gMTVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///15\n");
|
||
|
||
/***/ }),
|
||
/* 16 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__userList_userRow__ = __webpack_require__(40);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_multiselect__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_multiselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_vue_multiselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue_infinite_loading__ = __webpack_require__(43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue_infinite_loading___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_vue_infinite_loading__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue__ = __webpack_require__(3);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tname: 'userList',\n\tprops: ['users', 'showConfig', 'selectedGroup'],\n\tcomponents: {\n\t\tuserRow: __WEBPACK_IMPORTED_MODULE_0__userList_userRow__[\"a\" /* default */],\n\t\tMultiselect: __WEBPACK_IMPORTED_MODULE_1_vue_multiselect___default.a,\n\t\tInfiniteLoading: __WEBPACK_IMPORTED_MODULE_2_vue_infinite_loading___default.a\n\t},\n\tdata: function data() {\n\t\tvar unlimitedQuota = { id: 'none', label: t('settings', 'Unlimited') },\n\t\t defaultQuota = { id: 'default', label: t('settings', 'Default quota') };\n\t\treturn {\n\t\t\tunlimitedQuota: unlimitedQuota,\n\t\t\tdefaultQuota: defaultQuota,\n\t\t\tloading: false,\n\t\t\tscrolled: false,\n\t\t\tnewUser: {\n\t\t\t\tid: '',\n\t\t\t\tdisplayName: '',\n\t\t\t\tpassword: '',\n\t\t\t\tmailAddress: '',\n\t\t\t\tgroups: [],\n\t\t\t\tsubAdminsGroups: [],\n\t\t\t\tquota: defaultQuota,\n\t\t\t\tlanguage: { code: 'en', name: t('settings', 'Default language') }\n\t\t\t}\n\t\t};\n\t},\n\tmounted: function mounted() {\n\t\tif (!this.settings.canChangePassword) {\n\t\t\tOC.Notification.showTemporary(t('settings', 'Password change is disabled because the master key is disabled'));\n\t\t}\n\t\t/** \n * Init default language from server data. The use of this.settings\n * requires a computed variable,vwhich break the v-model binding of the form,\n * this is a much easier solution than getter and setter\n */\n\t\t__WEBPACK_IMPORTED_MODULE_3_vue__[\"a\" /* default */].set(this.newUser.language, 'code', this.settings.defaultLanguage);\n\t},\n\n\tcomputed: {\n\t\tsettings: function settings() {\n\t\t\treturn this.$store.getters.getServerData;\n\t\t},\n\t\tfilteredUsers: function filteredUsers() {\n\t\t\tif (this.selectedGroup === 'disabled') {\n\t\t\t\tvar disabledUsers = this.users.filter(function (user) {\n\t\t\t\t\treturn user.enabled !== true;\n\t\t\t\t});\n\t\t\t\tif (disabledUsers.length === 0 && this.$refs.infiniteLoading && this.$refs.infiniteLoading.isComplete) {\n\t\t\t\t\t// disabled group is empty, redirection to all users\n\t\t\t\t\tthis.$router.push('users');\n\t\t\t\t\tthis.$refs.infiniteLoading.$emit('$InfiniteLoading:reset');\n\t\t\t\t}\n\t\t\t\treturn disabledUsers;\n\t\t\t}\n\t\t\treturn this.users.filter(function (user) {\n\t\t\t\treturn user.enabled === true;\n\t\t\t});\n\t\t},\n\t\tgroups: function groups() {\n\t\t\t// data provided php side + remove the disabled group\n\t\t\treturn this.$store.getters.getGroups.filter(function (group) {\n\t\t\t\treturn group.id !== 'disabled';\n\t\t\t});\n\t\t},\n\t\tsubAdminsGroups: function subAdminsGroups() {\n\t\t\t// data provided php side\n\t\t\treturn this.$store.getters.getServerData.subadmingroups;\n\t\t},\n\t\tquotaOptions: function quotaOptions() {\n\t\t\t// convert the preset array into objects\n\t\t\tvar quotaPreset = this.settings.quotaPreset.reduce(function (acc, cur) {\n\t\t\t\treturn acc.concat({ id: cur, label: cur });\n\t\t\t}, []);\n\t\t\t// add default presets\n\t\t\tquotaPreset.unshift(this.unlimitedQuota);\n\t\t\tquotaPreset.unshift(this.defaultQuota);\n\t\t\treturn quotaPreset;\n\t\t},\n\t\tminPasswordLength: function minPasswordLength() {\n\t\t\treturn this.$store.getters.getPasswordPolicyMinLength;\n\t\t},\n\t\tusersOffset: function usersOffset() {\n\t\t\treturn this.$store.getters.getUsersOffset;\n\t\t},\n\t\tusersLimit: function usersLimit() {\n\t\t\treturn this.$store.getters.getUsersLimit;\n\t\t},\n\n\n\t\t/* LANGUAGES */\n\t\tlanguages: function languages() {\n\t\t\treturn Array({\n\t\t\t\tlabel: t('settings', 'Common languages'),\n\t\t\t\tlanguages: this.settings.languages.commonlanguages\n\t\t\t}, {\n\t\t\t\tlabel: t('settings', 'All languages'),\n\t\t\t\tlanguages: this.settings.languages.languages\n\t\t\t});\n\t\t}\n\t},\n\twatch: {\n\t\t// watch url change and group select\n\t\tselectedGroup: function selectedGroup(val, old) {\n\t\t\tthis.$store.commit('resetUsers');\n\t\t\tthis.$refs.infiniteLoading.$emit('$InfiniteLoading:reset');\n\t\t}\n\t},\n\tmethods: {\n\t\tonScroll: function onScroll(event) {\n\t\t\tthis.scrolled = event.target.scrollTop > 0;\n\t\t},\n\n\n\t\t/**\n * Validate quota string to make sure it's a valid human file size\n * \n * @param {string} quota Quota in readable format '5 GB'\n * @returns {Object}\n */\n\t\tvalidateQuota: function validateQuota(quota) {\n\t\t\t// only used for new presets sent through @Tag\n\t\t\tvar validQuota = OC.Util.computerFileSize(quota);\n\t\t\tif (validQuota !== null && validQuota > 0) {\n\t\t\t\t// unify format output\n\t\t\t\tquota = OC.Util.humanFileSize(OC.Util.computerFileSize(quota));\n\t\t\t\treturn this.newUser.quota = { id: quota, label: quota };\n\t\t\t}\n\t\t\t// Default is unlimited\n\t\t\treturn this.newUser.quota = this.quotaOptions[0];\n\t\t},\n\t\tinfiniteHandler: function infiniteHandler($state) {\n\t\t\tthis.$store.dispatch('getUsers', {\n\t\t\t\toffset: this.usersOffset,\n\t\t\t\tlimit: this.usersLimit,\n\t\t\t\tgroup: this.selectedGroup !== 'disabled' ? this.selectedGroup : '' }).then(function (response) {\n\t\t\t\tresponse ? $state.loaded() : $state.complete();\n\t\t\t});\n\t\t},\n\t\tresetForm: function resetForm() {\n\t\t\t// revert form to original state\n\t\t\tObject.assign(this.newUser, this.$options.data.call(this).newUser);\n\t\t\tthis.loading = false;\n\t\t},\n\t\tcreateUser: function createUser() {\n\t\t\tvar _this = this;\n\n\t\t\tthis.loading = true;\n\t\t\tthis.$store.dispatch('addUser', {\n\t\t\t\tuserid: this.newUser.id,\n\t\t\t\tpassword: this.newUser.password,\n\t\t\t\temail: this.newUser.mailAddress,\n\t\t\t\tgroups: this.newUser.groups.map(function (group) {\n\t\t\t\t\treturn group.id;\n\t\t\t\t}),\n\t\t\t\tsubadmin: this.newUser.subAdminsGroups.map(function (group) {\n\t\t\t\t\treturn group.id;\n\t\t\t\t}),\n\t\t\t\tquota: this.newUser.quota.id,\n\t\t\t\tlanguage: this.newUser.language.code\n\t\t\t}).then(function () {\n\t\t\t\treturn _this.resetForm();\n\t\t\t});\n\t\t}\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NvbXBvbmVudHMvdXNlckxpc3QudnVlP2JjNTEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQTZHQTtBQUNBO0FBQ0E7QUFDQTs7eURBRUE7T0FFQTtnQ0FDQTs7QUFFQTtBQUNBO0FBRUE7QUFKQTt1QkFLQTswREFDQTsyREFDQTs7bUJBRUE7aUJBQ0E7WUFDQTthQUNBOztRQUVBO2lCQUNBO2NBQ0E7aUJBQ0E7WUFDQTtxQkFDQTtXQUNBO2dEQUdBO0FBVkE7QUFMQTtBQWdCQTs2QkFDQTt3Q0FDQTsrQ0FDQTtBQUNBO0FBS0E7Ozs7O3dHQUNBO0FBQ0E7OztnQ0FFQTs4QkFDQTtBQUNBOzBDQUNBOzBDQUNBOzs2QkFDQTs7MkdBQ0E7QUFDQTt1QkFDQTtzQ0FDQTtBQUNBO1dBQ0E7QUFDQTs7NEJBQ0E7O0FBQ0E7NEJBQ0E7QUFDQTs7d0JBQ0E7O0FBQ0E7OENBQ0E7QUFDQTs0Q0FDQTtBQUNBO3dDQUNBO0F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JBZG1pbnNHcm91cHMubWFwKGdyb3VwID0+IGdyb3VwLmlkKSxcblx0XHRcdFx0cXVvdGE6IHRoaXMubmV3VXNlci5xdW90YS5pZCxcblx0XHRcdFx0bGFuZ3VhZ2U6IHRoaXMubmV3VXNlci5sYW5ndWFnZS5jb2RlLFxuXHRcdFx0fSkudGhlbigoKSA9PiB0aGlzLnJlc2V0Rm9ybSgpKTtcblx0XHR9XG5cdH1cbn1cbjwvc2NyaXB0PlxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9jb21wb25lbnRzL3VzZXJMaXN0LnZ1ZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///16\n");
|
||
|
||
/***/ }),
|
||
/* 17 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__popoverMenu__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_click_outside__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_click_outside___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_vue_click_outside__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue_multiselect__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue_multiselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_vue_multiselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_v_tooltip__ = __webpack_require__(41);\nvar _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; };\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_3_vue__[\"a\" /* default */].use(__WEBPACK_IMPORTED_MODULE_4_v_tooltip__[\"a\" /* default */]);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n\tname: 'userRow',\n\tprops: ['user', 'settings', 'groups', 'subAdminsGroups', 'quotaOptions', 'showConfig', 'languages'],\n\tcomponents: {\n\t\tpopoverMenu: __WEBPACK_IMPORTED_MODULE_0__popoverMenu__[\"a\" /* default */],\n\t\tMultiselect: __WEBPACK_IMPORTED_MODULE_2_vue_multiselect___default.a\n\t},\n\tdirectives: {\n\t\tClickOutside: __WEBPACK_IMPORTED_MODULE_1_vue_click_outside___default.a\n\t},\n\tmounted: function mounted() {\n\t\t// required if popup needs to stay opened after menu click\n\t\t// since we only have disable/delete actions, let's close it directly\n\t\t// this.popupItem = this.$el;\n\t},\n\tdata: function data() {\n\t\treturn {\n\t\t\trand: parseInt(Math.random() * 1000),\n\t\t\topenedMenu: false,\n\t\t\tloading: {\n\t\t\t\tall: false,\n\t\t\t\tdisplayName: false,\n\t\t\t\tpassword: false,\n\t\t\t\tmailAddress: false,\n\t\t\t\tgroups: false,\n\t\t\t\tsubadmins: false,\n\t\t\t\tquota: false,\n\t\t\t\tdelete: false,\n\t\t\t\tdisable: false,\n\t\t\t\tlanguages: false\n\t\t\t}\n\t\t};\n\t},\n\n\tcomputed: {\n\t\t/* USER POPOVERMENU ACTIONS */\n\t\tuserActions: function userActions() {\n\t\t\treturn [{\n\t\t\t\ticon: 'icon-delete',\n\t\t\t\ttext: t('settings', 'Delete user'),\n\t\t\t\taction: this.deleteUser\n\t\t\t}, {\n\t\t\t\t'icon': this.user.enabled ? 'icon-close' : 'icon-add',\n\t\t\t\t'text': this.user.enabled ? t('settings', 'Disable user') : t('settings', 'Enable user'),\n\t\t\t\t'action': this.enableDisableUser\n\t\t\t}];\n\t\t},\n\n\n\t\t/* GROUPS MANAGEMENT */\n\t\tuserGroups: function userGroups() {\n\t\t\tvar _this = this;\n\n\t\t\tvar userGroups = this.groups.filter(function (group) {\n\t\t\t\treturn _this.user.groups.includes(group.id);\n\t\t\t});\n\t\t\treturn userGroups;\n\t\t},\n\t\tuserSubAdminsGroups: function userSubAdminsGroups() {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar userSubAdminsGroups = this.subAdminsGroups.filter(function (group) {\n\t\t\t\treturn _this2.user.subadmin.includes(group.id);\n\t\t\t});\n\t\t\treturn userSubAdminsGroups;\n\t\t},\n\n\n\t\t/* QUOTA MANAGEMENT */\n\t\tusedQuota: function usedQuota() {\n\t\t\tvar quota = this.user.quota.quota;\n\t\t\tif (quota > 0) {\n\t\t\t\tquota = Math.min(100, Math.round(this.user.quota.used / quota * 100));\n\t\t\t} else {\n\t\t\t\tvar usedInGB = this.user.quota.used / (10 * Math.pow(2, 30));\n\t\t\t\t//asymptotic curve approaching 50% at 10GB to visualize used stace with infinite quota\n\t\t\t\tquota = 95 * (1 - 1 / (usedInGB + 1));\n\t\t\t}\n\t\t\treturn isNaN(quota) ? 0 : quota;\n\t\t},\n\n\t\t// Mapping saved values to objects\n\t\tuserQuota: function userQuota() {\n\t\t\tif (this.user.quota.quota > 0) {\n\t\t\t\t// if value is valid, let's map the quotaOptions or return custom quota\n\t\t\t\tvar humanQuota = OC.Util.humanFileSize(this.user.quota.quota);\n\t\t\t\tvar userQuota = this.quotaOptions.find(function (quota) {\n\t\t\t\t\treturn quota.id === humanQuota;\n\t\t\t\t});\n\t\t\t\treturn userQuota ? userQuota : { id: humanQuota, label: humanQuota };\n\t\t\t} else if (this.user.quota.quota === 0 || this.user.quota.quota === 'default') {\n\t\t\t\t// default quota is replaced by the proper value on load\n\t\t\t\treturn this.quotaOptions[0];\n\t\t\t}\n\t\t\treturn this.quotaOptions[1]; // unlimited\n\t\t},\n\n\n\t\t/* PASSWORD POLICY? */\n\t\tminPasswordLength: function minPasswordLength() {\n\t\t\treturn this.$store.getters.getPasswordPolicyMinLength;\n\t\t},\n\n\n\t\t/* LANGUAGE */\n\t\tuserLanguage: function userLanguage() {\n\t\t\tvar _this3 = this;\n\n\t\t\tvar availableLanguages = this.languages[0].languages.concat(this.languages[1].languages);\n\t\t\tvar userLang = availableLanguages.find(function (lang) {\n\t\t\t\treturn lang.code === _this3.user.language;\n\t\t\t});\n\t\t\tif ((typeof userLang === 'undefined' ? 'undefined' : _typeof(userLang)) !== 'object' && this.user.language !== '') {\n\t\t\t\treturn {\n\t\t\t\t\tcode: this.user.language,\n\t\t\t\t\tname: this.user.language\n\t\t\t\t};\n\t\t\t} else if (this.user.language === '') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn userLang;\n\t\t}\n\t},\n\tmethods: {\n\t\t/* MENU HANDLING */\n\t\tshowMenu: function showMenu() {\n\t\t\tthis.openedMenu = true;\n\t\t},\n\t\thideMenu: function hideMenu() {\n\t\t\tthis.openedMenu = false;\n\t\t},\n\n\n\t\t/**\n * Generate avatar url\n * \n * @param {string} user The user name\n * @param {int} size Size integer, default 32\n * @returns {string}\n */\n\t\tgenerateAvatar: function generateAvatar(user) {\n\t\t\tvar size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 32;\n\n\t\t\treturn OC.generateUrl('/avatar/{user}/{size}?v={version}', {\n\t\t\t\tuser: user,\n\t\t\t\tsize: size,\n\t\t\t\tversion: oc_userconfig.avatar.version\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Format the limit text in the selected options\n * \n * @param {int} count elements left\n * @returns {string}\n */\n\t\tlimitGroups: function limitGroups(count) {\n\t\t\treturn '+' + count;\n\t\t},\n\t\tdeleteUser: function deleteUser() {\n\t\t\tvar _this4 = this;\n\n\t\t\tthis.loading.delete = true;\n\t\t\tthis.loading.all = true;\n\t\t\tvar userid = this.user.id;\n\t\t\treturn this.$store.dispatch('deleteUser', { userid: userid }).then(function () {\n\t\t\t\t_this4.loading.delete = false;\n\t\t\t\t_this4.loading.all = false;\n\t\t\t});\n\t\t},\n\t\tenableDisableUser: function enableDisableUser() {\n\t\t\tvar _this5 = this;\n\n\t\t\tthis.loading.delete = true;\n\t\t\tthis.loading.all = true;\n\t\t\tvar userid = this.user.id;\n\t\t\tvar enabled = !this.user.enabled;\n\t\t\treturn this.$store.dispatch('enableDisableUser', { userid: userid, enabled: enabled }).then(function () {\n\t\t\t\t_this5.loading.delete = false;\n\t\t\t\t_this5.loading.all = false;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Set user displayName\n * \n * @param {string} displayName The display name\n * @returns {Promise}\n */\n\t\tupdateDisplayName: function updateDisplayName() {\n\t\t\tvar _this6 = this;\n\n\t\t\tvar displayName = this.$refs.displayName.value;\n\t\t\tthis.loading.displayName = true;\n\t\t\tthis.$store.dispatch('setUserData', {\n\t\t\t\tuserid: this.user.id,\n\t\t\t\tkey: 'displayname',\n\t\t\t\tvalue: displayName\n\t\t\t}).then(function () {\n\t\t\t\t_this6.loading.displayName = false;\n\t\t\t\t_this6.$refs.displayName.value = displayName;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Set user password\n * \n * @param {string} password The email adress\n * @returns {Promise}\n */\n\t\tupdatePassword: function updatePassword() {\n\t\t\tvar _this7 = this;\n\n\t\t\tvar password = this.$refs.password.value;\n\t\t\tthis.loading.password = true;\n\t\t\tthis.$store.dispatch('setUserData', {\n\t\t\t\tuserid: this.user.id,\n\t\t\t\tkey: 'password',\n\t\t\t\tvalue: password\n\t\t\t}).then(function () {\n\t\t\t\t_this7.loading.password = false;\n\t\t\t\t_this7.$refs.password.value = ''; // empty & show placeholder \n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Set user mailAddress\n * \n * @param {string} mailAddress The email adress\n * @returns {Promise}\n */\n\t\tupdateEmail: function updateEmail() {\n\t\t\tvar _this8 = this;\n\n\t\t\tvar mailAddress = this.$refs.mailAddress.value;\n\t\t\tthis.loading.mailAddress = true;\n\t\t\tthis.$store.dispatch('setUserData', {\n\t\t\t\tuserid: this.user.id,\n\t\t\t\tkey: 'email',\n\t\t\t\tvalue: mailAddress\n\t\t\t}).then(function () {\n\t\t\t\t_this8.loading.mailAddress = false;\n\t\t\t\t_this8.$refs.mailAddress.value = mailAddress;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Create a new group\n * \n * @param {string} groups Group id\n * @returns {Promise}\n */\n\t\tcreateGroup: function createGroup(gid) {\n\t\t\tvar _this9 = this;\n\n\t\t\tthis.loading = { groups: true, subadmins: true };\n\t\t\tthis.$store.dispatch('addGroup', gid).then(function () {\n\t\t\t\t_this9.loading = { groups: false, subadmins: false };\n\t\t\t\tvar userid = _this9.user.id;\n\t\t\t\t_this9.$store.dispatch('addUserGroup', { userid: userid, gid: gid });\n\t\t\t});\n\t\t\treturn this.$store.getters.getGroups[this.groups.length];\n\t\t},\n\n\n\t\t/**\n * Add user to group\n * \n * @param {object} group Group object\n * @returns {Promise}\n */\n\t\taddUserGroup: function addUserGroup(group) {\n\t\t\tvar _this10 = this;\n\n\t\t\tthis.loading.groups = true;\n\t\t\tvar userid = this.user.id;\n\t\t\tvar gid = group.id;\n\t\t\treturn this.$store.dispatch('addUserGroup', { userid: userid, gid: gid }).then(function () {\n\t\t\t\treturn _this10.loading.groups = false;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Remove user from group\n * \n * @param {object} group Group object\n * @returns {Promise}\n */\n\t\tremoveUserGroup: function removeUserGroup(group) {\n\t\t\tvar _this11 = this;\n\n\t\t\tthis.loading.groups = true;\n\t\t\tvar userid = this.user.id;\n\t\t\tvar gid = group.id;\n\t\t\treturn this.$store.dispatch('removeUserGroup', { userid: userid, gid: gid }).then(function () {\n\t\t\t\treturn _this11.loading.groups = false;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Add user to group\n * \n * @param {object} group Group object\n * @returns {Promise}\n */\n\t\taddUserSubAdmin: function addUserSubAdmin(group) {\n\t\t\tvar _this12 = this;\n\n\t\t\tthis.loading.subadmins = true;\n\t\t\tvar userid = this.user.id;\n\t\t\tvar gid = group.id;\n\t\t\treturn this.$store.dispatch('addUserSubAdmin', { userid: userid, gid: gid }).then(function () {\n\t\t\t\treturn _this12.loading.subadmins = false;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Remove user from group\n * \n * @param {object} group Group object\n * @returns {Promise}\n */\n\t\tremoveUserSubAdmin: function removeUserSubAdmin(group) {\n\t\t\tvar _this13 = this;\n\n\t\t\tthis.loading.subadmins = true;\n\t\t\tvar userid = this.user.id;\n\t\t\tvar gid = group.id;\n\t\t\treturn this.$store.dispatch('removeUserSubAdmin', { userid: userid, gid: gid }).then(function () {\n\t\t\t\treturn _this13.loading.subadmins = false;\n\t\t\t});\n\t\t},\n\n\n\t\t/**\n * Dispatch quota set request\n * \n * @param {string|Object} quota Quota in readable format '5 GB' or Object {id: '5 GB', label: '5GB'}\n * @returns {string}\n */\n\t\tsetUserQuota: function setUserQuota() {\n\t\t\tvar _this14 = this;\n\n\t\t\tvar quota = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'none';\n\n\t\t\tthis.loading.quota = true;\n\t\t\t// ensure we only send the preset id\n\t\t\tquota = quota.id ? quota.id : quota;\n\t\t\tthis.$store.dispatch('setUserData', {\n\t\t\t\tuserid: this.user.id,\n\t\t\t\tkey: 'quota',\n\t\t\t\tvalue: quota\n\t\t\t}).then(function () {\n\t\t\t\treturn _this14.loading.quota = false;\n\t\t\t});\n\t\t\treturn quota;\n\t\t},\n\n\n\t\t/**\n * Validate quota string to make sure it's a valid human file size\n * \n * @param {string} quota Quota in readable format '5 GB'\n * @returns {Promise|boolean}\n */\n\t\tvalidateQuota: function validateQuota(quota) {\n\t\t\t// only used for new presets sent through @Tag\n\t\t\tvar validQuota = OC.Util.computerFileSize(quota);\n\t\t\tif (validQuota === 0) {\n\t\t\t\treturn this.setUserQuota('none');\n\t\t\t} else if (validQuota !== null) {\n\t\t\t\t// unify format output\n\t\t\t\treturn this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota)));\n\t\t\t}\n\t\t\t// if no valid do not change\n\t\t\treturn false;\n\t\t},\n\n\n\t\t/**\n * Dispatch language set request\n * \n * @param {Object} lang language object {code:'en', name:'English'}\n * @returns {Object}\n */\n\t\tsetUserLanguage: function setUserLanguage(lang) {\n\t\t\tvar _this15 = this;\n\n\t\t\tthis.loading.languages = true;\n\t\t\t// ensure we only send the preset id\n\t\t\tthis.$store.dispatch('setUserData', {\n\t\t\t\tuserid: this.user.id,\n\t\t\t\tkey: 'language',\n\t\t\t\tvalue: lang.code\n\t\t\t}).then(function () {\n\t\t\t\treturn _this15.loading.languages = false;\n\t\t\t});\n\t\t\treturn lang;\n\t\t}\n\t}\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NvbXBvbmVudHMvdXNlckxpc3QvdXNlclJvdy52dWU/Mjg4YyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBcUZBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7T0FFQTt3RkFDQTs7QUFFQTtBQUVBO0FBSEE7O0FBTUE7QUFGQTs2QkFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO3VCQ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mVudHMvdXNlckxpc3QvdXNlclJvdy52dWUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///17\n");
|
||
|
||
/***/ }),
|
||
/* 18 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvYmluZC5qcz8yNGZmIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLG1CQUFtQixpQkFBaUI7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiIxOC5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBiaW5kKGZuLCB0aGlzQXJnKSB7XG4gIHJldHVybiBmdW5jdGlvbiB3cmFwKCkge1xuICAgIHZhciBhcmdzID0gbmV3IEFycmF5KGFyZ3VtZW50cy5sZW5ndGgpO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJncy5sZW5ndGg7IGkrKykge1xuICAgICAgYXJnc1tpXSA9IGFyZ3VtZW50c1tpXTtcbiAgICB9XG4gICAgcmV0dXJuIGZuLmFwcGx5KHRoaXNBcmcsIGFyZ3MpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2JpbmQuanNcbi8vIG1vZHVsZSBpZCA9IDE4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///18\n");
|
||
|
||
/***/ }),
|
||
/* 19 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(0);\nvar settle = __webpack_require__(51);\nvar buildURL = __webpack_require__(53);\nvar parseHeaders = __webpack_require__(54);\nvar isURLSameOrigin = __webpack_require__(55);\nvar createError = __webpack_require__(20);\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(56);\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = __webpack_require__(57);\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2FkYXB0ZXJzL3hoci5qcz9lYzZjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIrQ0FBQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDRDQUE0QztBQUM1Qzs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQ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4gICAgICBjb25maWcuY2FuY2VsVG9rZW4ucHJvbWlzZS50aGVuKGZ1bmN0aW9uIG9uQ2FuY2VsZWQoY2FuY2VsKSB7XG4gICAgICAgIGlmICghcmVxdWVzdCkge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHJlcXVlc3QuYWJvcnQoKTtcbiAgICAgICAgcmVqZWN0KGNhbmNlbCk7XG4gICAgICAgIC8vIENsZWFuIHVwIHJlcXVlc3RcbiAgICAgICAgcmVxdWVzdCA9IG51bGw7XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAocmVxdWVzdERhdGEgPT09IHVuZGVmaW5lZCkge1xuICAgICAgcmVxdWVzdERhdGEgPSBudWxsO1xuICAgIH1cblxuICAgIC8vIFNlbmQgdGhlIHJlcXVlc3RcbiAgICByZXF1ZXN0LnNlbmQocmVxdWVzdERhdGEpO1xuICB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9saWIvYWRhcHRlcnMveGhyLmpzXG4vLyBtb2R1bGUgaWQgPSAxOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///19\n");
|
||
|
||
/***/ }),
|
||
/* 20 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar enhanceError = __webpack_require__(52);\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9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Y29uZmlnLCBjb2RlLCByZXF1ZXN0LCByZXNwb25zZSkge1xuICB2YXIgZXJyb3IgPSBuZXcgRXJyb3IobWVzc2FnZSk7XG4gIHJldHVybiBlbmhhbmNlRXJyb3IoZXJyb3IsIGNvbmZpZywgY29kZSwgcmVxdWVzdCwgcmVzcG9uc2UpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2NyZWF0ZUVycm9yLmpzXG4vLyBtb2R1bGUgaWQgPSAyMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///20\n");
|
||
|
||
/***/ }),
|
||
/* 21 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NhbmNlbC9pc0NhbmNlbC5qcz9hNDFiIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBO0FBQ0E7QUFDQSIsImZpbGUiOiIyMS5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBpc0NhbmNlbCh2YWx1ZSkge1xuICByZXR1cm4gISEodmFsdWUgJiYgdmFsdWUuX19DQU5DRUxfXyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NhbmNlbC9pc0NhbmNlbC5qc1xuLy8gbW9kdWxlIGlkID0gMjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///21\n");
|
||
|
||
/***/ }),
|
||
/* 22 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NhbmNlbC9DYW5jZWwuanM/NzU1MyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsUUFBUTtBQUNuQjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUEiLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogQSBgQ2FuY2VsYCBpcyBhbiBvYmplY3QgdGhhdCBpcyB0aHJvd24gd2hlbiBhbiBvcGVyYXRpb24gaXMgY2FuY2VsZWQuXG4gKlxuICogQGNsYXNzXG4gKiBAcGFyYW0ge3N0cmluZz19IG1lc3NhZ2UgVGhlIG1lc3NhZ2UuXG4gKi9cbmZ1bmN0aW9uIENhbmNlbChtZXNzYWdlKSB7XG4gIHRoaXMubWVzc2FnZSA9IG1lc3NhZ2U7XG59XG5cbkNhbmNlbC5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgcmV0dXJuICdDYW5jZWwnICsgKHRoaXMubWVzc2FnZSA/ICc6ICcgKyB0aGlzLm1lc3NhZ2UgOiAnJyk7XG59O1xuXG5DYW5jZWwucHJvdG90eXBlLl9fQ0FOQ0VMX18gPSB0cnVlO1xuXG5tb2R1bGUuZXhwb3J0cyA9IENhbmNlbDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jYW5jZWwvQ2FuY2VsLmpzXG4vLyBtb2R1bGUgaWQgPSAyMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///22\n");
|
||
|
||
/***/ }),
|
||
/* 23 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"app\", function() { return app; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vuex_router_sync__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vuex_router_sync___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_vuex_router_sync__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__App_vue__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__router__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__store__ = __webpack_require__(66);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"router\", function() { return __WEBPACK_IMPORTED_MODULE_3__router__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"store\", function() { return __WEBPACK_IMPORTED_MODULE_4__store__[\"a\"]; });\n\n\n\n\n\n\nObject(__WEBPACK_IMPORTED_MODULE_1_vuex_router_sync__[\"sync\"])(__WEBPACK_IMPORTED_MODULE_4__store__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_3__router__[\"a\" /* default */]);\n\n// bind to window\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */].prototype.t = t;\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */].prototype.OC = OC;\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */].prototype.oc_userconfig = oc_userconfig;\n\nvar app = new __WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */]({\n\trouter: __WEBPACK_IMPORTED_MODULE_3__router__[\"a\" /* default */],\n\tstore: __WEBPACK_IMPORTED_MODULE_4__store__[\"a\" /* default */],\n\trender: function render(h) {\n\t\treturn h(__WEBPACK_IMPORTED_MODULE_2__App_vue__[\"a\" /* default */]);\n\t}\n}).$mount('#content');\n\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvbWFpbi5qcz8zNDc5Il0sIm5hbWVzIjpbInN5bmMiLCJWdWUiLCJwcm90b3R5cGUiLCJ0IiwiT0MiLCJvY191c2VyY29uZmlnIiwiYXBwIiwicm91dGVyIiwic3RvcmUiLCJyZW5kZXIiLCJoIiwiJG1vdW50Il0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSw4REFBQUEsQ0FBSyx1REFBTCxFQUFZLHdEQUFaOztBQUVBO0FBQ0Esb0RBQUFDLENBQUlDLFNBQUosQ0FBY0MsQ0FBZCxHQUFrQkEsQ0FBbEI7QUFDQSxvREFBQUYsQ0FBSUMsU0FBSixDQUFjRSxFQUFkLEdBQW1CQSxFQUFuQjtBQUNBLG9EQUFBSCxDQUFJQyxTQUFKLENBQWNHLGFBQWQsR0FBOEJBLGFBQTlCOztBQUVBLElBQU1DLE1BQU0sSUFBSSxvREFBSixDQUFRO0FBQ25CQyxTQUFBLHdEQURtQjtBQUVuQkMsUUFBQSx1REFGbUI7QUFHbkJDLFNBQVE7QUFBQSxTQUFLQyxFQUFFLHlEQUFGLENBQUw7QUFBQTtBQUhXLENBQVIsRUFJVEMsTUFKUyxDQUlGLFVBSkUsQ0FBWiIsImZpbGUiOiIyMy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBWdWUgZnJvbSAndnVlJztcbmltcG9ydCB7IHN5bmMgfSBmcm9tICd2dWV4LXJvdXRlci1zeW5jJztcbmltcG9ydCBBcHAgZnJvbSAnLi9BcHAudnVlJztcbmltcG9ydCByb3V0ZXIgZnJvbSAnLi9yb3V0ZXInO1xuaW1wb3J0IHN0b3JlIGZyb20gJy4vc3RvcmUnO1xuXG5zeW5jKHN0b3JlLCByb3V0ZXIpO1xuXG4vLyBiaW5kIHRvIHdpbmRvd1xuVnVlLnByb3RvdHlwZS50ID0gdDtcblZ1ZS5wcm90b3R5cGUuT0MgPSBPQztcblZ1ZS5wcm90b3R5cGUub2NfdXNlcmNvbmZpZyA9IG9jX3VzZXJjb25maWc7XG5cbmNvbnN0IGFwcCA9IG5ldyBWdWUoe1xuXHRyb3V0ZXIsXG5cdHN0b3JlLFxuXHRyZW5kZXI6IGggPT4gaChBcHApXG59KS4kbW91bnQoJyNjb250ZW50Jyk7XG5cbmV4cG9ydCB7IGFwcCwgcm91dGVyLCBzdG9yZSB9O1xuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9tYWluLmpzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///23\n");
|
||
|
||
/***/ }),
|
||
/* 24 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
eval("/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(25);\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdGltZXJzLWJyb3dzZXJpZnkvbWFpbi5qcz9kN2FkIl0sIm5hbWVzIjpbXSwibWFwcGlu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Y2xlYXJJbW1lZGlhdGUpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvdGltZXJzLWJyb3dzZXJpZnkvbWFpbi5qc1xuLy8gbW9kdWxlIGlkID0gMjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///24\n");
|
||
|
||
/***/ }),
|
||
/* 25 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
eval("/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(1)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvc2V0aW1tZWRpYXRlL3NldEltbWVkaWF0ZS5qcz85YjJhIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVCQUF1QjtBQUN2QjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQixpQkFBaUI7QUFDdEM7QUFDQTtBQUNBO0FBQ0Esa0JBQWtCO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FB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VkaWF0ZTtcbn0odHlwZW9mIHNlbGYgPT09IFwidW5kZWZpbmVkXCIgPyB0eXBlb2YgZ2xvYmFsID09PSBcInVuZGVmaW5lZFwiID8gdGhpcyA6IGdsb2JhbCA6IHNlbGYpKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL3NldGltbWVkaWF0ZS9zZXRJbW1lZGlhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDI1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///25\n");
|
||
|
||
/***/ }),
|
||
/* 26 */
|
||
/***/ (function(module, exports) {
|
||
|
||
eval("exports.sync = function (store, router, options) {\n var moduleName = (options || {}).moduleName || 'route'\n\n store.registerModule(moduleName, {\n namespaced: true,\n state: cloneRoute(router.currentRoute),\n mutations: {\n 'ROUTE_CHANGED': function ROUTE_CHANGED (state, transition) {\n store.state[moduleName] = cloneRoute(transition.to, transition.from)\n }\n }\n })\n\n var isTimeTraveling = false\n var currentPath\n\n // sync router on store change\n var storeUnwatch = store.watch(\n function (state) { return state[moduleName]; },\n function (route) {\n var fullPath = route.fullPath;\n if (fullPath === currentPath) {\n return\n }\n if (currentPath != null) {\n isTimeTraveling = true\n router.push(route)\n }\n currentPath = fullPath\n },\n { sync: true }\n )\n\n // sync store on router navigation\n var afterEachUnHook = router.afterEach(function (to, from) {\n if (isTimeTraveling) {\n isTimeTraveling = false\n return\n }\n currentPath = to.fullPath\n store.commit(moduleName + '/ROUTE_CHANGED', { to: to, from: from })\n })\n\n return function unsync () {\n // On unsync, remove router hook\n if (afterEachUnHook != null) {\n afterEachUnHook()\n }\n\n // On unsync, remove store watch\n if (storeUnwatch != null) {\n storeUnwatch()\n }\n\n // On unsync, unregister Module with store\n store.unregisterModule(moduleName)\n }\n}\n\nfunction cloneRoute (to, from) {\n var clone = {\n name: to.name,\n path: to.path,\n hash: to.hash,\n query: to.query,\n params: to.params,\n fullPath: to.fullPath,\n meta: to.meta\n }\n if (from) {\n clone.from = cloneRoute(from)\n }\n return Object.freeze(clone)\n}\n\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdnVleC1yb3V0ZXItc3luYy9pbmRleC5qcz9mNDkzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0EsaUNBQWlDOztBQUVqQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRzs7QUFFSDtBQUNBOztBQUVBO0FBQ0E7QUFDQSxzQkFBc0IsMEJBQTBCLEVBQUU7QUFDbEQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0wsS0FBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaURBQWlELHFCQUFxQjtBQUN0RSxHQUFHOztBQUVIO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IjI2LmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cy5zeW5jID0gZnVuY3Rpb24gKHN0b3JlLCByb3V0ZXIsIG9wdGlvbnMpIHtcbiAgdmFyIG1vZHVsZU5hbWUgPSAob3B0aW9ucyB8fCB7fSkubW9kdWxlTmFtZSB8fCAncm91dGUnXG5cbiAgc3RvcmUuc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0ZShmcm9tKVxuICB9XG4gIHJldHVybiBPYmplY3QuZnJlZXplKGNsb25lKVxufVxuXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWV4LXJvdXRlci1zeW5jL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAyNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///26\n");
|
||
|
||
/***/ }),
|
||
/* 27 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__ = __webpack_require__(8);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7ba5bd90_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__ = __webpack_require__(28);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7ba5bd90_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/App.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-7ba5bd90\", Component.options)\n } else {\n hotAPI.reload(\"data-v-7ba5bd90\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvQXBwLnZ1ZT81Y2YyIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDcUs7QUFDcks7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLFlBQWlCO0FBQ2pCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSCxDQUFDOztBQUVEIiwiZmlsZSI6IjI3LmpzIiwic291cmNlc0NvbnRlbnQiOlsidmFyIGRpc3Bvc2VkID0gZmFsc2VcbnZhciBub3JtYWxpemVDb21wb25lbnQgPSByZXF1aXJlKFwiIS4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9jb21wb25lbnQtbm9ybWFsaXplclwiKVxuLyogc2NyaXB0ICovXG5leHBvcnQgKiBmcm9tIFwiISFiYWJlbC1sb2FkZXIhLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yP3R5cGU9c2NyaXB0JmluZGV4PTAhLi9BcHAudnVlXCJcbmltcG9ydC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X1xuKVxuQ29tcG9uZW50Lm9wdGlvbnMuX19maWxlID0gXCJzcmMvQXBwLnZ1ZVwiXG5cbi8qIGhvdCByZWxvYWQgKi9cbmlmIChtb2R1bGUuaG90KSB7KGZ1bmN0aW9uICgpIHtcbiAgdmFyIGhvdEFQSSA9IHJlcXVpcmUoXCJ2dWUtaG90LXJlbG9hZC1hcGlcIilcbiAgaG90QVBJLmluc3RhbGwocmVxdWlyZShcInZ1ZVwiKSwgZmFsc2UpXG4gIGlmICghaG90QVBJLmNvbXBhdGlibGUpIHJldHVyblxuICBtb2R1bGUuaG90LmFjY2VwdCgpXG4gIGlmICghbW9kdWxlLmhvdC5kYXRhKSB7XG4gICAgaG90QVBJLmNyZWF0ZVJlY29yZChcImRhdGEtdi03YmE1YmQ5MFwiLCBDb21wb25lbnQub3B0aW9ucylcbiAgfSBlbHNlIHtcbiAgICBob3RBUEkucmVsb2FkKFwiZGF0YS12LTdiYTViZDkwXCIsIENvbXBvbmVudC5vcHRpb25zKVxuICB9XG4gIG1vZHVsZS5ob3QuZGlzcG9zZShmdW5jdGlvbiAoZGF0YSkge1xuICAgIGRpc3Bvc2VkID0gdHJ1ZVxuICB9KVxufSkoKX1cblxuZXhwb3J0IGRlZmF1bHQgQ29tcG9uZW50LmV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL0FwcC52dWVcbi8vIG1vZHVsZSBpZCA9IDI3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///27\n");
|
||
|
||
/***/ }),
|
||
/* 28 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"router-view\")\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-7ba5bd90\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvQXBwLnZ1ZT8zYTI1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxpQkFBaUI7QUFDakI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiMjguanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgcmVuZGVyID0gZnVuY3Rpb24oKSB7XG4gIHZhciBfdm0gPSB0aGlzXG4gIHZhciBfaCA9IF92bS4kY3JlYXRlRWxlbWVudFxuICB2YXIgX2MgPSBfdm0uX3NlbGYuX2MgfHwgX2hcbiAgcmV0dXJuIF9jKFwicm91dGVyLXZpZXdcIilcbn1cbnZhciBzdGF0aWNSZW5kZXJGbnMgPSBbXVxucmVuZGVyLl93aXRoU3RyaXBwZWQgPSB0cnVlXG52YXIgZXNFeHBvcnRzID0geyByZW5kZXI6IHJlbmRlciwgc3RhdGljUmVuZGVyRm5zOiBzdGF0aWNSZW5kZXJGbnMgfVxuZXhwb3J0IGRlZmF1bHQgZXNFeHBvcnRzXG5pZiAobW9kdWxlLmhvdCkge1xuICBtb2R1bGUuaG90LmFjY2VwdCgpXG4gIGlmIChtb2R1bGUuaG90LmRhdGEpIHtcbiAgICByZXF1aXJlKFwidnVlLWhvdC1yZWxvYWQtYXBpXCIpICAgICAgLnJlcmVuZGVyKFwiZGF0YS12LTdiYTViZDkwXCIsIGVzRXhwb3J0cylcbiAgfVxufVxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3RlbXBsYXRlLWNvbXBpbGVyP3tcImlkXCI6XCJkYXRhLXYtN2JhNWJkOTBcIixcImhhc1Njb3BlZFwiOmZhbHNlLFwiYnVibGVcIjp7XCJ0cmFuc2Zvcm1zXCI6e319fSEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXRlbXBsYXRlJmluZGV4PTAhLi9zcmMvQXBwLnZ1ZVxuLy8gbW9kdWxlIGlkID0gMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///28\n");
|
||
|
||
/***/ }),
|
||
/* 29 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_router__ = __webpack_require__(30);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__views_Users__ = __webpack_require__(31);\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */].use(__WEBPACK_IMPORTED_MODULE_1_vue_router__[\"a\" /* default */]);\n\n/*\n * This is the list of routes where the vuejs app will\n * take over php to provide data\n * You need to forward the php routing (routes.php) to\n * /settings/main.php, where the vue-router will ensure\n * the proper route.\n * ⚠️ Routes needs to match the php routes.\n */\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_1_vue_router__[\"a\" /* default */]({\n\tmode: 'history',\n\troutes: [{\n\t\tpath: '(/index.php)?/settings/users',\n\t\tcomponent: __WEBPACK_IMPORTED_MODULE_2__views_Users__[\"a\" /* default */],\n\t\tprops: true,\n\t\tname: 'users',\n\t\tchildren: [{\n\t\t\tpath: ':selectedGroup',\n\t\t\tname: 'group',\n\t\t\tcomponent: __WEBPACK_IMPORTED_MODULE_2__views_Users__[\"a\" /* default */]\n\t\t}]\n\t}]\n}));\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvcm91dGVyLmpzPzcwN2IiXSwibmFtZXMiOlsiVnVlIiwidXNlIiwibW9kZSIsInJvdXRlcyIsInBhdGgiLCJjb21wb25lbnQiLCJwcm9wcyIsIm5hbWUiLCJjaGlsZHJlbiIsIlVzZXJzIl0sIm1hcHBpbmdzIjoiOzs7QUFBQTtBQUNBO0FBQ0E7O0FBRUEsb0RBQUFBLENBQUlDLEdBQUosQ0FBUSwyREFBUjs7QUFFQTs7Ozs7Ozs7O0FBU0EseURBQWUsSUFBSSwyREFBSixDQUFXO0FBQ3pCQyxPQUFNLFNBRG1CO0FBRXpCQyxTQUFRLENBQUM7QUFDUkMsUUFBTSw4QkFERTtBQUVSQyxhQUFXLDZEQUZIO0FBR1JDLFNBQU8sSUFIQztBQUlSQyxRQUFNLE9BSkU7QUFLUkMsWUFBVSxDQUFDO0FBQ1JKLFNBQU0sZ0JBREU7QUFFUkcsU0FBTSxPQUZFO0FBR1JGLGNBQVcsNkRBQUFJO0FBSEgsR0FBRDtBQUxGLEVBQUQ7QUFGaUIsQ0FBWCxDQUFmIiwiZmlsZSI6IjI5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFZ1ZSBmcm9tICd2dWUnO1xuaW1wb3J0IFJvdXRlciBmcm9tICd2dWUtcm91dGVyJztcbmltcG9ydCBVc2VycyBmcm9tICcuL3ZpZXdzL1VzZXJzJztcblxuVnVlLnVzZShSb3V0ZXIpO1xuXG4vKlxuICogVGhpcyBpcyB0aGUgbGlzdCBvZiByb3V0ZXMgd2hlcmUgdGhlIHZ1ZWpzIGFwcCB3aWxsXG4gKiB0YWtlIG92ZXIgcGhwIHRvIHByb3ZpZGUgZGF0YVxuICogWW91IG5lZWQgdG8gZm9yd2FyZCB0aGUgcGhwIHJvdXRpbmcgKHJvdXRlcy5waHApIHRvXG4gKiAvc2V0dGluZ3MvbWFpbi5waHAsIHdoZXJlIHRoZSB2dWUtcm91dGVyIHdpbGwgZW5zdXJlXG4gKiB0aGUgcHJvcGVyIHJvdXRlLlxuICog4pqg77iPIFJvdXRlcyBuZWVkcyB0byBtYXRjaCB0aGUgcGhwIHJvdXRlcy5cbiAqL1xuXG5leHBvcnQgZGVmYXVsdCBuZXcgUm91dGVyKHtcblx0bW9kZTogJ2hpc3RvcnknLFxuXHRyb3V0ZXM6IFt7XG5cdFx0cGF0aDogJygvaW5kZXgucGhwKT8vc2V0dGluZ3MvdXNlcnMnLFxuXHRcdGNvbXBvbmVudDogVXNlcnMsXG5cdFx0cHJvcHM6IHRydWUsXG5cdFx0bmFtZTogJ3VzZXJzJyxcblx0XHRjaGlsZHJlbjogW3tcblx0XHRcdCAgcGF0aDogJzpzZWxlY3RlZEdyb3VwJyxcblx0XHRcdCAgbmFtZTogJ2dyb3VwJyxcblx0XHRcdCAgY29tcG9uZW50OiBVc2Vyc1xuXHRcdFx0fSxcblx0XHRdXG5cdH1dXG59KTtcblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvcm91dGVyLmpzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///29\n");
|
||
|
||
/***/ }),
|
||
/* 30 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function(process) {/**\n * vue-router v3.0.1\n * (c) 2017 Evan You\n * @license MIT\n */\n/* */\n\nfunction assert (condition, message) {\n if (!condition) {\n throw new Error((\"[vue-router] \" + message))\n }\n}\n\nfunction warn (condition, message) {\n if (process.env.NODE_ENV !== 'production' && !condition) {\n typeof console !== 'undefined' && console.warn((\"[vue-router] \" + message));\n }\n}\n\nfunction isError (err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1\n}\n\nvar View = {\n name: 'router-view',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render (_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data;\n\n data.routerView = true;\n\n // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {});\n\n // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n var depth = 0;\n var inactive = false;\n while (parent && parent._routerRoot !== parent) {\n if (parent.$vnode && parent.$vnode.data.routerView) {\n depth++;\n }\n if (parent._inactive) {\n inactive = true;\n }\n parent = parent.$parent;\n }\n data.routerViewDepth = depth;\n\n // render previous view if the tree is inactive and kept-alive\n if (inactive) {\n return h(cache[name], data, children)\n }\n\n var matched = route.matched[depth];\n // render empty node if no matched route\n if (!matched) {\n cache[name] = null;\n return h()\n }\n\n var component = cache[name] = matched.components[name];\n\n // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n if (\n (val && current !== vm) ||\n (!val && current === vm)\n ) {\n matched.instances[name] = val;\n }\n }\n\n // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;(data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n };\n\n // resolve props\n var propsToPass = data.props = resolveProps(route, matched.props && matched.props[name]);\n if (propsToPass) {\n // clone to prevent mutation\n propsToPass = data.props = extend({}, propsToPass);\n // pass non-declared props as attrs\n var attrs = data.attrs = data.attrs || {};\n for (var key in propsToPass) {\n if (!component.props || !(key in component.props)) {\n attrs[key] = propsToPass[key];\n delete propsToPass[key];\n }\n }\n }\n\n return h(component, data, children)\n }\n};\n\nfunction resolveProps (route, config) {\n switch (typeof config) {\n case 'undefined':\n return\n case 'object':\n return config\n case 'function':\n return config(route)\n case 'boolean':\n return config ? route.params : undefined\n default:\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n \"props in \\\"\" + (route.path) + \"\\\" is a \" + (typeof config) + \", \" +\n \"expecting an object, function or boolean.\"\n );\n }\n }\n}\n\nfunction extend (to, from) {\n for (var key in from) {\n to[key] = from[key];\n }\n return to\n}\n\n/* */\n\nvar encodeReserveRE = /[!'()*]/g;\nvar encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };\nvar commaRE = /%2C/g;\n\n// fixed encodeURIComponent which is more conformant to RFC3986:\n// - escapes [!'()*]\n// - preserve commas\nvar encode = function (str) { return encodeURIComponent(str)\n .replace(encodeReserveRE, encodeReserveReplacer)\n .replace(commaRE, ','); };\n\nvar decode = decodeURIComponent;\n\nfunction resolveQuery (\n query,\n extraQuery,\n _parseQuery\n) {\n if ( extraQuery === void 0 ) extraQuery = {};\n\n var parse = _parseQuery || parseQuery;\n var parsedQuery;\n try {\n parsedQuery = parse(query || '');\n } catch (e) {\n process.env.NODE_ENV !== 'production' && warn(false, e.message);\n parsedQuery = {};\n }\n for (var key in extraQuery) {\n parsedQuery[key] = extraQuery[key];\n }\n return parsedQuery\n}\n\nfunction parseQuery (query) {\n var res = {};\n\n query = query.trim().replace(/^(\\?|#|&)/, '');\n\n if (!query) {\n return res\n }\n\n query.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = decode(parts.shift());\n var val = parts.length > 0\n ? decode(parts.join('='))\n : null;\n\n if (res[key] === undefined) {\n res[key] = val;\n } else if (Array.isArray(res[key])) {\n res[key].push(val);\n } else {\n res[key] = [res[key], val];\n }\n });\n\n return res\n}\n\nfunction stringifyQuery (obj) {\n var res = obj ? Object.keys(obj).map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return ''\n }\n\n if (val === null) {\n return encode(key)\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.forEach(function (val2) {\n if (val2 === undefined) {\n return\n }\n if (val2 === null) {\n result.push(encode(key));\n } else {\n result.push(encode(key) + '=' + encode(val2));\n }\n });\n return result.join('&')\n }\n\n return encode(key) + '=' + encode(val)\n }).filter(function (x) { return x.length > 0; }).join('&') : null;\n return res ? (\"?\" + res) : ''\n}\n\n/* */\n\n\nvar trailingSlashRE = /\\/?$/;\n\nfunction createRoute (\n record,\n location,\n redirectedFrom,\n router\n) {\n var stringifyQuery$$1 = router && router.options.stringifyQuery;\n\n var query = location.query || {};\n try {\n query = clone(query);\n } catch (e) {}\n\n var route = {\n name: location.name || (record && record.name),\n meta: (record && record.meta) || {},\n path: location.path || '/',\n hash: location.hash || '',\n query: query,\n params: location.params || {},\n fullPath: getFullPath(location, stringifyQuery$$1),\n matched: record ? formatMatch(record) : []\n };\n if (redirectedFrom) {\n route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery$$1);\n }\n return Object.freeze(route)\n}\n\nfunction clone (value) {\n if (Array.isArray(value)) {\n return value.map(clone)\n } else if (value && typeof value === 'object') {\n var res = {};\n for (var key in value) {\n res[key] = clone(value[key]);\n }\n return res\n } else {\n return value\n }\n}\n\n// the starting route that represents the initial state\nvar START = createRoute(null, {\n path: '/'\n});\n\nfunction formatMatch (record) {\n var res = [];\n while (record) {\n res.unshift(record);\n record = record.parent;\n }\n return res\n}\n\nfunction getFullPath (\n ref,\n _stringifyQuery\n) {\n var path = ref.path;\n var query = ref.query; if ( query === void 0 ) query = {};\n var hash = ref.hash; if ( hash === void 0 ) hash = '';\n\n var stringify = _stringifyQuery || stringifyQuery;\n return (path || '/') + stringify(query) + hash\n}\n\nfunction isSameRoute (a, b) {\n if (b === START) {\n return a === b\n } else if (!b) {\n return false\n } else if (a.path && b.path) {\n return (\n a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') &&\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query)\n )\n } else if (a.name && b.name) {\n return (\n a.name === b.name &&\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query) &&\n isObjectEqual(a.params, b.params)\n )\n } else {\n return false\n }\n}\n\nfunction isObjectEqual (a, b) {\n if ( a === void 0 ) a = {};\n if ( b === void 0 ) b = {};\n\n // handle null value #1566\n if (!a || !b) { return a === b }\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) {\n return false\n }\n return aKeys.every(function (key) {\n var aVal = a[key];\n var bVal = b[key];\n // check nested equality\n if (typeof aVal === 'object' && typeof bVal === 'object') {\n return isObjectEqual(aVal, bVal)\n }\n return String(aVal) === String(bVal)\n })\n}\n\nfunction isIncludedRoute (current, target) {\n return (\n current.path.replace(trailingSlashRE, '/').indexOf(\n target.path.replace(trailingSlashRE, '/')\n ) === 0 &&\n (!target.hash || current.hash === target.hash) &&\n queryIncludes(current.query, target.query)\n )\n}\n\nfunction queryIncludes (current, target) {\n for (var key in target) {\n if (!(key in current)) {\n return false\n }\n }\n return true\n}\n\n/* */\n\n// work around weird flow bug\nvar toTypes = [String, Object];\nvar eventTypes = [String, Array];\n\nvar Link = {\n name: 'router-link',\n props: {\n to: {\n type: toTypes,\n required: true\n },\n tag: {\n type: String,\n default: 'a'\n },\n exact: Boolean,\n append: Boolean,\n replace: Boolean,\n activeClass: String,\n exactActiveClass: String,\n event: {\n type: eventTypes,\n default: 'click'\n }\n },\n render: function render (h) {\n var this$1 = this;\n\n var router = this.$router;\n var current = this.$route;\n var ref = router.resolve(this.to, current, this.append);\n var location = ref.location;\n var route = ref.route;\n var href = ref.href;\n\n var classes = {};\n var globalActiveClass = router.options.linkActiveClass;\n var globalExactActiveClass = router.options.linkExactActiveClass;\n // Support global empty active class\n var activeClassFallback = globalActiveClass == null\n ? 'router-link-active'\n : globalActiveClass;\n var exactActiveClassFallback = globalExactActiveClass == null\n ? 'router-link-exact-active'\n : globalExactActiveClass;\n var activeClass = this.activeClass == null\n ? activeClassFallback\n : this.activeClass;\n var exactActiveClass = this.exactActiveClass == null\n ? exactActiveClassFallback\n : this.exactActiveClass;\n var compareTarget = location.path\n ? createRoute(null, location, null, router)\n : route;\n\n classes[exactActiveClass] = isSameRoute(current, compareTarget);\n classes[activeClass] = this.exact\n ? classes[exactActiveClass]\n : isIncludedRoute(current, compareTarget);\n\n var handler = function (e) {\n if (guardEvent(e)) {\n if (this$1.replace) {\n router.replace(location);\n } else {\n router.push(location);\n }\n }\n };\n\n var on = { click: guardEvent };\n if (Array.isArray(this.event)) {\n this.event.forEach(function (e) { on[e] = handler; });\n } else {\n on[this.event] = handler;\n }\n\n var data = {\n class: classes\n };\n\n if (this.tag === 'a') {\n data.on = on;\n data.attrs = { href: href };\n } else {\n // find the first <a> child and apply listener and href\n var a = findAnchor(this.$slots.default);\n if (a) {\n // in case the <a> is a static node\n a.isStatic = false;\n var extend = _Vue.util.extend;\n var aData = a.data = extend({}, a.data);\n aData.on = on;\n var aAttrs = a.data.attrs = extend({}, a.data.attrs);\n aAttrs.href = href;\n } else {\n // doesn't have <a> child, apply listener to self\n data.on = on;\n }\n }\n\n return h(this.tag, data, this.$slots.default)\n }\n};\n\nfunction guardEvent (e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }\n // don't redirect when preventDefault called\n if (e.defaultPrevented) { return }\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0) { return }\n // don't redirect if `target=\"_blank\"`\n if (e.currentTarget && e.currentTarget.getAttribute) {\n var target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target)) { return }\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault) {\n e.preventDefault();\n }\n return true\n}\n\nfunction findAnchor (children) {\n if (children) {\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.tag === 'a') {\n return child\n }\n if (child.children && (child = findAnchor(child.children))) {\n return child\n }\n }\n }\n}\n\nvar _Vue;\n\nfunction install (Vue) {\n if (install.installed && _Vue === Vue) { return }\n install.installed = true;\n\n _Vue = Vue;\n\n var isDef = function (v) { return v !== undefined; };\n\n var registerInstance = function (vm, callVal) {\n var i = vm.$options._parentVnode;\n if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {\n i(vm, callVal);\n }\n };\n\n Vue.mixin({\n beforeCreate: function beforeCreate () {\n if (isDef(this.$options.router)) {\n this._routerRoot = this;\n this._router = this.$options.router;\n this._router.init(this);\n Vue.util.defineReactive(this, '_route', this._router.history.current);\n } else {\n this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;\n }\n registerInstance(this, this);\n },\n destroyed: function destroyed () {\n registerInstance(this);\n }\n });\n\n Object.defineProperty(Vue.prototype, '$router', {\n get: function get () { return this._routerRoot._router }\n });\n\n Object.defineProperty(Vue.prototype, '$route', {\n get: function get () { return this._routerRoot._route }\n });\n\n Vue.component('router-view', View);\n Vue.component('router-link', Link);\n\n var strats = Vue.config.optionMergeStrategies;\n // use the same hook merging strategy for route hooks\n strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;\n}\n\n/* */\n\nvar inBrowser = typeof window !== 'undefined';\n\n/* */\n\nfunction resolvePath (\n relative,\n base,\n append\n) {\n var firstChar = relative.charAt(0);\n if (firstChar === '/') {\n return relative\n }\n\n if (firstChar === '?' || firstChar === '#') {\n return base + relative\n }\n\n var stack = base.split('/');\n\n // remove trailing segment if:\n // - not appending\n // - appending to trailing slash (last segment is empty)\n if (!append || !stack[stack.length - 1]) {\n stack.pop();\n }\n\n // resolve relative path\n var segments = relative.replace(/^\\//, '').split('/');\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n if (segment === '..') {\n stack.pop();\n } else if (segment !== '.') {\n stack.push(segment);\n }\n }\n\n // ensure leading slash\n if (stack[0] !== '') {\n stack.unshift('');\n }\n\n return stack.join('/')\n}\n\nfunction parsePath (path) {\n var hash = '';\n var query = '';\n\n var hashIndex = path.indexOf('#');\n if (hashIndex >= 0) {\n hash = path.slice(hashIndex);\n path = path.slice(0, hashIndex);\n }\n\n var queryIndex = path.indexOf('?');\n if (queryIndex >= 0) {\n query = path.slice(queryIndex + 1);\n path = path.slice(0, queryIndex);\n }\n\n return {\n path: path,\n query: query,\n hash: hash\n }\n}\n\nfunction cleanPath (path) {\n return path.replace(/\\/\\//g, '/')\n}\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n/**\n * Expose `pathToRegexp`.\n */\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g');\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n continue\n }\n\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7];\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n });\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index);\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path);\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys;\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n var strict = options.strict;\n var end = options.end !== false;\n var route = '';\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n\n keys.push(token);\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n\n/* */\n\n// $flow-disable-line\nvar regexpCompileCache = Object.create(null);\n\nfunction fillParams (\n path,\n params,\n routeMsg\n) {\n try {\n var filler =\n regexpCompileCache[path] ||\n (regexpCompileCache[path] = pathToRegexp_1.compile(path));\n return filler(params || {}, { pretty: true })\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"missing param for \" + routeMsg + \": \" + (e.message)));\n }\n return ''\n }\n}\n\n/* */\n\nfunction createRouteMap (\n routes,\n oldPathList,\n oldPathMap,\n oldNameMap\n) {\n // the path list is used to control path matching priority\n var pathList = oldPathList || [];\n // $flow-disable-line\n var pathMap = oldPathMap || Object.create(null);\n // $flow-disable-line\n var nameMap = oldNameMap || Object.create(null);\n\n routes.forEach(function (route) {\n addRouteRecord(pathList, pathMap, nameMap, route);\n });\n\n // ensure wildcard routes are always at the end\n for (var i = 0, l = pathList.length; i < l; i++) {\n if (pathList[i] === '*') {\n pathList.push(pathList.splice(i, 1)[0]);\n l--;\n i--;\n }\n }\n\n return {\n pathList: pathList,\n pathMap: pathMap,\n nameMap: nameMap\n }\n}\n\nfunction addRouteRecord (\n pathList,\n pathMap,\n nameMap,\n route,\n parent,\n matchAs\n) {\n var path = route.path;\n var name = route.name;\n if (process.env.NODE_ENV !== 'production') {\n assert(path != null, \"\\\"path\\\" is required in a route configuration.\");\n assert(\n typeof route.component !== 'string',\n \"route config \\\"component\\\" for path: \" + (String(path || name)) + \" cannot be a \" +\n \"string id. Use an actual component instead.\"\n );\n }\n\n var pathToRegexpOptions = route.pathToRegexpOptions || {};\n var normalizedPath = normalizePath(\n path,\n parent,\n pathToRegexpOptions.strict\n );\n\n if (typeof route.caseSensitive === 'boolean') {\n pathToRegexpOptions.sensitive = route.caseSensitive;\n }\n\n var record = {\n path: normalizedPath,\n regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),\n components: route.components || { default: route.component },\n instances: {},\n name: name,\n parent: parent,\n matchAs: matchAs,\n redirect: route.redirect,\n beforeEnter: route.beforeEnter,\n meta: route.meta || {},\n props: route.props == null\n ? {}\n : route.components\n ? route.props\n : { default: route.props }\n };\n\n if (route.children) {\n // Warn if route is named, does not redirect and has a default child route.\n // If users navigate to this route by name, the default child will\n // not be rendered (GH Issue #629)\n if (process.env.NODE_ENV !== 'production') {\n if (route.name && !route.redirect && route.children.some(function (child) { return /^\\/?$/.test(child.path); })) {\n warn(\n false,\n \"Named Route '\" + (route.name) + \"' has a default child route. \" +\n \"When navigating to this named route (:to=\\\"{name: '\" + (route.name) + \"'\\\"), \" +\n \"the default child route will not be rendered. Remove the name from \" +\n \"this route and use the name of the default child route for named \" +\n \"links instead.\"\n );\n }\n }\n route.children.forEach(function (child) {\n var childMatchAs = matchAs\n ? cleanPath((matchAs + \"/\" + (child.path)))\n : undefined;\n addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);\n });\n }\n\n if (route.alias !== undefined) {\n var aliases = Array.isArray(route.alias)\n ? route.alias\n : [route.alias];\n\n aliases.forEach(function (alias) {\n var aliasRoute = {\n path: alias,\n children: route.children\n };\n addRouteRecord(\n pathList,\n pathMap,\n nameMap,\n aliasRoute,\n parent,\n record.path || '/' // matchAs\n );\n });\n }\n\n if (!pathMap[record.path]) {\n pathList.push(record.path);\n pathMap[record.path] = record;\n }\n\n if (name) {\n if (!nameMap[name]) {\n nameMap[name] = record;\n } else if (process.env.NODE_ENV !== 'production' && !matchAs) {\n warn(\n false,\n \"Duplicate named routes definition: \" +\n \"{ name: \\\"\" + name + \"\\\", path: \\\"\" + (record.path) + \"\\\" }\"\n );\n }\n }\n}\n\nfunction compileRouteRegex (path, pathToRegexpOptions) {\n var regex = pathToRegexp_1(path, [], pathToRegexpOptions);\n if (process.env.NODE_ENV !== 'production') {\n var keys = Object.create(null);\n regex.keys.forEach(function (key) {\n warn(!keys[key.name], (\"Duplicate param keys in route with path: \\\"\" + path + \"\\\"\"));\n keys[key.name] = true;\n });\n }\n return regex\n}\n\nfunction normalizePath (path, parent, strict) {\n if (!strict) { path = path.replace(/\\/$/, ''); }\n if (path[0] === '/') { return path }\n if (parent == null) { return path }\n return cleanPath(((parent.path) + \"/\" + path))\n}\n\n/* */\n\n\nfunction normalizeLocation (\n raw,\n current,\n append,\n router\n) {\n var next = typeof raw === 'string' ? { path: raw } : raw;\n // named target\n if (next.name || next._normalized) {\n return next\n }\n\n // relative params\n if (!next.path && next.params && current) {\n next = assign({}, next);\n next._normalized = true;\n var params = assign(assign({}, current.params), next.params);\n if (current.name) {\n next.name = current.name;\n next.params = params;\n } else if (current.matched.length) {\n var rawPath = current.matched[current.matched.length - 1].path;\n next.path = fillParams(rawPath, params, (\"path \" + (current.path)));\n } else if (process.env.NODE_ENV !== 'production') {\n warn(false, \"relative params navigation requires a current route.\");\n }\n return next\n }\n\n var parsedPath = parsePath(next.path || '');\n var basePath = (current && current.path) || '/';\n var path = parsedPath.path\n ? resolvePath(parsedPath.path, basePath, append || next.append)\n : basePath;\n\n var query = resolveQuery(\n parsedPath.query,\n next.query,\n router && router.options.parseQuery\n );\n\n var hash = next.hash || parsedPath.hash;\n if (hash && hash.charAt(0) !== '#') {\n hash = \"#\" + hash;\n }\n\n return {\n _normalized: true,\n path: path,\n query: query,\n hash: hash\n }\n}\n\nfunction assign (a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n return a\n}\n\n/* */\n\n\nfunction createMatcher (\n routes,\n router\n) {\n var ref = createRouteMap(routes);\n var pathList = ref.pathList;\n var pathMap = ref.pathMap;\n var nameMap = ref.nameMap;\n\n function addRoutes (routes) {\n createRouteMap(routes, pathList, pathMap, nameMap);\n }\n\n function match (\n raw,\n currentRoute,\n redirectedFrom\n ) {\n var location = normalizeLocation(raw, currentRoute, false, router);\n var name = location.name;\n\n if (name) {\n var record = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n warn(record, (\"Route with name '\" + name + \"' does not exist\"));\n }\n if (!record) { return _createRoute(null, location) }\n var paramNames = record.regex.keys\n .filter(function (key) { return !key.optional; })\n .map(function (key) { return key.name; });\n\n if (typeof location.params !== 'object') {\n location.params = {};\n }\n\n if (currentRoute && typeof currentRoute.params === 'object') {\n for (var key in currentRoute.params) {\n if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n location.params[key] = currentRoute.params[key];\n }\n }\n }\n\n if (record) {\n location.path = fillParams(record.path, location.params, (\"named route \\\"\" + name + \"\\\"\"));\n return _createRoute(record, location, redirectedFrom)\n }\n } else if (location.path) {\n location.params = {};\n for (var i = 0; i < pathList.length; i++) {\n var path = pathList[i];\n var record$1 = pathMap[path];\n if (matchRoute(record$1.regex, location.path, location.params)) {\n return _createRoute(record$1, location, redirectedFrom)\n }\n }\n }\n // no match\n return _createRoute(null, location)\n }\n\n function redirect (\n record,\n location\n ) {\n var originalRedirect = record.redirect;\n var redirect = typeof originalRedirect === 'function'\n ? originalRedirect(createRoute(record, location, null, router))\n : originalRedirect;\n\n if (typeof redirect === 'string') {\n redirect = { path: redirect };\n }\n\n if (!redirect || typeof redirect !== 'object') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false, (\"invalid redirect option: \" + (JSON.stringify(redirect)))\n );\n }\n return _createRoute(null, location)\n }\n\n var re = redirect;\n var name = re.name;\n var path = re.path;\n var query = location.query;\n var hash = location.hash;\n var params = location.params;\n query = re.hasOwnProperty('query') ? re.query : query;\n hash = re.hasOwnProperty('hash') ? re.hash : hash;\n params = re.hasOwnProperty('params') ? re.params : params;\n\n if (name) {\n // resolved named direct\n var targetRecord = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n assert(targetRecord, (\"redirect failed: named route \\\"\" + name + \"\\\" not found.\"));\n }\n return match({\n _normalized: true,\n name: name,\n query: query,\n hash: hash,\n params: params\n }, undefined, location)\n } else if (path) {\n // 1. resolve relative redirect\n var rawPath = resolveRecordPath(path, record);\n // 2. resolve params\n var resolvedPath = fillParams(rawPath, params, (\"redirect route with path \\\"\" + rawPath + \"\\\"\"));\n // 3. rematch with existing query and hash\n return match({\n _normalized: true,\n path: resolvedPath,\n query: query,\n hash: hash\n }, undefined, location)\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"invalid redirect option: \" + (JSON.stringify(redirect))));\n }\n return _createRoute(null, location)\n }\n }\n\n function alias (\n record,\n location,\n matchAs\n ) {\n var aliasedPath = fillParams(matchAs, location.params, (\"aliased route with path \\\"\" + matchAs + \"\\\"\"));\n var aliasedMatch = match({\n _normalized: true,\n path: aliasedPath\n });\n if (aliasedMatch) {\n var matched = aliasedMatch.matched;\n var aliasedRecord = matched[matched.length - 1];\n location.params = aliasedMatch.params;\n return _createRoute(aliasedRecord, location)\n }\n return _createRoute(null, location)\n }\n\n function _createRoute (\n record,\n location,\n redirectedFrom\n ) {\n if (record && record.redirect) {\n return redirect(record, redirectedFrom || location)\n }\n if (record && record.matchAs) {\n return alias(record, location, record.matchAs)\n }\n return createRoute(record, location, redirectedFrom, router)\n }\n\n return {\n match: match,\n addRoutes: addRoutes\n }\n}\n\nfunction matchRoute (\n regex,\n path,\n params\n) {\n var m = path.match(regex);\n\n if (!m) {\n return false\n } else if (!params) {\n return true\n }\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = regex.keys[i - 1];\n var val = typeof m[i] === 'string' ? decodeURIComponent(m[i]) : m[i];\n if (key) {\n params[key.name] = val;\n }\n }\n\n return true\n}\n\nfunction resolveRecordPath (path, record) {\n return resolvePath(path, record.parent ? record.parent.path : '/', true)\n}\n\n/* */\n\n\nvar positionStore = Object.create(null);\n\nfunction setupScroll () {\n // Fix for #1585 for Firefox\n window.history.replaceState({ key: getStateKey() }, '');\n window.addEventListener('popstate', function (e) {\n saveScrollPosition();\n if (e.state && e.state.key) {\n setStateKey(e.state.key);\n }\n });\n}\n\nfunction handleScroll (\n router,\n to,\n from,\n isPop\n) {\n if (!router.app) {\n return\n }\n\n var behavior = router.options.scrollBehavior;\n if (!behavior) {\n return\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof behavior === 'function', \"scrollBehavior must be a function\");\n }\n\n // wait until re-render finishes before scrolling\n router.app.$nextTick(function () {\n var position = getScrollPosition();\n var shouldScroll = behavior(to, from, isPop ? position : null);\n\n if (!shouldScroll) {\n return\n }\n\n if (typeof shouldScroll.then === 'function') {\n shouldScroll.then(function (shouldScroll) {\n scrollToPosition((shouldScroll), position);\n }).catch(function (err) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, err.toString());\n }\n });\n } else {\n scrollToPosition(shouldScroll, position);\n }\n });\n}\n\nfunction saveScrollPosition () {\n var key = getStateKey();\n if (key) {\n positionStore[key] = {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n }\n}\n\nfunction getScrollPosition () {\n var key = getStateKey();\n if (key) {\n return positionStore[key]\n }\n}\n\nfunction getElementPosition (el, offset) {\n var docEl = document.documentElement;\n var docRect = docEl.getBoundingClientRect();\n var elRect = el.getBoundingClientRect();\n return {\n x: elRect.left - docRect.left - offset.x,\n y: elRect.top - docRect.top - offset.y\n }\n}\n\nfunction isValidPosition (obj) {\n return isNumber(obj.x) || isNumber(obj.y)\n}\n\nfunction normalizePosition (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : window.pageXOffset,\n y: isNumber(obj.y) ? obj.y : window.pageYOffset\n }\n}\n\nfunction normalizeOffset (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : 0,\n y: isNumber(obj.y) ? obj.y : 0\n }\n}\n\nfunction isNumber (v) {\n return typeof v === 'number'\n}\n\nfunction scrollToPosition (shouldScroll, position) {\n var isObject = typeof shouldScroll === 'object';\n if (isObject && typeof shouldScroll.selector === 'string') {\n var el = document.querySelector(shouldScroll.selector);\n if (el) {\n var offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {};\n offset = normalizeOffset(offset);\n position = getElementPosition(el, offset);\n } else if (isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n } else if (isObject && isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n\n if (position) {\n window.scrollTo(position.x, position.y);\n }\n}\n\n/* */\n\nvar supportsPushState = inBrowser && (function () {\n var ua = window.navigator.userAgent;\n\n if (\n (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&\n ua.indexOf('Mobile Safari') !== -1 &&\n ua.indexOf('Chrome') === -1 &&\n ua.indexOf('Windows Phone') === -1\n ) {\n return false\n }\n\n return window.history && 'pushState' in window.history\n})();\n\n// use User Timing api (if present) for more accurate key precision\nvar Time = inBrowser && window.performance && window.performance.now\n ? window.performance\n : Date;\n\nvar _key = genKey();\n\nfunction genKey () {\n return Time.now().toFixed(3)\n}\n\nfunction getStateKey () {\n return _key\n}\n\nfunction setStateKey (key) {\n _key = key;\n}\n\nfunction pushState (url, replace) {\n saveScrollPosition();\n // try...catch the pushState call to get around Safari\n // DOM Exception 18 where it limits to 100 pushState calls\n var history = window.history;\n try {\n if (replace) {\n history.replaceState({ key: _key }, '', url);\n } else {\n _key = genKey();\n history.pushState({ key: _key }, '', url);\n }\n } catch (e) {\n window.location[replace ? 'replace' : 'assign'](url);\n }\n}\n\nfunction replaceState (url) {\n pushState(url, true);\n}\n\n/* */\n\nfunction runQueue (queue, fn, cb) {\n var step = function (index) {\n if (index >= queue.length) {\n cb();\n } else {\n if (queue[index]) {\n fn(queue[index], function () {\n step(index + 1);\n });\n } else {\n step(index + 1);\n }\n }\n };\n step(0);\n}\n\n/* */\n\nfunction resolveAsyncComponents (matched) {\n return function (to, from, next) {\n var hasAsync = false;\n var pending = 0;\n var error = null;\n\n flatMapComponents(matched, function (def, _, match, key) {\n // if it's a function and doesn't have cid attached,\n // assume it's an async component resolve function.\n // we are not using Vue's default async resolving mechanism because\n // we want to halt the navigation until the incoming component has been\n // resolved.\n if (typeof def === 'function' && def.cid === undefined) {\n hasAsync = true;\n pending++;\n\n var resolve = once(function (resolvedDef) {\n if (isESModule(resolvedDef)) {\n resolvedDef = resolvedDef.default;\n }\n // save resolved on async factory in case it's used elsewhere\n def.resolved = typeof resolvedDef === 'function'\n ? resolvedDef\n : _Vue.extend(resolvedDef);\n match.components[key] = resolvedDef;\n pending--;\n if (pending <= 0) {\n next();\n }\n });\n\n var reject = once(function (reason) {\n var msg = \"Failed to resolve async component \" + key + \": \" + reason;\n process.env.NODE_ENV !== 'production' && warn(false, msg);\n if (!error) {\n error = isError(reason)\n ? reason\n : new Error(msg);\n next(error);\n }\n });\n\n var res;\n try {\n res = def(resolve, reject);\n } catch (e) {\n reject(e);\n }\n if (res) {\n if (typeof res.then === 'function') {\n res.then(resolve, reject);\n } else {\n // new syntax in Vue 2.3\n var comp = res.component;\n if (comp && typeof comp.then === 'function') {\n comp.then(resolve, reject);\n }\n }\n }\n }\n });\n\n if (!hasAsync) { next(); }\n }\n}\n\nfunction flatMapComponents (\n matched,\n fn\n) {\n return flatten(matched.map(function (m) {\n return Object.keys(m.components).map(function (key) { return fn(\n m.components[key],\n m.instances[key],\n m, key\n ); })\n }))\n}\n\nfunction flatten (arr) {\n return Array.prototype.concat.apply([], arr)\n}\n\nvar hasSymbol =\n typeof Symbol === 'function' &&\n typeof Symbol.toStringTag === 'symbol';\n\nfunction isESModule (obj) {\n return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')\n}\n\n// in Webpack 2, require.ensure now also returns a Promise\n// so the resolve/reject functions may get called an extra time\n// if the user uses an arrow function shorthand that happens to\n// return that Promise.\nfunction once (fn) {\n var called = false;\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (called) { return }\n called = true;\n return fn.apply(this, args)\n }\n}\n\n/* */\n\nvar History = function History (router, base) {\n this.router = router;\n this.base = normalizeBase(base);\n // start with a route object that stands for \"nowhere\"\n this.current = START;\n this.pending = null;\n this.ready = false;\n this.readyCbs = [];\n this.readyErrorCbs = [];\n this.errorCbs = [];\n};\n\nHistory.prototype.listen = function listen (cb) {\n this.cb = cb;\n};\n\nHistory.prototype.onReady = function onReady (cb, errorCb) {\n if (this.ready) {\n cb();\n } else {\n this.readyCbs.push(cb);\n if (errorCb) {\n this.readyErrorCbs.push(errorCb);\n }\n }\n};\n\nHistory.prototype.onError = function onError (errorCb) {\n this.errorCbs.push(errorCb);\n};\n\nHistory.prototype.transitionTo = function transitionTo (location, onComplete, onAbort) {\n var this$1 = this;\n\n var route = this.router.match(location, this.current);\n this.confirmTransition(route, function () {\n this$1.updateRoute(route);\n onComplete && onComplete(route);\n this$1.ensureURL();\n\n // fire ready cbs once\n if (!this$1.ready) {\n this$1.ready = true;\n this$1.readyCbs.forEach(function (cb) { cb(route); });\n }\n }, function (err) {\n if (onAbort) {\n onAbort(err);\n }\n if (err && !this$1.ready) {\n this$1.ready = true;\n this$1.readyErrorCbs.forEach(function (cb) { cb(err); });\n }\n });\n};\n\nHistory.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {\n var this$1 = this;\n\n var current = this.current;\n var abort = function (err) {\n if (isError(err)) {\n if (this$1.errorCbs.length) {\n this$1.errorCbs.forEach(function (cb) { cb(err); });\n } else {\n warn(false, 'uncaught error during route navigation:');\n console.error(err);\n }\n }\n onAbort && onAbort(err);\n };\n if (\n isSameRoute(route, current) &&\n // in the case the route map has been dynamically appended to\n route.matched.length === current.matched.length\n ) {\n this.ensureURL();\n return abort()\n }\n\n var ref = resolveQueue(this.current.matched, route.matched);\n var updated = ref.updated;\n var deactivated = ref.deactivated;\n var activated = ref.activated;\n\n var queue = [].concat(\n // in-component leave guards\n extractLeaveGuards(deactivated),\n // global before hooks\n this.router.beforeHooks,\n // in-component update hooks\n extractUpdateHooks(updated),\n // in-config enter guards\n activated.map(function (m) { return m.beforeEnter; }),\n // async components\n resolveAsyncComponents(activated)\n );\n\n this.pending = route;\n var iterator = function (hook, next) {\n if (this$1.pending !== route) {\n return abort()\n }\n try {\n hook(route, current, function (to) {\n if (to === false || isError(to)) {\n // next(false) -> abort navigation, ensure current URL\n this$1.ensureURL(true);\n abort(to);\n } else if (\n typeof to === 'string' ||\n (typeof to === 'object' && (\n typeof to.path === 'string' ||\n typeof to.name === 'string'\n ))\n ) {\n // next('/') or next({ path: '/' }) -> redirect\n abort();\n if (typeof to === 'object' && to.replace) {\n this$1.replace(to);\n } else {\n this$1.push(to);\n }\n } else {\n // confirm transition and pass on the value\n next(to);\n }\n });\n } catch (e) {\n abort(e);\n }\n };\n\n runQueue(queue, iterator, function () {\n var postEnterCbs = [];\n var isValid = function () { return this$1.current === route; };\n // wait until async components are resolved before\n // extracting in-component enter guards\n var enterGuards = extractEnterGuards(activated, postEnterCbs, isValid);\n var queue = enterGuards.concat(this$1.router.resolveHooks);\n runQueue(queue, iterator, function () {\n if (this$1.pending !== route) {\n return abort()\n }\n this$1.pending = null;\n onComplete(route);\n if (this$1.router.app) {\n this$1.router.app.$nextTick(function () {\n postEnterCbs.forEach(function (cb) { cb(); });\n });\n }\n });\n });\n};\n\nHistory.prototype.updateRoute = function updateRoute (route) {\n var prev = this.current;\n this.current = route;\n this.cb && this.cb(route);\n this.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n};\n\nfunction normalizeBase (base) {\n if (!base) {\n if (inBrowser) {\n // respect <base> tag\n var baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^https?:\\/\\/[^\\/]+/, '');\n } else {\n base = '/';\n }\n }\n // make sure there's the starting slash\n if (base.charAt(0) !== '/') {\n base = '/' + base;\n }\n // remove trailing slash\n return base.replace(/\\/$/, '')\n}\n\nfunction resolveQueue (\n current,\n next\n) {\n var i;\n var max = Math.max(current.length, next.length);\n for (i = 0; i < max; i++) {\n if (current[i] !== next[i]) {\n break\n }\n }\n return {\n updated: next.slice(0, i),\n activated: next.slice(i),\n deactivated: current.slice(i)\n }\n}\n\nfunction extractGuards (\n records,\n name,\n bind,\n reverse\n) {\n var guards = flatMapComponents(records, function (def, instance, match, key) {\n var guard = extractGuard(def, name);\n if (guard) {\n return Array.isArray(guard)\n ? guard.map(function (guard) { return bind(guard, instance, match, key); })\n : bind(guard, instance, match, key)\n }\n });\n return flatten(reverse ? guards.reverse() : guards)\n}\n\nfunction extractGuard (\n def,\n key\n) {\n if (typeof def !== 'function') {\n // extend now so that global mixins are applied.\n def = _Vue.extend(def);\n }\n return def.options[key]\n}\n\nfunction extractLeaveGuards (deactivated) {\n return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)\n}\n\nfunction extractUpdateHooks (updated) {\n return extractGuards(updated, 'beforeRouteUpdate', bindGuard)\n}\n\nfunction bindGuard (guard, instance) {\n if (instance) {\n return function boundRouteGuard () {\n return guard.apply(instance, arguments)\n }\n }\n}\n\nfunction extractEnterGuards (\n activated,\n cbs,\n isValid\n) {\n return extractGuards(activated, 'beforeRouteEnter', function (guard, _, match, key) {\n return bindEnterGuard(guard, match, key, cbs, isValid)\n })\n}\n\nfunction bindEnterGuard (\n guard,\n match,\n key,\n cbs,\n isValid\n) {\n return function routeEnterGuard (to, from, next) {\n return guard(to, from, function (cb) {\n next(cb);\n if (typeof cb === 'function') {\n cbs.push(function () {\n // #750\n // if a router-view is wrapped with an out-in transition,\n // the instance may not have been registered at this time.\n // we will need to poll for registration until current route\n // is no longer valid.\n poll(cb, match.instances, key, isValid);\n });\n }\n })\n }\n}\n\nfunction poll (\n cb, // somehow flow cannot infer this is a function\n instances,\n key,\n isValid\n) {\n if (instances[key]) {\n cb(instances[key]);\n } else if (isValid()) {\n setTimeout(function () {\n poll(cb, instances, key, isValid);\n }, 16);\n }\n}\n\n/* */\n\n\nvar HTML5History = (function (History$$1) {\n function HTML5History (router, base) {\n var this$1 = this;\n\n History$$1.call(this, router, base);\n\n var expectScroll = router.options.scrollBehavior;\n\n if (expectScroll) {\n setupScroll();\n }\n\n var initLocation = getLocation(this.base);\n window.addEventListener('popstate', function (e) {\n var current = this$1.current;\n\n // Avoiding first `popstate` event dispatched in some browsers but first\n // history route not updated since async guard at the same time.\n var location = getLocation(this$1.base);\n if (this$1.current === START && location === initLocation) {\n return\n }\n\n this$1.transitionTo(location, function (route) {\n if (expectScroll) {\n handleScroll(router, route, current, true);\n }\n });\n });\n }\n\n if ( History$$1 ) HTML5History.__proto__ = History$$1;\n HTML5History.prototype = Object.create( History$$1 && History$$1.prototype );\n HTML5History.prototype.constructor = HTML5History;\n\n HTML5History.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HTML5History.prototype.push = function push (location, onComplete, onAbort) {\n var this$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushState(cleanPath(this$1.base + route.fullPath));\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceState(cleanPath(this$1.base + route.fullPath));\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.ensureURL = function ensureURL (push) {\n if (getLocation(this.base) !== this.current.fullPath) {\n var current = cleanPath(this.base + this.current.fullPath);\n push ? pushState(current) : replaceState(current);\n }\n };\n\n HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {\n return getLocation(this.base)\n };\n\n return HTML5History;\n}(History));\n\nfunction getLocation (base) {\n var path = window.location.pathname;\n if (base && path.indexOf(base) === 0) {\n path = path.slice(base.length);\n }\n return (path || '/') + window.location.search + window.location.hash\n}\n\n/* */\n\n\nvar HashHistory = (function (History$$1) {\n function HashHistory (router, base, fallback) {\n History$$1.call(this, router, base);\n // check history fallback deeplinking\n if (fallback && checkFallback(this.base)) {\n return\n }\n ensureSlash();\n }\n\n if ( History$$1 ) HashHistory.__proto__ = History$$1;\n HashHistory.prototype = Object.create( History$$1 && History$$1.prototype );\n HashHistory.prototype.constructor = HashHistory;\n\n // this is delayed until the app mounts\n // to avoid the hashchange listener being fired too early\n HashHistory.prototype.setupListeners = function setupListeners () {\n var this$1 = this;\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n setupScroll();\n }\n\n window.addEventListener(supportsPushState ? 'popstate' : 'hashchange', function () {\n var current = this$1.current;\n if (!ensureSlash()) {\n return\n }\n this$1.transitionTo(getHash(), function (route) {\n if (supportsScroll) {\n handleScroll(this$1.router, route, current, true);\n }\n if (!supportsPushState) {\n replaceHash(route.fullPath);\n }\n });\n });\n };\n\n HashHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushHash(route.fullPath);\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceHash(route.fullPath);\n handleScroll(this$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HashHistory.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HashHistory.prototype.ensureURL = function ensureURL (push) {\n var current = this.current.fullPath;\n if (getHash() !== current) {\n push ? pushHash(current) : replaceHash(current);\n }\n };\n\n HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n return getHash()\n };\n\n return HashHistory;\n}(History));\n\nfunction checkFallback (base) {\n var location = getLocation(base);\n if (!/^\\/#/.test(location)) {\n window.location.replace(\n cleanPath(base + '/#' + location)\n );\n return true\n }\n}\n\nfunction ensureSlash () {\n var path = getHash();\n if (path.charAt(0) === '/') {\n return true\n }\n replaceHash('/' + path);\n return false\n}\n\nfunction getHash () {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var index = href.indexOf('#');\n return index === -1 ? '' : href.slice(index + 1)\n}\n\nfunction getUrl (path) {\n var href = window.location.href;\n var i = href.indexOf('#');\n var base = i >= 0 ? href.slice(0, i) : href;\n return (base + \"#\" + path)\n}\n\nfunction pushHash (path) {\n if (supportsPushState) {\n pushState(getUrl(path));\n } else {\n window.location.hash = path;\n }\n}\n\nfunction replaceHash (path) {\n if (supportsPushState) {\n replaceState(getUrl(path));\n } else {\n window.location.replace(getUrl(path));\n }\n}\n\n/* */\n\n\nvar AbstractHistory = (function (History$$1) {\n function AbstractHistory (router, base) {\n History$$1.call(this, router, base);\n this.stack = [];\n this.index = -1;\n }\n\n if ( History$$1 ) AbstractHistory.__proto__ = History$$1;\n AbstractHistory.prototype = Object.create( History$$1 && History$$1.prototype );\n AbstractHistory.prototype.constructor = AbstractHistory;\n\n AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1 = this;\n\n this.transitionTo(location, function (route) {\n this$1.stack = this$1.stack.slice(0, this$1.index + 1).concat(route);\n this$1.index++;\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1 = this;\n\n this.transitionTo(location, function (route) {\n this$1.stack = this$1.stack.slice(0, this$1.index).concat(route);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n AbstractHistory.prototype.go = function go (n) {\n var this$1 = this;\n\n var targetIndex = this.index + n;\n if (targetIndex < 0 || targetIndex >= this.stack.length) {\n return\n }\n var route = this.stack[targetIndex];\n this.confirmTransition(route, function () {\n this$1.index = targetIndex;\n this$1.updateRoute(route);\n });\n };\n\n AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n var current = this.stack[this.stack.length - 1];\n return current ? current.fullPath : '/'\n };\n\n AbstractHistory.prototype.ensureURL = function ensureURL () {\n // noop\n };\n\n return AbstractHistory;\n}(History));\n\n/* */\n\nvar VueRouter = function VueRouter (options) {\n if ( options === void 0 ) options = {};\n\n this.app = null;\n this.apps = [];\n this.options = options;\n this.beforeHooks = [];\n this.resolveHooks = [];\n this.afterHooks = [];\n this.matcher = createMatcher(options.routes || [], this);\n\n var mode = options.mode || 'hash';\n this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false;\n if (this.fallback) {\n mode = 'hash';\n }\n if (!inBrowser) {\n mode = 'abstract';\n }\n this.mode = mode;\n\n switch (mode) {\n case 'history':\n this.history = new HTML5History(this, options.base);\n break\n case 'hash':\n this.history = new HashHistory(this, options.base, this.fallback);\n break\n case 'abstract':\n this.history = new AbstractHistory(this, options.base);\n break\n default:\n if (process.env.NODE_ENV !== 'production') {\n assert(false, (\"invalid mode: \" + mode));\n }\n }\n};\n\nvar prototypeAccessors = { currentRoute: { configurable: true } };\n\nVueRouter.prototype.match = function match (\n raw,\n current,\n redirectedFrom\n) {\n return this.matcher.match(raw, current, redirectedFrom)\n};\n\nprototypeAccessors.currentRoute.get = function () {\n return this.history && this.history.current\n};\n\nVueRouter.prototype.init = function init (app /* Vue component instance */) {\n var this$1 = this;\n\n process.env.NODE_ENV !== 'production' && assert(\n install.installed,\n \"not installed. Make sure to call `Vue.use(VueRouter)` \" +\n \"before creating root instance.\"\n );\n\n this.apps.push(app);\n\n // main app already initialized.\n if (this.app) {\n return\n }\n\n this.app = app;\n\n var history = this.history;\n\n if (history instanceof HTML5History) {\n history.transitionTo(history.getCurrentLocation());\n } else if (history instanceof HashHistory) {\n var setupHashListener = function () {\n history.setupListeners();\n };\n history.transitionTo(\n history.getCurrentLocation(),\n setupHashListener,\n setupHashListener\n );\n }\n\n history.listen(function (route) {\n this$1.apps.forEach(function (app) {\n app._route = route;\n });\n });\n};\n\nVueRouter.prototype.beforeEach = function beforeEach (fn) {\n return registerHook(this.beforeHooks, fn)\n};\n\nVueRouter.prototype.beforeResolve = function beforeResolve (fn) {\n return registerHook(this.resolveHooks, fn)\n};\n\nVueRouter.prototype.afterEach = function afterEach (fn) {\n return registerHook(this.afterHooks, fn)\n};\n\nVueRouter.prototype.onReady = function onReady (cb, errorCb) {\n this.history.onReady(cb, errorCb);\n};\n\nVueRouter.prototype.onError = function onError (errorCb) {\n this.history.onError(errorCb);\n};\n\nVueRouter.prototype.push = function push (location, onComplete, onAbort) {\n this.history.push(location, onComplete, onAbort);\n};\n\nVueRouter.prototype.replace = function replace (location, onComplete, onAbort) {\n this.history.replace(location, onComplete, onAbort);\n};\n\nVueRouter.prototype.go = function go (n) {\n this.history.go(n);\n};\n\nVueRouter.prototype.back = function back () {\n this.go(-1);\n};\n\nVueRouter.prototype.forward = function forward () {\n this.go(1);\n};\n\nVueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {\n var route = to\n ? to.matched\n ? to\n : this.resolve(to).route\n : this.currentRoute;\n if (!route) {\n return []\n }\n return [].concat.apply([], route.matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return m.components[key]\n })\n }))\n};\n\nVueRouter.prototype.resolve = function resolve (\n to,\n current,\n append\n) {\n var location = normalizeLocation(\n to,\n current || this.history.current,\n append,\n this\n );\n var route = this.match(location, current);\n var fullPath = route.redirectedFrom || route.fullPath;\n var base = this.history.base;\n var href = createHref(base, fullPath, this.mode);\n return {\n location: location,\n route: route,\n href: href,\n // for backwards compat\n normalizedTo: location,\n resolved: route\n }\n};\n\nVueRouter.prototype.addRoutes = function addRoutes (routes) {\n this.matcher.addRoutes(routes);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nObject.defineProperties( VueRouter.prototype, prototypeAccessors );\n\nfunction registerHook (list, fn) {\n list.push(fn);\n return function () {\n var i = list.indexOf(fn);\n if (i > -1) { list.splice(i, 1); }\n }\n}\n\nfunction createHref (base, fullPath, mode) {\n var path = mode === 'hash' ? '#' + fullPath : fullPath;\n return base ? cleanPath(base + '/' + path) : path\n}\n\nVueRouter.install = install;\nVueRouter.version = '3.0.1';\n\nif (inBrowser && window.Vue) {\n window.Vue.use(VueRouter);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (VueRouter);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6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GRlZmluZWQnKVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChpc2FycmF5KHZhbHVlKSkge1xuICAgICAgICBpZiAoIXRva2VuLnJlcGVhdCkge1xuICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0V4cGVjdGVkIFwiJyArIHRva2VuLm5hbWUgKyAnXCIgdG8gbm90IHJlcGVhdCwgYnV0IHJlY2VpdmVkIGAnICsgSlNPTi5zdHJpbmdpZnkodmFsdWUpICsgJ2AnKVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgIGlmICh0b2tlbi5vcHRpb25hbCkge1xuICAgICAgICAgICAgY29udGludWVcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignRXhwZWN0ZWQgXCInICsgdG9rZW4ubmFtZSArICdcIiB0byBub3QgYmUgZW1wdHknKVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdmFsdWUubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICBzZWdtZW50ID0gZW5jb2RlKHZhbHVlW2pdKTtcblxuICAgICAgICAgIGlmICghbWF0Y2hlc1tpXS50ZXN0KHNlZ21lbnQpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdFeHBlY3RlZCBhbGwgXCInICsgdG9rZW4ubmFtZSArICdcIiB0byBtYXRjaCBcIicgKyB0b2tlbi5wYXR0ZXJuICsgJ1wiLCBidXQgcmVjZWl2ZWQgYCcgKyBKU09OLnN0cmluZ2lmeShzZWdtZW50KSArICdgJylcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBwYXRoICs9IChqID09PSAwID8gdG9rZW4ucHJlZml4IDogdG9rZW4uZGVsaW1pdGVyKSArIHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICBjb250a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nZnVuY3Rpb24nXG4gICAgICAgICAgICA/IHJlc29sdmVkRGVmXG4gICAgICAgICAgICA6IF9WdWUuZXh0ZW5kKHJlc29sdmVkRGVmKTtcbiAgICAgICAgICBtYXRjaC5jb21wb25lbnRzW2tleV0gPSByZXNvbHZlZERlZjtcbiAgICAgICAgICBwZW5kaW5nLS07XG4gICAgICAgICAgaWYgKHBlbmRpbmcgPD0gMCkge1xuICAgICAgICAgICAgbmV4dCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdmFyIHJlamVjdCA9IG9uY2UoZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgIHZhciBtc2cgPSBcIkZhaWxlZCB0byByZXNvbHZlIGFzeW5jIGNvbXBvbmVudCBcIiArIGtleSArIFwiOiBcIiArIHJlYXNvbjtcbiAgICAgICAgICBwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nICYmIHdhcm4oZmFsc2UsIG1zZyk7XG4gICAgICAgICAgaWYgKCFlcnJvcikge1xuICAgICAgICAgICAgZXJyb3IgPSBpc0Vycm9yKHJlYXNvbilcbiAgICAgICAgICAgICAgPyByZWFzb25cbiAgICAgICAgICAgICAgOiBuZXcgRXJyb3IobXNnKTtcbiAgICAgICAgICAgIG5leHQoZXJyb3IpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdmFyIHJlcztcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXMgPSBkZWYocmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIHJlamVjdChlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiByZXMudGhlbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgcmVzLnRoZW4ocmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgICB9IGVs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vcnQoKVxuICAgIH1cbiAgICB0cnkge1xuICAgICAgaG9vayhyb3V0ZSwgY3VycmVudCwgZnVuY3Rpb24gKHRvKSB7XG4gICAgICAgIGlmICh0byA9PT0gZmFsc2UgfHwgaXNFcnJvcih0bykpIHtcbiAgICAgICAgICAvLyBuZXh0KGZhbHNlKSAtPiBhYm9ydCBuYXZpZ2F0aW9uLCBlbnN1cmUgY3VycmVudCBVUkxcbiAgICAgICAgICB0aGlzJDEuZW5zdXJlVVJMKHRydWUpO1xuICAgICAgICAgIGFib3J0KHRvKTtcbiAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICB0eXBlb2YgdG8gPT09ICdzdHJpbmcnIHx8XG4gICAgICAgICAgKHR5cGVvZiB0byA9PT0gJ29iamVjdCcgJiYgKFxuICAgICAgICAgICAgdHlwZW9mIHRvLnBhdGggPT09ICdzdHJpbmcnIHx8XG4gICAgICAgICAgICB0eXBlb2YgdG8ubmFtZSA9PT0gJ3N0cmluZydcbiAgICAgICAgICApKVxuICAgICAgICApIHtcbiAgICAgICAgICAvLyBuZXh0KCcvJykgb3IgbmV4dCh7IHBhdGg6ICcvJyB9KSAtPiByZWRpcmVjdFxuICAgICAgICAgIGFib3J0KCk7XG4gICAgICAgICAgaWYgKHR5cGVvZiB0byA9PT0gJ29iamVjdCcgJiYgdG8ucmVwbGFjZSkge1xuICAgICAgICAgICAgdGhpcyQxLnJlcGxhY2UodG8pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzJDEucHVzaCh0byk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIGNvbmZpcm0gdHJhbnNpdGlvbiBhbmQgcGFzcyBvbiB0aGUgdmFsdWVcbiAgICAgICAgICBuZXh0KHRvKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgYWJvcnQoZSk7XG4gICAgfVxuICB9O1xuXG4gIHJ1bl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uZXhwb3J0IGRlZmF1bHQgVnVlUm91dGVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvdnVlLXJvdXRlci9kaXN0L3Z1ZS1yb3V0ZXIuZXNtLmpzXG4vLyBtb2R1bGUgaWQgPSAzMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///30\n");
|
||
|
||
/***/ }),
|
||
/* 31 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Users_vue__ = __webpack_require__(9);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_68be103e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Users_vue__ = __webpack_require__(65);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Users_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_68be103e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Users_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/views/Users.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-68be103e\", Component.options)\n } else {\n hotAPI.reload(\"data-v-68be103e\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvdmlld3MvVXNlcnMudnVlP2MyZDgiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUN3SztBQUN4SztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsWUFBaUI7QUFDakI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNILENBQUM7O0FBRUQiLCJmaWxlIjoiMzEuanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZGlzcG9zZWQgPSBmYWxzZVxudmFyIG5vcm1hbGl6ZUNvbXBvbmVudCA9IHJlcXVpcmUoXCIhLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2NvbXBvbmVudC1ub3JtYWxpemVyXCIpXG4vKiBzY3JpcHQgKi9cbmV4cG9ydCAqIGZyb20gXCIhIWJhYmVsLWxvYWRlciEuLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3I/dHlwZT1zY3JpcHQmaW5kZXg9MCEuL1VzZXJzLnZ1ZVw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R1bGVfaWRlbnRpZmllcl9fXG4pXG5Db21wb25lbnQub3B0aW9ucy5fX2ZpbGUgPSBcInNyYy92aWV3cy9Vc2Vycy52dWVcIlxuXG4vKiBob3QgcmVsb2FkICovXG5pZiAobW9kdWxlLmhvdCkgeyhmdW5jdGlvbiAoKSB7XG4gIHZhciBob3RBUEkgPSByZXF1aXJlKFwidnVlLWhvdC1yZWxvYWQtYXBpXCIpXG4gIGhvdEFQSS5pbnN0YWxsKHJlcXVpcmUoXCJ2dWVcIiksIGZhbHNlKVxuICBpZiAoIWhvdEFQSS5jb21wYXRpYmxlKSByZXR1cm5cbiAgbW9kdWxlLmhvdC5hY2NlcHQoKVxuICBpZiAoIW1vZHVsZS5ob3QuZGF0YSkge1xuICAgIGhvdEFQSS5jcmVhdGVSZWNvcmQoXCJkYXRhLXYtNjhiZTEwM2VcIiwgQ29tcG9uZW50Lm9wdGlvbnMpXG4gIH0gZWxzZSB7XG4gICAgaG90QVBJLnJlbG9hZChcImRhdGEtdi02OGJlMTAzZVwiLCBDb21wb25lbnQub3B0aW9ucylcbiAgfVxuICBtb2R1bGUuaG90LmRpc3Bvc2UoZnVuY3Rpb24gKGRhdGEpIHtcbiAgICBkaXNwb3NlZCA9IHRydWVcbiAgfSlcbn0pKCl9XG5cbmV4cG9ydCBkZWZhdWx0IENvbXBvbmVudC5leHBvcnRzXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NyYy92aWV3cy9Vc2Vycy52dWVcbi8vIG1vZHVsZSBpZCA9IDMxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///31\n");
|
||
|
||
/***/ }),
|
||
/* 32 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_appNavigation_vue__ = __webpack_require__(10);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_142c1cb5_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_appNavigation_vue__ = __webpack_require__(38);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_appNavigation_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_142c1cb5_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_appNavigation_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/appNavigation.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-142c1cb5\", Component.options)\n } else {\n hotAPI.reload(\"data-v-142c1cb5\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9hcHBOYXZpZ2F0aW9uLnZ1ZT82Y2NlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3M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UpIHJldHVyblxuICBtb2R1bGUuaG90LmFjY2VwdCgpXG4gIGlmICghbW9kdWxlLmhvdC5kYXRhKSB7XG4gICAgaG90QVBJLmNyZWF0ZVJlY29yZChcImRhdGEtdi0xNDJjMWNiNVwiLCBDb21wb25lbnQub3B0aW9ucylcbiAgfSBlbHNlIHtcbiAgICBob3RBUEkucmVsb2FkKFwiZGF0YS12LTE0MmMxY2I1XCIsIENvbXBvbmVudC5vcHRpb25zKVxuICB9XG4gIG1vZHVsZS5ob3QuZGlzcG9zZShmdW5jdGlvbiAoZGF0YSkge1xuICAgIGRpc3Bvc2VkID0gdHJ1ZVxuICB9KVxufSkoKX1cblxuZXhwb3J0IGRlZmF1bHQgQ29tcG9uZW50LmV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2NvbXBvbmVudHMvYXBwTmF2aWdhdGlvbi52dWVcbi8vIG1vZHVsZSBpZCA9IDMyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///32\n");
|
||
|
||
/***/ }),
|
||
/* 33 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_navigationItem_vue__ = __webpack_require__(11);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2cb61dde_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_navigationItem_vue__ = __webpack_require__(37);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_navigationItem_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2cb61dde_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_navigationItem_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/appNavigation/navigationItem.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-2cb61dde\", Component.options)\n } else {\n hotAPI.reload(\"data-v-2cb61dde\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9hcHBOYXZpZ2F0aW9uL25hdmlnYXRpb25JdGVtLnZ1ZT8yM2VlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDMks7QUFDM0s7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLFlBQWlCO0FBQ2pCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBO0F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bmVudC5vcHRpb25zKVxuICB9XG4gIG1vZHVsZS5ob3QuZGlzcG9zZShmdW5jdGlvbiAoZGF0YSkge1xuICAgIGRpc3Bvc2VkID0gdHJ1ZVxuICB9KVxufSkoKX1cblxuZXhwb3J0IGRlZmF1bHQgQ29tcG9uZW50LmV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2NvbXBvbmVudHMvYXBwTmF2aWdhdGlvbi9uYXZpZ2F0aW9uSXRlbS52dWVcbi8vIG1vZHVsZSBpZCA9IDMzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///33\n");
|
||
|
||
/***/ }),
|
||
/* 34 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_popoverItem_vue__ = __webpack_require__(14);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c6af9e6_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_popoverItem_vue__ = __webpack_require__(35);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_popoverItem_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c6af9e6_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_popoverItem_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/popoverMenu/popoverItem.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-4c6af9e6\", Component.options)\n } else {\n hotAPI.reload(\"data-v-4c6af9e6\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9wb3BvdmVyTWVudS9wb3BvdmVySXRlbS52dWU/M2MwNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQzJLO0FBQzNLO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxZQUFpQjtBQUNqQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0gsQ0FBQzs7QUFFRCIsImZpbGUiOiIzNC5qcyIsInNvdXJjZXNDb250ZW50IjpbInZhciBkaXNwb3NlZCA9IGZhbHNlXG52YXIgbm9ybWFsaXplQ29tcG9uZW50ID0gcmVxdWlyZShcIiEuLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saW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Y29tcG9uZW50cy9wb3BvdmVyTWVudS9wb3BvdmVySXRlbS52dWVcbi8vIG1vZHVsZSBpZCA9IDM0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///34\n");
|
||
|
||
/***/ }),
|
||
/* 35 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"li\", [\n _vm.item.href\n ? _c(\n \"a\",\n {\n attrs: { href: _vm.item.href ? _vm.item.href : \"#\" },\n on: { click: _vm.item.action }\n },\n [\n _c(\"span\", { class: _vm.item.icon }),\n _vm._v(\" \"),\n _c(\"span\", [_vm._v(_vm._s(_vm.item.text))])\n ]\n )\n : _c(\"button\", { on: { click: _vm.item.action } }, [\n _c(\"span\", { class: _vm.item.icon }),\n _vm._v(\" \"),\n _c(\"span\", [_vm._v(_vm._s(_vm.item.text))])\n ])\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-4c6af9e6\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9wb3BvdmVyTWVudS9wb3BvdmVySXRlbS52dWU/MTVmYyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBb0IsNENBQTRDO0FBQ2hFLGlCQUFpQjtBQUNqQixXQUFXO0FBQ1g7QUFDQSx3QkFBd0IsdUJ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wiKSxcbiAgICAgICAgICBfYyhcInNwYW5cIiwgW192bS5fdihfdm0uX3MoX3ZtLml0ZW0udGV4dCkpXSlcbiAgICAgICAgXSlcbiAgXSlcbn1cbnZhciBzdGF0aWNSZW5kZXJGbnMgPSBbXVxucmVuZGVyLl93aXRoU3RyaXBwZWQgPSB0cnVlXG52YXIgZXNFeHBvcnRzID0geyByZW5kZXI6IHJlbmRlciwgc3RhdGljUmVuZGVyRm5zOiBzdGF0aWNSZW5kZXJGbnMgfVxuZXhwb3J0IGRlZmF1bHQgZXNFeHBvcnRzXG5pZiAobW9kdWxlLmhvdCkge1xuICBtb2R1bGUuaG90LmFjY2VwdCgpXG4gIGlmIChtb2R1bGUuaG90LmRhdGEpIHtcbiAgICByZXF1aXJlKFwidnVlLWhvdC1yZWxvYWQtYXBpXCIpICAgICAgLnJlcmVuZGVyKFwiZGF0YS12LTRjNmFmOWU2XCIsIGVzRXhwb3J0cylcbiAgfVxufVxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3RlbXBsYXRlLWNvbXBpbGVyP3tcImlkXCI6XCJkYXRhLXYtNGM2YWY5ZTZcIixcImhhc1Njb3BlZFwiOmZhbHNlLFwiYnVibGVcIjp7XCJ0cmFuc2Zvcm1zXCI6e319fSEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXRlbXBsYXRlJmluZGV4PTAhLi9zcmMvY29tcG9uZW50cy9wb3BvdmVyTWVudS9wb3BvdmVySXRlbS52dWVcbi8vIG1vZHVsZSBpZCA9IDM1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///35\n");
|
||
|
||
/***/ }),
|
||
/* 36 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"ul\",\n _vm._l(_vm.menu, function(item, key) {\n return _c(\"popover-item\", { key: key, attrs: { item: item } })\n })\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-04ea21c4\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9wb3BvdmVyTWVudS52dWU/ZTJhYiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlDQUFpQyxtQkFBbUIsYUFBYSxFQUFFO0FBQ25FLEtBQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlCQUFpQjtBQUNqQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiIzNi5qcyIsInNvdXJjZXNDb250ZW50IjpbInZhciByZW5kZXIgPSBmdW5jdGlvbigpIHtcbiAgdmFyIF92bSA9IHRoaXNcbiAgdmFyIF9oID0gX3ZtLiRjcmVhdGVFbGVtZW50XG4gIHZhciBfYyA9IF92bS5fc2VsZi5fYyB8fCBfaFxuICByZXR1cm4gX2MoXG4gICAgXCJ1bFwiLFxuICAgIF92bS5fbChfdm0ubWVudSwgZnVuY3Rpb24oaXRlbSwga2V5KSB7XG4gICAgICByZXR1cm4gX2MoXCJwb3BvdmVyLWl0ZW1cIiwgeyBrZXk6IGtleSwgYXR0cnM6IHsgaXRlbTogaXRlbSB9IH0pXG4gICAgfSlcbiAgKVxufVxudmFyIHN0YXRpY1JlbmRlckZucyA9IFtdXG5yZW5kZXIuX3dpdGhTdHJpcHBlZCA9IHRydWVcbnZhciBlc0V4cG9ydHMgPSB7IHJlbmRlcjogcmVuZGVyLCBzdGF0aWNSZW5kZXJGbnM6IHN0YXRpY1JlbmRlckZucyB9XG5leHBvcnQgZGVmYXVsdCBlc0V4cG9ydHNcbmlmIChtb2R1bGUuaG90KSB7XG4gIG1vZHVsZS5ob3QuYWNjZXB0KClcbiAgaWYgKG1vZHVsZS5ob3QuZGF0YSkge1xuICAgIHJlcXVpcmUoXCJ2dWUtaG90LXJlbG9hZC1hcGlcIikgICAgICAucmVyZW5kZXIoXCJkYXRhLXYtMDRlYTIxYzRcIiwgZXNFeHBvcnRzKVxuICB9XG59XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvdGVtcGxhdGUtY29tcGlsZXI/e1wiaWRcIjpcImRhdGEtdi0wNGVhMjFjNFwiLFwiaGFzU2NvcGVkXCI6ZmFsc2UsXCJidWJsZVwiOntcInRyYW5zZm9ybXNcIjp7fX19IS4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9dGVtcGxhdGUmaW5kZXg9MCEuL3NyYy9jb21wb25lbnRzL3BvcG92ZXJNZW51LnZ1ZVxuLy8gbW9kdWxlIGlkID0gMzZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///36\n");
|
||
|
||
/***/ }),
|
||
/* 37 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"li\",\n {\n class: [\n {\n \"icon-loading-small\": _vm.item.loading,\n open: _vm.item.opened,\n collapsible:\n _vm.item.collapsible &&\n _vm.item.children &&\n _vm.item.children.length > 0\n },\n _vm.item.classes\n ],\n attrs: { id: _vm.item.id }\n },\n [\n _vm.item.bullet\n ? _c(\"div\", {\n staticClass: \"app-navigation-entry-bullet\",\n style: { backgroundColor: _vm.item.bullet }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.item.href\n ? _c(\n \"a\",\n {\n class: _vm.item.icon,\n attrs: { href: _vm.item.href ? _vm.item.href : \"#\" },\n on: { click: _vm.toggleCollapse }\n },\n [\n _vm.item.iconUrl\n ? _c(\"img\", {\n attrs: { alt: _vm.item.text, src: _vm.item.iconUrl }\n })\n : _vm._e(),\n _vm._v(\"\\n\\t\\t\" + _vm._s(_vm.item.text) + \"\\n\\t\")\n ]\n )\n : _vm.item.router\n ? _c(\n \"router-link\",\n { class: _vm.item.icon, attrs: { to: _vm.item.router } },\n [\n _vm.item.iconUrl\n ? _c(\"img\", {\n attrs: { alt: _vm.item.text, src: _vm.item.iconUrl }\n })\n : _vm._e(),\n _vm._v(\"\\n\\t\\t\" + _vm._s(_vm.item.text) + \"\\n\\t\")\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.item.utils\n ? _c(\"div\", { staticClass: \"app-navigation-entry-utils\" }, [\n _c(\n \"ul\",\n [\n Number.isInteger(_vm.item.utils.counter)\n ? _c(\n \"li\",\n { staticClass: \"app-navigation-entry-utils-counter\" },\n [_vm._v(_vm._s(_vm.item.utils.counter))]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.item.utils.actions &&\n _vm.item.utils.actions.length === 1 &&\n Number.isInteger(_vm.item.utils.counter)\n ? _c(\n \"li\",\n { staticClass: \"app-navigation-entry-utils-menu-button\" },\n [\n _c(\"button\", {\n class: _vm.item.utils.actions[0].icon,\n attrs: { title: _vm.item.utils.actions[0].text },\n on: { click: _vm.item.utils.actions[0].action }\n })\n ]\n )\n : _vm.item.utils.actions &&\n _vm.item.utils.actions.length === 2 &&\n !Number.isInteger(_vm.item.utils.counter)\n ? _vm._l(_vm.item.utils.actions, function(action) {\n return _c(\n \"li\",\n {\n key: action.action,\n staticClass:\n \"app-navigation-entry-utils-menu-button\"\n },\n [\n _c(\"button\", {\n class: action.icon,\n attrs: { title: action.text },\n on: { click: action.action }\n })\n ]\n )\n })\n : _vm.item.utils.actions &&\n _vm.item.utils.actions.length > 1 &&\n (Number.isInteger(_vm.item.utils.counter) ||\n _vm.item.utils.actions.length > 2)\n ? _c(\n \"li\",\n {\n staticClass:\n \"app-navigation-entry-utils-menu-button\"\n },\n [\n _c(\"button\", {\n directives: [\n {\n name: \"click-outside\",\n rawName: \"v-click-outside\",\n value: _vm.hideMenu,\n expression: \"hideMenu\"\n }\n ],\n on: { click: _vm.showMenu }\n })\n ]\n )\n : _vm._e()\n ],\n 2\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.item.utils &&\n _vm.item.utils.actions &&\n _vm.item.utils.actions.length > 1 &&\n (Number.isInteger(_vm.item.utils.counter) ||\n _vm.item.utils.actions.length > 2)\n ? _c(\n \"div\",\n {\n staticClass: \"app-navigation-entry-menu\",\n class: { open: _vm.openedMenu }\n },\n [_c(\"popover-menu\", { attrs: { menu: _vm.item.utils.actions } })],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.item.undo\n ? _c(\"div\", { staticClass: \"app-navigation-entry-deleted\" }, [\n _c(\n \"div\",\n { staticClass: \"app-navigation-entry-deleted-description\" },\n [_vm._v(_vm._s(_vm.item.undo.text))]\n ),\n _vm._v(\" \"),\n _c(\"button\", {\n staticClass: \"app-navigation-entry-deleted-button icon-history\",\n attrs: { title: _vm.t(\"settings\", \"Undo\") }\n })\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.item.edit\n ? _c(\"div\", { staticClass: \"app-navigation-entry-edit\" }, [\n _c(\"form\", [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.item.text,\n expression: \"item.text\"\n }\n ],\n attrs: { type: \"text\" },\n domProps: { value: _vm.item.text },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.$set(_vm.item, \"text\", $event.target.value)\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"icon-confirm\",\n attrs: { type: \"submit\", value: \"\" }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"icon-close\",\n attrs: { type: \"submit\", value: \"\" },\n on: {\n click: function($event) {\n $event.stopPropagation()\n $event.preventDefault()\n return _vm.cancelEdit($event)\n }\n }\n })\n ])\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.item.children\n ? _c(\n \"ul\",\n _vm._l(_vm.item.children, function(item, key) {\n return _c(\"navigation-item\", { key: key, attrs: { item: item } })\n })\n )\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-2cb61dde\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9hcHBOYXZpZ2F0aW9uL25hdmlnYXRpb25JdGVtLnZ1ZT9jNTU0Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsY0FBYztBQUNkLEtBQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFvQjtBQUNwQixXQUFXO0FBQ1g7QUFDQTtBQUNBO0FBQ0E7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JlZiA/IF92bS5pdGVtLmhyZWYgOiBcIiNcIiB9LFxuICAgICAgICAgICAgICBvbjogeyBjbGljazogX3ZtLnRvZ2dsZUNvbGxhcHNlIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIF92bS5pdGVtLmljb25VcmxcbiAgICAgICAgICAgICAgICA/IF9jKFwiaW1nXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgYWx0OiBfdm0uaXRlbS50ZXh0LCBzcmM6IF92bS5pdGVtLmljb25VcmwgfVxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICAgICAgICBfdm0uX3YoXCJcXG5cXHRcXHRcIiArIF92bS5fcyhfdm0uaXRlbS50ZXh0KSArIFwiXFxuXFx0XCIpXG4gICAgICAgICAgICBdXG4gICAgICAgICAgKVxuICAgICAgICA6IF92bS5pdGVtLnJvdXRlclxuICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgIFwicm91dGVyLWxpbmtcIixcbiAgICAgICAgICAgICAgeyBjbGFzczogX3ZtLml0ZW0uaWNvbiwgYXR0cnM6IHsgdG86IF92bS5pdGVtLnJvdXRlciB9IH0sXG4gICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICBfdm0uaXRlbS5pY29uVXJsXG4gICAgICAgICAgICAgICAgICA/IF9jKFwiaW1nXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBhbHQ6IF92bS5pdGVtLnRleHQsIHNyYzogX3ZtLml0ZW0uaWNvblVybCB9XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICAgICAgICAgIF92bS5fdihcIlxcblxcdFxcdFwiICsgX3ZtLl9zKF92bS5pdGVtLnRleHQpICsgXCJcXG5cXHRcIilcbiAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgKVxuICAgICAgICAgIDogX3ZtLl9lKCksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX3ZtLml0ZW0udXRpbHNcbiAgICAgICAgPyBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcImFwcC1uYXZpZ2F0aW9uLWVudHJ5LXV0aWxzXCIgfSwgW1xuICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgIFwidWxcIixcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIE51bWJlci5pc0ludGVnZXIoX3ZtLml0ZW0udXRpbHMuY291bnRlcilcbiAgICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgICAgXCJsaVwiLFxuICAgICAgICAgICAgICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwiYXBwLW5hdmlnYXRpb24tZW50cnktdXRpbHMtY291bnRlclwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgW192bS5fdihfdm0uX3MoX3ZtLml0ZW0udXRpbHMuY291bnRlcikpXVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgX3ZtLml0ZW0udXRpbHMuYWN0aW9ucyAmJlxuICAgICAgICAgICAgICAgIF92bS5pdGVtLnV0aWxzLmFjdGlvbnMubGVuZ3RoID09PSAxICYmXG4gICAgICAgICAgICAgICAgTnVtYmVyLmlzSW50ZWdlcihfdm0uaXRlbS51dGlscy5jb3VudGVyKVxuICAgICAgICAgICAgICAgICAgPyBfYyhcbiAgICAgICAgICAgICAgICAgICAgICBcImxpXCIsXG4gICAgICAgICAgICAgICAgICAgICAgeyBzdGF0aWNDbGFzczogXCJhcHAtbmF2aWdhdGlvbi1lbnRyeS11dGlscy1tZW51LWJ1dHRvblwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJidXR0b25cIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogX3ZtLml0ZW0udXRpbHMuYWN0aW9uc1swXS5pY29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyB0aXRsZTogX3ZtLml0ZW0udXRpbHMuYWN0aW9uc1swXS50ZXh0IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uOiB7IGNsaWNrOiBfdm0uaXRlbS51dGlscy5hY3Rpb25zWzBdLmFjdGlvbiB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgOiBfdm0uaXRlbS51dGlscy5hY3Rpb25zICYmXG4gICAgICAgICAgICAgICAgICAgIF92bS5pdGVtLnV0aWxzLmFjdGlvbnMubGVuZ3RoID09PSAyICYmXG4gICAgICAgICAgICAgICAgICAgICFOdW1iZXIuaXNJbnRlZ2VyKF92bS5pdGVtLnV0aWxzLmNvdW50ZXIpXG4gICAgICAgICAgICAgICAgICAgID8gX3ZtLl9sKF92bS5pdGVtLnV0aWxzLmFjdGlvbnMsIGZ1bmN0aW9uKGFjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICBcImxpXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGFjdGlvbi5hY3Rpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImFwcC1uYXZpZ2F0aW9uLWVudHJ5LXV0aWxzLW1lbnUtYnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFwiYnV0dG9uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBhY3Rpb24uaWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IHRpdGxlOiBhY3Rpb24udGV4dCB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb246IHsgY2xpY2s6IGFjdGlvbi5hY3Rpb24gfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICA6IF92bS5pdGVtLnV0aWxzLmFjdGlvbnMgJiZcbiAgICAgICAgICAgICAgICAgICAgICBfdm0uaXRlbS51dGlscy5hY3Rpb25zLmxlbmd0aCA+IDEgJiZcbiAgICAgICAgICAgICAgICAgICAgICAoTnVtYmVyLmlzSW50ZWdlcihfdm0uaXRlbS51dGlscy5jb3VudGVyKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLml0ZW0udXRpbHMuYWN0aW9ucy5sZW5ndGggPiAyKVxuICAgICAgICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFwibGlcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJhcHAtbmF2aWdhdGlvbi1lbnRyeS11dGlscy1tZW51LWJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcImNsaWNrLW91dHNpZGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtY2xpY2stb3V0c2lkZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uaGlkZU1lbnUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJoaWRlTWVudVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbjogeyBjbGljazogX3ZtLnNob3dNZW51IH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgOiBfdm0uX2UoKVxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAyXG4gICAgICAgICAgICApXG4gICAgICAgICAgXSlcbiAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfdm0uaXRlbS51dGlscyAmJlxuICAgICAgX3ZtLml0ZW0udXRpbHMuYWN0aW9ucyAmJlxuICAgICAgX3ZtLml0ZW0udXRpbHMuYWN0aW9ucy5sZW5ndGggPiAxICYmXG4gICAgICAoTnVtYmVyLmlzSW50ZWdlcihfdm0uaXRlbS51dGlscy5jb3VudGVyKSB8fFxuICAgICAgICBfdm0uaXRlbS51dGlscy5hY3Rpb25zLmxlbmd0aCA+IDIpXG4gICAgICAgID8gX2MoXG4gICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJhcHAtbmF2aWdhdGlvbi1lbnRyeS1tZW51XCIsXG4gICAgICAgICAgICAgIGNsYXNzOiB7IG9wZW46IF92bS5vcGVuZWRNZW51IH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBbX2MoXCJwb3BvdmVyLW1lbnVcIiwgeyBhdHRyczogeyBtZW51OiBfdm0uaXRlbS51dGlscy5hY3Rpb25zIH0gfSldLFxuICAgICAgICAgICAgMVxuICAgICAgICAgIClcbiAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfdm0uaXRlbS51bmRvXG4gICAgICAgID8gX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJhcHAtbmF2aWdhdGlvbi1lbnRyeS1kZWxldGVkXCIgfSwgW1xuICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwiYXBwLW5hdmlnYXRpb24tZW50cnktZGVsZXRlZC1kZXNjcmlwdGlvblwiIH0sXG4gICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS5pdGVtLnVuZG8udGV4dCkpXVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICBfYyhcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImFwcC1uYXZpZ2F0aW9uLWVudHJ5LWRlbGV0ZWQtYnV0dG9uIGljb24taGlzdG9yeVwiLFxuICAgICAgICAgICAgICBhdHRyczogeyB0aXRsZTogX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIlVuZG9cIikgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICBdKVxuICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgIF92bS5pdGVtLmVkaXRcbiAgICAgICAgPyBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcImFwcC1uYXZpZ2F0aW9uLWVudHJ5LWVkaXRcIiB9LCBbXG4gICAgICAgICAgICBfYyhcImZvcm1cIiwgW1xuICAgICAgICAgICAgICBfYyhcImlucHV0XCIsIHtcbiAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwibW9kZWxcIixcbiAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uaXRlbS50ZXh0LFxuICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcIml0ZW0udGV4dFwiXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICBhdHRyczogeyB0eXBlOiBcInRleHRcIiB9LFxuICAgICAgICAgICAgICAgIGRvbVByb3BzOiB7IHZhbHVlOiBfdm0uaXRlbS50ZXh0IH0sXG4gICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgIGlucHV0OiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCRldmVudC50YXJnZXQuY29tcG9zaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgX3ZtLiRzZXQoX3ZtLml0ZW0sIFwidGV4dFwiLCAkZXZlbnQudGFyZ2V0LnZhbHVlKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgIF9jKFwiaW5wdXRcIiwge1xuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImljb24tY29uZmlybVwiLFxuICAgICAgICAgICAgICAgIGF0dHJzOiB7IHR5cGU6IFwic3VibWl0XCIsIHZhbHVlOiBcIlwiIH1cbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgIF9jKFwiaW5wdXRcIiwge1xuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImljb24tY2xvc2VcIixcbiAgICAgICAgICAgICAgICBhdHRyczogeyB0eXBlOiBcInN1Ym1pdFwiLCB2YWx1ZTogXCJcIiB9LFxuICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICRldmVudC5zdG9wUHJvcGFnYXRpb24oKVxuICAgICAgICAgICAgICAgICAgICAkZXZlbnQucHJldmVudERlZmF1bHQoKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3ZtLmNhbmNlbEVkaXQoJGV2ZW50KVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIF0pXG4gICAgICAgICAgXSlcbiAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfdm0uaXRlbS5jaGlsZHJlblxuICAgICAgICA/IF9jKFxuICAgICAgICAgICAgXCJ1bFwiLFxuICAgICAgICAgICAgX3ZtLl9sKF92bS5pdGVtLmNoaWxkcmVuLCBmdW5jdGlvbihpdGVtLCBrZXkpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIF9jKFwibmF2aWdhdGlvbi1pdGVtXCIsIHsga2V5OiBrZXksIGF0dHJzOiB7IGl0ZW06IGl0ZW0gfSB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICApXG4gICAgICAgIDogX3ZtLl9lKClcbiAgICBdLFxuICAgIDFcbiAgKVxufVxudmFyIHN0YXRpY1JlbmRlckZucyA9IFtdXG5yZW5kZXIuX3dpdGhTdHJpcHBlZCA9IHRydWVcbnZhciBlc0V4cG9ydHMgPSB7IHJlbmRlcjogcmVuZGVyLCBzdGF0aWNSZW5kZXJGbnM6IHN0YXRpY1JlbmRlckZucyB9XG5leHBvcnQgZGVmYXVsdCBlc0V4cG9ydHNcbmlmIChtb2R1bGUuaG90KSB7XG4gIG1vZHVsZS5ob3QuYWNjZXB0KClcbiAgaWYgKG1vZHVsZS5ob3QuZGF0YSkge1xuICAgIHJlcXVpcmUoXCJ2dWUtaG90LXJlbG9hZC1hcGlcIikgICAgICAucmVyZW5kZXIoXCJkYXRhLXYtMmNiNjFkZGVcIiwgZXNFeHBvcnRzKVxuICB9XG59XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvdGVtcGxhdGUtY29tcGlsZXI/e1wiaWRcIjpcImRhdGEtdi0yY2I2MWRkZVwiLFwiaGFzU2NvcGVkXCI6ZmFsc2UsXCJidWJsZVwiOntcInRyYW5zZm9ybXNcIjp7fX19IS4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9dGVtcGxhdGUmaW5kZXg9MCEuL3NyYy9jb21wb25lbnRzL2FwcE5hdmlnYXRpb24vbmF2aWdhdGlvbkl0ZW0udnVlXG4vLyBtb2R1bGUgaWQgPSAzN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///37\n");
|
||
|
||
/***/ }),
|
||
/* 38 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n class: { \"icon-loading\": _vm.menu.loading },\n attrs: { id: \"app-navigation\" }\n },\n [\n _vm.menu.new\n ? _c(\"div\", { staticClass: \"app-navigation-new\" }, [\n _c(\n \"button\",\n {\n class: _vm.menu.new.icon,\n attrs: { type: \"button\", id: _vm.menu.new.id },\n on: { click: _vm.menu.new.action }\n },\n [_vm._v(_vm._s(_vm.menu.new.text))]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"ul\",\n { attrs: { id: _vm.menu.id } },\n _vm._l(_vm.menu.items, function(item, key) {\n return _c(\"navigation-item\", { key: key, attrs: { item: item } })\n })\n ),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"app-settings\" } }, [\n _c(\"div\", { attrs: { id: \"app-settings-header\" } }, [\n _c(\n \"button\",\n {\n staticClass: \"settings-button\",\n attrs: { \"data-apps-slide-toggle\": \"#app-settings-content\" }\n },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"Settings\")))]\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { attrs: { id: \"app-settings-content\" } },\n [_vm._t(\"settings-content\")],\n 2\n )\n ])\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-142c1cb5\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy9hcHBOYXZpZ2F0aW9uLnZ1ZT84MWU3Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYyxtQ0FBbUM7QUFDakQsY0FBYztBQUNkLEtBQUs7QUFDTDtBQUNBO0FBQ0EscUJBQXFCLG9DQUFvQztBQUN6RDtBQUNBO0FBQ0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W5ld1wiIH0sIFtcbiAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICBcImJ1dHRvblwiLFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY2xhc3M6IF92bS5tZW51Lm5ldy5pY29uLFxuICAgICAgICAgICAgICAgIGF0dHJzOiB7IHR5cGU6IFwiYnV0dG9uXCIsIGlkOiBfdm0ubWVudS5uZXcuaWQgfSxcbiAgICAgICAgICAgICAgICBvbjogeyBjbGljazogX3ZtLm1lbnUubmV3LmFjdGlvbiB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS5tZW51Lm5ldy50ZXh0KSldXG4gICAgICAgICAgICApXG4gICAgICAgICAgXSlcbiAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcbiAgICAgICAgXCJ1bFwiLFxuICAgICAgICB7IGF0dHJzOiB7IGlkOiBfdm0ubWVudS5pZCB9IH0sXG4gICAgICAgIF92bS5fbChfdm0ubWVudS5pdGVtcywgZnVuY3Rpb24oaXRlbSwga2V5KSB7XG4gICAgICAgICAgcmV0dXJuIF9jKFwibmF2aWdhdGlvbi1pdGVtXCIsIHsga2V5OiBrZXksIGF0dHJzOiB7IGl0ZW06IGl0ZW0gfSB9KVxuICAgICAgICB9KVxuICAgICAgKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcImFwcC1zZXR0aW5nc1wiIH0gfSwgW1xuICAgICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcImFwcC1zZXR0aW5ncy1oZWFkZXJcIiB9IH0sIFtcbiAgICAgICAgICBfYyhcbiAgICAgICAgICAgIFwiYnV0dG9uXCIsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInNldHRpbmdzLWJ1dHRvblwiLFxuIC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XNTY29wZWRcIjpmYWxzZSxcImJ1YmxlXCI6e1widHJhbnNmb3Jtc1wiOnt9fX0hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT10ZW1wbGF0ZSZpbmRleD0wIS4vc3JjL2NvbXBvbmVudHMvYXBwTmF2aWdhdGlvbi52dWVcbi8vIG1vZHVsZSBpZCA9IDM4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///38\n");
|
||
|
||
/***/ }),
|
||
/* 39 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_userList_vue__ = __webpack_require__(16);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_40745299_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_userList_vue__ = __webpack_require__(44);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_userList_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_40745299_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_userList_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/userList.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-40745299\", Component.options)\n } else {\n hotAPI.reload(\"data-v-40745299\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy91c2VyTGlzdC52dWU/ZGViYiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ3dLO0FBQ3hLO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxZQUFpQjtBQUNqQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0gsQ0FBQzs7QUFFRCIsImZpbGUiOiIzOS5qcyIsInNvdXJjZXNDb250ZW50IjpbInZhciBkaXNwb3NlZCA9IGZhbHNlXG52YXIgbm9ybWFsaXplQ29tcG9uZW50ID0gcmVxdWlyZShcIiEuLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvY29tcG9uZW50LW5vcm1hbGl6ZXJcIilcbi8qIHNjcmlwdCAqL1xuZXhwb3J0ICogZnJvbSBcIiEhYmFiZWwtbG9hZGVyIS4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvcj90eXBlPXNjcmlwdCZ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Y29wZUlkX18sXG4gIF9fdnVlX21vZHVsZV9pZGVudGlmaWVyX19cbilcbkNvbXBvbmVudC5vcHRpb25zLl9fZmlsZSA9IFwic3JjL2NvbXBvbmVudHMvdXNlckxpc3QudnVlXCJcblxuLyogaG90IHJlbG9hZCAqL1xuaWYgKG1vZHVsZS5ob3QpIHsoZnVuY3Rpb24gKCkge1xuICB2YXIgaG90QVBJID0gcmVxdWlyZShcInZ1ZS1ob3QtcmVsb2FkLWFwaVwiKVxuICBob3RBUEkuaW5zdGFsbChyZXF1aXJlKFwidnVlXCIpLCBmYWxzZSlcbiAgaWYgKCFob3RBUEkuY29tcGF0aWJsZSkgcmV0dXJuXG4gIG1vZHVsZS5ob3QuYWNjZXB0KClcbiAgaWYgKCFtb2R1bGUuaG90LmRhdGEpIHtcbiAgICBob3RBUEkuY3JlYXRlUmVjb3JkKFwiZGF0YS12LTQwNzQ1Mjk5XCIsIENvbXBvbmVudC5vcHRpb25zKVxuICB9IGVsc2Uge1xuICAgIGhvdEFQSS5yZWxvYWQoXCJkYXRhLXYtNDA3NDUyOTlcIiwgQ29tcG9uZW50Lm9wdGlvbnMpXG4gIH1cbiAgbW9kdWxlLmhvdC5kaXNwb3NlKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgZGlzcG9zZWQgPSB0cnVlXG4gIH0pXG59KSgpfVxuXG5leHBvcnQgZGVmYXVsdCBDb21wb25lbnQuZXhwb3J0c1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9zcmMvY29tcG9uZW50cy91c2VyTGlzdC52dWVcbi8vIG1vZHVsZSBpZCA9IDM5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///39\n");
|
||
|
||
/***/ }),
|
||
/* 40 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_userRow_vue__ = __webpack_require__(17);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_d19586ce_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_userRow_vue__ = __webpack_require__(42);\nvar disposed = false\nvar normalizeComponent = __webpack_require__(2)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_userRow_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_d19586ce_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_userRow_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/userList/userRow.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-d19586ce\", Component.options)\n } else {\n hotAPI.reload(\"data-v-d19586ce\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy91c2VyTGlzdC91c2VyUm93LnZ1ZT9kNTcz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aG90QVBJLmNvbXBhdGlibGUpIHJldHVyblxuICBtb2R1bGUuaG90LmFjY2VwdCgpXG4gIGlmICghbW9kdWxlLmhvdC5kYXRhKSB7XG4gICAgaG90QVBJLmNyZWF0ZVJlY29yZChcImRhdGEtdi1kMTk1ODZjZVwiLCBDb21wb25lbnQub3B0aW9ucylcbiAgfSBlbHNlIHtcbiAgICBob3RBUEkucmVsb2FkKFwiZGF0YS12LWQxOTU4NmNlXCIsIENvbXBvbmVudC5vcHRpb25zKVxuICB9XG4gIG1vZHVsZS5ob3QuZGlzcG9zZShmdW5jdGlvbiAoZGF0YSkge1xuICAgIGRpc3Bvc2VkID0gdHJ1ZVxuICB9KVxufSkoKX1cblxuZXhwb3J0IGRlZmF1bHQgQ29tcG9uZW50LmV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2NvbXBvbmVudHMvdXNlckxpc3QvdXNlclJvdy52dWVcbi8vIG1vZHVsZSBpZCA9IDQwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///40\n");
|
||
|
||
/***/ }),
|
||
/* 41 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export install */\n/* unused harmony export VTooltip */\n/* unused harmony export VClosePopover */\n/* unused harmony export VPopover */\n/* unused harmony export createTooltip */\n/* unused harmony export destroyTooltip */\n/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.12.9\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\nvar longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nvar timeoutDuration = 0;\nfor (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var css = getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n // NOTE: 1 DOM access here\n var offsetParent = element && element.offsetParent;\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n if (element) {\n return element.ownerDocument.documentElement;\n }\n\n return document.documentElement;\n }\n\n // .offsetParent will return the closest TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);\n}\n\n/**\n * Tells if you are running Internet Explorer 10\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean} isIE10\n */\nvar isIE10 = undefined;\n\nvar isIE10$1 = function () {\n if (isIE10 === undefined) {\n isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1;\n }\n return isIE10;\n};\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);\n}\n\nfunction getWindowSizes() {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE10$1() && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n if (isIE10$1()) {\n try {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } catch (err) {}\n } else {\n rect = element.getBoundingClientRect();\n }\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};\n var width = sizes.width || element.clientWidth || result.right - result.left;\n var height = sizes.height || element.clientHeight || result.bottom - result.top;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var isIE10 = isIE10$1();\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop, 10);\n var marginLeft = parseFloat(styles.marginLeft, 10);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = getScroll(html);\n var scrollLeft = getScroll(html, 'left');\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n return isFixed(getParentNode(element));\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n // NOTE: 1 DOM access here\n var boundaries = { top: 0, left: 0 };\n var offsetParent = findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n boundaries.left += padding;\n boundaries.top += padding;\n boundaries.right -= padding;\n boundaries.bottom -= padding;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var commonOffsetParent = findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var styles = getComputedStyle(element);\n var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);\n var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length - 1; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroy the popper\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.left = '';\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger onUpdate callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper.\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n // floor sides to avoid blurry text\n var offsets = {\n left: Math.floor(popper.left),\n top: Math.floor(popper.top),\n bottom: Math.floor(popper.bottom),\n right: Math.floor(popper.right)\n };\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n top = -offsetParentRect.height + offsets.bottom;\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n left = -offsetParentRect.width + offsets.right;\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjuction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-right` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.<br />\n * It will read the variation of the `placement` property.<br />\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unitless, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.<br />\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the height.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.<br />\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.<br />\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * An scenario exists where the reference itself is not within the boundaries.<br />\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper this makes sure the popper has always a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier, can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near eachothers\n * without leaving any gap between the two. Expecially useful when the arrow is\n * enabled and you want to assure it to point to its reference element.\n * It cares only about the first axis, you can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjuction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations).\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position,\n * the popper will never be placed outside of the defined boundaries\n * (except if keepTogether is enabled)\n */\n boundariesElement: 'viewport'\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3d transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties.\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define you own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3d transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties.\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the informations used by Popper.js\n * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements.\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overriden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass as 3rd argument an object with the same\n * structure of this object, example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Whether events (resize, scroll) are initially enabled\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.<br />\n * By default, is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated, this callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.<br />\n * By default, is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Create a new Popper.js instance\n * @class Popper\n * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper.\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedule an update, it will run on the next UI update available\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.<br />\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nfunction convertToArray(value) {\n\tif (typeof value === 'string') {\n\t\tvalue = value.split(' ');\n\t}\n\treturn value;\n}\n\n/**\n * Add classes to an element.\n * This method checks to ensure that the classes don't already exist before adding them.\n * It uses el.className rather than classList in order to be IE friendly.\n * @param {object} el - The element to add the classes to.\n * @param {classes} string - List of space separated classes to be added to the element.\n */\nfunction addClasses(el, classes) {\n\tvar newClasses = convertToArray(classes);\n\tvar classList = void 0;\n\tif (el.className instanceof SVGAnimatedString) {\n\t\tclassList = Array.from(el.className);\n\t} else {\n\t\tclassList = convertToArray(el.className);\n\t}\n\tnewClasses.forEach(function (newClass) {\n\t\tif (classList.indexOf(newClass) === -1) {\n\t\t\tclassList.push(newClass);\n\t\t}\n\t});\n\tif (el instanceof SVGElement) {\n\t\tel.setAttribute('class', classList.join(' '));\n\t} else {\n\t\tel.className = classList.join(' ');\n\t}\n}\n\n/**\n * Remove classes from an element.\n * It uses el.className rather than classList in order to be IE friendly.\n * @export\n * @param {any} el The element to remove the classes from.\n * @param {any} classes List of space separated classes to be removed from the element.\n */\nfunction removeClasses(el, classes) {\n\tvar newClasses = convertToArray(classes);\n\tvar classList = void 0;\n\tif (el.className instanceof SVGAnimatedString) {\n\t\tclassList = Array.from(el.className);\n\t} else {\n\t\tclassList = convertToArray(el.className);\n\t}\n\tnewClasses.forEach(function (newClass) {\n\t\tvar index = classList.indexOf(newClass);\n\t\tif (index !== -1) {\n\t\t\tclassList.splice(index, 1);\n\t\t}\n\t});\n\tif (el instanceof SVGElement) {\n\t\tel.setAttribute('class', classList.join(' '));\n\t} else {\n\t\tel.className = classList.join(' ');\n\t}\n}\n\nvar supportsPassive = false;\n\nif (typeof window !== 'undefined') {\n\tsupportsPassive = false;\n\ttry {\n\t\tvar opts = Object.defineProperty({}, 'passive', {\n\t\t\tget: function get() {\n\t\t\t\tsupportsPassive = true;\n\t\t\t}\n\t\t});\n\t\twindow.addEventListener('test', null, opts);\n\t} catch (e) {}\n}\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\n\n\n\n\n\n\nvar classCallCheck$1 = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass$1 = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\n\n\nvar _extends$1 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/* Forked from https://github.com/FezVrasta/popper.js/blob/master/packages/tooltip/src/index.js */\n\nvar DEFAULT_OPTIONS = {\n\tcontainer: false,\n\tdelay: 0,\n\thtml: false,\n\tplacement: 'top',\n\ttitle: '',\n\ttemplate: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n\ttrigger: 'hover focus',\n\toffset: 0\n};\n\nvar openTooltips = [];\n\nvar Tooltip = function () {\n\t/**\n * Create a new Tooltip.js instance\n * @class Tooltip\n * @param {HTMLElement} reference - The DOM node used as reference of the tooltip (it can be a jQuery element).\n * @param {Object} options\n * @param {String} options.placement=bottom\n *\t\t\tPlacement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -end),\n *\t\t\tleft(-start, -end)`\n * @param {HTMLElement|String|false} options.container=false - Append the tooltip to a specific element.\n * @param {Number|Object} options.delay=0\n *\t\t\tDelay showing and hiding the tooltip (ms) - does not apply to manual trigger type.\n *\t\t\tIf a number is supplied, delay is applied to both hide/show.\n *\t\t\tObject structure is: `{ show: 500, hide: 100 }`\n * @param {Boolean} options.html=false - Insert HTML into the tooltip. If false, the content will inserted with `innerText`.\n * @param {String|PlacementFunction} options.placement='top' - One of the allowed placements, or a function returning one of them.\n * @param {String} [options.template='<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>']\n *\t\t\tBase HTML to used when creating the tooltip.\n *\t\t\tThe tooltip's `title` will be injected into the `.tooltip-inner` or `.tooltip__inner`.\n *\t\t\t`.tooltip-arrow` or `.tooltip__arrow` will become the tooltip's arrow.\n *\t\t\tThe outermost wrapper element should have the `.tooltip` class.\n * @param {String|HTMLElement|TitleFunction} options.title='' - Default title value if `title` attribute isn't present.\n * @param {String} [options.trigger='hover focus']\n *\t\t\tHow tooltip is triggered - click, hover, focus, manual.\n *\t\t\tYou may pass multiple triggers; separate them with a space. `manual` cannot be combined with any other trigger.\n * @param {HTMLElement} options.boundariesElement\n *\t\t\tThe element used as boundaries for the tooltip. For more information refer to Popper.js'\n *\t\t\t[boundariesElement docs](https://popper.js.org/popper-documentation.html)\n * @param {Number|String} options.offset=0 - Offset of the tooltip relative to its reference. For more information refer to Popper.js'\n *\t\t\t[offset docs](https://popper.js.org/popper-documentation.html)\n * @param {Object} options.popperOptions={} - Popper options, will be passed directly to popper instance. For more information refer to Popper.js'\n *\t\t\t[options docs](https://popper.js.org/popper-documentation.html)\n * @return {Object} instance - The generated tooltip instance\n */\n\tfunction Tooltip(reference, options) {\n\t\tclassCallCheck$1(this, Tooltip);\n\n\t\t_initialiseProps.call(this);\n\n\t\t// apply user options over default ones\n\t\toptions = _extends$1({}, DEFAULT_OPTIONS, options);\n\n\t\treference.jquery && (reference = reference[0]);\n\n\t\t// cache reference and options\n\t\tthis.reference = reference;\n\t\tthis.options = options;\n\n\t\t// set initial state\n\t\tthis._isOpen = false;\n\n\t\tthis._init();\n\t}\n\n\t//\n\t// Public methods\n\t//\n\n\t/**\n * Reveals an element's tooltip. This is considered a \"manual\" triggering of the tooltip.\n * Tooltips with zero-length titles are never displayed.\n * @method Tooltip#show\n * @memberof Tooltip\n */\n\n\n\t/**\n * Hides an element’s tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#hide\n * @memberof Tooltip\n */\n\n\n\t/**\n * Hides and destroys an element’s tooltip.\n * @method Tooltip#dispose\n * @memberof Tooltip\n */\n\n\n\t/**\n * Toggles an element’s tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#toggle\n * @memberof Tooltip\n */\n\n\n\tcreateClass$1(Tooltip, [{\n\t\tkey: 'setClasses',\n\t\tvalue: function setClasses(classes) {\n\t\t\tthis._classes = classes;\n\t\t}\n\t}, {\n\t\tkey: 'setContent',\n\t\tvalue: function setContent(content) {\n\t\t\tthis.options.title = content;\n\t\t\tif (this._tooltipNode) {\n\t\t\t\tthis._setContent(content, this.options);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'setOptions',\n\t\tvalue: function setOptions(options) {\n\t\t\tvar classesUpdated = false;\n\t\t\tvar classes = options && options.classes || directive.options.defaultClass;\n\t\t\tif (this._classes !== classes) {\n\t\t\t\tthis.setClasses(classes);\n\t\t\t\tclassesUpdated = true;\n\t\t\t}\n\n\t\t\toptions = getOptions(options);\n\n\t\t\tvar needPopperUpdate = false;\n\t\t\tvar needRestart = false;\n\n\t\t\tif (this.options.offset !== options.offset || this.options.placement !== options.placement) {\n\t\t\t\tneedPopperUpdate = true;\n\t\t\t}\n\n\t\t\tif (this.options.template !== options.template || this.options.trigger !== options.trigger || this.options.container !== options.container || classesUpdated) {\n\t\t\t\tneedRestart = true;\n\t\t\t}\n\n\t\t\tfor (var key in options) {\n\t\t\t\tthis.options[key] = options[key];\n\t\t\t}\n\n\t\t\tif (this._tooltipNode) {\n\t\t\t\tif (needRestart) {\n\t\t\t\t\tvar isOpen = this._isOpen;\n\n\t\t\t\t\tthis.dispose();\n\t\t\t\t\tthis._init();\n\n\t\t\t\t\tif (isOpen) {\n\t\t\t\t\t\tthis.show();\n\t\t\t\t\t}\n\t\t\t\t} else if (needPopperUpdate) {\n\t\t\t\t\tthis.popperInstance.update();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Private methods\n\t\t//\n\n\t}, {\n\t\tkey: '_init',\n\t\tvalue: function _init() {\n\t\t\t// get events list\n\t\t\tvar events = typeof this.options.trigger === 'string' ? this.options.trigger.split(' ').filter(function (trigger) {\n\t\t\t\treturn ['click', 'hover', 'focus'].indexOf(trigger) !== -1;\n\t\t\t}) : [];\n\t\t\tthis._isDisposed = false;\n\t\t\tthis._enableDocumentTouch = events.indexOf('manual') === -1;\n\n\t\t\t// set event listeners\n\t\t\tthis._setEventListeners(this.reference, events, this.options);\n\t\t}\n\n\t\t/**\n * Creates a new tooltip node\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} reference\n * @param {String} template\n * @param {String|HTMLElement|TitleFunction} title\n * @param {Boolean} allowHtml\n * @return {HTMLelement} tooltipNode\n */\n\n\t}, {\n\t\tkey: '_create',\n\t\tvalue: function _create(reference, template) {\n\t\t\t// create tooltip element\n\t\t\tvar tooltipGenerator = window.document.createElement('div');\n\t\t\ttooltipGenerator.innerHTML = template.trim();\n\t\t\tvar tooltipNode = tooltipGenerator.childNodes[0];\n\n\t\t\t// add unique ID to our tooltip (needed for accessibility reasons)\n\t\t\ttooltipNode.id = 'tooltip_' + Math.random().toString(36).substr(2, 10);\n\n\t\t\t// Initially hide the tooltip\n\t\t\t// The attribute will be switched in a next frame so\n\t\t\t// CSS transitions can play\n\t\t\ttooltipNode.setAttribute('aria-hidden', 'true');\n\n\t\t\tif (this.options.autoHide && this.options.trigger.indexOf('hover') !== -1) {\n\t\t\t\ttooltipNode.addEventListener('mouseenter', this.hide);\n\t\t\t\ttooltipNode.addEventListener('click', this.hide);\n\t\t\t}\n\n\t\t\t// return the generated tooltip node\n\t\t\treturn tooltipNode;\n\t\t}\n\t}, {\n\t\tkey: '_setContent',\n\t\tvalue: function _setContent(content, options) {\n\t\t\tvar _this = this;\n\n\t\t\tthis.asyncContent = false;\n\t\t\tthis._applyContent(content, options).then(function () {\n\t\t\t\t_this.popperInstance.update();\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_applyContent',\n\t\tvalue: function _applyContent(title, options) {\n\t\t\tvar _this2 = this;\n\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tvar allowHtml = options.html;\n\t\t\t\tvar rootNode = _this2._tooltipNode;\n\t\t\t\tvar titleNode = rootNode.querySelector(_this2.options.innerSelector);\n\t\t\t\tif (title.nodeType === 1) {\n\t\t\t\t\t// if title is a node, append it only if allowHtml is true\n\t\t\t\t\tif (allowHtml) {\n\t\t\t\t\t\twhile (titleNode.firstChild) {\n\t\t\t\t\t\t\ttitleNode.removeChild(titleNode.firstChild);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttitleNode.appendChild(title);\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof title === 'function') {\n\t\t\t\t\t// if title is a function, call it and set innerText or innerHtml depending by `allowHtml` value\n\t\t\t\t\tvar result = title();\n\t\t\t\t\tif (result && typeof result.then === 'function') {\n\t\t\t\t\t\t_this2.asyncContent = true;\n\t\t\t\t\t\toptions.loadingClass && addClasses(rootNode, options.loadingClass);\n\t\t\t\t\t\tif (options.loadingContent) {\n\t\t\t\t\t\t\t_this2._applyContent(options.loadingContent, options);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult.then(function (asyncResult) {\n\t\t\t\t\t\t\toptions.loadingClass && removeClasses(rootNode, options.loadingClass);\n\t\t\t\t\t\t\treturn _this2._applyContent(asyncResult, options);\n\t\t\t\t\t\t}).then(resolve).catch(reject);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_this2._applyContent(result, options).then(resolve).catch(reject);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\t// if it's just a simple text, set innerText or innerHtml depending by `allowHtml` value\n\t\t\t\t\tallowHtml ? titleNode.innerHTML = title : titleNode.innerText = title;\n\t\t\t\t}\n\t\t\t\tresolve();\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_show',\n\t\tvalue: function _show(reference, options) {\n\t\t\tif (options && typeof options.container === 'string') {\n\t\t\t\tvar container = document.querySelector(options.container);\n\t\t\t\tif (!container) return;\n\t\t\t}\n\n\t\t\tclearTimeout(this._disposeTimer);\n\n\t\t\toptions = Object.assign({}, options);\n\t\t\tdelete options.offset;\n\n\t\t\tvar updateClasses = true;\n\t\t\tif (this._tooltipNode) {\n\t\t\t\taddClasses(this._tooltipNode, this._classes);\n\t\t\t\tupdateClasses = false;\n\t\t\t}\n\n\t\t\tvar result = this._ensureShown(reference, options);\n\n\t\t\tif (updateClasses && this._tooltipNode) {\n\t\t\t\taddClasses(this._tooltipNode, this._classes);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t}, {\n\t\tkey: '_ensureShown',\n\t\tvalue: function _ensureShown(reference, options) {\n\t\t\tvar _this3 = this;\n\n\t\t\t// don't show if it's already visible\n\t\t\tif (this._isOpen) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthis._isOpen = true;\n\n\t\t\topenTooltips.push(this);\n\n\t\t\t// if the tooltipNode already exists, just show it\n\t\t\tif (this._tooltipNode) {\n\t\t\t\tthis._tooltipNode.style.display = '';\n\t\t\t\tthis._tooltipNode.setAttribute('aria-hidden', 'false');\n\t\t\t\tthis.popperInstance.enableEventListeners();\n\t\t\t\tthis.popperInstance.update();\n\t\t\t\tif (this.asyncContent) {\n\t\t\t\t\tthis._setContent(options.title, options);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// get title\n\t\t\tvar title = reference.getAttribute('title') || options.title;\n\n\t\t\t// don't show tooltip if no title is defined\n\t\t\tif (!title) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// create tooltip node\n\t\t\tvar tooltipNode = this._create(reference, options.template);\n\t\t\tthis._tooltipNode = tooltipNode;\n\n\t\t\tthis._setContent(title, options);\n\n\t\t\t// Add `aria-describedby` to our reference element for accessibility reasons\n\t\t\treference.setAttribute('aria-describedby', tooltipNode.id);\n\n\t\t\t// append tooltip to container\n\t\t\tvar container = this._findContainer(options.container, reference);\n\n\t\t\tthis._append(tooltipNode, container);\n\n\t\t\tvar popperOptions = _extends$1({}, options.popperOptions, {\n\t\t\t\tplacement: options.placement\n\t\t\t});\n\n\t\t\tpopperOptions.modifiers = _extends$1({}, popperOptions.modifiers, {\n\t\t\t\tarrow: {\n\t\t\t\t\telement: this.options.arrowSelector\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (options.boundariesElement) {\n\t\t\t\tpopperOptions.modifiers.preventOverflow = {\n\t\t\t\t\tboundariesElement: options.boundariesElement\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.popperInstance = new Popper(reference, tooltipNode, popperOptions);\n\n\t\t\t// Fix position\n\t\t\trequestAnimationFrame(function () {\n\t\t\t\tif (!_this3._isDisposed && _this3.popperInstance) {\n\t\t\t\t\t_this3.popperInstance.update();\n\n\t\t\t\t\t// Show the tooltip\n\t\t\t\t\trequestAnimationFrame(function () {\n\t\t\t\t\t\tif (!_this3._isDisposed) {\n\t\t\t\t\t\t\t_this3._isOpen && tooltipNode.setAttribute('aria-hidden', 'false');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t_this3.dispose();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t_this3.dispose();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn this;\n\t\t}\n\t}, {\n\t\tkey: '_noLongerOpen',\n\t\tvalue: function _noLongerOpen() {\n\t\t\tvar index = openTooltips.indexOf(this);\n\t\t\tif (index !== -1) {\n\t\t\t\topenTooltips.splice(index, 1);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: '_hide',\n\t\tvalue: function _hide() /* reference, options */{\n\t\t\tvar _this4 = this;\n\n\t\t\t// don't hide if it's already hidden\n\t\t\tif (!this._isOpen) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tthis._isOpen = false;\n\t\t\tthis._noLongerOpen();\n\n\t\t\t// hide tooltipNode\n\t\t\tthis._tooltipNode.style.display = 'none';\n\t\t\tthis._tooltipNode.setAttribute('aria-hidden', 'true');\n\n\t\t\tthis.popperInstance.disableEventListeners();\n\n\t\t\tclearTimeout(this._disposeTimer);\n\t\t\tvar disposeTime = directive.options.disposeTimeout;\n\t\t\tif (disposeTime !== null) {\n\t\t\t\tthis._disposeTimer = setTimeout(function () {\n\t\t\t\t\tif (_this4._tooltipNode) {\n\t\t\t\t\t\t_this4._tooltipNode.removeEventListener('mouseenter', _this4.hide);\n\t\t\t\t\t\t_this4._tooltipNode.removeEventListener('click', _this4.hide);\n\t\t\t\t\t\t// Don't remove popper instance, just the HTML element\n\t\t\t\t\t\t_this4._tooltipNode.parentNode.removeChild(_this4._tooltipNode);\n\t\t\t\t\t\t_this4._tooltipNode = null;\n\t\t\t\t\t}\n\t\t\t\t}, disposeTime);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t}, {\n\t\tkey: '_dispose',\n\t\tvalue: function _dispose() {\n\t\t\tvar _this5 = this;\n\n\t\t\tthis._isDisposed = true;\n\n\t\t\t// remove event listeners first to prevent any unexpected behaviour\n\t\t\tthis._events.forEach(function (_ref) {\n\t\t\t\tvar func = _ref.func,\n\t\t\t\t event = _ref.event;\n\n\t\t\t\t_this5.reference.removeEventListener(event, func);\n\t\t\t});\n\t\t\tthis._events = [];\n\n\t\t\tif (this._tooltipNode) {\n\t\t\t\tthis._hide();\n\n\t\t\t\tthis._tooltipNode.removeEventListener('mouseenter', this.hide);\n\t\t\t\tthis._tooltipNode.removeEventListener('click', this.hide);\n\n\t\t\t\t// destroy instance\n\t\t\t\tthis.popperInstance.destroy();\n\n\t\t\t\t// destroy tooltipNode if removeOnDestroy is not set, as popperInstance.destroy() already removes the element\n\t\t\t\tif (!this.popperInstance.options.removeOnDestroy) {\n\t\t\t\t\tthis._tooltipNode.parentNode.removeChild(this._tooltipNode);\n\t\t\t\t\tthis._tooltipNode = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._noLongerOpen();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t}, {\n\t\tkey: '_findContainer',\n\t\tvalue: function _findContainer(container, reference) {\n\t\t\t// if container is a query, get the relative element\n\t\t\tif (typeof container === 'string') {\n\t\t\t\tcontainer = window.document.querySelector(container);\n\t\t\t} else if (container === false) {\n\t\t\t\t// if container is `false`, set it to reference parent\n\t\t\t\tcontainer = reference.parentNode;\n\t\t\t}\n\t\t\treturn container;\n\t\t}\n\n\t\t/**\n * Append tooltip to container\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} tooltip\n * @param {HTMLElement|String|false} container\n */\n\n\t}, {\n\t\tkey: '_append',\n\t\tvalue: function _append(tooltipNode, container) {\n\t\t\tcontainer.appendChild(tooltipNode);\n\t\t}\n\t}, {\n\t\tkey: '_setEventListeners',\n\t\tvalue: function _setEventListeners(reference, events, options) {\n\t\t\tvar _this6 = this;\n\n\t\t\tvar directEvents = [];\n\t\t\tvar oppositeEvents = [];\n\n\t\t\tevents.forEach(function (event) {\n\t\t\t\tswitch (event) {\n\t\t\t\t\tcase 'hover':\n\t\t\t\t\t\tdirectEvents.push('mouseenter');\n\t\t\t\t\t\toppositeEvents.push('mouseleave');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'focus':\n\t\t\t\t\t\tdirectEvents.push('focus');\n\t\t\t\t\t\toppositeEvents.push('blur');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'click':\n\t\t\t\t\t\tdirectEvents.push('click');\n\t\t\t\t\t\toppositeEvents.push('click');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// schedule show tooltip\n\t\t\tdirectEvents.forEach(function (event) {\n\t\t\t\tvar func = function func(evt) {\n\t\t\t\t\tif (_this6._isOpen === true) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tevt.usedByTooltip = true;\n\t\t\t\t\t_this6._scheduleShow(reference, options.delay, options, evt);\n\t\t\t\t};\n\t\t\t\t_this6._events.push({ event: event, func: func });\n\t\t\t\treference.addEventListener(event, func);\n\t\t\t});\n\n\t\t\t// schedule hide tooltip\n\t\t\toppositeEvents.forEach(function (event) {\n\t\t\t\tvar func = function func(evt) {\n\t\t\t\t\tif (evt.usedByTooltip === true) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t_this6._scheduleHide(reference, options.delay, options, evt);\n\t\t\t\t};\n\t\t\t\t_this6._events.push({ event: event, func: func });\n\t\t\t\treference.addEventListener(event, func);\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_onDocumentTouch',\n\t\tvalue: function _onDocumentTouch(event) {\n\t\t\tif (this._enableDocumentTouch) {\n\t\t\t\tthis._scheduleHide(this.reference, this.options.delay, this.options, event);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: '_scheduleShow',\n\t\tvalue: function _scheduleShow(reference, delay, options /*, evt */) {\n\t\t\tvar _this7 = this;\n\n\t\t\t// defaults to 0\n\t\t\tvar computedDelay = delay && delay.show || delay || 0;\n\t\t\tclearTimeout(this._scheduleTimer);\n\t\t\tthis._scheduleTimer = window.setTimeout(function () {\n\t\t\t\treturn _this7._show(reference, options);\n\t\t\t}, computedDelay);\n\t\t}\n\t}, {\n\t\tkey: '_scheduleHide',\n\t\tvalue: function _scheduleHide(reference, delay, options, evt) {\n\t\t\tvar _this8 = this;\n\n\t\t\t// defaults to 0\n\t\t\tvar computedDelay = delay && delay.hide || delay || 0;\n\t\t\tclearTimeout(this._scheduleTimer);\n\t\t\tthis._scheduleTimer = window.setTimeout(function () {\n\t\t\t\tif (_this8._isOpen === false) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!document.body.contains(_this8._tooltipNode)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// if we are hiding because of a mouseleave, we must check that the new\n\t\t\t\t// reference isn't the tooltip, because in this case we don't want to hide it\n\t\t\t\tif (evt.type === 'mouseleave') {\n\t\t\t\t\tvar isSet = _this8._setTooltipNodeEvent(evt, reference, delay, options);\n\n\t\t\t\t\t// if we set the new event, don't hide the tooltip yet\n\t\t\t\t\t// the new event will take care to hide it if necessary\n\t\t\t\t\tif (isSet) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t_this8._hide(reference, options);\n\t\t\t}, computedDelay);\n\t\t}\n\t}]);\n\treturn Tooltip;\n}();\n\n// Hide tooltips on touch devices\n\n\nvar _initialiseProps = function _initialiseProps() {\n\tvar _this9 = this;\n\n\tthis.show = function () {\n\t\t_this9._show(_this9.reference, _this9.options);\n\t};\n\n\tthis.hide = function () {\n\t\t_this9._hide();\n\t};\n\n\tthis.dispose = function () {\n\t\t_this9._dispose();\n\t};\n\n\tthis.toggle = function () {\n\t\tif (_this9._isOpen) {\n\t\t\treturn _this9.hide();\n\t\t} else {\n\t\t\treturn _this9.show();\n\t\t}\n\t};\n\n\tthis._events = [];\n\n\tthis._setTooltipNodeEvent = function (evt, reference, delay, options) {\n\t\tvar relatedreference = evt.relatedreference || evt.toElement;\n\n\t\tvar callback = function callback(evt2) {\n\t\t\tvar relatedreference2 = evt2.relatedreference || evt2.toElement;\n\n\t\t\t// Remove event listener after call\n\t\t\t_this9._tooltipNode.removeEventListener(evt.type, callback);\n\n\t\t\t// If the new reference is not the reference element\n\t\t\tif (!reference.contains(relatedreference2)) {\n\t\t\t\t// Schedule to hide tooltip\n\t\t\t\t_this9._scheduleHide(reference, options.delay, options, evt2);\n\t\t\t}\n\t\t};\n\n\t\tif (_this9._tooltipNode.contains(relatedreference)) {\n\t\t\t// listen to mouseleave on the tooltip element to be able to hide the tooltip\n\t\t\t_this9._tooltipNode.addEventListener(evt.type, callback);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n};\n\nif (typeof document !== 'undefined') {\n\tdocument.addEventListener('touchstart', function (event) {\n\t\tfor (var i = 0; i < openTooltips.length; i++) {\n\t\t\topenTooltips[i]._onDocumentTouch(event);\n\t\t}\n\t}, supportsPassive ? {\n\t\tpassive: true\n\t} : false);\n}\n\n/**\n * Placement function, its context is the Tooltip instance.\n * @memberof Tooltip\n * @callback PlacementFunction\n * @param {HTMLElement} tooltip - tooltip DOM node.\n * @param {HTMLElement} reference - reference DOM node.\n * @return {String} placement - One of the allowed placement options.\n */\n\n/**\n * Title function, its context is the Tooltip instance.\n * @memberof Tooltip\n * @callback TitleFunction\n * @return {String} placement - The desired title.\n */\n\nvar state = {\n\tenabled: true\n};\n\nvar positions = ['top', 'top-start', 'top-end', 'right', 'right-start', 'right-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end'];\n\nvar defaultOptions = {\n\t// Default tooltip placement relative to target element\n\tdefaultPlacement: 'top',\n\t// Default CSS classes applied to the tooltip element\n\tdefaultClass: 'vue-tooltip-theme',\n\t// Default CSS classes applied to the target element of the tooltip\n\tdefaultTargetClass: 'has-tooltip',\n\t// Default HTML template of the tooltip element\n\t// It must include `tooltip-arrow` & `tooltip-inner` CSS classes (can be configured, see below)\n\t// Change if the classes conflict with other libraries (for example bootstrap)\n\tdefaultTemplate: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n\t// Selector used to get the arrow element in the tooltip template\n\tdefaultArrowSelector: '.tooltip-arrow, .tooltip__arrow',\n\t// Selector used to get the inner content element in the tooltip template\n\tdefaultInnerSelector: '.tooltip-inner, .tooltip__inner',\n\t// Delay (ms)\n\tdefaultDelay: 0,\n\t// Default events that trigger the tooltip\n\tdefaultTrigger: 'hover focus',\n\t// Default position offset (px)\n\tdefaultOffset: 0,\n\t// Default container where the tooltip will be appended\n\tdefaultContainer: 'body',\n\tdefaultBoundariesElement: undefined,\n\tdefaultPopperOptions: {},\n\t// Class added when content is loading\n\tdefaultLoadingClass: 'tooltip-loading',\n\t// Displayed when tooltip content is loading\n\tdefaultLoadingContent: '...',\n\t// Hide on mouseover tooltip\n\tautoHide: true,\n\t// Auto destroy tooltip DOM nodes (ms)\n\tdisposeTimeout: 5000,\n\t// Options for popover\n\tpopover: {\n\t\tdefaultPlacement: 'bottom',\n\t\t// Use the `popoverClass` prop for theming\n\t\tdefaultClass: 'vue-popover-theme',\n\t\t// Base class (change if conflicts with other libraries)\n\t\tdefaultBaseClass: 'tooltip popover',\n\t\t// Wrapper class (contains arrow and inner)\n\t\tdefaultWrapperClass: 'wrapper',\n\t\t// Inner content class\n\t\tdefaultInnerClass: 'tooltip-inner popover-inner',\n\t\t// Arrow class\n\t\tdefaultArrowClass: 'tooltip-arrow popover-arrow',\n\t\tdefaultDelay: 0,\n\t\tdefaultTrigger: 'click',\n\t\tdefaultOffset: 0,\n\t\tdefaultContainer: 'body',\n\t\tdefaultBoundariesElement: undefined,\n\t\tdefaultPopperOptions: {},\n\t\t// Hides if clicked outside of popover\n\t\tdefaultAutoHide: true,\n\t\t// Update popper on content resize\n\t\tdefaultHandleResize: true\n\t}\n};\n\nfunction getOptions(options) {\n\tvar result = {\n\t\tplacement: typeof options.placement !== 'undefined' ? options.placement : directive.options.defaultPlacement,\n\t\tdelay: typeof options.delay !== 'undefined' ? options.delay : directive.options.defaultDelay,\n\t\ttemplate: typeof options.template !== 'undefined' ? options.template : directive.options.defaultTemplate,\n\t\tarrowSelector: typeof options.arrowSelector !== 'undefined' ? options.arrowSelector : directive.options.defaultArrowSelector,\n\t\tinnerSelector: typeof options.innerSelector !== 'undefined' ? options.innerSelector : directive.options.defaultInnerSelector,\n\t\ttrigger: typeof options.trigger !== 'undefined' ? options.trigger : directive.options.defaultTrigger,\n\t\toffset: typeof options.offset !== 'undefined' ? options.offset : directive.options.defaultOffset,\n\t\tcontainer: typeof options.container !== 'undefined' ? options.container : directive.options.defaultContainer,\n\t\tboundariesElement: typeof options.boundariesElement !== 'undefined' ? options.boundariesElement : directive.options.defaultBoundariesElement,\n\t\tautoHide: typeof options.autoHide !== 'undefined' ? options.autoHide : directive.options.autoHide,\n\t\tloadingClass: typeof options.loadingClass !== 'undefined' ? options.loadingClass : directive.options.defaultLoadingClass,\n\t\tloadingContent: typeof options.loadingContent !== 'undefined' ? options.loadingContent : directive.options.defaultLoadingContent,\n\t\tpopperOptions: _extends$1({}, typeof options.popperOptions !== 'undefined' ? options.popperOptions : directive.options.defaultPopperOptions)\n\t};\n\n\tif (result.offset) {\n\t\tvar typeofOffset = _typeof(result.offset);\n\t\tvar offset = result.offset;\n\n\t\t// One value -> switch\n\t\tif (typeofOffset === 'number' || typeofOffset === 'string' && offset.indexOf(',') === -1) {\n\t\t\toffset = '0, ' + offset;\n\t\t}\n\n\t\tif (!result.popperOptions.modifiers) {\n\t\t\tresult.popperOptions.modifiers = {};\n\t\t}\n\t\tresult.popperOptions.modifiers.offset = {\n\t\t\toffset: offset\n\t\t};\n\t}\n\n\treturn result;\n}\n\nfunction getPlacement(value, modifiers) {\n\tvar placement = value.placement;\n\tfor (var i = 0; i < positions.length; i++) {\n\t\tvar pos = positions[i];\n\t\tif (modifiers[pos]) {\n\t\t\tplacement = pos;\n\t\t}\n\t}\n\treturn placement;\n}\n\nfunction getContent(value) {\n\tvar type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\tif (type === 'string') {\n\t\treturn value;\n\t} else if (value && type === 'object') {\n\t\treturn value.content;\n\t} else {\n\t\treturn false;\n\t}\n}\n\nfunction createTooltip(el, value) {\n\tvar modifiers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n\tvar content = getContent(value);\n\tvar classes = typeof value.classes !== 'undefined' ? value.classes : directive.options.defaultClass;\n\tvar opts = _extends$1({\n\t\ttitle: content,\n\t\thtml: true\n\t}, getOptions(_extends$1({}, value, {\n\t\tplacement: getPlacement(value, modifiers)\n\t})));\n\tvar tooltip = el._tooltip = new Tooltip(el, opts);\n\ttooltip.setClasses(classes);\n\ttooltip._vueEl = el;\n\n\t// Class on target\n\tvar targetClasses = typeof value.targetClasses !== 'undefined' ? value.targetClasses : directive.options.defaultTargetClass;\n\tel._tooltipTargetClasses = targetClasses;\n\taddClasses(el, targetClasses);\n\n\treturn tooltip;\n}\n\nfunction destroyTooltip(el) {\n\tif (el._tooltip) {\n\t\tel._tooltip.dispose();\n\t\tdelete el._tooltip;\n\t\tdelete el._tooltipOldShow;\n\t}\n\n\tif (el._tooltipTargetClasses) {\n\t\tremoveClasses(el, el._tooltipTargetClasses);\n\t\tdelete el._tooltipTargetClasses;\n\t}\n}\n\nfunction bind(el, _ref) {\n\tvar value = _ref.value,\n\t oldValue = _ref.oldValue,\n\t modifiers = _ref.modifiers;\n\n\tvar content = getContent(value);\n\tif (!content || !state.enabled) {\n\t\tdestroyTooltip(el);\n\t} else {\n\t\tvar tooltip = void 0;\n\t\tif (el._tooltip) {\n\t\t\ttooltip = el._tooltip;\n\t\t\t// Content\n\t\t\ttooltip.setContent(content);\n\t\t\t// Options\n\t\t\ttooltip.setOptions(_extends$1({}, value, {\n\t\t\t\tplacement: getPlacement(value, modifiers)\n\t\t\t}));\n\t\t} else {\n\t\t\ttooltip = createTooltip(el, value, modifiers);\n\t\t}\n\n\t\t// Manual show\n\t\tif (typeof value.show !== 'undefined' && value.show !== el._tooltipOldShow) {\n\t\t\tel._tooltipOldShow = value.show;\n\t\t\tvalue.show ? tooltip.show() : tooltip.hide();\n\t\t}\n\t}\n}\n\nvar directive = {\n\toptions: defaultOptions,\n\tbind: bind,\n\tupdate: bind,\n\tunbind: function unbind(el) {\n\t\tdestroyTooltip(el);\n\t}\n};\n\nfunction addListeners(el) {\n\tel.addEventListener('click', onClick);\n\tel.addEventListener('touchstart', onTouchStart, supportsPassive ? {\n\t\tpassive: true\n\t} : false);\n}\n\nfunction removeListeners(el) {\n\tel.removeEventListener('click', onClick);\n\tel.removeEventListener('touchstart', onTouchStart);\n\tel.removeEventListener('touchend', onTouchEnd);\n\tel.removeEventListener('touchcancel', onTouchCancel);\n}\n\nfunction onClick(event) {\n\tvar el = event.currentTarget;\n\tevent.closePopover = !el.$_vclosepopover_touch;\n\tevent.closeAllPopover = el.$_closePopoverModifiers && !!el.$_closePopoverModifiers.all;\n}\n\nfunction onTouchStart(event) {\n\tif (event.changedTouches.length === 1) {\n\t\tvar el = event.currentTarget;\n\t\tel.$_vclosepopover_touch = true;\n\t\tvar touch = event.changedTouches[0];\n\t\tel.$_vclosepopover_touchPoint = touch;\n\t\tel.addEventListener('touchend', onTouchEnd);\n\t\tel.addEventListener('touchcancel', onTouchCancel);\n\t}\n}\n\nfunction onTouchEnd(event) {\n\tvar el = event.currentTarget;\n\tel.$_vclosepopover_touch = false;\n\tif (event.changedTouches.length === 1) {\n\t\tvar touch = event.changedTouches[0];\n\t\tvar firstTouch = el.$_vclosepopover_touchPoint;\n\t\tevent.closePopover = Math.abs(touch.screenY - firstTouch.screenY) < 20 && Math.abs(touch.screenX - firstTouch.screenX) < 20;\n\t\tevent.closeAllPopover = el.$_closePopoverModifiers && !!el.$_closePopoverModifiers.all;\n\t}\n}\n\nfunction onTouchCancel(event) {\n\tvar el = event.currentTarget;\n\tel.$_vclosepopover_touch = false;\n}\n\nvar vclosepopover = {\n\tbind: function bind(el, _ref) {\n\t\tvar value = _ref.value,\n\t\t modifiers = _ref.modifiers;\n\n\t\tel.$_closePopoverModifiers = modifiers;\n\t\tif (typeof value === 'undefined' || value) {\n\t\t\taddListeners(el);\n\t\t}\n\t},\n\tupdate: function update(el, _ref2) {\n\t\tvar value = _ref2.value,\n\t\t oldValue = _ref2.oldValue,\n\t\t modifiers = _ref2.modifiers;\n\n\t\tel.$_closePopoverModifiers = modifiers;\n\t\tif (value !== oldValue) {\n\t\t\tif (typeof value === 'undefined' || value) {\n\t\t\t\taddListeners(el);\n\t\t\t} else {\n\t\t\t\tremoveListeners(el);\n\t\t\t}\n\t\t}\n\t},\n\tunbind: function unbind(el) {\n\t\tremoveListeners(el);\n\t}\n};\n\nfunction getInternetExplorerVersion() {\n\tvar ua = window.navigator.userAgent;\n\n\tvar msie = ua.indexOf('MSIE ');\n\tif (msie > 0) {\n\t\t// IE 10 or older => return version number\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t}\n\n\tvar trident = ua.indexOf('Trident/');\n\tif (trident > 0) {\n\t\t// IE 11 => return version number\n\t\tvar rv = ua.indexOf('rv:');\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t}\n\n\tvar edge = ua.indexOf('Edge/');\n\tif (edge > 0) {\n\t\t// Edge (IE 12+) => return version number\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\n\t// other browser\n\treturn -1;\n}\n\nvar isIE = void 0;\n\nfunction initCompat() {\n\tif (!initCompat.init) {\n\t\tinitCompat.init = true;\n\t\tisIE = getInternetExplorerVersion() !== -1;\n\t}\n}\n\nvar ResizeObserver = { render: function render() {\n\t\tvar _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: \"resize-observer\", attrs: { \"tabindex\": \"-1\" } });\n\t}, staticRenderFns: [], _scopeId: 'data-v-b329ee4c',\n\tname: 'resize-observer',\n\n\tmethods: {\n\t\tnotify: function notify() {\n\t\t\tthis.$emit('notify');\n\t\t},\n\t\taddResizeHandlers: function addResizeHandlers() {\n\t\t\tthis._resizeObject.contentDocument.defaultView.addEventListener('resize', this.notify);\n\t\t\tif (this._w !== this.$el.offsetWidth || this._h !== this.$el.offsetHeight) {\n\t\t\t\tthis.notify();\n\t\t\t}\n\t\t},\n\t\tremoveResizeHandlers: function removeResizeHandlers() {\n\t\t\tif (this._resizeObject && this._resizeObject.onload) {\n\t\t\t\tif (!isIE && this._resizeObject.contentDocument) {\n\t\t\t\t\tthis._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.notify);\n\t\t\t\t}\n\t\t\t\tdelete this._resizeObject.onload;\n\t\t\t}\n\t\t}\n\t},\n\n\tmounted: function mounted() {\n\t\tvar _this = this;\n\n\t\tinitCompat();\n\t\tthis.$nextTick(function () {\n\t\t\t_this._w = _this.$el.offsetWidth;\n\t\t\t_this._h = _this.$el.offsetHeight;\n\t\t});\n\t\tvar object = document.createElement('object');\n\t\tthis._resizeObject = object;\n\t\tobject.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n\t\tobject.setAttribute('aria-hidden', 'true');\n\t\tobject.onload = this.addResizeHandlers;\n\t\tobject.type = 'text/html';\n\t\tif (isIE) {\n\t\t\tthis.$el.appendChild(object);\n\t\t}\n\t\tobject.data = 'about:blank';\n\t\tif (!isIE) {\n\t\t\tthis.$el.appendChild(object);\n\t\t}\n\t},\n\tbeforeDestroy: function beforeDestroy() {\n\t\tthis.removeResizeHandlers();\n\t}\n};\n\n// Install the components\nfunction install$1(Vue) {\n\tVue.component('resize-observer', ResizeObserver);\n\t/* -- Add more components here -- */\n}\n\n/* -- Plugin definition & Auto-install -- */\n/* You shouldn't have to modify the code below */\n\n// Plugin\nvar plugin$2 = {\n\t// eslint-disable-next-line no-undef\n\tversion: \"0.4.3\",\n\tinstall: install$1\n};\n\n// Auto-install\nvar GlobalVue$1 = null;\nif (typeof window !== 'undefined') {\n\tGlobalVue$1 = window.Vue;\n} else if (typeof global !== 'undefined') {\n\tGlobalVue$1 = global.Vue;\n}\nif (GlobalVue$1) {\n\tGlobalVue$1.use(plugin$2);\n}\n\nfunction getDefault(key) {\n\tvar value = directive.options.popover[key];\n\tif (typeof value === 'undefined') {\n\t\treturn directive.options[key];\n\t}\n\treturn value;\n}\n\nvar isIOS = false;\nif (typeof window !== 'undefined' && typeof navigator !== 'undefined') {\n\tisIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n}\n\nvar openPopovers = [];\n\nvar Popover = { render: function render() {\n\t\tvar _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: \"v-popover\", class: _vm.cssClass }, [_c('span', { ref: \"trigger\", staticClass: \"trigger\", staticStyle: { \"display\": \"inline-block\" }, attrs: { \"aria-describedby\": _vm.popoverId } }, [_vm._t(\"default\")], 2), _vm._v(\" \"), _c('div', { ref: \"popover\", class: [_vm.popoverBaseClass, _vm.popoverClass, _vm.cssClass], style: {\n\t\t\t\tdisplay: _vm.isOpen ? '' : 'none'\n\t\t\t}, attrs: { \"id\": _vm.popoverId, \"aria-hidden\": _vm.isOpen ? 'false' : 'true' } }, [_c('div', { class: _vm.popoverWrapperClass }, [_c('div', { ref: \"arrow\", class: _vm.popoverArrowClass }), _vm._v(\" \"), _c('div', { ref: \"inner\", class: _vm.popoverInnerClass, staticStyle: { \"position\": \"relative\" } }, [_c('div', [_vm._t(\"popover\")], 2), _vm._v(\" \"), _vm.handleResize ? _c('ResizeObserver', { on: { \"notify\": _vm.$_handleResize } }) : _vm._e()], 1)])])]);\n\t}, staticRenderFns: [],\n\tname: 'VPopover',\n\n\tcomponents: {\n\t\tResizeObserver: ResizeObserver\n\t},\n\n\tprops: {\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultPlacement');\n\t\t\t}\n\t\t},\n\t\tdelay: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultDelay');\n\t\t\t}\n\t\t},\n\t\toffset: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultOffset');\n\t\t\t}\n\t\t},\n\t\ttrigger: {\n\t\t\ttype: String,\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultTrigger');\n\t\t\t}\n\t\t},\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultContainer');\n\t\t\t}\n\t\t},\n\t\tboundariesElement: {\n\t\t\ttype: Element,\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultBoundariesElement');\n\t\t\t}\n\t\t},\n\t\tpopperOptions: {\n\t\t\ttype: Object,\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultPopperOptions');\n\t\t\t}\n\t\t},\n\t\tpopoverClass: {\n\t\t\ttype: [String, Array],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn getDefault('defaultClass');\n\t\t\t}\n\t\t},\n\t\tpopoverBaseClass: {\n\t\t\ttype: [String, Array],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn directive.options.popover.defaultBaseClass;\n\t\t\t}\n\t\t},\n\t\tpopoverInnerClass: {\n\t\t\ttype: [String, Array],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn directive.options.popover.defaultInnerClass;\n\t\t\t}\n\t\t},\n\t\tpopoverWrapperClass: {\n\t\t\ttype: [String, Array],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn directive.options.popover.defaultWrapperClass;\n\t\t\t}\n\t\t},\n\t\tpopoverArrowClass: {\n\t\t\ttype: [String, Array],\n\t\t\tdefault: function _default() {\n\t\t\t\treturn directive.options.popover.defaultArrowClass;\n\t\t\t}\n\t\t},\n\t\tautoHide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: function _default() {\n\t\t\t\treturn directive.options.popover.defaultAutoHide;\n\t\t\t}\n\t\t},\n\t\thandleResize: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: function _default() {\n\t\t\t\treturn directive.options.popover.defaultHandleResize;\n\t\t\t}\n\t\t},\n\t\topenGroup: {\n\t\t\ttype: String,\n\t\t\tdefault: null\n\t\t}\n\t},\n\n\tdata: function data() {\n\t\treturn {\n\t\t\tisOpen: false,\n\t\t\tid: Math.random().toString(36).substr(2, 10)\n\t\t};\n\t},\n\n\n\tcomputed: {\n\t\tcssClass: function cssClass() {\n\t\t\treturn {\n\t\t\t\t'open': this.isOpen\n\t\t\t};\n\t\t},\n\t\tpopoverId: function popoverId() {\n\t\t\treturn 'popover_' + this.id;\n\t\t}\n\t},\n\n\twatch: {\n\t\topen: function open(val) {\n\t\t\tif (val) {\n\t\t\t\tthis.show();\n\t\t\t} else {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t},\n\t\tdisabled: function disabled(val, oldVal) {\n\t\t\tif (val !== oldVal) {\n\t\t\t\tif (val) {\n\t\t\t\t\tthis.hide();\n\t\t\t\t} else if (this.open) {\n\t\t\t\t\tthis.show();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcontainer: function container(val) {\n\t\t\tif (this.isOpen && this.popperInstance) {\n\t\t\t\tvar popoverNode = this.$refs.popover;\n\t\t\t\tvar reference = this.$refs.trigger;\n\n\t\t\t\tvar container = this.$_findContainer(this.container, reference);\n\t\t\t\tif (!container) {\n\t\t\t\t\tconsole.warn('No container for popover', this);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontainer.appendChild(popoverNode);\n\t\t\t\tthis.popperInstance.update();\n\t\t\t}\n\t\t},\n\t\ttrigger: function trigger(val) {\n\t\t\tthis.$_removeEventListeners();\n\t\t\tthis.$_addEventListeners();\n\t\t},\n\t\toffset: function offset(val) {\n\t\t\tvar _this = this;\n\n\t\t\tthis.$_updatePopper(function () {\n\t\t\t\tif (val) {\n\t\t\t\t\tvar offset = _this.$_getOffset();\n\n\t\t\t\t\t_this.popperInstance.options.modifiers.offset = {\n\t\t\t\t\t\toffset: offset\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t_this.popperInstance.options.modifiers.offset = undefined;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tplacement: function placement(val) {\n\t\t\tvar _this2 = this;\n\n\t\t\tthis.$_updatePopper(function () {\n\t\t\t\t_this2.popperInstance.options.placement = val;\n\t\t\t});\n\t\t},\n\n\n\t\tboundariesElement: '$_restartPopper',\n\n\t\tpopperOptions: {\n\t\t\thandler: '$_restartPopper',\n\t\t\tdeep: true\n\t\t}\n\t},\n\n\tcreated: function created() {\n\t\tthis.$_isDisposed = false;\n\t\tthis.$_mounted = false;\n\t\tthis.$_events = [];\n\t\tthis.$_preventOpen = false;\n\t},\n\tmounted: function mounted() {\n\t\tvar popoverNode = this.$refs.popover;\n\t\tpopoverNode.parentNode && popoverNode.parentNode.removeChild(popoverNode);\n\n\t\tthis.$_init();\n\n\t\tif (this.open) {\n\t\t\tthis.show();\n\t\t}\n\t},\n\tbeforeDestroy: function beforeDestroy() {\n\t\tthis.dispose();\n\t},\n\n\n\tmethods: {\n\t\tshow: function show() {\n\t\t\tvar _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t\t\t event = _ref.event,\n\t\t\t _ref$skipDelay = _ref.skipDelay,\n\t\t\t skipDelay = _ref$skipDelay === undefined ? false : _ref$skipDelay,\n\t\t\t _ref$force = _ref.force,\n\t\t\t force = _ref$force === undefined ? false : _ref$force;\n\n\t\t\tif (force || !this.disabled) {\n\t\t\t\tthis.$_scheduleShow(event);\n\t\t\t\tthis.$emit('show');\n\t\t\t}\n\t\t\tthis.$emit('update:open', true);\n\t\t},\n\t\thide: function hide() {\n\t\t\tvar _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t\t\t event = _ref2.event,\n\t\t\t _ref2$skipDelay = _ref2.skipDelay;\n\n\t\t\tthis.$_scheduleHide(event);\n\n\t\t\tthis.$emit('hide');\n\t\t\tthis.$emit('update:open', false);\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tthis.$_isDisposed = true;\n\t\t\tthis.$_removeEventListeners();\n\t\t\tthis.hide({ skipDelay: true });\n\t\t\tif (this.popperInstance) {\n\t\t\t\tthis.popperInstance.destroy();\n\n\t\t\t\t// destroy tooltipNode if removeOnDestroy is not set, as popperInstance.destroy() already removes the element\n\t\t\t\tif (!this.popperInstance.options.removeOnDestroy) {\n\t\t\t\t\tvar popoverNode = this.$refs.popover;\n\t\t\t\t\tpopoverNode.parentNode && popoverNode.parentNode.removeChild(popoverNode);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.$_mounted = false;\n\n\t\t\tthis.$emit('dispose');\n\t\t},\n\t\t$_init: function $_init() {\n\t\t\tif (this.trigger.indexOf('manual') === -1) {\n\t\t\t\tthis.$_addEventListeners();\n\t\t\t}\n\t\t},\n\t\t$_show: function $_show() {\n\t\t\tvar _this3 = this;\n\n\t\t\tvar reference = this.$refs.trigger;\n\t\t\tvar popoverNode = this.$refs.popover;\n\n\t\t\tclearTimeout(this.$_disposeTimer);\n\n\t\t\t// Already open\n\t\t\tif (this.isOpen) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Popper is already initialized\n\t\t\tif (this.popperInstance) {\n\t\t\t\tthis.isOpen = true;\n\t\t\t\tthis.popperInstance.enableEventListeners();\n\t\t\t\tthis.popperInstance.update();\n\t\t\t}\n\n\t\t\tif (!this.$_mounted) {\n\t\t\t\tvar container = this.$_findContainer(this.container, reference);\n\t\t\t\tif (!container) {\n\t\t\t\t\tconsole.warn('No container for popover', this);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcontainer.appendChild(popoverNode);\n\t\t\t\tthis.$_mounted = true;\n\t\t\t}\n\n\t\t\tif (!this.popperInstance) {\n\t\t\t\tvar popperOptions = _extends$1({}, this.popperOptions, {\n\t\t\t\t\tplacement: this.placement\n\t\t\t\t});\n\n\t\t\t\tpopperOptions.modifiers = _extends$1({}, popperOptions.modifiers, {\n\t\t\t\t\tarrow: {\n\t\t\t\t\t\telement: this.$refs.arrow\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (this.offset) {\n\t\t\t\t\tvar offset = this.$_getOffset();\n\n\t\t\t\t\tpopperOptions.modifiers.offset = {\n\t\t\t\t\t\toffset: offset\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (this.boundariesElement) {\n\t\t\t\t\tpopperOptions.modifiers.preventOverflow = {\n\t\t\t\t\t\tboundariesElement: this.boundariesElement\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tthis.popperInstance = new Popper(reference, popoverNode, popperOptions);\n\n\t\t\t\t// Fix position\n\t\t\t\trequestAnimationFrame(function () {\n\t\t\t\t\tif (!_this3.$_isDisposed && _this3.popperInstance) {\n\t\t\t\t\t\t_this3.popperInstance.update();\n\n\t\t\t\t\t\t// Show the tooltip\n\t\t\t\t\t\trequestAnimationFrame(function () {\n\t\t\t\t\t\t\tif (!_this3.$_isDisposed) {\n\t\t\t\t\t\t\t\t_this3.isOpen = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t_this3.dispose();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_this3.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tvar openGroup = this.openGroup;\n\t\t\tif (openGroup) {\n\t\t\t\tvar popover = void 0;\n\t\t\t\tfor (var i = 0; i < openPopovers.length; i++) {\n\t\t\t\t\tpopover = openPopovers[i];\n\t\t\t\t\tif (popover.openGroup !== openGroup) {\n\t\t\t\t\t\tpopover.hide();\n\t\t\t\t\t\tpopover.$emit('close-group');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\topenPopovers.push(this);\n\t\t},\n\t\t$_hide: function $_hide() {\n\t\t\tvar _this4 = this;\n\n\t\t\t// Already hidden\n\t\t\tif (!this.isOpen) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar index = openPopovers.indexOf(this);\n\t\t\tif (index !== -1) {\n\t\t\t\topenPopovers.splice(index, 1);\n\t\t\t}\n\n\t\t\tthis.isOpen = false;\n\t\t\tif (this.popperInstance) {\n\t\t\t\tthis.popperInstance.disableEventListeners();\n\t\t\t}\n\n\t\t\tclearTimeout(this.$_disposeTimer);\n\t\t\tvar disposeTime = directive.options.popover.disposeTimeout || directive.options.disposeTimeout;\n\t\t\tif (disposeTime !== null) {\n\t\t\t\tthis.$_disposeTimer = setTimeout(function () {\n\t\t\t\t\tvar popoverNode = _this4.$refs.popover;\n\t\t\t\t\tif (popoverNode) {\n\t\t\t\t\t\t// Don't remove popper instance, just the HTML element\n\t\t\t\t\t\tpopoverNode.parentNode && popoverNode.parentNode.removeChild(popoverNode);\n\t\t\t\t\t\t_this4.$_mounted = false;\n\t\t\t\t\t}\n\t\t\t\t}, disposeTime);\n\t\t\t}\n\t\t},\n\t\t$_findContainer: function $_findContainer(container, reference) {\n\t\t\t// if container is a query, get the relative element\n\t\t\tif (typeof container === 'string') {\n\t\t\t\tcontainer = window.document.querySelector(container);\n\t\t\t} else if (container === false) {\n\t\t\t\t// if container is `false`, set it to reference parent\n\t\t\t\tcontainer = reference.parentNode;\n\t\t\t}\n\t\t\treturn container;\n\t\t},\n\t\t$_getOffset: function $_getOffset() {\n\t\t\tvar typeofOffset = _typeof(this.offset);\n\t\t\tvar offset = this.offset;\n\n\t\t\t// One value -> switch\n\t\t\tif (typeofOffset === 'number' || typeofOffset === 'string' && offset.indexOf(',') === -1) {\n\t\t\t\toffset = '0, ' + offset;\n\t\t\t}\n\n\t\t\treturn offset;\n\t\t},\n\t\t$_addEventListeners: function $_addEventListeners() {\n\t\t\tvar _this5 = this;\n\n\t\t\tvar reference = this.$refs.trigger;\n\t\t\tvar directEvents = [];\n\t\t\tvar oppositeEvents = [];\n\n\t\t\tvar events = typeof this.trigger === 'string' ? this.trigger.split(' ').filter(function (trigger) {\n\t\t\t\treturn ['click', 'hover', 'focus'].indexOf(trigger) !== -1;\n\t\t\t}) : [];\n\n\t\t\tevents.forEach(function (event) {\n\t\t\t\tswitch (event) {\n\t\t\t\t\tcase 'hover':\n\t\t\t\t\t\tdirectEvents.push('mouseenter');\n\t\t\t\t\t\toppositeEvents.push('mouseleave');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'focus':\n\t\t\t\t\t\tdirectEvents.push('focus');\n\t\t\t\t\t\toppositeEvents.push('blur');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'click':\n\t\t\t\t\t\tdirectEvents.push('click');\n\t\t\t\t\t\toppositeEvents.push('click');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// schedule show tooltip\n\t\t\tdirectEvents.forEach(function (event) {\n\t\t\t\tvar func = function func(event) {\n\t\t\t\t\tif (_this5.isOpen) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tevent.usedByTooltip = true;\n\t\t\t\t\t!_this5.$_preventOpen && _this5.show({ event: event });\n\t\t\t\t};\n\t\t\t\t_this5.$_events.push({ event: event, func: func });\n\t\t\t\treference.addEventListener(event, func);\n\t\t\t});\n\n\t\t\t// schedule hide tooltip\n\t\t\toppositeEvents.forEach(function (event) {\n\t\t\t\tvar func = function func(event) {\n\t\t\t\t\tif (event.usedByTooltip) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t_this5.hide({ event: event });\n\t\t\t\t};\n\t\t\t\t_this5.$_events.push({ event: event, func: func });\n\t\t\t\treference.addEventListener(event, func);\n\t\t\t});\n\t\t},\n\t\t$_scheduleShow: function $_scheduleShow() {\n\t\t\tvar skipDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\t\t\tclearTimeout(this.$_scheduleTimer);\n\t\t\tif (skipDelay) {\n\t\t\t\tthis.$_show();\n\t\t\t} else {\n\t\t\t\t// defaults to 0\n\t\t\t\tvar computedDelay = parseInt(this.delay && this.delay.show || this.delay || 0);\n\t\t\t\tthis.$_scheduleTimer = setTimeout(this.$_show.bind(this), computedDelay);\n\t\t\t}\n\t\t},\n\t\t$_scheduleHide: function $_scheduleHide() {\n\t\t\tvar _this6 = this;\n\n\t\t\tvar event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\t\tvar skipDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\t\t\tclearTimeout(this.$_scheduleTimer);\n\t\t\tif (skipDelay) {\n\t\t\t\tthis.$_hide();\n\t\t\t} else {\n\t\t\t\t// defaults to 0\n\t\t\t\tvar computedDelay = parseInt(this.delay && this.delay.hide || this.delay || 0);\n\t\t\t\tthis.$_scheduleTimer = setTimeout(function () {\n\t\t\t\t\tif (!_this6.isOpen) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if we are hiding because of a mouseleave, we must check that the new\n\t\t\t\t\t// reference isn't the tooltip, because in this case we don't want to hide it\n\t\t\t\t\tif (event && event.type === 'mouseleave') {\n\t\t\t\t\t\tvar isSet = _this6.$_setTooltipNodeEvent(event);\n\n\t\t\t\t\t\t// if we set the new event, don't hide the tooltip yet\n\t\t\t\t\t\t// the new event will take care to hide it if necessary\n\t\t\t\t\t\tif (isSet) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t_this6.$_hide();\n\t\t\t\t}, computedDelay);\n\t\t\t}\n\t\t},\n\t\t$_setTooltipNodeEvent: function $_setTooltipNodeEvent(event) {\n\t\t\tvar _this7 = this;\n\n\t\t\tvar reference = this.$refs.trigger;\n\t\t\tvar popoverNode = this.$refs.popover;\n\n\t\t\tvar relatedreference = event.relatedreference || event.toElement;\n\n\t\t\tvar callback = function callback(event2) {\n\t\t\t\tvar relatedreference2 = event2.relatedreference || event2.toElement;\n\n\t\t\t\t// Remove event listener after call\n\t\t\t\tpopoverNode.removeEventListener(event.type, callback);\n\n\t\t\t\t// If the new reference is not the reference element\n\t\t\t\tif (!reference.contains(relatedreference2)) {\n\t\t\t\t\t// Schedule to hide tooltip\n\t\t\t\t\t_this7.hide({ event: event2 });\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (popoverNode.contains(relatedreference)) {\n\t\t\t\t// listen to mouseleave on the tooltip element to be able to hide the tooltip\n\t\t\t\tpopoverNode.addEventListener(event.type, callback);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t\t$_removeEventListeners: function $_removeEventListeners() {\n\t\t\tvar reference = this.$refs.trigger;\n\t\t\tthis.$_events.forEach(function (_ref3) {\n\t\t\t\tvar func = _ref3.func,\n\t\t\t\t event = _ref3.event;\n\n\t\t\t\treference.removeEventListener(event, func);\n\t\t\t});\n\t\t\tthis.$_events = [];\n\t\t},\n\t\t$_updatePopper: function $_updatePopper(cb) {\n\t\t\tif (this.isOpen && this.popperInstance) {\n\t\t\t\tcb();\n\t\t\t\tthis.popperInstance.update();\n\t\t\t}\n\t\t},\n\t\t$_restartPopper: function $_restartPopper() {\n\t\t\tif (this.popperInstance) {\n\t\t\t\tvar isOpen = this.isOpen;\n\t\t\t\tthis.dispose();\n\t\t\t\tthis.$_init();\n\t\t\t\tif (isOpen) {\n\t\t\t\t\tthis.show();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t$_handleGlobalClose: function $_handleGlobalClose(event) {\n\t\t\tvar _this8 = this;\n\n\t\t\tvar touch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\t\t\tthis.hide({ event: event });\n\n\t\t\tif (event.closePopover) {\n\t\t\t\tthis.$emit('close-directive');\n\t\t\t} else {\n\t\t\t\tthis.$emit('auto-hide');\n\t\t\t}\n\n\t\t\tif (touch) {\n\t\t\t\tthis.$_preventOpen = true;\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t_this8.$_preventOpen = false;\n\t\t\t\t}, 300);\n\t\t\t}\n\t\t},\n\t\t$_handleResize: function $_handleResize() {\n\t\t\tif (this.isOpen && this.popperInstance) {\n\t\t\t\tthis.popperInstance.update();\n\t\t\t\tthis.$emit('resize');\n\t\t\t}\n\t\t}\n\t}\n};\n\nif (typeof document !== 'undefined' && typeof window !== 'undefined') {\n\tif (isIOS) {\n\t\tdocument.addEventListener('touchend', handleGlobalTouchend, supportsPassive ? {\n\t\t\tpassive: true\n\t\t} : false);\n\t} else {\n\t\twindow.addEventListener('click', handleGlobalClick);\n\t}\n}\n\nfunction handleGlobalClick(event) {\n\thandleGlobalClose(event);\n}\n\nfunction handleGlobalTouchend(event) {\n\thandleGlobalClose(event, true);\n}\n\nfunction handleGlobalClose(event) {\n\tvar touch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\tvar popover = void 0;\n\tfor (var i = 0; i < openPopovers.length; i++) {\n\t\tpopover = openPopovers[i];\n\t\tvar contains = popover.$refs.popover.contains(event.target);\n\t\tif (event.closeAllPopover || event.closePopover && contains || popover.autoHide && !contains) {\n\t\t\tpopover.$_handleGlobalClose(event, touch);\n\t\t}\n\t}\n}\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\n\n\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar lodash_merge = createCommonjsModule(function (module, exports) {\n/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = 'object' == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max;\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (typeof key == 'number' && value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (!isArr) {\n var props = isFull ? getAllKeys(value) : keys(value);\n }\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n });\n return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n if (!(isArray(source) || isTypedArray(source))) {\n var props = baseKeysIn(source);\n }\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObject(srcValue)) {\n stack || (stack = new Stack);\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(object[key], srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n });\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = object[key],\n srcValue = source[key],\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n newValue = srcValue;\n if (isArray(srcValue) || isTypedArray(srcValue)) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else {\n isCommon = false;\n newValue = baseClone(srcValue, true);\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\n isCommon = false;\n newValue = baseClone(srcValue, true);\n }\n else {\n newValue = objValue;\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) ||\n objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = merge;\n});\n\nfunction install(Vue) {\n\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\tif (install.installed) return;\n\tinstall.installed = true;\n\n\tvar finalOptions = {};\n\tlodash_merge(finalOptions, defaultOptions, options);\n\n\tplugin.options = finalOptions;\n\tdirective.options = finalOptions;\n\n\tVue.directive('tooltip', directive);\n\tVue.directive('close-popover', vclosepopover);\n\tVue.component('v-popover', Popover);\n}\n\nvar VTooltip = directive;\nvar VClosePopover = vclosepopover;\nvar VPopover = Popover;\n\nvar plugin = {\n\tinstall: install,\n\n\tget enabled() {\n\t\treturn state.enabled;\n\t},\n\n\tset enabled(value) {\n\t\tstate.enabled = value;\n\t}\n};\n\n// Auto-install\nvar GlobalVue = null;\nif (typeof window !== 'undefined') {\n\tGlobalVue = window.Vue;\n} else if (typeof global !== 'undefined') {\n\tGlobalVue = global.Vue;\n}\nif (GlobalVue) {\n\tGlobalVue.use(plugin);\n}\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (plugin);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdi10b29sdGlwL2Rpc3Qvdi10b29sdGlwLmVzbS5qcz81NGRlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlLGtDQUFrQztBQUNqRDtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE9BQU87QUFDUDtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYSxTQUFTO0FBQ3RCLFlBQVk7QUFD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gZGVmYXVsdCBwbHVnaW47XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92LXRvb2x0aXAvZGlzdC92LXRvb2x0aXAuZXNtLmpzXG4vLyBtb2R1bGUgaWQgPSA0MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///41\n");
|
||
|
||
/***/ }),
|
||
/* 42 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass: \"row\",\n class: { disabled: _vm.loading.delete || _vm.loading.disable }\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"avatar\",\n class: {\n \"icon-loading-small\": _vm.loading.delete || _vm.loading.disable\n }\n },\n [\n !_vm.loading.delete && !_vm.loading.disable\n ? _c(\"img\", {\n attrs: {\n alt: \"\",\n width: \"32\",\n height: \"32\",\n src: _vm.generateAvatar(_vm.user.id, 32),\n srcset:\n _vm.generateAvatar(_vm.user.id, 64) +\n \" 2x, \" +\n _vm.generateAvatar(_vm.user.id, 128) +\n \" 4x\"\n }\n })\n : _vm._e()\n ]\n ),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"name\" }, [_vm._v(_vm._s(_vm.user.id))]),\n _vm._v(\" \"),\n _c(\n \"form\",\n {\n staticClass: \"displayName\",\n class: { \"icon-loading-small\": _vm.loading.displayName },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.updateDisplayName($event)\n }\n }\n },\n [\n _c(\"input\", {\n ref: \"displayName\",\n attrs: {\n id: \"displayName\" + _vm.user.id + _vm.rand,\n type: \"text\",\n disabled: _vm.loading.displayName || _vm.loading.all,\n autocomplete: \"new-password\",\n autocorrect: \"off\",\n autocapitalize: \"off\",\n spellcheck: \"false\"\n },\n domProps: { value: _vm.user.displayname }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"icon-confirm\",\n attrs: { type: \"submit\", value: \"\" }\n })\n ]\n ),\n _vm._v(\" \"),\n _vm.settings.canChangePassword\n ? _c(\n \"form\",\n {\n staticClass: \"password\",\n class: { \"icon-loading-small\": _vm.loading.password },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.updatePassword($event)\n }\n }\n },\n [\n _c(\"input\", {\n ref: \"password\",\n attrs: {\n id: \"password\" + _vm.user.id + _vm.rand,\n type: \"password\",\n required: \"\",\n disabled: _vm.loading.password || _vm.loading.all,\n minlength: _vm.minPasswordLength,\n value: \"\",\n placeholder: _vm.t(\"settings\", \"New password\"),\n autocomplete: \"new-password\",\n autocorrect: \"off\",\n autocapitalize: \"off\",\n spellcheck: \"false\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"icon-confirm\",\n attrs: { type: \"submit\", value: \"\" }\n })\n ]\n )\n : _c(\"div\"),\n _vm._v(\" \"),\n _c(\n \"form\",\n {\n staticClass: \"mailAddress\",\n class: { \"icon-loading-small\": _vm.loading.mailAddress },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.updateEmail($event)\n }\n }\n },\n [\n _c(\"input\", {\n ref: \"mailAddress\",\n attrs: {\n id: \"mailAddress\" + _vm.user.id + _vm.rand,\n type: \"email\",\n disabled: _vm.loading.mailAddress || _vm.loading.all,\n autocomplete: \"new-password\",\n autocorrect: \"off\",\n autocapitalize: \"off\",\n spellcheck: \"false\"\n },\n domProps: { value: _vm.user.email }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"icon-confirm\",\n attrs: { type: \"submit\", value: \"\" }\n })\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"groups\",\n class: { \"icon-loading-small\": _vm.loading.groups }\n },\n [\n _c(\"multiselect\", {\n staticClass: \"multiselect-vue\",\n attrs: {\n value: _vm.userGroups,\n options: _vm.groups,\n disabled: _vm.loading.groups || _vm.loading.all,\n \"tag-placeholder\": \"create\",\n placeholder: _vm.t(\"settings\", \"Add user in group\"),\n label: \"name\",\n \"track-by\": \"id\",\n limit: 2,\n limitText: _vm.limitGroups,\n multiple: true,\n taggable: true,\n closeOnSelect: false\n },\n on: {\n tag: _vm.createGroup,\n select: _vm.addUserGroup,\n remove: _vm.removeUserGroup\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.subAdminsGroups.length > 0\n ? _c(\n \"div\",\n {\n staticClass: \"subadmins\",\n class: { \"icon-loading-small\": _vm.loading.subadmins }\n },\n [\n _c(\n \"multiselect\",\n {\n staticClass: \"multiselect-vue\",\n attrs: {\n value: _vm.userSubAdminsGroups,\n options: _vm.subAdminsGroups,\n disabled: _vm.loading.subadmins || _vm.loading.all,\n placeholder: _vm.t(\"settings\", \"Set user as admin for\"),\n label: \"name\",\n \"track-by\": \"id\",\n limit: 2,\n limitText: _vm.limitGroups,\n multiple: true,\n closeOnSelect: false\n },\n on: {\n select: _vm.addUserSubAdmin,\n remove: _vm.removeUserSubAdmin\n }\n },\n [\n _c(\n \"span\",\n { attrs: { slot: \"noResult\" }, slot: \"noResult\" },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"No result\")))]\n )\n ]\n )\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"quota\",\n class: { \"icon-loading-small\": _vm.loading.quota }\n },\n [\n _c(\"multiselect\", {\n staticClass: \"multiselect-vue\",\n attrs: {\n value: _vm.userQuota,\n options: _vm.quotaOptions,\n disabled: _vm.loading.quota || _vm.loading.all,\n \"tag-placeholder\": \"create\",\n placeholder: _vm.t(\"settings\", \"Select user quota\"),\n label: \"label\",\n \"track-by\": \"id\",\n allowEmpty: false,\n taggable: true\n },\n on: { tag: _vm.validateQuota, input: _vm.setUserQuota }\n }),\n _vm._v(\" \"),\n _c(\"progress\", {\n staticClass: \"quota-user-progress\",\n class: { warn: _vm.usedQuota > 80 },\n attrs: { max: \"100\" },\n domProps: { value: _vm.usedQuota }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.showConfig.showLanguages\n ? _c(\n \"div\",\n {\n staticClass: \"languages\",\n class: { \"icon-loading-small\": _vm.loading.languages }\n },\n [\n _c(\"multiselect\", {\n staticClass: \"multiselect-vue\",\n attrs: {\n value: _vm.userLanguage,\n options: _vm.languages,\n disabled: _vm.loading.languages || _vm.loading.all,\n placeholder: _vm.t(\"settings\", \"No language set\"),\n label: \"name\",\n \"track-by\": \"code\",\n allowEmpty: false,\n \"group-values\": \"languages\",\n \"group-label\": \"label\"\n },\n on: { input: _vm.setUserLanguage }\n })\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showStoragePath\n ? _c(\"div\", { staticClass: \"storageLocation\" }, [\n _vm._v(_vm._s(_vm.user.storageLocation))\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showUserBackend\n ? _c(\"div\", { staticClass: \"userBackend\" }, [\n _vm._v(_vm._s(_vm.user.backend))\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showLastLogin\n ? _c(\n \"div\",\n {\n directives: [\n {\n name: \"tooltip\",\n rawName: \"v-tooltip.auto\",\n value:\n _vm.user.lastLogin > 0\n ? _vm.OC.Util.formatDate(_vm.user.lastLogin)\n : \"\",\n expression:\n \"user.lastLogin>0 ? OC.Util.formatDate(user.lastLogin) : ''\",\n modifiers: { auto: true }\n }\n ],\n staticClass: \"lastLogin\"\n },\n [\n _vm._v(\n \"\\n\\t\\t\" +\n _vm._s(\n _vm.user.lastLogin > 0\n ? _vm.OC.Util.relativeModifiedDate(_vm.user.lastLogin)\n : _vm.t(\"settings\", \"Never\")\n ) +\n \"\\n\\t\"\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"userActions\" }, [\n _vm.OC.currentUser !== _vm.user.id &&\n _vm.user.id !== \"admin\" &&\n !_vm.loading.all\n ? _c(\"div\", { staticClass: \"toggleUserActions\" }, [\n _c(\"div\", {\n directives: [\n {\n name: \"click-outside\",\n rawName: \"v-click-outside\",\n value: _vm.hideMenu,\n expression: \"hideMenu\"\n }\n ],\n staticClass: \"icon-more\",\n on: { click: _vm.showMenu }\n }),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"popovermenu\", class: { open: _vm.openedMenu } },\n [_c(\"popover-menu\", { attrs: { menu: _vm.userActions } })],\n 1\n )\n ])\n : _vm._e()\n ])\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-d19586ce\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy91c2VyTGlzdC91c2VyUm93LnZ1ZT8zMGMxIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxjQUFjO0FBQ2QsS0FBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWU7QUFDZjtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlCQUFpQixzQkFBc0I7QUFDdkM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFrQixnREFBZ0Q7QUF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G4gICAgICBzdGF0aWNDbGFzczogXCJyb3dcIixcbiAgICAgIGNsYXNzOiB7IGRpc2FibGVkOiBfdm0ubG9hZGluZy5kZWxldGUgfHwgX3ZtLmxvYWRpbmcuZGlzYWJsZSB9XG4gICAgfSxcbiAgICBbXG4gICAgICBfYyhcbiAgICAgICAgXCJkaXZcIixcbiAgICAgICAge1xuICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImF2YXRhclwiLFxuICAgICAgICAgIGNsYXNzOiB7XG4gICAgICAgICAgICBcImljb24tbG9hZGluZy1zbWFsbFwiOiBfdm0ubG9hZGluZy5kZWxldGUgfHwgX3ZtLmxvYWRpbmcuZGlzYWJsZVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgW1xuICAgICAgICAgICFfdm0ubG9hZGluZy5kZWxldGUgJiYgIV92bS5sb2FkaW5nLmRpc2FibGVcbiAgICAgICAgICAgID8gX2MoXCJpbWdcIiwge1xuICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICBhbHQ6IFwiXCIsXG4gICAgICAgICAgICAgICAgICB3aWR0aDogXCIzMlwiLFxuICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcIjMyXCIsXG4gICAgICAgICAgICAgICAgICBzcmM6IF92bS5nZW5lcmF0ZUF2YXRhcihfdm0udXNlci5pZCwgMzIpLFxuICAgICAgICAgICAgICAgICAgc3Jjc2V0OlxuICAgICAgICAgICAgICAgICAgICBfdm0uZ2VuZXJhdGVBdmF0YXIoX3ZtLnVzZXIuaWQsIDY0KSArXG4gICAgICAgICAgICAgICAgICAgIFwiIDJ4LCBcIiArXG4gICAgICAgICAgICAgICAgICAgIF92bS5nZW5lcmF0ZUF2YXRhcihfdm0udXNlci5pZCwgMTI4KSArXG4gICAgICAgICAgICAgICAgICAgIFwiIDR4XCJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICA6IF92bS5fZSgpXG4gICAgICAgIF1cbiAgICAgICksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJuYW1lXCIgfSwgW192bS5fdihfdm0uX3MoX3ZtLnVzZXIuaWQpKV0pLFxuICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgIF9jKFxuICAgICAgICBcImZvcm1cIixcbiAgICAgICAge1xuICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImRpc3BsYXlOYW1lXCIsXG4gICAgICAgICAgY2xhc3M6IHsgXCJpY29uLWxvYWRpbmctc21hbGxcIjogX3ZtLmxvYWRpbmcuZGlzcGxheU5hbWUgfSxcbiAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgc3VibWl0OiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgJGV2ZW50LnByZXZlbnREZWZhdWx0KClcbiAgICAgICAgICAgICAgcmV0dXJuIF92bS51cGRhdGVEaXNwbGF5TmFtZSgkZXZlbnQpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgX2MoXCJpbnB1dFwiLCB7XG4gICAgICAgICAgICByZWY6IFwiZGlzcGxheU5hbWVcIixcbiAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgIGlkOiBcImRpc3BsYXlOYW1lXCIgKyBfdm0udXNlci5pZCArIF92bS5yYW5kLFxuICAgICAgICAgICAgICB0eXBlOiBcInRleHRcIixcbiAgICAgICAgICAgICAgZGlzYWJsZWQ6IF92bS5sb2FkaW5nLmRpc3BsYXlOYW1lIHx8IF92bS5sb2FkaW5nLmFsbCxcbiAgICAgICAgICAgICAgYXV0b2NvbXBsZXRlOiBcIm5ldy1wYXNzd29yZFwiLFxuICAgICAgICAgICAgICBhdXRvY29ycmVjdDogXCJvZmZcIixcbiAgICAgICAgICAgICAgYXV0b2NhcGl0YWxpemU6IFwib2ZmXCIsXG4gICAgICAgICAgICAgIHNwZWxsY2hlY2s6IFwiZmFsc2VcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGRvbVByb3BzOiB7IHZhbHVlOiBfdm0udXNlci5kaXNwbGF5bmFtZSB9XG4gICAgICAgICAgfSksXG4gICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICBfYyhcImlucHV0XCIsIHtcbiAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImljb24tY29uZmlybVwiLFxuICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJzdWJtaXRcIiwgdmFsdWU6IFwiXCIgfVxuICAgICAgICAgIH0pXG4gICAgICAgIF1cbiAgICAgICksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX3ZtLnNldHRpbmdzLmNhbkNoYW5nZVBhc3N3b3JkXG4gICAgICAgID8gX2MoXG4gICAgICAgICAgICBcImZvcm1cIixcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwicGFzc3dvcmRcIixcbiAgICAgICAgICAgICAgY2xhc3M6IHsgXCJpY29uLWxvYWRpbmctc21hbGxcIjogX3ZtLmxvYWRpbmcucGFzc3dvcmQgfSxcbiAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICBzdWJtaXQ6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgJGV2ZW50LnByZXZlbnREZWZhdWx0KClcbiAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0udXBkYXRlUGFzc3dvcmQoJGV2ZW50KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX2MoXCJpbnB1dFwiLCB7XG4gICAgICAgICAgICAgICAgcmVmOiBcInBhc3N3b3JkXCIsXG4gICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgIGlkOiBcInBhc3N3b3JkXCIgKyBfdm0udXNlci5pZCArIF92bS5yYW5kLFxuICAgICAgICAgICAgICAgICAgdHlwZTogXCJwYXNzd29yZFwiLFxuICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6IFwiXCIsXG4gICAgICAgICAgICAgICAgICBkaXNhYmxlZDogX3ZtLmxvYWRpbmcucGFzc3dvcmQgfHwgX3ZtLmxvYWRpbmcuYWxsLFxuICAgICAgICAgICAgICAgICAgbWlubGVuZ3RoOiBfdm0ubWluUGFzc3dvcmRMZW5ndGgsXG4gICAgICAgICAgICAgICAgICB2YWx1ZTogXCJcIixcbiAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBfdm0udChcInNldHRpbmdzXCIsIFwiTmV3IHBhc3N3b3JkXCIpLFxuICAgICAgICAgICAgICAgICAgYXV0b2NvbXBsZXRlOiBcIm5ldy1wYXNzd29yZFwiLFxuICAgICAgICAgICAgICAgICAgYXV0b2NvcnJlY3Q6IFwib2ZmXCIsXG4gICAgICAgICAgICAgICAgICBhdXRvY2FwaXRhbGl6ZTogXCJvZmZcIixcbiAgICAgICAgICAgICAgICAgIHNwZWxsY2hlY2s6IFwiZmFsc2VcIlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgIF9jKFwiaW5wdXRcIiwge1xuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImljb24tY29uZmlybVwiLFxuICAgICAgICAgICAgICAgIGF0dHJzOiB7IHR5cGU6IFwic3VibWl0XCIsIHZhbHVlOiBcIlwiIH1cbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIF1cbiAgICAgICAgICApXG4gICAgICAgIDogX2MoXCJkaXZcIiksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX2MoXG4gICAgICAgIFwiZm9ybVwiLFxuICAgICAgICB7XG4gICAgICAgICAgc3RhdGljQ2xhc3M6IFwibWFpbEFkZHJlc3NcIixcbiAgICAgICAgICBjbGFzczogeyBcImljb24tbG9hZGluZy1zbWFsbFwiOiBfdm0ubG9hZGluZy5tYWlsQWRkcmVzcyB9LFxuICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICBzdWJtaXQ6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAkZXZlbnQucHJldmVudERlZmF1bHQoKVxuICAgICAgICAgICAgICByZXR1cm4gX3ZtLnVwZGF0ZUVtYWlsKCRldmVudClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIFtcbiAgICAgICAgICBfYyhcImlucHV0XCIsIHtcbiAgICAgICAgICAgIHJlZjogXCJtYWlsQWRkcmVzc1wiLFxuICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgaWQ6IFwibWFpbEFkZHJlc3NcIiArIF92bS51c2VyLmlkICsgX3ZtLnJhbmQsXG4gICAgICAgICAgICAgIHR5cGU6IFwiZW1haWxcIixcbiAgICAgICAgICAgICAgZGlzYWJsZWQ6IF92bS5sb2FkaW5nLm1haWxBZGRyZXNzIHx8IF92bS5sb2FkaW5nLmFsbCxcbiAgICAgICAgICAgICAgYXV0b2NvbXBsZXRlOiBcIm5ldy1wYXNzd29yZFwiLFxuICAgICAgICAgICAgICBhdXRvY29ycmVjdDogXCJvZmZcIixcbiAgICAgICAgICAgICAgYXV0b2NhcGl0YWxpemU6IFwib2ZmXCIsXG4gICAgICAgICAgICAgIHNwZWxsY2hlY2s6IFwiZmFsc2VcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGRvbVByb3BzOiB7IHZhbHVlOiBfdm0udXNlci5lbWFpbCB9XG4gICAgICAgICAgfSksXG4gICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICBfYyhcImlucHV0XCIsIHtcbiAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImljb24tY29uZmlybVwiLFxuICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJzdWJtaXRcIiwgdmFsdWU6IFwiXCIgfVxuICAgICAgICAgIH0pXG4gICAgICAgIF1cbiAgICAgICksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX2MoXG4gICAgICAgIFwiZGl2XCIsXG4gICAgICAgIHtcbiAgICAgICAgICBzdGF0aWNDbGFzczogXCJncm91cHNcIixcbiAgICAgICAgICBjbGFzczogeyBcImljb24tbG9hZGluZy1zbWFsbFwiOiBfdm0ubG9hZGluZy5ncm91cHMgfVxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgX2MoXCJtdWx0aXNlbGVjdFwiLCB7XG4gICAgICAgICAgICBzdGF0aWNDbGFzczogXCJtdWx0aXNlbGVjdC12dWVcIixcbiAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgIHZhbHVlOiBfdm0udXNlckdyb3VwcyxcbiAgICAgICAgICAgICAgb3B0aW9uczogX3ZtLmdyb3VwcyxcbiAgICAgICAgICAgICAgZGlzYWJsZWQ6IF92bS5sb2FkaW5nLmdyb3VwcyB8fCBfdm0ubG9hZGluZy5hbGwsXG4gICAgICAgICAgICAgIFwidGFnLXBsYWNlaG9sZGVyXCI6IFwiY3JlYXRlXCIsXG4gICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBfdm0udChcInNldHRpbmdzXCIsIFwiQWRkIHVzZXIgaW4gZ3JvdXBcIiksXG4gICAgICAgICAgICAgIGxhYmVsOiBcIm5hbWVcIixcbiAgICAgICAgICAgICAgXCJ0cmFjay1ieVwiOiBcImlkXCIsXG4gICAgICAgICAgICAgIGxpbWl0OiAyLFxuICAgICAgICAgICAgICBsaW1pdFRleHQ6IF92bS5saW1pdEdyb3VwcyxcbiAgICAgICAgICAgICAgbXVsdGlwbGU6IHRydWUsXG4gICAgICAgICAgICAgIHRhZ2dhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICBjbG9zZU9uU2VsZWN0OiBmYWxzZVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgIHRhZzogX3ZtLmNyZWF0ZUdyb3VwLFxuICAgICAgICAgICAgICBzZWxlY3Q6IF92bS5hZGRVc2VyR3JvdXAsXG4gICAgICAgICAgICAgIHJlbW92ZTogX3ZtLnJlbW92ZVVzZXJHcm91cFxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIF0sXG4gICAgICAgIDFcbiAgICAgICksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX3ZtLnN1YkFkbWluc0dyb3Vwcy5sZW5ndGggPiAwXG4gICAgICAgID8gX2MoXG4gICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJzdWJhZG1pbnNcIixcbiAgICAgICAgICAgICAgY2xhc3M6IHsgXCJpY29uLWxvYWRpbmctc21hbGxcIjogX3ZtLmxvYWRpbmcuc3ViYWRtaW5zIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgIFwibXVsdGlzZWxlY3RcIixcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJtdWx0aXNlbGVjdC12dWVcIixcbiAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0udXNlclN1YkFkbWluc0dyb3VwcyxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogX3ZtLnN1YkFkbWluc0dyb3VwcyxcbiAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6IF92bS5sb2FkaW5nLnN1YmFkbWlucyB8fCBfdm0ubG9hZGluZy5hbGwsXG4gICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBfdm0udChcInNldHRpbmdzXCIsIFwiU2V0IHVzZXIgYXMgYWRtaW4gZm9yXCIpLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbDogXCJuYW1lXCIsXG4gICAgICAgICAgICAgICAgICAgIFwidHJhY2stYnlcIjogXCJpZFwiLFxuICAgICAgICAgICAgICAgICAgICBsaW1pdDogMixcbiAgICAgICAgICAgICAgICAgICAgbGltaXRUZXh0OiBfdm0ubGltaXRHcm91cHMsXG4gICAgICAgICAgICAgICAgICAgIG11bHRpcGxlOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBjbG9zZU9uU2VsZWN0OiBmYWxzZVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdDogX3ZtLmFkZFVzZXJTdWJBZG1pbixcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlOiBfdm0ucmVtb3ZlVXNlclN1YkFkbWluXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgXCJzcGFuXCIsXG4gICAgICAgICAgICAgICAgICAgIHsgYXR0cnM6IHsgc2xvdDogXCJub1Jlc3VsdFwiIH0sIHNsb3Q6IFwibm9SZXN1bHRcIiB9LFxuICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhfdm0udChcInNldHRpbmdzXCIsIFwiTm8gcmVzdWx0XCIpKSldXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgMVxuICAgICAgICAgIClcbiAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcbiAgICAgICAgXCJkaXZcIixcbiAgICAgICAge1xuICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInF1b3RhXCIsXG4gICAgICAgICAgY2xhc3M6IHsgXCJpY29uLWxvYWRpbmctc21hbGxcIjogX3ZtLmxvYWRpbmcucXVvdGEgfVxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgX2MoXCJtdWx0aXNlbGVjdFwiLCB7XG4gICAgICAgICAgICBzdGF0aWNDbGFzczogXCJtdWx0aXNlbGVjdC12dWVcIixcbiAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgIHZhbHVlOiBfdm0udXNlclF1b3RhLFxuICAgICAgICAgICAgICBvcHRpb25zOiBfdm0ucXVvdGFPcHRpb25zLFxuICAgICAgICAgICAgICBkaXNhYmxlZDogX3ZtLmxvYWRpbmcucXVvdGEgfHwgX3ZtLmxvYWRpbmcuYWxsLFxuICAgICAgICAgICAgICBcInRhZy1wbGFjZWhvbGRlclwiOiBcImNyZWF0ZVwiLFxuICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIlNlbGVjdCB1c2VyIHF1b3RhXCIpLFxuICAgICAgICAgICAgICBsYWJlbDogXCJsYWJlbFwiLFxuICAgICAgICAgICAgICBcInRyYWNrLWJ5XCI6IFwiaWRcIixcbiAgICAgICAgICAgICAgYWxsb3dFbXB0eTogZmFsc2UsXG4gICAgICAgICAgICAgIHRhZ2dhYmxlOiB0cnVlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb246IHsgdGFnOiBfdm0udmFsaWRhdGVRdW90YSwgaW5wdXQ6IF92bS5zZXRVc2VyUXVvdGEgfVxuICAgICAgICAgIH0pLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX2MoXCJwcm9ncmVzc1wiLCB7XG4gICAgICAgICAgICBzdGF0aWNDbGFzczogXCJxdW90YS11c2VyLXByb2dyZXNzXCIsXG4gICAgICAgICAgICBjbGFzczogeyB3YXJuOiBfdm0udXNlZFF1b3RhID4gODAgfSxcbiAgICAgICAgICAgIGF0dHJzOiB7IG1heDogXCIxMDBcIiB9LFxuICAgICAgICAgICAgZG9tUHJvcHM6IHsgdmFsdWU6IF92bS51c2VkUXVvdGEgfVxuICAgICAgICAgIH0pXG4gICAgICAgIF0sXG4gICAgICAgIDFcbiAgICAgICksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX3ZtLnNob3dDb25maWcuc2hvd0xhbmd1YWdlc1xuICAgICAgICA/IF9jKFxuICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwibGFuZ3VhZ2VzXCIsXG4gICAgICAgICAgICAgIGNsYXNzOiB7IFwiaWNvbi1sb2FkaW5nLXNtYWxsXCI6IF92bS5sb2FkaW5nLmxhbmd1YWdlcyB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICBfYyhcIm11bHRpc2VsZWN0XCIsIHtcbiAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJtdWx0aXNlbGVjdC12dWVcIixcbiAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS51c2VyTGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgICBvcHRpb25zOiBfdm0ubGFuZ3VhZ2VzLFxuICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6IF92bS5sb2FkaW5nLmxhbmd1YWdlcyB8fCBfdm0ubG9hZGluZy5hbGwsXG4gICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIk5vIGxhbmd1YWdlIHNldFwiKSxcbiAgICAgICAgICAgICAgICAgIGxhYmVsOiBcIm5hbWVcIixcbiAgICAgICAgICAgICAgICAgIFwidHJhY2stYnlcIjogXCJjb2RlXCIsXG4gICAgICAgICAgICAgICAgICBhbGxvd0VtcHR5OiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgIFwiZ3JvdXAtdmFsdWVzXCI6IFwibGFuZ3VhZ2VzXCIsXG4gICAgICAgICAgICAgICAgICBcImdyb3VwLWxhYmVsXCI6IFwibGFiZWxcIlxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb246IHsgaW5wdXQ6IF92bS5zZXRVc2VyTGFuZ3VhZ2UgfVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIDFcbiAgICAgICAgICApXG4gICAgICAgIDogX3ZtLl9lKCksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX3ZtLnNob3dDb25maWcuc2hvd1N0b3JhZ2VQYXRoXG4gICAgICAgID8gX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJzdG9yYWdlTG9jYXRpb25cIiB9LCBbXG4gICAgICAgICAgICBfdm0uX3YoX3ZtLl9zKF92bS51c2VyLnN0b3JhZ2VMb2NhdGlvbikpXG4gICAgICAgICAgXSlcbiAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfdm0uc2hvd0NvbmZpZy5zaG93VXNlckJhY2tlbmRcbiAgICAgICAgPyBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcInVzZXJCYWNrZW5kXCIgfSwgW1xuICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0udXNlci5iYWNrZW5kKSlcbiAgICAgICAgICBdKVxuICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgIF92bS5zaG93Q29uZmlnLnNob3dMYXN0TG9naW5cbiAgICAgICAgPyBfYyhcbiAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBuYW1lOiBcInRvb2x0aXBcIixcbiAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi10b29sdGlwLmF1dG9cIixcbiAgICAgICAgICAgICAgICAgIHZhbHVlOlxuICAgICAgICAgICAgICAgICAgICBfdm0udXNlci5sYXN0TG9naW4gPiAwXG4gICAgICAgICAgICAgICAgICAgICAgPyBfdm0uT0MuVXRpbC5mb3JtYXREYXRlKF92bS51c2VyLmxhc3RMb2dpbilcbiAgICAgICAgICAgICAgICAgICAgICA6IFwiXCIsXG4gICAgICAgICAgICAgICAgICBleHByZXNzaW9uOlxuICAgICAgICAgICAgICAgICAgICBcInVzZXIubGFzdExvZ2luPjAgPyBPQy5VdGlsLmZvcm1hdERhdGUodXNlci5sYXN0TG9naW4pIDogJydcIixcbiAgICAgICAgICAgICAgICAgIG1vZGlmaWVyczogeyBhdXRvOiB0cnVlIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImxhc3RMb2dpblwiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICBfdm0uX3YoXG4gICAgICAgICAgICAgICAgXCJcXG5cXHRcXHRcIiArXG4gICAgICAgICAgICAgICAgICBfdm0uX3MoXG4gICAgICAgICAgICAgICAgICAgIF92bS51c2VyLmxhc3RMb2dpbiA+IDBcbiAgICAgICAgICAgICAgICAgICAgICA/IF92bS5PQy5VdGlsLnJlbGF0aXZlTW9kaWZpZWREYXRlKF92bS51c2VyLmxhc3RMb2dpbilcbiAgICAgICAgICAgICAgICAgICAgICA6IF92bS50KFwic2V0dGluZ3NcIiwgXCJOZXZlclwiKVxuICAgICAgICAgICAgICAgICAgKSArXG4gICAgICAgICAgICAgICAgICBcIlxcblxcdFwiXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIF1cbiAgICAgICAgICApXG4gICAgICAgIDogX3ZtLl9lKCksXG4gICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJ1c2VyQWN0aW9uc1wiIH0sIFtcbiAgICAgICAgX3ZtLk9DLmN1cnJlbnRVc2VyICE9PSBfdm0udXNlci5pZCAmJlxuICAgICAgICBfdm0udXNlci5pZCAhPT0gXCJhZG1pblwiICYmXG4gICAgICAgICFfdm0ubG9hZGluZy5hbGxcbiAgICAgICAgICA/IF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwidG9nZ2xlVXNlckFjdGlvbnNcIiB9LCBbXG4gICAgICAgICAgICAgIF9jKFwiZGl2XCIsIHtcbiAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiY2xpY2stb3V0c2lkZVwiLFxuICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtY2xpY2stb3V0c2lkZVwiLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLmhpZGVNZW51LFxuICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcImhpZGVNZW51XCJcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImljb24tbW9yZVwiLFxuICAgICAgICAgICAgICAgIG9uOiB7IGNsaWNrOiBfdm0uc2hvd01lbnUgfVxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcInBvcG92ZXJtZW51XCIsIGNsYXNzOiB7IG9wZW46IF92bS5vcGVuZWRNZW51IH0gfSxcbiAgICAgICAgICAgICAgICBbX2MoXCJwb3BvdmVyLW1lbnVcIiwgeyBhdHRyczogeyBtZW51OiBfdm0udXNlckFjdGlvbnMgfSB9KV0sXG4gICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICBdKVxuICAgICAgICAgIDogX3ZtLl9lKClcbiAgICAgIF0pXG4gICAgXVxuICApXG59XG52YXIgc3RhdGljUmVuZGVyRm5zID0gW11cbnJlbmRlci5fd2l0aFN0cmlwcGVkID0gdHJ1ZVxudmFyIGVzRXhwb3J0cyA9IHsgcmVuZGVyOiByZW5kZXIsIHN0YXRpY1JlbmRlckZuczogc3RhdGljUmVuZGVyRm5zIH1cbmV4cG9ydCBkZWZhdWx0IGVzRXhwb3J0c1xuaWYgKG1vZHVsZS5ob3QpIHtcbiAgbW9kdWxlLmhvdC5hY2NlcHQoKVxuICBpZiAobW9kdWxlLmhvdC5kYXRhKSB7XG4gICAgcmVxdWlyZShcInZ1ZS1ob3QtcmVsb2FkLWFwaVwiKSAgICAgIC5yZXJlbmRlcihcImRhdGEtdi1kMTk1ODZjZVwiLCBlc0V4cG9ydHMpXG4gIH1cbn1cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi90ZW1wbGF0ZS1jb21waWxlcj97XCJpZFwiOlwiZGF0YS12LWQxOTU4NmNlXCIsXCJoYXNTY29wZWRcIjpmYWxzZSxcImJ1YmxlXCI6e1widHJhbnNmb3Jtc1wiOnt9fX0hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT10ZW1wbGF0ZSZpbmRleD0wIS4vc3JjL2NvbXBvbmVudHMvdXNlckxpc3QvdXNlclJvdy52dWVcbi8vIG1vZHVsZSBpZCA9IDQyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///42\n");
|
||
|
||
/***/ }),
|
||
/* 43 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
eval("!function(e,t){ true?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.VueInfiniteLoading=t():e.VueInfiniteLoading=t()}(\"undefined\"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,\"a\",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"/\",t(t.s=3)}([function(e,t){function i(e,t){var i=e[1]||\"\",a=e[3];if(!a)return i;if(t&&\"function\"==typeof btoa){var r=n(a);return[i].concat(a.sources.map(function(e){return\"/*# sourceURL=\"+a.sourceRoot+e+\" */\"})).concat([r]).join(\"\\n\")}return[i].join(\"\\n\")}function n(e){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+\" */\"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=i(t,e);return t[2]?\"@media \"+t[2]+\"{\"+n+\"}\":n}).join(\"\")},t.i=function(e,i){\"string\"==typeof e&&(e=[[null,e,\"\"]]);for(var n={},a=0;a<this.length;a++){var r=this[a][0];\"number\"==typeof r&&(n[r]=!0)}for(a=0;a<e.length;a++){var o=e[a];\"number\"==typeof o[0]&&n[o[0]]||(i&&!o[2]?o[2]=i:i&&(o[2]=\"(\"+o[2]+\") and (\"+i+\")\"),t.push(o))}},t}},function(e,t,i){function n(e){for(var t=0;t<e.length;t++){var i=e[t],n=f[i.id];if(n){n.refs++;for(var a=0;a<n.parts.length;a++)n.parts[a](i.parts[a]);for(;a<i.parts.length;a++)n.parts.push(r(i.parts[a]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{for(var o=[],a=0;a<i.parts.length;a++)o.push(r(i.parts[a]));f[i.id]={id:i.id,refs:1,parts:o}}}}function a(){var e=document.createElement(\"style\");return e.type=\"text/css\",c.appendChild(e),e}function r(e){var t,i,n=document.querySelector('style[data-vue-ssr-id~=\"'+e.id+'\"]');if(n){if(m)return h;n.parentNode.removeChild(n)}if(b){var r=p++;n=u||(u=a()),t=o.bind(null,n,r,!1),i=o.bind(null,n,r,!0)}else n=a(),t=s.bind(null,n),i=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else i()}}function o(e,t,i,n){var a=i?\"\":n.css;if(e.styleSheet)e.styleSheet.cssText=g(t,a);else{var r=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(r,o[t]):e.appendChild(r)}}function s(e,t){var i=t.css,n=t.media,a=t.sourceMap;if(n&&e.setAttribute(\"media\",n),a&&(i+=\"\\n/*# sourceURL=\"+a.sources[0]+\" */\",i+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+\" */\"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var l=\"undefined\"!=typeof document;if(\"undefined\"!=typeof DEBUG&&DEBUG&&!l)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 d=i(7),f={},c=l&&(document.head||document.getElementsByTagName(\"head\")[0]),u=null,p=0,m=!1,h=function(){},b=\"undefined\"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,i){m=i;var a=d(e,t);return n(a),function(t){for(var i=[],r=0;r<a.length;r++){var o=a[r],s=f[o.id];s.refs--,i.push(s)}t?(a=d(e,t),n(a)):a=[];for(var r=0;r<i.length;r++){var s=i[r];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete f[s.id]}}}};var g=function(){var e=[];return function(t,i){return e[t]=i,e.filter(Boolean).join(\"\\n\")}}()},function(e,t){e.exports=function(e,t,i,n,a,r){var o,s=e=e||{},l=typeof e.default;\"object\"!==l&&\"function\"!==l||(o=e,s=e.default);var d=\"function\"==typeof s?s.options:s;t&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0),i&&(d.functional=!0),a&&(d._scopeId=a);var f;if(r?(f=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||\"undefined\"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},d._ssrRegister=f):n&&(f=n),f){var c=d.functional,u=c?d.render:d.beforeCreate;c?(d._injectStyles=f,d.render=function(e,t){return f.call(t),u(e,t)}):d.beforeCreate=u?[].concat(u,f):[f]}return{esModule:o,exports:s,options:d}}},function(e,t,i){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=i(4);t.default=n.a,\"undefined\"!=typeof window&&window.Vue&&window.Vue.component(\"infinite-loading\",n.a)},function(e,t,i){\"use strict\";function n(e){i(5)}var a=i(8),r=i(14),o=i(2),s=n,l=o(a.a,r.a,!1,s,\"data-v-fb2c869e\",null);t.a=l.exports},function(e,t,i){var n=i(6);\"string\"==typeof n&&(n=[[e.i,n,\"\"]]),n.locals&&(e.exports=n.locals);i(1)(\"2249d7a7\",n,!0)},function(e,t,i){t=e.exports=i(0)(void 0),t.push([e.i,\".infinite-loading-container[data-v-fb2c869e]{clear:both;text-align:center}.infinite-loading-container[data-v-fb2c869e] [class^=loading-]{display:inline-block;margin:15px 0;width:28px;height:28px;font-size:28px;line-height:28px;border-radius:50%}.infinite-status-prompt[data-v-fb2c869e]{color:#666;font-size:14px;text-align:center;padding:10px 0}\",\"\"])},function(e,t){e.exports=function(e,t){for(var i=[],n={},a=0;a<t.length;a++){var r=t[a],o=r[0],s=r[1],l=r[2],d=r[3],f={id:e+\":\"+a,css:s,media:l,sourceMap:d};n[o]?n[o].parts.push(f):i.push(n[o]={id:o,parts:[f]})}return i}},function(e,t,i){\"use strict\";var n=i(9),a={STATE_CHANGER:[\"[Vue-infinite-loading warn]: emit `loaded` and `complete` event through component instance of `$refs` may cause error, so it will be deprecated soon, please use the `$state` argument instead (`$state` just the special `$event` variable):\",\"\\ntemplate:\",'<infinite-loading @infinite=\"infiniteHandler\"></infinite-loading>',\"\\nscript:\\n...\\ninfiniteHandler($state) {\\n ajax('https://www.example.com/api/news')\\n .then((res) => {\\n if (res.data.length) {\\n $state.loaded();\\n } else {\\n $state.complete();\\n }\\n });\\n}\\n...\",\"\",\"more details: https://github.com/PeachScript/vue-infinite-loading/issues/57#issuecomment-324370549\"].join(\"\\n\"),INFINITE_EVENT:\"[Vue-infinite-loading warn]: `:on-infinite` property will be deprecated soon, please use `@infinite` event instead.\"},r={INFINITE_LOOP:[\"[Vue-infinite-loading error]: executed the callback function more than 10 times for a short time, it looks like searched a wrong scroll wrapper that doest not has fixed height or maximum height, please check it. If you want to force to set a element as scroll wrapper ranther than automatic searching, you can do this:\",'\\n\\x3c!-- add a special attribute for the real scroll wrapper --\\x3e\\n<div infinite-wrapper>\\n ...\\n \\x3c!-- set force-use-infinite-wrapper to true --\\x3e\\n <infinite-loading force-use-infinite-wrapper=\"true\"></infinite-loading>\\n</div>\\n ',\"more details: https://github.com/PeachScript/vue-infinite-loading/issues/55#issuecomment-316934169\"].join(\"\\n\")};t.a={name:\"InfiniteLoading\",data:function(){return{scrollParent:null,scrollHandler:null,isLoading:!1,isComplete:!1,isFirstLoad:!0,debounceTimer:null,debounceDuration:50,infiniteLoopChecked:!1,infiniteLoopTimer:null,continuousCallTimes:0}},components:{Spinner:n.a},computed:{isNoResults:{cache:!1,get:function(){var e=this.$slots[\"no-results\"],t=e&&e[0].elm&&\"\"===e[0].elm.textContent;return!this.isLoading&&this.isComplete&&this.isFirstLoad&&!t}},isNoMore:{cache:!1,get:function(){var e=this.$slots[\"no-more\"],t=e&&e[0].elm&&\"\"===e[0].elm.textContent;return!this.isLoading&&this.isComplete&&!this.isFirstLoad&&!t}}},props:{distance:{type:Number,default:100},onInfinite:Function,spinner:String,direction:{type:String,default:\"bottom\"},forceUseInfiniteWrapper:null},mounted:function(){var e=this;this.scrollParent=this.getScrollParent(),this.scrollHandler=function(e){this.isLoading||(clearTimeout(this.debounceTimer),e&&e.constructor===Event?this.debounceTimer=setTimeout(this.attemptLoad,this.debounceDuration):this.attemptLoad())}.bind(this),setTimeout(this.scrollHandler,1),this.scrollParent.addEventListener(\"scroll\",this.scrollHandler),this.$on(\"$InfiniteLoading:loaded\",function(t){e.isFirstLoad=!1,e.isLoading&&e.$nextTick(e.attemptLoad.bind(null,!0)),t&&t.target===e||console.warn(a.STATE_CHANGER)}),this.$on(\"$InfiniteLoading:complete\",function(t){e.isLoading=!1,e.isComplete=!0,e.$nextTick(function(){e.$forceUpdate()}),e.scrollParent.removeEventListener(\"scroll\",e.scrollHandler),t&&t.target===e||console.warn(a.STATE_CHANGER)}),this.$on(\"$InfiniteLoading:reset\",function(){e.isLoading=!1,e.isComplete=!1,e.isFirstLoad=!0,e.scrollParent.addEventListener(\"scroll\",e.scrollHandler),setTimeout(e.scrollHandler,1)}),this.onInfinite&&console.warn(a.INFINITE_EVENT),this.stateChanger={loaded:function(){e.$emit(\"$InfiniteLoading:loaded\",{target:e})},complete:function(){e.$emit(\"$InfiniteLoading:complete\",{target:e})},reset:function(){e.$emit(\"$InfiniteLoading:reset\",{target:e})}},this.$watch(\"forceUseInfiniteWrapper\",function(){e.scrollParent=e.getScrollParent()})},deactivated:function(){this.isLoading=!1,this.scrollParent.removeEventListener(\"scroll\",this.scrollHandler)},activated:function(){this.scrollParent.addEventListener(\"scroll\",this.scrollHandler)},methods:{attemptLoad:function(e){var t=this,i=this.getCurrentDistance();!this.isComplete&&i<=this.distance&&this.$el.offsetWidth+this.$el.offsetHeight>0?(this.isLoading=!0,\"function\"==typeof this.onInfinite?this.onInfinite.call(null,this.stateChanger):this.$emit(\"infinite\",this.stateChanger),!e||this.forceUseInfiniteWrapper||this.infiniteLoopChecked||(this.continuousCallTimes+=1,clearTimeout(this.infiniteLoopTimer),this.infiniteLoopTimer=setTimeout(function(){t.infiniteLoopChecked=!0},1e3),this.continuousCallTimes>10&&(console.error(r.INFINITE_LOOP),this.infiniteLoopChecked=!0))):this.isLoading=!1},getCurrentDistance:function(){var e=void 0;if(\"top\"===this.direction)e=isNaN(this.scrollParent.scrollTop)?this.scrollParent.pageYOffset:this.scrollParent.scrollTop;else{e=this.$el.getBoundingClientRect().top-(this.scrollParent===window?window.innerHeight:this.scrollParent.getBoundingClientRect().bottom)}return e},getScrollParent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$el,t=void 0;return\"BODY\"===e.tagName?t=window:!this.forceUseInfiniteWrapper&&[\"scroll\",\"auto\"].indexOf(getComputedStyle(e).overflowY)>-1?t=e:(e.hasAttribute(\"infinite-wrapper\")||e.hasAttribute(\"data-infinite-wrapper\"))&&(t=e),t||this.getScrollParent(e.parentNode)}},destroyed:function(){this.isComplete||this.scrollParent.removeEventListener(\"scroll\",this.scrollHandler)}}},function(e,t,i){\"use strict\";function n(e){i(10)}var a=i(12),r=i(13),o=i(2),s=n,l=o(a.a,r.a,!1,s,\"data-v-6e1fd88f\",null);t.a=l.exports},function(e,t,i){var n=i(11);\"string\"==typeof n&&(n=[[e.i,n,\"\"]]),n.locals&&(e.exports=n.locals);i(1)(\"29881045\",n,!0)},function(e,t,i){t=e.exports=i(0)(void 0),t.push([e.i,'.loading-wave-dots[data-v-6e1fd88f]{position:relative}.loading-wave-dots[data-v-6e1fd88f] .wave-item{position:absolute;top:50%;left:50%;display:inline-block;margin-top:-4px;width:8px;height:8px;border-radius:50%;-webkit-animation:loading-wave-dots-data-v-6e1fd88f linear 2.8s infinite;animation:loading-wave-dots-data-v-6e1fd88f linear 2.8s infinite}.loading-wave-dots[data-v-6e1fd88f] .wave-item:first-child{margin-left:-36px}.loading-wave-dots[data-v-6e1fd88f] .wave-item:nth-child(2){margin-left:-20px;-webkit-animation-delay:.14s;animation-delay:.14s}.loading-wave-dots[data-v-6e1fd88f] .wave-item:nth-child(3){margin-left:-4px;-webkit-animation-delay:.28s;animation-delay:.28s}.loading-wave-dots[data-v-6e1fd88f] .wave-item:nth-child(4){margin-left:12px;-webkit-animation-delay:.42s;animation-delay:.42s}.loading-wave-dots[data-v-6e1fd88f] .wave-item:last-child{margin-left:28px;-webkit-animation-delay:.56s;animation-delay:.56s}@-webkit-keyframes loading-wave-dots-data-v-6e1fd88f{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}@keyframes loading-wave-dots-data-v-6e1fd88f{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}.loading-circles[data-v-6e1fd88f] .circle-item{width:5px;height:5px;-webkit-animation:loading-circles-data-v-6e1fd88f linear .75s infinite;animation:loading-circles-data-v-6e1fd88f linear .75s infinite}.loading-circles[data-v-6e1fd88f] .circle-item:first-child{margin-top:-14.5px;margin-left:-2.5px}.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(2){margin-top:-11.26px;margin-left:6.26px}.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(3){margin-top:-2.5px;margin-left:9.5px}.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(4){margin-top:6.26px;margin-left:6.26px}.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(5){margin-top:9.5px;margin-left:-2.5px}.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(6){margin-top:6.26px;margin-left:-11.26px}.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(7){margin-top:-2.5px;margin-left:-14.5px}.loading-circles[data-v-6e1fd88f] .circle-item:last-child{margin-top:-11.26px;margin-left:-11.26px}@-webkit-keyframes loading-circles-data-v-6e1fd88f{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}@keyframes loading-circles-data-v-6e1fd88f{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}.loading-bubbles[data-v-6e1fd88f] .bubble-item{background:#666;-webkit-animation:loading-bubbles-data-v-6e1fd88f linear .75s infinite;animation:loading-bubbles-data-v-6e1fd88f linear .75s infinite}.loading-bubbles[data-v-6e1fd88f] .bubble-item:first-child{margin-top:-12.5px;margin-left:-.5px}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(2){margin-top:-9.26px;margin-left:8.26px}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(3){margin-top:-.5px;margin-left:11.5px}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(4){margin-top:8.26px;margin-left:8.26px}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(5){margin-top:11.5px;margin-left:-.5px}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(6){margin-top:8.26px;margin-left:-9.26px}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(7){margin-top:-.5px;margin-left:-12.5px}.loading-bubbles[data-v-6e1fd88f] .bubble-item:last-child{margin-top:-9.26px;margin-left:-9.26px}@-webkit-keyframes loading-bubbles-data-v-6e1fd88f{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}@keyframes loading-bubbles-data-v-6e1fd88f{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}.loading-default[data-v-6e1fd88f]{position:relative;border:1px solid #999;-webkit-animation:loading-rotating-data-v-6e1fd88f ease 1.5s infinite;animation:loading-rotating-data-v-6e1fd88f ease 1.5s infinite}.loading-default[data-v-6e1fd88f]:before{content:\"\";position:absolute;display:block;top:0;left:50%;margin-top:-3px;margin-left:-3px;width:6px;height:6px;background-color:#999;border-radius:50%}.loading-spiral[data-v-6e1fd88f]{border:2px solid #777;border-right-color:transparent;-webkit-animation:loading-rotating-data-v-6e1fd88f linear .85s infinite;animation:loading-rotating-data-v-6e1fd88f linear .85s infinite}@-webkit-keyframes loading-rotating-data-v-6e1fd88f{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loading-rotating-data-v-6e1fd88f{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-bubbles[data-v-6e1fd88f],.loading-circles[data-v-6e1fd88f]{position:relative}.loading-bubbles[data-v-6e1fd88f] .bubble-item,.loading-circles[data-v-6e1fd88f] .circle-item{position:absolute;top:50%;left:50%;display:inline-block;border-radius:50%}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(2),.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(2){-webkit-animation-delay:93ms;animation-delay:93ms}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(3),.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(3){-webkit-animation-delay:.186s;animation-delay:.186s}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(4),.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(4){-webkit-animation-delay:.279s;animation-delay:.279s}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(5),.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(5){-webkit-animation-delay:.372s;animation-delay:.372s}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(6),.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(6){-webkit-animation-delay:.465s;animation-delay:.465s}.loading-bubbles[data-v-6e1fd88f] .bubble-item:nth-child(7),.loading-circles[data-v-6e1fd88f] .circle-item:nth-child(7){-webkit-animation-delay:.558s;animation-delay:.558s}.loading-bubbles[data-v-6e1fd88f] .bubble-item:last-child,.loading-circles[data-v-6e1fd88f] .circle-item:last-child{-webkit-animation-delay:.651s;animation-delay:.651s}',\"\"])},function(e,t,i){\"use strict\";var n={BUBBLES:{render:function(e){return e(\"span\",{attrs:{class:\"loading-bubbles\"}},Array.apply(Array,Array(8)).map(function(){return e(\"span\",{attrs:{class:\"bubble-item\"}})}))}},CIRCLES:{render:function(e){return e(\"span\",{attrs:{class:\"loading-circles\"}},Array.apply(Array,Array(8)).map(function(){return e(\"span\",{attrs:{class:\"circle-item\"}})}))}},DEFAULT:{render:function(e){return e(\"i\",{attrs:{class:\"loading-default\"}})}},SPIRAL:{render:function(e){return e(\"i\",{attrs:{class:\"loading-spiral\"}})}},WAVEDOTS:{render:function(e){return e(\"span\",{attrs:{class:\"loading-wave-dots\"}},Array.apply(Array,Array(5)).map(function(){return e(\"span\",{attrs:{class:\"wave-item\"}})}))}}};t.a={name:\"spinner\",computed:{spinnerView:function(){return n[(this.spinner||\"\").toUpperCase()]||n.DEFAULT}},props:{spinner:String}}},function(e,t,i){\"use strict\";var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.spinnerView,{tag:\"component\"})},a=[],r={render:n,staticRenderFns:a};t.a=r},function(e,t,i){\"use strict\";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i(\"div\",{staticClass:\"infinite-loading-container\"},[i(\"div\",{directives:[{name:\"show\",rawName:\"v-show\",value:e.isLoading,expression:\"isLoading\"}]},[e._t(\"spinner\",[i(\"spinner\",{attrs:{spinner:e.spinner}})])],2),e._v(\" \"),i(\"div\",{directives:[{name:\"show\",rawName:\"v-show\",value:e.isNoResults,expression:\"isNoResults\"}],staticClass:\"infinite-status-prompt\"},[e._t(\"no-results\",[e._v(\"No results :(\")])],2),e._v(\" \"),i(\"div\",{directives:[{name:\"show\",rawName:\"v-show\",value:e.isNoMore,expression:\"isNoMore\"}],staticClass:\"infinite-status-prompt\"},[e._t(\"no-more\",[e._v(\"No more data :)\")])],2)])},a=[],r={render:n,staticRenderFns:a};t.a=r}])});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdnVlLWluZmluaXRlLWxvYWRpbmcvZGlzdC92dWUtaW5maW5pdGUtbG9hZGluZy5qcz9hOGFmIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQWUsNkpBQXlNLCtDQUErQyxtQkFBbUIsY0FBYyw0QkFBNEIsWUFBWSxxQkFBcUIsMkRBQTJELFNBQVMsdUNBQXVDLHFDQUFxQyxvQ0FBb0MsRUFBRSxpQkFBaUIsaUNBQWlDLGlCQUFpQixZQUFZLFVBQVUsc0JBQXNCLG1CQUFtQixpREFBaUQsa0JBQWtCLGdCQUFnQixnQkFBZ0Isc0JBQXNCLGVBQWUsK0JBQStCLFdBQVcsMkNBQTJDLDRDQUE0QywwQkFBMEIscUJBQXFCLGNBQWMsa0RBQWtELGNBQWMscUVBQXFFLHNCQUFzQixTQUFTLDZCQUE2Qiw0QkFBNEIsYUFBYSw2QkFBNkIsTUFBTSxJQUFJLFdBQVcsbUJBQW1CLHNDQUFzQyxZQUFZLEtBQUssY0FBYyxLQUFLLGlCQUFpQiw4QkFBOEIsUUFBUSxXQUFXLEtBQUssV0FBVyxnR0FBZ0csSUFBSSxpQkFBaUIsY0FBYyxZQUFZLFdBQVcsS0FBSyxxQkFBcUIsTUFBTSxTQUFTLFlBQVksaUJBQWlCLDJCQUEyQixLQUFLLGlCQUFpQixnQ0FBZ0MsK0RBQStELEtBQUssaUJBQWlCLGlCQUFpQ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9XSxzdGF0aWNDbGFzczpcImluZmluaXRlLXN0YXR1cy1wcm9tcHRcIn0sW2UuX3QoXCJuby1yZXN1bHRzXCIsW2UuX3YoXCJObyByZXN1bHRzIDooXCIpXSldLDIpLGUuX3YoXCIgXCIpLGkoXCJkaXZcIix7ZGlyZWN0aXZlczpbe25hbWU6XCJzaG93XCIscmF3TmFtZTpcInYtc2hvd1wiLHZhbHVlOmUuaXNOb01vcmUsZXhwcmVzc2lvbjpcImlzTm9Nb3JlXCJ9XSxzdGF0aWNDbGFzczpcImluZmluaXRlLXN0YXR1cy1wcm9tcHRcIn0sW2UuX3QoXCJuby1tb3JlXCIsW2UuX3YoXCJObyBtb3JlIGRhdGEgOilcIildKV0sMildKX0sYT1bXSxyPXtyZW5kZXI6bixzdGF0aWNSZW5kZXJGbnM6YX07dC5hPXJ9XSl9KTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWUtaW5maW5pdGUtbG9hZGluZy9kaXN0L3Z1ZS1pbmZpbml0ZS1sb2FkaW5nLmpzXG4vLyBtb2R1bGUgaWQgPSA0M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///43\n");
|
||
|
||
/***/ }),
|
||
/* 44 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass: \"user-list-grid\",\n attrs: { id: \"app-content\" },\n on: {\n \"&scroll\": function($event) {\n return _vm.onScroll($event)\n }\n }\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"row\",\n class: { sticky: _vm.scrolled && !_vm.showConfig.showNewUserForm },\n attrs: { id: \"grid-header\" }\n },\n [\n _c(\"div\", { staticClass: \"avatar\", attrs: { id: \"headerAvatar\" } }),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"name\", attrs: { id: \"headerName\" } }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Username\")))\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"displayName\", attrs: { id: \"headerDisplayName\" } },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"Full name\")))]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"password\", attrs: { id: \"headerPassword\" } },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"Password\")))]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"mailAddress\", attrs: { id: \"headerAddress\" } },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"Email\")))]\n ),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"groups\", attrs: { id: \"headerGroups\" } }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Groups\")))\n ]),\n _vm._v(\" \"),\n _vm.subAdminsGroups.length > 0\n ? _c(\n \"div\",\n { staticClass: \"subadmins\", attrs: { id: \"headerSubAdmins\" } },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"Group admin for\")))]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"quota\", attrs: { id: \"headerQuota\" } }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Quota\")))\n ]),\n _vm._v(\" \"),\n _vm.showConfig.showLanguages\n ? _c(\n \"div\",\n { staticClass: \"languages\", attrs: { id: \"headerLanguages\" } },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"Languages\")))]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showStoragePath\n ? _c(\n \"div\",\n { staticClass: \"headerStorageLocation storageLocation\" },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"Storage location\")))]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showUserBackend\n ? _c(\"div\", { staticClass: \"headerUserBackend userBackend\" }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"User backend\")))\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showLastLogin\n ? _c(\"div\", { staticClass: \"headerLastLogin lastLogin\" }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Last login\")))\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"userActions\" })\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"form\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showConfig.showNewUserForm,\n expression: \"showConfig.showNewUserForm\"\n }\n ],\n staticClass: \"row\",\n class: { sticky: _vm.scrolled && _vm.showConfig.showNewUserForm },\n attrs: { id: \"new-user\", disabled: _vm.loading },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.createUser($event)\n }\n }\n },\n [\n _c(\"div\", { class: _vm.loading ? \"icon-loading-small\" : \"icon-add\" }),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"name\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.newUser.id,\n expression: \"newUser.id\"\n }\n ],\n attrs: {\n id: \"newusername\",\n type: \"text\",\n required: \"\",\n placeholder: _vm.t(\"settings\", \"User name\"),\n name: \"username\",\n autocomplete: \"off\",\n autocapitalize: \"none\",\n autocorrect: \"off\",\n pattern: \"[a-zA-Z0-9 _\\\\.@\\\\-']+\"\n },\n domProps: { value: _vm.newUser.id },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.$set(_vm.newUser, \"id\", $event.target.value)\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"displayName\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.newUser.displayName,\n expression: \"newUser.displayName\"\n }\n ],\n attrs: {\n id: \"newdisplayname\",\n type: \"text\",\n placeholder: _vm.t(\"settings\", \"Display name\"),\n name: \"displayname\",\n autocomplete: \"off\",\n autocapitalize: \"none\",\n autocorrect: \"off\"\n },\n domProps: { value: _vm.newUser.displayName },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.$set(_vm.newUser, \"displayName\", $event.target.value)\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"password\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.newUser.password,\n expression: \"newUser.password\"\n }\n ],\n attrs: {\n id: \"newuserpassword\",\n type: \"password\",\n required: _vm.newUser.mailAddress === \"\",\n placeholder: _vm.t(\"settings\", \"Password\"),\n name: \"password\",\n autocomplete: \"new-password\",\n autocapitalize: \"none\",\n autocorrect: \"off\",\n minlength: _vm.minPasswordLength\n },\n domProps: { value: _vm.newUser.password },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.$set(_vm.newUser, \"password\", $event.target.value)\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"mailAddress\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.newUser.mailAddress,\n expression: \"newUser.mailAddress\"\n }\n ],\n attrs: {\n id: \"newemail\",\n type: \"email\",\n required: _vm.newUser.password === \"\",\n placeholder: _vm.t(\"settings\", \"Mail address\"),\n name: \"email\",\n autocomplete: \"off\",\n autocapitalize: \"none\",\n autocorrect: \"off\"\n },\n domProps: { value: _vm.newUser.mailAddress },\n on: {\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.$set(_vm.newUser, \"mailAddress\", $event.target.value)\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"groups\" },\n [\n _c(\n \"multiselect\",\n {\n staticClass: \"multiselect-vue\",\n attrs: {\n options: _vm.groups,\n placeholder: _vm.t(\"settings\", \"Add user in group\"),\n label: \"name\",\n \"track-by\": \"id\",\n multiple: true,\n \"close-on-select\": false\n },\n model: {\n value: _vm.newUser.groups,\n callback: function($$v) {\n _vm.$set(_vm.newUser, \"groups\", $$v)\n },\n expression: \"newUser.groups\"\n }\n },\n [\n _c(\n \"span\",\n { attrs: { slot: \"noResult\" }, slot: \"noResult\" },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"No result\")))]\n )\n ]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.subAdminsGroups.length > 0\n ? _c(\n \"div\",\n { staticClass: \"subadmins\" },\n [\n _c(\n \"multiselect\",\n {\n staticClass: \"multiselect-vue\",\n attrs: {\n options: _vm.subAdminsGroups,\n placeholder: _vm.t(\"settings\", \"Set user as admin for\"),\n label: \"name\",\n \"track-by\": \"id\",\n multiple: true,\n \"close-on-select\": false\n },\n model: {\n value: _vm.newUser.subAdminsGroups,\n callback: function($$v) {\n _vm.$set(_vm.newUser, \"subAdminsGroups\", $$v)\n },\n expression: \"newUser.subAdminsGroups\"\n }\n },\n [\n _c(\n \"span\",\n { attrs: { slot: \"noResult\" }, slot: \"noResult\" },\n [_vm._v(_vm._s(_vm.t(\"settings\", \"No result\")))]\n )\n ]\n )\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"quota\" },\n [\n _c(\"multiselect\", {\n staticClass: \"multiselect-vue\",\n attrs: {\n options: _vm.quotaOptions,\n placeholder: _vm.t(\"settings\", \"Select user quota\"),\n label: \"label\",\n \"track-by\": \"id\",\n allowEmpty: false,\n taggable: true\n },\n on: { tag: _vm.validateQuota },\n model: {\n value: _vm.newUser.quota,\n callback: function($$v) {\n _vm.$set(_vm.newUser, \"quota\", $$v)\n },\n expression: \"newUser.quota\"\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.showConfig.showLanguages\n ? _c(\n \"div\",\n { staticClass: \"languages\" },\n [\n _c(\"multiselect\", {\n staticClass: \"multiselect-vue\",\n attrs: {\n options: _vm.languages,\n placeholder: _vm.t(\"settings\", \"Default language\"),\n label: \"name\",\n \"track-by\": \"code\",\n allowEmpty: false,\n \"group-values\": \"languages\",\n \"group-label\": \"label\"\n },\n model: {\n value: _vm.newUser.language,\n callback: function($$v) {\n _vm.$set(_vm.newUser, \"language\", $$v)\n },\n expression: \"newUser.language\"\n }\n })\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showStoragePath\n ? _c(\"div\", { staticClass: \"storageLocation\" })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showUserBackend\n ? _c(\"div\", { staticClass: \"userBackend\" })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.showConfig.showLastLogin\n ? _c(\"div\", { staticClass: \"lastLogin\" })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"userActions\" }, [\n _c(\"input\", {\n staticClass: \"button primary icon-checkmark-white has-tooltip\",\n attrs: {\n type: \"submit\",\n id: \"newsubmit\",\n value: \"\",\n title: _vm.t(\"settings\", \"Add a new user\")\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"button icon-close has-tooltip\",\n attrs: {\n type: \"reset\",\n id: \"newreset\",\n value: \"\",\n title: _vm.t(\"settings\", \"Cancel and reset the form\")\n },\n on: { click: _vm.resetForm }\n })\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm._l(_vm.filteredUsers, function(user, key) {\n return _c(\"user-row\", {\n key: key,\n attrs: {\n user: user,\n settings: _vm.settings,\n showConfig: _vm.showConfig,\n groups: _vm.groups,\n subAdminsGroups: _vm.subAdminsGroups,\n quotaOptions: _vm.quotaOptions,\n languages: _vm.languages\n }\n })\n }),\n _vm._v(\" \"),\n _c(\n \"infinite-loading\",\n { ref: \"infiniteLoading\", on: { infinite: _vm.infiniteHandler } },\n [\n _c(\"div\", { attrs: { slot: \"spinner\" }, slot: \"spinner\" }, [\n _c(\"div\", { staticClass: \"users-icon-loading icon-loading\" })\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { slot: \"no-more\" }, slot: \"no-more\" }, [\n _c(\"div\", { staticClass: \"users-list-end\" }, [\n _vm._v(\"— \" + _vm._s(_vm.t(\"settings\", \"no more results\")) + \" —\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { slot: \"no-results\" }, slot: \"no-results\" }, [\n _c(\"div\", { attrs: { id: \"emptycontent\" } }, [\n _c(\"div\", { staticClass: \"icon-contacts-dark\" }),\n _vm._v(\" \"),\n _c(\"h2\", [_vm._v(_vm._s(_vm.t(\"settings\", \"No users in here\")))])\n ])\n ])\n ]\n )\n ],\n 2\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-40745299\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvY29tcG9uZW50cy91c2VyTGlzdC52dWU/M2I4YyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYyxvQkFBb0I7QUFDbEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esa0JBQWtCLDBEQUEwRDtBQUM1RSxrQkFBa0I7QUFDbEIsU0FBUztBQUNUO0FBQ0EscUJBQXFCLGdDQUFnQyxxQkFBcUIsRUFBRTtBQUM1RTtBQUNBLHFCQUFxQiw4QkFBOEIsbUJBQW1CLEVBQUU7QUFDeEU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGFBQWEscUNBQXFDLDBCQUEwQixFQUFFO0FBQzlFO0F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l92KFwiIFwiKSxcbiAgICAgICAgICBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcImdyb3Vwc1wiLCBhdHRyczogeyBpZDogXCJoZWFkZXJHcm91cHNcIiB9IH0sIFtcbiAgICAgICAgICAgIF92bS5fdihfdm0uX3MoX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIkdyb3Vwc1wiKSkpXG4gICAgICAgICAgXSksXG4gICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICBfdm0uc3ViQWRtaW5zR3JvdXBzLmxlbmd0aCA+IDBcbiAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcInN1YmFkbWluc1wiLCBhdHRyczogeyBpZDogXCJoZWFkZXJTdWJBZG1pbnNcIiB9IH0sXG4gICAgICAgICAgICAgICAgW192bS5fdihfdm0uX3MoX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIkdyb3VwIGFkbWluIGZvclwiKSkpXVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJxdW90YVwiLCBhdHRyczogeyBpZDogXCJoZWFkZXJRdW90YVwiIH0gfSwgW1xuICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0udChcInNldHRpbmdzXCIsIFwiUXVvdGFcIikpKVxuICAgICAgICAgIF0pLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX3ZtLnNob3dDb25maWcuc2hvd0xhbmd1YWdlc1xuICAgICAgICAgICAgPyBfYyhcbiAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwibGFuZ3VhZ2VzXCIsIGF0dHJzOiB7IGlkOiBcImhlYWRlckxhbmd1YWdlc1wiIH0gfSxcbiAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhfdm0udChcInNldHRpbmdzXCIsIFwiTGFuZ3VhZ2VzXCIpKSldXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIDogX3ZtLl9lKCksXG4gICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICBfdm0uc2hvd0NvbmZpZy5zaG93U3RvcmFnZVBhdGhcbiAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcImhlYWRlclN0b3JhZ2VMb2NhdGlvbiBzdG9yYWdlTG9jYXRpb25cIiB9LFxuICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS50KFwic2V0dGluZ3NcIiwgXCJTdG9yYWdlIGxvY2F0aW9uXCIpKSldXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIDogX3ZtLl9lKCksXG4gICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICBfdm0uc2hvd0NvbmZpZy5zaG93VXNlckJhY2tlbmRcbiAgICAgICAgICAgID8gX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJoZWFkZXJVc2VyQmFja2VuZCB1c2VyQmFja2VuZFwiIH0sIFtcbiAgICAgICAgICAgICAgICBfdm0uX3YoX3ZtLl9zKF92bS50KFwic2V0dGluZ3NcIiwgXCJVc2VyIGJhY2tlbmRcIikpKVxuICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF92bS5zaG93Q29uZmlnLnNob3dMYXN0TG9naW5cbiAgICAgICAgICAgID8gX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJoZWFkZXJMYXN0TG9naW4gbGFzdExvZ2luXCIgfSwgW1xuICAgICAgICAgICAgICAgIF92bS5fdihfdm0uX3MoX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIkxhc3QgbG9naW5cIikpKVxuICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwidXNlckFjdGlvbnNcIiB9KVxuICAgICAgICBdXG4gICAgICApLFxuICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgIF9jKFxuICAgICAgICBcImZvcm1cIixcbiAgICAgICAge1xuICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgbmFtZTogXCJzaG93XCIsXG4gICAgICAgICAgICAgIHJhd05hbWU6IFwidi1zaG93XCIsXG4gICAgICAgICAgICAgIHZhbHVlOiBfdm0uc2hvd0NvbmZpZy5zaG93TmV3VXNlckZvcm0sXG4gICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2hvd0NvbmZpZy5zaG93TmV3VXNlckZvcm1cIlxuICAgICAgICAgICAgfVxuICAgICAgICAgIF0sXG4gICAgICAgICAgc3RhdGljQ2xhc3M6IFwicm93XCIsXG4gICAgICAgICAgY2xhc3M6IHsgc3RpY2t5OiBfdm0uc2Nyb2xsZWQgJiYgX3ZtLnNob3dDb25maWcuc2hvd05ld1VzZXJGb3JtIH0sXG4gICAgICAgICAgYXR0cnM6IHsgaWQ6IFwibmV3LXVzZXJcIiwgZGlzYWJsZWQ6IF92bS5sb2FkaW5nIH0sXG4gICAgICAgICAgb246IHtcbiAgICAgICAgICAgIHN1Ym1pdDogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICRldmVudC5wcmV2ZW50RGVmYXVsdCgpXG4gICAgICAgICAgICAgIHJldHVybiBfdm0uY3JlYXRlVXNlcigkZXZlbnQpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgX2MoXCJkaXZcIiwgeyBjbGFzczogX3ZtLmxvYWRpbmcgPyBcImljb24tbG9hZGluZy1zbWFsbFwiIDogXCJpY29uLWFkZFwiIH0pLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJuYW1lXCIgfSwgW1xuICAgICAgICAgICAgX2MoXCJpbnB1dFwiLCB7XG4gICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBuYW1lOiBcIm1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtbW9kZWxcIixcbiAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0ubmV3VXNlci5pZCxcbiAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwibmV3VXNlci5pZFwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgIGlkOiBcIm5ld3VzZXJuYW1lXCIsXG4gICAgICAgICAgICAgICAgdHlwZTogXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgcmVxdWlyZWQ6IFwiXCIsXG4gICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IF92bS50KFwic2V0dGluZ3NcIiwgXCJVc2VyIG5hbWVcIiksXG4gICAgICAgICAgICAgICAgbmFtZTogXCJ1c2VybmFtZVwiLFxuICAgICAgICAgICAgICAgIGF1dG9jb21wbGV0ZTogXCJvZmZcIixcbiAgICAgICAgICAgICAgICBhdXRvY2FwaXRhbGl6ZTogXCJub25lXCIsXG4gICAgICAgICAgICAgICAgYXV0b2NvcnJlY3Q6IFwib2ZmXCIsXG4gICAgICAgICAgICAgICAgcGF0dGVybjogXCJbYS16QS1aMC05IF9cXFxcLkBcXFxcLSddK1wiXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGRvbVByb3BzOiB7IHZhbHVlOiBfdm0ubmV3VXNlci5pZCB9LFxuICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgIGlucHV0OiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgIGlmICgkZXZlbnQudGFyZ2V0LmNvbXBvc2luZykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIF92bS4kc2V0KF92bS5uZXdVc2VyLCBcImlkXCIsICRldmVudC50YXJnZXQudmFsdWUpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgIF0pLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJkaXNwbGF5TmFtZVwiIH0sIFtcbiAgICAgICAgICAgIF9jKFwiaW5wdXRcIiwge1xuICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgbmFtZTogXCJtb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLm5ld1VzZXIuZGlzcGxheU5hbWUsXG4gICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcIm5ld1VzZXIuZGlzcGxheU5hbWVcIlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICBpZDogXCJuZXdkaXNwbGF5bmFtZVwiLFxuICAgICAgICAgICAgICAgIHR5cGU6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBfdm0udChcInNldHRpbmdzXCIsIFwiRGlzcGxheSBuYW1lXCIpLFxuICAgICAgICAgICAgICAgIG5hbWU6IFwiZGlzcGxheW5hbWVcIixcbiAgICAgICAgICAgICAgICBhdXRvY29tcGxldGU6IFwib2ZmXCIsXG4gICAgICAgICAgICAgICAgYXV0b2NhcGl0YWxpemU6IFwibm9uZVwiLFxuICAgICAgICAgICAgICAgIGF1dG9jb3JyZWN0OiBcIm9mZlwiXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGRvbVByb3BzOiB7IHZhbHVlOiBfdm0ubmV3VXNlci5kaXNwbGF5TmFtZSB9LFxuICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgIGlucHV0OiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgIGlmICgkZXZlbnQudGFyZ2V0LmNvbXBvc2luZykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIF92bS4kc2V0KF92bS5uZXdVc2VyLCBcImRpc3BsYXlOYW1lXCIsICRldmVudC50YXJnZXQudmFsdWUpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgIF0pLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJwYXNzd29yZFwiIH0sIFtcbiAgICAgICAgICAgIF9jKFwiaW5wdXRcIiwge1xuICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgbmFtZTogXCJtb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLm5ld1VzZXIucGFzc3dvcmQsXG4gICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcIm5ld1VzZXIucGFzc3dvcmRcIlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICBpZDogXCJuZXd1c2VycGFzc3dvcmRcIixcbiAgICAgICAgICAgICAgICB0eXBlOiBcInBhc3N3b3JkXCIsXG4gICAgICAgICAgICAgICAgcmVxdWlyZWQ6IF92bS5uZXdVc2VyLm1haWxBZGRyZXNzID09PSBcIlwiLFxuICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBfdm0udChcInNldHRpbmdzXCIsIFwiUGFzc3dvcmRcIiksXG4gICAgICAgICAgICAgICAgbmFtZTogXCJwYXNzd29yZFwiLFxuICAgICAgICAgICAgICAgIGF1dG9jb21wbGV0ZTogXCJuZXctcGFzc3dvcmRcIixcbiAgICAgICAgICAgICAgICBhdXRvY2FwaXRhbGl6ZTogXCJub25lXCIsXG4gICAgICAgICAgICAgICAgYXV0b2NvcnJlY3Q6IFwib2ZmXCIsXG4gICAgICAgICAgICAgICAgbWlubGVuZ3RoOiBfdm0ubWluUGFzc3dvcmRMZW5ndGhcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgZG9tUHJvcHM6IHsgdmFsdWU6IF92bS5uZXdVc2VyLnBhc3N3b3JkIH0sXG4gICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgaW5wdXQ6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgaWYgKCRldmVudC50YXJnZXQuY29tcG9zaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgX3ZtLiRzZXQoX3ZtLm5ld1VzZXIsIFwicGFzc3dvcmRcIiwgJGV2ZW50LnRhcmdldC52YWx1ZSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgXSksXG4gICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcIm1haWxBZGRyZXNzXCIgfSwgW1xuICAgICAgICAgICAgX2MoXCJpbnB1dFwiLCB7XG4gICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBuYW1lOiBcIm1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtbW9kZWxcIixcbiAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0ubmV3VXNlci5tYWlsQWRkcmVzcyxcbiAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwibmV3VXNlci5tYWlsQWRkcmVzc1wiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgIGlkOiBcIm5ld2VtYWlsXCIsXG4gICAgICAgICAgICAgICAgdHlwZTogXCJlbWFpbFwiLFxuICAgICAgICAgICAgICAgIHJlcXVpcmVkOiBfdm0ubmV3VXNlci5wYXNzd29yZCA9PT0gXCJcIixcbiAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIk1haWwgYWRkcmVzc1wiKSxcbiAgICAgICAgICAgICAgICBuYW1lOiBcImVtYWlsXCIsXG4gICAgICAgICAgICAgICAgYXV0b2NvbXBsZXRlOiBcIm9mZlwiLFxuICAgICAgICAgICAgICAgIGF1dG9jYXBpdGFsaXplOiBcIm5vbmVcIixcbiAgICAgICAgICAgICAgICBhdXRvY29ycmVjdDogXCJvZmZcIlxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBkb21Qcm9wczogeyB2YWx1ZTogX3ZtLm5ld1VzZXIubWFpbEFkZHJlc3MgfSxcbiAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICBpbnB1dDogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICBpZiAoJGV2ZW50LnRhcmdldC5jb21wb3NpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBfdm0uJHNldChfdm0ubmV3VXNlciwgXCJtYWlsQWRkcmVzc1wiLCAkZXZlbnQudGFyZ2V0LnZhbHVlKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICBdKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwiZ3JvdXBzXCIgfSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgXCJtdWx0aXNlbGVjdFwiLFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcIm11bHRpc2VsZWN0LXZ1ZVwiLFxuICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogX3ZtLmdyb3VwcyxcbiAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IF92bS50KFwic2V0dGluZ3NcIiwgXCJBZGQgdXNlciBpbiBncm91cFwiKSxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IFwibmFtZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRyYWNrLWJ5XCI6IFwiaWRcIixcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGU6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIFwiY2xvc2Utb24tc2VsZWN0XCI6IGZhbHNlXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5uZXdVc2VyLmdyb3VwcyxcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2s6IGZ1bmN0aW9uKCQkdikge1xuICAgICAgICAgICAgICAgICAgICAgIF92bS4kc2V0KF92bS5uZXdVc2VyLCBcImdyb3Vwc1wiLCAkJHYpXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwibmV3VXNlci5ncm91cHNcIlxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwic3BhblwiLFxuICAgICAgICAgICAgICAgICAgICB7IGF0dHJzOiB7IHNsb3Q6IFwibm9SZXN1bHRcIiB9LCBzbG90OiBcIm5vUmVzdWx0XCIgfSxcbiAgICAgICAgICAgICAgICAgICAgW192bS5fdihfdm0uX3MoX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIk5vIHJlc3VsdFwiKSkpXVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIDFcbiAgICAgICAgICApLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX3ZtLnN1YkFkbWluc0dyb3Vwcy5sZW5ndGggPiAwXG4gICAgICAgICAgICA/IF9jKFxuICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgeyBzdGF0aWNDbGFzczogXCJzdWJhZG1pbnNcIiB9LFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcIm11bHRpc2VsZWN0XCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJtdWx0aXNlbGVjdC12dWVcIixcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogX3ZtLnN1YkFkbWluc0dyb3VwcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBfdm0udChcInNldHRpbmdzXCIsIFwiU2V0IHVzZXIgYXMgYWRtaW4gZm9yXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IFwibmFtZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJ0cmFjay1ieVwiOiBcImlkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBtdWx0aXBsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiY2xvc2Utb24tc2VsZWN0XCI6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICBtb2RlbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5uZXdVc2VyLnN1YkFkbWluc0dyb3VwcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLiRzZXQoX3ZtLm5ld1VzZXIsIFwic3ViQWRtaW5zR3JvdXBzXCIsICQkdilcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcIm5ld1VzZXIuc3ViQWRtaW5zR3JvdXBzXCJcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgIFwic3BhblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBhdHRyczogeyBzbG90OiBcIm5vUmVzdWx0XCIgfSwgc2xvdDogXCJub1Jlc3VsdFwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhfdm0udChcInNldHRpbmdzXCIsIFwiTm8gcmVzdWx0XCIpKSldXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIDogX3ZtLl9lKCksXG4gICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICBfYyhcbiAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcInF1b3RhXCIgfSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX2MoXCJtdWx0aXNlbGVjdFwiLCB7XG4gICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwibXVsdGlzZWxlY3QtdnVlXCIsXG4gICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IF92bS5xdW90YU9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcjogX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIlNlbGVjdCB1c2VyIHF1b3RhXCIpLFxuICAgICAgICAgICAgICAgICAgbGFiZWw6IFwibGFiZWxcIixcbiAgICAgICAgICAgICAgICAgIFwidHJhY2stYnlcIjogXCJpZFwiLFxuICAgICAgICAgICAgICAgICAgYWxsb3dFbXB0eTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICB0YWdnYWJsZTogdHJ1ZVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb246IHsgdGFnOiBfdm0udmFsaWRhdGVRdW90YSB9LFxuICAgICAgICAgICAgICAgIG1vZGVsOiB7XG4gICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLm5ld1VzZXIucXVvdGEsXG4gICAgICAgICAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24oJCR2KSB7XG4gICAgICAgICAgICAgICAgICAgIF92bS4kc2V0KF92bS5uZXdVc2VyLCBcInF1b3RhXCIsICQkdilcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcIm5ld1VzZXIucXVvdGFcIlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAxXG4gICAgICAgICAgKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF92bS5zaG93Q29uZmlnLnNob3dMYW5ndWFnZXNcbiAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICB7IHN0YXRpY0NsYXNzOiBcImxhbmd1YWdlc1wiIH0sXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgX2MoXCJtdWx0aXNlbGVjdFwiLCB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcIm11bHRpc2VsZWN0LXZ1ZVwiLFxuICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IF92bS5sYW5ndWFnZXMsXG4gICAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IF92bS50KFwic2V0dGluZ3NcIiwgXCJEZWZhdWx0IGxhbmd1YWdlXCIpLFxuICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBcIm5hbWVcIixcbiAgICAgICAgICAgICAgICAgICAgICBcInRyYWNrLWJ5XCI6IFwiY29kZVwiLFxuICAgICAgICAgICAgICAgICAgICAgIGFsbG93RW1wdHk6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgIFwiZ3JvdXAtdmFsdWVzXCI6IFwibGFuZ3VhZ2VzXCIsXG4gICAgICAgICAgICAgICAgICAgICAgXCJncm91cC1sYWJlbFwiOiBcImxhYmVsXCJcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLm5ld1VzZXIubGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2s6IGZ1bmN0aW9uKCQkdikge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLiRzZXQoX3ZtLm5ld1VzZXIsIFwibGFuZ3VhZ2VcIiwgJCR2KVxuICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJuZXdVc2VyLmxhbmd1YWdlXCJcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF92bS5zaG93Q29uZmlnLnNob3dTdG9yYWdlUGF0aFxuICAgICAgICAgICAgPyBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcInN0b3JhZ2VMb2NhdGlvblwiIH0pXG4gICAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX3ZtLnNob3dDb25maWcuc2hvd1VzZXJCYWNrZW5kXG4gICAgICAgICAgICA/IF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwidXNlckJhY2tlbmRcIiB9KVxuICAgICAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF92bS5zaG93Q29uZmlnLnNob3dMYXN0TG9naW5cbiAgICAgICAgICAgID8gX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJsYXN0TG9naW5cIiB9KVxuICAgICAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwidXNlckFjdGlvbnNcIiB9LCBbXG4gICAgICAgICAgICBfYyhcImlucHV0XCIsIHtcbiAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwiYnV0dG9uIHByaW1hcnkgaWNvbi1jaGVja21hcmstd2hpdGUgaGFzLXRvb2x0aXBcIixcbiAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICB0eXBlOiBcInN1Ym1pdFwiLFxuICAgICAgICAgICAgICAgIGlkOiBcIm5ld3N1Ym1pdFwiLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBcIlwiLFxuICAgICAgICAgICAgICAgIHRpdGxlOiBfdm0udChcInNldHRpbmdzXCIsIFwiQWRkIGEgbmV3IHVzZXJcIilcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgX2MoXCJpbnB1dFwiLCB7XG4gICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImJ1dHRvbiBpY29uLWNsb3NlIGhhcy10b29sdGlwXCIsXG4gICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJyZXNldFwiLFxuICAgICAgICAgICAgICAgIGlkOiBcIm5ld3Jlc2V0XCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IFwiXCIsXG4gICAgICAgICAgICAgICAgdGl0bGU6IF92bS50KFwic2V0dGluZ3NcIiwgXCJDYW5jZWwgYW5kIHJlc2V0IHRoZSBmb3JtXCIpXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIG9uOiB7IGNsaWNrOiBfdm0ucmVzZXRGb3JtIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgXSlcbiAgICAgICAgXVxuICAgICAgKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfdm0uX2woX3ZtLmZpbHRlcmVkVXNlcnMsIGZ1bmN0aW9uKHVzZXIsIGtleSkge1xuICAgICAgICByZXR1cm4gX2MoXCJ1c2VyLXJvd1wiLCB7XG4gICAgICAgICAga2V5OiBrZXksXG4gICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgIHVzZXI6IHVzZXIsXG4gICAgICAgICAgICBzZXR0aW5nczogX3ZtLnNldHRpbmdzLFxuICAgICAgICAgICAgc2hvd0NvbmZpZzogX3ZtLnNob3dDb25maWcsXG4gICAgICAgICAgICBncm91cHM6IF92bS5ncm91cHMsXG4gICAgICAgICAgICBzdWJBZG1pbnNHcm91cHM6IF92bS5zdWJBZG1pbnNHcm91cHMsXG4gICAgICAgICAgICBxdW90YU9wdGlvbnM6IF92bS5xdW90YU9wdGlvbnMsXG4gICAgICAgICAgICBsYW5ndWFnZXM6IF92bS5sYW5ndWFnZXNcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICB9KSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcbiAgICAgICAgXCJpbmZpbml0ZS1sb2FkaW5nXCIsXG4gICAgICAgIHsgcmVmOiBcImluZmluaXRlTG9hZGluZ1wiLCBvbjogeyBpbmZpbml0ZTogX3ZtLmluZmluaXRlSGFuZGxlciB9IH0sXG4gICAgICAgIFtcbiAgICAgICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IHNsb3Q6IFwic3Bpbm5lclwiIH0sIHNsb3Q6IFwic3Bpbm5lclwiIH0sIFtcbiAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwidXNlcnMt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cyA9IHsgcmVuZGVyOiByZW5kZXIsIHN0YXRpY1JlbmRlckZuczogc3RhdGljUmVuZGVyRm5zIH1cbmV4cG9ydCBkZWZhdWx0IGVzRXhwb3J0c1xuaWYgKG1vZHVsZS5ob3QpIHtcbiAgbW9kdWxlLmhvdC5hY2NlcHQoKVxuICBpZiAobW9kdWxlLmhvdC5kYXRhKSB7XG4gICAgcmVxdWlyZShcInZ1ZS1ob3QtcmVsb2FkLWFwaVwiKSAgICAgIC5yZXJlbmRlcihcImRhdGEtdi00MDc0NTI5OVwiLCBlc0V4cG9ydHMpXG4gIH1cbn1cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi90ZW1wbGF0ZS1jb21waWxlcj97XCJpZFwiOlwiZGF0YS12LTQwNzQ1Mjk5XCIsXCJoYXNTY29wZWRcIjpmYWxzZSxcImJ1YmxlXCI6e1widHJhbnNmb3Jtc1wiOnt9fX0hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT10ZW1wbGF0ZSZpbmRleD0wIS4vc3JjL2NvbXBvbmVudHMvdXNlckxpc3QudnVlXG4vLyBtb2R1bGUgaWQgPSA0NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///44\n");
|
||
|
||
/***/ }),
|
||
/* 45 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
eval("/* WEBPACK VAR INJECTION */(function(process) {/**\n * vue-local-storage v0.6.0\n * (c) 2017 Alexander Avakov\n * @license MIT\n */\n(function (global, factory) {\n\t true ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.VueLocalStorage = factory());\n}(this, (function () { 'use strict';\n\nvar VueLocalStorage = function VueLocalStorage () {\n this._properties = {};\n this._namespace = '';\n this._isSupported = true;\n};\n\nvar prototypeAccessors = { namespace: {} };\n\n/**\n * Namespace getter.\n *\n * @returns {string}\n */\nprototypeAccessors.namespace.get = function () {\n return this._namespace\n};\n\n/**\n * Namespace setter.\n *\n * @param {string} value\n */\nprototypeAccessors.namespace.set = function (value) {\n this._namespace = value ? (value + \".\") : '';\n};\n\n/**\n * Concatenates localStorage key with namespace prefix.\n *\n * @param {string} lsKey\n * @returns {string}\n * @private\n */\nVueLocalStorage.prototype._getLsKey = function _getLsKey (lsKey) {\n return (\"\" + (this._namespace) + lsKey)\n};\n\n/**\n * Set a value to localStorage giving respect to the namespace.\n *\n * @param {string} lsKey\n * @param {*} rawValue\n * @param {*} type\n * @private\n */\nVueLocalStorage.prototype._lsSet = function _lsSet (lsKey, rawValue, type) {\n var key = this._getLsKey(lsKey);\n var value = type && [Array, Object].includes(type)\n ? JSON.stringify(rawValue)\n : rawValue;\n\n window.localStorage.setItem(key, value);\n};\n\n/**\n * Get value from localStorage giving respect to the namespace.\n *\n * @param {string} lsKey\n * @returns {any}\n * @private\n */\nVueLocalStorage.prototype._lsGet = function _lsGet (lsKey) {\n var key = this._getLsKey(lsKey);\n\n return window.localStorage[key]\n};\n\n/**\n * Get value from localStorage\n *\n * @param {String} lsKey\n * @param {*} defaultValue\n * @param {*} defaultType\n * @returns {*}\n */\nVueLocalStorage.prototype.get = function get (lsKey, defaultValue, defaultType) {\n var this$1 = this;\n if ( defaultValue === void 0 ) defaultValue = null;\n if ( defaultType === void 0 ) defaultType = String;\n\n if (!this._isSupported) {\n return null\n }\n\n if (this._lsGet(lsKey)) {\n var type = defaultType;\n\n for (var key in this$1._properties) {\n if (key === lsKey) {\n type = this$1._properties[key].type;\n break\n }\n }\n\n return this._process(type, this._lsGet(lsKey))\n }\n\n return defaultValue !== null ? defaultValue : null\n};\n\n/**\n * Set localStorage value\n *\n * @param {String} lsKey\n * @param {*} value\n * @returns {*}\n */\nVueLocalStorage.prototype.set = function set (lsKey, value) {\n var this$1 = this;\n\n if (!this._isSupported) {\n return null\n }\n\n for (var key in this$1._properties) {\n var type = this$1._properties[key].type;\n\n if ((key === lsKey)) {\n this$1._lsSet(lsKey, value, type);\n\n return value\n }\n }\n\n this._lsSet(lsKey, value);\n\n return value\n};\n\n/**\n * Remove value from localStorage\n *\n * @param {String} lsKey\n */\nVueLocalStorage.prototype.remove = function remove (lsKey) {\n if (!this._isSupported) {\n return null\n }\n\n return window.localStorage.removeItem(lsKey)\n};\n\n/**\n * Add new property to localStorage\n *\n * @param {String} key\n * @param {function} type\n * @param {*} defaultValue\n */\nVueLocalStorage.prototype.addProperty = function addProperty (key, type, defaultValue) {\n if ( defaultValue === void 0 ) defaultValue = undefined;\n\n type = type || String;\n\n this._properties[key] = { type: type };\n\n if (!this._lsGet(key) && defaultValue !== null) {\n this._lsSet(key, defaultValue, type);\n }\n};\n\n/**\n * Process the value before return it from localStorage\n *\n * @param {String} type\n * @param {*} value\n * @returns {*}\n * @private\n */\nVueLocalStorage.prototype._process = function _process (type, value) {\n switch (type) {\n case Boolean:\n return value === 'true'\n case Number:\n return parseFloat(value)\n case Array:\n try {\n var array = JSON.parse(value);\n\n return Array.isArray(array) ? array : []\n } catch (e) {\n return []\n }\n case Object:\n try {\n return JSON.parse(value)\n } catch (e) {\n return {}\n }\n default:\n return value\n }\n};\n\nObject.defineProperties( VueLocalStorage.prototype, prototypeAccessors );\n\nvar vueLocalStorage = new VueLocalStorage();\n\nvar index = {\n /**\n * Install vue-local-storage plugin\n *\n * @param {Vue} Vue\n * @param {Object} options\n */\n install: function (Vue, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof process !== 'undefined' &&\n (\n process.server ||\n process.SERVER_BUILD ||\n (process.env && process.env.VUE_ENV === 'server')\n )\n ) {\n return\n }\n\n var isSupported = true;\n\n try {\n var test = '__vue-localstorage-test__';\n\n window.localStorage.setItem(test, test);\n window.localStorage.removeItem(test);\n } catch (e) {\n isSupported = false;\n vueLocalStorage._isSupported = false;\n\n console.error('Local storage is not supported');\n }\n\n var name = options.name || 'localStorage';\n var bind = options.bind;\n\n if (options.namespace) {\n vueLocalStorage.namespace = options.namespace;\n }\n\n Vue.mixin({\n beforeCreate: function beforeCreate () {\n var this$1 = this;\n\n if (!isSupported) {\n return\n }\n\n if (this.$options[name]) {\n Object.keys(this.$options[name]).forEach(function (key) {\n var config = this$1.$options[name][key];\n var ref = [config.type, config.default];\n var type = ref[0];\n var defaultValue = ref[1];\n\n vueLocalStorage.addProperty(key, type, defaultValue);\n\n var existingProp = Object.getOwnPropertyDescriptor(vueLocalStorage, key);\n\n if (!existingProp) {\n var prop = {\n get: function () { return Vue.localStorage.get(key, defaultValue); },\n set: function (val) { return Vue.localStorage.set(key, val); },\n configurable: true\n };\n\n Object.defineProperty(vueLocalStorage, key, prop);\n Vue.util.defineReactive(vueLocalStorage, key, defaultValue);\n } else if (!Vue.config.silent) {\n console.log((key + \": is already defined and will be reused\"));\n }\n\n if ((bind || config.bind) && config.bind !== false) {\n this$1.$options.computed = this$1.$options.computed || {};\n\n if (!this$1.$options.computed[key]) {\n this$1.$options.computed[key] = {\n get: function () { return Vue.localStorage[key]; },\n set: function (val) { Vue.localStorage[key] = val; }\n };\n }\n }\n });\n }\n }\n });\n\n Vue[name] = vueLocalStorage;\n Vue.prototype[(\"$\" + name)] = vueLocalStorage;\n }\n};\n\nreturn index;\n\n})));\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdnVlLWxvY2Fsc3RvcmFnZS9kaXN0L3Z1ZS1sb2NhbC1zdG9yYWdlLmpzPzUyNzQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQyxxQkFBcU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ICAgfVxuICAgICAgfVxuICAgIH0pO1xuXG4gICAgVnVlW25hbWVdID0gdnVlTG9jYWxTdG9yYWdlO1xuICAgIFZ1ZS5wcm90b3R5cGVbKFwiJFwiICsgbmFtZSldID0gdnVlTG9jYWxTdG9yYWdlO1xuICB9XG59O1xuXG5yZXR1cm4gaW5kZXg7XG5cbn0pKSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWUtbG9jYWxzdG9yYWdlL2Rpc3QvdnVlLWxvY2FsLXN0b3JhZ2UuanNcbi8vIG1vZHVsZSBpZCA9IDQ1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///45\n");
|
||
|
||
/***/ }),
|
||
/* 46 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
eval("module.exports = __webpack_require__(47);\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvaW5kZXguanM/OWFkNSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiI0Ni5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9saWIvYXhpb3MnKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gNDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///46\n");
|
||
|
||
/***/ }),
|
||
/* 47 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\nvar bind = __webpack_require__(18);\nvar Axios = __webpack_require__(49);\nvar defaults = __webpack_require__(7);\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(22);\naxios.CancelToken = __webpack_require__(63);\naxios.isCancel = __webpack_require__(21);\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(64);\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2F4aW9zLmpzP2I0ODEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLFlBQVksTUFBTTtBQUNsQjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQ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i8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///47\n");
|
||
|
||
/***/ }),
|
||
/* 48 */
|
||
/***/ (function(module, exports) {
|
||
|
||
eval("/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvaXMtYnVmZmVyL2luZGV4LmpzPzQ1ZWQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IjQ4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyohXG4gKiBEZXRlcm1pbmUgaWYgYW4gb2JqZWN0IGlzIGEgQnVmZmVyXG4gKlxuICogQGF1dGhvciAgIEZlcm9zcyBBYm91a2hhZGlqZWggPGh0dHBzOi8vZmVyb3NzLm9yZz5cbiAqIEBsaWNlbnNlICBNSVRcbiAqL1xuXG4vLyBUaGUgX2lzQnVmZmVyIGNoZWNrIGlzIGZvciBTYWZhcmkgNS03IHN1cHBvcnQsIGJlY2F1c2UgaXQncyBtaXNzaW5nXG4vLyBPYmplY3QucHJvdG90eXBlLmNvbnN0cnVjdG9yLiBSZW1vdmUgdGhpcyBldmVudHVhbGx5XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChvYmopIHtcbiAgcmV0dXJuIG9iaiAhPSBudWxsICYmIChpc0J1ZmZlcihvYmopIHx8IGlzU2xvd0J1ZmZlcihvYmopIHx8ICEhb2JqLl9pc0J1ZmZlcilcbn1cblxuZnVuY3Rpb24gaXNCdWZmZXIgKG9iaikge1xuICByZXR1cm4gISFvYmouY29uc3RydWN0b3IgJiYgdHlwZW9mIG9iai5jb25zdHJ1Y3Rvci5pc0J1ZmZlciA9PT0gJ2Z1bmN0aW9uJyAmJiBvYmouY29uc3RydWN0b3IuaXNCdWZmZXIob2JqKVxufVxuXG4vLyBGb3IgTm9kZSB2MC4xMCBzdXBwb3J0LiBSZW1vdmUgdGhpcyBldmVudHVhbGx5LlxuZnVuY3Rpb24gaXNTbG93QnVmZmVyIChvYmopIHtcbiAgcmV0dXJuIHR5cGVvZiBvYmoucmVhZEZsb2F0TEUgPT09ICdmdW5jdGlvbicgJiYgdHlwZW9mIG9iai5zbGljZSA9PT0gJ2Z1bmN0aW9uJyAmJiBpc0J1ZmZlcihvYmouc2xpY2UoMCwgMCkpXG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9pcy1idWZmZXIvaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDQ4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///48\n");
|
||
|
||
/***/ }),
|
||
/* 49 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar defaults = __webpack_require__(7);\nvar utils = __webpack_require__(0);\nvar InterceptorManager = __webpack_require__(58);\nvar dispatchRequest = __webpack_require__(59);\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvQXhpb3MuanM/NWU2NSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIj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uICB9O1xufSk7XG5cbnV0aWxzLmZvckVhY2goWydwb3N0JywgJ3B1dCcsICdwYXRjaCddLCBmdW5jdGlvbiBmb3JFYWNoTWV0aG9kV2l0aERhdGEobWV0aG9kKSB7XG4gIC8qZXNsaW50IGZ1bmMtbmFtZXM6MCovXG4gIEF4aW9zLnByb3RvdHlwZVttZXRob2RdID0gZnVuY3Rpb24odXJsLCBkYXRhLCBjb25maWcpIHtcbiAgICByZXR1cm4gdGhpcy5yZXF1ZXN0KHV0aWxzLm1lcmdlKGNvbmZpZyB8fCB7fSwge1xuICAgICAgbWV0aG9kOiBtZXRob2QsXG4gICAgICB1cmw6IHVybCxcbiAgICAgIGRhdGE6IGRhdGFcbiAgICB9KSk7XG4gIH07XG59KTtcblxubW9kdWxlLmV4cG9ydHMgPSBBeGlvcztcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL0F4aW9zLmpzXG4vLyBtb2R1bGUgaWQgPSA0OVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///49\n");
|
||
|
||
/***/ }),
|
||
/* 50 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvbm9ybWFsaXplSGVhZGVyTmFtZS5qcz9lNTU0Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSCIsImZpbGUiOiI1MC5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIHV0aWxzID0gcmVxdWlyZSgnLi4vdXRpbHMnKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBub3JtYWxpemVIZWFkZXJOYW1lKGhlYWRlcnMsIG5vcm1hbGl6ZWROYW1lKSB7XG4gIHV0aWxzLmZvckVhY2goaGVhZGVycywgZnVuY3Rpb24gcHJvY2Vzc0hlYWRlcih2YWx1ZSwgbmFtZSkge1xuICAgIGlmIChuYW1lICE9PSBub3JtYWxpemVkTmFtZSAmJiBuYW1lLnRvVXBwZXJDYXNlKCkgPT09IG5vcm1hbGl6ZWROYW1lLnRvVXBwZXJDYXNlKCkpIHtcbiAgICAgIGhlYWRlcnNbbm9ybWFsaXplZE5hbWVdID0gdmFsdWU7XG4gICAgICBkZWxldGUgaGVhZGVyc1tuYW1lXTtcbiAgICB9XG4gIH0pO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL25vcm1hbGl6ZUhlYWRlck5hbWUuanNcbi8vIG1vZHVsZSBpZCA9IDUwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///50\n");
|
||
|
||
/***/ }),
|
||
/* 51 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar createError = __webpack_require__(20);\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvc2V0dGxlLmpzP2RiNTIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxTQUFTO0FBQ3BCLFdBQVcsU0FBUztBQUNwQixXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiI1MS5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIGNyZWF0ZUVycm9yID0gcmVxdWlyZSgnLi9jcmVhdGVFcnJvcicpO1xuXG4vKipcbiAqIFJlc29sdmUgb3IgcmVqZWN0IGEgUHJvbWlzZSBiYXNlZCBvbiByZXNwb25zZSBzdGF0dXMuXG4gKlxuICogQHBhcmFtIHtGdW5jdGlvbn0gcmVzb2x2ZSBBIGZ1bmN0aW9uIHRoYXQgcmVzb2x2ZXMgdGhlIHByb21pc2UuXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSByZWplY3QgQSBmdW5jdGlvbiB0aGF0IHJlamVjdHMgdGhlIHByb21pc2UuXG4gKiBAcGFyYW0ge29iamVjdH0gcmVzcG9uc2UgVGhlIHJlc3BvbnNlLlxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIHNldHRsZShyZXNvbHZlLCByZWplY3QsIHJlc3BvbnNlKSB7XG4gIHZhciB2YWxpZGF0ZVN0YXR1cyA9IHJlc3BvbnNlLmNvbmZpZy52YWxpZGF0ZVN0YXR1cztcbiAgLy8gTm90ZTogc3RhdHVzIGlzIG5vdCBleHBvc2VkIGJ5IFhEb21haW5SZXF1ZXN0XG4gIGlmICghcmVzcG9uc2Uuc3RhdHVzIHx8ICF2YWxpZGF0ZVN0YXR1cyB8fCB2YWxpZGF0ZVN0YXR1cyhyZXNwb25zZS5zdGF0dXMpKSB7XG4gICAgcmVzb2x2ZShyZXNwb25zZSk7XG4gIH0gZWxzZSB7XG4gICAgcmVqZWN0KGNyZWF0ZUVycm9yKFxuICAgICAgJ1JlcXVlc3QgZmFpbGVkIHdpdGggc3RhdHVzIGNvZGUgJyArIHJlc3BvbnNlLnN0YXR1cyxcbiAgICAgIHJlc3BvbnNlLmNvbmZpZyxcbiAgICAgIG51bGwsXG4gICAgICByZXNwb25zZS5yZXF1ZXN0LFxuICAgICAgcmVzcG9uc2VcbiAgICApKTtcbiAgfVxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL3NldHRsZS5qc1xuLy8gbW9kdWxlIGlkID0gNTFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///51\n");
|
||
|
||
/***/ }),
|
||
/* 52 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvZW5oYW5jZUVycm9yLmpzP2I3Y2EiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxNQUFNO0FBQ2pCLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixhQUFhLE1BQU07QUFDbkI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiNTIuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogVXBkYXRlIGFuIEVycm9yIHdpdGggdGhlIHNwZWNpZmllZCBjb25maWcsIGVycm9yIGNvZGUsIGFuZCByZXNwb25zZS5cbiAqXG4gKiBAcGFyYW0ge0Vycm9yfSBlcnJvciBUaGUgZXJyb3IgdG8gdXBkYXRlLlxuICogQHBhcmFtIHtPYmplY3R9IGNvbmZpZyBUaGUgY29uZmlnLlxuICogQHBhcmFtIHtzdHJpbmd9IFtjb2RlXSBUaGUgZXJyb3IgY29kZSAoZm9yIGV4YW1wbGUsICdFQ09OTkFCT1JURUQnKS5cbiAqIEBwYXJhbSB7T2JqZWN0fSBbcmVxdWVzdF0gVGhlIHJlcXVlc3QuXG4gKiBAcGFyYW0ge09iamVjdH0gW3Jlc3BvbnNlXSBUaGUgcmVzcG9uc2UuXG4gKiBAcmV0dXJucyB7RXJyb3J9IFRoZSBlcnJvci5cbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBlbmhhbmNlRXJyb3IoZXJyb3IsIGNvbmZpZywgY29kZSwgcmVxdWVzdCwgcmVzcG9uc2UpIHtcbiAgZXJyb3IuY29uZmlnID0gY29uZmlnO1xuICBpZiAoY29kZSkge1xuICAgIGVycm9yLmNvZGUgPSBjb2RlO1xuICB9XG4gIGVycm9yLnJlcXVlc3QgPSByZXF1ZXN0O1xuICBlcnJvci5yZXNwb25zZSA9IHJlc3BvbnNlO1xuICByZXR1cm4gZXJyb3I7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvZW5oYW5jZUVycm9yLmpzXG4vLyBtb2R1bGUgaWQgPSA1MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///52\n");
|
||
|
||
/***/ }),
|
||
/* 53 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvYnVpbGRVUkwuanM/MGQwMCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsT0FBTztBQUNwQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0EsR0FBRztBQUNIOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxPQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0EsT0FBTztBQUNQLEtBQUs7O0FBRUw7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSIsImZpbGUiOiI1My5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIHV0aWxzID0gcmVxdWlyZSgnLi8uLi91dGlscycpO1xuXG5mdW5jdGlvbiBlbmNvZGUodmFsKSB7XG4gIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQodmFsKS5cbiAgICByZXBsYWNlKC8lNDA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\n//# sourceURL=webpack-internal:///53\n");
|
||
|
||
/***/ }),
|
||
/* 54 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvcGFyc2VIZWFkZXJzLmpzP2EwOTkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ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sICcgKyB2YWwgOiB2YWw7XG4gICAgICB9XG4gICAgfVxuICB9KTtcblxuICByZXR1cm4gcGFyc2VkO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL3BhcnNlSGVhZGVycy5qc1xuLy8gbW9kdWxlIGlkID0gNTRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///54\n");
|
||
|
||
/***/ }),
|
||
/* 55 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvaXNVUkxTYW1lT3JpZ2luLmpzPzE4NzAiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGdCQUFnQjtBQUNoQjtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLGNBQWMsT0FBTztBQUNyQixnQkFBZ0IsUUFBUTtBQUN4QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHOztBQUVIO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0giLCJmaWxlIjoiNTUuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciB1dGlscyA9IHJlcXVpcmUoJy4vLi4vdXRpbHMnKT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56 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvYnRvYS5qcz9iNjEyIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEiLCJmaWxlIjoiNTYuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8vIGJ0b2EgcG9seWZpbGwgZm9yIElFPDEwIGNvdXJ0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LmNoYXJDb2RlQXQoaWR4ICs9IDMgLyA0KTtcbiAgICBpZiAoY2hhckNvZGUgPiAweEZGKSB7XG4gICAgICB0aHJvdyBuZXcgRSgpO1xuICAgIH1cbiAgICBibG9jayA9IGJsb2NrIDw8IDggfCBjaGFyQ29kZTtcbiAgfVxuICByZXR1cm4gb3V0cHV0O1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGJ0b2E7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9idG9hLmpzXG4vLyBtb2R1bGUgaWQgPSA1NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///56\n");
|
||
|
||
/***/ }),
|
||
/* 57 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}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NoKG5hbWUgKyAnPScgKyBlbmNvZGVVUklDb21wb25lbnQodmFsdWUpKTtcblxuICAgICAgICBpZiAodXRpbHMuaXNOdW1iZXIoZXhwaXJlcykpIHtcbiAgICAgICAgICBjb29raWUucHVzaCgnZXhwaXJlcz0nICsgbmV3IERhdGUoZXhwaXJlcykudG9HTVRTdHJpbmcoKSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXRpbHMuaXNTdHJpbmcocGF0aCkpIHtcbiAgICAgICAgICBjb29raWUucHVzaCgncGF0aD0nICsgcGF0aCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXRpbHMuaXNTdHJpbmcoZG9tYWluKSkge1xuICAgICAgICAgIGNvb2tpZS5wdXNoKCdkb21haW49JyArIGRvbWFpbik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc2VjdXJlID09PSB0cnVlKSB7XG4gICAgICAgICAgY29va2llLnB1c2goJ3NlY3VyZScpO1xuICAgICAgICB9XG5cbiAgICAgICAgZG9jdW1lbnQuY29va2llID0gY29va2llLmpvaW4oJzsgJyk7XG4gICAgICB9LFxuXG4gICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG5hbWUpIHtcbiAgICAgICAgdmFyIG1hdGNoID0gZG9jdW1lbnQuY29va2llLm1hdGNoKG5ldyBSZWdFeHAoJyhefDtcXFxccyopKCcgKyBuYW1lICsgJyk9KFteO10qKScpKTtcbiAgICAgICAgcmV0dXJuIChtYXRjaCA/IGRlY29kZVVSSUNvbXBvbmVudChtYXRjaFszXSkgOiBudWxsKTtcbiAgICAgIH0sXG5cbiAgICAgIHJlbW92ZTogZnVuY3Rpb24gcmVtb3ZlKG5hbWUpIHtcbiAgICAgICAgdGhpcy53cml0ZShuYW1lLCAnJywgRGF0ZS5ub3coKSAtIDg2NDAwMDAwKTtcbiAgICAgIH1cbiAgICB9O1xuICB9KSgpIDpcblxuICAvLyBOb24gc3RhbmRhcmQgYnJvd3NlciBlbnYgKHdlYiB3b3JrZXJzLCByZWFjdC1uYXRpdmUpIGxhY2sgbmVlZGVkIHN1cHBvcnQuXG4gIChmdW5jdGlvbiBub25TdGFuZGFyZEJyb3dzZXJFbnYoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZSgpIHt9LFxuICAgICAgcmVhZDogZnVuY3Rpb24gcmVhZCgpIHsgcmV0dXJuIG51bGw7IH0sXG4gICAgICByZW1vdmU6IGZ1bmN0aW9uIHJlbW92ZSgpIHt9XG4gICAgfTtcbiAgfSkoKVxuKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2Nvb2tpZXMuanNcbi8vIG1vZHVsZSBpZCA9IDU3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///57\n");
|
||
|
||
/***/ }),
|
||
/* 58 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvSW50ZXJjZXB0b3JNYW5hZ2VyLmpzPzdlZTEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsU0FBUztBQUNwQixXQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFZLE9BQU87QUFDbkI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxTQUFTO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDs7QUFFQSIsImZpbGUiOiI1OC5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIHV0aWxzID0gcmVxdWlyZSgnLi8uLi91dGlscycpO1xuXG5mdW5jdGlvbiBJbnRlcmNlcHRvck1hbmFnZXIoKSB7XG4gIHRoaXMuaGFuZGxlcnMgPSBbXTtcbn1cblxuLyoqXG4gKiBBZGQgYSBuZXcgaW50ZXJjZXB0b3IgdG8gdGhlIHN0YWNrXG4gKlxuICogQHBhcmFtIHtGdW5jdGlvbn0gZnVsZmlsbGVkIFRoZSBmdW5jdGlvbiB0byBoYW5kbGUgYHRoZW5gIGZvciBhIG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ge0Z1bmN0aW9ufSBmbiBUaGUgZnVuY3Rpb24gdG8gY2FsbCBmb3IgZWFjaCBpbnRlcmNlcHRvclxuICovXG5JbnRlcmNlcHRvck1hbmFnZXIucHJvdG90eXBlLmZvckVhY2ggPSBmdW5jdGlvbiBmb3JFYWNoKGZuKSB7XG4gIHV0aWxzLmZvckVhY2godGhpcy5oYW5kbGVycywgZnVuY3Rpb24gZm9yRWFjaEhhbmRsZXIoaCkge1xuICAgIGlmIChoICE9PSBudWxsKSB7XG4gICAgICBmbihoKTtcbiAgICB9XG4gIH0pO1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSBJbnRlcmNlcHRvck1hbmFnZXI7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9JbnRlcmNlcHRvck1hbmFnZXIuanNcbi8vIG1vZHVsZSBpZCA9IDU4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///58\n");
|
||
|
||
/***/ }),
|
||
/* 59 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\nvar transformData = __webpack_require__(60);\nvar isCancel = __webpack_require__(21);\nvar defaults = __webpack_require__(7);\nvar isAbsoluteURL = __webpack_require__(61);\nvar combineURLs = __webpack_require__(62);\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvZGlzcGF0Y2hSZXF1ZXN0LmpzP2M0YmIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLCtCQUErQjtBQUMvQix1Q0FBdUM7QUFDdkM7QUFDQTs7QUFFQTtBQUNBO0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gICk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIFByb21pc2UucmVqZWN0KHJlYXNvbik7XG4gIH0pO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2Rpc3BhdGNoUmVxdWVzdC5qc1xuLy8gbW9kdWxlIGlkID0gNTlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///59\n");
|
||
|
||
/***/ }),
|
||
/* 60 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar utils = __webpack_require__(0);\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvdHJhbnNmb3JtRGF0YS5qcz80Y2Q1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsY0FBYztBQUN6QixXQUFXLE1BQU07QUFDakIsV0FBVyxlQUFlO0FBQzFCLGFBQWEsRUFBRTtBQUNmO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHOztBQUVIO0FBQ0EiLCJmaWxlIjoiNjAuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciB1dGlscyA9IHJlcXVpcmUoJy4vLi4vdXRpbHMnKTtcblxuLyoqXG4gKiBUcmFuc2Zvcm0gdGhlIGRhdGEgZm9yIGEgcmVxdWVzdCBvciBhIHJlc3BvbnNlXG4gKlxuICogQHBhcmFtIHtPYmplY3R8U3RyaW5nfSBkYXRhIFRoZSBkYXRhIHRvIGJlIHRyYW5zZm9ybWVkXG4gKiBAcGFyYW0ge0FycmF5fSBoZWFkZXJzIFRoZSBoZWFkZXJzIGZvciB0aGUgcmVxdWVzdCBvciByZXNwb25zZVxuICogQHBhcmFtIHtBcnJheXxGdW5jdGlvbn0gZm5zIEEgc2luZ2xlIGZ1bmN0aW9uIG9yIEFycmF5IG9mIGZ1bmN0aW9uc1xuICogQHJldHVybnMgeyp9IFRoZSByZXN1bHRpbmcgdHJhbnNmb3JtZWQgZGF0YVxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIHRyYW5zZm9ybURhdGEoZGF0YSwgaGVhZGVycywgZm5zKSB7XG4gIC8qZXNsaW50IG5vLXBhcmFtLXJlYXNzaWduOjAqL1xuICB1dGlscy5mb3JFYWNoKGZucywgZnVuY3Rpb24gdHJhbnNmb3JtKGZuKSB7XG4gICAgZGF0YSA9IGZuKGRhdGEsIGhlYWRlcnMpO1xuICB9KTtcblxuICByZXR1cm4gZGF0YTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS90cmFuc2Zvcm1EYXRhLmpzXG4vLyBtb2R1bGUgaWQgPSA2MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///60\n");
|
||
|
||
/***/ }),
|
||
/* 61 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvaXNBYnNvbHV0ZVVSTC5qcz83NDhjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQixhQUFhLFFBQVE7QUFDckI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiNjEuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogRGV0ZXJtaW5lcyB3aGV0aGVyIHRoZSBzcGVjaWZpZWQgVVJMIGlzIGFic29sdXRlXG4gKlxuICogQHBhcmFtIHtzdHJpbmd9IHVybCBUaGUgVVJMIHRvIHRlc3RcbiAqIEByZXR1cm5zIHtib29sZWFufSBUcnVlIGlmIHRoZSBzcGVjaWZpZWQgVVJMIGlzIGFic29sdXRlLCBvdGhlcndpc2UgZmFsc2VcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBpc0Fic29sdXRlVVJMKHVybCkge1xuICAvLyBBIFVSTCBpcyBjb25zaWRlcmVkIGFic29sdXRlIGlmIGl0IGJlZ2lucyB3aXRoIFwiPHNjaGVtZT46Ly9cIiBvciBcIi8vXCIgKHByb3RvY29sLXJlbGF0aXZlIFVSTCkuXG4gIC8vIFJGQyAzOTg2IGRlZmluZXMgc2NoZW1lIG5hbWUgYXMgYSBzZXF1ZW5jZSBvZiBjaGFyYWN0ZXJzIGJlZ2lubmluZyB3aXRoIGEgbGV0dGVyIGFuZCBmb2xsb3dlZFxuICAvLyBieSBhbnkgY29tYmluYXRpb24gb2YgbGV0dGVycywgZGlnaXRzLCBwbHVzLCBwZXJpb2QsIG9yIGh5cGhlbi5cbiAgcmV0dXJuIC9eKFthLXpdW2EtelxcZFxcK1xcLVxcLl0qOik/XFwvXFwvL2kudGVzdCh1cmwpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzQWJzb2x1dGVVUkwuanNcbi8vIG1vZHVsZSBpZCA9IDYxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///61\n");
|
||
|
||
/***/ }),
|
||
/* 62 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvY29tYmluZVVSTHMuanM/YTkxNyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsT0FBTztBQUNwQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiNjIuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBVUkwgYnkgY29tYmluaW5nIHRoZSBzcGVjaWZpZWQgVVJMc1xuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBiYXNlVVJMIFRoZSBiYXNlIFVSTFxuICogQHBhcmFtIHtzdHJpbmd9IHJlbGF0aXZlVVJMIFRoZSByZWxhdGl2ZSBVUkxcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBjb21iaW5lZCBVUkxcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjb21iaW5lVVJMcyhiYXNlVVJMLCByZWxhdGl2ZVVSTCkge1xuICByZXR1cm4gcmVsYXRpdmVVUkxcbiAgICA/IGJhc2VVUkwucmVwbGFjZSgvXFwvKyQvLCAnJykgKyAnLycgKyByZWxhdGl2ZVVSTC5yZXBsYWNlKC9eXFwvKy8sICcnKVxuICAgIDogYmFzZVVSTDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9jb21iaW5lVVJMcy5qc1xuLy8gbW9kdWxlIGlkID0gNjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///62\n");
|
||
|
||
/***/ }),
|
||
/* 63 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\nvar Cancel = __webpack_require__(22);\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NhbmNlbC9DYW5jZWxUb2tlbi5qcz83MTZjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxTQUFTO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsR0FBRzs7QUFFSDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLEdBQUc7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSIsImZpbGUiOiI2My5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIENhbmNlbCA9IHJlcXVpcmUoJy4vQ2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Vlc3RlZCA9IGZ1bmN0aW9uIHRocm93SWZSZXF1ZXN0ZWQoKSB7XG4gIGlmICh0aGlzLnJlYXNvbikge1xuICAgIHRocm93IHRoaXMucmVhc29uO1xuICB9XG59O1xuXG4vKipcbiAqIFJldHVybnMgYW4gb2JqZWN0IHRoYXQgY29udGFpbnMgYSBuZXcgYENhbmNlbFRva2VuYCBhbmQgYSBmdW5jdGlvbiB0aGF0LCB3aGVuIGNhbGxlZCxcbiAqIGNhbmNlbHMgdGhlIGBDYW5jZWxUb2tlbmAuXG4gKi9cbkNhbmNlbFRva2VuLnNvdXJjZSA9IGZ1bmN0aW9uIHNvdXJjZSgpIHtcbiAgdmFyIGNhbmNlbDtcbiAgdmFyIHRva2VuID0gbmV3IENhbmNlbFRva2VuKGZ1bmN0aW9uIGV4ZWN1dG9yKGMpIHtcbiAgICBjYW5jZWwgPSBjO1xuICB9KTtcbiAgcmV0dXJuIHtcbiAgICB0b2tlbjogdG9rZW4sXG4gICAgY2FuY2VsOiBjYW5jZWxcbiAgfTtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gQ2FuY2VsVG9rZW47XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9saWIvY2FuY2VsL0NhbmNlbFRva2VuLmpzXG4vLyBtb2R1bGUgaWQgPSA2M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///63\n");
|
||
|
||
/***/ }),
|
||
/* 64 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvc3ByZWFkLmpzP2E3MTEiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLCtCQUErQjtBQUMvQjtBQUNBO0FBQ0EsV0FBVyxTQUFTO0FBQ3BCLGFBQWE7QUFDYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiNjQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogU3ludGFjdGljIHN1Z2FyIGZvciBpbnZva2luZyBhIGZ1bmN0aW9uIGFuZCBleHBhbmRpbmcgYW4gYXJyYXkgZm9yIGFyZ3VtZW50cy5cbiAqXG4gKiBDb21tb24gdXNlIGNhc2Ugd291bGQgYmUgdG8gdXNlIGBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHlgLlxuICpcbiAqICBgYGBqc1xuICogIGZ1bmN0aW9uIGYoeCwgeSwgeikge31cbiAqICB2YXIgYXJncyA9IFsxLCAyLCAzXTtcbiAqICBmLmFwcGx5KG51bGwsIGFyZ3MpO1xuICogIGBgYFxuICpcbiAqIFdpdGggYHNwcmVhZGAgdGhpcyBleGFtcGxlIGNhbiBiZSByZS13cml0dGVuLlxuICpcbiAqICBgYGBqc1xuICogIHNwcmVhZChmdW5jdGlvbih4LCB5LCB6KSB7fSkoWzEsIDIsIDNdKTtcbiAqICBgYGBcbiAqXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSBjYWxsYmFja1xuICogQHJldHVybnMge0Z1bmN0aW9ufVxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIHNwcmVhZChjYWxsYmFjaykge1xuICByZXR1cm4gZnVuY3Rpb24gd3JhcChhcnIpIHtcbiAgICByZXR1cm4gY2FsbGJhY2suYXBwbHkobnVsbCwgYXJyKTtcbiAgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9zcHJlYWQuanNcbi8vIG1vZHVsZSBpZCA9IDY0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///64\n");
|
||
|
||
/***/ }),
|
||
/* 65 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"app\" } },\n [\n _c(\n \"app-navigation\",\n { attrs: { menu: _vm.menu } },\n [\n _c(\"template\", { slot: \"settings-content\" }, [\n _c(\n \"div\",\n [\n _c(\"p\", [_vm._v(_vm._s(_vm.t(\"settings\", \"Default quota :\")))]),\n _vm._v(\" \"),\n _c(\"multiselect\", {\n staticClass: \"multiselect-vue\",\n attrs: {\n value: _vm.defaultQuota,\n options: _vm.quotaOptions,\n \"tag-placeholder\": \"create\",\n placeholder: _vm.t(\"settings\", \"Select default quota\"),\n label: \"label\",\n \"track-by\": \"id\",\n allowEmpty: false,\n taggable: true\n },\n on: { tag: _vm.validateQuota, input: _vm.setDefaultQuota }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"div\", [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.showLanguages,\n expression: \"showLanguages\"\n }\n ],\n staticClass: \"checkbox\",\n attrs: { type: \"checkbox\", id: \"showLanguages\" },\n domProps: {\n checked: _vm.showLanguages,\n checked: Array.isArray(_vm.showLanguages)\n ? _vm._i(_vm.showLanguages, null) > -1\n : _vm.showLanguages\n },\n on: {\n change: function($event) {\n var $$a = _vm.showLanguages,\n $$el = $event.target,\n $$c = $$el.checked ? true : false\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v)\n if ($$el.checked) {\n $$i < 0 && (_vm.showLanguages = $$a.concat([$$v]))\n } else {\n $$i > -1 &&\n (_vm.showLanguages = $$a\n .slice(0, $$i)\n .concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.showLanguages = $$c\n }\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"showLanguages\" } }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Show Languages\")))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.showLastLogin,\n expression: \"showLastLogin\"\n }\n ],\n staticClass: \"checkbox\",\n attrs: { type: \"checkbox\", id: \"showLastLogin\" },\n domProps: {\n checked: _vm.showLastLogin,\n checked: Array.isArray(_vm.showLastLogin)\n ? _vm._i(_vm.showLastLogin, null) > -1\n : _vm.showLastLogin\n },\n on: {\n change: function($event) {\n var $$a = _vm.showLastLogin,\n $$el = $event.target,\n $$c = $$el.checked ? true : false\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v)\n if ($$el.checked) {\n $$i < 0 && (_vm.showLastLogin = $$a.concat([$$v]))\n } else {\n $$i > -1 &&\n (_vm.showLastLogin = $$a\n .slice(0, $$i)\n .concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.showLastLogin = $$c\n }\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"showLastLogin\" } }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Show last login\")))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.showUserBackend,\n expression: \"showUserBackend\"\n }\n ],\n staticClass: \"checkbox\",\n attrs: { type: \"checkbox\", id: \"showUserBackend\" },\n domProps: {\n checked: _vm.showUserBackend,\n checked: Array.isArray(_vm.showUserBackend)\n ? _vm._i(_vm.showUserBackend, null) > -1\n : _vm.showUserBackend\n },\n on: {\n change: function($event) {\n var $$a = _vm.showUserBackend,\n $$el = $event.target,\n $$c = $$el.checked ? true : false\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v)\n if ($$el.checked) {\n $$i < 0 && (_vm.showUserBackend = $$a.concat([$$v]))\n } else {\n $$i > -1 &&\n (_vm.showUserBackend = $$a\n .slice(0, $$i)\n .concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.showUserBackend = $$c\n }\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"showUserBackend\" } }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Show user backend\")))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.showStoragePath,\n expression: \"showStoragePath\"\n }\n ],\n staticClass: \"checkbox\",\n attrs: { type: \"checkbox\", id: \"showStoragePath\" },\n domProps: {\n checked: _vm.showStoragePath,\n checked: Array.isArray(_vm.showStoragePath)\n ? _vm._i(_vm.showStoragePath, null) > -1\n : _vm.showStoragePath\n },\n on: {\n change: function($event) {\n var $$a = _vm.showStoragePath,\n $$el = $event.target,\n $$c = $$el.checked ? true : false\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v)\n if ($$el.checked) {\n $$i < 0 && (_vm.showStoragePath = $$a.concat([$$v]))\n } else {\n $$i > -1 &&\n (_vm.showStoragePath = $$a\n .slice(0, $$i)\n .concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.showStoragePath = $$c\n }\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"showStoragePath\" } }, [\n _vm._v(_vm._s(_vm.t(\"settings\", \"Show storage path\")))\n ])\n ])\n ])\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"user-list\", {\n attrs: {\n users: _vm.users,\n showConfig: _vm.showConfig,\n selectedGroup: _vm.selectedGroup\n }\n })\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-68be103e\", esExports)\n }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvdmlld3MvVXNlcnMudnVlPzJiNDgiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSyxTQUFTLFlBQVksRUFBRTtBQUM1QjtBQUNBO0FBQ0E7QUFDQSxTQUFTLFNBQVMsaUJBQWlCLEVBQUU7QUFDckM7QUFDQSwwQkFBMEIsMkJBQTJCO0FBQ3JEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsbUJBQW1CO0FBQ25CLHVCQUF1QjtBQUN2QixpQkFBaUI7QUFDakI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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BfYyhcbiAgICAgICAgXCJhcHAtbmF2aWdhdGlvblwiLFxuICAgICAgICB7IGF0dHJzOiB7IG1lbnU6IF92bS5tZW51IH0gfSxcbiAgICAgICAgW1xuICAgICAgICAgIF9jKFwidGVtcGxhdGVcIiwgeyBzbG90OiBcInNldHRpbmdzLWNvbnRlbnRcIiB9LCBbXG4gICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIF9jKFwicFwiLCBbX3ZtLl92KF92bS5fcyhfdm0udChcInNldHRpbmdzXCIsIFwiRGVmYXVsdCBxdW90YSA6XCIpKSldKSxcbiAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgIF9jKFwibXVsdGlzZWxlY3RcIiwge1xuICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwibXVsdGlzZWxlY3QtdnVlXCIsXG4gICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLmRlZmF1bHRRdW90YSxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogX3ZtLnF1b3RhT3B0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgXCJ0YWctcGxhY2Vob2xkZXJcIjogXCJjcmVhdGVcIixcbiAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6IF92bS50KFwic2V0dGluZ3NcIiwgXCJTZWxlY3QgZGVmYXVsdCBxdW90YVwiKSxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IFwibGFiZWxcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0cmFjay1ieVwiOiBcImlkXCIsXG4gICAgICAgICAgICAgICAgICAgIGFsbG93RW1wdHk6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICB0YWdnYWJsZTogdHJ1ZVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIG9uOiB7IHRhZzogX3ZtLnZhbGlkYXRlUXVvdGEsIGlucHV0OiBfdm0uc2V0RGVmYXVsdFF1b3RhIH1cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAxXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgIF9jKFwiZGl2XCIsIFtcbiAgICAgICAgICAgICAgX2MoXCJpbnB1dFwiLCB7XG4gICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIm1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1tb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLnNob3dMYW5ndWFnZXMsXG4gICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2hvd0xhbmd1YWdlc1wiXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgIGF0dHJzOiB7IHR5cGU6IFwiY2hlY2tib3hcIiwgaWQ6IFwic2hvd0xhbmd1YWdlc1wiIH0sXG4gICAgICAgICAgICAgICAgZG9tUHJvcHM6IHtcbiAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IF92bS5zaG93TGFuZ3VhZ2VzLFxuICAgICAgICAgICAgICAgICAgY2hlY2tlZDogQXJyYXkuaXNBcnJheShfdm0uc2hvd0xhbmd1YWdlcylcbiAgICAgICAgICAgICAgICAgICAgPyBfdm0uX2koX3ZtLnNob3dMYW5ndWFnZXMsIG51bGwpID4gLTFcbiAgICAgICAgICAgICAgICAgICAgOiBfdm0uc2hvd0xhbmd1YWdlc1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgIGNoYW5nZTogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciAkJGEgPSBfdm0uc2hvd0xhbmd1YWdlcyxcbiAgICAgICAgICAgICAgICAgICAgICAkJGVsID0gJGV2ZW50LnRhcmdldCxcbiAgICAgICAgICAgICAgICAgICAgICAkJGMgPSAkJGVsLmNoZWNrZWQgPyB0cnVlIDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoJCRhKSkge1xuICAgICAgICAgICAgICAgICAgICAgIHZhciAkJHYgPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgJCRpID0gX3ZtLl9pKCQkYSwgJCR2KVxuICAgICAgICAgICAgICAgICAgICAgIGlmICgkJGVsLmNoZWNrZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkaSA8IDAgJiYgKF92bS5zaG93TGFuZ3VhZ2VzID0gJCRhLmNvbmNhdChbJCR2XSkpXG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkaSA+IC0xICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgIChfdm0uc2hvd0xhbmd1YWdlcyA9ICQkYVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zbGljZSgwLCAkJGkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNvbmNhdCgkJGEuc2xpY2UoJCRpICsgMSkpKVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICBfdm0uc2hvd0xhbmd1YWdlcyA9ICQkY1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgX2MoXCJsYWJlbFwiLCB7IGF0dHJzOiB7IGZvcjogXCJzaG93TGFuZ3VhZ2VzXCIgfSB9LCBbXG4gICAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0udChcInNldHRpbmdzXCIsIFwiU2hvdyBMYW5ndWFnZXNcIikpKVxuICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgX2MoXCJkaXZcIiwgW1xuICAgICAgICAgICAgICBfYyhcImlucHV0XCIsIHtcbiAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwibW9kZWxcIixcbiAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uc2hvd0xhc3RMb2dpbixcbiAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJzaG93TGFzdExvZ2luXCJcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImNoZWNrYm94XCIsXG4gICAgICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJjaGVja2JveFwiLCBpZDogXCJzaG93TGFzdExvZ2luXCIgfSxcbiAgICAgICAgICAgICAgICBkb21Qcm9wczoge1xuICAgICAgICAgICAgICAgICAgY2hlY2tlZDogX3ZtLnNob3dMYXN0TG9naW4sXG4gICAgICAgICAgICAgICAgICBjaGVja2VkOiBBcnJheS5pc0FycmF5KF92bS5zaG93TGFzdExvZ2luKVxuICAgICAgICAgICAgICAgICAgICA/IF92bS5faShfdm0uc2hvd0xhc3RMb2dpbiwgbnVsbCkgPiAtMVxuICAgICAgICAgICAgICAgICAgICA6IF92bS5zaG93TGFzdExvZ2luXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgY2hhbmdlOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyICQkYSA9IF92bS5zaG93TGFzdExvZ2luLFxuICAgICAgICAgICAgICAgICAgICAgICQkZWwgPSAkZXZlbnQudGFyZ2V0LFxuICAgICAgICAgICAgICAgICAgICAgICQkYyA9ICQkZWwuY2hlY2tlZCA/IHRydWUgOiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSgkJGEpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyICQkdiA9IG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAkJGkgPSBfdm0uX2koJCRhLCAkJHYpXG4gICAgICAgICAgICAgICAgICAgICAgaWYgKCQkZWwuY2hlY2tlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCRpIDwgMCAmJiAoX3ZtLnNob3dMYXN0TG9naW4gPSAkJGEuY29uY2F0KFskJHZdKSlcbiAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCRpID4gLTEgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKF92bS5zaG93TGFzdExvZ2luID0gJCRhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNsaWNlKDAsICQkaSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY29uY2F0KCQkYS5zbGljZSgkJGkgKyAxKSkpXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93TGFzdExvZ2luID0gJCRjXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcImxhYmVsXCIsIHsgYXR0cnM6IHsgZm9yOiBcInNob3dMYXN0TG9naW5cIiB9IH0sIFtcbiAgICAgICAgICAgICAgICBfdm0uX3YoX3ZtLl9zKF92bS50KFwic2V0dGluZ3NcIiwgXCJTaG93IGxhc3QgbG9naW5cIikpKVxuICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgX2MoXCJkaXZcIiwgW1xuICAgICAgICAgICAgICBfYyhcImlucHV0XCIsIHtcbiAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwibW9kZWxcIixcbiAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uc2hvd1VzZXJCYWNrZW5kLFxuICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcInNob3dVc2VyQmFja2VuZFwiXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJjaGVja2JveFwiLFxuICAgICAgICAgICAgICAgIGF0dHJzOiB7IHR5cGU6IFwiY2hlY2tib3hcIiwgaWQ6IFwic2hvd1VzZXJCYWNrZW5kXCIgfSxcbiAgICAgICAgICAgICAgICBkb21Qcm9wczoge1xuICAgICAgICAgICAgICAgICAgY2hlY2tlZDogX3ZtLnNob3dVc2VyQmFja2VuZCxcbiAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IEFycmF5LmlzQXJyYXkoX3ZtLnNob3dVc2VyQmFja2VuZClcbiAgICAgICAgICAgICAgICAgICAgPyBfdm0uX2koX3ZtLnNob3dVc2VyQmFja2VuZCwgbnVsbCkgPiAtMVxuICAgICAgICAgICAgICAgICAgICA6IF92bS5zaG93VXNlckJhY2tlbmRcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICBjaGFuZ2U6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgJCRhID0gX3ZtLnNob3dVc2VyQmFja2VuZCxcbiAgICAgICAgICAgICAgICAgICAgICAkJGVsID0gJGV2ZW50LnRhcmdldCxcbiAgICAgICAgICAgICAgICAgICAgICAkJGMgPSAkJGVsLmNoZWNrZWQgPyB0cnVlIDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoJCRhKSkge1xuICAgICAgICAgICAgICAgICAgICAgIHZhciAkJHYgPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgJCRpID0gX3ZtLl9pKCQkYSwgJCR2KVxuICAgICAgICAgICAgICAgICAgICAgIGlmICgkJGVsLmNoZWNrZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkaSA8IDAgJiYgKF92bS5zaG93VXNlckJhY2tlbmQgPSAkJGEuY29uY2F0KFskJHZdKSlcbiAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCRpID4gLTEgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKF92bS5zaG93VXNlckJhY2tlbmQgPSAkJGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc2xpY2UoMCwgJCRpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jb25jYXQoJCRhLnNsaWNlKCQkaSArIDEpKSlcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgX3ZtLnNob3dVc2VyQmFja2VuZCA9ICQkY1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgX2MoXCJsYWJlbFwiLCB7IGF0dHJzOiB7IGZvcjogXCJzaG93VXNlckJhY2tlbmRcIiB9IH0sIFtcbiAgICAgICAgICAgICAgICBfdm0uX3YoX3ZtLl9zKF92bS50KFwic2V0dGluZ3NcIiwgXCJTaG93IHVzZXIgYmFja2VuZFwiKSkpXG4gICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICBfYyhcImRpdlwiLCBbXG4gICAgICAgICAgICAgIF9jKFwiaW5wdXRcIiwge1xuICAgICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJtb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtbW9kZWxcIixcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5zaG93U3RvcmFnZVBhdGgsXG4gICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2hvd1N0b3JhZ2VQYXRoXCJcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImNoZWNrYm94XCIsXG4gICAgICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJjaGVja2JveFwiLCBpZDogXCJzaG93U3RvcmFnZVBhdGhcIiB9LFxuICAgICAgICAgICAgICAgIGRvbVByb3BzOiB7XG4gICAgICAgICAgICAgICAgICBjaGVja2VkOiBfdm0uc2hvd1N0b3JhZ2VQYXRoLFxuICAgICAgICAgICAgICAgICAgY2hlY2tlZDogQXJyYXkuaXNBcnJheShfdm0uc2hvd1N0b3JhZ2VQYXRoKVxuICAgICAgICAgICAgICAgICAgICA/IF92bS5faShfdm0uc2hvd1N0b3JhZ2VQYXRoLCBudWxsKSA+IC0xXG4gICAgICAgICAgICAgICAgICAgIDogX3ZtLnNob3dTdG9yYWdlUGF0aFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgIGNoYW5nZTogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciAkJGEgPSBfdm0uc2hvd1N0b3JhZ2VQYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICQkZWwgPSAkZXZlbnQudGFyZ2V0LFxuICAgICAgICAgICAgICAgICAgICAgICQkYyA9ICQkZWwuY2hlY2tlZCA/IHRydWUgOiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSgkJGEpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyICQkdiA9IG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAkJGkgPSBfdm0uX2koJCRhLCAkJHYpXG4gICAgICAgICAgICAgICAgICAgICAgaWYgKCQkZWwuY2hlY2tlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCRpIDwgMCAmJiAoX3ZtLnNob3dTdG9yYWdlUGF0aCA9ICQkYS5jb25jYXQoWyQkdl0pKVxuICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkJGkgPiAtMSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAoX3ZtLnNob3dTdG9yYWdlUGF0aCA9ICQkYVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zbGljZSgwLCAkJGkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNvbmNhdCgkJGEuc2xpY2UoJCRpICsgMSkpKVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICBfdm0uc2hvd1N0b3JhZ2VQYXRoID0gJCRjXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcImxhYmVsXCIsIHsgYXR0cnM6IHsgZm9yOiBcInNob3dTdG9yYWdlUGF0aFwiIH0gfSwgW1xuICAgICAgICAgICAgICAgIF92bS5fdihfdm0uX3MoX3ZtLnQoXCJzZXR0aW5nc1wiLCBcIlNob3cgc3RvcmFnZSBwYXRoXCIpKSlcbiAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgIF0pXG4gICAgICAgICAgXSlcbiAgICAgICAgXSxcbiAgICAgICAgMlxuICAgICAgKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcInVzZXItbGlzdFwiLCB7XG4gICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgdXNlcnM6IF92bS51c2VycyxcbiAgICAgICAgICBzaG93Q29uZmlnOiBfdm0uc2hvd0NvbmZpZyxcbiAgICAgICAgICBzZWxlY3RlZEdyb3VwOiBfdm0uc2VsZWN0ZWRHcm91cFxuICAgICAgICB9XG4gICAgICB9KVxuICAgIF0sXG4gICAgMVxuICApXG59XG52YXIgc3RhdGljUmVuZGVyRm5zID0gW11cbnJlbmRlci5fd2l0aFN0cmlwcGVkID0gdHJ1ZVxudmFyIGVzRXhwb3J0cyA9IHsgcmVuZGVyOiByZW5kZXIsIHN0YXRpY1JlbmRlckZuczogc3RhdGljUmVuZGVyRm5zIH1cbmV4cG9ydCBkZWZhdWx0IGVzRXhwb3J0c1xuaWYgKG1vZHVsZS5ob3QpIHtcbiAgbW9kdWxlLmhvdC5hY2NlcHQoKVxuICBpZiAobW9kdWxlLmhvdC5kYXRhKSB7XG4gICAgcmVxdWlyZShcInZ1ZS1ob3QtcmVsb2FkLWFwaVwiKSAgICAgIC5yZXJlbmRlcihcImRhdGEtdi02OGJlMTAzZVwiLCBlc0V4cG9ydHMpXG4gIH1cbn1cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi90ZW1wbGF0ZS1jb21waWxlcj97XCJpZFwiOlwiZGF0YS12LTY4YmUxMDNlXCIsXCJoYXNTY29wZWRcIjpmYWxzZSxcImJ1YmxlXCI6e1widHJhbnNmb3Jtc1wiOnt9fX0hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT10ZW1wbGF0ZSZpbmRleD0wIS4vc3JjL3ZpZXdzL1VzZXJzLnZ1ZVxuLy8gbW9kdWxlIGlkID0gNjVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///65\n");
|
||
|
||
/***/ }),
|
||
/* 66 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vuex__ = __webpack_require__(67);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__users__ = __webpack_require__(68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__settings__ = __webpack_require__(69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__oc__ = __webpack_require__(70);\n\n\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */].use(__WEBPACK_IMPORTED_MODULE_1_vuex__[\"a\" /* default */]);\n\nvar debug = process.env.NODE_ENV !== 'production';\n\nvar mutations = {\n\tAPI_FAILURE: function API_FAILURE(state, error) {\n\t\tconsole.log(state, error);\n\t\tOC.Notification.showTemporary(t('settings', 'An error occured during the request. Unable to proceed.'));\n\t}\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_1_vuex__[\"a\" /* default */].Store({\n\tmodules: {\n\t\tusers: __WEBPACK_IMPORTED_MODULE_2__users__[\"a\" /* default */],\n\t\tsettings: __WEBPACK_IMPORTED_MODULE_3__settings__[\"a\" /* default */],\n\t\toc: __WEBPACK_IMPORTED_MODULE_4__oc__[\"a\" /* default */]\n\t},\n\tstrict: debug,\n\n\tmutations: mutations\n}));\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc3RvcmUvaW5kZXguanM/MjFjOSJdLCJuYW1lcyI6WyJWdWUiLCJ1c2UiLCJkZWJ1ZyIsInByb2Nlc3MiLCJlbnYiLCJOT0RFX0VOViIsIm11dGF0aW9ucyIsIkFQSV9GQUlMVVJFIiwic3RhdGUiLCJlcnJvciIsImNvbnNvbGUiLCJsb2ciLCJPQyIsIk5vdGlmaWNhdGlvbiIsInNob3dUZW1wb3JhcnkiLCJ0IiwiVnVleCIsIlN0b3JlIiwibW9kdWxlcyIsInVzZXJzIiwic2V0dGluZ3MiLCJvYyIsInN0cmljdCJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLG9EQUFBQSxDQUFJQyxHQUFKLENBQVEscURBQVI7O0FBRUEsSUFBTUMsUUFBUUMsUUFBUUMsR0FBUixDQUFZQyxRQUFaLEtBQXlCLFlBQXZDOztBQUVBLElBQU1DLFlBQVk7QUFDakJDLFlBRGlCLHVCQUNMQyxLQURLLEVBQ0VDLEtBREYsRUFDUztBQUN6QkMsVUF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W5ncyxcblx0XHRvY1xuXHR9LFxuXHRzdHJpY3Q6IGRlYnVnLFxuXG5cdG11dGF0aW9uc1xufSk7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvc3RvcmUvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///66\n");
|
||
|
||
/***/ }),
|
||
/* 67 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export Store */\n/* unused harmony export install */\n/* unused harmony export mapState */\n/* unused harmony export mapMutations */\n/* unused harmony export mapGetters */\n/* unused harmony export mapActions */\n/* unused harmony export createNamespacedHelpers */\n/**\n * vuex v3.0.1\n * (c) 2017 Evan You\n * @license MIT\n */\nvar applyMixin = function (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n};\n\nvar devtoolHook =\n typeof window !== 'undefined' &&\n window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\n/**\n * Deep copy the given object considering circular structure.\n * This function caches all nested objects and its copies.\n * If it detects circular structure, use cached copy to avoid infinite loop.\n *\n * @param {*} obj\n * @param {Array<Object>} cache\n * @return {*}\n */\n\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n this._children = Object.create(null);\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors$1 = { namespaced: { configurable: true } };\n\nprototypeAccessors$1.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors$1 );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if (process.env.NODE_ENV !== 'production') {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n if (!parent.getChild(key).runtime) { return }\n\n parent.removeChild(key);\n};\n\nfunction update (path, targetModule, newModule) {\n if (process.env.NODE_ENV !== 'production') {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"Store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n var state = options.state; if ( state === void 0 ) state = {};\n if (typeof state === 'function') {\n state = state() || {};\n }\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n if (Vue.config.devtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors = { state: { configurable: true } };\n\nprototypeAccessors.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors.state.set = function (v) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, \"Use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n process.env.NODE_ENV !== 'production' &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); });\n\n return entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload)\n};\n\nStore.prototype.subscribe = function subscribe (fn) {\n return genericSubscribe(fn, this._subscribers)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn) {\n return genericSubscribe(fn, this._actionSubscribers)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors );\n\nfunction genericSubscribe (fn, subs) {\n if (subs.indexOf(fn) < 0) {\n subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n computed[key] = function () { return fn(store); };\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (process.env.NODE_ENV !== 'production' && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (process.env.NODE_ENV !== 'production' && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n var gettersProxy = {};\n\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n\n return gettersProxy\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload, cb) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload, cb);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if (process.env.NODE_ENV !== 'production') {\n assert(store._committing, \"Do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.length\n ? path.reduce(function (state, key) { return state[key]; }, state)\n : state\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof type === 'string', (\"Expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if (process.env.NODE_ENV !== 'production' && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\nfunction normalizeMap (map) {\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if (process.env.NODE_ENV !== 'production' && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\nvar index_esm = {\n Store: Store,\n install: install,\n version: '3.0.1',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (index_esm);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub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rpb25zLFxuICBjcmVhdGVOYW1lc3BhY2VkSGVscGVyczogY3JlYXRlTmFtZXNwYWNlZEhlbHBlcnNcbn07XG5cbmV4cG9ydCB7IFN0b3JlLCBpbnN0YWxsLCBtYXBTdGF0ZSwgbWFwTXV0YXRpb25zLCBtYXBHZXR0ZXJzLCBtYXBBY3Rpb25zLCBjcmVhdGVOYW1lc3BhY2VkSGVscGVycyB9O1xuZXhwb3J0IGRlZmF1bHQgaW5kZXhfZXNtO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvdnVleC9kaXN0L3Z1ZXguZXNtLmpzXG4vLyBtb2R1bGUgaWQgPSA2N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///67\n");
|
||
|
||
/***/ }),
|
||
/* 68 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(5);\n\n\nvar orderGroups = function orderGroups(groups, orderBy) {\n\t/* const SORT_USERCOUNT = 1;\n * const SORT_GROUPNAME = 2;\n * https://github.com/nextcloud/server/blob/208e38e84e1a07a49699aa90dc5b7272d24489f0/lib/private/Group/MetaData.php#L34\n */\n\tif (orderBy === 1) {\n\t\treturn groups.sort(function (a, b) {\n\t\t\treturn a.usercount < b.usercount;\n\t\t});\n\t} else {\n\t\treturn groups.sort(function (a, b) {\n\t\t\treturn a.name.localeCompare(b.name);\n\t\t});\n\t}\n};\n\nvar state = {\n\tusers: [],\n\tgroups: [],\n\torderBy: 1,\n\tminPasswordLength: 0,\n\tusersOffset: 0,\n\tusersLimit: 25,\n\tuserCount: 0\n};\n\nvar mutations = {\n\tappendUsers: function appendUsers(state, usersObj) {\n\t\t// convert obj to array\n\t\tvar users = state.users.concat(Object.keys(usersObj).map(function (userid) {\n\t\t\treturn usersObj[userid];\n\t\t}));\n\t\tstate.usersOffset += state.usersLimit;\n\t\tstate.users = users;\n\t},\n\tsetPasswordPolicyMinLength: function setPasswordPolicyMinLength(state, length) {\n\t\tstate.minPasswordLength = length !== '' ? length : 0;\n\t},\n\tinitGroups: function initGroups(state, _ref) {\n\t\tvar groups = _ref.groups,\n\t\t orderBy = _ref.orderBy,\n\t\t userCount = _ref.userCount;\n\n\t\tstate.groups = groups;\n\t\tstate.orderBy = orderBy;\n\t\tstate.userCount = userCount;\n\t\tstate.groups = orderGroups(state.groups, state.orderBy);\n\t},\n\taddGroup: function addGroup(state, gid) {\n\t\ttry {\n\t\t\tstate.groups.push({\n\t\t\t\tid: gid,\n\t\t\t\tname: gid,\n\t\t\t\tusercount: 0 // user will be added after the creation\n\t\t\t});\n\t\t\tstate.groups = orderGroups(state.groups, state.orderBy);\n\t\t} catch (e) {\n\t\t\tconsole.log('Can\\'t create group', e);\n\t\t}\n\t},\n\tremoveGroup: function removeGroup(state, gid) {\n\t\tvar groupIndex = state.groups.findIndex(function (groupSearch) {\n\t\t\treturn groupSearch.id == gid;\n\t\t});\n\t\tif (groupIndex >= 0) {\n\t\t\tstate.groups.splice(groupIndex, 1);\n\t\t}\n\t},\n\taddUserGroup: function addUserGroup(state, _ref2) {\n\t\tvar userid = _ref2.userid,\n\t\t gid = _ref2.gid;\n\n\t\t// this should not be needed as it would means the user contains a group\n\t\t// the server database doesn't have.\n\t\tvar group = state.groups.find(function (groupSearch) {\n\t\t\treturn groupSearch.id == gid;\n\t\t});\n\t\tif (group) {\n\t\t\tgroup.usercount++; // increase count\n\t\t}\n\t\tvar groups = state.users.find(function (user) {\n\t\t\treturn user.id == userid;\n\t\t}).groups;\n\t\tgroups.push(gid);\n\t\tstate.groups = orderGroups(state.groups, state.orderBy);\n\t},\n\tremoveUserGroup: function removeUserGroup(state, _ref3) {\n\t\tvar userid = _ref3.userid,\n\t\t gid = _ref3.gid;\n\n\t\t// this should not be needed as it would means the user contains a group\n\t\t// the server database doesn't have.\n\t\tvar group = state.groups.find(function (groupSearch) {\n\t\t\treturn groupSearch.id == gid;\n\t\t});\n\t\tif (group) {\n\t\t\tgroup.usercount--; // lower count\n\t\t}\n\t\tvar groups = state.users.find(function (user) {\n\t\t\treturn user.id == userid;\n\t\t}).groups;\n\t\tgroups.splice(groups.indexOf(gid), 1);\n\t\tstate.groups = orderGroups(state.groups, state.orderBy);\n\t},\n\taddUserSubAdmin: function addUserSubAdmin(state, _ref4) {\n\t\tvar userid = _ref4.userid,\n\t\t gid = _ref4.gid;\n\n\t\tvar groups = state.users.find(function (user) {\n\t\t\treturn user.id == userid;\n\t\t}).subadmin;\n\t\tgroups.push(gid);\n\t},\n\tremoveUserSubAdmin: function removeUserSubAdmin(state, _ref5) {\n\t\tvar userid = _ref5.userid,\n\t\t gid = _ref5.gid;\n\n\t\tvar groups = state.users.find(function (user) {\n\t\t\treturn user.id == userid;\n\t\t}).subadmin;\n\t\tgroups.splice(groups.indexOf(gid), 1);\n\t},\n\tdeleteUser: function deleteUser(state, userid) {\n\t\tvar userIndex = state.users.findIndex(function (user) {\n\t\t\treturn user.id == userid;\n\t\t});\n\t\tstate.users.splice(userIndex, 1);\n\t},\n\taddUserData: function addUserData(state, response) {\n\t\tstate.users.push(response.data.ocs.data);\n\t},\n\tenableDisableUser: function enableDisableUser(state, _ref6) {\n\t\tvar userid = _ref6.userid,\n\t\t enabled = _ref6.enabled;\n\n\t\tstate.users.find(function (user) {\n\t\t\treturn user.id == userid;\n\t\t}).enabled = enabled;\n\t\t// increment or not\n\t\tstate.groups.find(function (group) {\n\t\t\treturn group.id == 'disabled';\n\t\t}).usercount += enabled ? -1 : 1;\n\t\tstate.userCount += enabled ? 1 : -1;\n\t\tconsole.log(enabled);\n\t},\n\tsetUserData: function setUserData(state, _ref7) {\n\t\tvar userid = _ref7.userid,\n\t\t key = _ref7.key,\n\t\t value = _ref7.value;\n\n\t\tif (key === 'quota') {\n\t\t\tvar humanValue = OC.Util.computerFileSize(value);\n\t\t\tstate.users.find(function (user) {\n\t\t\t\treturn user.id == userid;\n\t\t\t})[key][key] = humanValue ? humanValue : value;\n\t\t} else {\n\t\t\tstate.users.find(function (user) {\n\t\t\t\treturn user.id == userid;\n\t\t\t})[key] = value;\n\t\t}\n\t},\n\n\n\t/**\n * Reset users list\n */\n\tresetUsers: function resetUsers(state) {\n\t\tstate.users = [];\n\t\tstate.usersOffset = 0;\n\t}\n};\n\nvar getters = {\n\tgetUsers: function getUsers(state) {\n\t\treturn state.users;\n\t},\n\tgetGroups: function getGroups(state) {\n\t\treturn state.groups;\n\t},\n\tgetPasswordPolicyMinLength: function getPasswordPolicyMinLength(state) {\n\t\treturn state.minPasswordLength;\n\t},\n\tgetUsersOffset: function getUsersOffset(state) {\n\t\treturn state.usersOffset;\n\t},\n\tgetUsersLimit: function getUsersLimit(state) {\n\t\treturn state.usersLimit;\n\t},\n\tgetUserCount: function getUserCount(state) {\n\t\treturn state.userCount;\n\t}\n};\n\nvar actions = {\n\n\t/**\n * Get all users with full details\n * \n * @param {Object} context\n * @param {Object} options\n * @param {int} options.offset List offset to request\n * @param {int} options.limit List number to return from offset\n * @param {string} options.search Search amongst users\n * @param {string} options.group Get users from group\n * @returns {Promise}\n */\n\tgetUsers: function getUsers(context, _ref8) {\n\t\tvar offset = _ref8.offset,\n\t\t limit = _ref8.limit,\n\t\t search = _ref8.search,\n\t\t group = _ref8.group;\n\n\t\tsearch = typeof search === 'string' ? search : '';\n\t\tgroup = typeof group === 'string' ? group : '';\n\t\tif (group !== '') {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].get(OC.linkToOCS('cloud/groups/' + group + '/users/details?offset=' + offset + '&limit=' + limit + '&search=' + search, 2)).then(function (response) {\n\t\t\t\tif (Object.keys(response.data.ocs.data.users).length > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}).catch(function (error) {\n\t\t\t\treturn context.commit('API_FAILURE', error);\n\t\t\t});\n\t\t}\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].get(OC.linkToOCS('cloud/users/details?offset=' + offset + '&limit=' + limit + '&search=' + search, 2)).then(function (response) {\n\t\t\tif (Object.keys(response.data.ocs.data.users).length > 0) {\n\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', error);\n\t\t});\n\t},\n\n\n\t/**\n * Get all users with full details\n * \n * @param {Object} context\n * @param {Object} options\n * @param {int} options.offset List offset to request\n * @param {int} options.limit List number to return from offset\n * @returns {Promise}\n */\n\tgetUsersFromList: function getUsersFromList(context, _ref9) {\n\t\tvar offset = _ref9.offset,\n\t\t limit = _ref9.limit,\n\t\t search = _ref9.search;\n\n\t\tsearch = typeof search === 'string' ? search : '';\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].get(OC.linkToOCS('cloud/users/details?offset=' + offset + '&limit=' + limit + '&search=' + search, 2)).then(function (response) {\n\t\t\tif (Object.keys(response.data.ocs.data.users).length > 0) {\n\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', error);\n\t\t});\n\t},\n\n\n\t/**\n * Get all users with full details from a groupid\n * \n * @param {Object} context\n * @param {Object} options\n * @param {int} options.offset List offset to request\n * @param {int} options.limit List number to return from offset\n * @returns {Promise}\n */\n\tgetUsersFromGroup: function getUsersFromGroup(context, _ref10) {\n\t\tvar groupid = _ref10.groupid,\n\t\t offset = _ref10.offset,\n\t\t limit = _ref10.limit;\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].get(OC.linkToOCS('cloud/users/' + groupid + '/details?offset=' + offset + '&limit=' + limit, 2)).then(function (response) {\n\t\t\treturn context.commit('getUsersFromList', response.data.ocs.data.users);\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', error);\n\t\t});\n\t},\n\tgetPasswordPolicyMinLength: function getPasswordPolicyMinLength(context) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].get(OC.linkToOCS('apps/provisioning_api/api/v1/config/apps/password_policy/minLength', 2)).then(function (response) {\n\t\t\treturn context.commit('setPasswordPolicyMinLength', response.data.ocs.data.data);\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', error);\n\t\t});\n\t},\n\n\n\t/**\n * Add group\n * \n * @param {Object} context\n * @param {string} gid Group id\n * @returns {Promise}\n */\n\taddGroup: function addGroup(context, gid) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].post(OC.linkToOCS('cloud/groups', 2), { groupid: gid }).then(function (response) {\n\t\t\t\treturn context.commit('addGroup', gid);\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Remove group\n * \n * @param {Object} context\n * @param {string} gid Group id\n * @returns {Promise}\n */\n\tremoveGroup: function removeGroup(context, gid) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].delete(OC.linkToOCS('cloud/groups/' + gid, 2)).then(function (response) {\n\t\t\t\treturn context.commit('removeGroup', gid);\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { gid: gid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Add user to group\n * \n * @param {Object} context\n * @param {Object} options\n * @param {string} options.userid User id\n * @param {string} options.gid Group id\n * @returns {Promise}\n */\n\taddUserGroup: function addUserGroup(context, _ref11) {\n\t\tvar userid = _ref11.userid,\n\t\t gid = _ref11.gid;\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].post(OC.linkToOCS('cloud/users/' + userid + '/groups', 2), { groupid: gid }).then(function (response) {\n\t\t\t\treturn context.commit('addUserGroup', { userid: userid, gid: gid });\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Remove user from group\n * \n * @param {Object} context\n * @param {Object} options\n * @param {string} options.userid User id\n * @param {string} options.gid Group id\n * @returns {Promise}\n */\n\tremoveUserGroup: function removeUserGroup(context, _ref12) {\n\t\tvar userid = _ref12.userid,\n\t\t gid = _ref12.gid;\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].delete(OC.linkToOCS('cloud/users/' + userid + '/groups', 2), { groupid: gid }).then(function (response) {\n\t\t\t\treturn context.commit('removeUserGroup', { userid: userid, gid: gid });\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Add user to group admin\n * \n * @param {Object} context\n * @param {Object} options\n * @param {string} options.userid User id\n * @param {string} options.gid Group id\n * @returns {Promise}\n */\n\taddUserSubAdmin: function addUserSubAdmin(context, _ref13) {\n\t\tvar userid = _ref13.userid,\n\t\t gid = _ref13.gid;\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].post(OC.linkToOCS('cloud/users/' + userid + '/subadmins', 2), { groupid: gid }).then(function (response) {\n\t\t\t\treturn context.commit('addUserSubAdmin', { userid: userid, gid: gid });\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Remove user from group admin\n * \n * @param {Object} context\n * @param {Object} options\n * @param {string} options.userid User id\n * @param {string} options.gid Group id\n * @returns {Promise}\n */\n\tremoveUserSubAdmin: function removeUserSubAdmin(context, _ref14) {\n\t\tvar userid = _ref14.userid,\n\t\t gid = _ref14.gid;\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].delete(OC.linkToOCS('cloud/users/' + userid + '/subadmins', 2), { groupid: gid }).then(function (response) {\n\t\t\t\treturn context.commit('removeUserSubAdmin', { userid: userid, gid: gid });\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Delete a user\n * \n * @param {Object} context\n * @param {string} userid User id \n * @returns {Promise}\n */\n\tdeleteUser: function deleteUser(context, _ref15) {\n\t\tvar userid = _ref15.userid;\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].delete(OC.linkToOCS('cloud/users/' + userid, 2)).then(function (response) {\n\t\t\t\treturn context.commit('deleteUser', userid);\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Add a user\n * \n * @param {Object} context\n * @param {Object} options\n * @param {string} options.userid User id\n * @param {string} options.password User password \n * @param {string} options.email User email\n * @param {string} options.groups User groups\n * @param {string} options.subadmin User subadmin groups\n * @param {string} options.quota User email\n * @returns {Promise}\n */\n\taddUser: function addUser(_ref16, _ref17) {\n\t\tvar context = _ref16.context,\n\t\t dispatch = _ref16.dispatch;\n\t\tvar userid = _ref17.userid,\n\t\t password = _ref17.password,\n\t\t email = _ref17.email,\n\t\t groups = _ref17.groups,\n\t\t subadmin = _ref17.subadmin,\n\t\t quota = _ref17.quota,\n\t\t language = _ref17.language;\n\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].post(OC.linkToOCS('cloud/users', 2), { userid: userid, password: password, email: email, groups: groups, subadmin: subadmin, quota: quota, language: language }).then(function (response) {\n\t\t\t\treturn dispatch('addUserData', userid);\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Get user data and commit addition\n * \n * @param {Object} context\n * @param {string} userid User id \n * @returns {Promise}\n */\n\taddUserData: function addUserData(context, userid) {\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].get(OC.linkToOCS('cloud/users/' + userid, 2)).then(function (response) {\n\t\t\t\treturn context.commit('addUserData', response);\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/** Enable or disable user \n * \n * @param {Object} context\n * @param {Object} options\n * @param {string} options.userid User id\n * @param {boolean} options.enabled User enablement status\n * @returns {Promise}\n */\n\tenableDisableUser: function enableDisableUser(context, _ref18) {\n\t\tvar userid = _ref18.userid,\n\t\t _ref18$enabled = _ref18.enabled,\n\t\t enabled = _ref18$enabled === undefined ? true : _ref18$enabled;\n\n\t\tvar userStatus = enabled ? 'enable' : 'disable';\n\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].put(OC.linkToOCS('cloud/users/' + userid + '/' + userStatus, 2)).then(function (response) {\n\t\t\t\treturn context.commit('enableDisableUser', { userid: userid, enabled: enabled });\n\t\t\t}).catch(function (error) {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}).catch(function (error) {\n\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t});\n\t},\n\n\n\t/**\n * Edit user data\n * \n * @param {Object} context \n * @param {Object} options\n * @param {string} options.userid User id\n * @param {string} options.key User field to edit\n * @param {string} options.value Value of the change\n * @returns {Promise}\n */\n\tsetUserData: function setUserData(context, _ref19) {\n\t\tvar userid = _ref19.userid,\n\t\t key = _ref19.key,\n\t\t value = _ref19.value;\n\n\t\tvar allowedEmpty = ['email', 'displayname'];\n\t\tif (['email', 'language', 'quota', 'displayname', 'password'].indexOf(key) !== -1) {\n\t\t\t// We allow empty email or displayname\n\t\t\tif (typeof value === 'string' && (allowedEmpty.indexOf(key) === -1 && value.length > 0 || allowedEmpty.indexOf(key) !== -1)) {\n\t\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].put(OC.linkToOCS('cloud/users/' + userid, 2), { key: key, value: value }).then(function (response) {\n\t\t\t\t\t\treturn context.commit('setUserData', { userid: userid, key: key, value: value });\n\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t});\n\t\t\t\t}).catch(function (error) {\n\t\t\t\t\treturn context.commit('API_FAILURE', { userid: userid, error: error });\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn Promise.reject(new Error('Invalid request data'));\n\t}\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({ state: state, mutations: mutations, getters: getters, actions: actions });\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc3RvcmUvdXNlcnMuanM/MjhjMiJdLCJuYW1lcyI6WyJvcmRlckdyb3VwcyIsImdyb3VwcyIsIm9yZGVyQnkiLCJzb3J0IiwiYSIsImIiLCJ1c2VyY291bnQiLCJuYW1lIiwibG9jYWxlQ29tcGFyZSIsInN0YXRlIiwidXNlcnMiLCJtaW5QYXNzd29yZExlbmd0aCIsInVzZXJzT2Zmc2V0IiwidXNlcnNMaW1pdCIsInVzZXJDb3VudCIsIm11dGF0aW9ucyIsImFwcGVuZFVzZXJzIiwidXNlcnNPYmoiLCJjb25jYXQiLCJPYmplY3QiLCJrZXlzIiwibWFwIiwidXNlcmlkIiwic2V0UGFzc3dvcmRQb2xpY3lNaW5MZW5ndGgiLCJsZW5ndGgiLCJpbml0R3JvdXBzIiwiYWRkR3JvdXAiLCJnaWQiLCJwdXNoIiwiaWQiLCJlIiwiY29uc29sZSIsImxvZyIsInJlbW92ZUdyb3VwIiwiZ3JvdXBJbmRleCIsImZpbmRJbmRleCIsImdyb3VwU2VhcmNoIiwic3BsaWNlIiwiYWRkVXNlckdyb3VwIiwiZ3JvdXAiLCJm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tcblx0XHRcdFx0fSkuY2F0Y2goKGVycm9yKSA9PiBjb250ZXh0LmNvbW1pdCgnQVBJX0ZBSUxVUkUnLCB7IHVzZXJpZCwgZXJyb3IgfSkpO1xuXHRcdFx0fVxuXHRcdH1cblx0XHRyZXR1cm4gUHJvbWlzZS5yZWplY3QobmV3IEVycm9yKCdJbnZhbGlkIHJlcXVlc3QgZGF0YScpKTtcblx0fVxufTtcblxuZXhwb3J0IGRlZmF1bHQgeyBzdGF0ZSwgbXV0YXRpb25zLCBnZXR0ZXJzLCBhY3Rpb25zIH07XG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3N0b3JlL3VzZXJzLmpzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///68\n");
|
||
|
||
/***/ }),
|
||
/* 69 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(5);\n\n\nvar state = {\n\tserverData: {}\n};\nvar mutations = {\n\tsetServerData: function setServerData(state, data) {\n\t\tstate.serverData = data;\n\t}\n};\nvar getters = {\n\tgetServerData: function getServerData(state) {\n\t\treturn state.serverData;\n\t}\n};\nvar actions = {};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({ state: state, mutations: mutations, getters: getters, actions: actions });\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc3RvcmUvc2V0dGluZ3MuanM/ZmY4OCJdLCJuYW1lcyI6WyJzdGF0ZSIsInNlcnZlckRhdGEiLCJtdXRhdGlvbnMiLCJzZXRTZXJ2ZXJEYXRhIiwiZGF0YSIsImdldHRlcnMiLCJnZXRTZXJ2ZXJEYXRhIiwiYWN0aW9ucyJdLCJtYXBwaW5ncyI6IjtBQUFBOztBQUVBLElBQU1BLFFBQVE7QUFDYkMsYUFBWTtBQURDLENBQWQ7QUFHQSxJQUFNQyxZQUFZO0FBQ2pCQyxjQURpQix5QkFDSEgsS0FERyxFQUNJSSxJQURKLEVBQ1U7QUFDMUJKLFFBQU1DLFVBQU4sR0FBbUJHLElBQW5CO0FBQ0E7QUFIZ0IsQ0FBbEI7QUFLQSxJQUFNQyxVQUFVO0FBQ2ZDLGNBRGUseUJBQ0ROLEtBREMsRUFDTTtBQUNwQixTQUFPQSxNQUFNQyxVQUFiO0FBQ0E7QUFIYyxDQUFoQjtBQUtBLElBQU1NLFVBQVUsRUFBaEI7O0FBRUEseURBQWUsRUFBQ1AsWUFBRCxFQUFRRSxvQkFBUixFQUFtQkcsZ0JBQW5CLEVBQTRCRSxnQkFBNUIsRUFBZiIsImZpbGUiOiI2OS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBhcGkgZnJvbSAnLi9hcGknO1xuXG5jb25zdCBzdGF0ZSA9IHtcblx0c2VydmVyRGF0YToge31cbn07XG5jb25zdCBtdXRhdGlvbnMgPSB7XG5cdHNldFNlcnZlckRhdGEoc3RhdGUsIGRhdGEpIHtcblx0XHRzdGF0ZS5zZXJ2ZXJEYXRhID0gZGF0YTtcblx0fVxufTtcbmNvbnN0IGdldHRlcnMgPSB7XG5cdGdldFNlcnZlckRhdGEoc3RhdGUpIHtcblx0XHRyZXR1cm4gc3RhdGUuc2VydmVyRGF0YTtcblx0fVxufTtcbmNvbnN0IGFjdGlvbnMgPSB7fTtcblxuZXhwb3J0IGRlZmF1bHQge3N0YXRlLCBtdXRhdGlvbnMsIGdldHRlcnMsIGFjdGlvbnN9O1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3N0b3JlL3NldHRpbmdzLmpzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///69\n");
|
||
|
||
/***/ }),
|
||
/* 70 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(5);\n\n\nvar state = {};\nvar mutations = {};\nvar getters = {};\nvar actions = {\n\t\t\t\t/**\n * Set application config in database\n * \n * @param {Object} context\n * @param {Object} options\n * @param {string} options.app Application name\n * @param {boolean} options.key Config key\n * @param {boolean} options.value Value to set\n * @returns{Promise}\n */\n\t\t\t\tsetAppConfig: function setAppConfig(context, _ref) {\n\t\t\t\t\t\t\t\tvar app = _ref.app,\n\t\t\t\t\t\t\t\t key = _ref.key,\n\t\t\t\t\t\t\t\t value = _ref.value;\n\n\t\t\t\t\t\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].requireAdmin().then(function (response) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn __WEBPACK_IMPORTED_MODULE_0__api__[\"a\" /* default */].post(OC.linkToOCS('apps/provisioning_api/api/v1/config/apps/' + app + '/' + key, 2), { value: value }).catch(function (error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn context.commit('API_FAILURE', { app: app, key: key, value: value, error: error });\n\t\t\t\t\t\t\t\t});;\n\t\t\t\t}\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({ state: state, mutations: mutations, getters: getters, actions: actions });\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc3RvcmUvb2MuanM/NDI2ZCJdLCJuYW1lcyI6WyJzdGF0ZSIsIm11dGF0aW9ucyIsImdldHRlcnMiLCJhY3Rpb25zIiwic2V0QXBwQ29uZmlnIiwiY29udGV4dCIsImFwcCIsImtleSIsInZhbHVlIiwiYXBpIiwicmVxdWlyZUFkbWluIiwidGhlbiIsInJlc3BvbnN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sIGFjdGlvbnN9O1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3N0b3JlL29jLmpzIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///70\n");
|
||
|
||
/***/ })
|
||
/******/ ]); |