
管理员
站长
- UID
- 1
- 积分
- 224400
- 余额
- 13 R
- Moe币
- 84881
- 在线时间
- 279 小时
- 注册时间
- 2025-12-28
- 最后登录
- 2026-11-9
|
|
configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},R(S.prototype),f(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(O),f(O,u,"Generator"),f(O,s,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,w(n.key),n)}}function c(t,e,r){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,r){return(e=w(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}(this,r)}}function d(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=d(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},v.apply(this,arguments)}function g(t,e,r,n){return g="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,r,n){var o,i=d(t,e);if(i){if((o=Object.getOwnPropertyDescriptor(i,e)).set)return o.set.call(n,r),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(n,e)){if(!o.writable)return!1;o.value=r,Object.defineProperty(n,e,o)}else u(n,e,r);return!0},g(t,e,r,n)}function y(t,e,r,n,o){if(!g(t,e,r,n||t)&&o)throw new TypeError("failed to set property");return r}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(t,e):void 0}}(t,e)||function(){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 b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function w(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function E(t,e){Error.call(this),this.result=_[t]||t,this.msg=e||x[t]}var _={DB_ERROR:"DBError",CRYPTO_ERROR:"CryptoError",INVALID_ARGUMENT:"InvalidArgument",ANDRIOD_INIT_FAIL:"AndroidInitFail"},x={DB_ERROR:"打开数据库失败",CRYPTO_ERROR:"加密过程出错",INVALID_ARGUMENT:"入参格式错误",ANDRIOD_INIT_FAIL:"安卓初始化失败"},O={};Object.keys(_).forEach((function(t){O[t]={value:t}})),Object.defineProperties(E,O);var R,S,A=function(t,e,r){if(void 0===t)throw new E(E.INVALID_ARGUMENT,r);if(n(t)!==e)throw new E(E.INVALID_ARGUMENT,r);return!0},T=function(t){if("undefined"!=typeof document){var e=document.cookie.split(";").map((function(t){return t.trim().split("=")})).reduce((function(t,e){var r=m(e,2),n=r[0],o=r[1];return t[n]=decodeURIComponent(o),t}),{});return e[t]||null}},C=Object.prototype.toString,k=Object.getPrototypeOf,j=(R=Object.create(null),function(t){var e=C.call(t);return R[e]||(R[e]=e.slice(8,-1).toLowerCase())}),L=function(t){return t=t.toLowerCase(),function(e){return j(e)===t}},N=Array.isArray,I=(S="undefined",function(t){return n(t)===S}),P=function(t){return null!==t&&"object"===n(t)},D=L("Date"),F=L("URLSearchParams");function U(t,e){var r,o,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==i&&i;if(null!=t)if("object"!==n(t)&&(t=[t]),N(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{var s,c=a?Object.getOwnPropertyNames(t):Object.keys(t),u=c.length;for(r=0;r<u;r++)s=c[r],e.call(null,t[s],s,t)}}var B={isString:function(t){return"string"==typeof t},isArray:N,isUndefined:I,isDate:D,isURLSearchParams:F,isObject:P,mergeConfig:function(t,r){r=r||{};var n=e({},t);return Object.keys(r).forEach((function(t){t in n&&P(r[t])?n[t]=e(e({},n[t]),r[t]):n[t]=r[t]})),n},forEach:U,inherits:function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:function(t,e,r,n){var o,i,a,s={};if(e=e||{},null==t)return e;do{for(i=(o=Object.getOwnPropertyNames(t)).length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&k(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},toObjectSet:function(t,e){var r={},n=function(t){t.forEach((function(t){r[t]=!0}))};return N(t)?n(t):n(String(t).split(e)),r},toJSONObject:function(t){var e=new Array(10);return function t(r,n){if(P(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[n]=r;var o=N(r)?[]:{};return U(r,(function(e,r){var i=t(e,n+1);!I(i)&&(o[r]=i)})),e[n]=void 0,o}}return r}(t,0)},isAbsoluteURL:function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},combineURLs:function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}};function M(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}B.inherits(M,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var $=M.prototype,q={};function z(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(t){q[t]={value:t}})),Object.defineProperties(M,q),Object.defineProperty($,"isAxiosError",{value:!0}),M.from=function(t,e,r,n,o,i){var a=Object.create($);return B.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(function(t){return"isAxiosError"!==t})),M.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};var V=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),W="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){var n,o,i=t.data,a=t.headers,s=t.responseType,c=new XMLHttpRequest,u=(n=t.baseURL,o=t.url,n&&!B.isAbsoluteURL(o)?B.combineURLs(n,o):o);function f(t){var e="json"===s;return t&&B.isString(t)&&e?JSON.parse(t):t}function l(){if(c){var n=function(t){var e,r,n,o={};return t&&t.split("\n").forEach((function(t){n=t.indexOf(":"),e=t.substring(0,n).trim().toLowerCase(),r=t.substring(n+1).trim(),!e||o[e]&&V[e]||("set-cookie"===e?o[e]?o[e].push(r):o[e]=[r]:o[e]=o[e]?o[e]+", "+r:r)})),o}("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),o=s&&"text"!==s&&"json"!==s?c.response:c.responseText;!function(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new M("Request failed with status code "+r.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t)}),(function(t){r(t)}),{data:o&&f(o),status:c.status,statusText:c.statusText,headers:n,config:t,request:c}),c=null}}c.open(t.method.toUpperCase(),function(t,e,r){if(!e)return t;var n,o=r&&r.serialize;if(o)n=o(e,r);else if(B.isURLSearchParams(e))n=e.toString();else{var i=[];B.forEach(e,(function(t,e){null!=t&&(B.isArray(t)?e+="[]":t=[t],B.forEach(t,(function(t){B.isDate(t)?t=t.toISOString():B.isObject(t)&&(t=JSON.stringify(t)),i.push(z(e)+"="+z(t))})))})),n=i.join("&")}if(n){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t}(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(r(new M("Request aborted",M.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new M("Network Error",M.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";r(new M(e,t,c)),c=null},"setRequestHeader"in c&&B.forEach(a,(function(t,e){c.setRequestHeader(e,t)})),B.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&"json"!==s&&(c.responseType=t.responseType),c.send(i||null)}))},H={adapter:["xhr","http"],timeout:2e4,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,withCredentials:!0,responseType:"json",validateStatus:function(t){return t>=200&&t<300},headers:{Accept:"application/json, text/plain, */*"}},G=function(){function t(){a(this,t),this.defaults=H}return c(t,[{key:"request",value:function(t,e){var r;"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=B.mergeConfig(this.defaults,e)).method=(e.method||this.defaults.method||"get").toLowerCase();try{r=W(e)}catch(t){return Promise.reject(t)}return r}}]),t}();B.forEach(["delete","get","head","options"],(function(t){G.prototype[t]=function(e,r){return this.request(B.mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}})),B.forEach(["post","put","patch"],(function(t){G.prototype[t]=function(e,r,n){return this.request(B.mergeConfig(n||{},{method:t,headers:{"Content-Type":"application/json"},url:e,data:JSON.stringify(r)}))}}));var J,K,Q=new G,Y={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn",LOG:"log"},X=function(){function t(e){a(this,t),this.level=e||Y.INFO}return c(t,[{key:"log",value:function(t){this.shouldLog(t)}},{key:"shouldLog",value:function(t){var e=Object.values(Y);return e.indexOf(t)>=e.indexOf(this.level)}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.DEBUG].concat(e))}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.ERROR].concat(e))}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.INFO].concat(e))}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.WARN].concat(e))}}]),t}(),Z=new X(Y.DEBUG),tt=!1,et=[],rt=function t(){tt||et.length>0&&(tt=!0,ot().then((function(t){nt()})).catch((function(t){nt(null,t)})).finally((function(){tt=!1,t()})))},nt=function(t,e){et.forEach((function(t){e?t.reject(e):t.resolve("update ksosid success")})),et=[]},ot=function(){return(J=J||i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var r=window.location.hostname.split(".").slice(-2).join(".");Q.post("https://account.".concat(r,"/passport/secure/api/grant_token"),{grant_type:"refresh_token"}).then((function(e){t(e)})).catch((function(r){var n=(r.response||{}).data||r,o=n.result,i=n.msg;"TokenExpired"===o.result?(Z.info("token is expired when refresh token"),t({result:"ok",msg:"update ksosid success"})):e(new E(o,i))}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)},it=function(){return(K=K||i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){et.push({resolve:t,reject:e}),rt()})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)},at=function(t){function e(){a(this,e)}return c(e,[{key:"checkKsoSid",value:function(){return(t=t||i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){!T("exp")&&T("_ku")?it().then((function(){t("update ksosid success")})).catch((function(t){e(t)})):!T("nexp")&&T("_ku")?(t("get ksosid success,need refresh"),it()):t("get ksosid success")})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}]),e}(),st=function(t,e){return t>>>e|t<<32-e},ct=function t(e){f |
|