From b84b42cef097c92b8947ad1e62808822e1055bd0 Mon Sep 17 00:00:00 2001 From: qiang Date: Wed, 25 Aug 2021 14:44:30 +0800 Subject: [PATCH] chore: build runtime --- packages/uni-app-plus/dist/index.js | 2 +- packages/uni-mp-alipay/dist/index.js | 836 +++++++++--------- packages/uni-mp-baidu/dist/index.js | 2 +- packages/uni-mp-kuaishou/dist/index.js | 2 +- packages/uni-mp-qq/dist/index.js | 2 +- packages/uni-mp-toutiao/dist/index.js | 626 +++++++------ packages/uni-mp-weixin/dist/index.js | 2 +- packages/uni-quickapp-native/dist/vue.dev.js | 2 +- packages/uni-quickapp-native/dist/vue.prod.js | 2 +- packages/uni-quickapp-webview/dist/index.js | 2 +- 10 files changed, 738 insertions(+), 740 deletions(-) diff --git a/packages/uni-app-plus/dist/index.js b/packages/uni-app-plus/dist/index.js index eba84bf0a..db164052e 100644 --- a/packages/uni-app-plus/dist/index.js +++ b/packages/uni-app-plus/dist/index.js @@ -285,7 +285,7 @@ const promiseInterceptor = { }; const SYNC_API_RE = - /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; + /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLanguage|setLanguage/; const CONTEXT_API_RE = /^create|Manager$/; diff --git a/packages/uni-mp-alipay/dist/index.js b/packages/uni-mp-alipay/dist/index.js index 27c15e00b..860dff5d1 100644 --- a/packages/uni-mp-alipay/dist/index.js +++ b/packages/uni-mp-alipay/dist/index.js @@ -1,55 +1,55 @@ -import Vue from 'vue'; - -function b64DecodeUnicode (str) { - return decodeURIComponent(atob(str).split('').map(function (c) { - return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) - }).join('')) -} - -function getCurrentUserInfo () { - const token = ( my).getStorageSync('uni_id_token') || ''; - const tokenArr = token.split('.'); - if (!token || tokenArr.length !== 3) { - return { - uid: null, - role: [], - permission: [], - tokenExpired: 0 - } - } - let userInfo; - try { - userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1])); - } catch (error) { - throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message) - } - userInfo.tokenExpired = userInfo.exp * 1000; - delete userInfo.exp; - delete userInfo.iat; - return userInfo -} - -function uniIdMixin (Vue) { - Vue.prototype.uniIDHasRole = function (roleId) { - const { - role - } = getCurrentUserInfo(); - return role.indexOf(roleId) > -1 - }; - Vue.prototype.uniIDHasPermission = function (permissionId) { - const { - permission - } = getCurrentUserInfo(); - return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1 - }; - Vue.prototype.uniIDTokenValid = function () { - const { - tokenExpired - } = getCurrentUserInfo(); - return tokenExpired > Date.now() - }; -} - +import Vue from 'vue'; + +function b64DecodeUnicode (str) { + return decodeURIComponent(atob(str).split('').map(function (c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) + }).join('')) +} + +function getCurrentUserInfo () { + const token = ( my).getStorageSync('uni_id_token') || ''; + const tokenArr = token.split('.'); + if (!token || tokenArr.length !== 3) { + return { + uid: null, + role: [], + permission: [], + tokenExpired: 0 + } + } + let userInfo; + try { + userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1])); + } catch (error) { + throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message) + } + userInfo.tokenExpired = userInfo.exp * 1000; + delete userInfo.exp; + delete userInfo.iat; + return userInfo +} + +function uniIdMixin (Vue) { + Vue.prototype.uniIDHasRole = function (roleId) { + const { + role + } = getCurrentUserInfo(); + return role.indexOf(roleId) > -1 + }; + Vue.prototype.uniIDHasPermission = function (permissionId) { + const { + permission + } = getCurrentUserInfo(); + return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1 + }; + Vue.prototype.uniIDTokenValid = function () { + const { + tokenExpired + } = getCurrentUserInfo(); + return tokenExpired > Date.now() + }; +} + const _toString = Object.prototype.toString; const hasOwnProperty = Object.prototype.hasOwnProperty; @@ -88,8 +88,8 @@ function cached (fn) { const camelizeRE = /-(\w)/g; const camelize = cached((str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : '') -}); - +}); + const HOOKS = [ 'invoke', 'success', @@ -282,10 +282,10 @@ const promiseInterceptor = { }); }) } -}; - +}; + const SYNC_API_RE = - /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; + /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLanguage|setLanguage/; const CONTEXT_API_RE = /^create|Manager$/; @@ -354,8 +354,8 @@ function promisify (name, api) { }), ...params); }))) } -} - +} + const EPS = 1e-4; const BASE_DEVICE_WIDTH = 750; let isIOS = false; @@ -396,20 +396,20 @@ function upx2px (number, newDeviceWidth) { } } return number < 0 ? -result : result -} - +} + const interceptors = { promiseInterceptor -}; - -var baseApi = /*#__PURE__*/Object.freeze({ - __proto__: null, - upx2px: upx2px, - addInterceptor: addInterceptor, - removeInterceptor: removeInterceptor, - interceptors: interceptors -}); - +}; + +var baseApi = /*#__PURE__*/Object.freeze({ + __proto__: null, + upx2px: upx2px, + addInterceptor: addInterceptor, + removeInterceptor: removeInterceptor, + interceptors: interceptors +}); + class EventChannel { constructor (id, events) { this.id = id; @@ -476,8 +476,8 @@ class EventChannel { type }); } -} - +} + const eventChannels = {}; const eventChannelStack = []; @@ -513,8 +513,8 @@ var navigateTo = { returnValue (fromRes, toRes) { fromRes.eventChannel = getEventChannel(); } -}; - +}; + function findExistsPageIndex (url) { const pages = getCurrentPages(); let len = pages.length; @@ -525,8 +525,8 @@ function findExistsPageIndex (url) { } } return -1 -} - +} + var redirectTo = { name (fromArgs) { if (fromArgs.exists === 'back' && fromArgs.delta) { @@ -545,69 +545,69 @@ var redirectTo = { } } } -}; - -function setStorageSync (key, data) { - return my.setStorageSync({ - key, - data - }) -} -function getStorageSync (key) { - const result = my.getStorageSync({ - key - }); - // 支付宝平台会返回一个 success 值,但是目前测试的结果这个始终是 true。当没有存储数据的时候,其它平台会返回空字符串。 - return result.data !== null ? result.data : '' -} -function removeStorageSync (key) { - return my.removeStorageSync({ - key - }) -} - -const UUID_KEY = '__DC_STAT_UUID'; -let deviceId; -function addUuid (result) { - deviceId = deviceId || getStorageSync(UUID_KEY); - if (!deviceId) { - deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7); - my.setStorage({ - key: UUID_KEY, - data: deviceId - }); - } - result.deviceId = deviceId; -} - -function addSafeAreaInsets (result) { - if (result.safeArea) { - const safeArea = result.safeArea; - result.safeAreaInsets = { - top: safeArea.top, - left: safeArea.left, - right: result.windowWidth - safeArea.right, - bottom: result.windowHeight - safeArea.bottom - }; - } -} - -function normalizePlatform (result) { - let platform = result.platform ? result.platform.toLowerCase() : 'devtools'; - if (!~['android', 'ios'].indexOf(platform)) { - platform = 'devtools'; - } - result.platform = platform; -} - -var getSystemInfo = { - returnValue: function (result) { - addUuid(result); - addSafeAreaInsets(result); - normalizePlatform(result); - } -}; - +}; + +function setStorageSync (key, data) { + return my.setStorageSync({ + key, + data + }) +} +function getStorageSync (key) { + const result = my.getStorageSync({ + key + }); + // 支付宝平台会返回一个 success 值,但是目前测试的结果这个始终是 true。当没有存储数据的时候,其它平台会返回空字符串。 + return result.data !== null ? result.data : '' +} +function removeStorageSync (key) { + return my.removeStorageSync({ + key + }) +} + +const UUID_KEY = '__DC_STAT_UUID'; +let deviceId; +function addUuid (result) { + deviceId = deviceId || getStorageSync(UUID_KEY); + if (!deviceId) { + deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7); + my.setStorage({ + key: UUID_KEY, + data: deviceId + }); + } + result.deviceId = deviceId; +} + +function addSafeAreaInsets (result) { + if (result.safeArea) { + const safeArea = result.safeArea; + result.safeAreaInsets = { + top: safeArea.top, + left: safeArea.left, + right: result.windowWidth - safeArea.right, + bottom: result.windowHeight - safeArea.bottom + }; + } +} + +function normalizePlatform (result) { + let platform = result.platform ? result.platform.toLowerCase() : 'devtools'; + if (!~['android', 'ios'].indexOf(platform)) { + platform = 'devtools'; + } + result.platform = platform; +} + +var getSystemInfo = { + returnValue: function (result) { + addUuid(result); + addSafeAreaInsets(result); + normalizePlatform(result); + } +}; + // 不支持的 API 列表 const todos = [ 'preloadPage', @@ -855,14 +855,14 @@ const protocols = { // 需要做转换的 API 列表 }, chooseImage: { returnValue (result) { - const hasTempFilePaths = hasOwn(result,'tempFilePaths') && result.tempFilePaths - if (hasOwn(result,'apFilePaths') && !hasTempFilePaths) { - result.tempFilePaths = result.apFilePaths - delete result.apFilePaths + const hasTempFilePaths = hasOwn(result, 'tempFilePaths') && result.tempFilePaths; + if (hasOwn(result, 'apFilePaths') && !hasTempFilePaths) { + result.tempFilePaths = result.apFilePaths; + delete result.apFilePaths; } - if (!hasOwn(result,'tempFiles') && hasTempFilePaths) { - result.tempFiles = [] - result.tempFilePaths.forEach(tempFilePath => result.tempFiles.push({path: tempFilePath})) + if (!hasOwn(result, 'tempFiles') && hasTempFilePaths) { + result.tempFiles = []; + result.tempFilePaths.forEach(tempFilePath => result.tempFiles.push({ path: tempFilePath })); } return {} } @@ -1092,8 +1092,8 @@ const protocols = { // 需要做转换的 API 列表 result.errMsg = result.resultStatus; } } -}; - +}; + const CALLBACKS = ['success', 'fail', 'cancel', 'complete']; function processCallback (methodName, method, returnValue) { @@ -1178,8 +1178,8 @@ function wrapper (methodName, method) { } } return method -} - +} + const todoApis = Object.create(null); const TODOS = [ @@ -1206,15 +1206,15 @@ function createTodoApi (name) { TODOS.forEach(function (name) { todoApis[name] = createTodoApi(name); -}); - +}); + var providers = { oauth: ['alipay'], share: ['alipay'], payment: ['alipay'], push: ['alipay'] -}; - +}; + function getProvider ({ service, success, @@ -1236,18 +1236,18 @@ function getProvider ({ isFn(fail) && fail(res); } isFn(complete) && complete(res); -} - -var extraApi = /*#__PURE__*/Object.freeze({ - __proto__: null, - getProvider: getProvider -}); - +} + +var extraApi = /*#__PURE__*/Object.freeze({ + __proto__: null, + getProvider: getProvider +}); + const getEmitter = (function () { let Emitter; - return function getUniEmitter () { - if (!Emitter) { - Emitter = new Vue(); + return function getUniEmitter () { + if (!Emitter) { + Emitter = new Vue(); } return Emitter } @@ -1268,202 +1268,202 @@ function $once () { } function $emit () { return apply(getEmitter(), '$emit', [...arguments]) -} - -var eventApi = /*#__PURE__*/Object.freeze({ - __proto__: null, - $on: $on, - $off: $off, - $once: $once, - $emit: $emit -}); - -function createMediaQueryObserver () { - const mediaQueryObserver = {}; - const { - windowWidth, - windowHeight - } = my.getSystemInfoSync(); - - const orientation = windowWidth < windowHeight ? 'portrait' : 'landscape'; - - mediaQueryObserver.observe = (options, callback) => { - let matches = true; - for (const item in options) { - const itemValue = item === 'orientation' ? options[item] : Number(options[item]); - if (options[item] !== '') { - if (item === 'width') { - if (itemValue === windowWidth) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'minWidth') { - if (windowWidth >= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'maxWidth') { - if (windowWidth <= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - - if (item === 'height') { - if (itemValue === windowHeight) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'minHeight') { - if (windowHeight >= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'maxHeight') { - if (windowHeight <= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - - if (item === 'orientation') { - if (options[item] === orientation) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - } - } - callback(matches); - - return matches - }; - - mediaQueryObserver.disconnect = () => { - }; - - return mediaQueryObserver -} - -function startGyroscope (params) { - if (hasOwn(params, 'interval')) { - console.warn('支付宝小程序 startGyroscope暂不支持interval'); - } - params.success && params.success({ - errMsg: 'startGyroscope:ok' - }); - params.complete && params.complete({ - errMsg: 'startGyroscope:ok' - }); -} - -function createExecCallback (execCallback) { - return function wrapperExecCallback (res) { - this.actions.forEach((action, index) => { - (action._$callbacks || []).forEach(callback => { - callback(res[index]); - }); - }); - if (isFn(execCallback)) { - execCallback(res); - } - } -} - -function addCallback (callback) { - if (isFn(callback)) { - const action = this.actions[this.actions.length - 1]; - if (action) { - (action._$callbacks || (action._$callbacks = [])).push(callback); - } - } -} - -function createSelectorQuery () { - const query = my.createSelectorQuery(); - - const oldExec = query.exec; - const oldScrollOffset = query.scrollOffset; - const oldBoundingClientRect = query.boundingClientRect; - query.exec = function exec (callback) { - return oldExec.call(this, createExecCallback(callback).bind(this)) - }; - query.scrollOffset = function scrollOffset (callback) { - const ret = oldScrollOffset.call(this); - addCallback.call(this, callback); - return ret - }; - query.boundingClientRect = function boundingClientRect (callback) { - const ret = oldBoundingClientRect.call(this); - addCallback.call(this, callback); - return ret - }; - - if (!query.fields) { - query.fields = function ({ rect, size, scrollOffset } = {}, callback) { - if (rect || size) { - this.boundingClientRect(); - } - if (scrollOffset) { - this.scrollOffset(); - } - addCallback.call(this, callback); - return this - }; - } - - if (!query.in) { - query.in = function () { - return this - }; - } - return query -} - -function createIntersectionObserver (component, options) { - if (options && options.observeAll) { - options.selectAll = options.observeAll; - delete options.observeAll; - } - return my.createIntersectionObserver(options) -} - -var api = /*#__PURE__*/Object.freeze({ - __proto__: null, - startGyroscope: startGyroscope, - createSelectorQuery: createSelectorQuery, - createIntersectionObserver: createIntersectionObserver, - createMediaQueryObserver: createMediaQueryObserver, - setStorageSync: setStorageSync, - getStorageSync: getStorageSync, - removeStorageSync: removeStorageSync -}); - +} + +var eventApi = /*#__PURE__*/Object.freeze({ + __proto__: null, + $on: $on, + $off: $off, + $once: $once, + $emit: $emit +}); + +function createMediaQueryObserver () { + const mediaQueryObserver = {}; + const { + windowWidth, + windowHeight + } = my.getSystemInfoSync(); + + const orientation = windowWidth < windowHeight ? 'portrait' : 'landscape'; + + mediaQueryObserver.observe = (options, callback) => { + let matches = true; + for (const item in options) { + const itemValue = item === 'orientation' ? options[item] : Number(options[item]); + if (options[item] !== '') { + if (item === 'width') { + if (itemValue === windowWidth) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'minWidth') { + if (windowWidth >= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'maxWidth') { + if (windowWidth <= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + + if (item === 'height') { + if (itemValue === windowHeight) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'minHeight') { + if (windowHeight >= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'maxHeight') { + if (windowHeight <= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + + if (item === 'orientation') { + if (options[item] === orientation) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + } + } + callback(matches); + + return matches + }; + + mediaQueryObserver.disconnect = () => { + }; + + return mediaQueryObserver +} + +function startGyroscope (params) { + if (hasOwn(params, 'interval')) { + console.warn('支付宝小程序 startGyroscope暂不支持interval'); + } + params.success && params.success({ + errMsg: 'startGyroscope:ok' + }); + params.complete && params.complete({ + errMsg: 'startGyroscope:ok' + }); +} + +function createExecCallback (execCallback) { + return function wrapperExecCallback (res) { + this.actions.forEach((action, index) => { + (action._$callbacks || []).forEach(callback => { + callback(res[index]); + }); + }); + if (isFn(execCallback)) { + execCallback(res); + } + } +} + +function addCallback (callback) { + if (isFn(callback)) { + const action = this.actions[this.actions.length - 1]; + if (action) { + (action._$callbacks || (action._$callbacks = [])).push(callback); + } + } +} + +function createSelectorQuery () { + const query = my.createSelectorQuery(); + + const oldExec = query.exec; + const oldScrollOffset = query.scrollOffset; + const oldBoundingClientRect = query.boundingClientRect; + query.exec = function exec (callback) { + return oldExec.call(this, createExecCallback(callback).bind(this)) + }; + query.scrollOffset = function scrollOffset (callback) { + const ret = oldScrollOffset.call(this); + addCallback.call(this, callback); + return ret + }; + query.boundingClientRect = function boundingClientRect (callback) { + const ret = oldBoundingClientRect.call(this); + addCallback.call(this, callback); + return ret + }; + + if (!query.fields) { + query.fields = function ({ rect, size, scrollOffset } = {}, callback) { + if (rect || size) { + this.boundingClientRect(); + } + if (scrollOffset) { + this.scrollOffset(); + } + addCallback.call(this, callback); + return this + }; + } + + if (!query.in) { + query.in = function () { + return this + }; + } + return query +} + +function createIntersectionObserver (component, options) { + if (options && options.observeAll) { + options.selectAll = options.observeAll; + delete options.observeAll; + } + return my.createIntersectionObserver(options) +} + +var api = /*#__PURE__*/Object.freeze({ + __proto__: null, + startGyroscope: startGyroscope, + createSelectorQuery: createSelectorQuery, + createIntersectionObserver: createIntersectionObserver, + createMediaQueryObserver: createMediaQueryObserver, + setStorageSync: setStorageSync, + getStorageSync: getStorageSync, + removeStorageSync: removeStorageSync +}); + const PAGE_EVENT_HOOKS = [ 'onPullDownRefresh', 'onReachBottom', @@ -1979,8 +1979,8 @@ function handleEvent (event) { ) { return ret[0] } -} - +} + const hooks = [ 'onShow', 'onHide', @@ -2140,8 +2140,8 @@ function parseBaseApp (vm, { initHooks(appOptions, hooks); return appOptions -} - +} + function findVmByVueId (vm, vuePid) { const $children = vm.$children; // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200) @@ -2178,8 +2178,8 @@ function handleLink (event) { } vueOptions.parent = parentVm; -} - +} + const isArray = Array.isArray; const keyList = Object.keys; @@ -2227,8 +2227,8 @@ function equal (a, b) { } return false -} - +} + const customizeRE = /:/g; const customize = cached((str) => { @@ -2422,8 +2422,8 @@ const handleLink$1 = (function () { // 支付宝通过 didMount 来实现,先子后父,故等父 ready 之后,统一初始化 (this._$childVues || (this._$childVues = [])).unshift(detail); } -})(); - +})(); + function parseApp (vm) { Object.defineProperty(Vue.prototype, '$slots', { get () { @@ -2473,13 +2473,13 @@ function parseApp (vm) { mocks, initRefs }) -} - +} + function createApp (vm) { App(parseApp(vm)); return vm -} - +} + const encodeReserveRE = /[!'()*]/g; const encodeReserveReplacer = c => '%' + c.charCodeAt(0).toString(16); const commaRE = /%2C/g; @@ -2521,8 +2521,8 @@ function stringifyQuery (obj, encodeStr = encode) { return encodeStr(key) + '=' + encodeStr(val) }).filter(x => x.length > 0).join('&') : null; return res ? `?${res}` : '' -} - +} + const hooks$1 = [ 'onShow', 'onHide', @@ -2602,14 +2602,14 @@ function parsePage (vuePageOptions) { } return pageOptions -} - +} + function createPage (vuePageOptions) { { return Page(parsePage(vuePageOptions)) } -} - +} + function initVm (VueComponent) { if (this.$vm) { return @@ -2715,25 +2715,25 @@ function parseComponent (vueComponentOptions) { componentOptions.deriveDataFromProps = createObserver$1(); } else { componentOptions.didUpdate = createObserver$1(true); - } - - if (Array.isArray(vueOptions.wxsCallMethods)) { - vueOptions.wxsCallMethods.forEach(callMethod => { - componentOptions.methods[callMethod] = function (args) { - return this.$vm[callMethod](args) - }; - }); + } + + if (Array.isArray(vueOptions.wxsCallMethods)) { + vueOptions.wxsCallMethods.forEach(callMethod => { + componentOptions.methods[callMethod] = function (args) { + return this.$vm[callMethod](args) + }; + }); } return componentOptions -} - +} + function createComponent (vueOptions) { { return my.defineComponent(parseComponent(vueOptions)) } -} - +} + function createSubpackageApp (vm) { const appOptions = parseApp(vm); const app = getApp({ @@ -2768,27 +2768,27 @@ function createSubpackageApp (vm) { vm.__call_hook('onLaunch', args); } return vm -} - -function createPlugin (vm) { - const appOptions = parseApp(vm); - if (isFn(appOptions.onShow) && my.onAppShow) { - my.onAppShow((...args) => { - appOptions.onShow.apply(vm, args); - }); - } - if (isFn(appOptions.onHide) && my.onAppHide) { - my.onAppHide((...args) => { - appOptions.onHide.apply(vm, args); - }); - } - if (isFn(appOptions.onLaunch)) { - const args = my.getLaunchOptionsSync && my.getLaunchOptionsSync(); - appOptions.onLaunch.call(vm, args); - } - return vm -} - +} + +function createPlugin (vm) { + const appOptions = parseApp(vm); + if (isFn(appOptions.onShow) && my.onAppShow) { + my.onAppShow((...args) => { + appOptions.onShow.apply(vm, args); + }); + } + if (isFn(appOptions.onHide) && my.onAppHide) { + my.onAppHide((...args) => { + appOptions.onHide.apply(vm, args); + }); + } + if (isFn(appOptions.onLaunch)) { + const args = my.getLaunchOptionsSync && my.getLaunchOptionsSync(); + appOptions.onLaunch.call(vm, args); + } + return vm +} + todos.forEach(todoApi => { protocols[todoApi] = false; }); @@ -2871,7 +2871,7 @@ my.createComponent = createComponent; my.createSubpackageApp = createSubpackageApp; my.createPlugin = createPlugin; -var uni$1 = uni; - -export default uni$1; -export { createApp, createComponent, createPage, createPlugin, createSubpackageApp }; +var uni$1 = uni; + +export default uni$1; +export { createApp, createComponent, createPage, createPlugin, createSubpackageApp }; diff --git a/packages/uni-mp-baidu/dist/index.js b/packages/uni-mp-baidu/dist/index.js index eb02adc92..b4afbae7e 100644 --- a/packages/uni-mp-baidu/dist/index.js +++ b/packages/uni-mp-baidu/dist/index.js @@ -285,7 +285,7 @@ const promiseInterceptor = { }; const SYNC_API_RE = - /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; + /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLanguage|setLanguage/; const CONTEXT_API_RE = /^create|Manager$/; diff --git a/packages/uni-mp-kuaishou/dist/index.js b/packages/uni-mp-kuaishou/dist/index.js index 5a5bcc306..a9aac4cbd 100644 --- a/packages/uni-mp-kuaishou/dist/index.js +++ b/packages/uni-mp-kuaishou/dist/index.js @@ -285,7 +285,7 @@ const promiseInterceptor = { }; const SYNC_API_RE = - /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; + /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLanguage|setLanguage/; const CONTEXT_API_RE = /^create|Manager$/; diff --git a/packages/uni-mp-qq/dist/index.js b/packages/uni-mp-qq/dist/index.js index 8db15022a..a2023dbb6 100644 --- a/packages/uni-mp-qq/dist/index.js +++ b/packages/uni-mp-qq/dist/index.js @@ -285,7 +285,7 @@ const promiseInterceptor = { }; const SYNC_API_RE = - /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; + /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLanguage|setLanguage/; const CONTEXT_API_RE = /^create|Manager$/; diff --git a/packages/uni-mp-toutiao/dist/index.js b/packages/uni-mp-toutiao/dist/index.js index 74e05e7c6..593afd565 100644 --- a/packages/uni-mp-toutiao/dist/index.js +++ b/packages/uni-mp-toutiao/dist/index.js @@ -1,55 +1,55 @@ -import Vue from 'vue'; - -function b64DecodeUnicode (str) { - return decodeURIComponent(atob(str).split('').map(function (c) { - return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) - }).join('')) -} - -function getCurrentUserInfo () { - const token = ( tt).getStorageSync('uni_id_token') || ''; - const tokenArr = token.split('.'); - if (!token || tokenArr.length !== 3) { - return { - uid: null, - role: [], - permission: [], - tokenExpired: 0 - } - } - let userInfo; - try { - userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1])); - } catch (error) { - throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message) - } - userInfo.tokenExpired = userInfo.exp * 1000; - delete userInfo.exp; - delete userInfo.iat; - return userInfo -} - -function uniIdMixin (Vue) { - Vue.prototype.uniIDHasRole = function (roleId) { - const { - role - } = getCurrentUserInfo(); - return role.indexOf(roleId) > -1 - }; - Vue.prototype.uniIDHasPermission = function (permissionId) { - const { - permission - } = getCurrentUserInfo(); - return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1 - }; - Vue.prototype.uniIDTokenValid = function () { - const { - tokenExpired - } = getCurrentUserInfo(); - return tokenExpired > Date.now() - }; -} - +import Vue from 'vue'; + +function b64DecodeUnicode (str) { + return decodeURIComponent(atob(str).split('').map(function (c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) + }).join('')) +} + +function getCurrentUserInfo () { + const token = ( tt).getStorageSync('uni_id_token') || ''; + const tokenArr = token.split('.'); + if (!token || tokenArr.length !== 3) { + return { + uid: null, + role: [], + permission: [], + tokenExpired: 0 + } + } + let userInfo; + try { + userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1])); + } catch (error) { + throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message) + } + userInfo.tokenExpired = userInfo.exp * 1000; + delete userInfo.exp; + delete userInfo.iat; + return userInfo +} + +function uniIdMixin (Vue) { + Vue.prototype.uniIDHasRole = function (roleId) { + const { + role + } = getCurrentUserInfo(); + return role.indexOf(roleId) > -1 + }; + Vue.prototype.uniIDHasPermission = function (permissionId) { + const { + permission + } = getCurrentUserInfo(); + return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1 + }; + Vue.prototype.uniIDTokenValid = function () { + const { + tokenExpired + } = getCurrentUserInfo(); + return tokenExpired > Date.now() + }; +} + const _toString = Object.prototype.toString; const hasOwnProperty = Object.prototype.hasOwnProperty; @@ -88,8 +88,8 @@ function cached (fn) { const camelizeRE = /-(\w)/g; const camelize = cached((str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : '') -}); - +}); + const HOOKS = [ 'invoke', 'success', @@ -282,10 +282,10 @@ const promiseInterceptor = { }); }) } -}; - +}; + const SYNC_API_RE = - /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; + /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLanguage|setLanguage/; const CONTEXT_API_RE = /^create|Manager$/; @@ -354,8 +354,8 @@ function promisify (name, api) { }), ...params); }))) } -} - +} + const EPS = 1e-4; const BASE_DEVICE_WIDTH = 750; let isIOS = false; @@ -396,20 +396,20 @@ function upx2px (number, newDeviceWidth) { } } return number < 0 ? -result : result -} - +} + const interceptors = { promiseInterceptor -}; - -var baseApi = /*#__PURE__*/Object.freeze({ - __proto__: null, - upx2px: upx2px, - addInterceptor: addInterceptor, - removeInterceptor: removeInterceptor, - interceptors: interceptors -}); - +}; + +var baseApi = /*#__PURE__*/Object.freeze({ + __proto__: null, + upx2px: upx2px, + addInterceptor: addInterceptor, + removeInterceptor: removeInterceptor, + interceptors: interceptors +}); + class EventChannel { constructor (id, events) { this.id = id; @@ -476,8 +476,8 @@ class EventChannel { type }); } -} - +} + const eventChannels = {}; const eventChannelStack = []; @@ -513,8 +513,8 @@ var navigateTo = { returnValue (fromRes, toRes) { fromRes.eventChannel = getEventChannel(); } -}; - +}; + function findExistsPageIndex (url) { const pages = getCurrentPages(); let len = pages.length; @@ -525,8 +525,8 @@ function findExistsPageIndex (url) { } } return -1 -} - +} + var redirectTo = { name (fromArgs) { if (fromArgs.exists === 'back' && fromArgs.delta) { @@ -545,8 +545,8 @@ var redirectTo = { } } } -}; - +}; + var previewImage = { args (fromArgs) { let currentIndex = parseInt(fromArgs.current); @@ -579,48 +579,48 @@ var previewImage = { loop: false } } -}; - -const UUID_KEY = '__DC_STAT_UUID'; -let deviceId; -function addUuid (result) { - deviceId = deviceId || tt.getStorageSync(UUID_KEY); - if (!deviceId) { - deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7); - tt.setStorage({ - key: UUID_KEY, - data: deviceId - }); - } - result.deviceId = deviceId; -} - -function addSafeAreaInsets (result) { - if (result.safeArea) { - const safeArea = result.safeArea; - result.safeAreaInsets = { - top: safeArea.top, - left: safeArea.left, - right: result.windowWidth - safeArea.right, - bottom: result.windowHeight - safeArea.bottom - }; - } -} - -var getSystemInfo = { - returnValue: function (result) { - addUuid(result); - addSafeAreaInsets(result); - } -}; - -const oName = 'getUserInfo'; -const nName = 'getUserProfile'; - -var getUserProfile = { - name: tt.canIUse(nName) ? nName : oName -}; - +}; + +const UUID_KEY = '__DC_STAT_UUID'; +let deviceId; +function addUuid (result) { + deviceId = deviceId || tt.getStorageSync(UUID_KEY); + if (!deviceId) { + deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7); + tt.setStorage({ + key: UUID_KEY, + data: deviceId + }); + } + result.deviceId = deviceId; +} + +function addSafeAreaInsets (result) { + if (result.safeArea) { + const safeArea = result.safeArea; + result.safeAreaInsets = { + top: safeArea.top, + left: safeArea.left, + right: result.windowWidth - safeArea.right, + bottom: result.windowHeight - safeArea.bottom + }; + } +} + +var getSystemInfo = { + returnValue: function (result) { + addUuid(result); + addSafeAreaInsets(result); + } +}; + +const oName = 'getUserInfo'; +const nName = 'getUserProfile'; + +var getUserProfile = { + name: tt.canIUse(nName) ? nName : oName +}; + // 不支持的 API 列表 const todos = [ 'preloadPage', @@ -792,8 +792,8 @@ const protocols = { digestAlgorithm: false } } -}; - +}; + const CALLBACKS = ['success', 'fail', 'cancel', 'complete']; function processCallback (methodName, method, returnValue) { @@ -878,8 +878,8 @@ function wrapper (methodName, method) { } } return method -} - +} + const todoApis = Object.create(null); const TODOS = [ @@ -906,15 +906,15 @@ function createTodoApi (name) { TODOS.forEach(function (name) { todoApis[name] = createTodoApi(name); -}); - +}); + var providers = { oauth: ['toutiao'], share: ['toutiao'], payment: ['toutiao'], push: ['toutiao'] -}; - +}; + function getProvider ({ service, success, @@ -936,18 +936,18 @@ function getProvider ({ isFn(fail) && fail(res); } isFn(complete) && complete(res); -} - -var extraApi = /*#__PURE__*/Object.freeze({ - __proto__: null, - getProvider: getProvider -}); - +} + +var extraApi = /*#__PURE__*/Object.freeze({ + __proto__: null, + getProvider: getProvider +}); + const getEmitter = (function () { let Emitter; - return function getUniEmitter () { - if (!Emitter) { - Emitter = new Vue(); + return function getUniEmitter () { + if (!Emitter) { + Emitter = new Vue(); } return Emitter } @@ -968,113 +968,113 @@ function $once () { } function $emit () { return apply(getEmitter(), '$emit', [...arguments]) -} - -var eventApi = /*#__PURE__*/Object.freeze({ - __proto__: null, - $on: $on, - $off: $off, - $once: $once, - $emit: $emit -}); - -function createMediaQueryObserver () { - const mediaQueryObserver = {}; - const { - windowWidth, - windowHeight - } = tt.getSystemInfoSync(); - - const orientation = windowWidth < windowHeight ? 'portrait' : 'landscape'; - - mediaQueryObserver.observe = (options, callback) => { - let matches = true; - for (const item in options) { - const itemValue = item === 'orientation' ? options[item] : Number(options[item]); - if (options[item] !== '') { - if (item === 'width') { - if (itemValue === windowWidth) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'minWidth') { - if (windowWidth >= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'maxWidth') { - if (windowWidth <= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - - if (item === 'height') { - if (itemValue === windowHeight) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'minHeight') { - if (windowHeight >= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - if (item === 'maxHeight') { - if (windowHeight <= itemValue) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - - if (item === 'orientation') { - if (options[item] === orientation) { - matches = true; - } else { - matches = false; - callback(matches); - return matches - } - } - } - } - callback(matches); - - return matches - }; - - mediaQueryObserver.disconnect = () => { - }; - - return mediaQueryObserver -} - -var api = /*#__PURE__*/Object.freeze({ - __proto__: null, - createMediaQueryObserver: createMediaQueryObserver -}); - +} + +var eventApi = /*#__PURE__*/Object.freeze({ + __proto__: null, + $on: $on, + $off: $off, + $once: $once, + $emit: $emit +}); + +function createMediaQueryObserver () { + const mediaQueryObserver = {}; + const { + windowWidth, + windowHeight + } = tt.getSystemInfoSync(); + + const orientation = windowWidth < windowHeight ? 'portrait' : 'landscape'; + + mediaQueryObserver.observe = (options, callback) => { + let matches = true; + for (const item in options) { + const itemValue = item === 'orientation' ? options[item] : Number(options[item]); + if (options[item] !== '') { + if (item === 'width') { + if (itemValue === windowWidth) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'minWidth') { + if (windowWidth >= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'maxWidth') { + if (windowWidth <= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + + if (item === 'height') { + if (itemValue === windowHeight) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'minHeight') { + if (windowHeight >= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + if (item === 'maxHeight') { + if (windowHeight <= itemValue) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + + if (item === 'orientation') { + if (options[item] === orientation) { + matches = true; + } else { + matches = false; + callback(matches); + return matches + } + } + } + } + callback(matches); + + return matches + }; + + mediaQueryObserver.disconnect = () => { + }; + + return mediaQueryObserver +} + +var api = /*#__PURE__*/Object.freeze({ + __proto__: null, + createMediaQueryObserver: createMediaQueryObserver +}); + const MPPage = Page; const MPComponent = Component; @@ -1091,9 +1091,7 @@ function initTriggerEvent (mpInstance) { }; } -function initHook (name, options, isComponent) { - // fix by Lxh 字节自定义组件Component构造器文档上写有created,但是实测只触发了lifetimes上的created - isComponent && (options = options.lifetimes) +function initHook (name, options) { const oldHook = options[name]; if (!oldHook) { options[name] = function () { @@ -1115,11 +1113,11 @@ if (!MPPage.__$wrappered) { Page.after = MPPage.after; Component = function (options = {}) { - initHook('created', options, true); + initHook('created', options); return MPComponent(options) }; -} - +} + const PAGE_EVENT_HOOKS = [ 'onPullDownRefresh', 'onReachBottom', @@ -1661,8 +1659,8 @@ function handleEvent (event) { ) { return ret[0] } -} - +} + const hooks = [ 'onShow', 'onHide', @@ -1822,8 +1820,8 @@ function parseBaseApp (vm, { initHooks(appOptions, hooks); return appOptions -} - +} + function findVmByVueId (vm, vuePid) { const $children = vm.$children; // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200) @@ -1864,8 +1862,8 @@ function handleLink (event) { } vueOptions.parent = parentVm; -} - +} + const mocks = ['__route__', '__webviewId__', '__nodeid__', '__nodeId__']; function isPage () { @@ -1965,8 +1963,8 @@ function handleLink$1 ({ vm._isMounted = true; vm.__call_hook('mounted'); vm.__call_hook('onReady'); -} - +} + function parseApp (vm) { Vue.prototype._$fallback = true; // 降级(调整原 vue 的部分生命周期,如 created,beforeMount,inject,provide) @@ -1993,13 +1991,13 @@ function parseApp (vm) { mocks, initRefs: function () {} // attached 时,可能查询不到 }) -} - +} + function createApp (vm) { App(parseApp(vm)); return vm -} - +} + const encodeReserveRE = /[!'()*]/g; const encodeReserveReplacer = c => '%' + c.charCodeAt(0).toString(16); const commaRE = /%2C/g; @@ -2041,8 +2039,8 @@ function stringifyQuery (obj, encodeStr = encode) { return encodeStr(key) + '=' + encodeStr(val) }).filter(x => x.length > 0).join('&') : null; return res ? `?${res}` : '' -} - +} + function parseBaseComponent (vueComponentOptions, { isPage, initRelation @@ -2133,8 +2131,8 @@ function parseBaseComponent (vueComponentOptions, { return componentOptions } return [componentOptions, VueComponent] -} - +} + const components = []; function parseComponent (vueOptions) { @@ -2187,8 +2185,8 @@ function parseComponent (vueOptions) { componentOptions.methods.__l = handleLink$1; return componentOptions -} - +} + const hooks$1 = [ 'onShow', 'onHide', @@ -2217,8 +2215,8 @@ function parseBasePage (vuePageOptions, { }; return pageOptions -} - +} + function parsePage (vuePageOptions) { const pageOptions = parseBasePage(vuePageOptions, { isPage, @@ -2235,34 +2233,34 @@ function parsePage (vuePageOptions) { } else { this.is && console.warn(this.is + ' is not ready'); } - }; - - pageOptions.lifetimes.detached = function detached () { - this.$vm && this.$vm.$destroy(); - // 清理 - const webviewId = this.__webviewId__; - webviewId && Object.keys(instances).forEach(key => { - if (key.indexOf(webviewId + '_') === 0) { - delete instances[key]; - } - }); + }; + + pageOptions.lifetimes.detached = function detached () { + this.$vm && this.$vm.$destroy(); + // 清理 + const webviewId = this.__webviewId__; + webviewId && Object.keys(instances).forEach(key => { + if (key.indexOf(webviewId + '_') === 0) { + delete instances[key]; + } + }); }; return pageOptions -} - +} + function createPage (vuePageOptions) { { return Component(parsePage(vuePageOptions)) } -} - +} + function createComponent (vueOptions) { { return Component(parseComponent(vueOptions)) } -} - +} + function createSubpackageApp (vm) { const appOptions = parseApp(vm); const app = getApp({ @@ -2297,27 +2295,27 @@ function createSubpackageApp (vm) { vm.__call_hook('onLaunch', args); } return vm -} - -function createPlugin (vm) { - const appOptions = parseApp(vm); - if (isFn(appOptions.onShow) && tt.onAppShow) { - tt.onAppShow((...args) => { - appOptions.onShow.apply(vm, args); - }); - } - if (isFn(appOptions.onHide) && tt.onAppHide) { - tt.onAppHide((...args) => { - appOptions.onHide.apply(vm, args); - }); - } - if (isFn(appOptions.onLaunch)) { - const args = tt.getLaunchOptionsSync && tt.getLaunchOptionsSync(); - appOptions.onLaunch.call(vm, args); - } - return vm -} - +} + +function createPlugin (vm) { + const appOptions = parseApp(vm); + if (isFn(appOptions.onShow) && tt.onAppShow) { + tt.onAppShow((...args) => { + appOptions.onShow.apply(vm, args); + }); + } + if (isFn(appOptions.onHide) && tt.onAppHide) { + tt.onAppHide((...args) => { + appOptions.onHide.apply(vm, args); + }); + } + if (isFn(appOptions.onLaunch)) { + const args = tt.getLaunchOptionsSync && tt.getLaunchOptionsSync(); + appOptions.onLaunch.call(vm, args); + } + return vm +} + todos.forEach(todoApi => { protocols[todoApi] = false; }); @@ -2400,7 +2398,7 @@ tt.createComponent = createComponent; tt.createSubpackageApp = createSubpackageApp; tt.createPlugin = createPlugin; -var uni$1 = uni; - -export default uni$1; -export { createApp, createComponent, createPage, createPlugin, createSubpackageApp }; +var uni$1 = uni; + +export default uni$1; +export { createApp, createComponent, createPage, createPlugin, createSubpackageApp }; diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 7e593cc95..a055cf5ac 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -285,7 +285,7 @@ const promiseInterceptor = { }; const SYNC_API_RE = - /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; + /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLanguage|setLanguage/; const CONTEXT_API_RE = /^create|Manager$/; diff --git a/packages/uni-quickapp-native/dist/vue.dev.js b/packages/uni-quickapp-native/dist/vue.dev.js index e4741fe21..9937ba186 100644 --- a/packages/uni-quickapp-native/dist/vue.dev.js +++ b/packages/uni-quickapp-native/dist/vue.dev.js @@ -1,4 +1,4 @@ var dsl=function(){"use strict";const e={initApp:"quickapp.app.initApp",initPage:"quickapp.page.initPage",destroyPage:"quickapp.page.destroyPage",fireEvent:"quickapp.page.fireEvent",onShow:"quickapp.page.onShow",onHide:"quickapp.page.onHide",onBackPress:"quickapp.page.onBackPress",onMenuPress:"quickapp.page.onMenuPress",onOrientationChange:"quickapp.page.onOrientationChange",onConfigurationChanged:"quickapp.page.onConfigurationChanged",onRefresh:"quickapp.page.onRefresh",callbackDone:"quickapp.page.callbackDone"},t=/^@(app)-application\//,n=/^@(app)-component\//,r=/^@(app)-module\//;function o(e){return e.replace(t,"").replace(n,"").replace(r,"")}var i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var a,s,c=(function(e){e.exports=function(e,t,n){var r=Object.freeze({});function o(e){return null==e}function a(e){return null!=e}function s(e){return!0===e}function c(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function u(e){return null!==e&&"object"==typeof e}var l=Object.prototype.toString;function p(e){return l.call(e).slice(8,-1)}function f(e){return"[object Object]"===l.call(e)}function d(e){return"[object RegExp]"===l.call(e)}function v(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function h(e){return a(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function m(e){return null==e?"":Array.isArray(e)||f(e)&&e.toString===l?JSON.stringify(e,null,2):String(e)}function y(e){var t=parseFloat(e);return isNaN(t)?e:t}function g(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o-1)return e.splice(n,1)}}var w=Object.prototype.hasOwnProperty;function A(e,t){return w.call(e,t)}function k(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var x=/-(\w)/g,O=k(function(e){return e.replace(x,function(e,t){return t?t.toUpperCase():""})}),C=k(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),S=/\B([A-Z])/g,j=k(function(e){return e.replace(S,"-$1").toLowerCase()});var E=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function I(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function P(e,t){for(var n in t)e[n]=t[n];return e}function M(e,t,n){}var T=function(e,t,n){return!1},F=function(e){return e};function D(e,t){if(e===t)return!0;var n=u(e),r=u(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every(function(e,n){return D(e,t[n])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||i)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every(function(n){return D(e[n],t[n])})}catch(e){return!1}}function N(e,t){for(var n=0;n0,te=X&&X.indexOf("edge/")>0,ne=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===G),re=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/),{}.watch);if(Q)try{var oe={};Object.defineProperty(oe,"passive",{get:function(){}}),window.addEventListener("test-passive",null,oe)}catch(e){}var ie=function(){return void 0===W&&(W=!Q&&!Y&&void 0!==i&&(i.process&&"server"===i.process.env.VUE_ENV)),W},ae=Q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function se(e){return"function"==typeof e&&/native code/.test(e.toString())}var ce,ue="undefined"!=typeof Symbol&&se(Symbol)&&"undefined"!=typeof Reflect&&se(Reflect.ownKeys);ce="undefined"!=typeof Set&&se(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var le=M,pe=M,fe=M,de=M,ve="undefined"!=typeof console,he=/(?:^|[-_])(\w)/g;le=function(e,t){var n=t?fe(t):"";B.warnHandler?B.warnHandler.call(null,e,t,n):ve&&!B.silent&&console.error("[Vue warn]: "+e+n)},pe=function(e,t){ve&&!B.silent&&console.warn("[Vue tip]: "+e+(t?fe(t):""))},de=function(e,t){if(e.$root===e)return"";var n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e,r=n.name||n._componentTag,o=n.__file;if(!r&&o){var i=o.match(/([^/\\]+)\.vue$/);r=i&&i[1]}return(r?"<"+r.replace(he,function(e){return e.toUpperCase()}).replace(/[-_]/g,"")+">":"")+(o&&!1!==t?" at "+o:"")};fe=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(t.length>0){var r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map(function(e,t){return""+(0===t?"---\x3e ":function(e,t){for(var n="";t;)t%2==1&&(n+=e),t>1&&(e+=e),t>>=1;return n}(" ",5+2*t))+(Array.isArray(e)?de(e[0])+"... ("+e[1]+" recursive calls)":de(e))}).join("\n")}return"\n\n(found in "+de(e)+")"};var me=0,ye=function(){"undefined"!=typeof SharedObject?this.id=SharedObject.uid++:this.id=me++,this.subs=[]};function ge(e){ye.SharedObject.targetStack.push(e),ye.SharedObject.target=e}function _e(){ye.SharedObject.targetStack.pop(),ye.SharedObject.target=ye.SharedObject.targetStack[ye.SharedObject.targetStack.length-1]}ye.prototype.addSub=function(e){this.subs.push(e)},ye.prototype.removeSub=function(e){$(this.subs,e)},ye.prototype.depend=function(){ye.SharedObject.target&&ye.SharedObject.target.addDep(this)},ye.prototype.notify=function(){var e=this.subs.slice();B.async||e.sort(function(e,t){return e.id-t.id});for(var t=0,n=e.length;t-1)if(i&&!A(o,"default"))a=!1;else if(""===a||a===j(e)){var c=Ye(String,o.type);(c<0||s0&&(Pt((u=e(u,(n||"")+"_"+i))[0])&&Pt(p)&&(r[l]=Ae(p.text+u[0].text),u.shift()),r.push.apply(r,u)):c(u)?Pt(p)?r[l]=Ae(p.text+u):""!==u&&r.push(Ae(u)):Pt(u)&&Pt(p)?r[l]=Ae(p.text+u.text):(s(t._isVList)&&a(u.tag)&&o(u.key)&&a(n)&&(u.key="__vlist"+n+"_"+i+"__"),r.push(u)));return r}(e):void 0}function Pt(e){return a(e)&&a(e.text)&&!1===e.isComment}function Mt(e,t){if(e){for(var n=Object.create(null),r=ue?Reflect.ownKeys(e):Object.keys(e),o=0;o0,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==r&&s===n.$key&&!i&&!n.$hasNormal)return n;for(var c in o={},e)e[c]&&"$"!==c[0]&&(o[c]=Nt(t,c,e[c]))}else o={};for(var u in t)u in o||(o[u]=Lt(t,u));return e&&Object.isExtensible(e)&&(e._normalized=o),z(o,"$stable",a),z(o,"$key",s),z(o,"$hasNormal",i),o}function Nt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:It(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function Lt(e,t){return function(){return e[t]}}function qt(e,t){var n,r,o,i,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,o=e.length;r.",e),l=new be(B.parsePlatformTagName(t),n,r,void 0,void 0,e)):l=n&&n.pre||!a(f=Ue(e.$options,"components",t))?new be(t,n,r,void 0,void 0,e):an(f,n,e,r,t)}else l=an(t,n,e,r);return Array.isArray(l)?l:a(l)?(a(p)&&function e(t,n,r){t.ns=n;"foreignObject"===t.tag&&(n=void 0,r=!0);if(a(t.children))for(var i=0,c=t.children.length;it.createEvent("Event").timeStamp&&(In=function(){return Pn.now()})}function Mn(){var e,t;for(In(),jn=!0,kn.sort(function(e,t){return e.id-t.id}),En=0;EnAn)){le("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=xn.slice(),r=kn.slice();En=kn.length=xn.length=0,On={},Cn={},Sn=jn=!1,function(e){for(var t=0;tEn&&kn[n].id>e.id;)n--;kn.splice(n+1,0,e)}else kn.push(e);if(!Sn){if(Sn=!0,!B.async)return void Mn();ft(Mn)}}}(this)},Fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||u(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Ze(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||$(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Dn={enumerable:!0,configurable:!0,get:M,set:M};function Nn(e,t,n){Dn.get=function(){return this[t][n]},Dn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Dn)}function Ln(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[],i=!e.$parent;i||je(!1);var a=function(a){o.push(a);var s=ze(a,t,n,e),c=j(a);(b(c)||B.isReservedAttr(c))&&le('"'+c+'" is a reserved attribute and cannot be used as component prop.',e),Pe(r,a,s,function(){i||_n||le("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+a+'"',e)}),a in e||Nn(e,"_props",a)};for(var s in t)a(s);je(!0)}(e,t.props),t.methods&&function(e,t){var n=e.$options.props;for(var r in t)"function"!=typeof t[r]&&le('Method "'+r+'" has type "'+typeof t[r]+'" in the component definition. Did you reference the function correctly?',e),n&&A(n,r)&&le('Method "'+r+'" has already been defined as a prop.',e),r in e&&U(r)&&le('Method "'+r+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[r]="function"!=typeof t[r]?M:E(t[r],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;f(t=e._data="function"==typeof t?function(e,t){ge();try{return e.call(t,t)}catch(e){return Ze(e,t,"data()"),{}}finally{_e()}}(t,e):t||{})||(t={},le("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));var n=Object.keys(t),r=e.$options.props,o=e.$options.methods,i=n.length;for(;i--;){var a=n[i];o&&A(o,a)&&le('Method "'+a+'" has already been defined as a data property.',e),r&&A(r,a)?le('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):U(a)||Nn(e,"_data",a)}Ie(t,!0)}(e):Ie(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ie();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;null==a&&le('Getter is missing for computed property "'+o+'".',e),r||(n[o]=new Fn(e,a||M,M,qn)),o in e?o in e.$data?le('The computed property "'+o+'" is already defined in data.',e):e.$options.props&&o in e.$options.props&&le('The computed property "'+o+'" is already defined as a prop.',e):Rn(e,o,i)}}(e,t.computed),t.watch&&t.watch!==re&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!d(e)&&e.test(t)}function Yn(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=Kn(a.componentOptions);s&&!t(s)&&Gn(n,i,r,o)}}}function Gn(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,$(n,t)}!function(e){e.prototype._init=function(e){var t,n,o=this;o._uid=Un++,B.performance&&bt&&(t="vue-perf-start:"+o._uid,n="vue-perf-end:"+o._uid,bt(t)),o._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(o,e):o.$options=He(zn(o.constructor),e||{},o),ot(o),o._self=o,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(o),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&yn(e,t)}(o),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,o=n&&n.context;e.$slots=Tt(t._renderChildren,o),e.$scopedSlots=r,e._c=function(t,n,r,o){return ln(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return ln(e,t,n,r,o,!0)};var i=n&&n.data;Pe(e,"$attrs",i&&i.attrs||r,function(){!_n&&le("$attrs is readonly.",e)},!0),Pe(e,"$listeners",t._parentListeners||r,function(){!_n&&le("$listeners is readonly.",e)},!0)}(o),wn(o,"beforeCreate"),"mp-toutiao"!==o.mpHost&&function(e){var t=Mt(e.$options.inject,e);t&&(je(!1),Object.keys(t).forEach(function(n){Pe(e,n,t[n],function(){le('Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. injection being mutated: "'+n+'"',e)})}),je(!0))}(o),Ln(o),"mp-toutiao"!==o.mpHost&&function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(o),"mp-toutiao"!==o.mpHost&&wn(o,"created"),B.performance&&bt&&(o._name=de(o,!1),bt(n),$t("vue "+o._name+" init",t,n)),o.$options.el&&o.$mount(o.$options.el)}}(Jn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};t.set=function(){le("Avoid replacing instance root $data. Use nested data properties instead.",this)},n.set=function(){le("$props is readonly.",this)},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Me,e.prototype.$delete=Te,e.prototype.$watch=function(e,t,n){if(f(t))return Hn(this,e,t,n);(n=n||{}).user=!0;var r=new Fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Ze(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(Jn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var o=0,i=e.length;o1?I(r):r;for(var o=I(arguments,1),i='event handler for "'+e+'"',a=0,s=r.length;aparseInt(this.max)&&Gn(s,c[0],c,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return B},set:function(){le("Do not replace the Vue.config object, set individual fields instead.")}};Object.defineProperty(e,"config",t),e.util={warn:le,extend:P,mergeOptions:He,defineReactive:Pe},e.set=Me,e.delete=Te,e.nextTick=ft,e.observable=function(e){return Ie(e),e},e.options=Object.create(null),R.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,P(e.options.components,Zn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=I(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=He(this.options,e),this}}(e),Wn(e),function(e){R.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&Ve(e),"component"===t&&f(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(Jn),Object.defineProperty(Jn.prototype,"$isServer",{get:ie}),Object.defineProperty(Jn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Jn,"FunctionalRenderContext",{value:en}),Jn.version="2.6.11";function er(e,t,r){n.setElementAttr(e,t,r)}var tr=Object.freeze({namespaceMap:{},createElement:function(e){var r=t.createElement(e);return n.bindElementMethods(r),r},createElementNS:function(e,n){return t.createElement(e+":"+n)},createTextNode:function(e){return t.createTextNode(e)},createComment:function(e){return t.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){n.setElementAttr(e.parentNode,"value",t)},setAttribute:er}),nr={create:function(e,t){rr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(rr(e,!0),rr(t))},destroy:function(e){rr(e,!0)}};function rr(e,t){var n=e.data.ref;if(a(n)){var r=e.context,o=e.componentInstance||e.elm,i=r.$refs;t?Array.isArray(i[n])?$(i[n],o):i[n]===o&&(i[n]=void 0):e.data.refInFor?Array.isArray(i[n])?i[n].indexOf(o)<0&&i[n].push(o):i[n]=[o]:i[n]=o}}g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0);var or=g("text,number,password,search,email,tel,url"),ir=new be("",{},[]),ar=["create","activate","update","remove","destroy"];function sr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&a(e.data)===a(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=a(n=e.data)&&a(n=n.attrs)&&n.type,o=a(n=t.data)&&a(n=n.attrs)&&n.type;return r===o||or(r)&&or(o)}(e,t)||s(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&o(t.asyncFactory.error))}function cr(e,t,n){var r,o,i={};for(r=t;r<=n;++r)a(o=e[r].key)&&(i[o]=r);return i}var ur={create:lr,update:lr,destroy:function(e){lr(e,ir)}};function lr(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,o,i=e===ir,a=t===ir,s=fr(e.data.directives,e.context),c=fr(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,vr(o,"update",t,e),o.def&&o.def.componentUpdated&&l.push(o)):(vr(o,"bind",t,e),o.def&&o.def.inserted&&u.push(o));if(u.length){var p=function(){for(var n=0;n1,j=t.context.$options.style||{},E=j[$],I=j["@TRANSITION"]&&j["@TRANSITION"][A]||{},T=function(e,t,n,r,o,i){var a={},s=t[n],c=t[r],u=t[o];if(s)for(var l in s)a[l]=e.style[l],null!=a[l]||u&&null!=u[l]||c&&null!=c[l]||le('transition property "'+l+'" is declared in enter starting class (.'+n+"), but not declared anywhere in enter ending class (."+r+"), enter active cass (."+o+") or the element's default styling. Note in Quickapp, CSS properties need explicit values to be transitionable.");if(u)for(var p in u)0!==p.indexOf("transition")&&(a[p]=u[p]);c&&P(a,c);return a}(n,j,$,w,A,t.context),F=Object.keys(T).length>0,D=n._enterCb=L(function(){D.cancelled?C&&C(n):O&&O(n),n._enterCb=null});if(setTimeout(function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];(r&&r.context===t.context&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),x&&x(n,D),F)?t.context.$requireQuickappModule("animation").transition(n.ref,{styles:T,duration:I.duration||0,delay:I.delay||0,timingFunction:I.timingFunction||"linear"},S?M:D):S||D()},16),k&&k(n),E)for(var N in E)n.setStyle(N,E[N]);F||S||D()}}}function qr(e,t){if(!o(e.data.domProps)||!o(t.data.domProps)){var n,r,i=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in a(c.__ob__)&&(c=t.data.domProps=P({},c)),s)o(c[n])&&er(i,n,"");for(n in c){if(r=c[n],"value"===n)er(i,n,o(r)?"":String(r));else er(i,n,r)}}}var Rr=function(e){var t,n,r={},i=e.modules,u=e.nodeOps;for(t=0;t - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context),e.elm=e.ns?u.createElementNS(e.ns,g):u.createElement(g,e),$(e),y(e,v,t),a(d)&&b(e,t),m(n,e.elm,o),d&&d.pre&&f--):s(e.isComment)?(e.elm=u.createComment(e.text),m(n,e.elm,o)):(e.elm=u.createTextNode(e.text),m(n,e.elm,o))}}function h(e,t){a(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,_(e)?(b(e,t),$(e)):(rr(e),t.push(e))}function m(e,t,n){a(e)&&(a(n)?u.parentNode(n)===e&&u.insertBefore(e,t,n):u.appendChild(e,t))}function y(e,t,n){if(Array.isArray(t)){O(t);for(var r=0;rd?w(e,o(n[y+1])?null:n[y+1].elm,n,f,y,r):f>y&&k(t,p,d)}(p,h,m,n,l):a(m)?(O(m),a(e.text)&&u.setTextContent(p,""),w(p,null,m,0,m.length-1,n)):a(h)?k(h,0,h.length-1):a(e.text)&&u.setTextContent(p,""):e.text!==t.text&&u.setTextContent(p,t.text),a(d)&&a(f=d.hook)&&a(f=f.postpatch)&&f(e,t)}}}function j(e,t,n){if(s(n)&&a(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r, or missing . Bailing hydration and performing full client-side render.")}c=e,e=new be(u.tagName(c).toLowerCase(),{},[],void 0,c)}var d=e.elm,h=u.parentNode(d);if(v(t,p,d._leaveCb?null:h,u.nextSibling(d)),a(t.parent))for(var m=t.parent,y=_(t);m;){for(var g=0;g1,d=e.context.$options.style||{},v=d[o],h=d[i]||d[a],m=d["@TRANSITION"]&&d["@TRANSITION"][a]||{},y=n._leaveCb=L(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),y.cancelled?l&&l(n):(t(),u&&u(n)),n._leaveCb=null});p?p(g):g();function g(){var t=e.context.$requireQuickappModule("animation");function r(){t.transition(n.ref,{styles:h,duration:m.duration||0,delay:m.delay||0,timingFunction:m.timingFunction||"linear"},f?M:y)}y.cancelled||(e.data.show||((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),s&&s(n),v?t.transition(n.ref,{styles:v},r):r(),c&&c(n,y),h||f||y())}}}].concat(hr),LONG_LIST_THRESHOLD:10}),Vr={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?St(n,"postpatch",function(){Vr.componentUpdated(e,t,n)}):Br(e,t,n.context),e._vOptions=[].map.call(e.options,Ur)):("textarea"===n.tag||kr(e.attr.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||e.addEventListener("change",zr))},componentUpdated:function(e,t,n){if("select"===n.tag){Br(e,t,n.context);var r=e._vOptions,o=e._vOptions=[].map.call(e.options,Ur);if(o.some(function(e,t){return!D(e,r[t])}))(e.multiple?t.value.some(function(e){return Hr(e,o)}):t.value!==t.oldValue&&Hr(t.value,o))&&Jr(e,"change")}}};function Br(e,t,n){!function(e,t,n){var r,o,i=t.value,a=e.multiple;if(a&&!Array.isArray(i))return void le('