(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/vendor"],{"1b4b":function(e){e.exports=JSON.parse('{"uni-load-more.contentdown":"Pull up to show more","uni-load-more.contentrefresh":"loading...","uni-load-more.contentnomore":"No more data"}')},"262a":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("5189")),i=a(n("54f5")),o=a(n("c34e"));function a(e){return e&&e.__esModule?e:{default:e}}var c={en:r.default,"zh-Hans":i.default,"zh-Hant":o.default};t.default=c},"37dc":function(e,t,n){"use strict";(function(e,n){function r(e,t){return s(e)||c(e,t)||o(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:p;if(!t)return[e];var r=this._caches[e];return r||(r=y(e,n),this._caches[e]=r),_(r,t)}}]),e}();t.Formatter=v;var m=/^(?:\d)+/,g=/^(?:\w)+/;function y(e,t){var n=r(t,2),i=n[0],o=n[1],a=[],c=0,s="";while(c-1?b:e.indexOf("-hant")>-1||E(e,["-tw","-hk","-mo","-cht"])?w:b;var n=T(e,[k,x,S]);return n||void 0}}var D=function(){function e(t){var n=t.locale,r=t.fallbackLocale,i=t.messages,o=t.watcher,a=t.formater;u(this,e),this.locale=k,this.fallbackLocale=k,this.message={},this.messages={},this.watchers=[],r&&(this.fallbackLocale=r),this.formater=a||P,this.messages=i||{},this.setLocale(n||k),o&&this.watchLocale(o)}return f(e,[{key:"setLocale",value:function(e){var t=this,n=this.locale;this.locale=$(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],n!==this.locale&&this.watchers.forEach((function(e){e(t.locale,n)}))}},{key:"getLocale",value:function(){return this.locale}},{key:"watchLocale",value:function(e){var t=this,n=this.watchers.push(e)-1;return function(){t.watchers.splice(n,1)}}},{key:"add",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.messages[e];r?n?Object.assign(r,t):Object.keys(t).forEach((function(e){A(r,e)||(r[e]=t[e])})):this.messages[e]=t}},{key:"f",value:function(e,t,n){return this.formater.interpolate(e,t,n).join("")}},{key:"t",value:function(e,t,n){var r=this.message;return"string"===typeof t?(t=$(t,this.messages),t&&(r=this.messages[t])):n=t,A(r,e)?this.formater.interpolate(r[e],n).join(""):(console.warn("Cannot translate the value of keypath ".concat(e,". Use the value of keypath as default.")),e)}}]),e}();function I(e,t){e.$watchLocale?e.$watchLocale((function(e){t.setLocale(e)})):e.$watch((function(){return e.$locale}),(function(e){t.setLocale(e)}))}function j(){return"undefined"!==typeof e&&e.getLocale?e.getLocale():"undefined"!==typeof n&&n.getLocale?n.getLocale():k}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"!==typeof e){var i=[t,e];e=i[0],t=i[1]}"string"!==typeof e&&(e=j()),"string"!==typeof n&&(n="undefined"!==typeof __uniConfig&&__uniConfig.fallbackLocale||k);var o=new D({locale:e,fallbackLocale:n,messages:t,watcher:r}),a=function(e,t){if("function"!==typeof getApp)a=function(e,t){return o.t(e,t)};else{var n=!1;a=function(e,t){var r=getApp().$vm;return r&&(r.$locale,n||(n=!0,I(r,o))),o.t(e,t)}}return a(e,t)};return{i18n:o,f:function(e,t,n){return o.f(e,t,n)},t:function(e,t){return a(e,t)},add:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return o.add(e,t,n)},watch:function(e){return o.watchLocale(e)},getLocale:function(){return o.getLocale()},setLocale:function(e){return o.setLocale(e)}}}t.I18n=D;var L,M=function(e){return"string"===typeof e};function U(e,t){return L||(L=new v),z(e,(function(e,n){var r=e[n];return M(r)?!!N(r,t)||void 0:U(r,t)}))}function R(e,t,n){return L||(L=new v),z(e,(function(e,r){var i=e[r];M(i)?N(i,n)&&(e[r]=q(i,t,n)):R(i,t,n)})),e}function F(e,t){var n=t.locale,r=t.locales,i=t.delimiters;if(!N(e,i))return e;L||(L=new v);var o=[];Object.keys(r).forEach((function(e){e!==n&&o.push({locale:e,values:r[e]})})),o.unshift({locale:n,values:r[n]});try{return JSON.stringify(H(JSON.parse(e),o,i),null,2)}catch(a){}return e}function N(e,t){return e.indexOf(t[0])>-1}function q(e,t,n){return L.interpolate(e,t,n).join("")}function B(e,t,n,r){var i=e[t];if(M(i)){if(N(i,r)&&(e[t]=q(i,n[0].values,r),n.length>1)){var o=e[t+"Locales"]={};n.forEach((function(e){o[e.locale]=q(i,e.values,r)}))}}else H(i,n,r)}function H(e,t,n){return z(e,(function(e,r){B(e,r,t,n)})),e}function z(e,t){if(d(e)){for(var n=0;n-1}))):t}}function K(e){var t=[],n=e.split("-");while(n.length)t.push(n.join("-")),n.pop();return t}t.isString=M}).call(this,n("543d")["default"],n("c8ba"))},"3e03":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.get=a,t.post=s,t.default=void 0;var r,i=o(n("66fd"));function o(e){return e&&e.__esModule?e:{default:e}}function a(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(o,a){if(i.default.prototype.$token)var c={Authorization:i.default.prototype.$token};else c={};e.request({url:r+t,data:n,method:"GET",header:c,success:function(e){o(e.data)},fail:function(e){return Promise.reject(e)}})}))}r="https://wmswx.adprintingplus.com/api";var c=[];function s(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c.indexOf(t),c.push(t),setTimeout((function(){c.splice(c.indexOf(t),1)}),500),new Promise((function(o,a){if(i.default.prototype.$token)var c={Authorization:i.default.prototype.$token};else c={};e.request({url:r+t,data:n,method:"POST",header:c,success:function(t){console.log(t),401==t.data.code?(e.showToast({icon:"error",title:"前往登录",duration:2e3}),i.default.prototype.$token=null,e.redirectTo({url:"/pages/user/login"})):500==t.data.code?e.showToast({icon:"error",title:t.data.msg,duration:2e3}):200==t.data.code?o(t.data):t.data.code?e.showToast({icon:"error",title:t.data.msg,duration:2e3}):e.showToast({icon:"error",title:"服务器错误",duration:2e3})},fail:function(t){return e.showToast({icon:"error",title:"服务器错误",duration:2e3}),Promise.reject(t)}})}))}var u={post:s,get:a};t.default=u}).call(this,n("543d")["default"])},"4bb6":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={appid:"__UNI__C76B472"};t.default=r},"4ed7":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OPENID=t.TOKEN_NAME=void 0;var r="Authorization";t.TOKEN_NAME=r;var i="openid";t.OPENID=i},5189:function(e){e.exports=JSON.parse('{"uni-search-bar.cancel":"cancel","uni-search-bar.placeholder":"Search enter content"}')},5315:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.request=a;var r=i(n("66fd"));n("4ed7");function i(e){return e&&e.__esModule?e:{default:e}}var o="http://114.115.167.11:8081/api";function a(t,n,i){console.log(t,n,i);var a=r.default.prototype.$token;if(console.log(),console.log(!a),a)var c={Authorization:r.default.prototype.$token};else c={};return i=void 0===i?"post":i,wx.showNavigationBarLoading(),new Promise((function(r,a){e.request({url:o+t,method:i,data:n,header:c,success:function(t){var n=t.data;200!=n.code&&(e.showToast({title:n.msg,icon:"none",duration:2e3}),a()),r(n.data)},fail:function(t){console.log("请求失败=======",t),e.showToast({title:"网络异常,连接服务器失败",icon:"none",duration:2e3}),a()},complete:function(){e.hideNavigationBarLoading()}})}))}}).call(this,n("543d")["default"])},"543d":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createApp=Xt,t.createComponent=ln,t.createPage=un,t.createPlugin=dn,t.createSubpackageApp=fn,t.default=void 0;var r,i=a(n("66fd")),o=n("37dc");function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1},e.prototype.uniIDHasPermission=function(e){var t=x(),n=t.permission;return this.uniIDHasRole("admin")||n.indexOf(e)>-1},e.prototype.uniIDTokenValid=function(){var e=x(),t=e.tokenExpired;return t>Date.now()}}r="function"!==typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!w.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var O=Object.prototype.toString,A=Object.prototype.hasOwnProperty;function P(e){return"function"===typeof e}function E(e){return"string"===typeof e}function T(e){return"[object Object]"===O.call(e)}function $(e,t){return A.call(e,t)}function D(){}function I(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var j=/-(\w)/g,C=I((function(e){return e.replace(j,(function(e,t){return t?t.toUpperCase():""}))})),L=["invoke","success","fail","complete","returnValue"],M={},U={};function R(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?F(n):n}function F(e){for(var t=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return["success","fail","complete"].forEach((function(n){if(Array.isArray(e[n])){var r=t[n];t[n]=function(t){W(e[n],t).then((function(e){return P(r)&&r(e)||e}))}}})),t}function Y(e,t){var n=[];Array.isArray(M.returnValue)&&n.push.apply(n,p(M.returnValue));var r=U[e];return r&&Array.isArray(r.returnValue)&&n.push.apply(n,p(r.returnValue)),n.forEach((function(e){t=e(t)||t})),t}function G(e){var t=Object.create(null);Object.keys(M).forEach((function(e){"returnValue"!==e&&(t[e]=M[e].slice())}));var n=U[e];return n&&Object.keys(n).forEach((function(e){"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function X(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,i=new Array(r>1?r-1:0),o=1;o0&&(e.delta=n)}}}},Ae={args:function(e){var t=parseInt(e.current);if(!isNaN(t)){var n=e.urls;if(Array.isArray(n)){var r=n.length;if(r)return t<0?t=0:t>=r&&(t=r-1),t>0?(e.current=n[t],e.urls=n.filter((function(e,r){return!(r2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(T(t)){var o=!0===i?t:{};for(var a in P(n)&&(n=n(t,o)||{}),t)if($(n,a)){var c=n[a];P(c)&&(c=c(t[a],t,o)),c?E(c)?o[c]=t[a]:T(c)&&(o[c.name?c.name:a]=c.value):console.warn("The '".concat(e,"' method of platform '微信小程序' does not support option '").concat(a,"'"))}else-1!==Ce.indexOf(a)?P(t[a])&&(o[a]=Le(e,t[a],r)):i||(o[a]=t[a]);return o}return P(t)&&(t=Le(e,t,r)),t}function Ue(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return P(De.returnValue)&&(t=De.returnValue(e,t)),Me(e,t,n,{},r)}function Re(e,t){if($(De,e)){var n=De[e];return n?function(t,r){var i=n;P(n)&&(i=n(t)),t=Me(e,t,i.args,i.returnValue);var o=[t];"undefined"!==typeof r&&o.push(r),P(i.name)?e=i.name(t):E(i.name)&&(e=i.name);var a=wx[e].apply(wx,o);return oe(e)?Ue(e,a,i.returnValue,ie(e)):a}:function(){console.error("Platform '微信小程序' does not support '".concat(e,"'."))}}return t}var Fe=Object.create(null),Ne=["onTabBarMidButtonTap","subscribePush","unsubscribePush","onPush","offPush","share"];function qe(e){return function(t){var n=t.fail,r=t.complete,i={errMsg:"".concat(e,":fail method '").concat(e,"' not supported")};P(n)&&n(i),P(r)&&r(i)}}Ne.forEach((function(e){Fe[e]=qe(e)}));var Be={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]};function He(e){var t=e.service,n=e.success,r=e.fail,i=e.complete,o=!1;Be[t]?(o={errMsg:"getProvider:ok",service:t,provider:Be[t]},P(n)&&n(o)):(o={errMsg:"getProvider:fail service not found"},P(r)&&r(o)),P(i)&&i(o)}var ze=Object.freeze({__proto__:null,getProvider:He}),Ve=function(){var e;return function(){return e||(e=new i.default),e}}();function Ke(e,t,n){return e[t].apply(e,n)}function We(){return Ke(Ve(),"$on",Array.prototype.slice.call(arguments))}function Je(){return Ke(Ve(),"$off",Array.prototype.slice.call(arguments))}function Ye(){return Ke(Ve(),"$once",Array.prototype.slice.call(arguments))}function Ge(){return Ke(Ve(),"$emit",Array.prototype.slice.call(arguments))}var Xe=Object.freeze({__proto__:null,$on:We,$off:Je,$once:Ye,$emit:Ge}),Ze=Object.freeze({__proto__:null}),Qe=Page,et=Component,tt=/:/g,nt=I((function(e){return C(e.replace(tt,"-"))}));function rt(e){var t=e.triggerEvent,n=function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return it("onLoad",e),Qe(e)},Page.after=Qe.after,Component=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return it("created",e),et(e)});var ot=["onPullDownRefresh","onReachBottom","onAddToFavorites","onShareTimeline","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function at(e,t){var n=e.$mp[e.mpType];t.forEach((function(t){$(n,t)&&(e[t]=n[t])}))}function ct(e,t){if(!t)return!0;if(i.default.options&&Array.isArray(i.default.options[e]))return!0;if(t=t.default||t,P(t))return!!P(t.extendOptions[e])||!!(t.super&&t.super.options&&Array.isArray(t.super.options[e]));if(P(t[e]))return!0;var n=t.mixins;return Array.isArray(n)?!!n.find((function(t){return ct(e,t)})):void 0}function st(e,t,n){t.forEach((function(t){ct(t,n)&&(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}))}function ut(e,t){var n;return t=t.default||t,n=P(t)?t:e.extend(t),t=n.options,[n,t]}function lt(e,t){if(Array.isArray(t)&&t.length){var n=Object.create(null);t.forEach((function(e){n[e]=!0})),e.$scopedSlots=e.$slots=n}}function ft(e,t){e=(e||"").split(",");var n=e.length;1===n?t._$vueId=e[0]:2===n&&(t._$vueId=e[0],t._$vuePid=e[1])}function dt(e,t){var n=e.data||{},r=e.methods||{};if("function"===typeof n)try{n=n.call(t)}catch(i){Object({VUE_APP_NAME:"wechat",VUE_APP_PLATFORM:"mp-weixin",NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_DEBUG&&console.warn("根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。",n)}else try{n=JSON.parse(JSON.stringify(n))}catch(i){}return T(n)||(n={}),Object.keys(r).forEach((function(e){-1!==t.__lifecycle_hooks__.indexOf(e)||$(n,e)||(n[e]=r[e])})),n}var ht=[String,Number,Boolean,Object,Array,null];function pt(e){return function(t,n){this.$vm&&(this.$vm[e]=t)}}function vt(e,t){var n=e.behaviors,r=e.extends,i=e.mixins,o=e.props;o||(e.props=o=[]);var a=[];return Array.isArray(n)&&n.forEach((function(e){a.push(e.replace("uni://","wx".concat("://"))),"uni://form-field"===e&&(Array.isArray(o)?(o.push("name"),o.push("value")):(o.name={type:String,default:""},o.value={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),T(r)&&r.props&&a.push(t({properties:gt(r.props,!0)})),Array.isArray(i)&&i.forEach((function(e){T(e)&&e.props&&a.push(t({properties:gt(e.props,!0)}))})),a}function mt(e,t,n,r){return Array.isArray(t)&&1===t.length?t[0]:t}function gt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};return t||(n.vueId={type:String,value:""},n.generic={type:Object,value:null},n.scopedSlotsCompiler={type:String,value:""},n.vueSlots={type:null,value:[],observer:function(e,t){var n=Object.create(null);e.forEach((function(e){n[e]=!0})),this.setData({$slots:n})}}),Array.isArray(e)?e.forEach((function(e){n[e]={type:null,observer:pt(e)}})):T(e)&&Object.keys(e).forEach((function(t){var r=e[t];if(T(r)){var i=r.default;P(i)&&(i=i()),r.type=mt(t,r.type),n[t]={type:-1!==ht.indexOf(r.type)?r.type:null,value:i,observer:pt(t)}}else{var o=mt(t,r);n[t]={type:-1!==ht.indexOf(o)?o:null,observer:pt(t)}}})),n}function yt(e){try{e.mp=JSON.parse(JSON.stringify(e))}catch(t){}return e.stopPropagation=D,e.preventDefault=D,e.target=e.target||{},$(e,"detail")||(e.detail={}),$(e,"markerId")&&(e.detail="object"===typeof e.detail?e.detail:{},e.detail.markerId=e.markerId),T(e.detail)&&(e.target=Object.assign({},e.target,e.detail)),e}function _t(e,t){var n=e;return t.forEach((function(t){var r=t[0],i=t[2];if(r||"undefined"!==typeof i){var o,a=t[1],c=t[3];Number.isInteger(r)?o=r:r?"string"===typeof r&&r&&(o=0===r.indexOf("#s#")?r.substr(3):e.__get_value(r,n)):o=n,Number.isInteger(o)?n=i:a?Array.isArray(o)?n=o.find((function(t){return e.__get_value(a,t)===i})):T(o)?n=Object.keys(o).find((function(t){return e.__get_value(a,o[t])===i})):console.error("v-for 暂不支持循环数据:",o):n=o[i],c&&(n=e.__get_value(c,n))}})),n}function bt(e,t,n){var r={};return Array.isArray(t)&&t.length&&t.forEach((function(t,i){"string"===typeof t?t?"$event"===t?r["$"+i]=n:"arguments"===t?n.detail&&n.detail.__args__?r["$"+i]=n.detail.__args__:r["$"+i]=[n]:0===t.indexOf("$event.")?r["$"+i]=e.__get_value(t.replace("$event.",""),n):r["$"+i]=e.__get_value(t):r["$"+i]=e:r["$"+i]=_t(e,t)})),r}function wt(e){for(var t={},n=1;n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=!1;if(i&&(a=t.currentTarget&&t.currentTarget.dataset&&"wx"===t.currentTarget.dataset.comType,!n.length))return a?[t]:t.detail.__args__||t.detail;var c=bt(e,r,t),s=[];return n.forEach((function(e){"$event"===e?"__set_model"!==o||i?i&&!a?s.push(t.detail.__args__[0]):s.push(t):s.push(t.target.value):Array.isArray(e)&&"o"===e[0]?s.push(wt(e)):"string"===typeof e&&$(c,e)?s.push(c[e]):s.push(e)})),s}var xt="~",St="^";function Ot(e,t){return e===t||"regionchange"===t&&("begin"===e||"end"===e)}function At(e){var t=e.$parent;while(t&&t.$parent&&(t.$options.generic||t.$parent.$options.generic||t.$scope._$vuePid))t=t.$parent;return t&&t.$parent}function Pt(e){var t=this;e=yt(e);var n=(e.currentTarget||e.target).dataset;if(!n)return console.warn("事件信息不存在");var r=n.eventOpts||n["event-opts"];if(!r)return console.warn("事件信息不存在");var i=e.type,o=[];return r.forEach((function(n){var r=n[0],a=n[1],c=r.charAt(0)===St;r=c?r.slice(1):r;var s=r.charAt(0)===xt;r=s?r.slice(1):r,a&&Ot(i,r)&&a.forEach((function(n){var r=n[0];if(r){var i=t.$vm;if(i.$options.generic&&(i=At(i)||i),"$emit"===r)return void i.$emit.apply(i,kt(t.$vm,e,n[1],n[2],c,r));var a=i[r];if(!P(a))throw new Error(" _vm.".concat(r," is not a function"));if(s){if(a.once)return;a.once=!0}var u=kt(t.$vm,e,n[1],n[2],c,r);u=Array.isArray(u)?u:[],/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(a.toString())&&(u=u.concat([,,,,,,,,,,e])),o.push(a.apply(i,u))}}))})),"input"===i&&1===o.length&&"undefined"!==typeof o[0]?o[0]:void 0}var Et,Tt={};function $t(){if(Ct()){var e=Object.keys(__uniConfig.locales);e.length&&e.forEach((function(e){var t=Tt[e],n=__uniConfig.locales[e];t?Object.assign(t,n):Tt[e]=n}))}}Et=wx.getSystemInfoSync().language,$t();var Dt=(0,o.initVueI18n)(Et,{}),It=Dt.t;Dt.mixin={beforeCreate:function(){var e=this,t=Dt.i18n.watchLocale((function(){e.$forceUpdate()}));this.$once("hook:beforeDestroy",(function(){t()}))},methods:{$$t:function(e,t){return It(e,t)}}},Dt.setLocale,Dt.getLocale;function jt(e,t,n){var r=e.observable({locale:n||Dt.getLocale()}),i=[];t.$watchLocale=function(e){i.push(e)},Object.defineProperty(t,"$locale",{get:function(){return r.locale},set:function(e){r.locale=e,i.forEach((function(t){return t(e)}))}})}function Ct(){return"undefined"!==typeof __uniConfig&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length}var Lt={},Mt=[];function Ut(e){if(e){var t=Lt[e];return delete Lt[e],t}return Mt.shift()}var Rt=["onShow","onHide","onError","onPageNotFound","onThemeChange","onUnhandledRejection"];function Ft(){i.default.prototype.getOpenerEventChannel=function(){return this.$scope.getOpenerEventChannel()};var e=i.default.prototype.__call_hook;i.default.prototype.__call_hook=function(t,n){return"onLoad"===t&&n&&n.__id__&&(this.__eventChannel__=Ut(n.__id__),delete n.__id__),e.call(this,t,n)}}function Nt(){var e={},t={};i.default.prototype.$hasScopedSlotsParams=function(n){var r=e[n];return r||(t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))),r},i.default.prototype.$getScopedSlotsParams=function(n,r,i){var o=e[n];if(o){var a=o[r]||{};return i?a[i]:a}t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))},i.default.prototype.$setScopedSlotsParams=function(n,r){var i=this.$options.propsData.vueId;if(i){var o=i.split(",")[0],a=e[o]=e[o]||{};a[n]=r,t[o]&&t[o].$forceUpdate()}},i.default.mixin({destroyed:function(){var n=this.$options.propsData,r=n&&n.vueId;r&&(delete e[r],delete t[r])}})}function qt(e,t){var n=t.mocks,r=t.initRefs;Ft(),Nt(),e.$options.store&&(i.default.prototype.$store=e.$options.store),S(i.default),i.default.prototype.mpHost="mp-weixin",i.default.mixin({beforeCreate:function(){if(this.$options.mpType){if(this.mpType=this.$options.mpType,this.$mp=h({data:{}},this.mpType,this.$options.mpInstance),this.$scope=this.$options.mpInstance,delete this.$options.mpType,delete this.$options.mpInstance,"page"===this.mpType&&"function"===typeof getApp){var e=getApp();e.$vm&&e.$vm.$i18n&&(this._i18n=e.$vm.$i18n)}"app"!==this.mpType&&(r(this),at(this,n))}}});var o={onLaunch:function(t){this.$vm||(wx.canIUse&&!wx.canIUse("nextTick")&&console.error("当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上"),this.$vm=e,this.$vm.$mp={app:this},this.$vm.$scope=this,this.$vm.globalData=this.globalData,this.$vm._isMounted=!0,this.$vm.__call_hook("mounted",t),this.$vm.__call_hook("onLaunch",t))}};o.globalData=e.$options.globalData||{};var a=e.$options.methods;return a&&Object.keys(a).forEach((function(e){o[e]=a[e]})),jt(i.default,e,wx.getSystemInfoSync().language||"zh-Hans"),st(o,Rt),o}var Bt=["__route__","__wxExparserNodeId__","__wxWebviewId__"];function Ht(e,t){for(var n,r=e.$children,i=r.length-1;i>=0;i--){var o=r[i];if(o.$scope._$vueId===t)return o}for(var a=r.length-1;a>=0;a--)if(n=Ht(r[a],t),n)return n}function zt(e){return Behavior(e)}function Vt(){return!!this.route}function Kt(e){this.triggerEvent("__l",e)}function Wt(e,t,n){var r=e.selectAllComponents(t);r.forEach((function(e){var r=e.dataset.ref;n[r]=e.$vm||e,"scoped"===e.dataset.vueGeneric&&e.selectAllComponents(".scoped-ref").forEach((function(e){Wt(e,t,n)}))}))}function Jt(e){var t=e.$scope;Object.defineProperty(e,"$refs",{get:function(){var e={};Wt(t,".vue-ref",e);var n=t.selectAllComponents(".vue-ref-in-for");return n.forEach((function(t){var n=t.dataset.ref;e[n]||(e[n]=[]),e[n].push(t.$vm||t)})),e}})}function Yt(e){var t,n=e.detail||e.value,r=n.vuePid,i=n.vueOptions;r&&(t=Ht(this.$vm,r)),t||(t=this.$vm),i.parent=t}function Gt(e){return qt(e,{mocks:Bt,initRefs:Jt})}function Xt(e){return App(Gt(e)),e}var Zt=/[!'()*]/g,Qt=function(e){return"%"+e.charCodeAt(0).toString(16)},en=/%2C/g,tn=function(e){return encodeURIComponent(e).replace(Zt,Qt).replace(en,",")};function nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tn,n=e?Object.keys(e).map((function(n){var r=e[n];if(void 0===r)return"";if(null===r)return t(n);if(Array.isArray(r)){var i=[];return r.forEach((function(e){void 0!==e&&(null===e?i.push(t(n)):i.push(t(n)+"="+t(e)))})),i.join("&")}return t(n)+"="+t(r)})).filter((function(e){return e.length>0})).join("&"):null;return n?"?".concat(n):""}function rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPage,r=t.initRelation,o=ut(i.default,e),a=u(o,2),c=a[0],l=a[1],f=s({multipleSlots:!0,addGlobalClass:!0},l.options||{});l["mp-weixin"]&&l["mp-weixin"].options&&Object.assign(f,l["mp-weixin"].options);var d={options:f,data:dt(l,i.default.prototype),behaviors:vt(l,zt),properties:gt(l.props,!1,l.__file),lifetimes:{attached:function(){var e=this.properties,t={mpType:n.call(this)?"page":"component",mpInstance:this,propsData:e};ft(e.vueId,this),r.call(this,{vuePid:this._$vuePid,vueOptions:t}),this.$vm=new c(t),lt(this.$vm,e.vueSlots),this.$vm.$mount()},ready:function(){this.$vm&&(this.$vm._isMounted=!0,this.$vm.__call_hook("mounted"),this.$vm.__call_hook("onReady"))},detached:function(){this.$vm&&this.$vm.$destroy()}},pageLifetimes:{show:function(e){this.$vm&&this.$vm.__call_hook("onPageShow",e)},hide:function(){this.$vm&&this.$vm.__call_hook("onPageHide")},resize:function(e){this.$vm&&this.$vm.__call_hook("onPageResize",e)}},methods:{__l:Yt,__e:Pt}};return l.externalClasses&&(d.externalClasses=l.externalClasses),Array.isArray(l.wxsCallMethods)&&l.wxsCallMethods.forEach((function(e){d.methods[e]=function(t){return this.$vm[e](t)}})),n?d:[d,c]}function on(e){return rn(e,{isPage:Vt,initRelation:Kt})}var an=["onShow","onHide","onUnload"];function cn(e,t){t.isPage,t.initRelation;var n=on(e);return st(n.methods,an,e),n.methods.onLoad=function(e){this.options=e;var t=Object.assign({},e);delete t.__id__,this.$page={fullPath:"/"+(this.route||this.is)+nn(t)},this.$vm.$mp.query=e,this.$vm.__call_hook("onLoad",e)},n}function sn(e){return cn(e,{isPage:Vt,initRelation:Kt})}function un(e){return Component(sn(e))}function ln(e){return Component(on(e))}function fn(e){var t=Gt(e),n=getApp({allowDefault:!0});e.$scope=n;var r=n.globalData;if(r&&Object.keys(t.globalData).forEach((function(e){$(r,e)||(r[e]=t.globalData[e])})),Object.keys(t).forEach((function(e){$(n,e)||(n[e]=t[e])})),P(t.onShow)&&wx.onAppShow&&wx.onAppShow((function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.$.$refs["ani"].ref;if(n)return new Promise((function(i,o){nvueAnimation.transition(n,r({styles:e},t),(function(e){i()}))}))}},{key:"_nvueNextAnimate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,i=e[n];if(i){var o=i.styles,a=i.config;this._animateRun(o,a).then((function(){n+=1,t._nvueNextAnimate(e,n,r)}))}else this.currentStepAnimates={},"function"===typeof r&&r(),this.isEnd=!0}},{key:"step",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.animation.step(e),this}},{key:"run",value:function(e){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((function(){"function"===typeof e&&e()}),this.$.durationTime)}}]),t}(),u=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"],l=["opacity","backgroundColor"],f=["width","height","left","right","top","bottom"];function d(e,t){if(t)return clearTimeout(t.timer),new s(e,t)}u.concat(l,f).forEach((function(e){s.prototype[e]=function(){var t;return(t=this.animation)[e].apply(t,arguments),this}}))}).call(this,n("543d")["default"])},"66fd":function(e,t,n){"use strict";n.r(t),function(e){ /*! * Vue.js v2.6.11 * (c) 2014-2021 Evan You * Released under the MIT License. */ var n=Object.freeze({});function r(e){return void 0===e||null===e}function i(e){return void 0!==e&&null!==e}function o(e){return!0===e}function a(e){return!1===e}function c(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function s(e){return null!==e&&"object"===typeof e}var u=Object.prototype.toString;function l(e){return"[object Object]"===u.call(e)}function f(e){return"[object RegExp]"===u.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function h(e){return i(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===u?JSON.stringify(e,null,2):String(e)}function v(e){var t=parseFloat(e);return isNaN(t)?e:t}function m(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(e,t){return _.call(e,t)}function w(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var k=/-(\w)/g,x=w((function(e){return e.replace(k,(function(e,t){return t?t.toUpperCase():""}))})),S=w((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),O=/\B([A-Z])/g,A=w((function(e){return e.replace(O,"-$1").toLowerCase()}));function P(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function E(e,t){return e.bind(t)}var T=Function.prototype.bind?E:P;function $(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function D(e,t){for(var n in t)e[n]=t[n];return e}function I(e){for(var t={},n=0;n0),te=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===X),ne=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/),{}.watch);if(Y)try{var re={};Object.defineProperty(re,"passive",{get:function(){}}),window.addEventListener("test-passive",null,re)}catch(ni){}var ie=function(){return void 0===W&&(W=!Y&&!G&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),W},oe=Y&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"===typeof e&&/native code/.test(e.toString())}var ce,se="undefined"!==typeof Symbol&&ae(Symbol)&&"undefined"!==typeof Reflect&&ae(Reflect.ownKeys);ce="undefined"!==typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ue=j,le=0,fe=function(){this.id=le++,this.subs=[]};function de(e){fe.SharedObject.targetStack.push(e),fe.SharedObject.target=e,fe.target=e}function he(){fe.SharedObject.targetStack.pop(),fe.SharedObject.target=fe.SharedObject.targetStack[fe.SharedObject.targetStack.length-1],fe.target=fe.SharedObject.target}fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){y(this.subs,e)},fe.prototype.depend=function(){fe.SharedObject.target&&fe.SharedObject.target.addDep(this)},fe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===A(e)){var s=Ye(String,i.type);(s<0||c0&&(a=wt(a,(t||"")+"_"+n),bt(a[0])&&bt(u)&&(l[s]=ge(u.text+a[0].text),a.shift()),l.push.apply(l,a)):c(a)?bt(u)?l[s]=ge(u.text+a):""!==a&&l.push(ge(a)):bt(a)&&bt(u)?l[s]=ge(u.text+a.text):(o(e._isVList)&&i(a.tag)&&r(a.key)&&i(t)&&(a.key="__vlist"+t+"_"+n+"__"),l.push(a)));return l}function kt(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function xt(e){var t=St(e.$options.inject,e);t&&(Se(!1),Object.keys(t).forEach((function(n){Te(e,n,t[n])})),Se(!0))}function St(e,t){if(e){for(var n=Object.create(null),r=se?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=e?!!e.$stable:!o,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==n&&c===r.$key&&!o&&!r.$hasNormal)return r;for(var s in i={},e)e[s]&&"$"!==s[0]&&(i[s]=Et(t,s,e[s]))}else i={};for(var u in t)u in i||(i[u]=Tt(t,u));return e&&Object.isExtensible(e)&&(e._normalized=i),z(i,"$stable",a),z(i,"$key",c),z(i,"$hasNormal",o),i}function Et(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:_t(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function Tt(e,t){return function(){return e[t]}}function $t(e,t){var n,r,o,a,c;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,o=e.length;r1?$(n):n;for(var r=$(arguments,1),i='event handler for "'+e+'"',o=0,a=n.length;odocument.createEvent("Event").timeStamp&&(Nn=function(){return qn.now()})}function Bn(){var e,t;for(Nn(),Un=!0,jn.sort((function(e,t){return e.id-t.id})),Rn=0;RnRn&&jn[n].id>e.id)n--;jn.splice(n+1,0,e)}else jn.push(e);Mn||(Mn=!0,st(Bn))}}var Wn=0,Jn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Wn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ce,this.newDepIds=new ce,this.expression="","function"===typeof t?this.getter=t:(this.getter=K(t),this.getter||(this.getter=j)),this.value=this.lazy?void 0:this.get()};Jn.prototype.get=function(){var e;de(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(ni){if(!this.user)throw ni;Ge(ni,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&<(e),he(),this.cleanupDeps()}return e},Jn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Jn.prototype.cleanupDeps=function(){var e=this.deps.length;while(e--){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Jn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Kn(this)},Jn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(ni){Ge(ni,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Jn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Jn.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},Jn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var Yn={enumerable:!0,configurable:!0,get:j,set:j};function Gn(e,t,n){Yn.get=function(){return this[t][n]},Yn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Yn)}function Xn(e){e._watchers=[];var t=e.$options;t.props&&Zn(e,t.props),t.methods&&ar(e,t.methods),t.data?Qn(e):Ee(e._data={},!0),t.computed&&nr(e,t.computed),t.watch&&t.watch!==ne&&cr(e,t.watch)}function Zn(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;o||Se(!1);var a=function(o){i.push(o);var a=Ve(o,t,n,e);Te(r,o,a),o in e||Gn(e,"_props",o)};for(var c in t)a(c);Se(!0)}function Qn(e){var t=e.$options.data;t=e._data="function"===typeof t?er(t,e):t||{},l(t)||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);while(i--){var o=n[i];0,r&&b(r,o)||H(o)||Gn(e,"_data",o)}Ee(t,!0)}function er(e,t){de();try{return e.call(t,t)}catch(ni){return Ge(ni,t,"data()"),{}}finally{he()}}var tr={lazy:!0};function nr(e,t){var n=e._computedWatchers=Object.create(null),r=ie();for(var i in t){var o=t[i],a="function"===typeof o?o:o.get;0,r||(n[i]=new Jn(e,a||j,j,tr)),i in e||rr(e,i,o)}}function rr(e,t,n){var r=!ie();"function"===typeof n?(Yn.get=r?ir(t):or(n),Yn.set=j):(Yn.get=n.get?r&&!1!==n.cache?ir(t):or(n.get):j,Yn.set=n.set||j),Object.defineProperty(e,t,Yn)}function ir(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),fe.SharedObject.target&&t.depend(),t.value}}function or(e){return function(){return e.call(this,this)}}function ar(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?j:T(t[n],e)}function cr(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1)return this;var n=$(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}function gr(e){e.mixin=function(e){return this.options=He(this.options,e),this}}function yr(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name;var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=He(n.options,e),a["super"]=n,a.options.props&&_r(a),a.options.computed&&br(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,F.forEach((function(e){a[e]=n[e]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=D({},a.options),i[r]=a,a}}function _r(e){var t=e.options.props;for(var n in t)Gn(e.prototype,"_props",n)}function br(e){var t=e.options.computed;for(var n in t)rr(e.prototype,n,t[n])}function wr(e){F.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}function kr(e){return e&&(e.Ctor.options.name||e.tag)}function xr(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Sr(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var c=kr(a.componentOptions);c&&!t(c)&&Or(n,o,r,i)}}}function Or(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,y(n,t)}fr(vr),ur(vr),xn(vr),Pn(vr),dn(vr);var Ar=[String,RegExp,Array],Pr={name:"keep-alive",abstract:!0,props:{include:Ar,exclude:Ar,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Or(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){Sr(e,(function(e){return xr(t,e)}))})),this.$watch("exclude",(function(t){Sr(e,(function(e){return!xr(t,e)}))}))},render:function(){var e=this.$slots.default,t=gn(e),n=t&&t.componentOptions;if(n){var r=kr(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!xr(o,r))||a&&r&&xr(a,r))return t;var c=this,s=c.cache,u=c.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;s[l]?(t.componentInstance=s[l].componentInstance,y(u,l),u.push(l)):(s[l]=t,u.push(l),this.max&&u.length>parseInt(this.max)&&Or(s,u[0],u,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Er={KeepAlive:Pr};function Tr(e){var t={get:function(){return q}};Object.defineProperty(e,"config",t),e.util={warn:ue,extend:D,mergeOptions:He,defineReactive:Te},e.set=$e,e.delete=De,e.nextTick=st,e.observable=function(e){return Ee(e),e},e.options=Object.create(null),F.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,D(e.options.components,Er),mr(e),gr(e),yr(e),wr(e)}Tr(vr),Object.defineProperty(vr.prototype,"$isServer",{get:ie}),Object.defineProperty(vr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(vr,"FunctionalRenderContext",{value:Vt}),vr.version="2.6.11";var $r="[object Array]",Dr="[object Object]";function Ir(e,t){var n={};return jr(e,t),Cr(e,t,"",n),n}function jr(e,t){if(e!==t){var n=Mr(e),r=Mr(t);if(n==Dr&&r==Dr){if(Object.keys(e).length>=Object.keys(t).length)for(var i in t){var o=e[i];void 0===o?e[i]=null:jr(o,t[i])}}else n==$r&&r==$r&&e.length>=t.length&&t.forEach((function(t,n){jr(e[n],t)}))}}function Cr(e,t,n,r){if(e!==t){var i=Mr(e),o=Mr(t);if(i==Dr)if(o!=Dr||Object.keys(e).length1&&(t[n[0].trim()]=n[1].trim())}})),t}));function Gr(e){return Array.isArray(e)?I(e):"string"===typeof e?Yr(e):e}var Xr=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function Zr(e,t){var n=t.split("."),r=n[0];return 0===r.indexOf("__$n")&&(r=parseInt(r.replace("__$n",""))),1===n.length?e[r]:Zr(e[r],n.slice(1).join("."))}function Qr(e){e.config.errorHandler=function(t,n,r){e.util.warn("Error in "+r+': "'+t.toString()+'"',n),console.error(t);var i="function"===typeof getApp&&getApp();i&&i.onError&&i.onError(t)};var t=e.prototype.$emit;e.prototype.$emit=function(e){return this.$scope&&e&&(this.$scope["_triggerEvent"]||this.$scope["triggerEvent"]).call(this.$scope,e,{__args__:$(arguments,1)}),t.apply(this,arguments)},e.prototype.$nextTick=function(e){return Fr(this,e)},Xr.forEach((function(t){e.prototype[t]=function(e){return this.$scope&&this.$scope[t]?this.$scope[t](e):"undefined"!==typeof my?"createSelectorQuery"===t?my.createSelectorQuery(e):"createIntersectionObserver"===t?my.createIntersectionObserver(e):void 0:void 0}})),e.prototype.__init_provide=kt,e.prototype.__init_injections=xt,e.prototype.__call_hook=function(e,t){var n=this;de();var r,i=n.$options[e],o=e+" hook";if(i)for(var a=0,c=i.length;a=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),$(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;$(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function b(e,t,n,r){var i=t&&t.prototype instanceof k?t:k,o=Object.create(i.prototype),a=new D(r||[]);return o._invoke=P(e,n,a),o}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function k(){}function x(){}function S(){}function O(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e){function t(n,r,o,a){var c=w(e[n],e,r);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"===typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return t("throw",e,o,a)}))}a(c.arg)}var n;function r(e,r){function i(){return new Promise((function(n,i){t(e,r,n,i)}))}return n=n?n.then(i,i):i()}this._invoke=r}function P(e,t,n){var r=f;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return j()}n.method=i,n.arg=o;while(1){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var s=w(e,t,n);if("normal"===s.type){if(r=n.done?p:d,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}function E(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,E(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=w(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){while(++r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 o,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function p(e,t){if(e){if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},u=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,c=i/(4*o),s=(c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0))*o,u=e.min(4*s,i);if(s){for(var l=0;l>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],s=e[t+1],h=e[t+2],p=e[t+3],v=e[t+4],m=e[t+5],g=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],k=e[t+11],x=e[t+12],S=e[t+13],O=e[t+14],A=e[t+15],P=o[0],E=o[1],T=o[2],$=o[3];P=u(P,E,T,$,a,7,c[0]),$=u($,P,E,T,s,12,c[1]),T=u(T,$,P,E,h,17,c[2]),E=u(E,T,$,P,p,22,c[3]),P=u(P,E,T,$,v,7,c[4]),$=u($,P,E,T,m,12,c[5]),T=u(T,$,P,E,g,17,c[6]),E=u(E,T,$,P,y,22,c[7]),P=u(P,E,T,$,_,7,c[8]),$=u($,P,E,T,b,12,c[9]),T=u(T,$,P,E,w,17,c[10]),E=u(E,T,$,P,k,22,c[11]),P=u(P,E,T,$,x,7,c[12]),$=u($,P,E,T,S,12,c[13]),T=u(T,$,P,E,O,17,c[14]),P=l(P,E=u(E,T,$,P,A,22,c[15]),T,$,s,5,c[16]),$=l($,P,E,T,g,9,c[17]),T=l(T,$,P,E,k,14,c[18]),E=l(E,T,$,P,a,20,c[19]),P=l(P,E,T,$,m,5,c[20]),$=l($,P,E,T,w,9,c[21]),T=l(T,$,P,E,A,14,c[22]),E=l(E,T,$,P,v,20,c[23]),P=l(P,E,T,$,b,5,c[24]),$=l($,P,E,T,O,9,c[25]),T=l(T,$,P,E,p,14,c[26]),E=l(E,T,$,P,_,20,c[27]),P=l(P,E,T,$,S,5,c[28]),$=l($,P,E,T,h,9,c[29]),T=l(T,$,P,E,y,14,c[30]),P=f(P,E=l(E,T,$,P,x,20,c[31]),T,$,m,4,c[32]),$=f($,P,E,T,_,11,c[33]),T=f(T,$,P,E,k,16,c[34]),E=f(E,T,$,P,O,23,c[35]),P=f(P,E,T,$,s,4,c[36]),$=f($,P,E,T,v,11,c[37]),T=f(T,$,P,E,y,16,c[38]),E=f(E,T,$,P,w,23,c[39]),P=f(P,E,T,$,S,4,c[40]),$=f($,P,E,T,a,11,c[41]),T=f(T,$,P,E,p,16,c[42]),E=f(E,T,$,P,g,23,c[43]),P=f(P,E,T,$,b,4,c[44]),$=f($,P,E,T,x,11,c[45]),T=f(T,$,P,E,A,16,c[46]),P=d(P,E=f(E,T,$,P,h,23,c[47]),T,$,a,6,c[48]),$=d($,P,E,T,y,10,c[49]),T=d(T,$,P,E,O,15,c[50]),E=d(E,T,$,P,m,21,c[51]),P=d(P,E,T,$,x,6,c[52]),$=d($,P,E,T,p,10,c[53]),T=d(T,$,P,E,w,15,c[54]),E=d(E,T,$,P,s,21,c[55]),P=d(P,E,T,$,_,6,c[56]),$=d($,P,E,T,A,10,c[57]),T=d(T,$,P,E,g,15,c[58]),E=d(E,T,$,P,S,21,c[59]),P=d(P,E,T,$,v,6,c[60]),$=d($,P,E,T,k,10,c[61]),T=d(T,$,P,E,h,15,c[62]),E=d(E,T,$,P,b,21,c[63]),o[0]=o[0]+P|0,o[1]=o[1]+E|0,o[2]=o[2]+T|0,o[3]=o[3]+$|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var c=this._hash,s=c.words,u=0;u<4;u++){var l=s[u];s[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return c},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,r,i,o,a){var c=e+(t&n|~t&r)+i+a;return(c<>>32-o)+t}function l(e,t,n,r,i,o,a){var c=e+(t&r|n&~r)+i+a;return(c<>>32-o)+t}function f(e,t,n,r,i,o,a){var c=e+(t^n^r)+i+a;return(c<>>32-o)+t}function d(e,t,n,r,i,o,a){var c=e+(n^(t|~r))+i+a;return(c<>>32-o)+t}t.MD5=o._createHelper(s),t.HmacMD5=o._createHmacHelper(s)}(Math),n.MD5)})),j((function(e,t){var n,r,i;e.exports=(r=(n=C).lib.Base,i=n.enc.Utf8,void(n.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),c=o.words,s=a.words,u=0;u1&&void 0!==arguments[1]?arguments[1]:{};return t=W,n=e,Object.prototype.hasOwnProperty.call(t,n)||(W[e]=r),W[e]}"app-plus"===q&&(W=r._globalUniCloudObj?r._globalUniCloudObj:r._globalUniCloudObj={});var Y=["invoke","success","fail","complete"],G=J("_globalUniCloudInterceptor");function X(e,t){G[e]||(G[e]={}),U(t)&&Object.keys(t).forEach((function(n){Y.indexOf(n)>-1&&function(e,t,n){var r=G[e][t];r||(r=G[e][t]=[]),-1===r.indexOf(n)&&"function"==typeof n&&r.push(n)}(e,n,t[n])}))}function Z(e,t){G[e]||(G[e]={}),U(t)?Object.keys(t).forEach((function(n){Y.indexOf(n)>-1&&function(e,t,n){var r=G[e][t];if(r){var i=r.indexOf(n);i>-1&&r.splice(i,1)}}(e,n,t[n])})):delete G[e]}function Q(e,t){return e&&0!==e.length?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function ee(e,t){return G[e]&&G[e][t]||[]}function te(e,t){return t?function(n){var r,i=this,o="callFunction"===t&&"DCloud-clientDB"===(n&&n.name);r=this.isReady?Promise.resolve():this.initUniCloud,n=n||{};var a=r.then((function(){return o?Promise.resolve():Q(ee(t,"invoke"),n)})).then((function(){return e.call(i,n)})).then((function(e){return o?Promise.resolve(e):Q(ee(t,"success"),e).then((function(){return Q(ee(t,"complete"),e)})).then((function(){return Promise.resolve(e)}))}),(function(e){return o?Promise.reject(e):Q(ee(t,"fail"),e).then((function(){return Q(ee(t,"complete"),e)})).then((function(){return Promise.reject(e)}))}));if(!(n.success||n.fail||n.complete))return a;a.then((function(e){n.success&&n.success(e),n.complete&&n.complete(e)}),(function(e){n.fail&&n.fail(e),n.complete&&n.complete(e)}))}:function(t){if(!((t=t||{}).success||t.fail||t.complete))return e.call(this,t);e.call(this,t).then((function(e){t.success&&t.success(e),t.complete&&t.complete(e)}),(function(e){t.fail&&t.fail(e),t.complete&&t.complete(e)}))}}var ne,re=function(e){k(n,e);var t=x(n);function n(e){var r;return w(this,n),r=t.call(this,e.message),r.errMsg=e.message||"",Object.defineProperties(O(r),{code:{get:function(){return e.code}},requestId:{get:function(){return e.requestId}},message:{get:function(){return this.errMsg},set:function(e){this.errMsg=e}}}),r}return n}(A(Error));function ie(){var e=r.getLocale&&r.getLocale()||"en";if(ne)return _(_({},ne),{},{LOCALE:e});var t=r.getSystemInfoSync(),n=t.deviceId,i=t.platform;return ne={PLATFORM:q,OS:i,APPID:V,DEVICEID:n,CLIENT_SDK_VERSION:"1.0.21"},_(_({},ne),{},{LOCALE:e})}var oe,ae={sign:function(e,t){var n="";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+"&"+t+"="+e[t])})),n=n.slice(1),L(n,t).toString()},wrappedRequest:function(e,t){return new Promise((function(n,r){t(Object.assign(e,{complete:function(e){e||(e={}),N&&"h5"===q&&e.errMsg&&0===e.errMsg.indexOf("request:fail")&&console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");var t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400)return r(new re({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var i=e.data;if(i.error)return r(new re({code:i.error.code,message:i.error.message,requestId:t}));i.result=i.data,i.requestId=t,delete i.data,n(i)}}))}))}},ce={request:function(e){return r.request(e)},uploadFile:function(e){return r.uploadFile(e)},setStorageSync:function(e,t){return r.setStorageSync(e,t)},getStorageSync:function(e){return r.getStorageSync(e)},removeStorageSync:function(e){return r.removeStorageSync(e)},clearStorageSync:function(){return r.clearStorageSync()}},se={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},ue=(0,o.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},"zh-Hant":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},en:se,fr:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},es:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},ja:se},"zh-Hans"),le=ue.t,fe=function(){function e(t){w(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error(le("uniCloud.init.paramRequired",{param:e}))})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},t),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=ce,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}return g(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return ae.wrappedRequest(e,this.adapter.request)}},{key:"requestAuth",value:function(e){return this.requestWrapped(e)}},{key:"request",value:function(e,t){var n=this;return Promise.resolve().then((function(){return n.hasAccessToken?t?n.requestWrapped(e):n.requestWrapped(e).catch((function(t){return new Promise((function(e,n){!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((function(){return n.getAccessToken()})).then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))})):n.getAccessToken().then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))}))}},{key:"rebuildRequest",value:function(e){var t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=ae.sign(t.data,this.config.clientSecret),t}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=ae.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:r}}},{key:"getAccessToken",value:function(){var e=this;return"pending"===this._getAccessTokenPromiseStatus||(this._getAccessTokenPromiseStatus="pending",this._getAccessTokenPromise=this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(t){return new Promise((function(n,r){t.result&&t.result.accessToken?(e.setAccessToken(t.result.accessToken),e._getAccessTokenPromiseStatus="fulfilled",n(e.accessToken)):(e._getAccessTokenPromiseStatus="rejected",r(new re({code:"AUTH_FAILED",message:"获取accessToken失败"})))}))}),(function(t){return e._getAccessTokenPromiseStatus="rejected",Promise.reject(t)}))),this._getAccessTokenPromise}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(e){var t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}},{key:"getOSSUploadOptionsFromPath",value:function(e){var t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,o=e.filePath,a=e.fileType,c=e.onUploadProgress;return new Promise((function(e,s){var u=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:o,fileType:a,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):s(new re({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){s(new re({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof c&&u&&"function"==typeof u.onProgressUpdate&&u.onProgressUpdate((function(e){c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(e){var t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFile",value:function(e){var t=this,n=e.filePath,r=e.cloudPath,i=e.fileType,o=void 0===i?"image":i,a=e.onUploadProgress,c=e.config;if("string"!==M(r))throw new re({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(r=r.trim()))throw new re({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});if(/:\/\//.test(r))throw new re({code:"INVALID_PARAM",message:"cloudPath不合法"});var s,u,l=c&&c.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:l,filename:r}).then((function(e){var r=e.result;s=r.id,u="https://"+r.cdnDomain+"/"+r.ossPath;var i={url:"https://"+r.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:r.accessKeyId,Signature:r.signature,host:r.host,id:s,key:r.ossPath,policy:r.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:o};return t.uploadFileToOSS(Object.assign({},i,{onUploadProgress:a}))})).then((function(){return t.reportOSSUpload({id:s})})).then((function(e){return new Promise((function(t,r){e.success?t({success:!0,filePath:n,fileID:u}):r(new re({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({id:t[0]})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;return new Promise((function(e,n){Array.isArray(t)&&0!==t.length||n(new re({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),e}(),de={init:function(e){var t=new fe(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},he="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(e){e.local="local",e.none="none",e.session="session"}(oe||(oe={}));var pe,ve=function(){},me=function(){var e;if(!Promise){e=function(){},e.promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e};function ge(e){return void 0===e}function ye(e){return"[object Null]"===Object.prototype.toString.call(e)}function _e(e){var t,n,r=(t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]),i=h(r);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.isMatch,c=o.genAdapter,s=o.runtime;if(a())return{adapter:c(),runtime:s}}}catch(u){i.e(u)}finally{i.f()}}!function(e){e.WEB="web",e.WX_MP="wx_mp"}(pe||(pe={}));var be={adapter:null,runtime:void 0},we=["anonymousUuidKey"],ke=function(e){k(n,e);var t=x(n);function n(){var e;return w(this,n),e=t.call(this),be.adapter.root.tcbObject||(be.adapter.root.tcbObject={}),e}return g(n,[{key:"setItem",value:function(e,t){be.adapter.root.tcbObject[e]=t}},{key:"getItem",value:function(e){return be.adapter.root.tcbObject[e]}},{key:"removeItem",value:function(e){delete be.adapter.root.tcbObject[e]}},{key:"clear",value:function(){delete be.adapter.root.tcbObject}}]),n}(ve);function xe(e,t){switch(e){case"local":return t.localStorage||new ke;case"none":return new ke;default:return t.sessionStorage||new ke}}var Se=function(){function e(t){if(w(this,e),!this._storage){this._persistence=be.adapter.primaryStorage||t.persistence,this._storage=xe(this._persistence,be.adapter);var n="access_token_".concat(t.env),r="access_token_expire_".concat(t.env),i="refresh_token_".concat(t.env),o="anonymous_uuid_".concat(t.env),a="login_type_".concat(t.env),c="user_info_".concat(t.env);this.keys={accessTokenKey:n,accessTokenExpireKey:r,refreshTokenKey:i,anonymousUuidKey:o,loginTypeKey:a,userInfoKey:c}}}return g(e,[{key:"updatePersistence",value:function(e){if(e!==this._persistence){var t="local"===this._persistence;this._persistence=e;var n=xe(e,be.adapter);for(var r in this.keys){var i=this.keys[r];if(!t||!we.includes(r)){var o=this._storage.getItem(i);ge(o)||ye(o)||(n.setItem(i,o),this._storage.removeItem(i))}}this._storage=n}}},{key:"setStore",value:function(e,t,n){if(this._storage){var r={version:n||"localCachev1",content:t},i=JSON.stringify(r);try{this._storage.setItem(e,i)}catch(e){throw e}}}},{key:"getStore",value:function(e,t){try{if(!this._storage)return}catch(e){return""}t=t||"localCachev1";var n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}},{key:"removeStore",value:function(e){this._storage.removeItem(e)}}]),e}(),Oe={},Ae={};function Pe(e){return Oe[e]}var Ee=function e(t,n){w(this,e),this.data=n||null,this.name=t},Te=function(e){k(n,e);var t=x(n);function n(e,r){var i;return w(this,n),i=t.call(this,"error",{error:e,data:r}),i.error=e,i}return n}(Ee),$e=new(function(){function e(){w(this,e),this._listeners={}}return g(e,[{key:"on",value:function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this._listeners),this}},{key:"off",value:function(e,t){return function(e,t,n){if(n&&n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}(e,t,this._listeners),this}},{key:"fire",value:function(e,t){if(e instanceof Te)return console.error(e.error),this;var n="string"==typeof e?new Ee(e,t||{}):e,r=n.name;if(this._listens(r)){n.target=this;var i,o=this._listeners[r]?u(this._listeners[r]):[],a=h(o);try{for(a.s();!(i=a.n()).done;){var c=i.value;c.call(this,n)}}catch(s){a.e(s)}finally{a.f()}}return this}},{key:"_listens",value:function(e){return this._listeners[e]&&this._listeners[e].length>0}}]),e}());function De(e,t){$e.on(e,t)}function Ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$e.fire(e,t)}function je(e,t){$e.off(e,t)}var Ce,Le="loginStateChanged",Me="loginStateExpire",Ue="loginTypeChanged",Re="anonymousConverted",Fe="refreshAccessToken";!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Ce||(Ce={}));var Ne=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],qe={"X-SDK-Version":"1.3.5"};function Be(e,t,n){var r=e[t];e[t]=function(t){var i={},o={};n.forEach((function(n){var r=n.call(e,t),a=r.data,c=r.headers;Object.assign(i,a),Object.assign(o,c)}));var a=t.data;return a&&function(){var e;if(e=a,"[object FormData]"!==Object.prototype.toString.call(e))t.data=_(_({},a),i);else for(var n in i)a.append(n,i[n])}(),t.headers=_(_({},t.headers||{}),o),r.call(e,t)}}function He(){var e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:_(_({},qe),{},{"x-seqid":e})}}var ze=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,e),this.config=n,this._reqClass=new be.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post"]}),this._cache=Pe(this.config.env),this._localCache=(t=this.config.env,Ae[t]),Be(this._reqClass,"post",[He]),Be(this._reqClass,"upload",[He]),Be(this._reqClass,"download",[He])}return g(e,[{key:"post",value:function(){var e=s(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.post(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"upload",value:function(){var e=s(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.upload(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"download",value:function(){var e=s(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.download(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refreshAccessToken",value:function(){var e=s(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),e.prev=1,e.next=4,this._refreshAccessTokenPromise;case 4:t=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),n=e.t0;case 10:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,!n){e.next=12;break}throw n;case 12:return e.abrupt("return",t);case 13:case"end":return e.stop()}}),e,this,[[1,7]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"_refreshAccessToken",value:function(){var e=s(i.default.mark((function e(){var t,n,r,o,a,c,s,u,l,f,d,h,p;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,o=t.refreshTokenKey,a=t.loginTypeKey,c=t.anonymousUuidKey,this._cache.removeStore(n),this._cache.removeStore(r),s=this._cache.getStore(o),s){e.next=5;break}throw new Error("未登录CloudBase");case 5:return u={refresh_token:s},e.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",u);case 8:if(l=e.sent,!l.data.code){e.next=21;break}if(f=l.data.code,"SIGN_PARAM_INVALID"!==f&&"REFRESH_TOKEN_EXPIRED"!==f&&"INVALID_REFRESH_TOKEN"!==f){e.next=20;break}if(this._cache.getStore(a)!==Ce.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==f){e.next=19;break}return d=this._cache.getStore(c),h=this._cache.getStore(o),e.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:d,refresh_token:h});case 17:return p=e.sent,e.abrupt("return",(this.setRefreshToken(p.refresh_token),this._refreshAccessToken()));case 19:Ie(Me),this._cache.removeStore(o);case 20:throw new Error("刷新access token失败:".concat(l.data.code));case 21:if(!l.data.access_token){e.next=23;break}return e.abrupt("return",(Ie(Fe),this._cache.setStore(n,l.data.access_token),this._cache.setStore(r,l.data.access_token_expire+Date.now()),{accessToken:l.data.access_token,accessTokenExpire:l.data.access_token_expire}));case 23:l.data.refresh_token&&(this._cache.removeStore(o),this._cache.setStore(o,l.data.refresh_token),this._refreshAccessToken());case 24:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getAccessToken",value:function(){var e=s(i.default.mark((function e(){var t,n,r,o,a,c,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,o=t.refreshTokenKey,this._cache.getStore(o)){e.next=3;break}throw new Error("refresh token不存在,登录状态异常");case 3:if(a=this._cache.getStore(n),c=this._cache.getStore(r),s=!0,e.t0=this._shouldRefreshAccessTokenHook,!e.t0){e.next=9;break}return e.next=8,this._shouldRefreshAccessTokenHook(a,c);case 8:e.t0=!e.sent;case 9:if(e.t1=e.t0,!e.t1){e.next=12;break}s=!1;case 12:return e.abrupt("return",(!a||!c||c2&&void 0!==arguments[2]?arguments[2]:{},r=/\?/.test(t),i="";for(var o in n)""===i?!r&&(t+="?"):i+="&",i+="".concat(o,"=").concat(encodeURIComponent(n[o]));return/^http(s)?\:\/\//.test(t+=i)?t:"".concat(e).concat(t)}(he,"//tcb-api.tencentcloudapi.com/web",g),m&&(y+=m),e.next=22,this.post(_({url:y,data:u},d));case 22:if(b=e.sent,w=b.header&&b.header["x-tcb-trace"],w&&this._localCache.setStore(o,w),(200===Number(b.status)||200===Number(b.statusCode))&&b.data){e.next=26;break}throw new Error("network request error");case 26:return e.abrupt("return",b);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"send",value:function(){var e=s(i.default.mark((function e(t){var n,r,o,a=arguments;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 3:if(r=e.sent,"ACCESS_TOKEN_EXPIRED"!==r.data.code||-1!==Ne.indexOf(t)){e.next=13;break}return e.next=7,this.refreshAccessToken();case 7:return e.next=9,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 9:if(o=e.sent,!o.data.code){e.next=12;break}throw new Error("[".concat(o.data.code,"] ").concat(o.data.message));case 12:return e.abrupt("return",o.data);case 13:if(!r.data.code){e.next=15;break}throw new Error("[".concat(r.data.code,"] ").concat(r.data.message));case 15:return e.abrupt("return",r.data);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}}]),e}(),Ve={};function Ke(e){return Ve[e]}var We=function(){function e(t){w(this,e),this.config=t,this._cache=Pe(t.env),this._request=Ke(t.env)}return g(e,[{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}},{key:"setAccessToken",value:function(e,t){var n=this._cache.keys,r=n.accessTokenKey,i=n.accessTokenExpireKey;this._cache.setStore(r,e),this._cache.setStore(i,t)}},{key:"refreshUserInfo",value:function(){var e=s(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e)}}]),e}(),Je=function(){function e(t){if(w(this,e),!t)throw new Error("envId is not defined");this._envId=t,this._cache=Pe(this._envId),this._request=Ke(this._envId),this.setUserInfo()}return g(e,[{key:"linkWithTicket",value:function(e){if("string"!=typeof e)throw new Error("ticket must be string");return this._request.send("auth.linkWithTicket",{ticket:e})}},{key:"linkWithRedirect",value:function(e){e.signInWithRedirect()}},{key:"updatePassword",value:function(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}},{key:"updateEmail",value:function(e){return this._request.send("auth.updateEmail",{newEmail:e})}},{key:"updateUsername",value:function(e){if("string"!=typeof e)throw new Error("username must be a string");return this._request.send("auth.updateUsername",{username:e})}},{key:"getLinkedUidList",value:function(){var e=s(i.default.mark((function e(){var t,n,r,o;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return t=e.sent,n=t.data,r=!1,o=n.users,e.abrupt("return",(o.forEach((function(e){e.wxOpenId&&e.wxPublicId&&(r=!0)})),{users:o,hasPrimaryUid:r}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setPrimaryUid",value:function(e){return this._request.send("auth.setPrimaryUid",{uid:e})}},{key:"unlink",value:function(e){return this._request.send("auth.unlink",{platform:e})}},{key:"update",value:function(){var e=s(i.default.mark((function e(t){var n,r,o,a,c,s,u,l;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.nickName,r=t.gender,o=t.avatarUrl,a=t.province,c=t.country,s=t.city,e.next=8,this._request.send("auth.updateUserInfo",{nickName:n,gender:r,avatarUrl:o,province:a,country:c,city:s});case 8:u=e.sent,l=u.data,this.setLocalUserInfo(l);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refresh",value:function(){var e=s(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setUserInfo",value:function(){var e=this,t=this._cache.keys.userInfoKey,n=this._cache.getStore(t);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((function(t){e[t]=n[t]})),this.location={country:n.country,province:n.province,city:n.city}}},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e),this.setUserInfo()}}]),e}(),Ye=function(){function e(t){if(w(this,e),!t)throw new Error("envId is not defined");this._cache=Pe(t);var n=this._cache.keys,r=n.refreshTokenKey,i=n.accessTokenKey,o=n.accessTokenExpireKey,a=this._cache.getStore(r),c=this._cache.getStore(i),s=this._cache.getStore(o);this.credential={refreshToken:a,accessToken:c,accessTokenExpire:s},this.user=new Je(t)}return g(e,[{key:"isAnonymousAuth",get:function(){return this.loginType===Ce.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===Ce.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===Ce.WECHAT||this.loginType===Ce.WECHAT_OPEN||this.loginType===Ce.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),Ge=function(e){k(n,e);var t=x(n);function n(){return w(this,n),t.apply(this,arguments)}return g(n,[{key:"signIn",value:function(){var e=s(i.default.mark((function e(){var t,n,r,o,a,c,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._cache.updatePersistence("local"),t=this._cache.keys,n=t.anonymousUuidKey,r=t.refreshTokenKey,o=this._cache.getStore(n)||void 0,a=this._cache.getStore(r)||void 0,e.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:o,refresh_token:a});case 8:if(c=e.sent,!c.uuid||!c.refresh_token){e.next=20;break}return this._setAnonymousUUID(c.uuid),this.setRefreshToken(c.refresh_token),e.next=14,this._request.refreshAccessToken();case 14:return Ie(Le),Ie(Ue,{env:this.config.env,loginType:Ce.ANONYMOUS,persistence:"local"}),s=new Ye(this.config.env),e.next=19,s.user.refresh();case 19:return e.abrupt("return",s);case 20:throw new Error("匿名登录失败");case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=s(i.default.mark((function e(t){var n,r,o,a,c,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this._cache.keys,r=n.anonymousUuidKey,o=n.refreshTokenKey,a=this._cache.getStore(r),c=this._cache.getStore(o),e.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:a,refresh_token:c,ticket:t});case 7:if(s=e.sent,!s.refresh_token){e.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(s.refresh_token),e.next=13,this._request.refreshAccessToken();case 13:return Ie(Re,{env:this.config.env}),Ie(Ue,{loginType:Ce.CUSTOM,persistence:"local"}),e.abrupt("return",{credential:{refreshToken:s.refresh_token}});case 16:throw new Error("匿名转化失败");case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_setAnonymousUUID",value:function(e){var t=this._cache.keys,n=t.anonymousUuidKey,r=t.loginTypeKey;this._cache.removeStore(n),this._cache.setStore(n,e),this._cache.setStore(r,Ce.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),n}(We),Xe=function(e){k(n,e);var t=x(n);function n(){return w(this,n),t.apply(this,arguments)}return g(n,[{key:"signIn",value:function(){var e=s(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("ticket must be a string");case 2:return n=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signInWithTicket",{ticket:t,refresh_token:this._cache.getStore(n)||""});case 5:if(r=e.sent,!r.refresh_token){e.next=15;break}return this.setRefreshToken(r.refresh_token),e.next=10,this._request.refreshAccessToken();case 10:return Ie(Le),Ie(Ue,{env:this.config.env,loginType:Ce.CUSTOM,persistence:this.config.persistence}),e.next=14,this.refreshUserInfo();case 14:return e.abrupt("return",new Ye(this.config.env));case 15:throw new Error("自定义登录失败");case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),n}(We),Ze=function(e){k(n,e);var t=x(n);function n(){return w(this,n),t.apply(this,arguments)}return g(n,[{key:"signIn",value:function(){var e=s(i.default.mark((function e(t,n){var r,o,a,c,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("email must be a string");case 2:return r=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:t,password:n,refresh_token:this._cache.getStore(r)||""});case 5:if(o=e.sent,a=o.refresh_token,c=o.access_token,s=o.access_token_expire,!a){e.next=22;break}if(this.setRefreshToken(a),!c||!s){e.next=15;break}this.setAccessToken(c,s),e.next=17;break;case 15:return e.next=17,this._request.refreshAccessToken();case 17:return e.next=19,this.refreshUserInfo();case 19:return Ie(Le),Ie(Ue,{env:this.config.env,loginType:Ce.EMAIL,persistence:this.config.persistence}),e.abrupt("return",new Ye(this.config.env));case 22:throw o.code?new Error("邮箱登录失败: [".concat(o.code,"] ").concat(o.message)):new Error("邮箱登录失败");case 23:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"activate",value:function(){var e=s(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.activateEndUserMail",{token:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"resetPasswordWithToken",value:function(){var e=s(i.default.mark((function e(t,n){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.resetPasswordWithToken",{token:t,newPassword:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(We),Qe=function(e){k(n,e);var t=x(n);function n(){return w(this,n),t.apply(this,arguments)}return g(n,[{key:"signIn",value:function(){var e=s(i.default.mark((function e(t,n){var r,o,a,c,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("username must be a string");case 2:return"string"!=typeof n&&(n="",console.warn("password is empty")),r=this._cache.keys.refreshTokenKey,e.next=6,this._request.send("auth.signIn",{loginType:Ce.USERNAME,username:t,password:n,refresh_token:this._cache.getStore(r)||""});case 6:if(o=e.sent,a=o.refresh_token,c=o.access_token_expire,s=o.access_token,!a){e.next=23;break}if(this.setRefreshToken(a),!s||!c){e.next=16;break}this.setAccessToken(s,c),e.next=18;break;case 16:return e.next=18,this._request.refreshAccessToken();case 18:return e.next=20,this.refreshUserInfo();case 20:return Ie(Le),Ie(Ue,{env:this.config.env,loginType:Ce.USERNAME,persistence:this.config.persistence}),e.abrupt("return",new Ye(this.config.env));case 23:throw o.code?new Error("用户名密码登录失败: [".concat(o.code,"] ").concat(o.message)):new Error("用户名密码登录失败");case 24:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(We),et=function(){function e(t){w(this,e),this.config=t,this._cache=Pe(t.env),this._request=Ke(t.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),De(Ue,this._onLoginTypeChanged)}return g(e,[{key:"anonymousAuthProvider",value:function(){return new Ge(this.config)}},{key:"customAuthProvider",value:function(){return new Xe(this.config)}},{key:"emailAuthProvider",value:function(){return new Ze(this.config)}},{key:"usernameAuthProvider",value:function(){return new Qe(this.config)}},{key:"signInAnonymously",value:function(){var e=s(i.default.mark((function e(){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Ge(this.config).signIn());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signInWithEmailAndPassword",value:function(){var e=s(i.default.mark((function e(t,n){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Ze(this.config).signIn(t,n));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"signInWithUsernameAndPassword",value:function(e,t){return new Qe(this.config).signIn(e,t)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=s(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new Ge(this.config)),De(Re,this._onAnonymousConverted),e.next=3,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"signOut",value:function(){var e=s(i.default.mark((function e(){var t,n,r,o,a,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.loginType!==Ce.ANONYMOUS){e.next=2;break}throw new Error("匿名用户不支持登出操作");case 2:if(t=this._cache.keys,n=t.refreshTokenKey,r=t.accessTokenKey,o=t.accessTokenExpireKey,a=this._cache.getStore(n),a){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,this._request.send("auth.logout",{refresh_token:a});case 7:return c=e.sent,e.abrupt("return",(this._cache.removeStore(n),this._cache.removeStore(r),this._cache.removeStore(o),Ie(Le),Ie(Ue,{env:this.config.env,loginType:Ce.NULL,persistence:this.config.persistence}),c));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signUpWithEmailAndPassword",value:function(){var e=s(i.default.mark((function e(t,n){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.signUpWithEmailAndPassword",{email:t,password:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"sendPasswordResetEmail",value:function(){var e=s(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.sendPasswordResetEmail",{email:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"onLoginStateChanged",value:function(e){var t=this;De(Le,(function(){var n=t.hasLoginState();e.call(t,n)}));var n=this.hasLoginState();e.call(this,n)}},{key:"onLoginStateExpired",value:function(e){De(Me,e.bind(this))}},{key:"onAccessTokenRefreshed",value:function(e){De(Fe,e.bind(this))}},{key:"onAnonymousConverted",value:function(e){De(Re,e.bind(this))}},{key:"onLoginTypeChanged",value:function(e){var t=this;De(Ue,(function(){var n=t.hasLoginState();e.call(t,n)}))}},{key:"getAccessToken",value:function(){var e=s(i.default.mark((function e(){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.getAccessToken();case 2:return e.t0=e.sent.accessToken,e.t1=this.config.env,e.abrupt("return",{accessToken:e.t0,env:e.t1});case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"hasLoginState",value:function(){var e=this._cache.keys.refreshTokenKey;return this._cache.getStore(e)?new Ye(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var e=s(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("username must be a string");case 2:return e.next=4,this._request.send("auth.isUsernameRegistered",{username:t});case 4:return n=e.sent,r=n.data,e.abrupt("return",r&&r.isRegistered);case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getLoginState",value:function(){return Promise.resolve(this.hasLoginState())}},{key:"signInWithTicket",value:function(){var e=s(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Xe(this.config).signIn(t));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"shouldRefreshAccessToken",value:function(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}},{key:"getUserInfo",value:function(){return this._request.send("auth.getUserInfo",{}).then((function(e){return e.code?e:_(_({},e.data),{},{requestId:e.seqId})}))}},{key:"getAuthHeader",value:function(){var e=this._cache.keys,t=e.refreshTokenKey,n=e.accessTokenKey,r=this._cache.getStore(t);return{"x-cloudbase-credentials":this._cache.getStore(n)+"/@@/"+r}}},{key:"_onAnonymousConverted",value:function(e){var t=e.data.env;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}},{key:"_onLoginTypeChanged",value:function(e){var t=e.data,n=t.loginType,r=t.persistence,i=t.env;i===this.config.env&&(this._cache.updatePersistence(r),this._cache.setStore(this._cache.keys.loginTypeKey,n))}},{key:"currentUser",get:function(){var e=this.hasLoginState();return e&&e.user||null}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),tt=function(e,t){t=t||me();var n=Ke(this.config.env),r=e.cloudPath,i=e.filePath,o=e.onUploadProgress,a=e.fileType,c=void 0===a?"image":a;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){var a=e.data,s=a.url,u=a.authorization,l=a.token,f=a.fileId,d=a.cosFileId,h=e.requestId,p={key:r,signature:u,"x-cos-meta-fileid":d,success_action_status:"201","x-cos-security-token":l};n.upload({url:s,data:p,file:i,name:r,fileType:c,onUploadProgress:o}).then((function(e){201===e.statusCode?t(null,{fileID:f,requestId:h}):t(new Error("STORAGE_REQUEST_FAIL: ".concat(e.data)))})).catch((function(e){t(e)}))})).catch((function(e){t(e)})),t.promise},nt=function(e,t){t=t||me();var n=Ke(this.config.env),r=e.cloudPath;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){t(null,e)})).catch((function(e){t(e)})),t.promise},rt=function(e,t){var n=e.fileList;if(t=t||me(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};var r,i=h(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(!o||"string"!=typeof o)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"}}}catch(c){i.e(c)}finally{i.f()}var a={fileid_list:n};return Ke(this.config.env).send("storage.batchDeleteFile",a).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},it=function(e,t){var n=e.fileList;t=t||me(),n&&Array.isArray(n)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});var r,i=[],o=h(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;"object"==typeof a?(a.hasOwnProperty("fileID")&&a.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),i.push({fileid:a.fileID,max_age:a.maxAge})):"string"==typeof a?i.push({fileid:a}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"})}}catch(s){o.e(s)}finally{o.f()}var c={file_list:i};return Ke(this.config.env).send("storage.batchGetDownloadUrl",c).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},ot=function(){var e=s(i.default.mark((function e(t,n){var r,o,a,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=t.fileID,e.next=3,it.call(this,{fileList:[{fileID:r,maxAge:600}]});case 3:if(o=e.sent.fileList[0],"SUCCESS"===o.code){e.next=6;break}return e.abrupt("return",n?n(o):new Promise((function(e){e(o)})));case 6:if(a=Ke(this.config.env),c=o.download_url,c=encodeURI(c),n){e.next=10;break}return e.abrupt("return",a.download({url:c}));case 10:return e.t0=n,e.next=13,a.download({url:c});case 13:e.t1=e.sent,(0,e.t0)(e.t1);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),at=function(e,t){var n,r=e.name,i=e.data,o=e.query,a=e.parse,c=e.search,s=t||me();try{n=i?JSON.stringify(i):""}catch(r){return Promise.reject(r)}if(!r)return Promise.reject(new Error("函数名不能为空"));var u={inQuery:o,parse:a,search:c,function_name:r,request_data:n};return Ke(this.config.env).send("functions.invokeFunction",u).then((function(e){if(e.code)s(null,e);else{var t=e.data.response_data;if(a)s(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),s(null,{result:t,requestId:e.requestId})}catch(e){s(new Error("response data must be json"))}}return s.promise})).catch((function(e){s(e)})),s.promise},ct={timeout:15e3,persistence:"session"},st={},ut=function(){function e(t){w(this,e),this.config=t||this.config,this.authObj=void 0}return g(e,[{key:"init",value:function(t){switch(be.adapter||(this.requestClient=new be.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"请求在".concat((t.timeout||5e3)/1e3,"s内未完成,已中断")})),this.config=_(_({},ct),t),!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new e(this.config)}},{key:"auth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.persistence;if(this.authObj)return this.authObj;var n,r=t||be.adapter.primaryStorage||ct.persistence;return r!==this.config.persistence&&(this.config.persistence=r),function(e){var t=e.env;Oe[t]=new Se(e),Ae[t]=new Se(_(_({},e),{},{persistence:"local"}))}(this.config),n=this.config,Ve[n.env]=new ze(n),this.authObj=new et(this.config),this.authObj}},{key:"on",value:function(e,t){return De.apply(this,[e,t])}},{key:"off",value:function(e,t){return je.apply(this,[e,t])}},{key:"callFunction",value:function(e,t){return at.apply(this,[e,t])}},{key:"deleteFile",value:function(e,t){return rt.apply(this,[e,t])}},{key:"getTempFileURL",value:function(e,t){return it.apply(this,[e,t])}},{key:"downloadFile",value:function(e,t){return ot.apply(this,[e,t])}},{key:"uploadFile",value:function(e,t){return tt.apply(this,[e,t])}},{key:"getUploadMetadata",value:function(e,t){return nt.apply(this,[e,t])}},{key:"registerExtension",value:function(e){st[e.name]=e}},{key:"invokeExtension",value:function(){var e=s(i.default.mark((function e(t,n){var r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=st[t],r){e.next=3;break}throw Error("扩展".concat(t," 必须先注册"));case 3:return e.next=5,r.invoke(n,this);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"useAdapters",value:function(e){var t=_e(e)||{},n=t.adapter,r=t.runtime;n&&(be.adapter=n),r&&(be.runtime=r)}}]),e}(),lt=new ut;function ft(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),i="";for(var o in n)""===i?!r&&(t+="?"):i+="&",i+=o+"="+encodeURIComponent(n[o]);return/^http(s)?:\/\//.test(t+=i)?t:""+e+t}var dt=function(){function e(){w(this,e)}return g(e,[{key:"post",value:function(e){var t=e.url,n=e.data,r=e.headers;return new Promise((function(e,i){ce.request({url:ft("https:",t),data:n,method:"POST",header:r,success:function(t){e(t)},fail:function(e){i(e)}})}))}},{key:"upload",value:function(e){return new Promise((function(t,n){var r=e.url,i=e.file,o=e.data,a=e.headers,c=e.fileType,s=ce.uploadFile({url:ft("https:",r),name:"file",formData:Object.assign({},o),filePath:i,fileType:c,header:a,success:function(e){var n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&o.success_action_status&&(n.statusCode=parseInt(o.success_action_status,10)),t(n)},fail:function(e){N&&"mp-alipay"===q&&console.warn("支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试"),n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&s&&"function"==typeof s.onProgressUpdate&&s.onProgressUpdate((function(t){e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}]),e}(),ht={setItem:function(e,t){ce.setStorageSync(e,t)},getItem:function(e){return ce.getStorageSync(e)},removeItem:function(e){ce.removeStorageSync(e)},clear:function(){ce.clearStorageSync()}},pt={genAdapter:function(){return{root:{},reqClass:dt,localStorage:ht,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};lt.useAdapters(pt);var vt=lt,mt=vt.init;vt.init=function(e){e.env=e.spaceId;var t=mt.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;var n=t.auth;return t.auth=function(e){var t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(e){t[e]=te(t[e]).bind(t)})),t},t.customAuth=t.auth,t};var gt=vt;function yt(){return{token:ce.getStorageSync("uni_id_token")||ce.getStorageSync("uniIdToken"),tokenExpired:ce.getStorageSync("uni_id_token_expired")}}function _t(){N&&"h5"===q&&r.getStorageSync("__LAST_DCLOUD_APPID")!==V&&(r.setStorageSync("__LAST_DCLOUD_APPID",V),console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"),ce.removeStorageSync("uni_id_token"),ce.removeStorageSync("uniIdToken"),ce.removeStorageSync("uni_id_token_expired"))}var bt=function(e){k(n,e);var t=x(n);function n(){return w(this,n),t.apply(this,arguments)}return g(n,[{key:"getAccessToken",value:function(){var e=this;return new Promise((function(t,n){var r="Anonymous_Access_token";e.setAccessToken(r),t(r)}))}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=ae.sign(n,this.config.clientSecret);var i=ie();r["x-client-info"]=JSON.stringify(i);var o=yt(),a=o.token;return r["x-client-token"]=a,{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:JSON.parse(JSON.stringify(r))}}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,o=e.filePath,a=e.fileType,c=e.onUploadProgress;return new Promise((function(e,s){var u=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:o,fileType:a,success:function(t){t&&t.statusCode<400?e(t):s(new re({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){s(new re({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof c&&u&&"function"==typeof u.onProgressUpdate&&u.onProgressUpdate((function(e){c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(e){var t,n=this,r=e.filePath,i=e.cloudPath,o=e.fileType,a=void 0===o?"image":o,c=e.onUploadProgress;if(!i)throw new re({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});return this.getOSSUploadOptionsFromPath({cloudPath:i}).then((function(e){var i=e.result,o=i.url,s=i.formData,u=i.name;t=e.result.fileUrl;var l={url:o,formData:s,name:u,filePath:r,fileType:a};return n.uploadFileToOSS(Object.assign({},l,{onUploadProgress:c}))})).then((function(){return n.reportOSSUpload({cloudPath:i})})).then((function(e){return new Promise((function(n,i){e.success?n({success:!0,filePath:r,fileID:t}):i(new re({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList,n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}}]),n}(fe),wt={init:function(e){var t=new bt(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};function kt(e){var t,n=e.data;t=ie();var r=JSON.parse(JSON.stringify(n||{}));if(Object.assign(r,{clientInfo:t}),!r.uniIdToken){var i=yt(),o=i.token;o&&(r.uniIdToken=o)}return r}function xt(e){var t=this,n=e.name,r=e.data,i=this.localAddress,o=this.localPort,a={aliyun:"aliyun",tencent:"tcb"}[this.config.provider],c=this.config.spaceId,s="http://".concat(i,":").concat(o,"/system/check-function"),u="http://".concat(i,":").concat(o,"/cloudfunctions/").concat(n);return new Promise((function(e,t){ce.request({method:"POST",url:s,data:{name:n,platform:q,provider:a,spaceId:c},timeout:3e3,success:function(t){e(t)},fail:function(){e({data:{code:"NETWORK_ERROR",message:"连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"}})}})})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data,n=t||{},r=n.code,i=n.message;return{code:0===r?0:r||"SYS_ERR",message:i||"SYS_ERR"}})).then((function(e){var i=e.code,o=e.message;if(0!==i){switch(i){case"MODULE_ENCRYPTED":console.error("此云函数(".concat(n,")依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数"));break;case"FUNCTION_ENCRYPTED":console.error("此云函数(".concat(n,")已加密不可本地调试,自动切换为云端已部署的云函数"));break;case"ACTION_ENCRYPTED":console.error(o||"需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case"NETWORK_ERROR":var c="连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(c),new Error(c);case"SWITCH_TO_CLOUD":break;default:var s="检测本地调试服务出现错误:".concat(o,",请检查网络环境或重启客户端再试");throw console.error(s),new Error(s)}return t._originCallFunction({name:n,data:r})}return new Promise((function(e,n){var i=kt.call(t,{data:r});ce.request({method:"POST",url:u,data:{provider:a,platform:q,param:i},success:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.statusCode,i=t.data;return!r||r>=400?n(new re({code:i.code||"SYS_ERR",message:i.message||"request:fail"})):e({result:i})},fail:function(e){n(new re({code:e.code||e.errCode||"SYS_ERR",message:e.message||e.errMsg||"request:fail"}))}})}))}))}var St=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}],Ot=/[\\^$.*+?()[\]{}|]/g,At=RegExp(Ot.source);function Pt(e,t,n){return e.replace(new RegExp((r=t)&&At.test(r)?r.replace(Ot,"\\$&"):r,"g"),n);var r}function Et(e){var t=e.functionName,n=e.result,r=e.logPvd;if(this.config.useDebugFunction&&n&&n.requestId){var i=JSON.stringify({spaceId:this.config.spaceId,functionName:t,requestId:n.requestId});console.log("[".concat(r,"-request]").concat(i,"[/").concat(r,"-request]"))}}function Tt(e){var t=e.callFunction,n=function(n){var r=this,i=n.name;n.data=kt.call(e,{data:n.data});var o={aliyun:"aliyun",tencent:"tcb"}[this.config.provider];return t.call(this,n).then((function(e){return Et.call(r,{functionName:i,result:e,logPvd:o}),Promise.resolve(e)}),(function(e){return Et.call(r,{functionName:i,result:e,logPvd:o}),e&&e.message&&(e.message=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=void 0===t?"":t,r=e.extraInfo,i=void 0===r?{}:r,o=e.formatter,a=void 0===o?[]:o,c=0;c-1||e[t].push(n)},off:function(t,n){e[t]=e[t]||[];var r=e[t].indexOf(n);-1!==r&&e[t].splice(r,1)}}}var jt=["db.Geo","db.command","command.aggregate"];function Ct(e,t){return jt.indexOf("".concat(e,".").concat(t))>-1}function Lt(e){switch(M(e)){case"array":return e.map((function(e){return Lt(e)}));case"object":return e._internalType===$t||Object.keys(e).forEach((function(t){e[t]=Lt(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}var Mt=function(){function e(t,n,r){w(this,e),this.content=t,this.prevStage=n||null,this.udb=null,this._database=r}return g(e,[{key:"toJSON",value:function(){for(var e=this,t=[e.content];e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((function(e){return{$method:e.$method,$param:Lt(e.$param)}}))}}},{key:"getAction",value:function(){var e=this.toJSON().$db.find((function(e){return"action"===e.$method}));return e&&e.$param&&e.$param[0]}},{key:"getCommand",value:function(){return{$db:this.toJSON().$db.filter((function(e){return"action"!==e.$method}))}}},{key:"get",value:function(){return this._send("get",Array.from(arguments))}},{key:"add",value:function(){return this._send("add",Array.from(arguments))}},{key:"remove",value:function(){return this._send("remove",Array.from(arguments))}},{key:"update",value:function(){return this._send("update",Array.from(arguments))}},{key:"end",value:function(){return this._send("end",Array.from(arguments))}},{key:"set",value:function(){throw new Error("clientDB禁止使用set方法")}},{key:"_send",value:function(e,t){var n=this.getAction(),r=this.getCommand();if(r.$db.push({$method:e,$param:Lt(t)}),N){var i=r.$db.find((function(e){return"collection"===e.$method})),o=i&&i.$param;o&&1===o.length&&"string"==typeof i.$param[0]&&i.$param[0].indexOf(",")>-1&&console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。")}return this._database._callCloudFunction({action:n,command:r})}},{key:"useAggregate",get:function(){for(var e=this,t=!1;e.prevStage;){e=e.prevStage;var n=e.content.$method;if("aggregate"===n||"pipeline"===n){t=!0;break}}return t}},{key:"count",get:function(){if(!this.useAggregate)return function(){return this._send("count",Array.from(arguments))};var e=this;return function(){return Ut({$method:"count",$param:Lt(Array.from(arguments))},e,this._database)}}}]),e}();function Ut(e,t,n){return Dt(new Mt(e,t,n),{get:function(e,t){var r="db";return e&&e.content&&(r=e.content.$method),Ct(r,t)?Ut({$method:t},e,n):function(){return Ut({$method:t,$param:Lt(Array.from(arguments))},e,n)}}})}function Rt(e){var t=e.path,n=e.method;return function(){function e(){w(this,e),this.param=Array.from(arguments)}return g(e,[{key:"toJSON",value:function(){return{$newDb:[].concat(u(t.map((function(e){return{$method:e}}))),[{$method:n,$param:this.param}])}}}]),e}()}var Ft,Nt=function(e){k(n,e);var t=x(n);function n(){return w(this,n),t.apply(this,arguments)}return g(n,[{key:"_callCloudFunction",value:function(e){var t=this,n=e.action,r=e.command,i=e.multiCommand,o=e.queryList;function a(e,t){if(i&&o)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.token,n=e.tokenExpired;t&&ce.setStorageSync("uni_id_token",t),n&&ce.setStorageSync("uni_id_token_expired",n)}({token:o,tokenExpired:c}),t._callbackAuth("refreshToken",[{token:o,tokenExpired:c}]),t._callback("refreshToken",[{token:o,tokenExpired:c}]));var y=e.result.affectedDocs;return"number"==typeof y&&Object.defineProperty(e.result,"affectedDocs",{get:function(){return console.warn("affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"),y}}),Q(ee("database","success"),e).then((function(){return Q(ee("database","complete"),e)})).then((function(){return a(e,null),Promise.resolve(e)}))}),(function(e){var n=new R(e.message,e.code||"SYSTEM_ERROR");return t._callback("error",[n]),/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),Q(ee("database","fail"),e).then((function(){return Q(ee("database","complete"),e)})).then((function(){return a(null,e),Promise.reject(e)}))}))}}]),n}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.uniClient,r=void 0===n?{}:n;w(this,e),this._uniClient=r,this._authCallBacks={},this._dbCallBacks={},r.isDefault&&(this._dbCallBacks=J("_globalUniCloudDatabaseCallback")),this.auth=It(this._authCallBacks),Object.assign(this,It(this._dbCallBacks)),this.env=Dt({},{get:function(e,t){return{$env:t}}}),this.Geo=Dt({},{get:function(e,t){return Rt({path:["Geo"],method:t})}}),this.serverDate=Rt({path:[],method:"serverDate"}),this.RegExp=Rt({path:[],method:"RegExp"})}return g(e,[{key:"getCloudEnv",value:function(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}},{key:"_callback",value:function(e,t){var n=this._dbCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,u(t))}))}},{key:"_callbackAuth",value:function(e,t){var n=this._authCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,u(t))}))}},{key:"multiSend",value:function(){var e=Array.from(arguments),t=e.map((function(e){var t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}]),e}());function qt(e){e.database=function(t){if(t&&Object.keys(t).length>0)return e.init(t).database();if(this._database)return this._database;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Dt(new e(t),{get:function(e,t){return Ct("db",t)?Ut({$method:t},null,e):function(){return Ut({$method:t,$param:Lt(Array.from(arguments))},null,e)}}})}(Nt,{uniClient:e});return this._database=n,n}}var Bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ht=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function zt(){var e,t,n=yt().token||"",r=n.split(".");if(!n||3!==r.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{e=JSON.parse((t=r[1],decodeURIComponent(Ft(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(n){throw new Error("获取当前用户信息出错,详细错误信息为:"+n.message)}return e.tokenExpired=1e3*e.exp,delete e.exp,delete e.iat,e}Ft="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Ht.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var Vt=I(j((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="chooseAndUploadFile:ok",i="chooseAndUploadFile:fail";function o(e,t){return e.tempFiles.forEach((function(e,n){e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((function(e){return e.path}))),e}function a(e,t,r){var i=r.onChooseFile,o=r.onUploadProgress;return t.then((function(e){if(i){var t=i(e);if(void 0!==t)return Promise.resolve(t).then((function(t){return void 0===t?e:t}))}return e})).then((function(t){return!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg=n;var o=t.tempFiles,a=o.length,c=0;return new Promise((function(n){for(;c=a)!o.find((function(e){return!e.url&&!e.errMsg}))&&n(t);else{var u=o[r];e.uploadFile({filePath:u.path,cloudPath:u.cloudPath,fileType:u.fileType,onUploadProgress:function(e){e.index=r,e.tempFile=u,e.tempFilePath=u.path,i&&i(e)}}).then((function(e){u.url=e.fileID,r0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===t.type?a(e,function(e){var t=e.count,n=e.sizeType,a=e.sourceType,c=void 0===a?["album","camera"]:a,s=e.extension;return new Promise((function(e,a){r.chooseImage({count:t,sizeType:n,sourceType:c,extension:s,success:function(t){e(o(t,"image"))},fail:function(e){a({errMsg:e.errMsg.replace("chooseImage:fail",i)})}})}))}(t),t):"video"===t.type?a(e,function(e){var t=e.camera,n=e.compressed,a=e.maxDuration,c=e.sourceType,s=void 0===c?["album","camera"]:c,u=e.extension;return new Promise((function(e,c){r.chooseVideo({camera:t,compressed:n,maxDuration:a,sourceType:s,extension:u,success:function(t){var n=t.tempFilePath,r=t.duration,i=t.size,a=t.height,c=t.width;e(o({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:i,type:t.tempFile&&t.tempFile.type||"",width:c,height:a,duration:r,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){c({errMsg:e.errMsg.replace("chooseVideo:fail",i)})}})}))}(t),t):a(e,function(e){var t=e.count,n=e.extension;return new Promise((function(e,a){var c=r.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(c=wx.chooseMessageFile),"function"!=typeof c)return a({errMsg:i+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});c({type:"all",count:t,extension:n,success:function(t){e(o(t))},fail:function(e){a({errMsg:e.errMsg.replace("chooseFile:fail",i)})}})}))}(t),t)}}}))),Kt="manual";function Wt(e){return{props:{localdata:{type:Array,default:function(){return[]}},options:{type:[Object,Array],default:function(){return{}}},spaceInfo:{type:Object,default:function(){return{}}},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:function(){return{mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{}}},created:function(){var e=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var t=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){if(e.loadtime!==Kt){for(var r=!1,i=[],o=2;o0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,r=void 0!==n&&n,i=t.success,o=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,o=n.data,a=n.count;e.getcount&&(e.mixinDatacomPage.count=a),e.mixinDatacomHasMore=o.length0&&void 0!==arguments[0]?arguments[0]:{},r=e.database(this.spaceInfo),i=n.action||this.action;i&&(r=r.action(i));var o=n.collection||this.collection;r=Array.isArray(o)?(t=r).collection.apply(t,u(o)):r.collection(o);var a=n.where||this.where;a&&Object.keys(a).length&&(r=r.where(a));var c=n.field||this.field;c&&(r=r.field(c));var s=n.foreignKey||this.foreignKey;s&&(r=r.foreignKey(s));var l=n.groupby||this.groupby;l&&(r=r.groupBy(l));var f=n.groupField||this.groupField;f&&(r=r.groupField(f)),!0===(void 0!==n.distinct?n.distinct:this.distinct)&&(r=r.distinct());var d=n.orderby||this.orderby;d&&(r=r.orderBy(d));var h=void 0!==n.pageCurrent?n.pageCurrent:this.mixinDatacomPage.current,p=void 0!==n.pageSize?n.pageSize:this.mixinDatacomPage.size,v=void 0!==n.getcount?n.getcount:this.getcount,m=void 0!==n.gettree?n.gettree:this.gettree,g=void 0!==n.gettreepath?n.gettreepath:this.gettreepath,y={getCount:v},_={limitLevel:void 0!==n.limitlevel?n.limitlevel:this.limitlevel,startWith:void 0!==n.startwith?n.startwith:this.startwith};return m&&(y.getTree=_),g&&(y.getTreePath=_),r=r.skip(p*(h-1)).limit(p).get(y),r}}}}function Jt(e,t){return Yt.apply(this,arguments)}function Yt(){return Yt=s(i.default.mark((function e(t,n){var r,o,a;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r="http://".concat(t,":").concat(n,"/system/ping"),e.prev=1,e.next=4,a={url:r,timeout:500},new Promise((function(e,t){ce.request(_(_({},a),{},{success:function(t){e(t)},fail:function(e){t(e)}}))}));case 4:return o=e.sent,e.abrupt("return",!(!o.data||0!==o.data.code));case 8:return e.prev=8,e.t0=e["catch"](1),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),Yt.apply(this,arguments)}function Gt(e){if(!e.initUniCloudStatus||"rejected"===e.initUniCloudStatus){var t,n=Promise.resolve();t=1,n=new Promise((function(e,n){setTimeout((function(){e()}),t)})),e.isReady=!1,e.isDefault=!1;var r=e.auth();e.initUniCloudStatus="pending",e.initUniCloud=n.then((function(){return r.getLoginState()})).then((function(e){return e?Promise.resolve():r.signInAnonymously()})).then((function(){if(!N)return Promise.resolve();if(N&&e.debugInfo){var t=e.debugInfo,n=t.address,r=t.servePort;return function(){var e=s(i.default.mark((function e(t,n){var r,o,a;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:o=0;case 1:if(!(o0&&void 0!==arguments[0]?arguments[0]:{},n=t.address,r=t.port;if(!N)return Promise.resolve();if(n)e.localAddress=n,e.localPort=r;else if(e.debugInfo){var i=console["app-plus"===q?"error":"warn"],o="";"remote"===e.debugInfo.initialLaunchType?(e.debugInfo.forceRemote=!0,o="当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs"):o="无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs","h5"===q&&(o+="\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"),i(o)}})).then((function(){_t(),e.isReady=!0,e.initUniCloudStatus="fulfilled"})).catch((function(t){console.error(t),e.initUniCloudStatus="rejected"}))}}var Xt=new(function(){function e(){w(this,e)}return g(e,[{key:"init",value:function(e){var t={},n=!1!==e.debugFunction&&N&&("h5"===q&&navigator.userAgent.indexOf("HBuilderX")>0||"app-plus"===q);switch(e.provider){case"tencent":t=gt.init(Object.assign(e,{useDebugFunction:n}));break;case"aliyun":t=de.init(Object.assign(e,{useDebugFunction:n}));break;case"private":t=wt.init(Object.assign(e,{useDebugFunction:n}));break;default:throw new Error("未提供正确的provider参数")}var r=B;return N&&r&&!r.code&&(t.debugInfo=r),Gt(t),t.reInit=function(){Gt(this)},Tt(t),function(e){var t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),qt(t),function(e){e.getCurrentUserInfo=zt,e.chooseAndUploadFile=Vt.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Wt(e)}})}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((function(e){if(t[e]){var n=t[e];t[e]=function(){return t.reInit(),n.apply(t,Array.from(arguments))},t[e]=te(t[e],e).bind(t)}})),t.init=this.init,t}}]),e}());(function(){var e=H,t={};if(1===e.length)t=e[0],Xt=Xt.init(t),Xt.isDefault=!0;else{var n,r=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo"];n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":z?"应用未关联服务空间,请在uniCloud目录右键关联服务空间":"uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间",r.forEach((function(e){Xt[e]=function(){return console.error(n),Promise.reject(new re({code:"SYS_ERR",message:n}))}}))}Object.assign(Xt,{get mixinDatacom(){return Wt(Xt)}}),Xt.addInterceptor=X,Xt.removeInterceptor=Z,N&&"h5"===q&&(window.uniCloud=Xt)})();var Zt=Xt;t.default=Zt}).call(this,n("c8ba"),n("543d")["default"])},ac0b:function(e,t,n){},b942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBind=i,t.getInfo=o,t.usernameLogin=a,t.getMaterialGroupList=c,t.getPurchaseByMaterialIdList=s,t.addBatch=u;var r=n("5315");function i(e){return(0,r.request)("/wx/login/isBind",e)}function o(e){return(0,r.request)("/wx/login/getUserInfo",e)}function a(e){return(0,r.request)("/wx/login/usernameLogin",e)}function c(e){return(0,r.request)("/wx/createQrcode/getMaterialGroupList",e)}function s(e){return(0,r.request)("/wx/createQrcode/getPurchaseByMaterialIdList",e)}function u(e){return(0,r.request)("/wx/createQrcode/addBatch",e)}},bbdd:function(e,t,n){var r=function(){return this||"object"===typeof self&&self}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n("96cf"),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(a){r.regeneratorRuntime=void 0}},c34e:function(e){e.exports=JSON.parse('{"uni-search-bar.cancel":"cancel","uni-search-bar.placeholder":"請輸入搜索內容"}')},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},db7f:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("a34a"));function i(e){return e&&e.__esModule?e:{default:e}}function o(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}}),t&&a(e,t)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function c(e){var t=l();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){d(o,r,i,a,c,"next",e)}function c(e){d(o,r,i,a,c,"throw",e)}a(void 0)}))}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=["label"];n.forEach((function(t){void 0===e[t]&&(e[t]="")}));var r=t;for(var i in e){var o=new RegExp("{"+i+"}");r=r.replace(o,e[i])}return r}function b(e,t){return void 0===e||null===e||("string"===typeof e&&!e||(!(!Array.isArray(e)||e.length)||"object"===t&&!Object.keys(e).length))}var w={integer:function(e){return w.number(e)&&parseInt(e,10)===e},string:function(e){return"string"===typeof e},number:function(e){return!isNaN(e)&&"number"===typeof e},boolean:function(e){return"boolean"===typeof e},float:function(e){return w.number(e)&&!w.integer(e)},array:function(e){return Array.isArray(e)},object:function(e){return"object"===typeof e&&!w.array(e)},date:function(e){return e instanceof Date},timestamp:function(e){return!(!this.integer(e)||Math.abs(e).toString().length>16)},file:function(e){return"string"===typeof e.url},email:function(e){return"string"===typeof e&&!!e.match(g.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(g.url)},pattern:function(e,t){try{return new RegExp(e).test(t)}catch(n){return!1}},method:function(e){return"function"===typeof e},idcard:function(e){return"string"===typeof e&&!!e.match(g.idcard)},"url-https":function(e){return this.url(e)&&e.startsWith("https://")},"url-scheme":function(e){return e.startsWith("://")},"url-web":function(e){return!1}},k=function(){function e(t){p(this,e),this._message=t}return m(e,[{key:"validateRule",value:function(){var e=h(r.default.mark((function e(t,n,i,o,a){var c,s,u,l,f,d,h,p,v;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(c=null,s=n.rules,u=s.findIndex((function(e){return e.required})),!(u<0)){e.next=8;break}if(null!==i&&void 0!==i){e.next=6;break}return e.abrupt("return",c);case 6:if("string"!==typeof i||i.length){e.next=8;break}return e.abrupt("return",c);case 8:if(l=this._message,void 0!==s){e.next=11;break}return e.abrupt("return",l["default"]);case 11:f=0;case 12:if(!(f-1&&(s=!0),s?null:_(e,i||n["enum"])},rangeNumber:function(e,t,n){if(!w.number(t))return _(e,e.errorMessage||n.pattern.mismatch);var r=e.minimum,i=e.maximum,o=e.exclusiveMinimum,a=e.exclusiveMaximum,c=o?t<=r:t=i:t>i;return void 0!==r&&c?_(e,e.errorMessage||n["number"][o?"exclusiveMinimum":"minimum"]):void 0!==i&&s?_(e,e.errorMessage||n["number"][a?"exclusiveMaximum":"maximum"]):void 0!==r&&void 0!==i&&(c||s)?_(e,e.errorMessage||n["number"].range):null},rangeLength:function(e,t,n){if(!w.string(t)&&!w.array(t))return _(e,e.errorMessage||n.pattern.mismatch);var r=e.minLength,i=e.maxLength,o=t.length;return void 0!==r&&oi?_(e,e.errorMessage||n["length"].maxLength):void 0!==r&&void 0!==i&&(oi)?_(e,e.errorMessage||n["length"].range):null},pattern:function(e,t,n){return w["pattern"](e.pattern,t)?null:_(e,e.errorMessage||n.pattern.mismatch)},format:function(e,t,n){var r=Object.keys(w),i=y[e.format]?y[e.format]:e.format||e.arrayType;return r.indexOf(i)>-1&&!w[i](t)?_(e,e.errorMessage||n.typeError):null},arrayTypeFormat:function(e,t,n){if(!Array.isArray(t))return _(e,e.errorMessage||n.typeError);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"uniPopup",t=this.$parent,n=t.$options.name;while(n!==e){if(t=t.$parent,!t)return!1;n=t.$options.name}return t}}};t.default=r},f05e:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=(t.date,t.selected),i=t.startDate,o=t.endDate,a=t.range;r(this,e),this.date=this.getDate(new Date),this.selected=n||[],this.startDate=i,this.endDate=o,this.range=a,this.cleanMultipleStatus(),this.weeks={},this.lastHover=!1}return o(e,[{key:"setDate",value:function(e){this.selectDate=this.getDate(e),this._getWeek(this.selectDate.fullDate)}},{key:"cleanMultipleStatus",value:function(){this.multipleStatus={before:"",after:"",data:[]}}},{key:"resetSatrtDate",value:function(e){this.startDate=e}},{key:"resetEndDate",value:function(e){this.endDate=e}},{key:"getDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"day";e||(e=new Date),"object"!==typeof e&&(e=e.replace(/-/g,"/"));var r=new Date(e);switch(n){case"day":r.setDate(r.getDate()+t);break;case"month":31===r.getDate()?r.setDate(r.getDate()+t):r.setMonth(r.getMonth()+t);break;case"year":r.setFullYear(r.getFullYear()+t);break}var i=r.getFullYear(),o=r.getMonth()+1<10?"0"+(r.getMonth()+1):r.getMonth()+1,a=r.getDate()<10?"0"+r.getDate():r.getDate();return{fullDate:i+"-"+o+"-"+a,year:i,month:o,date:a,day:r.getDay()}}},{key:"_getLastMonthDays",value:function(e,t){for(var n=[],r=e;r>0;r--){var i=new Date(t.year,t.month-1,1-r).getDate();n.push({date:i,month:t.month-1,disable:!0})}return n}},{key:"_currentMonthDys",value:function(e,t){for(var n=this,r=[],i=this.date.fullDate,o=function(e){var o=t.year+"-"+(t.month,t.month+"-")+(e<10?"0"+e:e),a=i===o,c=n.selected&&n.selected.find((function(e){if(n.dateEqual(o,e.date))return e})),s=!0,u=!0;n.startDate&&(s=n.dateCompare(n.startDate,o)),n.endDate&&(u=n.dateCompare(o,n.endDate));var l=n.multipleStatus.data,f=!1,d=-1;n.range&&(l&&(d=l.findIndex((function(e){return n.dateEqual(e,o)}))),-1!==d&&(f=!0));var h={fullDate:o,year:t.year,date:e,multiple:!!n.range&&f,beforeMultiple:n.isLogicBefore(o,n.multipleStatus.before,n.multipleStatus.after),afterMultiple:n.isLogicAfter(o,n.multipleStatus.before,n.multipleStatus.after),month:t.month,disable:!(s&&u),isDay:a,userChecked:!1};c&&(h.extraInfo=c),r.push(h)},a=1;a<=e;a++)o(a);return r}},{key:"_getNextMonthDays",value:function(e,t){for(var n=[],r=1;r1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm:ss",n=new Date(e),r={YYYY:n.getFullYear(),MM:(n.getMonth()+1).toString().padStart(2,"0"),DD:n.getDate().toString().padStart(2,"0"),HH:n.getHours().toString().padStart(2,"0"),mm:n.getMinutes().toString().padStart(2,"0"),ss:n.getSeconds()};for(var i in r)t=t.replace(i,r[i]);return t};t.dateFormat=d;var h=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),i=e.getHours()<10?"0"+e.getHours():e.getHours(),o=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),a=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds();n>=1&&n<=9&&(n="0"+n),r>=0&&r<=9&&(r="0"+r);var c=t+"-"+n+"-"+r+" "+i+":"+o+":"+a;return c};t.getTime=h}).call(this,n("543d")["default"])}}]);