URL: https://g.alicdn.com/??mtb/lib-promise/3.1.3/polyfillB.js,mtb/lib-mtop/2.7.3/mtop.js,mtb/lib-login/3.5.1/login.js,idleFish-F2e/perf/lottie.js,vip/havana-login/0.4.10/js/mini-login-embedder-min.js POST: - !function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(a,b){"use strict";function c(a){function b(a){return null===i?void k.push(a):void f(function(){var b=i?a.onFulfilled:a.onRejected;if(null===b)return void(i?a.resolve:a.reject)(j);var c;try{c=b(j)}catch(d){return void a.reject(d)}a.resolve(c)})}function c(a){try{if(a===l)throw new TypeError("A promise cannot be resolved with itself.");if(a&&("object"==typeof a||"function"==typeof a)){var b=a.then;if("function"==typeof b)return void e(b.bind(a),c,g)}i=!0,j=a,h()}catch(d){g(d)}}function g(a){i=!1,j=a,h()}function h(){for(var a=0,c=k.length;c>a;a++)b(k[a]);k=null}if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof a)throw new TypeError("not a function");var i=null,j=null,k=[],l=this;this.then=function(a,c){return new l.constructor(function(e,f){b(new d(a,c,e,f))})},e(a,c,g)}function d(a,b,c,d){this.onFulfilled="function"==typeof a?a:null,this.onRejected="function"==typeof b?b:null,this.resolve=c,this.reject=d}function e(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){if(d)return;d=!0,c(e)}}var f=a("asap");b.exports=c},{asap:4}],3:[function(a,b){"use strict";function c(a){this.then=function(b){return"function"!=typeof b?this:new d(function(c,d){e(function(){try{c(b(a))}catch(e){d(e)}})})}}var d=a("./core.js"),e=a("asap");b.exports=d,c.prototype=d.prototype;var f=new c(!0),g=new c(!1),h=new c(null),i=new c(void 0),j=new c(0),k=new c("");d.resolve=function(a){if(a instanceof d)return a;if(null===a)return h;if(void 0===a)return i;if(a===!0)return f;if(a===!1)return g;if(0===a)return j;if(""===a)return k;if("object"==typeof a||"function"==typeof a)try{var b=a.then;if("function"==typeof b)return new d(b.bind(a))}catch(e){return new d(function(a,b){b(e)})}return new c(a)},d.all=function(a){var b=Array.prototype.slice.call(a);return new d(function(a,c){function d(f,g){try{if(g&&("object"==typeof g||"function"==typeof g)){var h=g.then;if("function"==typeof h)return void h.call(g,function(a){d(f,a)},c)}b[f]=g,0===--e&&a(b)}catch(i){c(i)}}if(0===b.length)return a([]);for(var e=b.length,f=0;f>>32-b}function c(a,b){var c,d,e,f,g;return e=2147483648&a,f=2147483648&b,c=1073741824&a,d=1073741824&b,g=(1073741823&a)+(1073741823&b),c&d?2147483648^g^e^f:c|d?1073741824&g?3221225472^g^e^f:1073741824^g^e^f:g^e^f}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return a&c|b&~c}function f(a,b,c){return a^b^c}function g(a,b,c){return b^(a|~c)}function h(a,e,f,g,h,i,j){return a=c(a,c(c(d(e,f,g),h),j)),c(b(a,i),e)}function i(a,d,f,g,h,i,j){return a=c(a,c(c(e(d,f,g),h),j)),c(b(a,i),d)}function j(a,d,e,g,h,i,j){return a=c(a,c(c(f(d,e,g),h),j)),c(b(a,i),d)}function k(a,d,e,f,h,i,j){return a=c(a,c(c(g(d,e,f),h),j)),c(b(a,i),d)}function l(a){for(var b,c=a.length,d=c+8,e=(d-d%64)/64,f=16*(e+1),g=new Array(f-1),h=0,i=0;c>i;)b=(i-i%4)/4,h=i%4*8,g[b]=g[b]|a.charCodeAt(i)<>>29,g}function m(a){var b,c,d="",e="";for(c=0;3>=c;c++)b=a>>>8*c&255,e="0"+b.toString(16),d+=e.substr(e.length-2,2);return d}function n(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b}var o,p,q,r,s,t,u,v,w,x=[],y=7,z=12,A=17,B=22,C=5,D=9,E=14,F=20,G=4,H=11,I=16,J=23,K=6,L=10,M=15,N=21;for(a=n(a),x=l(a),t=1732584193,u=4023233417,v=2562383102,w=271733878,o=0;of;f++){var g=Number(c[f]),h=Number(d[f]);if(g>h)return 1;if(h>g)return-1;if(!isNaN(g)&&isNaN(h))return 1;if(isNaN(g)&&!isNaN(h))return-1}return 0}function o(){var b=a.location.hostname;if(!b){var c=a.parent.location.hostname;c&&~c.indexOf("zebra.alibaba-inc.com")&&(b=c)}var d=["taobao.net","taobao.com","tmall.com","tmall.hk","alibaba-inc.com"],e=new RegExp("([^.]*?)\\.?((?:"+d.join(")|(?:").replace(/\./g,"\\.")+"))","i"),f=b.match(e)||[],g=f[2]||"taobao.com",h=f[1]||"m";"taobao.net"!==g||"x"!==h&&"waptest"!==h&&"daily"!==h?"taobao.net"===g&&"demo"===h?h="demo":"alibaba-inc.com"===g&&"zebra"===h?h="zebra":"waptest"!==h&&"wapa"!==h&&"m"!==h&&(h="m"):h="waptest";var i="h5api";"taobao.net"===g&&"waptest"===h&&(i="acs"),t.mainDomain=g,t.subDomain=h,t.prefix=i}function p(){var b=a.navigator.userAgent,c=b.match(/WindVane[\/\s]([\d\.\_]+)/);c&&(t.WindVaneVersion=c[1]);var d=b.match(/AliApp\(([^\/]+)\/([\d\.\_]+)\)/i);d&&(t.AliAppName=d[1],t.AliAppVersion=d[2]);var e=b.match(/AMapClient\/([\d\.\_]+)/i);e&&(t.AliAppName="AMAP",t.AliAppVersion=e[1])}function q(a){this.id=""+(new Date).getTime()+ ++z,this.params=d(a||{},{v:"*",data:{},type:"get",dataType:"jsonp"}),this.params.type=this.params.type.toLowerCase(),"object"==typeof this.params.data&&(this.params.data=JSON.stringify(this.params.data)),this.middlewares=u.slice(0)}var r=a.Promise,s=(r||{resolve:function(){return void 0}}).resolve();String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});var t={useJsonpResultType:!1,safariGoLogin:!0,useAlipayJSBridge:!1},u=[],v={ERROR:-1,SUCCESS:0,TOKEN_EXPIRED:1,SESSION_EXPIRED:2};o(),p();var w=/[Android|Adr]/.test(a.navigator.userAgent),x="AP"===t.AliAppName,y=x&&n(t.AliAppVersion,"10.1.2")>=0||"KB"===t.AliAppName&&n(t.AliAppVersion,"7.1.62")>=0||w&&"AMAP"===t.AliAppName&&n(t.AliAppVersion,"1.0.1")>=0,z=0,A="2.7.2";q.prototype.use=function(a){if(!a)throw new Error("middleware is undefined");return this.middlewares.push(a),this},q.prototype.__processRequestMethod=function(a){var b=this.params,c=this.options;"get"===b.type&&"jsonp"===b.dataType?c.getJSONP=!0:"get"===b.type&&"originaljsonp"===b.dataType?c.getOriginalJSONP=!0:"get"===b.type&&"json"===b.dataType?c.getJSON=!0:"post"===b.type&&(c.postJSON=!0),a()},q.prototype.__processRequestType=function(c){var d=this,e=this.params,f=this.options;if(t.H5Request===!0&&(f.H5Request=!0),t.WindVaneRequest===!0&&(f.WindVaneRequest=!0),f.H5Request===!1&&f.WindVaneRequest===!0){if(!y&&(!b.windvane||parseFloat(f.WindVaneVersion)<5.4))throw new Error("WINDVANE_NOT_FOUND::缺少WindVane环境");if(y&&!a.AlipayJSBridge)throw new Error("ALIPAY_NOT_READY::支付宝通道未准备好,支付宝请见 https://lark.alipay.com/mtbsdkdocs/mtopjssdkdocs/pucq6z")}else if(f.H5Request===!0)f.WindVaneRequest=!1;else if("undefined"==typeof f.WindVaneRequest&&"undefined"==typeof f.H5Request){if(b.windvane&&parseFloat(f.WindVaneVersion)>=5.4?f.WindVaneRequest=!0:f.H5Request=!0,y){if(f.WindVaneRequest=f.H5Request=void 0,a.AlipayJSBridge)if(j(e.data))f.WindVaneRequest=!0;else try{j(JSON.parse(e.data))?f.WindVaneRequest=!0:f.H5Request=!0}catch(g){f.H5Request=!0}else f.H5Request=!0;"AMAP"!==t.AliAppName||e.useNebulaJSbridgeWithAMAP||(f.WindVaneRequest=f.H5Request=void 0,f.H5Request=!0)}window.self!==window.top&&(f.H5Request=!0)}var h=a.navigator.userAgent.toLowerCase();return h.indexOf("youku")>-1&&f.mainDomain.indexOf("youku.com")<0&&(f.WindVaneRequest=!1,f.H5Request=!0),f.mainDomain.indexOf("youku.com")>-1&&h.indexOf("youku")<0&&(f.WindVaneRequest=!1,f.H5Request=!0),c?c().then(function(){var a=f.retJson.ret;if(a instanceof Array&&(a=a.join(",")),f.WindVaneRequest===!0&&y&&f.retJson.error||!a||a.indexOf("PARAM_PARSE_ERROR")>-1||a.indexOf("HY_FAILED")>-1||a.indexOf("HY_NO_HANDLER")>-1||a.indexOf("HY_CLOSED")>-1||a.indexOf("HY_EXCEPTION")>-1||a.indexOf("HY_NO_PERMISSION")>-1){if(!y||!isNaN(f.retJson.error)||-1!==f.retJson.error.indexOf("FAIL_SYS_ACCESS_DENIED"))return y&&j(e.data)&&(e.data=JSON.stringify(e.data)),t.H5Request=!0,d.__sequence([d.__processRequestType,d.__processToken,d.__processRequestUrl,d.middlewares,d.__processRequest]);"undefined"==typeof f.retJson.api&&"undefined"==typeof f.retJson.v&&(f.retJson.api=e.api,f.retJson.v=e.v,f.retJson.ret=[f.retJson.error+"::"+f.retJson.errorMessage],f.retJson.data={})}}):void 0};var B="_m_h5_c",C="_m_h5_tk",D="_m_h5_tk_enc";q.prototype.__getTokenFromAlipay=function(){var b=c(),d=this.options,e=(a.navigator.userAgent,!!location.protocol.match(/^https?\:$/));return d.useAlipayJSBridge===!0&&!e&&y&&a.AlipayJSBridge&&a.AlipayJSBridge.call?a.AlipayJSBridge.call("getMtopToken",function(a){a&&a.token&&(d.token=a.token),b.resolve()},function(){b.resolve()}):b.resolve(),b.promise},q.prototype.__getTokenFromCookie=function(){var a=this.options;return a.CDR&&l(B)?a.token=l(B).split(";")[0]:a.token=a.token||l(C),a.token&&(a.token=a.token.split("_")[0]),r.resolve()},q.prototype.__waitWKWebViewCookie=function(b){var c=this.options;c.waitWKWebViewCookieFn&&c.H5Request&&a.webkit&&a.webkit.messageHandlers?c.waitWKWebViewCookieFn(b):b()},q.prototype.__processToken=function(a){var b=this,c=this.options;this.params;return c.token&&delete c.token,c.WindVaneRequest!==!0?s.then(function(){return b.__getTokenFromAlipay()}).then(function(){return b.__getTokenFromCookie()}).then(a).then(function(){var a=c.retJson,d=a.ret;if(d instanceof Array&&(d=d.join(",")),d.indexOf("TOKEN_EMPTY")>-1||(c.CDR===!0||c.syncCookieMode===!0)&&d.indexOf("ILLEGAL_ACCESS")>-1||d.indexOf("TOKEN_EXOIRED")>-1){if(c.maxRetryTimes=c.maxRetryTimes||5,c.failTimes=c.failTimes||0,c.H5Request&&++c.failTimes0&&(m(B,c.pageDomain,"*"),m(C,c.mainDomain,c.subDomain),m(D,c.mainDomain,c.subDomain)),a.retType=v.TOKEN_EXPIRED}}):void a()},q.prototype.__processRequestUrl=function(b){var c=this.params,d=this.options;if(d.hostSetting&&d.hostSetting[a.location.hostname]){var e=d.hostSetting[a.location.hostname];e.prefix&&(d.prefix=e.prefix),e.subDomain&&(d.subDomain=e.subDomain),e.mainDomain&&(d.mainDomain=e.mainDomain)}if(d.H5Request===!0){var g="//"+(d.prefix?d.prefix+".":"")+(d.subDomain?d.subDomain+".":"")+d.mainDomain+"/h5/"+c.api.toLowerCase()+"/"+c.v.toLowerCase()+"/",h=c.appKey||("waptest"===d.subDomain?"4272":"12574478"),j=(new Date).getTime(),k=i(d.token+"&"+j+"&"+h+"&"+c.data),l={jsv:A,appKey:h,t:j,sign:k},m={data:c.data,ua:c.ua};Object.keys(c).forEach(function(a){"undefined"==typeof l[a]&&"undefined"==typeof m[a]&&"headers"!==a&&"ext_headers"!==a&&"ext_querys"!==a&&(l[a]=c[a])}),c.ext_querys&&Object.keys(c.ext_querys).forEach(function(a){l[a]=c.ext_querys[a]}),d.getJSONP?l.type="jsonp":d.getOriginalJSONP?l.type="originaljsonp":(d.getJSON||d.postJSON)&&(l.type="originaljson"),"undefined"!=typeof c.valueType&&("original"===c.valueType?d.getJSONP||d.getOriginalJSONP?l.type="originaljsonp":(d.getJSON||d.postJSON)&&(l.type="originaljson"):"string"===c.valueType&&(d.getJSONP||d.getOriginalJSONP?l.type="jsonp":(d.getJSON||d.postJSON)&&(l.type="json"))),d.useJsonpResultType===!0&&"originaljson"===l.type&&delete l.type,d.dangerouslySetProtocol&&(g=d.dangerouslySetProtocol+":"+g),"5.0"===c.SV&&(g+="5.0/",f()),d.querystring=l,d.postdata=m,d.path=g}b()},q.prototype.__processUnitPrefix=function(a){a()};var E=0;q.prototype.__requestJSONP=function(a){function b(a){if(k&&clearTimeout(k),l.parentNode&&l.parentNode.removeChild(l),"TIMEOUT"===a)window[j]=function(){window[j]=void 0;try{delete window[j]}catch(a){}};else{window[j]=void 0;try{delete window[j]}catch(b){}}}var d=c(),f=this.params,h=this.options,i=f.timeout||2e4,j="mtopjsonp"+(f.jsonpIncPrefix||"")+ ++E,k=setTimeout(function(){a(h.timeoutErrMsg||"TIMEOUT::接口超时"),b("TIMEOUT")},i);h.querystring.callback=j;var l=document.createElement("script"),m=h.path+"?"+g(h.querystring)+"&"+g(h.postdata);return"5.0"===f.SV&&window.etSign&&(m+="&bx_et="+window.etSign(m)),l.src=m,l.async=!0,l.onerror=function(){b("ABORT"),a(h.abortErrMsg||"ABORT::接口异常退出")},window[j]=function(){h.results=Array.prototype.slice.call(arguments),b(),d.resolve()},e(l),d.promise},q.prototype.__requestJSON=function(b){function d(a){k&&clearTimeout(k),"TIMEOUT"===a&&i.abort()}var e=c(),f=this.params,h=this.options,i=new a.XMLHttpRequest,j=f.timeout||2e4,k=setTimeout(function(){b(h.timeoutErrMsg||"TIMEOUT::接口超时"),d("TIMEOUT")},j);h.CDR&&l(B)&&(h.querystring.c=decodeURIComponent(l(B))),i.onreadystatechange=function(){if(4==i.readyState){var a,c,f=i.status;if(f>=200&&300>f||304==f){d(),a=i.responseText,c=i.getAllResponseHeaders()||"";try{a=/^\s*$/.test(a)?{}:JSON.parse(a),a.responseHeaders=c,h.results=[a],e.resolve()}catch(g){b("PARSE_JSON_ERROR::解析JSON失败")}}else d("ABORT"),b(h.abortErrMsg||"ABORT::接口异常退出")}};var m,n,o=h.path+"?"+g(h.querystring);h.getJSON?(m="GET",o+="&"+g(h.postdata)):h.postJSON&&(m="POST",n=g(h.postdata)),"5.0"===f.SV&&window.etSign&&(o+="&bx_et="+window.etSign(o)),i.open(m,o,!0),i.withCredentials=!0,i.setRequestHeader("Accept","application/json"),i.setRequestHeader("Content-type","application/x-www-form-urlencoded");var p=f.ext_headers||f.headers;if(p)for(var q in p)i.setRequestHeader(q,p[q]);return i.send(n),e.promise},q.prototype.__requestWindVane=function(a){function d(a){if(g.results=[a],a&&a.stat&&a.stat.falcoId){var c=function(){},d={mtopStart:u,mtopEnd:Date.now(),falcoId:a.stat.falcoId};b.windvane.call(w,"falcoExtend",d,c,c)}e.resolve()}var e=c(),f=this.params,g=this.options,h=f.data,i=f.api,j=f.v,k=g.postJSON?1:0,l=g.getJSON||g.postJSON||g.getOriginalJSONP?"originaljson":"";"undefined"!=typeof f.valueType&&("original"===f.valueType?l="originaljson":"string"===f.valueType&&(l="")),g.useJsonpResultType===!0&&(l="");var m,n,o="https"===location.protocol?1:0,p=f.isSec||0,q=f.sessionOption||"AutoLoginOnly",r=f.ecode||0,s=f.ext_headers||{},t=f.ext_querys||{};n="undefined"!=typeof f.timer?parseInt(f.timer):"undefined"!=typeof f.timeout?parseInt(f.timeout):2e4,m=2*n;var u=Date.now();f.needLogin===!0&&"undefined"==typeof f.sessionOption&&(q="AutoLoginAndManualLogin"),"undefined"!=typeof f.secType&&"undefined"==typeof f.isSec&&(p=f.secType);var v={api:i,v:j,post:String(k),type:l,isHttps:String(o),ecode:String(r),isSec:String(p),param:JSON.parse(h),timer:n,needLogin:!!f.needLogin,sessionOption:q,ext_headers:s,ext_querys:t};f.ttid&&g.dangerouslySetWVTtid===!0&&(v.ttid=f.ttid),Object.assign&&f.dangerouslySetWindvaneParams&&Object.assign(v,f.dangerouslySetWindvaneParams);var w="MtopWVPlugin";return"string"==typeof f.customWindVaneClassName&&(w=f.customWindVaneClassName),b.windvane.call(w,"send",v,d,d,m),e.promise},q.prototype.__requestAlipay=function(b){function d(a){g.results=[a],e.resolve()}var e=c(),f=this.params,g=this.options,h={apiName:f.api,apiVersion:f.v,needEcodeSign:"1"===String(f.ecode),headers:f.ext_headers||{},usePost:!!g.postJSON};j(f.data)||(f.data=JSON.parse(f.data)),h.data=f.data,f.ttid&&g.dangerouslySetWVTtid===!0&&(h.ttid=f.ttid),(g.getJSON||g.postJSON||g.getOriginalJSONP)&&(h.type="originaljson"),"undefined"!=typeof f.valueType&&("original"===f.valueType?h.type="originaljson":"string"===f.valueType&&delete h.type),g.useJsonpResultType===!0&&delete h.type,Object.assign&&f.dangerouslySetAlipayParams&&Object.assign(h,f.dangerouslySetAlipayParams);var i="mtop";return"string"==typeof f.customAlipayJSBridgeApi&&(i=f.customAlipayJSBridgeApi),a.AlipayJSBridge.call(i,h,d),e.promise},q.prototype.__processRequest=function(a,b){var c=this;return s.then(function(){var a=c.options;if(a.H5Request&&(a.getJSONP||a.getOriginalJSONP))return c.__requestJSONP(b);if(a.H5Request&&(a.getJSON||a.postJSON))return c.__requestJSON(b);if(a.WindVaneRequest)return y?c.__requestAlipay(b):c.__requestWindVane(b);throw new Error("UNEXCEPT_REQUEST::错误的请求类型")}).then(a).then(function(){var a=c.options,b=(c.params,a.results[0]),d=b&&b.ret||[];b.ret=d,d instanceof Array&&(d=d.join(","));var e=b.c;a.CDR&&e&&k(B,e,{domain:a.pageDomain,path:"/",secure:a.secure,sameSite:a.sameSite}),d.indexOf("SUCCESS")>-1?b.retType=v.SUCCESS:b.retType=v.ERROR,a.retJson=b})},q.prototype.__sequence=function(a){function b(a){if(a instanceof Array)a.forEach(b);else{var g,h=c(),i=c();e.push(function(){return h=c(),g=a.call(d,function(a){return h.resolve(a),i.promise},function(a){return h.reject(a),i.promise}),g&&(g=g["catch"](function(a){h.reject(a)})),h.promise}),f.push(function(a){return i.resolve(a),g})}}var d=this,e=[],f=[];a.forEach(b);for(var g,h=s;g=e.shift();)h=h.then(g);for(;g=f.pop();)h=h.then(g);return h};var F=function(a){if(t.EtRequest&&!window.__etReady){f();var b,c,d=Number(t.EtLoadTimeout)||5e3,e=!1;window.etReady=function(){window.__etReady=!0,e||(e=!0,a())};var g=function(){b&&clearInterval(b),c&&clearTimeout(c),e||(e=!0,a())};b=setInterval(function(){try{window.etSign&&(window.__etReady=!0,g()),window.etReady&&!window.__etReady&&(window.etReady=function(){window.__etReady=!0,g()})}catch(a){g()}},100),c=setTimeout(function(){g()},d)}else a()},G=function(a){a()};q.prototype.request=function(c){var e=this;if(this.options=d(c||{},t),!r){var f="当前浏览器不支持Promise,请在windows对象上挂载Promise对象";throw b.mtop={ERROR:f},new Error(f)}var g=r.resolve([F,G]).then(function(a){var b=a[0],c=a[1];return e.__sequence([b,e.__processRequestMethod,e.__processRequestType,e.__processToken,e.__processRequestUrl,e.middlewares,e.__processRequest,c])}).then(function(){var a=e.options.retJson;return a.retType!==v.SUCCESS?r.reject(a):e.options.successCallback?void e.options.successCallback(a):r.resolve(a)})["catch"](function(a){var c;return a instanceof Error?(console.error(a.stack),c={ret:[a.message],stack:[a.stack],retJson:v.ERROR}):c="string"==typeof a?{ret:[a],retJson:v.ERROR}:void 0!==a?a:e.options.retJson,b.mtop.errorListener&&b.mtop.errorListener({api:e.params.api,data:e.params.data,v:e.params.v,retJson:c}),e.options.failureCallback?void e.options.failureCallback(c):r.reject(c)});return this.__processRequestType(),e.options.H5Request&&(e.constructor.__firstProcessor||(e.constructor.__firstProcessor=g),F=function(a){e.constructor.__firstProcessor.then(a)["catch"](a)}),("get"===this.params.type&&"json"===this.params.dataType||"post"===this.params.type)&&(c.pageDomain=c.pageDomain||h(a.location.hostname),c.mainDomain!==c.pageDomain&&(c.maxRetryTimes=4,c.CDR=!0)),this.__requestProcessor=g,g},b.mtop=function(a){return new q(a)},b.mtop.request=function(a,b,c){var d={H5Request:a.H5Request,WindVaneRequest:a.WindVaneRequest,LoginRequest:a.LoginRequest,AntiCreep:a.AntiCreep,AntiFlood:a.AntiFlood,successCallback:b,failureCallback:c||b};return new q(a).request(d)},b.mtop.H5Request=function(a,b,c){var d={H5Request:!0,successCallback:b,failureCallback:c||b};return new q(a).request(d)},b.mtop.middlewares=u,b.mtop.config=t,b.mtop.RESPONSE_TYPE=v,b.mtop.CLASS=q}(window,window.lib||(window.lib={})),function(a,b){function c(a){return a.preventDefault(),!1}function d(a){var b=new RegExp("(?:^|;\\s*)"+a+"\\=([^;]+)(?:;\\s*|$)").exec(document.cookie);return b?b[1]:void 0}function e(b,d){var e=navigator.userAgent.match(/.*(iPhone|iPad|Android|ios|SymbianOS|Windows Phone).*/i),f=e&&d.h5url?d.h5url:d.url,g=d.dialogSize,h=this,i=a.dpr||1,j=document.createElement("div"),k=document.documentElement.getBoundingClientRect(),l=Math.max(k.width,window.innerWidth)/i,m=window.innerHeight/i;j.style.cssText=["-webkit-transform:scale("+i+") translateZ(0)","-ms-transform:scale("+i+") translateZ(0)","transform:scale("+i+") translateZ(0)","-webkit-transform-origin:0 0","-ms-transform-origin:0 0","transform-origin:0 0","width:"+l+"px","height:"+m+"px","z-index:2147483647","position: fixed","left:0","top:0px","background:"+(l>800?"rgba(0,0,0,.5)":"#FFF"),"display:none"].join(";");var n=document.createElement("div");n.style.cssText=["width:100%","height:52px","background:transparent","line-height:52px","text-align:left","box-sizing:border-box","padding-left:20px","position:absolute","left:0","top:0","font-size:16px","font-weight:bold","color:#333"].join(";"),n.innerText=b;var o=document.createElement("img");o.style.cssText=["display:block","position:absolute","margin-top:15px","right:0","top:0","height:15px","line-height:52px","padding:0 20px","color:#999"].join(";"),o.src="https://gw.alicdn.com/tfs/TB1QZN.CYj1gK0jSZFuXXcrHpXa-200-200.png";var p=document.createElement("iframe");if(p.style.cssText=["width:100%","height:100%","border:0","overflow:hidden"].join(";"),e)n.appendChild(o),j.appendChild(n);else{var q=g&&g.width||"420px",r=g&&g.height||"320px",s=50,t=50,u=24,v=-39;r.indexOf("px")>-1?u-=Number(r.replace("px",""))/2:r.indexOf("%")>-1&&(s-=Number(r.replace("%",""))/2),q.indexOf("px")>-1?v+=Number(q.replace("px",""))/2:q.indexOf("%")>-1&&(t+=Number(q.replace("%",""))/2),o.style.cssText=["position:absolute","width:15px","height:15px","top:"+s+"%","left:"+t+"%","cursor: pointer","border:0","z-index:1","overflow:hidden","margin-top:"+u+"px","margin-left:"+v+"px"].join(";"),j.appendChild(o),p.style.cssText=["position:absolute","top:0px","left:0px","bottom:0px","right:0px","margin:auto","width:"+q,"height:"+r,"border:0","background:#FFF","overflow:hidden","border-radius:18px"].join(";")}j.appendChild(p),j.className="J_MIDDLEWARE_FRAME_WIDGET",document.body.appendChild(j),p.src=f,o.addEventListener("click",function(){h.hide();var a=document.createEvent("HTMLEvents");a.initEvent("close",!1,!1),j.dispatchEvent(a)},!1),this.addEventListener=function(){j.addEventListener.apply(j,arguments)},this.removeEventListener=function(){j.removeEventListener.apply(j,arguments)},this.show=function(){document.addEventListener("touchmove",c,!1),j.style.display="block",window.scrollTo(0,0)},this.hide=function(){document.removeEventListener("touchmove",c),window.scrollTo(0,-k.top),j.parentNode&&j.parentNode.removeChild(j)}}function f(a){var c=this,d=this.options,e=this.params;return a().then(function(){var a=d.retJson,f=a.ret,g=navigator.userAgent.toLowerCase(),h=g.indexOf("safari")>-1&&g.indexOf("chrome")<0&&g.indexOf("qqbrowser")<0;if(f instanceof Array&&(f=f.join(",")),(f.indexOf("SESSION_EXPIRED")>-1||f.indexOf("SID_INVALID")>-1||f.indexOf("AUTH_REJECT")>-1||f.indexOf("NEED_LOGIN")>-1)&&(a.retType=l.SESSION_EXPIRED,!d.WindVaneRequest&&(k.LoginRequest===!0||d.LoginRequest===!0||e.needLogin===!0))){if(!b.login)throw new Error("LOGIN_NOT_FOUND::缺少lib.login");if(d.safariGoLogin!==!0||!h||"taobao.com"===d.pageDomain)return b.login.goLoginAsync().then(function(a){return c.__sequence([c.__processToken,c.__processRequestUrl,c.__processUnitPrefix,c.middlewares,c.__processRequest])})["catch"](function(a){throw"CANCEL"===a?new Error("LOGIN_CANCEL::用户取消登录"):new Error("LOGIN_FAILURE::用户登录失败")});b.login.goLogin()}})}function g(a){var b=this.options;this.params;return b.H5Request!==!0||k.AntiFlood!==!0&&b.AntiFlood!==!0?void a():a().then(function(){var a=b.retJson,c=a.ret;c instanceof Array&&(c=c.join(",")),c.indexOf("FAIL_SYS_USER_VALIDATE")>-1&&a.data.url&&(b.AntiFloodReferer?location.href=a.data.url.replace(/(http_referer=).+/,"$1"+b.AntiFloodReferer):location.href=a.data.url)})}function h(b){var c=this,f=this.options,g=this.params;return f.AntiCreep!==!1&&(f.AntiCreep=!0),g.forceAntiCreep!==!0&&f.H5Request!==!0||k.AntiCreep!==!0&&f.AntiCreep!==!0?void b():b().then(function(){var b=f.retJson,h=b.ret;if(h instanceof Array&&(h=h.join(",")),h.indexOf("CHECKJS_FLAG")>-1&&b.uuid&&b.serid){try{var j=!!window.document._sufei_data2,k=new Image,l="https://fourier.taobao.com/ts?ext=200&uuid="+b.uuid+"&serid="+b.serid+"&sufei="+j;window.location&&location.href&&(l+="&href=="+location.href.substr(0,128)),window.__fyModule&&(l+="&fyModuleLoad="+window.__fyModule.load+"&fyModuleInit="+window.__fyModule.init),window.__umModule&&(l+="&umModuleLoad="+window.__umModule.load+"&umModuleInit="+window.__umModule.init),window.__uabModule&&(l+="&uabModuleLoad="+window.__uabModule.load+"&uabModuleInit="+window.__uabModule.init),window.__ncModule&&(l+="&ncModuleLoad="+window.__ncModule.load+"&ncModuleInit="+window.__ncModule.init),window.__nsModule&&(l+="&nsModuleLoad="+window.__nsModule.load+"&nsModuleInit="+window.__nsModule.init),window.__etModule&&(l+="&etModuleLoad="+window.__etModule.load+"&etModuleInit="+window.__etModule.init),k.src=l,document.body.appendChild(k)}catch(m){console.log(m,"上报异常")}return c.__sequence([c.__processToken,c.__processRequestUrl,c.__processUnitPrefix,c.middlewares,c.__processRequest])}if((h.indexOf("RGV587_ERROR::SM")>-1||h.indexOf("ASSIST_FLAG")>-1)&&b.data.url){var n="_m_h5_smt",o=d(n),p=!1;if(f.saveAntiCreepToken===!0&&o){o=JSON.parse(o);for(var q in o)g[q]&&(p=!0)}if(f.saveAntiCreepToken===!0&&o&&!p){for(var q in o)g[q]=o[q];return c.__sequence([c.__processToken,c.__processRequestUrl,c.__processUnitPrefix,c.middlewares,c.__processRequest])}return new i(function(d,h){function i(){k.removeEventListener("close",i),a.removeEventListener("message",j),h("USER_INPUT_CANCEL::用户取消输入")}function j(b){var e;try{e=JSON.parse(b.data)||{}}catch(l){}if(e&&"child"===e.type){k.removeEventListener("close",i),a.removeEventListener("message",j),k.hide();var m;try{m=JSON.parse(decodeURIComponent(e.content)),"string"==typeof m&&(m=JSON.parse(m));for(var o in m)g[o]=m[o];f.saveAntiCreepToken===!0?(document.cookie=n+"="+JSON.stringify(m)+";",a.location.reload()):c.__sequence([c.__processToken,c.__processRequestUrl,c.__processUnitPrefix,c.middlewares,c.__processRequest]).then(d)}catch(l){h("USER_INPUT_FAILURE::用户输入失败")}}}var k=new e("",b.data);k.addEventListener("close",i,!1),a.addEventListener("message",j,!1),k.show()})}})}if(!b||!b.mtop||b.mtop.ERROR)throw new Error("Mtop 初始化失败!");var i=a.Promise,j=b.mtop.CLASS,k=b.mtop.config,l=b.mtop.RESPONSE_TYPE;b.mtop.middlewares.push(f),b.mtop.loginRequest=function(a,b,c){var d={LoginRequest:!0,H5Request:!0,successCallback:b,failureCallback:c||b};return new j(a).request(d)},b.mtop.antiFloodRequest=function(a,b,c){var d={AntiFlood:!0,successCallback:b,failureCallback:c||b};return new j(a).request(d)},b.mtop.middlewares.push(g),b.mtop.antiCreepRequest=function(a,b,c){var d={AntiCreep:!0,successCallback:b,failureCallback:c||b};return new j(a).request(d)},b.mtop.middlewares.push(h)}(window,window.lib||(window.lib={}));!function(){"use strict";Object.create;Object.create;var e=window.document,t=window.navigator.userAgent,n=location.hostname;function o(t){var n;try{n=new RegExp("(?:^|;\\s*)".concat(t,"\\=([^;]+)(?:;\\s*|$)")).exec(e.cookie)}catch(e){}return n?n[1]:void 0}function i(e,t){t?location.replace(e):location.href=e}var a,r,c,l=t.match(/AliApp\(([^/]+)\/([\d._]+)\)/i),s=t.match(/MicroMessenger/i),u=t.match(/Windows|Macintosh/i),g="m",d="wapa",f="wapatest",p=new RegExp("([^.]*?)\\.?((?:".concat(["taobao.net","taobao.com"].join(")|(?:").replace(/\./g,"\\."),"))"),"i"),m=n.match(p)||[],v=(m[2]||"taobao.com").match(/\.?taobao\.net$/)?"taobao.net":"taobao.com",b=(a=v,r=m[1]||g,"taobao.net"===a&&(r=f),r!==g&&r!==d&&r!==f&&(r=g),r),h="login",y=function(){var e="",t=o("_w_tb_nick"),n=o("_nk_")||o("snk"),i=o("sn");return t&&"null"!==t?e=decodeURIComponent(t):n&&"null"!==n?e=unescape(unescape(n).replace(/\\u/g,"%u")):i&&"null"!==i&&(e=decodeURIComponent(i)),e=e.replace(//g,">")},w=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&o.push("".concat(i,"=").concat(encodeURIComponent(t[i])));var a=e;return a=/\?/.test(e)?"".concat(e,"&").concat(o.join("&")):"".concat(a,"?").concat(o.join("&")),n?"".concat(a,"#").concat(n):a},O=window.navigator.userAgent,x=/.+AliApp\((\w+)\/((?:\d+\.)+\d+)\)/.exec(O||"")||[],S=String(x[1]||"").toLowerCase(),L={xianyu:["fm"],cainiao:["cn"],taobao:["tb","tm"],jiaoyi_mao:["jym"],litetao:["lt","lt-lite"]},E={xianyu:{loginPrefix:"passport",bizDomainPrefix:"h5",bizSubDomain:"m",mainDomain:"goofish.com"},litetao:{loginPrefix:"passport",bizDomainPrefix:"pages",bizSubDomain:"",mainDomain:"ltao.com"}};!function(e){e.Login="login",e.Logout="logout",e.Oauth="oauth"}(c||(c={}));var C,j,N=function(e){var t=E[e];return t||console.warn("[lib-login] site:".concat(e," config is not defined, use lib.login.setSiteDomainConfig to set config")),t},U=function(e){var t=N(e);return t?"".concat(t.bizDomainPrefix,".").concat((null==t?void 0:t.bizSubDomain)?"".concat(t.bizSubDomain,"."):"").concat((null==t?void 0:t.mainDomain)||""):""},P=function(e,t){e&&t&&(E[e]=t)},A={xianyu:{api:"mtop.idle.user.simple",v:"1.0",data:{},ecode:1,sessionOption:"AutoLoginOnly",jsonpIncPrefix:"liblogin",dataType:"json"},taobao:{api:"mtop.user.getUserSimple",v:"1.0",data:{},ecode:1,sessionOption:"AutoLoginOnly",jsonpIncPrefix:"liblogin"}},_=function(e,t){return t?t===e:!!S&&(L[e]||[]).some((function(e){return e&&S.indexOf(e)>-1}))},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"taobao",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m";if("taobao"===e)return u?"https://login.taobao.com":"https://".concat(h,".").concat(t,".").concat(v);var n=N(e);return"https://".concat((null==n?void 0:n.loginPrefix)||"",".").concat((null==n?void 0:n.mainDomain)||"")},F=function(e){var t=e.site,n=void 0===t?"taobao":t,o=e.type,i=void 0===o?c.Login:o,a=e.originLoginPath,r=void 0===a?"login.htm":a,l=e.originLogoutPath,s=void 0===l?"logout.htm":l;return"taobao"===n?i===c.Logout?"/".concat(s):u?"/":"/".concat(r):i===c.Logout?"/".concat(s):"login.htm"!==r?"/".concat(r):"/mini_".concat(r)},W=function(e){var t=e.isFrame,n=void 0!==t&&t,o=e.site,i=void 0===o?"taobao":o,a=e.type,r=void 0===a?c.Login:a,l=e.redirectUrl,s=e.customParams,u=void 0===s?{}:s,g=l||location.href,d={taobao:Object.assign({ttid:n?"h5@iframe":"",redirectURL:g},u),siteLoginParams:Object.assign({ttid:n?"h5@iframe":"",redirectType:n?"iframeRedirect":"Redirect",returnUrl:g,appName:i,appEntrance:"web",isMobile:"true"},u),siteLogoutParams:Object.assign({toUrl:g},u)};return"taobao"===i?d.taobao:r===c.Login?d.siteLoginParams:d.siteLogoutParams},T=location,D=T.hostname,R=T.protocol,I=function(){var e="tmall.com";return D===e||D.endsWith(".".concat(e))};function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function z(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useSemiLayer:!1};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.text=(null==o?void 0:o.title)||"\u60a8\u9700\u8981\u767b\u5f55\u624d\u80fd\u7ee7\u7eed\u8bbf\u95ee",this.url=n,this.widgetFrame=document.createElement("div"),this.rect=document.documentElement.getBoundingClientRect();var i=null==o?void 0:o.useSemiLayer;this.widgetFrame.style.cssText=K(Y.widgetFrame,i);var a=document.createElement("div");a.style.cssText=K(Y.widgetTitle,i),a.innerText=this.text;var r=null;i?((r=document.createElement("img")).src="//gw.alicdn.com/imgextra/i2/O1CN01KQFA4M287q502xH3X_!!6000000007886-2-tps-52-54.png",this.url="".concat(this.url).concat(this.url.indexOf("?")?"&":"?","isSemiLayer=true")):(r=document.createElement("a")).innerText="\u5173\u95ed",r.style.cssText=K(Y.widgetClose,i);var c=document.createElement("iframe");c.style.cssText=K(Y.iframe,i),a.appendChild(r),this.widgetFrame.appendChild(a),this.widgetFrame.appendChild(c),q.body.appendChild(this.widgetFrame),c.src=this.url,r.addEventListener("click",(function(){t.hide();var e=q.createEvent("HTMLEvents");e.initEvent("close",!1,!1),t.widgetFrame.dispatchEvent(e)}),!1)}var t,n,o;return t=e,n=[{key:"show",value:function(){document.addEventListener("touchmove",Z,!1),this.widgetFrame.style.display="block",window.scrollTo(0,0)}},{key:"hide",value:function(){document.removeEventListener("touchmove",Z),window.scrollTo(0,-this.rect.top),q.body.removeChild(this.widgetFrame)}},{key:"addEventListener",value:function(e,t,n){this.widgetFrame.addEventListener(e,t,n)}},{key:"removeEventListener",value:function(e,t,n){this.widgetFrame.removeEventListener(e,t,n)}}],n&&z(t.prototype,n),o&&z(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}!function(e,t,n){var o=e.Promise;t.login=t.login||{};var a={loginName:"login.htm",logoutName:"logout.htm",subDomain:b,forceNative:!0,disableWidgetLogin:!0,site:"",clientSite:"",enableWOAOauth:!1,oauthName:"oauth_sign.htm"};function r(n,o,i){var a=function(e,t){var n=encodeURIComponent("".concat(R,"//").concat(D));if("taobao"===t.site)return I()?"https://main.m.tmall.com/app/vip/h5-webapp/lib-login-message.html?origin=".concat(n):"https://h5.m.taobao.com/other/".concat(e,"end.html?origin=").concat(n);var o=U(t.site)||"market.m.taobao.com";return"https://".concat(o,"/app/vip/h5-webapp/lib-login-message.html?origin=").concat(n)}(n,o),r=t.login.generateUrl(n,Object.assign({redirectUrl:a,iframe:!0},o)),c=new Q(r,Object.assign(Object.assign({},t.login.config.widgetConfig),{title:o.title}));function l(){c.removeEventListener("close",l),e.removeEventListener("message",s),i("CANCEL")}function s(t){var n=t.data||{};if(n&&n.type&&"child"===n.type)return n.content&&n.content.indexOf("SUCCESS")>-1?(c.removeEventListener("close",l),e.removeEventListener("message",s),c.hide(),void i("SUCCESS")):void i("FAILURE")}c.addEventListener("close",l,!1),e.addEventListener("message",s,!1),c.show()}function u(n,o,a){var r=t.login.generateUrl(n,o);if(!e||!e.WindVane||!e.WindVane.isAvailable)return console.warn("WINDVANE_NOT_FOUND::\u7f3a\u5c11WindVane\u73af\u5883"),void i(r,o.replace);e.WindVane.call("aluUccJSBridge","uccTrustLogin",{site:o.site,scene:o.scene},(function(e){if((null==e?void 0:e.ret)&&e.ret.indexOf("HY_SUCCESS")>-1)return a?void a("SUCCESS"):void i(o.redirectUrl||location.href,o.replace);a?a("FAILURE",JSON.stringify(e)):console.warn("[lib-login] FAILURE with ".concat(JSON.stringify(e)))}),(function(e){(null==e?void 0:e.ret)&&e.ret.indexOf("HY_NO_HANDLER")>-1?i(r,o.replace):a&&a("FAILURE",JSON.stringify(e))}))}function g(n,o,a){var g;"function"==typeof o?(a=o,o=null):"string"==typeof o?o={redirectUrl:o}:"object"===G(o)&&o.url&&(o.redirectUrl=o.url),o=o||{};var d=(null===(g=null==t?void 0:t.login)||void 0===g?void 0:g.config)||{},f=d.site||"taobao",p=d.scene||"",m=d.clientSite||"",v=d.onCallWOAOauth,b=d.disbleWidgetLogin||d.disableWidgetLogin;if(s&&d.enableWOAOauth){var h=t.login.generateWOAOauthUrl({site:f});return null==v||v(),void i(h)}var y=t.login.generateUrl(n,Object.assign({site:f},o));if(l)return a&&o.forceNative&&_(f,m)?void function(n,o,a){e&&e.WindVane&&e.WindVane.isAvailable||console.warn("WINDVANE_NOT_FOUND::\u7f3a\u5c11WindVane\u73af\u5883"),e.WindVane.call("aluWVJSBridge","sdkLogin",o,(function(){a("SUCCESS")}),(function(e){var r=e&&e.ret;r&&"HY_FAILED"===r?a("CANCEL"):r&&r.indexOf("HY_")>-1?i(t.login.generateUrl(n,o),o.replace):a("CANCEL")}))}(n,Object.assign({},o),a):_(f,m)?e.WindVane&&e.WindVane.isAvailable?void e.WindVane.call("MtopWVPlugin","isSupportAccountSite",{accountSite:f},(function(){_(f,m)?i(y,o.replace):u(n,Object.assign({site:f,scene:p},o),a)}),(function(){i(t.login.generateUrl(n,Object.assign({site:"taobao"},o)),o.replace)})):void i(y,o.replace):void u(n,Object.assign({site:f,scene:p},o),a);!a||n!==c.Login||b?i(y,o.replace):r(n,Object.assign({site:f},o),a)}function d(e,t,n){var i;if(o&&((i={}).promise=new o((function(e,t){i.resolve=e,i.reject=t}))),g(e,t,(function(e){"function"==typeof n&&n(e),"SUCCESS"===e?i&&i.resolve(e):i&&i.reject(e)})),i)return i.promise}t.login.config=a,t.login.isLogin=function(e){var o,i=(null===(o=null==t?void 0:t.login)||void 0===o?void 0:o.config)||{};if(e&&"function"==typeof e&&t.mtop){var a=A.taobao,r=i.site;r&&A[r]&&(a=A[r]);var c=i.loginCheckMtopConf;return c&&c.api&&c.v&&(a=c),t.mtop.request(a,(function(o){o.retType===t.mtop.RESPONSE_TYPE.SUCCESS?e(!0,o):o.retType===t.mtop.RESPONSE_TYPE.SESSION_EXPIRED?e(!1,o):e(n,o)})),null}return!!this.getUserNick()},t.login.isLoginAsync=function(e){var t;if(o&&((t={}).promise=new o((function(e,n){t.resolve=e,t.reject=n}))),this.isLogin((function(n,o){e&&e(n,o),!0===n?t&&t.resolve(o):t&&t.reject(o)})),t)return t.promise},t.login.getUserNick=function(e){return e&&"function"==typeof e?(this.isLogin((function(t,o){var i,a,r=(null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.displayNick)||(null===(a=null==o?void 0:o.data)||void 0===a?void 0:a.nick);e(!0===t&&r?r:!1===t?"":n)})),null):y()},t.login.getUserNickAsync=function(e){var t;if(o&&((t={}).promise=new o((function(e,n){t.resolve=e,t.reject=n}))),this.getUserNick((function(n){"function"==typeof e&&e(n),n?t&&t.resolve(n):t&&t.reject()})),t)return t.promise},t.login.generateUrl=function(e,n){var o=t.login.config,i=o.subDomain,a=o.loginName,r=void 0===a?"login.htm":a,c=o.logoutName,l=void 0===c?"logout.htm":c,s=k(n.site||"taobao",i),u=F({site:n.site||"taobao",originLoginPath:r,originLogoutPath:l,type:e}),g=W({site:n.site,isFrame:!!n.iframe,redirectUrl:n.redirectUrl,type:e,customParams:t.login.config.loginUrlParams||{}});return w("".concat(s).concat(u),g)},t.login.generateWOAOauthUrl=function(e){var n=e.site,o=t.login.config,i=o.subDomain,a=o.oauthName,r=void 0===a?"oauth_sign.htm":a,c=o.WOAOauthConfig,l=void 0===c?{}:c,s=l.appid,u=l.appName,g=l.appEntrance,d=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i(()=>{var __webpack_modules__={110:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__,root,factory;function _typeof(t){return _typeof="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},_typeof(t)}"undefined"!=typeof navigator&&(root=window||{},factory=function(window){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,idPrefix="",expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r=e.length;for(t=0;t>>=1;return(t+r)/e};return v.int32=function(){return 0|g.g(4)},v.quick=function(){return g.g(4)/4294967296},v.double=v,m(f(g.S),t),(c.pass||d||function(t,r,i,a){return a&&(a.S&&p(a,g),t.state=function(){return p(g,{})}),i?(e[s]=t,r):t})(v,y,"global"in c?c.global:this==e,c.state)},m(e.random(),t)}([],BMMath);var BezierFactory=function(){var t={getBezierEasing:function(t,r,i,s,a){var n=a||("bez_"+t+"_"+r+"_"+i+"_"+s).replace(/\./g,"p");if(e[n])return e[n];var o=new p([t,r,i,s]);return e[n]=o}},e={},r=11,i=1/(r-1),s="function"==typeof Float32Array;function a(t,e){return 1-3*e+3*t}function n(t,e){return 3*e-6*t}function o(t){return 3*t}function h(t,e,r){return((a(e,r)*t+n(e,r))*t+o(e))*t}function l(t,e,r){return 3*a(e,r)*t*t+2*n(e,r)*t+o(e)}function p(t){this._p=t,this._mSampleValues=s?new Float32Array(r):new Array(r),this._precomputed=!1,this.get=this.get.bind(this)}return p.prototype={get:function(t){var e=this._p[0],r=this._p[1],i=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),e===r&&i===s?t:0===t?0:1===t?1:h(this._getTForX(t),r,s)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&r===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],s=0;sn?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||s-1<=a){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),s=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;er[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,r,i,s=t.length;for(e=0;e=n.t-s){a.h&&(a=n),c=0;break}if(n.t-s>t){c=d;break}d=i&&i<=e||this._caching.lastFrame=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(e,this._caching);this.pv=s}return this._caching.lastFrame=e,this.pv}function a(t){var r;if("unidimensional"===this.propType)r=t*this.mult,1e-5=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(i=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],s=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(i[0]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/r,0),s[0]=a.getValueAtTime(a.keyframes[0].t/r,0),s[1]=n.getValueAtTime(n.keyframes[0].t/r,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(i[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/r,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0),s[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/r,0)):(i=[a.pv,n.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime),s[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/r,n.offsetTime))}else i=s=t;this.v.rotate(-Math.atan2(i[1]-s[1],i[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y=f,g=c.length-1,v=!0;v&&(d=c[y],!((u=c[y+1]).t-this.offsetTime>t));)y=u.t-this.offsetTime)p=1;else if(ti+r||(p=o.s*s<=i?0:(o.s*s-i)/r,m=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,m]))}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;ee.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[s],f[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[s],f[i].o[s-1],f[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(f[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[i].v[s-1],f[i].o[s-1],f[i].i[0],f[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(f[i].v[s-1],f[i].v[0],f[i].o[s-1],f[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i=d.length&&(m=0,d=u[f+=1]?u[f].points:P.v.c?u[f=m=0].points:(l-=h.partialLength,null)),d&&(c=h,y=(h=d[m]).partialLength));L=T[s].an/2-T[s].add,_.translate(-L,0,0)}else L=T[s].an/2-T[s].add,_.translate(-L,0,0),_.translate(-E[0]*T[s].an*.005,-E[1]*B*.01,0);for(F=0;Fe);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r=FontManager.getCombinedCharacterCodes(),i=[],s=0,a=t.length;sthis.minimumFontSize&&k<_?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=A,r=t.finalText.length,C=!1)}g=-S;var M,F=P=0;for(e=0;e=r(p)&&(l=t(0,e(i-p<0?e(m,1)-(p-i):m-i,1))),h(l));return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(st-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRenderer.prototype.createThreeDContainer=function(t,e){var r,i,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(r=s.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var n="50% 50%";r.webkitTransformOrigin=n,r.mozTransformOrigin=n,r.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=o,i.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRenderer.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;tt?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMaxthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;rthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r=this.totalFrames-1&&0=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==_typeof(t[0])){var r,i=t.length;for(r=0;rdata.k[e].t&&tdata.k[e+1].t-t?(r=e+2,data.k[e+1].t):(r=e+1,data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else i=r=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;rl.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;al.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(m.length)).length,a=0;an){var p=o,m=r.c&&o===h-1?0:o+1,f=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[m],r.o[p],r.i[m],f,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([o],a),extendPrototype([o],n),n.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime="0"&&"9">=b;)c+=b,g();if("."===b)for(c+=".";g()&&b>="0"&&"9">=b;)c+=b;if("e"===b||"E"===b)for(c+=b,g(),("-"===b||"+"===b)&&(c+=b,g());b>="0"&&"9">=b;)c+=b,g();return a=+c,isFinite(a)?a:void f("Bad number")},i=function(){var a,c,d,h="";if('"'===b)for(;g();){if('"'===b)return g(),h;if("\\"===b)if(g(),"u"===b){for(d=0,c=0;4>c&&(a=parseInt(g(),16),isFinite(a));c+=1)d=16*d+a;h+=String.fromCharCode(d)}else{if("string"!=typeof e[b])break;h+=e[b]}else h+=b}f("Bad string")},j=function(){for(;b&&" ">=b;)g()},k=function(){switch(b){case"t":return g("t"),g("r"),g("u"),g("e"),!0;case"f":return g("f"),g("a"),g("l"),g("s"),g("e"),!1;case"n":return g("n"),g("u"),g("l"),g("l"),null}f("Unexpected '"+b+"'")},l=function(){var a=[];if("["===b){if(g("["),j(),"]"===b)return g("]"),a;for(;b;){if(a.push(d()),j(),"]"===b)return g("]"),a;g(","),j()}}f("Bad array")},m=function(){var a,c={};if("{"===b){if(g("{"),j(),"}"===b)return g("}"),c;for(;b;){if(a=i(),j(),g(":"),Object.hasOwnProperty.call(c,a)&&f('Duplicate key "'+a+'"'),c[a]=d(),j(),"}"===b)return g("}"),c;g(","),j()}}f("Bad object")};return d=function(){switch(j(),b){case"{":return m();case"[":return l();case'"':return i();case"-":return h();default:return b>="0"&&"9">=b?h():k()}},function(e,g){var h;return c=e,a=0,b=" ",h=d(),j(),b&&f("Syntax error"),"function"==typeof g?function i(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=i(e,c),void 0!==d?e[c]=d:delete e[c]);return g.call(a,b,e)}({"":h},""):h}}();!function(){window.MiniLoginEmbedder||(window.MiniLoginEmbedder=function(){return this.config={targetId:"alibaba-login-iframe",iframeUrl:"https://passport.alipay.com/littleLogin/littleLogin.htm",appName:"4",appEntrance:"default",lang:"zh_CN",cssLink:"",styleType:"vertical",beforeSubmitBtnHtml:"",afterSubmitBtnHtml:"",bizParams:"",queryStr:"",resizeIframeWidthFix:!1,resizeIframeHeightFix:!1,loginId:null,iframeWidth:250,iframeHeight:250,notLoadSsoView:!1,notKeepLogin:!1,isMobile:!1},this.temp={target:null,iframe:null,iframeUrl:null},this._listeners={},this._hashCodeCounter=0,this._messageType=null,this._bakWindowName=window.name,this._windowNameHash=null,this._windowNameTimer=null,this.cachedCustomConfig=null,this},window.MiniLoginEmbedder.prototype={merge:function(){for(var a,b={},c=Array.prototype.slice.call(arguments),d=0;a=c[d++];)for(var e in a)b[e]=a[e];return b},json2str:function(a){switch(a.constructor){case Object:var b="{";for(var c in a)a[c]&&(b+='"'+c+'":'+arguments.callee(a[c])+",");return","==b.substr(b.length-1)&&(b=b.substr(0,b.length-1)),b+"}";case Array:var b="[";for(var c in a)b+=arguments.callee(a[c])+",";return","==b.substr(b.length-1)&&(b=b.substr(0,b.length-1)),b+"]";default:return'"'+a.toString()+'"'}},toQueryPair:function(a,b){return"undefined"==typeof b?a:a+"="+encodeURIComponent(null===b?"":String(b))},toQueryString:function(a){var b=this,c=[];for(var d in a){d=encodeURIComponent(d);var e=a[d];if(e&&e.constructor==Array){for(var f,g=[],h=0,i=e.length;i>h;h++)f=e[h],g.push(b.toQueryPair(d,f));c=c.concat(g)}else c.push(b.toQueryPair(d,e))}return c.join("&")},get:function(a){return"string"==typeof a?document.getElementById(a):a},hasClass:function(a,b){return a.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)"))},addClass:function(a,b){return""===a.className?void(a.className=b):void(this.hasClass(a,b)||(a.className+=" "+b))},removeClass:function(a,b){if(this.hasClass(a,b)){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");a.className=a.className.replace(c," ")}},on:function(a,b,c){var d=this.get(a);d.attachEvent?(d["e"+b+c]=c,d[b+c]=function(){d["e"+b+c](window.event)},d.attachEvent("on"+b,d[b+c])):d.addEventListener(b,c,!1)},addEvent:function(a,b){if("function"==typeof b){var c=this._listeners[a];c||(c=this._listeners[a]={}),c[this._toHashCode(b)]=b}},fireEvent:function(a,b){if(this._listeners[a])for(var c in this._listeners[a])this._listeners[a][c].call(this,b)},_toHashCode:function(a){return a._hashCode?a._hashCode:a._hashCode="_"+(this._hashCodeCounter++).toString(32)},_tempOnInit:function(){this.temp.target=this.get(this.config.targetId)},_parseWindowNameData:function(a){var b=a.split("[@]").pop().split("[login-iframe-message]");return{origin:b[0],data:b[1]}},init:function(a){this.cachedCustomConfig=a,this.config=this.merge(this.config,a||{});var b=this;this.config,this.temp;b._tempOnInit(),b._renderIframe(),window.postMessage?(b._messageType="postMessage",b.on(window,"message",function(a){b.messageHanlder.call(b,a)})):(b._messageType="windowName",window.name="",b._windowNameHash="",b._windowNameTimer=setInterval(function(){""!==window.name&&-1!==window.name.indexOf("[login-iframe-message]")&&window.name!=b._windowNameHash&&(b._windowNameHash=window.name,b.messageHanlder(b._parseWindowNameData(window.name)))},50)),this.fireEvent("onInit",{_self:this}),this.free()},messageHanlder:function(a){var b,c=this,d=this.config,e=this.temp;try{b=a.data.indexOf("action")>-1?json_parse(decodeURIComponent(a.data)):""}catch(f){b=""}switch(b.showIframe&&("visible"!==e.iframe.style.visibility&&(e.iframe.style.visibility="visible"),this.fireEvent("onIframeShow",{_self:e.iframe}),c.addClass(e.target,"iframe-show")),b.hideIframe&&("hidden"!==e.iframe.style.visibility&&(e.iframe.style.visibility="hidden"),this.fireEvent("onIframeHide",{_self:e.iframe}),c.removeClass(e.target,"iframe-show")),b.action){case"resizeIframe":if(0==e.iframe.offsetHeight)return;d.resizeIframeWidthFix||(e.iframe.width=b.width),d.resizeIframeHeightFix||(e.iframe.height=b.height),c._bakOriginalIframeWidth||(d.resizeIframeWidthFix||(c._originalIframeWidth=b.width),d.resizeIframeHeightFix||(c._originalIframeHeight=b.height),c._bakOriginalIframeWidth=!0);break;case"refreshIframe":c.temp.iframe&&(c.temp.iframe.src=c.temp.iframeUrl);break;case"otherAction":}this.fireEvent("onMessage",b)},restoreOriginalWidth:function(){this.iframe.width=this._originalIframeWidth},restoreOriginalHeight:function(){this.iframe.height=this._originalIframeHeight},_renderIframe:function(){var a,b=this,c=this.config,d=this.temp,e=d.target,f=this.temp.iframe=document.createElement("iframe");a={lang:c.lang,appName:c.appName,appEntrance:c.appEntrance,styleType:c.styleType,bizParams:c.bizParams,notLoadSsoView:c.notLoadSsoView,notKeepLogin:c.notKeepLogin,isMobile:c.isMobile},c.loginId&&(a.loginId=c.loginId),f.id="alibaba-login-box",f.src=c.iframeUrl+"?"+b.toQueryString(a)+b.config.queryStr+"&rnd="+Math.random(),d.iframeUrl=f.src,f.width=c.iframeWidth,f.height=c.iframeHeight,f.frameBorder="none",f.scrolling="no",f.style.border="none",b.on(f,"load",function(){b.addClass(e,"iframe-loaded")}),e.appendChild(f),this.fireEvent("afterRenderIframe",{iframe:f})},free:function(){/msie/i.test(navigator.userAgent)&&CollectGarbage()},sleep:function(){var a=this;"windowName"===a._messageType&&(clearInterval(a._windowNameTimer),window.name=this._bakWindowName),this.free()},destory:function(){var a=this;"windowName"===a._messageType&&(clearInterval(a._windowNameTimer),window.name=this._bakWindowName),this.free()}})}();