diff --git a/@babel/runtime/helpers/Arrayincludes.js b/@babel/runtime/helpers/Arrayincludes.js new file mode 100644 index 0000000..867ba9b --- /dev/null +++ b/@babel/runtime/helpers/Arrayincludes.js @@ -0,0 +1 @@ +Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(r,e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if(0==n)return!1;for(var i,o,a=0|e,u=Math.max(0<=a?a:n-Math.abs(a),0);ur.length)&&(a=r.length);for(var e=0,n=new Array(a);e=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,i=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return u=r.done,r},e:function(r){i=!0,a=r},f:function(){try{u||null==t.return||t.return()}finally{if(i)throw a}}}}module.exports=_createForOfIteratorHelper; \ No newline at end of file diff --git a/@babel/runtime/helpers/createSuper.js b/@babel/runtime/helpers/createSuper.js new file mode 100644 index 0000000..3f090b5 --- /dev/null +++ b/@babel/runtime/helpers/createSuper.js @@ -0,0 +1 @@ +var getPrototypeOf=require("./getPrototypeOf"),isNativeReflectConstruct=require("./isNativeReflectConstruct"),possibleConstructorReturn=require("./possibleConstructorReturn");function _createSuper(t){var e=isNativeReflectConstruct();return function(){var r,o=getPrototypeOf(t);if(e){var s=getPrototypeOf(this).constructor;r=Reflect.construct(o,arguments,s)}else r=o.apply(this,arguments);return possibleConstructorReturn(this,r)}}module.exports=_createSuper; \ No newline at end of file diff --git a/@babel/runtime/helpers/defineProperty.js b/@babel/runtime/helpers/defineProperty.js new file mode 100644 index 0000000..b56a50d --- /dev/null +++ b/@babel/runtime/helpers/defineProperty.js @@ -0,0 +1 @@ +var toPropertyKey=require("./toPropertyKey");function _defineProperty(e,r,t){return(r=toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}module.exports=_defineProperty; \ No newline at end of file diff --git a/@babel/runtime/helpers/getPrototypeOf.js b/@babel/runtime/helpers/getPrototypeOf.js new file mode 100644 index 0000000..1f12e1c --- /dev/null +++ b/@babel/runtime/helpers/getPrototypeOf.js @@ -0,0 +1 @@ +function _getPrototypeOf(t){return module.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}module.exports=_getPrototypeOf; \ No newline at end of file diff --git a/@babel/runtime/helpers/inherits.js b/@babel/runtime/helpers/inherits.js new file mode 100644 index 0000000..a980179 --- /dev/null +++ b/@babel/runtime/helpers/inherits.js @@ -0,0 +1 @@ +var setPrototypeOf=require("./setPrototypeOf");function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&setPrototypeOf(e,t)}module.exports=_inherits; \ No newline at end of file diff --git a/@babel/runtime/helpers/isNativeReflectConstruct.js b/@babel/runtime/helpers/isNativeReflectConstruct.js new file mode 100644 index 0000000..598f87e --- /dev/null +++ b/@babel/runtime/helpers/isNativeReflectConstruct.js @@ -0,0 +1 @@ +function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}module.exports=_isNativeReflectConstruct; \ No newline at end of file diff --git a/@babel/runtime/helpers/iterableToArray.js b/@babel/runtime/helpers/iterableToArray.js new file mode 100644 index 0000000..b079aed --- /dev/null +++ b/@babel/runtime/helpers/iterableToArray.js @@ -0,0 +1 @@ +function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}module.exports=_iterableToArray; \ No newline at end of file diff --git a/@babel/runtime/helpers/iterableToArrayLimit.js b/@babel/runtime/helpers/iterableToArrayLimit.js new file mode 100644 index 0000000..6a2c5b8 --- /dev/null +++ b/@babel/runtime/helpers/iterableToArrayLimit.js @@ -0,0 +1 @@ +function _iterableToArrayLimit(r,e){var l=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=l){var t,n,i,a,u=[],o=!0,f=!1;try{if(i=(l=l.call(r)).next,0===e){if(Object(l)!==l)return;o=!1}else for(;!(o=(t=i.call(l)).done)&&(u.push(t.value),u.length!==e);o=!0);}catch(r){f=!0,n=r}finally{try{if(!o&&null!=l.return&&(a=l.return(),Object(a)!==a))return}finally{if(f)throw n}}return u}}module.exports=_iterableToArrayLimit; \ No newline at end of file diff --git a/@babel/runtime/helpers/nonIterableRest.js b/@babel/runtime/helpers/nonIterableRest.js new file mode 100644 index 0000000..6f891d6 --- /dev/null +++ b/@babel/runtime/helpers/nonIterableRest.js @@ -0,0 +1 @@ +function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}module.exports=_nonIterableRest; \ No newline at end of file diff --git a/@babel/runtime/helpers/nonIterableSpread.js b/@babel/runtime/helpers/nonIterableSpread.js new file mode 100644 index 0000000..8331dd6 --- /dev/null +++ b/@babel/runtime/helpers/nonIterableSpread.js @@ -0,0 +1 @@ +function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}module.exports=_nonIterableSpread; \ No newline at end of file diff --git a/@babel/runtime/helpers/possibleConstructorReturn.js b/@babel/runtime/helpers/possibleConstructorReturn.js new file mode 100644 index 0000000..9fe5569 --- /dev/null +++ b/@babel/runtime/helpers/possibleConstructorReturn.js @@ -0,0 +1 @@ +var _typeof=require("./typeof"),assertThisInitialized=require("./assertThisInitialized");function _possibleConstructorReturn(e,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return assertThisInitialized(e)}module.exports=_possibleConstructorReturn; \ No newline at end of file diff --git a/@babel/runtime/helpers/setPrototypeOf.js b/@babel/runtime/helpers/setPrototypeOf.js new file mode 100644 index 0000000..b791ff5 --- /dev/null +++ b/@babel/runtime/helpers/setPrototypeOf.js @@ -0,0 +1 @@ +function _setPrototypeOf(t,e){return module.exports=_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}module.exports=_setPrototypeOf; \ No newline at end of file diff --git a/@babel/runtime/helpers/slicedToArray.js b/@babel/runtime/helpers/slicedToArray.js new file mode 100644 index 0000000..cdf23d6 --- /dev/null +++ b/@babel/runtime/helpers/slicedToArray.js @@ -0,0 +1 @@ +var arrayWithHoles=require("./arrayWithHoles"),iterableToArrayLimit=require("./iterableToArrayLimit"),unsupportedIterableToArray=require("./unsupportedIterableToArray"),nonIterableRest=require("./nonIterableRest");function _slicedToArray(r,e){return arrayWithHoles(r)||iterableToArrayLimit(r,e)||unsupportedIterableToArray(r,e)||nonIterableRest()}module.exports=_slicedToArray; \ No newline at end of file diff --git a/@babel/runtime/helpers/toConsumableArray.js b/@babel/runtime/helpers/toConsumableArray.js new file mode 100644 index 0000000..2d3a2a6 --- /dev/null +++ b/@babel/runtime/helpers/toConsumableArray.js @@ -0,0 +1 @@ +var arrayWithoutHoles=require("./arrayWithoutHoles"),iterableToArray=require("./iterableToArray"),unsupportedIterableToArray=require("./unsupportedIterableToArray"),nonIterableSpread=require("./nonIterableSpread");function _toConsumableArray(r){return arrayWithoutHoles(r)||iterableToArray(r)||unsupportedIterableToArray(r)||nonIterableSpread()}module.exports=_toConsumableArray; \ No newline at end of file diff --git a/@babel/runtime/helpers/toPrimitive.js b/@babel/runtime/helpers/toPrimitive.js new file mode 100644 index 0000000..1251aea --- /dev/null +++ b/@babel/runtime/helpers/toPrimitive.js @@ -0,0 +1 @@ +var _typeof=require("./typeof");function _toPrimitive(r,t){if("object"!==_typeof(r)||null===r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var i=e.call(r,t||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}module.exports=_toPrimitive; \ No newline at end of file diff --git a/@babel/runtime/helpers/toPropertyKey.js b/@babel/runtime/helpers/toPropertyKey.js new file mode 100644 index 0000000..e3a4e96 --- /dev/null +++ b/@babel/runtime/helpers/toPropertyKey.js @@ -0,0 +1 @@ +var _typeof=require("./typeof"),toPrimitive=require("./toPrimitive");function _toPropertyKey(r){var t=toPrimitive(r,"string");return"symbol"===_typeof(t)?t:String(t)}module.exports=_toPropertyKey; \ No newline at end of file diff --git a/@babel/runtime/helpers/typeof.js b/@babel/runtime/helpers/typeof.js new file mode 100644 index 0000000..b677947 --- /dev/null +++ b/@babel/runtime/helpers/typeof.js @@ -0,0 +1 @@ +function _typeof(o){return module.exports=_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}module.exports=_typeof; \ No newline at end of file diff --git a/@babel/runtime/helpers/unsupportedIterableToArray.js b/@babel/runtime/helpers/unsupportedIterableToArray.js new file mode 100644 index 0000000..af79147 --- /dev/null +++ b/@babel/runtime/helpers/unsupportedIterableToArray.js @@ -0,0 +1 @@ +var arrayLikeToArray=require("./arrayLikeToArray");function _unsupportedIterableToArray(r,e){if(r){if("string"==typeof r)return arrayLikeToArray(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?arrayLikeToArray(r,e):void 0}}module.exports=_unsupportedIterableToArray; \ No newline at end of file diff --git a/api/request.js b/api/request.js new file mode 100644 index 0000000..ac27483 --- /dev/null +++ b/api/request.js @@ -0,0 +1,44 @@ +const baseUrl = 'https://mini-chat.1024tool.vip/'; + +function request(url, method = 'GET', data = {}) { + + const header = { + 'content-type': 'application/json', + // 有其他content-type需求加点逻辑判断处理即可 + }; + + return new Promise((resolve, reject) => { + wx.request({ + url: baseUrl + url, + method, + data, + dataType: 'json', // 微信官方文档中介绍会对数据进行一次JSON.parse + header, + success(res) { + if (res.data.code) { + if (res.data.code == 10103) { + + reject(res.data); + return; + } + wx.showToast({ + title: res.data.message, + icon: 'none' + }); + reject(res.data); + } else { + resolve(res.data); + } + + }, + fail(err) { + console.log(err) + // 断网、服务器挂了都会fail回调,直接reject即可 + reject(err); + }, + }); + }); +} + +// 导出请求和服务地址(CommonJS 兼容) +module.exports = request; \ No newline at end of file diff --git a/api/upload.js b/api/upload.js new file mode 100644 index 0000000..fdca560 --- /dev/null +++ b/api/upload.js @@ -0,0 +1,105 @@ +import request from './request' + +const uploadFile = async (file, callback) => { + + + const policyData = await request('admin/policy_token', 'post') + const res = JSON.parse(policyData.token) + + const fileName = file.tempFilePath.split('/').pop(); // hello.png + // const fileName = fileNameWithExt.split('.').slice(0, -1).join('.'); // hello + + const formData = { + key: 'upload_file/' + fileName, //上传文件名称 + policy: res.policy, //表单域 + 'x-oss-signature-version': res.x_oss_signature_version, //指定签名的版本和算法 + 'x-oss-credential': res.x_oss_credential, //指明派生密钥的参数集 + 'x-oss-date': res.x_oss_date, //请求的时间 + 'x-oss-signature': res.signature, //签名认证描述信息 + 'x-oss-security-token': res.security_token, //安全令牌 + success_action_status: "200" //上传成功后响应状态码 + }; + // console.log(filePath) + // return + // 发送请求上传文件 + wx.uploadFile({ + url: 'https://image-fudan.oss-cn-beijing.aliyuncs.com/', + method: 'put', + filePath: file.tempFilePath, + name: 'file', //固定值为file + formData: formData, + success(res) { + console.log('上传响应:', res); + if (res.statusCode === 200) { + callback(null, 'https://image-fudan.oss-cn-beijing.aliyuncs.com/upload_file/' + fileName); // 上传成功 + } else { + console.error('上传失败,状态码:', res.statusCode); + console.error('失败响应:', res); + callback(res); // 上传失败,返回响应 + } + }, + fail(err) { + console.error('上传失败:', err); // 输出错误信息 + wx.showToast({ + title: '上传失败,请重试!', + icon: 'none' + }); + callback(err); // 调用回调处理错误 + } + }); + +} + + +const uploadFileToOSS = () => { + + return new Promise((resolve, reject) => { + + wx.chooseMedia({ + count: 1, // 选择一个文件 + mediaType: ['image'], + sourceType: ['album', 'camera'], + // type: 'all', // 支持所有类型的文件 + success: (res) => { + wx.showToast({ + title: '文件上传中,请稍等!', + icon: 'none' + }); + console.log('选择的文件:', res.tempFiles); // 输出选择的文件信息 + if (res.tempFiles.length > 0) { + const tempFilePath = res.tempFiles[0]; + console.log('选择的文件路径:', tempFilePath); // 输出文件路径 + uploadFile(tempFilePath, (error, data) => { + if (error) { + wx.showToast({ + title: '上传失败!', + icon: 'none' + }); + console.error('上传失败:', error); // 输出具体的错误信息 + reject(error) + } else { + resolve(data) + console.log('上传成功:', data); // 输出上传成功后的数据 + } + }); + } else { + wx.showToast({ + title: '未选择文件!', + icon: 'none' + }); + reject('未选择文件!') + } + }, + fail: (err) => { + wx.showToast({ + title: '选择文件失败!', + icon: 'none' + }); + console.error('选择文件失败:', err); // 输出选择文件的错误信息 + reject('选择文件失败!') + } + }); + }); +}; + +export default uploadFileToOSS; \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..0779014 --- /dev/null +++ b/app.js @@ -0,0 +1,22 @@ +Object.defineProperty(exports, Symbol.toStringTag, { + value: "Module" +});var common_vendor = require("./common/vendor.js");if (!Math) { + "./pages/index/index.js"; + "./pages/index/detail.js"; + "./pages/ming/index.js"; +}var _sfc_main = { + onLaunch: function onLaunch() { + common_vendor.index.__f__("log", "at App.vue:4", "App Launch"); + }, + onShow: function onShow() { + common_vendor.index.__f__("log", "at App.vue:7", "App Show"); + }, + onHide: function onHide() { + common_vendor.index.__f__("log", "at App.vue:10", "App Hide"); + } +};function createApp() { + var app = common_vendor.createSSRApp(_sfc_main); + return { + app: app + }; +}createApp().app.mount("#app");exports.createApp = createApp; \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..54685e6 --- /dev/null +++ b/app.json @@ -0,0 +1,15 @@ +{ + "componentFramework": "exparser", + "window": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "舞蹈", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "pages": [ + "pages/index/index", + "pages/index/detail", + "pages/ming/index", + "pages/contact/index" + ] +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..518a22a --- /dev/null +++ b/app.wxss @@ -0,0 +1 @@ +page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display:none!important} \ No newline at end of file diff --git a/common/assets.js b/common/assets.js new file mode 100644 index 0000000..615b748 --- /dev/null +++ b/common/assets.js @@ -0,0 +1 @@ +var _imports_0 = "/static/kefu.png";exports._imports_0 = _imports_0; \ No newline at end of file diff --git a/common/vendor.js b/common/vendor.js new file mode 100644 index 0000000..40d7a3f --- /dev/null +++ b/common/vendor.js @@ -0,0 +1,7210 @@ +require("../@babel/runtime/helpers/Arrayincludes");require("../@babel/runtime/helpers/Objectentries");var _inherits2 = require("../@babel/runtime/helpers/inherits");var _createSuper2 = require("../@babel/runtime/helpers/createSuper");var _createForOfIteratorHelper2 = require("../@babel/runtime/helpers/createForOfIteratorHelper");var _classCallCheck2 = require("../@babel/runtime/helpers/classCallCheck");var _createClass2 = require("../@babel/runtime/helpers/createClass");var _defineProperty2 = require("../@babel/runtime/helpers/defineProperty");var _slicedToArray2 = require("../@babel/runtime/helpers/slicedToArray");var _toConsumableArray2 = require("../@babel/runtime/helpers/toConsumableArray");var _typeof2 = require("../@babel/runtime/helpers/typeof");var _ErrorTypeStrings;function makeMap(str, expectsLowerCase) { + var set2 = new Set(str.split(",")); + return expectsLowerCase ? function (val) { + return set2.has(val.toLowerCase()); + } : function (val) { + return set2.has(val); + }; +}var EMPTY_OBJ = Object.freeze({});var EMPTY_ARR = Object.freeze([]);var NOOP = function NOOP() {};var NO = function NO() { + return false; +};var isOn = function isOn(key) { + return key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && ( + // uppercase letter + key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +};var isModelListener = function isModelListener(key) { + return key.startsWith("onUpdate:"); +};var extend = Object.assign;var remove = function remove(arr, el) { + var i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +};var hasOwnProperty$1 = Object.prototype.hasOwnProperty;var hasOwn = function hasOwn(val, key) { + return hasOwnProperty$1.call(val, key); +};var isArray = Array.isArray;var isMap = function isMap(val) { + return toTypeString(val) === "[object Map]"; +};var isSet = function isSet(val) { + return toTypeString(val) === "[object Set]"; +};var isFunction = function isFunction(val) { + return typeof val === "function"; +};var isString = function isString(val) { + return typeof val === "string"; +};var isSymbol = function isSymbol(val) { + return _typeof2(val) === "symbol"; +};var isObject = function isObject(val) { + return val !== null && _typeof2(val) === "object"; +};var isPromise = function isPromise(val) { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +};var objectToString = Object.prototype.toString;var toTypeString = function toTypeString(value) { + return objectToString.call(value); +};var toRawType = function toRawType(value) { + return toTypeString(value).slice(8, -1); +};var isPlainObject = function isPlainObject(val) { + return toTypeString(val) === "[object Object]"; +};var isIntegerKey = function isIntegerKey(key) { + return isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +};var isReservedProp = /* @__PURE__ */makeMap( +// the leading comma is intentional so empty string "" is also included +",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var isBuiltInDirective = /* @__PURE__ */makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");var cacheStringFunction = function cacheStringFunction(fn) { + var cache = /* @__PURE__ */Object.create(null); + return function (str) { + var hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +};var camelizeRE = /-(\w)/g;var camelize = cacheStringFunction(function (str) { + return str.replace(camelizeRE, function (_, c) { + return c ? c.toUpperCase() : ""; + }); +});var hyphenateRE = /\B([A-Z])/g;var hyphenate = cacheStringFunction(function (str) { + return str.replace(hyphenateRE, "-$1").toLowerCase(); +});var capitalize = cacheStringFunction(function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +});var toHandlerKey = cacheStringFunction(function (str) { + var s = str ? "on".concat(capitalize(str)) : ""; + return s; +});var hasChanged = function hasChanged(value, oldValue) { + return !Object.is(value, oldValue); +};var invokeArrayFns$1 = function invokeArrayFns$1(fns, arg) { + for (var i = 0; i < fns.length; i++) { + fns[i](arg); + } +};var def = function def(obj, key, value) { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value: value + }); +};var looseToNumber = function looseToNumber(val) { + var n = parseFloat(val); + return isNaN(n) ? val : n; +};var toDisplayString = function toDisplayString(val) { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +};var replacer = function replacer(_key, val) { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return _defineProperty2({}, "Map(".concat(val.size, ")"), _toConsumableArray2(val.entries()).reduce(function (entries, _ref, i) { + var _ref2 = _slicedToArray2(_ref, 2), + key = _ref2[0], + val2 = _ref2[1]; + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, {})); + } else if (isSet(val)) { + return _defineProperty2({}, "Set(".concat(val.size, ")"), _toConsumableArray2(val.values()).map(function (v) { + return stringifySymbol(v); + })); + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +};var stringifySymbol = function stringifySymbol(v) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; + var _a; + return isSymbol(v) ? "Symbol(".concat((_a = v.description) != null ? _a : i, ")") : v; +};var LOCALE_ZH_HANS = "zh-Hans";var LOCALE_ZH_HANT = "zh-Hant";var LOCALE_EN = "en";var LOCALE_FR = "fr";var LOCALE_ES = "es";function include(str, parts) { + return !!parts.find(function (part) { + return str.indexOf(part) !== -1; + }); +}function startsWith(str, parts) { + return parts.find(function (part) { + return str.indexOf(part) === 0; + }); +}function normalizeLocale(locale, messages) { + if (!locale) { + return; + } + locale = locale.trim().replace(/_/g, "-"); + if (messages && messages[locale]) { + return locale; + } + locale = locale.toLowerCase(); + if (locale === "chinese") { + return LOCALE_ZH_HANS; + } + if (locale.indexOf("zh") === 0) { + if (locale.indexOf("-hans") > -1) { + return LOCALE_ZH_HANS; + } + if (locale.indexOf("-hant") > -1) { + return LOCALE_ZH_HANT; + } + if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) { + return LOCALE_ZH_HANT; + } + return LOCALE_ZH_HANS; + } + var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES]; + if (messages && Object.keys(messages).length > 0) { + locales = Object.keys(messages); + } + var lang = startsWith(locale, locales); + if (lang) { + return lang; + } +}var SLOT_DEFAULT_NAME = "d";var ON_SHOW = "onShow";var ON_HIDE = "onHide";var ON_LAUNCH = "onLaunch";var ON_ERROR = "onError";var ON_THEME_CHANGE = "onThemeChange";var ON_PAGE_NOT_FOUND = "onPageNotFound";var ON_UNHANDLE_REJECTION = "onUnhandledRejection";var ON_EXIT = "onExit";var ON_LOAD = "onLoad";var ON_READY = "onReady";var ON_UNLOAD = "onUnload";var ON_INIT = "onInit";var ON_SAVE_EXIT_STATE = "onSaveExitState";var ON_RESIZE = "onResize";var ON_BACK_PRESS = "onBackPress";var ON_PAGE_SCROLL = "onPageScroll";var ON_TAB_ITEM_TAP = "onTabItemTap";var ON_REACH_BOTTOM = "onReachBottom";var ON_PULL_DOWN_REFRESH = "onPullDownRefresh";var ON_SHARE_TIMELINE = "onShareTimeline";var ON_SHARE_CHAT = "onShareChat";var ON_ADD_TO_FAVORITES = "onAddToFavorites";var ON_SHARE_APP_MESSAGE = "onShareAppMessage";var ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap";var ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = "onNavigationBarSearchInputClicked";var ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = "onNavigationBarSearchInputChanged";var ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = "onNavigationBarSearchInputConfirmed";var ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = "onNavigationBarSearchInputFocusChanged";var VIRTUAL_HOST_STYLE = "virtualHostStyle";var VIRTUAL_HOST_CLASS = "virtualHostClass";var VIRTUAL_HOST_HIDDEN = "virtualHostHidden";var VIRTUAL_HOST_ID = "virtualHostId";function hasLeadingSlash(str) { + return str.indexOf("/") === 0; +}function addLeadingSlash(str) { + return hasLeadingSlash(str) ? str : "/" + str; +}var invokeArrayFns = function invokeArrayFns(fns, arg) { + var ret; + for (var i = 0; i < fns.length; i++) { + ret = fns[i](arg); + } + return ret; +};function once(fn) { + var ctx = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var res; + return function () { + if (fn) { + for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { + args[_key2] = arguments[_key2]; + } + res = fn.apply(ctx, args); + fn = null; + } + return res; + }; +}function getValueByDataPath(obj, path) { + if (!isString(path)) { + return; + } + path = path.replace(/\[(\d+)\]/g, ".$1"); + var parts = path.split("."); + var key = parts[0]; + if (!obj) { + obj = {}; + } + if (parts.length === 1) { + return obj[key]; + } + return getValueByDataPath(obj[key], parts.slice(1).join(".")); +}function sortObject(obj) { + var sortObj = {}; + if (isPlainObject(obj)) { + Object.keys(obj).sort().forEach(function (key) { + var _key = key; + sortObj[_key] = obj[_key]; + }); + } + return !Object.keys(sortObj) ? obj : sortObj; +}var customizeRE = /:/g;function customizeEvent(str) { + return camelize(str.replace(customizeRE, "-")); +}var encode = encodeURIComponent;function stringifyQuery(obj) { + var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode; + var res = obj ? Object.keys(obj).map(function (key) { + var val = obj[key]; + if (_typeof2(val) === void 0 || val === null) { + val = ""; + } else if (isPlainObject(val)) { + val = JSON.stringify(val); + } + return encodeStr(key) + "=" + encodeStr(val); + }).filter(function (x) { + return x.length > 0; + }).join("&") : null; + return res ? "?".concat(res) : ""; +}var PAGE_HOOKS = [ON_INIT, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_BACK_PRESS, ON_PAGE_SCROLL, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_SHARE_TIMELINE, ON_SHARE_APP_MESSAGE, ON_SHARE_CHAT, ON_ADD_TO_FAVORITES, ON_SAVE_EXIT_STATE, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED];function isRootHook(name) { + return PAGE_HOOKS.indexOf(name) > -1; +}var UniLifecycleHooks = [ON_SHOW, ON_HIDE, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, ON_EXIT, ON_INIT, ON_LOAD, ON_READY, ON_UNLOAD, ON_RESIZE, ON_BACK_PRESS, ON_PAGE_SCROLL, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_SHARE_TIMELINE, ON_ADD_TO_FAVORITES, ON_SHARE_APP_MESSAGE, ON_SHARE_CHAT, ON_SAVE_EXIT_STATE, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED];var MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /* @__PURE__ */function () { + return { + onPageScroll: 1, + onShareAppMessage: 1 << 1, + onShareTimeline: 1 << 2 + }; +}();function isUniLifecycleHook(name, value) { + var checkType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + if (checkType && !isFunction(value)) { + return false; + } + if (UniLifecycleHooks.indexOf(name) > -1) { + return true; + } else if (name.indexOf("on") === 0) { + return true; + } + return false; +}var vueApp;var createVueAppHooks = [];function onCreateVueApp(hook) { + if (vueApp) { + return hook(vueApp); + } + createVueAppHooks.push(hook); +}function invokeCreateVueAppHook(app) { + vueApp = app; + createVueAppHooks.forEach(function (hook) { + return hook(app); + }); +}var invokeCreateErrorHandler = once(function (app, createErrorHandler2) { + return createErrorHandler2(app); +});var E = function E() {};E.prototype = { + _id: 1, + on: function on(name, callback, ctx) { + var e2 = this.e || (this.e = {}); + (e2[name] || (e2[name] = [])).push({ + fn: callback, + ctx: ctx, + _id: this._id + }); + return this._id++; + }, + once: function once(name, callback, ctx) { + var self2 = this; + function listener() { + self2.off(name, listener); + callback.apply(ctx, arguments); + } + listener._ = callback; + return this.on(name, listener, ctx); + }, + emit: function emit(name) { + var data = [].slice.call(arguments, 1); + var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); + var i = 0; + var len = evtArr.length; + for (i; i < len; i++) { + evtArr[i].fn.apply(evtArr[i].ctx, data); + } + return this; + }, + off: function off(name, event) { + var e2 = this.e || (this.e = {}); + var evts = e2[name]; + var liveEvents = []; + if (evts && event) { + for (var i = evts.length - 1; i >= 0; i--) { + if (evts[i].fn === event || evts[i].fn._ === event || evts[i]._id === event) { + evts.splice(i, 1); + break; + } + } + liveEvents = evts; + } + liveEvents.length ? e2[name] = liveEvents : delete e2[name]; + return this; + } +};var E$1 = E;function warn$2(msg) { + var _console; + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) { + args[_key3 - 1] = arguments[_key3]; + } + (_console = console).warn.apply(_console, ["[Vue warn] ".concat(msg)].concat(args)); +}var activeEffectScope;var EffectScope = /*#__PURE__*/function () { + function EffectScope() { + var detached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + _classCallCheck2(this, EffectScope); + this.detached = detached; + this._active = true; + this.effects = []; + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; + } + } + _createClass2(EffectScope, [{ + key: "active", + get: function get() { + return this._active; + } + }, { + key: "run", + value: function run(fn) { + if (this._active) { + var currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2("cannot run an inactive effect scope."); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + }, { + key: "on", + value: function on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + }, { + key: "off", + value: function off() { + activeEffectScope = this.parent; + } + }, { + key: "stop", + value: function stop(fromParent) { + if (this._active) { + var i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + } + if (!this.detached && this.parent && !fromParent) { + var last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; + } + } + }]); + return EffectScope; +}();function recordEffectScope(effect2) { + var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : activeEffectScope; + if (scope && scope.active) { + scope.effects.push(effect2); + } +}function getCurrentScope() { + return activeEffectScope; +}var activeEffect;var ReactiveEffect = /*#__PURE__*/function () { + function ReactiveEffect(fn, trigger2, scheduler, scope) { + _classCallCheck2(this, ReactiveEffect); + this.fn = fn; + this.trigger = trigger2; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + this._dirtyLevel = 4; + this._trackId = 0; + this._runnings = 0; + this._shouldSchedule = false; + this._depsLength = 0; + recordEffectScope(this, scope); + } + _createClass2(ReactiveEffect, [{ + key: "dirty", + get: function get() { + if (this._dirtyLevel === 2 || this._dirtyLevel === 3) { + this._dirtyLevel = 1; + pauseTracking(); + for (var i = 0; i < this._depsLength; i++) { + var dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 4) { + break; + } + } + } + if (this._dirtyLevel === 1) { + this._dirtyLevel = 0; + } + resetTracking(); + } + return this._dirtyLevel >= 4; + }, + set: function set(v) { + this._dirtyLevel = v ? 4 : 0; + } + }, { + key: "run", + value: function run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); + } + var lastShouldTrack = shouldTrack; + var lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; + } + } + }, { + key: "stop", + value: function stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } + }]); + return ReactiveEffect; +}();function triggerComputed(computed2) { + return computed2.value; +}function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +}function postCleanupEffect(effect2) { + if (effect2.deps.length > effect2._depsLength) { + for (var i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); + } + effect2.deps.length = effect2._depsLength; + } +}function cleanupDepEffect(dep, effect2) { + var trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } +}var shouldTrack = true;var pauseScheduleStack = 0;var trackStack = [];function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +}function resetTracking() { + var last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +}function pauseScheduling() { + pauseScheduleStack++; +}function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } +}function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + var oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; + } + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ + effect: effect2 + }, debuggerEventExtraInfo)); + } + } +}var queueEffectSchedulers = [];function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + var _iterator = _createForOfIteratorHelper2(dep.keys()), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var effect2 = _step.value; + var tracking = void 0; + if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { + effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); + effect2._dirtyLevel = dirtyLevel; + } + if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { + { + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ + effect: effect2 + }, debuggerEventExtraInfo)); + } + effect2.trigger(); + if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) { + effect2._shouldSchedule = false; + if (effect2.scheduler) { + queueEffectSchedulers.push(effect2.scheduler); + } + } + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + resetScheduling(); +}var createDep = function createDep(cleanup, computed2) { + var dep = /* @__PURE__ */new Map(); + dep.cleanup = cleanup; + dep.computed = computed2; + return dep; +};var targetMap = /* @__PURE__ */new WeakMap();var ITERATE_KEY = Symbol("iterate");var MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");function track(target, type, key) { + if (shouldTrack && activeEffect) { + var depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */new Map()); + } + var dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(function () { + return depsMap.delete(key); + })); + } + trackEffect(activeEffect, dep, { + target: target, + type: type, + key: key + }); + } +}function trigger(target, type, key, newValue, oldValue, oldTarget) { + var depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + var deps = []; + if (type === "clear") { + deps = _toConsumableArray2(depsMap.values()); + } else if (key === "length" && isArray(target)) { + var newLength = Number(newValue); + depsMap.forEach(function (dep, key2) { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + var _iterator2 = _createForOfIteratorHelper2(deps), + _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var dep = _step2.value; + if (dep) { + triggerEffects(dep, 4, { + target: target, + type: type, + key: key, + newValue: newValue, + oldValue: oldValue, + oldTarget: oldTarget + }); + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + resetScheduling(); +}var isNonTrackableKeys = /* @__PURE__ */makeMap("__proto__,__v_isRef,__isVue");var builtInSymbols = new Set( /* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(function (key) { + return key !== "arguments" && key !== "caller"; +}).map(function (key) { + return Symbol[key]; +}).filter(isSymbol));var arrayInstrumentations = /* @__PURE__ */createArrayInstrumentations();function createArrayInstrumentations() { + var instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach(function (key) { + instrumentations[key] = function () { + var arr = toRaw(this); + for (var i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + for (var _len3 = arguments.length, args = new Array(_len3), _key4 = 0; _key4 < _len3; _key4++) { + args[_key4] = arguments[_key4]; + } + var res = arr[key].apply(arr, args); + if (res === -1 || res === false) { + return arr[key].apply(arr, _toConsumableArray2(args.map(toRaw))); + } else { + return res; + } + }; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach(function (key) { + instrumentations[key] = function () { + pauseTracking(); + pauseScheduling(); + for (var _len4 = arguments.length, args = new Array(_len4), _key5 = 0; _key5 < _len4; _key5++) { + args[_key5] = arguments[_key5]; + } + var res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; + }; + }); + return instrumentations; +}function hasOwnProperty(key) { + var obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +}var BaseReactiveHandler = /*#__PURE__*/function () { + function BaseReactiveHandler() { + var _isReadonly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var _isShallow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + _classCallCheck2(this, BaseReactiveHandler); + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + _createClass2(BaseReactiveHandler, [{ + key: "get", + value: function get(target, key, receiver) { + var isReadonly2 = this._isReadonly, + isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || + // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + var targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + var res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + }]); + return BaseReactiveHandler; +}();var MutableReactiveHandler = /*#__PURE__*/function (_BaseReactiveHandler) { + _inherits2(MutableReactiveHandler, _BaseReactiveHandler); + var _super = _createSuper2(MutableReactiveHandler); + function MutableReactiveHandler() { + var isShallow2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + _classCallCheck2(this, MutableReactiveHandler); + return _super.call(this, false, isShallow2); + } + _createClass2(MutableReactiveHandler, [{ + key: "set", + value: function set(target, key, value, receiver) { + var oldValue = target[key]; + if (!this._isShallow) { + var isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + var hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + var result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + }, { + key: "deleteProperty", + value: function deleteProperty(target, key) { + var hadKey = hasOwn(target, key); + var oldValue = target[key]; + var result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + }, { + key: "has", + value: function has(target, key) { + var result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + }, { + key: "ownKeys", + value: function ownKeys(target) { + track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY); + return Reflect.ownKeys(target); + } + }]); + return MutableReactiveHandler; +}(BaseReactiveHandler);var ReadonlyReactiveHandler = /*#__PURE__*/function (_BaseReactiveHandler2) { + _inherits2(ReadonlyReactiveHandler, _BaseReactiveHandler2); + var _super2 = _createSuper2(ReadonlyReactiveHandler); + function ReadonlyReactiveHandler() { + var isShallow2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + _classCallCheck2(this, ReadonlyReactiveHandler); + return _super2.call(this, true, isShallow2); + } + _createClass2(ReadonlyReactiveHandler, [{ + key: "set", + value: function set(target, key) { + { + warn$2("Set operation on key \"".concat(String(key), "\" failed: target is readonly."), target); + } + return true; + } + }, { + key: "deleteProperty", + value: function deleteProperty(target, key) { + { + warn$2("Delete operation on key \"".concat(String(key), "\" failed: target is readonly."), target); + } + return true; + } + }]); + return ReadonlyReactiveHandler; +}(BaseReactiveHandler);var mutableHandlers = /* @__PURE__ */new MutableReactiveHandler();var readonlyHandlers = /* @__PURE__ */new ReadonlyReactiveHandler();var shallowReactiveHandlers = /* @__PURE__ */new MutableReactiveHandler(true);var shallowReadonlyHandlers = /* @__PURE__ */new ReadonlyReactiveHandler(true);var toShallow = function toShallow(value) { + return value; +};var getProto = function getProto(v) { + return Reflect.getPrototypeOf(v); +};function _get(target, key) { + var isReadonly2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var isShallow2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + target = target["__v_raw"]; + var rawTarget = toRaw(target); + var rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + var _getProto = getProto(rawTarget), + has2 = _getProto.has; + var wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } +}function has$1(key) { + var isReadonly2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var target = this["__v_raw"]; + var rawTarget = toRaw(target); + var rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); +}function size(target) { + var isReadonly2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + target = target["__v_raw"]; + !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); +}function add(value) { + value = toRaw(value); + var target = toRaw(this); + var proto = getProto(target); + var hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; +}function set$1(key, value) { + value = toRaw(value); + var target = toRaw(this); + var _getProto2 = getProto(target), + has2 = _getProto2.has, + get2 = _getProto2.get; + var hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + var oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; +}function deleteEntry(key) { + var target = toRaw(this); + var _getProto3 = getProto(target), + has2 = _getProto3.has, + get2 = _getProto3.get; + var hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + var oldValue = get2 ? get2.call(target, key) : void 0; + var result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; +}function clear() { + var target = toRaw(this); + var hadItems = target.size !== 0; + var oldTarget = isMap(target) ? new Map(target) : new Set(target); + var result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; +}function createForEach(isReadonly2, isShallow2) { + return function forEach(callback, thisArg) { + var observed = this; + var target = observed["__v_raw"]; + var rawTarget = toRaw(target); + var wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach(function (value, key) { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; +}function createIterableMethod(method, isReadonly2, isShallow2) { + return function () { + var target = this["__v_raw"]; + var rawTarget = toRaw(target); + var targetIsMap = isMap(rawTarget); + var isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + var isKeyOnly = method === "keys" && targetIsMap; + var innerIterator = target[method].apply(target, arguments); + var wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); + return _defineProperty2({ + // iterator protocol + next: function next() { + var _innerIterator$next = innerIterator.next(), + value = _innerIterator$next.value, + done = _innerIterator$next.done; + return done ? { + value: value, + done: done + } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done: done + }; + } + }, Symbol.iterator, function () { + return this; + }); + }; +}function createReadonlyMethod(type) { + return function () { + { + var key = (arguments.length <= 0 ? undefined : arguments[0]) ? "on key \"".concat(arguments.length <= 0 ? undefined : arguments[0], "\" ") : ""; + warn$2("".concat(capitalize(type), " operation ").concat(key, "failed: target is readonly."), toRaw(this)); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +}function createInstrumentations() { + var mutableInstrumentations2 = { + get: function get(key) { + return _get(this, key); + }, + get size() { + return size(this); + }, + has: has$1, + add: add, + set: set$1, + delete: deleteEntry, + clear: clear, + forEach: createForEach(false, false) + }; + var shallowInstrumentations2 = { + get: function get(key) { + return _get(this, key, false, true); + }, + get size() { + return size(this); + }, + has: has$1, + add: add, + set: set$1, + delete: deleteEntry, + clear: clear, + forEach: createForEach(false, true) + }; + var readonlyInstrumentations2 = { + get: function get(key) { + return _get(this, key, true); + }, + get size() { + return size(this, true); + }, + has: function has(key) { + return has$1.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + var shallowReadonlyInstrumentations2 = { + get: function get(key) { + return _get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has: function has(key) { + return has$1.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + var iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach(function (method) { + mutableInstrumentations2[method] = createIterableMethod(method, false, false); + readonlyInstrumentations2[method] = createIterableMethod(method, true, false); + shallowInstrumentations2[method] = createIterableMethod(method, false, true); + shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true); + }); + return [mutableInstrumentations2, readonlyInstrumentations2, shallowInstrumentations2, shallowReadonlyInstrumentations2]; +}var _createInstrumentatio = /* @__PURE__ */createInstrumentations(), + _createInstrumentatio2 = _slicedToArray2(_createInstrumentatio, 4), + mutableInstrumentations = _createInstrumentatio2[0], + readonlyInstrumentations = _createInstrumentatio2[1], + shallowInstrumentations = _createInstrumentatio2[2], + shallowReadonlyInstrumentations = _createInstrumentatio2[3];function createInstrumentationGetter(isReadonly2, shallow) { + var instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; + return function (target, key, receiver) { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver); + }; +}var mutableCollectionHandlers = { + get: /* @__PURE__ */createInstrumentationGetter(false, false) +};var shallowCollectionHandlers = { + get: /* @__PURE__ */createInstrumentationGetter(false, true) +};var readonlyCollectionHandlers = { + get: /* @__PURE__ */createInstrumentationGetter(true, false) +};var shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */createInstrumentationGetter(true, true) +};function checkIdentityKeys(target, has2, key) { + var rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + var type = toRawType(target); + warn$2("Reactive ".concat(type, " contains both the raw and reactive versions of the same object").concat(type === "Map" ? " as keys" : "", ", which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.")); + } +}var reactiveMap = /* @__PURE__ */new WeakMap();var shallowReactiveMap = /* @__PURE__ */new WeakMap();var readonlyMap = /* @__PURE__ */new WeakMap();var shallowReadonlyMap = /* @__PURE__ */new WeakMap();function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2; + default: + return 0; + } +}function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); +}function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); +}function shallowReactive(target) { + return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); +}function readonly(target) { + return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); +}function shallowReadonly(target) { + return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); +}function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + warn$2("value cannot be made reactive: ".concat(String(target))); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + var existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + var targetType = getTargetType(target); + if (targetType === 0) { + return target; + } + var proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers); + proxyMap.set(target, proxy); + return proxy; +}function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +}function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +}function isShallow(value) { + return !!(value && value["__v_isShallow"]); +}function toRaw(observed) { + var raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +}function markRaw(value) { + if (Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +}var toReactive = function toReactive(value) { + return isObject(value) ? reactive(value) : value; +};var toReadonly = function toReadonly(value) { + return isObject(value) ? readonly(value) : value; +};var COMPUTED_SIDE_EFFECT_WARN = "Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";var ComputedRefImpl = /*#__PURE__*/function () { + function ComputedRefImpl(getter, _setter, isReadonly2, isSSR) { + var _this = this; + _classCallCheck2(this, ComputedRefImpl); + this.getter = getter; + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect(function () { + return getter(_this._value); + }, function () { + return triggerRefValue(_this, _this.effect._dirtyLevel === 2 ? 2 : 3); + }); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly2; + } + _createClass2(ComputedRefImpl, [{ + key: "value", + get: function get() { + var self = toRaw(this); + if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 4); + } + trackRefValue(self); + if (self.effect._dirtyLevel >= 2) { + if (this._warnRecursive) { + warn$2(COMPUTED_SIDE_EFFECT_WARN, "\n\ngetter: ", this.getter); + } + triggerRefValue(self, 2); + } + return self._value; + }, + set: function set(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + }, { + key: "_dirty", + get: function get() { + return this.effect.dirty; + }, + set: function set(v) { + this.effect.dirty = v; + } + // #endregion + }]); + return ComputedRefImpl; +}();function computed$1(getterOrOptions, debugOptions) { + var isSSR = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var getter; + var setter; + var onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = function setter() { + warn$2("Write operation failed: computed value is readonly"); + }; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + var cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; +}function trackRefValue(ref2) { + var _a; + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect(activeEffect, (_a = ref2.dep) != null ? _a : ref2.dep = createDep(function () { + return ref2.dep = void 0; + }, ref2 instanceof ComputedRefImpl ? ref2 : void 0), { + target: ref2, + type: "get", + key: "value" + }); + } +}function triggerRefValue(ref2) { + var dirtyLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4; + var newVal = arguments.length > 2 ? arguments[2] : undefined; + ref2 = toRaw(ref2); + var dep = ref2.dep; + if (dep) { + triggerEffects(dep, dirtyLevel, { + target: ref2, + type: "set", + key: "value", + newValue: newVal + }); + } +}function isRef(r2) { + return !!(r2 && r2.__v_isRef === true); +}function ref(value) { + return createRef(value, false); +}function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +}var RefImpl = /*#__PURE__*/function () { + function RefImpl(value, __v_isShallow) { + _classCallCheck2(this, RefImpl); + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + _createClass2(RefImpl, [{ + key: "value", + get: function get() { + trackRefValue(this); + return this._value; + }, + set: function set(newVal) { + var useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 4, newVal); + } + } + }]); + return RefImpl; +}();function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +}var shallowUnwrapHandlers = { + get: function get(target, key, receiver) { + return unref(Reflect.get(target, key, receiver)); + }, + set: function set(target, key, value, receiver) { + var oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +};function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +}var stack = [];function pushWarningContext(vnode) { + stack.push(vnode); +}function popWarningContext() { + stack.pop(); +}function warn$1(msg) { + pauseTracking(); + var instance = stack.length ? stack[stack.length - 1].component : null; + var appWarnHandler = instance && instance.appContext.config.warnHandler; + var trace = getComponentTrace(); + for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key6 = 1; _key6 < _len5; _key6++) { + args[_key6 - 1] = arguments[_key6]; + } + if (appWarnHandler) { + callWithErrorHandling(appWarnHandler, instance, 11, [msg + args.map(function (a) { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), instance && instance.proxy, trace.map(function (_ref3) { + var vnode = _ref3.vnode; + return "at <".concat(formatComponentName(instance, vnode.type), ">"); + }).join("\n"), trace]); + } else { + var _console2; + var warnArgs = ["[Vue warn]: ".concat(msg)].concat(args); + if (trace.length && + // avoid spamming console during tests + true) { + warnArgs.push.apply(warnArgs, ["\n"].concat(_toConsumableArray2(formatTrace(trace)))); + } + (_console2 = console).warn.apply(_console2, _toConsumableArray2(warnArgs)); + } + resetTracking(); +}function getComponentTrace() { + var currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + var normalizedStack = []; + while (currentVNode) { + var last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + var parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +}function formatTrace(trace) { + var logs = []; + trace.forEach(function (entry, i) { + logs.push.apply(logs, _toConsumableArray2(i === 0 ? [] : ["\n"]).concat(_toConsumableArray2(formatTraceEntry(entry)))); + }); + return logs; +}function formatTraceEntry(_ref4) { + var vnode = _ref4.vnode, + recurseCount = _ref4.recurseCount; + var postfix = recurseCount > 0 ? "... (".concat(recurseCount, " recursive calls)") : ""; + var isRoot = vnode.component ? vnode.component.parent == null : false; + var open = " at <".concat(formatComponentName(vnode.component, vnode.type, isRoot)); + var close = ">" + postfix; + return vnode.props ? [open].concat(_toConsumableArray2(formatProps(vnode.props)), [close]) : [open + close]; +}function formatProps(props) { + var res = []; + var keys = Object.keys(props); + keys.slice(0, 3).forEach(function (key) { + res.push.apply(res, _toConsumableArray2(formatProp(key, props[key]))); + }); + if (keys.length > 3) { + res.push(" ..."); + } + return res; +}function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : ["".concat(key, "=").concat(value)]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : ["".concat(key, "=").concat(value)]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : ["".concat(key, "=Ref<"), value, ">"]; + } else if (isFunction(value)) { + return ["".concat(key, "=fn").concat(value.name ? "<".concat(value.name, ">") : "")]; + } else { + value = toRaw(value); + return raw ? value : ["".concat(key, "="), value]; + } +}var ErrorTypeStrings = (_ErrorTypeStrings = {}, _defineProperty2(_ErrorTypeStrings, "sp", "serverPrefetch hook"), _defineProperty2(_ErrorTypeStrings, "bc", "beforeCreate hook"), _defineProperty2(_ErrorTypeStrings, "c", "created hook"), _defineProperty2(_ErrorTypeStrings, "bm", "beforeMount hook"), _defineProperty2(_ErrorTypeStrings, "m", "mounted hook"), _defineProperty2(_ErrorTypeStrings, "bu", "beforeUpdate hook"), _defineProperty2(_ErrorTypeStrings, "u", "updated"), _defineProperty2(_ErrorTypeStrings, "bum", "beforeUnmount hook"), _defineProperty2(_ErrorTypeStrings, "um", "unmounted hook"), _defineProperty2(_ErrorTypeStrings, "a", "activated hook"), _defineProperty2(_ErrorTypeStrings, "da", "deactivated hook"), _defineProperty2(_ErrorTypeStrings, "ec", "errorCaptured hook"), _defineProperty2(_ErrorTypeStrings, "rtc", "renderTracked hook"), _defineProperty2(_ErrorTypeStrings, "rtg", "renderTriggered hook"), _defineProperty2(_ErrorTypeStrings, 0, "setup function"), _defineProperty2(_ErrorTypeStrings, 1, "render function"), _defineProperty2(_ErrorTypeStrings, 2, "watcher getter"), _defineProperty2(_ErrorTypeStrings, 3, "watcher callback"), _defineProperty2(_ErrorTypeStrings, 4, "watcher cleanup function"), _defineProperty2(_ErrorTypeStrings, 5, "native event handler"), _defineProperty2(_ErrorTypeStrings, 6, "component event handler"), _defineProperty2(_ErrorTypeStrings, 7, "vnode hook"), _defineProperty2(_ErrorTypeStrings, 8, "directive hook"), _defineProperty2(_ErrorTypeStrings, 9, "transition hook"), _defineProperty2(_ErrorTypeStrings, 10, "app errorHandler"), _defineProperty2(_ErrorTypeStrings, 11, "app warnHandler"), _defineProperty2(_ErrorTypeStrings, 12, "ref function"), _defineProperty2(_ErrorTypeStrings, 13, "async component loader"), _defineProperty2(_ErrorTypeStrings, 14, "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."), _ErrorTypeStrings);function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn.apply(void 0, _toConsumableArray2(args)) : fn(); + } catch (err) { + handleError(err, instance, type); + } +}function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + var res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch(function (err) { + handleError(err, instance, type); + }); + } + return res; + } + var values = []; + for (var i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; +}function handleError(err, instance, type) { + var throwInDev = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var contextVNode = instance ? instance.vnode : null; + if (instance) { + var cur = instance.parent; + var exposedInstance = instance.proxy; + var errorInfo = ErrorTypeStrings[type] || type; + while (cur) { + var errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (var i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + var appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); + return; + } + } + logError(err, type, contextVNode, throwInDev); +}function logError(err, type, contextVNode) { + var throwInDev = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + { + var info = ErrorTypeStrings[type] || type; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1("Unhandled error".concat(info ? " during execution of ".concat(info) : "")); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + console.error(err); + } else { + console.error(err); + } + } +}var isFlushing = false;var isFlushPending = false;var queue$1 = [];var flushIndex = 0;var pendingPostFlushCbs = [];var activePostFlushCbs = null;var postFlushIndex = 0;var resolvedPromise = /* @__PURE__ */Promise.resolve();var currentFlushPromise = null;var RECURSION_LIMIT = 100;function nextTick$1(fn) { + var p2 = currentFlushPromise || resolvedPromise; + return fn ? p2.then(this ? fn.bind(this) : fn) : p2; +}function findInsertionIndex(id) { + var start = flushIndex + 1; + var end = queue$1.length; + while (start < end) { + var middle = start + end >>> 1; + var middleJob = queue$1[middle]; + var middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +}function queueJob(job) { + if (!queue$1.length || !queue$1.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) { + if (job.id == null) { + queue$1.push(job); + } else { + queue$1.splice(findInsertionIndex(job.id), 0, job); + } + queueFlush(); + } +}function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +}function hasQueueJob(job) { + return queue$1.indexOf(job) > -1; +}function invalidateJob(job) { + var i = queue$1.indexOf(job); + if (i > flushIndex) { + queue$1.splice(i, 1); + } +}function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) { + pendingPostFlushCbs.push(cb); + } + } else { + pendingPostFlushCbs.push.apply(pendingPostFlushCbs, _toConsumableArray2(cb)); + } + queueFlush(); +}function flushPreFlushCbs(instance, seen) { + var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isFlushing ? flushIndex + 1 : 0; + { + seen = seen || /* @__PURE__ */new Map(); + } + for (; i < queue$1.length; i++) { + var cb = queue$1[i]; + if (cb && cb.pre) { + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue$1.splice(i, 1); + i--; + cb(); + } + } +}function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + var deduped = _toConsumableArray2(new Set(pendingPostFlushCbs)).sort(function (a, b) { + return getId(a) - getId(b); + }); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + var _activePostFlushCbs; + (_activePostFlushCbs = activePostFlushCbs).push.apply(_activePostFlushCbs, _toConsumableArray2(deduped)); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +}var getId = function getId(job) { + return job.id == null ? Infinity : job.id; +};var comparator = function comparator(a, b) { + var diff2 = getId(a) - getId(b); + if (diff2 === 0) { + if (a.pre && !b.pre) return -1; + if (b.pre && !a.pre) return 1; + } + return diff2; +};function flushJobs(seen) { + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */new Map(); + } + queue$1.sort(comparator); + var check = function check(job) { + return checkRecursiveUpdates(seen, job); + }; + try { + for (flushIndex = 0; flushIndex < queue$1.length; flushIndex++) { + var job = queue$1[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; + } + callWithErrorHandling(job, null, 14); + } + } + } finally { + flushIndex = 0; + queue$1.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue$1.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +}function checkRecursiveUpdates(seen, fn) { + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + var count = seen.get(fn); + if (count > RECURSION_LIMIT) { + var instance = fn.ownerInstance; + var componentName = instance && getComponentName(instance.type); + handleError("Maximum recursive updates exceeded".concat(componentName ? " in component <".concat(componentName, ">") : "", ". This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function."), null, 10); + return true; + } else { + seen.set(fn, count + 1); + } + } +}var devtools;var buffer = [];var devtoolsNotInstalled = false;function emit$1(event) { + for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key7 = 1; _key7 < _len6; _key7++) { + args[_key7 - 1] = arguments[_key7]; + } + if (devtools) { + var _devtools; + (_devtools = devtools).emit.apply(_devtools, [event].concat(args)); + } else if (!devtoolsNotInstalled) { + buffer.push({ + event: event, + args: args + }); + } +}function setDevtoolsHook(hook, target) { + var _a, _b; + devtools = hook; + if (devtools) { + devtools.enabled = true; + buffer.forEach(function (_ref5) { + var _devtools2; + var event = _ref5.event, + args = _ref5.args; + return (_devtools2 = devtools).emit.apply(_devtools2, [event].concat(_toConsumableArray2(args))); + }); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && + // some envs mock window but not fully + window.HTMLElement && + // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))) { + var replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push(function (newHook) { + setDevtoolsHook(newHook, target); + }); + setTimeout(function () { + if (!devtools) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +}function devtoolsInitApp(app, version2) { + emit$1("app:init", app, version2, { + Fragment: Fragment, + Text: Text, + Comment: Comment, + Static: Static + }); +}var devtoolsComponentAdded = /* @__PURE__ */createDevtoolsComponentHook("component:added" +/* COMPONENT_ADDED */);var devtoolsComponentUpdated = /* @__PURE__ */createDevtoolsComponentHook("component:updated" +/* COMPONENT_UPDATED */);var _devtoolsComponentRemoved = /* @__PURE__ */createDevtoolsComponentHook("component:removed" +/* COMPONENT_REMOVED */);var devtoolsComponentRemoved = function devtoolsComponentRemoved(component) { + if (devtools && typeof devtools.cleanupBuffer === "function" && + // remove the component if it wasn't buffered + !devtools.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +};function createDevtoolsComponentHook(hook) { + return function (component) { + emit$1(hook, component.appContext.app, component.uid, + // fixed by xxxxxx + // 为 0 是 App,无 parent 是 Page 指向 App + component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0, component); + }; +}var devtoolsPerfStart = /* @__PURE__ */createDevtoolsPerformanceHook("perf:start" +/* PERFORMANCE_START */);var devtoolsPerfEnd = /* @__PURE__ */createDevtoolsPerformanceHook("perf:end" +/* PERFORMANCE_END */);function createDevtoolsPerformanceHook(hook) { + return function (component, type, time) { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +}function devtoolsComponentEmit(component, event, params) { + emit$1("component:emit", component.appContext.app, component, event, params); +}function emit(instance, event) { + if (instance.isUnmounted) return; + var props = instance.vnode.props || EMPTY_OBJ; + for (var _len7 = arguments.length, rawArgs = new Array(_len7 > 2 ? _len7 - 2 : 0), _key8 = 2; _key8 < _len7; _key8++) { + rawArgs[_key8 - 2] = arguments[_key8]; + } + { + var emitsOptions = instance.emitsOptions, + _instance$propsOption = _slicedToArray2(instance.propsOptions, 1), + propsOptions = _instance$propsOption[0]; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1("Component emitted event \"".concat(event, "\" but it is neither declared in the emits option nor as an \"").concat(toHandlerKey(event), "\" prop.")); + } + } else { + var validator = emitsOptions[event]; + if (isFunction(validator)) { + var isValid = validator.apply(void 0, rawArgs); + if (!isValid) { + warn$1("Invalid event arguments: event validation failed for event \"".concat(event, "\".")); + } + } + } + } + } + var args = rawArgs; + var isModelListener2 = event.startsWith("update:"); + var modelArg = isModelListener2 && event.slice(7); + if (modelArg && modelArg in props) { + var modifiersKey = "".concat(modelArg === "modelValue" ? "model" : modelArg, "Modifiers"); + var _ref6 = props[modifiersKey] || EMPTY_OBJ, + number = _ref6.number, + trim = _ref6.trim; + if (trim) { + args = rawArgs.map(function (a) { + return isString(a) ? a.trim() : a; + }); + } + if (number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + var lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1("Event \"".concat(lowerCaseEvent, "\" is emitted in component ").concat(formatComponentName(instance, instance.type), " but the handler is registered for \"").concat(event, "\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"").concat(hyphenate(event), "\" instead of \"").concat(event, "\".")); + } + } + var handlerName; + var handler = props[handlerName = toHandlerKey(event)] || + // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener2) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling(handler, instance, 6, args); + } + var onceHandler = props[handlerName + "Once"]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling(onceHandler, instance, 6, args); + } +}function normalizeEmitsOptions(comp, appContext) { + var asMixin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var cache = appContext.emitsCache; + var cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + var raw = comp.emits; + var normalized = {}; + var hasExtends = false; + if (!isFunction(comp)) { + var extendEmits = function extendEmits(raw2) { + var normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach(function (key) { + return normalized[key] = null; + }); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +}function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +}var currentRenderingInstance = null;function setCurrentRenderingInstance(instance) { + var prev = currentRenderingInstance; + currentRenderingInstance = instance; + instance && instance.type.__scopeId || null; + return prev; +}var INITIAL_WATCHER_VALUE = {};function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."); + } + return doWatch(source, cb, options); +}function doWatch(source, cb) { + var _ref7 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJ, + immediate = _ref7.immediate, + deep = _ref7.deep, + flush = _ref7.flush, + once2 = _ref7.once, + onTrack = _ref7.onTrack, + onTrigger = _ref7.onTrigger; + if (cb && once2) { + var _cb = cb; + cb = function cb() { + _cb.apply(void 0, arguments); + unwatch(); + }; + } + if (deep !== void 0 && typeof deep === "number") { + warn$1("watch() \"deep\" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage."); + } + if (!cb) { + if (immediate !== void 0) { + warn$1("watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature."); + } + if (deep !== void 0) { + warn$1("watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature."); + } + if (once2 !== void 0) { + warn$1("watch() \"once\" option is only respected when using the watch(source, callback, options?) signature."); + } + } + var warnInvalidSource = function warnInvalidSource(s2) { + warn$1("Invalid watch source: ", s2, "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."); + }; + var instance = currentInstance; + var reactiveGetter = function reactiveGetter(source2) { + return deep === true ? source2 : + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0); + }; + var getter; + var forceTrigger = false; + var isMultiSource = false; + if (isRef(source)) { + getter = function getter() { + return source.value; + }; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = function getter() { + return reactiveGetter(source); + }; + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some(function (s2) { + return isReactive(s2) || isShallow(s2); + }); + getter = function getter() { + return source.map(function (s2) { + if (isRef(s2)) { + return s2.value; + } else if (isReactive(s2)) { + return reactiveGetter(s2); + } else if (isFunction(s2)) { + return callWithErrorHandling(s2, instance, 2); + } else { + warnInvalidSource(s2); + } + }); + }; + } else if (isFunction(source)) { + if (cb) { + getter = function getter() { + return callWithErrorHandling(source, instance, 2); + }; + } else { + getter = function getter() { + if (cleanup) { + cleanup(); + } + return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]); + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + var baseGetter = getter; + getter = function getter() { + return traverse(baseGetter()); + }; + } + var cleanup; + var onCleanup = function onCleanup(fn) { + cleanup = effect2.onStop = function () { + callWithErrorHandling(fn, instance, 4); + cleanup = effect2.onStop = void 0; + }; + }; + var oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + var job = function job() { + if (!effect2.active || !effect2.dirty) { + return; + } + if (cb) { + var newValue = effect2.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some(function (v, i) { + return hasChanged(v, oldValue[i]); + }) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, onCleanup]); + oldValue = newValue; + } + } else { + effect2.run(); + } + }; + job.allowRecurse = !!cb; + var scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = function scheduler() { + return queuePostRenderEffect$1(job, instance && instance.suspense); + }; + } else { + job.pre = true; + if (instance) job.id = instance.uid; + scheduler = function scheduler() { + return queueJob(job); + }; + } + var effect2 = new ReactiveEffect(getter, NOOP, scheduler); + var scope = getCurrentScope(); + var unwatch = function unwatch() { + effect2.stop(); + if (scope) { + remove(scope.effects, effect2); + } + }; + { + effect2.onTrack = onTrack; + effect2.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect2.run(); + } + } else if (flush === "post") { + queuePostRenderEffect$1(effect2.run.bind(effect2), instance && instance.suspense); + } else { + effect2.run(); + } + return unwatch; +}function instanceWatch(source, value, options) { + var publicThis = this.proxy; + var getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : function () { + return publicThis[source]; + } : source.bind(publicThis, publicThis); + var cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + var reset = setCurrentInstance(this); + var res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +}function createPathGetter(ctx, path) { + var segments = path.split("."); + return function () { + var cur = ctx; + for (var i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +}function traverse(value, depth) { + var currentDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var seen = arguments.length > 3 ? arguments[3] : undefined; + if (!isObject(value) || value["__v_skip"]) { + return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (var i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach(function (v) { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (var key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; +}function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +}function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */Object.create(null), + optionsCache: /* @__PURE__ */new WeakMap(), + propsCache: /* @__PURE__ */new WeakMap(), + emitsCache: /* @__PURE__ */new WeakMap() + }; +}var uid$1 = 0;function createAppAPI(render, hydrate) { + return function createApp2(rootComponent) { + var rootProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1("root props passed to app.mount() must be an object."); + rootProps = null; + } + var context = createAppContext(); + var installedPlugins = /* @__PURE__ */new WeakSet(); + var app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version: version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1("app.config cannot be replaced. Modify individual options instead."); + } + }, + use: function use(plugin2) { + for (var _len8 = arguments.length, options = new Array(_len8 > 1 ? _len8 - 1 : 0), _key9 = 1; _key9 < _len8; _key9++) { + options[_key9 - 1] = arguments[_key9]; + } + if (installedPlugins.has(plugin2)) { + warn$1("Plugin has already been applied to target app."); + } else if (plugin2 && isFunction(plugin2.install)) { + installedPlugins.add(plugin2); + plugin2.install.apply(plugin2, [app].concat(options)); + } else if (isFunction(plugin2)) { + installedPlugins.add(plugin2); + plugin2.apply(void 0, [app].concat(options)); + } else { + warn$1("A plugin must either be a function or an object with an \"install\" function."); + } + return app; + }, + mixin: function mixin(_mixin) { + { + if (!context.mixins.includes(_mixin)) { + context.mixins.push(_mixin); + } else { + warn$1("Mixin has already been applied to target app" + (_mixin.name ? ": ".concat(_mixin.name) : "")); + } + } + return app; + }, + component: function component(name, _component) { + { + validateComponentName(name, context.config); + } + if (!_component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1("Component \"".concat(name, "\" has already been registered in target app.")); + } + context.components[name] = _component; + return app; + }, + directive: function directive(name, _directive) { + { + validateDirectiveName(name); + } + if (!_directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1("Directive \"".concat(name, "\" has already been registered in target app.")); + } + context.directives[name] = _directive; + return app; + }, + // fixed by xxxxxx + mount: function mount() {}, + // fixed by xxxxxx + unmount: function unmount() {}, + provide: function provide(key, value) { + if (key in context.provides) { + warn$1("App already provides property with key \"".concat(String(key), "\". It will be overwritten with the new value.")); + } + context.provides[key] = value; + return app; + }, + runWithContext: function runWithContext(fn) { + var lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +}var currentApp = null;function provide(key, value) { + if (!currentInstance) { + { + warn$1("provide() can only be used inside setup()."); + } + } else { + var provides = currentInstance.provides; + var parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + if (currentInstance.type.mpType === "app") { + currentInstance.appContext.app.provide(key, value); + } + } +}function inject(key, defaultValue) { + var treatDefaultAsFactory = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + var provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1("injection \"".concat(String(key), "\" not found.")); + } + } else { + warn$1("inject() can only be used inside setup() or functional components."); + } +}var isKeepAlive = function isKeepAlive(vnode) { + return vnode.type.__isKeepAlive; +};function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +}function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +}function registerKeepAliveHook(hook, type) { + var target = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : currentInstance; + var wrappedHook = hook.__wdc || (hook.__wdc = function () { + var current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + var current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +}function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + var injected = injectHook(type, hook, keepAliveRoot, true + /* prepend */); + + onUnmounted(function () { + remove(keepAliveRoot[type], injected); + }, target); +}function injectHook(type, hook) { + var target = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : currentInstance; + var prepend = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + if (target) { + if (isRootHook(type)) { + target = target.root; + } + var hooks = target[type] || (target[type] = []); + var wrappedHook = hook.__weh || (hook.__weh = function () { + if (target.isUnmounted) { + return; + } + pauseTracking(); + var reset = setCurrentInstance(target); + for (var _len9 = arguments.length, args = new Array(_len9), _key10 = 0; _key10 < _len9; _key10++) { + args[_key10] = arguments[_key10]; + } + var res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + var apiName = toHandlerKey((ErrorTypeStrings[type] || type.replace(/^on/, "")).replace(/ hook$/, "")); + warn$1("".concat(apiName, " is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().")); + } +}var createHook = function createHook(lifecycle) { + return function (hook) { + var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : currentInstance; + return ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, function () { + return hook.apply(void 0, arguments); + }, target) + ); + }; +};var onBeforeMount = createHook("bm");var onMounted = createHook("m");var onBeforeUpdate = createHook("bu");var onUpdated = createHook("u");var onBeforeUnmount = createHook("bum");var onUnmounted = createHook("um");var onServerPrefetch = createHook("sp");var onRenderTriggered = createHook("rtg");var onRenderTracked = createHook("rtc");function onErrorCaptured(hook) { + var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : currentInstance; + injectHook("ec", hook, target); +}var getPublicInstance = function getPublicInstance(i) { + if (!i) return null; + if (isStatefulComponent(i)) return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); +};function getComponentInternalInstance(i) { + return i; +}var publicPropertiesMap = +// Move PURE marker to new line to workaround compiler discarding it +// due to type annotation +/* @__PURE__ */ +extend( /* @__PURE__ */Object.create(null), { + // fixed by xxxxxx + $: getComponentInternalInstance, + // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的 + // $el: i => i.vnode.el, + $el: function $el(i) { + return i.__$el || (i.__$el = {}); + }, + $data: function $data(i) { + return i.data; + }, + $props: function $props(i) { + return shallowReadonly(i.props); + }, + $attrs: function $attrs(i) { + return shallowReadonly(i.attrs); + }, + $slots: function $slots(i) { + return shallowReadonly(i.slots); + }, + $refs: function $refs(i) { + return shallowReadonly(i.refs); + }, + $parent: function $parent(i) { + return getPublicInstance(i.parent); + }, + $root: function $root(i) { + return getPublicInstance(i.root); + }, + $emit: function $emit(i) { + return i.emit; + }, + $options: function $options(i) { + return resolveMergedOptions(i); + }, + $forceUpdate: function $forceUpdate(i) { + return i.f || (i.f = function () { + i.effect.dirty = true; + queueJob(i.update); + }); + }, + // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx + $watch: function $watch(i) { + return instanceWatch.bind(i); + } +});var isReservedPrefix = function isReservedPrefix(key) { + return key === "_" || key === "$"; +};var hasSetupBinding = function hasSetupBinding(state, key) { + return state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +};var PublicInstanceProxyHandlers = { + get: function get(_ref8, key) { + var instance = _ref8._; + var ctx = instance.ctx, + setupState = instance.setupState, + data = instance.data, + props = instance.props, + accessCache = instance.accessCache, + type = instance.type, + appContext = instance.appContext; + if (key === "__isVue") { + return true; + } + var normalizedProps; + if (key[0] !== "$") { + var n2 = accessCache[key]; + if (n2 !== void 0) { + switch (n2) { + case 1: + return setupState[key]; + case 2: + return data[key]; + case 4: + return ctx[key]; + case 3: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)) { + accessCache[key] = 3; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0; + } + } + var publicGetter = publicPropertiesMap[key]; + var cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key])) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || + // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1("Property ".concat(JSON.stringify(key), " must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.")); + } else if (instance === currentRenderingInstance) { + warn$1("Property ".concat(JSON.stringify(key), " was accessed during render but is not defined on instance.")); + } + } + }, + set: function set(_ref9, key, value) { + var instance = _ref9._; + var data = instance.data, + setupState = instance.setupState, + ctx = instance.ctx; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1("Cannot mutate