vue-photo-view-x
Version:
```javascript // main.js import PhototView from 'photo-view' import 'vue-photo-view-x/dist/css/main.css' Vue.use(PhototView)
106 lines (80 loc) • 827 kB
JavaScript
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./src/PhotoView/assets/error.png":
/*!****************************************!*\
!*** ./src/PhotoView/assets/error.png ***!
\****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__.p + \"images/error_1252bc9d89bc79297b84afb495304fca.png\");\n\n//# sourceURL=webpack://demo/./src/PhotoView/assets/error.png?");
/***/ }),
/***/ "./src/PhotoView/assets/loading.gif":
/*!******************************************!*\
!*** ./src/PhotoView/assets/loading.gif ***!
\******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__.p + \"images/loading_872eee34d9f90cbd6c548187342365c0.gif\");\n\n//# sourceURL=webpack://demo/./src/PhotoView/assets/loading.gif?");
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js":
/*!*******************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js ***!
\*******************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
eval("\n\n/* eslint-env browser */\n\n/*\n eslint-disable\n no-console,\n func-names\n*/\n\n/** @typedef {any} TODO */\nvar normalizeUrl = __webpack_require__(/*! ./normalize-url */ \"./node_modules/mini-css-extract-plugin/dist/hmr/normalize-url.js\");\n\nvar srcByModuleId = Object.create(null);\nvar noDocument = typeof document === \"undefined\";\nvar forEach = Array.prototype.forEach;\n/**\n * @param {function} fn\n * @param {number} time\n * @returns {(function(): void)|*}\n */\n\nfunction debounce(fn, time) {\n var timeout = 0;\n return function () {\n // @ts-ignore\n var self = this; // eslint-disable-next-line prefer-rest-params\n\n var args = arguments;\n\n var functionCall = function functionCall() {\n return fn.apply(self, args);\n };\n\n clearTimeout(timeout); // @ts-ignore\n\n timeout = setTimeout(functionCall, time);\n };\n}\n\nfunction noop() {}\n/**\n * @param {TODO} moduleId\n * @returns {TODO}\n */\n\n\nfunction getCurrentScriptUrl(moduleId) {\n var src = srcByModuleId[moduleId];\n\n if (!src) {\n if (document.currentScript) {\n src =\n /** @type {HTMLScriptElement} */\n document.currentScript.src;\n } else {\n var scripts = document.getElementsByTagName(\"script\");\n var lastScriptTag = scripts[scripts.length - 1];\n\n if (lastScriptTag) {\n src = lastScriptTag.src;\n }\n }\n\n srcByModuleId[moduleId] = src;\n }\n /**\n * @param {string} fileMap\n * @returns {null | string[]}\n */\n\n\n return function (fileMap) {\n if (!src) {\n return null;\n }\n\n var splitResult = src.split(/([^\\\\/]+)\\.js$/);\n var filename = splitResult && splitResult[1];\n\n if (!filename) {\n return [src.replace(\".js\", \".css\")];\n }\n\n if (!fileMap) {\n return [src.replace(\".js\", \".css\")];\n }\n\n return fileMap.split(\",\").map(function (mapRule) {\n var reg = new RegExp(\"\".concat(filename, \"\\\\.js$\"), \"g\");\n return normalizeUrl(src.replace(reg, \"\".concat(mapRule.replace(/{fileName}/g, filename), \".css\")));\n });\n };\n}\n/**\n * @param {TODO} el\n * @param {string} [url]\n */\n\n\nfunction updateCss(el, url) {\n if (!url) {\n if (!el.href) {\n return;\n } // eslint-disable-next-line\n\n\n url = el.href.split(\"?\")[0];\n }\n\n if (!isUrlRequest(\n /** @type {string} */\n url)) {\n return;\n }\n\n if (el.isLoaded === false) {\n // We seem to be about to replace a css link that hasn't loaded yet.\n // We're probably changing the same file more than once.\n return;\n }\n\n if (!url || !(url.indexOf(\".css\") > -1)) {\n return;\n } // eslint-disable-next-line no-param-reassign\n\n\n el.visited = true;\n var newEl = el.cloneNode();\n newEl.isLoaded = false;\n newEl.addEventListener(\"load\", function () {\n if (newEl.isLoaded) {\n return;\n }\n\n newEl.isLoaded = true;\n el.parentNode.removeChild(el);\n });\n newEl.addEventListener(\"error\", function () {\n if (newEl.isLoaded) {\n return;\n }\n\n newEl.isLoaded = true;\n el.parentNode.removeChild(el);\n });\n newEl.href = \"\".concat(url, \"?\").concat(Date.now());\n\n if (el.nextSibling) {\n el.parentNode.insertBefore(newEl, el.nextSibling);\n } else {\n el.parentNode.appendChild(newEl);\n }\n}\n/**\n * @param {string} href\n * @param {TODO} src\n * @returns {TODO}\n */\n\n\nfunction getReloadUrl(href, src) {\n var ret; // eslint-disable-next-line no-param-reassign\n\n href = normalizeUrl(href);\n src.some(\n /**\n * @param {string} url\n */\n // eslint-disable-next-line array-callback-return\n function (url) {\n if (href.indexOf(src) > -1) {\n ret = url;\n }\n });\n return ret;\n}\n/**\n * @param {string} [src]\n * @returns {boolean}\n */\n\n\nfunction reloadStyle(src) {\n if (!src) {\n return false;\n }\n\n var elements = document.querySelectorAll(\"link\");\n var loaded = false;\n forEach.call(elements, function (el) {\n if (!el.href) {\n return;\n }\n\n var url = getReloadUrl(el.href, src);\n\n if (!isUrlRequest(url)) {\n return;\n }\n\n if (el.visited === true) {\n return;\n }\n\n if (url) {\n updateCss(el, url);\n loaded = true;\n }\n });\n return loaded;\n}\n\nfunction reloadAll() {\n var elements = document.querySelectorAll(\"link\");\n forEach.call(elements, function (el) {\n if (el.visited === true) {\n return;\n }\n\n updateCss(el);\n });\n}\n/**\n * @param {string} url\n * @returns {boolean}\n */\n\n\nfunction isUrlRequest(url) {\n // An URL is not an request if\n // It is not http or https\n if (!/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.test(url)) {\n return false;\n }\n\n return true;\n}\n/**\n * @param {TODO} moduleId\n * @param {TODO} options\n * @returns {TODO}\n */\n\n\nmodule.exports = function (moduleId, options) {\n if (noDocument) {\n console.log(\"no window.document found, will not HMR CSS\");\n return noop;\n }\n\n var getScriptSrc = getCurrentScriptUrl(moduleId);\n\n function update() {\n var src = getScriptSrc(options.filename);\n var reloaded = reloadStyle(src);\n\n if (options.locals) {\n console.log(\"[HMR] Detected local css modules. Reload all css\");\n reloadAll();\n return;\n }\n\n if (reloaded) {\n console.log(\"[HMR] css reload %s\", src.join(\" \"));\n } else {\n console.log(\"[HMR] Reload all css\");\n reloadAll();\n }\n }\n\n return debounce(update, 50);\n};\n\n//# sourceURL=webpack://demo/./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js?");
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/hmr/normalize-url.js":
/*!************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/hmr/normalize-url.js ***!
\************************************************************************/
/***/ ((module) => {
"use strict";
eval("\n\n/* eslint-disable */\n\n/**\n * @param {string[]} pathComponents\n * @returns {string}\n */\nfunction normalizeUrl(pathComponents) {\n return pathComponents.reduce(function (accumulator, item) {\n switch (item) {\n case \"..\":\n accumulator.pop();\n break;\n\n case \".\":\n break;\n\n default:\n accumulator.push(item);\n }\n\n return accumulator;\n },\n /** @type {string[]} */\n []).join(\"/\");\n}\n/**\n * @param {string} urlString\n * @returns {string}\n */\n\n\nmodule.exports = function (urlString) {\n urlString = urlString.trim();\n\n if (/^data:/i.test(urlString)) {\n return urlString;\n }\n\n var protocol = urlString.indexOf(\"//\") !== -1 ? urlString.split(\"//\")[0] + \"//\" : \"\";\n var components = urlString.replace(new RegExp(protocol, \"i\"), \"\").split(\"/\");\n var host = components[0].toLowerCase().replace(/\\.$/, \"\");\n components[0] = \"\";\n var path = normalizeUrl(components);\n return protocol + host + path;\n};\n\n//# sourceURL=webpack://demo/./node_modules/mini-css-extract-plugin/dist/hmr/normalize-url.js?");
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/PhotoView/PhotoMenu.vue?vue&type=style&index=0&id=361948e0&lang=less&scoped=true&":
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/PhotoView/PhotoMenu.vue?vue&type=style&index=0&id=361948e0&lang=less&scoped=true& ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n if(true) {\n // 1660714638015\n var cssReload = __webpack_require__(/*! ../../node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js */ \"./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n \n\n//# sourceURL=webpack://demo/./src/PhotoView/PhotoMenu.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options");
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/PhotoView/PhotoShow.vue?vue&type=style&index=0&id=1683bba4&lang=less&scoped=true&":
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/PhotoView/PhotoShow.vue?vue&type=style&index=0&id=1683bba4&lang=less&scoped=true& ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n if(true) {\n // 1660714637945\n var cssReload = __webpack_require__(/*! ../../node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js */ \"./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n \n\n//# sourceURL=webpack://demo/./src/PhotoView/PhotoShow.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options");
/***/ }),
/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/PhotoView/PhotoView.vue?vue&type=style&index=0&id=50376dd6&lang=less&scoped=true&":
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/PhotoView/PhotoView.vue?vue&type=style&index=0&id=50376dd6&lang=less&scoped=true& ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n if(true) {\n // 1660714637926\n var cssReload = __webpack_require__(/*! ../../node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js */ \"./node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n \n\n//# sourceURL=webpack://demo/./src/PhotoView/PhotoView.vue?./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options");
/***/ }),
/***/ "./node_modules/vue-hot-reload-api/dist/index.js":
/*!*******************************************************!*\
!*** ./node_modules/vue-hot-reload-api/dist/index.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, exports) => {
eval("var Vue // late bind\nvar version\nvar map = Object.create(null)\nif (typeof window !== 'undefined') {\n window.__VUE_HOT_MAP__ = map\n}\nvar installed = false\nvar isBrowserify = false\nvar initHookName = 'beforeCreate'\n\nexports.install = function (vue, browserify) {\n if (installed) { return }\n installed = true\n\n Vue = vue.__esModule ? vue.default : vue\n version = Vue.version.split('.').map(Number)\n isBrowserify = browserify\n\n // compat with < 2.0.0-alpha.7\n if (Vue.config._lifecycleHooks.indexOf('init') > -1) {\n initHookName = 'init'\n }\n\n exports.compatible = version[0] >= 2\n if (!exports.compatible) {\n console.warn(\n '[HMR] You are using a version of vue-hot-reload-api that is ' +\n 'only compatible with Vue.js core ^2.0.0.'\n )\n return\n }\n}\n\n/**\n * Create a record for a hot module, which keeps track of its constructor\n * and instances\n *\n * @param {String} id\n * @param {Object} options\n */\n\nexports.createRecord = function (id, options) {\n if(map[id]) { return }\n\n var Ctor = null\n if (typeof options === 'function') {\n Ctor = options\n options = Ctor.options\n }\n makeOptionsHot(id, options)\n map[id] = {\n Ctor: Ctor,\n options: options,\n instances: []\n }\n}\n\n/**\n * Check if module is recorded\n *\n * @param {String} id\n */\n\nexports.isRecorded = function (id) {\n return typeof map[id] !== 'undefined'\n}\n\n/**\n * Make a Component options object hot.\n *\n * @param {String} id\n * @param {Object} options\n */\n\nfunction makeOptionsHot(id, options) {\n if (options.functional) {\n var render = options.render\n options.render = function (h, ctx) {\n var instances = map[id].instances\n if (ctx && instances.indexOf(ctx.parent) < 0) {\n instances.push(ctx.parent)\n }\n return render(h, ctx)\n }\n } else {\n injectHook(options, initHookName, function() {\n var record = map[id]\n if (!record.Ctor) {\n record.Ctor = this.constructor\n }\n record.instances.push(this)\n })\n injectHook(options, 'beforeDestroy', function() {\n var instances = map[id].instances\n instances.splice(instances.indexOf(this), 1)\n })\n }\n}\n\n/**\n * Inject a hook to a hot reloadable component so that\n * we can keep track of it.\n *\n * @param {Object} options\n * @param {String} name\n * @param {Function} hook\n */\n\nfunction injectHook(options, name, hook) {\n var existing = options[name]\n options[name] = existing\n ? Array.isArray(existing) ? existing.concat(hook) : [existing, hook]\n : [hook]\n}\n\nfunction tryWrap(fn) {\n return function (id, arg) {\n try {\n fn(id, arg)\n } catch (e) {\n console.error(e)\n console.warn(\n 'Something went wrong during Vue component hot-reload. Full reload required.'\n )\n }\n }\n}\n\nfunction updateOptions (oldOptions, newOptions) {\n for (var key in oldOptions) {\n if (!(key in newOptions)) {\n delete oldOptions[key]\n }\n }\n for (var key$1 in newOptions) {\n oldOptions[key$1] = newOptions[key$1]\n }\n}\n\nexports.rerender = tryWrap(function (id, options) {\n var record = map[id]\n if (!options) {\n record.instances.slice().forEach(function (instance) {\n instance.$forceUpdate()\n })\n return\n }\n if (typeof options === 'function') {\n options = options.options\n }\n if (record.Ctor) {\n record.Ctor.options.render = options.render\n record.Ctor.options.staticRenderFns = options.staticRenderFns\n record.instances.slice().forEach(function (instance) {\n instance.$options.render = options.render\n instance.$options.staticRenderFns = options.staticRenderFns\n // reset static trees\n // pre 2.5, all static trees are cached together on the instance\n if (instance._staticTrees) {\n instance._staticTrees = []\n }\n // 2.5.0\n if (Array.isArray(record.Ctor.options.cached)) {\n record.Ctor.options.cached = []\n }\n // 2.5.3\n if (Array.isArray(instance.$options.cached)) {\n instance.$options.cached = []\n }\n\n // post 2.5.4: v-once trees are cached on instance._staticTrees.\n // Pure static trees are cached on the staticRenderFns array\n // (both already reset above)\n\n // 2.6: temporarily mark rendered scoped slots as unstable so that\n // child components can be forced to update\n var restore = patchScopedSlots(instance)\n instance.$forceUpdate()\n instance.$nextTick(restore)\n })\n } else {\n // functional or no instance created yet\n record.options.render = options.render\n record.options.staticRenderFns = options.staticRenderFns\n\n // handle functional component re-render\n if (record.options.functional) {\n // rerender with full options\n if (Object.keys(options).length > 2) {\n updateOptions(record.options, options)\n } else {\n // template-only rerender.\n // need to inject the style injection code for CSS modules\n // to work properly.\n var injectStyles = record.options._injectStyles\n if (injectStyles) {\n var render = options.render\n record.options.render = function (h, ctx) {\n injectStyles.call(ctx)\n return render(h, ctx)\n }\n }\n }\n record.options._Ctor = null\n // 2.5.3\n if (Array.isArray(record.options.cached)) {\n record.options.cached = []\n }\n record.instances.slice().forEach(function (instance) {\n instance.$forceUpdate()\n })\n }\n }\n})\n\nexports.reload = tryWrap(function (id, options) {\n var record = map[id]\n if (options) {\n if (typeof options === 'function') {\n options = options.options\n }\n makeOptionsHot(id, options)\n if (record.Ctor) {\n if (version[1] < 2) {\n // preserve pre 2.2 behavior for global mixin handling\n record.Ctor.extendOptions = options\n }\n var newCtor = record.Ctor.super.extend(options)\n // prevent record.options._Ctor from being overwritten accidentally\n newCtor.options._Ctor = record.options._Ctor\n record.Ctor.options = newCtor.options\n record.Ctor.cid = newCtor.cid\n record.Ctor.prototype = newCtor.prototype\n if (newCtor.release) {\n // temporary global mixin strategy used in < 2.0.0-alpha.6\n newCtor.release()\n }\n } else {\n updateOptions(record.options, options)\n }\n }\n record.instances.slice().forEach(function (instance) {\n if (instance.$vnode && instance.$vnode.context) {\n instance.$vnode.context.$forceUpdate()\n } else {\n console.warn(\n 'Root or manually mounted instance modified. Full reload required.'\n )\n }\n })\n})\n\n// 2.6 optimizes template-compiled scoped slots and skips updates if child\n// only uses scoped slots. We need to patch the scoped slots resolving helper\n// to temporarily mark all scoped slots as unstable in order to force child\n// updates.\nfunction patchScopedSlots (instance) {\n if (!instance._u) { return }\n // https://github.com/vuejs/vue/blob/dev/src/core/instance/render-helpers/resolve-scoped-slots.js\n var original = instance._u\n instance._u = function (slots) {\n try {\n // 2.6.4 ~ 2.6.6\n return original(slots, true)\n } catch (e) {\n // 2.5 / >= 2.6.7\n return original(slots, null, true)\n }\n }\n return function () {\n instance._u = original\n }\n}\n\n\n//# sourceURL=webpack://demo/./node_modules/vue-hot-reload-api/dist/index.js?");
/***/ }),
/***/ "./node_modules/vue-lazyload/vue-lazyload.esm.js":
/*!*******************************************************!*\
!*** ./node_modules/vue-lazyload/vue-lazyload.esm.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Lazy\": () => (/* binding */ Lazy),\n/* harmony export */ \"LazyComponent\": () => (/* binding */ LazyComponent),\n/* harmony export */ \"LazyContainer\": () => (/* binding */ LazyContainerMananger),\n/* harmony export */ \"LazyImage\": () => (/* binding */ LazyImage),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/*!\n * Vue-Lazyload.js v1.3.4\n * (c) 2021 Awe <hilongjw@gmail.com>\n * Released under the MIT License.\n */\n\n/*!\n * is-primitive <https://github.com/jonschlinkert/is-primitive>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n// see http://jsperf.com/testing-value-is-primitive/7\n\nvar isPrimitive = function isPrimitive(value) {\n return value == null || typeof value !== 'function' && typeof value !== 'object';\n};\n\nvar isPrimitive$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n 'default': isPrimitive,\n __moduleExports: isPrimitive\n});\n\n/*!\n * assign-symbols <https://github.com/jonschlinkert/assign-symbols>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\nvar assignSymbols = function (receiver, objects) {\n if (receiver === null || typeof receiver === 'undefined') {\n throw new TypeError('expected first argument to be an object.');\n }\n\n if (typeof objects === 'undefined' || typeof Symbol === 'undefined') {\n return receiver;\n }\n\n if (typeof Object.getOwnPropertySymbols !== 'function') {\n return receiver;\n }\n\n var isEnumerable = Object.prototype.propertyIsEnumerable;\n var target = Object(receiver);\n var len = arguments.length,\n i = 0;\n\n while (++i < len) {\n var provider = Object(arguments[i]);\n var names = Object.getOwnPropertySymbols(provider);\n\n for (var j = 0; j < names.length; j++) {\n var key = names[j];\n\n if (isEnumerable.call(provider, key)) {\n target[key] = provider[key];\n }\n }\n }\n return target;\n};\n\nvar assignSymbols$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n 'default': assignSymbols,\n __moduleExports: assignSymbols\n});\n\nvar toString = Object.prototype.toString;\n\n/**\n * Get the native `typeof` a value.\n *\n * @param {*} `val`\n * @return {*} Native javascript type\n */\n\nvar kindOf = function kindOf(val) {\n var type = typeof val;\n\n // primitivies\n if (type === 'undefined') {\n return 'undefined';\n }\n if (val === null) {\n return 'null';\n }\n if (val === true || val === false || val instanceof Boolean) {\n return 'boolean';\n }\n if (type === 'string' || val instanceof String) {\n return 'string';\n }\n if (type === 'number' || val instanceof Number) {\n return 'number';\n }\n\n // functions\n if (type === 'function' || val instanceof Function) {\n if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') {\n return 'generatorfunction';\n }\n return 'function';\n }\n\n // array\n if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {\n return 'array';\n }\n\n // check for instances of RegExp and Date before calling `toString`\n if (val instanceof RegExp) {\n return 'regexp';\n }\n if (val instanceof Date) {\n return 'date';\n }\n\n // other objects\n type = toString.call(val);\n\n if (type === '[object RegExp]') {\n return 'regexp';\n }\n if (type === '[object Date]') {\n return 'date';\n }\n if (type === '[object Arguments]') {\n return 'arguments';\n }\n if (type === '[object Error]') {\n return 'error';\n }\n if (type === '[object Promise]') {\n return 'promise';\n }\n\n // buffer\n if (isBuffer(val)) {\n return 'buffer';\n }\n\n // es6: Map, WeakMap, Set, WeakSet\n if (type === '[object Set]') {\n return 'set';\n }\n if (type === '[object WeakSet]') {\n return 'weakset';\n }\n if (type === '[object Map]') {\n return 'map';\n }\n if (type === '[object WeakMap]') {\n return 'weakmap';\n }\n if (type === '[object Symbol]') {\n return 'symbol';\n }\n\n if (type === '[object Map Iterator]') {\n return 'mapiterator';\n }\n if (type === '[object Set Iterator]') {\n return 'setiterator';\n }\n if (type === '[object String Iterator]') {\n return 'stringiterator';\n }\n if (type === '[object Array Iterator]') {\n return 'arrayiterator';\n }\n\n // typed arrays\n if (type === '[object Int8Array]') {\n return 'int8array';\n }\n if (type === '[object Uint8Array]') {\n return 'uint8array';\n }\n if (type === '[object Uint8ClampedArray]') {\n return 'uint8clampedarray';\n }\n if (type === '[object Int16Array]') {\n return 'int16array';\n }\n if (type === '[object Uint16Array]') {\n return 'uint16array';\n }\n if (type === '[object Int32Array]') {\n return 'int32array';\n }\n if (type === '[object Uint32Array]') {\n return 'uint32array';\n }\n if (type === '[object Float32Array]') {\n return 'float32array';\n }\n if (type === '[object Float64Array]') {\n return 'float64array';\n }\n\n // must be a plain object\n return 'object';\n};\n\n/**\n * If you need to support Safari 5-7 (8-10 yr-old browser),\n * take a look at https://github.com/feross/is-buffer\n */\n\nfunction isBuffer(val) {\n return val.constructor && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\nvar kindOf$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n 'default': kindOf,\n __moduleExports: kindOf\n});\n\nvar isPrimitive$2 = ( isPrimitive$1 && isPrimitive ) || isPrimitive$1;\n\nvar assignSymbols$2 = ( assignSymbols$1 && assignSymbols ) || assignSymbols$1;\n\nvar typeOf = ( kindOf$1 && kindOf ) || kindOf$1;\n\nfunction assign(target /*, objects*/) {\n target = target || {};\n var len = arguments.length,\n i = 0;\n if (len === 1) {\n return target;\n }\n while (++i < len) {\n var val = arguments[i];\n if (isPrimitive$2(target)) {\n target = val;\n }\n if (isObject(val)) {\n extend(target, val);\n }\n }\n return target;\n}\n\n/**\n * Shallow extend\n */\n\nfunction extend(target, obj) {\n assignSymbols$2(target, obj);\n\n for (var key in obj) {\n if (isValidKey(key) && hasOwn(obj, key)) {\n var val = obj[key];\n if (isObject(val)) {\n if (typeOf(target[key]) === 'undefined' && typeOf(val) === 'function') {\n target[key] = val;\n }\n target[key] = assign(target[key] || {}, val);\n } else {\n target[key] = val;\n }\n }\n }\n return target;\n}\n\n/**\n * Returns true if the object is a plain object or a function.\n */\n\nfunction isObject(obj) {\n return typeOf(obj) === 'object' || typeOf(obj) === 'function';\n}\n\n/**\n * Returns true if the given `key` is an own property of `obj`.\n */\n\nfunction hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\n/**\n * Returns true if the given `key` is a valid key that can be used for assigning properties.\n */\n\nfunction isValidKey(key) {\n return key !== '__proto__' && key !== 'constructor' && key !== 'prototype';\n}\n\n/**\n * Expose `assign`\n */\n\nvar assignDeep = assign;\n\nconst inBrowser = typeof window !== 'undefined' && window !== null;\n\nconst hasIntersectionObserver = checkIntersectionObserver();\n\nfunction checkIntersectionObserver() {\n if (inBrowser && 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window && 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n Object.defineProperty(window.IntersectionObserverEntry.prototype, 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0;\n }\n });\n }\n return true;\n }\n return false;\n}\n\nconst modeType = {\n event: 'event',\n observer: 'observer'\n\n // CustomEvent polyfill for IE\n};const CustomEvent = function () {\n if (!inBrowser) return;\n // not IE\n if (typeof window.CustomEvent === 'function') return window.CustomEvent;\n function CustomEvent(event, params) {\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n CustomEvent.prototype = window.Event.prototype;\n return CustomEvent;\n}();\n\nfunction remove(arr, item) {\n if (!arr.length) return;\n const index = arr.indexOf(item);\n if (index > -1) return arr.splice(index, 1);\n}\n\nfunction some(arr, fn) {\n let has = false;\n for (let i = 0, len = arr.length; i < len; i++) {\n if (fn(arr[i])) {\n has = true;\n break;\n }\n }\n return has;\n}\n\nfunction getBestSelectionFromSrcset(el, scale) {\n if (el.tagName !== 'IMG' || !el.getAttribute('data-srcset')) return;\n\n let options = el.getAttribute('data-srcset');\n const result = [];\n const container = el.parentNode;\n const containerWidth = container.offsetWidth * scale;\n\n let spaceIndex;\n let tmpSrc;\n let tmpWidth;\n\n options = options.trim().split(',');\n\n options.map(item => {\n item = item.trim();\n spaceIndex = item.lastIndexOf(' ');\n if (spaceIndex === -1) {\n tmpSrc = item;\n tmpWidth = 999998;\n } else {\n tmpSrc = item.substr(0, spaceIndex);\n tmpWidth = parseInt(item.substr(spaceIndex + 1, item.length - spaceIndex - 2), 10);\n }\n result.push([tmpWidth, tmpSrc]);\n });\n\n result.sort(function (a, b) {\n if (a[0] < b[0]) {\n return 1;\n }\n if (a[0] > b[0]) {\n return -1;\n }\n if (a[0] === b[0]) {\n if (b[1].indexOf('.webp', b[1].length - 5) !== -1) {\n return 1;\n }\n if (a[1].indexOf('.webp', a[1].length - 5) !== -1) {\n return -1;\n }\n }\n return 0;\n });\n let bestSelectedSrc = '';\n let tmpOption;\n\n for (let i = 0; i < result.length; i++) {\n tmpOption = result[i];\n bestSelectedSrc = tmpOption[1];\n const next = result[i + 1];\n if (next && next[0] < containerWidth) {\n bestSelectedSrc = tmpOption[1];\n break;\n } else if (!next) {\n bestSelectedSrc = tmpOption[1];\n break;\n }\n }\n\n return bestSelectedSrc;\n}\n\nfunction find(arr, fn) {\n let item;\n for (let i = 0, len = arr.length; i < len; i++) {\n if (fn(arr[i])) {\n item = arr[i];\n break;\n }\n }\n return item;\n}\n\nconst getDPR = (scale = 1) => inBrowser ? window.devicePixelRatio || scale : scale;\n\nfunction supportWebp() {\n if (!inBrowser) return false;\n\n let support = true;\n\n try {\n const elem = document.createElement('canvas');\n\n if (elem.getContext && elem.getContext('2d')) {\n support = elem.toDataURL('image/webp').indexOf('data:image/webp') === 0;\n }\n } catch (err) {\n support = false;\n }\n\n return support;\n}\n\nfunction throttle(action, delay) {\n let timeout = null;\n let movement = null;\n let lastRun = 0;\n let needRun = false;\n return function () {\n needRun = true;\n if (timeout) {\n return;\n }\n let elapsed = Date.now() - lastRun;\n let context = this;\n let args = arguments;\n let runCallback = function () {\n lastRun = Date.now();\n timeout = false;\n action.apply(context, args);\n };\n if (elapsed >= delay) {\n runCallback();\n } else {\n timeout = setTimeout(runCallback, delay);\n }\n if (needRun) {\n clearTimeout(movement);\n movement = setTimeout(runCallback, 2 * delay);\n }\n };\n}\n\nfunction testSupportsPassive() {\n if (!inBrowser) return;\n let support = false;\n try {\n let opts = Object.defineProperty({}, 'passive', {\n get: function () {\n support = true;\n }\n });\n window.addEventListener('test', null, opts);\n } catch (e) {}\n return support;\n}\n\nconst supportsPassive = testSupportsPassive();\n\nconst _ = {\n on(el, type, func, capture = false) {\n if (supportsPassive) {\n el.addEventListener(type, func, {\n capture: capture,\n passive: true\n });\n } else {\n el.addEventListener(type, func, capture);\n }\n },\n off(el, type, func, capture = false) {\n el.removeEventListener(type, func, capture);\n }\n};\n\nconst loadImageAsync = (item, resolve, reject) => {\n let image = new Image();\n if (!item || !item.src) {\n const err = new Error('image src is required');\n return reject(err);\n }\n\n image.src = item.src;\n if (item.cors) {\n image.crossOrigin = item.cors;\n }\n\n image.onload = function () {\n resolve({\n naturalHeight: image.naturalHeight,\n naturalWidth: image.naturalWidth,\n src: image.src\n });\n };\n\n image.onerror = function (e) {\n reject(e);\n };\n};\n\nconst style = (el, prop) => {\n return typeof getComputedStyle !== 'undefined' ? getComputedStyle(el, null).getPropertyValue(prop) : el.style[prop];\n};\n\nconst overflow = el => {\n return style(el, 'overflow') + style(el, 'overflow-y') + style(el, 'overflow-x');\n};\n\nconst scrollParent = el => {\n if (!inBrowser) return;\n if (!(el instanceof HTMLElement)) {\n return window;\n }\n\n let parent = el;\n\n while (parent) {\n if (parent === document.body || parent === document.documentElement) {\n break;\n }\n\n if (!parent.parentNode) {\n break;\n }\n\n if (/(scroll|auto)/.test(overflow(parent))) {\n return parent;\n }\n\n parent = parent.parentNode;\n }\n\n return window;\n};\n\nfunction isObject$1(obj) {\n return obj !== null && typeof obj === 'object';\n}\n\nfunction ObjectKeys(obj) {\n if (!(obj instanceof Object)) return [];\n if (Object.keys) {\n return Object.keys(obj);\n } else {\n let keys = [];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n return keys;\n }\n}\n\nfunction ArrayFrom(arrLike) {\n let len = arrLike.length;\n const list = [];\n for (let i = 0; i < len; i++) {\n list.push(arrLike[i]);\n }\n return list;\n}\n\nfunction noop() {}\n\nclass ImageCache {\n constructor({ max }) {\n this.options = {\n max: max || 100\n };\n this._caches = [];\n }\n\n has(key) {\n return this._caches.indexOf(key) > -1;\n }\n\n add(key) {\n if (this.has(key)) return;\n this._caches.push(key);\n if (this._caches.length > this.options.max) {\n this.free();\n }\n }\n\n free() {\n this._caches.shift();\n }\n}\n\n// el: {\n// state,\n// src,\n// error,\n// loading\n// }\n\nclass ReactiveListener {\n constructor({ el, src, error, loading, bindType, $parent, options, cors, elRenderer, imageCache }) {\n this.el = el;\n this.src = src;\n this.error = error;\n this.loading = loading;\n this.bindType = bindType;\n this.attempt = 0;\n this.cors = cors;\n\n this.naturalHeight = 0;\n this.naturalWidth = 0;\n\n this.options = options;\n\n this.rect = null;\n\n this.$parent = $parent;\n this.elRenderer = elRenderer;\n this._imageCache = imageCache;\n this.performanceData = {\n init: Date.now(),\n loadStart: 0,\n loadEnd: 0\n };\n\n this.filter();\n this.initState();\n this.render('loading', false);\n }\n\n /*\n * init listener state\n * @return\n */\n initState() {\n if ('dataset' in this.el) {\n this.el.dataset.src = this.src;\n } else {\n this.el.setAttribute('data-src', this.src);\n }\n\n this.state = {\n loading: false,\n error: false,\n loaded: false,\n rendered: false\n };\n }\n\n /*\n * record performance\n * @return\n */\n record(event) {\n this.performanceData[event] = Date.now();\n }\n\n /*\n * update image listener data\n * @param {String} image uri\n * @param {String} loading image uri\n * @param {String} error image uri\n * @return\n */\n update({ src, loading, error }) {\n const oldSrc = this.src;\n this.src = src;\n this.loading = loading;\n this.error = error;\n this.filter();\n if (oldSrc !== this.src) {\n this.attempt = 0;\n this.initState();\n }\n }\n\n /*\n * get el node rect\n * @return\n */\n getRect() {\n this.rect = this.el.getBoundingClientRect();\n }\n\n /*\n * check el is in view\n * @return {Boolean} el is in view\n */\n checkInView() {\n this.getRect();\n return this.rect.top < window.innerHeight * this.options.preLoad && this.rect.bottom > this.options.preLoadTop && this.rect.left < window.innerWidth * this.options.preLoad && this.rect.right > 0;\n }\n\n /*\n * listener filter\n */\n filter() {\n ObjectKeys(this.options.filter).map(key => {\n this.options.filter[key](this, this.options);\n });\n }\n\n /*\n * render loading first\n * @params cb:Function\n * @return\n */\n renderLoading(cb) {\n this.state.loading = true;\n loadImageAsync({\n src: this.loading,\n cors: this.cors\n }, data => {\n this.render('loading', false);\n this.state.loading = false;\n cb();\n }, () => {\n // handler `loading image` load failed\n cb();\n this.state.loading = false;\n if (!this.options.silent) console.warn(`VueLazyload log: load failed with loading image(${this.loading})`);\n });\n }\n\n /*\n * try load image and render it\n * @return\n */\n load(onFinish = noop) {\n if (this.attempt > this.options.attempt - 1 && this.state.error) {\n if (!this.options.silent) console.log(`VueLazyload log: ${this.src} tried too more than ${this.options.attempt} times`);\n onFinish();\n return;\n }\n if (this.state.rendered && this.state.loaded) return;\n if (this._imageCache.has(this.src)) {\n this.state.loaded = true;\n this.render('loaded', true);\n this.state.rendered = true;\n return onFinish();\n }\n\n this.renderLoading(() => {\n this.attempt++;\n\n this.options.adapter['beforeLoad'] && this.options.adapter['beforeLoad'](this, this.options);\n this.record('loadStart');\n\n loadImageAsync({\n src: this.src,\n cors: this.cors\n }, data => {\n this.naturalHeight = data.naturalHeight;\n this.naturalWidth = data.naturalWidth;\n this.state.loaded = true;\n this.state.error = false;\n this.record('loadEnd');\n this.render('loaded', false);\n this.state.rendered = true;\n this._imageCache.add(this.src);\n onFinish();\n }, err => {\n !this.options.silent && console.error(err);\n this.state.error = true;\n this.state.loaded = false;\n this.render('error', false);\n });\n });\n }\n\n /*\n * render image\n * @param {String} state to render // ['loading', 'src', 'error']\n * @param {String} is form cache\n * @return\n */\n render(state, cache) {\n this.elRenderer(this, state, cache);\n }\n\n /*\n * output performance data\n * @return {Object} performance data\n */\n performance() {\n let state = 'loading';\n let time = 0;\n\n if (this.state.loaded) {\n state = 'loaded';\n time = (this.performanceData.loadEnd - this.performanceData.loadStart) / 1000;\n }\n\n if (this.state.error) state = 'error';\n\n return {\n src: this.src,\n state,\n time\n };\n }\n\n /*\n * $destroy\n * @return\n */\n $destroy() {\n this.el = null;\n this.src = null;\n this.error = null;\n this.loading = null;\n this.bindType = null;\n this.attempt = 0;\n }\n}\n\nconst DEFAULT_URL = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\nconst DEFAULT_EVENTS = ['scroll', 'wheel', 'mousewheel', 'resize', 'animationend', 'transitionend', 'touchmove'];\nconst DEFAULT_OBSERVER_OPTIONS = {\n rootMargin: '0px',\n threshold: 0\n};\n\nfunction Lazy(Vue) {\n return class Lazy {\n constructor({ preLoad, error, throttleWait, preLoadTop, dispatchEvent, loading, attempt, silent = true, scale, listenEvents, hasbind, filter, adapter, observer, observerOptions }) {\n this.version = '\"1.3.4\"';\n this.mode = modeType.event;\n this.ListenerQueue = [];\n this.TargetIndex = 0;\n this.TargetQueue = [];\n this.options = {\n silent: silent,\n dispatchEvent: !!dispatchEvent,\n throttleWait: throttleWait || 200,\n preLoad: preLoad || 1.3,\n preLoadTop: preLoadTop || 0,\n error: error || DEFAULT_URL,\n loading: loading || DEFAULT_URL,\n attempt: attempt || 3,\n scale: scale || getDPR(scale),\n ListenEvents: listenEvents || DEFAULT_EVENTS,\n hasbind: false,\n supportWebp: supportWebp(),\n filter: filter || {},\n adapter: adapter || {},\n observer: !!observer,\n observerOptions: observerOptions || DEFAULT_OBSERVER_OPTIONS\n };\n this._initEvent();\n this._imageCache = new ImageCache({ max: 200 });\n this.lazyLoadHandler = throttle(this._lazyLoadHandler.bind(this), this.options.throttleWait);\n\n this.setMode(this.options.observer ? modeType.observer : modeType.event);\n }\n\n /**\n * update config\n * @param {Object} config params\n * @return\n */\n config(options = {}) {\n assignDeep(this.options, options);\n }\n\n /**\n * output listener's load performance\n * @return {Array}\n */\n performance() {\n let list = [];\n\n this.ListenerQueue.map(item => {\n list.push(item.performance());\n });\n\n return list;\n }\n\n /*\n * add lazy component to queue\n * @param {Vue} vm lazy component instance\n * @return\n */\n addLazyBox(vm) {\n this.ListenerQueue.push(vm);\n if (inBrowser) {\n this._addListenerTarget(window);\n this._observer && this._observer.observe(vm.el);\n if (vm.$el && vm.$el.parentNode) {\n this._addListenerTarget(vm.$el.parentNode);\n }\n }\n }\n\n /*\n * add image listener to queue\n * @param {DOM} el\n * @param {object} binding vue directive binding\n * @param {vnode} vnode vue directive vnode\n * @return\n */\n add(el, binding, vnode) {\n if (some(this.ListenerQueue, item => item.el === el)) {\n this.update(el, binding);\n return Vue.nextTick(this.lazyLoadHandler);\n }\n\n let { src, loading, error, cors } = this._valueFormatter(binding.value);\n\n Vue.nextTick(() => {\n src = getBestSelectionFromSrcset(el, this.options.scale) || src;\n this._observer && this._observer.observe(el);\n\n const container = Object.keys(binding.modifiers)[0];\n let $parent;\n\n if (container) {\n $parent = vnode.context.$refs[container];\n // if there is container passed in, try ref first, then fallback to getElementById to support the original usage\n $parent = $parent ? $parent.$el || $parent : document.getElementById(container);\n }\n\n if (!$parent) {\n $parent = scrollParent(el);\n }\n\n const newListener = new ReactiveListener({\n bindType: binding.arg,\n $parent,\n el,\n loading,\n error,\n src,\n cors,\n elRenderer: this._elRenderer.bind(this),\n options: this.options,\n imageCache: this._imageCache\n });\n\n this.ListenerQueue.push(newListener);\n\n if (inBrowser) {\n this._addListenerTarget(window);\n this._addListenerTarget($parent);\n }\n\n this.lazyLoadHandler();\n Vue.nextTick(() => this.lazyLoadHandler());\n });\n }\n\n /**\n * update image src\n * @param {DOM} el\n * @param {object} vue directive binding\n * @return\n */\n update(el, binding, vnode) {\n let { src, loading, error } = this._valueFormatter(binding.value);\n src = getBestSelectionFromSrcset(el, this.options.scale) || src;\n\n const exist = find(this.ListenerQueue, item => item.el === el);\n if (!exist) {\n this.add(el, binding, vnode);\n } else {\n exist.update({\n src,\n loading,\n error\n });\n }\n if (this._observer) {\n this._observer.unobserve(el);\n this._observer.observe(el);\n }\n this.lazyLoadHandler();\n Vue.nextTick(() => this.lazyLoadHandler());\n }\n\n /**\n * remove listener form list\n * @param {DOM} el\n * @return\n */\n remove(el) {\n if (!el) return;\n this._observer && this._observer.unobserve(el);\n const existItem = find(this.ListenerQueue, item => item.el === el);\n if (existItem) {\n this._remove