UNPKG

nimble-ui

Version:
1 lines 35.1 kB
module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="c1YY")}({"/Ot8":function(t,e,n){"use strict";var o,i,r,a,s={trident:(o=navigator.userAgent).indexOf("Trident")>-1,presto:o.indexOf("Presto")>-1,webKit:o.indexOf("AppleWebKit")>-1,gecko:o.indexOf("Gecko")>-1&&-1===o.indexOf("KHTML"),mobile:!!o.match(/AppleWebKit.*Mobile.*/),ios:!!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:o.indexOf("Android")>-1||o.indexOf("Adr")>-1,iPhone:o.indexOf("iPhone")>-1,iPad:o.indexOf("iPad")>-1,symbian:o.indexOf("SymbianOS")>-1,windowPhone:o.indexOf("Windows Phone")>-1,iPod:o.indexOf("iPod")>-1,weixin:/MicroMessenger/i.test(o),browserVersion:(o.match(/version\/(.+?)\s/i)||[])[1],appVersion:"",kernel:/tencenttraveler|qqbrowse/i.test(o)?"x5":"",qqnews:/qqnews/i.test(o),isMiniProgram:"miniprogram"===window.__wxjs_environment||/miniProgram/i.test(o)},c=(i=window.screen||{},a={mobile:!1,pc:!1,ios:(r=s).ios||r.iPhone||r.iPad||!1,weixin:r.weixin||!1,isWeixin:r.weixin||!1,iPad:r.iPad||!1,isApp:!1,appVersion:r.appVersion,browserVersion:r.browserVersion,isLightApp:!1,kernel:r.kernel,isIphoneX:r.iPhone&&812===i.height&&375===i.width,android:r.android,isQqnews:r.qqnews,isMiniProgram:r.isMiniProgram},r.mobile||r.ios||r.android||r.iPhone||r.iPad||r.symbian||r.windowPhone||r.iPod||a.isApp?a.mobile=!0:a.pc=!0,a);e.a=c},"0Zk/":function(t,e,n){"use strict";e.a=function(t,e){return Object(o.a)(t,e).replace(/^[a-z]/,function(t){return t.toUpperCase()})};var o=n("lXuC")},"4qRk":function(t,e,n){"use strict";e.a=function(t){t&&!t.install&&(t.install=function(e){var n=t.name||"",o=e.component(n);o||e.component(n,t)});return t}},"5fCB":function(t,e,n){"use strict";var o=n("E5mE"),i=n("eY/N");e.a=function t(){for(var e=!0,n=void 0,r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];if(a instanceof Array&&(n=a.slice(0,1)[0]),"boolean"==typeof n&&(e=n,a.splice(0,1),e||(n=a.splice(0,1)[0])),a&&a.length<1)return"boolean"==typeof n?a[1]:n;e&&(n=null);for(var c=0;c<a.length;c++){var u=a[c];if(u instanceof Object)if(e){for(var f in n&&n instanceof Object||(n=u instanceof Array?[]:{}),u)if(u.hasOwnProperty(f)){var p=u[f];if(h(p)){var l=h(n[f])&&n[f]||(p instanceof Array?[]:{});n[f]=t(l,p)}else void 0!==p?n[f]=p:void 0!==n[f]&&(n[f]=p)}}else n=n&&n instanceof Object?Object.assign(n,u):u}return n;function h(t){return t&&(Object(o.a)(t,"Array")||Object(i.a)(t))||!1}}},"85H6":function(t,e,n){"use strict";e.a=function(t){var e=document.cookie,n=e&&e.split(/;\s{0,1}/),o={};if(n&&n.length)for(var i=0;i<n.length;i++){var r=((n[i]||"")+"").split("=");if(r&&r.length)try{o[r[0]]=decodeURIComponent(r[1]||"")}catch(t){o[r[0]]=r[1]||""}}return t?o[t]||null:o}},E5mE:function(t,e,n){"use strict";e.a=function(t,e){var n=!1;try{n=Object.prototype.toString.call(t)==="[object "+e+"]"}catch(t){}return n}},EamC:function(t,e,n){"use strict";var o=n("5fCB"),i=n("fnCA"),r=n("zagf");var a=window.localStorage||{},s=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.setLocal=function(t,e){t&&void 0!==e&&Object(r.a)(a.setItem,[t,JSON.stringify(e)],a)},t.prototype.getLocal=function(t){var e=Object(r.a)(a.getItem,[t],a);if(e)try{e=JSON.parse(e)}catch(n){e=null,Object(r.a)(a.removeItem,[t],a)}return e},t.prototype.removeLocal=function(t){return Object(r.a)(a.removeItem,[t],a)},t.prototype.clearLocal=function(){return Object(r.a)(a.clear,[],a)},t}()),c=n("/Ot8"),u=n("IrUm");var f={},p={js:{position:"body",tagName:"script",src:"src",attr:{type:"text/javascript",async:"async"}},css:{tagName:"link",src:"href",attr:{rel:"stylesheet"}}};function l(t,e,n,o){if(f[t])return f[t];"string"==typeof e&&(n=e,e={}),t=(t||"")+"",n=((n||"")+"").toLowerCase();var i=function(t,e){var n=t.replace(/^\s+|\s+$/,""),o=n&&n.match(/\.([^.]+)$/),i=void 0;return o&&o.length>1&&(i=o.pop()),i||(i=e),i||(i="js"),i.toLowerCase()}(t,n),r=0;return f[t]=new Promise(function(a,s){!function a(s,c){var u=Object.assign(o||{},p[i]||n&&p[n]||{});if(t&&u){var l=document.createElement(u.tagName),h=Object.assign({},u.attr||{},e||{});if(h)for(var _ in h)if(h.hasOwnProperty(_)){var g=h[_];l.setAttribute(_,g||_)}l[u.src]=t,l.onload=function(t){l=null,r=0,setTimeout(function(){s(t)},1)},l.onerror=function(e){if(l.parentNode.removeChild(l),r>0)return delete f[t],c(e);r++,l=null,a(s,c)};var d=u.position||"head",v=document[d]||document.head;v&&v.appendChild(l)}else c(new Error("不支持("+t||" )的文件类型"))}(a,s)}),f[t]}var h={partner:"xxx",appName:"xxxx"},_={};var g,d=window.location||{},v={isSetCookie:!0,domain:!/^\s*(https?:\/\/)?((?:172|192|127)(?:\.\d{1,3}){3}|localhost)(\/|:\d{1,4}|$)/.test(d.host||"")&&(d.hostname||"").split(".").slice(-2).join(".")||"",isMiniProgram:!1,appid:"",partner:"xxx",appName:"xxx_app",channel:"TongDunWx",event_id:"Login_web_20171031",generateUUID:i.a,storage:s,device:c.a,force:!1,filterUserInfoData:function(t){var e=(t=t||{}).Authorization;return Object.assign({},t,{islogin:!!e})},userHeadImg:"",isReset:!1,isNative:!0,timeout:3e5,forceClearCookie:!1,diffData:u.a,diffLoginKeys:["islogin","userid","phone","name","usersession"],validData:function(t,e){var n="",o=(e||0===e?e:"")+"";switch(t){case"vPhone":o?/^\d{11}$/.test(o)||(n="手机号码格式不正确"):n="手机号码不能为空";break;case"vCode":o?/\d{4}/.test(o)||(n="验证码格式不正确"):n="验证码不能为空"}return n},getBlackBox:function(t){var e=Object.assign({},h,t),n=e.uuid,o=e.appName,i=e.partner;return _[o+n]=_[o+n]||new Promise(function(t,e){l("//static.tongdun.net/monitor/monitor.js?t="+((new Date).getTime()/36e5).toFixed(0),{type:"text/javascript",async:!0,crossorigin:"anonymous"},"js").then(function(){var r=window._fmOpt={partner:i,appName:o,token:i+n,fmb:!0,success:function(e){t(e)},fpHost:"https://fp.tongdun.net"},a=new Image(1,1);a.onload=function(){r.imgLoaded=!0},a.src="https://fp.tongdun.net/fp/clear.png?partnerCode="+i+"&appName="+o+"&tokenId="+r.token,l("//static.tongdun.net/v3/fm.js?ver=0.1&t="+((new Date).getTime()/36e5).toFixed(0),{type:"text/javascript",async:!0},"js").catch(e)},e)}),_[o+n]},isToNativeFilter:function(t,e){return function(t,e,n){var o=t,i=e||{},r=o.isNative&&(i.isApp||i.isLightApp)&&o.actionWithNative instanceof Function;return r&&i.isLightApp&&(r=!!(r&&"undefined"!=typeof system&&system instanceof Object)),r}(t,t&&t.device)}},O={GET_USER_INFO:"getUserInfo",FORCE_LOGIN:"forceLogin",VALIDATE_LOGIN:"validateLogin"},m={IS_LOGIN:"IsLogin",GET_USER_INFO:"GetUserInfo",LOGOUT_COOKIE:"LogoutCookie",SIGN_IN:"SignIn",SET_LOGIN_COOKIE:"SetLoginCookie",GET_IDENTITY_CODE:"GetIdentityCode",GET_BLACK_BOX:"GetBlackBox",AUTH_LOGIN:"authLogin",AUTH_LOGIN_BINGDING:"AuthLoginBingding",GET_AUTH_INFO:"getAuthInfo",SIGN_OUT:"SignOut",UPDATE_PWD:"UpdatePwd",UPDATE_USER_INFO:"UserInfo"},y={SUCCESS:"success",REDIRECT:"redirect",USER_LOGIN:"userLogin",USER_CANCEL:"userCancel",GET_USER_INFO:"getUserInfo",LOGOUT:"logout",WE_BIND_SUCCESS:"weBindSuccess",WX_AUTH_SUCCESS:"wxAuthSuccess",MINI_PROGRAM_AUTH_INFO:"miniProgramAuthInfo"};!function(t){t.LOGIN_UUID="_login_uuid",t.USER_STORAGE_KEY="_user_key_",t.USER_COOKIE_KEY="__user_cookie_key_"}(g||(g={}));var b={LOGIN:"login",AGREEMENT:"agreement",CODE_LOGIN:"codeLogin"},w=n("uGS0");var E=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return Object.assign(i,o),i.name="MyError",i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(Error),I=n("qd2b"),P=n("rRBi"),L=n("OKn3");var j=function(t,e,n){var o=[];if((n=n||{})instanceof Object||(n={time:n}),t)try{if(void 0===e?e="":e instanceof Object?e=JSON.stringify(e):e+="",o.push(t+"="+Object(L.a)(e)),n.time){var i=new Date;i.setTime(i.getTime()+n.time),o.push("expires="+i.toUTCString())}n.domain&&o.push("domain="+n.domain),o.push("path=/"),document.cookie=o.join(";")}catch(t){}};var A=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));o._userInfo=null,o._currentUserInfo=null,o._loginState=null,o.currentOption=v,o.defaultOption=v;var i=o;return i.setDefaultOptions(n),i.currentOption=i.getOptions(),i._resetInit(i.defaultOption),i._resetLogin(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._resetInit=function(t){var e=this.currentOption;return this.currentOption=t&&this.getOptions(this.defaultOption,t||{})||this.currentOption,e.force&&(this.currentOption.force=e.force),this.currentOption},e.prototype._resetLogin=function(){this.currentOption=this.defaultOption,this._userInfo={islogin:!1},this._loginState=null},e.prototype._getData=function(t,e,n){var o=this.currentOption,i=o.getUserData,r=[t,e,n];switch(t){case m.GET_BLACK_BOX:i=o.getBlackBox,r=[e,n]}return Object(w.a)(i,r)},e.prototype._userInfoFilter=function(t){var e=this.currentOption;return Object(w.a)(e.filterUserInfoData||t,t)},e.prototype._successfilter=function(t){var e=this,n=e.currentOption;return new Promise(function(o,i){Object(w.a)(n.successfilter||t,t).then(function(t){var i=t||{islogin:!1},a=Object(r.a)(n.diffData,[e._currentUserInfo,i,n.diffLoginKeys]);o(Object(P.a)(!0,i)),a||(e._currentUserInfo=i,e.$emit(y.SUCCESS,Object(P.a)(!0,t)))},i)})},e.prototype._setUserInfo=function(t,e){var n=this,o=n.currentOption;return new Promise(function(i,r){n._successfilter(t).then(function(t){n._userInfo=t,n.setLoginState(t&&t.islogin);var a=void 0,s=o.storageKey||g.USER_STORAGE_KEY;!e&&t&&t.islogin?(t.Authorization&&o.isSetCookie&&j(o.cookieKey||g.USER_COOKIE_KEY,t.Authorization,{time:2592e6,domain:o.domain||""}),a=Object(w.a)(o.storage&&o.storage.setLocal,[s,t],!1,o.storage)):a=Object(w.a)(o.storage&&o.storage.removeLocal,s,!1,o.storage),a.then(function(){i(t)},r)},r)})},e.prototype._toNative=function(t,e){var n=this.currentOption;return Object(w.a)(n.actionWithNative,[t,e])},e.prototype._isToNative=function(t){var e=this.currentOption;return Object(r.a)(e.isToNativeFilter||!1,[e,t])},e.prototype.validData=function(t,e){var n=this.currentOption;return Object(r.a)(n.validData||!1,[t,e])},e.prototype.setLoginState=function(t){var e=t||!1;this._loginState=e},e.prototype.message=function(t,e){var n=this.currentOption;return Object(w.a)(n.message,[t,e])},e.prototype.getUUID=function(){var t=this.currentOption||{},e=t&&t.storage,n=t.loginUuidKey||g.LOGIN_UUID,o=Object(r.a)(e&&e.getLocal,[n],e);return o||(o=Object(r.a)(t.generateUUID))&&Object(r.a)(e&&e.setLocal,[n,o],e),this.getUUID=function(){return o&&Object(r.a)(e&&e.setLocal,[n,o],e),o},o},e}(I.a),U=n("85H6");var S=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));o._lastRun=0,o._loginPromise=null,o._getUserInfoPromise=null,o._getIsLoginPromise=null;var i=o;return i.setDefaultOptions(n),i._resetLogin(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._getIsLogin=function(t){var e=this;return e._getIsLoginPromise=e._getIsLoginPromise||new Promise(function(n,o){if(t&&t.Authorization)r(t);else{var i={};e._getLocalData().then(function(t){if(t){var e=t.Authorization;e&&(i={Authorization:e})}r(i)},function(){n(!1)})}function r(t){e._getData(m.IS_LOGIN,{},t).then(function(t){var e=t&&t.result+""=="1";n(e)},function(){n(!1)})}}),e._getIsLoginPromise.then(function(){e._getIsLoginPromise=null}),e._getIsLoginPromise},e.prototype._setLoginCookie=function(t){return new Promise(function(t,e){t(!0)})},e.prototype._getLocalData=function(){var t=this,e=t.currentOption,n=e.device||{};return new Promise(function(o,i){if(t._isToNative(O.GET_USER_INFO))t._toNative(O.GET_USER_INFO,{force:!1}).then(function(e){t._userInfoFilter(e).then(function(t){t&&(t._localDataType=n.isLightApp?"lightApp":"app"),o(t&&t.islogin&&t||null)},o)});else{var r=e.storageKey||g.USER_STORAGE_KEY,a=e.cookieKey||g.USER_COOKIE_KEY;Object(w.a)(e.storage&&e.storage.getLocal,r,!1,e.storage).then(function(t){t&&(t._localDataType="h5");var n=e.isSetCookie&&Object(U.a)(a)||"";!n||t&&t.Authorization===n?o(t&&t.islogin&&t||null):(t={islogin:!0,Authorization:n},Object(w.a)(e.storage&&e.storage.setLocal,[r,t],!1,e.storage).then(function(){t._localDataType="h5",t.Authorization&&e.isSetCookie&&j(a,t.Authorization,{time:2592e6,domain:e.domain||""}),o(t&&t.islogin&&t||null)}))},function(){o(null)})}})},e.prototype._getUserInfoEnd=function(t,e){var n=this;return new Promise(function(o,i){n._userInfoFilter(t).then(function(t){var r;r=t,n.$emit(y.GET_USER_INFO,Object(P.a)(!0,r)),n._setUserInfo(r,e).then(o,i)},i)})},e.prototype._getUserInfo=function(t,e){var n=this,o=n._resetInit(t),i=null,r=void 0;return e&&e.Authorization&&(r={Authorization:e.Authorization}),n._getUserInfoPromise=n._getUserInfoPromise||new Promise(function(a,s){var c=!1;n._isToNative(O.GET_USER_INFO)?(c=!0,i=n._toNative(O.GET_USER_INFO,{force:t&&t.force||!1})):i=o.isReset&&r&&r.Authorization?n._getData(m.GET_USER_INFO,{},r):new Promise(function(t,e){n._getLocalData().then(function(i){if(!o.isReset&&i&&i.Authorization&&i.loginName)t(i);else{var a="";!r&&i&&i.Authorization&&(a=i.Authorization,r={Authorization:a}),n._getData(m.GET_USER_INFO,{},r).then(function(e){a&&(e.Authorization=a),t(e)},e)}})}),i.then(function(t){e&&e.Authorization&&t&&!t.Authorization&&(t.Authorization=e.Authorization),n._getUserInfoEnd(Object.assign(e||{},t),c).then(a,s)},s)}),n._getUserInfoPromise.then(function(){n._getUserInfoPromise=null}),n._getUserInfoPromise},e.prototype._toNativeLogin=function(){var t=this,e=t.currentOption.device||{};return new Promise(function(n,o){t._toNative(O.FORCE_LOGIN).then(function(i){var r=e.isLightApp?"lightApp":"app";i&&"cancel"!==i._handleType?t._getUserInfoEnd(i).then(function(e){(e=e||{})._loginType=r,e.islogin?(t.setLoginState(!0),n(e),t.$emit(y.USER_LOGIN,Object(P.a)(!0,e))):(t.setLoginState(!1),e._handleType="cancel",n(e))},o):n({_loginType:r,islogin:!1,_handleType:"cancel"})},o)})},e.prototype._toH5Login=function(t){var e=this,n=e._loginPromise||new Promise(function(n,o){!function(){function t(t){i(),n(t)}function o(t){i(),n(t)}function i(){e._loginPromise=null,e.$off(y.USER_LOGIN,t),e.$off(y.USER_CANCEL,o)}e.$on(y.USER_LOGIN,t),e.$on(y.USER_CANCEL,o)}(),e.$emit(y.REDIRECT,{type:b.LOGIN,options:t})});return e._loginPromise=n,n},e.prototype.signIn=function(t){var e=this,n=e.currentOption;return new Promise(function(o,i){e._getData(m.SIGN_IN,t,{channel:n.channel}).then(function(t){var n=t&&t.userinfo;n&&n.Authorization||t&&t.Authorization?e._h5LoginSuccess(t).then(o,i):i(new E("登录失败",{data:t}))},i)})},e.prototype._h5LoginSuccess=function(t){var e=this;return new Promise(function(n,o){var i=(Object.assign({},t&&t.userinfo||{},t)||{}).Authorization;e._setLoginCookie(i).then(function(){e._getUserInfoEnd(t).then(function(t){t&&(t._loginType="h5"),e.setLoginState(t&&t.islogin),n(Object(P.a)(!0,t)),e.$emit(y.USER_LOGIN,Object(P.a)(!0,t))},o)},o)})},e.prototype.updatePwd=function(t){var e=this;return new Promise(function(n,o){e._getData(m.UPDATE_PWD,t).then(n,o)})},e.prototype.updateUserInfo=function(t){var e=this;return new Promise(function(n,o){e._getData(m.UPDATE_USER_INFO,t).then(n,o)})},e.prototype.getCode=function(t){var e=this;return new Promise(function(n,o){e._getData(m.GET_IDENTITY_CODE,t,{}).then(n,o)})},e.prototype.login=function(t){var e=this;return new Promise(function(n,o){(e._isToNative(O.FORCE_LOGIN)?e._toNativeLogin():e._toH5Login(t)).then(n,o)})},e.prototype._appLogout=function(){var t=this;return new Promise(function(e,n){t._isToNative(O.VALIDATE_LOGIN)?t._toNative(O.VALIDATE_LOGIN,[{presentLogin:!1}]).then(function(t){e(t)}):e(!0)})},e.prototype._logout=function(t,e){var n=this,o=n._resetInit(t);return n._resetLogin(),new Promise(function(t,i){function r(){n._appLogout().then(function(){j(o.cookieKey||g.USER_COOKIE_KEY,"",{time:-2592e6,domain:o.domain||""}),Object(w.a)(o.storage&&o.storage.removeLocal,o.storageKey||g.USER_STORAGE_KEY,!1,o.storage).then(a,a)})}function a(){n._getData(m.LOGOUT_COOKIE).then(function(){n._setUserInfo(null),n.$emit(y.LOGOUT),t(!0)},function(){n._setUserInfo(null),n.$emit(y.LOGOUT),t(!0)})}e?r():n._getData(m.SIGN_OUT).then(r,r)})},e}(A),C=window.location||{};function T(t){for(var e=(t=(t=(t||"")+"")||(C.href||"")+"").split("#"),n=[],o=[],i=0;i<e.length;i++){var r=(e[i]||"").split("?"),a=r.splice(0,1)[0].split("&"),s=a.splice(0,1);s[0]&&o.push(s[0]),n=(n=n.concat(a)).concat(r)}var c=[];return o.length&&c.push(o.join("#")),n.length&&c.push(n.join("&")),c.join("?")||""}function N(t,e,n){for(var o={},i=((T(e)||"").split("?")[1]||"").split("&"),r=0;r<i.length;r++){var a=i[r].split("=");if(a){var s=a[0];if(s){var c=n?decodeURIComponent(a[1])||"":x(decodeURIComponent(a[1])||"");o[s]?o[s]instanceof Array?o[s].push(c):o[s]=[o[s],c]:o[s]=c}}}return t&&(o=o[t]),o}function x(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML}var R=window.location||{},D=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));o._accessCode="",o._wxAuthAccessPromise=null,o.isAccessFailure=!1;var i=o;return i.setDefaultOptions(n),i._resetLogin(),setTimeout(function(){i._getAccess(n)},0),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._getAuthCode=function(t){var e=this;return new Promise(function(n,o){t?e._getData(m.AUTH_LOGIN,{authCode:t,platform:"Weixin",channel:"h5"}).then(n,o):o(new Error("授权code不能为空"))})},e.prototype._getAccess=function(t){var e=this,n=this.getOptions(t||{}).device||{},o=e._wxAuthAccessPromise||new Promise(function(t,o){if(n.isWeixin&&!n.isMiniProgram){var i=Object.assign({},N())||{},r=i.code||"";r&&i._loginPage?(e._accessCode=r,window.history.replaceState(window.history.state||null,"",e._resetUrl(!1)),e._getAuthCode(r).then(function(n){n?e._h5LoginSuccess(n).then(function(n){window.history.replaceState(window.history.state||null,"",e._resetUrl(!0)),t(n),e.$emit(y.WX_AUTH_SUCCESS,n)},o):(e.isAccessFailure=!0,e.login({popup:{transitionCls:""}}).then(t,o))})):t(null)}else t(null)});return e._wxAuthAccessPromise=o,o},e.prototype._resetUrl=function(t,e){var n=(t?"_loginPage|":"")+"code|access|state",o=RegExp("&("+n+")=[a-z0-9]+","ig"),i=RegExp("\\?("+n+")=[a-z0-9]+(&)?","ig");return e=(T(e||R.href)||"").replace(o,"").replace(i,function(t,e,n){var o="";return"&"===n&&(o="?"),o})},e.prototype._wxAuthorize=function(t){var e=this.getOptions(t||{}),n=e.appid,o=e.scope||"snsapi_userinfo",i=this._resetUrl(!1,e.returnUrl||R.href);"snsapi_userinfo"===o&&(i=(i=i.replace(/(&|\?)?access=1/g,""))+(i.indexOf("?")>0?"&":"?")+"access=1");var r="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+n+"&redirect_uri="+encodeURIComponent(i)+"&response_type=code&scope="+o+"&state=wechat#wechat_redirect";setTimeout(function(){R.href=r},150)},e.prototype.weChatBind=function(t){var e=this;return new Promise(function(n,o){e._getData(m.AUTH_LOGIN,{authCode:e._accessCode,platform:"Weixin",channel:"h5",username:t.username,code:t.code}).then(function(t){t?e._h5LoginSuccess(t).then(function(t){n(t),e.$emit(y.WE_BIND_SUCCESS,t)},o):e.isAccessFailure=!1},o)})},e.prototype.wxAuthorizeUserInfo=function(t){this._wxAuthorize(this.getOptions(t||{},{scope:"snsapi_userinfo"}))},e.prototype.wxAuthorize=function(t){this._wxAuthorize(this.getOptions(t||{},{scope:"snsapi_base"}))},e}(S),G=N,k=n("ZMJv");var z=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));o.name="UserMiniProgram",o._miniProgramLoginParams={};var i=o;i.setDefaultOptions(n);var r=Object.assign({},G()),a={};for(var s in r)if(r.hasOwnProperty(s)){var c=r[s];a[s.toLowerCase()]=c}i._miniProgramLoginParams=a,a&&a.needlogin+""=="1"&&i._miniProgramLogin(n);var u=o.getOptions(n||{});if((u.device||{}).isMiniProgram&&u.isMiniProgram){Object(k.a)(u.getWxSdk);try{i.$on("success",function(t){Object(k.a)(u.getWxSdk).then(function(){window.wx&&window.wx.miniProgram&&window.wx.miniProgram.postMessage({data:{invoke:"SetUserInfo",message:t||{islogin:!1}}})})})}catch(t){}}return o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._miniProgramLogin=function(t){var e=this,n=this.getOptions(t||{}),o=n.device||{},i=e._miniProgramLoginPromise||new Promise(function(i,r){if(o.isMiniProgram&&n.isMiniProgram){var a=e._miniProgramLoginParams;a&&a.sign&&a.source&&a.timestap&&a.token?setTimeout(function(){e._getAuthInfo({needLogin:a.needlogin+""=="1"?1:0,timeStap:a.timestap||"",source:a.source||"",sign:a.sign||"",token:a.token||""}).then(function(o){var r=o&&(o.Authorization||o.Authorization)||"";r?e._logout(n,!0).then(function(){e._setLoginCookie(r).then(function(){e._getUserInfo(t||{},{Authorization:r}).then(i,function(){i(null)})})}):i(null)},function(){i(null)})},0):i(null)}else i(null)});return e._miniProgramLoginPromise=i,i},e.prototype._getAuthInfo=function(t){var e=this;return new Promise(function(n,o){e._getData(m.GET_AUTH_INFO,t).then(n,o)})},e}(D);e.d=function(t){return M.instance(t)},n.d(e,!1,function(){return z}),n.d(e,!1,function(){return D}),n.d(e,!1,function(){return S}),n.d(e,!1,function(){return A}),n.d(e,!1,function(){return v}),n.d(e,!1,function(){return O}),n.d(e,"a",function(){return m}),n.d(e,"b",function(){return y}),n.d(e,"c",function(){return b}),n.d(e,!1,function(){return g});var M=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));o.name="User";var i=o;return i.setDefaultOptions(n),i._resetLogin(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.logout=function(t){var e=this;return e._resetInit(t),new Promise(function(n,o){e.isLogin(t).then(function(i){e._logout(t,!i).then(n,o)})})},e.prototype.isLogin=function(t){var e=this,n=e._resetInit(t);return new Promise(function(t,o){n.isReset&&e._resetLogin();var i=Date.now()-e._lastRun,r=e._loginState;"boolean"!=typeof r||n.isReset||i>=(n.timeout||0)?(e._lastRun=Date.now(),e._getIsLogin().then(function(n){e.setLoginState(n),t(n)},o)):(e.setLoginState(r),t(r))})},e.prototype.loginCancel=function(){this.$emit(y.USER_CANCEL,{_handleType:"cancel"})},e.prototype.getUserInfo=function(t,e){var n=this,i=this,r={};r=t instanceof Object?t:{force:t||!1};var a=i._resetInit(Object(o.a)(!0,e||{},r)),s=a&&a.force||!1,c=new Promise(function(t,e){function r(e){t(e)}function c(t){e(t)}i._miniProgramLogin(a).then(function(t){t&&t.islogin?r(t):i._getAccess(a).then(function(t){t&&t.islogin?r(t):i.isLogin(a).then(function(t){if(t){var e=i._userInfo;e&&e.islogin?r(e):i._getLocalData().then(function(t){i._getUserInfo(Object(o.a)({isReset:!0},a),t||{}).then(r,c)})}else s?i.logout().then(function(){i.login(a).then(r,c)}):n._successfilter(null).then(r,c)})})})});return c.then(function(){i.currentOption=i.getOptions()}),c},e.prototype.setUserInfo=function(t){return console.warn("此方法将来可能会废弃,请使用新的方法logout"),t&&t.islogin?this._setUserInfo(t):this.logout()},e.prototype.signInAndBind=function(t){return this.isAccessFailure?this.weChatBind(t):this.signIn(t)},e}(z)},EnQ3:function(t,e){},FNmr:function(t,e,n){"use strict";e.a=function(t,e){var n="";if(t&&e)if(e.name){var i="$s"+(n=Object(o.a)(e.name));t.prototype&&!t.prototype[i]&&function(t,e,n){if(t&&e&&n){t[n]=e;try{Object.defineProperty(t,n,{get:function(){var t=this;return e._getParent=function(){return t},e},enumerable:!1,configurable:!1})}catch(t){}}}(t.prototype,e,i)}else console.error("Mount is not defined for the image name");return n};var o=n("0Zk/")},HRmZ:function(t,e,n){"use strict";var o=n("EamC");e.a=o.c},IrUm:function(t,e,n){"use strict";e.a=function t(e,n,o){var i=!1;var r=e instanceof Object;var a=n instanceof Object;if(e===n)return!0;r&&r===a&&(r=Object.prototype.toString.call(e),a=Object.prototype.toString.call(n));if(!e&&n||e&&!n||r&&!a||!r&&a)return i;if(!r||!a)return e===n&&(i=!0),i;if(function(t,e){var n=!1;try{n=JSON.stringify(t)===JSON.stringify(e)}catch(t){n=!1}return n}(e,n))i=!0;else if(o&&o.length)i=u(o,e,n);else{var s=Object.keys(e),c=Object.keys(n);s.length===c.length&&(i=u(s,e,n))}return i;function u(e,n,o){for(var i=!0,r=0;r<e.length;r++){var a=e[r];if("__ob__"!==a&&!(i=t(n[a],o[a])))break}return i}}},OKn3:function(t,e,n){"use strict";e.a=function(t){if(void 0===t)return"";return encodeURIComponent(t)||""}},"V3K/":function(t,e,n){"use strict";var o=n("HRmZ"),i={props:{content:{},contentData:{}},mounted:function(){this.$emit("openPage",o.a.AGREEMENT)}},r={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nus_agreement"},[t.content?[n(t.content,{tag:"component"})]:t.contentData?n("div",{staticClass:"nu_agreement-wrapper"},[n("div",{staticClass:"nu_wrapper-context"},[n("h2",[t._v(t._s(t.contentData.nameText))]),t._v(" "),n("div",{staticClass:"nu_text"},[t._v(t._s(t.contentData.subNameText))]),t._v(" "),n("div",{staticClass:"nu_text",domProps:{innerHTML:t._s(t.contentData.info)}}),t._v(" "),t.contentData.content&&t.contentData.content.length?t._l(t.contentData.content,function(e,o){return n("dl",{key:o},[n("dt",{domProps:{innerHTML:t._s(e.nameText)}}),t._v(" "),e.list&&e.list.length?t._l(e.list,function(e,o){return n("dd",{key:o},[n("div",{staticClass:"nu_content-index",domProps:{innerHTML:t._s(e.label)}}),t._v(" "),n("div",{staticClass:"nu_content-note"},[n("span",{domProps:{innerHTML:t._s(e.text)}}),t._v(" "),t._l(e.list,function(e,o){return n("div",{key:o,staticClass:"nu_text",domProps:{innerHTML:t._s(e.text)}})})],2)])}):t._e()],2)}):t._e()],2)]):t._e()],2)},staticRenderFns:[]};var a=n("VU/8")(i,r,!1,function(t){n("EnQ3")},null,null);e.a=a.exports},"VU/8":function(t,e){t.exports=function(t,e,n,o,i,r){var a,s=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(a=t,s=t.default);var u,f="function"==typeof s?s.options:s;if(e&&(f.render=e.render,f.staticRenderFns=e.staticRenderFns,f._compiled=!0),n&&(f.functional=!0),i&&(f._scopeId=i),r?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},f._ssrRegister=u):o&&(u=o),u){var p=f.functional,l=p?f.render:f.beforeCreate;p?(f._injectStyles=u,f.render=function(t,e){return u.call(e),l(t,e)}):f.beforeCreate=l?[].concat(l,u):[u]}return{esModule:a,exports:s,options:f}}},XAAj:function(t,e,n){"use strict";e.a=function(t){var e=document.createEvent("undefined"!=typeof MouseEvent?"MouseEvents":"Event");return e.initEvent(t,!0,!1),e}},Z05q:function(t,e,n){"use strict";e.a=function(t,e,n){if(t&&(t.tagName||t===window||t===document)&&e&&"string"==typeof e){var r=Object(o.a)(e);r._constructed=!0,r=Object(i.a)(!1,r,n),t.dispatchEvent(r)}};var o=n("XAAj"),i=n("5fCB")},ZMJv:function(t,e,n){"use strict";var o=n("uGS0");e.a=o.a},c1YY:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("V3K/"),i=n("4qRk");e.default=Object(i.a)(o.a)},"eY/N":function(t,e,n){"use strict";e.a=function(t){if(!Object(o.a)(t,"Object"))return!1;var e=Object.getPrototypeOf(t);if(!e)return!0;var n=i.call(e,"constructor")&&e.constructor;return"function"==typeof n&&i.toString.call(n)===i.toString.call(Object)};var o=n("E5mE"),i=Object.prototype.hasOwnProperty},fnCA:function(t,e,n){"use strict";e.a=function(){return i()};var o,i=(o=function(){for(var t=(new Date).getTime(),e=0;t===(new Date).getTime();)e++;return t.toString(16)+e.toString(16)},function(){var t=window.screen||{},e=t.height*t.width||0,n="";n=e&&/\d{5,}/.test(e+"")?e.toString(16):(31242*Math.random()+"").replace(".","").slice(0,8);var i=o()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t=navigator.userAgent,e=void 0,n=void 0,o=[],i=0;function r(t,e){var n=void 0,i=0;for(n=0;n<e.length;n++)i|=o[n]<<8*n;return t^i}for(e=0;e<t.length;e++)n=t.charCodeAt(e),o.unshift(255&n),o.length>=4&&(i=r(i,o),o=[]);return o.length>0&&(i=r(i,o)),i.toString(16)}()+"-"+n+"-"+o();return i||[Math.random(),Math.random(),Math.random()].join("").slice(2,15)})},lXuC:function(t,e,n){"use strict";e.a=function(t,e){var n="("+(e||"_|-")+")";return t=(t=(t=(t+"").replace(new RegExp(n+"?(?:(?:[A-Z]{2,}[A-Z]"+n+"*$)|(?:[A-Z]{2,}(?=[A-Z])))","g"),function(t){return(((e||"")+"").split("|")[0]||"-")+(t=t.replace(new RegExp(n),"")).toLowerCase()})).replace(new RegExp("(?:^"+n+"?([a-z]))|(?:"+n+"$)","gi"),function(t,e,n){return(n||"").toLowerCase()})).replace(new RegExp(n+"([a-z])","gi"),function(t,e,n){return(n||"").toUpperCase()})}},qd2b:function(t,e,n){"use strict";var o=n("5fCB"),i=n("Z05q"),r=n("zagf");var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events={}}return t.prototype.$dispatchEvent=function(t,e,n){return Object(i.a)(t,e,n)},t.prototype.$on=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push([e,n])},t.prototype.$once=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,o=this,i=!1,r=function r(){o.$off(t,r),i||(i=!0,e.apply(n,arguments))};r.fn=e,o.$on(t,r)},t.prototype.$off=function(t,e){var n=this._events&&this._events[t];if(n)for(var o=n.length;o--;)(n[o][0]===e||n[o][0]&&n[o][0].fn===e)&&(n[o][0]=void 0)},t.prototype.$emit=function(t){var e=this._events&&this._events[t];if(e){for(var n=e.length,o=[].concat(e),i=arguments.length,a=Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];for(var c=0;c<n;c++){var u=o[c],f=u[0],p=u[1];Object(r.a)(f,a,p)}}},t}(),s=n("FNmr");n.d(e,"a",function(){return c});var c=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return o.name="",o.defaultOption={},o.setDefaultOptions(!0,n),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.singleton=function(t){var e=this._singleton||this.instance(t);return this._singleton=e,e},e.instance=function(t){return new this(t)},e.install=function(t,e){var n=this.instance(e);return t&&t.use instanceof Function&&t.use(n,e),n},e.prototype.getParent=function(){return Object(r.a)(this._getParent||this._vue&&this._vue.prototype||null,[],this)},e.prototype.install=function(t,e){this._vue=this._vue||t;var n=Object(s.a)(t,this);return this.setDefaultOptions(e&&n&&e[n]||e),this},e.prototype.setDefaultOptions=function(t){var e=void 0,n=!0;"boolean"==typeof t?(n=t,e=arguments[1]||{}):e=t,e&&(this.defaultOption=Object(o.a)(n,this.defaultOption||{},e))},e.prototype.getOptions=function(){for(var t=[{},this.defaultOption||{}],e=!0,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return"boolean"==typeof i[0]&&(e=i[0],i.splice(0,1)),i&&i.length>0&&(t=t.concat(i)),o.a.apply(void 0,[e].concat(t))},e.prototype.preload=function(){var t=this;return new Promise(function(e,n){e(t)})},e}(a)},rRBi:function(t,e,n){"use strict";var o=n("5fCB");e.a=o.a},uGS0:function(t,e,n){"use strict";e.a=function(t,e,n,r){var a=t;!e||e instanceof Array||(e=[e]);return new Promise(function(s,c){(a=Object(o.a)(t||a,e,r||null))instanceof Promise||Object(i.a)(a,"Promise")||a&&a.then instanceof Function?a.then(s,c):s(n?{default:a}:a)})};var o=n("zagf"),i=n("E5mE")},zagf:function(t,e,n){"use strict";e.a=function(t,e,n){var o=t;t instanceof Function&&(o=t.apply(n,e));return o}}});