text: (this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"05ea":function(t,e,n){"use strict";(function(t,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;s(n("7fd7"));var o=n("2f62"),i=s(n("6842"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l={components:{mInput:i.default},data:function(){return{loginType:0,loginTypeList:["\u5bc6\u7801\u767b\u5f55","\u514d\u5bc6\u767b\u5f55"],mobile:"",code:"",providerList:[],hasProvider:!1,username:"",password:"",positionTop:0,isDevtools:!1,codeDuration:0}},computed:(0,o.mapState)(["forcedLogin"]),methods:c({},(0,o.mapMutations)(["login"]),{initProvider:function(){var e=this,n=["weixin","qq","sinaweibo"];uni.getProvider({service:"oauth",success:function(t){if(t.provider&&t.provider.length){for(var r=0;r<t.provider.length;r++)~n.indexOf(t.provider[r])&&e.providerList.push({value:t.provider[r],image:"../../static/img/"+t.provider[r]+".png"});e.hasProvider=!0}},fail:function(e){t("error","\u83b7\u53d6\u670d\u52a1\u4f9b\u5e94\u5546\u5931\u8d25\uff1a"+JSON.stringify(e)," at pages/login/login.vue:95")}})},initPosition:function(){this.positionTop=uni.getSystemInfoSync().windowHeight-100},sendSmsCode:function(){var t=this;this.codeDuration&&uni.showModal({content:"\u8bf7\u5728".concat(this.codeDuration,"\u79d2\u540e\u91cd\u8bd5"),showCancel:!1}),/^1\d{10}$/.test(this.mobile)?r.callFunction({name:"user-center",data:{action:"sendSmsCode",params:{mobile:this.mobile}},success:function(e){0==e.result.code?(uni.showModal({content:"\u9a8c\u8bc1\u7801\u53d1\u9001\u6210\u529f\uff0c\u8bf7\u6ce8\u610f\u67e5\u6536",showCancel:!1}),t.codeDuration=60,t.codeInterVal=setInterval((function(){t.codeDuration--,0===t.codeDuration&&t.codeInterVal&&(clearInterval(t.codeInterVal),t.codeInterVal=null)}),1e3)):uni.showModal({content:"\u9a8c\u8bc1\u7801\u53d1\u9001\u5931\u8d25\uff1a"+e.result.msg,showCancel:!1})},fail:function(t){uni.showModal({content:"\u9a8c\u8bc1\u7801\u53d1\u9001\u5931\u8d25",showCancel:!1})}}):uni.showModal({content:"\u624b\u673a\u53f7\u7801\u586b\u5199\u9519\u8bef",showCancel:!1})},loginByPwd:function(){if(this.username.length<3)uni.showToast({icon:"none",title:"\u8d26\u53f7\u6700\u77ed\u4e3a 3 \u4e2a\u5b57\u7b26"});else if(this.password.length<6)uni.showToast({icon:"none",title:"\u5bc6\u7801\u6700\u77ed\u4e3a 6 \u4e2a\u5b57\u7b26"});else{var e={username:this.username,password:this.password},n=this;r.callFunction({name:"user-center",data:{action:"login",params:e},success:function(e){t("log","login success",e," at pages/login/login.vue:193"),0==e.result.code?(uni.setStorageSync("uniIdToken",e.result.token),uni.setStorageSync("username",e.result.username),uni.setStorageSync("login_type","online"),n.toMain(n.username)):(uni.showModal({content:e.result.msg,showCancel:!1}),t("log","\u767b\u5f55\u5931\u8d25",e," at pages/login/login.vue:205"))},fail:function(t){uni.showModal({content:JSON.stringify(t),showCancel:!1})}})}},loginBySms:function(){if(/^1\d{10}$/.test(this.mobile))if(/^\d{6}$/.test(this.code)){var e=this;r.callFunction({name:"user-center",data:{action:"loginBySms",params:{mobile:this.mobile,code:this.code}},success:function(n){if(t("log","login success",n," at pages/login/login.vue:245"),0==n.result.code){var r=n.result.username||"\u65b0\u7528\u6237";uni.setStorageSync("uniIdToken",n.result.token),uni.setStorageSync("username",r),uni.setStorageSync("login_type","online"),e.toMain(r)}else uni.showModal({content:n.result.msg,showCancel:!1}),t("log","\u767b\u5f55\u5931\u8d25",n," at pages/login/login.vue:258")},fail:function(t){uni.showModal({content:JSON.stringify(t),showCancel:!1})}})}else uni.showModal({title:"\u9a8c\u8bc1\u7801\u4e3a6\u4f4d\u7eaf\u6570\u5b57",showCancel:!1});else uni.showModal({content:"\u624b\u673a\u53f7\u7801\u586b\u5199\u9519\u8bef",showCancel:!1})},bindLogin:function(){switch(this.loginType){case 0:this.loginByPwd();break;case 1:this.loginBySms();break;default:break}},oauth:function(e){var n=this;t("log","\u4e09\u65b9\u767b\u5f55\u53ea\u6f14\u793a\u767b\u5f55api\u80fd\u529b\uff0c\u6682\u672a\u5173\u8054\u4e91\u7aef\u6570\u636e"," at pages/login/login.vue:283"),uni.login({provider:e,success:function(t){uni.getUserInfo({provider:e,success:function(t){n.loginLocal(t.userInfo.nickName)},fail:function(){uni.showToast({icon:"none",title:"\u767b\u9646\u5931\u8d25"})}})},fail:function(e){t("error","\u6388\u6743\u767b\u5f55\u5931\u8d25\uff1a"+JSON.stringify(e)," at pages/login/login.vue:305")}})},getUserInfo:function(e){var n=e.detail;t("log","\u4e09\u65b9\u767b\u5f55\u53ea\u6f14\u793a\u767b\u5f55api\u80fd\u529b\uff0c\u6682\u672a\u5173\u8054\u4e91\u7aef\u6570\u636e"," at pages/login/login.vue:312"),n.userInfo?this.loginLocal(n.userInfo.nickName):uni.showToast({icon:"none",title:"\u767b\u9646\u5931\u8d25"})},loginLocal:function(t){uni.setStorageSync("login_type","local"),uni.setStorageSync("username",t),this.toMain(t)},toMain:function(t){this.login(t),this.forcedLogin?uni.reLaunch({url:"../main/main"}):uni.navigateBack()}}),onReady:function(){this.initPosition(),this.initProvider()}};e.default=l}).call(this,n("0de9")["default"],n("a9ff")["default"])},"09b8":function(t,e,n){"use strict";(function(t,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={data:function(){return{avatarUrl:"../../static/img/logo.png"}},computed:s({},(0,o.mapState)(["hasLogin","forcedLogin","userName"])),methods:s({},(0,o.mapMutations)(["logout"]),{bindLogin:function(){uni.navigateTo({url:"../login/login"})},bindLogout:function(){var e=this,n=uni.getStorageSync("login_type");if("local"===n)return this.logout(),void(this.forcedLogin&&uni.reLaunch({url:"../login/login"}));t.callFunction({name:"user-center",data:{action:"logout"},success:function(t){r("log","logout success",t," at pages/user/user.vue:90"),0==t.result.code?(e.logout(),uni.removeStorageSync("uniIdToken"),uni.removeStorageSync("username"),e.forcedLogin&&uni.reLaunch({url:"../login/login"})):(uni.showModal({content:t.result.msg,showCancel:!1}),r("log","\u767b\u51fa\u5931\u8d25",t," at pages/user/user.vue:109"))},fail:function(t){uni.showModal({content:JSON.stringify(t),showCancel:!1})}})}})};e.default=c}).call(this,n("a9ff")["default"],n("0de9")["default"])},"0c6b":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("2f62");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a={onLaunch:function(){var e=uni.getStorageSync("uniIdToken");e&&this.login(uni.getStorageSync("username")),t("log","App Launch"," at App.vue:13")},onShow:function(){t("log","App Show"," at App.vue:16")},onHide:function(){t("log","App Hide"," at App.vue:19")},methods:i({},(0,r.mapMutations)(["login"]))};e.default=a}).call(this,n("0de9")["default"])},"0dca":function(t,e,n){"use strict";n.r(e);var r=n("6ffb"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"0de9":function(t,e,n){"use strict";function r(t){var e=Object.prototype.toString.call(t);return e.substring(8,e.length-1)}function o(){return"string"===typeof __channelId__&&__channelId__}function i(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];console[t].apply(console,n)}function s(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e.shift();if(o())return e.push(e.pop().replace("at ","uni-app:///")),console[i].apply(console,e);var s=e.map((function(t){var e=Object.prototype.toString.call(t).toLowerCase();if("[object object]"===e||"[object array]"===e)try{t="---BEGIN:JSON---"+JSON.stringify(t)+"---END:JSON---"}catch(o){t="[object object]"}else if(null===t)t="---NULL---";else if(void 0===t)t="---UNDEFINED---";else{var n=r(t).toUpperCase();t="NUMBER"===n||"BOOLEAN"===n?"---BEGIN:"+n+"---"+t+"---END:"+n+"---":String(t)}return t})),a="";if(s.length>1){var c=s.pop();a=s.join("---COMMA---"),0===c.indexOf(" at ")?a+=c:a+="---COMMA---"+c}else a=s[0];console[i](a)}n.r(e),n.d(e,"log",(function(){return i})),n.d(e,"default",(function(){return s}))},"15cc":function(t,e,n){"use strict";n.r(e);var r=n("d074"),o=n("613b");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);var s,a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},"1a8f":function(t,e,n){"use strict";var r,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","content"),attrs:{_i:0}},[t._$s(1,"i",t.hasLogin)?n("view",{staticClass:t._$s(1,"sc","hello"),attrs:{_i:1}},[n("view",{staticClass:t._$s(2,"sc","title"),attrs:{_i:2}},[t._v(t._$s(2,"t0-0",t._s(t.userName)))]),n("view",{staticClass:t._$s(3,"sc","ul"),attrs:{_i:3}},[n("view"),n("view")])]):t._e(),t._$s(6,"i",!t.hasLogin)?n("view",{staticClass:t._$s(6,"sc","hello"),attrs:{_i:6}},[n("video",{attrs:{_i:7}}),n("view",{staticClass:t._$s(8,"sc","title"),attrs:{_i:8}}),n("view",{staticClass:t._$s(9,"sc","ul"),attrs:{_i:9}},[n("view"),n("view")])]):t._e()])},i=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))},"2e1a":function(t,e,n){"use strict";n.r(e);var r=n("3880");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var i,s,a,c,u=n("f0c5"),l=Object(u["a"])(r["default"],i,s,!1,null,null,null,!1,a,c);e["default"]=l.exports},"2f62":function(t,e,n){"use strict";n.r(e),n.d(e,"Store",(function(){return h})),n.d(e,"install",(function(){return j})),n.d(e,"mapState",(function(){return C})),n.d(e,"mapMutations",(function(){return A})),n.d(e,"mapGetters",(function(){return x})),n.d(e,"mapActions",(function(){return I})),n.d(e,"createNamespacedHelpers",(function(){return N}));
  /**
   * vuex v3.0.1
   * (c) 2017 Evan You
   * @license MIT
   */
  var r=function(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:r});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[r].concat(t.init):r,n.call(this,t)}}function r(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}},o="undefined"!==typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t){o&&(t._devtoolHook=o,o.emit("vuex:init",t),o.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){o.emit("vuex:mutation",t,e)})))}function s(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function a(t){return null!==t&&"object"===typeof t}function c(t){return t&&"function"===typeof t.then}var u=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},l={namespaced:{configurable:!0}};l.namespaced.get=function(){return!!this._rawModule.namespaced},u.prototype.addChild=function(t,e){this._children[t]=e},u.prototype.removeChild=function(t){delete this._children[t]},u.prototype.getChild=function(t){return this._children[t]},u.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},u.prototype.forEachChild=function(t){s(this._children,t)},u.prototype.forEachGetter=function(t){this._rawModule.getters&&s(this._rawModule.getters,t)},u.prototype.forEachAction=function(t){this._rawModule.actions&&s(this._rawModule.actions,t)},u.prototype.forEachMutation=function(t){this._rawModule.mutations&&s(this._rawModule.mutations,t)},Object.defineProperties(u.prototype,l);var f=function(t){this.register([],t,!1)};function p(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return void 0;p(t.concat(r),e.getChild(r),n.modules[r])}}f.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},f.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},f.prototype.update=function(t){p([],this.root,t)},f.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new u(e,n);if(0===t.length)this.root=o;else{var i=this.get(t.slice(0,-1));i.addChild(t[t.length-1],o)}e.modules&&s(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},f.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var d;var h=function(t){var e=this;void 0===t&&(t={}),!d&&"undefined"!==typeof window&&window.Vue&&j(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1);var o=t.state;void 0===o&&(o={}),"function"===typeof o&&(o=o()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new f(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new d;var s=this,a=this,c=a.dispatch,u=a.commit;this.dispatch=function(t,e){return c.call(s,t,e)},this.commit=function(t,e,n){return u.call(s,t,e,n)},this.strict=r,m(this,o,[],this._modules.root),_(this,o),n.forEach((function(t){return t(e)})),d.config.devtools&&i(this)},v={state:{configurable:!0}};function g(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function y(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;m(t,n,[],t._modules.root,!0),_(t,n,e)}function _(t,e,n){var r=t._vm;t.getters={};var o=t._wrappedGetters,i={};s(o,(function(e,n){i[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var a=d.config.silent;d.config.silent=!0,t._vm=new d({data:{$$state:e},computed:i}),d.config.silent=a,t.strict&&T(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),d.nextTick((function(){return r.$destroy()})))}function m(t,e,n,r,o){var i=!n.length,s=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[s]=r),!i&&!o){var a=E(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){d.set(a,c,r.state)}))}var u=r.context=b(t,s,n);r.forEachMutation((function(e,n){var r=s+n;O(t,r,e,u)})),r.forEachAction((function(e,n){var r=e.root?n:s+n,o=e.handler||e;S(t,r,o,u)})),r.forEachGetter((function(e,n){var r=s+n;k(t,r,e,u)})),r.forEachChild((function(r,i){m(t,e,n.concat(i),r,o)}))}function b(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=P(n,r,o),s=i.payload,a=i.options,c=i.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:r?t.commit:function(n,r,o){var i=P(n,r,o),s=i.payload,a=i.options,c=i.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return w(t,e)}},state:{get:function(){return E(t.state,n)}}}),o}function w(t,e){var n={},r=e.length;return Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),n}function O(t,e,n,r){var o=t._mutations[e]||(t._mutations[e]=[]);o.push((function(e){n.call(t,r.state,e)}))}function S(t,e,n,r){var o=t._actions[e]||(t._actions[e]=[]);o.push((function(e,o){var i=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e,o);return c(i)||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}function k(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function T(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function E(t,e){return e.length?e.reduce((function(t,e){return t[e]}),t):t}function P(t,e,n){return a(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function j(t){d&&t===d||(d=t,r(d))}v.state.get=function(){return this._vm._data.$$state},v.state.set=function(t){0},h.prototype.commit=function(t,e,n){var r=this,o=P(t,e,n),i=o.type,s=o.payload,a=(o.options,{type:i,payload:s}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(t){t(s)}))})),this._subscribers.forEach((function(t){return t(a,r.state)})))},h.prototype.dispatch=function(t,e){var n=this,r=P(t,e),o=r.type,i=r.payload,s={type:o,payload:i},a=this._actions[o];if(a)return this._actionSubscribers.forEach((function(t){return t(s,n.state)})),a.length>1?Promise.all(a.map((function(t){return t(i)}))):a[0](i)},h.prototype.subscribe=function(t){return g(t,this._subscribers)},h.prototype.subscribeAction=function(t){return g(t,this._actionSubscribers)},h.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},h.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},h.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),m(this,this.state,t,this._modules.get(t),n.preserveState),_(this,this.state)},h.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=E(e.state,t.slice(0,-1));d.delete(n,t[t.length-1])})),y(this)},h.prototype.hotUpdate=function(t){this._modules.update(t),y(this,!0)},h.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(h.prototype,v);var C=M((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=L(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"===typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),A=M((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=L(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),x=M((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||L(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})),I=M((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=L(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),N=function(t){return{mapState:C.bind(null,t),mapGetters:x.bind(null,t),mapMutations:A.bind(null,t),mapActions:I.bind(null,t)}};function $(t){return Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}}))}function M(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function L(t,e,n){var r=t._modulesNamespaceMap[n];return r}var R={Store:h,install:j,version:"3.0.1",mapState:C,mapMutations:A,mapGetters:x,mapActions:I,createNamespacedHelpers:N};e["default"]=R},"32ec":function(t,e,n){"use strict";n("3be8");var r=s(n("8bbf")),o=s(n("2e1a")),i=s(n("e162"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}r.default.config.productionTip=!1,r.default.prototype.$store=i.default,o.default.mpType="app";var l=new r.default(c({store:i.default},o.default));l.$mount()},3880:function(t,e,n){"use strict";n.r(e);var r=n("0c6b"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"3be8":function(t,e,n){"undefined"===typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){throw n}))}))}),uni.restoreGlobal&&uni.restoreGlobal(weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),__definePage("pages/main/main",(function(){return Vue.extend(n("53a8").default)})),__definePage("pages/login/login",(function(){return Vue.extend(n("8c4a").default)})),__definePage("pages/reg/reg",(function(){return Vue.extend(n("15cc").default)})),__definePage("pages/pwd/pwd",(function(){return Vue.extend(n("638a").default)})),__definePage("pages/user/user",(function(){return Vue.extend(n("692e").default)}))},4623:function(t,e,n){"use strict";n.r(e);var r=n("09b8"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"4fe5":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={appid:"__UNI__4D57A3F"};e.default=r},"53a8":function(t,e,n){"use strict";n.r(e);var r=n("1a8f"),o=n("6770");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);var s,a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},"5a69":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;o(n("7fd7"));var r=o(n("6842"));function o(t){return t&&t.__esModule?t:{default:t}}var i={components:{mInput:r.default},data:function(){return{email:""}},methods:{findPassword:function(){this.email.length<3||!~this.email.indexOf("@")?uni.showToast({icon:"none",title:"\u90ae\u7bb1\u5730\u5740\u4e0d\u5408\u6cd5"}):uni.showToast({icon:"none",title:"\u5df2\u53d1\u9001\u91cd\u7f6e\u90ae\u4ef6\u81f3\u6ce8\u518c\u90ae\u7bb1\uff0c\u8bf7\u6ce8\u610f\u67e5\u6536\u3002",duration:3e3})}}};e.default=i},"5e19":function(t,e,n){"use strict";var r,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","content"),attrs:{_i:0}},[n("view",{staticClass:t._$s(1,"sc","input-group"),attrs:{_i:1}},[n("view",{staticClass:t._$s(2,"sc","input-row"),attrs:{_i:2}},[n("text",{staticClass:t._$s(3,"sc","title"),attrs:{_i:3}}),n("m-input",{attrs:{type:"text",focus:!0,clearable:!0,placeholder:"\u8bf7\u8f93\u5165\u90ae\u7bb1",_i:4},model:{value:t._$s(4,"v-model",t.email),callback:function(e){t.email=e},expression:"email"}})],1)]),n("view",{staticClass:t._$s(5,"sc","btn-row"),attrs:{_i:5}},[n("button",{staticClass:t._$s(6,"sc","primary"),attrs:{_i:6},on:{click:t.findPassword}})])])},i=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))},6018:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={props:{type:String},methods:{onClick:function(){this.$emit("click")}}};e.default=r},"613b":function(t,e,n){"use strict";n.r(e);var r=n("802a"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"638a":function(t,e,n){"use strict";n.r(e);var r=n("5e19"),o=n("d8a3");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);var s,a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},6770:function(t,e,n){"use strict";n.r(e);var r=n("dd9a"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"67c7":function(t,e,n){"use strict";var r,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","content"),attrs:{_i:0}},[n("view",{staticClass:t._$s(1,"sc","login-type"),attrs:{_i:1}},t._l(t._$s(2,"f",{forItems:t.loginTypeList}),(function(e,r,o,i){return n("view",{key:t._$s(2,"f",{forIndex:o,key:r}),staticClass:t._$s("2-"+i,"sc","login-type-btn"),class:t._$s("2-"+i,"c",{act:t.loginType===r}),attrs:{_i:"2-"+i},on:{click:function(e){t.loginType=r}}},[t._v(t._$s("2-"+i,"t0-0",t._s(e)))])})),0),t._$s(3,"i",0===t.loginType)?n("view",{staticClass:t._$s(3,"sc","input-group"),attrs:{_i:3}},[n("view",{staticClass:t._$s(4,"sc","input-row border"),attrs:{_i:4}},[n("text",{staticClass:t._$s(5,"sc","title"),attrs:{_i:5}}),n("m-input",{staticClass:t._$s(6,"sc","m-input"),attrs:{type:"text",clearable:!0,focus:!0,placeholder:"\u8bf7\u8f93\u5165\u8d26\u53f7",_i:6},model:{value:t._$s(6,"v-model",t.username),callback:function(e){t.username=e},expression:"username"}})],1),n("view",{staticClass:t._$s(7,"sc","input-row"),attrs:{_i:7}},[n("text",{staticClass:t._$s(8,"sc","title"),attrs:{_i:8}}),n("m-input",{attrs:{type:"password",displayable:!0,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",_i:9},model:{value:t._$s(9,"v-model",t.password),callback:function(e){t.password=e},expression:"password"}})],1)]):n("view",{staticClass:t._$s(10,"sc","input-group"),attrs:{_i:10}},[n("view",{staticClass:t._$s(11,"sc","input-row border"),attrs:{_i:11}},[n("text",{staticClass:t._$s(12,"sc","title"),attrs:{_i:12}}),n("m-input",{staticClass:t._$s(13,"sc","m-input"),attrs:{type:"text",clearable:!0,focus:!0,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7\u7801",_i:13},model:{value:t._$s(13,"v-model",t.mobile),callback:function(e){t.mobile=e},expression:"mobile"}})],1),n("view",{staticClass:t._$s(14,"sc","input-row"),attrs:{_i:14}},[n("text",{staticClass:t._$s(15,"sc","title"),attrs:{_i:15}}),n("m-input",{attrs:{type:"text",placeholder:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",_i:16},model:{value:t._$s(16,"v-model",t.code),callback:function(e){t.code=e},expression:"code"}}),n("view",{staticClass:t._$s(17,"sc","send-code-btn"),attrs:{_i:17},on:{click:t.sendSmsCode}},[t._v(t._$s(17,"t0-0",t._s(t.codeDuration?t.codeDuration+"s":"\u53d1\u9001\u9a8c\u8bc1\u7801")))])],1)]),n("view",{staticClass:t._$s(18,"sc","btn-row"),attrs:{_i:18}},[n("button",{staticClass:t._$s(19,"sc","primary"),attrs:{_i:19},on:{click:t.bindLogin}})]),n("view",{staticClass:t._$s(20,"sc","action-row"),attrs:{_i:20}},[n("navigator",{})]),t._$s(22,"i",t.hasProvider)?n("view",{staticClass:t._$s(22,"sc","oauth-row"),style:t._$s(22,"s",{top:t.positionTop+"px"}),attrs:{_i:22}},t._l(t._$s(23,"f",{forItems:t.providerList}),(function(e,r,o,i){return n("view",{key:t._$s(23,"f",{forIndex:o,key:e.value}),staticClass:t._$s("23-"+i,"sc","oauth-image"),attrs:{_i:"23-"+i}},[n("image",{attrs:{src:t._$s("24-"+i,"a-src",e.image),_i:"24-"+i},on:{click:function(n){return t.oauth(e.value)}}})])})),0):t._e()])},i=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))},6842:function(t,e,n){"use strict";n.r(e);var r=n("f9e4"),o=n("0dca");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);var s,a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},"692e":function(t,e,n){"use strict";n.r(e);var r=n("726c"),o=n("4623");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);var s,a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},"6ffb":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n("ba33"));function o(t){return t&&t.__esModule?t:{default:t}}var i={components:{mIcon:r.default},props:{type:String,value:String,placeholder:String,clearable:{type:[Boolean,String],default:!1},displayable:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1}},model:{prop:"value",event:"input"},data:function(){return{showPassword:!1,isFocus:!1}},computed:{inputType:function(){var t=this.type;return"password"===t?"text":t}},methods:{clear:function(){this.$emit("input","")},display:function(){this.showPassword=!this.showPassword},onFocus:function(){this.isFocus=!0},onBlur:function(){var t=this;this.$nextTick((function(){t.isFocus=!1}))},onInput:function(t){this.$emit("input",t.detail.value)}}};e.default=i},"726c":function(t,e,n){"use strict";var r,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",[n("view",{staticClass:t._$s(1,"sc","center"),attrs:{_i:1}},[n("view",{staticClass:t._$s(2,"sc","logo"),attrs:{"hover-class":t._$s(2,"a-hover-class",t.hasLogin?"":"logo-hover"),_i:2},on:{click:t.bindLogin}},[n("image",{staticClass:t._$s(3,"sc","logo-img"),attrs:{src:t._$s(3,"a-src",t.avatarUrl),_i:3}}),n("view",{staticClass:t._$s(4,"sc","logo-title"),attrs:{_i:4}},[n("text",{staticClass:t._$s(5,"sc","uer-name"),attrs:{_i:5}},[t._v(t._$s(5,"t0-0",t._s(t.hasLogin?t.userName:"\u60a8\u672a\u767b\u5f55")))]),t._$s(6,"i",!t.hasLogin)?n("text",{staticClass:t._$s(6,"sc","go-login navigat-arrow"),attrs:{_i:6}}):t._e()])]),n("view",{staticClass:t._$s(7,"sc","center-list"),attrs:{_i:7}},[n("view",{staticClass:t._$s(8,"sc","center-list-item border-bottom"),attrs:{_i:8}},[n("text",{staticClass:t._$s(9,"sc","list-icon"),attrs:{_i:9}}),n("text",{staticClass:t._$s(10,"sc","list-text"),attrs:{_i:10}}),n("text",{staticClass:t._$s(11,"sc","navigat-arrow"),attrs:{_i:11}})]),n("view",{staticClass:t._$s(12,"sc","center-list-item"),attrs:{_i:12}},[n("text",{staticClass:t._$s(13,"sc","list-icon"),attrs:{_i:13}}),n("text",{staticClass:t._$s(14,"sc","list-text"),attrs:{_i:14}}),n("text",{staticClass:t._$s(15,"sc","navigat-arrow"),attrs:{_i:15}})])]),n("view",{staticClass:t._$s(16,"sc","center-list"),attrs:{_i:16}},[n("view",{staticClass:t._$s(17,"sc","center-list-item border-bottom"),attrs:{_i:17}},[n("text",{staticClass:t._$s(18,"sc","list-icon"),attrs:{_i:18}}),n("text",{staticClass:t._$s(19,"sc","list-text"),attrs:{_i:19}}),n("text",{staticClass:t._$s(20,"sc","navigat-arrow"),attrs:{_i:20}})]),n("view",{staticClass:t._$s(21,"sc","center-list-item"),attrs:{_i:21}},[n("text",{staticClass:t._$s(22,"sc","list-icon"),attrs:{_i:22}}),n("text",{staticClass:t._$s(23,"sc","list-text"),attrs:{_i:23}}),n("text",{staticClass:t._$s(24,"sc","navigat-arrow"),attrs:{_i:24}})])]),n("view",{staticClass:t._$s(25,"sc","center-list"),attrs:{_i:25}},[n("view",{staticClass:t._$s(26,"sc","center-list-item"),attrs:{_i:26}},[n("text",{staticClass:t._$s(27,"sc","list-icon"),attrs:{_i:27}}),n("text",{staticClass:t._$s(28,"sc","list-text"),attrs:{_i:28}}),n("text",{staticClass:t._$s(29,"sc","navigat-arrow"),attrs:{_i:29}})])]),n("view",{staticClass:t._$s(30,"sc","btn-row"),attrs:{_i:30}},[t._$s(31,"i",t.hasLogin)?n("button",{staticClass:t._$s(31,"sc","primary"),attrs:{_i:31},on:{click:t.bindLogout}}):t._e()])])])},i=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))},"7fd7":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r="USERS_KEY",o=function(){var t="";return t=uni.getStorageSync(r),t||(t="[]"),JSON.parse(t)},i=function(t){var e=o();e.push({account:t.account,password:t.password}),uni.setStorageSync(r,JSON.stringify(e))},s={getUsers:o,addUser:i};e.default=s},"802a":function(t,e,n){"use strict";(function(t,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;i(n("7fd7"));var o=i(n("6842"));function i(t){return t&&t.__esModule?t:{default:t}}var s={components:{mInput:o.default},data:function(){return{username:"",password:"",confirmPassword:""}},methods:{register:function(){if(this.username.length<3)uni.showToast({icon:"none",title:"\u8d26\u53f7\u6700\u77ed\u4e3a 3 \u4e2a\u5b57\u7b26"});else if(this.password.length<6)uni.showToast({icon:"none",title:"\u5bc6\u7801\u6700\u77ed\u4e3a 6 \u4e2a\u5b57\u7b26"});else if(this.password===this.confirmPassword){var e={username:this.username,password:this.password};t.callFunction({name:"user-center",data:{action:"register",params:e},success:function(t){r("log","\u6ce8\u518c\u6210\u529f",t," at pages/reg/reg.vue:77"),0===t.result.code?(uni.showToast({title:"\u6ce8\u518c\u6210\u529f"}),uni.setStorageSync("uniIdToken",t.result.token),uni.setStorageSync("username",t.result.username),uni.reLaunch({url:"../main/main"})):uni.showModal({content:JSON.stringify(t.result),showCancel:!1})},fail:function(t){uni.showModal({content:JSON.stringify(t),showCancel:!1})}})}else uni.showToast({icon:"none",title:"\u4e24\u6b21\u5bc6\u7801\u8f93\u5165\u4e0d\u4e00\u81f4"})}}};e.default=s}).call(this,n("a9ff")["default"],n("0de9")["default"])},"8bbf":function(t,e){t.exports=Vue},"8c4a":function(t,e,n){"use strict";n.r(e);var r=n("67c7"),o=n("c867");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);var s,a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},9728:function(t,e,n){"use strict";n.r(e);var r=n("6018"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},9965:function(t,e,n){"use strict";var r,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","m-icon"),class:t._$s(0,"c",["m-icon-"+t.type]),attrs:{_i:0},on:{click:function(e){return t.onClick()}}})},i=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))},a9ff:function(t,e,n){"use strict";(function(t,r){function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){return function(){var e,n=g(t);if(d()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)}}function c(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?u(t):e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}function f(t){var e="function"===typeof Map?new Map:void 0;return f=function(t){if(null===t||!h(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return p(t,arguments,g(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,t)},f(t)}function p(t,e,n){return p=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=Function.bind.apply(t,r),i=new o;return n&&v(i,n.prototype),i},p.apply(null,arguments)}function d(){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(y){return!1}}function h(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{};function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function m(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}var b=m((function(t,e){var n;t.exports=(n=n||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},o=r.lib={},i=o.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=o.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var s=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=s<<24-(r+i)%4*8}else for(i=0;i<o;i+=4)e[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],o=function(e){e=e;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return o/=4294967296,(o+=.5)*(t.random()>.5?1:-1)}},i=0;i<e;i+=4){var a=o(4294967296*(n||t.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,e)}}),a=r.enc={},c=a.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new s.init(n,e/2)}},u=a.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new s.init(n,e)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},f=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,a=o/(4*i),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*i,u=t.min(4*c,o);if(c){for(var l=0;l<c;l+=i)this._doProcessBlock(r,l);var f=r.splice(0,c);n.sigBytes-=u}return new s.init(f,u)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),p=(o.Hasher=f.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new p.HMAC.init(t,n).finalize(e)}}}),r.algo={});return r}(Math),n)})),w=(m((function(t,e){var n;t.exports=(n=b,function(t){var e=n,r=e.lib,o=r.WordArray,i=r.Hasher,s=e.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=s.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,o=t[r];t[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,s=t[e+0],c=t[e+1],d=t[e+2],h=t[e+3],v=t[e+4],g=t[e+5],y=t[e+6],_=t[e+7],m=t[e+8],b=t[e+9],w=t[e+10],O=t[e+11],S=t[e+12],k=t[e+13],T=t[e+14],E=t[e+15],P=i[0],j=i[1],C=i[2],A=i[3];P=u(P,j,C,A,s,7,a[0]),A=u(A,P,j,C,c,12,a[1]),C=u(C,A,P,j,d,17,a[2]),j=u(j,C,A,P,h,22,a[3]),P=u(P,j,C,A,v,7,a[4]),A=u(A,P,j,C,g,12,a[5]),C=u(C,A,P,j,y,17,a[6]),j=u(j,C,A,P,_,22,a[7]),P=u(P,j,C,A,m,7,a[8]),A=u(A,P,j,C,b,12,a[9]),C=u(C,A,P,j,w,17,a[10]),j=u(j,C,A,P,O,22,a[11]),P=u(P,j,C,A,S,7,a[12]),A=u(A,P,j,C,k,12,a[13]),C=u(C,A,P,j,T,17,a[14]),P=l(P,j=u(j,C,A,P,E,22,a[15]),C,A,c,5,a[16]),A=l(A,P,j,C,y,9,a[17]),C=l(C,A,P,j,O,14,a[18]),j=l(j,C,A,P,s,20,a[19]),P=l(P,j,C,A,g,5,a[20]),A=l(A,P,j,C,w,9,a[21]),C=l(C,A,P,j,E,14,a[22]),j=l(j,C,A,P,v,20,a[23]),P=l(P,j,C,A,b,5,a[24]),A=l(A,P,j,C,T,9,a[25]),C=l(C,A,P,j,h,14,a[26]),j=l(j,C,A,P,m,20,a[27]),P=l(P,j,C,A,k,5,a[28]),A=l(A,P,j,C,d,9,a[29]),C=l(C,A,P,j,_,14,a[30]),P=f(P,j=l(j,C,A,P,S,20,a[31]),C,A,g,4,a[32]),A=f(A,P,j,C,m,11,a[33]),C=f(C,A,P,j,O,16,a[34]),j=f(j,C,A,P,T,23,a[35]),P=f(P,j,C,A,c,4,a[36]),A=f(A,P,j,C,v,11,a[37]),C=f(C,A,P,j,_,16,a[38]),j=f(j,C,A,P,w,23,a[39]),P=f(P,j,C,A,k,4,a[40]),A=f(A,P,j,C,s,11,a[41]),C=f(C,A,P,j,h,16,a[42]),j=f(j,C,A,P,y,23,a[43]),P=f(P,j,C,A,b,4,a[44]),A=f(A,P,j,C,S,11,a[45]),C=f(C,A,P,j,E,16,a[46]),P=p(P,j=f(j,C,A,P,d,23,a[47]),C,A,s,6,a[48]),A=p(A,P,j,C,_,10,a[49]),C=p(C,A,P,j,T,15,a[50]),j=p(j,C,A,P,g,21,a[51]),P=p(P,j,C,A,S,6,a[52]),A=p(A,P,j,C,h,10,a[53]),C=p(C,A,P,j,w,15,a[54]),j=p(j,C,A,P,c,21,a[55]),P=p(P,j,C,A,m,6,a[56]),A=p(A,P,j,C,E,10,a[57]),C=p(C,A,P,j,y,15,a[58]),j=p(j,C,A,P,k,21,a[59]),P=p(P,j,C,A,v,6,a[60]),A=p(A,P,j,C,O,10,a[61]),C=p(C,A,P,j,d,15,a[62]),j=p(j,C,A,P,b,21,a[63]),i[0]=i[0]+P|0,i[1]=i[1]+j|0,i[2]=i[2]+C|0,i[3]=i[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;n[o>>>5]|=128<<24-o%32;var i=t.floor(r/4294967296),s=r;n[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,c=a.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function u(t,e,n,r,o,i,s){var a=t+(e&n|~e&r)+o+s;return(a<<i|a>>>32-i)+e}function l(t,e,n,r,o,i,s){var a=t+(e&r|n&~r)+o+s;return(a<<i|a>>>32-i)+e}function f(t,e,n,r,o,i,s){var a=t+(e^n^r)+o+s;return(a<<i|a>>>32-i)+e}function p(t,e,n,r,o,i,s){var a=t+(n^(e|~r))+o+s;return(a<<i|a>>>32-i)+e}e.MD5=i._createHelper(c),e.HmacMD5=i._createHmacHelper(c)}(Math),n.MD5)})),m((function(t,e){var n,r,o;t.exports=(r=(n=b).lib.Base,o=n.enc.Utf8,void(n.algo.HMAC=r.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=o.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),s=this._iKey=e.clone(),a=i.words,c=s.words,u=0;u<n;u++)a[u]^=1549556828,c[u]^=909522486;i.sigBytes=s.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))})),m((function(t,e){t.exports=b.HmacMD5})));function O(t){return function(e){if(!((e=e||{}).success||e.fail||e.complete))return t.call(this,e);t.call(this,e).then((function(t){e.success&&e.success(t),e.complete&&e.complete(t)})).catch((function(t){e.fail&&e.fail(t),e.complete&&e.complete(t)}))}}var S,k,T,E=function(t){l(n,t);var e=a(n);function n(t){var r;return s(this,n),r=e.call(this,t.message),r.errMsg=t.message||"",Object.defineProperties(u(r),{code:{get:function(){return t.code}},requestId:{get:function(){return t.requestId}},message:{get:function(){return this.errMsg},set:function(t){this.errMsg=t}}}),r}return n}(f(Error));try{S=n("4fe5").default||n("4fe5")}catch(y){S={appid:""}}function P(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e="";e.length<t;)e+=Math.random().toString(32).substring(2);return e.substring(0,t)}function j(){if("n"===C()){try{k=plus.runtime.getDCloudId()}catch(y){k=""}return k}return k||(k=P(32),uni.setStorage({key:"__DC_CLOUD_UUID",data:k})),k}function C(){return{"app-plus":"n",h5:"h5","mp-weixin":"wx","mp-alipay":"ali","mp-baidu":"bd","mp-toutiao":"tt","mp-qq":"qq","quickapp-native":"qn"}["app-plus"]}var A={sign:function(t,e){var n="";return Object.keys(t).sort().forEach((function(e){t[e]&&(n=n+"&"+e+"="+t[e])})),n=n.slice(1),w(n,e).toString()},wrappedRequest:function(t,e){return new Promise((function(n,r){e(Object.assign(t,{complete:function(t){t||(t={});var e=t.data&&t.data.header&&t.data.header["x-serverless-request-id"]||t.header&&t.header["request-id"];if(!t.statusCode||t.statusCode>=400)return r(new E({code:"SYS_ERR",message:t.errMsg||"request:fail",requestId:e}));var o=t.data;if(o.error)return r(new E({code:o.error.code,message:o.error.message,requestId:e}));o.result=o.data,o.requestId=e,delete o.data,n(o)}}))}))}},x={image:"image/*",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mp3",mp4:"video/mp4",ogg:"audio/ogg",webm:"video/webm"};function I(t){return x[t.toLowerCase()]}var N,$=function(){function t(e){s(this,t),["spaceId","clientSecret"].forEach((function(t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error("\u7f3a\u5c11\u53c2\u6570"+t)})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},e),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}return i(t,[{key:"setAccessToken",value:function(t){this.accessToken=t}},{key:"requestWrapped",value:function(t){return A.wrappedRequest(t,this.adapter.request)}},{key:"requestAuth",value:function(t){return this.requestWrapped(t)}},{key:"request",value:function(t,e){var n=this;return this.hasAccessToken?e?this.requestWrapped(t):this.requestWrapped(t).catch((function(e){return new Promise((function(t,n){!e||"GATEWAY_INVALID_TOKEN"!==e.code&&"InvalidParameter.InvalidToken"!==e.code?n(e):t()})).then((function(){return n.getAccessToken()})).then((function(){var e=n.rebuildRequest(t);return n.request(e,!0)}))})):this.getAccessToken().then((function(){var e=n.rebuildRequest(t);return n.request(e,!0)}))}},{key:"rebuildRequest",value:function(t){var e=Object.assign({},t);return e.data.token=this.accessToken,e.header["x-basement-token"]=this.accessToken,e.header["x-serverless-sign"]=A.sign(e.data,this.config.clientSecret),e}},{key:"setupRequest",value:function(t,e){var n=Object.assign({},t,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};return"auth"!==e&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=A.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:r}}},{key:"getAccessToken",value:function(){var t=this;return this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(e){return new Promise((function(n,r){e.result&&e.result.accessToken?(t.setAccessToken(e.result.accessToken),n(t.accessToken)):r(new E({code:"AUTH_FAILED",message:"\u83b7\u53d6accessToken\u5931\u8d25"}))}))}))}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(t){var e={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:t.name,functionArgs:t.data||{}})};return this.request(this.setupRequest(e))}},{key:"getOSSUploadOptionsFromPath",value:function(t){var e={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(t)};return this.request(this.setupRequest(e))}},{key:"uploadFileToOSS",value:function(t){var e=this,n=t.url,r=t.formData,o=t.name,i=t.filePath,s=t.fileType,a=t.onUploadProgress;return new Promise((function(t,c){var u=e.adapter.uploadFile({url:n,formData:r,name:o,filePath:i,fileType:s,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(e){e&&e.statusCode<400?t(e):c(new E({code:"UPLOAD_FAILED",message:"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))},fail:function(t){c(t)}});"function"==typeof a&&u&&"function"==typeof u.onProgressUpdate&&u.onProgressUpdate((function(t){a({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(t){var e={method:"serverless.file.resource.report",params:JSON.stringify(t)};return this.request(this.setupRequest(e))}},{key:"uploadFile",value:function(t){var e=this,n=t.filePath,r=t.cloudPath,o=t.fileType,i=void 0===o?"image":o,s=t.onUploadProgress,a=t.config;if(!r)throw new E({code:"CLOUDPATH_REQUIRED",message:"cloudPath\u4e0d\u53ef\u4e3a\u7a7a"});var c,u,l,f=a&&a.envType||this.config.envType,p=r.split("?")[0].split(".").pop();if(!I(p))throw new E({code:"UNSUPPORTED_FILE_TYPE",message:"\u4e0d\u652f\u6301\u7684\u6587\u4ef6\u7c7b\u578b"});return this.getOSSUploadOptionsFromPath({env:f,filename:r}).then((function(t){var r=t.result;c=I(p),u=r.id,l="https://"+r.cdnDomain+"/"+r.ossPath;var o={url:"https://"+r.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:r.accessKeyId,Signature:r.signature,host:r.host,id:u,key:r.ossPath,policy:r.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:i,contentType:c};return e.uploadFileToOSS(Object.assign({},o,{onUploadProgress:s}))})).then((function(){return e.reportOSSUpload({id:u,contentType:c})})).then((function(t){return new Promise((function(e,r){t.success?e({success:!0,filePath:n,fileID:l}):r(new E({code:"UPLOAD_FAILED",message:"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))}))}))}},{key:"deleteFile",value:function(t){var e=t.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({id:e[0]})};return this.request(this.setupRequest(n))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),t}(),M={init:function(t){var e=new $(t);["uploadFile","deleteFile"].forEach((function(t){e[t]=O(e[t]).bind(e)}));var n={signInAnonymously:function(){return e.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return e.auth=function(){return n},e}};function L(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var i in n)""===o?!r&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}!function(t){t.local="local",t.none="none",t.session="session"}(N||(N={}));var R,D,U,q=(R=function(t,e){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}R(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),F=function(){return(F=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return q(e,t),e.prototype.post=function(t){var e=t.url,n=t.data,r=t.headers;return new Promise((function(t,o){uni.request({url:L("https:",e),data:n,method:"POST",header:r,success:function(e){t(e)},fail:function(t){o(t)}})}))},e.prototype.upload=function(t){return new Promise((function(e,n){var r=t.url,o=t.file,i=t.data,s=t.headers,a=t.fileType,c=uni.uploadFile({url:L("https:",r),name:"file",formData:Object.assign({},i),filePath:o,fileType:a,header:s,success:function(t){var n={statusCode:t.statusCode,data:t.data||{}};200===t.statusCode&&i.success_action_status&&(n.statusCode=parseInt(i.success_action_status,10)),e(n)},fail:function(t){n(new Error(t.errMsg||"uploadFile:fail"))}});"function"==typeof t.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(e){t.onUploadProgress({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))},e.prototype.download=function(t){var e=t.url,n=t.headers;return new Promise((function(t,r){uni.downloadFile({url:L("https:",e),header:n,success:function(e){200===e.statusCode&&e.tempFilePath?t({statusCode:200,tempFilePath:e.tempFilePath}):t(e)},fail:function(t){r(t)}})}))},e}((function(){})),G={setItem:function(t,e){uni.setStorageSync(t,e)},getItem:function(t){return uni.getStorageSync(t)},removeItem:function(t){uni.removeStorageSync(t)},clear:function(){uni.clearStorageSync()}},H=function(t,e){void 0===e&&(e={});var n=uni.connectSocket(F({url:t},e));return{set onopen(t){n.onOpen(t)},set onmessage(t){n.onMessage(t)},set onclose(t){n.onClose(t)},set onerror(t){n.onError(t)},send:function(t){return n.send({data:t})},close:function(t,e){return n.close({code:t,reason:e})},get readyState(){return n.readyState},CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3}},B={genAdapter:function(){return{root:{},reqClass:K,wsClass:H,localStorage:G,primaryStorage:N.local}},isMatch:function(){return"undefined"!=typeof uni&&!!uni.request},runtime:"uni_app"},V=m((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getQuery=function(t,e){if("undefined"==typeof window)return!1;var n=e||window.location.search,r=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""},e.getHash=function(t){var e=window.location.hash.match(new RegExp("[#?&/]"+t+"=([^&#]*)"));return e?e[1]:""},e.removeParam=function(t,e){var n=e.split("?")[0],r=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===t&&r.splice(i,1);n=n+"?"+r.join("&")}return n},e.createPromiseCallback=function(){var t;if(!Promise){(t=function(){}).promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var n=new Promise((function(e,n){t=function(t,r){return t?n(t):e(r)}}));return t.promise=n,t},e.getWeixinCode=function(){return e.getQuery("code")||e.getHash("code")},e.getMiniAppCode=function(){return new Promise((function(t,e){r.login({success:function(e){t(e.code)},fail:function(t){e(t)}})}))},e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isString=function(t){return"string"==typeof t},e.isUndefined=function(t){return void 0===t},e.isInstanceOf=function(t,e){return t instanceof e},e.isFormData=function(t){return"[object FormData]"===Object.prototype.toString.call(t)},e.genSeqId=function(){return Math.random().toString(16).slice(2)},e.getArgNames=function(t){var e=t.toString();return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(/([^\s,]+)/g)},e.formatUrl=function(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var i in n)""===o?!r&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}})),Y="dist/index.js",J="./dist/index.d.ts",W={build:"npm run tsc && webpack",tsc:"tsc -p tsconfig.json","tsc:w":"tsc -p tsconfig.json -w",test:"jest --verbose false -i",e2e:'NODE_ENV=e2e webpack && jest --config="./jest.e2e.config.js"  --verbose false -i "e2e"',start:"webpack-dev-server --hot --open",eslint:'eslint "./**/*.js" "./**/*.ts"',"eslint-fix":'eslint --fix "./**/*.js" "./**/*.ts"',test_web:"npm run tsc && webpack-dev-server --devtool eval-source-map --progress --colors --hot --inline --content-base ./dist --host jimmytest-088bef.tcb.qcloud.la --port 80 --disableHostCheck true --mode development --config webpack.test.js"},z={type:"git",url:"https://github.com/TencentCloudBase/tcb-js-sdk"},X=["tcb","js-sdk"],Q={"@cloudbase/adapter-interface":"^0.2.0","@cloudbase/adapter-wx_mp":"^0.2.1","@cloudbase/database":"^0.9.8"},Z={"@babel/core":"^7.6.2","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/preset-typescript":"^7.6.0","@babel/runtime":"^7.6.2","@types/jest":"^23.1.4","@types/node":"^10.14.4","@types/superagent":"^4.1.4",axios:"^0.19.0","babel-eslint":"^10.0.1","babel-loader":"^8.0.6","babel-polyfill":"^6.26.0",eslint:"^5.16.0","eslint-config-alloy":"^1.4.2","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1","eslint-plugin-typescript":"^1.0.0-rc.3",express:"^4.17.1",husky:"^3.1.0",jest:"^24.7.1","jest-puppeteer":"^4.3.0","lint-staged":"^9.5.0","power-assert":"^1.6.1",puppeteer:"^1.20.0","serve-static":"^1.14.1","ts-jest":"^23.10.4","ts-loader":"^6.2.1",typescript:"^3.4.3","typescript-eslint-parser":"^22.0.0",webpack:"^4.41.3","webpack-bundle-analyzer":"^3.4.1","webpack-cli":"^3.3.0","webpack-dev-server":"^3.3.1","webpack-merge":"^4.2.2","webpack-visualizer-plugin":"^0.1.11"},tt={hooks:{"pre-commit":"lint-staged"}},et={name:"tcb-js-sdk",version:"1.3.5",description:"js sdk for tcb",main:Y,types:J,scripts:W,repository:z,keywords:X,author:"jimmyjzhang",license:"ISC",dependencies:Q,devDependencies:Z,husky:tt,"lint-staged":{"*.{js,ts}":["eslint --fix","git add"]}},nt=(D=Object.freeze({__proto__:null,name:"tcb-js-sdk",version:"1.3.5",description:"js sdk for tcb",main:Y,types:J,scripts:W,repository:z,keywords:X,author:"jimmyjzhang",license:"ISC",dependencies:Q,devDependencies:Z,husky:tt,default:et}))&&D.default||D,rt=m((function(t,e){var n=y&&y.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var r=n(nt);e.SDK_VERISON=r.version,e.ACCESS_TOKEN="access_token",e.ACCESS_TOKEN_Expire="access_token_expire",e.REFRESH_TOKEN="refresh_token",e.ANONYMOUS_UUID="anonymous_uuid",e.LOGIN_TYPE_KEY="login_type",e.protocol="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:",e.BASE_URL="//tcb-api.tencentcloudapi.com/web"}));!function(t){t.local="local",t.none="none",t.session="session"}(U||(U={}));var ot=function(){},it=function(){},st=Object.freeze({__proto__:null,get StorageType(){return U},AbstractSDKRequest:ot,AbstractStorage:it,formatUrl:function(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var i in n)""===o?!r&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}}),at=m((function(t,e){var n=y&&y.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=y&&y.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=y&&y.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},i=y&&y.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.get=function(t){return this._request(r(r({},t),{method:"get"}))},e.prototype.post=function(t){return this._request(r(r({},t),{method:"post"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,o=t.name,i=new FormData;for(var s in e)i.append(s,e[s]);return i.append("key",o),i.append("file",n),this._request(r(r({},t),{data:i,method:"post"}))},e.prototype.download=function(t){return o(this,void 0,void 0,(function(){var e,n;return i(this,(function(r){return e=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(n=document.createElement("a")).href=t.url,n.setAttribute("download",e),n.setAttribute("target","_blank"),document.body.appendChild(n),n.click(),[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}))}))},e.prototype._request=function(t){var e=String(t.method).toLowerCase()||"get";return new Promise((function(n){var r=t.url,o=t.headers,i=void 0===o?{}:o,s=t.data,a=t.responseType,c=V.formatUrl(rt.protocol,r,"get"===e?s:{}),u=new XMLHttpRequest;for(var l in u.open(e,c),a&&(u.responseType=a),i)u.setRequestHeader(l,i[l]);u.onreadystatechange=function(){if(4===u.readyState){var t={statusCode:u.status};try{t.data=JSON.parse(u.responseText)}catch(t){}n(t)}},u.send("post"===e&&V.isFormData(s)?s:JSON.stringify(s||{}))}))},e}(st.AbstractSDKRequest);e.WebRequest=s,e.genAdapter=function(){return{root:window,reqClass:s,wsClass:WebSocket,localStorage:localStorage,sessionStorage:sessionStorage}}})),ct=m((function(t,e){var n=y&&y.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(at);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(r=e.RUNTIME||(e.RUNTIME={})),e.useAdapters=function(t){for(var e=0,n=V.isArray(t)?t:[t];e<n.length;e++){var r=n[e],o=r.isMatch,i=r.genAdapter,s=r.runtime;if(o())return{adapter:i(),runtime:s}}},e.useDefaultAdapter=function(){return{adapter:o.genAdapter(),runtime:r.WEB}},e.Adapter={adapter:null,runtime:void 0}})),ut=m((function(t,e){var n=y&&y.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){switch(ct.Adapter.adapter.primaryStorage||t){case"local":this.storageClass=ct.Adapter.adapter.localStorage||new o;break;case"none":this.storageClass=new o;break;default:this.storageClass=ct.Adapter.adapter.sessionStorage||new o}}return t.prototype.setStore=function(t,e,n){try{if(!this.storageClass)return}catch(t){return}var r,o={};o.version=n||"localCachev1",o.content=e,r=JSON.stringify(o);try{this.storageClass.setItem(t,r)}catch(t){return}},t.prototype.getStore=function(t,e){try{if(!this.storageClass)return}catch(t){return""}e=e||"localCachev1";var n=this.storageClass.getItem(t);return n&&n.indexOf(e)>=0?JSON.parse(n).content:""},t.prototype.removeStore=function(t){this.storageClass.removeItem(t)},t}();e.Cache=r;var o=function(t){function e(){var e=t.call(this)||this;return ct.Adapter.adapter.root.tcbObject||(ct.Adapter.adapter.root.tcbObject={}),e}return n(e,t),e.prototype.setItem=function(t,e){ct.Adapter.adapter.root.tcbObject[t]=e},e.prototype.getItem=function(t){return ct.Adapter.adapter.root.tcbObject[t]},e.prototype.removeItem=function(t){delete ct.Adapter.adapter.root.tcbObject[t]},e.prototype.clear=function(){delete ct.Adapter.adapter.root.tcbObject},e}(st.AbstractStorage)})),lt=m((function(t,e){var n=y&&y.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=y&&y.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r};Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e){this.data=e||null,this.name=t};e.IEvent=o;var i=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return n(e,t),e}(o);e.IErrorEvent=i;var s=function(){function t(){this._listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this._listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(n&&n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this._listeners),this},t.prototype.fire=function(t,e){if(V.isInstanceOf(t,i))return console.error(t.error),this;var n=V.isString(t)?new o(t,e||{}):t,s=n.name;if(this._listens(s)){n.target=this;for(var a=0,c=this._listeners[s]?r(this._listeners[s]):[];a<c.length;a++)c[a].call(this,n)}return this},t.prototype._listens=function(t){return this._listeners[t]&&this._listeners[t].length>0},t}();e.IEventEmitter=s;var a=new s;e.addEventListener=function(t,e){a.on(t,e)},e.activateEvent=function(t,e){void 0===e&&(e={}),a.fire(t,e)},e.removeEventListener=function(t,e){a.off(t,e)},e.EVENTS={LOGIN_STATE_CHANGED:"loginStateChanged",LOGIN_STATE_EXPIRE:"loginStateExpire",LOGIN_TYPE_CHANGE:"loginTypeChanged",ANONYMOUS_CONVERTED:"anonymousConverted",REFRESH_ACCESS_TOKEN:"refreshAccessToken"}})),ft=m((function(t,e){var n=y&&y.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=y&&y.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},o=y&&y.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously"],s={"X-SDK-Version":rt.SDK_VERISON};function a(t,e,r){var o=t[e];t[e]=function(e){var i={},s={};r.forEach((function(n){var r=n.call(t,e),o=r.data,a=r.headers;Object.assign(i,o),Object.assign(s,a)}));var a=e.data;return a&&function(){if(V.isFormData(a))for(var t in i)a.append(t,i[t]);else e.data=n(n({},a),i)}(),e.headers=n(n({},e.headers||{}),s),o.call(t,e)}}function c(){var t=V.genSeqId();return{data:{seqId:t},headers:n(n({},s),{"x-seqid":t})}}var u=function(){function t(t){void 0===t&&(t={}),this.config=t,this.cache=new ut.Cache(t.persistence),this.accessTokenKey=rt.ACCESS_TOKEN+"_"+t.env,this.accessTokenExpireKey=rt.ACCESS_TOKEN_Expire+"_"+t.env,this.refreshTokenKey=rt.REFRESH_TOKEN+"_"+t.env,this.anonymousUuidKey=rt.ANONYMOUS_UUID+"_"+t.env,this.loginTypeKey=rt.LOGIN_TYPE_KEY+"_"+t.env,this._reqClass=new ct.Adapter.adapter.reqClass,a(this._reqClass,"post",[c]),a(this._reqClass,"upload",[c]),a(this._reqClass,"download",[c])}return t.prototype.post=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._reqClass.post(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.upload=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._reqClass.upload(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.download=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._reqClass.download(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.refreshAccessToken=function(){return r(this,void 0,void 0,(function(){var t,e,n;return o(this,(function(r){switch(r.label){case 0:this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._refreshAccessTokenPromise];case 2:return t=r.sent(),[3,4];case 3:return n=r.sent(),e=n,[3,4];case 4:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,e)throw e;return[2,t]}}))}))},t.prototype._refreshAccessToken=function(){return r(this,void 0,void 0,(function(){var t,e,n,r;return o(this,(function(o){switch(o.label){case 0:if(this.cache.removeStore(this.accessTokenKey),this.cache.removeStore(this.accessTokenExpireKey),!(t=this.cache.getStore(this.refreshTokenKey)))throw new Error("[tcb-js-sdk] \u672a\u767b\u5f55CloudBase");return e={refresh_token:t},this.cache.getStore(this.loginTypeKey)===pt.LOGINTYPE.ANONYMOUS&&(e.anonymous_uuid=this.cache.getStore(this.anonymousUuidKey)),[4,this.request("auth.getJwt",e)];case 1:if((n=o.sent()).data.code)throw"SIGN_PARAM_INVALID"!==(r=n.data.code)&&"REFRESH_TOKEN_EXPIRED"!==r&&"INVALID_REFRESH_TOKEN"!==r||(lt.activateEvent(lt.EVENTS.LOGIN_STATE_EXPIRE),this.cache.removeStore(this.refreshTokenKey)),new Error("[tcb-js-sdk] \u5237\u65b0access token\u5931\u8d25\uff1a"+n.data.code);return n.data.access_token?(lt.activateEvent(lt.EVENTS.REFRESH_ACCESS_TOKEN),this.cache.setStore(this.accessTokenKey,n.data.access_token),this.cache.setStore(this.accessTokenExpireKey,n.data.access_token_expire+Date.now()),lt.activateEvent(lt.EVENTS.LOGIN_TYPE_CHANGE,n.data.login_type),[2,{accessToken:n.data.access_token,accessTokenExpire:n.data.access_token_expire}]):(n.data.refresh_token&&(this.cache.removeStore(this.refreshTokenKey),this.cache.setStore(this.refreshTokenKey,n.data.refresh_token),this._refreshAccessToken()),[2])}}))}))},t.prototype.getAccessToken=function(){return r(this,void 0,void 0,(function(){var t,e,n,r;return o(this,(function(o){switch(o.label){case 0:return t=this.cache.getStore(this.accessTokenKey),e=this.cache.getStore(this.accessTokenExpireKey),n=!0,(r=this._shouldRefreshAccessTokenHook)?[4,this._shouldRefreshAccessTokenHook(t,e)]:[3,2];case 1:r=!o.sent(),o.label=2;case 2:return r&&(n=!1),(!t||!e||e<Date.now())&&n?[2,this.refreshAccessToken()]:[2,{accessToken:t,accessTokenExpire:e}]}}))}))},t.prototype.request=function(t,e,s){return r(this,void 0,void 0,(function(){var r,a,c,u,l,f,p,d,h,v,g,y;return o(this,(function(o){switch(o.label){case 0:return r="application/x-www-form-urlencoded",a=n({action:t,env:this.config.env,dataVersion:"2019-08-16"},e),-1!==i.indexOf(t)?[3,2]:(c=a,[4,this.getAccessToken()]);case 1:c.access_token=o.sent().accessToken,o.label=2;case 2:if("storage.uploadFile"===t){for(l in u=new FormData)u.hasOwnProperty(l)&&void 0!==u[l]&&u.append(l,a[l]);r="multipart/form-data"}else r="application/json;charset=UTF-8",u=a;return f={headers:{"content-type":r}},s&&s.onUploadProgress&&(f.onUploadProgress=s.onUploadProgress),p=e.parse,d=e.query,h=e.search,v={env:this.config.env},p&&(v.parse=!0),d&&(v=n(n({},d),v)),g=V.formatUrl(rt.protocol,rt.BASE_URL,v),h&&(g+=h),[4,this.post(n({url:g,data:u},f))];case 3:if(y=o.sent(),200!==Number(y.status)&&200!==Number(y.statusCode)||!y.data)throw new Error("network request error");return[2,y]}}))}))},t.prototype.send=function(t,e){return void 0===e&&(e={}),r(this,void 0,void 0,(function(){var n,r,s;return o(this,(function(o){switch(o.label){case 0:return n=setTimeout((function(){console.warn("Database operation is longer than 3s. Please check query performance and your network environment.")}),3e3),[4,this.request(t,e,{onUploadProgress:e.onUploadProgress})];case 1:return r=o.sent(),clearTimeout(n),"ACCESS_TOKEN_EXPIRED"!==r.data.code||-1!==i.indexOf(t)?[3,4]:[4,this.refreshAccessToken()];case 2:return o.sent(),[4,this.request(t,e,{onUploadProgress:e.onUploadProgress})];case 3:if((s=o.sent()).data.code)throw new Error("["+s.data.code+"] "+s.data.message);return[2,s.data];case 4:if(r.data.code)throw new Error("["+r.data.code+"] "+r.data.message);return[2,r.data]}}))}))},t}();e.Request=u})),pt=m((function(t,e){var n,r=y&&y.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},o=y&&y.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.ANONYMOUS="ANONYMOUS",t.WECHAT="WECHAT",t.CUSTOM="CUSTOM",t.NULL="NULL"}(n=e.LOGINTYPE||(e.LOGINTYPE={}));var i=function(){function t(t){this._loginType=n.NULL,this.config=t,this.onLoginTypeChanged=this.onLoginTypeChanged.bind(this),lt.addEventListener(lt.EVENTS.LOGIN_TYPE_CHANGE,this.onLoginTypeChanged)}return t.prototype.init=function(){this.httpRequest=new ft.Request(this.config),this.cache=new ut.Cache(this.config.persistence),this.accessTokenKey=rt.ACCESS_TOKEN+"_"+this.config.env,this.accessTokenExpireKey=rt.ACCESS_TOKEN_Expire+"_"+this.config.env,this.refreshTokenKey=rt.REFRESH_TOKEN+"_"+this.config.env,this.loginTypeKey=rt.LOGIN_TYPE_KEY+"_"+this.config.env},t.prototype.onLoginTypeChanged=function(t){this._loginType=t.data,this.cache.setStore(this.loginTypeKey,this._loginType)},Object.defineProperty(t.prototype,"loginType",{get:function(){return this._loginType},enumerable:!0,configurable:!0}),t.prototype.setRefreshToken=function(t){this.cache.removeStore(this.accessTokenKey),this.cache.removeStore(this.accessTokenExpireKey),this.cache.setStore(this.refreshTokenKey,t)},t.prototype.getRefreshTokenByWXCode=function(t,e,n){return r(this,void 0,void 0,(function(){var r;return o(this,(function(o){return r=ct.Adapter.runtime===ct.RUNTIME.WX_MP?"1":"0",[2,this.httpRequest.send("auth.getJwt",{appid:t,loginType:e,code:n,hybridMiniapp:r}).then((function(t){if(t.code)throw new Error("[tcb-js-sdk] \u5fae\u4fe1\u767b\u5f55\u5931\u8d25: "+t.code);if(t.refresh_token)return{refreshToken:t.refresh_token,accessToken:t.access_token,accessTokenExpire:t.access_token_expire};throw new Error("[tcb-js-sdk] getJwt\u672a\u8fd4\u56derefreshToken")}))]}))}))},t}();e.default=i})),dt=m((function(t,e){var n=y&&y.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=y&&y.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},o=y&&y.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=y&&y.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var s,a,c=i(V),u=i(pt);!function(t){t.snsapi_base="snsapi_base",t.snsapi_userinfo="snsapi_userinfo",t.snsapi_login="snsapi_login"}(s||(s={})),function(t){t.redirect="redirect",t.prompt="prompt"}(a||(a={}));var l={},f=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.config=e,s.appid=n,s.scope=ct.Adapter.runtime===ct.RUNTIME.WX_MP?"snsapi_base":r,s.state=i||"weixin",s.loginMode=o||"redirect",s}return n(e,t),e.prototype.signIn=function(){return r(this,void 0,void 0,(function(){var t,e,n;return o(this,(function(r){switch(r.label){case 0:l[this.config.env]||(l[this.config.env]=this._signIn()),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,l[this.config.env]];case 2:return t=r.sent(),[3,4];case 3:return n=r.sent(),e=n,[3,4];case 4:if(l[this.config.env]=null,e)throw e;return[2,t]}}))}))},e.prototype._signIn=function(){return r(this,void 0,void 0,(function(){var t,e,n,r,i,a;return o(this,(function(o){switch(o.label){case 0:if(t=this.cache.getStore(this.accessTokenKey),e=this.cache.getStore(this.accessTokenExpireKey),t){if(e&&e>Date.now())return[2,{credential:{accessToken:t,refreshToken:this.cache.getStore(this.refreshTokenKey)}}];this.cache.removeStore(this.accessTokenKey),this.cache.removeStore(this.accessTokenExpireKey)}if(!1===Object.values(s).includes(s[this.scope]))throw new Error("\u9519\u8bef\u7684scope\u7c7b\u578b");return ct.Adapter.runtime!==ct.RUNTIME.WX_MP?[3,2]:[4,c.getMiniAppCode()];case 1:return n=o.sent(),[3,4];case 2:return[4,c.getWeixinCode()];case 3:if(!(n=o.sent()))return[2,this.redirect()];o.label=4;case 4:return r=function(t){switch(t){case s.snsapi_login:return"WECHAT-OPEN";default:return"WECHAT-PUBLIC"}}(this.scope),[4,this.getRefreshTokenByWXCode(this.appid,r,n)];case 5:return i=o.sent(),a=i.refreshToken,this.cache.setStore(this.refreshTokenKey,a),i.accessToken&&this.cache.setStore(this.accessTokenKey,i.accessToken),i.accessTokenExpire&&this.cache.setStore(this.accessTokenExpireKey,i.accessTokenExpire+Date.now()),lt.activateEvent(lt.EVENTS.LOGIN_STATE_CHANGED),lt.activateEvent(lt.EVENTS.LOGIN_TYPE_CHANGE,u.LOGINTYPE.WECHAT),[2,{credential:{refreshToken:a}}]}}))}))},e.prototype.redirect=function(){var t=c.removeParam("code",location.href);t=c.removeParam("state",t),t=encodeURIComponent(t);var e="//open.weixin.qq.com/connect/oauth2/authorize";"snsapi_login"===this.scope&&(e="//open.weixin.qq.com/connect/qrconnect"),"redirect"===a[this.loginMode]&&(location.href=e+"?appid="+this.appid+"&redirect_uri="+t+"&response_type=code&scope="+this.scope+"&state="+this.state+"#wechat_redirect")},e}(u.default);e.default=f})),ht=m((function(t,e){var n=y&&y.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=y&&y.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=y&&y.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},i=y&&y.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=y&&y.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var a=s(pt),c=function(t){function e(e){var n=t.call(this,r(r({},e),{persistence:"local"}))||this;return n._anonymousUuidKey=rt.ANONYMOUS_UUID+"_"+n.config.env,n._loginTypeKey=rt.LOGIN_TYPE_KEY+"_"+n.config.env,n}return n(e,t),e.prototype.init=function(){t.prototype.init.call(this)},e.prototype.signIn=function(){return o(this,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return t=this.cache.getStore(this._anonymousUuidKey)||void 0,e=this.cache.getStore(this.refreshTokenKey)||void 0,[4,this.httpRequest.send("auth.signInAnonymously",{anonymous_uuid:t,refresh_token:e})];case 1:return(n=r.sent()).uuid&&n.refresh_token?(this._setAnonymousUUID(n.uuid),this.setRefreshToken(n.refresh_token),[4,this.httpRequest.refreshAccessToken()]):[3,3];case 2:return r.sent(),lt.activateEvent(lt.EVENTS.LOGIN_STATE_CHANGED),lt.activateEvent(lt.EVENTS.LOGIN_TYPE_CHANGE,a.LOGINTYPE.ANONYMOUS),[2,{credential:{refreshToken:n.refresh_token}}];case 3:throw new Error("[tcb-js-sdk] \u533f\u540d\u767b\u5f55\u5931\u8d25")}}))}))},e.prototype.linkAndRetrieveDataWithTicket=function(t){return o(this,void 0,void 0,(function(){var e,n,r;return i(this,(function(o){switch(o.label){case 0:return e=this.cache.getStore(this._anonymousUuidKey),n=this.cache.getStore(this.refreshTokenKey),[4,this.httpRequest.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:e,refresh_token:n,ticket:t})];case 1:return(r=o.sent()).refresh_token?(this._clearAnonymousUUID(),this.setRefreshToken(r.refresh_token),[4,this.httpRequest.refreshAccessToken()]):[3,3];case 2:return o.sent(),lt.activateEvent(lt.EVENTS.ANONYMOUS_CONVERTED,{refresh_token:r.refresh_token}),lt.activateEvent(lt.EVENTS.LOGIN_TYPE_CHANGE,a.LOGINTYPE.CUSTOM),[2,{credential:{refreshToken:r.refresh_token}}];case 3:throw new Error("[tcb-js-sdk] \u533f\u540d\u8f6c\u5316\u5931\u8d25")}}))}))},e.prototype.getAllStore=function(){var t={};return t[this.refreshTokenKey]=this.cache.getStore(this.refreshTokenKey)||"",t[this._loginTypeKey]=this.cache.getStore(this._loginTypeKey)||"",t[this.accessTokenKey]=this.cache.getStore(this.accessTokenKey)||"",t[this.accessTokenExpireKey]=this.cache.getStore(this.accessTokenExpireKey)||"",t},e.prototype._setAnonymousUUID=function(t){this.cache.removeStore(this._anonymousUuidKey),this.cache.setStore(this._anonymousUuidKey,t),this.cache.setStore(this._loginTypeKey,a.LOGINTYPE.ANONYMOUS)},e.prototype._clearAnonymousUUID=function(){this.cache.removeStore(this._anonymousUuidKey)},e}(a.default);e.AnonymousAuthProvider=c})),vt=m((function(t,e){var n=y&&y.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=y&&y.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=y&&y.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},i=y&&y.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=y&&y.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},a=y&&y.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var c=s(dt),u=a(pt),l=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e,n}return n(e,t),e.prototype.init=function(){t.prototype.init.call(this),this.customAuthProvider=new u.default(this.config),this.customAuthProvider.init()},e.prototype.weixinAuthProvider=function(t){var e=t.appid,n=t.scope,r=t.loginMode,o=t.state,i=new c.default(this.config,e,n,r,o);return i.init(),i},e.prototype.signInAnonymously=function(){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(e){switch(e.label){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new ht.AnonymousAuthProvider(this.config),this._anonymousAuthProvider.init()),lt.addEventListener(lt.EVENTS.LOGIN_TYPE_CHANGE,(function(e){if(e&&e.data===u.LOGINTYPE.ANONYMOUS){var n=t._anonymousAuthProvider.getAllStore();for(var r in n)n[r]&&t.httpRequest.cache.setStore(r,n[r])}})),[4,this._anonymousAuthProvider.signIn()];case 1:return[2,e.sent()]}}))}))},e.prototype.linkAndRetrieveDataWithTicket=function(t){return o(this,void 0,void 0,(function(){var e=this;return i(this,(function(n){switch(n.label){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new ht.AnonymousAuthProvider(this.config),this._anonymousAuthProvider.init()),lt.addEventListener(lt.EVENTS.ANONYMOUS_CONVERTED,(function(t){var n=t.data.refresh_token;n&&e.httpRequest.cache.setStore(e.refreshTokenKey,n)})),[4,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(t)];case 1:return[2,n.sent()]}}))}))},e.prototype.signOut=function(){return o(this,void 0,void 0,(function(){var t,e,n,r,o,s,a;return i(this,(function(i){switch(i.label){case 0:if(this.loginType===u.LOGINTYPE.ANONYMOUS)throw new Error("[tcb-js-sdk] \u533f\u540d\u7528\u6237\u4e0d\u652f\u6301\u767b\u51fa\u64cd\u4f5c");return t=this.httpRequest,e=t.cache,n=t.refreshTokenKey,r=t.accessTokenKey,o=t.accessTokenExpireKey,(s=e.getStore(n))?[4,this.httpRequest.send("auth.logout",{refresh_token:s})]:[2];case 1:return a=i.sent(),e.removeStore(n),e.removeStore(r),e.removeStore(o),lt.activateEvent(lt.EVENTS.LOGIN_STATE_CHANGED),lt.activateEvent(lt.EVENTS.LOGIN_TYPE_CHANGE,u.LOGINTYPE.NULL),[2,a]}}))}))},e.prototype.getAccessToken=function(){return o(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return t={},[4,this.httpRequest.getAccessToken()];case 1:return[2,(t.accessToken=e.sent().accessToken,t.env=this.config.env,t)]}}))}))},e.prototype.onLoginStateExpire=function(t){lt.addEventListener("loginStateExpire",t)},e.prototype.getLoginState=function(){return o(this,void 0,void 0,(function(){var t,e,n,r,o;return i(this,(function(i){switch(i.label){case 0:if(t=this.httpRequest,e=t.cache,n=t.refreshTokenKey,r=t.accessTokenKey,!(o=e.getStore(n)))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.httpRequest.refreshAccessToken()];case 2:return i.sent(),[3,4];case 3:return i.sent(),[2,null];case 4:return[2,{isAnonymous:this.loginType===u.LOGINTYPE.ANONYMOUS,credential:{refreshToken:o,accessToken:e.getStore(r)}}];case 5:return[2,null]}}))}))},e.prototype.signInWithTicket=function(t){return o(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:if("string"!=typeof t)throw new Error("ticket must be a string");return e=this.httpRequest,n=e.cache,r=e.refreshTokenKey,[4,this.httpRequest.send("auth.signInWithTicket",{ticket:t,refresh_token:n.getStore(r)||""})];case 1:return(o=i.sent()).refresh_token?(this.customAuthProvider.setRefreshToken(o.refresh_token),[4,this.httpRequest.refreshAccessToken()]):[3,3];case 2:return i.sent(),lt.activateEvent(lt.EVENTS.LOGIN_STATE_CHANGED),lt.activateEvent(lt.EVENTS.LOGIN_TYPE_CHANGE,u.LOGINTYPE.CUSTOM),[2,{credential:{refreshToken:o.refresh_token}}];case 3:throw new Error("[tcb-js-sdk] \u81ea\u5b9a\u4e49\u767b\u5f55\u5931\u8d25")}}))}))},e.prototype.shouldRefreshAccessToken=function(t){this.httpRequest._shouldRefreshAccessTokenHook=t.bind(this)},e.prototype.getUserInfo=function(){return this.httpRequest.send("auth.getUserInfo",{}).then((function(t){return t.code?t:r(r({},t.data),{requestId:t.seqId})}))},e}(u.default);e.default=l})),gt=m((function(t,e){var n=y&&y.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},r=y&&y.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!((o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.uploadFile=function(t,e){e=e||V.createPromiseCallback();var n=new ft.Request(this.config),r=t.cloudPath,o=t.filePath,i=t.onUploadProgress,s=t.fileType||"image";return n.send("storage.getUploadMetadata",{path:r}).then((function(t){var a=t.data,c=a.url,u=a.authorization,l=a.token,f=a.fileId,p=a.cosFileId,d=t.requestId,h={key:r,signature:u,"x-cos-meta-fileid":p,success_action_status:"201","x-cos-security-token":l};n.upload({url:c,data:h,file:o,name:r,fileType:s,onUploadProgress:i}).then((function(t){201===t.statusCode?e(null,{fileID:f,requestId:d}):e(new Error("STORAGE_REQUEST_FAIL: "+t.data))})).catch((function(t){e(t)}))})).catch((function(t){e(t)})),e.promise},e.deleteFile=function(t,e){var n=t.fileList;if(e=e||V.createPromiseCallback(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList\u5fc5\u987b\u662f\u975e\u7a7a\u7684\u6570\u7ec4"};for(var r=0,o=n;r<o.length;r++){var i=o[r];if(!i||"string"!=typeof i)return{code:"INVALID_PARAM",message:"fileList\u7684\u5143\u7d20\u5fc5\u987b\u662f\u975e\u7a7a\u7684\u5b57\u7b26\u4e32"}}var s={fileid_list:n};return new ft.Request(this.config).send("storage.batchDeleteFile",s).then((function(t){t.code?e(null,t):e(null,{fileList:t.data.delete_list,requestId:t.requestId})})).catch((function(t){e(t)})),e.promise},e.getTempFileURL=function(t,e){var n=t.fileList;e=e||V.createPromiseCallback(),n&&Array.isArray(n)||e(null,{code:"INVALID_PARAM",message:"fileList\u5fc5\u987b\u662f\u975e\u7a7a\u7684\u6570\u7ec4"});for(var r=[],o=0,i=n;o<i.length;o++){var s=i[o];"object"==typeof s?(s.hasOwnProperty("fileID")&&s.hasOwnProperty("maxAge")||e(null,{code:"INVALID_PARAM",message:"fileList\u7684\u5143\u7d20\u5fc5\u987b\u662f\u5305\u542bfileID\u548cmaxAge\u7684\u5bf9\u8c61"}),r.push({fileid:s.fileID,max_age:s.maxAge})):"string"==typeof s?r.push({fileid:s}):e(null,{code:"INVALID_PARAM",message:"fileList\u7684\u5143\u7d20\u5fc5\u987b\u662f\u5b57\u7b26\u4e32"})}var a={file_list:r};return new ft.Request(this.config).send("storage.batchGetDownloadUrl",a).then((function(t){t.code?e(null,t):e(null,{fileList:t.data.download_list,requestId:t.requestId})})).catch((function(t){e(t)})),e.promise},e.downloadFile=function(t,o){var i=t.fileID;return n(this,void 0,void 0,(function(){var t,n,s,a,c;return r(this,(function(r){switch(r.label){case 0:return[4,e.getTempFileURL.call(this,{fileList:[{fileID:i,maxAge:600}]})];case 1:return t=r.sent(),"SUCCESS"!==(n=t.fileList[0]).code?[2,o?o(n):new Promise((function(t){t(n)}))]:(s=n.download_url,s=encodeURI(s),a=new ft.Request(this.config),o?[4,a.download({url:s})]:[3,3]);case 2:return c=r.sent(),o(c),[3,4];case 3:return[2,a.download({url:s})];case 4:return[2]}}))}))}})),yt=m((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.callFunction=function(t,e){var n,r=t.name,o=t.data,i=t.query,s=t.parse,a=t.search,c=e||V.createPromiseCallback();try{n=o?JSON.stringify(o):""}catch(t){return Promise.reject(t)}if(!r)return Promise.reject(new Error("\u51fd\u6570\u540d\u4e0d\u80fd\u4e3a\u7a7a"));var u={query:i,parse:s,search:a,function_name:r,request_data:n};return new ft.Request(this.config).send("functions.invokeFunction",u).then((function(t){if(t.code)c(null,t);else{var e=t.data.response_data;if(s)c(null,{result:e,requestId:t.requestId});else try{e=JSON.parse(t.data.response_data),c(null,{result:e,requestId:t.requestId})}catch(t){c(new Error("response data must be json"))}}return c.promise})).catch((function(t){c(t)})),c.promise}})),_t=_(m((function(t){var e=y&&y.__assign||function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},n=y&&y.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},r=y&&y.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},o=n(B),i=n(vt),s=r(gt),a=r(yt),c={timeout:15e3},u=new(function(){function t(t){var e=this;this.config=t||this.config,this.authObj=void 0,lt.addEventListener(lt.EVENTS.LOGIN_TYPE_CHANGE,(function(t){t.data===pt.LOGINTYPE.ANONYMOUS&&(e.config.persistence="local")}))}return t.prototype.init=function(n){return this.config=e(e({},c),n),ct.Adapter.adapter||this._useDefaultAdapter(),new t(this.config)},t.prototype.auth=function(t){var n=(void 0===t?{}:t).persistence;return this.authObj||(this.config=e(e({},this.config),{persistence:n||ct.Adapter.adapter.primaryStorage||"session"}),this.authObj=new i.default(this.config),this.authObj.init()),this.authObj},t.prototype.on=function(t,e){return lt.addEventListener.apply(this,[t,e])},t.prototype.off=function(t,e){return lt.removeEventListener.apply(this,[t,e])},t.prototype.callFunction=function(t,e){return a.callFunction.apply(this,[t,e])},t.prototype.deleteFile=function(t,e){return s.deleteFile.apply(this,[t,e])},t.prototype.getTempFileURL=function(t,e){return s.getTempFileURL.apply(this,[t,e])},t.prototype.downloadFile=function(t,e){return s.downloadFile.apply(this,[t,e])},t.prototype.uploadFile=function(t,e){return s.uploadFile.apply(this,[t,e])},t.prototype.useAdapters=function(t){var e=ct.useAdapters(t)||{},n=e.adapter,r=e.runtime;n&&(ct.Adapter.adapter=n),r&&(ct.Adapter.runtime=r)},t.prototype._useDefaultAdapter=function(){var t=ct.useDefaultAdapter(),e=t.adapter,n=t.runtime;ct.Adapter.adapter=e,ct.Adapter.runtime=n},t}());u.useAdapters(o.default);try{window.tcb=u}catch(y){}t.exports=u})));_t.useAdapters(B);var mt,bt,wt=_t,Ot=wt.init;function St(t){mt||(mt={PLATFORM:"app-plus",OS:T,APPID:S.appid,CLIENT_SDK_VERSION:"1.0.0"},bt={ak:S.appid,p:"android"===T?"a":"i",ut:C(),uuid:j()});var e=JSON.parse(JSON.stringify(t.data||{})),n=t.name,r=this.config.spaceId,o={tencent:"t",aliyun:"a"}[this.config.provider],i=Object.assign({},bt,{fn:n,sid:r,pvd:o});Object.assign(e,{clientInfo:mt,uniCloudClientInfo:encodeURIComponent(JSON.stringify(i))});var s=this.adapter.getStore("uni_id_token")||this.adapter.getStore("uniIdToken");return s&&(e.uniIdToken=s),t.data=e,t}wt.init=function(t){t.env=t.spaceId;var e=Ot.call(this,t);e.config.provider="tencent",e.config.spaceId=t.spaceId;var n=e.auth;return e.auth=function(t){var e=n.call(this,t);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(t){e[t]=O(e[t]).bind(e)})),e},["uploadFile","deleteFile","getTempFileURL","downloadFile"].forEach((function(t){e[t]=O(e[t]).bind(e)})),e};var kt={request:function(t){return uni.request(t)},uploadFile:function(t){return uni.uploadFile(t)},setStore:function(t,e){return uni.setStorageSync(t,e)},getStore:function(t){return uni.getStorageSync(t)}},Tt=new(function(){function t(){s(this,t),this.adapter=kt}return i(t,[{key:"init",value:function(t){var e={},n=!1!==t.debugFunction&&!1;switch(t.provider){case"tencent":e=wt.init(Object.assign(t,{useDebugFunction:n}));break;case"aliyun":e=M.init(Object.assign(t,{useDebugFunction:n}));break;default:throw new Error("\u672a\u63d0\u4f9b\u6b63\u786e\u7684provider\u53c2\u6570")}if(e.isReady=!1,!1!==t.autoSignIn){var r=e.auth();e.initSignIn=r.getLoginState().then((function(t){return t?Promise.resolve():r.signInAnonymously()})).then((function(){return new Promise((function(t){setTimeout((function(){T=uni.getSystemInfoSync().platform,k=uni.getStorageSync("__DC_CLOUD_UUID")||P(32),t()}),0)}))})).then((function(){e.isReady=!0}))}return function(t){var e=t.callFunction;t.callFunction=function(t){var n,r=this;return n=this.isReady?Promise.resolve():this.initSignIn,n.then((function(){var n=St.call(r,t),o={aliyun:"aliyun",tencent:"tcb"}[r.config.provider];return new Promise((function(i,s){e.call(r,n).then((function(e){if(r.config.useDebugFunction&&e&&e.requestId){var n=JSON.stringify({spaceId:r.config.spaceId,functionName:t.name,requestId:e.requestId});console.log("[".concat(o,"-request]").concat(n,"[/").concat(o,"-request]"))}i(e)})).catch((function(e){if(r.config.useDebugFunction&&e&&e.requestId){var n=JSON.stringify({spaceId:r.config.spaceId,functionName:t.name,requestId:e.requestId});console.log("[".concat(o,"-request]").concat(n,"[/").concat(o,"-request]"))}e&&e.message&&(e.message="[".concat(t.name,"]: ").concat(e.message)),s(e)}))}))}))};var n=t.callFunction;t.callFunction=function(t){return O(n).call(this,t)}}(e),e.init=this.init,e.adapter=this.adapter,e}},{key:"setAdapter",value:function(t){this.adapter=t}}]),t}());try{var Et={};1===[].length&&(Et=[][0]),Tt=Tt.init(Et)}catch(y){["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile"].forEach((function(t){Tt[t]=function(){var t=[].length>0?"\u5e94\u7528\u6709\u591a\u4e2a\u670d\u52a1\u7a7a\u95f4\uff0c\u8bf7\u901a\u8fc7uniCloud.init\u65b9\u6cd5\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u670d\u52a1\u7a7a\u95f4":"\u5e94\u7528\u672a\u5173\u8054\u670d\u52a1\u7a7a\u95f4\uff0c\u8bf7\u5728cloudfunctions\u76ee\u5f55\u53f3\u952e\u5173\u8054\u670d\u52a1\u7a7a\u95f4";return console.error(t),Promise.reject(new E({code:"SYS_ERR",message:t}))}}))}var Pt=Tt,jt=Pt;e.default=jt}).call(this,n("c8ba"),n("fe07")["default"])},ba33:function(t,e,n){"use strict";n.r(e);var r=n("9965"),o=n("9728");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);var s,a=n("f0c5"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},c867:function(t,e,n){"use strict";n.r(e);var r=n("05ea"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},d074:function(t,e,n){"use strict";var r,o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","content"),attrs:{_i:0}},[n("view",{staticClass:t._$s(1,"sc","input-group"),attrs:{_i:1}},[n("view",{staticClass:t._$s(2,"sc","input-row border"),attrs:{_i:2}},[n("text",{staticClass:t._$s(3,"sc","title"),attrs:{_i:3}}),n("m-input",{attrs:{type:"text",focus:!0,clearable:!0,placeholder:"\u8bf7\u8f93\u5165\u8d26\u53f7",_i:4},model:{value:t._$s(4,"v-model",t.username),callback:function(e){t.username=e},expression:"username"}})],1),n("view",{staticClass:t._$s(5,"sc","input-row border"),attrs:{_i:5}},[n("text",{staticClass:t._$s(6,"sc","title"),attrs:{_i:6}}),n("m-input",{attrs:{type:"password",displayable:!0,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",_i:7},model:{value:t._$s(7,"v-model",t.password),callback:function(e){t.password=e},expression:"password"}})],1),n("view",{staticClass:t._$s(8,"sc","input-row"),attrs:{_i:8}},[n("text",{staticClass:t._$s(9,"sc","title"),attrs:{_i:9}}),n("m-input",{attrs:{type:"password",displayable:!0,placeholder:"\u8bf7\u786e\u8ba4\u5bc6\u7801",_i:10},model:{value:t._$s(10,"v-model",t.confirmPassword),callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1)]),n("view",{staticClass:t._$s(11,"sc","btn-row"),attrs:{_i:11}},[n("button",{staticClass:t._$s(12,"sc","primary"),attrs:{_i:12},on:{click:t.register}})])])},i=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))},d8a3:function(t,e,n){"use strict";n.r(e);var r=n("5a69"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},dd9a:function(t,e,n){"use strict";(function(t,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={computed:(0,o.mapState)(["forcedLogin","hasLogin","userName"]),onLoad:function(){var e=this,n=uni.getStorageSync("login_type");if("local"!==n){var o=uni.getStorageSync("uniIdToken");o?(this.login(uni.getStorageSync("username")),t.callFunction({name:"user-center",data:{action:"checkToken"},success:function(t){r("log","checkToken success",t," at pages/main/main.vue:57"),t.result.code>0&&(e.forcedLogin?uni.reLaunch({url:"../login/login"}):uni.navigateTo({url:"../login/login"}))},fail:function(t){uni.showModal({content:JSON.stringify(t),showCancel:!1})}})):this.guideToLogin()}else this.login(uni.getStorageSync("username"))},methods:s({},(0,o.mapMutations)(["login"]),{statechange:function(t){r("log","live-player code:",t.detail.code," at pages/main/main.vue:86")},error:function(t){r("error","live-player error:",t.detail.errMsg," at pages/main/main.vue:89")},guideToLogin:function(){var t=this;uni.showModal({title:"\u672a\u767b\u5f55",content:"\u60a8\u672a\u767b\u5f55\uff0c\u9700\u8981\u767b\u5f55\u540e\u624d\u80fd\u7ee7\u7eed",showCancel:!this.forcedLogin,success:function(e){e.confirm&&(t.forcedLogin?uni.reLaunch({url:"../login/login"}):uni.navigateTo({url:"../login/login"}))}})}})};e.default=c}).call(this,n("a9ff")["default"],n("0de9")["default"])},e162:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("8bbf")),o=i(n("2f62"));function i(t){return t&&t.__esModule?t:{default:t}}r.default.use(o.default);var s=new o.default.Store({state:{forcedLogin:!1,hasLogin:!1,userName:""},mutations:{login:function(t,e){t.userName=e||"\u65b0\u7528\u6237",t.hasLogin=!0},logout:function(t){t.userName="",t.hasLogin=!1}}}),a=s;e.default=a},f0c5:function(t,e,n){"use strict";function r(t,e,n,r,o,i,s,a,c,u){var l,f="function"===typeof t?t.options:t;if(c){f.components||(f.components={});var p=Object.prototype.hasOwnProperty;for(var d in c)p.call(c,d)&&!p.call(f.components,d)&&(f.components[d]=c[d])}if(u&&((u.beforeCreate||(u.beforeCreate=[])).unshift((function(){this[u.__module]=this})),(f.mixins||(f.mixins=[])).push(u)),e&&(f.render=e,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},f._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(f.functional){f._injectStyles=l;var h=f.render;f.render=function(t,e){return l.call(e),h(t,e)}}else{var v=f.beforeCreate;f.beforeCreate=v?[].concat(v,l):[l]}return{exports:t,options:f}}n.d(e,"a",(function(){return r}))},f9e4:function(t,e,n){"use strict";var r={mIcon:n("ba33").default},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","m-input-view"),attrs:{_i:0}},[n("input",{staticClass:t._$s(1,"sc","m-input-input"),attrs:{focus:t._$s(1,"a-focus",t.focus),type:t._$s(1,"a-type",t.inputType),value:t._$s(1,"a-value",t.value),placeholder:t._$s(1,"a-placeholder",t.placeholder),password:t._$s(1,"a-password","password"===t.type&&!t.showPassword),_i:1},on:{input:t.onInput,focus:t.onFocus,blur:t.onBlur}}),t._$s(2,"i",t.clearable&&!t.displayable&&t.value.length)?n("view",{staticClass:t._$s(2,"sc","m-input-icon"),attrs:{_i:2}},[n("m-icon",{attrs:{color:"#666666",type:"clear",_i:3},on:{click:t.clear}})],1):t._e(),t._$s(4,"i",t.displayable)?n("view",{staticClass:t._$s(4,"sc","m-input-icon"),attrs:{_i:4}},[n("m-icon",{style:t._$s(5,"s",{color:t.showPassword?"#666666":"#cccccc"}),attrs:{type:"eye",_i:5},on:{click:t.display}})],1):t._e()])},i=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))},fe07:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.Behavior=Ct,e.Component=jt,e.Page=Et,e.nextTick=e.default=void 0;var r,o=i(n("8bbf"));function i(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){return p(t)||f(t,e)||u(t,e)||c()}function c(){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 u(t,e){if(t){if("string"===typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),e&&n.length===e)break}catch(c){o=!0,i=c}finally{try{r||null==a["return"]||a["return"]()}finally{if(o)throw i}}return n}}function p(t){if(Array.isArray(t))return t}function d(t,e){t&&(e.mpOptions.data=t)}function h(e){e.components=t.__wxVueOptions.components}var v=Object.prototype.toString,g=Object.prototype.hasOwnProperty;function y(t){return"function"===typeof t}function _(t){return"[object Object]"===v.call(t)}function m(t,e){return g.call(t,e)}function b(){}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var O=/-(\w)/g,S=w((function(t){return t.replace(O,(function(t,e){return e?e.toUpperCase():""}))})),k="__data__",T={created:"onServiceCreated",attached:"onServiceAttached",ready:"mounted",moved:"moved",detached:"destroyed"},E=Object.keys(T),P={show:"onPageShow",hide:"onPageHide",resize:"onPageResize"},j=Object.keys(P),C=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function A(t,e){var n=Object.create(null);Object.keys(t).forEach((function(e){var r=t[e];y(r)&&-1===C.indexOf(e)&&(n[e]=r)})),e.methods=n}function x(t,e){Object.keys(t).forEach((function(n){-1!==C.indexOf(n)&&(e[n]=t[n])}))}function I(t){var e={mixins:[],mpOptions:{}};return h(e),d(t.data,e),A(t,e),x(t,e),e}function N(t,e){t&&(e.mpOptions.properties=t)}function $(t,e){t&&(e.mpOptions.options=t)}function M(t,e){t&&(t.$emit&&(console.warn('Method "$emit" conflicts with an existing Vue instance method'),delete t.$emit),e.methods=t)}function L(t,e){E.forEach((function(n){m(t,n)&&(e[T[n]]||(e[T[n]]=[])).push(t[n])}))}var R={"wx://form-field":{},"wx://component-export":{}};function D(t){var e=t.behaviors,n=t.definitionFilter,r=[];if(Array.isArray(e)&&e.forEach((function(e){e="string"===typeof e?R[e]:e,e.definitionFilter&&(r.push(e.definitionFilter),e.definitionFilter.call(null,t,[]))})),y(n))return function(t){n(t,r)}}function U(t,e){D(t)}function q(t){var e=t.data,n=t.methods,r=t.behaviors,o=t.properties,i={watch:{},mpOptions:{mpObservers:[]}};return d(e,i),M(n,i),K(r,i),N(o,i),L(t,i),U(t),i}var F={"wx://form-field":{beforeCreate:function(){var t=this.$options.mpOptions;t.properties||(t.properties=Object.create(null));var e=t.properties;m(e,"name")||(e.name={type:String}),m(e,"value")||(e.value={type:String})}}};function K(t,e){t&&t.forEach((function(t){"string"===typeof t?F[t]&&e.mixins.push(F[t]):e.mixins.push(q(t))}))}function G(t){return t.split(".")}function H(t){return t.split(",").map((function(t){return G(t)}))}function B(t,e){if(t){var n=e.mpOptions.mpObservers;Object.keys(t).forEach((function(e){n.push({paths:H(e),observer:t[e]})}))}}function V(t,e){0===e.indexOf("/")&&(t="");var n=t.split("/"),r=e.split("/");n.pop();while(r.length){var o=r.shift();""!==o&&"."!==o&&(".."!==o?n.push(o):n.pop())}return n.join("/")}function Y(e,n){e&&(Object.keys(e).forEach((function(n){var r=e[n];r.name=n,r.target=r.target?String(r.target):V(t.__wxRoute,n)})),n.mpOptions.relations=e)}function J(t,e){t&&(Array.isArray(t)||(t=[t]),e.mpOptions.externalClasses=t,e.mpOptions.properties||(e.mpOptions.properties=Object.create(null)),t.forEach((function(t){e.mpOptions.properties[S(t)]={type:String,value:""}})))}function W(t,e){t&&L(t,e)}function z(t,e){t&&j.forEach((function(n){var r=t[n];y(r)&&(e[P[n]]=r)}))}function X(t){var e=t.data,n=t.options,r=t.methods,o=t.behaviors,i=t.lifetimes,s=t.observers,a=t.relations,c=t.properties,u=t.pageLifetimes,l=t.externalClasses,f={mixins:[],props:{},watch:{},mpOptions:{mpObservers:[]}};return h(f),d(e,f),$(n,f),M(r,f),K(o,f),W(i,f),B(s,f),Y(a,f),N(c,f),z(u,f),J(l,f),L(t,f),U(t),f}function Q(t,e,n,r){if(e){var o="_$".concat(t,"Handlers");(r[o]||(r[o]=[])).push((function(){e.call(r,n)}))}}function Z(t,e,n){var r="linked",o=t.name,i=n._$relationNodes||(n._$relationNodes=Object.create(null));(i[o]||(i[o]=[])).push(e),Q(r,t[r],e,n)}function tt(t,e,n){var r="unlinked";Q(r,t[r],e,n)}function et(t,e,n){var r=t&&t.$options.mpOptions&&t.$options.mpOptions.relations;if(!r)return[];var o=Object.keys(r).find((function(t){var o=r[t];return o.target===e&&o.type===n}));return o?[r[o],t]:[]}function nt(t,e,n){var r=n(t,t.$options.mpOptions.path),o=a(r,2),i=o[0],s=o[1];i&&(Z(i,t,s),Z(e,s,t),tt(i,t,s),tt(e,s,t))}function rt(t,e){var n=t.type;"parent"===n?nt(e,t,(function(t,e){return et(t.$parent,e,"child")})):"ancestor"===n&&nt(e,t,(function(t,e){var n=t.$parent;while(n){var r=et(n,e,"descendant");if(r.length)return r;n=n.$parent}return[]}))}function ot(t){var e=t.$options.mpOptions||{},n=e.relations;n&&Object.keys(n).forEach((function(e){rt(n[e],t)}))}function it(t,e){var n=t["_$".concat(e,"Handlers")];n&&n.forEach((function(t){return t()}))}var st={enumerable:!0,configurable:!0,get:b,set:b};function at(t,e,n){st.get=function(){return this[e][n]},st.set=function(t){this[e][n]=t},Object.defineProperty(t,n,st)}function ct(t,e,n){var r=t.replace(/\[(\d+?)\]/g,".$1").split(".");return r.reduce((function(t,n,o){if(o!==r.length-1)return"undefined"===typeof t[n]&&(t[n]={}),t[n];t[n]=e}),n),1===r.length}function ut(t,e){var n=this;_(t)&&(Object.keys(t).forEach((function(e){ct(e,t[e],n.data)&&!m(n,e)&&at(n,k,e)})),this.$forceUpdate(),y(e)&&this.$nextTick(e))}var lt=Object.prototype.toString,ft=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=lt.call(n);if("[object Array]"===r)return e=n.slice(0),e;if("[object Object]"===r){for(var o in n)e[o]=t(e[o],n[o]);return e}if("[object Date]"===r)return new Date(n.getTime());if("[object RegExp]"===r){var i=String(n),s=i.lastIndexOf("/");return new RegExp(i.slice(1,s),i.slice(s+1))}return n},pt=function(t){return ft("[object Array]"===lt.call(t)?[]:{},t)},dt=(r={},s(r,String,""),s(r,Number,0),s(r,Boolean,!1),s(r,Object,null),s(r,Array,[]),s(r,null,null),r);function ht(t){return dt[t]}function vt(t){return _(t)?m(t,"value")?t.value:ht(t.type):ht(t)}function gt(t){return _(t)?t.type:t}function yt(t,e,n,r){var o=n[t];if(void 0!==o){var i=e[t],s=gt(i);o=_t(o,s);var a=i&&i.observer;return a&&setTimeout((function(){mt(a,r,o)}),4),o}return vt(e[t])}function _t(t,e){return e===Boolean?!!t:e===String?String(t):t}function mt(t,e,n,r){try{"function"===typeof t?t.call(e,n,r):"string"===typeof t&&"function"===typeof e[t]&&e[t](n,r)}catch(o){console.error("execute observer ".concat(t," callback fail! err: ").concat(o))}}function bt(t,e){var n=t.$options.mpOptions.properties;if(n){var r=pt(t.$options.propsData)||{},o=function(o){var i=!!_(n[o])&&n[o].observer,s=yt(o,n,r,t);Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){var n=s;e===s||e!==e&&s!==s||(s=Array.isArray(e)?e.slice(0):e,i&&mt(i,t,e,n),t.$forceUpdate())}})};for(var i in n)o(i)}}function wt(t){var e=t.$options.mpOptions&&t.$options.mpOptions.properties,n=t.$options.propsData;n&&e&&Object.keys(e).forEach((function(r){m(n,r)&&(t[r]=_t(n[r],gt(e[r])))}))}function Ot(t){var e=JSON.parse(JSON.stringify(t.$options.mpOptions.data||{}));t[k]=e;var n={get:function(){return t[k]},set:function(e){t[k]=e}};Object.defineProperties(t,{data:n,properties:n}),t.setData=ut,bt(t,e),Object.keys(e).forEach((function(e){at(t,k,e)}))}function St(t){var e=t.$emit;t.triggerEvent=function(n,r,o){var i={dataset:t.$el.dataset},s={target:i,currentTarget:i,detail:r,preventDefault:b,stopPropagation:b};e.call(t,n,s)},t.$emit=function(){t.triggerEvent.apply(t,arguments)},t.getRelationNodes=function(e){return(t._$relationNodes&&t._$relationNodes[e]||[]).filter((function(t){return!t._isDestroyed}))},t._$updateProperties=wt}function kt(t){var e=t.$options.watch;e&&Object.keys(e).forEach((function(n){var r=e[n];if(r.mounted){var o=t[n],i=r.handler;"string"===typeof i&&(i=t[i]),i&&i.call(t,o,o)}}))}var Tt={beforeCreate:function(){this._renderProxy=this,this._$self=this,this._$noop=b},created:function(){Ot(this),St(this),ot(this)},mounted:function(){kt(this)},destroyed:function(){it(this,"unlinked")}};function Et(e){var n=I(e);n.mixins.unshift(Tt),n.mpOptions.path=t.__wxRoute,t.__wxComponents[t.__wxRoute]=n}function Pt(t){t.onServiceAttached||(t.onServiceAttached=[]),t.onServiceAttached.push((function(){it(this,"linked")}))}function jt(e){var n=X(e);n.mixins.unshift(Tt),n.mpOptions.path=t.__wxRoute,Pt(n),t.__wxComponents[t.__wxRoute]=n}function Ct(t){return t}t.__wxRoute="",t.__wxComponents=Object.create(null),t.__wxVueOptions=Object.create(null);var At=o.default.nextTick;e.nextTick=At;var xt=uni.__$wx__,It=xt;e.default=It}).call(this,n("c8ba"))}},[["32ec","app-config"]]]);