From f312d8a5df10e0bc135a8096d20eac9dd2c3941e Mon Sep 17 00:00:00 2001 From: "jackliulovelt@outlook.com" Date: Wed, 9 May 2018 22:39:52 +0800 Subject: [PATCH] fixed sina api from http to https --- app/manifest.json | 4 +- app/scripts.babel/popup/api/api.js | 2 +- app/scripts/background.js | 21 +- app/scripts/chromereload.js | 4 +- app/scripts/popup.js | 9407 +++++++++++++++++++++++++--- 5 files changed, 8683 insertions(+), 755 deletions(-) diff --git a/app/manifest.json b/app/manifest.json index 6af11ee..5f18826 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,6 +1,6 @@ { "name": "__MSG_appName__", - "version": "1.5.0", + "version": "1.5.2", "manifest_version": 2, "update_url": "http://www.example.com/update.xml", "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", @@ -19,7 +19,7 @@ }, "permissions": [ "notifications", - "http://hq.sinajs.cn/list=*", + "https://hq.sinajs.cn/list=*", "http://suggest3.sinajs.cn/suggest/", "http://vip.stock.finance.sina.com.cn/quotes_service/view/" ], diff --git a/app/scripts.babel/popup/api/api.js b/app/scripts.babel/popup/api/api.js index 0528c61..a58c5c7 100755 --- a/app/scripts.babel/popup/api/api.js +++ b/app/scripts.babel/popup/api/api.js @@ -1,6 +1,6 @@ import axios from 'axios'; -const url = 'http://hq.sinajs.cn/' +const url = 'https://hq.sinajs.cn/' export function getStockByCode(code) { return axios.get(`${url}list=${code}`).then(res => { diff --git a/app/scripts/background.js b/app/scripts/background.js index 1734395..1da2743 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 103); +/******/ return __webpack_require__(__webpack_require__.s = 104); /******/ }) /************************************************************************/ /******/ ([ @@ -376,8 +376,7 @@ module.exports = { /***/ }), /* 1 */, /* 2 */, -/* 3 */, -/* 4 */ +/* 3 */ /***/ (function(module, exports) { // shim for using process in browser @@ -567,6 +566,7 @@ process.umask = function() { return 0; }; /***/ }), +/* 4 */, /* 5 */, /* 6 */, /* 7 */ @@ -666,7 +666,7 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { module.exports = defaults; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 8 */, @@ -880,7 +880,7 @@ module.exports = function xhrAdapter(config) { }); }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 18 */ @@ -948,7 +948,8 @@ module.exports = Cancel; /***/ }), /* 21 */, /* 22 */, -/* 23 */ +/* 23 */, +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1023,7 +1024,6 @@ function getFixedNum(num) { } /***/ }), -/* 24 */, /* 25 */, /* 26 */, /* 27 */, @@ -1051,7 +1051,7 @@ var _axios2 = _interopRequireDefault(_axios); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var url = 'http://hq.sinajs.cn/'; +var url = 'https://hq.sinajs.cn/'; function getStockByCode(code) { return _axios2.default.get(url + 'list=' + code).then(function (res) { @@ -1990,7 +1990,7 @@ exports.getAnnouncementDetail = getAnnouncementDetail; exports.getStockDetail = getStockDetail; exports.getSuggestList = getSuggestList; -var _base = __webpack_require__(23); +var _base = __webpack_require__(24); function getStockTradeDetail(res) { // console.log(res) @@ -2169,7 +2169,8 @@ function getSuggestList(res) { /* 100 */, /* 101 */, /* 102 */, -/* 103 */ +/* 103 */, +/* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/app/scripts/chromereload.js b/app/scripts/chromereload.js index 037062f..4143ed2 100644 --- a/app/scripts/chromereload.js +++ b/app/scripts/chromereload.js @@ -60,12 +60,12 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 104); +/******/ return __webpack_require__(__webpack_require__.s = 105); /******/ }) /************************************************************************/ /******/ ({ -/***/ 104: +/***/ 105: /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/app/scripts/popup.js b/app/scripts/popup.js index f48a756..969c982 100644 --- a/app/scripts/popup.js +++ b/app/scripts/popup.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 105); +/******/ return __webpack_require__(__webpack_require__.s = 106); /******/ }) /************************************************************************/ /******/ ([ @@ -385,7 +385,7 @@ module.exports = { /* harmony export (immutable) */ __webpack_exports__["a"] = asyncMap; /* harmony export (immutable) */ __webpack_exports__["b"] = complementError; /* harmony export (immutable) */ __webpack_exports__["c"] = deepMerge; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(86); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(87); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof__ = __webpack_require__(31); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof__); @@ -577,19 +577,19 @@ function deepMerge(target, source) { } return target; } -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__required__ = __webpack_require__(97); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__whitespace__ = __webpack_require__(169); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__type__ = __webpack_require__(170); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__range__ = __webpack_require__(171); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enum__ = __webpack_require__(172); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pattern__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__required__ = __webpack_require__(98); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__whitespace__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__type__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__range__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enum__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pattern__ = __webpack_require__(174); @@ -608,6 +608,196 @@ function deepMerge(target, source) { /***/ }), /* 3 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -8645,197 +8835,7 @@ if (inBrowser) { /* harmony default export */ __webpack_exports__["default"] = (Vue); -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4), __webpack_require__(24), __webpack_require__(106).setImmediate)) - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3), __webpack_require__(21), __webpack_require__(77).setImmediate)) /***/ }), /* 5 */ @@ -8854,7 +8854,7 @@ exports.addClass = addClass; exports.removeClass = removeClass; exports.setStyle = setStyle; -var _vue = __webpack_require__(3); +var _vue = __webpack_require__(4); var _vue2 = _interopRequireDefault(_vue); @@ -9141,7 +9141,7 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { module.exports = defaults; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 8 */ @@ -9311,7 +9311,7 @@ module.exports = __webpack_require__(13) ? function (object, key, value) { /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(26); -var IE8_DOM_DEFINE = __webpack_require__(87); +var IE8_DOM_DEFINE = __webpack_require__(88); var toPrimitive = __webpack_require__(63); var dP = Object.defineProperty; @@ -9333,7 +9333,7 @@ exports.f = __webpack_require__(13) ? Object.defineProperty : function definePro /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(22)(function () { +module.exports = !__webpack_require__(23)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); @@ -9343,7 +9343,7 @@ module.exports = !__webpack_require__(22)(function () { /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(90); +var IObject = __webpack_require__(91); var defined = __webpack_require__(64); module.exports = function (it) { return IObject(defined(it)); @@ -9571,7 +9571,7 @@ module.exports = function xhrAdapter(config) { }); }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 18 */ @@ -9640,13 +9640,40 @@ module.exports = Cancel; /* 21 */ /***/ (function(module, exports) { +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), -/* 22 */ +/* 23 */ /***/ (function(module, exports) { module.exports = function (exec) { @@ -9659,7 +9686,7 @@ module.exports = function (exec) { /***/ }), -/* 23 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9733,38 +9760,11 @@ function getFixedNum(num) { } } -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - /***/ }), /* 25 */ /***/ (function(module, exports) { -var core = module.exports = { version: '2.5.5' }; +var core = module.exports = { version: '2.5.3' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef @@ -9772,7 +9772,7 @@ if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /* 26 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(21); +var isObject = __webpack_require__(22); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; @@ -9798,7 +9798,7 @@ module.exports = function (bitmap, value) { /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(89); +var $keys = __webpack_require__(90); var enumBugKeys = __webpack_require__(68); module.exports = Object.keys || function keys(O) { @@ -9833,11 +9833,11 @@ exports.f = {}.propertyIsEnumerable; exports.__esModule = true; -var _iterator = __webpack_require__(144); +var _iterator = __webpack_require__(145); var _iterator2 = _interopRequireDefault(_iterator); -var _symbol = __webpack_require__(156); +var _symbol = __webpack_require__(157); var _symbol2 = _interopRequireDefault(_symbol); @@ -9872,7 +9872,7 @@ var _axios2 = _interopRequireDefault(_axios); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var url = 'http://hq.sinajs.cn/'; +var url = 'https://hq.sinajs.cn/'; function getStockByCode(code) { return _axios2.default.get(url + 'list=' + code).then(function (res) { @@ -10811,7 +10811,7 @@ exports.getAnnouncementDetail = getAnnouncementDetail; exports.getStockDetail = getStockDetail; exports.getSuggestList = getSuggestList; -var _base = __webpack_require__(23); +var _base = __webpack_require__(24); function getStockTradeDetail(res) { // console.log(res) @@ -10949,19 +10949,19 @@ function getSuggestList(res) { exports.__esModule = true; exports.i18n = exports.use = exports.t = undefined; -var _zhCN = __webpack_require__(109); +var _zhCN = __webpack_require__(110); var _zhCN2 = _interopRequireDefault(_zhCN); -var _vue = __webpack_require__(3); +var _vue = __webpack_require__(4); var _vue2 = _interopRequireDefault(_vue); -var _deepmerge = __webpack_require__(110); +var _deepmerge = __webpack_require__(111); var _deepmerge2 = _interopRequireDefault(_deepmerge); -var _format = __webpack_require__(111); +var _format = __webpack_require__(112); var _format2 = _interopRequireDefault(_format); @@ -11720,7 +11720,7 @@ module.exports = __webpack_require__(55); /***/ 8: /***/ (function(module, exports) { -module.exports = __webpack_require__(78); +module.exports = __webpack_require__(79); /***/ }), @@ -11787,15 +11787,15 @@ exports.default = function (target) { exports.__esModule = true; -var _vue = __webpack_require__(3); +var _vue = __webpack_require__(4); var _vue2 = _interopRequireDefault(_vue); -var _popup = __webpack_require__(79); +var _popup = __webpack_require__(80); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var PopperJS = _vue2.default.prototype.$isServer ? function () {} : __webpack_require__(113); +var PopperJS = _vue2.default.prototype.$isServer ? function () {} : __webpack_require__(114); var stop = function stop(e) { return e.stopPropagation(); }; @@ -12021,7 +12021,7 @@ exports.default = function () { return scrollBarWidth; }; -var _vue = __webpack_require__(3); +var _vue = __webpack_require__(4); var _vue2 = _interopRequireDefault(_vue); @@ -12037,7 +12037,7 @@ var scrollBarWidth = void 0; /* eslint-disable no-undefined */ -var throttle = __webpack_require__(81); +var throttle = __webpack_require__(82); /** * Debounce execution of a function. Debouncing, unlike throttling, @@ -12068,7 +12068,7 @@ module.exports = function ( delay, atBegin, callback ) { exports.__esModule = true; exports.removeResizeListener = exports.addResizeListener = undefined; -var _resizeObserverPolyfill = __webpack_require__(116); +var _resizeObserverPolyfill = __webpack_require__(117); var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill); @@ -12148,9 +12148,8 @@ exports.default = function (ref) { var global = __webpack_require__(6); var core = __webpack_require__(25); -var ctx = __webpack_require__(138); +var ctx = __webpack_require__(139); var hide = __webpack_require__(11); -var has = __webpack_require__(9); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { @@ -12168,7 +12167,7 @@ var $export = function (type, name, source) { for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; - if (own && has(exports, key)) continue; + if (own && key in exports) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces @@ -12215,7 +12214,7 @@ module.exports = $export; /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(21); +var isObject = __webpack_require__(22); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { @@ -12535,6 +12534,73 @@ module.exports = function normalizeComponent ( /* 77 */ /***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(global) {var apply = Function.prototype.apply; + +// DOM APIs, for completeness + +exports.setTimeout = function() { + return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout); +}; +exports.setInterval = function() { + return new Timeout(apply.call(setInterval, window, arguments), clearInterval); +}; +exports.clearTimeout = +exports.clearInterval = function(timeout) { + if (timeout) { + timeout.close(); + } +}; + +function Timeout(id, clearFn) { + this._id = id; + this._clearFn = clearFn; +} +Timeout.prototype.unref = Timeout.prototype.ref = function() {}; +Timeout.prototype.close = function() { + this._clearFn.call(window, this._id); +}; + +// Does not start the time, just sets up the members needed. +exports.enroll = function(item, msecs) { + clearTimeout(item._idleTimeoutId); + item._idleTimeout = msecs; +}; + +exports.unenroll = function(item) { + clearTimeout(item._idleTimeoutId); + item._idleTimeout = -1; +}; + +exports._unrefActive = exports.active = function(item) { + clearTimeout(item._idleTimeoutId); + + var msecs = item._idleTimeout; + if (msecs >= 0) { + item._idleTimeoutId = setTimeout(function onTimeout() { + if (item._onTimeout) + item._onTimeout(); + }, msecs); + } +}; + +// setimmediate attaches itself to the global object +__webpack_require__(108); +// On some exotic environments, it's not clear which object `setimmeidate` was +// able to install onto. Search each possibility in the same order as the +// `setimmediate` library. +exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) || + (typeof global !== "undefined" && global.setImmediate) || + (this && this.setImmediate); +exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || + (typeof global !== "undefined" && global.clearImmediate) || + (this && this.clearImmediate); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21))) + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; @@ -12555,7 +12621,7 @@ exports.default = { }; /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12623,10 +12689,10 @@ exports.default = { } } }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12635,7 +12701,7 @@ exports.default = { exports.__esModule = true; exports.PopupManager = undefined; -var _vue = __webpack_require__(3); +var _vue = __webpack_require__(4); var _vue2 = _interopRequireDefault(_vue); @@ -12643,7 +12709,7 @@ var _merge = __webpack_require__(56); var _merge2 = _interopRequireDefault(_merge); -var _popupManager = __webpack_require__(112); +var _popupManager = __webpack_require__(113); var _popupManager2 = _interopRequireDefault(_popupManager); @@ -12923,7 +12989,7 @@ exports.default = { exports.PopupManager = _popupManager2.default; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12931,7 +12997,7 @@ exports.PopupManager = _popupManager2.default; exports.__esModule = true; -var _vue = __webpack_require__(3); +var _vue = __webpack_require__(4); var _vue2 = _interopRequireDefault(_vue); @@ -13008,7 +13074,7 @@ exports.default = { }; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports) { /* eslint-disable no-undefined,no-param-reassign,no-shadow */ @@ -13105,7 +13171,7 @@ module.exports = function ( delay, noTrailing, callback, debounceMode ) { /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { module.exports = @@ -13559,7 +13625,7 @@ function renderThumbStyle(_ref) { /******/ }); /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13585,7 +13651,7 @@ function getFirstComponentChild(children) { }; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports) { module.exports = @@ -13900,7 +13966,7 @@ var esExports = { render: render, staticRenderFns: staticRenderFns } /******/ }); /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13909,7 +13975,7 @@ var esExports = { render: render, staticRenderFns: staticRenderFns } exports.__esModule = true; exports.default = scrollIntoView; -var _vue = __webpack_require__(3); +var _vue = __webpack_require__(4); var _vue2 = _interopRequireDefault(_vue); @@ -13936,7 +14002,7 @@ function scrollIntoView(container, selected) { } /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13944,7 +14010,7 @@ function scrollIntoView(container, selected) { exports.__esModule = true; -var _assign = __webpack_require__(135); +var _assign = __webpack_require__(136); var _assign2 = _interopRequireDefault(_assign); @@ -13965,19 +14031,19 @@ exports.default = _assign2.default || function (target) { }; /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(13) && !__webpack_require__(22)(function () { - return Object.defineProperty(__webpack_require__(88)('div'), 'a', { get: function () { return 7; } }).a != 7; +module.exports = !__webpack_require__(13) && !__webpack_require__(23)(function () { + return Object.defineProperty(__webpack_require__(89)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(21); +var isObject = __webpack_require__(22); var document = __webpack_require__(6).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); @@ -13987,12 +14053,12 @@ module.exports = function (it) { /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(9); var toIObject = __webpack_require__(14); -var arrayIndexOf = __webpack_require__(141)(false); +var arrayIndexOf = __webpack_require__(142)(false); var IE_PROTO = __webpack_require__(66)('IE_PROTO'); module.exports = function (object, names) { @@ -14010,11 +14076,11 @@ module.exports = function (object, names) { /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(91); +var cof = __webpack_require__(92); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); @@ -14022,7 +14088,7 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -14033,7 +14099,7 @@ module.exports = function (it) { /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) @@ -14044,19 +14110,20 @@ module.exports = function (it) { /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(70); var $export = __webpack_require__(62); -var redefine = __webpack_require__(94); +var redefine = __webpack_require__(95); var hide = __webpack_require__(11); +var has = __webpack_require__(9); var Iterators = __webpack_require__(71); -var $iterCreate = __webpack_require__(148); +var $iterCreate = __webpack_require__(149); var setToStringTag = __webpack_require__(72); -var getPrototypeOf = __webpack_require__(151); +var getPrototypeOf = __webpack_require__(152); var ITERATOR = __webpack_require__(15)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; @@ -14079,7 +14146,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); + var $default = (!BUGGY && $native) || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; @@ -14090,7 +14157,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF @@ -14120,19 +14187,19 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(11); /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(26); -var dPs = __webpack_require__(149); +var dPs = __webpack_require__(150); var enumBugKeys = __webpack_require__(68); var IE_PROTO = __webpack_require__(66)('IE_PROTO'); var Empty = function () { /* empty */ }; @@ -14141,13 +14208,13 @@ var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(88)('iframe'); + var iframe = __webpack_require__(89)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; - __webpack_require__(150).appendChild(iframe); + __webpack_require__(151).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -14174,11 +14241,11 @@ module.exports = Object.create || function create(O, Properties) { /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(89); +var $keys = __webpack_require__(90); var hiddenKeys = __webpack_require__(68).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { @@ -14187,7 +14254,7 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14214,13 +14281,13 @@ function required(rule, value, source, errors, options, type) { /* harmony default export */ __webpack_exports__["a"] = (required); /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { !function(t,i){ true?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.vueSeamlessScroll=i():t.vueSeamlessScroll=i()}("undefined"!=typeof self?self:this,function(){return function(t){function i(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=0)}([function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=e(1),s=function(t){return t&&t.__esModule?t:{default:t}}(o);s.default.install=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(i.componentName||s.default.name,s.default)},"undefined"!=typeof window&&window.Vue&&Vue.component(s.default.name,s.default),i.default=s.default},function(t,i,e){var o=e(2)(e(3),e(7),null,null);t.exports=o.exports},function(t,i){t.exports=function(t,i,e,o){var s,n=t=t||{},r=typeof t.default;"object"!==r&&"function"!==r||(s=t,n=t.default);var a="function"==typeof n?n.options:n;if(i&&(a.render=i.render,a.staticRenderFns=i.staticRenderFns),e&&(a._scopeId=e),o){var h=Object.create(a.computed||null);Object.keys(o).forEach(function(t){var i=o[t];h[t]=function(){return i}}),a.computed=h}return{esModule:s,exports:n,options:a}}},function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),e(4)();var o=e(5),s=e(6);i.default={name:"vue-seamless-scroll",data:function(){return{xPos:0,yPos:0,delay:0,copyHtml:"",height:0,width:0,realBoxWidth:0,reqFrame:null,singleWaitTime:null,isHover:!1}},props:{data:{type:Array,default:function(){return[]}},classOption:{type:Object,default:function(){return{}}}},computed:{leftSwitchState:function(){return this.xPos<0},rightSwitchState:function(){return Math.abs(this.xPos)1||!this.options.autoPlay},baseFontSize:function(){return this.options.isSingleRemUnit?parseInt(window.getComputedStyle(document.documentElement,null).fontSize):1},realSingleStopWidth:function(){return this.options.singleWidth*this.baseFontSize},realSingleStopHeight:function(){return this.options.singleHeight*this.baseFontSize}},methods:{leftSwitchClick:function(){if(this.leftSwitchState)return Math.abs(this.xPos)1||t.scale&&1!==t.scale)){var i=t.targetTouches[0];this.endPos={x:i.pageX-this.startPos.x,y:i.pageY-this.startPos.y},event.preventDefault();var e=Math.abs(this.endPos.x)1&&(this.xPos=this.startPosX+this.endPos.x)}},touchEnd:function(){var t=this;if(!this.canNotTouch){var i=void 0,e=this.options.direction;if(this.delay=50,1===e)this.yPos>0&&(this.yPos=0);else if(0===e){var o=this.$refs.realBox.offsetHeight/2*-1;this.yPos0&&(this.xPos=0);else if(3===e){var s=-1*this.$refs.slotList.offsetWidth;this.xPos=i&&(this.yPos=0),this.yPos-=this.options.step):0===o?(this.yPos>=0&&(this.yPos=-1*i),this.yPos+=this.options.step):2===o?(Math.abs(this.xPos)>=e&&(this.xPos=0),this.xPos-=this.options.step):3===o&&(this.xPos>=0&&(this.xPos=-1*e),this.xPos+=this.options.step),this.singleWaitTime&&clearTimeout(this.singleWaitTime),this.realSingleStopHeight?Math.abs(this.yPos)%this.realSingleStopHeight==0?this.singleWaitTime=setTimeout(function(){t._move()},this.options.waitTime):this._move():this.realSingleStopWidth&&Math.abs(this.xPos)%this.realSingleStopWidth==0?this.singleWaitTime=setTimeout(function(){t._move()},this.options.waitTime):this._move()}}.bind(this)))},_initMove:function(){var t=this;this.$nextTick(function(){if(t.height=t.$refs.wrap.offsetHeight,t.width=t.$refs.wrap.offsetWidth,t.isHorizontal){var i=void 0;i=t.options.autoPlay?2:1;var e=t.$refs.slotList.offsetWidth*i;t.$refs.realBox.style.width=e+"px",t.realBoxWidth=e}if(!t.options.autoPlay)return t.ease="linear",void(t.delay=t.options.switchDelay);if(t._dataWarm(t.data),t.copyHtml="",t.moveSwitch)t._cancle(),t.yPos=t.xPos=0;else{t.copyHtml=t.$refs.slotList.innerHTML,t._move()}})},_dataWarm:function(t){t.length}},mounted:function(){this._initMove()},watch:{data:function(t,i){this._dataWarm(t),o(t,i)||(this._cancle(),this._initMove())}},beforeDestroy:function(){this._cancle()}}},function(t,i){var e=function(){window.cancelAnimationFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t)}}(),window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}()};t.exports=e},function(t,i){var e=function(t,i){if(t===i)return!0;if(t.length!==i.length)return!1;for(var e=0;e= 0) { - item._idleTimeoutId = setTimeout(function onTimeout() { - if (item._onTimeout) - item._onTimeout(); - }, msecs); - } -}; +/** + * Check if value is primitive + */ +function isPrimitive (value) { + return ( + typeof value === 'string' || + typeof value === 'number' || + // $flow-disable-line + typeof value === 'symbol' || + typeof value === 'boolean' + ) +} -// setimmediate attaches itself to the global object -__webpack_require__(107); -// On some exotic environments, it's not clear which object `setimmediate` was -// able to install onto. Search each possibility in the same order as the -// `setimmediate` library. -exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) || - (typeof global !== "undefined" && global.setImmediate) || - (this && this.setImmediate); -exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || - (typeof global !== "undefined" && global.clearImmediate) || - (this && this.clearImmediate); +/** + * Quick object check - this is primarily used to tell + * Objects from primitive values when we know the value + * is a JSON-compliant type. + */ +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24))) +/** + * Get the raw type string of a value e.g. [object Object] + */ +var _toString = Object.prototype.toString; -/***/ }), -/* 107 */ -/***/ (function(module, exports, __webpack_require__) { +function toRawType (value) { + return _toString.call(value).slice(8, -1) +} -/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { - "use strict"; +/** + * Strict object type check. Only returns true + * for plain JavaScript objects. + */ +function isPlainObject (obj) { + return _toString.call(obj) === '[object Object]' +} - if (global.setImmediate) { - return; - } +function isRegExp (v) { + return _toString.call(v) === '[object RegExp]' +} - var nextHandle = 1; // Spec says greater than zero - var tasksByHandle = {}; - var currentlyRunningATask = false; - var doc = global.document; - var registerImmediate; +/** + * Check if val is a valid array index. + */ +function isValidArrayIndex (val) { + var n = parseFloat(String(val)); + return n >= 0 && Math.floor(n) === n && isFinite(val) +} - function setImmediate(callback) { - // Callback can either be a function or a string - if (typeof callback !== "function") { - callback = new Function("" + callback); - } - // Copy function arguments - var args = new Array(arguments.length - 1); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i + 1]; - } - // Store and register the task - var task = { callback: callback, args: args }; - tasksByHandle[nextHandle] = task; - registerImmediate(nextHandle); - return nextHandle++; - } +/** + * Convert a value to a string that is actually rendered. + */ +function toString (val) { + return val == null + ? '' + : typeof val === 'object' + ? JSON.stringify(val, null, 2) + : String(val) +} - function clearImmediate(handle) { - delete tasksByHandle[handle]; - } +/** + * Convert a input value to a number for persistence. + * If the conversion fails, return original string. + */ +function toNumber (val) { + var n = parseFloat(val); + return isNaN(n) ? val : n +} - function run(task) { - var callback = task.callback; - var args = task.args; - switch (args.length) { - case 0: - callback(); - break; - case 1: - callback(args[0]); - break; - case 2: - callback(args[0], args[1]); - break; - case 3: - callback(args[0], args[1], args[2]); - break; - default: - callback.apply(undefined, args); - break; - } - } +/** + * Make a map and return a function for checking if a key + * is in that map. + */ +function makeMap ( + str, + expectsLowerCase +) { + var map = Object.create(null); + var list = str.split(','); + for (var i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase + ? function (val) { return map[val.toLowerCase()]; } + : function (val) { return map[val]; } +} - function runIfPresent(handle) { - // From the spec: "Wait until any invocations of this algorithm started before this one have completed." - // So if we're currently running a task, we'll need to delay this invocation. - if (currentlyRunningATask) { - // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a - // "too much recursion" error. - setTimeout(runIfPresent, 0, handle); - } else { - var task = tasksByHandle[handle]; - if (task) { - currentlyRunningATask = true; - try { - run(task); - } finally { - clearImmediate(handle); - currentlyRunningATask = false; - } - } - } - } +/** + * Check if a tag is a built-in tag. + */ +var isBuiltInTag = makeMap('slot,component', true); - function installNextTickImplementation() { - registerImmediate = function(handle) { - process.nextTick(function () { runIfPresent(handle); }); - }; - } +/** + * Check if a attribute is a reserved attribute. + */ +var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); - function canUsePostMessage() { - // The test against `importScripts` prevents this implementation from being installed inside a web worker, - // where `global.postMessage` means something completely different and can't be used for this purpose. - if (global.postMessage && !global.importScripts) { - var postMessageIsAsynchronous = true; - var oldOnMessage = global.onmessage; - global.onmessage = function() { - postMessageIsAsynchronous = false; - }; - global.postMessage("", "*"); - global.onmessage = oldOnMessage; - return postMessageIsAsynchronous; - } +/** + * Remove an item from an array + */ +function remove (arr, item) { + if (arr.length) { + var index = arr.indexOf(item); + if (index > -1) { + return arr.splice(index, 1) } + } +} - function installPostMessageImplementation() { - // Installs an event handler on `global` for the `message` event: see - // * https://developer.mozilla.org/en/DOM/window.postMessage - // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages - - var messagePrefix = "setImmediate$" + Math.random() + "$"; - var onGlobalMessage = function(event) { - if (event.source === global && - typeof event.data === "string" && - event.data.indexOf(messagePrefix) === 0) { - runIfPresent(+event.data.slice(messagePrefix.length)); - } - }; +/** + * Check whether the object has the property. + */ +var hasOwnProperty = Object.prototype.hasOwnProperty; +function hasOwn (obj, key) { + return hasOwnProperty.call(obj, key) +} - if (global.addEventListener) { - global.addEventListener("message", onGlobalMessage, false); - } else { - global.attachEvent("onmessage", onGlobalMessage); - } +/** + * Create a cached version of a pure function. + */ +function cached (fn) { + var cache = Object.create(null); + return (function cachedFn (str) { + var hit = cache[str]; + return hit || (cache[str] = fn(str)) + }) +} - registerImmediate = function(handle) { - global.postMessage(messagePrefix + handle, "*"); - }; - } +/** + * Camelize a hyphen-delimited string. + */ +var camelizeRE = /-(\w)/g; +var camelize = cached(function (str) { + return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) +}); - function installMessageChannelImplementation() { - var channel = new MessageChannel(); - channel.port1.onmessage = function(event) { - var handle = event.data; - runIfPresent(handle); - }; +/** + * Capitalize a string. + */ +var capitalize = cached(function (str) { + return str.charAt(0).toUpperCase() + str.slice(1) +}); - registerImmediate = function(handle) { - channel.port2.postMessage(handle); - }; - } +/** + * Hyphenate a camelCase string. + */ +var hyphenateRE = /\B([A-Z])/g; +var hyphenate = cached(function (str) { + return str.replace(hyphenateRE, '-$1').toLowerCase() +}); - function installReadyStateChangeImplementation() { - var html = doc.documentElement; - registerImmediate = function(handle) { - // Create a